From ac7ef12fe5b4a3092682104a46be5bf48aa6633c Mon Sep 17 00:00:00 2001 From: Jeffrey Marx Date: Fri, 1 Nov 2024 21:50:35 -0400 Subject: [PATCH] Remove redundant useeffect --- build/blocks/venue/index.asset.php | 2 +- build/blocks/venue/index.js | 4 ++-- build/panels.asset.php | 2 +- build/panels.js | 4 ++-- src/components/VenueInformation.js | 22 ++++++++++++++++------ 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/build/blocks/venue/index.asset.php b/build/blocks/venue/index.asset.php index 40c8904d8..28980f22a 100644 --- a/build/blocks/venue/index.asset.php +++ b/build/blocks/venue/index.asset.php @@ -1 +1 @@ - array('moment', 'react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => '9d47607a59ae02933048'); + array('moment', 'react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n'), 'version' => '2f49f9baf258110fbb88'); diff --git a/build/blocks/venue/index.js b/build/blocks/venue/index.js index e8594c9ba..d29e5af53 100644 --- a/build/blocks/venue/index.js +++ b/build/blocks/venue/index.js @@ -1,3 +1,3 @@ (()=>{var e,t,n,r,o,i={7701:(e,t,n)=>{"use strict";const r=window.wp.blocks,o=window.wp.i18n,i=window.wp.blockEditor,l=window.wp.components,s=window.wp.data,a=window.wp.element,c=window.ReactJSXRuntime,u=e=>{const{zoom:t,type:n,className:r,location:o,height:i}=e,l={border:0,height:i,width:"100%"},s="https://maps.google.com/maps?"+new URLSearchParams({q:o,z:t||10,t:n||"m",output:"embed"}).toString();return(0,c.jsx)("iframe",{src:s,style:l,className:r,title:o})};function d(){const e=(0,s.select)("core/editor")?.getCurrentPostType();return"gatherpress_event"===e||"gatherpress_venue"===e}function p(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}const f=e=>{const{zoom:t=10,className:r,location:i,height:l=300,latitude:s,longitude:u}=e,[d,f]=(0,a.useState)(null),h={height:l};return(0,a.useEffect)((()=>{(async()=>{const{default:e}=await n.e(481).then(n.t.bind(n,3481,23));await n.e(567).then(n.bind(n,5567)),await n.e(272).then(n.t.bind(n,1272,17)),await n.e(980).then(n.t.bind(n,8980,17)),f(e)})()}),[]),(0,a.useEffect)((()=>{if(!d||!s||!u)return;const e=d.map("map").setView([s,u],t);return d.Icon.Default.imagePath=p("urls.pluginUrl")+"build/images/",d.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:(0,o.sprintf)(/* translators: %s: Link to OpenStreetMap contributors. */ /* translators: %s: Link to OpenStreetMap contributors. */ -(0,o.__)("© %s contributors","gatherpress"),'OpenStreetMap')}).addTo(e),d.marker([s,u]).addTo(e).bindPopup(i),()=>{e.remove()}}),[d,s,i,u,t]),d&&s&&u?(0,c.jsx)("div",{className:r,id:"map",style:h}):null},h=e=>{const t=(0,s.select)("core")?.canUser("create","posts"),n=Boolean((0,s.select)("core/edit-post")),{zoom:r,type:o,className:i,latitude:l,longitude:a}=e;let{location:d,height:h,mapCustomLatLong:m}=e;h||(h=300),!t||n||d||(d="660 4th Street #119 San Francisco CA 94107, USA");const g=p("settings.mapPlatform");return d&&g?"google"===g?(0,c.jsx)(u,{location:d,className:i,zoom:r,type:o,height:h}):"osm"===g?(0,c.jsx)(f,{mapCustomLatLong:m,location:d,latitude:l,longitude:a,className:i,zoom:r,height:h}):(0,c.jsx)(c.Fragment,{}):(0,c.jsx)(c.Fragment,{})};var m=n(1609);const g=Math.min,v=Math.max,y=Math.round,b=Math.floor,w=e=>({x:e,y:e}),x={left:"right",right:"left",bottom:"top",top:"bottom"},_={start:"end",end:"start"};function E(e,t,n){return v(e,g(t,n))}function S(e,t){return"function"==typeof e?e(t):e}function T(e){return e.split("-")[0]}function k(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function C(e){return"y"===e?"height":"width"}function O(e){return["top","bottom"].includes(T(e))?"y":"x"}function j(e){return A(O(e))}function L(e){return e.replace(/start|end/g,(e=>_[e]))}function N(e){return e.replace(/left|right|bottom|top/g,(e=>x[e]))}function P(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function R(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function I(e,t,n){let{reference:r,floating:o}=e;const i=O(t),l=j(t),s=C(l),a=T(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(a){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(k(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function D(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=S(t,e),h=P(f),m=s[p?"floating"===d?"reference":"floating":d],g=R(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:a})),v="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=R(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:a}):v);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function M(){return"undefined"!=typeof window}function F(e){return H(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function B(e){var t;return null==(t=(H(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function H(e){return!!M()&&(e instanceof Node||e instanceof z(e).Node)}function V(e){return!!M()&&(e instanceof Element||e instanceof z(e).Element)}function W(e){return!!M()&&(e instanceof HTMLElement||e instanceof z(e).HTMLElement)}function q(e){return!(!M()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof z(e).ShadowRoot)}function U(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $(e){return["table","td","th"].includes(F(e))}function X(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function G(e){const t=Y(),n=V(e)?Z(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Y(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function K(e){return["html","body","#document"].includes(F(e))}function Z(e){return z(e).getComputedStyle(e)}function J(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Q(e){if("html"===F(e))return e;const t=e.assignedSlot||e.parentNode||q(e)&&e.host||B(e);return q(t)?t.host:t}function ee(e){const t=Q(e);return K(t)?e.ownerDocument?e.ownerDocument.body:e.body:W(t)&&U(t)?t:ee(t)}function te(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ee(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=z(o);if(i){const e=ne(l);return t.concat(l,l.visualViewport||[],U(o)?o:[],e&&n?te(e):[])}return t.concat(o,te(o,[],n))}function ne(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function re(e){const t=Z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=W(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=y(n)!==i||y(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function oe(e){return V(e)?e:e.contextElement}function ie(e){const t=oe(e);if(!W(t))return w(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=re(t);let l=(i?y(n.width):n.width)/r,s=(i?y(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const le=w(0);function se(e){const t=z(e);return Y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:le}function ae(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=oe(e);let l=w(1);t&&(r?V(r)&&(l=ie(r)):l=ie(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==z(e))&&t}(i,n,r)?se(i):w(0);let a=(o.left+s.x)/l.x,c=(o.top+s.y)/l.y,u=o.width/l.x,d=o.height/l.y;if(i){const e=z(i),t=r&&V(r)?z(r):r;let n=e,o=ne(n);for(;o&&r&&t!==n;){const e=ie(o),t=o.getBoundingClientRect(),r=Z(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=l,n=z(o),o=ne(n)}}return R({width:u,height:d,x:a,y:c})}function ce(e,t){const n=J(e).scrollLeft;return t?t.left+n:ae(B(e)).left+n}function ue(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=z(e),r=B(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const e=Y();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:s,y:a}}(e,n);else if("document"===t)r=function(e){const t=B(e),n=J(e),r=e.ownerDocument.body,o=v(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=v(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ce(e);const s=-n.scrollTop;return"rtl"===Z(r).direction&&(l+=v(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}(B(e));else if(V(t))r=function(e,t){const n=ae(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=W(e)?ie(e):w(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=se(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return R(r)}function de(e,t){const n=Q(e);return!(n===t||!V(n)||K(n))&&("fixed"===Z(n).position||de(n,t))}function pe(e,t,n){const r=W(t),o=B(t),i="fixed"===n,l=ae(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=w(0);if(r||!r&&!i)if(("body"!==F(t)||U(o))&&(s=J(t)),r){const e=ae(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=ce(o));let c=0,u=0;if(o&&!r&&!i){const e=o.getBoundingClientRect();u=e.top+s.scrollTop,c=e.left+s.scrollLeft-ce(o,e)}return{x:l.left+s.scrollLeft-a.x-c,y:l.top+s.scrollTop-a.y-u,width:l.width,height:l.height}}function fe(e){return"static"===Z(e).position}function he(e,t){if(!W(e)||"fixed"===Z(e).position)return null;if(t)return t(e);let n=e.offsetParent;return B(e)===n&&(n=n.ownerDocument.body),n}function me(e,t){const n=z(e);if(X(e))return n;if(!W(e)){let t=Q(e);for(;t&&!K(t);){if(V(t)&&!fe(t))return t;t=Q(t)}return n}let r=he(e,t);for(;r&&$(r)&&fe(r);)r=he(r,t);return r&&K(r)&&fe(r)&&!G(r)?n:r||function(e){let t=Q(e);for(;W(t)&&!K(t);){if(G(t))return t;if(X(t))return null;t=Q(t)}return null}(e)||n}const ge={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=B(r),s=!!t&&X(t.floating);if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},c=w(1);const u=w(0),d=W(r);if((d||!d&&!i)&&(("body"!==F(r)||U(l))&&(a=J(r)),W(r))){const e=ae(r);c=ie(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:B,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?X(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=te(e,[],!1).filter((e=>V(e)&&"body"!==F(e))),o=null;const i="fixed"===Z(e).position;let l=i?Q(e):e;for(;V(l)&&!K(l);){const t=Z(l),n=G(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||U(l)&&!n&&de(e,l))?r=r.filter((e=>e!==l)):o=t,l=Q(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],s=i.reduce(((e,n)=>{const r=ue(t,n,o);return e.top=v(r.top,e.top),e.right=g(r.right,e.right),e.bottom=g(r.bottom,e.bottom),e.left=v(r.left,e.left),e}),ue(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:me,getElementRects:async function(e){const t=this.getOffsetParent||me,n=this.getDimensions,r=await n(e.floating);return{reference:pe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=re(e);return{width:t,height:n}},getScale:ie,isElement:V,isRTL:function(e){return"rtl"===Z(e).direction}};const ve=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:s}=t,a=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=T(n),s=k(n),a="y"===O(n),c=["left","top"].includes(l)?-1:1,u=i&&a?-1:1,d=S(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),a?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},ye=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=S(e,t),c={x:n,y:r},u=await D(t,a),d=O(T(o)),p=A(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=E(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";h=E(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[d]:l}}}}}},be=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=S(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=T(o),y=O(s),b=T(s)===s,w=await(null==a.isRTL?void 0:a.isRTL(c.floating)),x=p||(b||!m?[N(s)]:function(e){const t=N(e);return[L(e),t,L(t)]}(s)),_="none"!==h;!p&&_&&x.push(...function(e,t,n,r){const o=k(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(T(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(L)))),i}(s,m,h,w));const E=[s,...x],A=await D(t,g),P=[];let R=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&P.push(A[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=k(e),o=j(e),i=C(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=N(l)),[l,N(l)]}(o,l,w);P.push(A[e[0]],A[e[1]])}if(R=[...R,{placement:o,overflows:P}],!P.every((e=>e<=0))){var I,M;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:R},reset:{placement:t}};let n=null==(M=R.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(f){case"bestFit":{var F;const e=null==(F=R.filter((e=>{if(_){const t=O(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},we=(e,t,n)=>{const r=new Map,o={platform:ge,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=I(c,r,a),p=r,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=l;return n?(a.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:r,rects:o,platform:i,elements:l,middlewareData:s}=e,{element:a,padding:u=0}=S(c,e)||{};if(null==a)return{};const d=P(u),p={x:t,y:n},f=j(r),h=C(f),m=await i.getDimensions(a),v="y"===f,y=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[f]-p[f]-o.floating[h],_=p[f]-o.reference[f],T=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let A=T?T[w]:0;A&&await(null==i.isElement?void 0:i.isElement(T))||(A=l.floating[w]||o.floating[h]);const O=x/2-_/2,L=A/2-m[h]/2-1,N=g(d[y],L),R=g(d[b],L),I=N,D=A-m[h]-R,M=A/2-m[h]/2+O,F=E(I,M,D),z=!s.arrow&&null!=k(r)&&M!==F&&o.reference[h]/2-(M{var o,i;const l={left:`${e}px`,top:`${t}px`,border:s},{x:a,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=s&&{borderBottom:s,borderRight:s};let p=0;if(s){const e=`${s}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):we(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},Te=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ke=(e,t,n)=>{let r=null;const o=function(...o){const i=()=>{r=null,n||e.apply(this,o)};n&&!r&&(e.apply(this,o),r=setTimeout(i,t)),n||(r&&clearTimeout(r),r=setTimeout(i,t))};return o.cancel=()=>{r&&(clearTimeout(r),r=null)},o},Ae=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,Ce=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>Ce(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!Ae(e)||!Ae(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>Ce(e[n],t[n])))},Oe=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},je=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Oe(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Le="undefined"!=typeof window?m.useLayoutEffect:m.useEffect,Ne=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Pe={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Re=(0,m.createContext)({getTooltipData:()=>Pe});function Ie(e="DEFAULT_TOOLTIP_ID"){return(0,m.useContext)(Re).getTooltipData(e)}var De={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Me={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Fe=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,anchorSelect:l,place:s="top",offset:a=10,events:c=["hover"],openOnClick:u=!1,positionStrategy:d="absolute",middlewares:p,wrapper:f,delayShow:h=0,delayHide:y=0,float:w=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:C,globalCloseEvents:O,imperativeModeOnly:j,style:L,position:N,afterShow:P,afterHide:R,disableTooltip:I,content:D,contentWrapperRef:M,isOpen:F,defaultIsOpen:z=!1,setIsOpen:H,activeAnchor:V,setActiveAnchor:W,border:q,opacity:U,arrowColor:$,role:X="tooltip"})=>{var G;const Y=(0,m.useRef)(null),K=(0,m.useRef)(null),Z=(0,m.useRef)(null),J=(0,m.useRef)(null),Q=(0,m.useRef)(null),[ee,ne]=(0,m.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:s}),[re,ie]=(0,m.useState)(!1),[le,se]=(0,m.useState)(!1),[ce,ue]=(0,m.useState)(null),de=(0,m.useRef)(!1),pe=(0,m.useRef)(null),{anchorRefs:fe,setActiveAnchor:he}=Ie(t),me=(0,m.useRef)(!1),[ge,ve]=(0,m.useState)([]),ye=(0,m.useRef)(!1),be=u||c.includes("click"),we=be||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),_e=A?{...A}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!A&&be&&Object.assign(_e,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ee=C?{...C}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!C&&be&&Object.assign(Ee,{mouseleave:!1,blur:!1,mouseout:!1});const Te=O?{...O}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:we||!1};j&&(Object.assign(_e,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ee,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Te,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Le((()=>(ye.current=!0,()=>{ye.current=!1})),[]);const Ae=e=>{ye.current&&(e&&se(!0),setTimeout((()=>{ye.current&&(null==H||H(e),void 0===F&&ie(e))}),10))};(0,m.useEffect)((()=>{if(void 0===F)return()=>null;F&&se(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,m.useEffect)((()=>{if(re!==de.current)if(Ne(Q),de.current=re,re)null==P||P();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();Q.current=setTimeout((()=>{se(!1),ue(null),null==R||R()}),e+25)}}),[re]);const Oe=e=>{ne((t=>Ce(t,e)?t:e))},Pe=(e=h)=>{Ne(Z),le?Ae(!0):Z.current=setTimeout((()=>{Ae(!0)}),e)},Re=(e=y)=>{Ne(J),J.current=setTimeout((()=>{me.current||Ae(!1)}),e)},Fe=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return W(null),void he({current:null});h?Pe():Ae(!0),W(n),he({current:n}),Ne(J)},ze=()=>{E?Re(y||100):y?Re():Ae(!1),Ne(Z)},Be=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Se({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:s,offset:a,elementReference:r,tooltipReference:Y.current,tooltipArrowReference:K.current,strategy:d,middlewares:p,border:q}).then((e=>{Oe(e)}))},He=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Be(n),pe.current=n},Ve=e=>{var t;if(!re)return;const n=e.target;n.isConnected&&((null===(t=Y.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ge].some((e=>null==e?void 0:e.contains(n)))||(Ae(!1),Ne(Z)))},We=ke(Fe,50,!0),qe=ke(ze,50,!0),Ue=e=>{qe.cancel(),We(e)},$e=()=>{We.cancel(),qe()},Xe=(0,m.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:N;n?Be(n):w?pe.current&&Be(pe.current):(null==V?void 0:V.isConnected)&&Se({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:s,offset:a,elementReference:V,tooltipReference:Y.current,tooltipArrowReference:K.current,strategy:d,middlewares:p,border:q}).then((e=>{ye.current&&Oe(e)}))}),[re,V,D,L,s,null==ce?void 0:ce.place,a,d,N,null==ce?void 0:ce.position,w]);(0,m.useEffect)((()=>{var e,t;const n=new Set(fe);ge.forEach((e=>{(null==I?void 0:I(e))||n.add({current:e})}));const r=document.querySelector(`[id='${i}']`);r&&!(null==I?void 0:I(r))&&n.add({current:r});const o=()=>{Ae(!1)},l=je(V),s=je(Y.current);Te.scroll&&(window.addEventListener("scroll",o),null==l||l.addEventListener("scroll",o),null==s||s.addEventListener("scroll",o));let a=null;Te.resize?window.addEventListener("resize",o):V&&Y.current&&(a=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:a=!1}=r,c=oe(e),u=o||i?[...c?te(c):[],...te(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=B(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-b(u)+"px "+-b(o.clientWidth-(c+d))+"px "+-b(o.clientHeight-(u+p))+"px "+-b(c)+"px",threshold:v(0,g(1,a))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==a){if(!h)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;l&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!a&&h.observe(c),h.observe(t));let m=a?ae(e):null;return a&&function t(){const r=ae(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,a&&cancelAnimationFrame(p)}}(V,Y.current,Xe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Ae(!1)};Te.escape&&window.addEventListener("keydown",c),Te.clickOutsideAnchor&&window.addEventListener("click",Ve);const u=[],d=e=>{re&&(null==e?void 0:e.target)===V||Fe(e)},p=e=>{re&&(null==e?void 0:e.target)===V&&ze()},f=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(_e).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:Ue}):h.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Ee).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:$e}):h.includes(e)&&u.push({event:e,listener:p}))})),w&&u.push({event:"pointermove",listener:He});const m=()=>{me.current=!0},y=()=>{me.current=!1,ze()};return E&&!we&&(null===(e=Y.current)||void 0===e||e.addEventListener("mouseenter",m),null===(t=Y.current)||void 0===t||t.addEventListener("mouseleave",y)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Te.scroll&&(window.removeEventListener("scroll",o),null==l||l.removeEventListener("scroll",o),null==s||s.removeEventListener("scroll",o)),Te.resize?window.removeEventListener("resize",o):null==a||a(),Te.clickOutsideAnchor&&window.removeEventListener("click",Ve),Te.escape&&window.removeEventListener("keydown",c),E&&!we&&(null===(e=Y.current)||void 0===e||e.removeEventListener("mouseenter",m),null===(t=Y.current)||void 0===t||t.removeEventListener("mouseleave",y)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[V,Xe,le,fe,ge,A,C,O,be,h,y]),(0,m.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const o=new MutationObserver((e=>{const n=[],o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&o.push(e.target)),"childList"===e.type){if(V){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{o.push(...t.filter((e=>e.matches(r)))),o.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,V))&&(se(!1),Ae(!1),W(null),Ne(Z),Ne(J),!0)}))}if(r)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(r)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(n.length||o.length)&&ve((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{o.disconnect()}}),[t,l,null==ce?void 0:ce.anchorSelect,V]),(0,m.useEffect)((()=>{Xe()}),[Xe]),(0,m.useEffect)((()=>{if(!(null==M?void 0:M.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Xe()))}));return e.observe(M.current),()=>{e.disconnect()}}),[D,null==M?void 0:M.current]),(0,m.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ge,t];V&&n.includes(V)||W(null!==(e=ge[0])&&void 0!==e?e:t)}),[i,ge,V]),(0,m.useEffect)((()=>(z&&Ae(!0),()=>{Ne(Z),Ne(J)})),[]),(0,m.useEffect)((()=>{var e;let n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ve(e)}catch(e){ve([])}}),[t,l,null==ce?void 0:ce.anchorSelect]),(0,m.useEffect)((()=>{Z.current&&(Ne(Z),Pe(h))}),[h]);const Ge=null!==(G=null==ce?void 0:ce.content)&&void 0!==G?G:D,Ye=re&&Object.keys(ee.tooltipStyles).length>0;return(0,m.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ue(null!=e?e:null),(null==e?void 0:e.delay)?Pe(e.delay):Ae(!0)},close:e=>{(null==e?void 0:e.delay)?Re(e.delay):Ae(!1)},activeAnchor:V,place:ee.place,isOpen:Boolean(le&&!x&&Ge&&Ye)}))),le&&!x&&Ge?m.createElement(f,{id:t,role:X,className:xe("react-tooltip",De.tooltip,Me.tooltip,Me[o],n,`react-tooltip__place-${ee.place}`,De[Ye?"show":"closing"],Ye?"react-tooltip__show":"react-tooltip__closing","fixed"===d&&De.fixed,E&&De.clickable),onTransitionEnd:e=>{Ne(Q),re||"opacity"!==e.propertyName||(se(!1),ue(null),null==R||R())},style:{...L,...ee.tooltipStyles,opacity:void 0!==U&&Ye?U:void 0},ref:Y},Ge,m.createElement(f,{className:xe("react-tooltip-arrow",De.arrow,Me.arrow,r,_&&De.noArrow),style:{...ee.tooltipArrowStyles,background:$?`linear-gradient(to right bottom, transparent 50%, ${$} 50%)`:void 0},ref:K})):null},ze=({content:e})=>m.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Be=m.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:o,render:i,className:l,classNameArrow:s,variant:a="dark",place:c="top",offset:u=10,wrapper:d="div",children:p=null,events:f=["hover"],openOnClick:h=!1,positionStrategy:g="absolute",middlewares:v,delayShow:y=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:C,globalCloseEvents:O,imperativeModeOnly:j=!1,style:L,position:N,isOpen:P,defaultIsOpen:R=!1,disableStyleInjection:I=!1,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,disableTooltip:V,role:W="tooltip"},q)=>{const[U,$]=(0,m.useState)(r),[X,G]=(0,m.useState)(o),[Y,K]=(0,m.useState)(c),[Z,J]=(0,m.useState)(a),[Q,ee]=(0,m.useState)(u),[te,ne]=(0,m.useState)(y),[re,oe]=(0,m.useState)(b),[ie,le]=(0,m.useState)(w),[se,ae]=(0,m.useState)(x),[ce,ue]=(0,m.useState)(d),[de,pe]=(0,m.useState)(f),[fe,he]=(0,m.useState)(g),[me,ge]=(0,m.useState)(null),[ve,ye]=(0,m.useState)(null),be=(0,m.useRef)(I),{anchorRefs:we,activeAnchor:_e}=Ie(e),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),Se=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},content:e=>{$(null!=e?e:r)},html:e=>{G(null!=e?e:o)},variant:e=>{var t;J(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{ee(null===e?u:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:d)},events:e=>{const t=null==e?void 0:e.split(" ");pe(null!=t?t:f)},"position-strategy":e=>{var t;he(null!==(t=e)&&void 0!==t?t:g)},"delay-show":e=>{ne(null===e?y:Number(e))},"delay-hide":e=>{oe(null===e?b:Number(e))},float:e=>{le(null===e?w:"true"===e)},hidden:e=>{ae(null===e?x:"true"===e)},"class-name":e=>{ge(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,m.useEffect)((()=>{$(r)}),[r]),(0,m.useEffect)((()=>{G(o)}),[o]),(0,m.useEffect)((()=>{K(c)}),[c]),(0,m.useEffect)((()=>{J(a)}),[a]),(0,m.useEffect)((()=>{ee(u)}),[u]),(0,m.useEffect)((()=>{ne(y)}),[y]),(0,m.useEffect)((()=>{oe(b)}),[b]),(0,m.useEffect)((()=>{le(w)}),[w]),(0,m.useEffect)((()=>{ae(x)}),[x]),(0,m.useEffect)((()=>{he(g)}),[g]),(0,m.useEffect)((()=>{be.current!==I&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[I]),(0,m.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===I,disableBase:I}}))}),[]),(0,m.useEffect)((()=>{var r;const o=new Set(we);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(r){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const s=null!==(r=null!=ve?ve:l)&&void 0!==r?r:_e.current,a=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(s);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(s){const e=Ee(s);Se(e),a.observe(s,c)}return()=>{a.disconnect()}}),[we,_e,ve,t,n]),(0,m.useEffect)((()=>{(null==L?void 0:L.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!Te("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),(null==L?void 0:L.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),M&&!Te("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let ke=p;const Ae=(0,m.useRef)(null);if(i){const e=i({content:(null==ve?void 0:ve.getAttribute("data-tooltip-content"))||U||null,activeAnchor:ve});ke=e?m.createElement("div",{ref:Ae,className:"react-tooltip-content-wrapper"},e):null}else U&&(ke=U);X&&(ke=m.createElement(ze,{content:X}));const Ce={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:xe(l,me),classNameArrow:s,content:ke,contentWrapperRef:Ae,place:Y,variant:Z,offset:Q,wrapper:ce,events:de,openOnClick:h,positionStrategy:fe,middlewares:v,delayShow:te,delayHide:re,float:ie,hidden:se,noArrow:_,clickable:E,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:C,globalCloseEvents:O,imperativeModeOnly:j,style:L,position:N,isOpen:P,defaultIsOpen:R,border:D,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,disableTooltip:V,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:W};return m.createElement(Fe,{...Ce})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||Ee({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||Ee({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const He=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const o=new CustomEvent(e,{detail:r});dispatchEvent(o)}},Ve=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}},We=({onlineEventLinkDefault:e=""})=>{const t=(0,o.__)("Online event","gatherpress"),[n,r]=(0,a.useState)(e);return Ve({setOnlineEventLink:r},p("eventDetails.postId")),(0,c.jsxs)(l.Flex,{justify:"normal",gap:"3",children:[(0,c.jsx)(l.FlexItem,{display:"flex",children:(0,c.jsx)(l.Icon,{icon:"video-alt2"})}),(0,c.jsxs)(l.FlexItem,{children:[!n&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,o.__)("Link available for attendees only.","gatherpress"),children:t}),(0,c.jsx)(Be,{id:"gatherpress-online-event-tooltip"})]}),n&&(0,c.jsx)("a",{href:n,rel:"noreferrer",target:"_blank",children:t})]})]})};var qe=n(442);const Ue=qe.default||qe,$e=({name:e,fullAddress:t,phoneNumber:n,website:r})=>(0,c.jsxs)(c.Fragment,{children:[(e||t)&&(0,c.jsxs)(l.Flex,{justify:"normal",align:"flex-start",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"location"})}),(0,c.jsxs)(l.FlexItem,{children:[e&&(0,c.jsx)("div",{className:"gatherpress-venue__name",children:(0,c.jsx)("strong",{children:Ue(e)})}),t&&(0,c.jsx)("div",{className:"gatherpress-venue__full-address",children:Ue(t)})]})]}),(n||r)&&(0,c.jsxs)(l.Flex,{justify:"normal",gap:"8",children:[n&&(0,c.jsx)(l.FlexItem,{children:(0,c.jsxs)(l.Flex,{justify:"normal",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"phone"})}),(0,c.jsx)(l.FlexItem,{children:(0,c.jsx)("div",{className:"gatherpress-venue__phone-number",children:n})})]})}),r&&(0,c.jsx)(l.FlexItem,{children:(0,c.jsxs)(l.Flex,{justify:"normal",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"admin-site-alt3"})}),(0,c.jsx)(l.FlexItem,{children:(0,c.jsx)("div",{className:"gatherpress-venue__website",children:(0,c.jsx)("a",{href:r,target:"_blank",rel:"noreferrer noopener",children:r})})})]})})]})]}),Xe=({name:e="",fullAddress:t,phoneNumber:n,website:r,isOnlineEventTerm:o=!1,onlineEventLink:i=""})=>(0,c.jsxs)(c.Fragment,{children:[!o&&(0,c.jsx)($e,{name:e,fullAddress:t,phoneNumber:n,website:r}),o&&(0,c.jsx)(We,{onlineEventLinkDefault:i})]}),Ge=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,c.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,c.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})};function Ye(){return"gatherpress_venue"===(0,s.select)("core/editor")?.getCurrentPostType()}const Ke=()=>{const[e,t]=(0,a.useState)(""),[n,r]=(0,a.useState)(""),[i,u]=(0,a.useState)(""),[d,p]=(0,a.useState)(""),[f,h]=(0,a.useState)(!1),[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),x=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:_}=(0,s.useDispatch)("core/editor"),E=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),S=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",E))),T=S?.slug.replace(/^_/,""),[k,A]=(0,a.useState)(""),C=E+":"+k,O=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:k}))),{updateVenueLatitude:j,updateVenueLongitude:L}=(0,s.useDispatch)("gatherpress/venue");(0,a.useEffect)((()=>{var e,n,i,l,s,a;let c={};if(k&&Array.isArray(O)){var d;const e=null!==(d=O[0]?.meta?.gatherpress_venue_information)&&void 0!==d?d:"{}";var f;e&&(c=JSON.parse(e),c.name=null!==(f=O[0]?.title.rendered)&&void 0!==f?f:"")}const h=null!==(e=c?.name)&&void 0!==e?e:(0,o.__)("No venue selected.","gatherpress"),m=null!==(n=c?.fullAddress)&&void 0!==n?n:"",g=null!==(i=c?.phoneNumber)&&void 0!==i?i:"",v=null!==(l=c?.website)&&void 0!==l?l:"",y=null!==(s=c?.latitude)&&void 0!==s?s:"0",b=null!==(a=c?.longitude)&&void 0!==a?a:"0";T&&A(T),w(C?String(C):""),t(h),r(m),u(g),p(v),j(y),L(b),He({setName:h,setFullAddress:m,setPhoneNumber:g,setWebsite:v,setLatitude:y,setLongitude:b,setIsOnlineEventTerm:"online-event"===k})}),[k,O,T,C,j,L]);let N=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})),[]);return N?(N=N.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),N.unshift({value:":",label:(0,o.__)("Choose a venue","gatherpress")})):N=[],(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.SelectControl,{label:(0,o.__)("Venue Selector","gatherpress"),value:b,onChange:e=>{(e=>{w(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];x({_gatherpress_venue:t}),A(e[1]),_()})(e)},options:N})})},Ze=(window.wp.compose,()=>{var e,t,n;const r=(0,s.useDispatch)("core/editor").editPost,i=e=>{const t=JSON.stringify({...f,...e});r({meta:{gatherpress_venue_information:t}})},{updateVenueLatitude:u,updateVenueLongitude:d}=(0,s.useDispatch)("gatherpress/venue"),{mapCustomLatLong:p}=(0,s.useSelect)((e=>({mapCustomLatLong:e("gatherpress/venue").getMapCustomLatLong()})),[]);(0,a.useEffect)((()=>{}),[p]);let f=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));f=f?JSON.parse(f):{};const[h,m]=(0,a.useState)(null!==(e=f.fullAddress)&&void 0!==e?e:""),[g,v]=(0,a.useState)(null!==(t=f.phoneNumber)&&void 0!==t?t:""),[y,b]=(0,a.useState)(null!==(n=f.website)&&void 0!==n?n:"");Ve({setFullAddress:m,setPhoneNumber:v,setWebsite:b});const w=(0,a.useRef)(i),x=(0,a.useCallback)((()=>{let e=null,t=null;fetch(`https://nominatim.openstreetmap.org/search?q=${h}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,o.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ -(0,o.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((n=>{n.features.length>0&&(e=n.features[0].geometry.coordinates[1],t=n.features[0].geometry.coordinates[0]),p||(u(e),d(t),w.current({latitude:e,longitude:t}))}))}),[h,p,w]);return(0,a.useEffect)((()=>{x()}),[x]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.TextControl,{label:(0,o.__)("Full Address","gatherpress"),value:h,onChange:e=>{He({setFullAddress:e}),i({fullAddress:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Phone Number","gatherpress"),value:g,onChange:e=>{He({setPhoneNumber:e}),i({phoneNumber:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Website","gatherpress"),value:y,type:"url",onChange:e=>{He({setWebsite:e}),i({website:e})}})]})}),Je=()=>(0,c.jsx)("section",{children:(0,c.jsx)(Ze,{})}),Qe=()=>{const{editPost:e,unlockPostSaving:t}=(0,s.useDispatch)("core/editor"),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[r,i]=(0,a.useState)(n);return Ve({setOnlineEventLink:i},p("eventDetails.postId")),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Online event link","gatherpress"),value:r,placeholder:(0,o.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{gatherpress_online_event_link:n}}),i(n),He({setOnlineEventLink:n},p("eventDetails.postId")),t()})(n)}})},et=window.moment;var tt=n.n(et);window.wp.date;const nt="YYYY-MM-DD HH:mm:ss",rt=tt().tz(ot()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(nt);function ot(e=p("eventDetails.dateTime.timezone")){return tt().tz.zone(e)?e:(0,o.__)("GMT","gatherpress")}tt().tz(rt,ot()).add(2,"hours").format(nt),(0,o.__)("1 hour","gatherpress"),(0,o.__)("1.5 hours","gatherpress"),(0,o.__)("2 hours","gatherpress"),(0,o.__)("3 hours","gatherpress"),(0,o.__)("Set an end time…","gatherpress");const it=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/venue","version":"1.1.0","title":"Venue","category":"gatherpress","icon":"location","example":{},"description":"Provides information about an event venue.","attributes":{"mapShow":{"type":"boolean","default":true},"mapAlign":{"type":"string","default":""},"mapZoomLevel":{"type":"number","default":10},"mapType":{"type":"string","default":"m"},"mapHeight":{"type":"number","default":300},"mapCustomLatLong":{"type":"boolean","default":false}},"supports":{"align":["wide"],"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./venue.js","viewStyle":"file:./venue.css","render":"file:./render.php"}');(0,r.registerBlockType)(it,{edit:({attributes:e,setAttributes:t,isSelected:n})=>{const{mapZoomLevel:r,mapType:u,mapHeight:f}=e,[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),[x,_]=(0,a.useState)(""),[E,S]=(0,a.useState)(""),[T,k]=(0,a.useState)(!1),A=(0,i.useBlockProps)(),C=p("settings.mapPlatform"),{latitude:O}=(0,s.useSelect)((e=>({latitude:e("gatherpress/venue").getVenueLatitude()})),[]),{longitude:j}=(0,s.useSelect)((e=>({longitude:e("gatherpress/venue").getVenueLongitude()})),[]),{updateVenueLatitude:L,updateVenueLongitude:N,updateMapCustomLatLong:P}=(0,s.useDispatch)("gatherpress/venue"),R=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_online_event_link));let{mapShow:I,mapCustomLatLong:D}=e;(0,a.useEffect)((()=>{P(D)}),[D,P]);const M=(0,s.useDispatch)("core/editor").editPost,F=e=>{const t=JSON.stringify({...z,...e});M({meta:{gatherpress_venue_information:t}})};let z=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_venue_information));return z=z?JSON.parse(z):{},I&&v&&(I=!0),I&&!d()&&(I=!0),Ve({setName:g,setFullAddress:y,setPhoneNumber:w,setWebsite:S,setIsOnlineEventTerm:k}),(0,a.useEffect)((()=>{Ye()&&(y(z.fullAddress),w(z.phoneNumber),S(z.website),L(z.latitude),N(z.longitude),g(v||b||E?"":(0,o.__)("Add venue information.","gatherpress"))),"gatherpress_event"!==(0,s.select)("core/editor")?.getCurrentPostType()&&d()||g(v||b||E?"":(0,o.__)("No venue selected.","gatherpress"))}),[z.fullAddress,z.phoneNumber,z.website,z.latitude,z.longitude,v,b,E,O,j,N,L]),(0,a.useEffect)((()=>{const e=new Event("resize");window.dispatchEvent(e)}),[f]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(i.InspectorControls,{children:[d()&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Venue settings","gatherpress"),initialOpen:!0,children:[(0,c.jsxs)(l.PanelRow,{children:[!Ye()&&(0,c.jsx)(Ke,{}),Ye()&&(0,c.jsx)(Je,{})]}),T&&(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(Qe,{})})]}),!T&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Map settings","gatherpress"),initialOpen:!0,children:[(0,c.jsx)(l.PanelRow,{children:(0,o.__)("Show map on venue","gatherpress")}),(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.ToggleControl,{label:I?(0,o.__)("Display the map","gatherpress"):(0,o.__)("Hide the map","gatherpress"),checked:I,onChange:e=>{t({mapShow:e})}})}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Zoom level","gatherpress"),beforeIcon:"search",value:r,onChange:e=>t({mapZoomLevel:e}),min:1,max:22}),"google"===C&&(0,c.jsx)(l.RadioControl,{label:(0,o.__)("Map type","gatherpress"),selected:u,options:[{label:(0,o.__)("Roadmap","gatherpress"),value:"m"},{label:(0,o.__)("Satellite","gatherpress"),value:"k"}],onChange:e=>{t({mapType:e})}}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Map height","gatherpress"),beforeIcon:"location",value:f,onChange:e=>t({mapHeight:e}),min:100,max:1e3}),(0,c.jsx)(l.PanelRow,{children:(0,o.__)("Latitude / Longitude","gatherpress")}),Ye()&&(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.ToggleControl,{label:D?(0,o.__)("Use custom values","gatherpress"):(0,o.__)("Use default values","gatherpress"),checked:D,onChange:e=>{t({mapCustomLatLong:e}),P(e)}})}),D&&Ye()&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.__experimentalNumberControl,{label:(0,o.__)("Latitude","gatherpress"),value:O,onChange:e=>{L(e),F({latitude:e})}}),(0,c.jsx)(l.__experimentalNumberControl,{label:(0,o.__)("Longitude","gatherpress"),value:j,onChange:e=>{N(e),F({longitude:e})}})]})]})]}),(0,c.jsx)("div",{...A,children:(0,c.jsx)(Ge,{isSelected:n,children:(0,c.jsxs)("div",{className:"gatherpress-venue",children:[(0,c.jsx)(Xe,{name:m,fullAddress:v,phoneNumber:b,website:E,isOnlineEventTerm:T,onlineEventLink:R}),I&&!T&&(0,c.jsx)(h,{mapCustomLatLong:D,location:v,latitude:O,longitude:j,zoom:r,type:u,height:f})]})})})]})},save:()=>{}})},5413:(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},1141:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),l=n(6957);o(n(6957),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function e(e,t,n){this.dom=[],this.root=new l.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 l.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?i.ElementType.Tag:void 0,r=new l.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.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 l.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=a,t.default=a},6957:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(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}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=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=l.ElementType.CDATA,t}return o(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=l.ElementType.Root,t}return o(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,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(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,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(p);function g(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function y(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function x(e){return e.type===l.ElementType.Root}function _(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(g(e)){var r=t?E(e.children):[],o=new m(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(v(e)){r=t?E(e.children):[];var l=new f(r);r.forEach((function(e){return e.parent=l})),n=l}else if(x(e)){r=t?E(e.children):[];var s=new h(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var a=new d(e.name,e.data);null!=e["x-name"]&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return _(e,!0)})),n=1;n{"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}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return l.test(e)||null===(t=null==(g=h.querySelector(r))?void 0:g.parentNode)||void 0===t||t.removeChild(g),s.test(e)||null===(u=null==(g=h.querySelector(o))?void 0:g.parentNode)||void 0===u||u.removeChild(g),h.querySelectorAll(n);case r:case o:var m=a(e).querySelectorAll(p);return s.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(g=a(e,o).querySelector(o)).childNodes;var g}};var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,s=//i,a=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;a=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();a=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})},2471:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(5496)),i=n(7731),l=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var s,a=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),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,r.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=a(p);if(f){var h=(0,r.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=a("default"+p)),n[f]=d,h&&h.type){case r.BOOLEAN:n[f]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(4210),o=n(4958),i=["checked","value"],l=["input","select","textarea"],s={reset:!0,submit:!0};function a(e){return r.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=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})),r.push(c(v,g,m));continue}}if("text"!==g.type){var y=g,b={};a(y)?((0,l.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,i.default)(y.attribs,y.name));var w=void 0;switch(g.type){case"script":case"style":g.children[0]&&(b.dangerouslySetInnerHTML={__html:g.children[0].data});break;case"tag":"textarea"===g.name&&g.children[0]?b.defaultValue=g.children[0].data:g.children&&g.children.length&&(w=e(g.children,n));break;default:continue}h>1&&(b.key=m),r.push(c(p(g.name,b,w),g,m))}else{var x=!g.data.trim().length;if(x&&g.parent&&!(0,l.canTextBeChildOfNode)(g.parent))continue;if(n.trim&&x)continue;r.push(c(g.data,g,m))}}return 1===r.length?r[0]:r};var o=n(1609),i=r(n(840)),l=n(4958),s={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function a(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var r=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,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||a),t):[]};var o=r(n(2471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var l=r(n(308));t.domToReact=l.default;var s=n(1141);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 a={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var r=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=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,s)}catch(e){t.style={}}else t.style={}};var o=n(1609),i=r(n(5229)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),s={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.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}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(a,c):c}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");p=~r?e.length-r: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=a.source}m.prototype.content=e;var g=[];function v(t){var n=new Error(a.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=a.source,n.line=d,n.column=p,n.source=e,!a.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){y(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){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 r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function _(){var e=h(),n=y(o);if(n){if(x(),!y(i))return v("property missing ':'");var r=y(l),a=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(s),a}}return b(),function(){var e,t=[];for(w(t);e=_();)!1!==e&&(t.push(e),w(t));return t}()}},4210:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(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=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=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(i,l);o[t]=new r(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(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:a,possibleStandardNames:c}=n(6811),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===a?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 o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(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}},5229:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,a):e.replace(i,a)).replace(r,s))}},1133:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n};var o=r(n(9788))},1609:e=>{"use strict";e.exports=window.React},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=o)&&Object.keys(s.O).every((e=>s.O[e](n[a])))?n.splice(a--,1):(l=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);s.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var l=2&r&&e;"object"==typeof l&&!~t.indexOf(l);l=n(l))Object.getOwnPropertyNames(l).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,s.d(o,i),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>e+".js?v="+{272:"994bd196dfd027e187df",481:"de7be60ececa79e28206",567:"88f6f2972bcfeb27e623",980:"ea1eff5ee6fe2438881e"}[e],s.miniCssF=e=>e+".css",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="gatherpress:",s.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var l,a;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(f);var o=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),a&&document.head.appendChild(l)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e+"../../"})(),(()=>{if("undefined"!=typeof document){var e={908:0};s.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{567:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var r=s.miniCssF(e),o=s.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",s.nc&&(i.nonce=s.nc),i.onerror=i.onload=n=>{if(i.onerror=i.onload=null,"load"===n.type)r();else{var l=n&&n.type,s=n&&n.target&&n.target.href||t,a=new Error("Loading CSS chunk "+e+" failed.\n("+l+": "+s+")");a.name="ChunkLoadError",a.code="CSS_CHUNK_LOAD_FAILED",a.type=l,a.request=s,i.parentNode&&i.parentNode.removeChild(i),o(a)}},i.href=t,document.head.appendChild(i)})(e,o,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={908:0,812:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(812!=t){var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=s.p+s.u(t),l=new Error;s.l(i,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,r[1](l)}}),"chunk-"+t,t)}else e[t]=0},s.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,i=n[0],l=n[1],a=n[2],c=0;if(i.some((t=>0!==e[t]))){for(r in l)s.o(l,r)&&(s.m[r]=l[r]);if(a)var u=a(s)}for(t&&t(n);cs(7701)));a=s.O(a)})(); \ No newline at end of file +(0,o.__)("© %s contributors","gatherpress"),'OpenStreetMap')}).addTo(e),d.marker([s,u]).addTo(e).bindPopup(i),()=>{e.remove()}}),[d,s,i,u,t]),d&&s&&u?(0,c.jsx)("div",{className:r,id:"map",style:h}):null},h=e=>{const t=(0,s.select)("core")?.canUser("create","posts"),n=Boolean((0,s.select)("core/edit-post")),{zoom:r,type:o,className:i,latitude:l,longitude:a}=e;let{location:d,height:h,mapCustomLatLong:m}=e;h||(h=300),!t||n||d||(d="660 4th Street #119 San Francisco CA 94107, USA");const g=p("settings.mapPlatform");return d&&g?"google"===g?(0,c.jsx)(u,{location:d,className:i,zoom:r,type:o,height:h}):"osm"===g?(0,c.jsx)(f,{mapCustomLatLong:m,location:d,latitude:l,longitude:a,className:i,zoom:r,height:h}):(0,c.jsx)(c.Fragment,{}):(0,c.jsx)(c.Fragment,{})};var m=n(1609);const g=Math.min,v=Math.max,y=Math.round,b=Math.floor,w=e=>({x:e,y:e}),x={left:"right",right:"left",bottom:"top",top:"bottom"},_={start:"end",end:"start"};function E(e,t,n){return v(e,g(t,n))}function S(e,t){return"function"==typeof e?e(t):e}function T(e){return e.split("-")[0]}function k(e){return e.split("-")[1]}function A(e){return"x"===e?"y":"x"}function C(e){return"y"===e?"height":"width"}function O(e){return["top","bottom"].includes(T(e))?"y":"x"}function j(e){return A(O(e))}function L(e){return e.replace(/start|end/g,(e=>_[e]))}function N(e){return e.replace(/left|right|bottom|top/g,(e=>x[e]))}function P(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function R(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function D(e,t,n){let{reference:r,floating:o}=e;const i=O(t),l=j(t),s=C(l),a=T(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(a){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(k(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1)}return f}async function I(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=S(t,e),h=P(f),m=s[p?"floating"===d?"reference":"floating":d],g=R(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:a})),v="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=R(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:a}):v);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function M(){return"undefined"!=typeof window}function F(e){return H(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function B(e){var t;return null==(t=(H(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function H(e){return!!M()&&(e instanceof Node||e instanceof z(e).Node)}function V(e){return!!M()&&(e instanceof Element||e instanceof z(e).Element)}function W(e){return!!M()&&(e instanceof HTMLElement||e instanceof z(e).HTMLElement)}function q(e){return!(!M()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof z(e).ShadowRoot)}function U(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $(e){return["table","td","th"].includes(F(e))}function X(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function G(e){const t=Y(),n=V(e)?Z(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Y(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function K(e){return["html","body","#document"].includes(F(e))}function Z(e){return z(e).getComputedStyle(e)}function J(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Q(e){if("html"===F(e))return e;const t=e.assignedSlot||e.parentNode||q(e)&&e.host||B(e);return q(t)?t.host:t}function ee(e){const t=Q(e);return K(t)?e.ownerDocument?e.ownerDocument.body:e.body:W(t)&&U(t)?t:ee(t)}function te(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ee(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=z(o);if(i){const e=ne(l);return t.concat(l,l.visualViewport||[],U(o)?o:[],e&&n?te(e):[])}return t.concat(o,te(o,[],n))}function ne(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function re(e){const t=Z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=W(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=y(n)!==i||y(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function oe(e){return V(e)?e:e.contextElement}function ie(e){const t=oe(e);if(!W(t))return w(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=re(t);let l=(i?y(n.width):n.width)/r,s=(i?y(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const le=w(0);function se(e){const t=z(e);return Y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:le}function ae(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=oe(e);let l=w(1);t&&(r?V(r)&&(l=ie(r)):l=ie(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==z(e))&&t}(i,n,r)?se(i):w(0);let a=(o.left+s.x)/l.x,c=(o.top+s.y)/l.y,u=o.width/l.x,d=o.height/l.y;if(i){const e=z(i),t=r&&V(r)?z(r):r;let n=e,o=ne(n);for(;o&&r&&t!==n;){const e=ie(o),t=o.getBoundingClientRect(),r=Z(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=i,c+=l,n=z(o),o=ne(n)}}return R({width:u,height:d,x:a,y:c})}function ce(e,t){const n=J(e).scrollLeft;return t?t.left+n:ae(B(e)).left+n}function ue(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=z(e),r=B(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const e=Y();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:s,y:a}}(e,n);else if("document"===t)r=function(e){const t=B(e),n=J(e),r=e.ownerDocument.body,o=v(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=v(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ce(e);const s=-n.scrollTop;return"rtl"===Z(r).direction&&(l+=v(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}(B(e));else if(V(t))r=function(e,t){const n=ae(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=W(e)?ie(e):w(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=se(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return R(r)}function de(e,t){const n=Q(e);return!(n===t||!V(n)||K(n))&&("fixed"===Z(n).position||de(n,t))}function pe(e,t,n){const r=W(t),o=B(t),i="fixed"===n,l=ae(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=w(0);if(r||!r&&!i)if(("body"!==F(t)||U(o))&&(s=J(t)),r){const e=ae(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=ce(o));let c=0,u=0;if(o&&!r&&!i){const e=o.getBoundingClientRect();u=e.top+s.scrollTop,c=e.left+s.scrollLeft-ce(o,e)}return{x:l.left+s.scrollLeft-a.x-c,y:l.top+s.scrollTop-a.y-u,width:l.width,height:l.height}}function fe(e){return"static"===Z(e).position}function he(e,t){if(!W(e)||"fixed"===Z(e).position)return null;if(t)return t(e);let n=e.offsetParent;return B(e)===n&&(n=n.ownerDocument.body),n}function me(e,t){const n=z(e);if(X(e))return n;if(!W(e)){let t=Q(e);for(;t&&!K(t);){if(V(t)&&!fe(t))return t;t=Q(t)}return n}let r=he(e,t);for(;r&&$(r)&&fe(r);)r=he(r,t);return r&&K(r)&&fe(r)&&!G(r)?n:r||function(e){let t=Q(e);for(;W(t)&&!K(t);){if(G(t))return t;if(X(t))return null;t=Q(t)}return null}(e)||n}const ge={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=B(r),s=!!t&&X(t.floating);if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},c=w(1);const u=w(0),d=W(r);if((d||!d&&!i)&&(("body"!==F(r)||U(l))&&(a=J(r)),W(r))){const e=ae(r);c=ie(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:B,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?X(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=te(e,[],!1).filter((e=>V(e)&&"body"!==F(e))),o=null;const i="fixed"===Z(e).position;let l=i?Q(e):e;for(;V(l)&&!K(l);){const t=Z(l),n=G(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||U(l)&&!n&&de(e,l))?r=r.filter((e=>e!==l)):o=t,l=Q(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],s=i.reduce(((e,n)=>{const r=ue(t,n,o);return e.top=v(r.top,e.top),e.right=g(r.right,e.right),e.bottom=g(r.bottom,e.bottom),e.left=v(r.left,e.left),e}),ue(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:me,getElementRects:async function(e){const t=this.getOffsetParent||me,n=this.getDimensions,r=await n(e.floating);return{reference:pe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=re(e);return{width:t,height:n}},getScale:ie,isElement:V,isRTL:function(e){return"rtl"===Z(e).direction}};const ve=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:s}=t,a=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=T(n),s=k(n),a="y"===O(n),c=["left","top"].includes(l)?-1:1,u=i&&a?-1:1,d=S(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),a?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},ye=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=S(e,t),c={x:n,y:r},u=await I(t,a),d=O(T(o)),p=A(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=E(f+u["y"===p?"top":"left"],f,f-u[e])}if(l){const e="y"===d?"bottom":"right";h=E(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[d]:l}}}}}},be=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=S(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=T(o),y=O(s),b=T(s)===s,w=await(null==a.isRTL?void 0:a.isRTL(c.floating)),x=p||(b||!m?[N(s)]:function(e){const t=N(e);return[L(e),t,L(t)]}(s)),_="none"!==h;!p&&_&&x.push(...function(e,t,n,r){const o=k(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(T(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(L)))),i}(s,m,h,w));const E=[s,...x],A=await I(t,g),P=[];let R=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&P.push(A[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=k(e),o=j(e),i=C(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=N(l)),[l,N(l)]}(o,l,w);P.push(A[e[0]],A[e[1]])}if(R=[...R,{placement:o,overflows:P}],!P.every((e=>e<=0))){var D,M;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:R},reset:{placement:t}};let n=null==(M=R.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(f){case"bestFit":{var F;const e=null==(F=R.filter((e=>{if(_){const t=O(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:F[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},we=(e,t,n)=>{const r=new Map,o={platform:ge,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=D(c,r,a),p=r,f={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=l;return n?(a.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{x:t,y:n,placement:r,rects:o,platform:i,elements:l,middlewareData:s}=e,{element:a,padding:u=0}=S(c,e)||{};if(null==a)return{};const d=P(u),p={x:t,y:n},f=j(r),h=C(f),m=await i.getDimensions(a),v="y"===f,y=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[f]-p[f]-o.floating[h],_=p[f]-o.reference[f],T=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a));let A=T?T[w]:0;A&&await(null==i.isElement?void 0:i.isElement(T))||(A=l.floating[w]||o.floating[h]);const O=x/2-_/2,L=A/2-m[h]/2-1,N=g(d[y],L),R=g(d[b],L),D=N,I=A-m[h]-R,M=A/2-m[h]/2+O,F=E(D,M,I),z=!s.arrow&&null!=k(r)&&M!==F&&o.reference[h]/2-(M{var o,i;const l={left:`${e}px`,top:`${t}px`,border:s},{x:a,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=s&&{borderBottom:s,borderRight:s};let p=0;if(s){const e=`${s}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:n}}))):we(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var c},Te=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ke=(e,t,n)=>{let r=null;const o=function(...o){const i=()=>{r=null,n||e.apply(this,o)};n&&!r&&(e.apply(this,o),r=setTimeout(i,t)),n||(r&&clearTimeout(r),r=setTimeout(i,t))};return o.cancel=()=>{r&&(clearTimeout(r),r=null)},o},Ae=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,Ce=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>Ce(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!Ae(e)||!Ae(t))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>Ce(e[n],t[n])))},Oe=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const n=t.getPropertyValue(e);return"auto"===n||"scroll"===n}))},je=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(Oe(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Le="undefined"!=typeof window?m.useLayoutEffect:m.useEffect,Ne=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Pe={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Re=(0,m.createContext)({getTooltipData:()=>Pe});function De(e="DEFAULT_TOOLTIP_ID"){return(0,m.useContext)(Re).getTooltipData(e)}var Ie={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},Me={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const Fe=({forwardRef:e,id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,anchorSelect:l,place:s="top",offset:a=10,events:c=["hover"],openOnClick:u=!1,positionStrategy:d="absolute",middlewares:p,wrapper:f,delayShow:h=0,delayHide:y=0,float:w=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:C,globalCloseEvents:O,imperativeModeOnly:j,style:L,position:N,afterShow:P,afterHide:R,disableTooltip:D,content:I,contentWrapperRef:M,isOpen:F,defaultIsOpen:z=!1,setIsOpen:H,activeAnchor:V,setActiveAnchor:W,border:q,opacity:U,arrowColor:$,role:X="tooltip"})=>{var G;const Y=(0,m.useRef)(null),K=(0,m.useRef)(null),Z=(0,m.useRef)(null),J=(0,m.useRef)(null),Q=(0,m.useRef)(null),[ee,ne]=(0,m.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:s}),[re,ie]=(0,m.useState)(!1),[le,se]=(0,m.useState)(!1),[ce,ue]=(0,m.useState)(null),de=(0,m.useRef)(!1),pe=(0,m.useRef)(null),{anchorRefs:fe,setActiveAnchor:he}=De(t),me=(0,m.useRef)(!1),[ge,ve]=(0,m.useState)([]),ye=(0,m.useRef)(!1),be=u||c.includes("click"),we=be||(null==A?void 0:A.click)||(null==A?void 0:A.dblclick)||(null==A?void 0:A.mousedown),_e=A?{...A}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!A&&be&&Object.assign(_e,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Ee=C?{...C}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!C&&be&&Object.assign(Ee,{mouseleave:!1,blur:!1,mouseout:!1});const Te=O?{...O}:{escape:S||!1,scroll:T||!1,resize:k||!1,clickOutsideAnchor:we||!1};j&&(Object.assign(_e,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Ee,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Te,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Le((()=>(ye.current=!0,()=>{ye.current=!1})),[]);const Ae=e=>{ye.current&&(e&&se(!0),setTimeout((()=>{ye.current&&(null==H||H(e),void 0===F&&ie(e))}),10))};(0,m.useEffect)((()=>{if(void 0===F)return()=>null;F&&se(!0);const e=setTimeout((()=>{ie(F)}),10);return()=>{clearTimeout(e)}}),[F]),(0,m.useEffect)((()=>{if(re!==de.current)if(Ne(Q),de.current=re,re)null==P||P();else{const e=(()=>{const e=getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay").match(/^([\d.]+)(ms|s)$/);if(!e)return 0;const[,t,n]=e;return Number(t)*("ms"===n?1:1e3)})();Q.current=setTimeout((()=>{se(!1),ue(null),null==R||R()}),e+25)}}),[re]);const Oe=e=>{ne((t=>Ce(t,e)?t:e))},Pe=(e=h)=>{Ne(Z),le?Ae(!0):Z.current=setTimeout((()=>{Ae(!0)}),e)},Re=(e=y)=>{Ne(J),J.current=setTimeout((()=>{me.current||Ae(!1)}),e)},Fe=e=>{var t;if(!e)return;const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==n?void 0:n.isConnected))return W(null),void he({current:null});h?Pe():Ae(!0),W(n),he({current:n}),Ne(J)},ze=()=>{E?Re(y||100):y?Re():Ae(!1),Ne(Z)},Be=({x:e,y:t})=>{var n;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};Se({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:s,offset:a,elementReference:r,tooltipReference:Y.current,tooltipArrowReference:K.current,strategy:d,middlewares:p,border:q}).then((e=>{Oe(e)}))},He=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Be(n),pe.current=n},Ve=e=>{var t;if(!re)return;const n=e.target;n.isConnected&&((null===(t=Y.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...ge].some((e=>null==e?void 0:e.contains(n)))||(Ae(!1),Ne(Z)))},We=ke(Fe,50,!0),qe=ke(ze,50,!0),Ue=e=>{qe.cancel(),We(e)},$e=()=>{We.cancel(),qe()},Xe=(0,m.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:N;n?Be(n):w?pe.current&&Be(pe.current):(null==V?void 0:V.isConnected)&&Se({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:s,offset:a,elementReference:V,tooltipReference:Y.current,tooltipArrowReference:K.current,strategy:d,middlewares:p,border:q}).then((e=>{ye.current&&Oe(e)}))}),[re,V,I,L,s,null==ce?void 0:ce.place,a,d,N,null==ce?void 0:ce.position,w]);(0,m.useEffect)((()=>{var e,t;const n=new Set(fe);ge.forEach((e=>{(null==D?void 0:D(e))||n.add({current:e})}));const r=document.querySelector(`[id='${i}']`);r&&!(null==D?void 0:D(r))&&n.add({current:r});const o=()=>{Ae(!1)},l=je(V),s=je(Y.current);Te.scroll&&(window.addEventListener("scroll",o),null==l||l.addEventListener("scroll",o),null==s||s.addEventListener("scroll",o));let a=null;Te.resize?window.addEventListener("resize",o):V&&Y.current&&(a=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:a=!1}=r,c=oe(e),u=o||i?[...c?te(c):[],...te(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=B(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-b(u)+"px "+-b(o.clientWidth-(c+d))+"px "+-b(o.clientHeight-(u+p))+"px "+-b(c)+"px",threshold:v(0,g(1,a))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==a){if(!h)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;l&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!a&&h.observe(c),h.observe(t));let m=a?ae(e):null;return a&&function t(){const r=ae(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,a&&cancelAnimationFrame(p)}}(V,Y.current,Xe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const c=e=>{"Escape"===e.key&&Ae(!1)};Te.escape&&window.addEventListener("keydown",c),Te.clickOutsideAnchor&&window.addEventListener("click",Ve);const u=[],d=e=>{re&&(null==e?void 0:e.target)===V||Fe(e)},p=e=>{re&&(null==e?void 0:e.target)===V&&ze()},f=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],h=["click","dblclick","mousedown","mouseup"];Object.entries(_e).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:Ue}):h.includes(e)&&u.push({event:e,listener:d}))})),Object.entries(Ee).forEach((([e,t])=>{t&&(f.includes(e)?u.push({event:e,listener:$e}):h.includes(e)&&u.push({event:e,listener:p}))})),w&&u.push({event:"pointermove",listener:He});const m=()=>{me.current=!0},y=()=>{me.current=!1,ze()};return E&&!we&&(null===(e=Y.current)||void 0===e||e.addEventListener("mouseenter",m),null===(t=Y.current)||void 0===t||t.addEventListener("mouseleave",y)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;Te.scroll&&(window.removeEventListener("scroll",o),null==l||l.removeEventListener("scroll",o),null==s||s.removeEventListener("scroll",o)),Te.resize?window.removeEventListener("resize",o):null==a||a(),Te.clickOutsideAnchor&&window.removeEventListener("click",Ve),Te.escape&&window.removeEventListener("keydown",c),E&&!we&&(null===(e=Y.current)||void 0===e||e.removeEventListener("mouseenter",m),null===(t=Y.current)||void 0===t||t.removeEventListener("mouseleave",y)),u.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[V,Xe,le,fe,ge,A,C,O,be,h,y]),(0,m.useEffect)((()=>{var e,n;let r=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const o=new MutationObserver((e=>{const n=[],o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName&&(e.target.getAttribute("data-tooltip-id")===t?n.push(e.target):e.oldValue===t&&o.push(e.target)),"childList"===e.type){if(V){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(r)try{o.push(...t.filter((e=>e.matches(r)))),o.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,V))&&(se(!1),Ae(!1),W(null),Ne(Z),Ne(J),!0)}))}if(r)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(r)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(r)])))}catch(e){}}})),(n.length||o.length)&&ve((e=>[...e.filter((e=>!o.includes(e))),...n]))}));return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{o.disconnect()}}),[t,l,null==ce?void 0:ce.anchorSelect,V]),(0,m.useEffect)((()=>{Xe()}),[Xe]),(0,m.useEffect)((()=>{if(!(null==M?void 0:M.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Xe()))}));return e.observe(M.current),()=>{e.disconnect()}}),[I,null==M?void 0:M.current]),(0,m.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...ge,t];V&&n.includes(V)||W(null!==(e=ge[0])&&void 0!==e?e:t)}),[i,ge,V]),(0,m.useEffect)((()=>(z&&Ae(!0),()=>{Ne(Z),Ne(J)})),[]),(0,m.useEffect)((()=>{var e;let n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:l;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));ve(e)}catch(e){ve([])}}),[t,l,null==ce?void 0:ce.anchorSelect]),(0,m.useEffect)((()=>{Z.current&&(Ne(Z),Pe(h))}),[h]);const Ge=null!==(G=null==ce?void 0:ce.content)&&void 0!==G?G:I,Ye=re&&Object.keys(ee.tooltipStyles).length>0;return(0,m.useImperativeHandle)(e,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}ue(null!=e?e:null),(null==e?void 0:e.delay)?Pe(e.delay):Ae(!0)},close:e=>{(null==e?void 0:e.delay)?Re(e.delay):Ae(!1)},activeAnchor:V,place:ee.place,isOpen:Boolean(le&&!x&&Ge&&Ye)}))),le&&!x&&Ge?m.createElement(f,{id:t,role:X,className:xe("react-tooltip",Ie.tooltip,Me.tooltip,Me[o],n,`react-tooltip__place-${ee.place}`,Ie[Ye?"show":"closing"],Ye?"react-tooltip__show":"react-tooltip__closing","fixed"===d&&Ie.fixed,E&&Ie.clickable),onTransitionEnd:e=>{Ne(Q),re||"opacity"!==e.propertyName||(se(!1),ue(null),null==R||R())},style:{...L,...ee.tooltipStyles,opacity:void 0!==U&&Ye?U:void 0},ref:Y},Ge,m.createElement(f,{className:xe("react-tooltip-arrow",Ie.arrow,Me.arrow,r,_&&Ie.noArrow),style:{...ee.tooltipArrowStyles,background:$?`linear-gradient(to right bottom, transparent 50%, ${$} 50%)`:void 0},ref:K})):null},ze=({content:e})=>m.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),Be=m.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:r,html:o,render:i,className:l,classNameArrow:s,variant:a="dark",place:c="top",offset:u=10,wrapper:d="div",children:p=null,events:f=["hover"],openOnClick:h=!1,positionStrategy:g="absolute",middlewares:v,delayShow:y=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:_=!1,clickable:E=!1,closeOnEsc:S=!1,closeOnScroll:T=!1,closeOnResize:k=!1,openEvents:A,closeEvents:C,globalCloseEvents:O,imperativeModeOnly:j=!1,style:L,position:N,isOpen:P,defaultIsOpen:R=!1,disableStyleInjection:D=!1,border:I,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,disableTooltip:V,role:W="tooltip"},q)=>{const[U,$]=(0,m.useState)(r),[X,G]=(0,m.useState)(o),[Y,K]=(0,m.useState)(c),[Z,J]=(0,m.useState)(a),[Q,ee]=(0,m.useState)(u),[te,ne]=(0,m.useState)(y),[re,oe]=(0,m.useState)(b),[ie,le]=(0,m.useState)(w),[se,ae]=(0,m.useState)(x),[ce,ue]=(0,m.useState)(d),[de,pe]=(0,m.useState)(f),[fe,he]=(0,m.useState)(g),[me,ge]=(0,m.useState)(null),[ve,ye]=(0,m.useState)(null),be=(0,m.useRef)(D),{anchorRefs:we,activeAnchor:_e}=De(e),Ee=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null),t}),{}),Se=e=>{const t={place:e=>{var t;K(null!==(t=e)&&void 0!==t?t:c)},content:e=>{$(null!=e?e:r)},html:e=>{G(null!=e?e:o)},variant:e=>{var t;J(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{ee(null===e?u:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:d)},events:e=>{const t=null==e?void 0:e.split(" ");pe(null!=t?t:f)},"position-strategy":e=>{var t;he(null!==(t=e)&&void 0!==t?t:g)},"delay-show":e=>{ne(null===e?y:Number(e))},"delay-hide":e=>{oe(null===e?b:Number(e))},float:e=>{le(null===e?w:"true"===e)},hidden:e=>{ae(null===e?x:"true"===e)},"class-name":e=>{ge(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};(0,m.useEffect)((()=>{$(r)}),[r]),(0,m.useEffect)((()=>{G(o)}),[o]),(0,m.useEffect)((()=>{K(c)}),[c]),(0,m.useEffect)((()=>{J(a)}),[a]),(0,m.useEffect)((()=>{ee(u)}),[u]),(0,m.useEffect)((()=>{ne(y)}),[y]),(0,m.useEffect)((()=>{oe(b)}),[b]),(0,m.useEffect)((()=>{le(w)}),[w]),(0,m.useEffect)((()=>{ae(x)}),[x]),(0,m.useEffect)((()=>{he(g)}),[g]),(0,m.useEffect)((()=>{be.current!==D&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[D]),(0,m.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===D,disableBase:D}}))}),[]),(0,m.useEffect)((()=>{var r;const o=new Set(we);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(r){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const s=null!==(r=null!=ve?ve:l)&&void 0!==r?r:_e.current,a=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Ee(s);Se(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(s){const e=Ee(s);Se(e),a.observe(s,c)}return()=>{a.disconnect()}}),[we,_e,ve,t,n]),(0,m.useEffect)((()=>{(null==L?void 0:L.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),I&&!Te("border",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`border\`.`),(null==L?void 0:L.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),M&&!Te("opacity",`${M}`)&&console.warn(`[react-tooltip] "${M}" is not a valid \`opacity\`.`)}),[]);let ke=p;const Ae=(0,m.useRef)(null);if(i){const e=i({content:(null==ve?void 0:ve.getAttribute("data-tooltip-content"))||U||null,activeAnchor:ve});ke=e?m.createElement("div",{ref:Ae,className:"react-tooltip-content-wrapper"},e):null}else U&&(ke=U);X&&(ke=m.createElement(ze,{content:X}));const Ce={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:xe(l,me),classNameArrow:s,content:ke,contentWrapperRef:Ae,place:Y,variant:Z,offset:Q,wrapper:ce,events:de,openOnClick:h,positionStrategy:fe,middlewares:v,delayShow:te,delayHide:re,float:ie,hidden:se,noArrow:_,clickable:E,closeOnEsc:S,closeOnScroll:T,closeOnResize:k,openEvents:A,closeEvents:C,globalCloseEvents:O,imperativeModeOnly:j,style:L,position:N,isOpen:P,defaultIsOpen:R,border:I,opacity:M,arrowColor:F,setIsOpen:z,afterShow:B,afterHide:H,disableTooltip:V,activeAnchor:ve,setActiveAnchor:e=>ye(e),role:W};return m.createElement(Fe,{...Ce})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||Ee({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||Ee({css:"\n.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",type:"base"})}));const He=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t));const o=new CustomEvent(e,{detail:r});dispatchEvent(o)}},Ve=(e,t="")=>{for(const[n,r]of Object.entries(e)){let e=n;t&&(e+="_"+String(t)),addEventListener(e,(e=>{r(e.detail)}),!1)}},We=({onlineEventLinkDefault:e=""})=>{const t=(0,o.__)("Online event","gatherpress"),[n,r]=(0,a.useState)(e);return Ve({setOnlineEventLink:r},p("eventDetails.postId")),(0,c.jsxs)(l.Flex,{justify:"normal",gap:"3",children:[(0,c.jsx)(l.FlexItem,{display:"flex",children:(0,c.jsx)(l.Icon,{icon:"video-alt2"})}),(0,c.jsxs)(l.FlexItem,{children:[!n&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{tabIndex:"0",className:"gatherpress-tooltip","data-tooltip-id":"gatherpress-online-event-tooltip","data-tooltip-content":(0,o.__)("Link available for attendees only.","gatherpress"),children:t}),(0,c.jsx)(Be,{id:"gatherpress-online-event-tooltip"})]}),n&&(0,c.jsx)("a",{href:n,rel:"noreferrer",target:"_blank",children:t})]})]})};var qe=n(442);const Ue=qe.default||qe,$e=({name:e,fullAddress:t,phoneNumber:n,website:r})=>(0,c.jsxs)(c.Fragment,{children:[(e||t)&&(0,c.jsxs)(l.Flex,{justify:"normal",align:"flex-start",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"location"})}),(0,c.jsxs)(l.FlexItem,{children:[e&&(0,c.jsx)("div",{className:"gatherpress-venue__name",children:(0,c.jsx)("strong",{children:Ue(e)})}),t&&(0,c.jsx)("div",{className:"gatherpress-venue__full-address",children:Ue(t)})]})]}),(n||r)&&(0,c.jsxs)(l.Flex,{justify:"normal",gap:"8",children:[n&&(0,c.jsx)(l.FlexItem,{children:(0,c.jsxs)(l.Flex,{justify:"normal",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"phone"})}),(0,c.jsx)(l.FlexItem,{children:(0,c.jsx)("div",{className:"gatherpress-venue__phone-number",children:n})})]})}),r&&(0,c.jsx)(l.FlexItem,{children:(0,c.jsxs)(l.Flex,{justify:"normal",gap:"4",children:[(0,c.jsx)(l.FlexItem,{display:"flex",className:"gatherpress-venue__icon",children:(0,c.jsx)(l.Icon,{icon:"admin-site-alt3"})}),(0,c.jsx)(l.FlexItem,{children:(0,c.jsx)("div",{className:"gatherpress-venue__website",children:(0,c.jsx)("a",{href:r,target:"_blank",rel:"noreferrer noopener",children:r})})})]})})]})]}),Xe=({name:e="",fullAddress:t,phoneNumber:n,website:r,isOnlineEventTerm:o=!1,onlineEventLink:i=""})=>(0,c.jsxs)(c.Fragment,{children:[!o&&(0,c.jsx)($e,{name:e,fullAddress:t,phoneNumber:n,website:r}),o&&(0,c.jsx)(We,{onlineEventLinkDefault:i})]}),Ge=e=>{const{isSelected:t}=e,n=t?"none":"block";return(0,c.jsxs)("div",{style:{position:"relative"},children:[e.children,(0,c.jsx)("div",{style:{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:n}})]})};function Ye(){return"gatherpress_venue"===(0,s.select)("core/editor")?.getCurrentPostType()}const Ke=()=>{const[e,t]=(0,a.useState)(""),[n,r]=(0,a.useState)(""),[i,u]=(0,a.useState)(""),[d,p]=(0,a.useState)(""),[f,h]=(0,a.useState)(!1),[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),x=(0,s.useDispatch)("core/editor").editPost,{unlockPostSaving:_}=(0,s.useDispatch)("core/editor"),E=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),S=(0,s.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",E))),T=S?.slug.replace(/^_/,""),[k,A]=(0,a.useState)(""),C=E+":"+k,O=(0,s.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:k}))),{updateVenueLatitude:j,updateVenueLongitude:L}=(0,s.useDispatch)("gatherpress/venue");(0,a.useEffect)((()=>{var e,n,i,l,s,a;let c={};if(k&&Array.isArray(O)){var d;const e=null!==(d=O[0]?.meta?.gatherpress_venue_information)&&void 0!==d?d:"{}";var f;e&&(c=JSON.parse(e),c.name=null!==(f=O[0]?.title.rendered)&&void 0!==f?f:"")}const h=null!==(e=c?.name)&&void 0!==e?e:(0,o.__)("No venue selected.","gatherpress"),m=null!==(n=c?.fullAddress)&&void 0!==n?n:"",g=null!==(i=c?.phoneNumber)&&void 0!==i?i:"",v=null!==(l=c?.website)&&void 0!==l?l:"",y=null!==(s=c?.latitude)&&void 0!==s?s:"0",b=null!==(a=c?.longitude)&&void 0!==a?a:"0";T&&A(T),w(C?String(C):""),t(h),r(m),u(g),p(v),j(y),L(b),He({setName:h,setFullAddress:m,setPhoneNumber:g,setWebsite:v,setLatitude:y,setLongitude:b,setIsOnlineEventTerm:"online-event"===k})}),[k,O,T,C,j,L]);let N=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_venue",{per_page:-1,context:"view"})),[]);return N?(N=N.map((e=>({label:e.name,value:e.id+":"+e.slug.replace(/^_/,"")}))),N.unshift({value:":",label:(0,o.__)("Choose a venue","gatherpress")})):N=[],(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.SelectControl,{label:(0,o.__)("Venue Selector","gatherpress"),value:b,onChange:e=>{(e=>{w(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];x({_gatherpress_venue:t}),A(e[1]),_()})(e)},options:N})})},Ze=window.wp.compose,Je=()=>{var e,t,n;const r=(0,s.useDispatch)("core/editor").editPost,i=e=>{const t=JSON.stringify({...f,...e});r({meta:{gatherpress_venue_information:t}})},{updateVenueLatitude:u,updateVenueLongitude:d}=(0,s.useDispatch)("gatherpress/venue"),{mapCustomLatLong:p}=(0,s.useSelect)((e=>({mapCustomLatLong:e("gatherpress/venue").getMapCustomLatLong()})),[]);let f=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));f=f?JSON.parse(f):{};const[h,m]=(0,a.useState)(null!==(e=f.fullAddress)&&void 0!==e?e:""),[g,v]=(0,a.useState)(null!==(t=f.phoneNumber)&&void 0!==t?t:""),[y,b]=(0,a.useState)(null!==(n=f.website)&&void 0!==n?n:"");Ve({setFullAddress:m,setPhoneNumber:v,setWebsite:b});const w=(0,a.useRef)(i),x=(0,a.useCallback)((()=>{let e=null,t=null;fetch(`https://nominatim.openstreetmap.org/search?q=${h}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,o.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ +(0,o.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((n=>{n.features.length>0&&(e=n.features[0].geometry.coordinates[1],t=n.features[0].geometry.coordinates[0]),p||(u(e),d(t),w.current({latitude:e,longitude:t}))}))}),[h,p,u,d]),_=(0,Ze.useDebounce)(x,300);return(0,a.useEffect)((()=>{w.current=i}),[i]),(0,a.useEffect)((()=>{_()}),[h,_]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.TextControl,{label:(0,o.__)("Full Address","gatherpress"),value:h,onChange:e=>{He({setFullAddress:e}),i({fullAddress:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Phone Number","gatherpress"),value:g,onChange:e=>{He({setPhoneNumber:e}),i({phoneNumber:e})}}),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Website","gatherpress"),value:y,type:"url",onChange:e=>{He({setWebsite:e}),i({website:e})}})]})},Qe=()=>(0,c.jsx)("section",{children:(0,c.jsx)(Je,{})}),et=()=>{const{editPost:e,unlockPostSaving:t}=(0,s.useDispatch)("core/editor"),n=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[r,i]=(0,a.useState)(n);return Ve({setOnlineEventLink:i},p("eventDetails.postId")),(0,c.jsx)(l.TextControl,{label:(0,o.__)("Online event link","gatherpress"),value:r,placeholder:(0,o.__)("Add link to online event","gatherpress"),onChange:n=>{(n=>{e({meta:{gatherpress_online_event_link:n}}),i(n),He({setOnlineEventLink:n},p("eventDetails.postId")),t()})(n)}})},tt=window.moment;var nt=n.n(tt);window.wp.date;const rt="YYYY-MM-DD HH:mm:ss",ot=nt().tz(it()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(rt);function it(e=p("eventDetails.dateTime.timezone")){return nt().tz.zone(e)?e:(0,o.__)("GMT","gatherpress")}nt().tz(ot,it()).add(2,"hours").format(rt),(0,o.__)("1 hour","gatherpress"),(0,o.__)("1.5 hours","gatherpress"),(0,o.__)("2 hours","gatherpress"),(0,o.__)("3 hours","gatherpress"),(0,o.__)("Set an end time…","gatherpress");const lt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"gatherpress/venue","version":"1.1.0","title":"Venue","category":"gatherpress","icon":"location","example":{},"description":"Provides information about an event venue.","attributes":{"mapShow":{"type":"boolean","default":true},"mapAlign":{"type":"string","default":""},"mapZoomLevel":{"type":"number","default":10},"mapType":{"type":"string","default":"m"},"mapHeight":{"type":"number","default":300},"mapCustomLatLong":{"type":"boolean","default":false}},"supports":{"align":["wide"],"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./venue.js","viewStyle":"file:./venue.css","render":"file:./render.php"}');(0,r.registerBlockType)(lt,{edit:({attributes:e,setAttributes:t,isSelected:n})=>{const{mapZoomLevel:r,mapType:u,mapHeight:f}=e,[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),[x,_]=(0,a.useState)(""),[E,S]=(0,a.useState)(""),[T,k]=(0,a.useState)(!1),A=(0,i.useBlockProps)(),C=p("settings.mapPlatform"),{latitude:O}=(0,s.useSelect)((e=>({latitude:e("gatherpress/venue").getVenueLatitude()})),[]),{longitude:j}=(0,s.useSelect)((e=>({longitude:e("gatherpress/venue").getVenueLongitude()})),[]),{updateVenueLatitude:L,updateVenueLongitude:N,updateMapCustomLatLong:P}=(0,s.useDispatch)("gatherpress/venue"),R=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_online_event_link));let{mapShow:D,mapCustomLatLong:I}=e;(0,a.useEffect)((()=>{P(I)}),[I,P]);const M=(0,s.useDispatch)("core/editor").editPost,F=e=>{const t=JSON.stringify({...z,...e});M({meta:{gatherpress_venue_information:t}})};let z=(0,s.useSelect)((e=>e("core/editor")?.getEditedPostAttribute("meta")?.gatherpress_venue_information));return z=z?JSON.parse(z):{},D&&v&&(D=!0),D&&!d()&&(D=!0),Ve({setName:g,setFullAddress:y,setPhoneNumber:w,setWebsite:S,setIsOnlineEventTerm:k}),(0,a.useEffect)((()=>{Ye()&&(y(z.fullAddress),w(z.phoneNumber),S(z.website),L(z.latitude),N(z.longitude),g(v||b||E?"":(0,o.__)("Add venue information.","gatherpress"))),"gatherpress_event"!==(0,s.select)("core/editor")?.getCurrentPostType()&&d()||g(v||b||E?"":(0,o.__)("No venue selected.","gatherpress"))}),[z.fullAddress,z.phoneNumber,z.website,z.latitude,z.longitude,v,b,E,O,j,N,L]),(0,a.useEffect)((()=>{const e=new Event("resize");window.dispatchEvent(e)}),[f]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(i.InspectorControls,{children:[d()&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Venue settings","gatherpress"),initialOpen:!0,children:[(0,c.jsxs)(l.PanelRow,{children:[!Ye()&&(0,c.jsx)(Ke,{}),Ye()&&(0,c.jsx)(Qe,{})]}),T&&(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(et,{})})]}),!T&&(0,c.jsxs)(l.PanelBody,{title:(0,o.__)("Map settings","gatherpress"),initialOpen:!0,children:[(0,c.jsx)(l.PanelRow,{children:(0,o.__)("Show map on venue","gatherpress")}),(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.ToggleControl,{label:D?(0,o.__)("Display the map","gatherpress"):(0,o.__)("Hide the map","gatherpress"),checked:D,onChange:e=>{t({mapShow:e})}})}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Zoom level","gatherpress"),beforeIcon:"search",value:r,onChange:e=>t({mapZoomLevel:e}),min:1,max:22}),"google"===C&&(0,c.jsx)(l.RadioControl,{label:(0,o.__)("Map type","gatherpress"),selected:u,options:[{label:(0,o.__)("Roadmap","gatherpress"),value:"m"},{label:(0,o.__)("Satellite","gatherpress"),value:"k"}],onChange:e=>{t({mapType:e})}}),(0,c.jsx)(l.RangeControl,{label:(0,o.__)("Map height","gatherpress"),beforeIcon:"location",value:f,onChange:e=>t({mapHeight:e}),min:100,max:1e3}),(0,c.jsx)(l.PanelRow,{children:(0,o.__)("Latitude / Longitude","gatherpress")}),Ye()&&(0,c.jsx)(l.PanelRow,{children:(0,c.jsx)(l.ToggleControl,{label:I?(0,o.__)("Use custom values","gatherpress"):(0,o.__)("Use default values","gatherpress"),checked:I,onChange:e=>{t({mapCustomLatLong:e}),P(e)}})}),I&&Ye()&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.__experimentalNumberControl,{label:(0,o.__)("Latitude","gatherpress"),value:O,onChange:e=>{L(e),F({latitude:e})}}),(0,c.jsx)(l.__experimentalNumberControl,{label:(0,o.__)("Longitude","gatherpress"),value:j,onChange:e=>{N(e),F({longitude:e})}})]})]})]}),(0,c.jsx)("div",{...A,children:(0,c.jsx)(Ge,{isSelected:n,children:(0,c.jsxs)("div",{className:"gatherpress-venue",children:[(0,c.jsx)(Xe,{name:m,fullAddress:v,phoneNumber:b,website:E,isOnlineEventTerm:T,onlineEventLink:R}),D&&!T&&(0,c.jsx)(h,{mapCustomLatLong:I,location:v,latitude:O,longitude:j,zoom:r,type:u,height:f})]})})})]})},save:()=>{}})},5413:(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},1141:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),l=n(6957);o(n(6957),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function e(e,t,n){this.dom=[],this.root=new l.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 l.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?i.ElementType.Tag:void 0,r=new l.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new l.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new l.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new l.Text(""),t=new l.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 l.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=a,t.default=a},6957:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(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}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=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=l.ElementType.CDATA,t}return o(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=l.ElementType.Root,t}return o(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,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(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,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(p);function g(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function y(e){return e.type===l.ElementType.Text}function b(e){return e.type===l.ElementType.Comment}function w(e){return e.type===l.ElementType.Directive}function x(e){return e.type===l.ElementType.Root}function _(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(g(e)){var r=t?E(e.children):[],o=new m(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(v(e)){r=t?E(e.children):[];var l=new f(r);r.forEach((function(e){return e.parent=l})),n=l}else if(x(e)){r=t?E(e.children):[];var s=new h(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var a=new d(e.name,e.data);null!=e["x-name"]&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map((function(e){return _(e,!0)})),n=1;n{"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}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),p=d&&d[1]?d[1].toLowerCase():"";switch(p){case n:var h=c(e);return l.test(e)||null===(t=null==(g=h.querySelector(r))?void 0:g.parentNode)||void 0===t||t.removeChild(g),s.test(e)||null===(u=null==(g=h.querySelector(o))?void 0:g.parentNode)||void 0===u||u.removeChild(g),h.querySelectorAll(n);case r:case o:var m=a(e).querySelectorAll(p);return s.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return f?f(e):(g=a(e,o).querySelector(o)).childNodes;var g}};var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,s=//i,a=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;a=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();a=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})},2471:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(l),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(5496)),i=n(7731),l=/<(![a-zA-Z\s]+)>/},7731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var s,a=[],c=0,u=t.length;c{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),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,r.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),f=a(p);if(f){var h=(0,r.getPropertyInfo)(f);switch(i.includes(f)&&l.includes(t)&&!c&&(f=a("default"+p)),n[f]=d,h&&h.type){case r.BOOLEAN:n[f]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[f]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(4210),o=n(4958),i=["checked","value"],l=["input","select","textarea"],s={reset:!0,submit:!0};function a(e){return r.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=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})),r.push(c(v,g,m));continue}}if("text"!==g.type){var y=g,b={};a(y)?((0,l.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,i.default)(y.attribs,y.name));var w=void 0;switch(g.type){case"script":case"style":g.children[0]&&(b.dangerouslySetInnerHTML={__html:g.children[0].data});break;case"tag":"textarea"===g.name&&g.children[0]?b.defaultValue=g.children[0].data:g.children&&g.children.length&&(w=e(g.children,n));break;default:continue}h>1&&(b.key=m),r.push(c(p(g.name,b,w),g,m))}else{var x=!g.data.trim().length;if(x&&g.parent&&!(0,l.canTextBeChildOfNode)(g.parent))continue;if(n.trim&&x)continue;r.push(c(g.data,g,m))}}return 1===r.length?r[0]:r};var o=n(1609),i=r(n(840)),l=n(4958),s={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function a(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var r=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,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||a),t):[]};var o=r(n(2471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var l=r(n(308));t.domToReact=l.default;var s=n(1141);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 a={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var r=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=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!l.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,s)}catch(e){t.style={}}else t.style={}};var o=n(1609),i=r(n(5229)),l=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),s={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.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}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(a,c):c}e.exports=function(e,a){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];a=a||{};var d=1,p=1;function f(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");p=~r?e.length-r: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=a.source}m.prototype.content=e;var g=[];function v(t){var n=new Error(a.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=a.source,n.line=d,n.column=p,n.source=e,!a.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function b(){y(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){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 r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function _(){var e=h(),n=y(o);if(n){if(x(),!y(i))return v("property missing ':'");var r=y(l),a=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(s),a}}return b(),function(){var e,t=[];for(w(t);e=_();)!1!==e&&(t.push(e),w(t));return t}()}},4210:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(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=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,l=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(i,l);o[t]=new r(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(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:a,possibleStandardNames:c}=n(6811),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===a?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 o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811:(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}},5229:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},8917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,a):e.replace(i,a)).replace(r,s))}},1133:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n};var o=r(n(9788))},1609:e=>{"use strict";e.exports=window.React},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{if(!n){var i=1/0;for(u=0;u=o)&&Object.keys(s.O).every((e=>s.O[e](n[a])))?n.splice(a--,1):(l=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);s.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var l=2&r&&e;"object"==typeof l&&!~t.indexOf(l);l=n(l))Object.getOwnPropertyNames(l).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,s.d(o,i),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>e+".js?v="+{272:"994bd196dfd027e187df",481:"de7be60ececa79e28206",567:"88f6f2972bcfeb27e623",980:"ea1eff5ee6fe2438881e"}[e],s.miniCssF=e=>e+".css",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="gatherpress:",s.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var l,a;if(void 0!==n)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(f);var o=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),a&&document.head.appendChild(l)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e+"../../"})(),(()=>{if("undefined"!=typeof document){var e={908:0};s.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{567:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var r=s.miniCssF(e),o=s.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",s.nc&&(i.nonce=s.nc),i.onerror=i.onload=n=>{if(i.onerror=i.onload=null,"load"===n.type)r();else{var l=n&&n.type,s=n&&n.target&&n.target.href||t,a=new Error("Loading CSS chunk "+e+" failed.\n("+l+": "+s+")");a.name="ChunkLoadError",a.code="CSS_CHUNK_LOAD_FAILED",a.type=l,a.request=s,i.parentNode&&i.parentNode.removeChild(i),o(a)}},i.href=t,document.head.appendChild(i)})(e,o,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={908:0,812:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(812!=t){var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=s.p+s.u(t),l=new Error;s.l(i,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,r[1](l)}}),"chunk-"+t,t)}else e[t]=0},s.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,i=n[0],l=n[1],a=n[2],c=0;if(i.some((t=>0!==e[t]))){for(r in l)s.o(l,r)&&(s.m[r]=l[r]);if(a)var u=a(s)}for(t&&t(n);cs(7701)));a=s.O(a)})(); \ No newline at end of file diff --git a/build/panels.asset.php b/build/panels.asset.php index 2062e6c8b..58177aa73 100644 --- a/build/panels.asset.php +++ b/build/panels.asset.php @@ -1 +1 @@ - array('moment', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '57ffe70d2fa312b2a0da'); + array('moment', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'f805b57db54750eb05ac'); diff --git a/build/panels.js b/build/panels.js index d8a6dbf59..41a05231a 100644 --- a/build/panels.js +++ b/build/panels.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.i18n,s=window.wp.domReady;var n=e.n(s);const r=window.wp.data,a=window.wp.components,i=window.wp.plugins,o=window.wp.editor,l=window.moment;var c=e.n(l);const d=window.wp.element;function u(){(0,r.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function m(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function g(e,t){if("object"!=typeof GatherPress)return;const s=e.split("."),n=s.pop();s.reduce(((e,t)=>{var s;return null!==(s=e[t])&&void 0!==s?s:e[t]={}}),GatherPress)[n]=t}const p=window.wp.date,h=window.ReactJSXRuntime,_="YYYY-MM-DD HH:mm:ss",v=c().tz(S()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(_),x=(c().tz(v,S()).add(2,"hours").format(_),[{label:(0,t.__)("1 hour","gatherpress"),value:1},{label:(0,t.__)("1.5 hours","gatherpress"),value:1.5},{label:(0,t.__)("2 hours","gatherpress"),value:2},{label:(0,t.__)("3 hours","gatherpress"),value:3},{label:(0,t.__)("Set an end time…","gatherpress"),value:!1}]);function j(e){return c().tz(function(){let e=m("eventDetails.dateTime.datetime_start");return e=""!==e?c().tz(e,S()).format(_):v,g("eventDetails.dateTime.datetime_start",e),e}(),S()).add(e,"hours").format(_)}function f(){return w(m("settings.dateFormat"))+" "+w(m("settings.timeFormat"))}function S(e=m("eventDetails.dateTime.timezone")){return c().tz.zone(e)?e:(0,t.__)("GMT","gatherpress")}function b(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,s=e.replace(t,"$1");return s!==e?"UTC"+s+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function P(e,t=null,s=null){!function(e,t=null){const s=c().tz(m("eventDetails.dateTime.datetime_end"),S()).valueOf(),n=c().tz(e,S()).valueOf();n>=s&&D(c().tz(n,S()).add(2,"hours").format(_),t)}(e,s),g("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),u()}function D(e,t=null,s=null){!function(e,t=null){const s=c().tz(m("eventDetails.dateTime.datetime_start"),S()).valueOf(),n=c().tz(e,S()).valueOf();n<=s&&P(c().tz(n,S()).subtract(2,"hours").format(_),t)}(e,s),g("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),u()}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,s,n)=>{const r=n[s-1];return e in t&&"\\"!==r?t[e]:e})).join("")}function C(){const e=c().tz(m("eventDetails.dateTime.datetime_end"),S());return"gatherpress_event"===(0,r.select)("core/editor")?.getCurrentPostType()&&c().tz(S()).valueOf()>e.valueOf()}function T(){const e="gatherpress_event_past",s=(0,r.dispatch)("core/notices");s.removeNotice(e),C()&&s.createNotice("warning",(0,t.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const E=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),n=(0,r.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_anonymous_rsvp),[]);n&&(i=m("settings.enableAnonymousRsvp"));const[o,l]=(0,d.useState)(i),c=(0,d.useCallback)((t=>{const n={gatherpress_enable_anonymous_rsvp:Number(t)};l(t),e({meta:n}),s()}),[e,s]);return(0,d.useEffect)((()=>{n&&0!==i&&c(i)}),[n,i,c]),(0,h.jsx)(a.CheckboxControl,{label:(0,t.__)("Enable Anonymous RSVP","gatherpress"),checked:o,onChange:e=>{c(e)}})},y=()=>(0,h.jsx)("section",{children:(0,h.jsx)(E,{})}),N=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),n=(0,r.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_initial_decline),[]);n&&(i=m("settings.enableInitialDecline"));const[o,l]=(0,d.useState)(i),c=(0,d.useCallback)((t=>{const n={gatherpress_enable_initial_decline:Number(t)};l(t),e({meta:n}),s()}),[e,s]);return(0,d.useEffect)((()=>{n&&0!==i&&c(i)}),[n,i,c]),(0,h.jsx)(a.CheckboxControl,{label:(0,t.__)('Enable Immediate "Not Attending" Option for Attendees',"gatherpress"),checked:o,onChange:e=>{c(e)}})},k=()=>(0,h.jsx)("section",{children:(0,h.jsx)(N,{})}),z=()=>{const{dateTimeStart:e,duration:s}=(0,r.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),duration:e("gatherpress/datetime").getDuration()})),[]),{setDateTimeStart:n,setDateTimeEnd:i}=(0,r.useDispatch)("gatherpress/datetime"),o=(0,p.getSettings)(),l=/a(?!\\)/i.test(o.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,d.useEffect)((()=>{n(c().tz(e,S()).format(_)),s&&i(j(s)),T()}),[e,s,n,i]),(0,h.jsx)(a.PanelRow,{children:(0,h.jsxs)(a.Flex,{direction:"column",gap:"1",children:[(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)("h3",{style:{marginBottom:0},children:(0,h.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,t.__)("Date & time start","gatherpress")})})}),(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,h.jsx)(a.Button,{id:"gatherpress-datetime-start",onClick:s,"aria-expanded":t,isLink:!0,children:c().tz(e,S()).format(f())}),renderContent:()=>(0,h.jsx)(a.DateTimePicker,{currentDate:e,onChange:e=>{P(e,n,i)},is12Hour:l})})})]})})},O=()=>{const{dateTimeEnd:e}=(0,r.useSelect)((e=>({dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd()})),[]),{setDateTimeEnd:s,setDateTimeStart:n}=(0,r.useDispatch)("gatherpress/datetime"),i=(0,p.getSettings)(),o=/a(?!\\)/i.test(i.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,d.useEffect)((()=>{s(c().tz(e,S()).format(_)),T()})),(0,h.jsx)(a.PanelRow,{children:(0,h.jsxs)(a.Flex,{direction:"column",gap:"1",children:[(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)("h3",{style:{marginBottom:0},children:(0,h.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,t.__)("Date & time end","gatherpress")})})}),(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,h.jsx)(a.Button,{id:"gatherpress-datetime-end",onClick:s,"aria-expanded":t,isLink:!0,children:c().tz(e,S()).format(f())}),renderContent:()=>(0,h.jsx)(a.DateTimePicker,{currentDate:e,onChange:e=>D(e,s,n),is12Hour:o})})})]})})},A=()=>{const{timezone:e}=(0,r.useSelect)((e=>({timezone:e("gatherpress/datetime").getTimezone()})),[]),{setTimezone:s}=(0,r.useDispatch)("gatherpress/datetime"),n=m("misc.timezoneChoices");return(0,d.useEffect)((()=>{s(m("eventDetails.dateTime.timezone"))}),[s]),(0,h.jsx)(a.PanelRow,{children:(0,h.jsx)(a.SelectControl,{label:(0,t.__)("Time Zone","gatherpress"),value:b(e),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,s=e.replace(t,"$1");if(s!==e){const n=e.replace(t,"$2").padStart(2,"0");let r=e.replace(t,"$3");return""===r&&(r=":00"),r=r.replace(".25",":15").replace(".5",":30").replace(".75",":45"),s+n+r}return e}(e),s(e),u()},__nexthasnomarginbottom:!0,children:Object.keys(n).map((e=>(0,h.jsx)("optgroup",{label:e,children:Object.keys(n[e]).map((t=>(0,h.jsx)("option",{value:t,children:n[e][t]},t)))},e)))})})},F=()=>{const{duration:e}=(0,r.useSelect)((e=>({duration:e("gatherpress/datetime").getDuration()})),[]),s=(0,r.useDispatch)(),{setDateTimeEnd:n,setDuration:i}=s("gatherpress/datetime");return(0,h.jsx)(a.SelectControl,{label:(0,t.__)("Duration","gatherpress"),value:!!x.some((t=>t.value===e))&&e,options:x,onChange:e=>{(e="false"!==e&&parseFloat(e))&&n(j(e)),i(e)},__nexthasnomarginbottom:!0})},L=()=>{const e=(0,r.useDispatch)("core/editor").editPost;let t=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")?.gatherpress_datetime));try{t=t?JSON.parse(t):{}}catch(e){t={}}const{dateTimeStart:s,dateTimeEnd:n,duration:a,timezone:i}=(0,r.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),duration:e("gatherpress/datetime").getDuration(),timezone:e("gatherpress/datetime").getTimezone()})),[]),{setDuration:o}=(0,r.useDispatch)("gatherpress/datetime");return(0,d.useEffect)((()=>{const r=JSON.stringify({...t,dateTimeStart:c().tz(s,i).format(_),dateTimeEnd:c().tz(n,i).format(_),timezone:i});e({meta:{gatherpress_datetime:r}})}),[s,n,i,t,e,o,a]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("section",{children:(0,h.jsx)(z,{})}),(0,h.jsx)("section",{children:a?(0,h.jsx)(F,{}):(0,h.jsx)(O,{})}),(0,h.jsx)("section",{children:(0,h.jsx)(A,{})})]})},M=()=>(0,h.jsx)(L,{}),R=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),n=(0,r.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_guest_limit),[]);n&&(i=m("settings.maxGuestLimit")),!1===i&&(i=0);const[o,l]=(0,d.useState)(i),c=(0,d.useCallback)((t=>{const n={gatherpress_max_guest_limit:Number(t)};l(t),e({meta:n}),s()}),[e,s]);return(0,d.useEffect)((()=>{n&&0!==i&&c(i)}),[n,i,c]),(0,h.jsx)(a.__experimentalNumberControl,{label:(0,t.__)("Maximum Number of Guests","gatherpress"),value:o,min:0,max:5,onChange:e=>{c(e)}})},Y=()=>(0,h.jsx)("section",{children:(0,h.jsx)(R,{})}),I=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),n=(0,r.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_attendance_limit),[]);n&&(i=m("settings.maxAttendanceLimit")),!1===i&&(i=0);const[o,l]=(0,d.useState)(i),c=(0,d.useCallback)((t=>{const n={gatherpress_max_attendance_limit:Number(t)};l(t),e({meta:n}),s()}),[e,s]);return(0,d.useEffect)((()=>{n&&0!==i&&c(i)}),[n,i,c]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(a.__experimentalNumberControl,{label:(0,t.__)("Maximum Attendance Limit","gatherpress"),value:o,min:0,onChange:e=>{c(e)}}),(0,h.jsx)("p",{className:"description",children:(0,t.__)("A value of 0 indicates no limit.","gatherpress")})]})},V=()=>(0,h.jsx)("section",{children:(0,h.jsx)(I,{})}),$=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:n});dispatchEvent(r)}},G=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}},H=()=>"publish"===(0,r.select)("core/editor").getEditedPostAttribute("status")&&!C()&&(0,h.jsxs)("section",{children:[(0,h.jsx)("h3",{style:{marginBottom:"0.5rem"},children:(0,t.__)("Send an event update","gatherpress")}),(0,h.jsx)(a.Button,{variant:"secondary",onClick:()=>$({setOpen:!0}),children:(0,t.__)("Compose Message","gatherpress")})]}),B=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),n=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[i,o]=(0,d.useState)(n);return G({setOnlineEventLink:o},m("eventDetails.postId")),(0,h.jsx)(a.TextControl,{label:(0,t.__)("Online event link","gatherpress"),value:i,placeholder:(0,t.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{gatherpress_online_event_link:t}}),o(t),$({setOnlineEventLink:t},m("eventDetails.postId")),s()})(t)}})},J=()=>(0,h.jsx)("section",{children:(0,h.jsx)(B,{})}),W=()=>{const[e,s]=(0,d.useState)(""),[n,i]=(0,d.useState)(""),[o,l]=(0,d.useState)(""),[c,u]=(0,d.useState)(""),[m,g]=(0,d.useState)(!1),[p,_]=(0,d.useState)(""),[v,x]=(0,d.useState)(""),[j,f]=(0,d.useState)(""),S=(0,r.useDispatch)("core/editor").editPost,{unlockPostSaving:b}=(0,r.useDispatch)("core/editor"),P=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),D=(0,r.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",P))),w=D?.slug.replace(/^_/,""),[C,T]=(0,d.useState)(""),E=P+":"+C,y=(0,r.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:C}))),{updateVenueLatitude:N,updateVenueLongitude:k}=(0,r.useDispatch)("gatherpress/venue");(0,d.useEffect)((()=>{var e,n,r,a,o,c;let d={};if(C&&Array.isArray(y)){var m;const e=null!==(m=y[0]?.meta?.gatherpress_venue_information)&&void 0!==m?m:"{}";var g;e&&(d=JSON.parse(e),d.name=null!==(g=y[0]?.title.rendered)&&void 0!==g?g:"")}const p=null!==(e=d?.name)&&void 0!==e?e:(0,t.__)("No venue selected.","gatherpress"),h=null!==(n=d?.fullAddress)&&void 0!==n?n:"",_=null!==(r=d?.phoneNumber)&&void 0!==r?r:"",v=null!==(a=d?.website)&&void 0!==a?a:"",x=null!==(o=d?.latitude)&&void 0!==o?o:"0",j=null!==(c=d?.longitude)&&void 0!==c?c:"0";w&&T(w),f(E?String(E):""),s(p),i(h),l(_),u(v),N(x),k(j),$({setName:p,setFullAddress:h,setPhoneNumber:_,setWebsite:v,setLatitude:x,setLongitude:j,setIsOnlineEventTerm:"online-event"===C})}),[C,y,w,E,N,k]);let z=(0,r.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_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,t.__)("Choose a venue","gatherpress")})):z=[],(0,h.jsx)(a.PanelRow,{children:(0,h.jsx)(a.SelectControl,{label:(0,t.__)("Venue Selector","gatherpress"),value:j,onChange:e=>{(e=>{f(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];S({_gatherpress_venue:t}),T(e[1]),b()})(e)},options:z})})},U=()=>(0,h.jsx)("section",{children:(0,h.jsx)(W,{})}),{Fill:X,Slot:Z}=(0,a.createSlotFill)("EventPluginDocumentSettings"),q=({children:e,className:t})=>(0,h.jsx)(X,{children:(0,h.jsx)(a.PanelRow,{className:t,children:e})});q.Slot=Z,(0,i.registerPlugin)("gatherpress-event-settings",{render:()=>"gatherpress_event"===(0,r.select)("core/editor")?.getCurrentPostType()&&(0,h.jsxs)(o.PluginDocumentSettingPanel,{name:"gatherpress-event-settings",title:(0,t.__)("Event settings","gatherpress"),className:"gatherpress-event-settings",children:[(0,h.jsx)(q.Slot,{}),(0,h.jsxs)(a.__experimentalVStack,{spacing:4,children:[(0,h.jsx)(M,{}),(0,h.jsx)(U,{}),(0,h.jsx)(J,{}),(0,h.jsx)(Y,{}),(0,h.jsx)(V,{}),(0,h.jsx)(y,{}),(0,h.jsx)(k,{}),(0,h.jsx)(H,{})]})]})}),n()((()=>{const e=(0,r.select)("core/edit-post"),t=(0,r.dispatch)("core/editor");e&&t&&(e.isEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings")||t.toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings"))})),window.wp.compose;const K=()=>{var e,s,n;const i=(0,r.useDispatch)("core/editor").editPost,o=e=>{const t=JSON.stringify({...m,...e});i({meta:{gatherpress_venue_information:t}})},{updateVenueLatitude:l,updateVenueLongitude:c}=(0,r.useDispatch)("gatherpress/venue"),{mapCustomLatLong:u}=(0,r.useSelect)((e=>({mapCustomLatLong:e("gatherpress/venue").getMapCustomLatLong()})),[]);(0,d.useEffect)((()=>{}),[u]);let m=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));m=m?JSON.parse(m):{};const[g,p]=(0,d.useState)(null!==(e=m.fullAddress)&&void 0!==e?e:""),[_,v]=(0,d.useState)(null!==(s=m.phoneNumber)&&void 0!==s?s:""),[x,j]=(0,d.useState)(null!==(n=m.website)&&void 0!==n?n:"");G({setFullAddress:p,setPhoneNumber:v,setWebsite:j});const f=(0,d.useRef)(o),S=(0,d.useCallback)((()=>{let e=null,s=null;fetch(`https://nominatim.openstreetmap.org/search?q=${g}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,t.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ -(0,t.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((t=>{t.features.length>0&&(e=t.features[0].geometry.coordinates[1],s=t.features[0].geometry.coordinates[0]),u||(l(e),c(s),f.current({latitude:e,longitude:s}))}))}),[g,u,f]);return(0,d.useEffect)((()=>{S()}),[S]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(a.TextControl,{label:(0,t.__)("Full Address","gatherpress"),value:g,onChange:e=>{$({setFullAddress:e}),o({fullAddress:e})}}),(0,h.jsx)(a.TextControl,{label:(0,t.__)("Phone Number","gatherpress"),value:_,onChange:e=>{$({setPhoneNumber:e}),o({phoneNumber:e})}}),(0,h.jsx)(a.TextControl,{label:(0,t.__)("Website","gatherpress"),value:x,type:"url",onChange:e=>{$({setWebsite:e}),o({website:e})}})]})},Q=()=>(0,h.jsx)("section",{children:(0,h.jsx)(K,{})}),{Fill:ee,Slot:te}=(0,a.createSlotFill)("VenuePluginDocumentSettings"),se=({children:e,className:t})=>(0,h.jsx)(ee,{children:(0,h.jsx)(a.PanelRow,{className:t,children:e})});se.Slot=te,(0,i.registerPlugin)("gatherpress-venue-settings",{render:()=>"gatherpress_venue"===(0,r.select)("core/editor")?.getCurrentPostType()&&(0,h.jsxs)(o.PluginDocumentSettingPanel,{name:"gatherpress-venue-settings",title:(0,t.__)("Venue settings","gatherpress"),className:"gatherpress-venue-settings",children:[(0,h.jsx)(se.Slot,{}),(0,h.jsx)(a.__experimentalVStack,{spacing:6,children:(0,h.jsx)(Q,{})})]})}),(0,i.registerPlugin)("gatherpress-venue-settings-at-events",{render:function(){return(0,h.jsx)(h.Fragment,{children:(0,h.jsx)(a.Fill,{name:"EventPluginDocumentSettings",children:(0,h.jsx)(se.Slot,{})})})}}),n()((()=>{const e=(0,r.select)("core/edit-post"),t=(0,r.dispatch)("core/editor");e&&t&&(e.isEditorPanelOpened("gatherpress-venue-settings/gatherpress-venue-settings")||t.toggleEditorPanelOpened("gatherpress-venue-settings/gatherpress-venue-settings"))}))})(); \ No newline at end of file +(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.i18n,s=window.wp.domReady;var n=e.n(s);const r=window.wp.data,a=window.wp.components,i=window.wp.plugins,o=window.wp.editor,l=window.moment;var c=e.n(l);const u=window.wp.element;function d(){(0,r.dispatch)("core/editor")?.editPost({meta:{_non_existing_meta:!0}})}function m(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}function g(e,t){if("object"!=typeof GatherPress)return;const s=e.split("."),n=s.pop();s.reduce(((e,t)=>{var s;return null!==(s=e[t])&&void 0!==s?s:e[t]={}}),GatherPress)[n]=t}const p=window.wp.date,h=window.ReactJSXRuntime,_="YYYY-MM-DD HH:mm:ss",v=c().tz(S()).add(1,"day").set("hour",18).set("minute",0).set("second",0).format(_),x=(c().tz(v,S()).add(2,"hours").format(_),[{label:(0,t.__)("1 hour","gatherpress"),value:1},{label:(0,t.__)("1.5 hours","gatherpress"),value:1.5},{label:(0,t.__)("2 hours","gatherpress"),value:2},{label:(0,t.__)("3 hours","gatherpress"),value:3},{label:(0,t.__)("Set an end time…","gatherpress"),value:!1}]);function j(e){return c().tz(function(){let e=m("eventDetails.dateTime.datetime_start");return e=""!==e?c().tz(e,S()).format(_):v,g("eventDetails.dateTime.datetime_start",e),e}(),S()).add(e,"hours").format(_)}function f(){return w(m("settings.dateFormat"))+" "+w(m("settings.timeFormat"))}function S(e=m("eventDetails.dateTime.timezone")){return c().tz.zone(e)?e:(0,t.__)("GMT","gatherpress")}function b(e=""){const t=/^([+-])(\d{2}):(00|15|30|45)$/,s=e.replace(t,"$1");return s!==e?"UTC"+s+parseInt(e.replace(t,"$2")).toString()+e.replace(t,"$3").replace("00","").replace("15",".25").replace("30",".5").replace("45",".75"):e}function D(e,t=null,s=null){!function(e,t=null){const s=c().tz(m("eventDetails.dateTime.datetime_end"),S()).valueOf(),n=c().tz(e,S()).valueOf();n>=s&&P(c().tz(n,S()).add(2,"hours").format(_),t)}(e,s),g("eventDetails.dateTime.datetime_start",e),"function"==typeof t&&t(e),d()}function P(e,t=null,s=null){!function(e,t=null){const s=c().tz(m("eventDetails.dateTime.datetime_start"),S()).valueOf(),n=c().tz(e,S()).valueOf();n<=s&&D(c().tz(n,S()).subtract(2,"hours").format(_),t)}(e,s),g("eventDetails.dateTime.datetime_end",e),null!==t&&t(e),d()}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,s,n)=>{const r=n[s-1];return e in t&&"\\"!==r?t[e]:e})).join("")}function C(){const e=c().tz(m("eventDetails.dateTime.datetime_end"),S());return"gatherpress_event"===(0,r.select)("core/editor")?.getCurrentPostType()&&c().tz(S()).valueOf()>e.valueOf()}function T(){const e="gatherpress_event_past",s=(0,r.dispatch)("core/notices");s.removeNotice(e),C()&&s.createNotice("warning",(0,t.__)("This event has already passed.","gatherpress"),{id:e,isDismissible:!1})}const E=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),n=(0,r.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_anonymous_rsvp),[]);n&&(i=m("settings.enableAnonymousRsvp"));const[o,l]=(0,u.useState)(i),c=(0,u.useCallback)((t=>{const n={gatherpress_enable_anonymous_rsvp:Number(t)};l(t),e({meta:n}),s()}),[e,s]);return(0,u.useEffect)((()=>{n&&0!==i&&c(i)}),[n,i,c]),(0,h.jsx)(a.CheckboxControl,{label:(0,t.__)("Enable Anonymous RSVP","gatherpress"),checked:o,onChange:e=>{c(e)}})},y=()=>(0,h.jsx)("section",{children:(0,h.jsx)(E,{})}),N=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),n=(0,r.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_enable_initial_decline),[]);n&&(i=m("settings.enableInitialDecline"));const[o,l]=(0,u.useState)(i),c=(0,u.useCallback)((t=>{const n={gatherpress_enable_initial_decline:Number(t)};l(t),e({meta:n}),s()}),[e,s]);return(0,u.useEffect)((()=>{n&&0!==i&&c(i)}),[n,i,c]),(0,h.jsx)(a.CheckboxControl,{label:(0,t.__)('Enable Immediate "Not Attending" Option for Attendees',"gatherpress"),checked:o,onChange:e=>{c(e)}})},k=()=>(0,h.jsx)("section",{children:(0,h.jsx)(N,{})}),z=()=>{const{dateTimeStart:e,duration:s}=(0,r.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),duration:e("gatherpress/datetime").getDuration()})),[]),{setDateTimeStart:n,setDateTimeEnd:i}=(0,r.useDispatch)("gatherpress/datetime"),o=(0,p.getSettings)(),l=/a(?!\\)/i.test(o.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,u.useEffect)((()=>{n(c().tz(e,S()).format(_)),s&&i(j(s)),T()}),[e,s,n,i]),(0,h.jsx)(a.PanelRow,{children:(0,h.jsxs)(a.Flex,{direction:"column",gap:"1",children:[(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)("h3",{style:{marginBottom:0},children:(0,h.jsx)("label",{htmlFor:"gatherpress-datetime-start",children:(0,t.__)("Date & time start","gatherpress")})})}),(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,h.jsx)(a.Button,{id:"gatherpress-datetime-start",onClick:s,"aria-expanded":t,isLink:!0,children:c().tz(e,S()).format(f())}),renderContent:()=>(0,h.jsx)(a.DateTimePicker,{currentDate:e,onChange:e=>{D(e,n,i)},is12Hour:l})})})]})})},O=()=>{const{dateTimeEnd:e}=(0,r.useSelect)((e=>({dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd()})),[]),{setDateTimeEnd:s,setDateTimeStart:n}=(0,r.useDispatch)("gatherpress/datetime"),i=(0,p.getSettings)(),o=/a(?!\\)/i.test(i.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,u.useEffect)((()=>{s(c().tz(e,S()).format(_)),T()})),(0,h.jsx)(a.PanelRow,{children:(0,h.jsxs)(a.Flex,{direction:"column",gap:"1",children:[(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)("h3",{style:{marginBottom:0},children:(0,h.jsx)("label",{htmlFor:"gatherpress-datetime-end",children:(0,t.__)("Date & time end","gatherpress")})})}),(0,h.jsx)(a.FlexItem,{children:(0,h.jsx)(a.Dropdown,{popoverProps:{placement:"bottom-end"},renderToggle:({isOpen:t,onToggle:s})=>(0,h.jsx)(a.Button,{id:"gatherpress-datetime-end",onClick:s,"aria-expanded":t,isLink:!0,children:c().tz(e,S()).format(f())}),renderContent:()=>(0,h.jsx)(a.DateTimePicker,{currentDate:e,onChange:e=>P(e,s,n),is12Hour:o})})})]})})},A=()=>{const{timezone:e}=(0,r.useSelect)((e=>({timezone:e("gatherpress/datetime").getTimezone()})),[]),{setTimezone:s}=(0,r.useDispatch)("gatherpress/datetime"),n=m("misc.timezoneChoices");return(0,u.useEffect)((()=>{s(m("eventDetails.dateTime.timezone"))}),[s]),(0,h.jsx)(a.PanelRow,{children:(0,h.jsx)(a.SelectControl,{label:(0,t.__)("Time Zone","gatherpress"),value:b(e),onChange:e=>{e=function(e=""){const t=/^UTC([+-])(\d+)(.\d+)?$/,s=e.replace(t,"$1");if(s!==e){const n=e.replace(t,"$2").padStart(2,"0");let r=e.replace(t,"$3");return""===r&&(r=":00"),r=r.replace(".25",":15").replace(".5",":30").replace(".75",":45"),s+n+r}return e}(e),s(e),d()},__nexthasnomarginbottom:!0,children:Object.keys(n).map((e=>(0,h.jsx)("optgroup",{label:e,children:Object.keys(n[e]).map((t=>(0,h.jsx)("option",{value:t,children:n[e][t]},t)))},e)))})})},F=()=>{const{duration:e}=(0,r.useSelect)((e=>({duration:e("gatherpress/datetime").getDuration()})),[]),s=(0,r.useDispatch)(),{setDateTimeEnd:n,setDuration:i}=s("gatherpress/datetime");return(0,h.jsx)(a.SelectControl,{label:(0,t.__)("Duration","gatherpress"),value:!!x.some((t=>t.value===e))&&e,options:x,onChange:e=>{(e="false"!==e&&parseFloat(e))&&n(j(e)),i(e)},__nexthasnomarginbottom:!0})},L=()=>{const e=(0,r.useDispatch)("core/editor").editPost;let t=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")?.gatherpress_datetime));try{t=t?JSON.parse(t):{}}catch(e){t={}}const{dateTimeStart:s,dateTimeEnd:n,duration:a,timezone:i}=(0,r.useSelect)((e=>({dateTimeStart:e("gatherpress/datetime").getDateTimeStart(),dateTimeEnd:e("gatherpress/datetime").getDateTimeEnd(),duration:e("gatherpress/datetime").getDuration(),timezone:e("gatherpress/datetime").getTimezone()})),[]),{setDuration:o}=(0,r.useDispatch)("gatherpress/datetime");return(0,u.useEffect)((()=>{const r=JSON.stringify({...t,dateTimeStart:c().tz(s,i).format(_),dateTimeEnd:c().tz(n,i).format(_),timezone:i});e({meta:{gatherpress_datetime:r}})}),[s,n,i,t,e,o,a]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("section",{children:(0,h.jsx)(z,{})}),(0,h.jsx)("section",{children:a?(0,h.jsx)(F,{}):(0,h.jsx)(O,{})}),(0,h.jsx)("section",{children:(0,h.jsx)(A,{})})]})},M=()=>(0,h.jsx)(L,{}),R=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),n=(0,r.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_guest_limit),[]);n&&(i=m("settings.maxGuestLimit")),!1===i&&(i=0);const[o,l]=(0,u.useState)(i),c=(0,u.useCallback)((t=>{const n={gatherpress_max_guest_limit:Number(t)};l(t),e({meta:n}),s()}),[e,s]);return(0,u.useEffect)((()=>{n&&0!==i&&c(i)}),[n,i,c]),(0,h.jsx)(a.__experimentalNumberControl,{label:(0,t.__)("Maximum Number of Guests","gatherpress"),value:o,min:0,max:5,onChange:e=>{c(e)}})},Y=()=>(0,h.jsx)("section",{children:(0,h.jsx)(R,{})}),I=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),n=(0,r.useSelect)((e=>e("core/editor").isCleanNewPost()),[]);let i=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_max_attendance_limit),[]);n&&(i=m("settings.maxAttendanceLimit")),!1===i&&(i=0);const[o,l]=(0,u.useState)(i),c=(0,u.useCallback)((t=>{const n={gatherpress_max_attendance_limit:Number(t)};l(t),e({meta:n}),s()}),[e,s]);return(0,u.useEffect)((()=>{n&&0!==i&&c(i)}),[n,i,c]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(a.__experimentalNumberControl,{label:(0,t.__)("Maximum Attendance Limit","gatherpress"),value:o,min:0,onChange:e=>{c(e)}}),(0,h.jsx)("p",{className:"description",children:(0,t.__)("A value of 0 indicates no limit.","gatherpress")})]})},V=()=>(0,h.jsx)("section",{children:(0,h.jsx)(I,{})}),$=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t));const r=new CustomEvent(e,{detail:n});dispatchEvent(r)}},G=(e,t="")=>{for(const[s,n]of Object.entries(e)){let e=s;t&&(e+="_"+String(t)),addEventListener(e,(e=>{n(e.detail)}),!1)}},H=()=>"publish"===(0,r.select)("core/editor").getEditedPostAttribute("status")&&!C()&&(0,h.jsxs)("section",{children:[(0,h.jsx)("h3",{style:{marginBottom:"0.5rem"},children:(0,t.__)("Send an event update","gatherpress")}),(0,h.jsx)(a.Button,{variant:"secondary",onClick:()=>$({setOpen:!0}),children:(0,t.__)("Compose Message","gatherpress")})]}),B=()=>{const{editPost:e,unlockPostSaving:s}=(0,r.useDispatch)("core/editor"),n=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_online_event_link)),[i,o]=(0,u.useState)(n);return G({setOnlineEventLink:o},m("eventDetails.postId")),(0,h.jsx)(a.TextControl,{label:(0,t.__)("Online event link","gatherpress"),value:i,placeholder:(0,t.__)("Add link to online event","gatherpress"),onChange:t=>{(t=>{e({meta:{gatherpress_online_event_link:t}}),o(t),$({setOnlineEventLink:t},m("eventDetails.postId")),s()})(t)}})},J=()=>(0,h.jsx)("section",{children:(0,h.jsx)(B,{})}),W=()=>{const[e,s]=(0,u.useState)(""),[n,i]=(0,u.useState)(""),[o,l]=(0,u.useState)(""),[c,d]=(0,u.useState)(""),[m,g]=(0,u.useState)(!1),[p,_]=(0,u.useState)(""),[v,x]=(0,u.useState)(""),[j,f]=(0,u.useState)(""),S=(0,r.useDispatch)("core/editor").editPost,{unlockPostSaving:b}=(0,r.useDispatch)("core/editor"),D=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("_gatherpress_venue"))),P=(0,r.useSelect)((e=>e("core").getEntityRecord("taxonomy","_gatherpress_venue",D))),w=P?.slug.replace(/^_/,""),[C,T]=(0,u.useState)(""),E=D+":"+C,y=(0,r.useSelect)((e=>e("core").getEntityRecords("postType","gatherpress_venue",{per_page:1,slug:C}))),{updateVenueLatitude:N,updateVenueLongitude:k}=(0,r.useDispatch)("gatherpress/venue");(0,u.useEffect)((()=>{var e,n,r,a,o,c;let u={};if(C&&Array.isArray(y)){var m;const e=null!==(m=y[0]?.meta?.gatherpress_venue_information)&&void 0!==m?m:"{}";var g;e&&(u=JSON.parse(e),u.name=null!==(g=y[0]?.title.rendered)&&void 0!==g?g:"")}const p=null!==(e=u?.name)&&void 0!==e?e:(0,t.__)("No venue selected.","gatherpress"),h=null!==(n=u?.fullAddress)&&void 0!==n?n:"",_=null!==(r=u?.phoneNumber)&&void 0!==r?r:"",v=null!==(a=u?.website)&&void 0!==a?a:"",x=null!==(o=u?.latitude)&&void 0!==o?o:"0",j=null!==(c=u?.longitude)&&void 0!==c?c:"0";w&&T(w),f(E?String(E):""),s(p),i(h),l(_),d(v),N(x),k(j),$({setName:p,setFullAddress:h,setPhoneNumber:_,setWebsite:v,setLatitude:x,setLongitude:j,setIsOnlineEventTerm:"online-event"===C})}),[C,y,w,E,N,k]);let z=(0,r.useSelect)((e=>e("core").getEntityRecords("taxonomy","_gatherpress_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,t.__)("Choose a venue","gatherpress")})):z=[],(0,h.jsx)(a.PanelRow,{children:(0,h.jsx)(a.SelectControl,{label:(0,t.__)("Venue Selector","gatherpress"),value:j,onChange:e=>{(e=>{f(e);const t=""!==(e=e.split(":"))[0]?[e[0]]:[];S({_gatherpress_venue:t}),T(e[1]),b()})(e)},options:z})})},U=()=>(0,h.jsx)("section",{children:(0,h.jsx)(W,{})}),{Fill:X,Slot:Z}=(0,a.createSlotFill)("EventPluginDocumentSettings"),q=({children:e,className:t})=>(0,h.jsx)(X,{children:(0,h.jsx)(a.PanelRow,{className:t,children:e})});q.Slot=Z,(0,i.registerPlugin)("gatherpress-event-settings",{render:()=>"gatherpress_event"===(0,r.select)("core/editor")?.getCurrentPostType()&&(0,h.jsxs)(o.PluginDocumentSettingPanel,{name:"gatherpress-event-settings",title:(0,t.__)("Event settings","gatherpress"),className:"gatherpress-event-settings",children:[(0,h.jsx)(q.Slot,{}),(0,h.jsxs)(a.__experimentalVStack,{spacing:4,children:[(0,h.jsx)(M,{}),(0,h.jsx)(U,{}),(0,h.jsx)(J,{}),(0,h.jsx)(Y,{}),(0,h.jsx)(V,{}),(0,h.jsx)(y,{}),(0,h.jsx)(k,{}),(0,h.jsx)(H,{})]})]})}),n()((()=>{const e=(0,r.select)("core/edit-post"),t=(0,r.dispatch)("core/editor");e&&t&&(e.isEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings")||t.toggleEditorPanelOpened("gatherpress-event-settings/gatherpress-event-settings"))}));const K=window.wp.compose,Q=()=>{var e,s,n;const i=(0,r.useDispatch)("core/editor").editPost,o=e=>{const t=JSON.stringify({...m,...e});i({meta:{gatherpress_venue_information:t}})},{updateVenueLatitude:l,updateVenueLongitude:c}=(0,r.useDispatch)("gatherpress/venue"),{mapCustomLatLong:d}=(0,r.useSelect)((e=>({mapCustomLatLong:e("gatherpress/venue").getMapCustomLatLong()})),[]);let m=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta").gatherpress_venue_information));m=m?JSON.parse(m):{};const[g,p]=(0,u.useState)(null!==(e=m.fullAddress)&&void 0!==e?e:""),[_,v]=(0,u.useState)(null!==(s=m.phoneNumber)&&void 0!==s?s:""),[x,j]=(0,u.useState)(null!==(n=m.website)&&void 0!==n?n:"");G({setFullAddress:p,setPhoneNumber:v,setWebsite:j});const f=(0,u.useRef)(o),S=(0,u.useCallback)((()=>{let e=null,s=null;fetch(`https://nominatim.openstreetmap.org/search?q=${g}&format=geojson`).then((e=>{if(!e.ok)throw new Error((0,t.sprintf)(/* translators: %s: Error message */ /* translators: %s: Error message */ +(0,t.__)("Network response was not ok %s","gatherpress"),e.statusText));return e.json()})).then((t=>{t.features.length>0&&(e=t.features[0].geometry.coordinates[1],s=t.features[0].geometry.coordinates[0]),d||(l(e),c(s),f.current({latitude:e,longitude:s}))}))}),[g,d,l,c]),b=(0,K.useDebounce)(S,300);return(0,u.useEffect)((()=>{f.current=o}),[o]),(0,u.useEffect)((()=>{b()}),[g,b]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(a.TextControl,{label:(0,t.__)("Full Address","gatherpress"),value:g,onChange:e=>{$({setFullAddress:e}),o({fullAddress:e})}}),(0,h.jsx)(a.TextControl,{label:(0,t.__)("Phone Number","gatherpress"),value:_,onChange:e=>{$({setPhoneNumber:e}),o({phoneNumber:e})}}),(0,h.jsx)(a.TextControl,{label:(0,t.__)("Website","gatherpress"),value:x,type:"url",onChange:e=>{$({setWebsite:e}),o({website:e})}})]})},ee=()=>(0,h.jsx)("section",{children:(0,h.jsx)(Q,{})}),{Fill:te,Slot:se}=(0,a.createSlotFill)("VenuePluginDocumentSettings"),ne=({children:e,className:t})=>(0,h.jsx)(te,{children:(0,h.jsx)(a.PanelRow,{className:t,children:e})});ne.Slot=se,(0,i.registerPlugin)("gatherpress-venue-settings",{render:()=>"gatherpress_venue"===(0,r.select)("core/editor")?.getCurrentPostType()&&(0,h.jsxs)(o.PluginDocumentSettingPanel,{name:"gatherpress-venue-settings",title:(0,t.__)("Venue settings","gatherpress"),className:"gatherpress-venue-settings",children:[(0,h.jsx)(ne.Slot,{}),(0,h.jsx)(a.__experimentalVStack,{spacing:6,children:(0,h.jsx)(ee,{})})]})}),(0,i.registerPlugin)("gatherpress-venue-settings-at-events",{render:function(){return(0,h.jsx)(h.Fragment,{children:(0,h.jsx)(a.Fill,{name:"EventPluginDocumentSettings",children:(0,h.jsx)(ne.Slot,{})})})}}),n()((()=>{const e=(0,r.select)("core/edit-post"),t=(0,r.dispatch)("core/editor");e&&t&&(e.isEditorPanelOpened("gatherpress-venue-settings/gatherpress-venue-settings")||t.toggleEditorPanelOpened("gatherpress-venue-settings/gatherpress-venue-settings"))}))})(); \ No newline at end of file diff --git a/src/components/VenueInformation.js b/src/components/VenueInformation.js index 5854b8566..1735c3dc9 100644 --- a/src/components/VenueInformation.js +++ b/src/components/VenueInformation.js @@ -47,9 +47,6 @@ const VenueInformation = () => { [] ); - useEffect(() => { - }, [mapCustomLatLong]); - let venueInformationMetaData = useSelect( (select) => select('core/editor').getEditedPostAttribute('meta') @@ -75,6 +72,7 @@ const VenueInformation = () => { Listener({ setFullAddress, setPhoneNumber, setWebsite }); const updateVenueMetaRef = useRef(updateVenueMeta); + const getData = useCallback(() => { let lat = null; let lng = null; @@ -108,11 +106,23 @@ const VenueInformation = () => { }); } }); - }, [fullAddress, mapCustomLatLong, updateVenueMetaRef]); + }, [ + fullAddress, + mapCustomLatLong, + updateVenueLatitude, + updateVenueLongitude, + ]); + + const debouncedGetData = useDebounce(getData, 300); useEffect(() => { - getData(); - }, [getData]); + updateVenueMetaRef.current = updateVenueMeta; + }, [updateVenueMeta]); + + useEffect(() => { + debouncedGetData(); + }, [fullAddress, debouncedGetData]); + return ( <>