@qratilabs/qrati-connect 2.13.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/element/{D-uCOD12.js → BHwNoqYe.js} +1 -1
- package/element/BQBx6JI7.js +1 -0
- package/element/BRTFWO2n.js +3 -0
- package/element/{TuCus3yb.js → BU70X6zI.js} +2 -2
- package/element/{CA0yBdLL.js → Bez3GA8y.js} +1 -1
- package/element/CERLiedB.js +17 -0
- package/element/{wacVD-eY.js → CWJf7mNz.js} +1 -1
- package/element/{Uhjm_Y6p.js → t1REK11Z.js} +5 -5
- package/element/web.es.js +200 -200
- package/package.json +1 -1
- package/react/{Bn2xppDl.js → BMzYiAN3.js} +1 -1
- package/react/{DSZ2rNFd.js → BlSQ-ODL.js} +2 -2
- package/react/Bxxb7z6d.js +1 -0
- package/react/{CE5xGjho.js → CDiSbuj_.js} +1 -1
- package/react/{DrcjVm3d.js → CHSr2RxR.js} +1 -1
- package/react/{CTgQwNP5.js → CX_Vz15p.js} +1 -1
- package/react/{B1lbE7gh.js → CojsvC2N.js} +5 -5
- package/react/{CYR566Bs.js → DPezSfU3.js} +1 -1
- package/react/{B9fOjcUN.js → DQWXCdfm.js} +1 -1
- package/react/D_KoEU5i.js +1 -0
- package/react/{Cz07kA8l.js → DqVfSNOG.js} +2 -2
- package/react/{BkaWdKk6.js → EJU6024p.js} +1 -1
- package/react/{BQMBRNui.js → TRIgeGAL.js} +1 -1
- package/react/{Ky-hJXPt.js → eEYDnGow.js} +1 -1
- package/react/index.cjs +1 -1
- package/react/index.mjs +194 -194
- package/react/yLRfWDiY.js +3 -0
- package/react/zqIYi_Na.js +17 -0
- package/umd/web.umd.js +1 -1
- package/element/Bx4_ypBY.js +0 -1
- package/element/Ct_-M5kI.js +0 -3
- package/element/DfXDvEmN.js +0 -17
- package/react/B1IdB6E3.js +0 -1
- package/react/Bo3SUP7Y.js +0 -17
- package/react/CVjouKes.js +0 -1
- package/react/DAU0BOiv.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
# [2.13.0](https://github.com/qrati-labs/qrati-connect-ts/compare/v2.12.0...v2.13.0) (2026-04-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **i18n:** enhance multi-language support by refining translations and improving component accessibility across various pages ([6c26182](https://github.com/qrati-labs/qrati-connect-ts/commit/6c26182b091637f3708360b19a43574e4c6ad527))
|
|
7
|
+
* **i18n:** implement internationalization support with dynamic translations ([93a7dae](https://github.com/qrati-labs/qrati-connect-ts/commit/93a7daea6b519cd71cc29c80353a99a473ce3397))
|
|
8
|
+
* **i18n:** implement multi-language support by removing static translations and integrating dynamic translation functionality across components (EventHeader, EventHeaderAdminButtons, ContentFilter, etc.) to utilize dynamic translations. ([db5af9e](https://github.com/qrati-labs/qrati-connect-ts/commit/db5af9e2e5cb6b084747706d453059a9e0bba911))
|
|
9
|
+
* update dependencies and improve Leaflet integration with styles ([922cb0c](https://github.com/qrati-labs/qrati-connect-ts/commit/922cb0c3df174cccd3ab4f6b5d92f0c3e25054cc))
|
|
10
|
+
|
|
1
11
|
# [2.12.0](https://github.com/qrati-labs/qrati-connect-ts/compare/v2.11.2...v2.12.0) (2026-04-16)
|
|
2
12
|
|
|
3
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,i as n,n as e,r,t as i}from"./CsohJ1Yu.js";import{M as o,P as a,j as h,z as s}from"./19c52mJB.js";import{M as l,N as u,l as f,n as c}from"./Uhjm_Y6p.js";import{t as m}from"./Bx4_ypBY.js";function p(t,n,e={}){const r={type:"Feature"};return(0===e.id||e.id)&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.properties=n||{},r.geometry=t,r}function d(t,n,e={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return p({type:"Point",coordinates:t},n,e)}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function v(t,n,e){if(null!==t)for(var r,i,o,a,h,s,l,u,f=0,c=0,m=t.type,p="FeatureCollection"===m,d="Feature"===m,g=p?t.features.length:1,x=0;x<g;x++){h=(u=!!(l=p?t.features[x].geometry:d?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var y=0;y<h;y++){var M=0,X=0;if(null!==(a=u?l.geometries[y]:l)){s=a.coordinates;var Y=a.type;switch(f=!e||"Polygon"!==Y&&"MultiPolygon"!==Y?0:1,Y){case null:break;case"Point":if(!1===n(s,c,x,M,X))return!1;c++,M++;break;case"LineString":case"MultiPoint":for(r=0;r<s.length;r++){if(!1===n(s[r],c,x,M,X))return!1;c++,"MultiPoint"===Y&&M++}"LineString"===Y&&M++;break;case"Polygon":case"MultiLineString":for(r=0;r<s.length;r++){for(i=0;i<s[r].length-f;i++){if(!1===n(s[r][i],c,x,M,X))return!1;c++}"MultiLineString"===Y&&M++,"Polygon"===Y&&X++}"Polygon"===Y&&M++;break;case"MultiPolygon":for(r=0;r<s.length;r++){for(X=0,i=0;i<s[r].length;i++){for(o=0;o<s[r][i].length-f;o++){if(!1===n(s[r][i][o],c,x,M,X))return!1;c++}X++}M++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===v(a.geometries[r],n,e))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}Math.PI;var x,y=/* @__PURE__ */i((t,n)=>{var e,r;e=t,r=function(){function t(t,r,i,o,a){!function t(e,r,i,o,a){for(;o>i;){if(o-i>600){var h=o-i+1,s=r-i+1,l=Math.log(h),u=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*u*(h-u)/h)*(s-h/2<0?-1:1);t(e,r,Math.max(i,Math.floor(r-s*u/h+f)),Math.min(o,Math.floor(r+(h-s)*u/h+f)),a)}var c=e[r],m=i,p=o;for(n(e,i,r),a(e[o],c)>0&&n(e,i,o);m<p;){for(n(e,m,p),m++,p--;a(e[m],c)<0;)m++;for(;a(e[p],c)>0;)p--}0===a(e[i],c)?n(e,i,p):n(e,++p,o),p<=r&&(i=p+1),r<=p&&(o=p-1)}}(t,r,i||0,o||t.length-1,a||e)}function n(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function e(t,n){return t<n?-1:t>n?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,n,e){if(!e)return n.indexOf(t);for(var r=0;r<n.length;r++)if(e(t,n[r]))return r;return-1}function o(t,n){a(t,0,t.children.length,n,t)}function a(t,n,e,r,i){i||(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=n;o<e;o++){var a=t.children[o];h(i,t.leaf?r(a):a)}return i}function h(t,n){return t.minX=Math.min(t.minX,n.minX),t.minY=Math.min(t.minY,n.minY),t.maxX=Math.max(t.maxX,n.maxX),t.maxY=Math.max(t.maxY,n.maxY),t}function s(t,n){return t.minX-n.minX}function l(t,n){return t.minY-n.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,n){return t.minX<=n.minX&&t.minY<=n.minY&&n.maxX<=t.maxX&&n.maxY<=t.maxY}function m(t,n){return n.minX<=t.maxX&&n.minY<=t.maxY&&n.maxX>=t.minX&&n.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(n,e,r,i,o){for(var a=[e,r];a.length;)if(!((r=a.pop())-(e=a.pop())<=i)){var h=e+Math.ceil((r-e)/i/2)*i;t(n,h,e,r,o),a.push(e,h,h,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var n=this.data,e=[];if(!m(t,n))return e;for(var r=this.toBBox,i=[];n;){for(var o=0;o<n.children.length;o++){var a=n.children[o],h=n.leaf?r(a):a;m(t,h)&&(n.leaf?e.push(a):c(t,h)?this._all(a,e):i.push(a))}n=i.pop()}return e},r.prototype.collides=function(t){var n=this.data;if(!m(t,n))return!1;for(var e=[];n;){for(var r=0;r<n.children.length;r++){var i=n.children[r],o=n.leaf?this.toBBox(i):i;if(m(t,o)){if(n.leaf||c(t,o))return!0;e.push(i)}}n=e.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var n=0;n<t.length;n++)this.insert(t[n]);return this}var e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){var r=this.data;this.data=e,e=r}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,n){if(!t)return this;for(var e,r,o,a=this.data,h=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],e=l.pop(),o=!0),a.leaf){var u=i(t,a.children,n);if(-1!==u)return a.children.splice(u,1),s.push(a),this._condense(s),this}o||a.leaf||!c(a,h)?r?(e++,a=r.children[e],o=!1):a=null:(s.push(a),l.push(e),e=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,n){return t.minX-n.minX},r.prototype.compareMinY=function(t,n){return t.minY-n.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,n){for(var e=[];t;)t.leaf?n.push.apply(n,t.children):e.push.apply(e,t.children),t=e.pop();return n},r.prototype._build=function(t,n,e,r){var i,a=e-n+1,h=this._maxEntries;if(a<=h)return o(i=p(t.slice(n,e+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(a)/Math.log(h)),h=Math.ceil(a/Math.pow(h,r-1))),(i=p([])).leaf=!1,i.height=r;var s=Math.ceil(a/h),l=s*Math.ceil(Math.sqrt(h));d(t,n,e,l,this.compareMinX);for(var u=n;u<=e;u+=l){var f=Math.min(u+l-1,e);d(t,u,f,s,this.compareMinY);for(var c=u;c<=f;c+=s){var m=Math.min(c+s-1,f);i.children.push(this._build(t,c,m,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,n,e,r){for(;r.push(n),!n.leaf&&r.length-1!==e;){for(var i=1/0,o=1/0,a=void 0,h=0;h<n.children.length;h++){var s=n.children[h],l=u(s),f=(c=t,m=s,(Math.max(m.maxX,c.maxX)-Math.min(m.minX,c.minX))*(Math.max(m.maxY,c.maxY)-Math.min(m.minY,c.minY))-l);f<o?(o=f,i=l<i?l:i,a=s):f===o&&l<i&&(i=l,a=s)}n=a||n.children[0]}var c,m;return n},r.prototype._insert=function(t,n,e){var r=e?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,n,i);for(o.children.push(t),h(o,r);n>=0&&i[n].children.length>this._maxEntries;)this._split(i,n),n--;this._adjustParentBBoxes(r,i,n)},r.prototype._split=function(t,n){var e=t[n],r=e.children.length,i=this._minEntries;this._chooseSplitAxis(e,i,r);var a=this._chooseSplitIndex(e,i,r),h=p(e.children.splice(a,e.children.length-a));h.height=e.height,h.leaf=e.leaf,o(e,this.toBBox),o(h,this.toBBox),n?t[n-1].children.push(h):this._splitRoot(e,h)},r.prototype._splitRoot=function(t,n){this.data=p([t,n]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,n,e){for(var r,i,o,h,s,l,f,c=1/0,m=1/0,p=n;p<=e-n;p++){var d=a(t,0,p,this.toBBox),g=a(t,p,e,this.toBBox),v=(i=d,o=g,h=Math.max(i.minX,o.minX),s=Math.max(i.minY,o.minY),l=Math.min(i.maxX,o.maxX),f=Math.min(i.maxY,o.maxY),Math.max(0,l-h)*Math.max(0,f-s)),x=u(d)+u(g);v<c?(c=v,r=p,m=x<m?x:m):v===c&&x<m&&(m=x,r=p)}return r||e-n},r.prototype._chooseSplitAxis=function(t,n,e){var r=t.leaf?this.compareMinX:s,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,n,e,r)<this._allDistMargin(t,n,e,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,n,e,r){t.children.sort(r);for(var i=this.toBBox,o=a(t,0,n,i),s=a(t,e-n,e,i),l=f(o)+f(s),u=n;u<e-n;u++){var c=t.children[u];h(o,t.leaf?i(c):c),l+=f(o)}for(var m=e-n-1;m>=n;m--){var p=t.children[m];h(s,t.leaf?i(p):p),l+=f(s)}return l},r.prototype._adjustParentBBoxes=function(t,n,e){for(var r=e;r>=0;r--)h(n[r],t)},r.prototype._condense=function(t){for(var n=t.length-1,e=void 0;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)},r},"object"==typeof t&&void 0!==n?n.exports=r():"function"==typeof define&&define.amd?define(r):(e=e||self).RBush=r()}),M=/* @__PURE__ */r({default:()=>x});function X(t,n){return t<n?-1:t>n?1:0}var Y=e(()=>{x=class{constructor(t=[],n=X){if(this.data=t,this.length=this.data.length,this.compare=n,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],n=this.data.pop();return this.length--,this.length>0&&(this.data[0]=n,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:n,compare:e}=this,r=n[t];for(;t>0;){const i=t-1>>1,o=n[i];if(e(r,o)>=0)break;n[t]=o,t=i}n[t]=r}_down(t){const{data:n,compare:e}=this,r=this.length>>1,i=n[t];for(;t<r;){let r=1+(t<<1),o=n[r];const a=r+1;if(a<this.length&&e(n[a],o)<0&&(r=a,o=n[a]),e(o,i)>=0)break;n[t]=o,t=r}n[t]=i}}}),b=/* @__PURE__ */i((t,n)=>{n.exports=function(t,n,e,r){var i=t[0],o=t[1],a=!1;void 0===e&&(e=0),void 0===r&&(r=n.length);for(var h=(r-e)/2,s=0,l=h-1;s<h;l=s++){var u=n[e+2*s+0],f=n[e+2*s+1],c=n[e+2*l+0],m=n[e+2*l+1];f>o!=m>o&&i<(c-u)*(o-f)/(m-f)+u&&(a=!a)}return a}}),_=/* @__PURE__ */i((t,n)=>{n.exports=function(t,n,e,r){var i=t[0],o=t[1],a=!1;void 0===e&&(e=0),void 0===r&&(r=n.length);for(var h=r-e,s=0,l=h-1;s<h;l=s++){var u=n[s+e][0],f=n[s+e][1],c=n[l+e][0],m=n[l+e][1];f>o!=m>o&&i<(c-u)*(o-f)/(m-f)+u&&(a=!a)}return a}}),B=/* @__PURE__ */i((t,n)=>{var e=b(),r=_();n.exports=function(t,n,i,o){return n.length>0&&Array.isArray(n[0])?r(t,n,i,o):e(t,n,i,o)},n.exports.nested=r,n.exports.flat=e}),w=/* @__PURE__ */i((t,n)=>{var e,r;e=t,r=function(t){const n=134217729;function e(t,n,e,r,i){let o,a,h,s,l=n[0],u=r[0],f=0,c=0;u>l==u>-l?(o=l,l=n[++f]):(o=u,u=r[++c]);let m=0;if(f<t&&c<e)for(u>l==u>-l?(h=o-((a=l+o)-l),l=n[++f]):(h=o-((a=u+o)-u),u=r[++c]),o=a,0!==h&&(i[m++]=h);f<t&&c<e;)u>l==u>-l?(h=o-((a=o+l)-(s=a-o))+(l-s),l=n[++f]):(h=o-((a=o+u)-(s=a-o))+(u-s),u=r[++c]),o=a,0!==h&&(i[m++]=h);for(;f<t;)h=o-((a=o+l)-(s=a-o))+(l-s),l=n[++f],o=a,0!==h&&(i[m++]=h);for(;c<e;)h=o-((a=o+u)-(s=a-o))+(u-s),u=r[++c],o=a,0!==h&&(i[m++]=h);return 0===o&&0!==m||(i[m++]=o),m}function r(t){return new Float64Array(t)}const i=r(4),o=r(8),a=r(12),h=r(16),s=r(4);t.orient2d=function(t,r,l,u,f,c){const m=(r-c)*(l-f),p=(t-f)*(u-c),d=m-p;if(0===m||0===p||m>0!=p>0)return d;const g=Math.abs(m+p);return Math.abs(d)>=33306690738754716e-32*g?d:-function(t,r,l,u,f,c,m){let p,d,g,v,x,y,M,X,Y,b,_,B,w,P,E,F,A,S;const j=t-f,k=l-f,I=r-c,L=u-c;x=(E=(X=j-(M=(y=n*j)-(y-j)))*(b=L-(Y=(y=n*L)-(y-L)))-((P=j*L)-M*Y-X*Y-M*b))-(_=E-(A=(X=I-(M=(y=n*I)-(y-I)))*(b=k-(Y=(y=n*k)-(y-k)))-((F=I*k)-M*Y-X*Y-M*b))),i[0]=E-(_+x)+(x-A),x=(w=P-((B=P+_)-(x=B-P))+(_-x))-(_=w-F),i[1]=w-(_+x)+(x-F),x=(S=B+_)-B,i[2]=B-(S-x)+(_-x),i[3]=S;let C=function(t,n){let e=n[0];for(let r=1;r<4;r++)e+=n[r];return e}(0,i),q=22204460492503146e-32*m;if(C>=q||-C>=q)return C;if(p=t-(j+(x=t-j))+(x-f),g=l-(k+(x=l-k))+(x-f),d=r-(I+(x=r-I))+(x-c),v=u-(L+(x=u-L))+(x-c),0===p&&0===d&&0===g&&0===v)return C;if(q=11093356479670487e-47*m+33306690738754706e-32*Math.abs(C),(C+=j*v+L*p-(I*g+k*d))>=q||-C>=q)return C;x=(E=(X=p-(M=(y=n*p)-(y-p)))*(b=L-(Y=(y=n*L)-(y-L)))-((P=p*L)-M*Y-X*Y-M*b))-(_=E-(A=(X=d-(M=(y=n*d)-(y-d)))*(b=k-(Y=(y=n*k)-(y-k)))-((F=d*k)-M*Y-X*Y-M*b))),s[0]=E-(_+x)+(x-A),x=(w=P-((B=P+_)-(x=B-P))+(_-x))-(_=w-F),s[1]=w-(_+x)+(x-F),x=(S=B+_)-B,s[2]=B-(S-x)+(_-x),s[3]=S;const N=e(4,i,4,s,o);x=(E=(X=j-(M=(y=n*j)-(y-j)))*(b=v-(Y=(y=n*v)-(y-v)))-((P=j*v)-M*Y-X*Y-M*b))-(_=E-(A=(X=I-(M=(y=n*I)-(y-I)))*(b=g-(Y=(y=n*g)-(y-g)))-((F=I*g)-M*Y-X*Y-M*b))),s[0]=E-(_+x)+(x-A),x=(w=P-((B=P+_)-(x=B-P))+(_-x))-(_=w-F),s[1]=w-(_+x)+(x-F),x=(S=B+_)-B,s[2]=B-(S-x)+(_-x),s[3]=S;const O=e(N,o,4,s,a);return x=(E=(X=p-(M=(y=n*p)-(y-p)))*(b=v-(Y=(y=n*v)-(y-v)))-((P=p*v)-M*Y-X*Y-M*b))-(_=E-(A=(X=d-(M=(y=n*d)-(y-d)))*(b=g-(Y=(y=n*g)-(y-g)))-((F=d*g)-M*Y-X*Y-M*b))),s[0]=E-(_+x)+(x-A),x=(w=P-((B=P+_)-(x=B-P))+(_-x))-(_=w-F),s[1]=w-(_+x)+(x-F),x=(S=B+_)-B,s[2]=B-(S-x)+(_-x),s[3]=S,h[e(O,a,4,s,h)-1]}(t,r,l,u,f,c,g)},t.orient2dfast=function(t,n,e,r,i,o){return(n-o)*(e-i)-(t-i)*(r-o)},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof t&&void 0!==n?r(t):"function"==typeof define&&define.amd?define(["exports"],r):r((e=e||self).predicates={})}),P=/* @__PURE__ */i((t,e)=>{var r=y(),i=(Y(),n(M)),o=B(),a=w().orient2d;function h(t,n,e){n=Math.max(0,void 0===n?2:n),e=e||0;var i=function(t){for(var n=t[0],e=t[0],r=t[0],i=t[0],a=0;a<t.length;a++){var h=t[a];h[0]<n[0]&&(n=h),h[0]>r[0]&&(r=h),h[1]<e[1]&&(e=h),h[1]>i[1]&&(i=h)}var s=[n,e,r,i],l=s.slice();for(a=0;a<t.length;a++)o(t[a],s)||l.push(t[a]);return function(t){t.sort(b);for(var n=[],e=0;e<t.length;e++){for(;n.length>=2&&m(n[n.length-2],n[n.length-1],t[e])<=0;)n.pop();n.push(t[e])}for(var r=[],i=t.length-1;i>=0;i--){for(;r.length>=2&&m(r[r.length-2],r[r.length-1],t[i])<=0;)r.pop();r.push(t[i])}return r.pop(),n.pop(),n.concat(r)}(l)}(t),a=new r(16);a.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},a.compareMinX=function(t,n){return t[0]-n[0]},a.compareMinY=function(t,n){return t[1]-n[1]},a.load(t);for(var h,l=[],u=0;u<i.length;u++){var f=i[u];a.remove(f),h=g(f,h),l.push(h)}var c=new r(16);for(u=0;u<l.length;u++)c.insert(d(l[u]));for(var p=n*n,x=e*e;l.length;){var y=l.shift(),M=y.p,X=y.next.p,Y=v(M,X);if(!(Y<x)){var _=Y/p;(f=s(a,y.prev.p,M,X,y.next.next.p,_,c))&&Math.min(v(f,M),v(f,X))<=_&&(l.push(y),l.push(g(f,y)),a.remove(f),c.remove(y),c.insert(d(y)),c.insert(d(y.next)))}}y=h;var B=[];do{B.push(y.p),y=y.next}while(y!==h);return B.push(y.p),B}function s(t,n,e,r,o,a,h){for(var s=new i([],l),f=t.data;f;){for(var m=0;m<f.children.length;m++){var p=f.children[m],d=f.leaf?x(p,e,r):u(e,r,p);d>a||s.push({node:p,dist:d})}for(;s.length&&!s.peek().node.children;){var g=s.pop(),v=g.node,y=x(v,n,e),M=x(v,r,o);if(g.dist<y&&g.dist<M&&c(e,v,h)&&c(r,v,h))return v}(f=s.pop())&&(f=f.node)}return null}function l(t,n){return t.dist-n.dist}function u(t,n,e){if(f(t,e)||f(n,e))return 0;var r=X(t[0],t[1],n[0],n[1],e.minX,e.minY,e.maxX,e.minY);if(0===r)return 0;var i=X(t[0],t[1],n[0],n[1],e.minX,e.minY,e.minX,e.maxY);if(0===i)return 0;var o=X(t[0],t[1],n[0],n[1],e.maxX,e.minY,e.maxX,e.maxY);if(0===o)return 0;var a=X(t[0],t[1],n[0],n[1],e.minX,e.maxY,e.maxX,e.maxY);return 0===a?0:Math.min(r,i,o,a)}function f(t,n){return t[0]>=n.minX&&t[0]<=n.maxX&&t[1]>=n.minY&&t[1]<=n.maxY}function c(t,n,e){for(var r=Math.min(t[0],n[0]),i=Math.min(t[1],n[1]),o=Math.max(t[0],n[0]),a=Math.max(t[1],n[1]),h=e.search({minX:r,minY:i,maxX:o,maxY:a}),s=0;s<h.length;s++)if(p(h[s].p,h[s].next.p,t,n))return!1;return!0}function m(t,n,e){return a(t[0],t[1],n[0],n[1],e[0],e[1])}function p(t,n,e,r){return t!==r&&n!==e&&m(t,n,e)>0!=m(t,n,r)>0&&m(e,r,t)>0!=m(e,r,n)>0}function d(t){var n=t.p,e=t.next.p;return t.minX=Math.min(n[0],e[0]),t.minY=Math.min(n[1],e[1]),t.maxX=Math.max(n[0],e[0]),t.maxY=Math.max(n[1],e[1]),t}function g(t,n){var e={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return n?(e.next=n.next,e.prev=n,n.next.prev=e,n.next=e):(e.prev=e,e.next=e),e}function v(t,n){var e=t[0]-n[0],r=t[1]-n[1];return e*e+r*r}function x(t,n,e){var r=n[0],i=n[1],o=e[0]-r,a=e[1]-i;if(0!==o||0!==a){var h=((t[0]-r)*o+(t[1]-i)*a)/(o*o+a*a);h>1?(r=e[0],i=e[1]):h>0&&(r+=o*h,i+=a*h)}return(o=t[0]-r)*o+(a=t[1]-i)*a}function X(t,n,e,r,i,o,a,h){var s,l,u,f,c=e-t,m=r-n,p=a-i,d=h-o,g=t-i,v=n-o,x=c*c+m*m,y=c*p+m*d,M=p*p+d*d,X=c*g+m*v,Y=p*g+d*v,b=x*M-y*y,_=b,B=b;0===b?(l=0,_=1,f=Y,B=M):(f=x*Y-y*X,(l=y*Y-M*X)<0?(l=0,f=Y,B=M):l>_&&(l=_,f=Y+y,B=M)),f<0?(f=0,-X<0?l=0:-X>x?l=_:(l=-X,_=x)):f>B&&(f=B,-X+y<0?l=0:-X+y>x?l=_:(l=-X+y,_=x));var w=(1-(u=0===f?0:f/B))*i+u*a-((1-(s=0===l?0:l/_))*t+s*e),P=(1-u)*o+u*h-((1-s)*n+s*r);return w*w+P*P}function b(t,n){return t[0]===n[0]?t[1]-n[1]:t[0]-n[0]}i.default&&(i=i.default),e.exports=h,e.exports.default=h}),E=/* @__PURE__ */t(P(),1),F=function(t,n={}){n.concavity=n.concavity||1/0;const e=[];if(v(t,t=>{e.push([t[0],t[1]])}),!e.length)return null;const r=(0,E.default)(e,n.concavity);return r.length>3?function(t,n,e={}){for(const r of t){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<r[r.length-1].length;t++)if(r[r.length-1][t]!==r[0][t])throw new Error("First and last Position are not equivalent.")}return p({type:"Polygon",coordinates:t},n,e)}([r]):null},A=t=>"number"==typeof t.x&&"number"==typeof t.y?[t.x,t.y]:null,S=({folderId:t})=>{const{folders:n,organization:e}=c(),r=h({}),[i,p]=a(()=>t??null),g=Boolean(e?.integrationSettings?.enableFolderView);s(()=>{p(t??null)},[t]);const v=o(()=>g&&n?.filter(t=>(t.parentFolderId??null)===i&&t.boundary?.length>=1)||[],[n,i,g]),x=u({queryKey:["public-events-map-leaf",e?._id,g,i??"root"],queryFn:async()=>{const t=i?{folderId:i,limit:500,sort:"-views",contentLimit:3}:g?{limit:500,sort:"-views",contentLimit:3}:{includeAllFolders:!0,limit:500,sort:"-views",contentLimit:3};return(await l.get(f.PUBLIC_EVENTS,{headers:{"x-org-id":e?._id??""},searchParams:t}).json()).data??[]},enabled:Boolean(e?._id),staleTime:3e5,retry:!1}),y=x.isLoading||x.isFetching,M=x.data?.filter(t=>"number"==typeof t?.location?.x&&"number"==typeof t?.location?.y)??[],X=o(()=>v.map(t=>((t,n)=>{const e=t.boundary?.map(A).filter(t=>Boolean(t)),r=e?e.map(t=>t.join(",")).sort().join("|"):"",i=n[t._id];if(i&&i.hash===r)return i.feature;let o;if(e?.length){const t=e?.map(t=>d(t));if(t&&t.length>=3){const n=F(function(t,n={}){const e={type:"FeatureCollection"};return n.id&&(e.id=n.id),n.bbox&&(e.bbox=n.bbox),e.features=t,e}(t));"Polygon"===n?.geometry.type&&(o=n.geometry)}}if(!o&&e&&e.length>0&&(o={type:"Point",coordinates:1===e.length?e[0]:[e.reduce((t,n)=>t+n[0],0)/e.length,e.reduce((t,n)=>t+n[1],0)/e.length]}),!o)return null;const a={type:"Feature",id:t._id,properties:{folderId:t._id,name:t.name,color:t.color,eventCount:t.boundary?.length||0,isFolderPoint:"Point"===o.type},geometry:o};return n[t._id]={hash:r,feature:a},a})(t,r.current)).filter(t=>Boolean(t)),[v]),Y=o(()=>({type:"FeatureCollection",features:X}),[X]),b=o(()=>n?.find(t=>t._id===i)??null,[n,i]),_=o(()=>i&&n?m(n,i):[],[n,i]),B=o(()=>(t=>{const n=[],e=t=>{Array.isArray(t)&&("number"!=typeof t[0]||"number"!=typeof t[1]?t.forEach(e):n.push([t[0],t[1]]))};if(t.features.forEach(t=>e(t.geometry.coordinates)),0===n.length)return null;const r=n.map(t=>t[0]),i=n.map(t=>t[1]);return[Math.min(...r),Math.min(...i),Math.max(...r),Math.max(...i)]})(Y),[Y]);return{isFolderViewEnabled:g,activeFolderId:i,visibleFolders:v,visibleEvents:M,folderFeatures:X,folderFeatureCollection:Y,breadcrumb:_,isLoadingEvents:y,isBusy:y,setActiveFolderId:t=>{p(t)},goBack:()=>{b&&p(b.parentFolderId??null)},activeFolder:b,folderBounds:B}};export{S as t};
|
|
1
|
+
import{a as t,i as n,n as e,r,t as i}from"./CsohJ1Yu.js";import{M as o,P as a,j as h,z as s}from"./19c52mJB.js";import{N as l,P as u,l as f,n as c}from"./t1REK11Z.js";import{t as m}from"./BQBx6JI7.js";function p(t,n,e={}){const r={type:"Feature"};return(0===e.id||e.id)&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.properties=n||{},r.geometry=t,r}function d(t,n,e={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return p({type:"Point",coordinates:t},n,e)}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function v(t,n,e){if(null!==t)for(var r,i,o,a,h,s,l,u,f=0,c=0,m=t.type,p="FeatureCollection"===m,d="Feature"===m,g=p?t.features.length:1,x=0;x<g;x++){h=(u=!!(l=p?t.features[x].geometry:d?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var y=0;y<h;y++){var M=0,X=0;if(null!==(a=u?l.geometries[y]:l)){s=a.coordinates;var Y=a.type;switch(f=!e||"Polygon"!==Y&&"MultiPolygon"!==Y?0:1,Y){case null:break;case"Point":if(!1===n(s,c,x,M,X))return!1;c++,M++;break;case"LineString":case"MultiPoint":for(r=0;r<s.length;r++){if(!1===n(s[r],c,x,M,X))return!1;c++,"MultiPoint"===Y&&M++}"LineString"===Y&&M++;break;case"Polygon":case"MultiLineString":for(r=0;r<s.length;r++){for(i=0;i<s[r].length-f;i++){if(!1===n(s[r][i],c,x,M,X))return!1;c++}"MultiLineString"===Y&&M++,"Polygon"===Y&&X++}"Polygon"===Y&&M++;break;case"MultiPolygon":for(r=0;r<s.length;r++){for(X=0,i=0;i<s[r].length;i++){for(o=0;o<s[r][i].length-f;o++){if(!1===n(s[r][i][o],c,x,M,X))return!1;c++}X++}M++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===v(a.geometries[r],n,e))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}Math.PI;var x,y=/* @__PURE__ */i((t,n)=>{var e,r;e=t,r=function(){function t(t,r,i,o,a){!function t(e,r,i,o,a){for(;o>i;){if(o-i>600){var h=o-i+1,s=r-i+1,l=Math.log(h),u=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*u*(h-u)/h)*(s-h/2<0?-1:1);t(e,r,Math.max(i,Math.floor(r-s*u/h+f)),Math.min(o,Math.floor(r+(h-s)*u/h+f)),a)}var c=e[r],m=i,p=o;for(n(e,i,r),a(e[o],c)>0&&n(e,i,o);m<p;){for(n(e,m,p),m++,p--;a(e[m],c)<0;)m++;for(;a(e[p],c)>0;)p--}0===a(e[i],c)?n(e,i,p):n(e,++p,o),p<=r&&(i=p+1),r<=p&&(o=p-1)}}(t,r,i||0,o||t.length-1,a||e)}function n(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function e(t,n){return t<n?-1:t>n?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,n,e){if(!e)return n.indexOf(t);for(var r=0;r<n.length;r++)if(e(t,n[r]))return r;return-1}function o(t,n){a(t,0,t.children.length,n,t)}function a(t,n,e,r,i){i||(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=n;o<e;o++){var a=t.children[o];h(i,t.leaf?r(a):a)}return i}function h(t,n){return t.minX=Math.min(t.minX,n.minX),t.minY=Math.min(t.minY,n.minY),t.maxX=Math.max(t.maxX,n.maxX),t.maxY=Math.max(t.maxY,n.maxY),t}function s(t,n){return t.minX-n.minX}function l(t,n){return t.minY-n.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,n){return t.minX<=n.minX&&t.minY<=n.minY&&n.maxX<=t.maxX&&n.maxY<=t.maxY}function m(t,n){return n.minX<=t.maxX&&n.minY<=t.maxY&&n.maxX>=t.minX&&n.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(n,e,r,i,o){for(var a=[e,r];a.length;)if(!((r=a.pop())-(e=a.pop())<=i)){var h=e+Math.ceil((r-e)/i/2)*i;t(n,h,e,r,o),a.push(e,h,h,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var n=this.data,e=[];if(!m(t,n))return e;for(var r=this.toBBox,i=[];n;){for(var o=0;o<n.children.length;o++){var a=n.children[o],h=n.leaf?r(a):a;m(t,h)&&(n.leaf?e.push(a):c(t,h)?this._all(a,e):i.push(a))}n=i.pop()}return e},r.prototype.collides=function(t){var n=this.data;if(!m(t,n))return!1;for(var e=[];n;){for(var r=0;r<n.children.length;r++){var i=n.children[r],o=n.leaf?this.toBBox(i):i;if(m(t,o)){if(n.leaf||c(t,o))return!0;e.push(i)}}n=e.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var n=0;n<t.length;n++)this.insert(t[n]);return this}var e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){var r=this.data;this.data=e,e=r}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,n){if(!t)return this;for(var e,r,o,a=this.data,h=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],e=l.pop(),o=!0),a.leaf){var u=i(t,a.children,n);if(-1!==u)return a.children.splice(u,1),s.push(a),this._condense(s),this}o||a.leaf||!c(a,h)?r?(e++,a=r.children[e],o=!1):a=null:(s.push(a),l.push(e),e=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,n){return t.minX-n.minX},r.prototype.compareMinY=function(t,n){return t.minY-n.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,n){for(var e=[];t;)t.leaf?n.push.apply(n,t.children):e.push.apply(e,t.children),t=e.pop();return n},r.prototype._build=function(t,n,e,r){var i,a=e-n+1,h=this._maxEntries;if(a<=h)return o(i=p(t.slice(n,e+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(a)/Math.log(h)),h=Math.ceil(a/Math.pow(h,r-1))),(i=p([])).leaf=!1,i.height=r;var s=Math.ceil(a/h),l=s*Math.ceil(Math.sqrt(h));d(t,n,e,l,this.compareMinX);for(var u=n;u<=e;u+=l){var f=Math.min(u+l-1,e);d(t,u,f,s,this.compareMinY);for(var c=u;c<=f;c+=s){var m=Math.min(c+s-1,f);i.children.push(this._build(t,c,m,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,n,e,r){for(;r.push(n),!n.leaf&&r.length-1!==e;){for(var i=1/0,o=1/0,a=void 0,h=0;h<n.children.length;h++){var s=n.children[h],l=u(s),f=(c=t,m=s,(Math.max(m.maxX,c.maxX)-Math.min(m.minX,c.minX))*(Math.max(m.maxY,c.maxY)-Math.min(m.minY,c.minY))-l);f<o?(o=f,i=l<i?l:i,a=s):f===o&&l<i&&(i=l,a=s)}n=a||n.children[0]}var c,m;return n},r.prototype._insert=function(t,n,e){var r=e?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,n,i);for(o.children.push(t),h(o,r);n>=0&&i[n].children.length>this._maxEntries;)this._split(i,n),n--;this._adjustParentBBoxes(r,i,n)},r.prototype._split=function(t,n){var e=t[n],r=e.children.length,i=this._minEntries;this._chooseSplitAxis(e,i,r);var a=this._chooseSplitIndex(e,i,r),h=p(e.children.splice(a,e.children.length-a));h.height=e.height,h.leaf=e.leaf,o(e,this.toBBox),o(h,this.toBBox),n?t[n-1].children.push(h):this._splitRoot(e,h)},r.prototype._splitRoot=function(t,n){this.data=p([t,n]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,n,e){for(var r,i,o,h,s,l,f,c=1/0,m=1/0,p=n;p<=e-n;p++){var d=a(t,0,p,this.toBBox),g=a(t,p,e,this.toBBox),v=(i=d,o=g,h=Math.max(i.minX,o.minX),s=Math.max(i.minY,o.minY),l=Math.min(i.maxX,o.maxX),f=Math.min(i.maxY,o.maxY),Math.max(0,l-h)*Math.max(0,f-s)),x=u(d)+u(g);v<c?(c=v,r=p,m=x<m?x:m):v===c&&x<m&&(m=x,r=p)}return r||e-n},r.prototype._chooseSplitAxis=function(t,n,e){var r=t.leaf?this.compareMinX:s,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,n,e,r)<this._allDistMargin(t,n,e,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,n,e,r){t.children.sort(r);for(var i=this.toBBox,o=a(t,0,n,i),s=a(t,e-n,e,i),l=f(o)+f(s),u=n;u<e-n;u++){var c=t.children[u];h(o,t.leaf?i(c):c),l+=f(o)}for(var m=e-n-1;m>=n;m--){var p=t.children[m];h(s,t.leaf?i(p):p),l+=f(s)}return l},r.prototype._adjustParentBBoxes=function(t,n,e){for(var r=e;r>=0;r--)h(n[r],t)},r.prototype._condense=function(t){for(var n=t.length-1,e=void 0;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)},r},"object"==typeof t&&void 0!==n?n.exports=r():"function"==typeof define&&define.amd?define(r):(e=e||self).RBush=r()}),M=/* @__PURE__ */r({default:()=>x});function X(t,n){return t<n?-1:t>n?1:0}var Y=e(()=>{x=class{constructor(t=[],n=X){if(this.data=t,this.length=this.data.length,this.compare=n,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],n=this.data.pop();return this.length--,this.length>0&&(this.data[0]=n,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:n,compare:e}=this,r=n[t];for(;t>0;){const i=t-1>>1,o=n[i];if(e(r,o)>=0)break;n[t]=o,t=i}n[t]=r}_down(t){const{data:n,compare:e}=this,r=this.length>>1,i=n[t];for(;t<r;){let r=1+(t<<1),o=n[r];const a=r+1;if(a<this.length&&e(n[a],o)<0&&(r=a,o=n[a]),e(o,i)>=0)break;n[t]=o,t=r}n[t]=i}}}),b=/* @__PURE__ */i((t,n)=>{n.exports=function(t,n,e,r){var i=t[0],o=t[1],a=!1;void 0===e&&(e=0),void 0===r&&(r=n.length);for(var h=(r-e)/2,s=0,l=h-1;s<h;l=s++){var u=n[e+2*s+0],f=n[e+2*s+1],c=n[e+2*l+0],m=n[e+2*l+1];f>o!=m>o&&i<(c-u)*(o-f)/(m-f)+u&&(a=!a)}return a}}),_=/* @__PURE__ */i((t,n)=>{n.exports=function(t,n,e,r){var i=t[0],o=t[1],a=!1;void 0===e&&(e=0),void 0===r&&(r=n.length);for(var h=r-e,s=0,l=h-1;s<h;l=s++){var u=n[s+e][0],f=n[s+e][1],c=n[l+e][0],m=n[l+e][1];f>o!=m>o&&i<(c-u)*(o-f)/(m-f)+u&&(a=!a)}return a}}),B=/* @__PURE__ */i((t,n)=>{var e=b(),r=_();n.exports=function(t,n,i,o){return n.length>0&&Array.isArray(n[0])?r(t,n,i,o):e(t,n,i,o)},n.exports.nested=r,n.exports.flat=e}),w=/* @__PURE__ */i((t,n)=>{var e,r;e=t,r=function(t){const n=134217729;function e(t,n,e,r,i){let o,a,h,s,l=n[0],u=r[0],f=0,c=0;u>l==u>-l?(o=l,l=n[++f]):(o=u,u=r[++c]);let m=0;if(f<t&&c<e)for(u>l==u>-l?(h=o-((a=l+o)-l),l=n[++f]):(h=o-((a=u+o)-u),u=r[++c]),o=a,0!==h&&(i[m++]=h);f<t&&c<e;)u>l==u>-l?(h=o-((a=o+l)-(s=a-o))+(l-s),l=n[++f]):(h=o-((a=o+u)-(s=a-o))+(u-s),u=r[++c]),o=a,0!==h&&(i[m++]=h);for(;f<t;)h=o-((a=o+l)-(s=a-o))+(l-s),l=n[++f],o=a,0!==h&&(i[m++]=h);for(;c<e;)h=o-((a=o+u)-(s=a-o))+(u-s),u=r[++c],o=a,0!==h&&(i[m++]=h);return 0===o&&0!==m||(i[m++]=o),m}function r(t){return new Float64Array(t)}const i=r(4),o=r(8),a=r(12),h=r(16),s=r(4);t.orient2d=function(t,r,l,u,f,c){const m=(r-c)*(l-f),p=(t-f)*(u-c),d=m-p;if(0===m||0===p||m>0!=p>0)return d;const g=Math.abs(m+p);return Math.abs(d)>=33306690738754716e-32*g?d:-function(t,r,l,u,f,c,m){let p,d,g,v,x,y,M,X,Y,b,_,B,w,P,E,F,A,S;const j=t-f,k=l-f,I=r-c,L=u-c;x=(E=(X=j-(M=(y=n*j)-(y-j)))*(b=L-(Y=(y=n*L)-(y-L)))-((P=j*L)-M*Y-X*Y-M*b))-(_=E-(A=(X=I-(M=(y=n*I)-(y-I)))*(b=k-(Y=(y=n*k)-(y-k)))-((F=I*k)-M*Y-X*Y-M*b))),i[0]=E-(_+x)+(x-A),x=(w=P-((B=P+_)-(x=B-P))+(_-x))-(_=w-F),i[1]=w-(_+x)+(x-F),x=(S=B+_)-B,i[2]=B-(S-x)+(_-x),i[3]=S;let C=function(t,n){let e=n[0];for(let r=1;r<4;r++)e+=n[r];return e}(0,i),q=22204460492503146e-32*m;if(C>=q||-C>=q)return C;if(p=t-(j+(x=t-j))+(x-f),g=l-(k+(x=l-k))+(x-f),d=r-(I+(x=r-I))+(x-c),v=u-(L+(x=u-L))+(x-c),0===p&&0===d&&0===g&&0===v)return C;if(q=11093356479670487e-47*m+33306690738754706e-32*Math.abs(C),(C+=j*v+L*p-(I*g+k*d))>=q||-C>=q)return C;x=(E=(X=p-(M=(y=n*p)-(y-p)))*(b=L-(Y=(y=n*L)-(y-L)))-((P=p*L)-M*Y-X*Y-M*b))-(_=E-(A=(X=d-(M=(y=n*d)-(y-d)))*(b=k-(Y=(y=n*k)-(y-k)))-((F=d*k)-M*Y-X*Y-M*b))),s[0]=E-(_+x)+(x-A),x=(w=P-((B=P+_)-(x=B-P))+(_-x))-(_=w-F),s[1]=w-(_+x)+(x-F),x=(S=B+_)-B,s[2]=B-(S-x)+(_-x),s[3]=S;const N=e(4,i,4,s,o);x=(E=(X=j-(M=(y=n*j)-(y-j)))*(b=v-(Y=(y=n*v)-(y-v)))-((P=j*v)-M*Y-X*Y-M*b))-(_=E-(A=(X=I-(M=(y=n*I)-(y-I)))*(b=g-(Y=(y=n*g)-(y-g)))-((F=I*g)-M*Y-X*Y-M*b))),s[0]=E-(_+x)+(x-A),x=(w=P-((B=P+_)-(x=B-P))+(_-x))-(_=w-F),s[1]=w-(_+x)+(x-F),x=(S=B+_)-B,s[2]=B-(S-x)+(_-x),s[3]=S;const O=e(N,o,4,s,a);return x=(E=(X=p-(M=(y=n*p)-(y-p)))*(b=v-(Y=(y=n*v)-(y-v)))-((P=p*v)-M*Y-X*Y-M*b))-(_=E-(A=(X=d-(M=(y=n*d)-(y-d)))*(b=g-(Y=(y=n*g)-(y-g)))-((F=d*g)-M*Y-X*Y-M*b))),s[0]=E-(_+x)+(x-A),x=(w=P-((B=P+_)-(x=B-P))+(_-x))-(_=w-F),s[1]=w-(_+x)+(x-F),x=(S=B+_)-B,s[2]=B-(S-x)+(_-x),s[3]=S,h[e(O,a,4,s,h)-1]}(t,r,l,u,f,c,g)},t.orient2dfast=function(t,n,e,r,i,o){return(n-o)*(e-i)-(t-i)*(r-o)},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof t&&void 0!==n?r(t):"function"==typeof define&&define.amd?define(["exports"],r):r((e=e||self).predicates={})}),P=/* @__PURE__ */i((t,e)=>{var r=y(),i=(Y(),n(M)),o=B(),a=w().orient2d;function h(t,n,e){n=Math.max(0,void 0===n?2:n),e=e||0;var i=function(t){for(var n=t[0],e=t[0],r=t[0],i=t[0],a=0;a<t.length;a++){var h=t[a];h[0]<n[0]&&(n=h),h[0]>r[0]&&(r=h),h[1]<e[1]&&(e=h),h[1]>i[1]&&(i=h)}var s=[n,e,r,i],l=s.slice();for(a=0;a<t.length;a++)o(t[a],s)||l.push(t[a]);return function(t){t.sort(b);for(var n=[],e=0;e<t.length;e++){for(;n.length>=2&&m(n[n.length-2],n[n.length-1],t[e])<=0;)n.pop();n.push(t[e])}for(var r=[],i=t.length-1;i>=0;i--){for(;r.length>=2&&m(r[r.length-2],r[r.length-1],t[i])<=0;)r.pop();r.push(t[i])}return r.pop(),n.pop(),n.concat(r)}(l)}(t),a=new r(16);a.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},a.compareMinX=function(t,n){return t[0]-n[0]},a.compareMinY=function(t,n){return t[1]-n[1]},a.load(t);for(var h,l=[],u=0;u<i.length;u++){var f=i[u];a.remove(f),h=g(f,h),l.push(h)}var c=new r(16);for(u=0;u<l.length;u++)c.insert(d(l[u]));for(var p=n*n,x=e*e;l.length;){var y=l.shift(),M=y.p,X=y.next.p,Y=v(M,X);if(!(Y<x)){var _=Y/p;(f=s(a,y.prev.p,M,X,y.next.next.p,_,c))&&Math.min(v(f,M),v(f,X))<=_&&(l.push(y),l.push(g(f,y)),a.remove(f),c.remove(y),c.insert(d(y)),c.insert(d(y.next)))}}y=h;var B=[];do{B.push(y.p),y=y.next}while(y!==h);return B.push(y.p),B}function s(t,n,e,r,o,a,h){for(var s=new i([],l),f=t.data;f;){for(var m=0;m<f.children.length;m++){var p=f.children[m],d=f.leaf?x(p,e,r):u(e,r,p);d>a||s.push({node:p,dist:d})}for(;s.length&&!s.peek().node.children;){var g=s.pop(),v=g.node,y=x(v,n,e),M=x(v,r,o);if(g.dist<y&&g.dist<M&&c(e,v,h)&&c(r,v,h))return v}(f=s.pop())&&(f=f.node)}return null}function l(t,n){return t.dist-n.dist}function u(t,n,e){if(f(t,e)||f(n,e))return 0;var r=X(t[0],t[1],n[0],n[1],e.minX,e.minY,e.maxX,e.minY);if(0===r)return 0;var i=X(t[0],t[1],n[0],n[1],e.minX,e.minY,e.minX,e.maxY);if(0===i)return 0;var o=X(t[0],t[1],n[0],n[1],e.maxX,e.minY,e.maxX,e.maxY);if(0===o)return 0;var a=X(t[0],t[1],n[0],n[1],e.minX,e.maxY,e.maxX,e.maxY);return 0===a?0:Math.min(r,i,o,a)}function f(t,n){return t[0]>=n.minX&&t[0]<=n.maxX&&t[1]>=n.minY&&t[1]<=n.maxY}function c(t,n,e){for(var r=Math.min(t[0],n[0]),i=Math.min(t[1],n[1]),o=Math.max(t[0],n[0]),a=Math.max(t[1],n[1]),h=e.search({minX:r,minY:i,maxX:o,maxY:a}),s=0;s<h.length;s++)if(p(h[s].p,h[s].next.p,t,n))return!1;return!0}function m(t,n,e){return a(t[0],t[1],n[0],n[1],e[0],e[1])}function p(t,n,e,r){return t!==r&&n!==e&&m(t,n,e)>0!=m(t,n,r)>0&&m(e,r,t)>0!=m(e,r,n)>0}function d(t){var n=t.p,e=t.next.p;return t.minX=Math.min(n[0],e[0]),t.minY=Math.min(n[1],e[1]),t.maxX=Math.max(n[0],e[0]),t.maxY=Math.max(n[1],e[1]),t}function g(t,n){var e={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return n?(e.next=n.next,e.prev=n,n.next.prev=e,n.next=e):(e.prev=e,e.next=e),e}function v(t,n){var e=t[0]-n[0],r=t[1]-n[1];return e*e+r*r}function x(t,n,e){var r=n[0],i=n[1],o=e[0]-r,a=e[1]-i;if(0!==o||0!==a){var h=((t[0]-r)*o+(t[1]-i)*a)/(o*o+a*a);h>1?(r=e[0],i=e[1]):h>0&&(r+=o*h,i+=a*h)}return(o=t[0]-r)*o+(a=t[1]-i)*a}function X(t,n,e,r,i,o,a,h){var s,l,u,f,c=e-t,m=r-n,p=a-i,d=h-o,g=t-i,v=n-o,x=c*c+m*m,y=c*p+m*d,M=p*p+d*d,X=c*g+m*v,Y=p*g+d*v,b=x*M-y*y,_=b,B=b;0===b?(l=0,_=1,f=Y,B=M):(f=x*Y-y*X,(l=y*Y-M*X)<0?(l=0,f=Y,B=M):l>_&&(l=_,f=Y+y,B=M)),f<0?(f=0,-X<0?l=0:-X>x?l=_:(l=-X,_=x)):f>B&&(f=B,-X+y<0?l=0:-X+y>x?l=_:(l=-X+y,_=x));var w=(1-(u=0===f?0:f/B))*i+u*a-((1-(s=0===l?0:l/_))*t+s*e),P=(1-u)*o+u*h-((1-s)*n+s*r);return w*w+P*P}function b(t,n){return t[0]===n[0]?t[1]-n[1]:t[0]-n[0]}i.default&&(i=i.default),e.exports=h,e.exports.default=h}),E=/* @__PURE__ */t(P(),1),F=function(t,n={}){n.concavity=n.concavity||1/0;const e=[];if(v(t,t=>{e.push([t[0],t[1]])}),!e.length)return null;const r=(0,E.default)(e,n.concavity);return r.length>3?function(t,n,e={}){for(const r of t){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<r[r.length-1].length;t++)if(r[r.length-1][t]!==r[0][t])throw new Error("First and last Position are not equivalent.")}return p({type:"Polygon",coordinates:t},n,e)}([r]):null},A=t=>"number"==typeof t.x&&"number"==typeof t.y?[t.x,t.y]:null,S=({folderId:t})=>{const{folders:n,organization:e}=c(),r=h({}),[i,p]=a(()=>t??null),g=Boolean(e?.integrationSettings?.enableFolderView);s(()=>{p(t??null)},[t]);const v=o(()=>g&&n?.filter(t=>(t.parentFolderId??null)===i&&t.boundary?.length>=1)||[],[n,i,g]),x=u({queryKey:["public-events-map-leaf",e?._id,g,i??"root"],queryFn:async()=>{const t=i?{folderId:i,limit:500,sort:"-views",contentLimit:3}:g?{limit:500,sort:"-views",contentLimit:3}:{includeAllFolders:!0,limit:500,sort:"-views",contentLimit:3};return(await l.get(f.PUBLIC_EVENTS,{headers:{"x-org-id":e?._id??""},searchParams:t}).json()).data??[]},enabled:Boolean(e?._id),staleTime:3e5,retry:!1}),y=x.isLoading||x.isFetching,M=x.data?.filter(t=>"number"==typeof t?.location?.x&&"number"==typeof t?.location?.y)??[],X=o(()=>v.map(t=>((t,n)=>{const e=t.boundary?.map(A).filter(t=>Boolean(t)),r=e?e.map(t=>t.join(",")).sort().join("|"):"",i=n[t._id];if(i&&i.hash===r)return i.feature;let o;if(e?.length){const t=e?.map(t=>d(t));if(t&&t.length>=3){const n=F(function(t,n={}){const e={type:"FeatureCollection"};return n.id&&(e.id=n.id),n.bbox&&(e.bbox=n.bbox),e.features=t,e}(t));"Polygon"===n?.geometry.type&&(o=n.geometry)}}if(!o&&e&&e.length>0&&(o={type:"Point",coordinates:1===e.length?e[0]:[e.reduce((t,n)=>t+n[0],0)/e.length,e.reduce((t,n)=>t+n[1],0)/e.length]}),!o)return null;const a={type:"Feature",id:t._id,properties:{folderId:t._id,name:t.name,color:t.color,eventCount:t.boundary?.length||0,isFolderPoint:"Point"===o.type},geometry:o};return n[t._id]={hash:r,feature:a},a})(t,r.current)).filter(t=>Boolean(t)),[v]),Y=o(()=>({type:"FeatureCollection",features:X}),[X]),b=o(()=>n?.find(t=>t._id===i)??null,[n,i]),_=o(()=>i&&n?m(n,i):[],[n,i]),B=o(()=>(t=>{const n=[],e=t=>{Array.isArray(t)&&("number"!=typeof t[0]||"number"!=typeof t[1]?t.forEach(e):n.push([t[0],t[1]]))};if(t.features.forEach(t=>e(t.geometry.coordinates)),0===n.length)return null;const r=n.map(t=>t[0]),i=n.map(t=>t[1]);return[Math.min(...r),Math.min(...i),Math.max(...r),Math.max(...i)]})(Y),[Y]);return{isFolderViewEnabled:g,activeFolderId:i,visibleFolders:v,visibleEvents:M,folderFeatures:X,folderFeatureCollection:Y,breadcrumb:_,isLoadingEvents:y,isBusy:y,setActiveFolderId:t=>{p(t)},goBack:()=>{b&&p(b.parentFolderId??null)},activeFolder:b,folderBounds:B}};export{S as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as t,B as e,D as s,G as i,H as a,J as r,K as n,Q as o,U as u,V as h,W as c,X as l,Y as d,Z as f,et as y,it as p,nt as m,q as g,rt as v,tt as b,z as q}from"./t1REK11Z.js";function C(t){return{onFetch:(e,s)=>{const a=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],u=e.state.data?.pageParams||[];let h={pages:[],pageParams:[]},l=0;const d=async()=>{let s=!1;const d=g(e.options,e.fetchOptions),f=async(t,a,r)=>{if(s)return Promise.reject();if(null==a&&t.pages.length)return Promise.resolve(t);const o=await d((()=>{const t={client:e.client,queryKey:e.queryKey,pageParam:a,direction:r?"backward":"forward",meta:e.options.meta};return c(t,()=>e.signal,()=>s=!0),t})()),{maxPages:u}=e.options,h=r?n:i;return{pages:h(t.pages,o,u),pageParams:h(t.pageParams,a,u)}};if(r&&o.length){const t="backward"===r,e=t?O:P,s={pages:o,pageParams:u};h=await f(s,e(a,s),t)}else{const e=t??o.length;do{const t=0===l?u[0]??a.initialPageParam:P(a,h);if(l>0&&null==t)break;h=await f(h,t),l++}while(l<e)}return h};e.options.persister?e.fetchFn=()=>e.options.persister?.(d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=d}}}function P(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function O(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function w(t,e){return!!e&&null!=P(t,e)}function Q(t,e){return!(!e||!t.getPreviousPageParam)&&null!=O(t,e)}var D=class extends e{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#a({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=h({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(/* @__PURE__ */new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const i="pending"===this.state.status,a=!this.#i.canStart();try{if(i)e();else{this.#a({type:"pending",variables:t,isPaused:a}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const e=await(this.options.onMutate?.(t,s));e!==this.state.context&&this.#a({type:"pending",context:e,variables:t,isPaused:a})}const r=await this.#i.start();return await(this.#s.config.onSuccess?.(r,t,this.state.context,this,s)),await(this.options.onSuccess?.(r,t,this.state.context,s)),await(this.#s.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s)),await(this.options.onSettled?.(r,null,t,this.state.context,s)),this.#a({type:"success",data:r}),r}catch(r){try{await(this.#s.config.onError?.(r,t,this.state.context,this,s))}catch(n){Promise.reject(n)}try{await(this.options.onError?.(r,t,this.state.context,s))}catch(n){Promise.reject(n)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,s))}catch(n){Promise.reject(n)}try{await(this.options.onSettled?.(void 0,r,t,this.state.context,s))}catch(n){Promise.reject(n)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),u.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}},M=class extends p{constructor(t={}){super(),this.config=t,this.#r=/* @__PURE__ */new Set,this.#n=/* @__PURE__ */new Map,this.#o=0}#r;#n;#o;build(t,e,s){const i=new D({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#r.add(t);const e=x(t);if("string"==typeof e){const s=this.#n.get(e);s?s.push(t):this.#n.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#r.delete(t)){const e=x(t);if("string"==typeof e){const s=this.#n.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#n.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=x(t);if("string"==typeof e){const s=this.#n.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=x(t);return"string"==typeof e?(this.#n.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){u.batch(()=>{this.#r.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#r.clear(),this.#n.clear()})}getAll(){return Array.from(this.#r)}find(t){const e={exact:!0,...t};return this.getAll().find(t=>f(e,t))}findAll(t={}){return this.getAll().filter(e=>f(t,e))}notify(t){u.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return u.batch(()=>Promise.all(e.map(e=>e.continue().catch(t))))}};function x(t){return t.options.scope?.id}var A=class extends p{constructor(t={}){super(),this.config=t,this.#u=/* @__PURE__ */new Map}#u;build(t,e,s){const i=e.queryKey,a=e.queryHash??l(i,e);let r=this.get(a);return r||(r=new q({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(r)),r}add(t){this.#u.has(t.queryHash)||(this.#u.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#u.get(t.queryHash);e&&(t.destroy(),e===t&&this.#u.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){u.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(t=>o(e,t))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(e=>o(t,e)):e}notify(t){u.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){u.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){u.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},E=class{#h;#s;#c;#l;#d;#f;#y;#p;constructor(t={}){this.#h=t.queryCache||new A,this.#s=t.mutationCache||new M,this.#c=t.defaultOptions||{},this.#l=/* @__PURE__ */new Map,this.#d=/* @__PURE__ */new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#y=v.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=a.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onOnline())}))}unmount(){this.#f--,0===this.#f&&(this.#y?.(),this.#y=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#h.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#s.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#h.build(this,e),i=s.state.data;return void 0===i?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(b(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),a=this.#h.get(i.queryHash)?.state.data,n=r(e,a);if(void 0!==n)return this.#h.build(this,i).setData(n,{...s,manual:!0})}setQueriesData(t,e,s){return u.batch(()=>this.#h.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(t){const e=this.#h;u.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){const s=this.#h;return u.batch(()=>(s.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(e,s={}){const i={revert:!0,...s},a=u.batch(()=>this.#h.findAll(e).map(t=>t.cancel(i)));return Promise.all(a).then(t).catch(t)}invalidateQueries(t,e={}){return u.batch(()=>(this.#h.findAll(t).forEach(t=>{t.invalidate()}),"none"===t?.refetchType?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(e,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},a=u.batch(()=>this.#h.findAll(e).filter(t=>!t.isDisabled()&&!t.isStatic()).map(e=>{let s=e.fetch(void 0,i);return i.throwOnError||(s=s.catch(t)),"paused"===e.state.fetchStatus?Promise.resolve():s}));return Promise.all(a).then(t)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const s=this.#h.build(this,e);return s.isStaleByTime(b(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(t).catch(t)}fetchInfiniteQuery(t){return t.behavior=C(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(t).catch(t)}ensureInfiniteQueryData(t){return t.behavior=C(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return a.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(t,e){this.#l.set(d(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#l.values()],s={};return e.forEach(e=>{y(t,e.queryKey)&&Object.assign(s,e.defaultOptions)}),s}setMutationDefaults(t,e){this.#d.set(d(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#d.values()],s={};return e.forEach(e=>{y(t,e.mutationKey)&&Object.assign(s,e.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#c.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=l(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===m&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#c.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#h.clear(),this.#s.clear()}},K=(t=[],e)=>{const i=/* @__PURE__ */new Map;t?.forEach(t=>{i.set(t._id,t)});const a=[];let r=i.get(e);for(;r;)a.unshift({_id:r._id,name:r.name,href:s.FOLDER_EVENTS(r?._id),color:r.color}),r=i.get(r.parentFolderId);return a};export{C as a,Q as i,E as n,w as r,K as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{D as t,G as e,K as i,N as s,O as n,P as o,R as r,U as a,W as l,f as h,j as c,m as d,n as p,p as u,v as m,x as f,z as g}from"./19c52mJB.js";import{N as v,l as y,m as w,n as _,o as x,r as b,s as S}from"./t1REK11Z.js";import{t as P}from"./Bu-H5iRE.js";var I=Object.freeze({left:0,top:0,width:16,height:16}),C=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),L=Object.freeze({...I,...C}),T=Object.freeze({...L,body:"",hidden:!1});function z(t,e){const i=function(t,e){const i={};!t.hFlip!=!e.hFlip&&(i.hFlip=!0),!t.vFlip!=!e.vFlip&&(i.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(i.rotate=s),i}(t,e);for(const s in T)s in C?s in t&&!(s in i)&&(i[s]=C[s]):s in e?i[s]=e[s]:s in t&&(i[s]=t[s]);return i}function A(t,e,i){const s=t.icons,n=t.aliases||Object.create(null);let o={};function r(t){o=z(s[t]||n[t],o)}return r(e),i.forEach(r),z(t,o)}function E(t,e){const i=[];if("object"!=typeof t||"object"!=typeof t.icons)return i;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),i.push(t)});const s=function(t){const e=t.icons,i=t.aliases||Object.create(null),s=Object.create(null);return Object.keys(e).concat(Object.keys(i)).forEach(function t(n){if(e[n])return s[n]=[];if(!(n in s)){s[n]=null;const e=i[n]&&i[n].parent,o=e&&t(e);o&&(s[n]=[e].concat(o))}return s[n]}),s}(t);for(const n in s){const o=s[n];o&&(e(n,A(t,n,o)),i.push(n))}return i}var O={provider:"",aliases:{},not_found:{},...I};function k(t,e){for(const i in e)if(i in t&&typeof t[i]!=typeof e[i])return!1;return!0}function Z(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!k(t,O))return null;const i=e.icons;for(const n in i){const t=i[n];if(!n||"string"!=typeof t.body||!k(t,T))return null}const s=e.aliases||Object.create(null);for(const n in s){const t=s[n],e=t.parent;if(!n||"string"!=typeof e||!i[e]&&!s[e]||!k(t,T))return null}return e}var D=Object.create(null);function F(t,e){const i=D[t]||(D[t]=Object.create(null));return i[e]||(i[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:/* @__PURE__ */new Set}}(t,e))}function M(t,e){return Z(e)?E(e,(e,i)=>{i?t.icons[e]=i:t.missing.add(e)}):[]}var N=/^[a-z0-9]+(-[a-z0-9]+)*$/,B=(t,e,i,s="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;s=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),i=n.pop(),o={provider:n.length>0?n[0]:s,prefix:i,name:t};return e&&!R(o)?null:o}const o=n[0],r=o.split("-");if(r.length>1){const t={provider:s,prefix:r.shift(),name:r.join("-")};return e&&!R(t)?null:t}if(i&&""===s){const t={provider:s,prefix:"",name:o};return e&&!R(t,i)?null:t}return null},R=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),j=!1;function H(t){return"boolean"==typeof t&&(j=t),j}function W(t){const e="string"==typeof t?B(t,!0,j):t;if(e){const t=F(e.provider,e.prefix),i=e.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}var $=Object.freeze({width:null,height:null}),V=Object.freeze({...$,...C}),q=/(-?[0-9.]*[0-9]+[0-9.]*)/g,U=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function G(t,e,i){if(1===e)return t;if(i=i||100,"number"==typeof t)return Math.ceil(t*e*i)/i;if("string"!=typeof t)return t;const s=t.split(q);if(null===s||!s.length)return t;const n=[];let o=s.shift(),r=U.test(o);for(;;){if(r){const t=parseFloat(o);isNaN(t)?n.push(o):n.push(Math.ceil(t*e*i)/i)}else n.push(o);if(o=s.shift(),void 0===o)return n.join("");r=!r}}var K=/\sid="(\S+)"/g,X="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Y=0;function Q(t,e=X){const i=[];let s;for(;s=K.exec(t);)i.push(s[1]);if(!i.length)return t;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return i.forEach(i=>{const s="function"==typeof e?e(i):e+(Y++).toString(),o=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+n+"$3")}),t=t.replace(new RegExp(n,"g"),"")}var J=Object.create(null);function tt(t){return J[t]||J[""]}function et(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}for(var it=Object.create(null),st=["https://api.simplesvg.com","https://api.unisvg.com"],nt=[];st.length>0;)1===st.length||Math.random()>.5?nt.push(st.shift()):nt.push(st.pop());function ot(t,e){const i=et(e);return null!==i&&(it[t]=i,!0)}function rt(t){return it[t]}it[""]=et({resources:["https://api.iconify.design"].concat(nt)});var at=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(e){}})(),lt={prepare:(t,e,i)=>{const s=[],n=function(t,e){const i=rt(t);if(!i)return 0;let s;if(i.maxURL){let t=0;i.resources.forEach(e=>{t=Math.max(t,e.length)});const n=e+".json?icons=";s=i.maxURL-t-i.path.length-n.length}else s=0;return s}(t,e),o="icons";let r={type:o,provider:t,prefix:e,icons:[]},a=0;return i.forEach((i,l)=>{a+=i.length+1,a>=n&&l>0&&(s.push(r),r={type:o,provider:t,prefix:e,icons:[]},a=i.length),r.icons.push(i)}),s.push(r),s},send:(t,e,i)=>{if(!at)return void i("abort",424);let s=function(t){if("string"==typeof t){const e=rt(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,i=e.icons.join(",");s+=t+".json?"+new URLSearchParams({icons:i}).toString();break}case"custom":{const t=e.uri;s+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void i("abort",400)}let n=503;at(t+s).then(t=>{const e=t.status;if(200===e)return n=501,t.json();setTimeout(()=>{i(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{i("success",t)}):setTimeout(()=>{404===t?i("abort",t):i("next",n)})}).catch(()=>{i("next",n)})}};function ht(t,e){t.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(t=>t.id!==e))})}var ct=0,dt={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function pt(t){const e={...dt,...t};let i=[];function s(){i=i.filter(t=>"pending"===t().status)}return{query:function(t,n,o){const r=function(t,e,i,s){const n=t.resources.length,o=t.random?Math.floor(Math.random()*n):t.index;let r;if(t.random){let e=t.resources.slice(0);for(r=[];e.length>1;){const t=Math.floor(Math.random()*e.length);r.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}r=r.concat(e)}else r=t.resources.slice(o).concat(t.resources.slice(0,o));const a=Date.now();let l,h="pending",c=0,d=null,p=[],u=[];function m(){d&&(clearTimeout(d),d=null)}function f(){"pending"===h&&(h="aborted"),m(),p.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),p=[]}function g(t,e){e&&(u=[]),"function"==typeof t&&u.push(t)}function v(){h="failed",u.forEach(t=>{t(void 0,l)})}function y(){p.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),p=[]}return"function"==typeof s&&u.push(s),setTimeout(function s(){if("pending"!==h)return;m();const n=r.shift();if(void 0===n)return p.length?void(d=setTimeout(()=>{m(),"pending"===h&&(y(),v())},t.timeout)):void v();const o={status:"pending",resource:n,callback:(e,i)=>{!function(e,i,n){const o="success"!==i;switch(p=p.filter(t=>t!==e),h){case"pending":break;case"failed":if(o||!t.dataAfterTimeout)return;break;default:return}if("abort"===i)return l=n,void v();if(o)return l=n,void(p.length||(r.length?s():v()));if(m(),y(),!t.random){const i=t.resources.indexOf(e.resource);-1!==i&&i!==t.index&&(t.index=i)}h="completed",u.forEach(t=>{t(n)})}(o,e,i)}};p.push(o),c++,d=setTimeout(s,t.rotate),i(n,e,o.callback)}),function(){return{startTime:a,payload:e,status:h,queriesSent:c,queriesPending:p.length,subscribe:g,abort:f}}}(e,t,n,(t,e)=>{s(),o&&o(t,e)});return i.push(r),r},find:function(t){return i.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:s}}function ut(){}var mt=Object.create(null);function ft(){}function gt(t,e,i){function s(){const i=t.pendingIcons;e.forEach(e=>{i&&i.delete(e),t.icons[e]||t.missing.add(e)})}if(i&&"object"==typeof i)try{if(!M(t,i).length)return void s()}catch(n){console.error(n)}s(),function(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let i=!1;const s=t.provider,n=t.prefix;e.forEach(e=>{const o=e.icons,r=o.pending.length;o.pending=o.pending.filter(e=>{if(e.prefix!==n)return!0;const r=e.name;if(t.icons[r])o.loaded.push({provider:s,prefix:n,name:r});else{if(!t.missing.has(r))return i=!0,!0;o.missing.push({provider:s,prefix:n,name:r})}return!1}),o.pending.length!==r&&(i||ht([t],e.id),e.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),e.abort))})}))}(t)}))}(t)}function vt(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}function yt(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:i}=t,s=t.iconsToLoad;if(delete t.iconsToLoad,!s||!s.length)return;const n=t.loadIcon;if(t.loadIcons&&(s.length>1||!n))return void vt(t.loadIcons(s,i,e),e=>{gt(t,s,e)});if(n)return void s.forEach(s=>{vt(n(s,i,e),e=>{gt(t,[s],e?{prefix:i,icons:{[s]:e}}:null)})});const{valid:o,invalid:r}=function(t){const e=[],i=[];return t.forEach(t=>{(t.match(N)?e:i).push(t)}),{valid:e,invalid:i}}(s);if(r.length&>(t,r,null),!o.length)return;const a=i.match(N)?tt(e):null;a?a.prepare(e,i,o).forEach(i=>{!function(t,e,i){let s,n;if("string"==typeof t){const e=tt(t);if(!e)return i(void 0,424),ut;n=e.send;const o=function(t){if(!mt[t]){const e=rt(t);if(!e)return;mt[t]={config:e,redundancy:pt(e)}}return mt[t]}(t);o&&(s=o.redundancy)}else{const e=et(t);if(e){s=pt(e);const i=tt(t.resources?t.resources[0]:"");i&&(n=i.send)}}s&&n?s.query(e,n,i)().abort:i(void 0,424)}(e,i,e=>{gt(t,i.icons,e)})}):gt(t,o,null)}))}var wt,_t=(t,e)=>{const i=function(t){const e={loaded:[],missing:[],pending:[]},i=Object.create(null);t.sort((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name));let s={provider:"",prefix:"",name:""};return t.forEach(t=>{if(s.name===t.name&&s.prefix===t.prefix&&s.provider===t.provider)return;s=t;const n=t.provider,o=t.prefix,r=t.name,a=i[n]||(i[n]=Object.create(null)),l=a[o]||(a[o]=F(n,o));let h;h=r in l.icons?e.loaded:""===o||l.missing.has(r)?e.missing:e.pending;const c={provider:n,prefix:o,name:r};h.push(c)}),e}(function(t,e=!0,i=!1){const s=[];return t.forEach(t=>{const n="string"==typeof t?B(t,e,i):t;n&&s.push(n)}),s}(t,!0,H()));if(!i.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(i.loaded,i.missing,i.pending,ft)}),()=>{t=!1}}const s=Object.create(null),n=[];let o,r;return i.pending.forEach(t=>{const{provider:e,prefix:i}=t;if(i===r&&e===o)return;o=e,r=i,n.push(F(e,i));const a=s[e]||(s[e]=Object.create(null));a[i]||(a[i]=[])}),i.pending.forEach(t=>{const{provider:e,prefix:i,name:n}=t,o=F(e,i),r=o.pendingIcons||(o.pendingIcons=/* @__PURE__ */new Set);r.has(n)||(r.add(n),s[e][i].push(n))}),n.forEach(t=>{const e=s[t.provider][t.prefix];e.length&&yt(t,e)}),e?function(t,e,i){const s=ct++,n=ht.bind(null,i,s);if(!e.pending.length)return n;const o={id:s,icons:e,callback:t,abort:n};return i.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(o)}),n}(e,i,n):ft},xt=/[\s,]+/;function bt(t,e){e.split(xt).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}})}function St(t,e=0){const i=t.replace(/^-?[0-9.]*/,"");function s(t){for(;t<0;)t+=4;return t%4}if(""===i){const e=parseInt(t);return isNaN(e)?0:s(e)}if(i!==t){let e=0;switch(i){case"%":e=25;break;case"deg":e=90}if(e){let n=parseFloat(t.slice(0,t.length-i.length));return isNaN(n)?0:(n/=e,n%1==0?s(n):0)}}return e}function Pt(t){return void 0===wt&&function(){try{wt=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){wt=null}}(),wt?wt.createHTML(t):t}var It={...V,inline:!1},Ct={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Lt={display:"inline-block"},Tt={backgroundColor:"currentColor"},zt={backgroundColor:"transparent"},At={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Et={WebkitMask:Tt,mask:Tt,background:zt};for(const Ri in Et){const t=Et[Ri];for(const e in At)t[Ri+e]=At[e]}var Ot={...It,inline:!0};function kt(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}var Zt;if(H(!0),Zt=lt,J[""]=Zt,"undefined"!=typeof document&&"undefined"!=typeof window){const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,i="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!function(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),j&&!e&&!t.prefix){let e=!1;return Z(t)&&(t.prefix="",E(t,(t,s)=>{(function(t,e){const s=B(t,!0,j);if(!s)return!1;const n=F(s.provider,s.prefix);return e?function(t,e,s){try{if("string"==typeof s.body)return t.icons[e]={...s},!0}catch(i){}return!1}(n,s.name,e):(n.missing.add(s.name),!0)})(t,s)&&(e=!0)})),e}const s=t.prefix;return!!R({prefix:s,name:"a"})&&!!M(F(e,s),t)}(t))&&console.error(i)}catch(e){console.error(i)}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const i="IconifyProviders["+t+"] is invalid.";try{const s=e[t];if("object"!=typeof s||!s||void 0===s.resources)continue;ot(t,s)||console.error(i)}catch(Bi){console.error(i)}}}}function Dt(t){const[e,s]=o(!!t.ssr),[n,r]=o({}),[a,l]=o(function(e){if(e){const e=t.icon;if("object"==typeof e)return{name:"",data:e};const i=W(e);if(i)return{name:e,data:i}}return{name:""}}(!!t.ssr));function h(){const t=n.callback;t&&(t(),r({}))}function c(t){if(JSON.stringify(a)!==JSON.stringify(t))return h(),l(t),!0}function d(){var e;const i=t.icon;if("object"==typeof i)return void c({name:"",data:i});const s=W(i);c({name:i,data:s})&&(void 0===s?r({callback:_t([i],d)}):s&&(null===(e=t.onLoad)||void 0===e||e.call(t,i)))}g(()=>(s(!0),h),[]),g(()=>{e&&d()},[t.icon,e]);const{name:p,data:u}=a;return u?((t,e,s)=>{const n=e.inline?Ot:It,o=function(t,e){const i={...t};for(const s in e){const t=e[s],n=typeof t;s in $?(null===t||t&&("string"===n||"number"===n))&&(i[s]=t):n===typeof i[s]&&(i[s]="rotate"===s?t%4:t)}return i}(n,e),r=e.mode||"svg",a={},l=e.style||{},h={..."svg"===r?Ct:{}};if(s){const t=B(s,!1,!0);if(t){const e=["iconify"];for(const i of["provider","prefix"])t[i]&&e.push("iconify--"+t[i]);h.className=e.join(" ")}}for(let i in e){const t=e[i];if(void 0!==t)switch(i){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":h.ref=t;break;case"className":h[i]=(h[i]?h[i]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":o[i]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&bt(o,t);break;case"color":a.color=t;break;case"rotate":"string"==typeof t?o[i]=St(t):"number"==typeof t&&(o[i]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete h["aria-hidden"];break;default:void 0===n[i]&&(h[i]=t)}}const c=function(t,e){const i={...L,...t},s={...V,...e},n={left:i.left,top:i.top,width:i.width,height:i.height};let o=i.body;[i,s].forEach(t=>{const e=[],i=t.hFlip,s=t.vFlip;let r,a=t.rotate;switch(i?s?a+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):s&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),a<0&&(a-=4*Math.floor(a/4)),a%=4,a){case 1:r=n.height/2+n.top,e.unshift("rotate(90 "+r.toString()+" "+r.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:r=n.width/2+n.left,e.unshift("rotate(-90 "+r.toString()+" "+r.toString()+")")}a%2==1&&(n.left!==n.top&&(r=n.left,n.left=n.top,n.top=r),n.width!==n.height&&(r=n.width,n.width=n.height,n.height=r)),e.length&&(o=function(t,e){const i=function(t,e="defs"){let i="";const s=t.indexOf("<"+e);for(;s>=0;){const n=t.indexOf(">",s),o=t.indexOf("</"+e);if(-1===n||-1===o)break;const r=t.indexOf(">",o);if(-1===r)break;i+=t.slice(n+1,o).trim(),t=t.slice(0,s).trim()+t.slice(r+1)}return{defs:i,content:t}}(t);return s=i.defs,n=e+i.content+"</g>",s?"<defs>"+s+"</defs>"+n:n;var s,n}(o,'<g transform="'+e.join(" ")+'">'))});const r=s.width,a=s.height,l=n.width,h=n.height;let c,d;null===r?(d=null===a?"1em":"auto"===a?h:a,c=G(d,l/h)):(c="auto"===r?l:r,d=null===a?G(c,h/l):"auto"===a?h:a);const p={},u=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};u("width",c),u("height",d);const m=[n.left,n.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:o}}(t,o),d=c.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),"svg"===r){h.style={...a,...l},Object.assign(h,d);let t=0,s=e.id;return"string"==typeof s&&(s=s.replace(/-/g,"_")),h.dangerouslySetInnerHTML={__html:Pt(Q(c.body,s?()=>s+"ID"+t++:"iconifyReact"))},i("svg",h)}const{body:p,width:u,height:m}=t,f="mask"===r||"bg"!==r&&-1!==p.indexOf("currentColor"),g=function(t,e){let i=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+t+"</svg>"}(p,{...d,width:u+"",height:m+""});var v;return h.style={...a,"--svg":(v=g,'url("'+function(t){return"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(t)}(v)+'")'),width:kt(d.width),height:kt(d.height),...Lt,...f?Tt:zt,...l},i("span",h)})({...L,...u},t,p):t.children?t.children:t.fallback?t.fallback:i("span",{})}var Ft=f((t,e)=>Dt({...t,_ref:e})),Mt=(f((t,e)=>Dt({inline:!0,...t,_ref:e})),t=>"boolean"==typeof t?`${t}`:0===t?"0":t),Nt=d,Bt=(t,e)=>i=>{var s;if(null==(null==e?void 0:e.variants))return Nt(t,null==i?void 0:i.class,null==i?void 0:i.className);const{variants:n,defaultVariants:o}=e,r=Object.keys(n).map(t=>{const e=null==i?void 0:i[t],s=null==o?void 0:o[t];if(null===e)return null;const r=Mt(e)||Mt(s);return n[t][r]}),a=i&&Object.entries(i).reduce((t,e)=>{let[i,s]=e;return void 0===s||(t[i]=s),t},{});return Nt(t,r,null==e||null===(s=e.compoundVariants)||void 0===s?void 0:s.reduce((t,e)=>{let{class:i,className:s,...n}=e;return Object.entries(n).every(t=>{let[e,i]=t;return Array.isArray(i)?i.includes({...o,...a}[e]):{...o,...a}[e]===i})?[...t,i,s]:t},[]),null==i?void 0:i.class,null==i?void 0:i.className)},Rt=Bt("",{variants:{variant:{default:"border-none",outline:"rounded",solid:"bg-background"},size:{sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7","2xl":"size-8","3xl":"size-9"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-muted-foreground",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",a11y:"text-primary-foreground",inherit:""}},compoundVariants:[{variant:"outline",color:"primary",class:"border-primary"},{variant:"outline",color:"secondary",class:"border-border"},{variant:"outline",color:"info",class:"border-info"},{variant:"outline",color:"warning",class:"border-warning"},{variant:"outline",color:"success",class:"border-success"},{variant:"outline",color:"error",class:"border-destructive"},{variant:"solid",color:"primary",class:"bg-background text-foreground"},{variant:"solid",color:"secondary",class:"bg-background text-muted-foreground"},{variant:"solid",color:"info",class:"bg-info text-foreground text-text-primary-dark"},{variant:"solid",color:"warning",class:"bg-warning text-foreground text-text-primary-dark"},{variant:"solid",color:"success",class:"bg-success text-foreground text-text-primary-dark"},{variant:"solid",color:"error",class:"bg-destructive text-foreground text-text-primary-dark"}],defaultVariants:{variant:"default",size:"md",color:"foreground"}}),jt=({className:t,color:e="foreground",size:i="md",variant:s="default",name:n="line-md:iconify1",...o})=>/* @__PURE__ */m(Ft,{icon:n,className:h(Rt({color:e,size:i,variant:s,className:t})),...o});function Ht({children:t,asChild:e=!1,...i}){if(e){const e=Array.isArray(t)?t[0]:t;if(e&&e.type)return l(e,{...i,...e.props})}/* @__PURE__ */
|
|
2
|
+
return m("button",{...i,children:t})}var Wt=Bt("shadow-outer inline-flex size-fit cursor-pointer items-center justify-center rounded font-medium transition-all duration-200 active:scale-95 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"gap-1 p-2 text-sm",md:"gap-2 px-4 py-2 text-sm sm:text-base",lg:"gap-2 px-4 py-3 text-lg",icon:"h-9 w-9 p-0"},color:{foreground:"bg-background text-foreground hover:bg-muted active:bg-muted/80",primary:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",info:"bg-info hover:bg-info/90 active:bg-info/80 text-white",warning:"bg-warning hover:bg-warning/90 active:bg-warning/80 text-white",success:"bg-success hover:bg-success/90 active:bg-success/80 text-white",error:"bg-destructive hover:bg-destructive/90 active:bg-destructive/80 text-white"},variant:{default:"",outlined:"bg-transparent hover:bg-current/10 active:bg-current/15",ghost:"border-transparent bg-transparent shadow-none hover:bg-current/10 active:bg-current/15"}},compoundVariants:[{variant:"default",color:"primary",class:"border-primary border"},{variant:"default",color:"info",class:"border-info border"},{variant:"default",color:"warning",class:"border-warning border"},{variant:"default",color:"success",class:"border-success border"},{variant:"default",color:"error",class:"border-destructive border"},{variant:"outlined",color:"foreground",class:"text-foreground border-muted-foreground hover:bg-foreground/10 border bg-transparent"},{variant:"outlined",color:"primary",class:"border-primary text-primary hover:bg-primary/10 border bg-transparent"},{variant:"outlined",color:"info",class:"border-info text-info hover:bg-info/10 border bg-transparent"},{variant:"outlined",color:"warning",class:"border-warning text-warning hover:bg-warning/10 border bg-transparent"},{variant:"outlined",color:"success",class:"border-success text-success hover:bg-success/10 border bg-transparent"},{variant:"outlined",color:"error",class:"border-destructive text-destructive hover:bg-destructive/10 border bg-transparent"},{variant:"ghost",color:"primary",class:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"info",class:"text-info hover:bg-info/10"},{variant:"ghost",color:"warning",class:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"success",class:"text-success hover:bg-success/10"},{variant:"ghost",color:"error",class:"text-destructive hover:bg-destructive/10"}],defaultVariants:{variant:"default",size:"md",color:"primary"}}),$t=({className:t,type:e="button",disabled:i,loading:s,fullWidth:n,color:o,size:r,variant:a,icon:l,iconName:c,iconSvg:d,asChild:p=!1,immutable:u,elementRef:f,children:g,...v})=>{const y=p?Ht:"button",w=p?{asChild:!0}:{},_=d||l||(c?/* @__PURE__ */m(jt,{name:c,className:"text-primary-foreground"}):null);/* @__PURE__ */
|
|
3
|
+
return m(y,{ref:f,type:e,disabled:i||s,className:h(Wt({color:o,size:r,variant:a}),t,n&&"w-full"),...w,...v,children:[/* @__PURE__ */m("div",{className:h(s?"collapse":"visible flex items-center gap-3"),children:[_&&!s&&_,g]}),s&&/* @__PURE__ */m("span",{className:"icon-[eos-icons--three-dots-loading] absolute size-6"})]})},Vt={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",blockquote:"blockquote",body1:"p",body2:"p",body3:"p",caption:"span",overline:"span",lead:"p"},qt=Bt("antialiased",{variants:{variant:{h1:"scroll-m-20 text-4xl font-bold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-bold tracking-tight lg:text-4xl",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold",h5:"scroll-m-20 text-lg font-semibold",h6:"scroll-m-20 text-base font-semibold",body1:"text-base leading-relaxed font-medium",body2:"text-sm leading-relaxed",body3:"text-sm leading-relaxed sm:text-base",p:"text-base leading-7",lead:"text-muted-foreground text-xl leading-relaxed",blockquote:"border-primary/30 text-muted-foreground border-l-4 pl-4 text-base italic",caption:"text-muted-foreground text-xs",overline:"text-muted-foreground text-xs font-medium tracking-widest uppercase"},color:{foreground:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",inherit:"text-inherit",secondary:"text-muted-foreground",white:"text-white",black:"text-black",a11y:"text-primary-foreground",light:"text-text-primary-light"},align:{left:"text-left",right:"text-right",center:"text-center",justify:"text-justify"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"body1",color:"foreground",align:"left"}}),Ut=({variant:t="body1",color:e,align:i,weight:s,transform:n,lines:o,shadow:r,noWrap:a,className:l,immutable:c,...d})=>/* @__PURE__ */m(Vt[t],{className:h(qt({variant:t,color:e,align:i,weight:s}),n,o&&o>0?`line-clamp-${o}`:void 0,r&&"drop-shadow-[0_1px_2px_rgba(0,0,0,0.5)]",a&&"truncate",l),...d,children:d.children}),Gt=null,Kt=!1,Xt=()=>Gt||(Gt=new Promise(t=>{if("undefined"==typeof window)return void t();if(window.googletag=window.googletag||{cmd:[]},document.querySelector('script[src*="gpt.js"]'))return void t();const e=document.createElement("script");e.src="https://securepubads.g.doubleclick.net/tag/js/gpt.js",e.async=!0,e.crossOrigin="anonymous",e.onload=()=>t(),e.onerror=()=>t(),document.head.appendChild(e)})),Yt=()=>{Kt||(Kt=!0,window.googletag.enableServices())},Qt=t=>{try{const e=(window.googletag.pubads().getSlots?.()??[]).find(e=>e.getSlotElementId?.()===t);e&&window.googletag.destroySlots([e])}catch{}},Jt=async()=>{const t=await b();return"string"==typeof t?t:t?.fingerprint},te=()=>{const t=c(null),{props:e,sessionId:i,user:s}=_(),n=e?.organizationId,o=c(null),r=c(null),a=async(e,i)=>{if(e&&i&&(t.current||(t.current=await Jt()),t.current))try{await v.post(y.UPDATE_AD_ANALYTICS,{json:{adId:e,type:i,browserFingerprint:t.current},headers:{"x-org-id":n}})}catch(Bi){console.error(Bi)}},l=async t=>{if(i)try{await v.post(y.UPDATE_SESSION,{headers:{"x-org-id":n},json:{sessionId:i,pageViews:t}})}catch(Bi){console.error(Bi)}};return{incrementEventView:async e=>{if(e&&(t.current||(t.current=await Jt()),t.current))try{await v.post(y.INCREMENT_EVENT_VIEW,{json:{eventSlug:e,browserFingerprint:t.current},headers:{"x-org-id":n,Authorization:s?`Bearer ${s.token}`:void 0}})}catch(Bi){console.error(Bi)}},captureAdImpression:async t=>a(t,x.AD_IMPRESSION),captureAdEngagement:async t=>a(t,x.AD_ENGAGEMENT),captureAdClick:(t,e,i)=>{if(a(t,x.AD_CLICK),i)switch(e){case S.LINK:window.open(String(i),"_blank");break;case S.EMAIL:window.location.href=`mailto:${String(i)}`;break;case S.PHONE:window.location.href=`tel:${String(i)}`;break;case S.SMS:window.location.href=`sms:${String(i)}`;break;case S.WHATSAPP:window.location.href=`https://wa.me/${String(i)}`;break;case S.MESSENGER:window.location.href=`https://m.me/${String(i)}`;break;default:window.open(String(i),"_blank")}},trackPageView:t=>{o.current&&r.current&&l([{page:o.current,entryTime:r.current,exitTime:Date.now()}]),o.current=t??null,r.current=Date.now()},exportPageViewsData:l,trackGamAnalytics:async({eventId:e,organizationId:i,type:s,creativeId:o,lineItemId:r,advertiserId:a,isEmpty:l})=>{if(!e||!s)return;if(t.current||(t.current=await Jt()),!t.current)return;const h=i||n;if(h)try{await v.post(y.UPDATE_GAM_ANALYTICS,{json:{eventId:e,organizationId:h,type:s,browserFingerprint:t.current,...o?{creativeId:o}:{},...r?{lineItemId:r}:{},...a?{advertiserId:a}:{},...void 0!==l?{isEmpty:l}:{}},headers:{"x-org-id":h}})}catch(Bi){console.error(Bi)}}}},ee=({container:t,onClick:e})=>{let i=!1,s=!1,n=0,o=null;const r=()=>{i=!0,n=Date.now()},a=()=>{i=!1},l=()=>{null!==o&&(window.clearTimeout(o),o=null)},h=()=>{o=window.setTimeout(()=>{const o=document.activeElement,r=o instanceof HTMLIFrameElement&&t.contains(o),a=Date.now()-n<=1500;!s&&(r||i&&a)&&(s=!0,e())},0)};return t.addEventListener("pointerenter",r),t.addEventListener("pointerleave",a),window.addEventListener("blur",h),window.addEventListener("focus",l),()=>{t.removeEventListener("pointerenter",r),t.removeEventListener("pointerleave",a),window.removeEventListener("blur",h),window.removeEventListener("focus",l),null!==o&&window.clearTimeout(o)}},ie=e(null),se=({open:t,onOpenChange:e,children:i})=>{const[s,n]=o(!!t);return g(()=>{"boolean"==typeof t&&n(t)},[t]),/* @__PURE__ */m(ie.Provider,{value:{open:s,setOpen:t=>{n(t),e?.(t)}},children:i})},ne=({children:t})=>/* @__PURE__ */m(a,{children:t}),oe=({className:t,...e})=>/* @__PURE__ */m("div",{"data-state":r(ie)?.open?"open":"closed",className:h("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-2001 bg-black/15 backdrop-blur-md",t),...e}),re=({className:t,children:e,...i})=>{const{organization:s}=_(),n=r(ie);return g(()=>{if(!n?.open)return;const t=t=>{"Escape"===t.key&&n.setOpen(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[n?.open]),n?.open?/* @__PURE__ */m(ne,{children:[/* @__PURE__ */m(oe,{onClick:()=>n.setOpen(!1)}),/* @__PURE__ */m("div",{role:"dialog","aria-modal":"true","data-state":n?.open?"open":"closed",className:h("border-border bg-background shadow-outer data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=closed]:slide-out-to-bottom fixed top-[50%] left-[50%] z-2002 h-fit w-auto max-w-5xl translate-x-[-50%] translate-y-[-50%] rounded border duration-300 max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-3xl max-sm:border-x-0 max-sm:border-b-0",t),style:u(s),...i,children:e})]}):null},ae=({className:t,...e})=>/* @__PURE__ */m("div",{className:h("flex flex-col space-y-1 p-3 text-center sm:text-left",t),...e}),le=({className:t,...e})=>/* @__PURE__ */m("div",{className:h("p- flex justify-end space-x-3",t),...e}),he=({className:t,...e})=>/* @__PURE__ */m("h2",{className:h("text-center text-lg font-semibold",t),...e}),ce=({className:t,...e})=>/* @__PURE__ */m("p",{className:h("text-muted-foreground text-center text-sm",t),...e}),de=t=>"number"==typeof t&&!isNaN(t),pe=t=>"string"==typeof t,ue=t=>"function"==typeof t;function me({enter:e,exit:i,appendPosition:n=!1,collapse:o=!0,collapseDuration:r=300}){return function({children:a,position:l,preventExitTransition:h,done:d,nodeRef:p,isIn:u,playToast:m}){let f=n?`${e}--${l}`:e,v=n?`${i}--${l}`:i,y=c(0);return s(()=>{let t=p.current,e=f.split(" "),i=s=>{s.target===p.current&&(m(),t.removeEventListener("animationend",i),t.removeEventListener("animationcancel",i),0===y.current&&"animationcancel"!==s.type&&t.classList.remove(...e))};t.classList.add(...e),t.addEventListener("animationend",i),t.addEventListener("animationcancel",i)},[]),g(()=>{let t=p.current,e=()=>{t.removeEventListener("animationend",e),o?function(t,e,i=300){let{scrollHeight:s,style:n}=t;requestAnimationFrame(()=>{n.minHeight="initial",n.height=s+"px",n.transition=`all ${i}ms`,requestAnimationFrame(()=>{n.height="0",n.padding="0",n.margin="0",setTimeout(e,i)})})}(t,d,r):d()};u||(h?e():(y.current=1,t.className+=` ${v}`,t.addEventListener("animationend",e)))},[u]),t.createElement(t.Fragment,null,a)}}var fe=1,ge=()=>""+fe++,ve=/* @__PURE__ */new Map,ye=[],we=/* @__PURE__ */new Set,_e=()=>ve.size>0;function xe(t,e){ve.forEach(i=>{(null==e||null==e||!e.containerId||(null==e?void 0:e.containerId)===i.id)&&i.toggle(t,null==e?void 0:e.id)})}function be(t){return t&&(pe(t.toastId)||de(t.toastId))?t.toastId:ge()}function Se(t,e){return function(t,e){(t=>n(t)||pe(t)||ue(t)||de(t))(t)&&(_e()||ye.push({content:t,options:e}),ve.forEach(i=>{i.buildToast(t,e)}))}(t,e),e.toastId}function Pe(t,e){return{...e,type:e&&e.type||t,toastId:be(e)}}function Ie(t){return(e,i)=>Se(e,Pe(t,i))}function Ce(t,e){return Se(t,Pe("default",e))}Ce.loading=(t,e)=>Se(t,Pe("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),Ce.promise=function(t,{pending:e,error:i,success:s},n){let o;e&&(o=pe(e)?Ce.loading(e,n):Ce.loading(e.render,{...n,...e}));let r={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},a=(t,e,i)=>{if(null==e)return void Ce.dismiss(o);let s={type:t,...r,...n,data:i},a=pe(e)?{render:e}:e;return o?Ce.update(o,{...s,...a}):Ce(a.render,{...s,...a}),i},l=ue(t)?t():t;return l.then(t=>a("success",s,t)).catch(t=>a("error",i,t)),l},Ce.success=Ie("success"),Ce.info=Ie("info"),Ce.error=Ie("error"),Ce.warning=Ie("warning"),Ce.warn=Ce.warning,Ce.dark=(t,e)=>Se(t,Pe("default",{theme:"dark",...e})),Ce.dismiss=function(t){!function(t){if(_e()){if(null==t||(t=>pe(t)||de(t))(t))ve.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=ve.get(t.containerId);e?e.removeToast(t.id):ve.forEach(e=>{e.removeToast(t.id)})}}else ye=ye.filter(e=>null!=t&&e.options.toastId!==t)}(t)},Ce.clearWaitingQueue=(t={})=>{ve.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})},Ce.isActive=function(t,e){var i;if(e)return!(null==(i=ve.get(e))||!i.isToastActive(t));let s=!1;return ve.forEach(e=>{e.isToastActive(t)&&(s=!0)}),s},Ce.update=(t,e={})=>{let i=((t,{containerId:e})=>{var i;return null==(i=ve.get(e||1))?void 0:i.toasts.get(t)})(t,e);if(i){let{props:s,content:n}=i,o={delay:100,...s,...e,toastId:e.toastId||t,updateId:ge()};o.toastId!==t&&(o.staleId=t);let r=o.render||n;delete o.render,Se(r,o)}},Ce.done=t=>{Ce.update(t,{progress:1})},Ce.onChange=function(t){return we.add(t),()=>{we.delete(t)}},Ce.play=t=>xe(!0,t),Ce.pause=t=>xe(!1,t);var Le=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),Te=(me(Le("bounce",!0)),me(Le("slide",!0)),me(Le("zoom")),me(Le("flip")),({url:t,alt:e="",thumbnailUrl:i,blurhash:s,pswpData:n={},curateLink:o,onClick:r})=>{const l=/* @__PURE__ */m(a,{children:[/* @__PURE__ */m(P,{threshold:.1,src:i||t,blurhash:s,alt:e}),n.type===w.VIDEO&&/* @__PURE__ */m("div",{className:"absolute inset-0 top-0 left-0 flex items-center justify-center opacity-75",children:/* @__PURE__ */m("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-16 text-white lg:w-24",viewBox:"0 0 24 24",children:/* @__PURE__ */m("path",{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})})]});return r?/* @__PURE__ */m("button",{className:"h-full w-full",onClick:r,children:l}):o?/* @__PURE__ */m(p,{to:o,className:"h-full w-full",children:l}):/* @__PURE__ */m("a",{href:t,className:"pswp-item block h-full w-full",...Object.keys(n).reduce((t,e)=>{var i;return t[`data-pswp-${i=e,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=String(n[e]),t},{}),target:"_blank",rel:"noreferrer",children:l})});function ze(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function Ae(t,e){return t.x=e.x,t.y=e.y,void 0!==e.id&&(t.id=e.id),t}function Ee(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function Oe(t,e){const i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);return Math.sqrt(i*i+s*s)}function ke(t,e){return t.x===e.x&&t.y===e.y}function Ze(t,e,i){return Math.min(Math.max(t,e),i)}function De(t,e,i){let s=`translate3d(${t}px,${e||0}px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function Fe(t,e,i,s){t.style.transform=De(e,i,s)}function Me(t,e,i,s){t.style.transition=e?`${e} ${i}ms ${s||"cubic-bezier(.4,0,.22,1)"}`:"none"}function Ne(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}var Be="loading",Re="loaded",je="error";function He(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function We(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}function $e(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}var Ve=class{constructor(t,e){if(this.element=ze("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const e=this.element;e.decoding="async",e.alt="",e.src=t,e.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(Ne(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=De(0,0,t/250)):Ne(this.element,t,e))}destroy(){this.element?.parentNode&&this.element.remove(),this.element=null}},qe=class{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.hash=this.data.hash,this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Ve(t,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=ze("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=ze("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const e=this.element;this.updateSrcsetSizes(),this.data.srcset&&(e.srcset=this.data.srcset),e.src=this.data.src??"",e.alt=this.data.alt??"",this.state=Be,e.complete?this.onLoaded():(e.onload=()=>{this.onLoaded()},e.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=Re,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==Re&&this.state!==je||this.removePlaceholder())}onError(){this.state=je,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===Be,this)}isError(){return this.state===je}isImageContent(){return"image"===this.type||"ad"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(Ne(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==je,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=`${e}px`,t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){let t=ze("pswp__error-msg","div");t.innerText=this.instance.options?.errorMsg??"",t=this.instance.applyFilters("contentErrorElement",t,this),this.element=ze("pswp__content pswp__error-msg-container","div"),this.element.appendChild(t),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===je)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||$e())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!$e()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==Re&&this.state!==je||this.removePlaceholder()))}};function Ue(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function Ge(t,e,i,s,n){let o=0;if(e.paddingFn)o=e.paddingFn(i,s,n)[t];else if(e.padding)o=e.padding[t];else{const i=`padding${t[0].toUpperCase()}${t.slice(1)}`;e[i]&&(o=e[i])}return Number(o)||0}function Ke(t,e,i,s){return{x:e.x-Ge("left",t,e,i,s)-Ge("right",t,e,i,s),y:e.y-Ge("top",t,e,i,s)-Ge("bottom",t,e,i,s)}}var Xe=class{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,o=i.y/s.y;this.fit=Math.min(1,n<o?n:o),this.fill=Math.min(1,n>o?n:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=`${t}ZoomLevel`,i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}};function Ye(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:o}=e;if(o){let r;n=new Xe(o,t,-1),r=e.pswp?e.pswp.viewportSize:Ue(o,e);const a=Ke(o,r,t,i);n.update(s.width,s.height,a)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}function Qe(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return Ye(i,e,t)}var Je=class{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,s=void 0===t||t>=0;let n;for(n=0;n<=i[1];n++)this.loadSlideByIndex(e.currIndex+(s?n:-n));for(n=1;n<=i[0];n++)this.loadSlideByIndex(e.currIndex+(s?-n:n))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=Qe(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const t=this._cachedItems.findIndex(t=>!t.isAttached&&!t.hasSlide);-1!==t&&this._cachedItems.splice(t,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex(e=>e.index===t);-1!==e&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}},ti=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},ei=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){this._filters[t]||(this._filters[t]=[]),this._filters[t]?.push({fn:e,priority:i}),this._filters[t]?.sort((t,e)=>t.priority-e.priority),this.pswp?.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(t=>t.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){return this._filters[t]?.forEach(t=>{e[0]=t.fn.apply(this,e)}),e[0]}on(t,e){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t]?.push(e),this.pswp?.on(t,e)}off(t,e){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(t=>e!==t)),this.pswp?.off(t,e)}dispatch(t,e){if(this.pswp)return this.pswp.dispatch(t,e);const i=new ti(t,e);return this._listeners[t]?.forEach(t=>{t.call(this,i)}),i}},ii=class extends ei{getNumItems(){let t=0;const e=this.options?.dataSource;e&&"length"in e?t=e.length:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),e.items&&(t=e.items.length));const i=this.dispatch("numItems",{dataSource:e,numItems:t});return this.applyFilters("numItems",i.numItems,e)}createContentFromData(t,e){return new qe(t,this,e)}getItemData(t){const e=this.options?.dataSource;let i={};Array.isArray(e)?i=e[t]:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),i=e.items[t]);let s=i;s instanceof Element&&(s=this._domElementToItemData(s));const n=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",n.itemData,t)}_getGalleryDOMElements(t){return this.options?.children||this.options?.childSelector?We(this.options.children,this.options.childSelector,t)||[]:[t]}_toLowerCaseFirstLetter(t){return t?t.charAt(0).toLowerCase()+t.slice(1):t}_domElementToItemData(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,i.dataset.pswpType&&(e.type=i.dataset.pswpType.toLowerCase());const s=t.querySelector("img");s&&(e.msrc=s.currentSrc||s.src,e.alt=s.getAttribute("alt")??""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0);const n=["element","src","srcset","width","height","type","msrc","alt","thumbCropped"];Object.keys(i.dataset).filter(t=>t.startsWith("pswp")&&!n.includes(this._toLowerCaseFirstLetter(t.slice(4)))).forEach(t=>{e[this._toLowerCaseFirstLetter(t.slice(4))]=i.dataset[t]})}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return Ye(t,this,e)}},si=class extends ii{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){We(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(He(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};e.x||e.y||(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const s={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,s,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,i=We(this.options.children,this.options.childSelector,t.currentTarget).findIndex(t=>t===e||t.contains(e));return-1!==i?i:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=We(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const s=[],n=typeof i.pswpModule;if("function"==typeof(o=i.pswpModule)&&o.prototype&&o.prototype.goTo)s.push(Promise.resolve(i.pswpModule));else{if("string"===n)throw new Error("pswpModule as string is no longer supported");if("function"!==n)throw new Error("pswpModule is not valid");s.push(i.pswpModule())}var o;"function"==typeof i.openPromise&&s.push(i.openPromise()),!1!==i.preloadFirstSlide&&t>=0&&(this._preloadedContent=Qe(t,this));const r=++this._uid;Promise.all(s).then(t=>{if(this.shouldOpen){const e=t[0];this._openPhotoswipe(e,r)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const i="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(t=>{this._listeners[t]?.forEach(e=>{i.on(t,e)})}),Object.keys(this._filters).forEach(t=>{this._filters[t]?.forEach(e=>{i.addFilter(t,e.fn,e.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}destroy(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},We(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}},ni=class{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&Ae(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:i}=this.gestures,{currSlide:s}=this.pswp;if("y"===i&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const i=s.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:i}).defaultPrevented){this._setPanWithFriction("y",i,.6);const t=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(t),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(Ee(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),e.isShifted()){const i=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&i<0||t.x<.1&&i<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>.5&&i>0||t.x>-.1&&i>.5)&&(s=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(s,!0,t.x,!0)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:s,bounds:n}=i,o=s[t],r=this.pswp.bgOpacity<1&&"y"===t,a=o+e[t]*.995/(1-.995);if(r){const t=this._getVerticalDragRatio(o),e=this._getVerticalDragRatio(a);if(t<0&&e<-.4||t>0&&e>.4)return void this.pswp.close()}const l=n.correctPan(t,a);if(o===l)return;const h=l===a?1:.82,c=this.pswp.bgOpacity,d=l-o;this.pswp.animations.startSpring({name:`panGesture${t}`,isPan:!0,start:o,end:l,velocity:e[t],dampingRatio:h,onUpdate:e=>{if(r&&this.pswp.bgOpacity<1){const t=1-(l-e)/d;this.pswp.applyBgOpacity(Ze(c+(1-c)*t,0,1))}s[t]=Math.floor(e),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:s,isMultitouch:n}=this.gestures,{currSlide:o,mainScroll:r}=this.pswp,a=e[t]-s[t],l=r.x+a;if(!a||!o)return!1;if("x"===t&&!o.isPannable()&&!n)return r.moveTo(l,!0),!0;const{bounds:h}=o,c=o.pan[t]+a;if(this.pswp.options.allowPanToNext&&"x"===i&&"x"===t&&!n){const e=r.getCurrSlideX(),i=r.x-e,s=a>0,n=!s;if(c>h.min[t]&&s){if(h.min[t]<=this.startPan[t])return r.moveTo(l,!0),!0;this._setPanWithFriction(t,c)}else if(c<h.max[t]&&n){if(this.startPan[t]<=h.max[t])return r.moveTo(l,!0),!0;this._setPanWithFriction(t,c)}else if(0!==i){if(i>0)return r.moveTo(Math.max(l,e),!0),!0;if(i<0)return r.moveTo(Math.min(l,e),!0),!0}else this._setPanWithFriction(t,c)}else"y"===t&&(r.isShifted()||h.min.y===h.max.y)||this._setPanWithFriction(t,c);return!1}_getVerticalDragRatio(t){return(t-(this.pswp.currSlide?.bounds.center.y??0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,e,i){const{currSlide:s}=this.pswp;if(!s)return;const{pan:n,bounds:o}=s;if(o.correctPan(t,e)!==e||i){const s=Math.round(e-n[t]);n[t]+=s*(i||.35)}else n[t]=e}};function oi(t){return!!t.target.closest(".pswp__container")}var ri=class{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,s=i.contains("pswp__img"),n=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,e):n&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){oi(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){oi(e)&&this._doClickOrTapAction("doubleTap",t,e)}_doClickOrTapAction(t,e,i){const{pswp:s}=this.gestures,{currSlide:n}=s,o=`${t}Action`,r=s.options[o];if(!s.dispatch(o,{point:e,originalEvent:i}).defaultPrevented)if("function"!=typeof r)switch(r){case"close":case"next":s[r]();break;case"zoom":n?.toggleZoom(e);break;case"zoom-or-close":n?.isZoomable()&&n.zoomLevels.secondary!==n.zoomLevels.initial?n.toggleZoom(e):s.options.clickToCloseNonZoomable&&s.close();break;case"toggle-controls":this.gestures.pswp.element?.classList.toggle("pswp--ui-visible")}else r.call(s,e,i)}};function ai(t,e,i){return t.x=(e.x+i.x)/2,t.y=(e.y+i.y)/2,t}var li=class{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,Ae(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:e,p2:i,startP2:s,pswp:n}=this.gestures,{currSlide:o}=n;if(!o)return;const r=o.zoomLevels.min,a=o.zoomLevels.max;if(!o.isZoomable()||n.mainScroll.isShifted())return;ai(this._startZoomPoint,e,s),ai(this._zoomPoint,t,i);let l=1/Oe(e,s)*Oe(t,i)*this._startZoomLevel;if(l>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),l<r)if(n.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=o.zoomLevels.initial){const t=1-(r-l)/(r/1.2);n.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||n.applyBgOpacity(t)}else l=r-.15*(r-l);else l>a&&(l=a+.05*(l-a));o.pan.x=this._calculatePanForZoomLevel("x",l),o.pan.y=this._calculatePanForZoomLevel("y",l),o.setZoomLevel(l),o.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevel<e.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,e){const i=e/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:e}=this.gestures,{currSlide:i}=e;if(!i?.isZoomable())return;0===this._zoomPoint.x&&(t=!0);const s=i.currZoomLevel;let n,o=!0;s<i.zoomLevels.initial?n=i.zoomLevels.initial:s>i.zoomLevels.max?n=i.zoomLevels.max:(o=!1,n=s);const r=e.bgOpacity,a=e.bgOpacity<1,l=Ae({x:0,y:0},i.pan);let h=Ae({x:0,y:0},l);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,Ae(this._startPan,l)),o&&(h={x:this._calculatePanForZoomLevel("x",n),y:this._calculatePanForZoomLevel("y",n)}),i.setZoomLevel(n),h={x:i.bounds.correctPan("x",h.x),y:i.bounds.correctPan("y",h.y)},i.setZoomLevel(s);const c=!ke(h,l);if(!c&&!o&&!a)return i._setResolution(n),void i.applyCurrentZoomPan();e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,c||o){if(c&&(i.pan.x=l.x+(h.x-l.x)*t,i.pan.y=l.y+(h.y-l.y)*t),o){const e=s+(n-s)*t;i.setZoomLevel(e)}i.applyCurrentZoomPan()}a&&e.bgOpacity<1&&e.applyBgOpacity(Ze(r+(1-r)*t,0,1))},onComplete:()=>{i._setResolution(n),i.applyCurrentZoomPan()}})}},hi=class{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new ni(this),this.zoomLevels=new li(this),this.tapHandler=new ri(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,e,i,s){const{pswp:n}=this,{events:o}=n,r=s?t+s:"";o.add(n.scrollWrap,t+e,this.onPointerDown.bind(this)),o.add(window,`${t}move`,this.onPointerMove.bind(this)),o.add(window,t+i,this.onPointerUp.bind(this)),r&&o.add(n.scrollWrap,r,this.onPointerUp.bind(this))}onPointerDown(t){const e="mousedown"===t.type||"mouse"===t.pointerType;if(e&&t.button>0)return;const{pswp:i}=this;i.opener.isOpen?i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),1===this._numActivePoints&&(this.dragAxis=null,Ae(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,Ae(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():this.isZooming||this.isMultitouch||this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?ke(this.p1,this.prevP1)||this.drag.change():ke(this.p1,this.prevP1)&&ke(this.p2,this.prevP2)||this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const e=Date.now(),i=e-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=e,Ae(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:e}=this.pswp;if(e.isShifted())return void e.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if("mouseup"===t.type||"mouse"===t.pointerType)return void this.tapHandler.click(this.startP1,t);const i=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),Oe(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(Ae(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,e){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&e>5?i/e:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}_updatePoints(t,e){if(this._pointerEventEnabled){const i=t,s=this._ongoingPointers.findIndex(t=>t.id===i.pointerId);"up"===e&&s>-1?this._ongoingPointers.splice(s,1):"down"===e&&-1===s?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&Ae(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&Ae(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),"up"===e?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){Ae(this.prevP1,this.p1),Ae(this.prevP2,this.p2)}_updateStartPoints(){Ae(this.startP1,this.p1),Ae(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=10&&(this.dragAxis=e)}}}_convertEventPosToPoint(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:void 0!==t.identifier&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}},ci=class{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:e}=this.slide,i=this.slide["x"===t?"width":"height"]*this.currZoomLevel,s=Ge("x"===t?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),n=this.slide.panAreaSize[t];this.center[t]=Math.round((n-i)/2)+s,this.max[t]=i>n?Math.round(n-i)+s:this.center[t],this.min[t]=i>n?s:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,e){return Ze(e,this.max[t],this.min[t])}},di=class{constructor(t,e,i){this.data=t,this.index=e,this.pswp=i,this.isActive=e===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new Xe(i.options,t,e,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=ze("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new ci(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;!this.heavyAppended&&t.opener.isOpen&&!t.mainScroll.isShifted()&&(this.isActive,1)&&(this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this})))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const e=this.currentResolution||this.zoomLevels.initial;if(!e)return;const i=Math.round(this.width*e)||this.pswp.viewportSize.x,s=Math.round(this.height*e)||this.pswp.viewportSize.y;(this.sizeChanged(i,s)||t)&&this.content.setDisplayedSize(i,s)}sizeChanged(t,e){return(t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0)}getPlaceholderElement(){return this.content.placeholder?.element}zoomTo(t,e,i,s){const{pswp:n}=this;if(!this.isZoomable()||n.mainScroll.isShifted())return;n.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),n.animations.stopAllPan();const o=this.currZoomLevel;s||(t=Ze(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,o),this.pan.y=this.calculateZoomToPanOffset("y",e,o),Ee(this.pan);const r=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?n.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:r,duration:i,easing:n.options.easing}):r()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,e,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const s=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*s+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),this.applyCurrentZoomPan()}isPannable(){return Boolean(this.width)&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return Boolean(this.width)&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),Ae(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,Fe(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;Ae(this.panAreaSize,Ke(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return De(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}};function pi(t,e,i){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),e.on("change",()=>{e.options.loop||(t.disabled=i?!(e.currIndex<e.getNumItems()-1):!(e.currIndex>0))})}var ui={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:pi},mi={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,e)=>{pi(t,e,!0)}},fi={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},gi={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},vi={name:"counter",order:5,onInit:(t,e)=>{e.on("change",()=>{t.innerText=e.currIndex+1+e.options.indexIndicatorSep+e.getNumItems()})}},yi={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,e)=>{let i,s=null;const n=e=>{var s;i!==e&&(i=e,s=e,t.classList.toggle("pswp__preloader--active",s))},o=()=>{if(!e.currSlide?.content.isLoading())return n(!1),void(s&&(clearTimeout(s),s=null));s||(s=setTimeout(()=>{n(Boolean(e.currSlide?.content.isLoading())),s=null},e.options.preloaderDelay))};e.on("change",o),e.on("loadComplete",t=>{e.currSlide===t.slide&&o()}),e.ui&&(e.ui.updatePreloaderVisibility=o)}},wi=class{constructor(t,e){const i=e.name||e.className;let s=e.html;if(!1===t.options[i])return;"string"==typeof t.options[`${i}SVG`]&&(s=t.options[`${i}SVG`]),t.dispatch("uiElementCreate",{data:e});let n="";e.isButton?(n+="pswp__button ",n+=e.className||`pswp__button--${e.name}`):n+=e.className||`pswp__${e.name}`;let o=e.isButton?e.tagName||"button":e.tagName||"div";o=o.toLowerCase();const r=ze(n,o);if(e.isButton){"button"===o&&(r.type="button");let{title:s}=e;const{ariaLabel:n}=e;"string"==typeof t.options[`${i}Title`]&&(s=t.options[`${i}Title`]),s&&(r.title=s);const a=n||s;a&&r.setAttribute("aria-label",a)}r.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const e=t;let i='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return i=i.split("%d").join(e.size||32),e.outlineID&&(i+=`<use class="pswp__icn-shadow" xlink:href="#${e.outlineID}"/>`),i+=e.inner,i+="</svg>",i}(s),e.onInit&&e.onInit(r,t),e.onClick&&(r.onclick=i=>{"string"==typeof e.onClick?t[e.onClick]():"function"==typeof e.onClick&&e.onClick(i,r,t)});const a=e.appendTo||"bar";let l=t.element;"bar"===a?(t.topBar||(t.topBar=ze("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),l=t.topBar):(r.classList.add("pswp__hide-on-close"),"wrapper"===a&&(l=t.scrollWrap)),l?.appendChild(t.applyFilters("uiElement",r,e))}};function _i(t,e){t.classList.toggle("pswp--zoomed-in",e)}var xi=class{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[fi,ui,mi,gi,yi,vi],t.dispatch("uiRegister"),this.uiElementsData.sort((t,e)=>(t.order||0)-(e.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(t=>{this.registerElement(t)}),t.on("change",()=>{t.element?.classList.toggle("pswp--one-slide",1===t.getNumItems())}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new wi(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:s}=e;if(this.pswp.opener.isOpen||(s=e.zoomLevels.initial),s===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=s;const n=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(n)<.01||!e.isZoomable())return _i(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),_i(t,(s===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial)<=s),"zoom"!==i.imageClickAction&&"zoom-or-close"!==i.imageClickAction||t.classList.add("pswp--click-to-zoom")}},bi="cubic-bezier(.4,0,.22,1)",Si=class{constructor(t){this.props=t;const{target:e,onComplete:i,transform:s,onFinish:n=()=>{},duration:o=333,easing:r=bi}=t;this.onFinish=n;const a=s?"transform":"opacity",l=t[a]??"";this._target=e,this._onComplete=i,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{Me(e,a,o,r),this._helperTimeout=setTimeout(()=>{e.addEventListener("transitionend",this._onTransitionEnd,!1),e.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},o+500),e.style[a]=l},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&(clearTimeout(this._helperTimeout),this._helperTimeout=null),Me(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}},Pi=class{constructor(t,e,i){this.velocity=1e3*t,this._dampingRatio=e||.75,this._naturalFrequency=i||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,e){let i,s=0;e/=1e3;const n=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(1===this._dampingRatio)i=this.velocity+this._naturalFrequency*t,s=(t+i*e)*n,this.velocity=s*-this._naturalFrequency+i*n;else if(this._dampingRatio<1){i=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const o=Math.cos(this._dampedFrequency*e),r=Math.sin(this._dampedFrequency*e);s=n*(t*o+i*r),this.velocity=s*-this._naturalFrequency*this._dampingRatio+n*(-this._dampedFrequency*t*r+this._dampedFrequency*i*o)}return s}},Ii=class{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:s,onUpdate:n,onComplete:o,onFinish:r=()=>{},dampingRatio:a,naturalFrequency:l}=t;this.onFinish=r;const h=new Pi(s,a,l);let c=Date.now(),d=e-i;const p=()=>{this._raf&&(d=h.easeFrame(d,Date.now()-c),Math.abs(d)<1&&Math.abs(h.velocity)<50?(n(i),o&&o(),this.onFinish()):(c=Date.now(),n(d+i),this._raf=requestAnimationFrame(p)))};this._raf=requestAnimationFrame(p)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}},Ci=class{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new Ii(t):new Si(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isPan||(t.destroy(),!1))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isMainScroll||(t.destroy(),!1))}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}},Li=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{Li=!0}}))}catch(Bi){}var Ti=class{constructor(){this._pool=[]}add(t,e,i,s){this._toggleListener(t,e,i,s)}remove(t,e,i,s){this._toggleListener(t,e,i,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,e,i,s,n,o){if(!t)return;const r=n?"removeEventListener":"addEventListener";e.split(" ").forEach(e=>{if(e){o||(n?this._pool=this._pool.filter(s=>s.type!==e||s.listener!==i||s.target!==t):this._pool.push({target:t,type:e,listener:i,passive:s}));const a=!!Li&&{passive:s||!1};t[r](e,i,a)}})}},zi={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},Ai=(t,e)=>e?t:zi[t],Ei=class{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const e=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&e&&this._wasFocused&&e.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(He(t))return;let i,s,n=!1;const o="key"in t;switch(o?t.key:t.keyCode){case Ai("Escape",o):e.options.escKey&&(i="close");break;case Ai("z",o):i="toggleZoom";break;case Ai("ArrowLeft",o):s="x";break;case Ai("ArrowUp",o):s="y";break;case Ai("ArrowRight",o):s="x",n=!0;break;case Ai("ArrowDown",o):n=!0,s="y";break;case Ai("Tab",o):this._focusRoot()}if(s){t.preventDefault();const{currSlide:o}=e;e.options.arrowKeys&&"x"===s&&e.getNumItems()>1?i=n?"next":"prev":o&&o.currZoomLevel>o.zoomLevels.fit&&(o.pan[s]+=n?-80:80,o.panTo(o.pan.x,o.pan.y))}i&&(t.preventDefault(),e[i]())}_onFocusIn(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}},Oi=class{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),s=i!==this.slideWidth;s&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((e,i)=>{s&&Fe(e.el,(i+this._containerShiftIndex)*this.slideWidth),t&&e.slide&&e.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const e=ze("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=1===t?"block":"none",this.itemHolders.push({el:e})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){const{pswp:s}=this;let n=s.potentialIndex+t;const o=s.getNumItems();if(s.canLoop()){n=s.getLoopedIndex(n);const e=(t+o)%o;t=e<=o/2?e:e-o}else n<0?n=0:n>=o&&(n=o-1),t=n-s.potentialIndex;s.potentialIndex=n,this._currPositionIndex-=t,s.animations.stopMainScroll();const r=this.getCurrSlideX();if(e){s.animations.startSpring({isMainScroll:!0,start:this.x,end:r,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let t=s.potentialIndex-s.currIndex;if(s.canLoop()){const e=(t+o)%o;t=e<=o/2?e:e-o}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(r),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){const{pswp:t}=this,e=this._prevPositionIndex-this._currPositionIndex;if(!e)return;this._prevPositionIndex=this._currPositionIndex,t.currIndex=t.potentialIndex;let i,s=Math.abs(e);s>=3&&(this._containerShiftIndex+=e+(e>0?-3:3),s=3,this.itemHolders.forEach(t=>{t.slide?.destroy(),t.slide=void 0}));for(let n=0;n<s;n++)e>0?(i=this.itemHolders.shift(),i&&(this.itemHolders[2]=i,this._containerShiftIndex++,Fe(i.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(i,t.currIndex-s+n+2))):(i=this.itemHolders.pop(),i&&(this.itemHolders.unshift(i),this._containerShiftIndex--,Fe(i.el,this._containerShiftIndex*this.slideWidth),t.setContent(i,t.currIndex+s-n-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),t.animations.stopAllPan(),this.itemHolders.forEach((t,e)=>{t.slide&&t.slide.setIsActive(1===e)}),t.currSlide=this.itemHolders[1]?.slide,t.contentLoader.updateLazy(e),t.currSlide&&t.currSlide.applyCurrentZoomPan(),t.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let e=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;e+=this.pswp.currIndex;const i=Math.round(t-this.x);(e<0&&i>0||e>=this.pswp.getNumItems()-1&&i<0)&&(t=this.x+.35*i)}this.x=t,this.pswp.container&&Fe(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:e??!1})}},ki=.003,Zi=class{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;if("fade"===i.showHideAnimationType?(i.showHideOpacity=!0,this._thumbBounds=void 0):"none"===i.showHideAnimationType?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=e?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=Boolean(this._duration&&this._duration>50),this._animateZoom=Boolean(this._thumbBounds)&&e?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),this._animateZoom?this._animateRootOpacity=i.showHideOpacity??!1:(this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>ki,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(ki)),t.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=this.pswp.currSlide?.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=`${t.viewportSize.x}px`)):this._croppedZoom=!1,this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(ki)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(ki)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(ki)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise(t=>{let e=!1,i=!0;var s;(s=this._placeholder,"decode"in s?s.decode().catch(()=>{}):s.complete?Promise.resolve(s):new Promise((t,e)=>{s.onload=()=>t(s),s.onerror=e})).finally(()=>{e=!0,i||t(!0)}),setTimeout(()=>{i=!1,e&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){this.pswp.element?.style.setProperty("--pswp-transition-duration",`${this._duration}ms`),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),this.pswp.element?.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed?t.destroy():this.isOpen&&(this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),t.currSlide?.applyCurrentZoomPan())}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:e}=this,{innerRect:i}=this._thumbBounds,{currSlide:s,viewportSize:n}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const e=-n.x+(this._thumbBounds.x-i.x)+i.w,s=-n.y+(this._thumbBounds.y-i.y)+i.h,o=n.x-i.w,r=n.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",De(e,s)),this._animateTo(this._cropContainer2,"transform",De(o,r))):(Fe(this._cropContainer1,e,s),Fe(this._cropContainer2,o,r))}s&&(Ae(s.pan,i||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,e,i){if(!this._duration)return void(t.style[e]=i);const{animations:s}=this.pswp,n={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};n[e]=i,s.startTransition(n)}},Di=class{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:e}=this.pswp;let{deltaX:i,deltaY:s}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let i=-s;1===t.deltaMode?i*=.05:i*=t.deltaMode?1:.002,i=2**i;const n=e.currZoomLevel*i;e.zoomTo(n,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(1===t.deltaMode&&(i*=18,s*=18),e.panTo(e.pan.x-i,e.pan.y-s))}},Fi={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"},Mi=class extends ii{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new Ti,this.animations=new Ci,this.mainScroll=new Oi(this),this.gestures=new hi(this),this.opener=new Zi(this),this.keyboard=new Ei(this),this.contentLoader=new Je(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=` ${this.options.mainClass}`),this.element&&(this.element.className+=` ${t}`),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new Di(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),Ze(t,0,e-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{t.slide?.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex,!0)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){this.currSlide?.zoomTo(...t)}toggleZoom(){this.currSlide?.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),this.element?.remove(),this.mainScroll.itemHolders.forEach(t=>{t.slide?.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((e,i)=>{let s=(this.currSlide?.index??0)-1+i;this.canLoop()&&(s=this.getLoopedIndex(s)),s===t&&(this.setContent(e,t,!0),1===i&&(this.currSlide=e.slide,e.slide?.setIsActive(!0)))}),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}!this.canLoop()&&(e<0||e>=this.getNumItems())||(t.slide=new di(this.getItemData(e),e,this),e===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el))}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const e=Ue(this.options,this);!t&&ke(e,this._prevViewportSize)||(Ae(this._prevViewportSize,e),this.dispatch("beforeResize"),Ae(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){this.hasMouse||(this.hasMouse=!0,this.element?.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=ze("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=ze("pswp__bg","div",this.element),this.scrollWrap=ze("pswp__scroll-wrap","section",this.element),this.container=ze("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new xi(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,e,i){const s=i.dispatch("thumbBounds",{index:t,itemData:e,instance:i});if(s.thumbBounds)return s.thumbBounds;const{element:n}=e;let o,r;if(n&&!1!==i.options.thumbSelector){const t=i.options.thumbSelector||"img";r=n.matches(t)?n:n.querySelector(t)}return r=i.applyFilters("thumbEl",r,e,t),r&&(o=e.thumbCropped?function(t,e,i){const s=t.getBoundingClientRect(),n=s.width/e,o=s.height/i,r=n>o?n:o,a=(s.width-e*r)/2,l=(s.height-i*r)/2,h={x:s.left+a,y:s.top+l,w:e*r};return h.innerRect={w:s.width,h:s.height,x:a,y:l},h}(r,e.width||e.w||0,e.height||e.h||0):function(t){const e=t.getBoundingClientRect();return{x:e.left,y:e.top,w:e.width}}(r)),i.applyFilters("thumbBounds",o,e,t)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...Fi,...t}}},Ni=()=>Promise.resolve(Mi);export{qt as _,se as a,Bt as b,le as c,ee as d,te as f,Ut as g,Xt as h,Ce as i,ae as l,Yt as m,si as n,re as o,Qt as p,Te as r,ce as s,Ni as t,he as u,$t as v,jt as y};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e}from"./CsohJ1Yu.js";import{H as t,P as r,j as o,r as n,v as s,z as l}from"./19c52mJB.js";import{
|
|
2
|
-
/* @__PURE__ */s("div",{class:"absolute top-4 left-4 z-20 flex w-[min(96%,420px)] flex-col gap-2 rounded-xl border border-slate-200 bg-white/95 p-3 shadow-lg backdrop-blur-sm",children:[/* @__PURE__ */s("div",{class:"flex items-center justify-between gap-3",children:[/* @__PURE__ */s("div",{children:[/* @__PURE__ */s("div",{class:"text-sm font-semibold text-slate-900",children:
|
|
1
|
+
import{a as e}from"./CsohJ1Yu.js";import{H as t,P as r,j as o,r as n,v as s,z as l}from"./19c52mJB.js";import{I as a}from"./t1REK11Z.js";import{n as i}from"./BQBx6JI7.js";import{t as c}from"./CNGkJRCP.js";import{t as d}from"./BHwNoqYe.js";var u=new i,f=(e,r,o)=>{t(/* @__PURE__ */s(a,{client:u,children:/* @__PURE__ */s(n,{children:/* @__PURE__ */s(c,{event:e,onExplore:o})})}),r)},p=({folderId:t,onExplore:n,apiKey:a,is3D:i,logoUrl:c})=>{const u=o(null),p=o(null),m=o(null),h=o(null),[b,x]=r(!1),{activeFolderId:v,visibleFolders:g,visibleEvents:y,folderFeatureCollection:w,breadcrumb:k,isBusy:j,setActiveFolderId:L,goBack:C,activeFolder:B,folderBounds:F}=d({folderId:t}),S=y?.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);return l(()=>{if(!u.current||p.current)return;let t;return(async()=>{const r=(await import("./C1E5jOn8.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(!document.querySelector("link[data-qrati-mapbox-css]")){const e=document.createElement("link");e.rel="stylesheet",e.href="https://unpkg.com/mapbox-gl@3.20.0/dist/mapbox-gl.css",e.setAttribute("data-qrati-mapbox-css",""),document.head.appendChild(e)}if(!u.current)return;r.accessToken=a;const o=new r.Map({container:u.current,style:"mapbox://styles/mapbox/streets-v12",center:[0,20],zoom:3,minZoom:2,pitch:i?30:0,bearing:i?-20:0,antialias:!0});p.current=o,o.on("load",()=>{if(0===S.length)return;const e=new r.LngLatBounds;for(const s of S){const t=s.location.x,l=s.location.y;e.extend([t,l]);const a=document.createElement("div");if(a.style.cssText="\n width: 36px; height: 36px; cursor: pointer;\n background: var(--primary, #ff4800);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n display: flex; align-items: center; justify-content: center; overflow: hidden;\n ",c){const e=document.createElement("img");e.src=c,e.style.cssText="width: 24px; height: 24px; border-radius: 50%; object-fit: cover; transform: rotate(45deg);",a.appendChild(e)}const i=document.createElement("div");f(s,i,n);const d=new r.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-20]}).setDOMContent(i);new r.Marker({element:a}).setLngLat([t,l]).setPopup(d).addTo(o)}e.isEmpty()||o.fitBounds(e,{padding:60,maxZoom:14,duration:1200}),x(!0),o.addSource("folder-areas",{type:"geojson",data:w}),o.addLayer({id:"folder-fill",type:"fill",source:"folder-areas",paint:{"fill-color":["case",["boolean",["feature-state","hover"],!1],"#ffb703","#ffb703"],"fill-opacity":.28}}),o.addLayer({id:"folder-border",type:"line",source:"folder-areas",paint:{"line-color":["case",["boolean",["feature-state","hover"],!1],"#fb8500","#fb8500"],"line-width":["case",["boolean",["feature-state","hover"],!1],3,2]}}),o.addLayer({id:"folder-point",type:"circle",source:"folder-areas",filter:["==",["geometry-type"],"Point"],paint:{"circle-radius":10,"circle-color":["case",["boolean",["feature-state","hover"],!1],"#fb8500","#ffb703"],"circle-stroke-color":"#fff","circle-stroke-width":2}}),o.on("mousemove","folder-fill",e=>{const t=e.features?.[0];if(!t)return;const n=String(t.properties?.folderId);h.current!==n&&(h.current&&o.setFeatureState({source:"folder-areas",id:h.current},{hover:!1}),h.current=n,o.setFeatureState({source:"folder-areas",id:n},{hover:!0})),o.getCanvas().style.cursor="pointer",((e,t)=>{const n=e.properties??{},s=String(n.name??"Folder"),l=Number(n.eventCount??0);m.current||(m.current=new r.Popup({closeButton:!1,closeOnClick:!1,offset:12})),m.current.setLngLat(t).setHTML(`<div class='text-sm font-semibold text-slate-900'>${s}</div><div class='text-xs text-slate-700'>${l} event${1===l?"":"s"}</div>`).addTo(o)})(t,e.lngLat)}),o.on("mouseleave","folder-fill",()=>{h.current&&(o.setFeatureState({source:"folder-areas",id:h.current},{hover:!1}),h.current=null,m.current?.remove()),o.getCanvas().style.cursor=""});const t=e=>{const t=(e.features?.[0])?.properties?.folderId;t&&L(String(t))};o.on("click","folder-fill",t),o.on("click","folder-border",t),o.on("click","folder-point",t)}),t=()=>{o.remove(),p.current=null,m.current=null}})(),()=>{t?.()}},[a,i,n,L]),l(()=>{if(!p.current||!b)return;const e=p.current;try{e.getSource("folder-areas")?.setData(w)}catch{}},[w,b]),l(()=>{(()=>{const e=p.current;if(!e||!b)return;const t=F;if(!t)return;const[r,o,n,s]=t;e.fitBounds([[r,o],[n,s]],{padding:72,duration:800,maxZoom:14})})()},[F,b]),l(()=>{p.current&&p.current.easeTo({pitch:i?30:0,bearing:i?-20:0,duration:800})},[i]),/* @__PURE__ */s("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",children:[
|
|
2
|
+
/* @__PURE__ */s("div",{class:"absolute top-4 left-4 z-20 flex w-[min(96%,420px)] flex-col gap-2 rounded-xl border border-slate-200 bg-white/95 p-3 shadow-lg backdrop-blur-sm",children:[/* @__PURE__ */s("div",{class:"flex items-center justify-between gap-3",children:[/* @__PURE__ */s("div",{children:[/* @__PURE__ */s("div",{class:"text-sm font-semibold text-slate-900",children:B?.name??"Home"}),/* @__PURE__ */s("div",{class:"text-xs text-slate-600",children:["Tap a folder region to drill into its contents. ",g?.length??0," folder",1===g?.length?"":"s",", ",S.length," event",1===S.length?"":"s"," total"]})]}),v&&/* @__PURE__ */s("button",{type:"button",onClick:C,class:"rounded bg-slate-100 px-3 py-1 text-xs font-semibold text-slate-700 hover:bg-slate-200",children:"Back"})]}),k.length>0&&/* @__PURE__ */s("div",{class:"flex flex-wrap gap-1 text-xs text-slate-500",children:[/* @__PURE__ */s("span",{children:"All folders"}),k.map(e=>/* @__PURE__ */s("span",{class:"inline-flex items-center gap-1",children:[/* @__PURE__ */s("span",{class:"text-slate-300",children:"/"}),/* @__PURE__ */s("span",{children:e.name})]},e._id))]})]}),j&&/* @__PURE__ */s("div",{class:"absolute inset-0 z-10 flex items-center justify-center bg-white/70",children:/* @__PURE__ */s("div",{class:"border-primary flex h-12 w-12 animate-spin items-center justify-center rounded-full border-4 border-t-transparent"})}),
|
|
3
3
|
/* @__PURE__ */s("div",{ref:u,class:"h-full w-full rounded-xl border border-slate-200"})]})};export{p as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e}from"./CsohJ1Yu.js";import{H as t,M as r,P as n,j as o,r as l,v as i,z as s}from"./19c52mJB.js";import{
|
|
1
|
+
import{a as e}from"./CsohJ1Yu.js";import{H as t,M as r,P as n,j as o,r as l,v as i,z as s}from"./19c52mJB.js";import{E as c,I as a}from"./t1REK11Z.js";import{n as u}from"./BQBx6JI7.js";import{t as d}from"./CNGkJRCP.js";import{t as f}from"./BHwNoqYe.js";var m=[[90,-180],[-90,180]],p=[0,0],y=new u,h=e=>e||"#fb8500",g=({folderId:u,onExplore:g,logoUrl:x})=>{const b=o(null),v=o(null),w=o(null),L=o(null),z=o(null),B=o(null),j=o(null),k=o(!1),O=o(u??null),T=o(null),C=o(!1),S=o(()=>{}),I=o(!1),F=r(()=>(()=>{try{const e=sessionStorage.getItem(c);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.center?.lat&&"number"==typeof t?.center?.lng&&"number"==typeof t?.zoom)return t}catch{}return null})(),[]),[Z,E]=n(!0),[N,$]=n(!1),{isFolderViewEnabled:A,activeFolderId:M,visibleEvents:R,visibleFolders:V,folderFeatureCollection:q,breadcrumb:J,isBusy:G,setActiveFolderId:H,goBack:P,activeFolder:W,folderBounds:_}=f({folderId:u});O.current=M,T.current=W,C.current=A,S.current=H;const U=()=>{const e=v.current,t=w.current;if(!e||!N||!t)return;const r=M??null,n=F?.folderId??null;if(!I.current&&F&&r===n)return void(I.current=!0);let o=null;if(_){const[e,r,n,l]=_;o=t.latLngBounds([[r,e],[l,n]])}o||(o=((e,t)=>{const r=e.latLngBounds([]);for(const n of t)"number"==typeof n.location?.x&&"number"==typeof n.location?.y&&r.extend([n.location.y,n.location.x]);return r.isValid()?r:null})(t,R)),o&&(k.current=!0,e.fitBounds(o,{paddingTopLeft:[12,88],paddingBottomRight:[12,24],maxZoom:14}),I.current=!0)};return s(()=>{if(!b.current||v.current)return;let t;return(async()=>{try{const r=await import("./CiA4qgsY.js").then(t=>/* @__PURE__ */e(t.default,1));"undefined"!=typeof window&&(window.L=r),await Promise.all([import("./OQ2IC54N.js").then(t=>/* @__PURE__ */e(t.default,1)),import("./BJ85RnFv.js")]);const n=window.L??r,o=r.latLngBounds(m);if(!b.current)return;const l=r.map(b.current,{center:F?.center?[F.center.lat??p[0],F.center.lng??p[1]]:p,zoom:F?.zoom??3,minZoom:3,zoomControl:!0,worldCopyJump:!1,maxBounds:o,maxBoundsViscosity:1});r.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap contributors",maxZoom:19,noWrap:!0}).addTo(l);const i="function"==typeof n.markerClusterGroup?n.markerClusterGroup({chunkedLoading:!0,showCoverageOnHover:!1,spiderfyOnMaxZoom:!0,maxClusterRadius:48,zoomToBoundsOnClick:!1}):r.layerGroup(),s=e=>{const t=e?.layer;t&&(C.current?t.spiderfy?.():t.zoomToBounds?.())},a="function"==typeof n.heatLayer?n.heatLayer([],{radius:30,blur:30,maxZoom:10,minOpacity:.35}):null;a?.addTo(l),i.addTo(l);const u=()=>{j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{try{sessionStorage.setItem(c,JSON.stringify({center:l.getCenter(),zoom:l.getZoom(),folderId:O.current}))}catch{}},250)},d=()=>{if(k.current)return void(k.current=!1);if(!C.current)return;const e=T.current;if(!e?._id)return;const t=((e,t)=>{if(!t?.length)return null;const r=e.latLngBounds([]);for(const n of t)"number"==typeof n?.x&&"number"==typeof n?.y&&r.extend([n.y,n.x]);return r.isValid()?r:null})(n,e.boundary);if(!t)return;const r=l.getBoundsZoom(t,!1);l.getZoom()>=r-1||S.current(e.parentFolderId??null)};l.on("zoomend",u),l.on("moveend",u),l.on("zoomend",d),i.on?.("clusterclick",s),v.current=l,w.current=n,z.current=i,B.current=a;const f=()=>{l.invalidateSize(!1)};let y;"undefined"!=typeof ResizeObserver&&b.current&&(y=new ResizeObserver(f),y.observe(b.current)),requestAnimationFrame(f),$(!0),E(!1),t=()=>{y?.disconnect(),j.current&&(clearTimeout(j.current),j.current=null),l.off("zoomend",u),l.off("moveend",u),l.off("zoomend",d),i.off?.("clusterclick",s),l.remove(),w.current=null,v.current=null,L.current=null,z.current=null,B.current=null}}finally{E(!1)}})(),()=>{t?.()}},[F]),s(()=>{I.current=!1},[M]),s(()=>{if(!v.current||!N)return;const e=v.current,r=w.current;if(!r)return;B.current&&(A?(B.current.setLatLngs?.([]),e.hasLayer(B.current)&&e.removeLayer(B.current)):e.hasLayer(B.current)||B.current.addTo(e)),L.current&&(e.removeLayer(L.current),L.current=null),z.current?.clearLayers?.(),q.features.length>0&&(L.current=r.geoJSON(q,{style:e=>{const t=h(e?.properties?.color);return{color:t,weight:2,opacity:1,fillColor:t,fillOpacity:.22}},onEachFeature:(t,r)=>{const n=t.properties??{},o=String(n.name??"Folder"),l=h(n.color);r.bindTooltip(`<div style="font-size:12px;font-weight:700;color:${l};white-space:nowrap;">${o}</div>`,{permanent:!0,direction:"center",className:"qrati-folder-label",opacity:1}),r.on("click",()=>{const t=n.folderId;t&&("function"==typeof r.getBounds&&(k.current=!0,e.fitBounds(r.getBounds(),{paddingTopLeft:[12,88],paddingBottomRight:[12,24],maxZoom:14})),H(String(t)))}),r.on("mouseover",()=>{r.setStyle({fillOpacity:.4,weight:3}),e.getContainer().style.cursor="pointer"}),r.on("mouseout",()=>{r.setStyle({fillOpacity:.28,weight:2}),e.getContainer().style.cursor=""})},pointToLayer:(t,n)=>{const o=t.properties??{},l=String(o.name??"Folder"),i=h(o.color);return r.circleMarker(n,{color:i,weight:2,fillColor:i,fillOpacity:.22,radius:10}).bindTooltip(`<div style="font-size:12px;font-weight:700;color:${i};white-space:nowrap;">${l}</div>`,{permanent:!0,direction:"top",offset:[0,-8],className:"qrati-folder-label",opacity:1}).on("click",()=>{const t=o.folderId;t&&(k.current=!0,e.setView(n,Math.max(e.getZoom(),10),{animate:!0}),H(String(t)))})}}).addTo(e));const n=R.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(n.length>0){if(n.map(e=>{const n=e.location.x,o=e.location.y,s=r.divIcon({className:"qrati-leaflet-marker-wrapper",html:`\n <div style="\n width: 36px;\n height: 36px;\n cursor: pointer;\n background: var(--primary, #ff4800);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n ">${x?`<img src="${x}" style="width: 24px; height: 24px; border-radius: 50%; object-fit: cover; transform: rotate(45deg);" />`:""}</div>\n `,iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-36]}),c=r.marker([o,n],{icon:s}),u=document.createElement("div");return u.style.width="fit-content",((e,r,n)=>{t(/* @__PURE__ */i(a,{client:y,children:/* @__PURE__ */i(l,{children:/* @__PURE__ */i(d,{event:e,onExplore:n})})}),r)})(e,u,g),c.bindPopup(u,{closeButton:!0,maxWidth:256}),c}).forEach(e=>z.current?.addLayer?.(e)),B.current&&!A){const e=[];n.forEach(t=>{const r=t.location.x,n=t.location.y,o="number"==typeof t.views&&t.views>0?t.views:1;e.push([n,r,o])});const t=n.reduce((e,t)=>{const r="number"==typeof t.views&&t.views>0?t.views:1;return r>e?r:e},1);B.current.setOptions?.({radius:30,blur:30,maxZoom:10,minOpacity:.35,max:t}),B.current.setLatLngs?.(e)}}else B.current?.setLatLngs?.([]);U()},[M,q,R,N,H,g,x,A]),s(()=>{U()},[M,_,N,R]),/* @__PURE__ */i("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",children:[
|
|
2
2
|
/* @__PURE__ */i("div",{class:"absolute top-4 left-4 z-200 flex w-[min(96%,420px)] flex-col gap-2 rounded-xl border border-slate-200 bg-white/95 p-3 shadow-lg backdrop-blur-sm",children:[/* @__PURE__ */i("div",{class:"flex items-center justify-between gap-3",children:[/* @__PURE__ */i("div",{children:[/* @__PURE__ */i("div",{class:"text-sm font-semibold text-slate-900",children:W?.name??"Home"}),/* @__PURE__ */i("div",{class:"text-xs text-slate-600",children:["Tap a folder region to drill into its contents. ",V?.length??0," folder",1===V?.length?"":"s",", ",R.length," event",1===R.length?"":"s"," total"]})]}),M&&/* @__PURE__ */i("button",{type:"button",onClick:P,class:"rounded bg-slate-100 px-3 py-1 text-xs font-semibold text-slate-700 hover:bg-slate-200",children:"Back"})]}),J.length>0&&/* @__PURE__ */i("div",{class:"flex flex-wrap gap-1 text-xs text-slate-500",children:[/* @__PURE__ */i("span",{children:"All folders"}),J.map(e=>/* @__PURE__ */i("span",{class:"inline-flex items-center gap-1",children:[/* @__PURE__ */i("span",{class:"text-slate-300",children:"/"}),/* @__PURE__ */i("span",{children:e.name})]},e._id))]})]}),G&&/* @__PURE__ */i("div",{class:"absolute inset-0 z-10 flex items-center justify-center bg-white/70",children:/* @__PURE__ */i("div",{class:"border-primary flex h-12 w-12 animate-spin items-center justify-center rounded-full border-4 border-t-transparent"})}),Z&&/* @__PURE__ */i("div",{class:"absolute inset-0 z-20 flex items-center justify-center bg-white/85",children:/* @__PURE__ */i("div",{class:"flex flex-col items-center gap-3",children:[/* @__PURE__ */i("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"}),/* @__PURE__ */i("p",{class:"text-sm font-medium text-slate-700",children:"Loading map…"})]})}),
|
|
3
3
|
/* @__PURE__ */i("div",{ref:b,class:"h-full w-full rounded-xl border border-slate-200"})]})};export{g as default};
|