diff --git a/build/blocks/events-list/events-list.asset.php b/build/blocks/events-list/events-list.asset.php index 9573a4391..727f69d5e 100644 --- a/build/blocks/events-list/events-list.asset.php +++ b/build/blocks/events-list/events-list.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '5aeb2dc869f0cb9e38a1'); + array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '5a0952f104a4df5253e4'); diff --git a/build/blocks/events-list/events-list.js b/build/blocks/events-list/events-list.js index a9fb6fd86..aeb4b0a63 100644 --- a/build/blocks/events-list/events-list.js +++ b/build/blocks/events-list/events-list.js @@ -1,2 +1,2 @@ (()=>{var e={9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(9960),i=n(7790);r(n(7790),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,o=new i.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=d;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var a=e.call(this,o)||this;return a.name=t,a.attribs=n,a.type=r,a}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(d);function v(e){return(0,i.isTag)(e)}function y(e){return e.type===i.ElementType.CDATA}function g(e){return e.type===i.ElementType.Text}function b(e){return e.type===i.ElementType.Comment}function _(e){return e.type===i.ElementType.Directive}function E(e){return e.type===i.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?O(e.children):[],r=new m(e.name,a({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=r}else if(y(e)){o=t?O(e.children):[];var i=new f(o);o.forEach((function(e){return e.parent=i})),n=i}else if(E(e)){o=t?O(e.children):[];var s=new h(o);o.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new p(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",a=/<([a-zA-Z]+[0-9]?)/,i=//i,s=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var p=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),p.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var d=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=d.documentElement.querySelector(t);return n&&(n.innerHTML=e),d}return d.documentElement.innerHTML=e,d}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes}),t.default=function(e){var t,u,p=e.match(a),d=p&&p[1]?p[1].toLowerCase():"";switch(d){case n:var h=c(e);return i.test(e)||null===(t=null==(v=h.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),s.test(e)||null===(u=null==(v=h.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),h.querySelectorAll(n);case o:case r:var m=l(e).querySelectorAll(d);return s.test(e)&&i.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(v=l(e,r).querySelector(r)).childNodes;var v}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),a=n(1507),i=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(i),n=t?t[1]:void 0;return(0,a.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function a(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),a=["checked","value"],i=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var p=e[u];if((0,o.isCustomAttribute)(u))n[u]=p;else{var d=u.toLowerCase(),f=l(d);if(f){var h=(0,o.getPropertyInfo)(f);switch(a.includes(f)&&i.includes(t)&&!c&&(f=l("default"+d)),n[f]=p,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===p&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=p)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),a=o(n(484)),i=n(4606),s={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,i.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||i.returnFirstArg,u=(null==n?void 0:n.library)||s,p=u.cloneElement,d=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(y=p(y,{key:y.key||m})),o.push(c(y,v,m));continue}}if("text"!==v.type){var g=v,b={};l(g)?((0,i.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,a.default)(g.attribs,g.name));var _=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(_=e(v.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(d(v.name,b,_),v,m))}else{var E=!v.data.trim().length;if(E&&v.parent&&!(0,i.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&E)continue;o.push(c(v.data,v,m))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var a=o(n(484));t.attributesToProps=a.default;var i=o(n(3670));t.domToReact=i.default;var s=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,i.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),a=o(n(1476)),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!i.has(e):Boolean(t&&"string"==typeof t.is)};var s={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,a.default)(e,s)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var p=1,d=1;function f(e){var t=e.match(n);t&&(p+=t.length);var o=e.lastIndexOf("\n");d=~o?e.length-o:d+e.length}function h(){var e={line:p,column:d};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:p,column:d},this.source=l.source}m.prototype.content=e;var v=[];function y(t){var n=new Error(l.source+":"+p+":"+d+": "+t);if(n.reason=t,n.filename=l.source,n.line=p,n.column=d,n.source=e,!l.silent)throw n;v.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function _(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return y("End of comment missing");var o=e.slice(2,n-2);return d+=2,f(o),e=e.slice(n),d+=2,t({type:"comment",comment:o})}}function w(){var e=h(),n=g(r);if(n){if(E(),!g(a))return y("property missing ':'");var o=g(i),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(s),l}}return b(),function(){var e,t=[];for(_(t);e=w();)!1!==e&&(t.push(e),_(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>i}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},a=o.base;return n.state.afterOpen&&(a=a+" "+o.afterOpen),n.state.beforeClose&&(a=a+" "+o.beforeClose),"string"==typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,a=e.parentSelector,i=a&&a().ownerDocument||document;r&&p.add(i.body,r),o&&p.add(i.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,a=e.defaultStyles,i=e.children,s=n?{}:a.content,l=r?{}:a.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),p=this.props.contentElement(u,i);return this.props.overlayElement(c,p)}}]),t}(i.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(f.default),s.default.instanceOf(d.SafeHTMLCollection),s.default.instanceOf(d.SafeNodeList),s.default.arrayOf(s.default.instanceOf(f.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i&&(i.removeAttribute?i.removeAttribute("aria-hidden"):null!=i.length?i.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(i).forEach((function(e){return e.removeAttribute("aria-hidden")}))),i=null},t.log=function(){},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t=n}return i=t||i},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){i=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},a=n(1112),i=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||i;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[a,i],t=0;t0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==i&&document.body.appendChild(i)):(a.parentElement&&a.parentElement.removeChild(a),i.parentElement&&i.parentElement.removeChild(i))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var a=document.body;for(var i in o)r(a,o[i]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(a,e),r.add(e)}));var r,a},t.remove=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(a,e),0===a[e]&&r.remove(e)}));var r,a}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==a.length&&(t=a.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){i=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){i=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},a=[],i=null,s=!1;function l(){s=!0}function c(){if(s){if(s=!1,!i)return;setTimeout((function(){i.contains(document.activeElement)||((0,r.default)(i)[0]||i).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,a=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=a},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,i=t.shiftKey,s=n[0],l=n[n.length-1],c=a();if(e===c){if(!i)return;o=l}if(l!==c||i||(o=s),s===c&&i&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var p=n.indexOf(c);if(p>-1&&(p+=i?-1:1),void 0===(o=n[p]))return t.preventDefault(),void(o=i?l:s).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?a(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(i)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function a(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),a=r.getPropertyValue("display");return t?a!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):a===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function i(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),a(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const a=/[\-\:]([a-z])/g,i=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=p},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),a=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,a.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,l):e.replace(a,l)).replace(o,s))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),a="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;a?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=n(9196);const t=window.wp.domReady;var o=n.n(t);const r=window.wp.element,a=window.wp.components,i=window.wp.i18n;var s=n(3426);const l=s.default||s;var c=n(3253),u=n.n(c);const p=window.wp.apiFetch;var d=n.n(p);const f=({type:t="upcoming",status:n="attend"})=>{const o={upcoming:{attend:{icon:"",text:""},attending:{icon:"dashicons dashicons-yes-alt",text:(0,i.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,i.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,i.__)("Not Attending","gatherpress")}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,i.__)("Went","gatherpress")},attend:{icon:"dashicons dashicons-dismiss",text:(0,i.__)("Didn't Go","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,i.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,i.__)("Didn't Go","gatherpress")}}};return(0,e.createElement)("div",{className:"gp-status__response"},(0,e.createElement)("span",{className:o[t][n].icon}),(0,e.createElement)("strong",null,o[t][n].text))};function h(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const m=({eventId:t,currentUser:n="",type:o})=>{const[s,c]=(0,r.useState)(n.status),[p,m]=(0,r.useState)(Number(n.anonymous)),[v,y]=(0,r.useState)(n.guests),[g,b]=(0,r.useState)("hidden"),[_,E]=(0,r.useState)("false"),[w,O]=(0,r.useState)(!1);if("past"===o)return"";"undefined"==typeof adminpage&&u().setAppElement(".gp-enabled");const C=e=>{e.preventDefault(),O(!1)},S=async(e,n,o,r=0,a=!0)=>{e.preventDefault(),"attending"!==n&&(r=0),d()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:t,status:n,guests:r,anonymous:o,_wpnonce:h("nonce")}}).then((t=>{if(t.success){c(t.status),y(t.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[e,o]of Object.entries(t.responses))n[e]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:t.status,setRsvpResponse:t.responses,setRsvpCount:n,setRsvpSeeAllLink:n[t.status]>8,setOnlineEventLink:t.online_link},t.event_id),a&&C(e)}}))},x=e=>{switch(e){case"attending":return(0,i.__)("You're attending","gatherpress");case"waiting_list":return(0,i.__)("You're wait listed","gatherpress");case"not_attending":return(0,i.__)("You're not attending","gatherpress")}return(0,i.__)("RSVP to this event","gatherpress")};return(0,e.createElement)("div",{className:"gp-rsvp"},(0,e.createElement)(a.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":_,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(b("hidden"===g?"show":"hidden"),E("false"===_?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),O(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,i.__)("Edit RSVP","gatherpress")}return(0,i.__)("RSVP","gatherpress")})(s))),(0,e.createElement)(u(),{isOpen:w,onRequestClose:C,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,i.__)("Edit RSVP","gatherpress")},""===n&&(0,e.createElement)((()=>(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},(0,i.__)("Login Required","gatherpress")),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},(0,i.__)("You must ","gatherpress"),(0,e.createElement)("a",{href:h("login_url")},(0,i.__)("Login","gatherpress")),(0,i.__)(" to RSVP to events.","gatherpress")),""!==h("registration_url")&&(0,e.createElement)("div",{className:"gp-modal__text"},(0,e.createElement)("a",{href:h("registration_url")},(0,i.__)("Register","gatherpress")),(0,i.__)(" if you do not have an account.","gatherpress"))),(0,e.createElement)(a.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,i.__)("Close","gatherpress")))))),null),""!==n&&(0,e.createElement)((({status:t})=>{let n="",o="";return"not_attending"===t||"attend"===t?(n="attending",o=(0,i.__)("Attend","gatherpress")):(n="not_attending",o=(0,i.__)("Not Attending","gatherpress")),(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},x(s)?x(s):(0,e.createElement)(a.Spinner,null)),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},l((0,i.sprintf)(/* translators: %s: button label. */ -(0,i.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+o+""))),1===h("event_allow_anonymous_rsvp")?(0,e.createElement)("div",{className:"gp-modal__anonymous"},(0,e.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);m(t),S(e,s,t,v,!1)},checked:p}),(0,e.createElement)("label",{htmlFor:"gp-anonymous"},(0,i.__)("List me as anonymous.","gatherpress"))):(0,e.createElement)(e.Fragment,null)),(0,e.createElement)(a.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,e.createElement)("a",{href:"#",onClick:e=>S(e,n,p),className:"gp-buttons__button wp-block-button__link"},o)),(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,i.__)("Close","gatherpress")))))}),{status:s}))),"attend"!==s&&(0,e.createElement)("div",{className:"gp-status"},(0,e.createElement)(f,{type:o,status:s}),0{const[i,s]=(0,r.useState)(a);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:s},t);let l="";return"object"==typeof i&&void 0!==i[n]&&(a=[...i[n].responses],o&&(a=a.splice(0,o)),l=a.map(((t,n)=>{const{name:o,photo:r}=t;return(0,e.createElement)("figure",{key:n,className:"gp-rsvp-response__member-avatar"},(0,e.createElement)("img",{alt:o,title:o,src:r}))}))),(0,e.createElement)(e.Fragment,null,l)},y=t=>{const{type:n,event:o,eventOptions:r}=t,a="default"===r.imageSize?"featured_image":"featured_image_"+r.imageSize,i=l(o[a]),s="gp-events-list";let c="location";const u=o.venue?.is_online_event;return u&&(c="video-alt2"),(0,e.createElement)("div",{className:`${s}`},(0,e.createElement)("div",{className:`${s}__header`},(0,e.createElement)("div",{className:`${s}__info`},r.showFeaturedImage&&(0,e.createElement)("figure",{className:`${s}__image`},(0,e.createElement)("a",{href:o.permalink},i)),(0,e.createElement)("div",{className:`${s}__datetime`},(0,e.createElement)("strong",null,o.datetime_start)),(0,e.createElement)("div",{className:`${s}__title`},(0,e.createElement)("a",{href:o.permalink},l(o.title))),o.venue&&r.showVenue&&(0,e.createElement)("div",{className:`${s}__venue`},(0,e.createElement)("span",{className:`dashicons dashicons-${c}`}),!u&&(0,e.createElement)("a",{href:o.venue.permalink},l(o.venue.name)),u&&(0,e.createElement)("span",null,l(o.venue.name))),r.showDescription&&(0,e.createElement)("div",{className:`${s}__content`},(0,e.createElement)("div",{className:`${s}__excerpt`},l(o.excerpt.split(" ").splice(0,parseInt(r.descriptionLimit)).join(" ")+"[…]"))))),(0,e.createElement)("div",{className:`${s}__footer`},r.showRsvpResponse&&(0,e.createElement)("div",{className:"gp-rsvp-response__items"},(0,e.createElement)(v,{eventId:o.ID,value:"attending",responses:o.responses,limit:"3"})),"upcoming"===n&&r.showRsvp&&(0,e.createElement)(m,{eventId:o.ID,currentUser:o.current_user,type:n}),"past"===n&&r.showRsvp&&""!==o.current_user&&(0,e.createElement)(f,{type:n,status:o.current_user?.status})))},g=t=>{const{eventOptions:n,maxNumberOfEvents:o,type:s,topics:l,venues:c}=t,[u,p]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1),v=u.map((t=>(0,e.createElement)(y,{key:t.ID,eventOptions:n,type:s,event:t})));return(0,r.useEffect)((()=>{let e="",t="";if("object"==typeof l&&(e=l.map((e=>e.slug))?.join(",")),"object"==typeof c&&(t=c.map((e=>e.slug))?.join(",")),h("is_user_logged_in"))d()({path:`/gatherpress/v1/event/events-list?event_list_type=${s}&max_number=${o}&topics=${e}&venues=${t}`}).then((e=>{m(!0),p(e)}));else{const n=h("event_rest_api")+`/events-list?event_list_type=${s}&max_number=${o}&topics=${e}&venues=${t}`;fetch(n).then((e=>e.json())).then((e=>{m(!0),p(e)}))}}),[p,o,s,l,c]),(0,e.createElement)("div",{className:`gp-${s}-events-list`},!f&&(0,e.createElement)(a.Spinner,null),f&&0===u.length&&(()=>{const t="upcoming"===s?(0,i.__)("There are no upcoming events.","gatherpress"):(0,i.__)("There are no past events.","gatherpress");return(0,e.createElement)("div",{className:`gp-${s}-events__no_events_message`},t)})(),f&&v)};o()((()=>{const t=document.querySelectorAll('[data-gp_block_name="events-list"]');for(let s=0;s"+o+""))),h("enable_anonymous_rsvp")?(0,e.createElement)("div",{className:"gp-modal__anonymous"},(0,e.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);m(t),S(e,s,t,v,!1)},checked:p}),(0,e.createElement)("label",{htmlFor:"gp-anonymous"},(0,i.__)("List me as anonymous.","gatherpress"))):(0,e.createElement)(e.Fragment,null)),(0,e.createElement)(a.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,e.createElement)("a",{href:"#",onClick:e=>S(e,n,p),className:"gp-buttons__button wp-block-button__link"},o)),(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,i.__)("Close","gatherpress")))))}),{status:s}))),"attend"!==s&&(0,e.createElement)("div",{className:"gp-status"},(0,e.createElement)(f,{type:o,status:s}),0{const[i,s]=(0,r.useState)(a);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:s},t);let l="";return"object"==typeof i&&void 0!==i[n]&&(a=[...i[n].responses],o&&(a=a.splice(0,o)),l=a.map(((t,n)=>{const{name:o,photo:r}=t;return(0,e.createElement)("figure",{key:n,className:"gp-rsvp-response__member-avatar"},(0,e.createElement)("img",{alt:o,title:o,src:r}))}))),(0,e.createElement)(e.Fragment,null,l)},y=t=>{const{type:n,event:o,eventOptions:r}=t,a="default"===r.imageSize?"featured_image":"featured_image_"+r.imageSize,i=l(o[a]),s="gp-events-list";let c="location";const u=o.venue?.is_online_event;return u&&(c="video-alt2"),(0,e.createElement)("div",{className:`${s}`},(0,e.createElement)("div",{className:`${s}__header`},(0,e.createElement)("div",{className:`${s}__info`},r.showFeaturedImage&&(0,e.createElement)("figure",{className:`${s}__image`},(0,e.createElement)("a",{href:o.permalink},i)),(0,e.createElement)("div",{className:`${s}__datetime`},(0,e.createElement)("strong",null,o.datetime_start)),(0,e.createElement)("div",{className:`${s}__title`},(0,e.createElement)("a",{href:o.permalink},l(o.title))),o.venue&&r.showVenue&&(0,e.createElement)("div",{className:`${s}__venue`},(0,e.createElement)("span",{className:`dashicons dashicons-${c}`}),!u&&(0,e.createElement)("a",{href:o.venue.permalink},l(o.venue.name)),u&&(0,e.createElement)("span",null,l(o.venue.name))),r.showDescription&&(0,e.createElement)("div",{className:`${s}__content`},(0,e.createElement)("div",{className:`${s}__excerpt`},l(o.excerpt.split(" ").splice(0,parseInt(r.descriptionLimit)).join(" ")+"[…]"))))),(0,e.createElement)("div",{className:`${s}__footer`},r.showRsvpResponse&&(0,e.createElement)("div",{className:"gp-rsvp-response__items"},(0,e.createElement)(v,{eventId:o.ID,value:"attending",responses:o.responses,limit:"3"})),"upcoming"===n&&r.showRsvp&&(0,e.createElement)(m,{eventId:o.ID,currentUser:o.current_user,type:n}),"past"===n&&r.showRsvp&&""!==o.current_user&&(0,e.createElement)(f,{type:n,status:o.current_user?.status})))},g=t=>{const{eventOptions:n,maxNumberOfEvents:o,type:s,topics:l,venues:c}=t,[u,p]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1),v=u.map((t=>(0,e.createElement)(y,{key:t.ID,eventOptions:n,type:s,event:t})));return(0,r.useEffect)((()=>{let e="",t="";if("object"==typeof l&&(e=l.map((e=>e.slug))?.join(",")),"object"==typeof c&&(t=c.map((e=>e.slug))?.join(",")),h("is_user_logged_in"))d()({path:`/gatherpress/v1/event/events-list?event_list_type=${s}&max_number=${o}&topics=${e}&venues=${t}`}).then((e=>{m(!0),p(e)}));else{const n=h("event_rest_api")+`/events-list?event_list_type=${s}&max_number=${o}&topics=${e}&venues=${t}`;fetch(n).then((e=>e.json())).then((e=>{m(!0),p(e)}))}}),[p,o,s,l,c]),(0,e.createElement)("div",{className:`gp-${s}-events-list`},!f&&(0,e.createElement)(a.Spinner,null),f&&0===u.length&&(()=>{const t="upcoming"===s?(0,i.__)("There are no upcoming events.","gatherpress"):(0,i.__)("There are no past events.","gatherpress");return(0,e.createElement)("div",{className:`gp-${s}-events__no_events_message`},t)})(),f&&v)};o()((()=>{const t=document.querySelectorAll('[data-gp_block_name="events-list"]');for(let s=0;s array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '6cf2e1c97c8609ffc48b'); + array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '2475de36efc4fadbd98a'); diff --git a/build/blocks/events-list/index.js b/build/blocks/events-list/index.js index 9677c5e74..a85de7149 100644 --- a/build/blocks/events-list/index.js +++ b/build/blocks/events-list/index.js @@ -1,2 +1,2 @@ (()=>{var e,t={2962:(e,t,n)=>{"use strict";const o=window.wp.blocks;var r=n(9196);const a=window.lodash;var i=n(3967),s=n.n(i);const l=window.wp.i18n,c=window.wp.blockEditor,u=window.wp.components,p=window.wp.coreData,d=window.wp.data,f=window.wp.element;var h=n(3426);const m=h.default||h;var v=n(3253),g=n.n(v);const y=window.wp.apiFetch;var b=n.n(y);const _=({type:e="upcoming",status:t="attend"})=>{const n={upcoming:{attend:{icon:"",text:""},attending:{icon:"dashicons dashicons-yes-alt",text:(0,l.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,l.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Not Attending","gatherpress")}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,l.__)("Went","gatherpress")},attend:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,l.__)("Didn't Go","gatherpress")}}};return(0,r.createElement)("div",{className:"gp-status__response"},(0,r.createElement)("span",{className:n[e][t].icon}),(0,r.createElement)("strong",null,n[e][t].text))};function E(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const w=({eventId:e,currentUser:t="",type:n})=>{const[o,a]=(0,f.useState)(t.status),[i,s]=(0,f.useState)(Number(t.anonymous)),[c,p]=(0,f.useState)(t.guests),[d,h]=(0,f.useState)("hidden"),[v,y]=(0,f.useState)("false"),[w,O]=(0,f.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&g().setAppElement(".gp-enabled");const C=e=>{e.preventDefault(),O(!1)},S=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),b()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:E("nonce")}}).then((e=>{if(e.success){a(e.status),p(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&C(t)}}))},x=e=>{switch(e){case"attending":return(0,l.__)("You're attending","gatherpress");case"waiting_list":return(0,l.__)("You're wait listed","gatherpress");case"not_attending":return(0,l.__)("You're not attending","gatherpress")}return(0,l.__)("RSVP to this event","gatherpress")};return(0,r.createElement)("div",{className:"gp-rsvp"},(0,r.createElement)(u.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":v,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(h("hidden"===d?"show":"hidden"),y("false"===v?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),O(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,l.__)("Edit RSVP","gatherpress")}return(0,l.__)("RSVP","gatherpress")})(o))),(0,r.createElement)(g(),{isOpen:w,onRequestClose:C,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,l.__)("Edit RSVP","gatherpress")},""===t&&(0,r.createElement)((()=>(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},(0,l.__)("Login Required","gatherpress")),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},(0,l.__)("You must ","gatherpress"),(0,r.createElement)("a",{href:E("login_url")},(0,l.__)("Login","gatherpress")),(0,l.__)(" to RSVP to events.","gatherpress")),""!==E("registration_url")&&(0,r.createElement)("div",{className:"gp-modal__text"},(0,r.createElement)("a",{href:E("registration_url")},(0,l.__)("Register","gatherpress")),(0,l.__)(" if you do not have an account.","gatherpress"))),(0,r.createElement)(u.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,l.__)("Close","gatherpress")))))),null),""!==t&&(0,r.createElement)((({status:e})=>{let t="",n="";return"not_attending"===e||"attend"===e?(t="attending",n=(0,l.__)("Attend","gatherpress")):(t="not_attending",n=(0,l.__)("Not Attending","gatherpress")),(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},x(o)?x(o):(0,r.createElement)(u.Spinner,null)),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},m((0,l.sprintf)(/* translators: %s: button label. */ -(0,l.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))),1===E("event_allow_anonymous_rsvp")?(0,r.createElement)("div",{className:"gp-modal__anonymous"},(0,r.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);s(t),S(e,o,t,c,!1)},checked:i}),(0,r.createElement)("label",{htmlFor:"gp-anonymous"},(0,l.__)("List me as anonymous.","gatherpress"))):(0,r.createElement)(r.Fragment,null)),(0,r.createElement)(u.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,r.createElement)("a",{href:"#",onClick:e=>S(e,t,i),className:"gp-buttons__button wp-block-button__link"},n)),(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,l.__)("Close","gatherpress")))))}),{status:o}))),"attend"!==o&&(0,r.createElement)("div",{className:"gp-status"},(0,r.createElement)(_,{type:n,status:o}),0{const[a,i]=(0,f.useState)(o);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:i},e);let s="";return"object"==typeof a&&void 0!==a[t]&&(o=[...a[t].responses],n&&(o=o.splice(0,n)),s=o.map(((e,t)=>{const{name:n,photo:o}=e;return(0,r.createElement)("figure",{key:t,className:"gp-rsvp-response__member-avatar"},(0,r.createElement)("img",{alt:n,title:n,src:o}))}))),(0,r.createElement)(r.Fragment,null,s)},C=e=>{const{type:t,event:n,eventOptions:o}=e,a="default"===o.imageSize?"featured_image":"featured_image_"+o.imageSize,i=m(n[a]),s="gp-events-list";let l="location";const c=n.venue?.is_online_event;return c&&(l="video-alt2"),(0,r.createElement)("div",{className:`${s}`},(0,r.createElement)("div",{className:`${s}__header`},(0,r.createElement)("div",{className:`${s}__info`},o.showFeaturedImage&&(0,r.createElement)("figure",{className:`${s}__image`},(0,r.createElement)("a",{href:n.permalink},i)),(0,r.createElement)("div",{className:`${s}__datetime`},(0,r.createElement)("strong",null,n.datetime_start)),(0,r.createElement)("div",{className:`${s}__title`},(0,r.createElement)("a",{href:n.permalink},m(n.title))),n.venue&&o.showVenue&&(0,r.createElement)("div",{className:`${s}__venue`},(0,r.createElement)("span",{className:`dashicons dashicons-${l}`}),!c&&(0,r.createElement)("a",{href:n.venue.permalink},m(n.venue.name)),c&&(0,r.createElement)("span",null,m(n.venue.name))),o.showDescription&&(0,r.createElement)("div",{className:`${s}__content`},(0,r.createElement)("div",{className:`${s}__excerpt`},m(n.excerpt.split(" ").splice(0,parseInt(o.descriptionLimit)).join(" ")+"[…]"))))),(0,r.createElement)("div",{className:`${s}__footer`},o.showRsvpResponse&&(0,r.createElement)("div",{className:"gp-rsvp-response__items"},(0,r.createElement)(O,{eventId:n.ID,value:"attending",responses:n.responses,limit:"3"})),"upcoming"===t&&o.showRsvp&&(0,r.createElement)(w,{eventId:n.ID,currentUser:n.current_user,type:t}),"past"===t&&o.showRsvp&&""!==n.current_user&&(0,r.createElement)(_,{type:t,status:n.current_user?.status})))},S=e=>{const{eventOptions:t,maxNumberOfEvents:n,type:o,topics:a,venues:i}=e,[s,c]=(0,f.useState)([]),[p,d]=(0,f.useState)(!1),h=s.map((e=>(0,r.createElement)(C,{key:e.ID,eventOptions:t,type:o,event:e})));return(0,f.useEffect)((()=>{let e="",t="";if("object"==typeof a&&(e=a.map((e=>e.slug))?.join(",")),"object"==typeof i&&(t=i.map((e=>e.slug))?.join(",")),E("is_user_logged_in"))b()({path:`/gatherpress/v1/event/events-list?event_list_type=${o}&max_number=${n}&topics=${e}&venues=${t}`}).then((e=>{d(!0),c(e)}));else{const r=E("event_rest_api")+`/events-list?event_list_type=${o}&max_number=${n}&topics=${e}&venues=${t}`;fetch(r).then((e=>e.json())).then((e=>{d(!0),c(e)}))}}),[c,n,o,a,i]),(0,r.createElement)("div",{className:`gp-${o}-events-list`},!p&&(0,r.createElement)(u.Spinner,null),p&&0===s.length&&(()=>{const e="upcoming"===o?(0,l.__)("There are no upcoming events.","gatherpress"):(0,l.__)("There are no past events.","gatherpress");return(0,r.createElement)("div",{className:`gp-${o}-events__no_events_message`},e)})(),p&&h)},x=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},k=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/events-list","version":"1.0.0","title":"Events List","category":"gatherpress","icon":"list-view","example":{},"description":"Displays events that are either upcoming or have occurred in the past.","attributes":{"eventOptions":{"type":"object","default":{"descriptionLimit":55,"imageSize":"default","showRsvpResponse":true,"showFeaturedImage":true,"showDescription":true,"showRsvp":true,"showVenue":true}},"maxNumberOfEvents":{"type":"integer","default":5},"topics":{"type":"array","items":{"type":"object"}},"venues":{"type":"array","items":{"type":"object"}},"type":{"type":"string","default":"upcoming"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./events-list.js","render":"file:./render.php"}');(0,o.registerBlockType)(k,{edit:e=>{var t,n,o;const{attributes:i,setAttributes:f}=e,h=(0,c.useBlockProps)(),{topics:m,venues:v}=i,{topicsList:g}=(0,d.useSelect)((e=>{const{getEntityRecords:t}=e(p.store);return{topicsList:t("taxonomy","gp_topic",{per_page:-1,context:"view"})}}),[]),{venueList:y}=(0,d.useSelect)((e=>{const{getEntityRecords:t}=e(p.store);return{venueList:t("taxonomy","_gp_venue",{per_page:-1,context:"view"})}}),[]),b=null!==(t=g?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==t?t:{},_=null!==(n=y?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.InspectorControls,null,(0,r.createElement)(u.PanelBody,null,(0,r.createElement)("p",null,(0,l.__)("Event List type","gatherpress")),(0,r.createElement)(u.ButtonGroup,{className:"block-editor-block-styles__variants"},(0,r.createElement)(u.Button,{className:s()("block-editor-block-styles__item",{"is-active":"upcoming"===i.type}),variant:"secondary",label:(0,l.__)("Upcoming","gatherpress"),onClick:()=>{f({type:"upcoming"})}},(0,r.createElement)(u.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,l.__)("Upcoming","gatherpress"))),(0,r.createElement)(u.Button,{className:s()("block-editor-block-styles__item",{"is-active":"past"===i.type}),variant:"secondary",label:(0,l.__)("Past","gatherpress"),onClick:()=>{f({type:"past"})}},(0,r.createElement)(u.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,l.__)("Past","gatherpress"))))),(0,r.createElement)(u.PanelBody,null,(0,r.createElement)(u.RangeControl,{label:(0,l.__)("Maximum number of events to display","gatherpress"),min:1,max:10,value:parseInt(i.maxNumberOfEvents,10),onChange:e=>f({maxNumberOfEvents:e})}),(0,r.createElement)(u.FormTokenField,{key:"query-controls-topics-select",label:(0,l.__)("Topics","gatherpress"),value:m&&m.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(b),onChange:e=>{if(e.some((e=>"string"==typeof e&&!b[e])))return;const t=e.map((e=>"string"==typeof e?b[e]:e));if((0,a.includes)(t,null))return!1;f({topics:t})},maxSuggestions:20}),(0,r.createElement)(u.FormTokenField,{key:"query-controls-venues-select",label:(0,l.__)("Venues","gatherpress"),value:v&&v.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(_),onChange:e=>{if(e.some((e=>"string"==typeof e&&!_[e])))return;const t=e.map((e=>"string"==typeof e?_[e]:e));if((0,a.includes)(t,null))return!1;f({venues:t})},maxSuggestions:20})),(0,r.createElement)(u.PanelBody,null,(0,r.createElement)(u.ToggleControl,{label:(0,l.__)("Show/Hide All RSVP Responses","gatherpress"),help:i.eventOptions.showRsvpResponse?(0,l.__)("Show All RSVP Responses","gatherpress"):(0,l.__)("Hide All RSVP Responses","gatherpress"),checked:null===(o=i.eventOptions.showRsvpResponse)||void 0===o||o,onChange:e=>{f({eventOptions:{...i.eventOptions,showRsvpResponse:e}})}}),(0,r.createElement)(u.ToggleControl,{label:(0,l.__)("Show/Hide My RSVP Response"),help:i.eventOptions.showRsvp?(0,l.__)("Show My RSVP Response"):(0,l.__)("Hide My RSVP Response"),checked:i.eventOptions.showRsvp,onChange:e=>{f({eventOptions:{...i.eventOptions,showRsvp:e}})}}),(0,r.createElement)(u.SelectControl,{label:(0,l.__)("Image Size Options","gatherpress"),value:i.eventOptions.imageSize,options:[{label:"Default",value:"default"},{label:"Thumbnail",value:"thumbnail"},{label:"Large",value:"large"}],onChange:e=>f({eventOptions:{...i.eventOptions,imageSize:e}})}),(0,r.createElement)(u.ToggleControl,{label:(0,l.__)("Show/Hide Featured Image","gatherpress"),help:i.eventOptions.showFeaturedImage?(0,l.__)("Show Featured Image","gatherpress"):(0,l.__)("Hide Featured Image","gatherpress"),checked:i.eventOptions.showFeaturedImage,onChange:e=>{f({eventOptions:{...i.eventOptions,showFeaturedImage:e}})}}),(0,r.createElement)(u.ToggleControl,{label:(0,l.__)("Show/Hide Description","gatherpress"),help:i.eventOptions.showDescription?(0,l.__)("Show Description","gatherpress"):(0,l.__)("Hide Description","gatherpress"),checked:i.eventOptions.showDescription,onChange:e=>{f({eventOptions:{...i.eventOptions,showDescription:e}})}}),(0,r.createElement)(u.TextControl,{label:(0,l.__)("Description Limit"),help:(0,l.__)("Limit the amount of words that display underneath the title of the event"),value:parseInt(i.eventOptions.descriptionLimit),onChange:e=>f({eventOptions:{...i.eventOptions,descriptionLimit:e}}),min:0,max:55,type:"number"}),(0,r.createElement)(u.ToggleControl,{label:(0,l.__)("Show/Event Venue"),help:i.eventOptions.showVenue?(0,l.__)("Show Event Venue"):(0,l.__)("Hide Event Venue"),checked:i.eventOptions.showVenue,onChange:e=>{f({eventOptions:{...i.eventOptions,showVenue:e}})}}))),(0,r.createElement)("div",{...h},(0,r.createElement)(x,null,(0,r.createElement)(S,{eventOptions:i.eventOptions,maxNumberOfEvents:i.maxNumberOfEvents,type:i.type,topics:i.topics,venues:i.venues}))))},save:()=>null})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(9960),i=n(7790);r(n(7790),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,o=new i.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=d;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var a=e.call(this,o)||this;return a.name=t,a.attribs=n,a.type=r,a}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(d);function v(e){return(0,i.isTag)(e)}function g(e){return e.type===i.ElementType.CDATA}function y(e){return e.type===i.ElementType.Text}function b(e){return e.type===i.ElementType.Comment}function _(e){return e.type===i.ElementType.Directive}function E(e){return e.type===i.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?O(e.children):[],r=new m(e.name,a({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=r}else if(g(e)){o=t?O(e.children):[];var i=new f(o);o.forEach((function(e){return e.parent=i})),n=i}else if(E(e)){o=t?O(e.children):[];var s=new h(o);o.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new p(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",a=/<([a-zA-Z]+[0-9]?)/,i=//i,s=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var p=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),p.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var d=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=d.documentElement.querySelector(t);return n&&(n.innerHTML=e),d}return d.documentElement.innerHTML=e,d}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes}),t.default=function(e){var t,u,p=e.match(a),d=p&&p[1]?p[1].toLowerCase():"";switch(d){case n:var h=c(e);return i.test(e)||null===(t=null==(v=h.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),s.test(e)||null===(u=null==(v=h.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),h.querySelectorAll(n);case o:case r:var m=l(e).querySelectorAll(d);return s.test(e)&&i.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(v=l(e,r).querySelector(r)).childNodes;var v}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),a=n(1507),i=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(i),n=t?t[1]:void 0;return(0,a.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function a(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),a=["checked","value"],i=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var p=e[u];if((0,o.isCustomAttribute)(u))n[u]=p;else{var d=u.toLowerCase(),f=l(d);if(f){var h=(0,o.getPropertyInfo)(f);switch(a.includes(f)&&i.includes(t)&&!c&&(f=l("default"+d)),n[f]=p,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===p&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=p)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),a=o(n(484)),i=n(4606),s={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,i.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||i.returnFirstArg,u=(null==n?void 0:n.library)||s,p=u.cloneElement,d=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(g=p(g,{key:g.key||m})),o.push(c(g,v,m));continue}}if("text"!==v.type){var y=v,b={};l(y)?((0,i.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,a.default)(y.attribs,y.name));var _=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(_=e(v.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(d(v.name,b,_),v,m))}else{var E=!v.data.trim().length;if(E&&v.parent&&!(0,i.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&E)continue;o.push(c(v.data,v,m))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var a=o(n(484));t.attributesToProps=a.default;var i=o(n(3670));t.domToReact=i.default;var s=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,i.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),a=o(n(1476)),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!i.has(e):Boolean(t&&"string"==typeof t.is)};var s={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,a.default)(e,s)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var p=1,d=1;function f(e){var t=e.match(n);t&&(p+=t.length);var o=e.lastIndexOf("\n");d=~o?e.length-o:d+e.length}function h(){var e={line:p,column:d};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:p,column:d},this.source=l.source}m.prototype.content=e;var v=[];function g(t){var n=new Error(l.source+":"+p+":"+d+": "+t);if(n.reason=t,n.filename=l.source,n.line=p,n.column=d,n.source=e,!l.silent)throw n;v.push(n)}function y(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){y(o)}function _(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return g("End of comment missing");var o=e.slice(2,n-2);return d+=2,f(o),e=e.slice(n),d+=2,t({type:"comment",comment:o})}}function w(){var e=h(),n=y(r);if(n){if(E(),!y(a))return g("property missing ':'");var o=y(i),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return y(s),l}}return b(),function(){var e,t=[];for(_(t);e=w();)!1!==e&&(t.push(e),_(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>i}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(y-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:g[e],afterOpen:g[e]+"--after-open",beforeClose:g[e]+"--before-close"},a=o.base;return n.state.afterOpen&&(a=a+" "+o.afterOpen),n.state.beforeClose&&(a=a+" "+o.beforeClose),"string"==typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,a=e.parentSelector,i=a&&a().ownerDocument||document;r&&p.add(i.body,r),o&&p.add(i.getElementsByTagName("html")[0],o),n&&(y+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,a=e.defaultStyles,i=e.children,s=n?{}:a.content,l=r?{}:a.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),p=this.props.contentElement(u,i);return this.props.overlayElement(c,p)}}]),t}(i.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(f.default),s.default.instanceOf(d.SafeHTMLCollection),s.default.instanceOf(d.SafeNodeList),s.default.arrayOf(s.default.instanceOf(f.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i&&(i.removeAttribute?i.removeAttribute("aria-hidden"):null!=i.length?i.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(i).forEach((function(e){return e.removeAttribute("aria-hidden")}))),i=null},t.log=function(){},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t=n}return i=t||i},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){i=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},a=n(1112),i=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||i;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[a,i],t=0;t0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==i&&document.body.appendChild(i)):(a.parentElement&&a.parentElement.removeChild(a),i.parentElement&&i.parentElement.removeChild(i))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var a=document.body;for(var i in o)r(a,o[i]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(a,e),r.add(e)}));var r,a},t.remove=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(a,e),0===a[e]&&r.remove(e)}));var r,a}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==a.length&&(t=a.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){i=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){i=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},a=[],i=null,s=!1;function l(){s=!0}function c(){if(s){if(s=!1,!i)return;setTimeout((function(){i.contains(document.activeElement)||((0,r.default)(i)[0]||i).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,a=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=a},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,i=t.shiftKey,s=n[0],l=n[n.length-1],c=a();if(e===c){if(!i)return;o=l}if(l!==c||i||(o=s),s===c&&i&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var p=n.indexOf(c);if(p>-1&&(p+=i?-1:1),void 0===(o=n[p]))return t.preventDefault(),void(o=i?l:s).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?a(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(i)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function a(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),a=r.getPropertyValue("display");return t?a!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):a===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function i(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),a(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const a=/[\-\:]([a-z])/g,i=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=p},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),a=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,a.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,l):e.replace(a,l)).replace(o,s))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),a="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;a?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=a)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(s=!1,a0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,r,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={672:0,783:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,a,[i,s,l]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);co(2962)));r=o.O(r)})(); \ No newline at end of file +(0,l.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))),E("enable_anonymous_rsvp")?(0,r.createElement)("div",{className:"gp-modal__anonymous"},(0,r.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);s(t),S(e,o,t,c,!1)},checked:i}),(0,r.createElement)("label",{htmlFor:"gp-anonymous"},(0,l.__)("List me as anonymous.","gatherpress"))):(0,r.createElement)(r.Fragment,null)),(0,r.createElement)(u.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,r.createElement)("a",{href:"#",onClick:e=>S(e,t,i),className:"gp-buttons__button wp-block-button__link"},n)),(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,l.__)("Close","gatherpress")))))}),{status:o}))),"attend"!==o&&(0,r.createElement)("div",{className:"gp-status"},(0,r.createElement)(_,{type:n,status:o}),0{const[a,i]=(0,f.useState)(o);((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{o(e.detail)}),!1)}})({setRsvpResponse:i},e);let s="";return"object"==typeof a&&void 0!==a[t]&&(o=[...a[t].responses],n&&(o=o.splice(0,n)),s=o.map(((e,t)=>{const{name:n,photo:o}=e;return(0,r.createElement)("figure",{key:t,className:"gp-rsvp-response__member-avatar"},(0,r.createElement)("img",{alt:n,title:n,src:o}))}))),(0,r.createElement)(r.Fragment,null,s)},C=e=>{const{type:t,event:n,eventOptions:o}=e,a="default"===o.imageSize?"featured_image":"featured_image_"+o.imageSize,i=m(n[a]),s="gp-events-list";let l="location";const c=n.venue?.is_online_event;return c&&(l="video-alt2"),(0,r.createElement)("div",{className:`${s}`},(0,r.createElement)("div",{className:`${s}__header`},(0,r.createElement)("div",{className:`${s}__info`},o.showFeaturedImage&&(0,r.createElement)("figure",{className:`${s}__image`},(0,r.createElement)("a",{href:n.permalink},i)),(0,r.createElement)("div",{className:`${s}__datetime`},(0,r.createElement)("strong",null,n.datetime_start)),(0,r.createElement)("div",{className:`${s}__title`},(0,r.createElement)("a",{href:n.permalink},m(n.title))),n.venue&&o.showVenue&&(0,r.createElement)("div",{className:`${s}__venue`},(0,r.createElement)("span",{className:`dashicons dashicons-${l}`}),!c&&(0,r.createElement)("a",{href:n.venue.permalink},m(n.venue.name)),c&&(0,r.createElement)("span",null,m(n.venue.name))),o.showDescription&&(0,r.createElement)("div",{className:`${s}__content`},(0,r.createElement)("div",{className:`${s}__excerpt`},m(n.excerpt.split(" ").splice(0,parseInt(o.descriptionLimit)).join(" ")+"[…]"))))),(0,r.createElement)("div",{className:`${s}__footer`},o.showRsvpResponse&&(0,r.createElement)("div",{className:"gp-rsvp-response__items"},(0,r.createElement)(O,{eventId:n.ID,value:"attending",responses:n.responses,limit:"3"})),"upcoming"===t&&o.showRsvp&&(0,r.createElement)(w,{eventId:n.ID,currentUser:n.current_user,type:t}),"past"===t&&o.showRsvp&&""!==n.current_user&&(0,r.createElement)(_,{type:t,status:n.current_user?.status})))},S=e=>{const{eventOptions:t,maxNumberOfEvents:n,type:o,topics:a,venues:i}=e,[s,c]=(0,f.useState)([]),[p,d]=(0,f.useState)(!1),h=s.map((e=>(0,r.createElement)(C,{key:e.ID,eventOptions:t,type:o,event:e})));return(0,f.useEffect)((()=>{let e="",t="";if("object"==typeof a&&(e=a.map((e=>e.slug))?.join(",")),"object"==typeof i&&(t=i.map((e=>e.slug))?.join(",")),E("is_user_logged_in"))b()({path:`/gatherpress/v1/event/events-list?event_list_type=${o}&max_number=${n}&topics=${e}&venues=${t}`}).then((e=>{d(!0),c(e)}));else{const r=E("event_rest_api")+`/events-list?event_list_type=${o}&max_number=${n}&topics=${e}&venues=${t}`;fetch(r).then((e=>e.json())).then((e=>{d(!0),c(e)}))}}),[c,n,o,a,i]),(0,r.createElement)("div",{className:`gp-${o}-events-list`},!p&&(0,r.createElement)(u.Spinner,null),p&&0===s.length&&(()=>{const e="upcoming"===o?(0,l.__)("There are no upcoming events.","gatherpress"):(0,l.__)("There are no past events.","gatherpress");return(0,r.createElement)("div",{className:`gp-${o}-events__no_events_message`},e)})(),p&&h)},x=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},k=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/events-list","version":"1.0.0","title":"Events List","category":"gatherpress","icon":"list-view","example":{},"description":"Displays events that are either upcoming or have occurred in the past.","attributes":{"eventOptions":{"type":"object","default":{"descriptionLimit":55,"imageSize":"default","showRsvpResponse":true,"showFeaturedImage":true,"showDescription":true,"showRsvp":true,"showVenue":true}},"maxNumberOfEvents":{"type":"integer","default":5},"topics":{"type":"array","items":{"type":"object"}},"venues":{"type":"array","items":{"type":"object"}},"type":{"type":"string","default":"upcoming"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./events-list.js","render":"file:./render.php"}');(0,o.registerBlockType)(k,{edit:e=>{var t,n,o;const{attributes:i,setAttributes:f}=e,h=(0,c.useBlockProps)(),{topics:m,venues:v}=i,{topicsList:g}=(0,d.useSelect)((e=>{const{getEntityRecords:t}=e(p.store);return{topicsList:t("taxonomy","gp_topic",{per_page:-1,context:"view"})}}),[]),{venueList:y}=(0,d.useSelect)((e=>{const{getEntityRecords:t}=e(p.store);return{venueList:t("taxonomy","_gp_venue",{per_page:-1,context:"view"})}}),[]),b=null!==(t=g?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==t?t:{},_=null!==(n=y?.reduce(((e,t)=>({...e,[t.name]:t})),{}))&&void 0!==n?n:{};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.InspectorControls,null,(0,r.createElement)(u.PanelBody,null,(0,r.createElement)("p",null,(0,l.__)("Event List type","gatherpress")),(0,r.createElement)(u.ButtonGroup,{className:"block-editor-block-styles__variants"},(0,r.createElement)(u.Button,{className:s()("block-editor-block-styles__item",{"is-active":"upcoming"===i.type}),variant:"secondary",label:(0,l.__)("Upcoming","gatherpress"),onClick:()=>{f({type:"upcoming"})}},(0,r.createElement)(u.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,l.__)("Upcoming","gatherpress"))),(0,r.createElement)(u.Button,{className:s()("block-editor-block-styles__item",{"is-active":"past"===i.type}),variant:"secondary",label:(0,l.__)("Past","gatherpress"),onClick:()=>{f({type:"past"})}},(0,r.createElement)(u.__experimentalText,{as:"span",limit:12,ellipsizeMode:"tail",className:"block-editor-block-styles__item-text",truncate:!0},(0,l.__)("Past","gatherpress"))))),(0,r.createElement)(u.PanelBody,null,(0,r.createElement)(u.RangeControl,{label:(0,l.__)("Maximum number of events to display","gatherpress"),min:1,max:10,value:parseInt(i.maxNumberOfEvents,10),onChange:e=>f({maxNumberOfEvents:e})}),(0,r.createElement)(u.FormTokenField,{key:"query-controls-topics-select",label:(0,l.__)("Topics","gatherpress"),value:m&&m.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(b),onChange:e=>{if(e.some((e=>"string"==typeof e&&!b[e])))return;const t=e.map((e=>"string"==typeof e?b[e]:e));if((0,a.includes)(t,null))return!1;f({topics:t})},maxSuggestions:20}),(0,r.createElement)(u.FormTokenField,{key:"query-controls-venues-select",label:(0,l.__)("Venues","gatherpress"),value:v&&v.map((e=>({id:e.id,slug:e.slug,value:e.name||e.value}))),suggestions:Object.keys(_),onChange:e=>{if(e.some((e=>"string"==typeof e&&!_[e])))return;const t=e.map((e=>"string"==typeof e?_[e]:e));if((0,a.includes)(t,null))return!1;f({venues:t})},maxSuggestions:20})),(0,r.createElement)(u.PanelBody,null,(0,r.createElement)(u.ToggleControl,{label:(0,l.__)("Show/Hide All RSVP Responses","gatherpress"),help:i.eventOptions.showRsvpResponse?(0,l.__)("Show All RSVP Responses","gatherpress"):(0,l.__)("Hide All RSVP Responses","gatherpress"),checked:null===(o=i.eventOptions.showRsvpResponse)||void 0===o||o,onChange:e=>{f({eventOptions:{...i.eventOptions,showRsvpResponse:e}})}}),(0,r.createElement)(u.ToggleControl,{label:(0,l.__)("Show/Hide My RSVP Response"),help:i.eventOptions.showRsvp?(0,l.__)("Show My RSVP Response"):(0,l.__)("Hide My RSVP Response"),checked:i.eventOptions.showRsvp,onChange:e=>{f({eventOptions:{...i.eventOptions,showRsvp:e}})}}),(0,r.createElement)(u.SelectControl,{label:(0,l.__)("Image Size Options","gatherpress"),value:i.eventOptions.imageSize,options:[{label:"Default",value:"default"},{label:"Thumbnail",value:"thumbnail"},{label:"Large",value:"large"}],onChange:e=>f({eventOptions:{...i.eventOptions,imageSize:e}})}),(0,r.createElement)(u.ToggleControl,{label:(0,l.__)("Show/Hide Featured Image","gatherpress"),help:i.eventOptions.showFeaturedImage?(0,l.__)("Show Featured Image","gatherpress"):(0,l.__)("Hide Featured Image","gatherpress"),checked:i.eventOptions.showFeaturedImage,onChange:e=>{f({eventOptions:{...i.eventOptions,showFeaturedImage:e}})}}),(0,r.createElement)(u.ToggleControl,{label:(0,l.__)("Show/Hide Description","gatherpress"),help:i.eventOptions.showDescription?(0,l.__)("Show Description","gatherpress"):(0,l.__)("Hide Description","gatherpress"),checked:i.eventOptions.showDescription,onChange:e=>{f({eventOptions:{...i.eventOptions,showDescription:e}})}}),(0,r.createElement)(u.TextControl,{label:(0,l.__)("Description Limit"),help:(0,l.__)("Limit the amount of words that display underneath the title of the event"),value:parseInt(i.eventOptions.descriptionLimit),onChange:e=>f({eventOptions:{...i.eventOptions,descriptionLimit:e}}),min:0,max:55,type:"number"}),(0,r.createElement)(u.ToggleControl,{label:(0,l.__)("Show/Event Venue"),help:i.eventOptions.showVenue?(0,l.__)("Show Event Venue"):(0,l.__)("Hide Event Venue"),checked:i.eventOptions.showVenue,onChange:e=>{f({eventOptions:{...i.eventOptions,showVenue:e}})}}))),(0,r.createElement)("div",{...h},(0,r.createElement)(x,null,(0,r.createElement)(S,{eventOptions:i.eventOptions,maxNumberOfEvents:i.maxNumberOfEvents,type:i.type,topics:i.topics,venues:i.venues}))))},save:()=>null})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(9960),i=n(7790);r(n(7790),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,o=new i.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=d;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var a=e.call(this,o)||this;return a.name=t,a.attribs=n,a.type=r,a}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(d);function v(e){return(0,i.isTag)(e)}function g(e){return e.type===i.ElementType.CDATA}function y(e){return e.type===i.ElementType.Text}function b(e){return e.type===i.ElementType.Comment}function _(e){return e.type===i.ElementType.Directive}function E(e){return e.type===i.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(v(e)){var o=t?O(e.children):[],r=new m(e.name,a({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=r}else if(g(e)){o=t?O(e.children):[];var i=new f(o);o.forEach((function(e){return e.parent=i})),n=i}else if(E(e)){o=t?O(e.children):[];var s=new h(o);o.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new p(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",a=/<([a-zA-Z]+[0-9]?)/,i=//i,s=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var p=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),p.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var d=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=d.documentElement.querySelector(t);return n&&(n.innerHTML=e),d}return d.documentElement.innerHTML=e,d}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes}),t.default=function(e){var t,u,p=e.match(a),d=p&&p[1]?p[1].toLowerCase():"";switch(d){case n:var h=c(e);return i.test(e)||null===(t=null==(v=h.querySelector(o))?void 0:v.parentNode)||void 0===t||t.removeChild(v),s.test(e)||null===(u=null==(v=h.querySelector(r))?void 0:v.parentNode)||void 0===u||u.removeChild(v),h.querySelectorAll(n);case o:case r:var m=l(e).querySelectorAll(d);return s.test(e)&&i.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(v=l(e,r).querySelector(r)).childNodes;var v}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),a=n(1507),i=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(i),n=t?t[1]:void 0;return(0,a.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function a(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),a=["checked","value"],i=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var p=e[u];if((0,o.isCustomAttribute)(u))n[u]=p;else{var d=u.toLowerCase(),f=l(d);if(f){var h=(0,o.getPropertyInfo)(f);switch(a.includes(f)&&i.includes(t)&&!c&&(f=l("default"+d)),n[f]=p,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===p&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=p)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),a=o(n(484)),i=n(4606),s={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,i.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||i.returnFirstArg,u=(null==n?void 0:n.library)||s,p=u.cloneElement,d=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(g=p(g,{key:g.key||m})),o.push(c(g,v,m));continue}}if("text"!==v.type){var y=v,b={};l(y)?((0,i.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,a.default)(y.attribs,y.name));var _=void 0;switch(v.type){case"script":case"style":v.children[0]&&(b.dangerouslySetInnerHTML={__html:v.children[0].data});break;case"tag":"textarea"===v.name&&v.children[0]?b.defaultValue=v.children[0].data:v.children&&v.children.length&&(_=e(v.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(d(v.name,b,_),v,m))}else{var E=!v.data.trim().length;if(E&&v.parent&&!(0,i.canTextBeChildOfNode)(v.parent))continue;if((null==n?void 0:n.trim)&&E)continue;o.push(c(v.data,v,m))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var a=o(n(484));t.attributesToProps=a.default;var i=o(n(3670));t.domToReact=i.default;var s=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,i.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),a=o(n(1476)),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!i.has(e):Boolean(t&&"string"==typeof t.is)};var s={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,a.default)(e,s)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var p=1,d=1;function f(e){var t=e.match(n);t&&(p+=t.length);var o=e.lastIndexOf("\n");d=~o?e.length-o:d+e.length}function h(){var e={line:p,column:d};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:p,column:d},this.source=l.source}m.prototype.content=e;var v=[];function g(t){var n=new Error(l.source+":"+p+":"+d+": "+t);if(n.reason=t,n.filename=l.source,n.line=p,n.column=d,n.source=e,!l.silent)throw n;v.push(n)}function y(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){y(o)}function _(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return g("End of comment missing");var o=e.slice(2,n-2);return d+=2,f(o),e=e.slice(n),d+=2,t({type:"comment",comment:o})}}function w(){var e=h(),n=y(r);if(n){if(E(),!y(a))return g("property missing ':'");var o=y(i),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return y(s),l}}return b(),function(){var e,t=[];for(_(t);e=w();)!1!==e&&(t.push(e),_(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>i}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(y-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:g[e],afterOpen:g[e]+"--after-open",beforeClose:g[e]+"--before-close"},a=o.base;return n.state.afterOpen&&(a=a+" "+o.afterOpen),n.state.beforeClose&&(a=a+" "+o.beforeClose),"string"==typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,a=e.parentSelector,i=a&&a().ownerDocument||document;r&&p.add(i.body,r),o&&p.add(i.getElementsByTagName("html")[0],o),n&&(y+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,a=e.defaultStyles,i=e.children,s=n?{}:a.content,l=r?{}:a.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),p=this.props.contentElement(u,i);return this.props.overlayElement(c,p)}}]),t}(i.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(f.default),s.default.instanceOf(d.SafeHTMLCollection),s.default.instanceOf(d.SafeNodeList),s.default.arrayOf(s.default.instanceOf(f.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i&&(i.removeAttribute?i.removeAttribute("aria-hidden"):null!=i.length?i.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(i).forEach((function(e){return e.removeAttribute("aria-hidden")}))),i=null},t.log=function(){},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t=n}return i=t||i},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){i=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},a=n(1112),i=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||i;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[a,i],t=0;t0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==i&&document.body.appendChild(i)):(a.parentElement&&a.parentElement.removeChild(a),i.parentElement&&i.parentElement.removeChild(i))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var a=document.body;for(var i in o)r(a,o[i]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(a,e),r.add(e)}));var r,a},t.remove=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(a,e),0===a[e]&&r.remove(e)}));var r,a}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==a.length&&(t=a.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){i=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){i=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},a=[],i=null,s=!1;function l(){s=!0}function c(){if(s){if(s=!1,!i)return;setTimeout((function(){i.contains(document.activeElement)||((0,r.default)(i)[0]||i).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,a=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=a},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,i=t.shiftKey,s=n[0],l=n[n.length-1],c=a();if(e===c){if(!i)return;o=l}if(l!==c||i||(o=s),s===c&&i&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var p=n.indexOf(c);if(p>-1&&(p+=i?-1:1),void 0===(o=n[p]))return t.preventDefault(),void(o=i?l:s).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?a(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(i)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function a(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),a=r.getPropertyValue("display");return t?a!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):a===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function i(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),a(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const a=/[\-\:]([a-z])/g,i=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=p},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),a=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,a.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,l):e.replace(a,l)).replace(o,s))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),a="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;a?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=a)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(s=!1,a0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,r,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={672:0,783:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,a,[i,s,l]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);co(2962)));r=o.O(r)})(); \ No newline at end of file diff --git a/build/blocks/rsvp/index.asset.php b/build/blocks/rsvp/index.asset.php index df781b858..2775c48f4 100644 --- a/build/blocks/rsvp/index.asset.php +++ b/build/blocks/rsvp/index.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'f6a9504f57ebd1308ea6'); + array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '0ad9486882f6472eb7e4'); diff --git a/build/blocks/rsvp/index.js b/build/blocks/rsvp/index.js index 253fcaa8b..bb3c5d247 100644 --- a/build/blocks/rsvp/index.js +++ b/build/blocks/rsvp/index.js @@ -1,2 +1,2 @@ (()=>{var e,t={3302:(e,t,n)=>{"use strict";const o=window.wp.blocks;var r=n(9196);const a=window.wp.blockEditor;var i=n(3253),s=n.n(i),l=n(3426);const c=l.default||l,u=window.wp.element,d=window.wp.i18n,p=window.wp.components,f=window.wp.apiFetch;var h=n.n(f);const m=({type:e="upcoming",status:t="attend"})=>{const n={upcoming:{attend:{icon:"",text:""},attending:{icon:"dashicons dashicons-yes-alt",text:(0,d.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,d.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,d.__)("Not Attending","gatherpress")}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,d.__)("Went","gatherpress")},attend:{icon:"dashicons dashicons-dismiss",text:(0,d.__)("Didn't Go","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,d.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,d.__)("Didn't Go","gatherpress")}}};return(0,r.createElement)("div",{className:"gp-status__response"},(0,r.createElement)("span",{className:n[e][t].icon}),(0,r.createElement)("strong",null,n[e][t].text))};function y(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const v=({eventId:e,currentUser:t="",type:n})=>{const[o,a]=(0,u.useState)(t.status),[i,l]=(0,u.useState)(Number(t.anonymous)),[f,v]=(0,u.useState)(t.guests),[g,b]=(0,u.useState)("hidden"),[_,E]=(0,u.useState)("false"),[w,O]=(0,u.useState)(!1);if("past"===n)return"";"undefined"==typeof adminpage&&s().setAppElement(".gp-enabled");const C=e=>{e.preventDefault(),O(!1)},S=async(t,n,o,r=0,i=!0)=>{t.preventDefault(),"attending"!==n&&(r=0),h()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:e,status:n,guests:r,anonymous:o,_wpnonce:y("nonce")}}).then((e=>{if(e.success){a(e.status),v(e.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[t,o]of Object.entries(e.responses))n[t]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:e.status,setRsvpResponse:e.responses,setRsvpCount:n,setRsvpSeeAllLink:n[e.status]>8,setOnlineEventLink:e.online_link},e.event_id),i&&C(t)}}))},x=e=>{switch(e){case"attending":return(0,d.__)("You're attending","gatherpress");case"waiting_list":return(0,d.__)("You're wait listed","gatherpress");case"not_attending":return(0,d.__)("You're not attending","gatherpress")}return(0,d.__)("RSVP to this event","gatherpress")};return(0,r.createElement)("div",{className:"gp-rsvp"},(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":_,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(b("hidden"===g?"show":"hidden"),E("false"===_?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),O(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,d.__)("Edit RSVP","gatherpress")}return(0,d.__)("RSVP","gatherpress")})(o))),(0,r.createElement)(s(),{isOpen:w,onRequestClose:C,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,d.__)("Edit RSVP","gatherpress")},""===t&&(0,r.createElement)((()=>(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},(0,d.__)("Login Required","gatherpress")),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},(0,d.__)("You must ","gatherpress"),(0,r.createElement)("a",{href:y("login_url")},(0,d.__)("Login","gatherpress")),(0,d.__)(" to RSVP to events.","gatherpress")),""!==y("registration_url")&&(0,r.createElement)("div",{className:"gp-modal__text"},(0,r.createElement)("a",{href:y("registration_url")},(0,d.__)("Register","gatherpress")),(0,d.__)(" if you do not have an account.","gatherpress"))),(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,d.__)("Close","gatherpress")))))),null),""!==t&&(0,r.createElement)((({status:e})=>{let t="",n="";return"not_attending"===e||"attend"===e?(t="attending",n=(0,d.__)("Attend","gatherpress")):(t="not_attending",n=(0,d.__)("Not Attending","gatherpress")),(0,r.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,r.createElement)("div",{className:"gp-modal__header"},x(o)?x(o):(0,r.createElement)(p.Spinner,null)),(0,r.createElement)("div",{className:"gp-modal__content"},(0,r.createElement)("div",{className:"gp-modal__text"},c((0,d.sprintf)(/* translators: %s: button label. */ -(0,d.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))),1===y("event_allow_anonymous_rsvp")?(0,r.createElement)("div",{className:"gp-modal__anonymous"},(0,r.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);l(t),S(e,o,t,f,!1)},checked:i}),(0,r.createElement)("label",{htmlFor:"gp-anonymous"},(0,d.__)("List me as anonymous.","gatherpress"))):(0,r.createElement)(r.Fragment,null)),(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,r.createElement)("a",{href:"#",onClick:e=>S(e,t,i),className:"gp-buttons__button wp-block-button__link"},n)),(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,d.__)("Close","gatherpress")))))}),{status:o}))),"attend"!==o&&(0,r.createElement)("div",{className:"gp-status"},(0,r.createElement)(m,{type:n,status:o}),0{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},b=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/rsvp","version":"1.0.0","title":"RSVP","category":"gatherpress","icon":"insert","example":{},"description":"Enables members to easily confirm their attendance for an event.","attributes":{"content":{"type":"string"},"color":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./rsvp.js","render":"file:./render.php"}');(0,o.registerBlockType)(b,{edit:()=>{const e=(0,a.useBlockProps)(),t=y("post_id"),n=y("current_user");return(0,r.createElement)("div",{...e},(0,r.createElement)(g,null,(0,r.createElement)(v,{eventId:t,currentUser:n,type:"upcoming"})))},save:()=>null})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(9960),i=n(7790);r(n(7790),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,o=new i.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var a=e.call(this,o)||this;return a.name=t,a.attribs=n,a.type=r,a}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function y(e){return(0,i.isTag)(e)}function v(e){return e.type===i.ElementType.CDATA}function g(e){return e.type===i.ElementType.Text}function b(e){return e.type===i.ElementType.Comment}function _(e){return e.type===i.ElementType.Directive}function E(e){return e.type===i.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?O(e.children):[],r=new m(e.name,a({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?O(e.children):[];var i=new f(o);o.forEach((function(e){return e.parent=i})),n=i}else if(E(e)){o=t?O(e.children):[];var s=new h(o);o.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",a=/<([a-zA-Z]+[0-9]?)/,i=//i,s=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes}),t.default=function(e){var t,u,d=e.match(a),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return i.test(e)||null===(t=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),s.test(e)||null===(u=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case o:case r:var m=l(e).querySelectorAll(p);return s.test(e)&&i.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(y=l(e,r).querySelector(r)).childNodes;var y}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),a=n(1507),i=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(i),n=t?t[1]:void 0;return(0,a.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function a(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),a=["checked","value"],i=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=l(p);if(f){var h=(0,o.getPropertyInfo)(f);switch(a.includes(f)&&i.includes(t)&&!c&&(f=l("default"+p)),n[f]=d,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),a=o(n(484)),i=n(4606),s={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,i.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||i.returnFirstArg,u=(null==n?void 0:n.library)||s,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),o.push(c(v,y,m));continue}}if("text"!==y.type){var g=y,b={};l(g)?((0,i.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,a.default)(g.attribs,g.name));var _=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(_=e(y.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(p(y.name,b,_),y,m))}else{var E=!y.data.trim().length;if(E&&y.parent&&!(0,i.canTextBeChildOfNode)(y.parent))continue;if((null==n?void 0:n.trim)&&E)continue;o.push(c(y.data,y,m))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var a=o(n(484));t.attributesToProps=a.default;var i=o(n(3670));t.domToReact=i.default;var s=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,i.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),a=o(n(1476)),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!i.has(e):Boolean(t&&"string"==typeof t.is)};var s={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,a.default)(e,s)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=l.source}m.prototype.content=e;var y=[];function v(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function _(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function w(){var e=h(),n=g(r);if(n){if(E(),!g(a))return v("property missing ':'");var o=g(i),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(s),l}}return b(),function(){var e,t=[];for(_(t);e=w();)!1!==e&&(t.push(e),_(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>i}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},a=o.base;return n.state.afterOpen&&(a=a+" "+o.afterOpen),n.state.beforeClose&&(a=a+" "+o.beforeClose),"string"==typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,a=e.parentSelector,i=a&&a().ownerDocument||document;r&&d.add(i.body,r),o&&d.add(i.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,a=e.defaultStyles,i=e.children,s=n?{}:a.content,l=r?{}:a.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,i);return this.props.overlayElement(c,d)}}]),t}(i.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(f.default),s.default.instanceOf(p.SafeHTMLCollection),s.default.instanceOf(p.SafeNodeList),s.default.arrayOf(s.default.instanceOf(f.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i&&(i.removeAttribute?i.removeAttribute("aria-hidden"):null!=i.length?i.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(i).forEach((function(e){return e.removeAttribute("aria-hidden")}))),i=null},t.log=function(){},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t=n}return i=t||i},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){i=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},a=n(1112),i=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||i;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[a,i],t=0;t0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==i&&document.body.appendChild(i)):(a.parentElement&&a.parentElement.removeChild(a),i.parentElement&&i.parentElement.removeChild(i))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var a=document.body;for(var i in o)r(a,o[i]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(a,e),r.add(e)}));var r,a},t.remove=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(a,e),0===a[e]&&r.remove(e)}));var r,a}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==a.length&&(t=a.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){i=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){i=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},a=[],i=null,s=!1;function l(){s=!0}function c(){if(s){if(s=!1,!i)return;setTimeout((function(){i.contains(document.activeElement)||((0,r.default)(i)[0]||i).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,a=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=a},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,i=t.shiftKey,s=n[0],l=n[n.length-1],c=a();if(e===c){if(!i)return;o=l}if(l!==c||i||(o=s),s===c&&i&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=i?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=i?l:s).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?a(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(i)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function a(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),a=r.getPropertyValue("display");return t?a!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):a===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function i(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),a(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const a=/[\-\:]([a-z])/g,i=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),a=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,a.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,l):e.replace(a,l)).replace(o,s))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),a="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;a?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e].call(a.exports,a,a.exports,o),a.exports}o.m=t,e=[],o.O=(t,n,r,a)=>{if(!n){var i=1/0;for(u=0;u=a)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(s=!1,a0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,r,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={498:0,939:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,a,[i,s,l]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);co(3302)));r=o.O(r)})(); \ No newline at end of file +(0,d.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+n+""))),y("enable_anonymous_rsvp")?(0,r.createElement)("div",{className:"gp-modal__anonymous"},(0,r.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);l(t),S(e,o,t,f,!1)},checked:i}),(0,r.createElement)("label",{htmlFor:"gp-anonymous"},(0,d.__)("List me as anonymous.","gatherpress"))):(0,r.createElement)(r.Fragment,null)),(0,r.createElement)(p.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,r.createElement)("a",{href:"#",onClick:e=>S(e,t,i),className:"gp-buttons__button wp-block-button__link"},n)),(0,r.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,r.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,d.__)("Close","gatherpress")))))}),{status:o}))),"attend"!==o&&(0,r.createElement)("div",{className:"gp-status"},(0,r.createElement)(m,{type:n,status:o}),0{const{isSelected:t}=e,n=t?"none":"block";return(0,r.createElement)("div",{style:{position:"relative"}},e.children,(0,r.createElement)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}}))},b=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/rsvp","version":"1.0.0","title":"RSVP","category":"gatherpress","icon":"insert","example":{},"description":"Enables members to easily confirm their attendance for an event.","attributes":{"content":{"type":"string"},"color":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./rsvp.js","render":"file:./render.php"}');(0,o.registerBlockType)(b,{edit:()=>{const e=(0,a.useBlockProps)(),t=y("post_id"),n=y("current_user");return(0,r.createElement)("div",{...e},(0,r.createElement)(g,null,(0,r.createElement)(v,{eventId:t,currentUser:n,type:"upcoming"})))},save:()=>null})},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(9960),i=n(7790);r(n(7790),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,o=new i.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var a=e.call(this,o)||this;return a.name=t,a.attribs=n,a.type=r,a}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function y(e){return(0,i.isTag)(e)}function v(e){return e.type===i.ElementType.CDATA}function g(e){return e.type===i.ElementType.Text}function b(e){return e.type===i.ElementType.Comment}function _(e){return e.type===i.ElementType.Directive}function E(e){return e.type===i.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?O(e.children):[],r=new m(e.name,a({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?O(e.children):[];var i=new f(o);o.forEach((function(e){return e.parent=i})),n=i}else if(E(e)){o=t?O(e.children):[];var s=new h(o);o.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",a=/<([a-zA-Z]+[0-9]?)/,i=//i,s=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes}),t.default=function(e){var t,u,d=e.match(a),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return i.test(e)||null===(t=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),s.test(e)||null===(u=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case o:case r:var m=l(e).querySelectorAll(p);return s.test(e)&&i.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(y=l(e,r).querySelector(r)).childNodes;var y}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),a=n(1507),i=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(i),n=t?t[1]:void 0;return(0,a.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function a(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),a=["checked","value"],i=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=l(p);if(f){var h=(0,o.getPropertyInfo)(f);switch(a.includes(f)&&i.includes(t)&&!c&&(f=l("default"+p)),n[f]=d,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),a=o(n(484)),i=n(4606),s={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,i.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||i.returnFirstArg,u=(null==n?void 0:n.library)||s,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),o.push(c(v,y,m));continue}}if("text"!==y.type){var g=y,b={};l(g)?((0,i.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,a.default)(g.attribs,g.name));var _=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(_=e(y.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(p(y.name,b,_),y,m))}else{var E=!y.data.trim().length;if(E&&y.parent&&!(0,i.canTextBeChildOfNode)(y.parent))continue;if((null==n?void 0:n.trim)&&E)continue;o.push(c(y.data,y,m))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var a=o(n(484));t.attributesToProps=a.default;var i=o(n(3670));t.domToReact=i.default;var s=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,i.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),a=o(n(1476)),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!i.has(e):Boolean(t&&"string"==typeof t.is)};var s={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,a.default)(e,s)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=l.source}m.prototype.content=e;var y=[];function v(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function _(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function w(){var e=h(),n=g(r);if(n){if(E(),!g(a))return v("property missing ':'");var o=g(i),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(s),l}}return b(),function(){var e,t=[];for(_(t);e=w();)!1!==e&&(t.push(e),_(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>i}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},a=o.base;return n.state.afterOpen&&(a=a+" "+o.afterOpen),n.state.beforeClose&&(a=a+" "+o.beforeClose),"string"==typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,a=e.parentSelector,i=a&&a().ownerDocument||document;r&&d.add(i.body,r),o&&d.add(i.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,a=e.defaultStyles,i=e.children,s=n?{}:a.content,l=r?{}:a.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,i);return this.props.overlayElement(c,d)}}]),t}(i.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(f.default),s.default.instanceOf(p.SafeHTMLCollection),s.default.instanceOf(p.SafeNodeList),s.default.arrayOf(s.default.instanceOf(f.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i&&(i.removeAttribute?i.removeAttribute("aria-hidden"):null!=i.length?i.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(i).forEach((function(e){return e.removeAttribute("aria-hidden")}))),i=null},t.log=function(){},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t=n}return i=t||i},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){i=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},a=n(1112),i=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||i;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[a,i],t=0;t0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==i&&document.body.appendChild(i)):(a.parentElement&&a.parentElement.removeChild(a),i.parentElement&&i.parentElement.removeChild(i))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var a=document.body;for(var i in o)r(a,o[i]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(a,e),r.add(e)}));var r,a},t.remove=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(a,e),0===a[e]&&r.remove(e)}));var r,a}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==a.length&&(t=a.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){i=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){i=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},a=[],i=null,s=!1;function l(){s=!0}function c(){if(s){if(s=!1,!i)return;setTimeout((function(){i.contains(document.activeElement)||((0,r.default)(i)[0]||i).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,a=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=a},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,i=t.shiftKey,s=n[0],l=n[n.length-1],c=a();if(e===c){if(!i)return;o=l}if(l!==c||i||(o=s),s===c&&i&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=i?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=i?l:s).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?a(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(i)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function a(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),a=r.getPropertyValue("display");return t?a!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):a===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function i(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),a(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const a=/[\-\:]([a-z])/g,i=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),a=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,a.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,l):e.replace(a,l)).replace(o,s))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),a="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;a?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e].call(a.exports,a,a.exports,o),a.exports}o.m=t,e=[],o.O=(t,n,r,a)=>{if(!n){var i=1/0;for(u=0;u=a)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(s=!1,a0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,r,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={498:0,939:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,a,[i,s,l]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);co(3302)));r=o.O(r)})(); \ No newline at end of file diff --git a/build/blocks/rsvp/rsvp.asset.php b/build/blocks/rsvp/rsvp.asset.php index 1ffdc91df..fcedf25b7 100644 --- a/build/blocks/rsvp/rsvp.asset.php +++ b/build/blocks/rsvp/rsvp.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '51c799342898259a8366'); + array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'f162146932e80722650a'); diff --git a/build/blocks/rsvp/rsvp.js b/build/blocks/rsvp/rsvp.js index cc05cbbd2..18d2d5c9d 100644 --- a/build/blocks/rsvp/rsvp.js +++ b/build/blocks/rsvp/rsvp.js @@ -1,2 +1,2 @@ (()=>{var e={9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},7915:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(9960),i=n(7790);r(n(7790),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,o=new i.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},7790:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=f;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var a=e.call(this,o)||this;return a.name=t,a.attribs=n,a.type=r,a}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(p);function y(e){return(0,i.isTag)(e)}function v(e){return e.type===i.ElementType.CDATA}function g(e){return e.type===i.ElementType.Text}function b(e){return e.type===i.ElementType.Comment}function _(e){return e.type===i.ElementType.Directive}function E(e){return e.type===i.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?O(e.children):[],r=new m(e.name,a({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?O(e.children):[];var i=new f(o);o.forEach((function(e){return e.parent=i})),n=i}else if(E(e)){o=t?O(e.children):[];var s=new h(o);o.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)}()},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},8276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="html",o="head",r="body",a=/<([a-zA-Z]+[0-9]?)/,i=//i,s=//i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var p=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=p.documentElement.querySelector(t);return n&&(n.innerHTML=e),p}return p.documentElement.innerHTML=e,p}}var f,h="object"==typeof document&&document.createElement("template");h&&h.content&&(f=function(e){return h.innerHTML=e,h.content.childNodes}),t.default=function(e){var t,u,d=e.match(a),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return i.test(e)||null===(t=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),s.test(e)||null===(u=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case o:case r:var m=l(e).querySelectorAll(p);return s.test(e)&&i.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(y=l(e,r).querySelector(r)).childNodes;var y}}},4152:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8276)),a=n(1507),i=/<(![a-zA-Z\s]+)>/;t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(i),n=t?t[1]:void 0;return(0,a.formatDOM)((0,r.default)(e),null,n)}},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDOM=t.formatAttributes=void 0;var o=n(7915),r=n(885);function a(e){for(var t={},n=0,o=e.length;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5726),r=n(4606),a=["checked","value"],i=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return o.possibleStandardNames[e]}t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=l(p);if(f){var h=(0,o.getPropertyInfo)(f);switch(a.includes(f)&&i.includes(t)&&!c&&(f=l("default"+p)),n[f]=d,h&&h.type){case o.BOOLEAN:n[f]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n}},3670:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(9196),a=o(n(484)),i=n(4606),s={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function l(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,i.isCustomComponent)(e.name,e.attribs)}t.default=function e(t,n){for(var o=[],r="function"==typeof(null==n?void 0:n.replace),c=(null==n?void 0:n.transform)||i.returnFirstArg,u=(null==n?void 0:n.library)||s,d=u.cloneElement,p=u.createElement,f=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),o.push(c(v,y,m));continue}}if("text"!==y.type){var g=y,b={};l(g)?((0,i.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,a.default)(g.attribs,g.name));var _=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(_=e(y.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(p(y.name,b,_),y,m))}else{var E=!y.data.trim().length;if(E&&y.parent&&!(0,i.canTextBeChildOfNode)(y.parent))continue;if((null==n?void 0:n.trim)&&E)continue;o.push(c(y.data,y,m))}}return 1===o.length?o[0]:o}},3426:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0;var r=o(n(4152));t.htmlToDOM=r.default;var a=o(n(484));t.attributesToProps=a.default;var i=o(n(3670));t.domToReact=i.default;var s=n(7915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1};t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,i.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]}},4606:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=t.setStyleProp=t.isCustomComponent=void 0;var r=n(9196),a=o(n(1476)),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);t.isCustomComponent=function(e,t){return e.includes("-")?!i.has(e):Boolean(t&&"string"==typeof t.is)};var s={reactCompat:!0};t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,a.default)(e,s)}catch(e){t.style={}}else t.style={}},t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=l.source}m.prototype.content=e;var y=[];function v(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return f(o),e=e.slice(o.length),n}}function b(){g(o)}function _(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return p+=2,f(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function w(){var e=h(),n=g(r);if(n){if(E(),!g(a))return v("property missing ':'");var o=g(i),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(s),l}}return b(),function(){var e,t=[];for(_(t);e=w();)!1!==e&&(t.push(e),_(t));return t}()}},2703:(e,t,n)=>{"use strict";var o=n(414);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6871:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>i}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},9983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},a=o.base;return n.state.afterOpen&&(a=a+" "+o.afterOpen),n.state.beforeClose&&(a=a+" "+o.beforeClose),"string"==typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,a=e.parentSelector,i=a&&a().ownerDocument||document;r&&d.add(i.body,r),o&&d.add(i.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,a=e.defaultStyles,i=e.children,s=n?{}:a.content,l=r?{}:a.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,i);return this.props.overlayElement(c,d)}}]),t}(i.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(f.default),s.default.instanceOf(p.SafeHTMLCollection),s.default.instanceOf(p.SafeNodeList),s.default.arrayOf(s.default.instanceOf(f.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},7149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i&&(i.removeAttribute?i.removeAttribute("aria-hidden"):null!=i.length?i.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(i).forEach((function(e){return e.removeAttribute("aria-hidden")}))),i=null},t.log=function(){},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t=n}return i=t||i},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,a=l(e)[Symbol.iterator]();!(t=(r=a.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){i=null};var o,r=(o=n(2473))&&o.__esModule?o:{default:o},a=n(1112),i=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||i;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[a,i],t=0;t0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==i&&document.body.appendChild(i)):(a.parentElement&&a.parentElement.removeChild(a),i.parentElement&&i.parentElement.removeChild(i))}))},2409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var a=document.body;for(var i in o)r(a,o[i]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(a,e),r.add(e)}));var r,a},t.remove=function(e,t){return r=e.classList,a="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(a,e),0===a[e]&&r.remove(e)}));var r,a}},9685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==a.length&&(t=a.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){i=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){i=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var o,r=(o=n(7845))&&o.__esModule?o:{default:o},a=[],i=null,s=!1;function l(){s=!0}function c(){if(s){if(s=!1,!i)return;setTimeout((function(){i.contains(document.activeElement)||((0,r.default)(i)[0]||i).focus()}),0)}}},9623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},1112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(8875))&&o.__esModule?o:{default:o}).default,a=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=a},8338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,i=t.shiftKey,s=n[0],l=n[n.length-1],c=a();if(e===c){if(!i)return;o=l}if(l!==c||i||(o=s),s===c&&i&&(o=l),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=i?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=i?l:s).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(7845))&&o.__esModule?o:{default:o};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?a(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(i)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function a(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),a=r.getPropertyValue("display");return t?a!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):a===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function i(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),a(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},3253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(9983))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},5726:(e,t,n)=>{"use strict";function o(e,t,n,o,r,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const a=/[\-\:]([a-z])/g,i=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(8229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},8229:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1476:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(5174)),a=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,o){e&&o&&(n[(0,a.camelCase)(e,t)]=o)})),n):n}},6678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,l):e.replace(a,l)).replace(o,s))}},5174:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(8139));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),a="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;a?t(o,r,e):r&&((n=n||{})[o]=r)}})),n}},2473:e=>{"use strict";e.exports=function(){}},9196:e=>{"use strict";e.exports=window.React},1850:e=>{"use strict";e.exports=window.ReactDOM}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=n(9196);const t=window.wp.domReady;var o=n.n(t);const r=window.wp.element;var a=n(3253),i=n.n(a),s=n(3426);const l=s.default||s,c=window.wp.i18n,u=window.wp.components,d=window.wp.apiFetch;var p=n.n(d);const f=({type:t="upcoming",status:n="attend"})=>{const o={upcoming:{attend:{icon:"",text:""},attending:{icon:"dashicons dashicons-yes-alt",text:(0,c.__)("Attending","gatherpress")},waiting_list:{icon:"dashicons dashicons-editor-help",text:(0,c.__)("Waiting List","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,c.__)("Not Attending","gatherpress")}},past:{attending:{icon:"dashicons dashicons-yes-alt",text:(0,c.__)("Went","gatherpress")},attend:{icon:"dashicons dashicons-dismiss",text:(0,c.__)("Didn't Go","gatherpress")},waiting_list:{icon:"dashicons dashicons-dismiss",text:(0,c.__)("Didn't Go","gatherpress")},not_attending:{icon:"dashicons dashicons-dismiss",text:(0,c.__)("Didn't Go","gatherpress")}}};return(0,e.createElement)("div",{className:"gp-status__response"},(0,e.createElement)("span",{className:o[t][n].icon}),(0,e.createElement)("strong",null,o[t][n].text))};function h(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const m=({eventId:t,currentUser:n="",type:o})=>{const[a,s]=(0,r.useState)(n.status),[d,m]=(0,r.useState)(Number(n.anonymous)),[y,v]=(0,r.useState)(n.guests),[g,b]=(0,r.useState)("hidden"),[_,E]=(0,r.useState)("false"),[w,O]=(0,r.useState)(!1);if("past"===o)return"";"undefined"==typeof adminpage&&i().setAppElement(".gp-enabled");const C=e=>{e.preventDefault(),O(!1)},S=async(e,n,o,r=0,a=!0)=>{e.preventDefault(),"attending"!==n&&(r=0),p()({path:"/gatherpress/v1/event/rsvp",method:"POST",data:{post_id:t,status:n,guests:r,anonymous:o,_wpnonce:h("nonce")}}).then((t=>{if(t.success){s(t.status),v(t.guests);const n={all:0,attending:0,not_attending:0,waiting_list:0};for(const[e,o]of Object.entries(t.responses))n[e]=o.count;((e,t="")=>{for(const[n,o]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:o});dispatchEvent(r)}})({setRsvpStatus:t.status,setRsvpResponse:t.responses,setRsvpCount:n,setRsvpSeeAllLink:n[t.status]>8,setOnlineEventLink:t.online_link},t.event_id),a&&C(e)}}))},x=e=>{switch(e){case"attending":return(0,c.__)("You're attending","gatherpress");case"waiting_list":return(0,c.__)("You're wait listed","gatherpress");case"not_attending":return(0,c.__)("You're not attending","gatherpress")}return(0,c.__)("RSVP to this event","gatherpress")};return(0,e.createElement)("div",{className:"gp-rsvp"},(0,e.createElement)(u.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",className:"gp-buttons__button wp-block-button__link","aria-expanded":_,tabIndex:"0",onKeyDown:e=>{13===e.keyCode&&(b("hidden"===g?"show":"hidden"),E("false"===_?"true":"false"))},onClick:e=>(e=>{e.preventDefault(),O(!0)})(e)},(e=>{switch(e){case"attending":case"waiting_list":case"not_attending":return(0,c.__)("Edit RSVP","gatherpress")}return(0,c.__)("RSVP","gatherpress")})(a))),(0,e.createElement)(i(),{isOpen:w,onRequestClose:C,style:{overlay:{zIndex:999999999},content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)"}},contentLabel:(0,c.__)("Edit RSVP","gatherpress")},""===n&&(0,e.createElement)((()=>(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},(0,c.__)("Login Required","gatherpress")),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},(0,c.__)("You must ","gatherpress"),(0,e.createElement)("a",{href:h("login_url")},(0,c.__)("Login","gatherpress")),(0,c.__)(" to RSVP to events.","gatherpress")),""!==h("registration_url")&&(0,e.createElement)("div",{className:"gp-modal__text"},(0,e.createElement)("a",{href:h("registration_url")},(0,c.__)("Register","gatherpress")),(0,c.__)(" if you do not have an account.","gatherpress"))),(0,e.createElement)(u.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,c.__)("Close","gatherpress")))))),null),""!==n&&(0,e.createElement)((({status:t})=>{let n="",o="";return"not_attending"===t||"attend"===t?(n="attending",o=(0,c.__)("Attend","gatherpress")):(n="not_attending",o=(0,c.__)("Not Attending","gatherpress")),(0,e.createElement)("div",{className:"gp-modal gp-modal__rsvp"},(0,e.createElement)("div",{className:"gp-modal__header"},x(a)?x(a):(0,e.createElement)(u.Spinner,null)),(0,e.createElement)("div",{className:"gp-modal__content"},(0,e.createElement)("div",{className:"gp-modal__text"},l((0,c.sprintf)(/* translators: %s: button label. */ -(0,c.__)("To set or change your attending status, simply click the %s button below.","gatherpress"),""+o+""))),1===h("event_allow_anonymous_rsvp")?(0,e.createElement)("div",{className:"gp-modal__anonymous"},(0,e.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);m(t),S(e,a,t,y,!1)},checked:d}),(0,e.createElement)("label",{htmlFor:"gp-anonymous"},(0,c.__)("List me as anonymous.","gatherpress"))):(0,e.createElement)(e.Fragment,null)),(0,e.createElement)(u.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,e.createElement)("a",{href:"#",onClick:e=>S(e,n,d),className:"gp-buttons__button wp-block-button__link"},o)),(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,c.__)("Close","gatherpress")))))}),{status:a}))),"attend"!==a&&(0,e.createElement)("div",{className:"gp-status"},(0,e.createElement)(f,{type:o,status:a}),0{const t=document.querySelectorAll('[data-gp_block_name="rsvp"]'),n=!0===h("has_event_past")?"past":"upcoming";for(let o=0;o"+o+""))),h("enable_anonymous_rsvp")?(0,e.createElement)("div",{className:"gp-modal__anonymous"},(0,e.createElement)("input",{id:"gp-anonymous",type:"checkbox",onChange:e=>{const t=Number(e.target.checked);m(t),S(e,a,t,y,!1)},checked:d}),(0,e.createElement)("label",{htmlFor:"gp-anonymous"},(0,c.__)("List me as anonymous.","gatherpress"))):(0,e.createElement)(e.Fragment,null)),(0,e.createElement)(u.ButtonGroup,{className:"gp-buttons wp-block-buttons"},(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button is-style-outline"},(0,e.createElement)("a",{href:"#",onClick:e=>S(e,n,d),className:"gp-buttons__button wp-block-button__link"},o)),(0,e.createElement)("div",{className:"gp-buttons__container wp-block-button"},(0,e.createElement)("a",{href:"#",onClick:C,className:"gp-buttons__button wp-block-button__link"},(0,c.__)("Close","gatherpress")))))}),{status:a}))),"attend"!==a&&(0,e.createElement)("div",{className:"gp-status"},(0,e.createElement)(f,{type:o,status:a}),0{const t=document.querySelectorAll('[data-gp_block_name="rsvp"]'),n=!0===h("has_event_past")?"past":"upcoming";for(let o=0;o array('moment', 'react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '591755b330a494b563fd'); + array('moment', 'react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'cae20aed2e506b7187c5'); diff --git a/build/panels.js b/build/panels.js index 902e68f36..ef8765447 100644 --- a/build/panels.js +++ b/build/panels.js @@ -1 +1 @@ -(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,n=window.wp.i18n,r=window.wp.data,a=window.wp.components,s=window.wp.plugins,o=window.wp.editPost,i=window.moment;var l=e.n(i);const c=window.wp.apiFetch;var m=e.n(c);function u(){(0,r.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function d(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function p(e,t){if("object"!=typeof GatherPress)return;const n=e.split("."),r=n.pop();n.reduce(((e,t)=>{var n;return null!==(n=e[t])&&void 0!==n?n:e[t]={}}),GatherPress)[r]=t}const g="YYYY-MM-DDTHH:mm:ss",_="YYYY-MM-DD HH:mm:ss",v=l().tz(f()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(g),E=l().tz(v,f()).add(2,"hours").format(g);function h(){return T(d("settings.date_format"))+" "+T(d("settings.time_format"))}function f(e=d("event_datetime.timezone")){return l().tz.zone(e)?e:(0,n.__)("GMT","gatherpress")}function S(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,n=e.replace(t,"$1");return n!==e?"UTC"+n+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function b(e,t=null){!function(e){const t=l().tz(d("event_datetime.datetime_end"),f()).valueOf(),n=l().tz(e,f()).valueOf();n>=t&&w(l().tz(n,f()).add(2,"hours").format(g))}(e),p("event_datetime.datetime_start",e),"function"==typeof t&&t(e),u()}function w(e,t=null){!function(e){const t=l().tz(d("event_datetime.datetime_start"),f()).valueOf(),n=l().tz(e,f()).valueOf();n<=t&&b(l().tz(n,f()).subtract(2,"hours").format(g))}(e),p("event_datetime.datetime_end",e),null!==t&&t(e),u()}function P(){const e=(0,r.select)("core/editor").isSavingPost(),t=(0,r.select)("core/editor").isAutosavingPost();C()&&e&&!t&&m()({path:"/gatherpress/v1/event/datetime/",method:"POST",data:{post_id:d("post_id"),datetime_start:l().tz(d("event_datetime.datetime_start"),f()).format(_),datetime_end:l().tz(d("event_datetime.datetime_end"),f()).format(_),timezone:d("event_datetime.timezone"),_wpnonce:d("nonce")}}).then((()=>{!function(){const e="gp_event_communcation",t=(0,r.dispatch)("core/notices");t.removeNotice(e),"publish"!==(0,r.select)("core/editor").getEditedPostAttribute("status")||y()||t.createNotice("success",(0,n.__)("Send an event update to members via email?","gatherpress"),{id:e,isDismissible:!0,actions:[{onClick:()=>{D({setOpen:!0})},label:(0,n.__)("Compose Message","gatherpress")}]})}()}))}function T(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map((e=>e in t?t[e]:e)).join("")}const D=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const a=new CustomEvent(e,{detail:r});dispatchEvent(a)}},z=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}};function C(){return"gp_event"===(0,r.select)("core/editor").getCurrentPostType()}function y(){const e=l().tz(d("event_datetime.datetime_end"),f());return l().tz(f()).valueOf()>e.valueOf()}function O(){const e="gp_event_past",t=(0,r.dispatch)("core/notices");t.removeNotice(e),y()&&t.createNotice("warning",(0,n.__)("This event has already past.","gatherpress"),{id:e,isDismissible:!1})}const k=window.wp.element,A=()=>{if(!d("settings.allow_anonymous_rsvp"))return(0,t.createElement)(t.Fragment,null);const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),o=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").allow_anonymous_rsvp),[]),[i,l]=(0,k.useState)(o);return(0,t.createElement)(a.CheckboxControl,{label:(0,n.__)("Allow anonymous RSVPs","gatherpress"),checked:i,onChange:t=>{(t=>{const n={allow_anonymous_rsvp:Number(t)};l(t),e({meta:n}),s()})(t)}})},N=()=>(0,t.createElement)("section",null,(0,t.createElement)(A,null)),x=window.wp.date,M=e=>{const{dateTimeStart:t}=e;return l().tz(t,f()).format(h())},Y=e=>{const{dateTimeEnd:t}=e;return l().tz(t,f()).format(h())},F=e=>{const{dateTimeStart:n,setDateTimeStart:r}=e,s=(0,x.getSettings)(),o=/a(?!\\)/i.test(s.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(a.DateTimePicker,{currentDate:n,onChange:e=>b(e,r),is12Hour:o})},j=e=>{const{dateTimeEnd:n,setDateTimeEnd:r}=e,s=(0,x.getSettings)(),o=/a(?!\\)/i.test(s.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(a.DateTimePicker,{currentDate:n,onChange:e=>w(e,r),is12Hour:o})},H=e=>{const{dateTimeStart:r,setDateTimeStart:s}=e;return(0,k.useEffect)((()=>{s(l().tz(function(){let e=d("event_datetime.datetime_start");return e=""!==e?l().tz(e,f()).format(g):v,p("event_datetime.datetime_start",e),e}(),f()).format(g)),D({setDateTimeStart:r}),O()})),(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.Flex,{direction:"column",gap:"0"},(0,t.createElement)(a.FlexItem,null,(0,t.createElement)("label",{htmlFor:"gp-datetime-start"},(0,n.__)("Start","gatherpress"))),(0,t.createElement)(a.FlexItem,null,(0,t.createElement)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,t.createElement)(a.Button,{id:"gp-datetime-start",onClick:n,"aria-expanded":e,isLink:!0},(0,t.createElement)(M,{dateTimeStart:r})),renderContent:()=>(0,t.createElement)(F,{dateTimeStart:r,setDateTimeStart:s})}))))},R=e=>{const{dateTimeEnd:r,setDateTimeEnd:s}=e;return(0,k.useEffect)((()=>{s(l().tz(function(){let e=d("event_datetime.datetime_end");return e=""!==e?l().tz(e,f()).format(g):E,p("event_datetime.datetime_end",e),e}(),f()).format(g)),D({setDateTimeEnd:r}),O()})),(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.Flex,{direction:"column",gap:"0"},(0,t.createElement)(a.FlexItem,null,(0,t.createElement)("label",{htmlFor:"gp-datetime-end"},(0,n.__)("End","gatherpress"))),(0,t.createElement)(a.FlexItem,null,(0,t.createElement)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,t.createElement)(a.Button,{id:"gp-datetime-end",onClick:n,"aria-expanded":e,isLink:!0},(0,t.createElement)(Y,{dateTimeEnd:r})),renderContent:()=>(0,t.createElement)(j,{dateTimeEnd:r,setDateTimeEnd:s})}))))},L=e=>{const{timezone:r,setTimezone:s}=e,o=d("timezone_choices");return(0,k.useEffect)((()=>{s(d("event_datetime.timezone"))}),[s]),(0,k.useEffect)((()=>{D({setTimezone:d("event_datetime.timezone")})})),(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.SelectControl,{label:(0,n.__)("Time Zone","gatherpress"),value:S(r),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,n=e.replace(t,"$1");if(n!==e){const r=e.replace(t,"$2").padStart(2,"0");let a=e.replace(t,"$3");return""===a&&(a=":00"),a=a.replace(".25",":15").replace(".5",":30").replace(".75",":45"),n+r+a}return e}(e),s(e),p("event_datetime.timezone",e),u()}},Object.keys(o).map((e=>(0,t.createElement)("optgroup",{key:e,label:e},Object.keys(o[e]).map((n=>(0,t.createElement)("option",{key:n,value:n},o[e][n]))))))))},$=()=>{const[e,a]=(0,k.useState)(),[s,o]=(0,k.useState)(),[i,l]=(0,k.useState)();return(0,r.subscribe)(P),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h3",null,(0,n.__)("Date & time","gatherpress")),(0,t.createElement)(H,{dateTimeStart:e,setDateTimeStart:a}),(0,t.createElement)(R,{dateTimeEnd:s,setDateTimeEnd:o}),(0,t.createElement)(L,{timezone:i,setTimezone:l}))},I=()=>(0,t.createElement)("section",null,(0,t.createElement)($,null)),G=()=>"publish"===(0,r.select)("core/editor").getEditedPostAttribute("status")&&!y()&&(0,t.createElement)("section",null,(0,t.createElement)("h3",{style:{marginBottom:"0.5rem"}},(0,n.__)("Send an event update","gatherpress")),(0,t.createElement)(a.Button,{variant:"secondary",onClick:()=>D({setOpen:!0})},(0,n.__)("Compose Message","gatherpress"))),W=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),o=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link)),[i,l]=(0,k.useState)(o);return z({setOnlineEventLink:l},d("post_id")),(0,t.createElement)(a.TextControl,{label:(0,n.__)("Online event link","gatherpress"),value:i,placeholder:(0,n.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{_online_event_link:t}}),l(t),D({setOnlineEventLink:t},d("post_id")),s()})(t)}})},B=()=>(0,t.createElement)("section",null,(0,t.createElement)(W,null)),V=()=>{const[e,s]=(0,k.useState)(""),[o,i]=(0,k.useState)(""),[l,c]=(0,k.useState)(""),[m,u]=(0,k.useState)(""),[d,p]=(0,k.useState)(!1),[g,_]=(0,k.useState)(""),v=(0,r.useDispatch)("core/editor").editPost,{unlockPostSaving:E}=(0,r.useDispatch)("core/editor"),h=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gp_venue"))),f=(0,r.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gp_venue",h))),S=f?.slug.replace(/^_/,""),[b,w]=(0,k.useState)(""),P=h+":"+b,T=(0,r.useSelect)((e=>e("core").getEntityRecords("postType","gp_venue",{per_page:1,slug:b})));(0,k.useEffect)((()=>{var e,t,r,a;let o={};if(b&&Array.isArray(T)){var l;const e=null!==(l=T[0]?.meta?._venue_information)&&void 0!==l?l:"{}";var m;e&&(o=JSON.parse(e),o.name=null!==(m=T[0]?.title.rendered)&&void 0!==m?m:"")}const d=null!==(e=o?.name)&&void 0!==e?e:(0,n.__)("No venue selected.","gatherpress"),p=null!==(t=o?.fullAddress)&&void 0!==t?t:"",g=null!==(r=o?.phoneNumber)&&void 0!==r?r:"",v=null!==(a=o?.website)&&void 0!==a?a:"";S&&w(S),_(P?String(P):""),s(d),i(p),c(g),u(v),D({setName:d,setFullAddress:p,setPhoneNumber:g,setWebsite:v,setIsOnlineEventTerm:"online-event"===b})}),[b,T,S,P]);let z=(0,r.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gp_venue",{per_page:-1,context:"view"})),[]);return z?(z=z.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),z.unshift({value:":",label:(0,n.__)("Choose a venue","gatherpress")})):z=[],(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.SelectControl,{label:(0,n.__)("Venue Selector","gatherpress"),value:g,onChange:e=>{(e=>{_(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];v({_gp_venue:t}),w(e[1]),E()})(e)},options:z}))},J=()=>(0,t.createElement)("section",null,(0,t.createElement)(V,null));(0,s.registerPlugin)("gp-event-settings",{render:()=>C()&&(0,t.createElement)(o.PluginDocumentSettingPanel,{name:"gp-event-settings",title:(0,n.__)("Event settings","gatherpress"),initialOpen:!0,className:"gp-event-settings"},(0,t.createElement)(a.__experimentalVStack,{spacing:6},(0,t.createElement)(I,null),(0,t.createElement)(J,null),(0,t.createElement)(B,null),(0,t.createElement)(N,null),(0,t.createElement)(G,null)))}),(0,r.dispatch)("core/edit-post").toggleEditorPanelOpened("gp-event-settings/gp-event-settings");const U=()=>{var e,s,o;const i=(0,r.useDispatch)("core/editor").editPost,l=(e,t)=>{const n=JSON.stringify({...c,[e]:t});i({meta:{_venue_information:n}})};let c=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._venue_information));c=c?JSON.parse(c):{};const[m,u]=(0,k.useState)(null!==(e=c.fullAddress)&&void 0!==e?e:""),[d,p]=(0,k.useState)(null!==(s=c.phoneNumber)&&void 0!==s?s:""),[g,_]=(0,k.useState)(null!==(o=c.website)&&void 0!==o?o:"");return z({setFullAddress:u,setPhoneNumber:p,setWebsite:_}),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(a.TextControl,{label:(0,n.__)("Full Address","gatherpress"),value:m,onChange:e=>{D({setFullAddress:e}),l("fullAddress",e)}}),(0,t.createElement)(a.TextControl,{label:(0,n.__)("Phone Number","gatherpress"),value:d,onChange:e=>{D({setPhoneNumber:e}),l("phoneNumber",e)}}),(0,t.createElement)(a.TextControl,{label:(0,n.__)("Website","gatherpress"),value:g,type:"url",onChange:e=>{D({setWebsite:e}),l("website",e)}}))},Z=()=>(0,t.createElement)("section",null,(0,t.createElement)(U,null));(0,s.registerPlugin)("gp-venue-settings",{render:()=>"gp_venue"===(0,r.select)("core/editor").getCurrentPostType()&&(0,t.createElement)(o.PluginDocumentSettingPanel,{name:"gp-venue-settings",title:(0,n.__)("Venue settings","gatherpress"),initialOpen:!0,className:"gp-venue-settings"},(0,t.createElement)(a.__experimentalVStack,{spacing:6},(0,t.createElement)(Z,null)))}),(0,r.dispatch)("core/edit-post").toggleEditorPanelOpened("gp-venue-settings/gp-venue-settings")})(); \ No newline at end of file +(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,n=window.wp.i18n,r=window.wp.data,a=window.wp.components,s=window.wp.plugins,o=window.wp.editPost,i=window.moment;var l=e.n(i);const c=window.wp.apiFetch;var m=e.n(c);function u(){(0,r.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function d(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function p(e,t){if("object"!=typeof GatherPress)return;const n=e.split("."),r=n.pop();n.reduce(((e,t)=>{var n;return null!==(n=e[t])&&void 0!==n?n:e[t]={}}),GatherPress)[r]=t}const g="YYYY-MM-DDTHH:mm:ss",_="YYYY-MM-DD HH:mm:ss",v=l().tz(f()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(g),E=l().tz(v,f()).add(2,"hours").format(g);function h(){return w(d("settings.date_format"))+" "+w(d("settings.time_format"))}function f(e=d("event_datetime.timezone")){return l().tz.zone(e)?e:(0,n.__)("GMT","gatherpress")}function S(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,n=e.replace(t,"$1");return n!==e?"UTC"+n+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function b(e,t=null){!function(e){const t=l().tz(d("event_datetime.datetime_end"),f()).valueOf(),n=l().tz(e,f()).valueOf();n>=t&&P(l().tz(n,f()).add(2,"hours").format(g))}(e),p("event_datetime.datetime_start",e),"function"==typeof t&&t(e),u()}function P(e,t=null){!function(e){const t=l().tz(d("event_datetime.datetime_start"),f()).valueOf(),n=l().tz(e,f()).valueOf();n<=t&&b(l().tz(n,f()).subtract(2,"hours").format(g))}(e),p("event_datetime.datetime_end",e),null!==t&&t(e),u()}function T(){const e=(0,r.select)("core/editor").isSavingPost(),t=(0,r.select)("core/editor").isAutosavingPost();C()&&e&&!t&&m()({path:"/gatherpress/v1/event/datetime/",method:"POST",data:{post_id:d("post_id"),datetime_start:l().tz(d("event_datetime.datetime_start"),f()).format(_),datetime_end:l().tz(d("event_datetime.datetime_end"),f()).format(_),timezone:d("event_datetime.timezone"),_wpnonce:d("nonce")}}).then((()=>{!function(){const e="gp_event_communcation",t=(0,r.dispatch)("core/notices");t.removeNotice(e),"publish"!==(0,r.select)("core/editor").getEditedPostAttribute("status")||y()||t.createNotice("success",(0,n.__)("Send an event update to members via email?","gatherpress"),{id:e,isDismissible:!0,actions:[{onClick:()=>{D({setOpen:!0})},label:(0,n.__)("Compose Message","gatherpress")}]})}()}))}function w(e){const t={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:"o",w:"e",z:"DDD",W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:"",L:"",o:"YYYY",Y:"YYYY",y:"YY",a:"a",A:"A",B:"",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSS",e:"zz",I:"",O:"",P:"",T:"",Z:"",c:"",r:"",U:"X"};return String(e).split("").map((e=>e in t?t[e]:e)).join("")}const D=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const a=new CustomEvent(e,{detail:r});dispatchEvent(a)}},z=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}};function C(){return"gp_event"===(0,r.select)("core/editor").getCurrentPostType()}function y(){const e=l().tz(d("event_datetime.datetime_end"),f());return l().tz(f()).valueOf()>e.valueOf()}function O(){const e="gp_event_past",t=(0,r.dispatch)("core/notices");t.removeNotice(e),y()&&t.createNotice("warning",(0,n.__)("This event has already past.","gatherpress"),{id:e,isDismissible:!1})}const k=window.wp.element,N=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),o=(0,r.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").enable_anonymous_rsvp),[]);o&&(i=d("settings.enable_anonymous_rsvp"));const[l,c]=(0,k.useState)(i);return(0,t.createElement)(a.CheckboxControl,{label:(0,n.__)("Enable anonymous RSVPs","gatherpress"),checked:l,onChange:t=>{(t=>{const n={enable_anonymous_rsvp:Number(t)};c(t),e({meta:n}),s()})(t)}})},x=()=>(0,t.createElement)("section",null,(0,t.createElement)(N,null)),A=window.wp.date,M=e=>{const{dateTimeStart:t}=e;return l().tz(t,f()).format(h())},Y=e=>{const{dateTimeEnd:t}=e;return l().tz(t,f()).format(h())},F=e=>{const{dateTimeStart:n,setDateTimeStart:r}=e,s=(0,A.getSettings)(),o=/a(?!\\)/i.test(s.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(a.DateTimePicker,{currentDate:n,onChange:e=>b(e,r),is12Hour:o})},j=e=>{const{dateTimeEnd:n,setDateTimeEnd:r}=e,s=(0,A.getSettings)(),o=/a(?!\\)/i.test(s.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,t.createElement)(a.DateTimePicker,{currentDate:n,onChange:e=>P(e,r),is12Hour:o})},H=e=>{const{dateTimeStart:r,setDateTimeStart:s}=e;return(0,k.useEffect)((()=>{s(l().tz(function(){let e=d("event_datetime.datetime_start");return e=""!==e?l().tz(e,f()).format(g):v,p("event_datetime.datetime_start",e),e}(),f()).format(g)),D({setDateTimeStart:r}),O()})),(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.Flex,{direction:"column",gap:"0"},(0,t.createElement)(a.FlexItem,null,(0,t.createElement)("label",{htmlFor:"gp-datetime-start"},(0,n.__)("Start","gatherpress"))),(0,t.createElement)(a.FlexItem,null,(0,t.createElement)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,t.createElement)(a.Button,{id:"gp-datetime-start",onClick:n,"aria-expanded":e,isLink:!0},(0,t.createElement)(M,{dateTimeStart:r})),renderContent:()=>(0,t.createElement)(F,{dateTimeStart:r,setDateTimeStart:s})}))))},R=e=>{const{dateTimeEnd:r,setDateTimeEnd:s}=e;return(0,k.useEffect)((()=>{s(l().tz(function(){let e=d("event_datetime.datetime_end");return e=""!==e?l().tz(e,f()).format(g):E,p("event_datetime.datetime_end",e),e}(),f()).format(g)),D({setDateTimeEnd:r}),O()})),(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.Flex,{direction:"column",gap:"0"},(0,t.createElement)(a.FlexItem,null,(0,t.createElement)("label",{htmlFor:"gp-datetime-end"},(0,n.__)("End","gatherpress"))),(0,t.createElement)(a.FlexItem,null,(0,t.createElement)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:e,onToggle:n})=>(0,t.createElement)(a.Button,{id:"gp-datetime-end",onClick:n,"aria-expanded":e,isLink:!0},(0,t.createElement)(Y,{dateTimeEnd:r})),renderContent:()=>(0,t.createElement)(j,{dateTimeEnd:r,setDateTimeEnd:s})}))))},L=e=>{const{timezone:r,setTimezone:s}=e,o=d("timezone_choices");return(0,k.useEffect)((()=>{s(d("event_datetime.timezone"))}),[s]),(0,k.useEffect)((()=>{D({setTimezone:d("event_datetime.timezone")})})),(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.SelectControl,{label:(0,n.__)("Time Zone","gatherpress"),value:S(r),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,n=e.replace(t,"$1");if(n!==e){const r=e.replace(t,"$2").padStart(2,"0");let a=e.replace(t,"$3");return""===a&&(a=":00"),a=a.replace(".25",":15").replace(".5",":30").replace(".75",":45"),n+r+a}return e}(e),s(e),p("event_datetime.timezone",e),u()}},Object.keys(o).map((e=>(0,t.createElement)("optgroup",{key:e,label:e},Object.keys(o[e]).map((n=>(0,t.createElement)("option",{key:n,value:n},o[e][n]))))))))},$=()=>{const[e,a]=(0,k.useState)(),[s,o]=(0,k.useState)(),[i,l]=(0,k.useState)();return(0,r.subscribe)(T),(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h3",null,(0,n.__)("Date & time","gatherpress")),(0,t.createElement)(H,{dateTimeStart:e,setDateTimeStart:a}),(0,t.createElement)(R,{dateTimeEnd:s,setDateTimeEnd:o}),(0,t.createElement)(L,{timezone:i,setTimezone:l}))},I=()=>(0,t.createElement)("section",null,(0,t.createElement)($,null)),G=()=>"publish"===(0,r.select)("core/editor").getEditedPostAttribute("status")&&!y()&&(0,t.createElement)("section",null,(0,t.createElement)("h3",{style:{marginBottom:"0.5rem"}},(0,n.__)("Send an event update","gatherpress")),(0,t.createElement)(a.Button,{variant:"secondary",onClick:()=>D({setOpen:!0})},(0,n.__)("Compose Message","gatherpress"))),W=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),o=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._online_event_link)),[i,l]=(0,k.useState)(o);return z({setOnlineEventLink:l},d("post_id")),(0,t.createElement)(a.TextControl,{label:(0,n.__)("Online event link","gatherpress"),value:i,placeholder:(0,n.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{_online_event_link:t}}),l(t),D({setOnlineEventLink:t},d("post_id")),s()})(t)}})},B=()=>(0,t.createElement)("section",null,(0,t.createElement)(W,null)),V=()=>{const[e,s]=(0,k.useState)(""),[o,i]=(0,k.useState)(""),[l,c]=(0,k.useState)(""),[m,u]=(0,k.useState)(""),[d,p]=(0,k.useState)(!1),[g,_]=(0,k.useState)(""),v=(0,r.useDispatch)("core/editor").editPost,{unlockPostSaving:E}=(0,r.useDispatch)("core/editor"),h=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gp_venue"))),f=(0,r.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gp_venue",h))),S=f?.slug.replace(/^_/,""),[b,P]=(0,k.useState)(""),T=h+":"+b,w=(0,r.useSelect)((e=>e("core").getEntityRecords("postType","gp_venue",{per_page:1,slug:b})));(0,k.useEffect)((()=>{var e,t,r,a;let o={};if(b&&Array.isArray(w)){var l;const e=null!==(l=w[0]?.meta?._venue_information)&&void 0!==l?l:"{}";var m;e&&(o=JSON.parse(e),o.name=null!==(m=w[0]?.title.rendered)&&void 0!==m?m:"")}const d=null!==(e=o?.name)&&void 0!==e?e:(0,n.__)("No venue selected.","gatherpress"),p=null!==(t=o?.fullAddress)&&void 0!==t?t:"",g=null!==(r=o?.phoneNumber)&&void 0!==r?r:"",v=null!==(a=o?.website)&&void 0!==a?a:"";S&&P(S),_(T?String(T):""),s(d),i(p),c(g),u(v),D({setName:d,setFullAddress:p,setPhoneNumber:g,setWebsite:v,setIsOnlineEventTerm:"online-event"===b})}),[b,w,S,T]);let z=(0,r.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gp_venue",{per_page:-1,context:"view"})),[]);return z?(z=z.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),z.unshift({value:":",label:(0,n.__)("Choose a venue","gatherpress")})):z=[],(0,t.createElement)(a.PanelRow,null,(0,t.createElement)(a.SelectControl,{label:(0,n.__)("Venue Selector","gatherpress"),value:g,onChange:e=>{(e=>{_(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];v({_gp_venue:t}),P(e[1]),E()})(e)},options:z}))},J=()=>(0,t.createElement)("section",null,(0,t.createElement)(V,null));(0,s.registerPlugin)("gp-event-settings",{render:()=>C()&&(0,t.createElement)(o.PluginDocumentSettingPanel,{name:"gp-event-settings",title:(0,n.__)("Event settings","gatherpress"),initialOpen:!0,className:"gp-event-settings"},(0,t.createElement)(a.__experimentalVStack,{spacing:6},(0,t.createElement)(I,null),(0,t.createElement)(J,null),(0,t.createElement)(B,null),(0,t.createElement)(x,null),(0,t.createElement)(G,null)))}),(0,r.dispatch)("core/edit-post").toggleEditorPanelOpened("gp-event-settings/gp-event-settings");const U=()=>{var e,s,o;const i=(0,r.useDispatch)("core/editor").editPost,l=(e,t)=>{const n=JSON.stringify({...c,[e]:t});i({meta:{_venue_information:n}})};let c=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")._venue_information));c=c?JSON.parse(c):{};const[m,u]=(0,k.useState)(null!==(e=c.fullAddress)&&void 0!==e?e:""),[d,p]=(0,k.useState)(null!==(s=c.phoneNumber)&&void 0!==s?s:""),[g,_]=(0,k.useState)(null!==(o=c.website)&&void 0!==o?o:"");return z({setFullAddress:u,setPhoneNumber:p,setWebsite:_}),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(a.TextControl,{label:(0,n.__)("Full Address","gatherpress"),value:m,onChange:e=>{D({setFullAddress:e}),l("fullAddress",e)}}),(0,t.createElement)(a.TextControl,{label:(0,n.__)("Phone Number","gatherpress"),value:d,onChange:e=>{D({setPhoneNumber:e}),l("phoneNumber",e)}}),(0,t.createElement)(a.TextControl,{label:(0,n.__)("Website","gatherpress"),value:g,type:"url",onChange:e=>{D({setWebsite:e}),l("website",e)}}))},Z=()=>(0,t.createElement)("section",null,(0,t.createElement)(U,null));(0,s.registerPlugin)("gp-venue-settings",{render:()=>"gp_venue"===(0,r.select)("core/editor").getCurrentPostType()&&(0,t.createElement)(o.PluginDocumentSettingPanel,{name:"gp-venue-settings",title:(0,n.__)("Venue settings","gatherpress"),initialOpen:!0,className:"gp-venue-settings"},(0,t.createElement)(a.__experimentalVStack,{spacing:6},(0,t.createElement)(Z,null)))}),(0,r.dispatch)("core/edit-post").toggleEditorPanelOpened("gp-venue-settings/gp-venue-settings")})(); \ No newline at end of file diff --git a/includes/core/classes/class-assets.php b/includes/core/classes/class-assets.php index d501ed809..7365df00d 100644 --- a/includes/core/classes/class-assets.php +++ b/includes/core/classes/class-assets.php @@ -271,30 +271,30 @@ protected function localize( int $post_id ): array { $settings = Settings::get_instance(); return array( - 'responses' => ( $event->rsvp ) ? $event->rsvp->responses() : array(), - 'current_user' => ( $event->rsvp && $event->rsvp->get( get_current_user_id() ) ) + 'responses' => ( $event->rsvp ) ? $event->rsvp->responses() : array(), + 'current_user' => ( $event->rsvp && $event->rsvp->get( get_current_user_id() ) ) ? $event->rsvp->get( get_current_user_id() ) : '', // Cleanup needed. - 'is_user_logged_in' => is_user_logged_in(), - 'default_timezone' => sanitize_text_field( wp_timezone_string() ), - 'event_announced' => ( get_post_meta( $post_id, 'gp-event-announce', true ) ) ? 1 : 0, - 'event_datetime' => $event->get_datetime(), - 'event_rest_api' => home_url( 'wp-json/gatherpress/v1/event' ), - 'event_allow_anonymous_rsvp' => ( get_post_meta( $post_id, 'allow_anonymous_rsvp', true ) ) ? 1 : 0, - 'has_event_past' => $event->has_event_past(), - 'is_admin' => is_admin(), - 'nonce' => wp_create_nonce( 'wp_rest' ), - 'post_id' => $post_id, - 'settings' => array( - 'date_format' => $settings->get_value( 'general', 'formatting', 'date_format' ), - 'time_format' => $settings->get_value( 'general', 'formatting', 'time_format' ), - 'show_timezone' => ( 1 === (int) $settings->get_value( 'general', 'formatting', 'show_timezone' ) ), - 'allow_anonymous_rsvp' => ( 1 === (int) $settings->get_value( 'general', 'general', 'allow_anonymous_rsvp' ) ), + 'is_user_logged_in' => is_user_logged_in(), + 'default_timezone' => sanitize_text_field( wp_timezone_string() ), + 'event_announced' => ( get_post_meta( $post_id, 'gp-event-announce', true ) ) ? 1 : 0, + 'event_datetime' => $event->get_datetime(), + 'event_rest_api' => home_url( 'wp-json/gatherpress/v1/event' ), + 'enable_anonymous_rsvp' => (bool) get_post_meta( $post_id, 'enable_anonymous_rsvp', true ), + 'has_event_past' => $event->has_event_past(), + 'is_admin' => is_admin(), + 'nonce' => wp_create_nonce( 'wp_rest' ), + 'post_id' => $post_id, + 'settings' => array( + 'date_format' => $settings->get_value( 'general', 'formatting', 'date_format' ), + 'time_format' => $settings->get_value( 'general', 'formatting', 'time_format' ), + 'show_timezone' => ( 1 === (int) $settings->get_value( 'general', 'formatting', 'show_timezone' ) ), + 'enable_anonymous_rsvp' => ( 1 === (int) $settings->get_value( 'general', 'general', 'enable_anonymous_rsvp' ) ), ), - 'login_url' => $this->get_login_url( $post_id ), - 'registration_url' => $this->get_registration_url( $post_id ), - 'timezone_choices' => Utility::timezone_choices(), - 'unregister_blocks' => $this->unregister_blocks(), + 'login_url' => $this->get_login_url( $post_id ), + 'registration_url' => $this->get_registration_url( $post_id ), + 'timezone_choices' => Utility::timezone_choices(), + 'unregister_blocks' => $this->unregister_blocks(), ); } diff --git a/includes/core/classes/class-event.php b/includes/core/classes/class-event.php index ee45c10b6..c2810c1c7 100644 --- a/includes/core/classes/class-event.php +++ b/includes/core/classes/class-event.php @@ -175,7 +175,7 @@ public static function get_post_type_registration_args(): array { */ public static function get_post_meta_registration_args(): array { return array( - '_online_event_link' => array( + '_online_event_link' => array( 'auth_callback' => function () { return current_user_can( 'edit_posts' ); }, @@ -184,7 +184,7 @@ public static function get_post_meta_registration_args(): array { 'single' => true, 'type' => 'string', ), - 'allow_anonymous_rsvp' => array( + 'enable_anonymous_rsvp' => array( 'auth_callback' => function() { return current_user_can( 'edit_posts' ); }, diff --git a/includes/core/classes/class-rsvp.php b/includes/core/classes/class-rsvp.php index 09e2dbfc5..69db04ad0 100644 --- a/includes/core/classes/class-rsvp.php +++ b/includes/core/classes/class-rsvp.php @@ -126,16 +126,17 @@ public function get( int $user_id ): array { * Save a user's RSVP status for the event. * * This method allows assigning a user's RSVP status for the event. The user can be assigned - * one of the following RSVP statuses: 'attending', 'not_attending', or 'waiting_list', and - * optionally specify the number of guests accompanying them. The method handles the storage - * of this information in the database and updates the RSVP status accordingly. + * one of the following RSVP statuses: 'attending', 'not_attending', or 'waiting_list'. The user + * can optionally specify the number of guests accompanying them and whether their RSVP is anonymous. + * The method handles the storage of this information in the database and updates the RSVP status accordingly. * * @since 1.0.0 * - * @param int $user_id A user ID. - * @param string $status RSVP status ('attending', 'not_attending', 'waiting_list'). - * @param int $guests Number of guests accompanying the user. - * @return string The updated RSVP status ('attending', 'not_attending', 'waiting_list'). + * @param int $user_id A user ID. + * @param string $status RSVP status ('attending', 'not_attending', 'waiting_list'). + * @param int $anonymous Indicates if the RSVP is anonymous (1 for anonymous, 0 for not anonymous). + * @param int $guests Number of guests accompanying the user. + * @return string The updated RSVP status ('attend', 'attending', 'not_attending', 'waiting_list'). */ public function save( int $user_id, string $status, int $anonymous = 0, int $guests = 0 ): string { global $wpdb; @@ -176,8 +177,8 @@ public function save( int $user_id, string $status, int $anonymous = 0, int $gue // If not attending and anonymous, just remove record. if ( 'not_attending' === $status && $anonymous ) { - $save = $wpdb->delete( $table, $where ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery - $status = 'attend'; + $save = $wpdb->delete( $table, $where ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery + $status = 'attend'; // Set default status for UI. } else { $save = $wpdb->update( $table, $data, $where ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery } @@ -339,8 +340,9 @@ public function responses(): array { if ( ! current_user_can( 'edit_posts' ) && ! empty( $anonymous ) ) { $user_id = 0; - $user_info->display_name = __( 'Anonymous', 'gatherpress' ); $profile = ''; + + $user_info->display_name = __( 'Anonymous', 'gatherpress' ); } $responses[] = array( diff --git a/includes/core/classes/settings/class-general.php b/includes/core/classes/settings/class-general.php index 96a4caac4..c5b9f960e 100644 --- a/includes/core/classes/settings/class-general.php +++ b/includes/core/classes/settings/class-general.php @@ -88,7 +88,7 @@ protected function get_sections(): array { 'gatherpress' ), 'options' => array( - 'post_or_event_date' => array( + 'post_or_event_date' => array( 'labels' => array( 'name' => __( 'Publish Date', 'gatherpress' ), ), @@ -100,7 +100,7 @@ protected function get_sections(): array { ), ), ), - 'max_attending_limit' => array( + 'max_attending_limit' => array( 'labels' => array( 'name' => __( 'Maximum Attending Limit', 'gatherpress' ), ), @@ -113,12 +113,13 @@ protected function get_sections(): array { ), ), ), - 'allow_anonymous_rsvp' => array( - 'labels' => array( + 'enable_anonymous_rsvp' => array( + 'labels' => array( 'name' => __( 'Anonymous RSVPs', 'gatherpress' ), ), - 'field' => array( - 'label' => __( 'Allow events to permit anonymous RSVPs.', 'gatherpress' ), + 'description' => __( 'Set this as your default, but you can still override it for each event as you like.', 'gatherpress' ), + 'field' => array( + 'label' => __( 'Enable Anonymous RSVPs Across All Events.', 'gatherpress' ), 'type' => 'checkbox', 'options' => array( 'default' => 1, diff --git a/src/components/AnonymousRsvp.js b/src/components/AnonymousRsvp.js index ebe2fb63a..6f45077c7 100644 --- a/src/components/AnonymousRsvp.js +++ b/src/components/AnonymousRsvp.js @@ -12,20 +12,24 @@ import { useDispatch, useSelect } from '@wordpress/data'; import { getFromGlobal } from '../helpers/globals'; const AnonymousRsvp = () => { - if (!getFromGlobal('settings.allow_anonymous_rsvp')) { - return <>; - } - const { editPost, unlockPostSaving } = useDispatch('core/editor'); - const defaultAnonymousRsvp = useSelect((select) => { + const isNewEvent = useSelect((select) => { + return select('core/editor').isCleanNewPost(); + }, []); + + let defaultAnonymousRsvp = useSelect((select) => { return select('core/editor').getEditedPostAttribute('meta') - .allow_anonymous_rsvp; + .enable_anonymous_rsvp; }, []); + if (isNewEvent) { + defaultAnonymousRsvp = getFromGlobal('settings.enable_anonymous_rsvp'); + } + const [anonymousRsvp, setAnonymousRsvp] = useState(defaultAnonymousRsvp); const updateAnonymousRsvp = (value) => { - const meta = { allow_anonymous_rsvp: Number(value) }; + const meta = { enable_anonymous_rsvp: Number(value) }; setAnonymousRsvp(value); editPost({ meta }); @@ -34,7 +38,7 @@ const AnonymousRsvp = () => { return ( { updateAnonymousRsvp(value); diff --git a/src/components/Rsvp.js b/src/components/Rsvp.js index 2743a152b..8656056e5 100644 --- a/src/components/Rsvp.js +++ b/src/components/Rsvp.js @@ -18,7 +18,6 @@ import apiFetch from '@wordpress/api-fetch'; import { Broadcaster } from '../helpers/broadcasting'; import RsvpStatusResponse from './RsvpStatusResponse'; import { getFromGlobal } from '../helpers/globals'; -import { useSelect } from '@wordpress/data'; /** * Rsvp component for GatherPress. @@ -39,7 +38,9 @@ import { useSelect } from '@wordpress/data'; */ const Rsvp = ({ eventId, currentUser = '', type }) => { const [rsvpStatus, setRsvpStatus] = useState(currentUser.status); - const [rsvpAnonymous, setRsvpAnonymous] = useState(Number(currentUser.anonymous)); + const [rsvpAnonymous, setRsvpAnonymous] = useState( + Number(currentUser.anonymous) + ); const [rsvpGuests, setRsvpGuests] = useState(currentUser.guests); const [selectorHidden, setSelectorHidden] = useState('hidden'); const [selectorExpanded, setSelectorExpanded] = useState('false'); @@ -245,7 +246,7 @@ const Rsvp = ({ eventId, currentUser = '', type }) => { ) )} - {1 === getFromGlobal('event_allow_anonymous_rsvp') ? + {getFromGlobal('enable_anonymous_rsvp') ? (
{ {__('List me as anonymous.', 'gatherpress')}
- : + ) : ( <> - } + )} {/*@todo Guests feature coming in later version of GatherPress*/} {/*