From 5eebf13d44f003a6ea2af6459a403add0a75644e Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Sat, 9 Nov 2024 00:46:42 -0500 Subject: [PATCH 001/114] More experimenting. --- build/blocks/modal/block.json | 25 + build/blocks/modal/index.asset.php | 1 + build/blocks/modal/index.js | 1 + build/blocks/modal/style-index-rtl.css | 1 + build/blocks/modal/style-index.css | 1 + build/blocks/rsvp-v2/block.json | 28 + build/blocks/rsvp-v2/index.asset.php | 1 + build/blocks/rsvp-v2/index.js | 1 + build/blocks/rsvp-v2/render.php | 0 build/blocks/rsvp-v2/rsvp.asset.php | 1 + build/blocks/rsvp-v2/rsvp.js | 7 + build/blocks/rsvp-v2/style-index-rtl.css | 1 + build/blocks/rsvp-v2/style-index.css | 1 + build/blocks/rsvp-v2/view.asset.php | 1 + build/blocks/rsvp-v2/view.js | 1 + build/variations/rsvp/index.asset.php | 1 + build/variations/rsvp/index.js | 1 + ...ode_modules_leaflet_dist_leaflet-src_js.js | 14525 ---------------- includes/core/classes/blocks/class-rsvp.php | 83 + src/blocks/modal/block.json | 25 + src/blocks/modal/edit.js | 41 + src/blocks/modal/index.js | 32 + src/blocks/modal/style.scss | 0 src/blocks/rsvp-v2/block.json | 28 + src/blocks/rsvp-v2/edit.js | 131 + src/blocks/rsvp-v2/index.js | 32 + src/blocks/rsvp-v2/style.scss | 0 src/blocks/rsvp-v2/view.js | 9 + src/stores/index.js | 2 + src/stores/test.js | 0 src/variations/rsvp/index.js | 21 + 31 files changed, 477 insertions(+), 14525 deletions(-) create mode 100644 build/blocks/modal/block.json create mode 100644 build/blocks/modal/index.asset.php create mode 100644 build/blocks/modal/index.js create mode 100644 build/blocks/modal/style-index-rtl.css create mode 100644 build/blocks/modal/style-index.css create mode 100644 build/blocks/rsvp-v2/block.json create mode 100644 build/blocks/rsvp-v2/index.asset.php create mode 100644 build/blocks/rsvp-v2/index.js create mode 100644 build/blocks/rsvp-v2/render.php create mode 100644 build/blocks/rsvp-v2/rsvp.asset.php create mode 100644 build/blocks/rsvp-v2/rsvp.js create mode 100644 build/blocks/rsvp-v2/style-index-rtl.css create mode 100644 build/blocks/rsvp-v2/style-index.css create mode 100644 build/blocks/rsvp-v2/view.asset.php create mode 100644 build/blocks/rsvp-v2/view.js create mode 100644 build/variations/rsvp/index.asset.php create mode 100644 build/variations/rsvp/index.js delete mode 100644 build/vendors-node_modules_leaflet_dist_leaflet-src_js.js create mode 100644 includes/core/classes/blocks/class-rsvp.php create mode 100644 src/blocks/modal/block.json create mode 100644 src/blocks/modal/edit.js create mode 100644 src/blocks/modal/index.js create mode 100644 src/blocks/modal/style.scss create mode 100644 src/blocks/rsvp-v2/block.json create mode 100644 src/blocks/rsvp-v2/edit.js create mode 100644 src/blocks/rsvp-v2/index.js create mode 100644 src/blocks/rsvp-v2/style.scss create mode 100644 src/blocks/rsvp-v2/view.js create mode 100644 src/stores/test.js create mode 100644 src/variations/rsvp/index.js diff --git a/build/blocks/modal/block.json b/build/blocks/modal/block.json new file mode 100644 index 000000000..321b8be34 --- /dev/null +++ b/build/blocks/modal/block.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "gatherpress/modal", + "version": "1.0.0", + "title": "Modal", + "category": "gatherpress", + "icon": "insert", + "example": {}, + "description": "Enables members to easily confirm their attendance for an event.", + "attributes": { + "content": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "supports": { + "html": false + }, + "textdomain": "gatherpress", + "editorScript": "file:./index.js", + "style": "file:./style-index.css" +} \ No newline at end of file diff --git a/build/blocks/modal/index.asset.php b/build/blocks/modal/index.asset.php new file mode 100644 index 000000000..32b6abf87 --- /dev/null +++ b/build/blocks/modal/index.asset.php @@ -0,0 +1 @@ + array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '430b45880e5e7082e26d'); diff --git a/build/blocks/modal/index.js b/build/blocks/modal/index.js new file mode 100644 index 000000000..83f788684 --- /dev/null +++ b/build/blocks/modal/index.js @@ -0,0 +1 @@ +(()=>{var e,t={1189:(e,t,n)=>{"use strict";const o=window.wp.blocks,r=window.wp.blockEditor;n(312),n(442).default;var i=n(1609);const l=Math.min,a=Math.max,s=Math.round,c=Math.floor,u=e=>({x:e,y:e}),d={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function p(e,t,n){return a(e,l(t,n))}function h(e,t){return"function"==typeof e?e(t):e}function m(e){return e.split("-")[0]}function y(e){return e.split("-")[1]}function v(e){return"x"===e?"y":"x"}function g(e){return"y"===e?"height":"width"}function b(e){return["top","bottom"].includes(m(e))?"y":"x"}function w(e){return v(b(e))}function E(e){return e.replace(/start|end/g,(e=>f[e]))}function x(e){return e.replace(/left|right|bottom|top/g,(e=>d[e]))}function O(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 S(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function _(e,t,n){let{reference:o,floating:r}=e;const i=b(t),l=w(t),a=g(l),s=m(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[a]/2-r[a]/2;let p;switch(s){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(y(t)){case"start":p[l]-=f*(n&&c?-1:1);break;case"end":p[l]+=f*(n&&c?-1:1)}return p}async function C(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=h(t,e),m=O(p),y=a[f?"floating"===d?"reference":"floating":d],v=S(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(y)))||n?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},E=S(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:b,strategy:s}):g);return{top:(v.top-E.top+m.top)/w.y,bottom:(E.bottom-v.bottom+m.bottom)/w.y,left:(v.left-E.left+m.left)/w.x,right:(E.right-v.right+m.right)/w.x}}function T(){return"undefined"!=typeof window}function k(e){return N(e)?(e.nodeName||"").toLowerCase():"#document"}function A(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function R(e){var t;return null==(t=(N(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function N(e){return!!T()&&(e instanceof Node||e instanceof A(e).Node)}function P(e){return!!T()&&(e instanceof Element||e instanceof A(e).Element)}function M(e){return!!T()&&(e instanceof HTMLElement||e instanceof A(e).HTMLElement)}function L(e){return!(!T()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof A(e).ShadowRoot)}function D(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=U(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function j(e){return["table","td","th"].includes(k(e))}function I(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function F(e){const t=B(),n=P(e)?U(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 B(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function H(e){return["html","body","#document"].includes(k(e))}function U(e){return A(e).getComputedStyle(e)}function W(e){return P(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function z(e){if("html"===k(e))return e;const t=e.assignedSlot||e.parentNode||L(e)&&e.host||R(e);return L(t)?t.host:t}function q(e){const t=z(e);return H(t)?e.ownerDocument?e.ownerDocument.body:e.body:M(t)&&D(t)?t:q(t)}function V(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=q(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=A(r);if(i){const e=$(l);return t.concat(l,l.visualViewport||[],D(r)?r:[],e&&n?V(e):[])}return t.concat(r,V(r,[],n))}function $(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function X(e){const t=U(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=M(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=s(n)!==i||s(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function G(e){return P(e)?e:e.contextElement}function K(e){const t=G(e);if(!M(t))return u(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=X(t);let l=(i?s(n.width):n.width)/o,a=(i?s(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Y=u(0);function Z(e){const t=A(e);return B()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Y}function J(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=G(e);let l=u(1);t&&(o?P(o)&&(l=K(o)):l=K(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==A(e))&&t}(i,n,o)?Z(i):u(0);let s=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,d=r.width/l.x,f=r.height/l.y;if(i){const e=A(i),t=o&&P(o)?A(o):o;let n=e,r=$(n);for(;r&&o&&t!==n;){const e=K(r),t=r.getBoundingClientRect(),o=U(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,f*=e.y,s+=i,c+=l,n=A(r),r=$(n)}}return S({width:d,height:f,x:s,y:c})}function Q(e,t){const n=W(e).scrollLeft;return t?t.left+n:J(R(e)).left+n}function ee(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=A(e),o=R(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=B();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=R(e),n=W(e),o=e.ownerDocument.body,r=a(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=a(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Q(e);const s=-n.scrollTop;return"rtl"===U(o).direction&&(l+=a(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:s}}(R(e));else if(P(t))o=function(e,t){const n=J(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=M(e)?K(e):u(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=Z(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return S(o)}function te(e,t){const n=z(e);return!(n===t||!P(n)||H(n))&&("fixed"===U(n).position||te(n,t))}function ne(e,t,n){const o=M(t),r=R(t),i="fixed"===n,l=J(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=u(0);if(o||!o&&!i)if(("body"!==k(t)||D(r))&&(a=W(t)),o){const e=J(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=Q(r));let c=0,d=0;if(r&&!o&&!i){const e=r.getBoundingClientRect();d=e.top+a.scrollTop,c=e.left+a.scrollLeft-Q(r,e)}return{x:l.left+a.scrollLeft-s.x-c,y:l.top+a.scrollTop-s.y-d,width:l.width,height:l.height}}function oe(e){return"static"===U(e).position}function re(e,t){if(!M(e)||"fixed"===U(e).position)return null;if(t)return t(e);let n=e.offsetParent;return R(e)===n&&(n=n.ownerDocument.body),n}function ie(e,t){const n=A(e);if(I(e))return n;if(!M(e)){let t=z(e);for(;t&&!H(t);){if(P(t)&&!oe(t))return t;t=z(t)}return n}let o=re(e,t);for(;o&&j(o)&&oe(o);)o=re(o,t);return o&&H(o)&&oe(o)&&!F(o)?n:o||function(e){let t=z(e);for(;M(t)&&!H(t);){if(F(t))return t;if(I(t))return null;t=z(t)}return null}(e)||n}const le={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,l=R(o),a=!!t&&I(t.floating);if(o===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=u(1);const d=u(0),f=M(o);if((f||!f&&!i)&&(("body"!==k(o)||D(l))&&(s=W(o)),M(o))){const e=J(o);c=K(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x,y:n.y*c.y-s.scrollTop*c.y+d.y}},getDocumentElement:R,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?I(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=V(e,[],!1).filter((e=>P(e)&&"body"!==k(e))),r=null;const i="fixed"===U(e).position;let l=i?z(e):e;for(;P(l)&&!H(l);){const t=U(l),n=F(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||D(l)&&!n&&te(e,l))?o=o.filter((e=>e!==l)):r=t,l=z(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=i[0],c=i.reduce(((e,n)=>{const o=ee(t,n,r);return e.top=a(o.top,e.top),e.right=l(o.right,e.right),e.bottom=l(o.bottom,e.bottom),e.left=a(o.left,e.left),e}),ee(t,s,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:ie,getElementRects:async function(e){const t=this.getOffsetParent||ie,n=this.getDimensions,o=await n(e.floating);return{reference:ne(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=X(e);return{width:t,height:n}},getScale:K,isElement:P,isRTL:function(e){return"rtl"===U(e).direction}};const ae=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:l,middlewareData:a}=t,s=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=m(n),a=y(n),s="y"===b(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=h(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:l}}}}},se=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=h(e,t),c={x:n,y:o},u=await C(t,s),d=b(m(r)),f=v(d);let y=c[f],g=c[d];if(i){const e="y"===f?"bottom":"right";y=p(y+u["y"===f?"top":"left"],y,y-u[e])}if(l){const e="y"===d?"bottom":"right";g=p(g+u["y"===d?"top":"left"],g,g-u[e])}const w=a.fn({...t,[f]:y,[d]:g});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[f]:i,[d]:l}}}}}},ce=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:O=!0,...S}=h(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const _=m(r),T=b(a),k=m(a)===a,A=await(null==s.isRTL?void 0:s.isRTL(c.floating)),R=f||(k||!O?[x(a)]:function(e){const t=x(e);return[E(e),t,E(t)]}(a)),N="none"!==v;!f&&N&&R.push(...function(e,t,n,o){const r=y(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(m(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(E)))),i}(a,O,v,A));const P=[a,...R],M=await C(t,S),L=[];let D=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&L.push(M[_]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=y(e),r=w(e),i=g(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=x(l)),[l,x(l)]}(r,l,A);L.push(M[e[0]],M[e[1]])}if(D=[...D,{placement:r,overflows:L}],!L.every((e=>e<=0))){var j,I;const e=((null==(j=i.flip)?void 0:j.index)||0)+1,t=P[e];if(t)return{data:{index:e,overflows:D},reset:{placement:t}};let n=null==(I=D.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(p){case"bestFit":{var F;const e=null==(F=D.filter((e=>{if(N){const t=b(e.placement);return t===T||"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=a}if(r!==n)return{reset:{placement:n}}}return{}}}},ue=(e,t,n)=>{const o=new Map,r={platform:le,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=_(c,o,s),f=o,p={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const c=a;return n?(c.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:a,middlewareData:s}=e,{element:c,padding:d=0}=h(u,e)||{};if(null==c)return{};const f=O(d),m={x:t,y:n},v=w(o),b=g(v),E=await i.getDimensions(c),x="y"===v,S=x?"top":"left",_=x?"bottom":"right",C=x?"clientHeight":"clientWidth",T=r.reference[b]+r.reference[v]-m[v]-r.floating[b],k=m[v]-r.reference[v],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let R=A?A[C]:0;R&&await(null==i.isElement?void 0:i.isElement(A))||(R=a.floating[C]||r.floating[b]);const N=T/2-k/2,P=R/2-E[b]/2-1,M=l(f[S],P),L=l(f[_],P),D=M,j=R-E[b]-L,I=R/2-E[b]/2+N,F=p(D,I,j),B=!s.arrow&&null!=y(o)&&I!==F&&r.reference[b]/2-(I{var r,i;const l={left:`${e}px`,top:`${t}px`,border:s},{x:a,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{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 f=0;if(s){const e=`${s}`.match(/(\d+)px/);f=(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+f}px`},place:n}}))):ue(e,t,{placement:"bottom",strategy:i,middleware:c}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u},me=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ye=(e,t,n)=>{let o=null;const r=function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},ve=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,ge=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>ge(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!ve(e)||!ve(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>ge(e[n],t[n])))},be=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}))},we=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(be(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Ee="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,xe=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Oe={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Se=(0,i.createContext)({getTooltipData:()=>Oe});function _e(e="DEFAULT_TOOLTIP_ID"){return(0,i.useContext)(Se).getTooltipData(e)}var Ce={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"},Te={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 ke=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:s,anchorSelect:u,place:d="top",offset:f=10,events:p=["hover"],openOnClick:h=!1,positionStrategy:m="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:E=!1,noArrow:x=!1,clickable:O=!1,closeOnEsc:S=!1,closeOnScroll:_=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:N,style:P,position:M,afterShow:L,afterHide:D,disableTooltip:j,content:I,contentWrapperRef:F,isOpen:B,defaultIsOpen:H=!1,setIsOpen:U,activeAnchor:W,setActiveAnchor:z,border:q,opacity:$,arrowColor:X,role:K="tooltip"})=>{var Y;const Z=(0,i.useRef)(null),Q=(0,i.useRef)(null),ee=(0,i.useRef)(null),te=(0,i.useRef)(null),ne=(0,i.useRef)(null),[oe,re]=(0,i.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:d}),[ie,le]=(0,i.useState)(!1),[ae,se]=(0,i.useState)(!1),[ce,ue]=(0,i.useState)(null),fe=(0,i.useRef)(!1),pe=(0,i.useRef)(null),{anchorRefs:me,setActiveAnchor:ve}=_e(t),be=(0,i.useRef)(!1),[Oe,Se]=(0,i.useState)([]),ke=(0,i.useRef)(!1),Ae=h||p.includes("click"),Re=Ae||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ne=T?{...T}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!T&&Ae&&Object.assign(Ne,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Pe=k?{...k}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!k&&Ae&&Object.assign(Pe,{mouseleave:!1,blur:!1,mouseout:!1});const Me=A?{...A}:{escape:S||!1,scroll:_||!1,resize:C||!1,clickOutsideAnchor:Re||!1};N&&(Object.assign(Ne,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Ee((()=>(ke.current=!0,()=>{ke.current=!1})),[]);const Le=e=>{ke.current&&(e&&se(!0),setTimeout((()=>{ke.current&&(null==U||U(e),void 0===B&&le(e))}),10))};(0,i.useEffect)((()=>{if(void 0===B)return()=>null;B&&se(!0);const e=setTimeout((()=>{le(B)}),10);return()=>{clearTimeout(e)}}),[B]),(0,i.useEffect)((()=>{if(ie!==fe.current)if(xe(ne),fe.current=ie,ie)null==L||L();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)})();ne.current=setTimeout((()=>{se(!1),ue(null),null==D||D()}),e+25)}}),[ie]);const De=e=>{re((t=>ge(t,e)?t:e))},je=(e=g)=>{xe(ee),ae?Le(!0):ee.current=setTimeout((()=>{Le(!0)}),e)},Ie=(e=b)=>{xe(te),te.current=setTimeout((()=>{be.current||Le(!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 z(null),void ve({current:null});g?je():Le(!0),z(n),ve({current:n}),xe(te)},Be=()=>{O?Ie(b||100):b?Ie():Le(!1),xe(ee)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};he({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:d,offset:f,elementReference:o,tooltipReference:Z.current,tooltipArrowReference:Q.current,strategy:m,middlewares:y,border:q}).then((e=>{De(e)}))},Ue=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),pe.current=n},We=e=>{var t;if(!ie)return;const n=e.target;n.isConnected&&((null===(t=Z.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${s}']`),...Oe].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),xe(ee)))},ze=ye(Fe,50,!0),qe=ye(Be,50,!0),Ve=e=>{qe.cancel(),ze(e)},$e=()=>{ze.cancel(),qe()},Xe=(0,i.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:M;n?He(n):w?pe.current&&He(pe.current):(null==W?void 0:W.isConnected)&&he({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:d,offset:f,elementReference:W,tooltipReference:Z.current,tooltipArrowReference:Q.current,strategy:m,middlewares:y,border:q}).then((e=>{ke.current&&De(e)}))}),[ie,W,I,P,d,null==ce?void 0:ce.place,f,m,M,null==ce?void 0:ce.position,w]);(0,i.useEffect)((()=>{var e,t;const n=new Set(me);Oe.forEach((e=>{(null==j?void 0:j(e))||n.add({current:e})}));const o=document.querySelector(`[id='${s}']`);o&&!(null==j?void 0:j(o))&&n.add({current:o});const r=()=>{Le(!1)},i=we(W),u=we(Z.current);Me.scroll&&(window.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r),null==u||u.addEventListener("scroll",r));let d=null;Me.resize?window.addEventListener("resize",r):W&&Z.current&&(d=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:d=!1}=o,f=G(e),p=r||i?[...f?V(f):[],...V(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const h=f&&u?function(e,t){let n,o=null;const r=R(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function s(u,d){void 0===u&&(u=!1),void 0===d&&(d=1),i();const{left:f,top:p,width:h,height:m}=e.getBoundingClientRect();if(u||t(),!h||!m)return;const y={rootMargin:-c(p)+"px "+-c(r.clientWidth-(f+h))+"px "+-c(r.clientHeight-(p+m))+"px "+-c(f)+"px",threshold:a(0,l(1,d))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==d){if(!v)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}v=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),i}(f,n):null;let m,y=-1,v=null;s&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var e;null==(e=v)||e.observe(t)}))),n()})),f&&!d&&v.observe(f),v.observe(t));let g=d?J(e):null;return d&&function t(){const o=J(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,m=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==h||h(),null==(e=v)||e.disconnect(),v=null,d&&cancelAnimationFrame(m)}}(W,Z.current,Xe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",f),Me.clickOutsideAnchor&&window.addEventListener("click",We);const p=[],h=e=>{ie&&(null==e?void 0:e.target)===W||Fe(e)},m=e=>{ie&&(null==e?void 0:e.target)===W&&Be()},y=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:Ve}):v.includes(e)&&p.push({event:e,listener:h}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:$e}):v.includes(e)&&p.push({event:e,listener:m}))})),w&&p.push({event:"pointermove",listener:Ue});const g=()=>{be.current=!0},b=()=>{be.current=!1,Be()};return O&&!Re&&(null===(e=Z.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=Z.current)||void 0===t||t.addEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r),null==u||u.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==d||d(),Me.clickOutsideAnchor&&window.removeEventListener("click",We),Me.escape&&window.removeEventListener("keydown",f),O&&!Re&&(null===(e=Z.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=Z.current)||void 0===t||t.removeEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[W,Xe,ae,me,Oe,T,k,A,Ae,g,b]),(0,i.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:u)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];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&&r.push(e.target)),"childList"===e.type){if(W){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,W))&&(se(!1),Le(!1),z(null),xe(ee),xe(te),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&Se((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,u,null==ce?void 0:ce.anchorSelect,W]),(0,i.useEffect)((()=>{Xe()}),[Xe]),(0,i.useEffect)((()=>{if(!(null==F?void 0:F.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Xe()))}));return e.observe(F.current),()=>{e.disconnect()}}),[I,null==F?void 0:F.current]),(0,i.useEffect)((()=>{var e;const t=document.querySelector(`[id='${s}']`),n=[...Oe,t];W&&n.includes(W)||z(null!==(e=Oe[0])&&void 0!==e?e:t)}),[s,Oe,W]),(0,i.useEffect)((()=>(H&&Le(!0),()=>{xe(ee),xe(te)})),[]),(0,i.useEffect)((()=>{var e;let n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:u;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{const e=Array.from(document.querySelectorAll(n));Se(e)}catch(e){Se([])}}),[t,u,null==ce?void 0:ce.anchorSelect]),(0,i.useEffect)((()=>{ee.current&&(xe(ee),je(g))}),[g]);const Ge=null!==(Y=null==ce?void 0:ce.content)&&void 0!==Y?Y:I,Ke=ie&&Object.keys(oe.tooltipStyles).length>0;return(0,i.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)?je(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?Ie(e.delay):Le(!1)},activeAnchor:W,place:oe.place,isOpen:Boolean(ae&&!E&&Ge&&Ke)}))),ae&&!E&&Ge?i.createElement(v,{id:t,role:K,className:de("react-tooltip",Ce.tooltip,Te.tooltip,Te[r],n,`react-tooltip__place-${oe.place}`,Ce[Ke?"show":"closing"],Ke?"react-tooltip__show":"react-tooltip__closing","fixed"===m&&Ce.fixed,O&&Ce.clickable),onTransitionEnd:e=>{xe(ne),ie||"opacity"!==e.propertyName||(se(!1),ue(null),null==D||D())},style:{...P,...oe.tooltipStyles,opacity:void 0!==$&&Ke?$:void 0},ref:Z},Ge,i.createElement(v,{className:de("react-tooltip-arrow",Ce.arrow,Te.arrow,o,x&&Ce.noArrow),style:{...oe.tooltipArrowStyles,background:X?`linear-gradient(to right bottom, transparent 50%, ${X} 50%)`:void 0},ref:Q})):null},Ae=({content:e})=>i.createElement("span",{dangerouslySetInnerHTML:{__html:e}});i.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:l,className:a,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:E=!1,noArrow:x=!1,clickable:O=!1,closeOnEsc:S=!1,closeOnScroll:_=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R=!1,style:N,position:P,isOpen:M,defaultIsOpen:L=!1,disableStyleInjection:D=!1,border:j,opacity:I,arrowColor:F,setIsOpen:B,afterShow:H,afterHide:U,disableTooltip:W,role:z="tooltip"},q)=>{const[V,$]=(0,i.useState)(o),[X,G]=(0,i.useState)(r),[K,Y]=(0,i.useState)(u),[Z,J]=(0,i.useState)(c),[Q,ee]=(0,i.useState)(d),[te,ne]=(0,i.useState)(g),[oe,re]=(0,i.useState)(b),[ie,le]=(0,i.useState)(w),[ae,se]=(0,i.useState)(E),[ce,ue]=(0,i.useState)(f),[fe,pe]=(0,i.useState)(h),[he,ye]=(0,i.useState)(y),[ve,ge]=(0,i.useState)(null),[be,we]=(0,i.useState)(null),Ee=(0,i.useRef)(D),{anchorRefs:xe,activeAnchor:Oe}=_e(e),Se=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),Ce=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:u)},content:e=>{$(null!=e?e:o)},html:e=>{G(null!=e?e:r)},variant:e=>{var t;J(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{ee(null===e?d:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");pe(null!=t?t:h)},"position-strategy":e=>{var t;ye(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ne(null===e?g:Number(e))},"delay-hide":e=>{re(null===e?b:Number(e))},float:e=>{le(null===e?w:"true"===e)},hidden:e=>{se(null===e?E:"true"===e)},"class-name":e=>{ge(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,i.useEffect)((()=>{$(o)}),[o]),(0,i.useEffect)((()=>{G(r)}),[r]),(0,i.useEffect)((()=>{Y(u)}),[u]),(0,i.useEffect)((()=>{J(c)}),[c]),(0,i.useEffect)((()=>{ee(d)}),[d]),(0,i.useEffect)((()=>{ne(g)}),[g]),(0,i.useEffect)((()=>{re(b)}),[b]),(0,i.useEffect)((()=>{le(w)}),[w]),(0,i.useEffect)((()=>{se(E)}),[E]),(0,i.useEffect)((()=>{ye(y)}),[y]),(0,i.useEffect)((()=>{Ee.current!==D&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[D]),(0,i.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===D,disableBase:D}}))}),[]),(0,i.useEffect)((()=>{var o;const r=new Set(xe);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&r.add({current:l}),!r.size)return()=>null;const a=null!==(o=null!=be?be:l)&&void 0!==o?o:Oe.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Se(a);Ce(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Se(a);Ce(e),s.observe(a,c)}return()=>{s.disconnect()}}),[xe,Oe,be,t,n]),(0,i.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),j&&!me("border",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!me("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let Te=p;const Re=(0,i.useRef)(null);if(l){const e=l({content:(null==be?void 0:be.getAttribute("data-tooltip-content"))||V||null,activeAnchor:be});Te=e?i.createElement("div",{ref:Re,className:"react-tooltip-content-wrapper"},e):null}else V&&(Te=V);X&&(Te=i.createElement(Ae,{content:X}));const Ne={forwardRef:q,id:e,anchorId:t,anchorSelect:n,className:de(a,ve),classNameArrow:s,content:Te,contentWrapperRef:Re,place:K,variant:Z,offset:Q,wrapper:ce,events:fe,openOnClick:m,positionStrategy:he,middlewares:v,delayShow:te,delayHide:oe,float:ie,hidden:ae,noArrow:x,clickable:O,closeOnEsc:S,closeOnScroll:_,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,isOpen:M,defaultIsOpen:L,border:j,opacity:I,arrowColor:F,setIsOpen:B,afterShow:H,afterHide:U,disableTooltip:W,activeAnchor:be,setActiveAnchor:e=>we(e),role:z};return i.createElement(ke,{...Ne})})),"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||pe({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||pe({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"})})),window.wp.element,window.wp.i18n,window.wp.components,window.wp.apiFetch;const Re=window.ReactJSXRuntime;function Ne(e){if("object"==typeof GatherPress)return e.split(".").reduce(((e,t)=>e&&e[t]),GatherPress)}window.wp.data;const Pe=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"gatherpress/modal","version":"1.0.0","title":"Modal","category":"gatherpress","icon":"insert","example":{},"description":"Enables members to easily confirm their attendance for an event.","attributes":{"content":{"type":"string"},"color":{"type":"string"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css"}');(0,o.registerBlockType)(Pe,{edit:()=>{const e=(0,r.useBlockProps)();return Ne("eventDetails.postId"),Ne("eventDetails.currentUser"),(0,Re.jsx)("div",{...e,children:(0,Re.jsx)(r.InnerBlocks,{})})},save:()=>(0,Re.jsx)("div",{...r.useBlockProps.save(),children:(0,Re.jsx)(r.InnerBlocks.Content,{})})})},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 o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),l=n(6957);r(n(6957),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=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=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,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,o=new l.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===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=s,t.default=s},6957:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=f;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=p;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(f);function y(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function g(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 E(e){return e.type===l.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?O(e.children):[],r=new m(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?O(e.children):[];var l=new p(o);o.forEach((function(e){return e.parent=l})),n=l}else if(E(e)){o=t?O(e.children):[];var a=new h(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},5270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),f=d&&d[1]?d[1].toLowerCase():"";switch(f){case n:var h=c(e);return l.test(e)||null===(t=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case o:case r:var m=s(e).querySelectorAll(f);return a.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return p?p(e):(y=s(e,r).querySelector(r)).childNodes;var y}};var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=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;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=f.documentElement.querySelector(t);return n&&(n.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var p,h="object"==typeof document&&document.createElement("template");h&&h.content&&(p=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.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,r.default)(e),null,n)};var r=o(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,r){void 0===n&&(n=null);for(var a,s=[],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&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var f=u.toLowerCase(),p=s(f);if(p){var h=(0,o.getPropertyInfo)(p);switch(i.includes(p)&&l.includes(t)&&!c&&(p=s("default"+f)),n[p]=d,h&&h.type){case o.BOOLEAN:n[p]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[p]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n};var o=n(4210),r=n(4958),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return o.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var o=[],r="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=n.library||a,d=u.cloneElement,f=u.createElement,p=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),o.push(c(v,y,m));continue}}if("text"!==y.type){var g=y,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(f(y.name,b,w),y,m))}else{var E=!y.data.trim().length;if(E&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&E)continue;o.push(c(y.data,y,m))}}return 1===o.length?o[0]:o};var r=n(1609),i=o(n(840)),l=n(4958),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]};var r=o(n(2471));t.htmlToDOM=r.default;var i=o(n(840));t.attributesToProps=i.default;var l=o(n(308));t.domToReact=l.default;var a=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=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,a)}catch(e){t.style={}}else t.style={}};var r=n(1609),i=o(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"]),a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,f=1;function p(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");f=~o?e.length-o:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=s.source}m.prototype.content=e;var y=[];function v(t){var n=new Error(s.source+":"+d+":"+f+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=f,n.source=e,!s.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return p(o),e=e.slice(o.length),n}}function b(){g(o)}function w(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var o=e.slice(2,n-2);return f+=2,p(o),e=e.slice(n),f+=2,t({type:"comment",comment:o})}}function x(){var e=h(),n=g(r);if(n){if(E(),!g(i))return v("property missing ':'");var o=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=x();)!1!==e&&(t.push(e),w(t));return t}()}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,l){if(l!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1345:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==a){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(s.returnFocus(n.props.preventScroll),s.teardownScopedFocus()):s.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(s.setupScopedFocus(n.node),s.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,l=i&&i().ownerDocument||document;r&&d.add(l.body,r),o&&d.add(l.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,l=e.children,a=n?{}:i.content,s=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,l);return this.props.overlayElement(c,d)}}]),t}(l.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(p.default),a.default.instanceOf(f.SafeHTMLCollection),a.default.instanceOf(f.SafeNodeList),a.default.arrayOf(a.default.instanceOf(p.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){l&&(l.removeAttribute?l.removeAttribute("aria-hidden"):null!=l.length?l.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(l).forEach((function(e){return e.removeAttribute("aria-hidden")}))),l=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return l=t||l},t.validateElement=s,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){l=null};var o,r=(o=n(9771))&&o.__esModule?o:{default:o},i=n(834),l=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function s(e){var t=e||l;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,l],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var l in o)r(i,o[l]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},7791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=s,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",s,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",s),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",s),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",s),document.detachEvent("onFocus",c))};var o,r=(o=n(2411))&&o.__esModule?o:{default:o},i=[],l=null,a=!1;function s(){a=!0}function c(){if(a){if(a=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,r.default)(l)[0]||l).focus()}),0)}}},9628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(411))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},7067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,l=t.shiftKey,a=n[0],s=n[n.length-1],c=i();if(e===c){if(!l)return;o=s}if(s!==c||l||(o=a),a===c&&l&&(o=s),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=l?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=l?s:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(2411))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(l)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function l(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(1720))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},4210:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const 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);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,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===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},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 o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),r=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,o){e&&o&&(n[(0,r.camelCase)(e,t)]=o)})),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_-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(o,a))}},1133:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n};var r=o(n(9788))},9771:e=>{"use strict";e.exports=function(){}},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var l=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[s])))?n.splice(s--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={310:0,170:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,l=n[0],a=n[1],s=n[2],c=0;if(l.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(s)var u=s(o)}for(t&&t(n);co(1189)));r=o.O(r)})(); \ No newline at end of file diff --git a/build/blocks/modal/style-index-rtl.css b/build/blocks/modal/style-index-rtl.css new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/build/blocks/modal/style-index-rtl.css @@ -0,0 +1 @@ + diff --git a/build/blocks/modal/style-index.css b/build/blocks/modal/style-index.css new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/build/blocks/modal/style-index.css @@ -0,0 +1 @@ + diff --git a/build/blocks/rsvp-v2/block.json b/build/blocks/rsvp-v2/block.json new file mode 100644 index 000000000..eda5d80b2 --- /dev/null +++ b/build/blocks/rsvp-v2/block.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 3, + "name": "gatherpress/rsvp-v2", + "version": "2.0.0", + "title": "RSVP V2", + "category": "gatherpress", + "icon": "insert", + "example": {}, + "description": "Enables members to easily confirm their attendance for an event.", + "attributes": { + "initialLabel": { + "type": "string", + "default": "RSVP" + }, + "interactedLabel": { + "type": "string", + "default": "Edit RSVP" + } + }, + "supports": { + "html": false + }, + "textdomain": "gatherpress", + "editorScript": "file:./index.js", + "style": "file:./style-index.css", + "viewScriptModule": "file:./view.js" +} \ No newline at end of file diff --git a/build/blocks/rsvp-v2/index.asset.php b/build/blocks/rsvp-v2/index.asset.php new file mode 100644 index 000000000..4a91784dd --- /dev/null +++ b/build/blocks/rsvp-v2/index.asset.php @@ -0,0 +1 @@ + array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '3b7b8a9ebb568df0236f'); diff --git a/build/blocks/rsvp-v2/index.js b/build/blocks/rsvp-v2/index.js new file mode 100644 index 000000000..a6562f7b0 --- /dev/null +++ b/build/blocks/rsvp-v2/index.js @@ -0,0 +1 @@ +(()=>{var e,t={6858:(e,t,n)=>{"use strict";const o=window.wp.blocks,r=window.wp.blockEditor,i=window.wp.components,l=window.wp.i18n;n(312),n(442).default;var a=n(1609);const s=Math.min,c=Math.max,u=Math.round,d=Math.floor,f=e=>({x:e,y:e}),p={left:"right",right:"left",bottom:"top",top:"bottom"},h={start:"end",end:"start"};function m(e,t,n){return c(e,s(t,n))}function y(e,t){return"function"==typeof e?e(t):e}function v(e){return e.split("-")[0]}function g(e){return e.split("-")[1]}function b(e){return"x"===e?"y":"x"}function w(e){return"y"===e?"height":"width"}function x(e){return["top","bottom"].includes(v(e))?"y":"x"}function E(e){return b(x(e))}function S(e){return e.replace(/start|end/g,(e=>h[e]))}function O(e){return e.replace(/left|right|bottom|top/g,(e=>p[e]))}function _(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 C(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function T(e,t,n){let{reference:o,floating:r}=e;const i=x(t),l=E(t),a=w(l),s=v(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[a]/2-r[a]/2;let p;switch(s){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(g(t)){case"start":p[l]-=f*(n&&c?-1:1);break;case"end":p[l]+=f*(n&&c?-1:1)}return p}async function k(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=y(t,e),h=_(p),m=a[f?"floating"===d?"reference":"floating":d],v=C(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(a.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=C(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:b,strategy:s}):g);return{top:(v.top-x.top+h.top)/w.y,bottom:(x.bottom-v.bottom+h.bottom)/w.y,left:(v.left-x.left+h.left)/w.x,right:(x.right-v.right+h.right)/w.x}}function A(){return"undefined"!=typeof window}function R(e){return M(e)?(e.nodeName||"").toLowerCase():"#document"}function N(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(e){var t;return null==(t=(M(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function M(e){return!!A()&&(e instanceof Node||e instanceof N(e).Node)}function L(e){return!!A()&&(e instanceof Element||e instanceof N(e).Element)}function D(e){return!!A()&&(e instanceof HTMLElement||e instanceof N(e).HTMLElement)}function j(e){return!(!A()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof N(e).ShadowRoot)}function I(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function F(e){return["table","td","th"].includes(R(e))}function B(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function H(e){const t=U(),n=L(e)?V(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 U(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function W(e){return["html","body","#document"].includes(R(e))}function V(e){return N(e).getComputedStyle(e)}function z(e){return L(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if("html"===R(e))return e;const t=e.assignedSlot||e.parentNode||j(e)&&e.host||P(e);return j(t)?t.host:t}function $(e){const t=q(e);return W(t)?e.ownerDocument?e.ownerDocument.body:e.body:D(t)&&I(t)?t:$(t)}function X(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=$(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=N(r);if(i){const e=G(l);return t.concat(l,l.visualViewport||[],I(r)?r:[],e&&n?X(e):[])}return t.concat(r,X(r,[],n))}function G(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function K(e){const t=V(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=D(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=u(n)!==i||u(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function Y(e){return L(e)?e:e.contextElement}function Z(e){const t=Y(e);if(!D(t))return f(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=K(t);let l=(i?u(n.width):n.width)/o,a=(i?u(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const J=f(0);function Q(e){const t=N(e);return U()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:J}function ee(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Y(e);let l=f(1);t&&(o?L(o)&&(l=Z(o)):l=Z(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==N(e))&&t}(i,n,o)?Q(i):f(0);let s=(r.left+a.x)/l.x,c=(r.top+a.y)/l.y,u=r.width/l.x,d=r.height/l.y;if(i){const e=N(i),t=o&&L(o)?N(o):o;let n=e,r=G(n);for(;r&&o&&t!==n;){const e=Z(r),t=r.getBoundingClientRect(),o=V(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=l,n=N(r),r=G(n)}}return C({width:u,height:d,x:s,y:c})}function te(e,t){const n=z(e).scrollLeft;return t?t.left+n:ee(P(e)).left+n}function ne(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=N(e),o=P(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=U();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=P(e),n=z(e),o=e.ownerDocument.body,r=c(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=c(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+te(e);const a=-n.scrollTop;return"rtl"===V(o).direction&&(l+=c(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(P(e));else if(L(t))o=function(e,t){const n=ee(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=D(e)?Z(e):f(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=Q(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return C(o)}function oe(e,t){const n=q(e);return!(n===t||!L(n)||W(n))&&("fixed"===V(n).position||oe(n,t))}function re(e,t,n){const o=D(t),r=P(t),i="fixed"===n,l=ee(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=f(0);if(o||!o&&!i)if(("body"!==R(t)||I(r))&&(a=z(t)),o){const e=ee(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&(s.x=te(r));let c=0,u=0;if(r&&!o&&!i){const e=r.getBoundingClientRect();u=e.top+a.scrollTop,c=e.left+a.scrollLeft-te(r,e)}return{x:l.left+a.scrollLeft-s.x-c,y:l.top+a.scrollTop-s.y-u,width:l.width,height:l.height}}function ie(e){return"static"===V(e).position}function le(e,t){if(!D(e)||"fixed"===V(e).position)return null;if(t)return t(e);let n=e.offsetParent;return P(e)===n&&(n=n.ownerDocument.body),n}function ae(e,t){const n=N(e);if(B(e))return n;if(!D(e)){let t=q(e);for(;t&&!W(t);){if(L(t)&&!ie(t))return t;t=q(t)}return n}let o=le(e,t);for(;o&&F(o)&&ie(o);)o=le(o,t);return o&&W(o)&&ie(o)&&!H(o)?n:o||function(e){let t=q(e);for(;D(t)&&!W(t);){if(H(t))return t;if(B(t))return null;t=q(t)}return null}(e)||n}const se={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,l=P(o),a=!!t&&B(t.floating);if(o===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=f(1);const u=f(0),d=D(o);if((d||!d&&!i)&&(("body"!==R(o)||I(l))&&(s=z(o)),D(o))){const e=ee(o);c=Z(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x,y:n.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:P,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?B(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=X(e,[],!1).filter((e=>L(e)&&"body"!==R(e))),r=null;const i="fixed"===V(e).position;let l=i?q(e):e;for(;L(l)&&!W(l);){const t=V(l),n=H(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||I(l)&&!n&&oe(e,l))?o=o.filter((e=>e!==l)):r=t,l=q(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=ne(t,n,r);return e.top=c(o.top,e.top),e.right=s(o.right,e.right),e.bottom=s(o.bottom,e.bottom),e.left=c(o.left,e.left),e}),ne(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ae,getElementRects:async function(e){const t=this.getOffsetParent||ae,n=this.getDimensions,o=await n(e.floating);return{reference:re(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=K(e);return{width:t,height:n}},getScale:Z,isElement:L,isRTL:function(e){return"rtl"===V(e).direction}};const ce=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:l,middlewareData:a}=t,s=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=v(n),a=g(n),s="y"===x(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=y(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:l}}}}},ue=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=y(e,t),c={x:n,y:o},u=await k(t,s),d=x(v(r)),f=b(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=m(p+u["y"===f?"top":"left"],p,p-u[e])}if(l){const e="y"===d?"bottom":"right";h=m(h+u["y"===d?"top":"left"],h,h-u[e])}const g=a.fn({...t,[f]:p,[d]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:i,[d]:l}}}}}},de=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...b}=y(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const _=v(r),C=x(a),T=v(a)===a,A=await(null==s.isRTL?void 0:s.isRTL(c.floating)),R=f||(T||!m?[O(a)]:function(e){const t=O(e);return[S(e),t,S(t)]}(a)),N="none"!==h;!f&&N&&R.push(...function(e,t,n,o){const r=g(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(v(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(S)))),i}(a,m,h,A));const P=[a,...R],M=await k(t,b),L=[];let D=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&L.push(M[_]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=g(e),r=E(e),i=w(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=O(l)),[l,O(l)]}(r,l,A);L.push(M[e[0]],M[e[1]])}if(D=[...D,{placement:r,overflows:L}],!L.every((e=>e<=0))){var j,I;const e=((null==(j=i.flip)?void 0:j.index)||0)+1,t=P[e];if(t)return{data:{index:e,overflows:D},reset:{placement:t}};let n=null==(I=D.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:I.placement;if(!n)switch(p){case"bestFit":{var F;const e=null==(F=D.filter((e=>{if(N){const t=x(e.placement);return t===C||"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=a}if(r!==n)return{reset:{placement:n}}}return{}}}},fe=(e,t,n)=>{const o=new Map,r={platform:se,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=T(c,o,s),f=o,p={},h=0;for(let n=0;n{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:o};const c=l;return n?(c.push({name:"arrow",options:u={element:n,padding:5},async fn(e){const{x:t,y:n,placement:o,rects:r,platform:i,elements:l,middlewareData:a}=e,{element:c,padding:d=0}=y(u,e)||{};if(null==c)return{};const f=_(d),p={x:t,y:n},h=E(o),v=w(h),b=await i.getDimensions(c),x="y"===h,S=x?"top":"left",O=x?"bottom":"right",C=x?"clientHeight":"clientWidth",T=r.reference[v]+r.reference[h]-p[h]-r.floating[v],k=p[h]-r.reference[h],A=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let R=A?A[C]:0;R&&await(null==i.isElement?void 0:i.isElement(A))||(R=l.floating[C]||r.floating[v]);const N=T/2-k/2,P=R/2-b[v]/2-1,M=s(f[S],P),L=s(f[O],P),D=M,j=R-b[v]-L,I=R/2-b[v]/2+N,F=m(D,I,j),B=!a.arrow&&null!=g(o)&&I!==F&&r.reference[v]/2-(I{var r,i;const l={left:`${e}px`,top:`${t}px`,border:a},{x:s,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom",d=a&&{borderBottom:a,borderRight:a};let f=0;if(a){const e=`${a}`.match(/(\d+)px/);f=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:l,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",...d,[u]:`-${4+f}px`},place:n}}))):fe(e,t,{placement:"bottom",strategy:i,middleware:c}).then((({x:e,y:t,placement:n})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:n})));var u},ve=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),ge=(e,t,n)=>{let o=null;const r=function(...r){const i=()=>{o=null,n||e.apply(this,r)};n&&!o&&(e.apply(this,r),o=setTimeout(i,t)),n||(o&&clearTimeout(o),o=setTimeout(i,t))};return r.cancel=()=>{o&&(clearTimeout(o),o=null)},r},be=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,we=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,n)=>we(e,t[n])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!be(e)||!be(t))return e===t;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((n=>we(e[n],t[n])))},xe=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}))},Ee=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(xe(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},Se="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,Oe=e=>{e.current&&(clearTimeout(e.current),e.current=null)},_e={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},Ce=(0,a.createContext)({getTooltipData:()=>_e});function Te(e="DEFAULT_TOOLTIP_ID"){return(0,a.useContext)(Ce).getTooltipData(e)}var ke={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"},Ae={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 Re=({forwardRef:e,id:t,className:n,classNameArrow:o,variant:r="dark",anchorId:i,anchorSelect:l,place:u="top",offset:f=10,events:p=["hover"],openOnClick:h=!1,positionStrategy:m="absolute",middlewares:y,wrapper:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:E=!1,clickable:S=!1,closeOnEsc:O=!1,closeOnScroll:_=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:M,afterShow:L,afterHide:D,disableTooltip:j,content:I,contentWrapperRef:F,isOpen:B,defaultIsOpen:H=!1,setIsOpen:U,activeAnchor:W,setActiveAnchor:V,border:z,opacity:q,arrowColor:$,role:G="tooltip"})=>{var K;const Z=(0,a.useRef)(null),J=(0,a.useRef)(null),Q=(0,a.useRef)(null),te=(0,a.useRef)(null),ne=(0,a.useRef)(null),[oe,re]=(0,a.useState)({tooltipStyles:{},tooltipArrowStyles:{},place:u}),[ie,le]=(0,a.useState)(!1),[ae,se]=(0,a.useState)(!1),[ce,ue]=(0,a.useState)(null),de=(0,a.useRef)(!1),fe=(0,a.useRef)(null),{anchorRefs:he,setActiveAnchor:me}=Te(t),ve=(0,a.useRef)(!1),[be,xe]=(0,a.useState)([]),_e=(0,a.useRef)(!1),Ce=h||p.includes("click"),Re=Ce||(null==T?void 0:T.click)||(null==T?void 0:T.dblclick)||(null==T?void 0:T.mousedown),Ne=T?{...T}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!T&&Ce&&Object.assign(Ne,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Pe=k?{...k}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!k&&Ce&&Object.assign(Pe,{mouseleave:!1,blur:!1,mouseout:!1});const Me=A?{...A}:{escape:O||!1,scroll:_||!1,resize:C||!1,clickOutsideAnchor:Re||!1};R&&(Object.assign(Ne,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Pe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Me,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),Se((()=>(_e.current=!0,()=>{_e.current=!1})),[]);const Le=e=>{_e.current&&(e&&se(!0),setTimeout((()=>{_e.current&&(null==U||U(e),void 0===B&&le(e))}),10))};(0,a.useEffect)((()=>{if(void 0===B)return()=>null;B&&se(!0);const e=setTimeout((()=>{le(B)}),10);return()=>{clearTimeout(e)}}),[B]),(0,a.useEffect)((()=>{if(ie!==de.current)if(Oe(ne),de.current=ie,ie)null==L||L();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)})();ne.current=setTimeout((()=>{se(!1),ue(null),null==D||D()}),e+25)}}),[ie]);const De=e=>{re((t=>we(t,e)?t:e))},je=(e=g)=>{Oe(Q),ae?Le(!0):Q.current=setTimeout((()=>{Le(!0)}),e)},Ie=(e=b)=>{Oe(te),te.current=setTimeout((()=>{ve.current||Le(!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 V(null),void me({current:null});g?je():Le(!0),V(n),me({current:n}),Oe(te)},Be=()=>{S?Ie(b||100):b?Ie():Le(!1),Oe(Q)},He=({x:e,y:t})=>{var n;const o={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};ye({place:null!==(n=null==ce?void 0:ce.place)&&void 0!==n?n:u,offset:f,elementReference:o,tooltipReference:Z.current,tooltipArrowReference:J.current,strategy:m,middlewares:y,border:z}).then((e=>{De(e)}))},Ue=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};He(n),fe.current=n},We=e=>{var t;if(!ie)return;const n=e.target;n.isConnected&&((null===(t=Z.current)||void 0===t?void 0:t.contains(n))||[document.querySelector(`[id='${i}']`),...be].some((e=>null==e?void 0:e.contains(n)))||(Le(!1),Oe(Q)))},Ve=ge(Fe,50,!0),ze=ge(Be,50,!0),qe=e=>{ze.cancel(),Ve(e)},$e=()=>{Ve.cancel(),ze()},Xe=(0,a.useCallback)((()=>{var e,t;const n=null!==(e=null==ce?void 0:ce.position)&&void 0!==e?e:M;n?He(n):w?fe.current&&He(fe.current):(null==W?void 0:W.isConnected)&&ye({place:null!==(t=null==ce?void 0:ce.place)&&void 0!==t?t:u,offset:f,elementReference:W,tooltipReference:Z.current,tooltipArrowReference:J.current,strategy:m,middlewares:y,border:z}).then((e=>{_e.current&&De(e)}))}),[ie,W,I,N,u,null==ce?void 0:ce.place,f,m,M,null==ce?void 0:ce.position,w]);(0,a.useEffect)((()=>{var e,t;const n=new Set(he);be.forEach((e=>{(null==j?void 0:j(e))||n.add({current:e})}));const o=document.querySelector(`[id='${i}']`);o&&!(null==j?void 0:j(o))&&n.add({current:o});const r=()=>{Le(!1)},l=Ee(W),a=Ee(Z.current);Me.scroll&&(window.addEventListener("scroll",r),null==l||l.addEventListener("scroll",r),null==a||a.addEventListener("scroll",r));let u=null;Me.resize?window.addEventListener("resize",r):W&&Z.current&&(u=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,f=Y(e),p=r||i?[...f?X(f):[],...X(t)]:[];p.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const h=f&&a?function(e,t){let n,o=null;const r=P(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function l(a,u){void 0===a&&(a=!1),void 0===u&&(u=1),i();const{left:f,top:p,width:h,height:m}=e.getBoundingClientRect();if(a||t(),!h||!m)return;const y={rootMargin:-d(p)+"px "+-d(r.clientWidth-(f+h))+"px "+-d(r.clientHeight-(p+m))+"px "+-d(f)+"px",threshold:c(0,s(1,u))||1};let v=!0;function g(e){const t=e[0].intersectionRatio;if(t!==u){if(!v)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}v=!1}try{o=new IntersectionObserver(g,{...y,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,y)}o.observe(e)}(!0),i}(f,n):null;let m,y=-1,v=null;l&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var e;null==(e=v)||e.observe(t)}))),n()})),f&&!u&&v.observe(f),v.observe(t));let g=u?ee(e):null;return u&&function t(){const o=ee(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n(),g=o,m=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==h||h(),null==(e=v)||e.disconnect(),v=null,u&&cancelAnimationFrame(m)}}(W,Z.current,Xe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const f=e=>{"Escape"===e.key&&Le(!1)};Me.escape&&window.addEventListener("keydown",f),Me.clickOutsideAnchor&&window.addEventListener("click",We);const p=[],h=e=>{ie&&(null==e?void 0:e.target)===W||Fe(e)},m=e=>{ie&&(null==e?void 0:e.target)===W&&Be()},y=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],v=["click","dblclick","mousedown","mouseup"];Object.entries(Ne).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:qe}):v.includes(e)&&p.push({event:e,listener:h}))})),Object.entries(Pe).forEach((([e,t])=>{t&&(y.includes(e)?p.push({event:e,listener:$e}):v.includes(e)&&p.push({event:e,listener:m}))})),w&&p.push({event:"pointermove",listener:Ue});const g=()=>{ve.current=!0},b=()=>{ve.current=!1,Be()};return S&&!Re&&(null===(e=Z.current)||void 0===e||e.addEventListener("mouseenter",g),null===(t=Z.current)||void 0===t||t.addEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(e,t)}))})),()=>{var e,t;Me.scroll&&(window.removeEventListener("scroll",r),null==l||l.removeEventListener("scroll",r),null==a||a.removeEventListener("scroll",r)),Me.resize?window.removeEventListener("resize",r):null==u||u(),Me.clickOutsideAnchor&&window.removeEventListener("click",We),Me.escape&&window.removeEventListener("keydown",f),S&&!Re&&(null===(e=Z.current)||void 0===e||e.removeEventListener("mouseenter",g),null===(t=Z.current)||void 0===t||t.removeEventListener("mouseleave",b)),p.forEach((({event:e,listener:t})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(e,t)}))}))}}),[W,Xe,ae,he,be,T,k,A,Ce,g,b]),(0,a.useEffect)((()=>{var e,n;let o=null!==(n=null!==(e=null==ce?void 0:ce.anchorSelect)&&void 0!==e?e:l)&&void 0!==n?n:"";!o&&t&&(o=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const n=[],r=[];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&&r.push(e.target)),"childList"===e.type){if(W){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,W))&&(se(!1),Le(!1),V(null),Oe(Q),Oe(te),!0)}))}if(o)try{const t=[...e.addedNodes].filter((e=>1===e.nodeType));n.push(...t.filter((e=>e.matches(o)))),n.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(n.length||r.length)&&xe((e=>[...e.filter((e=>!r.includes(e))),...n]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[t,l,null==ce?void 0:ce.anchorSelect,W]),(0,a.useEffect)((()=>{Xe()}),[Xe]),(0,a.useEffect)((()=>{if(!(null==F?void 0:F.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Xe()))}));return e.observe(F.current),()=>{e.disconnect()}}),[I,null==F?void 0:F.current]),(0,a.useEffect)((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...be,t];W&&n.includes(W)||V(null!==(e=be[0])&&void 0!==e?e:t)}),[i,be,W]),(0,a.useEffect)((()=>(H&&Le(!0),()=>{Oe(Q),Oe(te)})),[]),(0,a.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));xe(e)}catch(e){xe([])}}),[t,l,null==ce?void 0:ce.anchorSelect]),(0,a.useEffect)((()=>{Q.current&&(Oe(Q),je(g))}),[g]);const Ge=null!==(K=null==ce?void 0:ce.content)&&void 0!==K?K:I,Ke=ie&&Object.keys(oe.tooltipStyles).length>0;return(0,a.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)?je(e.delay):Le(!0)},close:e=>{(null==e?void 0:e.delay)?Ie(e.delay):Le(!1)},activeAnchor:W,place:oe.place,isOpen:Boolean(ae&&!x&&Ge&&Ke)}))),ae&&!x&&Ge?a.createElement(v,{id:t,role:G,className:pe("react-tooltip",ke.tooltip,Ae.tooltip,Ae[r],n,`react-tooltip__place-${oe.place}`,ke[Ke?"show":"closing"],Ke?"react-tooltip__show":"react-tooltip__closing","fixed"===m&&ke.fixed,S&&ke.clickable),onTransitionEnd:e=>{Oe(ne),ie||"opacity"!==e.propertyName||(se(!1),ue(null),null==D||D())},style:{...N,...oe.tooltipStyles,opacity:void 0!==q&&Ke?q:void 0},ref:Z},Ge,a.createElement(v,{className:pe("react-tooltip-arrow",ke.arrow,Ae.arrow,o,E&&ke.noArrow),style:{...oe.tooltipArrowStyles,background:$?`linear-gradient(to right bottom, transparent 50%, ${$} 50%)`:void 0},ref:J})):null},Ne=({content:e})=>a.createElement("span",{dangerouslySetInnerHTML:{__html:e}});a.forwardRef((({id:e,anchorId:t,anchorSelect:n,content:o,html:r,render:i,className:l,classNameArrow:s,variant:c="dark",place:u="top",offset:d=10,wrapper:f="div",children:p=null,events:h=["hover"],openOnClick:m=!1,positionStrategy:y="absolute",middlewares:v,delayShow:g=0,delayHide:b=0,float:w=!1,hidden:x=!1,noArrow:E=!1,clickable:S=!1,closeOnEsc:O=!1,closeOnScroll:_=!1,closeOnResize:C=!1,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R=!1,style:N,position:P,isOpen:M,defaultIsOpen:L=!1,disableStyleInjection:D=!1,border:j,opacity:I,arrowColor:F,setIsOpen:B,afterShow:H,afterHide:U,disableTooltip:W,role:V="tooltip"},z)=>{const[q,$]=(0,a.useState)(o),[X,G]=(0,a.useState)(r),[K,Y]=(0,a.useState)(u),[Z,J]=(0,a.useState)(c),[Q,ee]=(0,a.useState)(d),[te,ne]=(0,a.useState)(g),[oe,re]=(0,a.useState)(b),[ie,le]=(0,a.useState)(w),[ae,se]=(0,a.useState)(x),[ce,ue]=(0,a.useState)(f),[de,fe]=(0,a.useState)(h),[he,me]=(0,a.useState)(y),[ye,ge]=(0,a.useState)(null),[be,we]=(0,a.useState)(null),xe=(0,a.useRef)(D),{anchorRefs:Ee,activeAnchor:Se}=Te(e),Oe=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var o;return n.startsWith("data-tooltip-")&&(t[n.replace(/^data-tooltip-/,"")]=null!==(o=null==e?void 0:e.getAttribute(n))&&void 0!==o?o:null),t}),{}),_e=e=>{const t={place:e=>{var t;Y(null!==(t=e)&&void 0!==t?t:u)},content:e=>{$(null!=e?e:o)},html:e=>{G(null!=e?e:r)},variant:e=>{var t;J(null!==(t=e)&&void 0!==t?t:c)},offset:e=>{ee(null===e?d:Number(e))},wrapper:e=>{var t;ue(null!==(t=e)&&void 0!==t?t:f)},events:e=>{const t=null==e?void 0:e.split(" ");fe(null!=t?t:h)},"position-strategy":e=>{var t;me(null!==(t=e)&&void 0!==t?t:y)},"delay-show":e=>{ne(null===e?g:Number(e))},"delay-hide":e=>{re(null===e?b:Number(e))},float:e=>{le(null===e?w:"true"===e)},hidden:e=>{se(null===e?x:"true"===e)},"class-name":e=>{ge(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var o;null===(o=t[e])||void 0===o||o.call(t,n)}))};(0,a.useEffect)((()=>{$(o)}),[o]),(0,a.useEffect)((()=>{G(r)}),[r]),(0,a.useEffect)((()=>{Y(u)}),[u]),(0,a.useEffect)((()=>{J(c)}),[c]),(0,a.useEffect)((()=>{ee(d)}),[d]),(0,a.useEffect)((()=>{ne(g)}),[g]),(0,a.useEffect)((()=>{re(b)}),[b]),(0,a.useEffect)((()=>{le(w)}),[w]),(0,a.useEffect)((()=>{se(x)}),[x]),(0,a.useEffect)((()=>{me(y)}),[y]),(0,a.useEffect)((()=>{xe.current!==D&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[D]),(0,a.useEffect)((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===D,disableBase:D}}))}),[]),(0,a.useEffect)((()=>{var o;const r=new Set(Ee);let i=n;if(!i&&e&&(i=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),i)try{document.querySelectorAll(i).forEach((e=>{r.add({current:e})}))}catch(o){console.warn(`[react-tooltip] "${i}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&r.add({current:l}),!r.size)return()=>null;const a=null!==(o=null!=be?be:l)&&void 0!==o?o:Se.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Oe(a);_e(n)}))})),c={attributes:!0,childList:!1,subtree:!1};if(a){const e=Oe(a);_e(e),s.observe(a,c)}return()=>{s.disconnect()}}),[Ee,Se,be,t,n]),(0,a.useEffect)((()=>{(null==N?void 0:N.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),j&&!ve("border",`${j}`)&&console.warn(`[react-tooltip] "${j}" is not a valid \`border\`.`),(null==N?void 0:N.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),I&&!ve("opacity",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`)}),[]);let Ce=p;const ke=(0,a.useRef)(null);if(i){const e=i({content:(null==be?void 0:be.getAttribute("data-tooltip-content"))||q||null,activeAnchor:be});Ce=e?a.createElement("div",{ref:ke,className:"react-tooltip-content-wrapper"},e):null}else q&&(Ce=q);X&&(Ce=a.createElement(Ne,{content:X}));const Ae={forwardRef:z,id:e,anchorId:t,anchorSelect:n,className:pe(l,ye),classNameArrow:s,content:Ce,contentWrapperRef:ke,place:K,variant:Z,offset:Q,wrapper:ce,events:de,openOnClick:m,positionStrategy:he,middlewares:v,delayShow:te,delayHide:oe,float:ie,hidden:ae,noArrow:E,clickable:S,closeOnEsc:O,closeOnScroll:_,closeOnResize:C,openEvents:T,closeEvents:k,globalCloseEvents:A,imperativeModeOnly:R,style:N,position:P,isOpen:M,defaultIsOpen:L,border:j,opacity:I,arrowColor:F,setIsOpen:B,afterShow:H,afterHide:U,disableTooltip:W,activeAnchor:be,setActiveAnchor:e=>we(e),role:V};return a.createElement(Re,{...Ae})})),"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||me({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||me({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 Pe=window.wp.element,Me=(window.wp.apiFetch,window.ReactJSXRuntime),Le=window.wp.data,De=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"gatherpress/rsvp-v2","version":"2.0.0","title":"RSVP V2","category":"gatherpress","icon":"insert","example":{},"description":"Enables members to easily confirm their attendance for an event.","attributes":{"initialLabel":{"type":"string","default":"RSVP"},"interactedLabel":{"type":"string","default":"Edit RSVP"}},"supports":{"html":false},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","viewScriptModule":"file:./view.js"}');(0,o.registerBlockType)(De,{edit:()=>{const e=(0,r.useBlockProps)(),[t,n]=(0,Pe.useState)((0,l.__)("RSVP","gatherpress")),[o,a]=(0,Pe.useState)((0,l.__)("Edit RSVP","gatherpress")),s=(0,Le.useSelect)((e=>e("core/block-editor").getSelectedBlock()?.clientId),[]),c=(0,Le.useSelect)((e=>s?e("core/block-editor").getBlocks(s):[]),[s]),u=e=>{for(const t of e){if("core/button"===t.name)return t;if(t.innerBlocks.length>0){const e=u(t.innerBlocks);if(e)return e}}return null};(0,Pe.useEffect)((()=>{const e=u(c);e&&(0,Le.dispatch)("core/block-editor").updateBlockAttributes(e.clientId,{text:t})}),[t,c]);const d=(0,Le.useSelect)((e=>e("core/block-editor").getSelectedBlock()),[]);(0,Pe.useEffect)((()=>{d&&"core/button"===d.name&&d.attributes?.className.includes("gatherpress-rsvp-v2")&&(console.log(d.attributes),console.log("Selected block is core/button"))}),[d]);const f=[["core/buttons",{align:"center",layout:{type:"flex",justifyContent:"center"}},[["core/button",{text:t,tagName:"button",className:"gatherpress-rsvp-v2"}]]]];return(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)(r.InspectorControls,{children:(0,Me.jsxs)(i.PanelBody,{children:[(0,Me.jsx)(i.TextControl,{label:(0,l.__)("Initial Label","gatherpress"),value:t,onChange:e=>n(e)}),(0,Me.jsx)(i.TextControl,{label:(0,l.__)("Interacted Label","gatherpress"),value:o,onChange:e=>a(e)})]})}),(0,Me.jsx)("div",{...e,children:(0,Me.jsx)(r.InnerBlocks,{template:f,templateLock:"all",renderAppender:!1})})]})},save:()=>(0,Me.jsx)("div",{...r.useBlockProps.save(),children:(0,Me.jsx)(r.InnerBlocks.Content,{})})})},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 o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),l=n(6957);r(n(6957),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=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=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,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,o=new l.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===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=s,t.default=s},6957:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=f;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=p;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=l.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=h;var m=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?l.ElementType.Script:"style"===t?l.ElementType.Style:l.ElementType.Tag);var i=e.call(this,o)||this;return i.name=t,i.attribs=n,i.type=r,i}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}}))},enumerable:!1,configurable:!0}),t}(f);function y(e){return(0,l.isTag)(e)}function v(e){return e.type===l.ElementType.CDATA}function g(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(e,t){var n;if(void 0===t&&(t=!1),g(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var o=t?S(e.children):[],r=new m(e.name,i({},e.attribs),o);o.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=r}else if(v(e)){o=t?S(e.children):[];var l=new p(o);o.forEach((function(e){return e.parent=l})),n=l}else if(x(e)){o=t?S(e.children):[];var a=new h(o);o.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function S(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{var o;!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},5270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},5496:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),f=d&&d[1]?d[1].toLowerCase():"";switch(f){case n:var h=c(e);return l.test(e)||null===(t=null==(y=h.querySelector(o))?void 0:y.parentNode)||void 0===t||t.removeChild(y),a.test(e)||null===(u=null==(y=h.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y),h.querySelectorAll(n);case o:case r:var m=s(e).querySelectorAll(f);return a.test(e)&&l.test(e)?m[0].parentNode.childNodes:m;default:return p?p(e):(y=s(e,r).querySelector(r)).childNodes;var y}};var n="html",o="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,l=//i,a=//i,s=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;s=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();s=function(e,t){if(t){var n=f.documentElement.querySelector(t);return n&&(n.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var p,h="object"==typeof document&&document.createElement("template");h&&h.content&&(p=function(e){return h.innerHTML=e,h.content.childNodes})},2471:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.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,r.default)(e),null,n)};var r=o(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,r){void 0===n&&(n=null);for(var a,s=[],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&&a[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var f=u.toLowerCase(),p=s(f);if(p){var h=(0,o.getPropertyInfo)(p);switch(i.includes(p)&&l.includes(t)&&!c&&(p=s("default"+f)),n[p]=d,h&&h.type){case o.BOOLEAN:n[p]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[p]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n};var o=n(4210),r=n(4958),i=["checked","value"],l=["input","select","textarea"],a={reset:!0,submit:!0};function s(e){return o.possibleStandardNames[e]}},308:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var o=[],r="function"==typeof n.replace,c=n.transform||l.returnFirstArg,u=n.library||a,d=u.cloneElement,f=u.createElement,p=u.isValidElement,h=t.length,m=0;m1&&(v=d(v,{key:v.key||m})),o.push(c(v,y,m));continue}}if("text"!==y.type){var g=y,b={};s(g)?((0,l.setStyleProp)(g.attribs.style,g.attribs),b=g.attribs):g.attribs&&(b=(0,i.default)(g.attribs,g.name));var w=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(w=e(y.children,n));break;default:continue}h>1&&(b.key=m),o.push(c(f(y.name,b,w),y,m))}else{var x=!y.data.trim().length;if(x&&y.parent&&!(0,l.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&x)continue;o.push(c(y.data,y,m))}}return 1===o.length?o[0]:o};var r=n(1609),i=o(n(840)),l=n(4958),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return l.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,l.isCustomComponent)(e.name,e.attribs)}},442:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,l.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]};var r=o(n(2471));t.htmlToDOM=r.default;var i=o(n(840));t.attributesToProps=i.default;var l=o(n(308));t.domToReact=l.default;var a=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var s={lowerCaseAttributeNames:!1}},4958:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=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,a)}catch(e){t.style={}}else t.style={}};var r=n(1609),i=o(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"]),a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,f=1;function p(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");f=~o?e.length-o:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=s.source}m.prototype.content=e;var y=[];function v(t){var n=new Error(s.source+":"+d+":"+f+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=f,n.source=e,!s.silent)throw n;y.push(n)}function g(t){var n=t.exec(e);if(n){var o=n[0];return p(o),e=e.slice(o.length),n}}function b(){g(o)}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 o=e.slice(2,n-2);return f+=2,p(o),e=e.slice(n),f+=2,t({type:"comment",comment:o})}}function E(){var e=h(),n=g(r);if(n){if(x(),!g(i))return v("property missing ':'");var o=g(l),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return g(a),s}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,l){if(l!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1345:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==a){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&0==(g-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(s.returnFocus(n.props.preventScroll),s.teardownScopedFocus()):s.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(s.setupScopedFocus(n.node),s.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},i=o.base;return n.state.afterOpen&&(i=i+" "+o.afterOpen),n.state.beforeClose&&(i=i+" "+o.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName,i=e.parentSelector,l=i&&i().ownerDocument||document;r&&d.add(l.body,r),o&&d.add(l.getElementsByTagName("html")[0],o),n&&(g+=1,u.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,l=e.children,a=n?{}:i.content,s=r?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=o({id:t,ref:this.setContentRef,style:o({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",o({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,l);return this.props.overlayElement(c,d)}}]),t}(l.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(p.default),a.default.instanceOf(f.SafeHTMLCollection),a.default.instanceOf(f.SafeNodeList),a.default.arrayOf(a.default.instanceOf(p.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){l&&(l.removeAttribute?l.removeAttribute("aria-hidden"):null!=l.length?l.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(l).forEach((function(e){return e.removeAttribute("aria-hidden")}))),l=null},t.log=function(){},t.assertNodeList=a,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);a(n,t),t=n}return l=t||l},t.validateElement=s,t.hide=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.setAttribute("aria-hidden","true")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.show=function(e){var t=!0,n=!1,o=void 0;try{for(var r,i=s(e)[Symbol.iterator]();!(t=(r=i.next()).done);t=!0)r.value.removeAttribute("aria-hidden")}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}},t.documentNotReadyOrSSRTesting=function(){l=null};var o,r=(o=n(9771))&&o.__esModule?o:{default:o},i=n(834),l=null;function a(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function s(e){var t=e||l;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,r.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,l],t=0;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)r(e,n[t]);var i=document.body;for(var l in o)r(i,o[l]);n={},o={}},t.log=function(){};var n={},o={};function r(e,t){e.classList.remove(t)}t.add=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),r.add(e)}));var r,i},t.remove=function(e,t){return r=e.classList,i="html"==e.nodeName.toLowerCase()?n:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&r.remove(e)}));var r,i}},7791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=s,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",s,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",s),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",s),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",s),document.detachEvent("onFocus",c))};var o,r=(o=n(2411))&&o.__esModule?o:{default:o},i=[],l=null,a=!1;function s(){a=!0}function c(){if(a){if(a=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,r.default)(l)[0]||l).focus()}),0)}}},9628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new n;t.default=o},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var o,r=((o=n(411))&&o.__esModule?o:{default:o}).default,i=r.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=r.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=r.canUseDOM?window.NodeList:{},t.canUseDOM=r.canUseDOM,t.default=i},7067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.default)(e);if(n.length){var o=void 0,l=t.shiftKey,a=n[0],s=n[n.length-1],c=i();if(e===c){if(!l)return;o=s}if(s!==c||l||(o=a),a===c&&l&&(o=s),o)return t.preventDefault(),void o.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=l?-1:1),void 0===(o=n[d]))return t.preventDefault(),void(o=l?s:a).focus();t.preventDefault(),o.focus()}}else t.preventDefault()};var o,r=(o=n(2411))&&o.__esModule?o:{default:o};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(l)};var n="none",o="contents",r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var r=window.getComputedStyle(e),i=r.getPropertyValue("display");return t?i!==o&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,r):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function l(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=(o=n(1720))&&o.__esModule?o:{default:o};t.default=r.default,e.exports=t.default},4210:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,l){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new o(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));const 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);r[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,l);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)})),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:a,SAME:s,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===s?e[t]=t:n===a?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},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 o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),r=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,(function(e,o){e&&o&&(n[(0,r.camelCase)(e,t)]=o)})),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_-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,s):e.replace(i,s)).replace(o,a))}},1133:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),i="function"==typeof t;return o.forEach((function(e){if("declaration"===e.type){var o=e.property,r=e.value;i?t(o,r,e):r&&((n=n||{})[o]=r)}})),n};var r=o(n(9788))},9771:e=>{"use strict";e.exports=function(){}},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},6942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{if(!n){var l=1/0;for(u=0;u=i)&&Object.keys(o.O).every((e=>o.O[e](n[s])))?n.splice(s--,1):(a=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,r,i]},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={345:0,525:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,l=n[0],a=n[1],s=n[2],c=0;if(l.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(s)var u=s(o)}for(t&&t(n);co(6858)));r=o.O(r)})(); \ No newline at end of file diff --git a/build/blocks/rsvp-v2/render.php b/build/blocks/rsvp-v2/render.php new file mode 100644 index 000000000..e69de29bb diff --git a/build/blocks/rsvp-v2/rsvp.asset.php b/build/blocks/rsvp-v2/rsvp.asset.php new file mode 100644 index 000000000..8097fc3d9 --- /dev/null +++ b/build/blocks/rsvp-v2/rsvp.asset.php @@ -0,0 +1 @@ + array(), 'version' => '53c9ce41d3505b646b57'); diff --git a/build/blocks/rsvp-v2/rsvp.js b/build/blocks/rsvp-v2/rsvp.js new file mode 100644 index 000000000..b356975ec --- /dev/null +++ b/build/blocks/rsvp-v2/rsvp.js @@ -0,0 +1,7 @@ +/******/ (() => { // webpackBootstrap +/*!************************************!*\ + !*** ./src/blocks/rsvp-v2/rsvp.js ***! + \************************************/ + +/******/ })() +; \ No newline at end of file diff --git a/build/blocks/rsvp-v2/style-index-rtl.css b/build/blocks/rsvp-v2/style-index-rtl.css new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/build/blocks/rsvp-v2/style-index-rtl.css @@ -0,0 +1 @@ + diff --git a/build/blocks/rsvp-v2/style-index.css b/build/blocks/rsvp-v2/style-index.css new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/build/blocks/rsvp-v2/style-index.css @@ -0,0 +1 @@ + diff --git a/build/blocks/rsvp-v2/view.asset.php b/build/blocks/rsvp-v2/view.asset.php new file mode 100644 index 000000000..7650da5d5 --- /dev/null +++ b/build/blocks/rsvp-v2/view.asset.php @@ -0,0 +1 @@ + array('@wordpress/interactivity'), 'version' => 'f285ede869908987996d', 'type' => 'module'); diff --git a/build/blocks/rsvp-v2/view.js b/build/blocks/rsvp-v2/view.js new file mode 100644 index 000000000..a0723b544 --- /dev/null +++ b/build/blocks/rsvp-v2/view.js @@ -0,0 +1 @@ +import*as t from"@wordpress/interactivity";var r={d:(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r)};var e,o;(0,(e={store:()=>t.store},o={},r.d(o,e),o).store)("my-plugin/button-interactivity",{actions:{logSomething(){alert("hi")}}}); \ No newline at end of file diff --git a/build/variations/rsvp/index.asset.php b/build/variations/rsvp/index.asset.php new file mode 100644 index 000000000..e3ce02ad9 --- /dev/null +++ b/build/variations/rsvp/index.asset.php @@ -0,0 +1 @@ + array('wp-blocks', 'wp-i18n', 'wp-interactivity'), 'version' => '3e4275127457739ba94a'); diff --git a/build/variations/rsvp/index.js b/build/variations/rsvp/index.js new file mode 100644 index 000000000..944a77535 --- /dev/null +++ b/build/variations/rsvp/index.js @@ -0,0 +1 @@ +(()=>{"use strict";const t=window.wp.blocks;window.wp.i18n,window.wp.interactivity,(0,t.registerBlockVariation)("core/group",{name:"single-button-group",title:"Single Button Group",icon:"button",attributes:{align:"center"},innerBlocks:[["core/button",{text:"Attend"}]],isDefault:!1})})(); \ No newline at end of file diff --git a/build/vendors-node_modules_leaflet_dist_leaflet-src_js.js b/build/vendors-node_modules_leaflet_dist_leaflet-src_js.js deleted file mode 100644 index 2300fb85a..000000000 --- a/build/vendors-node_modules_leaflet_dist_leaflet-src_js.js +++ /dev/null @@ -1,14525 +0,0 @@ -(self["webpackChunkgatherpress"] = self["webpackChunkgatherpress"] || []).push([["vendors-node_modules_leaflet_dist_leaflet-src_js"],{ - -/***/ "./node_modules/leaflet/dist/leaflet-src.js": -/*!**************************************************!*\ - !*** ./node_modules/leaflet/dist/leaflet-src.js ***! - \**************************************************/ -/***/ (function(__unused_webpack_module, exports) { - -/* @preserve - * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */ - -(function (global, factory) { - true ? factory(exports) : - 0; -})(this, (function (exports) { 'use strict'; - - var version = "1.9.4"; - - /* - * @namespace Util - * - * Various utility functions, used by Leaflet internally. - */ - - // @function extend(dest: Object, src?: Object): Object - // Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut. - function extend(dest) { - var i, j, len, src; - - for (j = 1, len = arguments.length; j < len; j++) { - src = arguments[j]; - for (i in src) { - dest[i] = src[i]; - } - } - return dest; - } - - // @function create(proto: Object, properties?: Object): Object - // Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create) - var create$2 = Object.create || (function () { - function F() {} - return function (proto) { - F.prototype = proto; - return new F(); - }; - })(); - - // @function bind(fn: Function, …): Function - // Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). - // Has a `L.bind()` shortcut. - function bind(fn, obj) { - var slice = Array.prototype.slice; - - if (fn.bind) { - return fn.bind.apply(fn, slice.call(arguments, 1)); - } - - var args = slice.call(arguments, 2); - - return function () { - return fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments); - }; - } - - // @property lastId: Number - // Last unique ID used by [`stamp()`](#util-stamp) - var lastId = 0; - - // @function stamp(obj: Object): Number - // Returns the unique ID of an object, assigning it one if it doesn't have it. - function stamp(obj) { - if (!('_leaflet_id' in obj)) { - obj['_leaflet_id'] = ++lastId; - } - return obj._leaflet_id; - } - - // @function throttle(fn: Function, time: Number, context: Object): Function - // Returns a function which executes function `fn` with the given scope `context` - // (so that the `this` keyword refers to `context` inside `fn`'s code). The function - // `fn` will be called no more than one time per given amount of `time`. The arguments - // received by the bound function will be any arguments passed when binding the - // function, followed by any arguments passed when invoking the bound function. - // Has an `L.throttle` shortcut. - function throttle(fn, time, context) { - var lock, args, wrapperFn, later; - - later = function () { - // reset lock and call if queued - lock = false; - if (args) { - wrapperFn.apply(context, args); - args = false; - } - }; - - wrapperFn = function () { - if (lock) { - // called too soon, queue to call later - args = arguments; - - } else { - // call and lock until later - fn.apply(context, arguments); - setTimeout(later, time); - lock = true; - } - }; - - return wrapperFn; - } - - // @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number - // Returns the number `num` modulo `range` in such a way so it lies within - // `range[0]` and `range[1]`. The returned value will be always smaller than - // `range[1]` unless `includeMax` is set to `true`. - function wrapNum(x, range, includeMax) { - var max = range[1], - min = range[0], - d = max - min; - return x === max && includeMax ? x : ((x - min) % d + d) % d + min; - } - - // @function falseFn(): Function - // Returns a function which always returns `false`. - function falseFn() { return false; } - - // @function formatNum(num: Number, precision?: Number|false): Number - // Returns the number `num` rounded with specified `precision`. - // The default `precision` value is 6 decimal places. - // `false` can be passed to skip any processing (can be useful to avoid round-off errors). - function formatNum(num, precision) { - if (precision === false) { return num; } - var pow = Math.pow(10, precision === undefined ? 6 : precision); - return Math.round(num * pow) / pow; - } - - // @function trim(str: String): String - // Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) - function trim(str) { - return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); - } - - // @function splitWords(str: String): String[] - // Trims and splits the string on whitespace and returns the array of parts. - function splitWords(str) { - return trim(str).split(/\s+/); - } - - // @function setOptions(obj: Object, options: Object): Object - // Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut. - function setOptions(obj, options) { - if (!Object.prototype.hasOwnProperty.call(obj, 'options')) { - obj.options = obj.options ? create$2(obj.options) : {}; - } - for (var i in options) { - obj.options[i] = options[i]; - } - return obj.options; - } - - // @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String - // Converts an object into a parameter URL string, e.g. `{a: "foo", b: "bar"}` - // translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will - // be appended at the end. If `uppercase` is `true`, the parameter names will - // be uppercased (e.g. `'?A=foo&B=bar'`) - function getParamString(obj, existingUrl, uppercase) { - var params = []; - for (var i in obj) { - params.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i])); - } - return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&'); - } - - var templateRe = /\{ *([\w_ -]+) *\}/g; - - // @function template(str: String, data: Object): String - // Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'` - // and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string - // `('Hello foo, bar')`. You can also specify functions instead of strings for - // data values — they will be evaluated passing `data` as an argument. - function template(str, data) { - return str.replace(templateRe, function (str, key) { - var value = data[key]; - - if (value === undefined) { - throw new Error('No value provided for variable ' + str); - - } else if (typeof value === 'function') { - value = value(data); - } - return value; - }); - } - - // @function isArray(obj): Boolean - // Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) - var isArray = Array.isArray || function (obj) { - return (Object.prototype.toString.call(obj) === '[object Array]'); - }; - - // @function indexOf(array: Array, el: Object): Number - // Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) - function indexOf(array, el) { - for (var i = 0; i < array.length; i++) { - if (array[i] === el) { return i; } - } - return -1; - } - - // @property emptyImageUrl: String - // Data URI string containing a base64-encoded empty GIF image. - // Used as a hack to free memory from unused images on WebKit-powered - // mobile devices (by setting image `src` to this string). - var emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='; - - // inspired by https://paulirish.com/2011/requestanimationframe-for-smart-animating/ - - function getPrefixed(name) { - return window['webkit' + name] || window['moz' + name] || window['ms' + name]; - } - - var lastTime = 0; - - // fallback for IE 7-8 - function timeoutDefer(fn) { - var time = +new Date(), - timeToCall = Math.max(0, 16 - (time - lastTime)); - - lastTime = time + timeToCall; - return window.setTimeout(fn, timeToCall); - } - - var requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer; - var cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') || - getPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); }; - - // @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number - // Schedules `fn` to be executed when the browser repaints. `fn` is bound to - // `context` if given. When `immediate` is set, `fn` is called immediately if - // the browser doesn't have native support for - // [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame), - // otherwise it's delayed. Returns a request ID that can be used to cancel the request. - function requestAnimFrame(fn, context, immediate) { - if (immediate && requestFn === timeoutDefer) { - fn.call(context); - } else { - return requestFn.call(window, bind(fn, context)); - } - } - - // @function cancelAnimFrame(id: Number): undefined - // Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame). - function cancelAnimFrame(id) { - if (id) { - cancelFn.call(window, id); - } - } - - var Util = { - __proto__: null, - extend: extend, - create: create$2, - bind: bind, - get lastId () { return lastId; }, - stamp: stamp, - throttle: throttle, - wrapNum: wrapNum, - falseFn: falseFn, - formatNum: formatNum, - trim: trim, - splitWords: splitWords, - setOptions: setOptions, - getParamString: getParamString, - template: template, - isArray: isArray, - indexOf: indexOf, - emptyImageUrl: emptyImageUrl, - requestFn: requestFn, - cancelFn: cancelFn, - requestAnimFrame: requestAnimFrame, - cancelAnimFrame: cancelAnimFrame - }; - - // @class Class - // @aka L.Class - - // @section - // @uninheritable - - // Thanks to John Resig and Dean Edwards for inspiration! - - function Class() {} - - Class.extend = function (props) { - - // @function extend(props: Object): Function - // [Extends the current class](#class-inheritance) given the properties to be included. - // Returns a Javascript function that is a class constructor (to be called with `new`). - var NewClass = function () { - - setOptions(this); - - // call the constructor - if (this.initialize) { - this.initialize.apply(this, arguments); - } - - // call all constructor hooks - this.callInitHooks(); - }; - - var parentProto = NewClass.__super__ = this.prototype; - - var proto = create$2(parentProto); - proto.constructor = NewClass; - - NewClass.prototype = proto; - - // inherit parent's statics - for (var i in this) { - if (Object.prototype.hasOwnProperty.call(this, i) && i !== 'prototype' && i !== '__super__') { - NewClass[i] = this[i]; - } - } - - // mix static properties into the class - if (props.statics) { - extend(NewClass, props.statics); - } - - // mix includes into the prototype - if (props.includes) { - checkDeprecatedMixinEvents(props.includes); - extend.apply(null, [proto].concat(props.includes)); - } - - // mix given properties into the prototype - extend(proto, props); - delete proto.statics; - delete proto.includes; - - // merge options - if (proto.options) { - proto.options = parentProto.options ? create$2(parentProto.options) : {}; - extend(proto.options, props.options); - } - - proto._initHooks = []; - - // add method for calling all hooks - proto.callInitHooks = function () { - - if (this._initHooksCalled) { return; } - - if (parentProto.callInitHooks) { - parentProto.callInitHooks.call(this); - } - - this._initHooksCalled = true; - - for (var i = 0, len = proto._initHooks.length; i < len; i++) { - proto._initHooks[i].call(this); - } - }; - - return NewClass; - }; - - - // @function include(properties: Object): this - // [Includes a mixin](#class-includes) into the current class. - Class.include = function (props) { - var parentOptions = this.prototype.options; - extend(this.prototype, props); - if (props.options) { - this.prototype.options = parentOptions; - this.mergeOptions(props.options); - } - return this; - }; - - // @function mergeOptions(options: Object): this - // [Merges `options`](#class-options) into the defaults of the class. - Class.mergeOptions = function (options) { - extend(this.prototype.options, options); - return this; - }; - - // @function addInitHook(fn: Function): this - // Adds a [constructor hook](#class-constructor-hooks) to the class. - Class.addInitHook = function (fn) { // (Function) || (String, args...) - var args = Array.prototype.slice.call(arguments, 1); - - var init = typeof fn === 'function' ? fn : function () { - this[fn].apply(this, args); - }; - - this.prototype._initHooks = this.prototype._initHooks || []; - this.prototype._initHooks.push(init); - return this; - }; - - function checkDeprecatedMixinEvents(includes) { - /* global L: true */ - if (typeof L === 'undefined' || !L || !L.Mixin) { return; } - - includes = isArray(includes) ? includes : [includes]; - - for (var i = 0; i < includes.length; i++) { - if (includes[i] === L.Mixin.Events) { - console.warn('Deprecated include of L.Mixin.Events: ' + - 'this property will be removed in future releases, ' + - 'please inherit from L.Evented instead.', new Error().stack); - } - } - } - - /* - * @class Evented - * @aka L.Evented - * @inherits Class - * - * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event). - * - * @example - * - * ```js - * map.on('click', function(e) { - * alert(e.latlng); - * } ); - * ``` - * - * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function: - * - * ```js - * function onClick(e) { ... } - * - * map.on('click', onClick); - * map.off('click', onClick); - * ``` - */ - - var Events = { - /* @method on(type: String, fn: Function, context?: Object): this - * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`). - * - * @alternative - * @method on(eventMap: Object): this - * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` - */ - on: function (types, fn, context) { - - // types can be a map of types/handlers - if (typeof types === 'object') { - for (var type in types) { - // we don't process space-separated events here for performance; - // it's a hot path since Layer uses the on(obj) syntax - this._on(type, types[type], fn); - } - - } else { - // types can be a string of space-separated words - types = splitWords(types); - - for (var i = 0, len = types.length; i < len; i++) { - this._on(types[i], fn, context); - } - } - - return this; - }, - - /* @method off(type: String, fn?: Function, context?: Object): this - * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener. - * - * @alternative - * @method off(eventMap: Object): this - * Removes a set of type/listener pairs. - * - * @alternative - * @method off: this - * Removes all listeners to all events on the object. This includes implicitly attached events. - */ - off: function (types, fn, context) { - - if (!arguments.length) { - // clear all listeners if called without arguments - delete this._events; - - } else if (typeof types === 'object') { - for (var type in types) { - this._off(type, types[type], fn); - } - - } else { - types = splitWords(types); - - var removeAll = arguments.length === 1; - for (var i = 0, len = types.length; i < len; i++) { - if (removeAll) { - this._off(types[i]); - } else { - this._off(types[i], fn, context); - } - } - } - - return this; - }, - - // attach listener (without syntactic sugar now) - _on: function (type, fn, context, _once) { - if (typeof fn !== 'function') { - console.warn('wrong listener type: ' + typeof fn); - return; - } - - // check if fn already there - if (this._listens(type, fn, context) !== false) { - return; - } - - if (context === this) { - // Less memory footprint. - context = undefined; - } - - var newListener = {fn: fn, ctx: context}; - if (_once) { - newListener.once = true; - } - - this._events = this._events || {}; - this._events[type] = this._events[type] || []; - this._events[type].push(newListener); - }, - - _off: function (type, fn, context) { - var listeners, - i, - len; - - if (!this._events) { - return; - } - - listeners = this._events[type]; - if (!listeners) { - return; - } - - if (arguments.length === 1) { // remove all - if (this._firingCount) { - // Set all removed listeners to noop - // so they are not called if remove happens in fire - for (i = 0, len = listeners.length; i < len; i++) { - listeners[i].fn = falseFn; - } - } - // clear all listeners for a type if function isn't specified - delete this._events[type]; - return; - } - - if (typeof fn !== 'function') { - console.warn('wrong listener type: ' + typeof fn); - return; - } - - // find fn and remove it - var index = this._listens(type, fn, context); - if (index !== false) { - var listener = listeners[index]; - if (this._firingCount) { - // set the removed listener to noop so that's not called if remove happens in fire - listener.fn = falseFn; - - /* copy array in case events are being fired */ - this._events[type] = listeners = listeners.slice(); - } - listeners.splice(index, 1); - } - }, - - // @method fire(type: String, data?: Object, propagate?: Boolean): this - // Fires an event of the specified type. You can optionally provide a data - // object — the first argument of the listener function will contain its - // properties. The event can optionally be propagated to event parents. - fire: function (type, data, propagate) { - if (!this.listens(type, propagate)) { return this; } - - var event = extend({}, data, { - type: type, - target: this, - sourceTarget: data && data.sourceTarget || this - }); - - if (this._events) { - var listeners = this._events[type]; - if (listeners) { - this._firingCount = (this._firingCount + 1) || 1; - for (var i = 0, len = listeners.length; i < len; i++) { - var l = listeners[i]; - // off overwrites l.fn, so we need to copy fn to a var - var fn = l.fn; - if (l.once) { - this.off(type, fn, l.ctx); - } - fn.call(l.ctx || this, event); - } - - this._firingCount--; - } - } - - if (propagate) { - // propagate the event to parents (set with addEventParent) - this._propagateEvent(event); - } - - return this; - }, - - // @method listens(type: String, propagate?: Boolean): Boolean - // @method listens(type: String, fn: Function, context?: Object, propagate?: Boolean): Boolean - // Returns `true` if a particular event type has any listeners attached to it. - // The verification can optionally be propagated, it will return `true` if parents have the listener attached to it. - listens: function (type, fn, context, propagate) { - if (typeof type !== 'string') { - console.warn('"string" type argument expected'); - } - - // we don't overwrite the input `fn` value, because we need to use it for propagation - var _fn = fn; - if (typeof fn !== 'function') { - propagate = !!fn; - _fn = undefined; - context = undefined; - } - - var listeners = this._events && this._events[type]; - if (listeners && listeners.length) { - if (this._listens(type, _fn, context) !== false) { - return true; - } - } - - if (propagate) { - // also check parents for listeners if event propagates - for (var id in this._eventParents) { - if (this._eventParents[id].listens(type, fn, context, propagate)) { return true; } - } - } - return false; - }, - - // returns the index (number) or false - _listens: function (type, fn, context) { - if (!this._events) { - return false; - } - - var listeners = this._events[type] || []; - if (!fn) { - return !!listeners.length; - } - - if (context === this) { - // Less memory footprint. - context = undefined; - } - - for (var i = 0, len = listeners.length; i < len; i++) { - if (listeners[i].fn === fn && listeners[i].ctx === context) { - return i; - } - } - return false; - - }, - - // @method once(…): this - // Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed. - once: function (types, fn, context) { - - // types can be a map of types/handlers - if (typeof types === 'object') { - for (var type in types) { - // we don't process space-separated events here for performance; - // it's a hot path since Layer uses the on(obj) syntax - this._on(type, types[type], fn, true); - } - - } else { - // types can be a string of space-separated words - types = splitWords(types); - - for (var i = 0, len = types.length; i < len; i++) { - this._on(types[i], fn, context, true); - } - } - - return this; - }, - - // @method addEventParent(obj: Evented): this - // Adds an event parent - an `Evented` that will receive propagated events - addEventParent: function (obj) { - this._eventParents = this._eventParents || {}; - this._eventParents[stamp(obj)] = obj; - return this; - }, - - // @method removeEventParent(obj: Evented): this - // Removes an event parent, so it will stop receiving propagated events - removeEventParent: function (obj) { - if (this._eventParents) { - delete this._eventParents[stamp(obj)]; - } - return this; - }, - - _propagateEvent: function (e) { - for (var id in this._eventParents) { - this._eventParents[id].fire(e.type, extend({ - layer: e.target, - propagatedFrom: e.target - }, e), true); - } - } - }; - - // aliases; we should ditch those eventually - - // @method addEventListener(…): this - // Alias to [`on(…)`](#evented-on) - Events.addEventListener = Events.on; - - // @method removeEventListener(…): this - // Alias to [`off(…)`](#evented-off) - - // @method clearAllEventListeners(…): this - // Alias to [`off()`](#evented-off) - Events.removeEventListener = Events.clearAllEventListeners = Events.off; - - // @method addOneTimeEventListener(…): this - // Alias to [`once(…)`](#evented-once) - Events.addOneTimeEventListener = Events.once; - - // @method fireEvent(…): this - // Alias to [`fire(…)`](#evented-fire) - Events.fireEvent = Events.fire; - - // @method hasEventListeners(…): Boolean - // Alias to [`listens(…)`](#evented-listens) - Events.hasEventListeners = Events.listens; - - var Evented = Class.extend(Events); - - /* - * @class Point - * @aka L.Point - * - * Represents a point with `x` and `y` coordinates in pixels. - * - * @example - * - * ```js - * var point = L.point(200, 300); - * ``` - * - * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent: - * - * ```js - * map.panBy([200, 300]); - * map.panBy(L.point(200, 300)); - * ``` - * - * Note that `Point` does not inherit from Leaflet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. - */ - - function Point(x, y, round) { - // @property x: Number; The `x` coordinate of the point - this.x = (round ? Math.round(x) : x); - // @property y: Number; The `y` coordinate of the point - this.y = (round ? Math.round(y) : y); - } - - var trunc = Math.trunc || function (v) { - return v > 0 ? Math.floor(v) : Math.ceil(v); - }; - - Point.prototype = { - - // @method clone(): Point - // Returns a copy of the current point. - clone: function () { - return new Point(this.x, this.y); - }, - - // @method add(otherPoint: Point): Point - // Returns the result of addition of the current and the given points. - add: function (point) { - // non-destructive, returns a new point - return this.clone()._add(toPoint(point)); - }, - - _add: function (point) { - // destructive, used directly for performance in situations where it's safe to modify existing point - this.x += point.x; - this.y += point.y; - return this; - }, - - // @method subtract(otherPoint: Point): Point - // Returns the result of subtraction of the given point from the current. - subtract: function (point) { - return this.clone()._subtract(toPoint(point)); - }, - - _subtract: function (point) { - this.x -= point.x; - this.y -= point.y; - return this; - }, - - // @method divideBy(num: Number): Point - // Returns the result of division of the current point by the given number. - divideBy: function (num) { - return this.clone()._divideBy(num); - }, - - _divideBy: function (num) { - this.x /= num; - this.y /= num; - return this; - }, - - // @method multiplyBy(num: Number): Point - // Returns the result of multiplication of the current point by the given number. - multiplyBy: function (num) { - return this.clone()._multiplyBy(num); - }, - - _multiplyBy: function (num) { - this.x *= num; - this.y *= num; - return this; - }, - - // @method scaleBy(scale: Point): Point - // Multiply each coordinate of the current point by each coordinate of - // `scale`. In linear algebra terms, multiply the point by the - // [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation) - // defined by `scale`. - scaleBy: function (point) { - return new Point(this.x * point.x, this.y * point.y); - }, - - // @method unscaleBy(scale: Point): Point - // Inverse of `scaleBy`. Divide each coordinate of the current point by - // each coordinate of `scale`. - unscaleBy: function (point) { - return new Point(this.x / point.x, this.y / point.y); - }, - - // @method round(): Point - // Returns a copy of the current point with rounded coordinates. - round: function () { - return this.clone()._round(); - }, - - _round: function () { - this.x = Math.round(this.x); - this.y = Math.round(this.y); - return this; - }, - - // @method floor(): Point - // Returns a copy of the current point with floored coordinates (rounded down). - floor: function () { - return this.clone()._floor(); - }, - - _floor: function () { - this.x = Math.floor(this.x); - this.y = Math.floor(this.y); - return this; - }, - - // @method ceil(): Point - // Returns a copy of the current point with ceiled coordinates (rounded up). - ceil: function () { - return this.clone()._ceil(); - }, - - _ceil: function () { - this.x = Math.ceil(this.x); - this.y = Math.ceil(this.y); - return this; - }, - - // @method trunc(): Point - // Returns a copy of the current point with truncated coordinates (rounded towards zero). - trunc: function () { - return this.clone()._trunc(); - }, - - _trunc: function () { - this.x = trunc(this.x); - this.y = trunc(this.y); - return this; - }, - - // @method distanceTo(otherPoint: Point): Number - // Returns the cartesian distance between the current and the given points. - distanceTo: function (point) { - point = toPoint(point); - - var x = point.x - this.x, - y = point.y - this.y; - - return Math.sqrt(x * x + y * y); - }, - - // @method equals(otherPoint: Point): Boolean - // Returns `true` if the given point has the same coordinates. - equals: function (point) { - point = toPoint(point); - - return point.x === this.x && - point.y === this.y; - }, - - // @method contains(otherPoint: Point): Boolean - // Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values). - contains: function (point) { - point = toPoint(point); - - return Math.abs(point.x) <= Math.abs(this.x) && - Math.abs(point.y) <= Math.abs(this.y); - }, - - // @method toString(): String - // Returns a string representation of the point for debugging purposes. - toString: function () { - return 'Point(' + - formatNum(this.x) + ', ' + - formatNum(this.y) + ')'; - } - }; - - // @factory L.point(x: Number, y: Number, round?: Boolean) - // Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values. - - // @alternative - // @factory L.point(coords: Number[]) - // Expects an array of the form `[x, y]` instead. - - // @alternative - // @factory L.point(coords: Object) - // Expects a plain object of the form `{x: Number, y: Number}` instead. - function toPoint(x, y, round) { - if (x instanceof Point) { - return x; - } - if (isArray(x)) { - return new Point(x[0], x[1]); - } - if (x === undefined || x === null) { - return x; - } - if (typeof x === 'object' && 'x' in x && 'y' in x) { - return new Point(x.x, x.y); - } - return new Point(x, y, round); - } - - /* - * @class Bounds - * @aka L.Bounds - * - * Represents a rectangular area in pixel coordinates. - * - * @example - * - * ```js - * var p1 = L.point(10, 10), - * p2 = L.point(40, 60), - * bounds = L.bounds(p1, p2); - * ``` - * - * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this: - * - * ```js - * otherBounds.intersects([[10, 10], [40, 60]]); - * ``` - * - * Note that `Bounds` does not inherit from Leaflet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. - */ - - function Bounds(a, b) { - if (!a) { return; } - - var points = b ? [a, b] : a; - - for (var i = 0, len = points.length; i < len; i++) { - this.extend(points[i]); - } - } - - Bounds.prototype = { - // @method extend(point: Point): this - // Extends the bounds to contain the given point. - - // @alternative - // @method extend(otherBounds: Bounds): this - // Extend the bounds to contain the given bounds - extend: function (obj) { - var min2, max2; - if (!obj) { return this; } - - if (obj instanceof Point || typeof obj[0] === 'number' || 'x' in obj) { - min2 = max2 = toPoint(obj); - } else { - obj = toBounds(obj); - min2 = obj.min; - max2 = obj.max; - - if (!min2 || !max2) { return this; } - } - - // @property min: Point - // The top left corner of the rectangle. - // @property max: Point - // The bottom right corner of the rectangle. - if (!this.min && !this.max) { - this.min = min2.clone(); - this.max = max2.clone(); - } else { - this.min.x = Math.min(min2.x, this.min.x); - this.max.x = Math.max(max2.x, this.max.x); - this.min.y = Math.min(min2.y, this.min.y); - this.max.y = Math.max(max2.y, this.max.y); - } - return this; - }, - - // @method getCenter(round?: Boolean): Point - // Returns the center point of the bounds. - getCenter: function (round) { - return toPoint( - (this.min.x + this.max.x) / 2, - (this.min.y + this.max.y) / 2, round); - }, - - // @method getBottomLeft(): Point - // Returns the bottom-left point of the bounds. - getBottomLeft: function () { - return toPoint(this.min.x, this.max.y); - }, - - // @method getTopRight(): Point - // Returns the top-right point of the bounds. - getTopRight: function () { // -> Point - return toPoint(this.max.x, this.min.y); - }, - - // @method getTopLeft(): Point - // Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)). - getTopLeft: function () { - return this.min; // left, top - }, - - // @method getBottomRight(): Point - // Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)). - getBottomRight: function () { - return this.max; // right, bottom - }, - - // @method getSize(): Point - // Returns the size of the given bounds - getSize: function () { - return this.max.subtract(this.min); - }, - - // @method contains(otherBounds: Bounds): Boolean - // Returns `true` if the rectangle contains the given one. - // @alternative - // @method contains(point: Point): Boolean - // Returns `true` if the rectangle contains the given point. - contains: function (obj) { - var min, max; - - if (typeof obj[0] === 'number' || obj instanceof Point) { - obj = toPoint(obj); - } else { - obj = toBounds(obj); - } - - if (obj instanceof Bounds) { - min = obj.min; - max = obj.max; - } else { - min = max = obj; - } - - return (min.x >= this.min.x) && - (max.x <= this.max.x) && - (min.y >= this.min.y) && - (max.y <= this.max.y); - }, - - // @method intersects(otherBounds: Bounds): Boolean - // Returns `true` if the rectangle intersects the given bounds. Two bounds - // intersect if they have at least one point in common. - intersects: function (bounds) { // (Bounds) -> Boolean - bounds = toBounds(bounds); - - var min = this.min, - max = this.max, - min2 = bounds.min, - max2 = bounds.max, - xIntersects = (max2.x >= min.x) && (min2.x <= max.x), - yIntersects = (max2.y >= min.y) && (min2.y <= max.y); - - return xIntersects && yIntersects; - }, - - // @method overlaps(otherBounds: Bounds): Boolean - // Returns `true` if the rectangle overlaps the given bounds. Two bounds - // overlap if their intersection is an area. - overlaps: function (bounds) { // (Bounds) -> Boolean - bounds = toBounds(bounds); - - var min = this.min, - max = this.max, - min2 = bounds.min, - max2 = bounds.max, - xOverlaps = (max2.x > min.x) && (min2.x < max.x), - yOverlaps = (max2.y > min.y) && (min2.y < max.y); - - return xOverlaps && yOverlaps; - }, - - // @method isValid(): Boolean - // Returns `true` if the bounds are properly initialized. - isValid: function () { - return !!(this.min && this.max); - }, - - - // @method pad(bufferRatio: Number): Bounds - // Returns bounds created by extending or retracting the current bounds by a given ratio in each direction. - // For example, a ratio of 0.5 extends the bounds by 50% in each direction. - // Negative values will retract the bounds. - pad: function (bufferRatio) { - var min = this.min, - max = this.max, - heightBuffer = Math.abs(min.x - max.x) * bufferRatio, - widthBuffer = Math.abs(min.y - max.y) * bufferRatio; - - - return toBounds( - toPoint(min.x - heightBuffer, min.y - widthBuffer), - toPoint(max.x + heightBuffer, max.y + widthBuffer)); - }, - - - // @method equals(otherBounds: Bounds): Boolean - // Returns `true` if the rectangle is equivalent to the given bounds. - equals: function (bounds) { - if (!bounds) { return false; } - - bounds = toBounds(bounds); - - return this.min.equals(bounds.getTopLeft()) && - this.max.equals(bounds.getBottomRight()); - }, - }; - - - // @factory L.bounds(corner1: Point, corner2: Point) - // Creates a Bounds object from two corners coordinate pairs. - // @alternative - // @factory L.bounds(points: Point[]) - // Creates a Bounds object from the given array of points. - function toBounds(a, b) { - if (!a || a instanceof Bounds) { - return a; - } - return new Bounds(a, b); - } - - /* - * @class LatLngBounds - * @aka L.LatLngBounds - * - * Represents a rectangular geographical area on a map. - * - * @example - * - * ```js - * var corner1 = L.latLng(40.712, -74.227), - * corner2 = L.latLng(40.774, -74.125), - * bounds = L.latLngBounds(corner1, corner2); - * ``` - * - * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this: - * - * ```js - * map.fitBounds([ - * [40.712, -74.227], - * [40.774, -74.125] - * ]); - * ``` - * - * Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range. - * - * Note that `LatLngBounds` does not inherit from Leaflet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. - */ - - function LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[]) - if (!corner1) { return; } - - var latlngs = corner2 ? [corner1, corner2] : corner1; - - for (var i = 0, len = latlngs.length; i < len; i++) { - this.extend(latlngs[i]); - } - } - - LatLngBounds.prototype = { - - // @method extend(latlng: LatLng): this - // Extend the bounds to contain the given point - - // @alternative - // @method extend(otherBounds: LatLngBounds): this - // Extend the bounds to contain the given bounds - extend: function (obj) { - var sw = this._southWest, - ne = this._northEast, - sw2, ne2; - - if (obj instanceof LatLng) { - sw2 = obj; - ne2 = obj; - - } else if (obj instanceof LatLngBounds) { - sw2 = obj._southWest; - ne2 = obj._northEast; - - if (!sw2 || !ne2) { return this; } - - } else { - return obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this; - } - - if (!sw && !ne) { - this._southWest = new LatLng(sw2.lat, sw2.lng); - this._northEast = new LatLng(ne2.lat, ne2.lng); - } else { - sw.lat = Math.min(sw2.lat, sw.lat); - sw.lng = Math.min(sw2.lng, sw.lng); - ne.lat = Math.max(ne2.lat, ne.lat); - ne.lng = Math.max(ne2.lng, ne.lng); - } - - return this; - }, - - // @method pad(bufferRatio: Number): LatLngBounds - // Returns bounds created by extending or retracting the current bounds by a given ratio in each direction. - // For example, a ratio of 0.5 extends the bounds by 50% in each direction. - // Negative values will retract the bounds. - pad: function (bufferRatio) { - var sw = this._southWest, - ne = this._northEast, - heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio, - widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio; - - return new LatLngBounds( - new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer), - new LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer)); - }, - - // @method getCenter(): LatLng - // Returns the center point of the bounds. - getCenter: function () { - return new LatLng( - (this._southWest.lat + this._northEast.lat) / 2, - (this._southWest.lng + this._northEast.lng) / 2); - }, - - // @method getSouthWest(): LatLng - // Returns the south-west point of the bounds. - getSouthWest: function () { - return this._southWest; - }, - - // @method getNorthEast(): LatLng - // Returns the north-east point of the bounds. - getNorthEast: function () { - return this._northEast; - }, - - // @method getNorthWest(): LatLng - // Returns the north-west point of the bounds. - getNorthWest: function () { - return new LatLng(this.getNorth(), this.getWest()); - }, - - // @method getSouthEast(): LatLng - // Returns the south-east point of the bounds. - getSouthEast: function () { - return new LatLng(this.getSouth(), this.getEast()); - }, - - // @method getWest(): Number - // Returns the west longitude of the bounds - getWest: function () { - return this._southWest.lng; - }, - - // @method getSouth(): Number - // Returns the south latitude of the bounds - getSouth: function () { - return this._southWest.lat; - }, - - // @method getEast(): Number - // Returns the east longitude of the bounds - getEast: function () { - return this._northEast.lng; - }, - - // @method getNorth(): Number - // Returns the north latitude of the bounds - getNorth: function () { - return this._northEast.lat; - }, - - // @method contains(otherBounds: LatLngBounds): Boolean - // Returns `true` if the rectangle contains the given one. - - // @alternative - // @method contains (latlng: LatLng): Boolean - // Returns `true` if the rectangle contains the given point. - contains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean - if (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) { - obj = toLatLng(obj); - } else { - obj = toLatLngBounds(obj); - } - - var sw = this._southWest, - ne = this._northEast, - sw2, ne2; - - if (obj instanceof LatLngBounds) { - sw2 = obj.getSouthWest(); - ne2 = obj.getNorthEast(); - } else { - sw2 = ne2 = obj; - } - - return (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) && - (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng); - }, - - // @method intersects(otherBounds: LatLngBounds): Boolean - // Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common. - intersects: function (bounds) { - bounds = toLatLngBounds(bounds); - - var sw = this._southWest, - ne = this._northEast, - sw2 = bounds.getSouthWest(), - ne2 = bounds.getNorthEast(), - - latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat), - lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng); - - return latIntersects && lngIntersects; - }, - - // @method overlaps(otherBounds: LatLngBounds): Boolean - // Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area. - overlaps: function (bounds) { - bounds = toLatLngBounds(bounds); - - var sw = this._southWest, - ne = this._northEast, - sw2 = bounds.getSouthWest(), - ne2 = bounds.getNorthEast(), - - latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat), - lngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng); - - return latOverlaps && lngOverlaps; - }, - - // @method toBBoxString(): String - // Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data. - toBBoxString: function () { - return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(','); - }, - - // @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean - // Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number. - equals: function (bounds, maxMargin) { - if (!bounds) { return false; } - - bounds = toLatLngBounds(bounds); - - return this._southWest.equals(bounds.getSouthWest(), maxMargin) && - this._northEast.equals(bounds.getNorthEast(), maxMargin); - }, - - // @method isValid(): Boolean - // Returns `true` if the bounds are properly initialized. - isValid: function () { - return !!(this._southWest && this._northEast); - } - }; - - // TODO International date line? - - // @factory L.latLngBounds(corner1: LatLng, corner2: LatLng) - // Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle. - - // @alternative - // @factory L.latLngBounds(latlngs: LatLng[]) - // Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds). - function toLatLngBounds(a, b) { - if (a instanceof LatLngBounds) { - return a; - } - return new LatLngBounds(a, b); - } - - /* @class LatLng - * @aka L.LatLng - * - * Represents a geographical point with a certain latitude and longitude. - * - * @example - * - * ``` - * var latlng = L.latLng(50.5, 30.5); - * ``` - * - * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent: - * - * ``` - * map.panTo([50, 30]); - * map.panTo({lon: 30, lat: 50}); - * map.panTo({lat: 50, lng: 30}); - * map.panTo(L.latLng(50, 30)); - * ``` - * - * Note that `LatLng` does not inherit from Leaflet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. - */ - - function LatLng(lat, lng, alt) { - if (isNaN(lat) || isNaN(lng)) { - throw new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')'); - } - - // @property lat: Number - // Latitude in degrees - this.lat = +lat; - - // @property lng: Number - // Longitude in degrees - this.lng = +lng; - - // @property alt: Number - // Altitude in meters (optional) - if (alt !== undefined) { - this.alt = +alt; - } - } - - LatLng.prototype = { - // @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean - // Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number. - equals: function (obj, maxMargin) { - if (!obj) { return false; } - - obj = toLatLng(obj); - - var margin = Math.max( - Math.abs(this.lat - obj.lat), - Math.abs(this.lng - obj.lng)); - - return margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin); - }, - - // @method toString(): String - // Returns a string representation of the point (for debugging purposes). - toString: function (precision) { - return 'LatLng(' + - formatNum(this.lat, precision) + ', ' + - formatNum(this.lng, precision) + ')'; - }, - - // @method distanceTo(otherLatLng: LatLng): Number - // Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines). - distanceTo: function (other) { - return Earth.distance(this, toLatLng(other)); - }, - - // @method wrap(): LatLng - // Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees. - wrap: function () { - return Earth.wrapLatLng(this); - }, - - // @method toBounds(sizeInMeters: Number): LatLngBounds - // Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`. - toBounds: function (sizeInMeters) { - var latAccuracy = 180 * sizeInMeters / 40075017, - lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat); - - return toLatLngBounds( - [this.lat - latAccuracy, this.lng - lngAccuracy], - [this.lat + latAccuracy, this.lng + lngAccuracy]); - }, - - clone: function () { - return new LatLng(this.lat, this.lng, this.alt); - } - }; - - - - // @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng - // Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude). - - // @alternative - // @factory L.latLng(coords: Array): LatLng - // Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead. - - // @alternative - // @factory L.latLng(coords: Object): LatLng - // Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead. - - function toLatLng(a, b, c) { - if (a instanceof LatLng) { - return a; - } - if (isArray(a) && typeof a[0] !== 'object') { - if (a.length === 3) { - return new LatLng(a[0], a[1], a[2]); - } - if (a.length === 2) { - return new LatLng(a[0], a[1]); - } - return null; - } - if (a === undefined || a === null) { - return a; - } - if (typeof a === 'object' && 'lat' in a) { - return new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt); - } - if (b === undefined) { - return null; - } - return new LatLng(a, b, c); - } - - /* - * @namespace CRS - * @crs L.CRS.Base - * Object that defines coordinate reference systems for projecting - * geographical points into pixel (screen) coordinates and back (and to - * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See - * [spatial reference system](https://en.wikipedia.org/wiki/Spatial_reference_system). - * - * Leaflet defines the most usual CRSs by default. If you want to use a - * CRS not defined by default, take a look at the - * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin. - * - * Note that the CRS instances do not inherit from Leaflet's `Class` object, - * and can't be instantiated. Also, new classes can't inherit from them, - * and methods can't be added to them with the `include` function. - */ - - var CRS = { - // @method latLngToPoint(latlng: LatLng, zoom: Number): Point - // Projects geographical coordinates into pixel coordinates for a given zoom. - latLngToPoint: function (latlng, zoom) { - var projectedPoint = this.projection.project(latlng), - scale = this.scale(zoom); - - return this.transformation._transform(projectedPoint, scale); - }, - - // @method pointToLatLng(point: Point, zoom: Number): LatLng - // The inverse of `latLngToPoint`. Projects pixel coordinates on a given - // zoom into geographical coordinates. - pointToLatLng: function (point, zoom) { - var scale = this.scale(zoom), - untransformedPoint = this.transformation.untransform(point, scale); - - return this.projection.unproject(untransformedPoint); - }, - - // @method project(latlng: LatLng): Point - // Projects geographical coordinates into coordinates in units accepted for - // this CRS (e.g. meters for EPSG:3857, for passing it to WMS services). - project: function (latlng) { - return this.projection.project(latlng); - }, - - // @method unproject(point: Point): LatLng - // Given a projected coordinate returns the corresponding LatLng. - // The inverse of `project`. - unproject: function (point) { - return this.projection.unproject(point); - }, - - // @method scale(zoom: Number): Number - // Returns the scale used when transforming projected coordinates into - // pixel coordinates for a particular zoom. For example, it returns - // `256 * 2^zoom` for Mercator-based CRS. - scale: function (zoom) { - return 256 * Math.pow(2, zoom); - }, - - // @method zoom(scale: Number): Number - // Inverse of `scale()`, returns the zoom level corresponding to a scale - // factor of `scale`. - zoom: function (scale) { - return Math.log(scale / 256) / Math.LN2; - }, - - // @method getProjectedBounds(zoom: Number): Bounds - // Returns the projection's bounds scaled and transformed for the provided `zoom`. - getProjectedBounds: function (zoom) { - if (this.infinite) { return null; } - - var b = this.projection.bounds, - s = this.scale(zoom), - min = this.transformation.transform(b.min, s), - max = this.transformation.transform(b.max, s); - - return new Bounds(min, max); - }, - - // @method distance(latlng1: LatLng, latlng2: LatLng): Number - // Returns the distance between two geographical coordinates. - - // @property code: String - // Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`) - // - // @property wrapLng: Number[] - // An array of two numbers defining whether the longitude (horizontal) coordinate - // axis wraps around a given range and how. Defaults to `[-180, 180]` in most - // geographical CRSs. If `undefined`, the longitude axis does not wrap around. - // - // @property wrapLat: Number[] - // Like `wrapLng`, but for the latitude (vertical) axis. - - // wrapLng: [min, max], - // wrapLat: [min, max], - - // @property infinite: Boolean - // If true, the coordinate space will be unbounded (infinite in both axes) - infinite: false, - - // @method wrapLatLng(latlng: LatLng): LatLng - // Returns a `LatLng` where lat and lng has been wrapped according to the - // CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds. - wrapLatLng: function (latlng) { - var lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng, - lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat, - alt = latlng.alt; - - return new LatLng(lat, lng, alt); - }, - - // @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds - // Returns a `LatLngBounds` with the same size as the given one, ensuring - // that its center is within the CRS's bounds. - // Only accepts actual `L.LatLngBounds` instances, not arrays. - wrapLatLngBounds: function (bounds) { - var center = bounds.getCenter(), - newCenter = this.wrapLatLng(center), - latShift = center.lat - newCenter.lat, - lngShift = center.lng - newCenter.lng; - - if (latShift === 0 && lngShift === 0) { - return bounds; - } - - var sw = bounds.getSouthWest(), - ne = bounds.getNorthEast(), - newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift), - newNe = new LatLng(ne.lat - latShift, ne.lng - lngShift); - - return new LatLngBounds(newSw, newNe); - } - }; - - /* - * @namespace CRS - * @crs L.CRS.Earth - * - * Serves as the base for CRS that are global such that they cover the earth. - * Can only be used as the base for other CRS and cannot be used directly, - * since it does not have a `code`, `projection` or `transformation`. `distance()` returns - * meters. - */ - - var Earth = extend({}, CRS, { - wrapLng: [-180, 180], - - // Mean Earth Radius, as recommended for use by - // the International Union of Geodesy and Geophysics, - // see https://rosettacode.org/wiki/Haversine_formula - R: 6371000, - - // distance between two geographical points using spherical law of cosines approximation - distance: function (latlng1, latlng2) { - var rad = Math.PI / 180, - lat1 = latlng1.lat * rad, - lat2 = latlng2.lat * rad, - sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2), - sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2), - a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon, - c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); - return this.R * c; - } - }); - - /* - * @namespace Projection - * @projection L.Projection.SphericalMercator - * - * Spherical Mercator projection — the most common projection for online maps, - * used by almost all free and commercial tile providers. Assumes that Earth is - * a sphere. Used by the `EPSG:3857` CRS. - */ - - var earthRadius = 6378137; - - var SphericalMercator = { - - R: earthRadius, - MAX_LATITUDE: 85.0511287798, - - project: function (latlng) { - var d = Math.PI / 180, - max = this.MAX_LATITUDE, - lat = Math.max(Math.min(max, latlng.lat), -max), - sin = Math.sin(lat * d); - - return new Point( - this.R * latlng.lng * d, - this.R * Math.log((1 + sin) / (1 - sin)) / 2); - }, - - unproject: function (point) { - var d = 180 / Math.PI; - - return new LatLng( - (2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d, - point.x * d / this.R); - }, - - bounds: (function () { - var d = earthRadius * Math.PI; - return new Bounds([-d, -d], [d, d]); - })() - }; - - /* - * @class Transformation - * @aka L.Transformation - * - * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d` - * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing - * the reverse. Used by Leaflet in its projections code. - * - * @example - * - * ```js - * var transformation = L.transformation(2, 5, -1, 10), - * p = L.point(1, 2), - * p2 = transformation.transform(p), // L.point(7, 8) - * p3 = transformation.untransform(p2); // L.point(1, 2) - * ``` - */ - - - // factory new L.Transformation(a: Number, b: Number, c: Number, d: Number) - // Creates a `Transformation` object with the given coefficients. - function Transformation(a, b, c, d) { - if (isArray(a)) { - // use array properties - this._a = a[0]; - this._b = a[1]; - this._c = a[2]; - this._d = a[3]; - return; - } - this._a = a; - this._b = b; - this._c = c; - this._d = d; - } - - Transformation.prototype = { - // @method transform(point: Point, scale?: Number): Point - // Returns a transformed point, optionally multiplied by the given scale. - // Only accepts actual `L.Point` instances, not arrays. - transform: function (point, scale) { // (Point, Number) -> Point - return this._transform(point.clone(), scale); - }, - - // destructive transform (faster) - _transform: function (point, scale) { - scale = scale || 1; - point.x = scale * (this._a * point.x + this._b); - point.y = scale * (this._c * point.y + this._d); - return point; - }, - - // @method untransform(point: Point, scale?: Number): Point - // Returns the reverse transformation of the given point, optionally divided - // by the given scale. Only accepts actual `L.Point` instances, not arrays. - untransform: function (point, scale) { - scale = scale || 1; - return new Point( - (point.x / scale - this._b) / this._a, - (point.y / scale - this._d) / this._c); - } - }; - - // factory L.transformation(a: Number, b: Number, c: Number, d: Number) - - // @factory L.transformation(a: Number, b: Number, c: Number, d: Number) - // Instantiates a Transformation object with the given coefficients. - - // @alternative - // @factory L.transformation(coefficients: Array): Transformation - // Expects an coefficients array of the form - // `[a: Number, b: Number, c: Number, d: Number]`. - - function toTransformation(a, b, c, d) { - return new Transformation(a, b, c, d); - } - - /* - * @namespace CRS - * @crs L.CRS.EPSG3857 - * - * The most common CRS for online maps, used by almost all free and commercial - * tile providers. Uses Spherical Mercator projection. Set in by default in - * Map's `crs` option. - */ - - var EPSG3857 = extend({}, Earth, { - code: 'EPSG:3857', - projection: SphericalMercator, - - transformation: (function () { - var scale = 0.5 / (Math.PI * SphericalMercator.R); - return toTransformation(scale, 0.5, -scale, 0.5); - }()) - }); - - var EPSG900913 = extend({}, EPSG3857, { - code: 'EPSG:900913' - }); - - // @namespace SVG; @section - // There are several static functions which can be called without instantiating L.SVG: - - // @function create(name: String): SVGElement - // Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement), - // corresponding to the class name passed. For example, using 'line' will return - // an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement). - function svgCreate(name) { - return document.createElementNS('http://www.w3.org/2000/svg', name); - } - - // @function pointsToPath(rings: Point[], closed: Boolean): String - // Generates a SVG path string for multiple rings, with each ring turning - // into "M..L..L.." instructions - function pointsToPath(rings, closed) { - var str = '', - i, j, len, len2, points, p; - - for (i = 0, len = rings.length; i < len; i++) { - points = rings[i]; - - for (j = 0, len2 = points.length; j < len2; j++) { - p = points[j]; - str += (j ? 'L' : 'M') + p.x + ' ' + p.y; - } - - // closes the ring for polygons; "x" is VML syntax - str += closed ? (Browser.svg ? 'z' : 'x') : ''; - } - - // SVG complains about empty path strings - return str || 'M0 0'; - } - - /* - * @namespace Browser - * @aka L.Browser - * - * A namespace with static properties for browser/feature detection used by Leaflet internally. - * - * @example - * - * ```js - * if (L.Browser.ielt9) { - * alert('Upgrade your browser, dude!'); - * } - * ``` - */ - - var style = document.documentElement.style; - - // @property ie: Boolean; `true` for all Internet Explorer versions (not Edge). - var ie = 'ActiveXObject' in window; - - // @property ielt9: Boolean; `true` for Internet Explorer versions less than 9. - var ielt9 = ie && !document.addEventListener; - - // @property edge: Boolean; `true` for the Edge web browser. - var edge = 'msLaunchUri' in navigator && !('documentMode' in document); - - // @property webkit: Boolean; - // `true` for webkit-based browsers like Chrome and Safari (including mobile versions). - var webkit = userAgentContains('webkit'); - - // @property android: Boolean - // **Deprecated.** `true` for any browser running on an Android platform. - var android = userAgentContains('android'); - - // @property android23: Boolean; **Deprecated.** `true` for browsers running on Android 2 or Android 3. - var android23 = userAgentContains('android 2') || userAgentContains('android 3'); - - /* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */ - var webkitVer = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit - // @property androidStock: Boolean; **Deprecated.** `true` for the Android stock browser (i.e. not Chrome) - var androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window); - - // @property opera: Boolean; `true` for the Opera browser - var opera = !!window.opera; - - // @property chrome: Boolean; `true` for the Chrome browser. - var chrome = !edge && userAgentContains('chrome'); - - // @property gecko: Boolean; `true` for gecko-based browsers like Firefox. - var gecko = userAgentContains('gecko') && !webkit && !opera && !ie; - - // @property safari: Boolean; `true` for the Safari browser. - var safari = !chrome && userAgentContains('safari'); - - var phantom = userAgentContains('phantom'); - - // @property opera12: Boolean - // `true` for the Opera browser supporting CSS transforms (version 12 or later). - var opera12 = 'OTransition' in style; - - // @property win: Boolean; `true` when the browser is running in a Windows platform - var win = navigator.platform.indexOf('Win') === 0; - - // @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms. - var ie3d = ie && ('transition' in style); - - // @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms. - var webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23; - - // @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms. - var gecko3d = 'MozPerspective' in style; - - // @property any3d: Boolean - // `true` for all browsers supporting CSS transforms. - var any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom; - - // @property mobile: Boolean; `true` for all browsers running in a mobile device. - var mobile = typeof orientation !== 'undefined' || userAgentContains('mobile'); - - // @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device. - var mobileWebkit = mobile && webkit; - - // @property mobileWebkit3d: Boolean - // `true` for all webkit-based browsers in a mobile device supporting CSS transforms. - var mobileWebkit3d = mobile && webkit3d; - - // @property msPointer: Boolean - // `true` for browsers implementing the Microsoft touch events model (notably IE10). - var msPointer = !window.PointerEvent && window.MSPointerEvent; - - // @property pointer: Boolean - // `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx). - var pointer = !!(window.PointerEvent || msPointer); - - // @property touchNative: Boolean - // `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events). - // **This does not necessarily mean** that the browser is running in a computer with - // a touchscreen, it only means that the browser is capable of understanding - // touch events. - var touchNative = 'ontouchstart' in window || !!window.TouchEvent; - - // @property touch: Boolean - // `true` for all browsers supporting either [touch](#browser-touch) or [pointer](#browser-pointer) events. - // Note: pointer events will be preferred (if available), and processed for all `touch*` listeners. - var touch = !window.L_NO_TOUCH && (touchNative || pointer); - - // @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device. - var mobileOpera = mobile && opera; - - // @property mobileGecko: Boolean - // `true` for gecko-based browsers running in a mobile device. - var mobileGecko = mobile && gecko; - - // @property retina: Boolean - // `true` for browsers on a high-resolution "retina" screen or on any screen when browser's display zoom is more than 100%. - var retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1; - - // @property passiveEvents: Boolean - // `true` for browsers that support passive events. - var passiveEvents = (function () { - var supportsPassiveOption = false; - try { - var opts = Object.defineProperty({}, 'passive', { - get: function () { // eslint-disable-line getter-return - supportsPassiveOption = true; - } - }); - window.addEventListener('testPassiveEventSupport', falseFn, opts); - window.removeEventListener('testPassiveEventSupport', falseFn, opts); - } catch (e) { - // Errors can safely be ignored since this is only a browser support test. - } - return supportsPassiveOption; - }()); - - // @property canvas: Boolean - // `true` when the browser supports [``](https://developer.mozilla.org/docs/Web/API/Canvas_API). - var canvas$1 = (function () { - return !!document.createElement('canvas').getContext; - }()); - - // @property svg: Boolean - // `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG). - var svg$1 = !!(document.createElementNS && svgCreate('svg').createSVGRect); - - var inlineSvg = !!svg$1 && (function () { - var div = document.createElement('div'); - div.innerHTML = ''; - return (div.firstChild && div.firstChild.namespaceURI) === 'http://www.w3.org/2000/svg'; - })(); - - // @property vml: Boolean - // `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language). - var vml = !svg$1 && (function () { - try { - var div = document.createElement('div'); - div.innerHTML = ''; - - var shape = div.firstChild; - shape.style.behavior = 'url(#default#VML)'; - - return shape && (typeof shape.adj === 'object'); - - } catch (e) { - return false; - } - }()); - - - // @property mac: Boolean; `true` when the browser is running in a Mac platform - var mac = navigator.platform.indexOf('Mac') === 0; - - // @property mac: Boolean; `true` when the browser is running in a Linux platform - var linux = navigator.platform.indexOf('Linux') === 0; - - function userAgentContains(str) { - return navigator.userAgent.toLowerCase().indexOf(str) >= 0; - } - - - var Browser = { - ie: ie, - ielt9: ielt9, - edge: edge, - webkit: webkit, - android: android, - android23: android23, - androidStock: androidStock, - opera: opera, - chrome: chrome, - gecko: gecko, - safari: safari, - phantom: phantom, - opera12: opera12, - win: win, - ie3d: ie3d, - webkit3d: webkit3d, - gecko3d: gecko3d, - any3d: any3d, - mobile: mobile, - mobileWebkit: mobileWebkit, - mobileWebkit3d: mobileWebkit3d, - msPointer: msPointer, - pointer: pointer, - touch: touch, - touchNative: touchNative, - mobileOpera: mobileOpera, - mobileGecko: mobileGecko, - retina: retina, - passiveEvents: passiveEvents, - canvas: canvas$1, - svg: svg$1, - vml: vml, - inlineSvg: inlineSvg, - mac: mac, - linux: linux - }; - - /* - * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices. - */ - - var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown'; - var POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove'; - var POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup'; - var POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel'; - var pEvent = { - touchstart : POINTER_DOWN, - touchmove : POINTER_MOVE, - touchend : POINTER_UP, - touchcancel : POINTER_CANCEL - }; - var handle = { - touchstart : _onPointerStart, - touchmove : _handlePointer, - touchend : _handlePointer, - touchcancel : _handlePointer - }; - var _pointers = {}; - var _pointerDocListener = false; - - // Provides a touch events wrapper for (ms)pointer events. - // ref https://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890 - - function addPointerListener(obj, type, handler) { - if (type === 'touchstart') { - _addPointerDocListener(); - } - if (!handle[type]) { - console.warn('wrong event specified:', type); - return falseFn; - } - handler = handle[type].bind(this, handler); - obj.addEventListener(pEvent[type], handler, false); - return handler; - } - - function removePointerListener(obj, type, handler) { - if (!pEvent[type]) { - console.warn('wrong event specified:', type); - return; - } - obj.removeEventListener(pEvent[type], handler, false); - } - - function _globalPointerDown(e) { - _pointers[e.pointerId] = e; - } - - function _globalPointerMove(e) { - if (_pointers[e.pointerId]) { - _pointers[e.pointerId] = e; - } - } - - function _globalPointerUp(e) { - delete _pointers[e.pointerId]; - } - - function _addPointerDocListener() { - // need to keep track of what pointers and how many are active to provide e.touches emulation - if (!_pointerDocListener) { - // we listen document as any drags that end by moving the touch off the screen get fired there - document.addEventListener(POINTER_DOWN, _globalPointerDown, true); - document.addEventListener(POINTER_MOVE, _globalPointerMove, true); - document.addEventListener(POINTER_UP, _globalPointerUp, true); - document.addEventListener(POINTER_CANCEL, _globalPointerUp, true); - - _pointerDocListener = true; - } - } - - function _handlePointer(handler, e) { - if (e.pointerType === (e.MSPOINTER_TYPE_MOUSE || 'mouse')) { return; } - - e.touches = []; - for (var i in _pointers) { - e.touches.push(_pointers[i]); - } - e.changedTouches = [e]; - - handler(e); - } - - function _onPointerStart(handler, e) { - // IE10 specific: MsTouch needs preventDefault. See #2000 - if (e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH) { - preventDefault(e); - } - _handlePointer(handler, e); - } - - /* - * Extends the event handling code with double tap support for mobile browsers. - * - * Note: currently most browsers fire native dblclick, with only a few exceptions - * (see https://github.com/Leaflet/Leaflet/issues/7012#issuecomment-595087386) - */ - - function makeDblclick(event) { - // in modern browsers `type` cannot be just overridden: - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only - var newEvent = {}, - prop, i; - for (i in event) { - prop = event[i]; - newEvent[i] = prop && prop.bind ? prop.bind(event) : prop; - } - event = newEvent; - newEvent.type = 'dblclick'; - newEvent.detail = 2; - newEvent.isTrusted = false; - newEvent._simulated = true; // for debug purposes - return newEvent; - } - - var delay = 200; - function addDoubleTapListener(obj, handler) { - // Most browsers handle double tap natively - obj.addEventListener('dblclick', handler); - - // On some platforms the browser doesn't fire native dblclicks for touch events. - // It seems that in all such cases `detail` property of `click` event is always `1`. - // So here we rely on that fact to avoid excessive 'dblclick' simulation when not needed. - var last = 0, - detail; - function simDblclick(e) { - if (e.detail !== 1) { - detail = e.detail; // keep in sync to avoid false dblclick in some cases - return; - } - - if (e.pointerType === 'mouse' || - (e.sourceCapabilities && !e.sourceCapabilities.firesTouchEvents)) { - - return; - } - - // When clicking on an , the browser generates a click on its - //