| 1 |
/******/ (() => { // webpackBootstrap |
| 2 |
/******/ var __webpack_modules__ = ({ |
| 3 |
|
| 4 |
/***/ "./node_modules/@codeamp/block-components/dist/index.js": |
| 5 |
/*!**************************************************************!*\ |
| 6 |
!*** ./node_modules/@codeamp/block-components/dist/index.js ***! |
| 7 |
\**************************************************************/ |
| 8 |
/***/ ((__unused_webpack_module, exports) => { |
| 9 |
|
| 10 |
/*! For license information please see index.js.LICENSE.txt */ |
| 11 |
!function(){var e={814:function(e,t,o){var n;function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}!function(){"use strict";var i={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var n=r(o);if("string"===n||"number"===n)e.push(o);else if(Array.isArray(o)){if(o.length){var l=c.apply(null,o);l&&e.push(l)}}else if("object"===n){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var a in o)i.call(o,a)&&o[a]&&e.push(a)}}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):"object"===r(o.amdO)&&o.amdO?void 0===(n=function(){return c}.apply(t,[]))||(e.exports=n):window.classNames=c}()},922:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o})).join("")},t.i=function(e,o,n,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var c={};if(n)for(var l=0;l<this.length;l++){var a=this[l][0];null!=a&&(c[a]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);n&&c[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},499:function(e){"use strict";e.exports=function(e){return e[1]}},245:function(e,t,o){"use strict";var n=o(499),r=o.n(n),i=o(922),c=o.n(i)()(r());c.push([e.id,':root{--wp-admin-theme-color: #007cba;--wp-admin-theme-color--rgb: 0,124,186;--wp-admin-theme-color-darker-10: #006ba1;--wp-admin-theme-color-darker-10--rgb: 0,107,160.5;--wp-admin-theme-color-darker-20: #005a87;--wp-admin-theme-color-darker-20--rgb: 0,90,135;--wp-admin-border-width-focus: 2px}@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi){:root{--wp-admin-border-width-focus: 1.5px}}.codeamp-components-multi-select-control__input-container{font-size:13px;line-height:normal}.codeamp-components-multi-select-control__input-container{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;width:100%;margin:0 0 8px 0;padding:0;cursor:text}@media (prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__input-container{transition-duration:0s;transition-delay:0s}}@media (min-width: 600px){.codeamp-components-multi-select-control__input-container{font-size:13px;line-height:normal}}.codeamp-components-multi-select-control__input-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.codeamp-components-multi-select-control__input-container::-webkit-input-placeholder{color:rgba(30,30,30,0.62)}.codeamp-components-multi-select-control__input-container::-moz-placeholder{opacity:1;color:rgba(30,30,30,0.62)}.codeamp-components-multi-select-control__input-container:-ms-input-placeholder{color:rgba(30,30,30,0.62)}.codeamp-components-multi-select-control__input-container.is-disabled{background:#ddd;border-color:#ddd}.codeamp-components-multi-select-control__input-container.is-active{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input{display:inline-block;flex:1;font-family:inherit;font-size:16px;width:100%;max-width:100%;margin-left:4px;padding:0;min-height:24px;min-width:50px;background:inherit;border:0;color:#1e1e1e;box-shadow:none}@media (min-width: 600px){.codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input{font-size:13px}}.codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input:focus,.codeamp-components-multi-select-control.is-active .codeamp-components-multi-select-control__input-container input[type="text"].codeamp-components-multi-select-control__input{outline:none;box-shadow:none}.codeamp-components-multi-select-control__input-container .codeamp-components-multi-select-control__token+input[type="text"].codeamp-components-multi-select-control__input{width:auto}.codeamp-components-multi-select-control__help{font-size:12px;font-style:normal;color:#757575}.codeamp-components-multi-select-control__tokens-container{padding:4px}.codeamp-components-multi-select-control__token{font-size:13px;display:flex;color:#1e1e1e;max-width:100%}.codeamp-components-multi-select-control__token.is-borderless{position:relative;padding:0 24px 0 0}.codeamp-components-multi-select-control__token.is-borderless .codeamp-components-multi-select-control__token-text{background:transparent;color:var(--wp-admin-theme-color)}.codeamp-components-multi-select-control__token.is-borderless .codeamp-components-multi-select-control__remove-token{background:transparent;color:#757575;position:absolute;top:1px;right:0;padding:0}.codeamp-components-multi-select-control__token.is-borderless.is-success .codeamp-components-multi-select-control__token-text{color:#4ab866}.codeamp-components-multi-select-control__token.is-borderless.is-error .codeamp-components-multi-select-control__token-text{color:#cc1818;border-radius:4px 0 0 4px;padding:0 4px 0 6px}.codeamp-components-multi-select-control__token.is-borderless.is-validating .codeamp-components-multi-select-control__token-text{color:#1e1e1e}.codeamp-components-multi-select-control__token.is-disabled .codeamp-components-multi-select-control__remove-token{cursor:default}.codeamp-components-multi-select-control__token-text,.codeamp-components-multi-select-control__remove-token.components-button{display:inline-block;line-height:24px;height:auto;background:#ddd;min-width:unset;transition:all 0.2s cubic-bezier(0.4, 1, 0.4, 1)}@media (prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__token-text,.codeamp-components-multi-select-control__remove-token.components-button{transition-duration:0s;transition-delay:0s;animation-duration:1ms;animation-delay:0s}}.codeamp-components-multi-select-control__token-text{border-radius:2px 0 0 2px;padding:0 0 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.codeamp-components-multi-select-control__remove-token.components-button{cursor:pointer;border-radius:0 2px 2px 0;padding:0 2px;color:#1e1e1e;line-height:10px;overflow:initial}.codeamp-components-multi-select-control__remove-token.components-button:hover{color:#1e1e1e}.codeamp-components-multi-select-control__suggestions-list{flex:1 0 100%;min-width:100%;max-height:9em;overflow-y:auto;transition:all 0.15s ease-in-out;list-style:none;border-top:1px solid #757575;margin:0;padding:0}@media (prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__suggestions-list{transition-duration:0s;transition-delay:0s}}.codeamp-components-multi-select-control__no-suggestions{color:#757575;font-size:13px;margin:0;display:block;padding:4px 8px}.codeamp-components-multi-select-control__suggestion{color:#757575;display:block;font-size:13px;padding:4px 8px;margin:0;cursor:pointer}.codeamp-components-multi-select-control__suggestion.is-selected{background:var(--wp-admin-theme-color);color:#fff}.codeamp-components-multi-select-control__suggestion-match{text-decoration:underline}\n',""]),t.Z=c},313:function(e,t,o){"use strict";var n=o(499),r=o.n(n),i=o(922),c=o.n(i)()(r());c.push([e.id,".codeamp-components-resource-select-control>.components-base-control__field{position:relative;display:flex;flex-wrap:wrap}.codeamp-components-resource-select-control>.components-base-control__field>.components-base-control__label{flex:2}.codeamp-components-resource-select-control__label{margin-bottom:8px}.codeamp-components-resource-select-control__add_button{padding:0;margin:0;min-height:revert;height:auto;color:var(--wp-admin-theme-color);align-self:center;justify-content:right;margin-bottom:8px}.codeamp-components-resource-select-control__add_button:hover{text-decoration:underline}.codeamp-components-resource-select-control__edit_button.components-button.is-secondary{height:auto;margin-bottom:0}.codeamp-components-resource-select-control__select{width:auto;flex:1}.codeamp-components-resource-select-control .components-base-control{margin-bottom:0}.codeamp-components-resource-select-control .components-base-control__field{margin-bottom:0}.codeamp-components-resource-select-control .components-base-control{flex:1}\n",""]),t.Z=c},379:function(e){"use strict";var t=[];function o(e){for(var o=-1,n=0;n<t.length;n++)if(t[n].identifier===e){o=n;break}return o}function n(e,n){for(var i={},c=[],l=0;l<e.length;l++){var a=e[l],s=n.base?a[0]+n.base:a[0],u=i[s]||0,p="".concat(s," ").concat(u);i[s]=u+1;var d=o(p),m={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==d)t[d].references++,t[d].updater(m);else{var f=r(m,n);n.byIndex=l,t.splice(l,0,{identifier:p,updater:f,references:1})}c.push(p)}return c}function r(e,t){var o=t.domAPI(t);return o.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,r){var i=n(e=e||[],r=r||{});return function(e){e=e||[];for(var c=0;c<i.length;c++){var l=o(i[c]);t[l].references--}for(var a=n(e,r),s=0;s<i.length;s++){var u=o(i[s]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=a}}},569:function(e){"use strict";var t={};e.exports=function(e,o){var n=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},216:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,o){"use strict";e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},795:function(e){"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var r=void 0!==o.layer;r&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,r&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var i=o.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={id:n,exports:{}};return e[n](i,i.exports,o),i.exports}o.amdO={},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var n={};!function(){"use strict";o.r(n),o.d(n,{MultiSelectControl:function(){return we},ResourceSelectControl:function(){return O}});var e=window.wp.i18n,t=window.wp.components,r=window.wp.compose,i=o(379),c=o.n(i),l=o(795),a=o.n(l),s=o(569),u=o.n(s),p=o(565),d=o.n(p),m=o(216),f=o.n(m),v=o(589),b=o.n(v),y=o(313),g={};g.styleTagTransform=b(),g.setAttributes=d(),g.insert=u().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=f(),c()(y.Z,g),y.Z&&y.Z.locals&&y.Z.locals;var h=o(814),_=o.n(h);function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},w.apply(this,arguments)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var S=function(){},O=function o(n){var i,c,l,a,s=n.onChange,u=void 0===s?S:s,p=n.onPrimaryAction,d=void 0===p?S:p,m=n.onSecondaryAction,f=void 0===m?S:m,v=n.label,b=void 0===v?"":v,y=n.primaryActionLabel,g=void 0===y?(0,e.__)("Edit","codeamp-block-components"):y,h=n.secondaryActionLabel,O=void 0===h?(0,e.__)("Add new","codeamp-block-components"):h,k=n.loadingLabel,E=void 0===k?(0,e.__)("Loading","codeamp-block-components"):k,j=n.showPrimaryAction,A=void 0===j||j,I=n.disabled,C=void 0!==I&&I,P=n.showSecondaryAction,L=void 0===P||P,M=n.defaultOption,R=n.options,T=n.value,N=n.help,D=n.primaryActionProps,B=n.secondaryActionProps,z=n.id,W=n.className,F=[];E&&(F=[{value:"loading",label:E}]),R&&(F=[],M&&F.push(M),(l=F).push.apply(l,function(e){if(Array.isArray(e))return x(e)}(a=R)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?x(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));var H=(0,r.useInstanceId)(o,"codeamp-components-resource-select-control");return z&&(H=z),React.createElement(t.BaseControl,{id:H,className:_()("components-base-control codeamp-components-resource-select-control",W),help:N,label:b,__nextHasNoMarginBottom:!0},L&&React.createElement(t.Button,w({className:"codeamp-components-resource-select-control__add_button",disabled:C,onClick:f},B),null!==(i=null==B?void 0:B.label)&&void 0!==i?i:O),React.createElement(t.__experimentalHStack,null,React.createElement(t.SelectControl,{id:H,value:T,options:F,className:"codeamp-components-resource-select-control__select",onChange:u,disabled:C,__nextHasNoMarginBottom:!0}),A&&React.createElement(t.Button,w({onClick:d,variant:"secondary",disabled:C,className:"codeamp-components-resource-select-control__edit_button"},D),null!==(c=null==D?void 0:D.label)&&void 0!==c?c:g)))},k=window.wp.element,E=window.wp.a11y,j=window.wp.isShallowEqual,A=o.n(j),I=window.wp.primitives,C=(0,k.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,k.createElement)(I.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),P=function(){};function L(o){var n=o.value,i=o.label,c=o.title,l=o.isBorderless,a=void 0!==l&&l,s=o.disabled,u=void 0!==s&&s,p=o.onClickRemove,d=void 0===p?P:p,m=o.onMouseEnter,f=o.onMouseLeave,v=o.messages,b=o.termPosition,y=o.termsCount,g=(0,r.useInstanceId)(L),h=_()("codeamp-components-multi-select-control__token",{"is-borderless":a,"is-disabled":u}),w=(0,e.sprintf)((0,e.__)("%1$s (%2$s of %3$s)"),i,b,y);return React.createElement("span",{className:h,onMouseEnter:m,onMouseLeave:f,title:c,style:{margin:"0"}},React.createElement("span",{className:"codeamp-components-multi-select-control__token-text",id:"codeamp-components-multi-select-control__token-text-".concat(g)},React.createElement(t.VisuallyHidden,{as:"span"},w),React.createElement("span",{"aria-hidden":"true"},i)),React.createElement(t.Button,{className:"codeamp-components-multi-select-control__remove-token",icon:C,onClick:u?P:function(){return d({value:n})},label:v.remove,"aria-describedby":"codeamp-components-multi-select-control__token-text-".concat(g)}))}var M=["value","isExpanded","instanceId","selectedSuggestionIndex","className","onChange","onFocus","onBlur"];function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},R.apply(this,arguments)}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var N=(0,k.forwardRef)((function(e,t){var o=e.value,n=e.isExpanded,r=e.instanceId,i=e.selectedSuggestionIndex,c=e.className,l=e.onChange,a=e.onFocus,s=e.onBlur,u=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,M),p=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,i=[],c=!0,l=!1;try{for(o=o.call(e);!(c=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{c||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?T(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,k.useState)(!1),2),d=p[0],m=p[1],f=o?o.length+1:0;return React.createElement("input",R({ref:t,id:r,type:"text"},u,{value:o||"",onChange:function(e){l&&l({value:e.target.value})},onFocus:function(e){m(!0),null==a||a(e)},onBlur:function(e){m(!1),null==s||s(e)},size:f,className:_()(c,"codeamp-components-multi-select-control__input"),autoComplete:"off",role:"combobox","aria-expanded":n,"aria-autocomplete":"list","aria-owns":n?"".concat(r,"-suggestions"):void 0,"aria-activedescendant":d&&-1!==i&&n?"".concat(r,"-suggestions-").concat(i):void 0,"aria-describedby":"".concat(r,"-howto"),"data-lpignore":"true"}))}));function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function B(e){return B="function"==typeof Symbol&&"symbol"===D(Symbol.iterator)?function(e){return D(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":D(e)},B(e)}function z(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function W(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function F(e,t){var o=e["page".concat(t?"Y":"X","Offset")],n="scroll".concat(t?"Top":"Left");if("number"!=typeof o){var r=e.document;"number"!=typeof(o=r.documentElement[n])&&(o=r.body[n])}return o}function H(e){return F(e)}function V(e){return F(e,!0)}function U(e){var t=function(e){var t,o,n,r=e.ownerDocument,i=r.body,c=r&&r.documentElement;return o=(t=e.getBoundingClientRect()).left,n=t.top,{left:o-=c.clientLeft||i.clientLeft||0,top:n-=c.clientTop||i.clientTop||0}}(e),o=e.ownerDocument,n=o.defaultView||o.parentWindow;return t.left+=H(n),t.top+=V(n),t}var Z,$=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),q=/^(top|right|bottom|left)$/;function K(e,t){for(var o=0;o<e.length;o++)t(e[o])}function G(e){return"border-box"===Z(e,"boxSizing")}"undefined"!=typeof window&&(Z=window.getComputedStyle?function(e,t,o){var n="",r=e.ownerDocument,i=o||r.defaultView.getComputedStyle(e,null);return i&&(n=i.getPropertyValue(t)||i[t]),n}:function(e,t){var o=e.currentStyle&&e.currentStyle[t];if($.test(o)&&!q.test(t)){var n=e.style,r=n.left,i=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,n.left="fontSize"===t?"1em":o||0,o=n.pixelLeft+"px",n.left=r,e.runtimeStyle.left=i}return""===o?"auto":o});var J=["margin","border","padding"];function X(e,t,o){var n,r={},i=e.style;for(n in t)t.hasOwnProperty(n)&&(r[n]=i[n],i[n]=t[n]);for(n in o.call(e),t)t.hasOwnProperty(n)&&(i[n]=r[n])}function Y(e,t,o){var n,r,i,c=0;for(r=0;r<t.length;r++)if(n=t[r])for(i=0;i<o.length;i++){var l;l="border"===n?"".concat(n+o[i],"Width"):n+o[i],c+=parseFloat(Z(e,l))||0}return c}function Q(e){return null!=e&&e==e.window}var ee={};function te(e,t,o){if(Q(e))return"width"===t?ee.viewportWidth(e):ee.viewportHeight(e);if(9===e.nodeType)return"width"===t?ee.docWidth(e):ee.docHeight(e);var n="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,i=(Z(e),G(e)),c=0;(null==r||r<=0)&&(r=void 0,(null==(c=Z(e,t))||Number(c)<0)&&(c=e.style[t]||0),c=parseFloat(c)||0),void 0===o&&(o=i?1:-1);var l=void 0!==r||i,a=r||c;if(-1===o)return l?a-Y(e,["border","padding"],n):c;if(l){var s=2===o?-Y(e,["border"],n):Y(e,["margin"],n);return a+(1===o?0:s)}return c+Y(e,J.slice(o),n)}K(["Width","Height"],(function(e){ee["doc".concat(e)]=function(t){var o=t.document;return Math.max(o.documentElement["scroll".concat(e)],o.body["scroll".concat(e)],ee["viewport".concat(e)](o))},ee["viewport".concat(e)]=function(t){var o="client".concat(e),n=t.document,r=n.body,i=n.documentElement[o];return"CSS1Compat"===n.compatMode&&i||r&&r[o]||i}}));var oe={position:"absolute",visibility:"hidden",display:"block"};function ne(e){var t,o=arguments;return 0!==e.offsetWidth?t=te.apply(void 0,o):X(e,oe,(function(){t=te.apply(void 0,o)})),t}function re(e,t,o){var n=o;if("object"!==B(t))return void 0!==n?("number"==typeof n&&(n+="px"),void(e.style[t]=n)):Z(e,t);for(var r in t)t.hasOwnProperty(r)&&re(e,r,t[r])}K(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);ee["outer".concat(t)]=function(t,o){return t&&ne(t,e,o?0:1)};var o="width"===e?["Left","Right"]:["Top","Bottom"];ee[e]=function(t,n){return void 0===n?t&&ne(t,e,-1):t?(Z(t),G(t)&&(n+=Y(t,["padding","border"],o)),re(t,e,n)):void 0}}));var ie=function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?W(o,!0).forEach((function(t){z(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):W(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return U(e);!function(e,t){"static"===re(e,"position")&&(e.style.position="relative");var o,n,r=U(e),i={};for(n in t)t.hasOwnProperty(n)&&(o=parseFloat(re(e,n))||0,i[n]=o+t[n]-r[n]);re(e,i)}(e,t)},isWindow:Q,each:K,css:re,clone:function(e){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(Q(e)){if(void 0===t)return H(e);window.scrollTo(t,V(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(Q(e)){if(void 0===t)return V(e);window.scrollTo(H(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},ee);function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var le=function(e){e.preventDefault()},ae=function(t){var o=t.selectedIndex,n=t.scrollIntoView,i=t.searchValue,c=t.onHover,l=t.onSelect,a=t.suggestions,s=void 0===a?[]:a,u=t.instanceId,p=t.__experimentalRenderItem,d=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,i=[],c=!0,l=!1;try{for(o=o.call(e);!(c=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{c||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ce(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?ce(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,k.useState)(!1),2),m=d[0],f=d[1],v=(0,r.useRefEffect)((function(e){var t;return o>-1&&n&&e.children[o]&&(f(!0),function(e,t,o){o=o||{},9===t.nodeType&&(t=ie.getWindow(t));var n=o.allowHorizontalScroll,r=o.onlyScrollIfNeeded,i=o.alignWithTop,c=o.alignWithLeft,l=o.offsetTop||0,a=o.offsetLeft||0,s=o.offsetBottom||0,u=o.offsetRight||0;n=void 0===n||n;var p,d,m,f,v,b,y,g,h,_,w=ie.isWindow(t),x=ie.offset(e),S=ie.outerHeight(e),O=ie.outerWidth(e);w?(y=t,_=ie.height(y),h=ie.width(y),g={left:ie.scrollLeft(y),top:ie.scrollTop(y)},v={left:x.left-g.left-a,top:x.top-g.top-l},b={left:x.left+O-(g.left+h)+u,top:x.top+S-(g.top+_)+s},f=g):(p=ie.offset(t),d=t.clientHeight,m=t.clientWidth,f={left:t.scrollLeft,top:t.scrollTop},v={left:x.left-(p.left+(parseFloat(ie.css(t,"borderLeftWidth"))||0))-a,top:x.top-(p.top+(parseFloat(ie.css(t,"borderTopWidth"))||0))-l},b={left:x.left+O-(p.left+m+(parseFloat(ie.css(t,"borderRightWidth"))||0))+u,top:x.top+S-(p.top+d+(parseFloat(ie.css(t,"borderBottomWidth"))||0))+s}),v.top<0||b.top>0?!0===i?ie.scrollTop(t,f.top+v.top):!1===i?ie.scrollTop(t,f.top+b.top):v.top<0?ie.scrollTop(t,f.top+v.top):ie.scrollTop(t,f.top+b.top):r||((i=void 0===i||!!i)?ie.scrollTop(t,f.top+v.top):ie.scrollTop(t,f.top+b.top)),n&&(v.left<0||b.left>0?!0===c?ie.scrollLeft(t,f.left+v.left):!1===c?ie.scrollLeft(t,f.left+b.left):v.left<0?ie.scrollLeft(t,f.left+v.left):ie.scrollLeft(t,f.left+b.left):r||((c=void 0===c||!!c)?ie.scrollLeft(t,f.left+v.left):ie.scrollLeft(t,f.left+b.left)))}(e.children[o],e,{onlyScrollIfNeeded:!0}),t=requestAnimationFrame((function(){f(!1)}))),function(){void 0!==t&&cancelAnimationFrame(t)}}),[o,n]),b=function(e){return function(){m||null==c||c(e)}},y=function(e){return function(){null==l||l(e)}};return React.createElement("ul",{ref:v,className:"codeamp-components-multi-select-control__suggestions-list",id:"".concat(u,"-suggestions"),role:"listbox"},0===s.length&&React.createElement("li",{className:"codeamp-components-multi-select-control__no-suggestions",role:"option"},(0,e.__)("No results found.","codeamp-block-components")),s.map((function(e,t){var n,r=function(e){var t=e.label.toLocaleLowerCase().indexOf(i);return{suggestionBeforeMatch:e.label.substring(0,t),suggestionMatch:e.label.substring(t,t+i.length),suggestionAfterMatch:e.label.substring(t+i.length)}}(e),c=_()("codeamp-components-multi-select-control__suggestion",{"is-selected":t===o});return n="function"==typeof p?p({item:e}):r?React.createElement("span",{"aria-label":e.label},r.suggestionBeforeMatch,React.createElement("strong",{className:"codeamp-components-multi-select-control__suggestion-match"},r.suggestionMatch),r.suggestionAfterMatch):e.label,React.createElement("li",{id:"".concat(u,"-suggestions-").concat(t),role:"option",className:c,key:e.value,onMouseDown:le,onClick:y(e),onMouseEnter:b(e),"aria-selected":t===o},n)})))},se=o(245),ue={};function pe(){return pe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},pe.apply(this,arguments)}function de(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function me(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function fe(e){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fe(e)}function ve(e){return function(e){if(Array.isArray(e))return ge(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ye(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function be(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,i=[],c=!0,l=!1;try{for(o=o.call(e);!(c=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{c||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||ye(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(e,t){if(e){if("string"==typeof e)return ge(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?ge(e,t):void 0}}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function he(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(""===e)return null;var o=null!=e?e:"",n=t.find((function(e){return-1!==e.label.toLocaleLowerCase().indexOf(o.trim().toLocaleLowerCase())}));return n}ue.styleTagTransform=b(),ue.setAttributes=d(),ue.insert=u().bind(null,"head"),ue.domAPI=a(),ue.insertStyleElement=f(),c()(se.Z,ue),se.Z&&se.Z.locals&&se.Z.locals;var _e=function(){};function we(o){var n=o.autoCapitalize,i=o.autoComplete,c=o.maxLength,l=o.placeholder,a=o.label,s=void 0===a?(0,e.__)("Add item"):a,u=o.help,p=o.className,d=o.suggestions,m=void 0===d?[]:d,f=o.options,v=void 0===f?[]:f,b=o.maxSuggestions,y=void 0===b?100:b,g=o.value,h=void 0===g?[]:g,w=o.onChange,x=void 0===w?function(){}:w,S=o.onInputChange,O=void 0===S?function(){}:S,j=o.onFocus,I=void 0===j?void 0:j,C=(o.isBorderless,o.id),P=o.disabled,M=void 0!==P&&P,R=o.messages,T=void 0===R?{added:(0,e.__)("Item added."),removed:(0,e.__)("Item removed."),remove:(0,e.__)("Remove item"),__experimentalInvalid:(0,e.__)("Invalid item")}:R,D=o.__experimentalRenderItem,B=o.__experimentalAutoSelectFirstMatch,z=void 0===B||B,W=o.__experimentalValidateInput,F=void 0===W?function(){return!0}:W,H=o.__experimentalCloseSuggestionsOnSelect,V=void 0===H||H,U=o.__next36pxDefaultSize,Z=void 0!==U&&U,$=(0,r.useInstanceId)(we,"codeamp-components-multi-select-control");C&&($=C);var q=be((0,k.useState)(""),2),K=q[0],G=q[1],J=be((0,k.useState)(0),2),X=J[0],Y=J[1],Q=be((0,k.useState)(!1),2),ee=Q[0],te=Q[1],oe=be((0,k.useState)(!1),2),ne=oe[0],re=oe[1],ie=be((0,k.useState)(-1),2),ce=ie[0],le=ie[1],se=be((0,k.useState)(!1),2),ue=se[0],ye=se[1],ge=(0,r.usePrevious)(m),xe=(0,r.usePrevious)(h),Se=(0,k.useRef)(null),Oe=(0,k.useRef)(null),ke=(0,r.useDebounce)(E.speak,500);function Ee(){var e;null===(e=Se.current)||void 0===e||e.focus()}function je(){var e;return Se.current===(null===(e=Se.current)||void 0===e?void 0:e.ownerDocument.activeElement)}function Ae(e){je()||e.target===Oe.current?(te(!0),re(!0)):te(!1),"function"==typeof I&&I(e)}function Ie(e){e.target===Oe.current&&ee&&e.preventDefault()}function Ce(e){Te(e.value),Ee()}function Pe(e){var t=!1;return je()&&We()&&(e(),t=!0),t}function Le(){var e=ze()-1;e>-1&&Te(h[e])}function Me(){var e=ze();e<h.length&&(Te(h[e]),function(e){Y(h.length-Math.max(e,-1)-1)}(e))}function Re(e){F(e.label)?(function(e){if(ve(new Set(e.filter((function(e){return!function(e){return h.some((function(t){return Ne(e)===Ne(t)}))}(e)})))),e.length>0){var t=ve(h);t.splice.apply(t,[ze(),0].concat(ve(e))),x(t)}}([e.value]),(0,E.speak)(T.added,"assertive"),G(""),ye(!1),le(-1),V&&re(!1),ee&&Ee()):(0,E.speak)(T.__experimentalInvalid,"assertive")}function Te(e){var t=h.filter((function(t){return Ne(t)!==Ne(e)}));x(t),(0,E.speak)(T.removed,"assertive")}function Ne(e){return"object"===fe(e)?e.value:e}function De(){return v.filter((function(e){return-1===h.indexOf(e.value)}))}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:De(),o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:y;if(""!==e.trim()){var n=[],r=[];t.forEach((function(t){var o=t.label.toLocaleLowerCase().indexOf(e.trim().toLocaleLowerCase());0===o?n.push(t):o>0&&r.push(t)})),t=n.concat(r)}return t.slice(0,o)}function ze(){return h.length-X}function We(){return 0===K.length}function Fe(){var e,t;return(null===(e=he(K))||void 0===e||null===(t=e.label)||void 0===t?void 0:t.length)>0}function He(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=Be(K),n=o.length>0;t&&(z&&n?(le(0),ye(!0)):(le(-1),ye(!1))),le(0);var r=n?(0,e.sprintf)((0,e._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",o.length),o.length):(0,e.__)("No results.");ke(r,"assertive")}(0,k.useEffect)((function(){ee&&!je()&&Ee()}),[ee]),(0,k.useEffect)((function(){var e=!A()(m,ge||[]);(e||h!==xe)&&He(e)}),[m,ge,h,xe]),(0,k.useEffect)((function(){He()}),[K]),M&&ee&&(te(!1),G(""));var Ve,Ue,Ze=_()(p,"codeamp-components-multi-select-control__input-container",{"is-active":ee,"is-disabled":M}),$e={className:"components-base-control codeamp-components-multi-select-control",tabIndex:-1},qe=Be();return M||($e=Object.assign({},$e,{onKeyDown:function(e){var t=!1;if(!e.defaultPrevented){switch(e.code){case"Backspace":t=Pe(Le);break;case"Enter":case"Space":t=function(){var e=!1,t=function(){if(-1!==ce)return Be()[ce]}();return t&&ne?(Re(t),e=!0):Fe()&&""!==K.trim()&&(Re(K),e=!0),e}();break;case"ArrowLeft":t=function(){var e=!1;return We()&&(Y((function(e){return Math.min(e+1,h.length)})),e=!0),e}();break;case"ArrowUp":t=ne?(le((function(e){return(0===e?Be(K,De(),h,y).length:e)-1})),ye(!0),!0):(re(!0),le(0),ye(!0),!0);break;case"ArrowRight":t=function(){var e=!1;return We()&&(Y((function(e){return Math.max(e-1,0)})),e=!0),e}();break;case"ArrowDown":t=ne?(le((function(e){return(e+1)%Be(K,De(),h,y).length})),ye(!0),!0):(re(!0),le(0),ye(!0),!0);break;case"Delete":t=Pe(Me);break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&(G(e.target.value),re(!1),le(-1),ye(!1)),!0}(e)}t&&e.preventDefault()}},onKeyPress:function(e){var t=!1;44===e.charCode&&(Fe()&&Re(K),t=!0),t&&e.preventDefault()},onFocus:Ae})),React.createElement(t.BaseControl,{id:$,label:s,help:u},React.createElement("div",$e,React.createElement("div",{ref:Oe,className:Ze,tabIndex:-1,onMouseDown:Ie,onTouchStart:Ie},React.createElement(t.Flex,{className:"codeamp-components-multi-select-control__tokens-container",justify:"flex-start",align:"flex-start",gap:"4px",wrap:!0,__next36pxDefaultSize:Z,hasTokens:!!h.length},(Ue=h.map((function(e){return v.find((function(t){return t.value===e}))||null})).map((function(e,o){return function(e,o){var n=e.value,r=e.label,i=e.onMouseEnter,c=void 0===i?_e:i,l=e.onMouseLeave,a=void 0===l?_e:l,s=e.isBorderless,u=void 0!==s&&s,p=n,d=o+1;return React.createElement(t.FlexItem,{key:"token-"+p},React.createElement(L,{value:p,label:r,title:"string"!=typeof token?r:void 0,onClickRemove:Ce,isBorderless:u,onMouseEnter:c,onMouseLeave:a,disabled:M,messages:T,termPosition:d,termsCount:h.length}))}(function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?de(Object(o),!0).forEach((function(t){me(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):de(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({},e),o)})),Ue.splice(ze(),0,(Ve={instanceId:$,autoCapitalize:n,autoComplete:i,placeholder:0===h.length?l:"",key:"input",disabled:M,value:K,onBlur:function(){Fe()?te(!1):(G(""),Y(0),te(!1),re(!1),le(-1),ye(!1))},isExpanded:ne,selectedSuggestionIndex:ce,style:{lineHeight:"24px"},onClick:Ae},React.createElement(N,pe({},Ve,{onChange:c&&h.length>=c?void 0:function(e){var t=e.value;G(t),re(!0),O(t)},ref:Se})))),Ue)),ne&&React.createElement(ae,{instanceId:$,match:he(K,v),searchValue:K.trim(),suggestions:qe,selectedIndex:ce,scrollIntoView:ue,onHover:function(e){var t=Be().indexOf(e);t>=0&&(le(t),ye(!1))},onSelect:function(e){Re(e)},__experimentalRenderItem:D}))))}}();var r=exports;for(var i in n)r[i]=n[i];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})}(); |
| 12 |
|
| 13 |
/***/ }), |
| 14 |
|
| 15 |
/***/ "./src/meta/general/Meta.js": |
| 16 |
/*!**********************************!*\ |
| 17 |
!*** ./src/meta/general/Meta.js ***! |
| 18 |
\**********************************/ |
| 19 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 20 |
|
| 21 |
"use strict"; |
| 22 |
__webpack_require__.r(__webpack_exports__); |
| 23 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 24 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 25 |
/* harmony export */ }); |
| 26 |
/* harmony import */ var _Metabox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Metabox */ "./src/meta/general/Metabox.jsx"); |
| 27 |
/* harmony import */ var _meta_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./meta.scss */ "./src/meta/general/meta.scss"); |
| 28 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 29 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
function Meta() { |
| 34 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Metabox__WEBPACK_IMPORTED_MODULE_0__["default"], {}); |
| 35 |
} |
| 36 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Meta); |
| 37 |
|
| 38 |
/***/ }), |
| 39 |
|
| 40 |
/***/ "./src/meta/general/Metabox.jsx": |
| 41 |
/*!**************************************!*\ |
| 42 |
!*** ./src/meta/general/Metabox.jsx ***! |
| 43 |
\**************************************/ |
| 44 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 45 |
|
| 46 |
"use strict"; |
| 47 |
__webpack_require__.r(__webpack_exports__); |
| 48 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 49 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 50 |
/* harmony export */ }); |
| 51 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 52 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); |
| 53 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 54 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 55 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); |
| 56 |
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); |
| 57 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); |
| 58 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__); |
| 59 |
/* harmony import */ var js_generate_password__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! js-generate-password */ "./node_modules/js-generate-password/dist/index.js"); |
| 60 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 61 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__); |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
const { |
| 69 |
__ |
| 70 |
} = wp.i18n; |
| 71 |
function Metabox() { |
| 72 |
const [postID, setPostID] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(); |
| 73 |
const [meta, setMeta] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(options.meta); |
| 74 |
const [activateProtection, setActivateProtection] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 75 |
const [protectionType, setProtectionType] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('password'); |
| 76 |
const [userRoles, setUserRoles] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(); |
| 77 |
const [protectChildPages, setProtectChildPages] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 78 |
const [showUserSettings, setShowUserSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 79 |
const [showOverwriteTexts, setShowOverwriteTexts] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 80 |
const [showMiscSettings, setShowMiscSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 81 |
const [hasCopied, setHasCopied] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 82 |
const [hasLinkCopied, setHasLinkCopied] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 83 |
const [unlockLink, setUnlockLink] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 84 |
const [numberOfPasswords, setNumberOfPasswords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(3); |
| 85 |
const [passwordGenerateType, setPasswordGenerateType] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('password'); |
| 86 |
const [generatedPassword, setGeneratedPassword] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(meta.passster_password); |
| 87 |
const [generatedPasswords, setGeneratedPasswords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(meta.passster_passwords); |
| 88 |
const [fetchedChildPages, setFetchedChildPages] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(); |
| 89 |
const [multiplePasswordLists, setMultiplePasswordLists] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); |
| 90 |
const fetchPostID = () => { |
| 91 |
if (!fetchCorePostId) { |
| 92 |
let urlParams = new URLSearchParams(window.location.search); |
| 93 |
let postID = urlParams.get('post'); |
| 94 |
|
| 95 |
// Now set the post ID: |
| 96 |
setPostID(postID); |
| 97 |
} |
| 98 |
}; |
| 99 |
const fetchCorePostId = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => { |
| 100 |
const { |
| 101 |
getCurrentPostId |
| 102 |
} = select('core/editor'); |
| 103 |
if (getCurrentPostId()) { |
| 104 |
setPostID(getCurrentPostId()); |
| 105 |
return true; |
| 106 |
} else { |
| 107 |
return false; |
| 108 |
} |
| 109 |
}, []); |
| 110 |
const saveMeta = (meta_key, value) => { |
| 111 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ |
| 112 |
path: '/passster/v1/meta?meta_key=' + meta_key + '&post_id=' + postID, |
| 113 |
method: 'POST', |
| 114 |
data: { |
| 115 |
meta_value: value |
| 116 |
} |
| 117 |
}); |
| 118 |
setMeta({ |
| 119 |
...meta, |
| 120 |
[meta_key]: value |
| 121 |
}); |
| 122 |
}; |
| 123 |
const saveChildMeta = (childID, meta_key, value) => { |
| 124 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ |
| 125 |
path: '/passster/v1/meta?meta_key=' + meta_key + '&post_id=' + childID, |
| 126 |
method: 'POST', |
| 127 |
data: { |
| 128 |
meta_value: value |
| 129 |
} |
| 130 |
}); |
| 131 |
}; |
| 132 |
const getChildPages = postID => { |
| 133 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ |
| 134 |
path: '/passster/v1/child-pages?post_id=' + postID |
| 135 |
}).then(childs => { |
| 136 |
setFetchedChildPages(childs); |
| 137 |
}); |
| 138 |
}; |
| 139 |
const password_lists = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => { |
| 140 |
const { |
| 141 |
getEntityRecords |
| 142 |
} = select('core'); |
| 143 |
return getEntityRecords('postType', 'password_lists', { |
| 144 |
per_page: -1, |
| 145 |
order: 'asc', |
| 146 |
status: 'publish' |
| 147 |
}); |
| 148 |
}, []); |
| 149 |
const generatePasswords = () => { |
| 150 |
if ('passwords' === passwordGenerateType) { |
| 151 |
let passwords = ''; |
| 152 |
if (meta.passster_passwords !== undefined) { |
| 153 |
passwords = meta.passster_passwords; |
| 154 |
} |
| 155 |
if ('' !== passwords) { |
| 156 |
passwords = passwords + ','; |
| 157 |
} |
| 158 |
for (let i = 0; i < numberOfPasswords; i++) { |
| 159 |
let password = (0,js_generate_password__WEBPACK_IMPORTED_MODULE_4__.GeneratePassword)({ |
| 160 |
length: options.password_length, |
| 161 |
uppercase: options.include_uppercase, |
| 162 |
numbers: options.include_numbers, |
| 163 |
symbols: false |
| 164 |
}); |
| 165 |
passwords = passwords += password + ','; |
| 166 |
} |
| 167 |
passwords = passwords.slice(0, -1); |
| 168 |
setGeneratedPasswords(passwords); |
| 169 |
saveMeta("passster_passwords", passwords); |
| 170 |
} else if ('password' === passwordGenerateType) { |
| 171 |
let password = (0,js_generate_password__WEBPACK_IMPORTED_MODULE_4__.GeneratePassword)({ |
| 172 |
length: options.password_length, |
| 173 |
uppercase: options.include_uppercase, |
| 174 |
numbers: options.include_numbers, |
| 175 |
symbols: false |
| 176 |
}); |
| 177 |
setGeneratedPassword(password); |
| 178 |
saveMeta("passster_password", password); |
| 179 |
} |
| 180 |
}; |
| 181 |
const getSelectablePasswordLists = () => { |
| 182 |
if (!password_lists) { |
| 183 |
return []; |
| 184 |
} |
| 185 |
const options = []; |
| 186 |
|
| 187 |
// Add no role. |
| 188 |
options.push({ |
| 189 |
label: __('No Password List', 'content-protector'), |
| 190 |
value: 0 |
| 191 |
}); |
| 192 |
password_lists.map(function (password_list) { |
| 193 |
if (password_list.title.raw && password_list.title.raw !== '') { |
| 194 |
options.push({ |
| 195 |
label: password_list.title.raw, |
| 196 |
value: password_list.id |
| 197 |
}); |
| 198 |
} |
| 199 |
return password_list; |
| 200 |
}); |
| 201 |
return options; |
| 202 |
}; |
| 203 |
const getSelectableUserRoles = () => { |
| 204 |
if (!userRoles) { |
| 205 |
return []; |
| 206 |
} |
| 207 |
const options = []; |
| 208 |
|
| 209 |
// Add no role. |
| 210 |
options.push({ |
| 211 |
label: __('No Role', 'content-protector'), |
| 212 |
value: 'no-role' |
| 213 |
}); |
| 214 |
for (const userRole in userRoles) { |
| 215 |
options.push({ |
| 216 |
label: userRoles[userRole].name, |
| 217 |
value: userRole |
| 218 |
}); |
| 219 |
} |
| 220 |
return options; |
| 221 |
}; |
| 222 |
const getAreaShortcode = () => { |
| 223 |
let shortcode = ''; |
| 224 |
if (!activateProtection) { |
| 225 |
return shortcode; |
| 226 |
} |
| 227 |
|
| 228 |
// Modify based on protection type. |
| 229 |
switch (meta.passster_protection_type) { |
| 230 |
case 'password': |
| 231 |
shortcode = '[passster password="' + meta.passster_password + '" '; |
| 232 |
break; |
| 233 |
case 'passwords': |
| 234 |
shortcode = '[passster passwords="' + meta.passster_passwords + '" '; |
| 235 |
break; |
| 236 |
case 'password_list': |
| 237 |
shortcode = '[passster password_list="' + meta.passster_password_list + '" '; |
| 238 |
break; |
| 239 |
case 'password_lists': |
| 240 |
shortcode = '[passster password_lists="' + meta.passster_password_lists.join('|') + '" '; |
| 241 |
break; |
| 242 |
case 'recaptcha': |
| 243 |
shortcode = '[passster recaptcha="true" '; |
| 244 |
break; |
| 245 |
default: |
| 246 |
shortcode = '[passster password="' + meta.passster_password + '" '; |
| 247 |
} |
| 248 |
shortcode += 'area="' + postID + '" '; |
| 249 |
if (showUserSettings) { |
| 250 |
// Modify based on user restriction. |
| 251 |
if ('' !== meta.passster_user_restriction) { |
| 252 |
if ('user-role' === meta.passster_user_restriction_type && 'no-role' !== meta.passster_user_restriction) { |
| 253 |
shortcode += 'role="' + meta.passster_user_restriction + '" '; |
| 254 |
} else { |
| 255 |
if ('no-role' !== meta.passster_user_restriction) { |
| 256 |
shortcode += 'user="' + meta.passster_user_restriction + '" '; |
| 257 |
} |
| 258 |
} |
| 259 |
} |
| 260 |
} |
| 261 |
if (showOverwriteTexts) { |
| 262 |
// Modify based on changed defaults. |
| 263 |
if ('' !== meta.passster_headline) { |
| 264 |
shortcode += 'headline="' + meta.passster_headline + '" '; |
| 265 |
} |
| 266 |
if ('' !== meta.passster_instruction) { |
| 267 |
shortcode += 'instruction="' + meta.passster_instruction + '" '; |
| 268 |
} |
| 269 |
if ('' !== meta.passster_placeholder) { |
| 270 |
shortcode += 'placeholder="' + meta.passster_placeholder + '" '; |
| 271 |
} |
| 272 |
if ('' !== meta.passster_button) { |
| 273 |
shortcode += 'button="' + meta.passster_button + '" '; |
| 274 |
} |
| 275 |
if ('' !== meta.passster_id) { |
| 276 |
shortcode += 'id="' + meta.passster_id + '" '; |
| 277 |
} |
| 278 |
} |
| 279 |
if (showMiscSettings) { |
| 280 |
// Modify based on misc settings. |
| 281 |
if ('' !== meta.passster_redirect_url) { |
| 282 |
shortcode += 'redirect="' + meta.passster_redirect_url + '" '; |
| 283 |
} |
| 284 |
if ('yes' === meta.passster_hide) { |
| 285 |
shortcode += 'hide="true" '; |
| 286 |
} |
| 287 |
} |
| 288 |
shortcode = shortcode.replace(/\s?$/, ''); |
| 289 |
shortcode += ']'; |
| 290 |
return shortcode; |
| 291 |
}; |
| 292 |
const generateUnlockLink = () => { |
| 293 |
let link = ''; |
| 294 |
switch (protectionType) { |
| 295 |
case 'password': |
| 296 |
link = _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ |
| 297 |
path: '/passster/v1/link?password=' + meta.passster_password + '&post_id=' + postID + '&is_list=false', |
| 298 |
method: 'GET' |
| 299 |
}).then(res => { |
| 300 |
setUnlockLink(res); |
| 301 |
}); |
| 302 |
break; |
| 303 |
case 'passwords': |
| 304 |
let passwords = meta.passster_passwords.split(','); |
| 305 |
link = _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ |
| 306 |
path: '/passster/v1/link?password=' + passwords[0] + '&post_id=' + postID + '&is_list=false', |
| 307 |
method: 'GET' |
| 308 |
}).then(res => { |
| 309 |
setUnlockLink(res); |
| 310 |
}); |
| 311 |
break; |
| 312 |
case 'password_list': |
| 313 |
link = _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ |
| 314 |
path: '/passster/v1/link?password=' + meta.passster_password_list + '&post_id=' + postID + '&is_list=true', |
| 315 |
method: 'GET' |
| 316 |
}).then(res => { |
| 317 |
setUnlockLink(res); |
| 318 |
}); |
| 319 |
break; |
| 320 |
case 'password_lists': |
| 321 |
link = _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ |
| 322 |
path: '/passster/v1/link?password=' + meta.passster_password_lists + '&post_id=' + postID + '&is_list=true' + '&is_multiple=true', |
| 323 |
method: 'GET' |
| 324 |
}).then(res => { |
| 325 |
setUnlockLink(res); |
| 326 |
}); |
| 327 |
break; |
| 328 |
} |
| 329 |
}; |
| 330 |
const showShortcode = () => { |
| 331 |
let show = false; |
| 332 |
switch (meta.passster_protection_type) { |
| 333 |
case 'password': |
| 334 |
if (meta.passster_password) { |
| 335 |
show = true; |
| 336 |
} |
| 337 |
break; |
| 338 |
case 'passwords': |
| 339 |
if (meta.passster_password) { |
| 340 |
show = true; |
| 341 |
} |
| 342 |
break; |
| 343 |
case 'password_list': |
| 344 |
if (meta.passster_password_list) { |
| 345 |
show = true; |
| 346 |
} |
| 347 |
break; |
| 348 |
case 'password_lists': |
| 349 |
if (meta.passster_password_lists) { |
| 350 |
show = true; |
| 351 |
} |
| 352 |
break; |
| 353 |
case 'recaptcha': |
| 354 |
show = true; |
| 355 |
break; |
| 356 |
} |
| 357 |
return show; |
| 358 |
}; |
| 359 |
const updateChildPages = useChild => { |
| 360 |
if (useChild) { |
| 361 |
// Maybe fetch child pages. |
| 362 |
getChildPages(postID); |
| 363 |
if (fetchedChildPages) { |
| 364 |
fetchedChildPages.forEach(function (childID) { |
| 365 |
// Update meta for these pages. |
| 366 |
saveChildMeta(childID, "passster_activate_protection", activateProtection); |
| 367 |
saveChildMeta(childID, "passster_protection_type", protectionType); |
| 368 |
if (options.is_pro) { |
| 369 |
switch (protectionType) { |
| 370 |
case 'password': |
| 371 |
saveChildMeta(childID, "passster_password", meta.passster_password); |
| 372 |
break; |
| 373 |
case 'passwords': |
| 374 |
saveChildMeta(childID, "passster_passwords", meta.passster_passwords); |
| 375 |
break; |
| 376 |
case 'password_list': |
| 377 |
saveChildMeta(childID, "passster_password_list", meta.passster_password_list); |
| 378 |
break; |
| 379 |
case 'password_lists': |
| 380 |
saveChildMeta(childID, "passster_password_lists", meta.passster_password_lists); |
| 381 |
break; |
| 382 |
} |
| 383 |
} else { |
| 384 |
saveChildMeta(childID, "passster_password", meta.passster_password); |
| 385 |
} |
| 386 |
if (options.is_pro) { |
| 387 |
// Maybe overwrite user restriction. |
| 388 |
if (showUserSettings) { |
| 389 |
saveChildMeta(childID, "passster_activate_user_restriction", showUserSettings); |
| 390 |
saveChildMeta(childID, "passster_user_restriction_type", meta.passster_user_restriction_type); |
| 391 |
saveChildMeta(childID, "passster_user_restriction", meta.passster_user_restriction); |
| 392 |
} |
| 393 |
} |
| 394 |
|
| 395 |
// Maybe overwrite labels. |
| 396 |
if (showOverwriteTexts) { |
| 397 |
saveChildMeta(childID, "passster_activate_overwrite_defaults", showOverwriteTexts); |
| 398 |
saveChildMeta(childID, "passster_headline", meta.passster_headline); |
| 399 |
saveChildMeta(childID, "passster_instruction", meta.passster_instruction); |
| 400 |
saveChildMeta(childID, "passster_placeholder", meta.passster_placeholder); |
| 401 |
saveChildMeta(childID, "passster_button", meta.passster_button); |
| 402 |
saveChildMeta(childID, "passster_id", meta.passster_id); |
| 403 |
} |
| 404 |
|
| 405 |
// Maybe overwrite miscs. |
| 406 |
if (showMiscSettings) { |
| 407 |
saveChildMeta(childID, "passster_activate_misc_settings", showMiscSettings); |
| 408 |
saveChildMeta(childID, "passster_hide", meta.passster_hide); |
| 409 |
saveChildMeta(childID, "passster_redirect_url", meta.passster_redirect_url); |
| 410 |
} |
| 411 |
}); |
| 412 |
} |
| 413 |
} else { |
| 414 |
// Maybe fetch child pages. |
| 415 |
getChildPages(postID); |
| 416 |
if (fetchedChildPages) { |
| 417 |
fetchedChildPages.forEach(function (childID) { |
| 418 |
// Update meta for these pages. |
| 419 |
saveChildMeta(childID, "passster_activate_protection", false); |
| 420 |
saveChildMeta(childID, "passster_protection_type", ""); |
| 421 |
if (options.is_pro) { |
| 422 |
saveChildMeta(childID, "passster_password", ""); |
| 423 |
saveChildMeta(childID, "passster_passwords", ""); |
| 424 |
saveChildMeta(childID, "passster_password_list", 0); |
| 425 |
|
| 426 |
// Clear user restriction. |
| 427 |
saveChildMeta(childID, "passster_user_restriction_type", "username"); |
| 428 |
saveChildMeta(childID, "passster_user_restriction", ""); |
| 429 |
} else { |
| 430 |
saveChildMeta(childID, "passster_password", ""); |
| 431 |
} |
| 432 |
|
| 433 |
// Clear labels. |
| 434 |
saveChildMeta(childID, "passster_headline", ""); |
| 435 |
saveChildMeta(childID, "passster_instruction", ""); |
| 436 |
saveChildMeta(childID, "passster_placeholder", ""); |
| 437 |
saveChildMeta(childID, "passster_button", ""); |
| 438 |
saveChildMeta(childID, "passster_id", ""); |
| 439 |
|
| 440 |
// Clear miscs. |
| 441 |
saveChildMeta(childID, "passster_hide", ""); |
| 442 |
saveChildMeta(childID, "passster_redirect_url", ""); |
| 443 |
}); |
| 444 |
} |
| 445 |
} |
| 446 |
}; |
| 447 |
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { |
| 448 |
fetchPostID(); |
| 449 |
if (options.is_pro) { |
| 450 |
// Setup user roles. |
| 451 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ |
| 452 |
path: '/passster/v1/user-roles' |
| 453 |
}).then(value => { |
| 454 |
setUserRoles(value); |
| 455 |
}); |
| 456 |
} |
| 457 |
if (meta.passster_password_lists) { |
| 458 |
setMultiplePasswordLists(meta.passster_password_lists); |
| 459 |
} |
| 460 |
|
| 461 |
// Check for post type. |
| 462 |
if ('protected_areas' === options.post_type) { |
| 463 |
setActivateProtection(true); |
| 464 |
} |
| 465 |
|
| 466 |
// Check if global protection. |
| 467 |
if (options.global_protection_id == postID) { |
| 468 |
setActivateProtection(true); |
| 469 |
} |
| 470 |
|
| 471 |
// Toggle settings. |
| 472 |
if (meta.passster_activate_protection) { |
| 473 |
setActivateProtection(true); |
| 474 |
} else { |
| 475 |
if ('protected_areas' !== options.post_type && options.global_protection_id != postID) { |
| 476 |
setActivateProtection(false); |
| 477 |
} |
| 478 |
} |
| 479 |
if (meta.passster_protect_child_pages) { |
| 480 |
setProtectChildPages(true); |
| 481 |
} |
| 482 |
if (protectChildPages) { |
| 483 |
updateChildPages(true); |
| 484 |
} else { |
| 485 |
updateChildPages(false); |
| 486 |
} |
| 487 |
if (options.is_pro) { |
| 488 |
if (meta.passster_activate_user_restriction) { |
| 489 |
setShowUserSettings(true); |
| 490 |
} |
| 491 |
} |
| 492 |
if (meta.passster_activate_overwrite_defaults) { |
| 493 |
setShowOverwriteTexts(true); |
| 494 |
} |
| 495 |
if (meta.passster_activate_misc_settings) { |
| 496 |
setShowMiscSettings(true); |
| 497 |
} |
| 498 |
if (meta.passster_password) { |
| 499 |
setGeneratedPassword(meta.passster_password); |
| 500 |
} |
| 501 |
if (options.is_pro) { |
| 502 |
if (meta.passster_passwords) { |
| 503 |
setGeneratedPassword(meta.passster_passwords); |
| 504 |
} |
| 505 |
} |
| 506 |
setProtectionType(meta.passster_protection_type); |
| 507 |
if (options.is_pro) { |
| 508 |
// Genenerate encrypted unlock link. |
| 509 |
generateUnlockLink(); |
| 510 |
} |
| 511 |
|
| 512 |
// Save shortcode to meta. |
| 513 |
if (showShortcode()) { |
| 514 |
saveMeta("passster_area_shortcode", getAreaShortcode()); |
| 515 |
} else { |
| 516 |
saveMeta("passster_area_shortcode", ""); |
| 517 |
} |
| 518 |
}, [postID]); |
| 519 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", { |
| 520 |
className: "meta-settings", |
| 521 |
children: ['protected_areas' !== options.post_type && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 522 |
label: __('Activate Protection', 'content-protector'), |
| 523 |
checked: activateProtection, |
| 524 |
onChange: value => { |
| 525 |
setActivateProtection(value); |
| 526 |
saveMeta("passster_activate_protection", value); |
| 527 |
} |
| 528 |
}), activateProtection && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 529 |
children: ['page' === options.post_type && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 530 |
label: __('Protect Child Pages', 'content-protector'), |
| 531 |
checked: protectChildPages, |
| 532 |
onChange: value => { |
| 533 |
setProtectChildPages(value); |
| 534 |
saveMeta("passster_protect_child_pages", value); |
| 535 |
updateChildPages(value); |
| 536 |
} |
| 537 |
}), options.is_pro ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 538 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { |
| 539 |
label: __('Protection Mode', 'content-protector'), |
| 540 |
value: protectionType, |
| 541 |
options: [{ |
| 542 |
label: __('Password', 'content-protector'), |
| 543 |
value: 'password' |
| 544 |
}, { |
| 545 |
label: __('Passwords', 'content-protector'), |
| 546 |
value: 'passwords' |
| 547 |
}, { |
| 548 |
label: __('Password List', 'content-protector'), |
| 549 |
value: 'password_list' |
| 550 |
}, { |
| 551 |
label: __('Password Lists', 'content-protector'), |
| 552 |
value: 'password_lists' |
| 553 |
}, { |
| 554 |
label: __('reCAPTCHA', 'content-protector'), |
| 555 |
value: 'recaptcha' |
| 556 |
}], |
| 557 |
onChange: value => { |
| 558 |
saveMeta("passster_protection_type", value); |
| 559 |
setProtectionType(value); |
| 560 |
} |
| 561 |
}), protectionType == 'password' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 562 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 563 |
label: __('Password', 'content-protector'), |
| 564 |
placeholder: "password1", |
| 565 |
value: generatedPassword, |
| 566 |
onChange: value => { |
| 567 |
setGeneratedPassword(value); |
| 568 |
saveMeta("passster_password", value); |
| 569 |
} |
| 570 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 571 |
margin: 5 |
| 572 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 573 |
style: { |
| 574 |
top: "-5px", |
| 575 |
position: "relative" |
| 576 |
}, |
| 577 |
onClick: () => { |
| 578 |
setPasswordGenerateType('password'); |
| 579 |
generatePasswords(); |
| 580 |
}, |
| 581 |
variant: "secondary", |
| 582 |
children: __('Generate password', 'content-protector') |
| 583 |
})] |
| 584 |
}), protectionType == 'passwords' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 585 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 586 |
label: __('Passwords', 'content-protector'), |
| 587 |
placeholder: "password1,password2,password3", |
| 588 |
value: generatedPasswords, |
| 589 |
onChange: value => { |
| 590 |
setGeneratedPasswords(value); |
| 591 |
saveMeta("passster_passwords", value); |
| 592 |
} |
| 593 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexItem, { |
| 594 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexBlock, { |
| 595 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 596 |
label: __('Number of passwords to generate', 'content-protector'), |
| 597 |
help: __("How many passwords do you want to generate?", 'content-protector'), |
| 598 |
type: "number", |
| 599 |
value: numberOfPasswords, |
| 600 |
onChange: value => { |
| 601 |
setNumberOfPasswords(value); |
| 602 |
} |
| 603 |
}) |
| 604 |
}) |
| 605 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexItem, { |
| 606 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexBlock, { |
| 607 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 608 |
style: { |
| 609 |
top: "-5px", |
| 610 |
position: "relative" |
| 611 |
}, |
| 612 |
onClick: () => { |
| 613 |
setPasswordGenerateType('passwords'); |
| 614 |
generatePasswords(); |
| 615 |
}, |
| 616 |
variant: "secondary", |
| 617 |
children: __('Generate password', 'content-protector') |
| 618 |
}) |
| 619 |
}) |
| 620 |
})] |
| 621 |
}), protectionType == 'password_list' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 622 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { |
| 623 |
label: __('Password List', 'content-protector'), |
| 624 |
options: getSelectablePasswordLists(), |
| 625 |
value: meta.passster_password_list, |
| 626 |
onChange: value => { |
| 627 |
saveMeta("passster_password_list", value); |
| 628 |
} |
| 629 |
}) |
| 630 |
}), protectionType == 'password_lists' && multiplePasswordLists && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 631 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { |
| 632 |
multiple: true, |
| 633 |
label: __('Password Lists', 'content-protector'), |
| 634 |
options: getSelectablePasswordLists(), |
| 635 |
value: meta.passster_password_lists, |
| 636 |
onChange: value => { |
| 637 |
setMultiplePasswordLists(value); |
| 638 |
saveMeta("passster_password_lists", value); |
| 639 |
} |
| 640 |
}) |
| 641 |
})] |
| 642 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 643 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 644 |
label: __('Password', 'content-protector'), |
| 645 |
placeholder: "password1", |
| 646 |
value: generatedPassword, |
| 647 |
onChange: value => { |
| 648 |
setGeneratedPassword(value); |
| 649 |
saveMeta("passster_password", value); |
| 650 |
} |
| 651 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 652 |
margin: 5 |
| 653 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 654 |
style: { |
| 655 |
top: "-5px", |
| 656 |
position: "relative" |
| 657 |
}, |
| 658 |
onClick: () => { |
| 659 |
setPasswordGenerateType('password'); |
| 660 |
generatePasswords(); |
| 661 |
}, |
| 662 |
variant: "secondary", |
| 663 |
children: __('Generate password', 'content-protector') |
| 664 |
})] |
| 665 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 666 |
margin: 5 |
| 667 |
}), options.is_pro && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 668 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 669 |
label: __('User Restriction', 'content-protector'), |
| 670 |
checked: showUserSettings, |
| 671 |
onChange: value => { |
| 672 |
setShowUserSettings(value); |
| 673 |
saveMeta("passster_activate_user_restriction", value); |
| 674 |
} |
| 675 |
}), showUserSettings && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 676 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { |
| 677 |
label: __('Choose User Restriction Type', 'content-protector'), |
| 678 |
options: [{ |
| 679 |
label: __('Username', 'content-protector'), |
| 680 |
value: 'username' |
| 681 |
}, { |
| 682 |
label: __('User Role', 'content-protector'), |
| 683 |
value: 'user-role' |
| 684 |
}], |
| 685 |
value: meta.passster_user_restriction_type, |
| 686 |
onChange: value => { |
| 687 |
saveMeta("passster_user_restriction_type", value); |
| 688 |
} |
| 689 |
}), meta.passster_user_restriction_type === 'user-role' ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { |
| 690 |
label: __('User Role', 'content-protector'), |
| 691 |
value: meta.passster_user_restriction, |
| 692 |
placeholder: "subscriber", |
| 693 |
options: getSelectableUserRoles(), |
| 694 |
onChange: value => { |
| 695 |
saveMeta("passster_user_restriction", value); |
| 696 |
} |
| 697 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 698 |
label: __('Username', 'content-protector'), |
| 699 |
value: meta.passster_user_restriction, |
| 700 |
placeholder: "user_a", |
| 701 |
onChange: value => { |
| 702 |
saveMeta("passster_user_restriction", value); |
| 703 |
} |
| 704 |
})] |
| 705 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 706 |
margin: 5 |
| 707 |
})] |
| 708 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 709 |
label: __('Overwrite Defaults', 'content-protector'), |
| 710 |
checked: showOverwriteTexts, |
| 711 |
onChange: value => { |
| 712 |
setShowOverwriteTexts(value); |
| 713 |
saveMeta("passster_activate_overwrite_defaults", value); |
| 714 |
} |
| 715 |
}), showOverwriteTexts && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 716 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 717 |
label: __('Headline', 'content-protector'), |
| 718 |
placeholder: __('Protected Area', 'content-protector'), |
| 719 |
help: __('This is the headline of your password-protection form.', 'content-protector'), |
| 720 |
value: meta.passster_headline, |
| 721 |
onChange: value => { |
| 722 |
saveMeta("passster_headline", value); |
| 723 |
} |
| 724 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextareaControl, { |
| 725 |
label: __('Instruction', 'content-protector'), |
| 726 |
placeholder: __('This content is password-protected. Please verify with a password to unlock the content.', 'content-protector'), |
| 727 |
help: __('The instruction text appears before the password input field. Use it for hints or additional explanation.', 'content-protector'), |
| 728 |
value: meta.passster_instruction, |
| 729 |
onChange: value => { |
| 730 |
saveMeta("passster_instruction", value); |
| 731 |
} |
| 732 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 733 |
label: __('Placeholder', 'content-protector'), |
| 734 |
placeholder: __('Enter your password..', 'content-protector'), |
| 735 |
help: __('Edit the placeholder text of the password field.', 'content-protector'), |
| 736 |
value: meta.passster_placeholder, |
| 737 |
onChange: value => { |
| 738 |
saveMeta("passster_placeholder", value); |
| 739 |
} |
| 740 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 741 |
label: __('Button Label', 'content-protector'), |
| 742 |
placeholder: __('Unlock', 'content-protector'), |
| 743 |
help: __('Edit the text that appears on the button.', 'content-protector'), |
| 744 |
value: meta.passster_button, |
| 745 |
onChange: value => { |
| 746 |
saveMeta("passster_button", value); |
| 747 |
} |
| 748 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 749 |
label: __('Unique ID', 'content-protector'), |
| 750 |
placeholder: __('my-custom-id', 'content-protector'), |
| 751 |
help: __('Give your password form a unique ID.', 'content-protector'), |
| 752 |
value: meta.passster_id, |
| 753 |
onChange: value => { |
| 754 |
saveMeta("passster_id", value); |
| 755 |
} |
| 756 |
})] |
| 757 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 758 |
margin: 5 |
| 759 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 760 |
label: __('Misc Settings', 'content-protector'), |
| 761 |
checked: showMiscSettings, |
| 762 |
onChange: value => { |
| 763 |
setShowMiscSettings(value); |
| 764 |
saveMeta("passster_activate_misc_settings", value); |
| 765 |
} |
| 766 |
}), showMiscSettings && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 767 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { |
| 768 |
label: __('Hide/Show', 'content-protector'), |
| 769 |
options: [{ |
| 770 |
label: __('No', 'content-protector'), |
| 771 |
value: 'no' |
| 772 |
}, { |
| 773 |
label: __('Yes', 'content-protector'), |
| 774 |
value: 'yes' |
| 775 |
}], |
| 776 |
value: meta.passster_hide, |
| 777 |
help: __('Hide this password form. It will not show the password form, but it will show the unlocked content.', 'content-protector'), |
| 778 |
onChange: value => { |
| 779 |
saveMeta("passster_hide", value); |
| 780 |
} |
| 781 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 782 |
label: __('Redirect', 'content-protector'), |
| 783 |
placeholder: "https://your-url.com", |
| 784 |
type: "url", |
| 785 |
help: __('Redirect the user to this URL once they submit the correct password.', 'content-protector'), |
| 786 |
value: meta.passster_redirect_url, |
| 787 |
onChange: value => { |
| 788 |
saveMeta("passster_redirect_url", value); |
| 789 |
} |
| 790 |
})] |
| 791 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 792 |
margin: 5 |
| 793 |
}), 'protected_areas' === options.post_type && showShortcode() ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ClipboardButton, { |
| 794 |
variant: "primary", |
| 795 |
text: getAreaShortcode(), |
| 796 |
onCopy: () => setHasCopied(true), |
| 797 |
onFinishCopy: () => setHasCopied(false), |
| 798 |
children: hasCopied ? __('Copied!', 'content-protector') : __('Copy Shortcode', 'content-protector') |
| 799 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 800 |
children: [protectionType === 'password' && meta.passster_password && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ClipboardButton, { |
| 801 |
variant: "secondary", |
| 802 |
text: unlockLink, |
| 803 |
onCopy: () => setHasLinkCopied(true), |
| 804 |
onFinishCopy: () => setHasLinkCopied(false), |
| 805 |
children: hasLinkCopied ? __('Copied Link!', 'content-protector') : __('Copy Unlock Link', 'content-protector') |
| 806 |
}), protectionType === 'passwords' && meta.passster_passwords && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ClipboardButton, { |
| 807 |
variant: "secondary", |
| 808 |
text: unlockLink, |
| 809 |
onCopy: () => setHasLinkCopied(true), |
| 810 |
onFinishCopy: () => setHasLinkCopied(false), |
| 811 |
children: hasLinkCopied ? __('Copied Link!', 'content-protector') : __('Copy Unlock Link', 'content-protector') |
| 812 |
}), protectionType === 'password_list' && meta.passster_password_list && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ClipboardButton, { |
| 813 |
variant: "secondary", |
| 814 |
text: unlockLink, |
| 815 |
onCopy: () => setHasLinkCopied(true), |
| 816 |
onFinishCopy: () => setHasLinkCopied(false), |
| 817 |
children: hasLinkCopied ? __('Copied Link!', 'content-protector') : __('Copy Unlock Link', 'content-protector') |
| 818 |
})] |
| 819 |
})] |
| 820 |
})] |
| 821 |
}); |
| 822 |
} |
| 823 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Metabox); |
| 824 |
|
| 825 |
/***/ }), |
| 826 |
|
| 827 |
/***/ "./src/meta/password-lists/Metabox.jsx": |
| 828 |
/*!*********************************************!*\ |
| 829 |
!*** ./src/meta/password-lists/Metabox.jsx ***! |
| 830 |
\*********************************************/ |
| 831 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 832 |
|
| 833 |
"use strict"; |
| 834 |
__webpack_require__.r(__webpack_exports__); |
| 835 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 836 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 837 |
/* harmony export */ }); |
| 838 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 839 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); |
| 840 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 841 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 842 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); |
| 843 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__); |
| 844 |
/* harmony import */ var js_generate_password__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! js-generate-password */ "./node_modules/js-generate-password/dist/index.js"); |
| 845 |
/* harmony import */ var react_data_table_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-data-table-component */ "./node_modules/react-data-table-component/dist/index.cjs.js"); |
| 846 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 847 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__); |
| 848 |
|
| 849 |
|
| 850 |
|
| 851 |
|
| 852 |
|
| 853 |
|
| 854 |
|
| 855 |
const { |
| 856 |
__ |
| 857 |
} = wp.i18n; |
| 858 |
function Metabox() { |
| 859 |
const [postId] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(options.post_id); |
| 860 |
const [meta, setMeta] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(options.meta); |
| 861 |
const [expirationMode, setExpirationMode] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)("first_usage"); |
| 862 |
const [expireAfterUsage, setExpireAfterUsage] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 863 |
const [numberOfPasswords, setNumberOfPasswords] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(5); |
| 864 |
const [isReset, setIsReset] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 865 |
const saveMeta = (meta_key, value) => { |
| 866 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ |
| 867 |
path: '/passster/v1/meta?meta_key=' + meta_key + '&post_id=' + postId, |
| 868 |
method: 'POST', |
| 869 |
data: { |
| 870 |
meta_value: value |
| 871 |
} |
| 872 |
}); |
| 873 |
setMeta({ |
| 874 |
...meta, |
| 875 |
[meta_key]: value |
| 876 |
}); |
| 877 |
}; |
| 878 |
const deleteMeta = meta_key => { |
| 879 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ |
| 880 |
path: '/passster/v1/meta?meta_key=' + meta_key + '&post_id=' + postId, |
| 881 |
method: 'POST', |
| 882 |
data: { |
| 883 |
delete: true |
| 884 |
} |
| 885 |
}); |
| 886 |
}; |
| 887 |
const generatePasswords = () => { |
| 888 |
let passwords = ''; |
| 889 |
if (meta.passster_passwords !== undefined) { |
| 890 |
passwords = meta.passster_passwords; |
| 891 |
} |
| 892 |
if ('' !== passwords) { |
| 893 |
passwords = passwords + ','; |
| 894 |
} |
| 895 |
for (let i = 0; i < numberOfPasswords; i++) { |
| 896 |
let password = (0,js_generate_password__WEBPACK_IMPORTED_MODULE_3__.GeneratePassword)({ |
| 897 |
length: options.password_length, |
| 898 |
uppercase: options.include_uppercase, |
| 899 |
numbers: options.include_numbers, |
| 900 |
symbols: false |
| 901 |
}); |
| 902 |
passwords = passwords += password + ','; |
| 903 |
} |
| 904 |
passwords = passwords.slice(0, -1); |
| 905 |
saveMeta("passster_passwords", passwords); |
| 906 |
}; |
| 907 |
const columns = [{ |
| 908 |
name: __('Password', 'content-protector'), |
| 909 |
selector: row => row.password, |
| 910 |
sortable: true |
| 911 |
}, { |
| 912 |
name: __('Number of usages', 'content-protector'), |
| 913 |
selector: row => row.usage, |
| 914 |
sortable: true |
| 915 |
}, { |
| 916 |
name: __('Expires in', 'content-protector'), |
| 917 |
selector: row => row.time, |
| 918 |
sortable: true |
| 919 |
}, { |
| 920 |
name: __('Expired', 'content-protector'), |
| 921 |
selector: row => row.expired, |
| 922 |
sortable: true |
| 923 |
}]; |
| 924 |
const runResetStatistics = () => { |
| 925 |
// Delete Meta. |
| 926 |
deleteMeta('passster_expired_passwords'); |
| 927 |
deleteMeta('passster_expired_passwords_statistics'); |
| 928 |
setIsReset(true); |
| 929 |
setTimeout(function () { |
| 930 |
setIsReset(false); |
| 931 |
}, 2000); |
| 932 |
}; |
| 933 |
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { |
| 934 |
if (meta.passster_expire_mode) { |
| 935 |
setExpirationMode(meta.passster_expire_mode); |
| 936 |
} |
| 937 |
if (meta.passster_expire_passwords) { |
| 938 |
setExpireAfterUsage(true); |
| 939 |
} |
| 940 |
}, [postId, meta]); |
| 941 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", { |
| 942 |
className: "paswword-list-settings", |
| 943 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 944 |
margin: 5 |
| 945 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 946 |
className: "add-passwords", |
| 947 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 948 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("b", { |
| 949 |
children: __('Add Passwords', 'content-protector') |
| 950 |
}) |
| 951 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 952 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextareaControl, { |
| 953 |
label: __('Passwords', 'content-protector'), |
| 954 |
placeholder: __('password1,password2,password3', 'content-protector'), |
| 955 |
rows: "15", |
| 956 |
help: __('Add a comma-separated list of passwords.', 'content-protector'), |
| 957 |
value: meta.passster_passwords, |
| 958 |
onChange: value => { |
| 959 |
saveMeta("passster_passwords", value); |
| 960 |
} |
| 961 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Flex, { |
| 962 |
justify: "left", |
| 963 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexItem, { |
| 964 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexBlock, { |
| 965 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 966 |
label: __('Number of passwords to generate', 'content-protector'), |
| 967 |
help: __("How many passwords do you want to generate? We automatically add the generated passwords to your password list.", 'content-protector'), |
| 968 |
type: "number", |
| 969 |
value: numberOfPasswords, |
| 970 |
onChange: value => { |
| 971 |
setNumberOfPasswords(value); |
| 972 |
} |
| 973 |
}) |
| 974 |
}) |
| 975 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexItem, { |
| 976 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexBlock, { |
| 977 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 978 |
style: { |
| 979 |
top: "-5px", |
| 980 |
position: "relative" |
| 981 |
}, |
| 982 |
onClick: generatePasswords, |
| 983 |
variant: "primary", |
| 984 |
children: __('Generate passwords', 'content-protector') |
| 985 |
}) |
| 986 |
}) |
| 987 |
})] |
| 988 |
})] |
| 989 |
})] |
| 990 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 991 |
margin: 5 |
| 992 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 993 |
className: "expire-passswords", |
| 994 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 995 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("b", { |
| 996 |
children: __('Expiration', 'content-protector') |
| 997 |
}) |
| 998 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 999 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { |
| 1000 |
label: __('Choose an expiration mode', 'content-protector'), |
| 1001 |
value: meta.passster_expire_mode, |
| 1002 |
options: [{ |
| 1003 |
label: __('First Usage', 'content-protector'), |
| 1004 |
value: 'first_usage' |
| 1005 |
}, { |
| 1006 |
label: __('Number of usages', 'content-protector'), |
| 1007 |
value: 'number_of_usages' |
| 1008 |
}, { |
| 1009 |
label: __('By Interval', 'content-protector'), |
| 1010 |
value: 'interval' |
| 1011 |
}], |
| 1012 |
onChange: value => { |
| 1013 |
// Reset existing values. |
| 1014 |
if (value === 'first_usage') { |
| 1015 |
saveMeta("passster_expire_usage", ''); |
| 1016 |
saveMeta("passster_expire_time", ''); |
| 1017 |
saveMeta("passster_expire_time_unit", 'day'); |
| 1018 |
} else if (value === 'number_of_usages') { |
| 1019 |
saveMeta("passster_expire_passwords", false); |
| 1020 |
saveMeta("passster_expire_time", ''); |
| 1021 |
saveMeta("passster_expire_time_unit", 'day'); |
| 1022 |
} else if (value === 'interval') { |
| 1023 |
saveMeta("passster_expire_usage", ''); |
| 1024 |
saveMeta("passster_expire_passwords", false); |
| 1025 |
} |
| 1026 |
saveMeta("passster_expire_mode", value); |
| 1027 |
setExpirationMode(value); |
| 1028 |
} |
| 1029 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 1030 |
margin: 5 |
| 1031 |
}), 'first_usage' === expirationMode && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 1032 |
label: __('Expire Password after usage', 'content-protector'), |
| 1033 |
help: __("The password will be immediately removed from the password list after it's first usage.", 'content-protector'), |
| 1034 |
checked: expireAfterUsage, |
| 1035 |
onChange: value => { |
| 1036 |
setExpireAfterUsage(value); |
| 1037 |
saveMeta("passster_expire_passwords", value); |
| 1038 |
} |
| 1039 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 1040 |
margin: 5 |
| 1041 |
}), 'number_of_usages' === expirationMode && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 1042 |
label: __('Expire after number of usage', 'content-protector'), |
| 1043 |
help: __("The password will be removed from the password list after the number of usage is reached.", 'content-protector'), |
| 1044 |
type: "number", |
| 1045 |
value: meta.passster_expire_usage, |
| 1046 |
onChange: value => { |
| 1047 |
saveMeta("passster_expire_usage", value); |
| 1048 |
} |
| 1049 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 1050 |
margin: 5 |
| 1051 |
}), 'interval' === expirationMode && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Flex, { |
| 1052 |
justify: "left", |
| 1053 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexItem, { |
| 1054 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexBlock, { |
| 1055 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 1056 |
label: __('Expire after a time interval', 'content-protector'), |
| 1057 |
help: __("Expire the password after a specific time interval. It starts tracking once the password is used for the first time.", 'content-protector'), |
| 1058 |
type: "number", |
| 1059 |
value: meta.passster_expire_time, |
| 1060 |
onChange: value => { |
| 1061 |
saveMeta("passster_expire_time", value); |
| 1062 |
} |
| 1063 |
}) |
| 1064 |
}) |
| 1065 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexItem, { |
| 1066 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexBlock, { |
| 1067 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { |
| 1068 |
className: "time-unit-select", |
| 1069 |
label: __('Time Unit', 'content-protector'), |
| 1070 |
value: meta.passster_expire_time_unit, |
| 1071 |
options: [{ |
| 1072 |
label: __('Days', 'content-protector'), |
| 1073 |
value: 'day' |
| 1074 |
}, { |
| 1075 |
label: __('Hours', 'content-protector'), |
| 1076 |
value: 'hour' |
| 1077 |
}, { |
| 1078 |
label: __('Weeks', 'content-protector'), |
| 1079 |
value: 'week' |
| 1080 |
}, { |
| 1081 |
label: __('Months', 'content-protector'), |
| 1082 |
value: 'month' |
| 1083 |
}], |
| 1084 |
onChange: value => { |
| 1085 |
saveMeta("passster_expire_time_unit", value); |
| 1086 |
} |
| 1087 |
}) |
| 1088 |
}) |
| 1089 |
})] |
| 1090 |
})] |
| 1091 |
})] |
| 1092 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 1093 |
margin: 5 |
| 1094 |
}), meta.passster_expired_passwords_statistics && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 1095 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 1096 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("b", { |
| 1097 |
children: __('Usage', 'content-protector') |
| 1098 |
}) |
| 1099 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 1100 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react_data_table_component__WEBPACK_IMPORTED_MODULE_4__["default"], { |
| 1101 |
columns: columns, |
| 1102 |
data: meta.passster_expired_passwords_statistics, |
| 1103 |
pagination: true |
| 1104 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 1105 |
onClick: runResetStatistics, |
| 1106 |
variant: "secondary", |
| 1107 |
children: __('Reset Expiration Statistics', 'content-protector') |
| 1108 |
}), isReset ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, { |
| 1109 |
type: "slide-in", |
| 1110 |
options: { |
| 1111 |
origin: 'top' |
| 1112 |
}, |
| 1113 |
children: () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Notice, { |
| 1114 |
status: "success", |
| 1115 |
className: "expiration-notice", |
| 1116 |
isDismissible: false, |
| 1117 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("p", { |
| 1118 |
children: __('Expiration Statistics resetted successfully.', 'content-protector') |
| 1119 |
}) |
| 1120 |
}) |
| 1121 |
}) : ''] |
| 1122 |
})] |
| 1123 |
})] |
| 1124 |
}); |
| 1125 |
} |
| 1126 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Metabox); |
| 1127 |
|
| 1128 |
/***/ }), |
| 1129 |
|
| 1130 |
/***/ "./src/meta/password-lists/PasswordListMeta.js": |
| 1131 |
/*!*****************************************************!*\ |
| 1132 |
!*** ./src/meta/password-lists/PasswordListMeta.js ***! |
| 1133 |
\*****************************************************/ |
| 1134 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1135 |
|
| 1136 |
"use strict"; |
| 1137 |
__webpack_require__.r(__webpack_exports__); |
| 1138 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1139 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 1140 |
/* harmony export */ }); |
| 1141 |
/* harmony import */ var _Metabox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Metabox */ "./src/meta/password-lists/Metabox.jsx"); |
| 1142 |
/* harmony import */ var _meta_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./meta.scss */ "./src/meta/password-lists/meta.scss"); |
| 1143 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1144 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); |
| 1145 |
|
| 1146 |
|
| 1147 |
|
| 1148 |
function PasswordListMeta() { |
| 1149 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Metabox__WEBPACK_IMPORTED_MODULE_0__["default"], {}); |
| 1150 |
} |
| 1151 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PasswordListMeta); |
| 1152 |
|
| 1153 |
/***/ }), |
| 1154 |
|
| 1155 |
/***/ "./src/settings/Settings.js": |
| 1156 |
/*!**********************************!*\ |
| 1157 |
!*** ./src/settings/Settings.js ***! |
| 1158 |
\**********************************/ |
| 1159 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1160 |
|
| 1161 |
"use strict"; |
| 1162 |
__webpack_require__.r(__webpack_exports__); |
| 1163 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1164 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 1165 |
/* harmony export */ }); |
| 1166 |
/* harmony import */ var _context_SettingsContext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./context/SettingsContext */ "./src/settings/context/SettingsContext.jsx"); |
| 1167 |
/* harmony import */ var _components_SettingsPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/SettingsPage */ "./src/settings/components/SettingsPage.jsx"); |
| 1168 |
/* harmony import */ var _settings_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settings.scss */ "./src/settings/settings.scss"); |
| 1169 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1170 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 1171 |
|
| 1172 |
|
| 1173 |
|
| 1174 |
|
| 1175 |
function Settings() { |
| 1176 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_context_SettingsContext__WEBPACK_IMPORTED_MODULE_0__["default"], { |
| 1177 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { |
| 1178 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_SettingsPage__WEBPACK_IMPORTED_MODULE_1__["default"], {}) |
| 1179 |
}) |
| 1180 |
}); |
| 1181 |
} |
| 1182 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Settings); |
| 1183 |
|
| 1184 |
/***/ }), |
| 1185 |
|
| 1186 |
/***/ "./src/settings/components/DimensionControl.jsx": |
| 1187 |
/*!******************************************************!*\ |
| 1188 |
!*** ./src/settings/components/DimensionControl.jsx ***! |
| 1189 |
\******************************************************/ |
| 1190 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1191 |
|
| 1192 |
"use strict"; |
| 1193 |
__webpack_require__.r(__webpack_exports__); |
| 1194 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1195 |
/* harmony export */ "default": () => (/* binding */ DimensionControl) |
| 1196 |
/* harmony export */ }); |
| 1197 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1198 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 1199 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 1200 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); |
| 1201 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1202 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); |
| 1203 |
|
| 1204 |
|
| 1205 |
|
| 1206 |
const { |
| 1207 |
__ |
| 1208 |
} = wp.i18n; |
| 1209 |
function DimensionControl({ |
| 1210 |
onChange, |
| 1211 |
label, |
| 1212 |
units, |
| 1213 |
value |
| 1214 |
}) { |
| 1215 |
const availableUnits = (0,_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalUseCustomUnits)({ |
| 1216 |
availableUnits: ['%', 'px', 'em', 'rem', 'vw'] |
| 1217 |
}); |
| 1218 |
const selectedUnit = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => (0,_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalParseQuantityAndUnitFromRawValue)(value), [value])[1] || availableUnits[0]?.value || 'px'; |
| 1219 |
const handleChange = unitValue => { |
| 1220 |
// Prevent the unit from getting returned if there is no actual value set. |
| 1221 |
const [newValue, newUnit] = |
| 1222 |
// eslint-disable-line |
| 1223 |
(0,_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalParseQuantityAndUnitFromRawValue)(unitValue); |
| 1224 |
if (newValue) { |
| 1225 |
onChange(unitValue); |
| 1226 |
} |
| 1227 |
console.log(unitValue); |
| 1228 |
}; |
| 1229 |
const handleUnitChange = newUnit => { |
| 1230 |
// Attempt to smooth over differences between currentUnit and newUnit. |
| 1231 |
// This should slightly improve the experience of switching between unit types. |
| 1232 |
const [currentValue, currentUnit] = (0,_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalParseQuantityAndUnitFromRawValue)(value); |
| 1233 |
if (['em', 'rem'].includes(newUnit) && currentUnit === 'px') { |
| 1234 |
// Convert pixel value to an approximate of the new unit, assuming a root size of 16px. |
| 1235 |
onChange((currentValue / 16).toFixed(2) + newUnit); |
| 1236 |
} else if (['em', 'rem'].includes(currentUnit) && newUnit === 'px') { |
| 1237 |
// Convert to pixel value assuming a root size of 16px. |
| 1238 |
onChange(Math.round(currentValue * 16) + newUnit); |
| 1239 |
} else if (['vh', 'vw', '%'].includes(newUnit) && currentValue > 100) { |
| 1240 |
// When converting to `vh`, `vw`, or `%` units, cap the new value at 100. |
| 1241 |
onChange(100 + newUnit); |
| 1242 |
} |
| 1243 |
}; |
| 1244 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("fieldset", { |
| 1245 |
className: "components-dimension-control", |
| 1246 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("label", { |
| 1247 |
className: "components-base-control__label formatted-label", |
| 1248 |
children: __('Form width', 'content-protector') |
| 1249 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalUnitControl, { |
| 1250 |
value: value, |
| 1251 |
units: availableUnits, |
| 1252 |
onChange: handleChange, |
| 1253 |
onUnitChange: handleUnitChange, |
| 1254 |
min: 0, |
| 1255 |
size: '__unstable-large' |
| 1256 |
})] |
| 1257 |
}); |
| 1258 |
} |
| 1259 |
|
| 1260 |
/***/ }), |
| 1261 |
|
| 1262 |
/***/ "./src/settings/components/SettingsPage.jsx": |
| 1263 |
/*!**************************************************!*\ |
| 1264 |
!*** ./src/settings/components/SettingsPage.jsx ***! |
| 1265 |
\**************************************************/ |
| 1266 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1267 |
|
| 1268 |
"use strict"; |
| 1269 |
__webpack_require__.r(__webpack_exports__); |
| 1270 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1271 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 1272 |
/* harmony export */ }); |
| 1273 |
/* harmony import */ var _pages_GeneralSettings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pages/GeneralSettings */ "./src/settings/pages/GeneralSettings.jsx"); |
| 1274 |
/* harmony import */ var _pages_DesignSettings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../pages/DesignSettings */ "./src/settings/pages/DesignSettings.jsx"); |
| 1275 |
/* harmony import */ var _pages_GlobalProtectionSettings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../pages/GlobalProtectionSettings */ "./src/settings/pages/GlobalProtectionSettings.jsx"); |
| 1276 |
/* harmony import */ var _pages_WooIntegrationSettings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pages/WooIntegrationSettings */ "./src/settings/pages/WooIntegrationSettings.jsx"); |
| 1277 |
/* harmony import */ var _pages_AdvancedSettings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pages/AdvancedSettings */ "./src/settings/pages/AdvancedSettings.jsx"); |
| 1278 |
/* harmony import */ var _pages_ExternalSettings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../pages/ExternalSettings */ "./src/settings/pages/ExternalSettings.jsx"); |
| 1279 |
/* harmony import */ var _pages_SystemStatus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../pages/SystemStatus */ "./src/settings/pages/SystemStatus.jsx"); |
| 1280 |
/* harmony import */ var _pages_Utilities__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../pages/Utilities */ "./src/settings/pages/Utilities.jsx"); |
| 1281 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1282 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__); |
| 1283 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 1284 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); |
| 1285 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1286 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__); |
| 1287 |
|
| 1288 |
|
| 1289 |
|
| 1290 |
|
| 1291 |
|
| 1292 |
|
| 1293 |
|
| 1294 |
|
| 1295 |
|
| 1296 |
|
| 1297 |
|
| 1298 |
const { |
| 1299 |
__ |
| 1300 |
} = wp.i18n; |
| 1301 |
function SettingsPage() { |
| 1302 |
const [activeItem, setActiveItem] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_8__.useState)('/'); |
| 1303 |
const [initialSet, setInitialSet] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_8__.useState)(false); |
| 1304 |
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_8__.useEffect)(() => { |
| 1305 |
if (!initialSet) { |
| 1306 |
setActiveItem('/'); |
| 1307 |
setInitialSet(true); |
| 1308 |
} |
| 1309 |
}); |
| 1310 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", { |
| 1311 |
className: 'plugin-settings-container', |
| 1312 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorProvider, { |
| 1313 |
initialPath: "/", |
| 1314 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Flex, { |
| 1315 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.FlexItem, { |
| 1316 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Card, { |
| 1317 |
className: 'plugin-nav', |
| 1318 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", { |
| 1319 |
className: 'plugin-logo', |
| 1320 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("img", { |
| 1321 |
alt: "Logo", |
| 1322 |
src: options.logo |
| 1323 |
}) |
| 1324 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("p", { |
| 1325 |
children: ["Version: ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("b", { |
| 1326 |
children: options.version |
| 1327 |
})] |
| 1328 |
}), !options.is_pro && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", { |
| 1329 |
className: 'save-settings', |
| 1330 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { |
| 1331 |
href: "https://passster.com/#pricing", |
| 1332 |
target: "_blank", |
| 1333 |
variant: "primary", |
| 1334 |
children: __('Passster PRO', 'content-protector') |
| 1335 |
}) |
| 1336 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.CardBody, { |
| 1337 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorButton, { |
| 1338 |
onClick: () => setActiveItem('/'), |
| 1339 |
className: activeItem === '/' ? 'is-active-item' : '', |
| 1340 |
path: "/", |
| 1341 |
children: __('General', 'content-protector') |
| 1342 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorButton, { |
| 1343 |
onClick: () => setActiveItem('/design-settings'), |
| 1344 |
className: activeItem === '/design-settings' ? 'is-active-item' : '', |
| 1345 |
path: "/design-settings", |
| 1346 |
children: __('Design', 'content-protector') |
| 1347 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorButton, { |
| 1348 |
onClick: () => setActiveItem('/advanced-settings'), |
| 1349 |
className: activeItem === '/advanced-settings' ? 'is-active-item' : '', |
| 1350 |
path: "/advanced-settings", |
| 1351 |
children: __('Advanced', 'content-protector') |
| 1352 |
})] |
| 1353 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.CardDivider, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.CardBody, { |
| 1354 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorButton, { |
| 1355 |
onClick: () => setActiveItem('/global-protection'), |
| 1356 |
className: activeItem === '/global-protection' ? 'is-active-item' : '', |
| 1357 |
path: "/global-protection", |
| 1358 |
children: __('Global Protection', 'content-protector') |
| 1359 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorButton, { |
| 1360 |
onClick: () => setActiveItem('/woo-integration'), |
| 1361 |
className: activeItem === '/woo-integration' ? 'is-active-item' : '', |
| 1362 |
path: "/woo-integration", |
| 1363 |
children: __('WooCommerce Integration', 'content-protector') |
| 1364 |
})] |
| 1365 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.CardDivider, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.CardBody, { |
| 1366 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorButton, { |
| 1367 |
onClick: () => setActiveItem('/external-settings'), |
| 1368 |
className: activeItem === '/external-settings' ? 'is-active-item' : '', |
| 1369 |
path: "/external-settings", |
| 1370 |
children: __('External Services', 'content-protector') |
| 1371 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorButton, { |
| 1372 |
onClick: () => setActiveItem('/system-status'), |
| 1373 |
className: activeItem === '/system-status' ? 'is-active-item' : '', |
| 1374 |
path: "/system-status", |
| 1375 |
children: __('System Status', 'content-protector') |
| 1376 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorButton, { |
| 1377 |
onClick: () => setActiveItem('/utilities'), |
| 1378 |
className: activeItem === '/utilities' ? 'is-active-item' : '', |
| 1379 |
path: "/utilities", |
| 1380 |
children: __('Utilities', 'content-protector') |
| 1381 |
})] |
| 1382 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.CardDivider, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.CardBody, { |
| 1383 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { |
| 1384 |
href: "https://patrickposner.dev/passster/docs/", |
| 1385 |
target: "_blank", |
| 1386 |
children: [__('Documentation', 'content-protector'), " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("small", { |
| 1387 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Dashicon, { |
| 1388 |
icon: "admin-links" |
| 1389 |
}) |
| 1390 |
})] |
| 1391 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { |
| 1392 |
href: "https://patrickposner.dev/passster/changelogs/", |
| 1393 |
target: "_blank", |
| 1394 |
children: [__('Changelog', 'content-protector'), " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("small", { |
| 1395 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Dashicon, { |
| 1396 |
icon: "admin-links" |
| 1397 |
}) |
| 1398 |
})] |
| 1399 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { |
| 1400 |
href: "https://passster.com/#free-vs-pro", |
| 1401 |
target: "_blank", |
| 1402 |
style: { |
| 1403 |
color: '#6804cc' |
| 1404 |
}, |
| 1405 |
children: [__('Lite vs. Pro', 'content-protector'), " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("small", { |
| 1406 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Dashicon, { |
| 1407 |
icon: "admin-links" |
| 1408 |
}) |
| 1409 |
})] |
| 1410 |
})] |
| 1411 |
})] |
| 1412 |
}) |
| 1413 |
}), activeItem === '/' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.FlexItem, { |
| 1414 |
isBlock: true, |
| 1415 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorScreen, { |
| 1416 |
path: "/", |
| 1417 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", { |
| 1418 |
className: 'plugin-settings', |
| 1419 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_pages_GeneralSettings__WEBPACK_IMPORTED_MODULE_0__["default"], {}) |
| 1420 |
}) |
| 1421 |
}) |
| 1422 |
}), activeItem === '/design-settings' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.FlexItem, { |
| 1423 |
isBlock: true, |
| 1424 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorScreen, { |
| 1425 |
path: "/design-settings", |
| 1426 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", { |
| 1427 |
className: 'plugin-settings', |
| 1428 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_pages_DesignSettings__WEBPACK_IMPORTED_MODULE_1__["default"], {}) |
| 1429 |
}) |
| 1430 |
}) |
| 1431 |
}), activeItem === '/global-protection' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.FlexItem, { |
| 1432 |
isBlock: true, |
| 1433 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorScreen, { |
| 1434 |
path: "/global-protection", |
| 1435 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", { |
| 1436 |
className: 'plugin-settings', |
| 1437 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_pages_GlobalProtectionSettings__WEBPACK_IMPORTED_MODULE_2__["default"], {}) |
| 1438 |
}) |
| 1439 |
}) |
| 1440 |
}), activeItem === '/woo-integration' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.FlexItem, { |
| 1441 |
isBlock: true, |
| 1442 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorScreen, { |
| 1443 |
path: "/woo-integration", |
| 1444 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", { |
| 1445 |
className: 'plugin-settings', |
| 1446 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_pages_WooIntegrationSettings__WEBPACK_IMPORTED_MODULE_3__["default"], {}) |
| 1447 |
}) |
| 1448 |
}) |
| 1449 |
}), activeItem === '/advanced-settings' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.FlexItem, { |
| 1450 |
isBlock: true, |
| 1451 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorScreen, { |
| 1452 |
path: "/advanced-settings", |
| 1453 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", { |
| 1454 |
className: 'plugin-settings', |
| 1455 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_pages_AdvancedSettings__WEBPACK_IMPORTED_MODULE_4__["default"], {}) |
| 1456 |
}) |
| 1457 |
}) |
| 1458 |
}), activeItem === '/external-settings' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.FlexItem, { |
| 1459 |
isBlock: true, |
| 1460 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorScreen, { |
| 1461 |
path: "/external-settings", |
| 1462 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", { |
| 1463 |
className: 'plugin-settings', |
| 1464 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_pages_ExternalSettings__WEBPACK_IMPORTED_MODULE_5__["default"], {}) |
| 1465 |
}) |
| 1466 |
}) |
| 1467 |
}), activeItem === '/system-status' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.FlexItem, { |
| 1468 |
isBlock: true, |
| 1469 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorScreen, { |
| 1470 |
path: "/system-status", |
| 1471 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", { |
| 1472 |
className: 'plugin-settings', |
| 1473 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_pages_SystemStatus__WEBPACK_IMPORTED_MODULE_6__["default"], {}) |
| 1474 |
}) |
| 1475 |
}) |
| 1476 |
}), activeItem === '/utilities' && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.FlexItem, { |
| 1477 |
isBlock: true, |
| 1478 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalNavigatorScreen, { |
| 1479 |
path: "/utilities", |
| 1480 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("div", { |
| 1481 |
className: 'plugin-settings', |
| 1482 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_pages_Utilities__WEBPACK_IMPORTED_MODULE_7__["default"], {}) |
| 1483 |
}) |
| 1484 |
}) |
| 1485 |
})] |
| 1486 |
}) |
| 1487 |
}) |
| 1488 |
}); |
| 1489 |
} |
| 1490 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SettingsPage); |
| 1491 |
|
| 1492 |
/***/ }), |
| 1493 |
|
| 1494 |
/***/ "./src/settings/context/SettingsContext.jsx": |
| 1495 |
/*!**************************************************!*\ |
| 1496 |
!*** ./src/settings/context/SettingsContext.jsx ***! |
| 1497 |
\**************************************************/ |
| 1498 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1499 |
|
| 1500 |
"use strict"; |
| 1501 |
__webpack_require__.r(__webpack_exports__); |
| 1502 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1503 |
/* harmony export */ SettingsContext: () => (/* binding */ SettingsContext), |
| 1504 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 1505 |
/* harmony export */ }); |
| 1506 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1507 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 1508 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); |
| 1509 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__); |
| 1510 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1511 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); |
| 1512 |
|
| 1513 |
|
| 1514 |
|
| 1515 |
const { |
| 1516 |
__ |
| 1517 |
} = wp.i18n; |
| 1518 |
const SettingsContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)(); |
| 1519 |
function SettingsContextProvider(props) { |
| 1520 |
const defaultSettings = { |
| 1521 |
headline: __('Protected Area', 'content-protector'), |
| 1522 |
instruction: __('This content is password-protected. Please verify with a password to unlock the content.', 'content-protector'), |
| 1523 |
placeholder: __('Enter your password..', 'content-protector'), |
| 1524 |
error: __('Sorry, there was an error.', 'content-protector'), |
| 1525 |
button_label: __('Unlock', 'content-protector'), |
| 1526 |
password_length: 6, |
| 1527 |
include_uppercase: false, |
| 1528 |
include_numbers: false, |
| 1529 |
show_password: false, |
| 1530 |
form_max_width: "600px", |
| 1531 |
center_form: false, |
| 1532 |
form_background_color: '#FAFAFA', |
| 1533 |
form_margin: { |
| 1534 |
top: '0', |
| 1535 |
left: '0', |
| 1536 |
right: '0', |
| 1537 |
bottom: '0' |
| 1538 |
}, |
| 1539 |
form_padding: { |
| 1540 |
top: '10px', |
| 1541 |
left: '30px', |
| 1542 |
right: '30px', |
| 1543 |
bottom: '30px' |
| 1544 |
}, |
| 1545 |
form_border_radius: 0, |
| 1546 |
headline_font_color: '#6804cc', |
| 1547 |
headline_font_size: 24, |
| 1548 |
headline_font_weight: 500, |
| 1549 |
instruction_font_color: '#000', |
| 1550 |
instruction_font_size: 16, |
| 1551 |
instruction_font_weight: '300', |
| 1552 |
button_background_color: '#6804cc', |
| 1553 |
button_font_color: '#fff', |
| 1554 |
button_background_color_hover: '#000', |
| 1555 |
button_font_color_hover: '#fff', |
| 1556 |
button_margin: { |
| 1557 |
top: '0', |
| 1558 |
left: '0', |
| 1559 |
right: '0', |
| 1560 |
bottom: '0' |
| 1561 |
}, |
| 1562 |
button_padding: { |
| 1563 |
top: '10px', |
| 1564 |
left: '10px', |
| 1565 |
right: '10px', |
| 1566 |
bottom: '10px' |
| 1567 |
}, |
| 1568 |
button_border_radius: 0, |
| 1569 |
button_font_size: 16, |
| 1570 |
button_font_weight: '300', |
| 1571 |
unlock_mode: false, |
| 1572 |
disable_cookie: false, |
| 1573 |
cookie_duration: 2, |
| 1574 |
cookie_duration_unit: 'days', |
| 1575 |
third_party_shortcodes: '', |
| 1576 |
use_concurrent: false, |
| 1577 |
number_of_concurrents: 1, |
| 1578 |
track_ip: false, |
| 1579 |
recaptcha_version: 'v3', |
| 1580 |
recaptcha_site_key: '', |
| 1581 |
recaptcha_secret: '', |
| 1582 |
recaptcha_language: 'en', |
| 1583 |
bitly_token: '' |
| 1584 |
}; |
| 1585 |
const [settingsSaved, setSettingsSaved] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); |
| 1586 |
const [settings, setSettings] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultSettings); |
| 1587 |
const [configs, setConfigs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); |
| 1588 |
const getSettings = () => { |
| 1589 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ |
| 1590 |
path: '/passster/v1/settings' |
| 1591 |
}).then(options => { |
| 1592 |
setSettings(options); |
| 1593 |
}); |
| 1594 |
}; |
| 1595 |
const saveSettings = () => { |
| 1596 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ |
| 1597 |
path: '/passster/v1/settings', |
| 1598 |
method: 'POST', |
| 1599 |
data: settings |
| 1600 |
}); |
| 1601 |
}; |
| 1602 |
const resetSettings = () => { |
| 1603 |
setSettings(defaultSettings); |
| 1604 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ |
| 1605 |
path: '/passster/v1/settings', |
| 1606 |
method: 'POST', |
| 1607 |
data: defaultSettings |
| 1608 |
}); |
| 1609 |
}; |
| 1610 |
const resetConcurrent = () => { |
| 1611 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ |
| 1612 |
path: '/passster/v1/reset-concurrent', |
| 1613 |
method: 'POST', |
| 1614 |
reset: true |
| 1615 |
}); |
| 1616 |
}; |
| 1617 |
const migrateSettings = () => { |
| 1618 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ |
| 1619 |
path: '/passster/v1/migrate', |
| 1620 |
method: 'POST', |
| 1621 |
migrate: true |
| 1622 |
}); |
| 1623 |
}; |
| 1624 |
const importSettings = newSettings => { |
| 1625 |
setSettings(newSettings); |
| 1626 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ |
| 1627 |
path: '/passster/v1/settings', |
| 1628 |
method: 'POST', |
| 1629 |
data: newSettings |
| 1630 |
}); |
| 1631 |
}; |
| 1632 |
const updateSetting = (key, value) => { |
| 1633 |
setSettings({ |
| 1634 |
...settings, |
| 1635 |
[key]: value |
| 1636 |
}); |
| 1637 |
}; |
| 1638 |
const getStatus = () => { |
| 1639 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ |
| 1640 |
path: '/passster/v1/system-status' |
| 1641 |
}).then(configs => { |
| 1642 |
setConfigs(configs); |
| 1643 |
}); |
| 1644 |
}; |
| 1645 |
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { |
| 1646 |
getSettings(); |
| 1647 |
getStatus(); |
| 1648 |
}, []); |
| 1649 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(SettingsContext.Provider, { |
| 1650 |
value: { |
| 1651 |
settings, |
| 1652 |
configs, |
| 1653 |
settingsSaved, |
| 1654 |
setSettingsSaved, |
| 1655 |
updateSetting, |
| 1656 |
setSettings, |
| 1657 |
saveSettings, |
| 1658 |
resetSettings, |
| 1659 |
importSettings, |
| 1660 |
resetConcurrent, |
| 1661 |
migrateSettings |
| 1662 |
}, |
| 1663 |
children: props.children |
| 1664 |
}); |
| 1665 |
} |
| 1666 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SettingsContextProvider); |
| 1667 |
|
| 1668 |
/***/ }), |
| 1669 |
|
| 1670 |
/***/ "./src/settings/pages/AdvancedSettings.jsx": |
| 1671 |
/*!*************************************************!*\ |
| 1672 |
!*** ./src/settings/pages/AdvancedSettings.jsx ***! |
| 1673 |
\*************************************************/ |
| 1674 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1675 |
|
| 1676 |
"use strict"; |
| 1677 |
__webpack_require__.r(__webpack_exports__); |
| 1678 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1679 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 1680 |
/* harmony export */ }); |
| 1681 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 1682 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); |
| 1683 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1684 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 1685 |
/* harmony import */ var _context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/SettingsContext */ "./src/settings/context/SettingsContext.jsx"); |
| 1686 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1687 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 1688 |
|
| 1689 |
|
| 1690 |
|
| 1691 |
|
| 1692 |
const { |
| 1693 |
__ |
| 1694 |
} = wp.i18n; |
| 1695 |
function AdvancedSettings() { |
| 1696 |
const { |
| 1697 |
settings, |
| 1698 |
updateSetting, |
| 1699 |
saveSettings, |
| 1700 |
settingsSaved, |
| 1701 |
setSettingsSaved, |
| 1702 |
resetConcurrent |
| 1703 |
} = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__.SettingsContext); |
| 1704 |
const [unlockMode, setUnlockMode] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 1705 |
const [disableCookie, setDisableCookie] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 1706 |
const [useConcurrent, setUseConcurrent] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 1707 |
const [isConcurrentReset, setIsConcurrentReset] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 1708 |
const [trackIp, setTrackIp] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 1709 |
const setSavingSettings = () => { |
| 1710 |
saveSettings(); |
| 1711 |
setSettingsSaved(true); |
| 1712 |
setTimeout(function () { |
| 1713 |
setSettingsSaved(false); |
| 1714 |
}, 2000); |
| 1715 |
}; |
| 1716 |
const runResetConcurrent = () => { |
| 1717 |
setIsConcurrentReset(true); |
| 1718 |
resetConcurrent(); |
| 1719 |
setTimeout(function () { |
| 1720 |
setIsConcurrentReset(false); |
| 1721 |
}, 2000); |
| 1722 |
}; |
| 1723 |
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { |
| 1724 |
if (settings.unlock_mode) { |
| 1725 |
setUnlockMode(settings.unlock_mode); |
| 1726 |
} |
| 1727 |
if (settings.disable_cookie) { |
| 1728 |
setDisableCookie(settings.disable_cookie); |
| 1729 |
} |
| 1730 |
if (settings.use_concurrent) { |
| 1731 |
setUseConcurrent(settings.use_concurrent); |
| 1732 |
} |
| 1733 |
if (settings.track_ip) { |
| 1734 |
setTrackIp(settings.track_ip); |
| 1735 |
} |
| 1736 |
}, [settings]); |
| 1737 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", { |
| 1738 |
className: "inner-settings", |
| 1739 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 1740 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 1741 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 1742 |
children: __('Usage Mode', 'content-protector') |
| 1743 |
}) |
| 1744 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 1745 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 1746 |
label: __('Use Ajax', 'content-protector'), |
| 1747 |
help: unlockMode ? __('You are using Ajax for unlocking content. Make sure to add any shortcodes of a page into the Third-Party-Shortcodes setting.', 'content-protector') : __('Unlock content with Ajax (no reload). It is not recommended for entire pages or when using a Third-Party Page Builder.', 'content-protector'), |
| 1748 |
checked: unlockMode, |
| 1749 |
onChange: value => { |
| 1750 |
setUnlockMode(value); |
| 1751 |
updateSetting("unlock_mode", value); |
| 1752 |
} |
| 1753 |
}), unlockMode && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 1754 |
label: __('Disable Cookie', 'content-protector'), |
| 1755 |
help: disableCookie ? __('Each time a user visits the protected content it needs to be unlocked again.', 'content-protector') : __('The password is stored in a cookie. Next time the content is unlocked automatically.', 'content-protector'), |
| 1756 |
checked: disableCookie, |
| 1757 |
onChange: value => { |
| 1758 |
setDisableCookie(value); |
| 1759 |
updateSetting("disable_cookie", value); |
| 1760 |
} |
| 1761 |
}), !disableCookie && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, { |
| 1762 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 1763 |
label: __('Cookie Lifetime', 'content-protector'), |
| 1764 |
help: __('The lifetime of your cookie is based on this number and the lifetime unit below. Once a cookie expires, the user will need to enter the password again.', 'content-protector'), |
| 1765 |
type: 'number', |
| 1766 |
value: settings.cookie_duration, |
| 1767 |
onChange: value => { |
| 1768 |
updateSetting("cookie_duration", value); |
| 1769 |
} |
| 1770 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { |
| 1771 |
label: __('Cookie Lifetime Unit', 'content-protector'), |
| 1772 |
value: settings.cookie_duration_unit, |
| 1773 |
options: [{ |
| 1774 |
label: __('Days', 'content-protector'), |
| 1775 |
value: 'days' |
| 1776 |
}, { |
| 1777 |
label: __('Hours', 'content-protector'), |
| 1778 |
value: 'hours' |
| 1779 |
}, { |
| 1780 |
label: __('Minutes', 'content-protector'), |
| 1781 |
value: 'minutes' |
| 1782 |
}], |
| 1783 |
onChange: value => { |
| 1784 |
updateSetting("cookie_duration_unit", value); |
| 1785 |
} |
| 1786 |
})] |
| 1787 |
}), unlockMode && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextareaControl, { |
| 1788 |
label: __('Third-Party-Shortcodes', 'content-protector'), |
| 1789 |
help: __('Add a comma separated list of shortcodes you want to use inside of Passster. You can also use {post-id} to add the ID of the current page/post dynamically. ', 'content-protector'), |
| 1790 |
value: settings.third_party_shortcodes, |
| 1791 |
onChange: value => { |
| 1792 |
updateSetting("third_party_shortcodes", value); |
| 1793 |
} |
| 1794 |
})] |
| 1795 |
})] |
| 1796 |
}), options.is_pro && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, { |
| 1797 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 1798 |
margin: 5 |
| 1799 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 1800 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 1801 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 1802 |
children: __('Concurrent Usage', 'content-protector') |
| 1803 |
}) |
| 1804 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 1805 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 1806 |
label: __('Track Concurrent Usage', 'content-protector'), |
| 1807 |
help: useConcurrent ? __('Track and prevent concurrent usage of the same password.', 'content-protector') : __('Do not track concurrent usages. A password can be used without any limitations to unlock your content.', 'content-protector'), |
| 1808 |
checked: useConcurrent, |
| 1809 |
onChange: value => { |
| 1810 |
setUseConcurrent(value); |
| 1811 |
updateSetting("use_concurrent", value); |
| 1812 |
} |
| 1813 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 1814 |
label: __('Number of Allowed Concurrent Usages', 'content-protector'), |
| 1815 |
help: __('Limit the number of logins with one password at the same time. It will create a custom database table to track the usage of the passwords. It uses the current IP of the user to recognize them. You can use the shortcode [passster-logout] to handle the logout.', 'content-protector'), |
| 1816 |
value: settings.number_of_concurrents, |
| 1817 |
type: 'number', |
| 1818 |
onChange: value => { |
| 1819 |
updateSetting("number_of_concurrents", value); |
| 1820 |
} |
| 1821 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 1822 |
onClick: runResetConcurrent, |
| 1823 |
variant: "secondary", |
| 1824 |
children: __('Reset Concurrent Data', 'content-protector') |
| 1825 |
}), isConcurrentReset ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, { |
| 1826 |
type: "slide-in", |
| 1827 |
options: { |
| 1828 |
origin: 'top' |
| 1829 |
}, |
| 1830 |
children: () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Notice, { |
| 1831 |
status: "success", |
| 1832 |
isDismissible: false, |
| 1833 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 1834 |
children: __('Concurrent data resetted successfully.', 'content-protector') |
| 1835 |
}) |
| 1836 |
}) |
| 1837 |
}) : ''] |
| 1838 |
})] |
| 1839 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 1840 |
margin: 5 |
| 1841 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 1842 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 1843 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 1844 |
children: __('Statistics', 'content-protector') |
| 1845 |
}) |
| 1846 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 1847 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 1848 |
label: __('Track IP', 'content-protector'), |
| 1849 |
help: trackIp ? __('Track the IP of the user in statistics.', 'content-protector') : __('Do not track the IP of the user in statistics', 'content-protector'), |
| 1850 |
checked: trackIp, |
| 1851 |
onChange: value => { |
| 1852 |
setTrackIp(value); |
| 1853 |
updateSetting("track_ip", value); |
| 1854 |
} |
| 1855 |
}) |
| 1856 |
})] |
| 1857 |
})] |
| 1858 |
}), !options.is_pro && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, { |
| 1859 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 1860 |
margin: 5 |
| 1861 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 1862 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 1863 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 1864 |
children: __('Concurrent Usage', 'content-protector') |
| 1865 |
}) |
| 1866 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 1867 |
children: [__('Keep track of how often a password is used at the same time to prevent abuse and unallowed sharing.', 'content-protector'), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 1868 |
margin: 10 |
| 1869 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", { |
| 1870 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 1871 |
href: "https://passster.com/#free-vs-pro", |
| 1872 |
target: "_blank", |
| 1873 |
className: "button", |
| 1874 |
style: { |
| 1875 |
marginRight: '10px' |
| 1876 |
}, |
| 1877 |
children: __('Lite vs Pro', 'content-protector') |
| 1878 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 1879 |
href: "https://passster.com/#pricing", |
| 1880 |
target: "_blank", |
| 1881 |
className: "button-primary button", |
| 1882 |
children: __('Get Passster PRO!', 'content-protector') |
| 1883 |
})] |
| 1884 |
})] |
| 1885 |
})] |
| 1886 |
})] |
| 1887 |
}), settingsSaved && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, { |
| 1888 |
type: "slide-in", |
| 1889 |
options: { |
| 1890 |
origin: 'top' |
| 1891 |
}, |
| 1892 |
children: () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Notice, { |
| 1893 |
status: "success", |
| 1894 |
isDismissible: false, |
| 1895 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 1896 |
children: __('Settings saved successfully.', 'content-protector') |
| 1897 |
}) |
| 1898 |
}) |
| 1899 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { |
| 1900 |
className: "save-settings", |
| 1901 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 1902 |
onClick: setSavingSettings, |
| 1903 |
variant: "primary", |
| 1904 |
children: __('Save Settings', 'content-protector') |
| 1905 |
}) |
| 1906 |
})] |
| 1907 |
}); |
| 1908 |
} |
| 1909 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AdvancedSettings); |
| 1910 |
|
| 1911 |
/***/ }), |
| 1912 |
|
| 1913 |
/***/ "./src/settings/pages/DesignSettings.jsx": |
| 1914 |
/*!***********************************************!*\ |
| 1915 |
!*** ./src/settings/pages/DesignSettings.jsx ***! |
| 1916 |
\***********************************************/ |
| 1917 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 1918 |
|
| 1919 |
"use strict"; |
| 1920 |
__webpack_require__.r(__webpack_exports__); |
| 1921 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 1922 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 1923 |
/* harmony export */ }); |
| 1924 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 1925 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); |
| 1926 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 1927 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 1928 |
/* harmony import */ var _context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/SettingsContext */ "./src/settings/context/SettingsContext.jsx"); |
| 1929 |
/* harmony import */ var _components_DimensionControl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/DimensionControl */ "./src/settings/components/DimensionControl.jsx"); |
| 1930 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 1931 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__); |
| 1932 |
|
| 1933 |
|
| 1934 |
|
| 1935 |
|
| 1936 |
|
| 1937 |
const { |
| 1938 |
__ |
| 1939 |
} = wp.i18n; |
| 1940 |
function DesignSettings() { |
| 1941 |
const { |
| 1942 |
settings, |
| 1943 |
updateSetting, |
| 1944 |
saveSettings, |
| 1945 |
settingsSaved, |
| 1946 |
setSettingsSaved |
| 1947 |
} = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__.SettingsContext); |
| 1948 |
const [borderRadius, setBorderRadius] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(parseInt(settings.form_border_radius)); |
| 1949 |
const [buttonBorderRadius, setButtonBorderRadius] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(parseInt(settings.button_border_radius)); |
| 1950 |
const [headlineFontSize, setHeadlineFontSize] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(parseInt(settings.headline_font_size)); |
| 1951 |
const [instructionFontSize, setInstructionFontSize] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(parseInt(settings.instruction_font_size)); |
| 1952 |
const [buttonFontSize, setButtonFontSize] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(settings.button_font_size ? parseInt(settings.button_font_size) : 16); |
| 1953 |
const [headlineFontWeight, setHeadlineFontWeight] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(parseInt(settings.headline_font_weight)); |
| 1954 |
const [instructionFontWeight, setInstructionFontWeight] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(parseInt(settings.instruction_font_weight)); |
| 1955 |
const [buttonFontWeight, setButtonFontWeight] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(parseInt(settings.button_font_weight)); |
| 1956 |
const [showPassword, setShowPassword] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 1957 |
const [hideHeadline, setHideHeadline] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 1958 |
const [centerForm, setCenterForm] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 1959 |
const [buttonState, setButtonState] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 1960 |
const [isOpenSections, setIsOpenSections] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ |
| 1961 |
form: true, |
| 1962 |
spacing: true, |
| 1963 |
instruction: true, |
| 1964 |
button: true |
| 1965 |
}); |
| 1966 |
const toggleSection = section => { |
| 1967 |
setIsOpenSections(prevState => ({ |
| 1968 |
...prevState, |
| 1969 |
[section]: !prevState[section] |
| 1970 |
})); |
| 1971 |
}; |
| 1972 |
const instructionFallbackFontSize = 16; |
| 1973 |
const buttonFallbackFontSize = 14; |
| 1974 |
const fallbackFontSize = 24; |
| 1975 |
const fontColors = [{ |
| 1976 |
name: 'passster', |
| 1977 |
color: '#6804cc' |
| 1978 |
}, { |
| 1979 |
name: 'white', |
| 1980 |
color: '#fff' |
| 1981 |
}, { |
| 1982 |
name: 'black', |
| 1983 |
color: '#000' |
| 1984 |
}]; |
| 1985 |
const backgroundColors = [{ |
| 1986 |
name: 'passster', |
| 1987 |
color: '#6804cc' |
| 1988 |
}, { |
| 1989 |
name: 'light-grey', |
| 1990 |
color: '#FAFAFA' |
| 1991 |
}, { |
| 1992 |
name: 'black', |
| 1993 |
color: '#000' |
| 1994 |
}]; |
| 1995 |
const [formPadding, setFormPadding] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ |
| 1996 |
top: '10px', |
| 1997 |
left: '30px', |
| 1998 |
right: '30px', |
| 1999 |
bottom: '30px' |
| 2000 |
}); |
| 2001 |
const [formMargin, setFormMargin] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ |
| 2002 |
top: '0', |
| 2003 |
left: '0', |
| 2004 |
right: '0', |
| 2005 |
bottom: '0' |
| 2006 |
}); |
| 2007 |
const [buttonPadding, setButtonPadding] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ |
| 2008 |
top: '10px', |
| 2009 |
left: '10px', |
| 2010 |
right: '10px', |
| 2011 |
bottom: '10px' |
| 2012 |
}); |
| 2013 |
const [buttonMargin, setButtonMargin] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ |
| 2014 |
top: '0', |
| 2015 |
left: '0', |
| 2016 |
right: '0', |
| 2017 |
bottom: '0' |
| 2018 |
}); |
| 2019 |
const fontSizes = [{ |
| 2020 |
name: __('Small'), |
| 2021 |
slug: 'small', |
| 2022 |
size: 12 |
| 2023 |
}, { |
| 2024 |
name: __('Medium'), |
| 2025 |
slug: 'medium', |
| 2026 |
size: 16 |
| 2027 |
}, { |
| 2028 |
name: __('Big'), |
| 2029 |
slug: 'big', |
| 2030 |
size: 24 |
| 2031 |
}]; |
| 2032 |
const setSavingSettings = () => { |
| 2033 |
saveSettings(); |
| 2034 |
setSettingsSaved(true); |
| 2035 |
setTimeout(function () { |
| 2036 |
setSettingsSaved(false); |
| 2037 |
}, 2000); |
| 2038 |
}; |
| 2039 |
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { |
| 2040 |
if (settings.show_password) { |
| 2041 |
setShowPassword(settings.show_password); |
| 2042 |
} |
| 2043 |
if (settings.center_form) { |
| 2044 |
setCenterForm(settings.center_form); |
| 2045 |
} |
| 2046 |
if (settings.form_margin) { |
| 2047 |
setFormMargin(settings.form_margin); |
| 2048 |
} |
| 2049 |
if (settings.form_padding) { |
| 2050 |
setFormPadding(settings.form_padding); |
| 2051 |
} |
| 2052 |
if (settings.button_margin) { |
| 2053 |
setButtonMargin(settings.button_margin); |
| 2054 |
} |
| 2055 |
if (settings.button_padding) { |
| 2056 |
setButtonPadding(settings.button_padding); |
| 2057 |
} |
| 2058 |
}, [settings]); |
| 2059 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", { |
| 2060 |
className: 'inner-settings', |
| 2061 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 2062 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 2063 |
onClick: () => toggleSection('form'), |
| 2064 |
className: "header_collapse", |
| 2065 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2066 |
children: __('Form', 'content-protector') |
| 2067 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2068 |
children: isOpenSections.form ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2069 |
className: "dashicons dashicons-arrow-up-alt2" |
| 2070 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2071 |
className: "dashicons dashicons-arrow-down-alt2" |
| 2072 |
}) |
| 2073 |
})] |
| 2074 |
}), isOpenSections.form && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 2075 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_DimensionControl__WEBPACK_IMPORTED_MODULE_3__["default"], { |
| 2076 |
label: __('Form width', 'ollie-blocks'), |
| 2077 |
value: settings.form_max_width, |
| 2078 |
onChange: value => { |
| 2079 |
updateSetting('form_max_width', value); |
| 2080 |
} |
| 2081 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2082 |
margin: 5 |
| 2083 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2084 |
className: 'formatted-label', |
| 2085 |
children: __('Form position', 'content-protector') |
| 2086 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 2087 |
label: __('Center Form', 'content-protector'), |
| 2088 |
help: centerForm ? __('Center the password form in the middle of the page.', 'content-protector') : __('Do not center the password form.', 'content-protector'), |
| 2089 |
checked: centerForm, |
| 2090 |
onChange: value => { |
| 2091 |
setCenterForm(value); |
| 2092 |
updateSetting('center_form', value); |
| 2093 |
} |
| 2094 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2095 |
margin: 5 |
| 2096 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2097 |
className: 'formatted-label', |
| 2098 |
children: __('Background Color', 'content-protector') |
| 2099 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2100 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ColorPalette, { |
| 2101 |
colors: backgroundColors, |
| 2102 |
value: settings.form_background_color, |
| 2103 |
onChange: value => { |
| 2104 |
updateSetting('form_background_color', value); |
| 2105 |
} |
| 2106 |
}) |
| 2107 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2108 |
className: 'formatted-label', |
| 2109 |
children: __('Spacing Controls', 'content-protector') |
| 2110 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Flex, { |
| 2111 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexBlock, { |
| 2112 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalBoxControl, { |
| 2113 |
label: __('Margin', 'content-protector'), |
| 2114 |
values: formMargin, |
| 2115 |
help: __('Margin is the space around an element. The higher the value the more space is around the password form.', 'content-protector'), |
| 2116 |
onChange: value => { |
| 2117 |
setFormMargin(value); |
| 2118 |
updateSetting('form_margin', value); |
| 2119 |
} |
| 2120 |
}) |
| 2121 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexBlock, { |
| 2122 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalBoxControl, { |
| 2123 |
label: __('Padding', 'content-protector'), |
| 2124 |
values: formPadding, |
| 2125 |
help: __('Padding is the space between an element and its content. The higher the value the more space is inside the password form.', 'content-protector'), |
| 2126 |
onChange: value => { |
| 2127 |
setFormPadding(value); |
| 2128 |
updateSetting('form_padding', value); |
| 2129 |
} |
| 2130 |
}) |
| 2131 |
})] |
| 2132 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2133 |
margin: 5 |
| 2134 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.RangeControl, { |
| 2135 |
label: __('Border Radius', 'content-protector'), |
| 2136 |
value: borderRadius, |
| 2137 |
onChange: value => { |
| 2138 |
setBorderRadius(value); |
| 2139 |
updateSetting('form_border_radius', value); |
| 2140 |
}, |
| 2141 |
help: __('The higher the border radius the more rounded are the corners of the form.', 'content-protector'), |
| 2142 |
min: 0, |
| 2143 |
max: 100 |
| 2144 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2145 |
margin: 5 |
| 2146 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 2147 |
label: __('Show Password', 'content-protector'), |
| 2148 |
help: showPassword ? __('Add a checkbox to show the password before submitting.', 'content-protector') : __('Do not add a checkbox to view the password', 'content-protector'), |
| 2149 |
checked: showPassword, |
| 2150 |
onChange: value => { |
| 2151 |
setShowPassword(value); |
| 2152 |
updateSetting('show_password', value); |
| 2153 |
} |
| 2154 |
})] |
| 2155 |
})] |
| 2156 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2157 |
margin: 5 |
| 2158 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 2159 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 2160 |
onClick: () => toggleSection('spacing'), |
| 2161 |
className: "header_collapse", |
| 2162 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2163 |
children: __('Headline', 'content-protector') |
| 2164 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2165 |
children: isOpenSections.spacing ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2166 |
className: "dashicons dashicons-arrow-up-alt2" |
| 2167 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2168 |
className: "dashicons dashicons-arrow-down-alt2" |
| 2169 |
}) |
| 2170 |
})] |
| 2171 |
}), isOpenSections.spacing && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 2172 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2173 |
className: 'formatted-label', |
| 2174 |
children: __('Font Controls', 'content-protector') |
| 2175 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2176 |
margin: 5 |
| 2177 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2178 |
className: 'formatted-label', |
| 2179 |
children: __('Color', 'content-protector') |
| 2180 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2181 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ColorPalette, { |
| 2182 |
colors: fontColors, |
| 2183 |
value: settings.headline_font_color, |
| 2184 |
onChange: value => { |
| 2185 |
updateSetting('headline_font_color', value); |
| 2186 |
} |
| 2187 |
}) |
| 2188 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FontSizePicker, { |
| 2189 |
fontSizes: fontSizes, |
| 2190 |
value: headlineFontSize, |
| 2191 |
fallbackFontSize: fallbackFontSize, |
| 2192 |
onChange: value => { |
| 2193 |
setHeadlineFontSize(value); |
| 2194 |
updateSetting('headline_font_size', value); |
| 2195 |
} |
| 2196 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2197 |
margin: 5 |
| 2198 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.RangeControl, { |
| 2199 |
label: __('Font weight', 'content-protector'), |
| 2200 |
value: headlineFontWeight, |
| 2201 |
onChange: value => { |
| 2202 |
setHeadlineFontWeight(value); |
| 2203 |
updateSetting('headline_font_weight', value); |
| 2204 |
}, |
| 2205 |
min: 100, |
| 2206 |
step: 100, |
| 2207 |
max: 700 |
| 2208 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2209 |
margin: 5 |
| 2210 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 2211 |
label: __('Hide Headline', 'content-protector'), |
| 2212 |
help: hideHeadline ? __('The password form will be shown without the headline', 'content-protector') : __('The password form will include the headline', 'content-protector'), |
| 2213 |
checked: hideHeadline, |
| 2214 |
onChange: value => { |
| 2215 |
setHideHeadline(value); |
| 2216 |
updateSetting('hide_headline', value); |
| 2217 |
} |
| 2218 |
})] |
| 2219 |
})] |
| 2220 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2221 |
margin: 5 |
| 2222 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 2223 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 2224 |
onClick: () => toggleSection('instruction'), |
| 2225 |
className: "header_collapse", |
| 2226 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2227 |
children: __('Instruction', 'content-protector') |
| 2228 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2229 |
children: isOpenSections.instruction ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2230 |
className: "dashicons dashicons-arrow-up-alt2" |
| 2231 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2232 |
className: "dashicons dashicons-arrow-down-alt2" |
| 2233 |
}) |
| 2234 |
})] |
| 2235 |
}), isOpenSections.instruction && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 2236 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2237 |
className: 'formatted-label', |
| 2238 |
children: __('Font Controls', 'content-protector') |
| 2239 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2240 |
margin: 5 |
| 2241 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2242 |
className: 'formatted-label', |
| 2243 |
children: __('Color', 'content-protector') |
| 2244 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2245 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ColorPalette, { |
| 2246 |
colors: fontColors, |
| 2247 |
value: settings.instruction_font_color, |
| 2248 |
onChange: value => { |
| 2249 |
updateSetting('instruction_font_color', value); |
| 2250 |
} |
| 2251 |
}) |
| 2252 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FontSizePicker, { |
| 2253 |
fontSizes: fontSizes, |
| 2254 |
value: instructionFontSize, |
| 2255 |
fallbackFontSize: instructionFallbackFontSize, |
| 2256 |
onChange: value => { |
| 2257 |
setInstructionFontSize(value); |
| 2258 |
updateSetting('instruction_font_size', value); |
| 2259 |
} |
| 2260 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2261 |
margin: 5 |
| 2262 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.RangeControl, { |
| 2263 |
label: __('Font weight', 'content-protector'), |
| 2264 |
value: instructionFontWeight, |
| 2265 |
onChange: value => { |
| 2266 |
setInstructionFontWeight(value); |
| 2267 |
updateSetting('instruction_font_weight', value); |
| 2268 |
}, |
| 2269 |
min: 100, |
| 2270 |
step: 100, |
| 2271 |
max: 700 |
| 2272 |
})] |
| 2273 |
})] |
| 2274 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2275 |
margin: 5 |
| 2276 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 2277 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 2278 |
onClick: () => toggleSection('button'), |
| 2279 |
className: "header_collapse", |
| 2280 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2281 |
children: __('Button', 'content-protector') |
| 2282 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2283 |
children: isOpenSections.button ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2284 |
className: "dashicons dashicons-arrow-up-alt2" |
| 2285 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2286 |
className: "dashicons dashicons-arrow-down-alt2" |
| 2287 |
}) |
| 2288 |
})] |
| 2289 |
}), isOpenSections.button && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 2290 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2291 |
className: 'formatted-label', |
| 2292 |
children: __('Color Controls', 'content-protector') |
| 2293 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2294 |
margin: 5 |
| 2295 |
}), buttonState ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, { |
| 2296 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2297 |
className: 'formatted-label', |
| 2298 |
children: __('Background Color (Hover)', 'content-protector') |
| 2299 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2300 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ColorPalette, { |
| 2301 |
colors: backgroundColors, |
| 2302 |
value: settings.button_background_color_hover, |
| 2303 |
onChange: value => { |
| 2304 |
updateSetting('button_background_color_hover', value); |
| 2305 |
} |
| 2306 |
}) |
| 2307 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2308 |
margin: 5 |
| 2309 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2310 |
className: 'formatted-label', |
| 2311 |
children: __('Font Color (Hover)', 'content-protector') |
| 2312 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2313 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ColorPalette, { |
| 2314 |
colors: fontColors, |
| 2315 |
value: settings.button_font_color_hover, |
| 2316 |
onChange: value => { |
| 2317 |
updateSetting('button_font_color_hover', value); |
| 2318 |
} |
| 2319 |
}) |
| 2320 |
})] |
| 2321 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, { |
| 2322 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2323 |
className: 'formatted-label', |
| 2324 |
children: __('Background Color', 'content-protector') |
| 2325 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2326 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ColorPalette, { |
| 2327 |
colors: backgroundColors, |
| 2328 |
value: settings.button_background_color, |
| 2329 |
onChange: value => { |
| 2330 |
updateSetting('button_background_color', value); |
| 2331 |
} |
| 2332 |
}) |
| 2333 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2334 |
margin: 5 |
| 2335 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2336 |
className: 'formatted-label', |
| 2337 |
children: __('Font Color', 'content-protector') |
| 2338 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", { |
| 2339 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ColorPalette, { |
| 2340 |
colors: fontColors, |
| 2341 |
value: settings.button_font_color, |
| 2342 |
onChange: value => { |
| 2343 |
updateSetting('button_font_color', value); |
| 2344 |
} |
| 2345 |
}) |
| 2346 |
})] |
| 2347 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 2348 |
label: __('Change button State', 'content-protector'), |
| 2349 |
help: buttonState ? __('Set colors (hover)', 'content-protector') : __('Set colors', 'content-protector'), |
| 2350 |
checked: buttonState, |
| 2351 |
onChange: value => { |
| 2352 |
setButtonState(value); |
| 2353 |
} |
| 2354 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2355 |
className: 'formatted-label', |
| 2356 |
children: __('Spacing Controls', 'content-protector') |
| 2357 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Flex, { |
| 2358 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexBlock, { |
| 2359 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalBoxControl, { |
| 2360 |
label: __('Margin', 'content-protector'), |
| 2361 |
values: buttonMargin, |
| 2362 |
help: __('Margin is the space around an element. The higher the value the more space is around the password form.', 'content-protector'), |
| 2363 |
onChange: value => { |
| 2364 |
setButtonMargin(value); |
| 2365 |
updateSetting('button_margin', value); |
| 2366 |
} |
| 2367 |
}) |
| 2368 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexBlock, { |
| 2369 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalBoxControl, { |
| 2370 |
label: __('Padding', 'content-protector'), |
| 2371 |
values: buttonPadding, |
| 2372 |
help: __('Padding is the space between an element and its content. The higher the value the more space is inside the password form.', 'content-protector'), |
| 2373 |
onChange: value => { |
| 2374 |
setButtonPadding(value); |
| 2375 |
updateSetting('button_padding', value); |
| 2376 |
} |
| 2377 |
}) |
| 2378 |
})] |
| 2379 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2380 |
margin: 5 |
| 2381 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.RangeControl, { |
| 2382 |
label: __('Border Radius', 'content-protector'), |
| 2383 |
value: buttonBorderRadius, |
| 2384 |
help: __('The higher the border radius the more rounded are the corners of the button.', 'content-protector'), |
| 2385 |
onChange: value => { |
| 2386 |
setButtonBorderRadius(value); |
| 2387 |
updateSetting('button_border_radius', value); |
| 2388 |
}, |
| 2389 |
min: 0, |
| 2390 |
max: 100 |
| 2391 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2392 |
margin: 5 |
| 2393 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("label", { |
| 2394 |
className: 'formatted-label', |
| 2395 |
children: __('Font Controls', 'content-protector') |
| 2396 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FontSizePicker, { |
| 2397 |
fontSizes: fontSizes, |
| 2398 |
value: buttonFontSize, |
| 2399 |
fallbackFontSize: buttonFallbackFontSize, |
| 2400 |
onChange: value => { |
| 2401 |
setButtonFontSize(value); |
| 2402 |
updateSetting('button_font_size', value); |
| 2403 |
} |
| 2404 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2405 |
margin: 5 |
| 2406 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.RangeControl, { |
| 2407 |
label: __('Font weight', 'content-protector'), |
| 2408 |
value: buttonFontWeight, |
| 2409 |
onChange: value => { |
| 2410 |
setButtonFontWeight(value); |
| 2411 |
updateSetting('button_font_weight', value); |
| 2412 |
}, |
| 2413 |
min: 100, |
| 2414 |
step: 100, |
| 2415 |
max: 700 |
| 2416 |
})] |
| 2417 |
})] |
| 2418 |
}), settingsSaved && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, { |
| 2419 |
type: "slide-in", |
| 2420 |
options: { |
| 2421 |
origin: 'top' |
| 2422 |
}, |
| 2423 |
children: () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Notice, { |
| 2424 |
status: "success", |
| 2425 |
isDismissible: false, |
| 2426 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", { |
| 2427 |
children: __('Settings saved successfully.', 'content-protector') |
| 2428 |
}) |
| 2429 |
}) |
| 2430 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { |
| 2431 |
className: 'save-settings', |
| 2432 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 2433 |
onClick: setSavingSettings, |
| 2434 |
variant: "primary", |
| 2435 |
children: __('Save Settings', 'content-protector') |
| 2436 |
}) |
| 2437 |
})] |
| 2438 |
}); |
| 2439 |
} |
| 2440 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DesignSettings); |
| 2441 |
|
| 2442 |
/***/ }), |
| 2443 |
|
| 2444 |
/***/ "./src/settings/pages/ExternalSettings.jsx": |
| 2445 |
/*!*************************************************!*\ |
| 2446 |
!*** ./src/settings/pages/ExternalSettings.jsx ***! |
| 2447 |
\*************************************************/ |
| 2448 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2449 |
|
| 2450 |
"use strict"; |
| 2451 |
__webpack_require__.r(__webpack_exports__); |
| 2452 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2453 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 2454 |
/* harmony export */ }); |
| 2455 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 2456 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); |
| 2457 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 2458 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 2459 |
/* harmony import */ var _context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/SettingsContext */ "./src/settings/context/SettingsContext.jsx"); |
| 2460 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2461 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 2462 |
|
| 2463 |
|
| 2464 |
|
| 2465 |
|
| 2466 |
const { |
| 2467 |
__ |
| 2468 |
} = wp.i18n; |
| 2469 |
function ExternalSettings() { |
| 2470 |
const { |
| 2471 |
settings, |
| 2472 |
updateSetting, |
| 2473 |
saveSettings, |
| 2474 |
settingsSaved, |
| 2475 |
setSettingsSaved |
| 2476 |
} = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__.SettingsContext); |
| 2477 |
const [recaptchaVersion, setRecaptchaVersion] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)('v3'); |
| 2478 |
const setSavingSettings = () => { |
| 2479 |
saveSettings(); |
| 2480 |
setSettingsSaved(true); |
| 2481 |
setTimeout(function () { |
| 2482 |
setSettingsSaved(false); |
| 2483 |
}, 2000); |
| 2484 |
}; |
| 2485 |
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { |
| 2486 |
if (settings.recaptcha_version) { |
| 2487 |
setRecaptchaVersion(settings.recaptcha_version); |
| 2488 |
} |
| 2489 |
}, [settings]); |
| 2490 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", { |
| 2491 |
className: "inner-settings", |
| 2492 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 2493 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 2494 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 2495 |
children: __('reCAPTCHA', 'content-protector') |
| 2496 |
}) |
| 2497 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 2498 |
children: options.is_pro ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, { |
| 2499 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { |
| 2500 |
label: __('reCAPTCHA Type', 'content-protector'), |
| 2501 |
value: recaptchaVersion, |
| 2502 |
options: [{ |
| 2503 |
label: __('Google reCAPTCHA V2 (Checkbox)', 'content-protector'), |
| 2504 |
value: 'v2' |
| 2505 |
}, { |
| 2506 |
label: __('Google reCAPTCHA V3 (invisible CAPTCHA)', 'content-protector'), |
| 2507 |
value: 'v3' |
| 2508 |
}, { |
| 2509 |
label: __('hCAPTCHA', 'content-protector'), |
| 2510 |
value: 'hcaptcha' |
| 2511 |
}], |
| 2512 |
onChange: value => { |
| 2513 |
setRecaptchaVersion(value); |
| 2514 |
updateSetting("recaptcha_version", value); |
| 2515 |
} |
| 2516 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 2517 |
label: __('Site Key', 'content-protector'), |
| 2518 |
help: __('Add your reCAPTCHA Site Key here.', 'content-protector'), |
| 2519 |
value: settings.recaptcha_site_key, |
| 2520 |
onChange: value => { |
| 2521 |
updateSetting("recaptcha_site_key", value); |
| 2522 |
} |
| 2523 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 2524 |
label: __('Secret', 'content-protector'), |
| 2525 |
help: __('Add your reCAPTCHA Secret here.', 'content-protector'), |
| 2526 |
value: settings.recaptcha_secret, |
| 2527 |
onChange: value => { |
| 2528 |
updateSetting("recaptcha_secret", value); |
| 2529 |
} |
| 2530 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 2531 |
label: __('Language', 'content-protector'), |
| 2532 |
help: __('Add your language here. For example, ‘en’ for English or ‘de’ for German.', 'content-protector'), |
| 2533 |
placeholder: "en", |
| 2534 |
value: settings.recaptcha_language, |
| 2535 |
onChange: value => { |
| 2536 |
updateSetting("recaptcha_language", value); |
| 2537 |
} |
| 2538 |
})] |
| 2539 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("p", { |
| 2540 |
children: [__('reCAPTCHA is only available within the pro version of Passster.', 'content-protector'), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 2541 |
className: "button button-primary", |
| 2542 |
style: { |
| 2543 |
marginLeft: "10px", |
| 2544 |
paddingTop: "2px" |
| 2545 |
}, |
| 2546 |
href: "https://patrickposner.dev/plugins/passster", |
| 2547 |
target: "_blank", |
| 2548 |
children: __('Get Passster PRO', 'content-protector') |
| 2549 |
})] |
| 2550 |
}) |
| 2551 |
})] |
| 2552 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2553 |
margin: 5 |
| 2554 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 2555 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 2556 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 2557 |
children: __('Bit.ly', 'content-protector') |
| 2558 |
}) |
| 2559 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 2560 |
children: options.is_pro ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 2561 |
label: __('Bit.ly Access Token', 'content-protector'), |
| 2562 |
help: __('Add your Bit.ly access token here.', 'content-protector'), |
| 2563 |
value: settings.bitly_token, |
| 2564 |
onChange: value => { |
| 2565 |
updateSetting("bitly_token", value); |
| 2566 |
} |
| 2567 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("p", { |
| 2568 |
children: [__('Bit.ly is only available within the pro version of Passster.', 'content-protector'), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 2569 |
className: "button button-primary", |
| 2570 |
style: { |
| 2571 |
marginLeft: "10px", |
| 2572 |
paddingTop: "2px" |
| 2573 |
}, |
| 2574 |
href: "https://patrickposner.dev/plugins/passster", |
| 2575 |
target: "_blank", |
| 2576 |
children: __('Get Passster PRO', 'content-protector') |
| 2577 |
})] |
| 2578 |
}) |
| 2579 |
})] |
| 2580 |
}), settingsSaved && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, { |
| 2581 |
type: "slide-in", |
| 2582 |
options: { |
| 2583 |
origin: 'top' |
| 2584 |
}, |
| 2585 |
children: () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Notice, { |
| 2586 |
status: "success", |
| 2587 |
isDismissible: false, |
| 2588 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 2589 |
children: __('Settings saved successfully.', 'content-protector') |
| 2590 |
}) |
| 2591 |
}) |
| 2592 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { |
| 2593 |
className: "save-settings", |
| 2594 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 2595 |
onClick: setSavingSettings, |
| 2596 |
variant: "primary", |
| 2597 |
children: __('Save Settings', 'content-protector') |
| 2598 |
}) |
| 2599 |
})] |
| 2600 |
}); |
| 2601 |
} |
| 2602 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ExternalSettings); |
| 2603 |
|
| 2604 |
/***/ }), |
| 2605 |
|
| 2606 |
/***/ "./src/settings/pages/GeneralSettings.jsx": |
| 2607 |
/*!************************************************!*\ |
| 2608 |
!*** ./src/settings/pages/GeneralSettings.jsx ***! |
| 2609 |
\************************************************/ |
| 2610 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2611 |
|
| 2612 |
"use strict"; |
| 2613 |
__webpack_require__.r(__webpack_exports__); |
| 2614 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2615 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 2616 |
/* harmony export */ }); |
| 2617 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 2618 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); |
| 2619 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 2620 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 2621 |
/* harmony import */ var _context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/SettingsContext */ "./src/settings/context/SettingsContext.jsx"); |
| 2622 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2623 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 2624 |
|
| 2625 |
|
| 2626 |
|
| 2627 |
|
| 2628 |
const { |
| 2629 |
__ |
| 2630 |
} = wp.i18n; |
| 2631 |
function GeneralSettings() { |
| 2632 |
const { |
| 2633 |
settings, |
| 2634 |
updateSetting, |
| 2635 |
saveSettings, |
| 2636 |
settingsSaved, |
| 2637 |
setSettingsSaved |
| 2638 |
} = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__.SettingsContext); |
| 2639 |
const [includeUppercase, setIncludeUppercase] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 2640 |
const [includeNumbers, setIncludeNumbers] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 2641 |
const setSavingSettings = () => { |
| 2642 |
saveSettings(); |
| 2643 |
setSettingsSaved(true); |
| 2644 |
setTimeout(function () { |
| 2645 |
setSettingsSaved(false); |
| 2646 |
}, 2000); |
| 2647 |
}; |
| 2648 |
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { |
| 2649 |
if (settings.include_uppercase) { |
| 2650 |
setIncludeUppercase(settings.include_uppercase); |
| 2651 |
} |
| 2652 |
if (settings.include_numbers) { |
| 2653 |
setIncludeNumbers(settings.include_numbers); |
| 2654 |
} |
| 2655 |
}, [settings]); |
| 2656 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", { |
| 2657 |
className: "inner-settings", |
| 2658 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 2659 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 2660 |
children: __('Form Labels & Description', 'content-protector') |
| 2661 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 2662 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 2663 |
children: __('Edit the text that’s used within the password form on this page. You can overwrite these settings individually per area/page.', 'content-protector') |
| 2664 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 2665 |
label: __('Headline', 'content-protector'), |
| 2666 |
help: __('This is the headline of your password-protection form.', 'content-protector'), |
| 2667 |
value: settings.headline, |
| 2668 |
onChange: value => { |
| 2669 |
updateSetting("headline", value); |
| 2670 |
} |
| 2671 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextareaControl, { |
| 2672 |
label: __('Instruction', 'content-protector'), |
| 2673 |
help: __('The instruction text appears before the password input field. Use it for hints or additional explanation.', 'content-protector'), |
| 2674 |
value: settings.instruction, |
| 2675 |
onChange: value => { |
| 2676 |
updateSetting("instruction", value); |
| 2677 |
} |
| 2678 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 2679 |
label: __('Placeholder', 'content-protector'), |
| 2680 |
help: __('Edit the placeholder text of the password field.', 'content-protector'), |
| 2681 |
value: settings.placeholder, |
| 2682 |
onChange: value => { |
| 2683 |
updateSetting("placeholder", value); |
| 2684 |
} |
| 2685 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextareaControl, { |
| 2686 |
label: __('Error', 'content-protector'), |
| 2687 |
help: __('Edit the error message that appears if a user enters the wrong password.', 'content-protector'), |
| 2688 |
value: settings.error, |
| 2689 |
onChange: value => { |
| 2690 |
updateSetting("error", value); |
| 2691 |
} |
| 2692 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 2693 |
label: __('Button Label', 'content-protector'), |
| 2694 |
help: __('Edit the text that appears on the button.', 'content-protector'), |
| 2695 |
value: settings.button_label, |
| 2696 |
onChange: value => { |
| 2697 |
updateSetting("button_label", value); |
| 2698 |
} |
| 2699 |
})] |
| 2700 |
})] |
| 2701 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2702 |
margin: 5 |
| 2703 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 2704 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 2705 |
children: __('Generating Passwords', 'content-protector') |
| 2706 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 2707 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextControl, { |
| 2708 |
label: __('Password length', 'content-protector'), |
| 2709 |
help: __('Set a default length for generated passwords.', 'content-protector'), |
| 2710 |
type: "number", |
| 2711 |
value: settings.password_length, |
| 2712 |
onChange: value => { |
| 2713 |
updateSetting("password_length", value); |
| 2714 |
} |
| 2715 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 2716 |
label: __('Include uppercase characters', 'content-protector'), |
| 2717 |
help: includeUppercase ? __('Include uppercase characters in passwords.', 'content-protector') : __('Generate passwords only with lowercase.', 'content-protector'), |
| 2718 |
checked: includeUppercase, |
| 2719 |
onChange: value => { |
| 2720 |
setIncludeUppercase(value); |
| 2721 |
updateSetting("include_uppercase", value); |
| 2722 |
} |
| 2723 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 2724 |
label: __('Include numbers', 'content-protector'), |
| 2725 |
help: includeNumbers ? __('Include numbers in passwords.', 'content-protector') : __('Generate passwords without numbers.', 'content-protector'), |
| 2726 |
checked: includeNumbers, |
| 2727 |
onChange: value => { |
| 2728 |
setIncludeNumbers(value); |
| 2729 |
updateSetting("include_numbers", value); |
| 2730 |
} |
| 2731 |
})] |
| 2732 |
})] |
| 2733 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2734 |
margin: 5 |
| 2735 |
}), settingsSaved && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, { |
| 2736 |
type: "slide-in", |
| 2737 |
options: { |
| 2738 |
origin: 'top' |
| 2739 |
}, |
| 2740 |
children: () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Notice, { |
| 2741 |
status: "success", |
| 2742 |
isDismissible: false, |
| 2743 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 2744 |
children: __('Settings saved successfully.', 'content-protector') |
| 2745 |
}) |
| 2746 |
}) |
| 2747 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { |
| 2748 |
className: "save-settings", |
| 2749 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 2750 |
onClick: setSavingSettings, |
| 2751 |
variant: "primary", |
| 2752 |
children: __('Save Settings', 'content-protector') |
| 2753 |
}) |
| 2754 |
})] |
| 2755 |
}); |
| 2756 |
} |
| 2757 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GeneralSettings); |
| 2758 |
|
| 2759 |
/***/ }), |
| 2760 |
|
| 2761 |
/***/ "./src/settings/pages/GlobalProtectionSettings.jsx": |
| 2762 |
/*!*********************************************************!*\ |
| 2763 |
!*** ./src/settings/pages/GlobalProtectionSettings.jsx ***! |
| 2764 |
\*********************************************************/ |
| 2765 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2766 |
|
| 2767 |
"use strict"; |
| 2768 |
__webpack_require__.r(__webpack_exports__); |
| 2769 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2770 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 2771 |
/* harmony export */ }); |
| 2772 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 2773 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); |
| 2774 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 2775 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 2776 |
/* harmony import */ var _context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/SettingsContext */ "./src/settings/context/SettingsContext.jsx"); |
| 2777 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); |
| 2778 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__); |
| 2779 |
/* harmony import */ var _codeamp_block_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @codeamp/block-components */ "./node_modules/@codeamp/block-components/dist/index.js"); |
| 2780 |
/* harmony import */ var _codeamp_block_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_codeamp_block_components__WEBPACK_IMPORTED_MODULE_4__); |
| 2781 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2782 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__); |
| 2783 |
|
| 2784 |
|
| 2785 |
|
| 2786 |
|
| 2787 |
|
| 2788 |
|
| 2789 |
const { |
| 2790 |
__ |
| 2791 |
} = wp.i18n; |
| 2792 |
function GlobalProtectionSettings() { |
| 2793 |
const { |
| 2794 |
settings, |
| 2795 |
updateSetting, |
| 2796 |
saveSettings, |
| 2797 |
settingsSaved, |
| 2798 |
setSettingsSaved |
| 2799 |
} = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__.SettingsContext); |
| 2800 |
const [activateGlobalProtection, setActivateGlobalProtection] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 2801 |
const [pages, setPages] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 2802 |
const [excludablePages, setExcludablePages] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 2803 |
const [globalProtectionId, setGlobalProtectionId] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(settings.global_protection_id); |
| 2804 |
const [editUrl, setEditUrl] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(options.global_edit_url); |
| 2805 |
const setSavingSettings = () => { |
| 2806 |
saveSettings(); |
| 2807 |
setSettingsSaved(true); |
| 2808 |
setTimeout(function () { |
| 2809 |
setSettingsSaved(false); |
| 2810 |
}, 2000); |
| 2811 |
}; |
| 2812 |
const updateEditUrl = global_protection_id => { |
| 2813 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ |
| 2814 |
path: '/passster/v1/edit-url?post_id=' + global_protection_id |
| 2815 |
}).then(url => { |
| 2816 |
setEditUrl(url); |
| 2817 |
}); |
| 2818 |
}; |
| 2819 |
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { |
| 2820 |
// Get global page selection |
| 2821 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ |
| 2822 |
path: '/passster/v1/pages' |
| 2823 |
}).then(fetched_pages => { |
| 2824 |
let pages = fetched_pages; |
| 2825 |
pages.unshift({ |
| 2826 |
label: __('No page selected', 'content-protector'), |
| 2827 |
value: 0 |
| 2828 |
}); |
| 2829 |
setPages(pages); |
| 2830 |
}); |
| 2831 |
|
| 2832 |
// Get excludable page selection |
| 2833 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ |
| 2834 |
path: '/passster/v1/excludable-pages' |
| 2835 |
}).then(fetched_pages => { |
| 2836 |
setExcludablePages(fetched_pages); |
| 2837 |
}); |
| 2838 |
if (settings.activate_global_protection) { |
| 2839 |
setActivateGlobalProtection(settings.activate_global_protection); |
| 2840 |
} |
| 2841 |
}, []); |
| 2842 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div", { |
| 2843 |
className: "inner-settings", |
| 2844 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 2845 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 2846 |
children: __('Global Protection', 'content-protector') |
| 2847 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 2848 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { |
| 2849 |
label: __('Activate Global Protection', 'content-protector'), |
| 2850 |
help: activateGlobalProtection ? __('Global Password Protection is activated.', 'content-protector') : __('Global Password Protection is deactivated.', 'content-protector'), |
| 2851 |
checked: activateGlobalProtection, |
| 2852 |
onChange: value => { |
| 2853 |
setActivateGlobalProtection(value); |
| 2854 |
updateSetting("activate_global_protection", value); |
| 2855 |
} |
| 2856 |
}), activateGlobalProtection && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 2857 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { |
| 2858 |
label: __('Select a Page', 'content-protector'), |
| 2859 |
options: pages, |
| 2860 |
help: __('Visitors who still need to submit the correct password will be redirected to this page. Please follow the link below to set it up.', 'content-protector'), |
| 2861 |
value: globalProtectionId, |
| 2862 |
onChange: value => { |
| 2863 |
updateSetting("global_protection_id", value); |
| 2864 |
setGlobalProtectionId(value); |
| 2865 |
updateEditUrl(value); |
| 2866 |
} |
| 2867 |
}), globalProtectionId && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("a", { |
| 2868 |
href: editUrl, |
| 2869 |
children: __('Customize the Global Protection Page', 'content-protector') |
| 2870 |
}), excludablePages && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, { |
| 2871 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2872 |
margin: 5 |
| 2873 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("label", { |
| 2874 |
className: "formatted-label", |
| 2875 |
children: __('Exclude pages', 'content-protector') |
| 2876 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", { |
| 2877 |
className: "ps-multi-select", |
| 2878 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_codeamp_block_components__WEBPACK_IMPORTED_MODULE_4__.MultiSelectControl, { |
| 2879 |
value: settings.exclude_pages, |
| 2880 |
options: excludablePages, |
| 2881 |
onChange: value => { |
| 2882 |
updateSetting("exclude_pages", value); |
| 2883 |
} |
| 2884 |
}) |
| 2885 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("p", { |
| 2886 |
id: "inspector-select-control-0__help", |
| 2887 |
className: "components-base-control__help css-1n1x27z ej5x27r1", |
| 2888 |
children: __('Select pages that should not be affected by global protection. This can be useful for information about data privacy or terms of use pages.', 'content-protector') |
| 2889 |
})] |
| 2890 |
})] |
| 2891 |
})] |
| 2892 |
})] |
| 2893 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2894 |
margin: 5 |
| 2895 |
}), settingsSaved && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, { |
| 2896 |
type: "slide-in", |
| 2897 |
options: { |
| 2898 |
origin: 'top' |
| 2899 |
}, |
| 2900 |
children: () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Notice, { |
| 2901 |
status: "success", |
| 2902 |
isDismissible: false, |
| 2903 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("p", { |
| 2904 |
children: __('Settings saved successfully.', 'content-protector') |
| 2905 |
}) |
| 2906 |
}) |
| 2907 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", { |
| 2908 |
className: "save-settings", |
| 2909 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 2910 |
onClick: setSavingSettings, |
| 2911 |
variant: "primary", |
| 2912 |
children: __('Save Settings', 'content-protector') |
| 2913 |
}) |
| 2914 |
})] |
| 2915 |
}); |
| 2916 |
} |
| 2917 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GlobalProtectionSettings); |
| 2918 |
|
| 2919 |
/***/ }), |
| 2920 |
|
| 2921 |
/***/ "./src/settings/pages/SystemStatus.jsx": |
| 2922 |
/*!*********************************************!*\ |
| 2923 |
!*** ./src/settings/pages/SystemStatus.jsx ***! |
| 2924 |
\*********************************************/ |
| 2925 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 2926 |
|
| 2927 |
"use strict"; |
| 2928 |
__webpack_require__.r(__webpack_exports__); |
| 2929 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 2930 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 2931 |
/* harmony export */ }); |
| 2932 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 2933 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); |
| 2934 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 2935 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 2936 |
/* harmony import */ var _context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/SettingsContext */ "./src/settings/context/SettingsContext.jsx"); |
| 2937 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 2938 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 2939 |
|
| 2940 |
|
| 2941 |
|
| 2942 |
|
| 2943 |
function SystemStatus() { |
| 2944 |
const { |
| 2945 |
configs |
| 2946 |
} = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__.SettingsContext); |
| 2947 |
const statusData = () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { |
| 2948 |
children: Object.keys(configs).map(key => { |
| 2949 |
const items = configs[key]; |
| 2950 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", { |
| 2951 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 2952 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 2953 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 2954 |
children: key |
| 2955 |
}) |
| 2956 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 2957 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { |
| 2958 |
style: { |
| 2959 |
maxWidth: "300px" |
| 2960 |
}, |
| 2961 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("table", { |
| 2962 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("tbody", { |
| 2963 |
className: "table-data", |
| 2964 |
children: Object.entries(items).map(item => { |
| 2965 |
if (typeof item[1] == "boolean") return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("tr", { |
| 2966 |
className: "table-row", |
| 2967 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("td", { |
| 2968 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 2969 |
children: item[0] |
| 2970 |
}) |
| 2971 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("td", { |
| 2972 |
children: [" ", item[1] ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Dashicon, { |
| 2973 |
className: "icon-yes", |
| 2974 |
icon: "yes" |
| 2975 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Dashicon, { |
| 2976 |
className: "icon-no", |
| 2977 |
icon: "no" |
| 2978 |
}), " "] |
| 2979 |
})] |
| 2980 |
}, item[0]); |
| 2981 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("tr", { |
| 2982 |
className: "table-row", |
| 2983 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("td", { |
| 2984 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 2985 |
children: item[0] |
| 2986 |
}) |
| 2987 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("td", { |
| 2988 |
children: [" ", item[1], " "] |
| 2989 |
})] |
| 2990 |
}, item[0]); |
| 2991 |
}) |
| 2992 |
}) |
| 2993 |
}) |
| 2994 |
}) |
| 2995 |
})] |
| 2996 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 2997 |
margin: 5 |
| 2998 |
})] |
| 2999 |
}, key); |
| 3000 |
}) |
| 3001 |
}); |
| 3002 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { |
| 3003 |
className: "inner-settings", |
| 3004 |
children: statusData() |
| 3005 |
}); |
| 3006 |
} |
| 3007 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SystemStatus); |
| 3008 |
|
| 3009 |
/***/ }), |
| 3010 |
|
| 3011 |
/***/ "./src/settings/pages/Utilities.jsx": |
| 3012 |
/*!******************************************!*\ |
| 3013 |
!*** ./src/settings/pages/Utilities.jsx ***! |
| 3014 |
\******************************************/ |
| 3015 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3016 |
|
| 3017 |
"use strict"; |
| 3018 |
__webpack_require__.r(__webpack_exports__); |
| 3019 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3020 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 3021 |
/* harmony export */ }); |
| 3022 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 3023 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); |
| 3024 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 3025 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 3026 |
/* harmony import */ var _context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/SettingsContext */ "./src/settings/context/SettingsContext.jsx"); |
| 3027 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3028 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 3029 |
|
| 3030 |
|
| 3031 |
|
| 3032 |
|
| 3033 |
const { |
| 3034 |
__ |
| 3035 |
} = wp.i18n; |
| 3036 |
function Utilities() { |
| 3037 |
const { |
| 3038 |
settings, |
| 3039 |
importSettings, |
| 3040 |
saveSettings, |
| 3041 |
resetSettings, |
| 3042 |
migrateSettings |
| 3043 |
} = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context_SettingsContext__WEBPACK_IMPORTED_MODULE_2__.SettingsContext); |
| 3044 |
const [isExport, setIsExport] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 3045 |
const [isImport, setIsImport] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 3046 |
const [isReset, setIsReset] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 3047 |
const [isMigrate, setIsMigrate] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 3048 |
const [hasCopied, setHasCopied] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 3049 |
const [importData, setImportData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 3050 |
const setImportDataValue = event => { |
| 3051 |
setImportData(JSON.parse(event.target.value)); |
| 3052 |
}; |
| 3053 |
const runImportSettings = () => { |
| 3054 |
importSettings(importData); |
| 3055 |
setIsImport(true); |
| 3056 |
setTimeout(function () { |
| 3057 |
setIsImport(false); |
| 3058 |
}, 2000); |
| 3059 |
}; |
| 3060 |
const runResetSettings = () => { |
| 3061 |
resetSettings(); |
| 3062 |
setIsReset(true); |
| 3063 |
setTimeout(function () { |
| 3064 |
setIsReset(false); |
| 3065 |
}, 2000); |
| 3066 |
}; |
| 3067 |
const runMigrateSettings = () => { |
| 3068 |
migrateSettings(); |
| 3069 |
saveSettings(); |
| 3070 |
setIsMigrate(true); |
| 3071 |
setTimeout(function () { |
| 3072 |
setIsMigrate(false); |
| 3073 |
}, 2000); |
| 3074 |
}; |
| 3075 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", { |
| 3076 |
className: "inner-settings", |
| 3077 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 3078 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 3079 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 3080 |
children: __('Migrate Settings', 'content-protector') |
| 3081 |
}) |
| 3082 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 3083 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3084 |
children: __('Migrate all of your customizer settings and options within version 4 of Passster.', 'content-protector') |
| 3085 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3086 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 3087 |
onClick: runMigrateSettings, |
| 3088 |
variant: "primary", |
| 3089 |
children: __('Migrate settings', 'content-protector') |
| 3090 |
}) |
| 3091 |
}), isMigrate ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, { |
| 3092 |
type: "slide-in", |
| 3093 |
options: { |
| 3094 |
origin: 'top' |
| 3095 |
}, |
| 3096 |
children: () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Notice, { |
| 3097 |
status: "success", |
| 3098 |
isDismissible: false, |
| 3099 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3100 |
children: __('Settings migration successfully.', 'content-protector') |
| 3101 |
}) |
| 3102 |
}) |
| 3103 |
}) : ''] |
| 3104 |
})] |
| 3105 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 3106 |
margin: 5 |
| 3107 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 3108 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 3109 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 3110 |
children: __('Export', 'content-protector') |
| 3111 |
}) |
| 3112 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 3113 |
children: !isExport ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3114 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 3115 |
onClick: setIsExport, |
| 3116 |
variant: "primary", |
| 3117 |
children: __('Export Settings', 'content-protector') |
| 3118 |
}) |
| 3119 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, { |
| 3120 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3121 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("code", { |
| 3122 |
children: JSON.stringify(settings) |
| 3123 |
}) |
| 3124 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3125 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ClipboardButton, { |
| 3126 |
variant: "secondary", |
| 3127 |
text: JSON.stringify(settings), |
| 3128 |
onCopy: () => setHasCopied(true), |
| 3129 |
onFinishCopy: () => setHasCopied(false), |
| 3130 |
children: hasCopied ? __('Copied!', 'content-protector') : __('Copy export data', 'content-protector') |
| 3131 |
}) |
| 3132 |
})] |
| 3133 |
}) |
| 3134 |
})] |
| 3135 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 3136 |
margin: 5 |
| 3137 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 3138 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 3139 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 3140 |
children: __('Import', 'content-protector') |
| 3141 |
}) |
| 3142 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 3143 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3144 |
children: __('Paste in the JSON string you got from your export to import all settings for the plugin.', 'content-protector') |
| 3145 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3146 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("textarea", { |
| 3147 |
rows: "8", |
| 3148 |
cols: "60", |
| 3149 |
name: "import-data", |
| 3150 |
onChange: setImportDataValue |
| 3151 |
}) |
| 3152 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3153 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 3154 |
onClick: runImportSettings, |
| 3155 |
variant: "primary", |
| 3156 |
children: __('Import Settings', 'content-protector') |
| 3157 |
}) |
| 3158 |
}), isImport ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, { |
| 3159 |
type: "slide-in", |
| 3160 |
options: { |
| 3161 |
origin: 'top' |
| 3162 |
}, |
| 3163 |
children: () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Notice, { |
| 3164 |
status: "success", |
| 3165 |
isDismissible: false, |
| 3166 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3167 |
children: __('Settings imported successfully.', 'content-protector') |
| 3168 |
}) |
| 3169 |
}) |
| 3170 |
}) : ''] |
| 3171 |
})] |
| 3172 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 3173 |
margin: 5 |
| 3174 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 3175 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 3176 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("b", { |
| 3177 |
children: __('Reset Plugin Data', 'content-protector') |
| 3178 |
}) |
| 3179 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 3180 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3181 |
children: __('By clicking the following button, 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.', 'content-protector') |
| 3182 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3183 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 3184 |
onClick: runResetSettings, |
| 3185 |
variant: "secondary", |
| 3186 |
children: __('Reset Plugin Settings', 'content-protector') |
| 3187 |
}) |
| 3188 |
}), isReset ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, { |
| 3189 |
type: "slide-in", |
| 3190 |
options: { |
| 3191 |
origin: 'top' |
| 3192 |
}, |
| 3193 |
children: () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Notice, { |
| 3194 |
status: "success", |
| 3195 |
isDismissible: false, |
| 3196 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { |
| 3197 |
children: __('Settings resetted successfully.', 'content-protector') |
| 3198 |
}) |
| 3199 |
}) |
| 3200 |
}) : ''] |
| 3201 |
})] |
| 3202 |
})] |
| 3203 |
}); |
| 3204 |
} |
| 3205 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Utilities); |
| 3206 |
|
| 3207 |
/***/ }), |
| 3208 |
|
| 3209 |
/***/ "./src/settings/pages/WooIntegrationSettings.jsx": |
| 3210 |
/*!*******************************************************!*\ |
| 3211 |
!*** ./src/settings/pages/WooIntegrationSettings.jsx ***! |
| 3212 |
\*******************************************************/ |
| 3213 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3214 |
|
| 3215 |
"use strict"; |
| 3216 |
__webpack_require__.r(__webpack_exports__); |
| 3217 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3218 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 3219 |
/* harmony export */ }); |
| 3220 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 3221 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); |
| 3222 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 3223 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); |
| 3224 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3225 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); |
| 3226 |
|
| 3227 |
|
| 3228 |
|
| 3229 |
const { |
| 3230 |
__ |
| 3231 |
} = wp.i18n; |
| 3232 |
function WooIntegrationSettings() { |
| 3233 |
const [isCollapsed, setIsCollapsed] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); |
| 3234 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", { |
| 3235 |
className: 'inner-settings', |
| 3236 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Card, { |
| 3237 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardHeader, { |
| 3238 |
onClick: () => setIsCollapsed(!isCollapsed), |
| 3239 |
className: "header_collapse", |
| 3240 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", { |
| 3241 |
children: __('WooCommerce Integration', 'content-protector') |
| 3242 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", { |
| 3243 |
children: isCollapsed ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", { |
| 3244 |
className: "dashicons dashicons-arrow-up-alt2" |
| 3245 |
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", { |
| 3246 |
className: "dashicons dashicons-arrow-down-alt2" |
| 3247 |
}) |
| 3248 |
})] |
| 3249 |
}), !isCollapsed && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.CardBody, { |
| 3250 |
children: [__('Enable protection features in your WooCommerce store through Passster.', 'content-protector'), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 3251 |
margin: 5 |
| 3252 |
}), __('Lite/free version'), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("ul", { |
| 3253 |
className: "upsell-settings-list", |
| 3254 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li", { |
| 3255 |
className: "upsell-settings-list-item", |
| 3256 |
children: __('Implement full store protection.', 'content-protector') |
| 3257 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li", { |
| 3258 |
className: "upsell-settings-list-item", |
| 3259 |
children: __('Protect individual products with passwords.', 'content-protector') |
| 3260 |
})] |
| 3261 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 3262 |
margin: 5 |
| 3263 |
}), __('Pro Version'), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("ul", { |
| 3264 |
className: "upsell-settings-list", |
| 3265 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li", { |
| 3266 |
className: "upsell-settings-list-item", |
| 3267 |
children: __('Choose from multiple protection modes.', 'content-protector') |
| 3268 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li", { |
| 3269 |
className: "upsell-settings-list-item", |
| 3270 |
children: __('Apply protection based on user roles.', 'content-protector') |
| 3271 |
})] |
| 3272 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 3273 |
margin: 10 |
| 3274 |
}), !options.is_pro && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", { |
| 3275 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 3276 |
href: "https://passster.com/#free-vs-pro", |
| 3277 |
target: "_blank", |
| 3278 |
className: "button", |
| 3279 |
style: { |
| 3280 |
marginRight: '10px' |
| 3281 |
}, |
| 3282 |
children: __('Lite vs Pro', 'content-protector') |
| 3283 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 3284 |
href: "https://passster.com/#pricing", |
| 3285 |
target: "_blank", |
| 3286 |
className: "button-primary button", |
| 3287 |
children: __('Get Passster PRO!', 'content-protector') |
| 3288 |
})] |
| 3289 |
})] |
| 3290 |
})] |
| 3291 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalSpacer, { |
| 3292 |
margin: 5 |
| 3293 |
})] |
| 3294 |
}); |
| 3295 |
} |
| 3296 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WooIntegrationSettings); |
| 3297 |
|
| 3298 |
/***/ }), |
| 3299 |
|
| 3300 |
/***/ "./src/statistics/Statistics.js": |
| 3301 |
/*!**************************************!*\ |
| 3302 |
!*** ./src/statistics/Statistics.js ***! |
| 3303 |
\**************************************/ |
| 3304 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3305 |
|
| 3306 |
"use strict"; |
| 3307 |
__webpack_require__.r(__webpack_exports__); |
| 3308 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3309 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 3310 |
/* harmony export */ }); |
| 3311 |
/* harmony import */ var _context_StatisticsContext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./context/StatisticsContext */ "./src/statistics/context/StatisticsContext.jsx"); |
| 3312 |
/* harmony import */ var _components_StatisticsPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/StatisticsPage */ "./src/statistics/components/StatisticsPage.jsx"); |
| 3313 |
/* harmony import */ var _statistics_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./statistics.scss */ "./src/statistics/statistics.scss"); |
| 3314 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3315 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); |
| 3316 |
|
| 3317 |
|
| 3318 |
|
| 3319 |
|
| 3320 |
function Statistics() { |
| 3321 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_context_StatisticsContext__WEBPACK_IMPORTED_MODULE_0__["default"], { |
| 3322 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { |
| 3323 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_StatisticsPage__WEBPACK_IMPORTED_MODULE_1__["default"], {}) |
| 3324 |
}) |
| 3325 |
}); |
| 3326 |
} |
| 3327 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Statistics); |
| 3328 |
|
| 3329 |
/***/ }), |
| 3330 |
|
| 3331 |
/***/ "./src/statistics/components/StatisticsPage.jsx": |
| 3332 |
/*!******************************************************!*\ |
| 3333 |
!*** ./src/statistics/components/StatisticsPage.jsx ***! |
| 3334 |
\******************************************************/ |
| 3335 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3336 |
|
| 3337 |
"use strict"; |
| 3338 |
__webpack_require__.r(__webpack_exports__); |
| 3339 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3340 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 3341 |
/* harmony export */ }); |
| 3342 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); |
| 3343 |
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); |
| 3344 |
/* harmony import */ var react_data_table_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-data-table-component */ "./node_modules/react-data-table-component/dist/index.cjs.js"); |
| 3345 |
/* harmony import */ var _context_StatisticsContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/StatisticsContext */ "./src/statistics/context/StatisticsContext.jsx"); |
| 3346 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 3347 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__); |
| 3348 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3349 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__); |
| 3350 |
|
| 3351 |
|
| 3352 |
|
| 3353 |
|
| 3354 |
|
| 3355 |
const { |
| 3356 |
__ |
| 3357 |
} = wp.i18n; |
| 3358 |
function StatisticsPage() { |
| 3359 |
const { |
| 3360 |
statistics, |
| 3361 |
resetStatistics |
| 3362 |
} = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useContext)(_context_StatisticsContext__WEBPACK_IMPORTED_MODULE_2__.StatisticsContext); |
| 3363 |
const [isReset, setIsReset] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(false); |
| 3364 |
const runResetStatistics = () => { |
| 3365 |
resetStatistics(); |
| 3366 |
setIsReset(true); |
| 3367 |
setTimeout(function () { |
| 3368 |
setIsReset(false); |
| 3369 |
}, 2000); |
| 3370 |
}; |
| 3371 |
const columns = [{ |
| 3372 |
name: __('Password', 'content-protector'), |
| 3373 |
selector: row => row.password, |
| 3374 |
sortable: true |
| 3375 |
}, { |
| 3376 |
name: __('Number of Usages', 'content-protector'), |
| 3377 |
selector: row => row.number_of_usages, |
| 3378 |
sortable: true |
| 3379 |
}, { |
| 3380 |
name: __('First Usage', 'content-protector'), |
| 3381 |
selector: row => row.first_usage, |
| 3382 |
sortable: true |
| 3383 |
}, { |
| 3384 |
name: __('IP Address', 'content-protector'), |
| 3385 |
selector: row => row.ip |
| 3386 |
}, { |
| 3387 |
name: __('Browser', 'content-protector'), |
| 3388 |
selector: row => row.browser |
| 3389 |
}]; |
| 3390 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", { |
| 3391 |
className: "plugin-settings-container", |
| 3392 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { |
| 3393 |
className: "header", |
| 3394 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Flex, { |
| 3395 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexItem, { |
| 3396 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { |
| 3397 |
className: "plugin-logo", |
| 3398 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", { |
| 3399 |
alt: "Logo", |
| 3400 |
src: options.logo |
| 3401 |
}) |
| 3402 |
}) |
| 3403 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexItem, { |
| 3404 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("p", { |
| 3405 |
children: ["Version: ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("b", { |
| 3406 |
children: options.version |
| 3407 |
})] |
| 3408 |
}) |
| 3409 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.FlexItem, { |
| 3410 |
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { |
| 3411 |
onClick: runResetStatistics, |
| 3412 |
variant: "primary", |
| 3413 |
children: __('Reset Statistics', 'content-protector') |
| 3414 |
}), isReset ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Animate, { |
| 3415 |
type: "slide-in", |
| 3416 |
options: { |
| 3417 |
origin: 'top' |
| 3418 |
}, |
| 3419 |
children: () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Notice, { |
| 3420 |
status: "success", |
| 3421 |
isDismissible: false, |
| 3422 |
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", { |
| 3423 |
children: __('Statistics resetted successfully.', 'content-protector') |
| 3424 |
}) |
| 3425 |
}) |
| 3426 |
}) : ''] |
| 3427 |
})] |
| 3428 |
}) |
| 3429 |
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { |
| 3430 |
className: "content", |
| 3431 |
children: statistics && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_data_table_component__WEBPACK_IMPORTED_MODULE_1__["default"], { |
| 3432 |
columns: columns, |
| 3433 |
data: statistics, |
| 3434 |
pagination: true |
| 3435 |
}) |
| 3436 |
})] |
| 3437 |
}); |
| 3438 |
} |
| 3439 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StatisticsPage); |
| 3440 |
|
| 3441 |
/***/ }), |
| 3442 |
|
| 3443 |
/***/ "./src/statistics/context/StatisticsContext.jsx": |
| 3444 |
/*!******************************************************!*\ |
| 3445 |
!*** ./src/statistics/context/StatisticsContext.jsx ***! |
| 3446 |
\******************************************************/ |
| 3447 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3448 |
|
| 3449 |
"use strict"; |
| 3450 |
__webpack_require__.r(__webpack_exports__); |
| 3451 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 3452 |
/* harmony export */ StatisticsContext: () => (/* binding */ StatisticsContext), |
| 3453 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 3454 |
/* harmony export */ }); |
| 3455 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 3456 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 3457 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); |
| 3458 |
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__); |
| 3459 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 3460 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); |
| 3461 |
|
| 3462 |
|
| 3463 |
|
| 3464 |
const { |
| 3465 |
__ |
| 3466 |
} = wp.i18n; |
| 3467 |
const StatisticsContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)(); |
| 3468 |
function StatisticsContextProvider(props) { |
| 3469 |
const [statistics, setStatistics] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(); |
| 3470 |
const getStatistics = () => { |
| 3471 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ |
| 3472 |
path: '/passster/v1/statistics' |
| 3473 |
}).then(data => { |
| 3474 |
if (data) { |
| 3475 |
setStatistics(data); |
| 3476 |
} else { |
| 3477 |
setStatistics([]); |
| 3478 |
} |
| 3479 |
}); |
| 3480 |
}; |
| 3481 |
const resetStatistics = () => { |
| 3482 |
_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ |
| 3483 |
path: '/passster/v1/reset-statistics', |
| 3484 |
method: 'POST', |
| 3485 |
reset: true |
| 3486 |
}); |
| 3487 |
}; |
| 3488 |
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { |
| 3489 |
getStatistics(); |
| 3490 |
}, []); |
| 3491 |
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(StatisticsContext.Provider, { |
| 3492 |
value: { |
| 3493 |
statistics, |
| 3494 |
resetStatistics |
| 3495 |
}, |
| 3496 |
children: props.children |
| 3497 |
}); |
| 3498 |
} |
| 3499 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StatisticsContextProvider); |
| 3500 |
|
| 3501 |
/***/ }), |
| 3502 |
|
| 3503 |
/***/ "./node_modules/js-generate-password/dist/index.js": |
| 3504 |
/*!*********************************************************!*\ |
| 3505 |
!*** ./node_modules/js-generate-password/dist/index.js ***! |
| 3506 |
\*********************************************************/ |
| 3507 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 3508 |
|
| 3509 |
"use strict"; |
| 3510 |
|
| 3511 |
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
| 3512 |
exports.GeneratePassword = void 0;
|
| 3513 |
const password_generator_1 = __webpack_require__(/*! ./lib/password-generator */ "./node_modules/js-generate-password/dist/lib/password-generator.js");
|
| 3514 |
const check_options_error_1 = __webpack_require__(/*! ./lib/check-options-error */ "./node_modules/js-generate-password/dist/lib/check-options-error.js");
|
| 3515 |
const process_options_1 = __webpack_require__(/*! ./lib/process-options */ "./node_modules/js-generate-password/dist/lib/process-options.js");
|
| 3516 |
function GeneratePassword(options) {
|
| 3517 |
let pswd;
|
| 3518 |
if (options) {
|
| 3519 |
options = (0, process_options_1.processOption)(options);
|
| 3520 |
(0, check_options_error_1.checkError)(options);
|
| 3521 |
pswd = (0, password_generator_1.generatePswd)(options);
|
| 3522 |
return pswd;
|
| 3523 |
}
|
| 3524 |
else {
|
| 3525 |
let opt = {
|
| 3526 |
length: 10,
|
| 3527 |
lowercase: true,
|
| 3528 |
uppercase: true,
|
| 3529 |
numbers: true,
|
| 3530 |
symbols: false,
|
| 3531 |
exclude: "",
|
| 3532 |
minLengthLowercase: 1,
|
| 3533 |
minLengthUppercase: 1,
|
| 3534 |
minLengthNumbers: 1,
|
| 3535 |
minLengthSymbols: 0,
|
| 3536 |
};
|
| 3537 |
options = (0, process_options_1.processOption)(opt);
|
| 3538 |
(0, check_options_error_1.checkError)(options);
|
| 3539 |
pswd = (0, password_generator_1.generatePswd)(options);
|
| 3540 |
return pswd;
|
| 3541 |
}
|
| 3542 |
}
|
| 3543 |
exports.GeneratePassword = GeneratePassword;
|
| 3544 |
exports["default"] = { GeneratePassword };
|
| 3545 |
|
| 3546 |
|
| 3547 |
/***/ }), |
| 3548 |
|
| 3549 |
/***/ "./node_modules/js-generate-password/dist/lib/check-options-error.js": |
| 3550 |
/*!***************************************************************************!*\ |
| 3551 |
!*** ./node_modules/js-generate-password/dist/lib/check-options-error.js ***! |
| 3552 |
\***************************************************************************/ |
| 3553 |
/***/ ((__unused_webpack_module, exports) => { |
| 3554 |
|
| 3555 |
"use strict"; |
| 3556 |
|
| 3557 |
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
| 3558 |
exports.checkError = void 0;
|
| 3559 |
const checkError = (options) => {
|
| 3560 |
const { length, lowercase, uppercase, numbers, symbols, minLengthLowercase, minLengthUppercase, minLengthNumbers, minLengthSymbols, } = options;
|
| 3561 |
//Checking if the sum of minimum characters of Lowercase, uppercase, numbers and special case is greater than the total password length.
|
| 3562 |
if (minLengthLowercase +
|
| 3563 |
minLengthUppercase +
|
| 3564 |
minLengthNumbers +
|
| 3565 |
minLengthSymbols >
|
| 3566 |
length) {
|
| 3567 |
throw new Error("Sum of Minimum Characters in the passwords greater than the length of the Password to be generated.");
|
| 3568 |
}
|
| 3569 |
//Checking if lowercase, uppercase , numbers and special characters have all been set to false.
|
| 3570 |
if (lowercase == false &&
|
| 3571 |
uppercase == false &&
|
| 3572 |
numbers == false &&
|
| 3573 |
symbols == false) {
|
| 3574 |
throw new Error("Alphabets, Numbers and Symbols are all set to False. No valid Characters to generate the Password.");
|
| 3575 |
}
|
| 3576 |
};
|
| 3577 |
exports.checkError = checkError;
|
| 3578 |
// module.exports = checkError;
|
| 3579 |
|
| 3580 |
|
| 3581 |
/***/ }), |
| 3582 |
|
| 3583 |
/***/ "./node_modules/js-generate-password/dist/lib/generate-random-number.js": |
| 3584 |
/*!******************************************************************************!*\ |
| 3585 |
!*** ./node_modules/js-generate-password/dist/lib/generate-random-number.js ***! |
| 3586 |
\******************************************************************************/ |
| 3587 |
/***/ ((__unused_webpack_module, exports) => { |
| 3588 |
|
| 3589 |
"use strict"; |
| 3590 |
|
| 3591 |
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
| 3592 |
exports.generateRandomNumbers = void 0;
|
| 3593 |
const generateRandomNumbers = (upperLimit) => {
|
| 3594 |
return Math.floor(Math.random() * upperLimit);
|
| 3595 |
};
|
| 3596 |
exports.generateRandomNumbers = generateRandomNumbers;
|
| 3597 |
// module.exports = generateRandomNumbers;
|
| 3598 |
|
| 3599 |
|
| 3600 |
/***/ }), |
| 3601 |
|
| 3602 |
/***/ "./node_modules/js-generate-password/dist/lib/password-generator.js": |
| 3603 |
/*!**************************************************************************!*\ |
| 3604 |
!*** ./node_modules/js-generate-password/dist/lib/password-generator.js ***! |
| 3605 |
\**************************************************************************/ |
| 3606 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 3607 |
|
| 3608 |
"use strict"; |
| 3609 |
|
| 3610 |
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
| 3611 |
exports.generatePswd = void 0;
|
| 3612 |
// const generategenerateRandomNumberss = require("./generate-random-number");
|
| 3613 |
// const shuffleString = require("./shuffle-string");
|
| 3614 |
const generate_random_number_1 = __webpack_require__(/*! ./generate-random-number */ "./node_modules/js-generate-password/dist/lib/generate-random-number.js");
|
| 3615 |
const shuffle_string_1 = __webpack_require__(/*! ./shuffle-string */ "./node_modules/js-generate-password/dist/lib/shuffle-string.js");
|
| 3616 |
const generatePswd = (options) => {
|
| 3617 |
let pswd = "";
|
| 3618 |
let minChar = "";
|
| 3619 |
let { length, lowercase, uppercase, numbers, symbols, minLengthLowercase, minLengthUppercase, minLengthNumbers, minLengthSymbols, exclude, } = options;
|
| 3620 |
let lowercaseChar = "abcdefghijklmnopqrstuvwxyz";
|
| 3621 |
lowercaseChar = removeExceptions(lowercaseChar, exclude);
|
| 3622 |
let uppercaseChar = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
| 3623 |
uppercaseChar = removeExceptions(uppercaseChar, exclude);
|
| 3624 |
let numberChar = "0123456789";
|
| 3625 |
numberChar = removeExceptions(numberChar, exclude);
|
| 3626 |
let specialChar = "!#$%&'()*+,-./:;<=>?@[]^_{|}~";
|
| 3627 |
specialChar = removeExceptions(specialChar, exclude);
|
| 3628 |
// Generating a minChar string that holds minimum number of characters on the User Option Selection.
|
| 3629 |
// The minChar variable will store the minimum number of characters for each type - lowercase, uppercase, numbers, and symbols.
|
| 3630 |
// Then, the minChar variable is shuffled to make the password random.
|
| 3631 |
let upperLimit = lowercaseChar.length;
|
| 3632 |
for (let i = 0; i < minLengthLowercase; i++) {
|
| 3633 |
minChar += lowercaseChar.charAt((0, generate_random_number_1.generateRandomNumbers)(upperLimit));
|
| 3634 |
}
|
| 3635 |
upperLimit = uppercaseChar.length;
|
| 3636 |
for (let i = 0; i < minLengthUppercase; i++) {
|
| 3637 |
minChar += uppercaseChar.charAt((0, generate_random_number_1.generateRandomNumbers)(upperLimit));
|
| 3638 |
}
|
| 3639 |
upperLimit = numberChar.length;
|
| 3640 |
for (let i = 0; i < minLengthNumbers; i++) {
|
| 3641 |
minChar += numberChar.charAt((0, generate_random_number_1.generateRandomNumbers)(upperLimit));
|
| 3642 |
}
|
| 3643 |
upperLimit = specialChar.length;
|
| 3644 |
for (let i = 0; i < minLengthSymbols; i++) {
|
| 3645 |
minChar += specialChar.charAt((0, generate_random_number_1.generateRandomNumbers)(upperLimit));
|
| 3646 |
}
|
| 3647 |
//Shuffling the minChar to generate a password that holds minimum criteria.
|
| 3648 |
pswd = pswd + (0, shuffle_string_1.shuffleString)(minChar);
|
| 3649 |
let characterString = "";
|
| 3650 |
characterString = lowercase
|
| 3651 |
? characterString + lowercaseChar
|
| 3652 |
: characterString;
|
| 3653 |
characterString = uppercase
|
| 3654 |
? characterString + uppercaseChar
|
| 3655 |
: characterString;
|
| 3656 |
characterString = numbers ? characterString + numberChar : characterString;
|
| 3657 |
characterString = symbols ? characterString + specialChar : characterString;
|
| 3658 |
let remainingChar = length - pswd.length;
|
| 3659 |
upperLimit = characterString.length;
|
| 3660 |
for (let i = 0; i < remainingChar; i++) {
|
| 3661 |
pswd += characterString.charAt((0, generate_random_number_1.generateRandomNumbers)(upperLimit));
|
| 3662 |
}
|
| 3663 |
return pswd;
|
| 3664 |
};
|
| 3665 |
exports.generatePswd = generatePswd;
|
| 3666 |
const removeExceptions = (str, EXCEPTIONS) => {
|
| 3667 |
EXCEPTIONS === null || EXCEPTIONS === void 0 ? void 0 : EXCEPTIONS.split("").forEach((char) => {
|
| 3668 |
str = str.replace(char, "");
|
| 3669 |
});
|
| 3670 |
return str;
|
| 3671 |
};
|
| 3672 |
// module.exports = generatePassword;
|
| 3673 |
|
| 3674 |
|
| 3675 |
/***/ }), |
| 3676 |
|
| 3677 |
/***/ "./node_modules/js-generate-password/dist/lib/process-options.js": |
| 3678 |
/*!***********************************************************************!*\ |
| 3679 |
!*** ./node_modules/js-generate-password/dist/lib/process-options.js ***! |
| 3680 |
\***********************************************************************/ |
| 3681 |
/***/ ((__unused_webpack_module, exports) => { |
| 3682 |
|
| 3683 |
"use strict"; |
| 3684 |
|
| 3685 |
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
| 3686 |
exports.processOption = void 0;
|
| 3687 |
const processOption = (options) => {
|
| 3688 |
{
|
| 3689 |
options.length = typeof options.length == "undefined" ? 10 : options.length;
|
| 3690 |
options.lowercase =
|
| 3691 |
typeof options.lowercase == "undefined" ? true : options.lowercase;
|
| 3692 |
options.uppercase =
|
| 3693 |
typeof options.uppercase == "undefined" ? true : options.uppercase;
|
| 3694 |
options.numbers =
|
| 3695 |
typeof options.numbers == "undefined" ? true : options.numbers;
|
| 3696 |
options.symbols =
|
| 3697 |
typeof options.symbols == "undefined" ? false : options.symbols;
|
| 3698 |
if (options.lowercase) {
|
| 3699 |
options.minLengthLowercase =
|
| 3700 |
typeof options.minLengthLowercase == "undefined"
|
| 3701 |
? 1
|
| 3702 |
: options.minLengthLowercase;
|
| 3703 |
}
|
| 3704 |
else {
|
| 3705 |
options.minLengthLowercase = 0;
|
| 3706 |
}
|
| 3707 |
if (options.uppercase) {
|
| 3708 |
options.minLengthUppercase =
|
| 3709 |
typeof options.minLengthUppercase == "undefined"
|
| 3710 |
? 1
|
| 3711 |
: options.minLengthUppercase;
|
| 3712 |
}
|
| 3713 |
else {
|
| 3714 |
options.minLengthUppercase = 0;
|
| 3715 |
}
|
| 3716 |
if (options.numbers) {
|
| 3717 |
options.minLengthNumbers =
|
| 3718 |
typeof options.minLengthNumbers == "undefined"
|
| 3719 |
? 1
|
| 3720 |
: options.minLengthNumbers;
|
| 3721 |
}
|
| 3722 |
else {
|
| 3723 |
options.minLengthNumbers = 0;
|
| 3724 |
}
|
| 3725 |
if (options.symbols) {
|
| 3726 |
options.minLengthSymbols =
|
| 3727 |
typeof options.minLengthSymbols == "undefined"
|
| 3728 |
? 1
|
| 3729 |
: options.minLengthSymbols;
|
| 3730 |
}
|
| 3731 |
else {
|
| 3732 |
options.minLengthSymbols = 0;
|
| 3733 |
}
|
| 3734 |
options.exclude =
|
| 3735 |
typeof options.exclude == "undefined" ? "" : options.exclude;
|
| 3736 |
}
|
| 3737 |
return options;
|
| 3738 |
};
|
| 3739 |
exports.processOption = processOption;
|
| 3740 |
// module.exports = processOption;
|
| 3741 |
|
| 3742 |
|
| 3743 |
/***/ }), |
| 3744 |
|
| 3745 |
/***/ "./node_modules/js-generate-password/dist/lib/shuffle-string.js": |
| 3746 |
/*!**********************************************************************!*\ |
| 3747 |
!*** ./node_modules/js-generate-password/dist/lib/shuffle-string.js ***! |
| 3748 |
\**********************************************************************/ |
| 3749 |
/***/ ((__unused_webpack_module, exports) => { |
| 3750 |
|
| 3751 |
"use strict"; |
| 3752 |
|
| 3753 |
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
| 3754 |
exports.shuffleString = void 0;
|
| 3755 |
const shuffleString = (str) => {
|
| 3756 |
let arr = str.split("");
|
| 3757 |
let n = arr.length;
|
| 3758 |
for (let i = n - 1; i > 0; i--) {
|
| 3759 |
let j = Math.floor(Math.random() * (i + 1));
|
| 3760 |
let tmp = arr[i];
|
| 3761 |
arr[i] = arr[j];
|
| 3762 |
arr[j] = tmp;
|
| 3763 |
}
|
| 3764 |
return arr.join("");
|
| 3765 |
};
|
| 3766 |
exports.shuffleString = shuffleString;
|
| 3767 |
// module.exports = shuffleString;
|
| 3768 |
|
| 3769 |
|
| 3770 |
/***/ }), |
| 3771 |
|
| 3772 |
/***/ "./src/meta/general/meta.scss": |
| 3773 |
/*!************************************!*\ |
| 3774 |
!*** ./src/meta/general/meta.scss ***! |
| 3775 |
\************************************/ |
| 3776 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3777 |
|
| 3778 |
"use strict"; |
| 3779 |
__webpack_require__.r(__webpack_exports__); |
| 3780 |
// extracted by mini-css-extract-plugin |
| 3781 |
|
| 3782 |
|
| 3783 |
/***/ }), |
| 3784 |
|
| 3785 |
/***/ "./src/meta/password-lists/meta.scss": |
| 3786 |
/*!*******************************************!*\ |
| 3787 |
!*** ./src/meta/password-lists/meta.scss ***! |
| 3788 |
\*******************************************/ |
| 3789 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3790 |
|
| 3791 |
"use strict"; |
| 3792 |
__webpack_require__.r(__webpack_exports__); |
| 3793 |
// extracted by mini-css-extract-plugin |
| 3794 |
|
| 3795 |
|
| 3796 |
/***/ }), |
| 3797 |
|
| 3798 |
/***/ "./src/settings/settings.scss": |
| 3799 |
/*!************************************!*\ |
| 3800 |
!*** ./src/settings/settings.scss ***! |
| 3801 |
\************************************/ |
| 3802 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3803 |
|
| 3804 |
"use strict"; |
| 3805 |
__webpack_require__.r(__webpack_exports__); |
| 3806 |
// extracted by mini-css-extract-plugin |
| 3807 |
|
| 3808 |
|
| 3809 |
/***/ }), |
| 3810 |
|
| 3811 |
/***/ "./src/statistics/statistics.scss": |
| 3812 |
/*!****************************************!*\ |
| 3813 |
!*** ./src/statistics/statistics.scss ***! |
| 3814 |
\****************************************/ |
| 3815 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 3816 |
|
| 3817 |
"use strict"; |
| 3818 |
__webpack_require__.r(__webpack_exports__); |
| 3819 |
// extracted by mini-css-extract-plugin |
| 3820 |
|
| 3821 |
|
| 3822 |
/***/ }), |
| 3823 |
|
| 3824 |
/***/ "./node_modules/react-data-table-component/dist/index.cjs.js": |
| 3825 |
/*!*******************************************************************!*\ |
| 3826 |
!*** ./node_modules/react-data-table-component/dist/index.cjs.js ***! |
| 3827 |
\*******************************************************************/ |
| 3828 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 3829 |
|
| 3830 |
"use strict"; |
| 3831 |
Object.defineProperty(exports, "__esModule", ({value:!0}));var e=__webpack_require__(/*! react */ "react"),t=__webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a,l=o(e),r=n(e),i=n(t);function s(e,t){return e[t]}function d(e=[],t,n=0){return[...e.slice(0,n),t,...e.slice(n)]}function c(e=[],t,n="id"){const o=e.slice(),a=s(t,n);return a?o.splice(o.findIndex((e=>s(e,n)===a)),1):o.splice(o.findIndex((e=>e===t)),1),o}function g(e){return e.map(((e,t)=>{const n=Object.assign(Object.assign({},e),{sortable:e.sortable||!!e.sortFunction||void 0});return e.id||(n.id=t+1),n}))}function u(e,t){return Math.ceil(e/t)}function p(e,t){return Math.min(e,t)}!function(e){e.ASC="asc",e.DESC="desc"}(a||(a={}));const b=()=>null;function m(e,t=[],n=[]){let o={},a=[...n];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)&&(o=t.style||{},t.classNames&&(a=[...a,...t.classNames]),"function"==typeof t.style&&(o=t.style(e)||{}))})),{conditionalStyle:o,classNames:a.join(" ")}}function f(e,t=[],n="id"){const o=s(e,n);return o?t.some((e=>s(e,n)===o)):t.some((t=>t===e))}function h(e,t){return t?e.findIndex((e=>w(e.id,t))):-1}function w(e,t){return e==t}function x(e,t){const n=!e.toggleOnSelectedRowsChange;switch(t.type){case"SELECT_ALL_ROWS":{const{keyField:n,rows:o,rowCount:a,mergeSelections:l}=t,r=!e.allSelected,i=!e.toggleOnSelectedRowsChange;if(l){const t=r?[...e.selectedRows,...o.filter((t=>!f(t,e.selectedRows,n)))]:e.selectedRows.filter((e=>!f(e,o,n)));return Object.assign(Object.assign({},e),{allSelected:r,selectedCount:t.length,selectedRows:t,toggleOnSelectedRowsChange:i})}return Object.assign(Object.assign({},e),{allSelected:r,selectedCount:r?a:0,selectedRows:r?o:[],toggleOnSelectedRowsChange:i})}case"SELECT_SINGLE_ROW":{const{keyField:o,row:a,isSelected:l,rowCount:r,singleSelect:i}=t;return i?l?Object.assign(Object.assign({},e),{selectedCount:0,allSelected:!1,selectedRows:[],toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:1,allSelected:!1,selectedRows:[a],toggleOnSelectedRowsChange:n}):l?Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length>0?e.selectedRows.length-1:0,allSelected:!1,selectedRows:c(e.selectedRows,a,o),toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length+1,allSelected:e.selectedRows.length+1===r,selectedRows:d(e.selectedRows,a),toggleOnSelectedRowsChange:n})}case"SELECT_MULTIPLE_ROWS":{const{keyField:o,selectedRows:a,totalRows:l,mergeSelections:r}=t;if(r){const t=[...e.selectedRows,...a.filter((t=>!f(t,e.selectedRows,o)))];return Object.assign(Object.assign({},e),{selectedCount:t.length,allSelected:!1,selectedRows:t,toggleOnSelectedRowsChange:n})}return Object.assign(Object.assign({},e),{selectedCount:a.length,allSelected:a.length===l,selectedRows:a,toggleOnSelectedRowsChange:n})}case"CLEAR_SELECTED_ROWS":{const{selectedRowsFlag:n}=t;return Object.assign(Object.assign({},e),{allSelected:!1,selectedCount:0,selectedRows:[],selectedRowsFlag:n})}case"SORT_CHANGE":{const{sortDirection:o,selectedColumn:a,clearSelectedOnSort:l}=t;return Object.assign(Object.assign(Object.assign({},e),{selectedColumn:a,sortDirection:o,currentPage:1}),l&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_PAGE":{const{page:o,paginationServer:a,visibleOnly:l,persistSelectedOnPageChange:r}=t,i=a&&r,s=a&&!r||l;return Object.assign(Object.assign(Object.assign(Object.assign({},e),{currentPage:o}),i&&{allSelected:!1}),s&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_ROWS_PER_PAGE":{const{rowsPerPage:n,page:o}=t;return Object.assign(Object.assign({},e),{currentPage:o,rowsPerPage:n})}}}const C=t.css` |
| 3832 |
pointer-events: none; |
| 3833 |
opacity: 0.4; |
| 3834 |
`,y=i.default.div` |
| 3835 |
position: relative; |
| 3836 |
box-sizing: border-box; |
| 3837 |
display: flex; |
| 3838 |
flex-direction: column; |
| 3839 |
width: 100%; |
| 3840 |
height: 100%; |
| 3841 |
max-width: 100%; |
| 3842 |
${({disabled:e})=>e&&C}; |
| 3843 |
${({theme:e})=>e.table.style}; |
| 3844 |
`,v=t.css` |
| 3845 |
position: sticky; |
| 3846 |
position: -webkit-sticky; /* Safari */ |
| 3847 |
top: 0; |
| 3848 |
z-index: 1; |
| 3849 |
`,R=i.default.div` |
| 3850 |
display: flex; |
| 3851 |
width: 100%; |
| 3852 |
${({$fixedHeader:e})=>e&&v}; |
| 3853 |
${({theme:e})=>e.head.style}; |
| 3854 |
`,S=i.default.div` |
| 3855 |
display: flex; |
| 3856 |
align-items: stretch; |
| 3857 |
width: 100%; |
| 3858 |
${({theme:e})=>e.headRow.style}; |
| 3859 |
${({$dense:e,theme:t})=>e&&t.headRow.denseStyle}; |
| 3860 |
`,E=(e,...n)=>t.css` |
| 3861 |
@media screen and (max-width: ${599}px) { |
| 3862 |
${t.css(e,...n)} |
| 3863 |
} |
| 3864 |
`,O=(e,...n)=>t.css` |
| 3865 |
@media screen and (max-width: ${959}px) { |
| 3866 |
${t.css(e,...n)} |
| 3867 |
} |
| 3868 |
`,$=(e,...n)=>t.css` |
| 3869 |
@media screen and (max-width: ${1280}px) { |
| 3870 |
${t.css(e,...n)} |
| 3871 |
} |
| 3872 |
`,P=e=>(n,...o)=>t.css` |
| 3873 |
@media screen and (max-width: ${e}px) { |
| 3874 |
${t.css(n,...o)} |
| 3875 |
} |
| 3876 |
`,k=i.default.div` |
| 3877 |
position: relative; |
| 3878 |
display: flex; |
| 3879 |
align-items: center; |
| 3880 |
box-sizing: border-box; |
| 3881 |
line-height: normal; |
| 3882 |
${({theme:e,$headCell:t})=>e[t?"headCells":"cells"].style}; |
| 3883 |
${({$noPadding:e})=>e&&"padding: 0"}; |
| 3884 |
`,D=i.default(k)` |
| 3885 |
flex-grow: ${({button:e,grow:t})=>0===t||e?0:t||1}; |
| 3886 |
flex-shrink: 0; |
| 3887 |
flex-basis: 0; |
| 3888 |
max-width: ${({maxWidth:e})=>e||"100%"}; |
| 3889 |
min-width: ${({minWidth:e})=>e||"100px"}; |
| 3890 |
${({width:e})=>e&&t.css` |
| 3891 |
min-width: ${e}; |
| 3892 |
max-width: ${e}; |
| 3893 |
`}; |
| 3894 |
${({right:e})=>e&&"justify-content: flex-end"}; |
| 3895 |
${({button:e,center:t})=>(t||e)&&"justify-content: center"}; |
| 3896 |
${({compact:e,button:t})=>(e||t)&&"padding: 0"}; |
| 3897 |
|
| 3898 |
/* handle hiding cells */ |
| 3899 |
${({hide:e})=>e&&"sm"===e&&E` |
| 3900 |
display: none; |
| 3901 |
`}; |
| 3902 |
${({hide:e})=>e&&"md"===e&&O` |
| 3903 |
display: none; |
| 3904 |
`}; |
| 3905 |
${({hide:e})=>e&&"lg"===e&&$` |
| 3906 |
display: none; |
| 3907 |
`}; |
| 3908 |
${({hide:e})=>e&&Number.isInteger(e)&&P(e)` |
| 3909 |
display: none; |
| 3910 |
`}; |
| 3911 |
`,H=t.css` |
| 3912 |
div:first-child { |
| 3913 |
white-space: ${({$wrapCell:e})=>e?"normal":"nowrap"}; |
| 3914 |
overflow: ${({$allowOverflow:e})=>e?"visible":"hidden"}; |
| 3915 |
text-overflow: ellipsis; |
| 3916 |
} |
| 3917 |
`,j=i.default(D).attrs((e=>({style:e.style})))` |
| 3918 |
${({$renderAsCell:e})=>!e&&H}; |
| 3919 |
${({theme:e,$isDragging:t})=>t&&e.cells.draggingStyle}; |
| 3920 |
${({$cellStyle:e})=>e}; |
| 3921 |
`;var F=l.memo((function({id:e,column:t,row:n,rowIndex:o,dataTag:a,isDragging:r,onDragStart:i,onDragOver:s,onDragEnd:d,onDragEnter:c,onDragLeave:g}){const{conditionalStyle:u,classNames:p}=m(n,t.conditionalCellStyles,["rdt_TableCell"]);return l.createElement(j,{id:e,"data-column-id":t.id,role:"cell",className:p,"data-tag":a,$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:r,onDragStart:i,onDragOver:s,onDragEnd:d,onDragEnter:c,onDragLeave:g},!t.cell&&l.createElement("div",{"data-tag":a},function(e,t,n,o){return t?n&&"function"==typeof n?n(e,o):t(e,o):null}(n,t.selector,t.format,o)),t.cell&&t.cell(n,o,t,e))}));const T="input";var I=l.memo((function({name:e,component:t=T,componentOptions:n={style:{}},indeterminate:o=!1,checked:a=!1,disabled:r=!1,onClick:i=b}){const s=t,d=s!==T?n.style:(e=>Object.assign(Object.assign({fontSize:"18px"},!e&&{cursor:"pointer"}),{padding:0,marginTop:"1px",verticalAlign:"middle",position:"relative"}))(r),c=l.useMemo((()=>function(e,...t){let n;return Object.keys(e).map((t=>e[t])).forEach(((o,a)=>{const l=e;"function"==typeof o&&(n=Object.assign(Object.assign({},l),{[Object.keys(e)[a]]:o(...t)}))})),n||e}(n,o)),[n,o]);return l.createElement(s,Object.assign({type:"checkbox",ref:e=>{e&&(e.indeterminate=o)},style:d,onClick:r?b:i,name:e,"aria-label":e,checked:a,disabled:r},c,{onChange:b}))}));const M=i.default(k)` |
| 3922 |
flex: 0 0 48px; |
| 3923 |
min-width: 48px; |
| 3924 |
justify-content: center; |
| 3925 |
align-items: center; |
| 3926 |
user-select: none; |
| 3927 |
white-space: nowrap; |
| 3928 |
`;function A({name:e,keyField:t,row:n,rowCount:o,selected:a,selectableRowsComponent:r,selectableRowsComponentProps:i,selectableRowsSingle:s,selectableRowDisabled:d,onSelectedRow:c}){const g=!(!d||!d(n));return l.createElement(M,{onClick:e=>e.stopPropagation(),className:"rdt_TableCell",$noPadding:!0},l.createElement(I,{name:e,component:r,componentOptions:i,checked:a,"aria-checked":a,onClick:()=>{c({type:"SELECT_SINGLE_ROW",row:n,isSelected:a,keyField:t,rowCount:o,singleSelect:s})},disabled:g}))}const L=i.default.button` |
| 3929 |
display: inline-flex; |
| 3930 |
align-items: center; |
| 3931 |
user-select: none; |
| 3932 |
white-space: nowrap; |
| 3933 |
border: none; |
| 3934 |
background-color: transparent; |
| 3935 |
${({theme:e})=>e.expanderButton.style}; |
| 3936 |
`;function _({disabled:e=!1,expanded:t=!1,expandableIcon:n,id:o,row:a,onToggled:r}){const i=t?n.expanded:n.collapsed;return l.createElement(L,{"aria-disabled":e,onClick:()=>r&&r(a),"data-testid":`expander-button-${o}`,disabled:e,"aria-label":t?"Collapse Row":"Expand Row",role:"button",type:"button"},i)}const z=i.default(k)` |
| 3937 |
white-space: nowrap; |
| 3938 |
font-weight: 400; |
| 3939 |
min-width: 48px; |
| 3940 |
${({theme:e})=>e.expanderCell.style}; |
| 3941 |
`;function N({row:e,expanded:t=!1,expandableIcon:n,id:o,onToggled:a,disabled:r=!1}){return l.createElement(z,{onClick:e=>e.stopPropagation(),$noPadding:!0},l.createElement(_,{id:o,row:e,expanded:t,expandableIcon:n,disabled:r,onToggled:a}))}const W=i.default.div` |
| 3942 |
width: 100%; |
| 3943 |
box-sizing: border-box; |
| 3944 |
${({theme:e})=>e.expanderRow.style}; |
| 3945 |
${({$extendedRowStyle:e})=>e}; |
| 3946 |
`;var B=l.memo((function({data:e,ExpanderComponent:t,expanderComponentProps:n,extendedRowStyle:o,extendedClassNames:a}){const r=["rdt_ExpanderRow",...a.split(" ").filter((e=>"rdt_TableRow"!==e))].join(" ");return l.createElement(W,{className:r,$extendedRowStyle:o},l.createElement(t,Object.assign({data:e},n)))}));const G="allowRowEvents";var V,U,q;exports.Direction=void 0,(V=exports.Direction||(exports.Direction={})).LTR="ltr",V.RTL="rtl",V.AUTO="auto",exports.Alignment=void 0,(U=exports.Alignment||(exports.Alignment={})).LEFT="left",U.RIGHT="right",U.CENTER="center",exports.Media=void 0,(q=exports.Media||(exports.Media={})).SM="sm",q.MD="md",q.LG="lg";const Y=t.css` |
| 3947 |
&:hover { |
| 3948 |
${({$highlightOnHover:e,theme:t})=>e&&t.rows.highlightOnHoverStyle}; |
| 3949 |
} |
| 3950 |
`,K=t.css` |
| 3951 |
&:hover { |
| 3952 |
cursor: pointer; |
| 3953 |
} |
| 3954 |
`,J=i.default.div.attrs((e=>({style:e.style})))` |
| 3955 |
display: flex; |
| 3956 |
align-items: stretch; |
| 3957 |
align-content: stretch; |
| 3958 |
width: 100%; |
| 3959 |
box-sizing: border-box; |
| 3960 |
${({theme:e})=>e.rows.style}; |
| 3961 |
${({$dense:e,theme:t})=>e&&t.rows.denseStyle}; |
| 3962 |
${({$striped:e,theme:t})=>e&&t.rows.stripedStyle}; |
| 3963 |
${({$highlightOnHover:e})=>e&&Y}; |
| 3964 |
${({$pointerOnHover:e})=>e&&K}; |
| 3965 |
${({$selected:e,theme:t})=>e&&t.rows.selectedHighlightStyle}; |
| 3966 |
${({$conditionalStyle:e})=>e}; |
| 3967 |
`;function Q({columns:e=[],conditionalRowStyles:t=[],defaultExpanded:n=!1,defaultExpanderDisabled:o=!1,dense:a=!1,expandableIcon:r,expandableRows:i=!1,expandableRowsComponent:d,expandableRowsComponentProps:c,expandableRowsHideExpander:g,expandOnRowClicked:u=!1,expandOnRowDoubleClicked:p=!1,highlightOnHover:f=!1,id:h,expandableInheritConditionalStyles:x,keyField:C,onRowClicked:y=b,onRowDoubleClicked:v=b,onRowMouseEnter:R=b,onRowMouseLeave:S=b,onRowExpandToggled:E=b,onSelectedRow:O=b,pointerOnHover:$=!1,row:P,rowCount:k,rowIndex:D,selectableRowDisabled:H=null,selectableRows:j=!1,selectableRowsComponent:T,selectableRowsComponentProps:I,selectableRowsHighlight:M=!1,selectableRowsSingle:L=!1,selected:_,striped:z=!1,draggingColumnId:W,onDragStart:V,onDragOver:U,onDragEnd:q,onDragEnter:Y,onDragLeave:K}){const[Q,X]=l.useState(n);l.useEffect((()=>{X(n)}),[n]);const Z=l.useCallback((()=>{X(!Q),E(!Q,P)}),[Q,E,P]),ee=$||i&&(u||p),te=l.useCallback((e=>{e.target.getAttribute("data-tag")===G&&(y(P,e),!o&&i&&u&&Z())}),[o,u,i,Z,y,P]),ne=l.useCallback((e=>{e.target.getAttribute("data-tag")===G&&(v(P,e),!o&&i&&p&&Z())}),[o,p,i,Z,v,P]),oe=l.useCallback((e=>{R(P,e)}),[R,P]),ae=l.useCallback((e=>{S(P,e)}),[S,P]),le=s(P,C),{conditionalStyle:re,classNames:ie}=m(P,t,["rdt_TableRow"]),se=M&&_,de=x?re:{},ce=z&&D%2==0;return l.createElement(l.Fragment,null,l.createElement(J,{id:`row-${h}`,role:"row",$striped:ce,$highlightOnHover:f,$pointerOnHover:!o&&ee,$dense:a,onClick:te,onDoubleClick:ne,onMouseEnter:oe,onMouseLeave:ae,className:ie,$selected:se,$conditionalStyle:re},j&&l.createElement(A,{name:`select-row-${le}`,keyField:C,row:P,rowCount:k,selected:_,selectableRowsComponent:T,selectableRowsComponentProps:I,selectableRowDisabled:H,selectableRowsSingle:L,onSelectedRow:O}),i&&!g&&l.createElement(N,{id:le,expandableIcon:r,expanded:Q,row:P,onToggled:Z,disabled:o}),e.map((e=>e.omit?null:l.createElement(F,{id:`cell-${e.id}-${le}`,key:`cell-${e.id}-${le}`,dataTag:e.ignoreRowClick||e.button?null:G,column:e,row:P,rowIndex:D,isDragging:w(W,e.id),onDragStart:V,onDragOver:U,onDragEnd:q,onDragEnter:Y,onDragLeave:K})))),i&&Q&&l.createElement(B,{key:`expander-${le}`,data:P,extendedRowStyle:de,extendedClassNames:ie,ExpanderComponent:d,expanderComponentProps:c}))}const X=i.default.span` |
| 3968 |
padding: 2px; |
| 3969 |
color: inherit; |
| 3970 |
flex-grow: 0; |
| 3971 |
flex-shrink: 0; |
| 3972 |
${({$sortActive:e})=>e?"opacity: 1":"opacity: 0"}; |
| 3973 |
${({$sortDirection:e})=>"desc"===e&&"transform: rotate(180deg)"}; |
| 3974 |
`,Z=({sortActive:e,sortDirection:t})=>r.default.createElement(X,{$sortActive:e,$sortDirection:t},"▲"),ee=i.default(D)` |
| 3975 |
${({button:e})=>e&&"text-align: center"}; |
| 3976 |
${({theme:e,$isDragging:t})=>t&&e.headCells.draggingStyle}; |
| 3977 |
`,te=t.css` |
| 3978 |
cursor: pointer; |
| 3979 |
span.__rdt_custom_sort_icon__ { |
| 3980 |
i, |
| 3981 |
svg { |
| 3982 |
transform: 'translate3d(0, 0, 0)'; |
| 3983 |
${({$sortActive:e})=>e?"opacity: 1":"opacity: 0"}; |
| 3984 |
color: inherit; |
| 3985 |
font-size: 18px; |
| 3986 |
height: 18px; |
| 3987 |
width: 18px; |
| 3988 |
backface-visibility: hidden; |
| 3989 |
transform-style: preserve-3d; |
| 3990 |
transition-duration: 95ms; |
| 3991 |
transition-property: transform; |
| 3992 |
} |
| 3993 |
|
| 3994 |
&.asc i, |
| 3995 |
&.asc svg { |
| 3996 |
transform: rotate(180deg); |
| 3997 |
} |
| 3998 |
} |
| 3999 |
|
| 4000 |
${({$sortActive:e})=>!e&&t.css` |
| 4001 |
&:hover, |
| 4002 |
&:focus { |
| 4003 |
opacity: 0.7; |
| 4004 |
|
| 4005 |
span, |
| 4006 |
span.__rdt_custom_sort_icon__ * { |
| 4007 |
opacity: 0.7; |
| 4008 |
} |
| 4009 |
} |
| 4010 |
`}; |
| 4011 |
`,ne=i.default.div` |
| 4012 |
display: inline-flex; |
| 4013 |
align-items: center; |
| 4014 |
justify-content: inherit; |
| 4015 |
height: 100%; |
| 4016 |
width: 100%; |
| 4017 |
outline: none; |
| 4018 |
user-select: none; |
| 4019 |
overflow: hidden; |
| 4020 |
${({disabled:e})=>!e&&te}; |
| 4021 |
`,oe=i.default.div` |
| 4022 |
overflow: hidden; |
| 4023 |
white-space: nowrap; |
| 4024 |
text-overflow: ellipsis; |
| 4025 |
`;var ae=l.memo((function({column:e,disabled:t,draggingColumnId:n,selectedColumn:o={},sortDirection:r,sortIcon:i,sortServer:s,pagination:d,paginationServer:c,persistSelectedOnSort:g,selectableRowsVisibleOnly:u,onSort:p,onDragStart:b,onDragOver:m,onDragEnd:f,onDragEnter:h,onDragLeave:x}){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[C,y]=l.useState(!1),v=l.useRef(null);if(l.useEffect((()=>{v.current&&y(v.current.scrollWidth>v.current.clientWidth)}),[C]),e.omit)return null;const R=()=>{if(!e.sortable&&!e.selector)return;let t=r;w(o.id,e.id)&&(t=r===a.ASC?a.DESC:a.ASC),p({type:"SORT_CHANGE",sortDirection:t,selectedColumn:e,clearSelectedOnSort:d&&c&&!g||s||u})},S=e=>l.createElement(Z,{sortActive:e,sortDirection:r}),E=()=>l.createElement("span",{className:[r,"__rdt_custom_sort_icon__"].join(" ")},i),O=!(!e.sortable||!w(o.id,e.id)),$=!e.sortable||t,P=e.sortable&&!i&&!e.right,k=e.sortable&&!i&&e.right,D=e.sortable&&i&&!e.right,H=e.sortable&&i&&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:w(e.id,n),onDragStart:b,onDragOver:m,onDragEnd:f,onDragEnter:h,onDragLeave:x},e.name&&l.createElement(ne,{"data-column-id":e.id,"data-sort-id":e.id,role:"columnheader",tabIndex:0,className:"rdt_TableCol_Sortable",onClick:$?void 0:R,onKeyPress:$?void 0:e=>{"Enter"===e.key&&R()},$sortActive:!$&&O,disabled:$},!$&&H&&E(),!$&&k&&S(O),"string"==typeof e.name?l.createElement(oe,{title:C?e.name:void 0,ref:v,"data-column-id":e.id},e.name):e.name,!$&&D&&E(),!$&&P&&S(O)))}));const le=i.default(k)` |
| 4026 |
flex: 0 0 48px; |
| 4027 |
justify-content: center; |
| 4028 |
align-items: center; |
| 4029 |
user-select: none; |
| 4030 |
white-space: nowrap; |
| 4031 |
font-size: unset; |
| 4032 |
`;function re({headCell:e=!0,rowData:t,keyField:n,allSelected:o,mergeSelections:a,selectedRows:r,selectableRowsComponent:i,selectableRowsComponentProps:s,selectableRowDisabled:d,onSelectAllRows:c}){const g=r.length>0&&!o,u=d?t.filter((e=>!d(e))):t,p=0===u.length,b=Math.min(t.length,u.length);return l.createElement(le,{className:"rdt_TableCol",$headCell:e,$noPadding:!0},l.createElement(I,{name:"select-all-rows",component:i,componentOptions:s,onClick:()=>{c({type:"SELECT_ALL_ROWS",rows:u,rowCount:b,mergeSelections:a,keyField:n})},checked:o,indeterminate:g,disabled:p}))}function ie(e=exports.Direction.AUTO){const t="object"==typeof window,[n,o]=l.useState(!1);return l.useEffect((()=>{if(t)if("auto"!==e)o("rtl"===e);else{const e=!(!window.document||!window.document.createElement),t=document.getElementsByTagName("BODY")[0],n=document.getElementsByTagName("HTML")[0],a="rtl"===t.dir||"rtl"===n.dir;o(e&&a)}}),[e,t]),n}const se=i.default.div` |
| 4033 |
display: flex; |
| 4034 |
align-items: center; |
| 4035 |
flex: 1 0 auto; |
| 4036 |
height: 100%; |
| 4037 |
color: ${({theme:e})=>e.contextMenu.fontColor}; |
| 4038 |
font-size: ${({theme:e})=>e.contextMenu.fontSize}; |
| 4039 |
font-weight: 400; |
| 4040 |
`,de=i.default.div` |
| 4041 |
display: flex; |
| 4042 |
align-items: center; |
| 4043 |
justify-content: flex-end; |
| 4044 |
flex-wrap: wrap; |
| 4045 |
`,ce=i.default.div` |
| 4046 |
position: absolute; |
| 4047 |
top: 0; |
| 4048 |
left: 0; |
| 4049 |
width: 100%; |
| 4050 |
height: 100%; |
| 4051 |
box-sizing: inherit; |
| 4052 |
z-index: 1; |
| 4053 |
align-items: center; |
| 4054 |
justify-content: space-between; |
| 4055 |
display: flex; |
| 4056 |
${({$rtl:e})=>e&&"direction: rtl"}; |
| 4057 |
${({theme:e})=>e.contextMenu.style}; |
| 4058 |
${({theme:e,$visible:t})=>t&&e.contextMenu.activeStyle}; |
| 4059 |
`;function ge({contextMessage:e,contextActions:t,contextComponent:n,selectedCount:o,direction:a}){const r=ie(a),i=o>0;return n?l.createElement(ce,{$visible:i},l.cloneElement(n,{selectedCount:o})):l.createElement(ce,{$visible:i,$rtl:r},l.createElement(se,null,((e,t,n)=>{if(0===t)return null;const o=1===t?e.singular:e.plural;return n?`${t} ${e.message||""} ${o}`:`${t} ${o} ${e.message||""}`})(e,o,r)),l.createElement(de,null,t))}const ue=i.default.div` |
| 4060 |
position: relative; |
| 4061 |
box-sizing: border-box; |
| 4062 |
overflow: hidden; |
| 4063 |
display: flex; |
| 4064 |
flex: 1 1 auto; |
| 4065 |
align-items: center; |
| 4066 |
justify-content: space-between; |
| 4067 |
width: 100%; |
| 4068 |
flex-wrap: wrap; |
| 4069 |
${({theme:e})=>e.header.style} |
| 4070 |
`,pe=i.default.div` |
| 4071 |
flex: 1 0 auto; |
| 4072 |
color: ${({theme:e})=>e.header.fontColor}; |
| 4073 |
font-size: ${({theme:e})=>e.header.fontSize}; |
| 4074 |
font-weight: 400; |
| 4075 |
`,be=i.default.div` |
| 4076 |
flex: 1 0 auto; |
| 4077 |
display: flex; |
| 4078 |
align-items: center; |
| 4079 |
justify-content: flex-end; |
| 4080 |
|
| 4081 |
> * { |
| 4082 |
margin-left: 5px; |
| 4083 |
} |
| 4084 |
`,me=({title:e,actions:t=null,contextMessage:n,contextActions:o,contextComponent:a,selectedCount:r,direction:i,showMenu:s=!0})=>l.createElement(ue,{className:"rdt_TableHeader",role:"heading","aria-level":1},l.createElement(pe,null,e),t&&l.createElement(be,null,t),s&&l.createElement(ge,{contextMessage:n,contextActions:o,contextComponent:a,direction:i,selectedCount:r}));function fe(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]])}return n}"function"==typeof SuppressedError&&SuppressedError;const he={left:"flex-start",right:"flex-end",center:"center"},we=i.default.header` |
| 4085 |
position: relative; |
| 4086 |
display: flex; |
| 4087 |
flex: 1 1 auto; |
| 4088 |
box-sizing: border-box; |
| 4089 |
align-items: center; |
| 4090 |
padding: 4px 16px 4px 24px; |
| 4091 |
width: 100%; |
| 4092 |
justify-content: ${({align:e})=>he[e]}; |
| 4093 |
flex-wrap: ${({$wrapContent:e})=>e?"wrap":"nowrap"}; |
| 4094 |
${({theme:e})=>e.subHeader.style} |
| 4095 |
`,xe=e=>{var{align:t="right",wrapContent:n=!0}=e,o=fe(e,["align","wrapContent"]);return l.createElement(we,Object.assign({align:t,$wrapContent:n},o))},Ce=i.default.div` |
| 4096 |
display: flex; |
| 4097 |
flex-direction: column; |
| 4098 |
`,ye=i.default.div` |
| 4099 |
position: relative; |
| 4100 |
width: 100%; |
| 4101 |
border-radius: inherit; |
| 4102 |
${({$responsive:e,$fixedHeader:n})=>e&&t.css` |
| 4103 |
overflow-x: auto; |
| 4104 |
|
| 4105 |
// hidden prevents vertical scrolling in firefox when fixedHeader is disabled |
| 4106 |
overflow-y: ${n?"auto":"hidden"}; |
| 4107 |
min-height: 0; |
| 4108 |
`}; |
| 4109 |
|
| 4110 |
${({$fixedHeader:e=!1,$fixedHeaderScrollHeight:n="100vh"})=>e&&t.css` |
| 4111 |
max-height: ${n}; |
| 4112 |
-webkit-overflow-scrolling: touch; |
| 4113 |
`}; |
| 4114 |
|
| 4115 |
${({theme:e})=>e.responsiveWrapper.style}; |
| 4116 |
`,ve=i.default.div` |
| 4117 |
position: relative; |
| 4118 |
box-sizing: border-box; |
| 4119 |
width: 100%; |
| 4120 |
height: 100%; |
| 4121 |
${e=>e.theme.progress.style}; |
| 4122 |
`,Re=i.default.div` |
| 4123 |
position: relative; |
| 4124 |
width: 100%; |
| 4125 |
${({theme:e})=>e.tableWrapper.style}; |
| 4126 |
`,Se=i.default(k)` |
| 4127 |
white-space: nowrap; |
| 4128 |
${({theme:e})=>e.expanderCell.style}; |
| 4129 |
`,Ee=i.default.div` |
| 4130 |
box-sizing: border-box; |
| 4131 |
width: 100%; |
| 4132 |
height: 100%; |
| 4133 |
${({theme:e})=>e.noData.style}; |
| 4134 |
`,Oe=()=>r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},r.default.createElement("path",{d:"M7 10l5 5 5-5z"}),r.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})),$e=i.default.select` |
| 4135 |
cursor: pointer; |
| 4136 |
height: 24px; |
| 4137 |
max-width: 100%; |
| 4138 |
user-select: none; |
| 4139 |
padding-left: 8px; |
| 4140 |
padding-right: 24px; |
| 4141 |
box-sizing: content-box; |
| 4142 |
font-size: inherit; |
| 4143 |
color: inherit; |
| 4144 |
border: none; |
| 4145 |
background-color: transparent; |
| 4146 |
appearance: none; |
| 4147 |
direction: ltr; |
| 4148 |
flex-shrink: 0; |
| 4149 |
|
| 4150 |
&::-ms-expand { |
| 4151 |
display: none; |
| 4152 |
} |
| 4153 |
|
| 4154 |
&:disabled::-ms-expand { |
| 4155 |
background: #f60; |
| 4156 |
} |
| 4157 |
|
| 4158 |
option { |
| 4159 |
color: initial; |
| 4160 |
} |
| 4161 |
`,Pe=i.default.div` |
| 4162 |
position: relative; |
| 4163 |
flex-shrink: 0; |
| 4164 |
font-size: inherit; |
| 4165 |
color: inherit; |
| 4166 |
margin-top: 1px; |
| 4167 |
|
| 4168 |
svg { |
| 4169 |
top: 0; |
| 4170 |
right: 0; |
| 4171 |
color: inherit; |
| 4172 |
position: absolute; |
| 4173 |
fill: currentColor; |
| 4174 |
width: 24px; |
| 4175 |
height: 24px; |
| 4176 |
display: inline-block; |
| 4177 |
user-select: none; |
| 4178 |
pointer-events: none; |
| 4179 |
} |
| 4180 |
`,ke=e=>{var{defaultValue:t,onChange:n}=e,o=fe(e,["defaultValue","onChange"]);return l.createElement(Pe,null,l.createElement($e,Object.assign({onChange:n,defaultValue:t},o)),l.createElement(Oe,null))},De={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 r.default.createElement("div",null,"To add an expander pass in a component instance via ",r.default.createElement("strong",null,"expandableRowsComponent"),". You can then access props.data from this component.")},expandableIcon:{collapsed:r.default.createElement((()=>r.default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},r.default.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),r.default.createElement("path",{d:"M0-.25h24v24H0z",fill:"none"}))),null),expanded:r.default.createElement((()=>r.default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},r.default.createElement("path",{d:"M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"}),r.default.createElement("path",{d:"M0-.75h24v24H0z",fill:"none"}))),null)},expandableRowsComponentProps:{},progressPending:!1,progressComponent:r.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:r.default.createElement("div",{style:{padding:"24px"}},"There are no records to display"),disabled:!1,noTableHead:!1,noHeader:!1,subHeader:!1,subHeaderAlign:exports.Alignment.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:r.default.createElement((()=>r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},r.default.createElement("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),r.default.createElement("path",{fill:"none",d:"M24 24H0V0h24v24z"}))),null),paginationIconLastPage:r.default.createElement((()=>r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},r.default.createElement("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),r.default.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))),null),paginationIconNext:r.default.createElement((()=>r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},r.default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),r.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),paginationIconPrevious:r.default.createElement((()=>r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},r.default.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),r.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),dense:!1,conditionalRowStyles:[],theme:"default",customStyles:{},direction:exports.Direction.AUTO,onChangePage:b,onChangeRowsPerPage:b,onRowClicked:b,onRowDoubleClicked:b,onRowMouseEnter:b,onRowMouseLeave:b,onRowExpandToggled:b,onSelectedRowsChange:b,onSort:b,onColumnOrderChange:b},He={rowsPerPageText:"Rows per page:",rangeSeparatorText:"of",noRowsPerPage:!1,selectAllRowsItem:!1,selectAllRowsItemText:"All"},je=i.default.nav` |
| 4181 |
display: flex; |
| 4182 |
flex: 1 1 auto; |
| 4183 |
justify-content: flex-end; |
| 4184 |
align-items: center; |
| 4185 |
box-sizing: border-box; |
| 4186 |
padding-right: 8px; |
| 4187 |
padding-left: 8px; |
| 4188 |
width: 100%; |
| 4189 |
${({theme:e})=>e.pagination.style}; |
| 4190 |
`,Fe=i.default.button` |
| 4191 |
position: relative; |
| 4192 |
display: block; |
| 4193 |
user-select: none; |
| 4194 |
border: none; |
| 4195 |
${({theme:e})=>e.pagination.pageButtonsStyle}; |
| 4196 |
${({$isRTL:e})=>e&&"transform: scale(-1, -1)"}; |
| 4197 |
`,Te=i.default.div` |
| 4198 |
display: flex; |
| 4199 |
align-items: center; |
| 4200 |
border-radius: 4px; |
| 4201 |
white-space: nowrap; |
| 4202 |
${E` |
| 4203 |
width: 100%; |
| 4204 |
justify-content: space-around; |
| 4205 |
`}; |
| 4206 |
`,Ie=i.default.span` |
| 4207 |
flex-shrink: 1; |
| 4208 |
user-select: none; |
| 4209 |
`,Me=i.default(Ie)` |
| 4210 |
margin: 0 24px; |
| 4211 |
`,Ae=i.default(Ie)` |
| 4212 |
margin: 0 4px; |
| 4213 |
`;var Le=l.memo((function({rowsPerPage:e,rowCount:t,currentPage:n,direction:o=De.direction,paginationRowsPerPageOptions:a=De.paginationRowsPerPageOptions,paginationIconLastPage:r=De.paginationIconLastPage,paginationIconFirstPage:i=De.paginationIconFirstPage,paginationIconNext:s=De.paginationIconNext,paginationIconPrevious:d=De.paginationIconPrevious,paginationComponentOptions:c=De.paginationComponentOptions,onChangeRowsPerPage:g=De.onChangeRowsPerPage,onChangePage:p=De.onChangePage}){const b=(()=>{const e="object"==typeof window;function t(){return{width:e?window.innerWidth:void 0,height:e?window.innerHeight:void 0}}const[n,o]=l.useState(t);return l.useEffect((()=>{if(!e)return()=>null;function n(){o(t())}return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[]),n})(),m=ie(o),f=b.width&&b.width>599,h=u(t,e),w=n*e,x=w-e+1,C=1===n,y=n===h,v=Object.assign(Object.assign({},He),c),R=n===h?`${x}-${t} ${v.rangeSeparatorText} ${t}`:`${x}-${w} ${v.rangeSeparatorText} ${t}`,S=l.useCallback((()=>p(n-1)),[n,p]),E=l.useCallback((()=>p(n+1)),[n,p]),O=l.useCallback((()=>p(1)),[p]),$=l.useCallback((()=>p(u(t,e))),[p,t,e]),P=l.useCallback((e=>g(Number(e.target.value),n)),[n,g]),k=a.map((e=>l.createElement("option",{key:e,value:e},e)));v.selectAllRowsItem&&k.push(l.createElement("option",{key:-1,value:t},v.selectAllRowsItemText));const D=l.createElement(ke,{onChange:P,defaultValue:e,"aria-label":v.rowsPerPageText},k);return l.createElement(je,{className:"rdt_Pagination"},!v.noRowsPerPage&&f&&l.createElement(l.Fragment,null,l.createElement(Ae,null,v.rowsPerPageText),D),f&&l.createElement(Me,null,R),l.createElement(Te,null,l.createElement(Fe,{id:"pagination-first-page",type:"button","aria-label":"First Page","aria-disabled":C,onClick:O,disabled:C,$isRTL:m},i),l.createElement(Fe,{id:"pagination-previous-page",type:"button","aria-label":"Previous Page","aria-disabled":C,onClick:S,disabled:C,$isRTL:m},d),!v.noRowsPerPage&&!f&&D,l.createElement(Fe,{id:"pagination-next-page",type:"button","aria-label":"Next Page","aria-disabled":y,onClick:E,disabled:y,$isRTL:m},s),l.createElement(Fe,{id:"pagination-last-page",type:"button","aria-label":"Last Page","aria-disabled":y,onClick:$,disabled:y,$isRTL:m},r)))}));const _e=(e,t)=>{const n=l.useRef(!0);l.useEffect((()=>{n.current?n.current=!1:e()}),t)};function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ne=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===We}(e)}(e)};var We="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Be(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Ye((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Ge(e,t,n){return e.concat(t).map((function(e){return Be(e,n)}))}function Ve(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 Ue(e,t){try{return t in e}catch(e){return!1}}function qe(e,t,n){var o={};return n.isMergeableObject(e)&&Ve(e).forEach((function(t){o[t]=Be(e[t],n)})),Ve(t).forEach((function(a){(function(e,t){return Ue(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(Ue(e,a)&&n.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return Ye;var n=t.customMerge(e);return"function"==typeof n?n:Ye}(a,n)(e[a],t[a],n):o[a]=Be(t[a],n))})),o}function Ye(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Ge,n.isMergeableObject=n.isMergeableObject||Ne,n.cloneUnlessOtherwiseSpecified=Be;var o=Array.isArray(t);return o===Array.isArray(e)?o?n.arrayMerge(e,t,n):qe(e,t,n):Be(t,n)}Ye.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Ye(e,n,t)}),{})};var Ke=ze(Ye);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)"}},Qe={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"}}};function Xe(e,t,n,o){const[r,i]=l.useState((()=>g(e))),[s,d]=l.useState(""),c=l.useRef("");_e((()=>{i(g(e))}),[e]);const u=l.useCallback((e=>{var t,n,o;const{attributes:a}=e.target,l=null===(t=a.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;l&&(c.current=(null===(o=null===(n=r[h(r,l)])||void 0===n?void 0:n.id)||void 0===o?void 0:o.toString())||"",d(c.current))}),[r]),p=l.useCallback((e=>{var n;const{attributes:o}=e.target,a=null===(n=o.getNamedItem("data-column-id"))||void 0===n?void 0:n.value;if(a&&c.current&&a!==c.current){const e=h(r,c.current),n=h(r,a),o=[...r];o[e]=r[n],o[n]=r[e],i(o),t(o)}}),[t,r]),b=l.useCallback((e=>{e.preventDefault()}),[]),m=l.useCallback((e=>{e.preventDefault()}),[]),f=l.useCallback((e=>{e.preventDefault(),c.current="",d("")}),[]),w=function(e=!1){return e?a.ASC:a.DESC}(o),x=l.useMemo((()=>r[h(r,null==n?void 0:n.toString())]||{}),[n,r]);return{tableColumns:r,draggingColumnId:s,handleDragStart:u,handleDragEnter:p,handleDragOver:b,handleDragLeave:m,handleDragEnd:f,defaultSortDirection:w,defaultSortColumn:x}}var Ze=l.memo((function(e){const{data:n=De.data,columns:o=De.columns,title:r=De.title,actions:i=De.actions,keyField:d=De.keyField,striped:c=De.striped,highlightOnHover:g=De.highlightOnHover,pointerOnHover:b=De.pointerOnHover,dense:m=De.dense,selectableRows:h=De.selectableRows,selectableRowsSingle:w=De.selectableRowsSingle,selectableRowsHighlight:C=De.selectableRowsHighlight,selectableRowsNoSelectAll:v=De.selectableRowsNoSelectAll,selectableRowsVisibleOnly:E=De.selectableRowsVisibleOnly,selectableRowSelected:O=De.selectableRowSelected,selectableRowDisabled:$=De.selectableRowDisabled,selectableRowsComponent:P=De.selectableRowsComponent,selectableRowsComponentProps:D=De.selectableRowsComponentProps,onRowExpandToggled:H=De.onRowExpandToggled,onSelectedRowsChange:j=De.onSelectedRowsChange,expandableIcon:F=De.expandableIcon,onChangeRowsPerPage:T=De.onChangeRowsPerPage,onChangePage:I=De.onChangePage,paginationServer:M=De.paginationServer,paginationServerOptions:A=De.paginationServerOptions,paginationTotalRows:L=De.paginationTotalRows,paginationDefaultPage:_=De.paginationDefaultPage,paginationResetDefaultPage:z=De.paginationResetDefaultPage,paginationPerPage:N=De.paginationPerPage,paginationRowsPerPageOptions:W=De.paginationRowsPerPageOptions,paginationIconLastPage:B=De.paginationIconLastPage,paginationIconFirstPage:G=De.paginationIconFirstPage,paginationIconNext:V=De.paginationIconNext,paginationIconPrevious:U=De.paginationIconPrevious,paginationComponent:q=De.paginationComponent,paginationComponentOptions:Y=De.paginationComponentOptions,responsive:K=De.responsive,progressPending:J=De.progressPending,progressComponent:X=De.progressComponent,persistTableHead:Z=De.persistTableHead,noDataComponent:ee=De.noDataComponent,disabled:te=De.disabled,noTableHead:ne=De.noTableHead,noHeader:oe=De.noHeader,fixedHeader:le=De.fixedHeader,fixedHeaderScrollHeight:ie=De.fixedHeaderScrollHeight,pagination:se=De.pagination,subHeader:de=De.subHeader,subHeaderAlign:ce=De.subHeaderAlign,subHeaderWrap:ge=De.subHeaderWrap,subHeaderComponent:ue=De.subHeaderComponent,noContextMenu:pe=De.noContextMenu,contextMessage:be=De.contextMessage,contextActions:fe=De.contextActions,contextComponent:he=De.contextComponent,expandableRows:we=De.expandableRows,onRowClicked:Oe=De.onRowClicked,onRowDoubleClicked:$e=De.onRowDoubleClicked,onRowMouseEnter:Pe=De.onRowMouseEnter,onRowMouseLeave:ke=De.onRowMouseLeave,sortIcon:He=De.sortIcon,onSort:je=De.onSort,sortFunction:Fe=De.sortFunction,sortServer:Te=De.sortServer,expandableRowsComponent:Ie=De.expandableRowsComponent,expandableRowsComponentProps:Me=De.expandableRowsComponentProps,expandableRowDisabled:Ae=De.expandableRowDisabled,expandableRowsHideExpander:ze=De.expandableRowsHideExpander,expandOnRowClicked:Ne=De.expandOnRowClicked,expandOnRowDoubleClicked:We=De.expandOnRowDoubleClicked,expandableRowExpanded:Be=De.expandableRowExpanded,expandableInheritConditionalStyles:Ge=De.expandableInheritConditionalStyles,defaultSortFieldId:Ve=De.defaultSortFieldId,defaultSortAsc:Ue=De.defaultSortAsc,clearSelectedRows:qe=De.clearSelectedRows,conditionalRowStyles:Ye=De.conditionalRowStyles,theme:Je=De.theme,customStyles:Ze=De.customStyles,direction:et=De.direction,onColumnOrderChange:tt=De.onColumnOrderChange,className:nt}=e,{tableColumns:ot,draggingColumnId:at,handleDragStart:lt,handleDragEnter:rt,handleDragOver:it,handleDragLeave:st,handleDragEnd:dt,defaultSortDirection:ct,defaultSortColumn:gt}=Xe(o,tt,Ve,Ue),[{rowsPerPage:ut,currentPage:pt,selectedRows:bt,allSelected:mt,selectedCount:ft,selectedColumn:ht,sortDirection:wt,toggleOnSelectedRowsChange:xt},Ct]=l.useReducer(x,{allSelected:!1,selectedCount:0,selectedRows:[],selectedColumn:gt,toggleOnSelectedRowsChange:!1,sortDirection:ct,currentPage:_,rowsPerPage:N,selectedRowsFlag:!1,contextMessage:De.contextMessage}),{persistSelectedOnSort:yt=!1,persistSelectedOnPageChange:vt=!1}=A,Rt=!(!M||!vt&&!yt),St=se&&!J&&n.length>0,Et=q||Le,Ot=l.useMemo((()=>((e={},t="default",n="default")=>{const o=Qe[t]?t:n;return Ke({table:{style:{color:(a=Qe[o]).text.primary,backgroundColor:a.background.default}},tableWrapper:{style:{display:"table"}},responsiveWrapper:{style:{}},header:{style:{fontSize:"22px",color:a.text.primary,backgroundColor:a.background.default,minHeight:"56px",paddingLeft:"16px",paddingRight:"8px"}},subHeader:{style:{backgroundColor:a.background.default,minHeight:"52px"}},head:{style:{color:a.text.primary,fontSize:"12px",fontWeight:500}},headRow:{style:{backgroundColor:a.background.default,minHeight:"52px",borderBottomWidth:"1px",borderBottomColor:a.divider.default,borderBottomStyle:"solid"},denseStyle:{minHeight:"32px"}},headCells:{style:{paddingLeft:"16px",paddingRight:"16px"},draggingStyle:{cursor:"move"}},contextMenu:{style:{backgroundColor:a.context.background,fontSize:"18px",fontWeight:400,color:a.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:a.text.primary,backgroundColor:a.background.default,minHeight:"48px","&:not(:last-of-type)":{borderBottomStyle:"solid",borderBottomWidth:"1px",borderBottomColor:a.divider.default}},denseStyle:{minHeight:"32px"},selectedHighlightStyle:{"&:nth-of-type(n)":{color:a.selected.text,backgroundColor:a.selected.default,borderBottomColor:a.background.default}},highlightOnHoverStyle:{color:a.highlightOnHover.text,backgroundColor:a.highlightOnHover.default,transitionDuration:"0.15s",transitionProperty:"background-color",borderBottomColor:a.background.default,outlineStyle:"solid",outlineWidth:"1px",outlineColor:a.background.default},stripedStyle:{color:a.striped.text,backgroundColor:a.striped.default}},expanderRow:{style:{color:a.text.primary,backgroundColor:a.background.default}},expanderCell:{style:{flex:"0 0 48px"}},expanderButton:{style:{color:a.button.default,fill:a.button.default,backgroundColor:"transparent",borderRadius:"2px",transition:"0.25s",height:"100%",width:"100%","&:hover:enabled":{cursor:"pointer"},"&:disabled":{color:a.button.disabled},"&:hover:not(:disabled)":{cursor:"pointer",backgroundColor:a.button.hover},"&:focus":{outline:"none",backgroundColor:a.button.focus},svg:{margin:"auto"}}},pagination:{style:{color:a.text.secondary,fontSize:"13px",minHeight:"56px",backgroundColor:a.background.default,borderTopStyle:"solid",borderTopWidth:"1px",borderTopColor:a.divider.default},pageButtonsStyle:{borderRadius:"50%",height:"40px",width:"40px",padding:"8px",margin:"px",cursor:"pointer",transition:"0.4s",color:a.button.default,fill:a.button.default,backgroundColor:"transparent","&:disabled":{cursor:"unset",color:a.button.disabled,fill:a.button.disabled},"&:hover:not(:disabled)":{backgroundColor:a.button.hover},"&:focus":{outline:"none",backgroundColor:a.button.focus}}},noData:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:a.text.primary,backgroundColor:a.background.default}},progress:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:a.text.primary,backgroundColor:a.background.default}}},e);var a})(Ze,Je)),[Ze,Je]),$t=l.useMemo((()=>Object.assign({},"auto"!==et&&{dir:et})),[et]),Pt=l.useMemo((()=>{if(Te)return n;if((null==ht?void 0:ht.sortFunction)&&"function"==typeof ht.sortFunction){const e=ht.sortFunction,t=wt===a.ASC?e:(t,n)=>-1*e(t,n);return[...n].sort(t)}return function(e,t,n,o){return t?o&&"function"==typeof o?o(e.slice(0),t,n):e.slice(0).sort(((e,o)=>{const a=t(e),l=t(o);if("asc"===n){if(a<l)return-1;if(a>l)return 1}if("desc"===n){if(a>l)return-1;if(a<l)return 1}return 0})):e}(n,null==ht?void 0:ht.selector,wt,Fe)}),[Te,ht,wt,n,Fe]),kt=l.useMemo((()=>{if(se&&!M){const e=pt*ut,t=e-ut;return Pt.slice(t,e)}return Pt}),[pt,se,M,ut,Pt]),Dt=l.useCallback((e=>{Ct(e)}),[]),Ht=l.useCallback((e=>{Ct(e)}),[]),jt=l.useCallback((e=>{Ct(e)}),[]),Ft=l.useCallback(((e,t)=>Oe(e,t)),[Oe]),Tt=l.useCallback(((e,t)=>$e(e,t)),[$e]),It=l.useCallback(((e,t)=>Pe(e,t)),[Pe]),Mt=l.useCallback(((e,t)=>ke(e,t)),[ke]),At=l.useCallback((e=>Ct({type:"CHANGE_PAGE",page:e,paginationServer:M,visibleOnly:E,persistSelectedOnPageChange:vt})),[M,vt,E]),Lt=l.useCallback((e=>{const t=u(L||kt.length,e),n=p(pt,t);M||At(n),Ct({type:"CHANGE_ROWS_PER_PAGE",page:n,rowsPerPage:e})}),[pt,At,M,L,kt.length]);if(se&&!M&&Pt.length>0&&0===kt.length){const e=u(Pt.length,ut),t=p(pt,e);At(t)}_e((()=>{j({allSelected:mt,selectedCount:ft,selectedRows:bt.slice(0)})}),[xt]),_e((()=>{je(ht,wt,Pt.slice(0))}),[ht,wt]),_e((()=>{I(pt,L||Pt.length)}),[pt]),_e((()=>{T(ut,pt)}),[ut]),_e((()=>{At(_)}),[_,z]),_e((()=>{if(se&&M&&L>0){const e=u(L,ut),t=p(pt,e);pt!==t&&At(t)}}),[L]),l.useEffect((()=>{Ct({type:"CLEAR_SELECTED_ROWS",selectedRowsFlag:qe})}),[w,qe]),l.useEffect((()=>{if(!O)return;const e=Pt.filter((e=>O(e))),t=w?e.slice(0,1):e;Ct({type:"SELECT_MULTIPLE_ROWS",keyField:d,selectedRows:t,totalRows:Pt.length,mergeSelections:Rt})}),[n,O]);const _t=E?kt:Pt,zt=vt||w||v;return l.createElement(t.ThemeProvider,{theme:Ot},!oe&&(!!r||!!i)&&l.createElement(me,{title:r,actions:i,showMenu:!pe,selectedCount:ft,direction:et,contextActions:fe,contextComponent:he,contextMessage:be}),de&&l.createElement(xe,{align:ce,wrapContent:ge},ue),l.createElement(ye,Object.assign({$responsive:K,$fixedHeader:le,$fixedHeaderScrollHeight:ie,className:nt},$t),l.createElement(Re,null,J&&!Z&&l.createElement(ve,null,X),l.createElement(y,{disabled:te,className:"rdt_Table",role:"table"},!ne&&(!!Z||Pt.length>0&&!J)&&l.createElement(R,{className:"rdt_TableHead",role:"rowgroup",$fixedHeader:le},l.createElement(S,{className:"rdt_TableHeadRow",role:"row",$dense:m},h&&(zt?l.createElement(k,{style:{flex:"0 0 48px"}}):l.createElement(re,{allSelected:mt,selectedRows:bt,selectableRowsComponent:P,selectableRowsComponentProps:D,selectableRowDisabled:$,rowData:_t,keyField:d,mergeSelections:Rt,onSelectAllRows:Ht})),we&&!ze&&l.createElement(Se,null),ot.map((e=>l.createElement(ae,{key:e.id,column:e,selectedColumn:ht,disabled:J||0===Pt.length,pagination:se,paginationServer:M,persistSelectedOnSort:yt,selectableRowsVisibleOnly:E,sortDirection:wt,sortIcon:He,sortServer:Te,onSort:Dt,onDragStart:lt,onDragOver:it,onDragEnd:dt,onDragEnter:rt,onDragLeave:st,draggingColumnId:at}))))),!Pt.length&&!J&&l.createElement(Ee,null,ee),J&&Z&&l.createElement(ve,null,X),!J&&Pt.length>0&&l.createElement(Ce,{className:"rdt_TableBody",role:"rowgroup"},kt.map(((e,t)=>{const n=s(e,d),o=function(e=""){return"number"!=typeof e&&(!e||0===e.length)}(n)?t:n,a=f(e,bt,d),r=!!(we&&Be&&Be(e)),i=!!(we&&Ae&&Ae(e));return l.createElement(Q,{id:o,key:o,keyField:d,"data-row-id":o,columns:ot,row:e,rowCount:Pt.length,rowIndex:t,selectableRows:h,expandableRows:we,expandableIcon:F,highlightOnHover:g,pointerOnHover:b,dense:m,expandOnRowClicked:Ne,expandOnRowDoubleClicked:We,expandableRowsComponent:Ie,expandableRowsComponentProps:Me,expandableRowsHideExpander:ze,defaultExpanderDisabled:i,defaultExpanded:r,expandableInheritConditionalStyles:Ge,conditionalRowStyles:Ye,selected:a,selectableRowsHighlight:C,selectableRowsComponent:P,selectableRowsComponentProps:D,selectableRowDisabled:$,selectableRowsSingle:w,striped:c,onRowExpandToggled:H,onRowClicked:Ft,onRowDoubleClicked:Tt,onRowMouseEnter:It,onRowMouseLeave:Mt,onSelectedRow:jt,draggingColumnId:at,onDragStart:lt,onDragOver:it,onDragEnd:dt,onDragEnter:rt,onDragLeave:st})})))))),St&&l.createElement("div",null,l.createElement(Et,{onChangePage:At,onChangeRowsPerPage:Lt,rowCount:L||Pt.length,currentPage:pt,rowsPerPage:ut,direction:et,paginationRowsPerPageOptions:W,paginationIconLastPage:B,paginationIconFirstPage:G,paginationIconNext:V,paginationIconPrevious:U,paginationComponentOptions:Y})))}));exports.STOP_PROP_TAG=G,exports.createTheme=function(e="default",t,n="default"){return Qe[e]||(Qe[e]=Ke(Qe[n],t||{})),Qe[e]=Ke(Qe[e],t||{}),Qe[e]},exports["default"]=Ze,exports.defaultThemes=Qe; |
| 4214 |
//# sourceMappingURL=index.cjs.js.map |
| 4215 |
|
| 4216 |
|
| 4217 |
/***/ }), |
| 4218 |
|
| 4219 |
/***/ "./node_modules/shallowequal/index.js": |
| 4220 |
/*!********************************************!*\ |
| 4221 |
!*** ./node_modules/shallowequal/index.js ***! |
| 4222 |
\********************************************/ |
| 4223 |
/***/ ((module) => { |
| 4224 |
|
| 4225 |
// |
| 4226 |
|
| 4227 |
module.exports = function shallowEqual(objA, objB, compare, compareContext) { |
| 4228 |
var ret = compare ? compare.call(compareContext, objA, objB) : void 0; |
| 4229 |
|
| 4230 |
if (ret !== void 0) { |
| 4231 |
return !!ret; |
| 4232 |
} |
| 4233 |
|
| 4234 |
if (objA === objB) { |
| 4235 |
return true; |
| 4236 |
} |
| 4237 |
|
| 4238 |
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) { |
| 4239 |
return false; |
| 4240 |
} |
| 4241 |
|
| 4242 |
var keysA = Object.keys(objA); |
| 4243 |
var keysB = Object.keys(objB); |
| 4244 |
|
| 4245 |
if (keysA.length !== keysB.length) { |
| 4246 |
return false; |
| 4247 |
} |
| 4248 |
|
| 4249 |
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); |
| 4250 |
|
| 4251 |
// Test for A's keys different from B. |
| 4252 |
for (var idx = 0; idx < keysA.length; idx++) { |
| 4253 |
var key = keysA[idx]; |
| 4254 |
|
| 4255 |
if (!bHasOwnProperty(key)) { |
| 4256 |
return false; |
| 4257 |
} |
| 4258 |
|
| 4259 |
var valueA = objA[key]; |
| 4260 |
var valueB = objB[key]; |
| 4261 |
|
| 4262 |
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; |
| 4263 |
|
| 4264 |
if (ret === false || (ret === void 0 && valueA !== valueB)) { |
| 4265 |
return false; |
| 4266 |
} |
| 4267 |
} |
| 4268 |
|
| 4269 |
return true; |
| 4270 |
}; |
| 4271 |
|
| 4272 |
|
| 4273 |
/***/ }), |
| 4274 |
|
| 4275 |
/***/ "./node_modules/styled-components/dist/styled-components.browser.esm.js": |
| 4276 |
/*!******************************************************************************!*\ |
| 4277 |
!*** ./node_modules/styled-components/dist/styled-components.browser.esm.js ***! |
| 4278 |
\******************************************************************************/ |
| 4279 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 4280 |
|
| 4281 |
"use strict"; |
| 4282 |
__webpack_require__.r(__webpack_exports__); |
| 4283 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4284 |
/* harmony export */ ServerStyleSheet: () => (/* binding */ vt), |
| 4285 |
/* harmony export */ StyleSheetConsumer: () => (/* binding */ Be), |
| 4286 |
/* harmony export */ StyleSheetContext: () => (/* binding */ $e), |
| 4287 |
/* harmony export */ StyleSheetManager: () => (/* binding */ Ye), |
| 4288 |
/* harmony export */ ThemeConsumer: () => (/* binding */ tt), |
| 4289 |
/* harmony export */ ThemeContext: () => (/* binding */ et), |
| 4290 |
/* harmony export */ ThemeProvider: () => (/* binding */ ot), |
| 4291 |
/* harmony export */ __PRIVATE__: () => (/* binding */ gt), |
| 4292 |
/* harmony export */ createGlobalStyle: () => (/* binding */ ft), |
| 4293 |
/* harmony export */ css: () => (/* binding */ lt), |
| 4294 |
/* harmony export */ "default": () => (/* binding */ dt), |
| 4295 |
/* harmony export */ isStyledComponent: () => (/* binding */ se), |
| 4296 |
/* harmony export */ keyframes: () => (/* binding */ mt), |
| 4297 |
/* harmony export */ styled: () => (/* binding */ dt), |
| 4298 |
/* harmony export */ useTheme: () => (/* binding */ nt), |
| 4299 |
/* harmony export */ version: () => (/* binding */ v), |
| 4300 |
/* harmony export */ withTheme: () => (/* binding */ yt) |
| 4301 |
/* harmony export */ }); |
| 4302 |
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/styled-components/node_modules/tslib/tslib.es6.mjs"); |
| 4303 |
/* harmony import */ var _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/is-prop-valid */ "./node_modules/styled-components/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js"); |
| 4304 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); |
| 4305 |
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); |
| 4306 |
/* harmony import */ var shallowequal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! shallowequal */ "./node_modules/shallowequal/index.js"); |
| 4307 |
/* harmony import */ var shallowequal__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(shallowequal__WEBPACK_IMPORTED_MODULE_2__); |
| 4308 |
/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! stylis */ "./node_modules/styled-components/node_modules/stylis/src/Enum.js"); |
| 4309 |
/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! stylis */ "./node_modules/styled-components/node_modules/stylis/src/Middleware.js"); |
| 4310 |
/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! stylis */ "./node_modules/styled-components/node_modules/stylis/src/Serializer.js"); |
| 4311 |
/* harmony import */ var stylis__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! stylis */ "./node_modules/styled-components/node_modules/stylis/src/Parser.js"); |
| 4312 |
/* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/styled-components/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js"); |
| 4313 |
var f="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",m="active",y="data-styled-version",v="6.1.13",g="/*!sc*/\n",S="undefined"!=typeof window&&"HTMLElement"in window,w=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!=="development"),b={},E=/invalid hook call/i,N=new Set,P=function(t,n){if(true){var o=n?' with the id of "'.concat(n,'"'):"",s="The component ".concat(t).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];E.test(t)?(a=!1,N.delete(s)):i.apply(void 0,(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)([t],n,!1))},(0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(),a&&!N.has(s)&&(console.warn(s),N.add(s))}catch(e){E.test(e.message)&&N.delete(s)}finally{console.error=i}}},_=Object.freeze([]),C=Object.freeze({});function I(e,t,n){return void 0===n&&(n=C),e.theme!==n.theme&&e.theme||t||n.theme}var A=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),O=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,D=/(^-|-$)/g;function R(e){return e.replace(O,"-").replace(D,"")}var T=/(a)(d)/gi,k=52,j=function(e){return String.fromCharCode(e+(e>25?39:97))};function x(e){var t,n="";for(t=Math.abs(e);t>k;t=t/k|0)n=j(t%k)+n;return(j(t%k)+n).replace(T,"$1-$2")}var V,F=5381,M=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},z=function(e){return M(F,e)};function $(e){return x(z(e)>>>0)}function B(e){return true&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function L(e){return"string"==typeof e&&( false||e.charAt(0)===e.charAt(0).toLowerCase())}var G="function"==typeof Symbol&&Symbol.for,Y=G?Symbol.for("react.memo"):60115,W=G?Symbol.for("react.forward_ref"):60112,q={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},H={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},U={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},J=((V={})[W]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V[Y]=U,V);function X(e){return("type"in(t=e)&&t.type.$$typeof)===Y?U:"$$typeof"in e?J[e.$$typeof]:q;var t}var Z=Object.defineProperty,K=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,ee=Object.getOwnPropertyDescriptor,te=Object.getPrototypeOf,ne=Object.prototype;function oe(e,t,n){if("string"!=typeof t){if(ne){var o=te(t);o&&o!==ne&&oe(e,o,n)}var r=K(t);Q&&(r=r.concat(Q(t)));for(var s=X(e),i=X(t),a=0;a<r.length;++a){var c=r[a];if(!(c in H||n&&n[c]||i&&c in i||s&&c in s)){var l=ee(t,c);try{Z(e,c,l)}catch(e){}}}}return e}function re(e){return"function"==typeof e}function se(e){return"object"==typeof e&&"styledComponentId"in e}function ie(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ae(e,t){if(0===e.length)return"";for(var n=e[0],o=1;o<e.length;o++)n+=t?t+e[o]:e[o];return n}function ce(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function le(e,t,n){if(void 0===n&&(n=!1),!n&&!ce(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var o=0;o<t.length;o++)e[o]=le(e[o],t[o]);else if(ce(t))for(var o in t)e[o]=le(e[o],t[o]);return e}function ue(e,t){Object.defineProperty(e,"toString",{value:t})}var pe= true?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:0;function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],o=[],r=1,s=e.length;r<s;r+=1)o.push(e[r]);return o.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function he(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return false?0:new Error(de.apply(void 0,(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)([pe[t]],n,!1)).trim())}var fe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,r=o;e>=r;)if((r<<=1)<0)throw he(16,"".concat(e));this.groupSizes=new Uint32Array(r),this.groupSizes.set(n),this.length=r;for(var s=o;s<r;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(var r=n;r<o;r++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],o=this.indexOfGroup(e),r=o+n,s=o;s<r;s++)t+="".concat(this.tag.getRule(s)).concat(g);return t},e}(),me=1<<30,ye=new Map,ve=new Map,ge=1,Se=function(e){if(ye.has(e))return ye.get(e);for(;ve.has(ge);)ge++;var t=ge++;if( true&&((0|t)<0||t>me))throw he(16,"".concat(t));return ye.set(e,t),ve.set(t,e),t},we=function(e,t){ge=t+1,ye.set(e,t),ve.set(t,e)},be="style[".concat(f,"][").concat(y,'="').concat(v,'"]'),Ee=new RegExp("^".concat(f,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Ne=function(e,t,n){for(var o,r=n.split(","),s=0,i=r.length;s<i;s++)(o=r[s])&&e.registerName(t,o)},Pe=function(e,t){for(var n,o=(null!==(n=t.textContent)&&void 0!==n?n:"").split(g),r=[],s=0,i=o.length;s<i;s++){var a=o[s].trim();if(a){var c=a.match(Ee);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(we(u,l),Ne(e,u,c[3]),e.getTag().insertRules(l,r)),r.length=0}else r.push(a)}}},_e=function(e){for(var t=document.querySelectorAll(be),n=0,o=t.length;n<o;n++){var r=t[n];r&&r.getAttribute(f)!==m&&(Pe(e,r),r.parentNode&&r.parentNode.removeChild(r))}};function Ce(){return true?__webpack_require__.nc:0}var Ie=function(e){var t=document.head,n=e||t,o=document.createElement("style"),r=function(e){var t=Array.from(e.querySelectorAll("style[".concat(f,"]")));return t[t.length-1]}(n),s=void 0!==r?r.nextSibling:null;o.setAttribute(f,m),o.setAttribute(y,v);var i=Ce();return i&&o.setAttribute("nonce",i),n.insertBefore(o,s),o},Ae=function(){function e(e){this.element=Ie(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,o=t.length;n<o;n++){var r=t[n];if(r.ownerNode===e)return r}throw he(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Oe=function(){function e(e){this.element=Ie(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),De=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Re=S,Te={isServer:!S,useCSSOMInjection:!w},ke=function(){function e(e,n,o){void 0===e&&(e=C),void 0===n&&(n={});var r=this;this.options=(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({},Te),e),this.gs=n,this.names=new Map(o),this.server=!!e.isServer,!this.server&&S&&Re&&(Re=!1,_e(this)),ue(this,function(){return function(e){for(var t=e.getTag(),n=t.length,o="",r=function(n){var r=function(e){return ve.get(e)}(n);if(void 0===r)return"continue";var s=e.names.get(r),i=t.getGroup(n);if(void 0===s||!s.size||0===i.length)return"continue";var a="".concat(f,".g").concat(n,'[id="').concat(r,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","))}),o+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat(g)},s=0;s<n;s++)r(s);return o}(r)})}return e.registerId=function(e){return Se(e)},e.prototype.rehydrate=function(){!this.server&&S&&_e(this)},e.prototype.reconstructWithOptions=function(n,o){return void 0===o&&(o=!0),new e((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({},this.options),n),this.gs,o&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new De(n):t?new Ae(n):new Oe(n)}(this.options),new fe(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(Se(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(Se(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(Se(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),je=/&/g,xe=/^\s*\/\/.*$/gm;function Ve(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=Ve(e.children,t)),e})}function Fe(e){var t,n,o,r=void 0===e?C:e,s=r.options,i=void 0===s?C:s,a=r.plugins,c=void 0===a?_:a,l=function(e,o,r){return r.startsWith(n)&&r.endsWith(n)&&r.replaceAll(n,"").length>0?".".concat(t):e},u=c.slice();u.push(function(e){e.type===stylis__WEBPACK_IMPORTED_MODULE_5__.RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(je,n).replace(o,l))}),i.prefix&&u.push(stylis__WEBPACK_IMPORTED_MODULE_6__.prefixer),u.push(stylis__WEBPACK_IMPORTED_MODULE_7__.stringify);var p=function(e,r,s,a){void 0===r&&(r=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=r,o=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(xe,""),l=stylis__WEBPACK_IMPORTED_MODULE_8__.compile(s||r?"".concat(s," ").concat(r," { ").concat(c," }"):c);i.namespace&&(l=Ve(l,i.namespace));var p=[];return stylis__WEBPACK_IMPORTED_MODULE_7__.serialize(l,stylis__WEBPACK_IMPORTED_MODULE_6__.middleware(u.concat(stylis__WEBPACK_IMPORTED_MODULE_6__.rulesheet(function(e){return p.push(e)})))),p};return p.hash=c.length?c.reduce(function(e,t){return t.name||he(15),M(e,t.name)},F).toString():"",p}var Me=new ke,ze=Fe(),$e=react__WEBPACK_IMPORTED_MODULE_1___default().createContext({shouldForwardProp:void 0,styleSheet:Me,stylis:ze}),Be=$e.Consumer,Le=react__WEBPACK_IMPORTED_MODULE_1___default().createContext(void 0);function Ge(){return (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)($e)}function Ye(e){var t=(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(e.stylisPlugins),n=t[0],r=t[1],c=Ge().styleSheet,l=(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,c]),u=(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function(){return Fe({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function(){shallowequal__WEBPACK_IMPORTED_MODULE_2___default()(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var d=(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:l,stylis:u}},[e.shouldForwardProp,l,u]);return react__WEBPACK_IMPORTED_MODULE_1___default().createElement($e.Provider,{value:d},react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Le.Provider,{value:u},e.children))}var We=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ze);var o=n.name+t.hash;e.hasNameForId(n.id,o)||e.insertRules(n.id,o,t(n.rules,o,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,ue(this,function(){throw he(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=ze),this.name+e.hash},e}(),qe=function(e){return e>="A"&&e<="Z"};function He(e){for(var t="",n=0;n<e.length;n++){var o=e[n];if(1===n&&"-"===o&&"-"===e[0])return e;qe(o)?t+="-"+o.toLowerCase():t+=o}return t.startsWith("ms-")?"-"+t:t}var Ue=function(e){return null==e||!1===e||""===e},Je=function(t){var n,o,r=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!Ue(i)&&(Array.isArray(i)&&i.isCss||re(i)?r.push("".concat(He(s),":"),i,";"):ce(i)?r.push.apply(r,(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)(["".concat(s," {")],Je(i),!1),["}"],!1)):r.push("".concat(He(s),": ").concat((n=s,null==(o=i)||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||n in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"]||n.startsWith("--")?String(o).trim():"".concat(o,"px")),";")))}return r};function Xe(e,t,n,o){if(Ue(e))return[];if(se(e))return[".".concat(e.styledComponentId)];if(re(e)){if(!re(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return[e];var r=e(t);return false||"object"!=typeof r||Array.isArray(r)||r instanceof We||ce(r)||null===r||console.error("".concat(B(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Xe(r,t,n,o)}var s;return e instanceof We?n?(e.inject(n,o),[e.getName(o)]):[e]:ce(e)?Je(e):Array.isArray(e)?Array.prototype.concat.apply(_,e.map(function(e){return Xe(e,t,n,o)})):[e.toString()]}function Ze(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(re(n)&&!se(n))return!1}return!0}var Ke=z(v),Qe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic= false&&0,this.componentId=t,this.baseHash=M(Ke,t),this.baseStyle=n,ke.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))o=ie(o,this.staticRulesId);else{var r=ae(Xe(this.rules,e,t,n)),s=x(M(this.baseHash,r)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(r,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}o=ie(o,s),this.staticRulesId=s}else{for(var a=M(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u, true&&(a=M(a,u));else if(u){var p=ae(Xe(u,e,t,n));a=M(a,p+l),c+=p}}if(c){var d=x(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),o=ie(o,d)}}return o},e}(),et=react__WEBPACK_IMPORTED_MODULE_1___default().createContext(void 0),tt=et.Consumer;function nt(){var e=(0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(et);if(!e)throw he(18);return e}function ot(e){var n=react__WEBPACK_IMPORTED_MODULE_1___default().useContext(et),r=(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function(){return function(e,n){if(!e)throw he(14);if(re(e)){var o=e(n);if( true&&(null===o||Array.isArray(o)||"object"!=typeof o))throw he(7);return o}if(Array.isArray(e)||"object"!=typeof e)throw he(8);return n?(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({},n),e):e}(e.theme,n)},[e.theme,n]);return e.children?react__WEBPACK_IMPORTED_MODULE_1___default().createElement(et.Provider,{value:r},e.children):null}var rt={},st=new Set;function it(e,r,s){var i=se(e),a=e,c=!L(e),p=r.attrs,d=void 0===p?_:p,h=r.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":R(e);rt[n]=(rt[n]||0)+1;var o="".concat(n,"-").concat($(v+n+rt[n]));return t?"".concat(t,"-").concat(o):o}(r.displayName,r.parentComponentId):h,m=r.displayName,y=void 0===m?function(e){return L(e)?"styled.".concat(e):"Styled(".concat(B(e),")")}(e):m,g=r.displayName&&r.componentId?"".concat(R(r.displayName),"-").concat(r.componentId):r.componentId||f,S=i&&a.attrs?a.attrs.concat(d).filter(Boolean):d,w=r.shouldForwardProp;if(i&&a.shouldForwardProp){var b=a.shouldForwardProp;if(r.shouldForwardProp){var E=r.shouldForwardProp;w=function(e,t){return b(e,t)&&E(e,t)}}else w=b}var N=new Qe(s,g,i?a.componentStyle:void 0);function O(e,r){return function(e,r,s){var i=e.attrs,a=e.componentStyle,c=e.defaultProps,p=e.foldedComponentIds,d=e.styledComponentId,h=e.target,f=react__WEBPACK_IMPORTED_MODULE_1___default().useContext(et),m=Ge(),y=e.shouldForwardProp||m.shouldForwardProp; true&&(0,react__WEBPACK_IMPORTED_MODULE_1__.useDebugValue)(d);var v=I(r,f,c)||C,g=function(e,n,o){for(var r,s=(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({},n),{className:void 0,theme:o}),i=0;i<e.length;i+=1){var a=re(r=e[i])?r(s):r;for(var c in a)s[c]="className"===c?ie(s[c],a[c]):"style"===c?(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({},s[c]),a[c]):a[c]}return n.className&&(s.className=ie(s.className,n.className)),s}(i,r,v),S=g.as||h,w={};for(var b in g)void 0===g[b]||"$"===b[0]||"as"===b||"theme"===b&&g.theme===v||("forwardedAs"===b?w.as=g.forwardedAs:y&&!y(b,S)||(w[b]=g[b],y||"development"!=="development"||(0,_emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_0__["default"])(b)||st.has(b)||!A.has(S)||(st.add(b),console.warn('styled-components: it looks like an unknown prop "'.concat(b,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var E=function(e,t){var n=Ge(),o=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return true&&(0,react__WEBPACK_IMPORTED_MODULE_1__.useDebugValue)(o),o}(a,g); true&&e.warnTooManyClasses&&e.warnTooManyClasses(E);var N=ie(p,d);return E&&(N+=" "+E),g.className&&(N+=" "+g.className),w[L(S)&&!A.has(S)?"class":"className"]=N,w.ref=s,(0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(S,w)}(D,e,r)}O.displayName=y;var D=react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(O);return D.attrs=S,D.componentStyle=N,D.displayName=y,D.shouldForwardProp=w,D.foldedComponentIds=i?ie(a.foldedComponentIds,a.styledComponentId):"",D.styledComponentId=g,D.target=i?a.target:e,Object.defineProperty(D,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var o=0,r=t;o<r.length;o++)le(e,r[o],!0);return e}({},a.defaultProps,e):e}}), true&&(P(y,g),D.warnTooManyClasses=function(e,t){var n={},o=!1;return function(r){if(!o&&(n[r]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),o=!0,n={}}}}(y,g)),ue(D,function(){return".".concat(D.styledComponentId)}),c&&oe(D,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),D}function at(e,t){for(var n=[e[0]],o=0,r=t.length;o<r;o+=1)n.push(t[o],e[o+1]);return n}var ct=function(e){return Object.assign(e,{isCss:!0})};function lt(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(re(t)||ce(t))return ct(Xe(at(_,(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)([t],n,!0))));var r=t;return 0===n.length&&1===r.length&&"string"==typeof r[0]?Xe(r):ct(Xe(at(r,n)))}function ut(n,o,r){if(void 0===r&&(r=C),!o)throw he(1,o);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(o,r,lt.apply(void 0,(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)([t],s,!1)))};return s.attrs=function(e){return ut(n,o,(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({},r),{attrs:Array.prototype.concat(r.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ut(n,o,(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({},r),e))},s}var pt=function(e){return ut(it,e)},dt=pt;A.forEach(function(e){dt[e]=pt(e)});var ht=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Ze(e),ke.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,o){var r=o(ae(Xe(this.rules,t,n,o)),""),s=this.componentId+e;n.insertRules(s,s,r)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,o){e>2&&ke.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,o)},e}();function ft(n){for(var r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];var i=lt.apply(void 0,(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)([n],r,!1)),a="sc-global-".concat($(JSON.stringify(i))),c=new ht(i,a); true&&P(a);var l=function(e){var t=Ge(),n=react__WEBPACK_IMPORTED_MODULE_1___default().useContext(et),r=react__WEBPACK_IMPORTED_MODULE_1___default().useRef(t.styleSheet.allocateGSInstance(a)).current;return true&&react__WEBPACK_IMPORTED_MODULE_1___default().Children.count(e.children)&&console.warn("The global style component ".concat(a," was given child JSX. createGlobalStyle does not render children.")), true&&i.some(function(e){return"string"==typeof e&&-1!==e.indexOf("@import")})&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),t.styleSheet.server&&u(r,e,t.styleSheet,n,t.stylis),react__WEBPACK_IMPORTED_MODULE_1___default().useLayoutEffect(function(){if(!t.styleSheet.server)return u(r,e,t.styleSheet,n,t.stylis),function(){return c.removeStyles(r,t.styleSheet)}},[r,e,t.styleSheet,n,t.stylis]),null};function u(e,n,o,r,s){if(c.isStatic)c.renderStyles(e,b,o,s);else{var i=(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({},n),{theme:I(n,r,l.defaultProps)});c.renderStyles(e,i,o,s)}}return react__WEBPACK_IMPORTED_MODULE_1___default().memo(l)}function mt(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o]; true&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var r=ae(lt.apply(void 0,(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)([t],n,!1))),s=$(r);return new We(s,r)}function yt(e){var n=react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function(n,r){var s=I(n,react__WEBPACK_IMPORTED_MODULE_1___default().useContext(et),e.defaultProps);return true&&void 0===s&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "'.concat(B(e),'"')),react__WEBPACK_IMPORTED_MODULE_1___default().createElement(e,(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({},n,{theme:s,ref:r}))});return n.displayName="WithTheme(".concat(B(e),")"),oe(n,e)}var vt=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=Ce(),o=ae([n&&'nonce="'.concat(n,'"'),"".concat(f,'="true"'),"".concat(y,'="').concat(v,'"')].filter(Boolean)," ");return"<style ".concat(o,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw he(2);return e._emitSheetCSS()},this.getStyleElement=function(){var n;if(e.sealed)throw he(2);var r=e.instance.toString();if(!r)return[];var s=((n={})[f]="",n[y]=v,n.dangerouslySetInnerHTML={__html:r},n),i=Ce();return i&&(s.nonce=i),[react__WEBPACK_IMPORTED_MODULE_1___default().createElement("style",(0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({},s,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ke({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw he(2);return react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Ye,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw he(3)},e}(),gt={StyleSheet:ke,mainSheet:Me}; true&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var St="__sc-".concat(f,"__"); true&&"undefined"!=typeof window&&(window[St]||(window[St]=0),1===window[St]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window[St]+=1); |
| 4314 |
//# sourceMappingURL=styled-components.browser.esm.js.map |
| 4315 |
|
| 4316 |
|
| 4317 |
/***/ }), |
| 4318 |
|
| 4319 |
/***/ "./node_modules/styled-components/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js": |
| 4320 |
/*!**************************************************************************************************************!*\ |
| 4321 |
!*** ./node_modules/styled-components/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js ***! |
| 4322 |
\**************************************************************************************************************/ |
| 4323 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 4324 |
|
| 4325 |
"use strict"; |
| 4326 |
__webpack_require__.r(__webpack_exports__); |
| 4327 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4328 |
/* harmony export */ "default": () => (/* binding */ isPropValid) |
| 4329 |
/* harmony export */ }); |
| 4330 |
/* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/styled-components/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js"); |
| 4331 |
|
| 4332 |
|
| 4333 |
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 |
| 4334 |
|
| 4335 |
var isPropValid = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) { |
| 4336 |
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 |
| 4337 |
/* o */ |
| 4338 |
&& prop.charCodeAt(1) === 110 |
| 4339 |
/* n */ |
| 4340 |
&& prop.charCodeAt(2) < 91; |
| 4341 |
} |
| 4342 |
/* Z+1 */ |
| 4343 |
); |
| 4344 |
|
| 4345 |
|
| 4346 |
|
| 4347 |
|
| 4348 |
/***/ }), |
| 4349 |
|
| 4350 |
/***/ "./node_modules/styled-components/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js": |
| 4351 |
/*!**************************************************************************************************!*\ |
| 4352 |
!*** ./node_modules/styled-components/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js ***! |
| 4353 |
\**************************************************************************************************/ |
| 4354 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 4355 |
|
| 4356 |
"use strict"; |
| 4357 |
__webpack_require__.r(__webpack_exports__); |
| 4358 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4359 |
/* harmony export */ "default": () => (/* binding */ memoize) |
| 4360 |
/* harmony export */ }); |
| 4361 |
function memoize(fn) { |
| 4362 |
var cache = Object.create(null); |
| 4363 |
return function (arg) { |
| 4364 |
if (cache[arg] === undefined) cache[arg] = fn(arg); |
| 4365 |
return cache[arg]; |
| 4366 |
}; |
| 4367 |
} |
| 4368 |
|
| 4369 |
|
| 4370 |
|
| 4371 |
|
| 4372 |
/***/ }), |
| 4373 |
|
| 4374 |
/***/ "./node_modules/styled-components/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js": |
| 4375 |
/*!****************************************************************************************************!*\ |
| 4376 |
!*** ./node_modules/styled-components/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js ***! |
| 4377 |
\****************************************************************************************************/ |
| 4378 |
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { |
| 4379 |
|
| 4380 |
"use strict"; |
| 4381 |
__webpack_require__.r(__webpack_exports__); |
| 4382 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4383 |
/* harmony export */ "default": () => (/* binding */ unitlessKeys) |
| 4384 |
/* harmony export */ }); |
| 4385 |
var unitlessKeys = { |
| 4386 |
animationIterationCount: 1, |
| 4387 |
aspectRatio: 1, |
| 4388 |
borderImageOutset: 1, |
| 4389 |
borderImageSlice: 1, |
| 4390 |
borderImageWidth: 1, |
| 4391 |
boxFlex: 1, |
| 4392 |
boxFlexGroup: 1, |
| 4393 |
boxOrdinalGroup: 1, |
| 4394 |
columnCount: 1, |
| 4395 |
columns: 1, |
| 4396 |
flex: 1, |
| 4397 |
flexGrow: 1, |
| 4398 |
flexPositive: 1, |
| 4399 |
flexShrink: 1, |
| 4400 |
flexNegative: 1, |
| 4401 |
flexOrder: 1, |
| 4402 |
gridRow: 1, |
| 4403 |
gridRowEnd: 1, |
| 4404 |
gridRowSpan: 1, |
| 4405 |
gridRowStart: 1, |
| 4406 |
gridColumn: 1, |
| 4407 |
gridColumnEnd: 1, |
| 4408 |
gridColumnSpan: 1, |
| 4409 |
gridColumnStart: 1, |
| 4410 |
msGridRow: 1, |
| 4411 |
msGridRowSpan: 1, |
| 4412 |
msGridColumn: 1, |
| 4413 |
msGridColumnSpan: 1, |
| 4414 |
fontWeight: 1, |
| 4415 |
lineHeight: 1, |
| 4416 |
opacity: 1, |
| 4417 |
order: 1, |
| 4418 |
orphans: 1, |
| 4419 |
tabSize: 1, |
| 4420 |
widows: 1, |
| 4421 |
zIndex: 1, |
| 4422 |
zoom: 1, |
| 4423 |
WebkitLineClamp: 1, |
| 4424 |
// SVG-related properties |
| 4425 |
fillOpacity: 1, |
| 4426 |
floodOpacity: 1, |
| 4427 |
stopOpacity: 1, |
| 4428 |
strokeDasharray: 1, |
| 4429 |
strokeDashoffset: 1, |
| 4430 |
strokeMiterlimit: 1, |
| 4431 |
strokeOpacity: 1, |
| 4432 |
strokeWidth: 1 |
| 4433 |
}; |
| 4434 |
|
| 4435 |
|
| 4436 |
|
| 4437 |
|
| 4438 |
/***/ }), |
| 4439 |
|
| 4440 |
/***/ "react": |
| 4441 |
/*!************************!*\ |
| 4442 |
!*** external "React" ***! |
| 4443 |
\************************/ |
| 4444 |
/***/ ((module) => { |
| 4445 |
|
| 4446 |
"use strict"; |
| 4447 |
module.exports = window["React"]; |
| 4448 |
|
| 4449 |
/***/ }), |
| 4450 |
|
| 4451 |
/***/ "react/jsx-runtime": |
| 4452 |
/*!**********************************!*\ |
| 4453 |
!*** external "ReactJSXRuntime" ***! |
| 4454 |
\**********************************/ |
| 4455 |
/***/ ((module) => { |
| 4456 |
|
| 4457 |
"use strict"; |
| 4458 |
module.exports = window["ReactJSXRuntime"]; |
| 4459 |
|
| 4460 |
/***/ }), |
| 4461 |
|
| 4462 |
/***/ "@wordpress/api-fetch": |
| 4463 |
/*!**********************************!*\ |
| 4464 |
!*** external ["wp","apiFetch"] ***! |
| 4465 |
\**********************************/ |
| 4466 |
/***/ ((module) => { |
| 4467 |
|
| 4468 |
"use strict"; |
| 4469 |
module.exports = window["wp"]["apiFetch"]; |
| 4470 |
|
| 4471 |
/***/ }), |
| 4472 |
|
| 4473 |
/***/ "@wordpress/components": |
| 4474 |
/*!************************************!*\ |
| 4475 |
!*** external ["wp","components"] ***! |
| 4476 |
\************************************/ |
| 4477 |
/***/ ((module) => { |
| 4478 |
|
| 4479 |
"use strict"; |
| 4480 |
module.exports = window["wp"]["components"]; |
| 4481 |
|
| 4482 |
/***/ }), |
| 4483 |
|
| 4484 |
/***/ "@wordpress/data": |
| 4485 |
/*!******************************!*\ |
| 4486 |
!*** external ["wp","data"] ***! |
| 4487 |
\******************************/ |
| 4488 |
/***/ ((module) => { |
| 4489 |
|
| 4490 |
"use strict"; |
| 4491 |
module.exports = window["wp"]["data"]; |
| 4492 |
|
| 4493 |
/***/ }), |
| 4494 |
|
| 4495 |
/***/ "@wordpress/element": |
| 4496 |
/*!*********************************!*\ |
| 4497 |
!*** external ["wp","element"] ***! |
| 4498 |
\*********************************/ |
| 4499 |
/***/ ((module) => { |
| 4500 |
|
| 4501 |
"use strict"; |
| 4502 |
module.exports = window["wp"]["element"]; |
| 4503 |
|
| 4504 |
/***/ }), |
| 4505 |
|
| 4506 |
/***/ "./node_modules/styled-components/node_modules/stylis/src/Enum.js": |
| 4507 |
/*!************************************************************************!*\ |
| 4508 |
!*** ./node_modules/styled-components/node_modules/stylis/src/Enum.js ***! |
| 4509 |
\************************************************************************/ |
| 4510 |
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 4511 |
|
| 4512 |
"use strict"; |
| 4513 |
__webpack_require__.r(__webpack_exports__); |
| 4514 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4515 |
/* harmony export */ CHARSET: () => (/* binding */ CHARSET), |
| 4516 |
/* harmony export */ COMMENT: () => (/* binding */ COMMENT), |
| 4517 |
/* harmony export */ COUNTER_STYLE: () => (/* binding */ COUNTER_STYLE), |
| 4518 |
/* harmony export */ DECLARATION: () => (/* binding */ DECLARATION), |
| 4519 |
/* harmony export */ DOCUMENT: () => (/* binding */ DOCUMENT), |
| 4520 |
/* harmony export */ FONT_FACE: () => (/* binding */ FONT_FACE), |
| 4521 |
/* harmony export */ FONT_FEATURE_VALUES: () => (/* binding */ FONT_FEATURE_VALUES), |
| 4522 |
/* harmony export */ IMPORT: () => (/* binding */ IMPORT), |
| 4523 |
/* harmony export */ KEYFRAMES: () => (/* binding */ KEYFRAMES), |
| 4524 |
/* harmony export */ LAYER: () => (/* binding */ LAYER), |
| 4525 |
/* harmony export */ MEDIA: () => (/* binding */ MEDIA), |
| 4526 |
/* harmony export */ MOZ: () => (/* binding */ MOZ), |
| 4527 |
/* harmony export */ MS: () => (/* binding */ MS), |
| 4528 |
/* harmony export */ NAMESPACE: () => (/* binding */ NAMESPACE), |
| 4529 |
/* harmony export */ PAGE: () => (/* binding */ PAGE), |
| 4530 |
/* harmony export */ RULESET: () => (/* binding */ RULESET), |
| 4531 |
/* harmony export */ SCOPE: () => (/* binding */ SCOPE), |
| 4532 |
/* harmony export */ SUPPORTS: () => (/* binding */ SUPPORTS), |
| 4533 |
/* harmony export */ VIEWPORT: () => (/* binding */ VIEWPORT), |
| 4534 |
/* harmony export */ WEBKIT: () => (/* binding */ WEBKIT) |
| 4535 |
/* harmony export */ }); |
| 4536 |
var MS = '-ms-' |
| 4537 |
var MOZ = '-moz-' |
| 4538 |
var WEBKIT = '-webkit-' |
| 4539 |
|
| 4540 |
var COMMENT = 'comm' |
| 4541 |
var RULESET = 'rule' |
| 4542 |
var DECLARATION = 'decl' |
| 4543 |
|
| 4544 |
var PAGE = '@page' |
| 4545 |
var MEDIA = '@media' |
| 4546 |
var IMPORT = '@import' |
| 4547 |
var CHARSET = '@charset' |
| 4548 |
var VIEWPORT = '@viewport' |
| 4549 |
var SUPPORTS = '@supports' |
| 4550 |
var DOCUMENT = '@document' |
| 4551 |
var NAMESPACE = '@namespace' |
| 4552 |
var KEYFRAMES = '@keyframes' |
| 4553 |
var FONT_FACE = '@font-face' |
| 4554 |
var COUNTER_STYLE = '@counter-style' |
| 4555 |
var FONT_FEATURE_VALUES = '@font-feature-values' |
| 4556 |
var LAYER = '@layer' |
| 4557 |
var SCOPE = '@scope' |
| 4558 |
|
| 4559 |
|
| 4560 |
/***/ }), |
| 4561 |
|
| 4562 |
/***/ "./node_modules/styled-components/node_modules/stylis/src/Middleware.js": |
| 4563 |
/*!******************************************************************************!*\ |
| 4564 |
!*** ./node_modules/styled-components/node_modules/stylis/src/Middleware.js ***! |
| 4565 |
\******************************************************************************/ |
| 4566 |
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 4567 |
|
| 4568 |
"use strict"; |
| 4569 |
__webpack_require__.r(__webpack_exports__); |
| 4570 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4571 |
/* harmony export */ middleware: () => (/* binding */ middleware), |
| 4572 |
/* harmony export */ namespace: () => (/* binding */ namespace), |
| 4573 |
/* harmony export */ prefixer: () => (/* binding */ prefixer), |
| 4574 |
/* harmony export */ rulesheet: () => (/* binding */ rulesheet) |
| 4575 |
/* harmony export */ }); |
| 4576 |
/* harmony import */ var _Enum_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Enum.js */ "./node_modules/styled-components/node_modules/stylis/src/Enum.js"); |
| 4577 |
/* harmony import */ var _Utility_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utility.js */ "./node_modules/styled-components/node_modules/stylis/src/Utility.js"); |
| 4578 |
/* harmony import */ var _Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Tokenizer.js */ "./node_modules/styled-components/node_modules/stylis/src/Tokenizer.js"); |
| 4579 |
/* harmony import */ var _Serializer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Serializer.js */ "./node_modules/styled-components/node_modules/stylis/src/Serializer.js"); |
| 4580 |
/* harmony import */ var _Prefixer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Prefixer.js */ "./node_modules/styled-components/node_modules/stylis/src/Prefixer.js"); |
| 4581 |
|
| 4582 |
|
| 4583 |
|
| 4584 |
|
| 4585 |
|
| 4586 |
|
| 4587 |
/** |
| 4588 |
* @param {function[]} collection |
| 4589 |
* @return {function} |
| 4590 |
*/ |
| 4591 |
function middleware (collection) { |
| 4592 |
var length = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.sizeof)(collection) |
| 4593 |
|
| 4594 |
return function (element, index, children, callback) { |
| 4595 |
var output = '' |
| 4596 |
|
| 4597 |
for (var i = 0; i < length; i++) |
| 4598 |
output += collection[i](element, index, children, callback) || '' |
| 4599 |
|
| 4600 |
return output |
| 4601 |
} |
| 4602 |
} |
| 4603 |
|
| 4604 |
/** |
| 4605 |
* @param {function} callback |
| 4606 |
* @return {function} |
| 4607 |
*/ |
| 4608 |
function rulesheet (callback) { |
| 4609 |
return function (element) { |
| 4610 |
if (!element.root) |
| 4611 |
if (element = element.return) |
| 4612 |
callback(element) |
| 4613 |
} |
| 4614 |
} |
| 4615 |
|
| 4616 |
/** |
| 4617 |
* @param {object} element |
| 4618 |
* @param {number} index |
| 4619 |
* @param {object[]} children |
| 4620 |
* @param {function} callback |
| 4621 |
*/ |
| 4622 |
function prefixer (element, index, children, callback) { |
| 4623 |
if (element.length > -1) |
| 4624 |
if (!element.return) |
| 4625 |
switch (element.type) { |
| 4626 |
case _Enum_js__WEBPACK_IMPORTED_MODULE_1__.DECLARATION: element.return = (0,_Prefixer_js__WEBPACK_IMPORTED_MODULE_2__.prefix)(element.value, element.length, children) |
| 4627 |
return |
| 4628 |
case _Enum_js__WEBPACK_IMPORTED_MODULE_1__.KEYFRAMES: |
| 4629 |
return (0,_Serializer_js__WEBPACK_IMPORTED_MODULE_3__.serialize)([(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.copy)(element, {value: (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(element.value, '@', '@' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT)})], callback) |
| 4630 |
case _Enum_js__WEBPACK_IMPORTED_MODULE_1__.RULESET: |
| 4631 |
if (element.length) |
| 4632 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.combine)(children = element.props, function (value) { |
| 4633 |
switch ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.match)(value, callback = /(::plac\w+|:read-\w+)/)) { |
| 4634 |
// :read-(only|write) |
| 4635 |
case ':read-only': case ':read-write': |
| 4636 |
(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.lift)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.copy)(element, {props: [(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /:(read-\w+)/, ':' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MOZ + '$1')]})) |
| 4637 |
;(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.lift)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.copy)(element, {props: [value]})) |
| 4638 |
;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.assign)(element, {props: (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.filter)(children, callback)}) |
| 4639 |
break |
| 4640 |
// :placeholder |
| 4641 |
case '::placeholder': |
| 4642 |
;(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.lift)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.copy)(element, {props: [(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /:(plac\w+)/, ':' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + 'input-$1')]})) |
| 4643 |
;(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.lift)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.copy)(element, {props: [(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /:(plac\w+)/, ':' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MOZ + '$1')]})) |
| 4644 |
;(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.lift)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.copy)(element, {props: [(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /:(plac\w+)/, _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + 'input-$1')]})) |
| 4645 |
;(0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.lift)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.copy)(element, {props: [value]})) |
| 4646 |
;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.assign)(element, {props: (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.filter)(children, callback)}) |
| 4647 |
break |
| 4648 |
} |
| 4649 |
|
| 4650 |
return '' |
| 4651 |
}) |
| 4652 |
} |
| 4653 |
} |
| 4654 |
|
| 4655 |
/** |
| 4656 |
* @param {object} element |
| 4657 |
* @param {number} index |
| 4658 |
* @param {object[]} children |
| 4659 |
*/ |
| 4660 |
function namespace (element) { |
| 4661 |
switch (element.type) { |
| 4662 |
case _Enum_js__WEBPACK_IMPORTED_MODULE_1__.RULESET: |
| 4663 |
element.props = element.props.map(function (value) { |
| 4664 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.combine)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_4__.tokenize)(value), function (value, index, children) { |
| 4665 |
switch ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(value, 0)) { |
| 4666 |
// \f |
| 4667 |
case 12: |
| 4668 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.substr)(value, 1, (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.strlen)(value)) |
| 4669 |
// \0 ( + > ~ |
| 4670 |
case 0: case 40: case 43: case 62: case 126: |
| 4671 |
return value |
| 4672 |
// : |
| 4673 |
case 58: |
| 4674 |
if (children[++index] === 'global') |
| 4675 |
children[index] = '', children[++index] = '\f' + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.substr)(children[index], index = 1, -1) |
| 4676 |
// \s |
| 4677 |
case 32: |
| 4678 |
return index === 1 ? '' : value |
| 4679 |
default: |
| 4680 |
switch (index) { |
| 4681 |
case 0: element = value |
| 4682 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.sizeof)(children) > 1 ? '' : value |
| 4683 |
case index = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.sizeof)(children) - 1: case 2: |
| 4684 |
return index === 2 ? value + element + element : value + element |
| 4685 |
default: |
| 4686 |
return value |
| 4687 |
} |
| 4688 |
} |
| 4689 |
}) |
| 4690 |
}) |
| 4691 |
} |
| 4692 |
} |
| 4693 |
|
| 4694 |
|
| 4695 |
/***/ }), |
| 4696 |
|
| 4697 |
/***/ "./node_modules/styled-components/node_modules/stylis/src/Parser.js": |
| 4698 |
/*!**************************************************************************!*\ |
| 4699 |
!*** ./node_modules/styled-components/node_modules/stylis/src/Parser.js ***! |
| 4700 |
\**************************************************************************/ |
| 4701 |
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 4702 |
|
| 4703 |
"use strict"; |
| 4704 |
__webpack_require__.r(__webpack_exports__); |
| 4705 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4706 |
/* harmony export */ comment: () => (/* binding */ comment), |
| 4707 |
/* harmony export */ compile: () => (/* binding */ compile), |
| 4708 |
/* harmony export */ declaration: () => (/* binding */ declaration), |
| 4709 |
/* harmony export */ parse: () => (/* binding */ parse), |
| 4710 |
/* harmony export */ ruleset: () => (/* binding */ ruleset) |
| 4711 |
/* harmony export */ }); |
| 4712 |
/* harmony import */ var _Enum_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Enum.js */ "./node_modules/styled-components/node_modules/stylis/src/Enum.js"); |
| 4713 |
/* harmony import */ var _Utility_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utility.js */ "./node_modules/styled-components/node_modules/stylis/src/Utility.js"); |
| 4714 |
/* harmony import */ var _Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tokenizer.js */ "./node_modules/styled-components/node_modules/stylis/src/Tokenizer.js"); |
| 4715 |
|
| 4716 |
|
| 4717 |
|
| 4718 |
|
| 4719 |
/** |
| 4720 |
* @param {string} value |
| 4721 |
* @return {object[]} |
| 4722 |
*/ |
| 4723 |
function compile (value) { |
| 4724 |
return (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.dealloc)(parse('', null, null, null, [''], value = (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.alloc)(value), 0, [0], value)) |
| 4725 |
} |
| 4726 |
|
| 4727 |
/** |
| 4728 |
* @param {string} value |
| 4729 |
* @param {object} root |
| 4730 |
* @param {object?} parent |
| 4731 |
* @param {string[]} rule |
| 4732 |
* @param {string[]} rules |
| 4733 |
* @param {string[]} rulesets |
| 4734 |
* @param {number[]} pseudo |
| 4735 |
* @param {number[]} points |
| 4736 |
* @param {string[]} declarations |
| 4737 |
* @return {object} |
| 4738 |
*/ |
| 4739 |
function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) { |
| 4740 |
var index = 0 |
| 4741 |
var offset = 0 |
| 4742 |
var length = pseudo |
| 4743 |
var atrule = 0 |
| 4744 |
var property = 0 |
| 4745 |
var previous = 0 |
| 4746 |
var variable = 1 |
| 4747 |
var scanning = 1 |
| 4748 |
var ampersand = 1 |
| 4749 |
var character = 0 |
| 4750 |
var type = '' |
| 4751 |
var props = rules |
| 4752 |
var children = rulesets |
| 4753 |
var reference = rule |
| 4754 |
var characters = type |
| 4755 |
|
| 4756 |
while (scanning) |
| 4757 |
switch (previous = character, character = (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.next)()) { |
| 4758 |
// ( |
| 4759 |
case 40: |
| 4760 |
if (previous != 108 && (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.charat)(characters, length - 1) == 58) { |
| 4761 |
if ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.indexof)(characters += (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.replace)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.delimit)(character), '&', '&\f'), '&\f', (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.abs)(index ? points[index - 1] : 0)) != -1) |
| 4762 |
ampersand = -1 |
| 4763 |
break |
| 4764 |
} |
| 4765 |
// " ' [ |
| 4766 |
case 34: case 39: case 91: |
| 4767 |
characters += (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.delimit)(character) |
| 4768 |
break |
| 4769 |
// \t \n \r \s |
| 4770 |
case 9: case 10: case 13: case 32: |
| 4771 |
characters += (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.whitespace)(previous) |
| 4772 |
break |
| 4773 |
// \ |
| 4774 |
case 92: |
| 4775 |
characters += (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.escaping)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.caret)() - 1, 7) |
| 4776 |
continue |
| 4777 |
// / |
| 4778 |
case 47: |
| 4779 |
switch ((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.peek)()) { |
| 4780 |
case 42: case 47: |
| 4781 |
;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.append)(comment((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.commenter)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.next)(), (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.caret)()), root, parent, declarations), declarations) |
| 4782 |
break |
| 4783 |
default: |
| 4784 |
characters += '/' |
| 4785 |
} |
| 4786 |
break |
| 4787 |
// { |
| 4788 |
case 123 * variable: |
| 4789 |
points[index++] = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(characters) * ampersand |
| 4790 |
// } ; \0 |
| 4791 |
case 125 * variable: case 59: case 0: |
| 4792 |
switch (character) { |
| 4793 |
// \0 } |
| 4794 |
case 0: case 125: scanning = 0 |
| 4795 |
// ; |
| 4796 |
case 59 + offset: if (ampersand == -1) characters = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.replace)(characters, /\f/g, '') |
| 4797 |
if (property > 0 && ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(characters) - length)) |
| 4798 |
(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.append)(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.replace)(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations) |
| 4799 |
break |
| 4800 |
// @ ; |
| 4801 |
case 59: characters += ';' |
| 4802 |
// { rule/at-rule |
| 4803 |
default: |
| 4804 |
;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.append)(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets) |
| 4805 |
|
| 4806 |
if (character === 123) |
| 4807 |
if (offset === 0) |
| 4808 |
parse(characters, root, reference, reference, props, rulesets, length, points, children) |
| 4809 |
else |
| 4810 |
switch (atrule === 99 && (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.charat)(characters, 3) === 110 ? 100 : atrule) { |
| 4811 |
// d l m s |
| 4812 |
case 100: case 108: case 109: case 115: |
| 4813 |
parse(value, reference, reference, rule && (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.append)(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children) |
| 4814 |
break |
| 4815 |
default: |
| 4816 |
parse(characters, reference, reference, reference, [''], children, 0, points, children) |
| 4817 |
} |
| 4818 |
} |
| 4819 |
|
| 4820 |
index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo |
| 4821 |
break |
| 4822 |
// : |
| 4823 |
case 58: |
| 4824 |
length = 1 + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(characters), property = previous |
| 4825 |
default: |
| 4826 |
if (variable < 1) |
| 4827 |
if (character == 123) |
| 4828 |
--variable |
| 4829 |
else if (character == 125 && variable++ == 0 && (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.prev)() == 125) |
| 4830 |
continue |
| 4831 |
|
| 4832 |
switch (characters += (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.from)(character), character * variable) { |
| 4833 |
// & |
| 4834 |
case 38: |
| 4835 |
ampersand = offset > 0 ? 1 : (characters += '\f', -1) |
| 4836 |
break |
| 4837 |
// , |
| 4838 |
case 44: |
| 4839 |
points[index++] = ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(characters) - 1) * ampersand, ampersand = 1 |
| 4840 |
break |
| 4841 |
// @ |
| 4842 |
case 64: |
| 4843 |
// - |
| 4844 |
if ((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.peek)() === 45) |
| 4845 |
characters += (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.delimit)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.next)()) |
| 4846 |
|
| 4847 |
atrule = (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.peek)(), offset = length = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(type = characters += (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.identifier)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.caret)())), character++ |
| 4848 |
break |
| 4849 |
// - |
| 4850 |
case 45: |
| 4851 |
if (previous === 45 && (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(characters) == 2) |
| 4852 |
variable = 0 |
| 4853 |
} |
| 4854 |
} |
| 4855 |
|
| 4856 |
return rulesets |
| 4857 |
} |
| 4858 |
|
| 4859 |
/** |
| 4860 |
* @param {string} value |
| 4861 |
* @param {object} root |
| 4862 |
* @param {object?} parent |
| 4863 |
* @param {number} index |
| 4864 |
* @param {number} offset |
| 4865 |
* @param {string[]} rules |
| 4866 |
* @param {number[]} points |
| 4867 |
* @param {string} type |
| 4868 |
* @param {string[]} props |
| 4869 |
* @param {string[]} children |
| 4870 |
* @param {number} length |
| 4871 |
* @param {object[]} siblings |
| 4872 |
* @return {object} |
| 4873 |
*/ |
| 4874 |
function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) { |
| 4875 |
var post = offset - 1 |
| 4876 |
var rule = offset === 0 ? rules : [''] |
| 4877 |
var size = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.sizeof)(rule) |
| 4878 |
|
| 4879 |
for (var i = 0, j = 0, k = 0; i < index; ++i) |
| 4880 |
for (var x = 0, y = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.substr)(value, post + 1, post = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.abs)(j = points[i])), z = value; x < size; ++x) |
| 4881 |
if (z = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.trim)(j > 0 ? rule[x] + ' ' + y : (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.replace)(y, /&\f/g, rule[x]))) |
| 4882 |
props[k++] = z |
| 4883 |
|
| 4884 |
return (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.node)(value, root, parent, offset === 0 ? _Enum_js__WEBPACK_IMPORTED_MODULE_2__.RULESET : type, props, children, length, siblings) |
| 4885 |
} |
| 4886 |
|
| 4887 |
/** |
| 4888 |
* @param {number} value |
| 4889 |
* @param {object} root |
| 4890 |
* @param {object?} parent |
| 4891 |
* @param {object[]} siblings |
| 4892 |
* @return {object} |
| 4893 |
*/ |
| 4894 |
function comment (value, root, parent, siblings) { |
| 4895 |
return (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.node)(value, root, parent, _Enum_js__WEBPACK_IMPORTED_MODULE_2__.COMMENT, (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.from)((0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.char)()), (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.substr)(value, 2, -2), 0, siblings) |
| 4896 |
} |
| 4897 |
|
| 4898 |
/** |
| 4899 |
* @param {string} value |
| 4900 |
* @param {object} root |
| 4901 |
* @param {object?} parent |
| 4902 |
* @param {number} length |
| 4903 |
* @param {object[]} siblings |
| 4904 |
* @return {object} |
| 4905 |
*/ |
| 4906 |
function declaration (value, root, parent, length, siblings) { |
| 4907 |
return (0,_Tokenizer_js__WEBPACK_IMPORTED_MODULE_0__.node)(value, root, parent, _Enum_js__WEBPACK_IMPORTED_MODULE_2__.DECLARATION, (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.substr)(value, 0, length), (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.substr)(value, length + 1, -1), length, siblings) |
| 4908 |
} |
| 4909 |
|
| 4910 |
|
| 4911 |
/***/ }), |
| 4912 |
|
| 4913 |
/***/ "./node_modules/styled-components/node_modules/stylis/src/Prefixer.js": |
| 4914 |
/*!****************************************************************************!*\ |
| 4915 |
!*** ./node_modules/styled-components/node_modules/stylis/src/Prefixer.js ***! |
| 4916 |
\****************************************************************************/ |
| 4917 |
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 4918 |
|
| 4919 |
"use strict"; |
| 4920 |
__webpack_require__.r(__webpack_exports__); |
| 4921 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 4922 |
/* harmony export */ prefix: () => (/* binding */ prefix) |
| 4923 |
/* harmony export */ }); |
| 4924 |
/* harmony import */ var _Enum_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Enum.js */ "./node_modules/styled-components/node_modules/stylis/src/Enum.js"); |
| 4925 |
/* harmony import */ var _Utility_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utility.js */ "./node_modules/styled-components/node_modules/stylis/src/Utility.js"); |
| 4926 |
|
| 4927 |
|
| 4928 |
|
| 4929 |
/** |
| 4930 |
* @param {string} value |
| 4931 |
* @param {number} length |
| 4932 |
* @param {object[]} children |
| 4933 |
* @return {string} |
| 4934 |
*/ |
| 4935 |
function prefix (value, length, children) { |
| 4936 |
switch ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.hash)(value, length)) { |
| 4937 |
// color-adjust |
| 4938 |
case 5103: |
| 4939 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + 'print-' + value + value |
| 4940 |
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function) |
| 4941 |
case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921: |
| 4942 |
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break |
| 4943 |
case 5572: case 6356: case 5844: case 3191: case 6645: case 3005: |
| 4944 |
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite, |
| 4945 |
case 6391: case 5879: case 5623: case 6135: case 4599: case 4855: |
| 4946 |
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width) |
| 4947 |
case 4215: case 6389: case 5109: case 5365: case 5621: case 3829: |
| 4948 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + value |
| 4949 |
// tab-size |
| 4950 |
case 4789: |
| 4951 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MOZ + value + value |
| 4952 |
// appearance, user-select, transform, hyphens, text-size-adjust |
| 4953 |
case 5349: case 4246: case 4810: case 6968: case 2756: |
| 4954 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MOZ + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + value + value |
| 4955 |
// writing-mode |
| 4956 |
case 5936: |
| 4957 |
switch ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(value, length + 11)) { |
| 4958 |
// vertical-l(r) |
| 4959 |
case 114: |
| 4960 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /[svh]\w+-[tblr]{2}/, 'tb') + value |
| 4961 |
// vertical-r(l) |
| 4962 |
case 108: |
| 4963 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value |
| 4964 |
// horizontal(-)tb |
| 4965 |
case 45: |
| 4966 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /[svh]\w+-[tblr]{2}/, 'lr') + value |
| 4967 |
// default: fallthrough to below |
| 4968 |
} |
| 4969 |
// flex, flex-direction, scroll-snap-type, writing-mode |
| 4970 |
case 6828: case 4268: case 2903: |
| 4971 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + value + value |
| 4972 |
// order |
| 4973 |
case 6165: |
| 4974 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + 'flex-' + value + value |
| 4975 |
// align-items |
| 4976 |
case 5187: |
| 4977 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /(\w+).+(:[^]+)/, _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + 'box-$1$2' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + 'flex-$1$2') + value |
| 4978 |
// align-self |
| 4979 |
case 5443: |
| 4980 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + 'flex-item-' + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /flex-|-self/g, '') + (!(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.match)(value, /flex-|baseline/) ? _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + 'grid-row-' + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /flex-|-self/g, '') : '') + value |
| 4981 |
// align-content |
| 4982 |
case 4675: |
| 4983 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + 'flex-line-pack' + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /align-content|flex-|-self/g, '') + value |
| 4984 |
// flex-shrink |
| 4985 |
case 5548: |
| 4986 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, 'shrink', 'negative') + value |
| 4987 |
// flex-basis |
| 4988 |
case 5292: |
| 4989 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, 'basis', 'preferred-size') + value |
| 4990 |
// flex-grow |
| 4991 |
case 6060: |
| 4992 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + 'box-' + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, '-grow', '') + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, 'grow', 'positive') + value |
| 4993 |
// transition |
| 4994 |
case 4554: |
| 4995 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /([^-])(transform)/g, '$1' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + '$2') + value |
| 4996 |
// cursor |
| 4997 |
case 6187: |
| 4998 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /(zoom-|grab)/, _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + '$1'), /(image-set)/, _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + '$1'), value, '') + value |
| 4999 |
// background, background-image |
| 5000 |
case 5495: case 3959: |
| 5001 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /(image-set\([^]*)/, _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + '$1' + '$`$1') |
| 5002 |
// justify-content |
| 5003 |
case 4968: |
| 5004 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /(.+:)(flex-)?(.*)/, _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + 'box-pack:$3' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + value + value |
| 5005 |
// justify-self |
| 5006 |
case 4200: |
| 5007 |
if (!(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.match)(value, /flex-|baseline/)) return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + 'grid-column-align' + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.substr)(value, length) + value |
| 5008 |
break |
| 5009 |
// grid-template-(columns|rows) |
| 5010 |
case 2592: case 3360: |
| 5011 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, 'template-', '') + value |
| 5012 |
// grid-(row|column)-start |
| 5013 |
case 4384: case 3616: |
| 5014 |
if (children && children.some(function (element, index) { return length = index, (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.match)(element.props, /grid-\w+-end/) })) { |
| 5015 |
return ~(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.indexof)(value + (children = children[length].value), 'span', 0) ? value : (_Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, '-start', '') + value + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + 'grid-row-span:' + (~(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.indexof)(children, 'span', 0) ? (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.match)(children, /\d+/) : +(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.match)(children, /\d+/) - +(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.match)(value, /\d+/)) + ';') |
| 5016 |
} |
| 5017 |
return _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, '-start', '') + value |
| 5018 |
// grid-(row|column)-end |
| 5019 |
case 4896: case 4128: |
| 5020 |
return (children && children.some(function (element) { return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.match)(element.props, /grid-\w+-start/) })) ? value : _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, '-end', '-span'), 'span ', '') + value |
| 5021 |
// (margin|padding)-inline-(start|end) |
| 5022 |
case 4095: case 3583: case 4068: case 2532: |
| 5023 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /(.+)-inline(.+)/, _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + '$1$2') + value |
| 5024 |
// (min|max)?(width|height|inline-size|block-size) |
| 5025 |
case 8116: case 7059: case 5753: case 5535: |
| 5026 |
case 5445: case 5701: case 4933: case 4677: |
| 5027 |
case 5533: case 5789: case 5021: case 4765: |
| 5028 |
// stretch, max-content, min-content, fill-available |
| 5029 |
if ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.strlen)(value) - 1 - length > 6) |
| 5030 |
switch ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(value, length + 1)) { |
| 5031 |
// (m)ax-content, (m)in-content |
| 5032 |
case 109: |
| 5033 |
// - |
| 5034 |
if ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(value, length + 4) !== 45) |
| 5035 |
break |
| 5036 |
// (f)ill-available, (f)it-content |
| 5037 |
case 102: |
| 5038 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /(.+:)(.+)-([^]+)/, '$1' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + '$2-$3' + '$1' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MOZ + ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(value, length + 3) == 108 ? '$3' : '$2-$3')) + value |
| 5039 |
// (s)tretch |
| 5040 |
case 115: |
| 5041 |
return ~(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.indexof)(value, 'stretch', 0) ? prefix((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, 'stretch', 'fill-available'), length, children) + value : value |
| 5042 |
} |
| 5043 |
break |
| 5044 |
// grid-(column|row) |
| 5045 |
case 5152: case 5920: |
| 5046 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function (_, a, b, c, d, e, f) { return (_Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + a + ':' + b + f) + (c ? (_Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + a + '-span:' + (d ? e : +e - +b)) + f : '') + value }) |
| 5047 |
// position: sticky |
| 5048 |
case 4949: |
| 5049 |
// stick(y)? |
| 5050 |
if ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(value, length + 6) === 121) |
| 5051 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, ':', ':' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT) + value |
| 5052 |
break |
| 5053 |
// display: (flex|inline-flex|grid|inline-grid) |
| 5054 |
case 6444: |
| 5055 |
switch ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(value, (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(value, 14) === 45 ? 18 : 11)) { |
| 5056 |
// (inline-)?fle(x) |
| 5057 |
case 120: |
| 5058 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, '$1' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + ((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.WEBKIT + '$2$3' + '$1' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS + '$2box$3') + value |
| 5059 |
// (inline-)?gri(d) |
| 5060 |
case 100: |
| 5061 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, ':', ':' + _Enum_js__WEBPACK_IMPORTED_MODULE_1__.MS) + value |
| 5062 |
} |
| 5063 |
break |
| 5064 |
// scroll-margin, scroll-margin-(top|right|bottom|left) |
| 5065 |
case 5719: case 2647: case 2135: case 3927: case 2391: |
| 5066 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.replace)(value, 'scroll-', 'scroll-snap-') + value |
| 5067 |
} |
| 5068 |
|
| 5069 |
return value |
| 5070 |
} |
| 5071 |
|
| 5072 |
|
| 5073 |
/***/ }), |
| 5074 |
|
| 5075 |
/***/ "./node_modules/styled-components/node_modules/stylis/src/Serializer.js": |
| 5076 |
/*!******************************************************************************!*\ |
| 5077 |
!*** ./node_modules/styled-components/node_modules/stylis/src/Serializer.js ***! |
| 5078 |
\******************************************************************************/ |
| 5079 |
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 5080 |
|
| 5081 |
"use strict"; |
| 5082 |
__webpack_require__.r(__webpack_exports__); |
| 5083 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5084 |
/* harmony export */ serialize: () => (/* binding */ serialize), |
| 5085 |
/* harmony export */ stringify: () => (/* binding */ stringify) |
| 5086 |
/* harmony export */ }); |
| 5087 |
/* harmony import */ var _Enum_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Enum.js */ "./node_modules/styled-components/node_modules/stylis/src/Enum.js"); |
| 5088 |
/* harmony import */ var _Utility_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utility.js */ "./node_modules/styled-components/node_modules/stylis/src/Utility.js"); |
| 5089 |
|
| 5090 |
|
| 5091 |
|
| 5092 |
/** |
| 5093 |
* @param {object[]} children |
| 5094 |
* @param {function} callback |
| 5095 |
* @return {string} |
| 5096 |
*/ |
| 5097 |
function serialize (children, callback) { |
| 5098 |
var output = '' |
| 5099 |
|
| 5100 |
for (var i = 0; i < children.length; i++) |
| 5101 |
output += callback(children[i], i, children, callback) || '' |
| 5102 |
|
| 5103 |
return output |
| 5104 |
} |
| 5105 |
|
| 5106 |
/** |
| 5107 |
* @param {object} element |
| 5108 |
* @param {number} index |
| 5109 |
* @param {object[]} children |
| 5110 |
* @param {function} callback |
| 5111 |
* @return {string} |
| 5112 |
*/ |
| 5113 |
function stringify (element, index, children, callback) { |
| 5114 |
switch (element.type) { |
| 5115 |
case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.LAYER: if (element.children.length) break |
| 5116 |
case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.IMPORT: case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.DECLARATION: return element.return = element.return || element.value |
| 5117 |
case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.COMMENT: return '' |
| 5118 |
case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}' |
| 5119 |
case _Enum_js__WEBPACK_IMPORTED_MODULE_0__.RULESET: if (!(0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(element.value = element.props.join(','))) return '' |
| 5120 |
} |
| 5121 |
|
| 5122 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_1__.strlen)(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '' |
| 5123 |
} |
| 5124 |
|
| 5125 |
|
| 5126 |
/***/ }), |
| 5127 |
|
| 5128 |
/***/ "./node_modules/styled-components/node_modules/stylis/src/Tokenizer.js": |
| 5129 |
/*!*****************************************************************************!*\ |
| 5130 |
!*** ./node_modules/styled-components/node_modules/stylis/src/Tokenizer.js ***! |
| 5131 |
\*****************************************************************************/ |
| 5132 |
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 5133 |
|
| 5134 |
"use strict"; |
| 5135 |
__webpack_require__.r(__webpack_exports__); |
| 5136 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5137 |
/* harmony export */ alloc: () => (/* binding */ alloc), |
| 5138 |
/* harmony export */ caret: () => (/* binding */ caret), |
| 5139 |
/* harmony export */ char: () => (/* binding */ char), |
| 5140 |
/* harmony export */ character: () => (/* binding */ character), |
| 5141 |
/* harmony export */ characters: () => (/* binding */ characters), |
| 5142 |
/* harmony export */ column: () => (/* binding */ column), |
| 5143 |
/* harmony export */ commenter: () => (/* binding */ commenter), |
| 5144 |
/* harmony export */ copy: () => (/* binding */ copy), |
| 5145 |
/* harmony export */ dealloc: () => (/* binding */ dealloc), |
| 5146 |
/* harmony export */ delimit: () => (/* binding */ delimit), |
| 5147 |
/* harmony export */ delimiter: () => (/* binding */ delimiter), |
| 5148 |
/* harmony export */ escaping: () => (/* binding */ escaping), |
| 5149 |
/* harmony export */ identifier: () => (/* binding */ identifier), |
| 5150 |
/* harmony export */ length: () => (/* binding */ length), |
| 5151 |
/* harmony export */ lift: () => (/* binding */ lift), |
| 5152 |
/* harmony export */ line: () => (/* binding */ line), |
| 5153 |
/* harmony export */ next: () => (/* binding */ next), |
| 5154 |
/* harmony export */ node: () => (/* binding */ node), |
| 5155 |
/* harmony export */ peek: () => (/* binding */ peek), |
| 5156 |
/* harmony export */ position: () => (/* binding */ position), |
| 5157 |
/* harmony export */ prev: () => (/* binding */ prev), |
| 5158 |
/* harmony export */ slice: () => (/* binding */ slice), |
| 5159 |
/* harmony export */ token: () => (/* binding */ token), |
| 5160 |
/* harmony export */ tokenize: () => (/* binding */ tokenize), |
| 5161 |
/* harmony export */ tokenizer: () => (/* binding */ tokenizer), |
| 5162 |
/* harmony export */ whitespace: () => (/* binding */ whitespace) |
| 5163 |
/* harmony export */ }); |
| 5164 |
/* harmony import */ var _Utility_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Utility.js */ "./node_modules/styled-components/node_modules/stylis/src/Utility.js"); |
| 5165 |
|
| 5166 |
|
| 5167 |
var line = 1 |
| 5168 |
var column = 1 |
| 5169 |
var length = 0 |
| 5170 |
var position = 0 |
| 5171 |
var character = 0 |
| 5172 |
var characters = '' |
| 5173 |
|
| 5174 |
/** |
| 5175 |
* @param {string} value |
| 5176 |
* @param {object | null} root |
| 5177 |
* @param {object | null} parent |
| 5178 |
* @param {string} type |
| 5179 |
* @param {string[] | string} props |
| 5180 |
* @param {object[] | string} children |
| 5181 |
* @param {object[]} siblings |
| 5182 |
* @param {number} length |
| 5183 |
*/ |
| 5184 |
function node (value, root, parent, type, props, children, length, siblings) { |
| 5185 |
return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings} |
| 5186 |
} |
| 5187 |
|
| 5188 |
/** |
| 5189 |
* @param {object} root |
| 5190 |
* @param {object} props |
| 5191 |
* @return {object} |
| 5192 |
*/ |
| 5193 |
function copy (root, props) { |
| 5194 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.assign)(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props) |
| 5195 |
} |
| 5196 |
|
| 5197 |
/** |
| 5198 |
* @param {object} root |
| 5199 |
*/ |
| 5200 |
function lift (root) { |
| 5201 |
while (root.root) |
| 5202 |
root = copy(root.root, {children: [root]}) |
| 5203 |
|
| 5204 |
;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.append)(root, root.siblings) |
| 5205 |
} |
| 5206 |
|
| 5207 |
/** |
| 5208 |
* @return {number} |
| 5209 |
*/ |
| 5210 |
function char () { |
| 5211 |
return character |
| 5212 |
} |
| 5213 |
|
| 5214 |
/** |
| 5215 |
* @return {number} |
| 5216 |
*/ |
| 5217 |
function prev () { |
| 5218 |
character = position > 0 ? (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(characters, --position) : 0 |
| 5219 |
|
| 5220 |
if (column--, character === 10) |
| 5221 |
column = 1, line-- |
| 5222 |
|
| 5223 |
return character |
| 5224 |
} |
| 5225 |
|
| 5226 |
/** |
| 5227 |
* @return {number} |
| 5228 |
*/ |
| 5229 |
function next () { |
| 5230 |
character = position < length ? (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(characters, position++) : 0 |
| 5231 |
|
| 5232 |
if (column++, character === 10) |
| 5233 |
column = 1, line++ |
| 5234 |
|
| 5235 |
return character |
| 5236 |
} |
| 5237 |
|
| 5238 |
/** |
| 5239 |
* @return {number} |
| 5240 |
*/ |
| 5241 |
function peek () { |
| 5242 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.charat)(characters, position) |
| 5243 |
} |
| 5244 |
|
| 5245 |
/** |
| 5246 |
* @return {number} |
| 5247 |
*/ |
| 5248 |
function caret () { |
| 5249 |
return position |
| 5250 |
} |
| 5251 |
|
| 5252 |
/** |
| 5253 |
* @param {number} begin |
| 5254 |
* @param {number} end |
| 5255 |
* @return {string} |
| 5256 |
*/ |
| 5257 |
function slice (begin, end) { |
| 5258 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.substr)(characters, begin, end) |
| 5259 |
} |
| 5260 |
|
| 5261 |
/** |
| 5262 |
* @param {number} type |
| 5263 |
* @return {number} |
| 5264 |
*/ |
| 5265 |
function token (type) { |
| 5266 |
switch (type) { |
| 5267 |
// \0 \t \n \r \s whitespace token |
| 5268 |
case 0: case 9: case 10: case 13: case 32: |
| 5269 |
return 5 |
| 5270 |
// ! + , / > @ ~ isolate token |
| 5271 |
case 33: case 43: case 44: case 47: case 62: case 64: case 126: |
| 5272 |
// ; { } breakpoint token |
| 5273 |
case 59: case 123: case 125: |
| 5274 |
return 4 |
| 5275 |
// : accompanied token |
| 5276 |
case 58: |
| 5277 |
return 3 |
| 5278 |
// " ' ( [ opening delimit token |
| 5279 |
case 34: case 39: case 40: case 91: |
| 5280 |
return 2 |
| 5281 |
// ) ] closing delimit token |
| 5282 |
case 41: case 93: |
| 5283 |
return 1 |
| 5284 |
} |
| 5285 |
|
| 5286 |
return 0 |
| 5287 |
} |
| 5288 |
|
| 5289 |
/** |
| 5290 |
* @param {string} value |
| 5291 |
* @return {any[]} |
| 5292 |
*/ |
| 5293 |
function alloc (value) { |
| 5294 |
return line = column = 1, length = (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.strlen)(characters = value), position = 0, [] |
| 5295 |
} |
| 5296 |
|
| 5297 |
/** |
| 5298 |
* @param {any} value |
| 5299 |
* @return {any} |
| 5300 |
*/ |
| 5301 |
function dealloc (value) { |
| 5302 |
return characters = '', value |
| 5303 |
} |
| 5304 |
|
| 5305 |
/** |
| 5306 |
* @param {number} type |
| 5307 |
* @return {string} |
| 5308 |
*/ |
| 5309 |
function delimit (type) { |
| 5310 |
return (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.trim)(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type))) |
| 5311 |
} |
| 5312 |
|
| 5313 |
/** |
| 5314 |
* @param {string} value |
| 5315 |
* @return {string[]} |
| 5316 |
*/ |
| 5317 |
function tokenize (value) { |
| 5318 |
return dealloc(tokenizer(alloc(value))) |
| 5319 |
} |
| 5320 |
|
| 5321 |
/** |
| 5322 |
* @param {number} type |
| 5323 |
* @return {string} |
| 5324 |
*/ |
| 5325 |
function whitespace (type) { |
| 5326 |
while (character = peek()) |
| 5327 |
if (character < 33) |
| 5328 |
next() |
| 5329 |
else |
| 5330 |
break |
| 5331 |
|
| 5332 |
return token(type) > 2 || token(character) > 3 ? '' : ' ' |
| 5333 |
} |
| 5334 |
|
| 5335 |
/** |
| 5336 |
* @param {string[]} children |
| 5337 |
* @return {string[]} |
| 5338 |
*/ |
| 5339 |
function tokenizer (children) { |
| 5340 |
while (next()) |
| 5341 |
switch (token(character)) { |
| 5342 |
case 0: (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.append)(identifier(position - 1), children) |
| 5343 |
break |
| 5344 |
case 2: ;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.append)(delimit(character), children) |
| 5345 |
break |
| 5346 |
default: ;(0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.append)((0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.from)(character), children) |
| 5347 |
} |
| 5348 |
|
| 5349 |
return children |
| 5350 |
} |
| 5351 |
|
| 5352 |
/** |
| 5353 |
* @param {number} index |
| 5354 |
* @param {number} count |
| 5355 |
* @return {string} |
| 5356 |
*/ |
| 5357 |
function escaping (index, count) { |
| 5358 |
while (--count && next()) |
| 5359 |
// not 0-9 A-F a-f |
| 5360 |
if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97)) |
| 5361 |
break |
| 5362 |
|
| 5363 |
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32)) |
| 5364 |
} |
| 5365 |
|
| 5366 |
/** |
| 5367 |
* @param {number} type |
| 5368 |
* @return {number} |
| 5369 |
*/ |
| 5370 |
function delimiter (type) { |
| 5371 |
while (next()) |
| 5372 |
switch (character) { |
| 5373 |
// ] ) " ' |
| 5374 |
case type: |
| 5375 |
return position |
| 5376 |
// " ' |
| 5377 |
case 34: case 39: |
| 5378 |
if (type !== 34 && type !== 39) |
| 5379 |
delimiter(character) |
| 5380 |
break |
| 5381 |
// ( |
| 5382 |
case 40: |
| 5383 |
if (type === 41) |
| 5384 |
delimiter(type) |
| 5385 |
break |
| 5386 |
// \ |
| 5387 |
case 92: |
| 5388 |
next() |
| 5389 |
break |
| 5390 |
} |
| 5391 |
|
| 5392 |
return position |
| 5393 |
} |
| 5394 |
|
| 5395 |
/** |
| 5396 |
* @param {number} type |
| 5397 |
* @param {number} index |
| 5398 |
* @return {number} |
| 5399 |
*/ |
| 5400 |
function commenter (type, index) { |
| 5401 |
while (next()) |
| 5402 |
// // |
| 5403 |
if (type + character === 47 + 10) |
| 5404 |
break |
| 5405 |
// /* |
| 5406 |
else if (type + character === 42 + 42 && peek() === 47) |
| 5407 |
break |
| 5408 |
|
| 5409 |
return '/*' + slice(index, position - 1) + '*' + (0,_Utility_js__WEBPACK_IMPORTED_MODULE_0__.from)(type === 47 ? type : next()) |
| 5410 |
} |
| 5411 |
|
| 5412 |
/** |
| 5413 |
* @param {number} index |
| 5414 |
* @return {string} |
| 5415 |
*/ |
| 5416 |
function identifier (index) { |
| 5417 |
while (!token(peek())) |
| 5418 |
next() |
| 5419 |
|
| 5420 |
return slice(index, position) |
| 5421 |
} |
| 5422 |
|
| 5423 |
|
| 5424 |
/***/ }), |
| 5425 |
|
| 5426 |
/***/ "./node_modules/styled-components/node_modules/stylis/src/Utility.js": |
| 5427 |
/*!***************************************************************************!*\ |
| 5428 |
!*** ./node_modules/styled-components/node_modules/stylis/src/Utility.js ***! |
| 5429 |
\***************************************************************************/ |
| 5430 |
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 5431 |
|
| 5432 |
"use strict"; |
| 5433 |
__webpack_require__.r(__webpack_exports__); |
| 5434 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5435 |
/* harmony export */ abs: () => (/* binding */ abs), |
| 5436 |
/* harmony export */ append: () => (/* binding */ append), |
| 5437 |
/* harmony export */ assign: () => (/* binding */ assign), |
| 5438 |
/* harmony export */ charat: () => (/* binding */ charat), |
| 5439 |
/* harmony export */ combine: () => (/* binding */ combine), |
| 5440 |
/* harmony export */ filter: () => (/* binding */ filter), |
| 5441 |
/* harmony export */ from: () => (/* binding */ from), |
| 5442 |
/* harmony export */ hash: () => (/* binding */ hash), |
| 5443 |
/* harmony export */ indexof: () => (/* binding */ indexof), |
| 5444 |
/* harmony export */ match: () => (/* binding */ match), |
| 5445 |
/* harmony export */ replace: () => (/* binding */ replace), |
| 5446 |
/* harmony export */ sizeof: () => (/* binding */ sizeof), |
| 5447 |
/* harmony export */ strlen: () => (/* binding */ strlen), |
| 5448 |
/* harmony export */ substr: () => (/* binding */ substr), |
| 5449 |
/* harmony export */ trim: () => (/* binding */ trim) |
| 5450 |
/* harmony export */ }); |
| 5451 |
/** |
| 5452 |
* @param {number} |
| 5453 |
* @return {number} |
| 5454 |
*/ |
| 5455 |
var abs = Math.abs |
| 5456 |
|
| 5457 |
/** |
| 5458 |
* @param {number} |
| 5459 |
* @return {string} |
| 5460 |
*/ |
| 5461 |
var from = String.fromCharCode |
| 5462 |
|
| 5463 |
/** |
| 5464 |
* @param {object} |
| 5465 |
* @return {object} |
| 5466 |
*/ |
| 5467 |
var assign = Object.assign |
| 5468 |
|
| 5469 |
/** |
| 5470 |
* @param {string} value |
| 5471 |
* @param {number} length |
| 5472 |
* @return {number} |
| 5473 |
*/ |
| 5474 |
function hash (value, length) { |
| 5475 |
return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0 |
| 5476 |
} |
| 5477 |
|
| 5478 |
/** |
| 5479 |
* @param {string} value |
| 5480 |
* @return {string} |
| 5481 |
*/ |
| 5482 |
function trim (value) { |
| 5483 |
return value.trim() |
| 5484 |
} |
| 5485 |
|
| 5486 |
/** |
| 5487 |
* @param {string} value |
| 5488 |
* @param {RegExp} pattern |
| 5489 |
* @return {string?} |
| 5490 |
*/ |
| 5491 |
function match (value, pattern) { |
| 5492 |
return (value = pattern.exec(value)) ? value[0] : value |
| 5493 |
} |
| 5494 |
|
| 5495 |
/** |
| 5496 |
* @param {string} value |
| 5497 |
* @param {(string|RegExp)} pattern |
| 5498 |
* @param {string} replacement |
| 5499 |
* @return {string} |
| 5500 |
*/ |
| 5501 |
function replace (value, pattern, replacement) { |
| 5502 |
return value.replace(pattern, replacement) |
| 5503 |
} |
| 5504 |
|
| 5505 |
/** |
| 5506 |
* @param {string} value |
| 5507 |
* @param {string} search |
| 5508 |
* @param {number} position |
| 5509 |
* @return {number} |
| 5510 |
*/ |
| 5511 |
function indexof (value, search, position) { |
| 5512 |
return value.indexOf(search, position) |
| 5513 |
} |
| 5514 |
|
| 5515 |
/** |
| 5516 |
* @param {string} value |
| 5517 |
* @param {number} index |
| 5518 |
* @return {number} |
| 5519 |
*/ |
| 5520 |
function charat (value, index) { |
| 5521 |
return value.charCodeAt(index) | 0 |
| 5522 |
} |
| 5523 |
|
| 5524 |
/** |
| 5525 |
* @param {string} value |
| 5526 |
* @param {number} begin |
| 5527 |
* @param {number} end |
| 5528 |
* @return {string} |
| 5529 |
*/ |
| 5530 |
function substr (value, begin, end) { |
| 5531 |
return value.slice(begin, end) |
| 5532 |
} |
| 5533 |
|
| 5534 |
/** |
| 5535 |
* @param {string} value |
| 5536 |
* @return {number} |
| 5537 |
*/ |
| 5538 |
function strlen (value) { |
| 5539 |
return value.length |
| 5540 |
} |
| 5541 |
|
| 5542 |
/** |
| 5543 |
* @param {any[]} value |
| 5544 |
* @return {number} |
| 5545 |
*/ |
| 5546 |
function sizeof (value) { |
| 5547 |
return value.length |
| 5548 |
} |
| 5549 |
|
| 5550 |
/** |
| 5551 |
* @param {any} value |
| 5552 |
* @param {any[]} array |
| 5553 |
* @return {any} |
| 5554 |
*/ |
| 5555 |
function append (value, array) { |
| 5556 |
return array.push(value), value |
| 5557 |
} |
| 5558 |
|
| 5559 |
/** |
| 5560 |
* @param {string[]} array |
| 5561 |
* @param {function} callback |
| 5562 |
* @return {string} |
| 5563 |
*/ |
| 5564 |
function combine (array, callback) { |
| 5565 |
return array.map(callback).join('') |
| 5566 |
} |
| 5567 |
|
| 5568 |
/** |
| 5569 |
* @param {string[]} array |
| 5570 |
* @param {RegExp} pattern |
| 5571 |
* @return {string[]} |
| 5572 |
*/ |
| 5573 |
function filter (array, pattern) { |
| 5574 |
return array.filter(function (value) { return !match(value, pattern) }) |
| 5575 |
} |
| 5576 |
|
| 5577 |
|
| 5578 |
/***/ }), |
| 5579 |
|
| 5580 |
/***/ "./node_modules/styled-components/node_modules/tslib/tslib.es6.mjs": |
| 5581 |
/*!*************************************************************************!*\ |
| 5582 |
!*** ./node_modules/styled-components/node_modules/tslib/tslib.es6.mjs ***! |
| 5583 |
\*************************************************************************/ |
| 5584 |
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { |
| 5585 |
|
| 5586 |
"use strict"; |
| 5587 |
__webpack_require__.r(__webpack_exports__); |
| 5588 |
/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 5589 |
/* harmony export */ __addDisposableResource: () => (/* binding */ __addDisposableResource), |
| 5590 |
/* harmony export */ __assign: () => (/* binding */ __assign), |
| 5591 |
/* harmony export */ __asyncDelegator: () => (/* binding */ __asyncDelegator), |
| 5592 |
/* harmony export */ __asyncGenerator: () => (/* binding */ __asyncGenerator), |
| 5593 |
/* harmony export */ __asyncValues: () => (/* binding */ __asyncValues), |
| 5594 |
/* harmony export */ __await: () => (/* binding */ __await), |
| 5595 |
/* harmony export */ __awaiter: () => (/* binding */ __awaiter), |
| 5596 |
/* harmony export */ __classPrivateFieldGet: () => (/* binding */ __classPrivateFieldGet), |
| 5597 |
/* harmony export */ __classPrivateFieldIn: () => (/* binding */ __classPrivateFieldIn), |
| 5598 |
/* harmony export */ __classPrivateFieldSet: () => (/* binding */ __classPrivateFieldSet), |
| 5599 |
/* harmony export */ __createBinding: () => (/* binding */ __createBinding), |
| 5600 |
/* harmony export */ __decorate: () => (/* binding */ __decorate), |
| 5601 |
/* harmony export */ __disposeResources: () => (/* binding */ __disposeResources), |
| 5602 |
/* harmony export */ __esDecorate: () => (/* binding */ __esDecorate), |
| 5603 |
/* harmony export */ __exportStar: () => (/* binding */ __exportStar), |
| 5604 |
/* harmony export */ __extends: () => (/* binding */ __extends), |
| 5605 |
/* harmony export */ __generator: () => (/* binding */ __generator), |
| 5606 |
/* harmony export */ __importDefault: () => (/* binding */ __importDefault), |
| 5607 |
/* harmony export */ __importStar: () => (/* binding */ __importStar), |
| 5608 |
/* harmony export */ __makeTemplateObject: () => (/* binding */ __makeTemplateObject), |
| 5609 |
/* harmony export */ __metadata: () => (/* binding */ __metadata), |
| 5610 |
/* harmony export */ __param: () => (/* binding */ __param), |
| 5611 |
/* harmony export */ __propKey: () => (/* binding */ __propKey), |
| 5612 |
/* harmony export */ __read: () => (/* binding */ __read), |
| 5613 |
/* harmony export */ __rest: () => (/* binding */ __rest), |
| 5614 |
/* harmony export */ __runInitializers: () => (/* binding */ __runInitializers), |
| 5615 |
/* harmony export */ __setFunctionName: () => (/* binding */ __setFunctionName), |
| 5616 |
/* harmony export */ __spread: () => (/* binding */ __spread), |
| 5617 |
/* harmony export */ __spreadArray: () => (/* binding */ __spreadArray), |
| 5618 |
/* harmony export */ __spreadArrays: () => (/* binding */ __spreadArrays), |
| 5619 |
/* harmony export */ __values: () => (/* binding */ __values), |
| 5620 |
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) |
| 5621 |
/* harmony export */ }); |
| 5622 |
/****************************************************************************** |
| 5623 |
Copyright (c) Microsoft Corporation. |
| 5624 |
|
| 5625 |
Permission to use, copy, modify, and/or distribute this software for any |
| 5626 |
purpose with or without fee is hereby granted. |
| 5627 |
|
| 5628 |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
| 5629 |
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
| 5630 |
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
| 5631 |
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
| 5632 |
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
| 5633 |
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 5634 |
PERFORMANCE OF THIS SOFTWARE. |
| 5635 |
***************************************************************************** */ |
| 5636 |
/* global Reflect, Promise, SuppressedError, Symbol */ |
| 5637 |
|
| 5638 |
var extendStatics = function(d, b) { |
| 5639 |
extendStatics = Object.setPrototypeOf || |
| 5640 |
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |
| 5641 |
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; |
| 5642 |
return extendStatics(d, b); |
| 5643 |
}; |
| 5644 |
|
| 5645 |
function __extends(d, b) { |
| 5646 |
if (typeof b !== "function" && b !== null) |
| 5647 |
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); |
| 5648 |
extendStatics(d, b); |
| 5649 |
function __() { this.constructor = d; } |
| 5650 |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
| 5651 |
} |
| 5652 |
|
| 5653 |
var __assign = function() { |
| 5654 |
__assign = Object.assign || function __assign(t) { |
| 5655 |
for (var s, i = 1, n = arguments.length; i < n; i++) { |
| 5656 |
s = arguments[i]; |
| 5657 |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; |
| 5658 |
} |
| 5659 |
return t; |
| 5660 |
} |
| 5661 |
return __assign.apply(this, arguments); |
| 5662 |
} |
| 5663 |
|
| 5664 |
function __rest(s, e) { |
| 5665 |
var t = {}; |
| 5666 |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) |
| 5667 |
t[p] = s[p]; |
| 5668 |
if (s != null && typeof Object.getOwnPropertySymbols === "function") |
| 5669 |
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { |
| 5670 |
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) |
| 5671 |
t[p[i]] = s[p[i]]; |
| 5672 |
} |
| 5673 |
return t; |
| 5674 |
} |
| 5675 |
|
| 5676 |
function __decorate(decorators, target, key, desc) { |
| 5677 |
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
| 5678 |
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
| 5679 |
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; |
| 5680 |
return c > 3 && r && Object.defineProperty(target, key, r), r; |
| 5681 |
} |
| 5682 |
|
| 5683 |
function __param(paramIndex, decorator) { |
| 5684 |
return function (target, key) { decorator(target, key, paramIndex); } |
| 5685 |
} |
| 5686 |
|
| 5687 |
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { |
| 5688 |
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } |
| 5689 |
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; |
| 5690 |
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; |
| 5691 |
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); |
| 5692 |
var _, done = false; |
| 5693 |
for (var i = decorators.length - 1; i >= 0; i--) { |
| 5694 |
var context = {}; |
| 5695 |
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; |
| 5696 |
for (var p in contextIn.access) context.access[p] = contextIn.access[p]; |
| 5697 |
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; |
| 5698 |
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); |
| 5699 |
if (kind === "accessor") { |
| 5700 |
if (result === void 0) continue; |
| 5701 |
if (result === null || typeof result !== "object") throw new TypeError("Object expected"); |
| 5702 |
if (_ = accept(result.get)) descriptor.get = _; |
| 5703 |
if (_ = accept(result.set)) descriptor.set = _; |
| 5704 |
if (_ = accept(result.init)) initializers.unshift(_); |
| 5705 |
} |
| 5706 |
else if (_ = accept(result)) { |
| 5707 |
if (kind === "field") initializers.unshift(_); |
| 5708 |
else descriptor[key] = _; |
| 5709 |
} |
| 5710 |
} |
| 5711 |
if (target) Object.defineProperty(target, contextIn.name, descriptor); |
| 5712 |
done = true; |
| 5713 |
}; |
| 5714 |
|
| 5715 |
function __runInitializers(thisArg, initializers, value) { |
| 5716 |
var useValue = arguments.length > 2; |
| 5717 |
for (var i = 0; i < initializers.length; i++) { |
| 5718 |
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); |
| 5719 |
} |
| 5720 |
return useValue ? value : void 0; |
| 5721 |
}; |
| 5722 |
|
| 5723 |
function __propKey(x) { |
| 5724 |
return typeof x === "symbol" ? x : "".concat(x); |
| 5725 |
}; |
| 5726 |
|
| 5727 |
function __setFunctionName(f, name, prefix) { |
| 5728 |
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; |
| 5729 |
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); |
| 5730 |
}; |
| 5731 |
|
| 5732 |
function __metadata(metadataKey, metadataValue) { |
| 5733 |
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); |
| 5734 |
} |
| 5735 |
|
| 5736 |
function __awaiter(thisArg, _arguments, P, generator) { |
| 5737 |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |
| 5738 |
return new (P || (P = Promise))(function (resolve, reject) { |
| 5739 |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |
| 5740 |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } |
| 5741 |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } |
| 5742 |
step((generator = generator.apply(thisArg, _arguments || [])).next()); |
| 5743 |
}); |
| 5744 |
} |
| 5745 |
|
| 5746 |
function __generator(thisArg, body) { |
| 5747 |
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; |
| 5748 |
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; |
| 5749 |
function verb(n) { return function (v) { return step([n, v]); }; } |
| 5750 |
function step(op) { |
| 5751 |
if (f) throw new TypeError("Generator is already executing."); |
| 5752 |
while (g && (g = 0, op[0] && (_ = 0)), _) try { |
| 5753 |
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; |
| 5754 |
if (y = 0, t) op = [op[0] & 2, t.value]; |
| 5755 |
switch (op[0]) { |
| 5756 |
case 0: case 1: t = op; break; |
| 5757 |
case 4: _.label++; return { value: op[1], done: false }; |
| 5758 |
case 5: _.label++; y = op[1]; op = [0]; continue; |
| 5759 |
case 7: op = _.ops.pop(); _.trys.pop(); continue; |
| 5760 |
default: |
| 5761 |
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } |
| 5762 |
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } |
| 5763 |
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } |
| 5764 |
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } |
| 5765 |
if (t[2]) _.ops.pop(); |
| 5766 |
_.trys.pop(); continue; |
| 5767 |
} |
| 5768 |
op = body.call(thisArg, _); |
| 5769 |
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } |
| 5770 |
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; |
| 5771 |
} |
| 5772 |
} |
| 5773 |
|
| 5774 |
var __createBinding = Object.create ? (function(o, m, k, k2) { |
| 5775 |
if (k2 === undefined) k2 = k; |
| 5776 |
var desc = Object.getOwnPropertyDescriptor(m, k); |
| 5777 |
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { |
| 5778 |
desc = { enumerable: true, get: function() { return m[k]; } }; |
| 5779 |
} |
| 5780 |
Object.defineProperty(o, k2, desc); |
| 5781 |
}) : (function(o, m, k, k2) { |
| 5782 |
if (k2 === undefined) k2 = k; |
| 5783 |
o[k2] = m[k]; |
| 5784 |
}); |
| 5785 |
|
| 5786 |
function __exportStar(m, o) { |
| 5787 |
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); |
| 5788 |
} |
| 5789 |
|
| 5790 |
function __values(o) { |
| 5791 |
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; |
| 5792 |
if (m) return m.call(o); |
| 5793 |
if (o && typeof o.length === "number") return { |
| 5794 |
next: function () { |
| 5795 |
if (o && i >= o.length) o = void 0; |
| 5796 |
return { value: o && o[i++], done: !o }; |
| 5797 |
} |
| 5798 |
}; |
| 5799 |
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); |
| 5800 |
} |
| 5801 |
|
| 5802 |
function __read(o, n) { |
| 5803 |
var m = typeof Symbol === "function" && o[Symbol.iterator]; |
| 5804 |
if (!m) return o; |
| 5805 |
var i = m.call(o), r, ar = [], e; |
| 5806 |
try { |
| 5807 |
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); |
| 5808 |
} |
| 5809 |
catch (error) { e = { error: error }; } |
| 5810 |
finally { |
| 5811 |
try { |
| 5812 |
if (r && !r.done && (m = i["return"])) m.call(i); |
| 5813 |
} |
| 5814 |
finally { if (e) throw e.error; } |
| 5815 |
} |
| 5816 |
return ar; |
| 5817 |
} |
| 5818 |
|
| 5819 |
/** @deprecated */ |
| 5820 |
function __spread() { |
| 5821 |
for (var ar = [], i = 0; i < arguments.length; i++) |
| 5822 |
ar = ar.concat(__read(arguments[i])); |
| 5823 |
return ar; |
| 5824 |
} |
| 5825 |
|
| 5826 |
/** @deprecated */ |
| 5827 |
function __spreadArrays() { |
| 5828 |
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; |
| 5829 |
for (var r = Array(s), k = 0, i = 0; i < il; i++) |
| 5830 |
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) |
| 5831 |
r[k] = a[j]; |
| 5832 |
return r; |
| 5833 |
} |
| 5834 |
|
| 5835 |
function __spreadArray(to, from, pack) { |
| 5836 |
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { |
| 5837 |
if (ar || !(i in from)) { |
| 5838 |
if (!ar) ar = Array.prototype.slice.call(from, 0, i); |
| 5839 |
ar[i] = from[i]; |
| 5840 |
} |
| 5841 |
} |
| 5842 |
return to.concat(ar || Array.prototype.slice.call(from)); |
| 5843 |
} |
| 5844 |
|
| 5845 |
function __await(v) { |
| 5846 |
return this instanceof __await ? (this.v = v, this) : new __await(v); |
| 5847 |
} |
| 5848 |
|
| 5849 |
function __asyncGenerator(thisArg, _arguments, generator) { |
| 5850 |
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
| 5851 |
var g = generator.apply(thisArg, _arguments || []), i, q = []; |
| 5852 |
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; |
| 5853 |
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } |
| 5854 |
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } |
| 5855 |
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } |
| 5856 |
function fulfill(value) { resume("next", value); } |
| 5857 |
function reject(value) { resume("throw", value); } |
| 5858 |
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } |
| 5859 |
} |
| 5860 |
|
| 5861 |
function __asyncDelegator(o) { |
| 5862 |
var i, p; |
| 5863 |
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; |
| 5864 |
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } |
| 5865 |
} |
| 5866 |
|
| 5867 |
function __asyncValues(o) { |
| 5868 |
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
| 5869 |
var m = o[Symbol.asyncIterator], i; |
| 5870 |
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); |
| 5871 |
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } |
| 5872 |
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } |
| 5873 |
} |
| 5874 |
|
| 5875 |
function __makeTemplateObject(cooked, raw) { |
| 5876 |
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } |
| 5877 |
return cooked; |
| 5878 |
}; |
| 5879 |
|
| 5880 |
var __setModuleDefault = Object.create ? (function(o, v) { |
| 5881 |
Object.defineProperty(o, "default", { enumerable: true, value: v }); |
| 5882 |
}) : function(o, v) { |
| 5883 |
o["default"] = v; |
| 5884 |
}; |
| 5885 |
|
| 5886 |
function __importStar(mod) { |
| 5887 |
if (mod && mod.__esModule) return mod; |
| 5888 |
var result = {}; |
| 5889 |
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); |
| 5890 |
__setModuleDefault(result, mod); |
| 5891 |
return result; |
| 5892 |
} |
| 5893 |
|
| 5894 |
function __importDefault(mod) { |
| 5895 |
return (mod && mod.__esModule) ? mod : { default: mod }; |
| 5896 |
} |
| 5897 |
|
| 5898 |
function __classPrivateFieldGet(receiver, state, kind, f) { |
| 5899 |
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); |
| 5900 |
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); |
| 5901 |
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); |
| 5902 |
} |
| 5903 |
|
| 5904 |
function __classPrivateFieldSet(receiver, state, value, kind, f) { |
| 5905 |
if (kind === "m") throw new TypeError("Private method is not writable"); |
| 5906 |
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); |
| 5907 |
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); |
| 5908 |
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; |
| 5909 |
} |
| 5910 |
|
| 5911 |
function __classPrivateFieldIn(state, receiver) { |
| 5912 |
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); |
| 5913 |
return typeof state === "function" ? receiver === state : state.has(receiver); |
| 5914 |
} |
| 5915 |
|
| 5916 |
function __addDisposableResource(env, value, async) { |
| 5917 |
if (value !== null && value !== void 0) { |
| 5918 |
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); |
| 5919 |
var dispose; |
| 5920 |
if (async) { |
| 5921 |
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); |
| 5922 |
dispose = value[Symbol.asyncDispose]; |
| 5923 |
} |
| 5924 |
if (dispose === void 0) { |
| 5925 |
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); |
| 5926 |
dispose = value[Symbol.dispose]; |
| 5927 |
} |
| 5928 |
if (typeof dispose !== "function") throw new TypeError("Object not disposable."); |
| 5929 |
env.stack.push({ value: value, dispose: dispose, async: async }); |
| 5930 |
} |
| 5931 |
else if (async) { |
| 5932 |
env.stack.push({ async: true }); |
| 5933 |
} |
| 5934 |
return value; |
| 5935 |
} |
| 5936 |
|
| 5937 |
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { |
| 5938 |
var e = new Error(message); |
| 5939 |
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; |
| 5940 |
}; |
| 5941 |
|
| 5942 |
function __disposeResources(env) { |
| 5943 |
function fail(e) { |
| 5944 |
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; |
| 5945 |
env.hasError = true; |
| 5946 |
} |
| 5947 |
function next() { |
| 5948 |
while (env.stack.length) { |
| 5949 |
var rec = env.stack.pop(); |
| 5950 |
try { |
| 5951 |
var result = rec.dispose && rec.dispose.call(rec.value); |
| 5952 |
if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); |
| 5953 |
} |
| 5954 |
catch (e) { |
| 5955 |
fail(e); |
| 5956 |
} |
| 5957 |
} |
| 5958 |
if (env.hasError) throw env.error; |
| 5959 |
} |
| 5960 |
return next(); |
| 5961 |
} |
| 5962 |
|
| 5963 |
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ |
| 5964 |
__extends, |
| 5965 |
__assign, |
| 5966 |
__rest, |
| 5967 |
__decorate, |
| 5968 |
__param, |
| 5969 |
__metadata, |
| 5970 |
__awaiter, |
| 5971 |
__generator, |
| 5972 |
__createBinding, |
| 5973 |
__exportStar, |
| 5974 |
__values, |
| 5975 |
__read, |
| 5976 |
__spread, |
| 5977 |
__spreadArrays, |
| 5978 |
__spreadArray, |
| 5979 |
__await, |
| 5980 |
__asyncGenerator, |
| 5981 |
__asyncDelegator, |
| 5982 |
__asyncValues, |
| 5983 |
__makeTemplateObject, |
| 5984 |
__importStar, |
| 5985 |
__importDefault, |
| 5986 |
__classPrivateFieldGet, |
| 5987 |
__classPrivateFieldSet, |
| 5988 |
__classPrivateFieldIn, |
| 5989 |
__addDisposableResource, |
| 5990 |
__disposeResources, |
| 5991 |
}); |
| 5992 |
|
| 5993 |
|
| 5994 |
/***/ }) |
| 5995 |
|
| 5996 |
/******/ }); |
| 5997 |
/************************************************************************/ |
| 5998 |
/******/ // The module cache |
| 5999 |
/******/ var __webpack_module_cache__ = {}; |
| 6000 |
/******/ |
| 6001 |
/******/ // The require function |
| 6002 |
/******/ function __webpack_require__(moduleId) { |
| 6003 |
/******/ // Check if module is in cache |
| 6004 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 6005 |
/******/ if (cachedModule !== undefined) { |
| 6006 |
/******/ return cachedModule.exports; |
| 6007 |
/******/ } |
| 6008 |
/******/ // Create a new module (and put it into the cache) |
| 6009 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
| 6010 |
/******/ // no module.id needed |
| 6011 |
/******/ // no module.loaded needed |
| 6012 |
/******/ exports: {} |
| 6013 |
/******/ }; |
| 6014 |
/******/ |
| 6015 |
/******/ // Execute the module function |
| 6016 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 6017 |
/******/ |
| 6018 |
/******/ // Return the exports of the module |
| 6019 |
/******/ return module.exports; |
| 6020 |
/******/ } |
| 6021 |
/******/ |
| 6022 |
/************************************************************************/ |
| 6023 |
/******/ /* webpack/runtime/compat get default export */ |
| 6024 |
/******/ (() => { |
| 6025 |
/******/ // getDefaultExport function for compatibility with non-harmony modules |
| 6026 |
/******/ __webpack_require__.n = (module) => { |
| 6027 |
/******/ var getter = module && module.__esModule ? |
| 6028 |
/******/ () => (module['default']) : |
| 6029 |
/******/ () => (module); |
| 6030 |
/******/ __webpack_require__.d(getter, { a: getter }); |
| 6031 |
/******/ return getter; |
| 6032 |
/******/ }; |
| 6033 |
/******/ })(); |
| 6034 |
/******/ |
| 6035 |
/******/ /* webpack/runtime/define property getters */ |
| 6036 |
/******/ (() => { |
| 6037 |
/******/ // define getter functions for harmony exports |
| 6038 |
/******/ __webpack_require__.d = (exports, definition) => { |
| 6039 |
/******/ for(var key in definition) { |
| 6040 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
| 6041 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
| 6042 |
/******/ } |
| 6043 |
/******/ } |
| 6044 |
/******/ }; |
| 6045 |
/******/ })(); |
| 6046 |
/******/ |
| 6047 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 6048 |
/******/ (() => { |
| 6049 |
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
| 6050 |
/******/ })(); |
| 6051 |
/******/ |
| 6052 |
/******/ /* webpack/runtime/make namespace object */ |
| 6053 |
/******/ (() => { |
| 6054 |
/******/ // define __esModule on exports |
| 6055 |
/******/ __webpack_require__.r = (exports) => { |
| 6056 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
| 6057 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 6058 |
/******/ } |
| 6059 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 6060 |
/******/ }; |
| 6061 |
/******/ })(); |
| 6062 |
/******/ |
| 6063 |
/******/ /* webpack/runtime/nonce */ |
| 6064 |
/******/ (() => { |
| 6065 |
/******/ __webpack_require__.nc = undefined; |
| 6066 |
/******/ })(); |
| 6067 |
/******/ |
| 6068 |
/************************************************************************/ |
| 6069 |
var __webpack_exports__ = {}; |
| 6070 |
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 6071 |
(() => { |
| 6072 |
"use strict"; |
| 6073 |
/*!**********************!*\ |
| 6074 |
!*** ./src/index.js ***! |
| 6075 |
\**********************/ |
| 6076 |
__webpack_require__.r(__webpack_exports__); |
| 6077 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); |
| 6078 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
| 6079 |
/* harmony import */ var _settings_Settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings/Settings */ "./src/settings/Settings.js"); |
| 6080 |
/* harmony import */ var _statistics_Statistics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./statistics/Statistics */ "./src/statistics/Statistics.js"); |
| 6081 |
/* harmony import */ var _meta_general_Meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./meta/general/Meta */ "./src/meta/general/Meta.js"); |
| 6082 |
/* harmony import */ var _meta_password_lists_PasswordListMeta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./meta/password-lists/PasswordListMeta */ "./src/meta/password-lists/PasswordListMeta.js"); |
| 6083 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); |
| 6084 |
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__); |
| 6085 |
// eslint-disable-next-line import/no-extraneous-dependencies |
| 6086 |
|
| 6087 |
|
| 6088 |
|
| 6089 |
|
| 6090 |
|
| 6091 |
|
| 6092 |
if (options.screen === 'meta') { |
| 6093 |
let meta = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createRoot)(document.getElementById('passster-metabox')); |
| 6094 |
meta.render(/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_meta_general_Meta__WEBPACK_IMPORTED_MODULE_3__["default"], {})); |
| 6095 |
} else if (options.screen === 'password-lists') { |
| 6096 |
let lists_meta = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createRoot)(document.getElementById('password-lists-metabox')); |
| 6097 |
lists_meta.render(/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_meta_password_lists_PasswordListMeta__WEBPACK_IMPORTED_MODULE_4__["default"], {})); |
| 6098 |
} else if (options.screen === 'passster-statistics') { |
| 6099 |
let lists_meta = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createRoot)(document.getElementById('passster-statistics')); |
| 6100 |
lists_meta.render(/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_statistics_Statistics__WEBPACK_IMPORTED_MODULE_2__["default"], {})); |
| 6101 |
} else if (options.screen === 'passster-settings') { |
| 6102 |
let settings = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createRoot)(document.getElementById('passster-settings')); |
| 6103 |
settings.render(/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_settings_Settings__WEBPACK_IMPORTED_MODULE_1__["default"], {})); |
| 6104 |
} |
| 6105 |
})(); |
| 6106 |
|
| 6107 |
/******/ })() |
| 6108 |
; |
| 6109 |
//# sourceMappingURL=index.js.map |