@qratilabs/qrati-connect 2.11.2 → 2.12.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 +7 -0
- package/element/B69ImNZT.js +1 -0
- package/element/BJ85RnFv.js +1 -0
- package/element/BMcguUyG.js +3 -0
- package/element/{BYFlh5C5.js → BQqOUW6N.js} +5 -5
- package/element/{C__vUXvg.js → Boe_RDqD.js} +1 -1
- package/element/{BQB7uJ0l.js → Bv-t_m1C.js} +2 -2
- package/element/{kPqeZ-lH.js → C3QMmYnY.js} +1 -1
- package/element/{BSP6ZAxM.js → CDQEYcjb.js} +1 -1
- package/element/CVBzx4z2.js +1 -0
- package/element/C_Ll1SGr.js +3 -0
- package/element/{BgMQfcp1.js → CgysBfpd.js} +2 -2
- package/element/{B6AogNwO.js → CjV7Y_ZR.js} +5 -5
- package/element/web.es.js +138 -140
- package/package.json +1 -1
- package/react/{SmAWGP68.js → B8E540Dw.js} +1 -1
- package/react/BJ85RnFv.js +1 -0
- package/react/{Dx3H0TXY.js → BLFGxc-Z.js} +1 -1
- package/react/{DdUmw-Lp.js → BLyySAIG.js} +1 -1
- package/react/{DEkf_xei.js → BNWA4oPH.js} +1 -1
- package/react/{uiiSr1iu.js → BQ_-fjek.js} +1 -1
- package/react/B_v7xpxg.js +3 -0
- package/react/Bnjm_hPo.js +1 -0
- package/react/BtTYXVAR.js +1 -0
- package/react/{DLDA1Kjz.js → By2TDGd0.js} +1 -1
- package/react/C2_oNmLs.js +1 -0
- package/react/CDxcCZ0e.js +1 -0
- package/react/{C02SORiV.js → CQPNrnGa.js} +1 -1
- package/react/CVBzx4z2.js +1 -0
- package/react/{CO6S8f5W.js → Cg32CQgw.js} +5 -5
- package/react/{BuIB9AXA.js → D1R9CsTD.js} +12 -12
- package/react/{CExWFXPu.js → DIHBL0r_.js} +2 -2
- package/react/DY14MZ7R.js +1 -0
- package/react/{q5E_UWxZ.js → DYF1izRu.js} +1 -1
- package/react/DecT4TR6.js +3 -0
- package/react/{I6Sstf1G.js → Dkfv3zUk.js} +1 -1
- package/react/{DmnfzC9I.js → DnZjfS5P.js} +1 -1
- package/react/{BPczcQJn.js → QyW5oQ3d.js} +1 -1
- package/react/{ZJDrzcXm.js → iNYjrgIk.js} +1 -1
- package/react/index.cjs +1 -1
- package/react/index.mjs +71 -73
- package/umd/web.umd.js +1 -1
- package/element/C-LQPZVK.js +0 -3
- package/element/CHhgXpm7.js +0 -3
- package/element/DnHHH-ld.js +0 -1
- package/react/BVTf5URN.js +0 -1
- package/react/CHwj9Xb4.js +0 -3
- package/react/Ca8RfX27.js +0 -1
- package/react/D5c7A2zT.js +0 -3
- package/react/x8PDxFIY.js +0 -1
- /package/element/{BaDK5_iv.js → BoGN7PAu.js} +0 -0
- /package/element/{D8mHDhEV.js → D0vqGbrV.js} +0 -0
- /package/element/{Dlgiti9h.js → D65dhVYX.js} +0 -0
- /package/element/{C0dqRit2.js → bCYrje4k.js} +0 -0
- /package/react/{BkSX_NqE.js → 2loTkxKJ.js} +0 -0
- /package/react/{B7CKBSvG.js → BB64mo-u.js} +0 -0
- /package/react/{BaDK5_iv.js → BoGN7PAu.js} +0 -0
- /package/react/{D1oAzDTo.js → CQZJGufb.js} +0 -0
- /package/react/{DMEpl2Pi.js → CWvvo0Iu.js} +0 -0
- /package/react/{D8mHDhEV.js → D0vqGbrV.js} +0 -0
- /package/react/{BV6AkckF.js → Ds97LXZO.js} +0 -0
- /package/react/{C0dqRit2.js → bCYrje4k.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=require("./BLzjjF3u.js"),n=require("./BSo7livb.js"),e=require("./C02SORiV.js"),r=require("./DmnfzC9I.js");function i(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 o(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(!a(t[0])||!a(t[1]))throw new Error("coordinates must contain numbers");return i({type:"Point",coordinates:t},n,e)}function a(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function h(t,n,e){if(null!==t)for(var r,i,o,a,s,l,u,f,c=0,m=0,p=t.type,d="FeatureCollection"===p,g="Feature"===p,x=d?t.features.length:1,v=0;v<x;v++){s=(f=!!(u=d?t.features[v].geometry:g?t.geometry:t)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var y=0;y<s;y++){var M=0,_=0;if(null!==(a=f?u.geometries[y]:u)){l=a.coordinates;var b=a.type;switch(c=!e||"Polygon"!==b&&"MultiPolygon"!==b?0:1,b){case null:break;case"Point":if(!1===n(l,m,v,M,_))return!1;m++,M++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===n(l[r],m,v,M,_))return!1;m++,"MultiPoint"===b&&M++}"LineString"===b&&M++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-c;i++){if(!1===n(l[r][i],m,v,M,_))return!1;m++}"MultiLineString"===b&&M++,"Polygon"===b&&_++}"Polygon"===b&&M++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(_=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-c;o++){if(!1===n(l[r][i][o],m,v,M,_))return!1;m++}_++}M++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===h(a.geometries[r],n,e))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}Math.PI;var s,l=t.__commonJSMin((t,n)=>{var e,r;e=t,r=function(){"use strict";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),x=(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)),v=u(d)+u(g);x<c?(c=x,r=p,m=v<m?v:m):x===c&&v<m&&(m=v,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()}),u=t.__exportAll({default:()=>s});function f(t,n){return t<n?-1:t>n?1:0}var c=t.__esmMin(()=>{s=class{constructor(t=[],n=f){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}}}),m=t.__commonJSMin((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}}),p=t.__commonJSMin((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}}),d=t.__commonJSMin((t,n)=>{var e=m(),r=p();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}),g=t.__commonJSMin((t,n)=>{var e,r;e=t,r=function(t){"use strict";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,x,v,y,M,_,b,X,Y,B,w,F,P,S,E,A;const j=t-f,k=l-f,I=r-c,q=u-c;v=(P=(_=j-(M=(y=n*j)-(y-j)))*(X=q-(b=(y=n*q)-(y-q)))-((F=j*q)-M*b-_*b-M*X))-(Y=P-(E=(_=I-(M=(y=n*I)-(y-I)))*(X=k-(b=(y=n*k)-(y-k)))-((S=I*k)-M*b-_*b-M*X))),i[0]=P-(Y+v)+(v-E),v=(w=F-((B=F+Y)-(v=B-F))+(Y-v))-(Y=w-S),i[1]=w-(Y+v)+(v-S),v=(A=B+Y)-B,i[2]=B-(A-v)+(Y-v),i[3]=A;let L=function(t,n){let e=n[0];for(let r=1;r<4;r++)e+=n[r];return e}(0,i),T=22204460492503146e-32*m;if(L>=T||-L>=T)return L;if(p=t-(j+(v=t-j))+(v-f),g=l-(k+(v=l-k))+(v-f),d=r-(I+(v=r-I))+(v-c),x=u-(q+(v=u-q))+(v-c),0===p&&0===d&&0===g&&0===x)return L;if(T=11093356479670487e-47*m+33306690738754706e-32*Math.abs(L),(L+=j*x+q*p-(I*g+k*d))>=T||-L>=T)return L;v=(P=(_=p-(M=(y=n*p)-(y-p)))*(X=q-(b=(y=n*q)-(y-q)))-((F=p*q)-M*b-_*b-M*X))-(Y=P-(E=(_=d-(M=(y=n*d)-(y-d)))*(X=k-(b=(y=n*k)-(y-k)))-((S=d*k)-M*b-_*b-M*X))),s[0]=P-(Y+v)+(v-E),v=(w=F-((B=F+Y)-(v=B-F))+(Y-v))-(Y=w-S),s[1]=w-(Y+v)+(v-S),v=(A=B+Y)-B,s[2]=B-(A-v)+(Y-v),s[3]=A;const C=e(4,i,4,s,o);v=(P=(_=j-(M=(y=n*j)-(y-j)))*(X=x-(b=(y=n*x)-(y-x)))-((F=j*x)-M*b-_*b-M*X))-(Y=P-(E=(_=I-(M=(y=n*I)-(y-I)))*(X=g-(b=(y=n*g)-(y-g)))-((S=I*g)-M*b-_*b-M*X))),s[0]=P-(Y+v)+(v-E),v=(w=F-((B=F+Y)-(v=B-F))+(Y-v))-(Y=w-S),s[1]=w-(Y+v)+(v-S),v=(A=B+Y)-B,s[2]=B-(A-v)+(Y-v),s[3]=A;const J=e(C,o,4,s,a);return v=(P=(_=p-(M=(y=n*p)-(y-p)))*(X=x-(b=(y=n*x)-(y-x)))-((F=p*x)-M*b-_*b-M*X))-(Y=P-(E=(_=d-(M=(y=n*d)-(y-d)))*(X=g-(b=(y=n*g)-(y-g)))-((S=d*g)-M*b-_*b-M*X))),s[0]=P-(Y+v)+(v-E),v=(w=F-((B=F+Y)-(v=B-F))+(Y-v))-(Y=w-S),s[1]=w-(Y+v)+(v-S),v=(A=B+Y)-B,s[2]=B-(A-v)+(Y-v),s[3]=A,h[e(J,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={})}),x=t.__commonJSMin((n,e)=>{var r=l(),i=(c(),t.__toCommonJS(u)),o=d(),a=g().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&&v(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&&v(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=_(f,h),l.push(h)}var c=new r(16);for(u=0;u<l.length;u++)c.insert(M(l[u]));for(var m=n*n,p=e*e;l.length;){var d=l.shift(),g=d.p,x=d.next.p,y=b(g,x);if(!(y<p)){var X=y/m;(f=s(a,d.prev.p,g,x,d.next.next.p,X,c))&&Math.min(b(f,g),b(f,x))<=X&&(l.push(d),l.push(_(f,d)),a.remove(f),c.remove(d),c.insert(M(d)),c.insert(M(d.next)))}}d=h;var Y=[];do{Y.push(d.p),d=d.next}while(d!==h);return Y.push(d.p),Y}function s(t,n,e,r,o,a,h){for(var s=new i([],f),l=t.data;l;){for(var u=0;u<l.children.length;u++){var c=l.children[u],p=l.leaf?X(c,e,r):m(e,r,c);p>a||s.push({node:c,dist:p})}for(;s.length&&!s.peek().node.children;){var d=s.pop(),g=d.node,v=X(g,n,e),y=X(g,r,o);if(d.dist<v&&d.dist<y&&x(e,g,h)&&x(r,g,h))return g}(l=s.pop())&&(l=l.node)}return null}function f(t,n){return t.dist-n.dist}function m(t,n,e){if(p(t,e)||p(n,e))return 0;var r=Y(t[0],t[1],n[0],n[1],e.minX,e.minY,e.maxX,e.minY);if(0===r)return 0;var i=Y(t[0],t[1],n[0],n[1],e.minX,e.minY,e.minX,e.maxY);if(0===i)return 0;var o=Y(t[0],t[1],n[0],n[1],e.maxX,e.minY,e.maxX,e.maxY);if(0===o)return 0;var a=Y(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 p(t,n){return t[0]>=n.minX&&t[0]<=n.maxX&&t[1]>=n.minY&&t[1]<=n.maxY}function x(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(y(h[s].p,h[s].next.p,t,n))return!1;return!0}function v(t,n,e){return a(t[0],t[1],n[0],n[1],e[0],e[1])}function y(t,n,e,r){return t!==r&&n!==e&&v(t,n,e)>0!=v(t,n,r)>0&&v(e,r,t)>0!=v(e,r,n)>0}function M(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 _(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 b(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 Y(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,x=n-o,v=c*c+m*m,y=c*p+m*d,M=p*p+d*d,_=c*g+m*x,b=p*g+d*x,X=v*M-y*y,Y=X,B=X;0===X?(l=0,Y=1,f=b,B=M):(f=v*b-y*_,(l=y*b-M*_)<0?(l=0,f=b,B=M):l>Y&&(l=Y,f=b+y,B=M)),f<0?(f=0,-_<0?l=0:-_>v?l=Y:(l=-_,Y=v)):f>B&&(f=B,-_+y<0?l=0:-_+y>v?l=Y:(l=-_+y,Y=v));var w=(1-(u=0===f?0:f/B))*i+u*a-((1-(s=0===l?0:l/Y))*t+s*e),F=(1-u)*o+u*h-((1-s)*n+s*r);return w*w+F*F}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}),v=t.__toESM(x(),1),y=function(t,n={}){n.concavity=n.concavity||1/0;const e=[];if(h(t,t=>{e.push([t[0],t[1]])}),!e.length)return null;const r=(0,v.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 i({type:"Polygon",coordinates:t},n,e)}([r]):null},M=t=>"number"==typeof t.x&&"number"==typeof t.y?[t.x,t.y]:null,_=({folderId:t})=>{const{folders:i,organization:a}=e.useSession(),h=n.A({}),[s,l]=n.d(()=>t??null);n.y(()=>{l(t??null)},[t]);const u=n.T(()=>a?.integrationSettings?.enableFolderView&&i?.filter(t=>(t.parentFolderId??null)===s&&t.boundary?.length>=1)||[],[i,s,a?.integrationSettings?.enableFolderView]),f=e.useQuery({queryKey:["public-events-map-leaf",a?._id,a?.integrationSettings?.enableFolderView,s??"root"],queryFn:async()=>{const t=s?{folderId:s,limit:500,sort:"-views",contentLimit:3}:a?.integrationSettings?.enableFolderView?{limit:500,sort:"-views",contentLimit:3}:{includeAllFolders:!0,limit:500,sort:"-views",contentLimit:3};return(await e.ky.get(e.API_ROUTES.PUBLIC_EVENTS,{headers:{"x-org-id":a?._id??""},searchParams:t}).json()).data??[]},enabled:Boolean(a?._id),staleTime:3e5,retry:!1}),c=f.isLoading||f.isFetching,m=f.data?.filter(t=>"number"==typeof t?.location?.x&&"number"==typeof t?.location?.y)??[],p=n.T(()=>u.map(t=>((t,n)=>{const e=t.boundary?.map(M).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 a;if(e?.length){const t=e?.map(t=>o(t));if(t&&t.length>=3){const n=y(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&&(a=n.geometry)}}if(!a&&e&&e.length>0&&(a={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]}),!a)return null;const h={type:"Feature",id:t._id,properties:{folderId:t._id,name:t.name,eventCount:t.boundary?.length||0,isFolderPoint:"Point"===a.type},geometry:a};return n[t._id]={hash:r,feature:h},h})(t,h.current)).filter(t=>Boolean(t)),[u]),d=n.T(()=>({type:"FeatureCollection",features:p}),[p]),g=n.T(()=>i?.find(t=>t._id===s)??null,[i,s]),x=n.T(()=>s&&i?r.getBreadcrumbFromFlatFolders(i,s):[],[i,s]),v=n.T(()=>(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)]})(d),[d]);return{activeFolderId:s,visibleFolders:u,visibleEvents:m,folderFeatures:p,folderFeatureCollection:d,breadcrumb:x,isLoadingEvents:c,isBusy:c,setActiveFolderId:t=>{l(t)},goBack:()=>{g&&l(g.parentFolderId??null)},activeFolder:g,folderBounds:v}};Object.defineProperty(exports,"useHierarchicalMap",{enumerable:!0,get:function(){return _}});
|
|
1
|
+
const t=require("./BLzjjF3u.js"),n=require("./BSo7livb.js"),e=require("./CQPNrnGa.js"),r=require("./DnZjfS5P.js");function i(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 o(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(!a(t[0])||!a(t[1]))throw new Error("coordinates must contain numbers");return i({type:"Point",coordinates:t},n,e)}function a(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function h(t,n,e){if(null!==t)for(var r,i,o,a,s,l,u,f,c=0,m=0,p=t.type,d="FeatureCollection"===p,g="Feature"===p,x=d?t.features.length:1,v=0;v<x;v++){s=(f=!!(u=d?t.features[v].geometry:g?t.geometry:t)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var y=0;y<s;y++){var M=0,_=0;if(null!==(a=f?u.geometries[y]:u)){l=a.coordinates;var X=a.type;switch(c=!e||"Polygon"!==X&&"MultiPolygon"!==X?0:1,X){case null:break;case"Point":if(!1===n(l,m,v,M,_))return!1;m++,M++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===n(l[r],m,v,M,_))return!1;m++,"MultiPoint"===X&&M++}"LineString"===X&&M++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-c;i++){if(!1===n(l[r][i],m,v,M,_))return!1;m++}"MultiLineString"===X&&M++,"Polygon"===X&&_++}"Polygon"===X&&M++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(_=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-c;o++){if(!1===n(l[r][i][o],m,v,M,_))return!1;m++}_++}M++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===h(a.geometries[r],n,e))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}Math.PI;var s,l=t.__commonJSMin((t,n)=>{var e,r;e=t,r=function(){"use strict";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),x=(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)),v=u(d)+u(g);x<c?(c=x,r=p,m=v<m?v:m):x===c&&v<m&&(m=v,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()}),u=t.__exportAll({default:()=>s});function f(t,n){return t<n?-1:t>n?1:0}var c=t.__esmMin(()=>{s=class{constructor(t=[],n=f){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}}}),m=t.__commonJSMin((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}}),p=t.__commonJSMin((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}}),d=t.__commonJSMin((t,n)=>{var e=m(),r=p();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}),g=t.__commonJSMin((t,n)=>{var e,r;e=t,r=function(t){"use strict";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,x,v,y,M,_,X,Y,b,B,w,P,F,E,S,A;const j=t-f,k=l-f,I=r-c,q=u-c;v=(F=(_=j-(M=(y=n*j)-(y-j)))*(Y=q-(X=(y=n*q)-(y-q)))-((P=j*q)-M*X-_*X-M*Y))-(b=F-(S=(_=I-(M=(y=n*I)-(y-I)))*(Y=k-(X=(y=n*k)-(y-k)))-((E=I*k)-M*X-_*X-M*Y))),i[0]=F-(b+v)+(v-S),v=(w=P-((B=P+b)-(v=B-P))+(b-v))-(b=w-E),i[1]=w-(b+v)+(v-E),v=(A=B+b)-B,i[2]=B-(A-v)+(b-v),i[3]=A;let L=function(t,n){let e=n[0];for(let r=1;r<4;r++)e+=n[r];return e}(0,i),T=22204460492503146e-32*m;if(L>=T||-L>=T)return L;if(p=t-(j+(v=t-j))+(v-f),g=l-(k+(v=l-k))+(v-f),d=r-(I+(v=r-I))+(v-c),x=u-(q+(v=u-q))+(v-c),0===p&&0===d&&0===g&&0===x)return L;if(T=11093356479670487e-47*m+33306690738754706e-32*Math.abs(L),(L+=j*x+q*p-(I*g+k*d))>=T||-L>=T)return L;v=(F=(_=p-(M=(y=n*p)-(y-p)))*(Y=q-(X=(y=n*q)-(y-q)))-((P=p*q)-M*X-_*X-M*Y))-(b=F-(S=(_=d-(M=(y=n*d)-(y-d)))*(Y=k-(X=(y=n*k)-(y-k)))-((E=d*k)-M*X-_*X-M*Y))),s[0]=F-(b+v)+(v-S),v=(w=P-((B=P+b)-(v=B-P))+(b-v))-(b=w-E),s[1]=w-(b+v)+(v-E),v=(A=B+b)-B,s[2]=B-(A-v)+(b-v),s[3]=A;const C=e(4,i,4,s,o);v=(F=(_=j-(M=(y=n*j)-(y-j)))*(Y=x-(X=(y=n*x)-(y-x)))-((P=j*x)-M*X-_*X-M*Y))-(b=F-(S=(_=I-(M=(y=n*I)-(y-I)))*(Y=g-(X=(y=n*g)-(y-g)))-((E=I*g)-M*X-_*X-M*Y))),s[0]=F-(b+v)+(v-S),v=(w=P-((B=P+b)-(v=B-P))+(b-v))-(b=w-E),s[1]=w-(b+v)+(v-E),v=(A=B+b)-B,s[2]=B-(A-v)+(b-v),s[3]=A;const J=e(C,o,4,s,a);return v=(F=(_=p-(M=(y=n*p)-(y-p)))*(Y=x-(X=(y=n*x)-(y-x)))-((P=p*x)-M*X-_*X-M*Y))-(b=F-(S=(_=d-(M=(y=n*d)-(y-d)))*(Y=g-(X=(y=n*g)-(y-g)))-((E=d*g)-M*X-_*X-M*Y))),s[0]=F-(b+v)+(v-S),v=(w=P-((B=P+b)-(v=B-P))+(b-v))-(b=w-E),s[1]=w-(b+v)+(v-E),v=(A=B+b)-B,s[2]=B-(A-v)+(b-v),s[3]=A,h[e(J,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={})}),x=t.__commonJSMin((n,e)=>{var r=l(),i=(c(),t.__toCommonJS(u)),o=d(),a=g().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&&v(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&&v(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=_(f,h),l.push(h)}var c=new r(16);for(u=0;u<l.length;u++)c.insert(M(l[u]));for(var m=n*n,p=e*e;l.length;){var d=l.shift(),g=d.p,x=d.next.p,y=X(g,x);if(!(y<p)){var Y=y/m;(f=s(a,d.prev.p,g,x,d.next.next.p,Y,c))&&Math.min(X(f,g),X(f,x))<=Y&&(l.push(d),l.push(_(f,d)),a.remove(f),c.remove(d),c.insert(M(d)),c.insert(M(d.next)))}}d=h;var b=[];do{b.push(d.p),d=d.next}while(d!==h);return b.push(d.p),b}function s(t,n,e,r,o,a,h){for(var s=new i([],f),l=t.data;l;){for(var u=0;u<l.children.length;u++){var c=l.children[u],p=l.leaf?Y(c,e,r):m(e,r,c);p>a||s.push({node:c,dist:p})}for(;s.length&&!s.peek().node.children;){var d=s.pop(),g=d.node,v=Y(g,n,e),y=Y(g,r,o);if(d.dist<v&&d.dist<y&&x(e,g,h)&&x(r,g,h))return g}(l=s.pop())&&(l=l.node)}return null}function f(t,n){return t.dist-n.dist}function m(t,n,e){if(p(t,e)||p(n,e))return 0;var r=b(t[0],t[1],n[0],n[1],e.minX,e.minY,e.maxX,e.minY);if(0===r)return 0;var i=b(t[0],t[1],n[0],n[1],e.minX,e.minY,e.minX,e.maxY);if(0===i)return 0;var o=b(t[0],t[1],n[0],n[1],e.maxX,e.minY,e.maxX,e.maxY);if(0===o)return 0;var a=b(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 p(t,n){return t[0]>=n.minX&&t[0]<=n.maxX&&t[1]>=n.minY&&t[1]<=n.maxY}function x(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(y(h[s].p,h[s].next.p,t,n))return!1;return!0}function v(t,n,e){return a(t[0],t[1],n[0],n[1],e[0],e[1])}function y(t,n,e,r){return t!==r&&n!==e&&v(t,n,e)>0!=v(t,n,r)>0&&v(e,r,t)>0!=v(e,r,n)>0}function M(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 _(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 X(t,n){var e=t[0]-n[0],r=t[1]-n[1];return e*e+r*r}function Y(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 b(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,x=n-o,v=c*c+m*m,y=c*p+m*d,M=p*p+d*d,_=c*g+m*x,X=p*g+d*x,Y=v*M-y*y,b=Y,B=Y;0===Y?(l=0,b=1,f=X,B=M):(f=v*X-y*_,(l=y*X-M*_)<0?(l=0,f=X,B=M):l>b&&(l=b,f=X+y,B=M)),f<0?(f=0,-_<0?l=0:-_>v?l=b:(l=-_,b=v)):f>B&&(f=B,-_+y<0?l=0:-_+y>v?l=b:(l=-_+y,b=v));var w=(1-(u=0===f?0:f/B))*i+u*a-((1-(s=0===l?0:l/b))*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}),v=t.__toESM(x(),1),y=function(t,n={}){n.concavity=n.concavity||1/0;const e=[];if(h(t,t=>{e.push([t[0],t[1]])}),!e.length)return null;const r=(0,v.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 i({type:"Polygon",coordinates:t},n,e)}([r]):null},M=t=>"number"==typeof t.x&&"number"==typeof t.y?[t.x,t.y]:null,_=({folderId:t})=>{const{folders:i,organization:a}=e.useSession(),h=n.A({}),[s,l]=n.d(()=>t??null),u=Boolean(a?.integrationSettings?.enableFolderView);n.y(()=>{l(t??null)},[t]);const f=n.T(()=>u&&i?.filter(t=>(t.parentFolderId??null)===s&&t.boundary?.length>=1)||[],[i,s,u]),c=e.useQuery({queryKey:["public-events-map-leaf",a?._id,u,s??"root"],queryFn:async()=>{const t=s?{folderId:s,limit:500,sort:"-views",contentLimit:3}:u?{limit:500,sort:"-views",contentLimit:3}:{includeAllFolders:!0,limit:500,sort:"-views",contentLimit:3};return(await e.ky.get(e.API_ROUTES.PUBLIC_EVENTS,{headers:{"x-org-id":a?._id??""},searchParams:t}).json()).data??[]},enabled:Boolean(a?._id),staleTime:3e5,retry:!1}),m=c.isLoading||c.isFetching,p=c.data?.filter(t=>"number"==typeof t?.location?.x&&"number"==typeof t?.location?.y)??[],d=n.T(()=>f.map(t=>((t,n)=>{const e=t.boundary?.map(M).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 a;if(e?.length){const t=e?.map(t=>o(t));if(t&&t.length>=3){const n=y(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&&(a=n.geometry)}}if(!a&&e&&e.length>0&&(a={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]}),!a)return null;const h={type:"Feature",id:t._id,properties:{folderId:t._id,name:t.name,color:t.color,eventCount:t.boundary?.length||0,isFolderPoint:"Point"===a.type},geometry:a};return n[t._id]={hash:r,feature:h},h})(t,h.current)).filter(t=>Boolean(t)),[f]),g=n.T(()=>({type:"FeatureCollection",features:d}),[d]),x=n.T(()=>i?.find(t=>t._id===s)??null,[i,s]),v=n.T(()=>s&&i?r.getBreadcrumbFromFlatFolders(i,s):[],[i,s]),_=n.T(()=>(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)]})(g),[g]);return{isFolderViewEnabled:u,activeFolderId:s,visibleFolders:f,visibleEvents:p,folderFeatures:d,folderFeatureCollection:g,breadcrumb:v,isLoadingEvents:m,isBusy:m,setActiveFolderId:t=>{l(t)},goBack:()=>{x&&l(x.parentFolderId??null)},activeFolder:x,folderBounds:_}};Object.defineProperty(exports,"useHierarchicalMap",{enumerable:!0,get:function(){return _}});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{A as t,E as e,M as i,S as s,T as o,f as n,j as a,m as r,n as l,p as c,v as h,y as d}from"./Cpox5nFJ.js";import{M as p,l as u,m,n as f,o as g,r as y,s as _}from"./Cg32CQgw.js";import{t as v}from"./DpB434fd.js";import b,{createElement as x,forwardRef as w,isValidElement as T,useEffect as S,useLayoutEffect as P,useRef as I,useState as z}from"react";var C=Object.freeze({left:0,top:0,width:16,height:16}),L=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),k=Object.freeze({...C,...L}),A=Object.freeze({...k,body:"",hidden:!1});function O(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 A)s in L?s in t&&!(s in i)&&(i[s]=L[s]):s in e?i[s]=e[s]:s in t&&(i[s]=t[s]);return i}function E(t,e,i){const s=t.icons,o=t.aliases||Object.create(null);let n={};function a(t){n=O(s[t]||o[t],n)}return a(e),i.forEach(a),O(t,n)}function Z(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(o){if(e[o])return s[o]=[];if(!(o in s)){s[o]=null;const e=i[o]&&i[o].parent,n=e&&t(e);n&&(s[o]=[e].concat(n))}return s[o]}),s}(t);for(const o in s){const n=s[o];n&&(e(o,E(t,o,n)),i.push(o))}return i}var D={provider:"",aliases:{},not_found:{},...C};function F(t,e){for(const i in e)if(i in t&&typeof t[i]!=typeof e[i])return!1;return!0}function M(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(!F(t,D))return null;const i=e.icons;for(const o in i){const t=i[o];if(!o||"string"!=typeof t.body||!F(t,A))return null}const s=e.aliases||Object.create(null);for(const o in s){const t=s[o],e=t.parent;if(!o||"string"!=typeof e||!i[e]&&!s[e]||!F(t,A))return null}return e}var N=Object.create(null);function B(t,e){const i=N[t]||(N[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 R(t,e){return M(e)?Z(e,(e,i)=>{i?t.icons[e]=i:t.missing.add(e)}):[]}var j=/^[a-z0-9]+(-[a-z0-9]+)*$/,H=(t,e,i,s="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),i=o.pop(),n={provider:o.length>0?o[0]:s,prefix:i,name:t};return e&&!W(n)?null:n}const n=o[0],a=n.split("-");if(a.length>1){const t={provider:s,prefix:a.shift(),name:a.join("-")};return e&&!W(t)?null:t}if(i&&""===s){const t={provider:s,prefix:"",name:n};return e&&!W(t,i)?null:t}return null},W=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),$=!1;function V(t){return"boolean"==typeof t&&($=t),$}function q(t){const e="string"==typeof t?H(t,!0,$):t;if(e){const t=B(e.provider,e.prefix),i=e.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}var U=Object.freeze({width:null,height:null}),G=Object.freeze({...U,...L}),X=/(-?[0-9.]*[0-9]+[0-9.]*)/g,K=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Y(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(X);if(null===s||!s.length)return t;const o=[];let n=s.shift(),a=K.test(n);for(;;){if(a){const t=parseFloat(n);isNaN(t)?o.push(n):o.push(Math.ceil(t*e*i)/i)}else o.push(n);if(n=s.shift(),void 0===n)return o.join("");a=!a}}var Q=/\sid="(\S+)"/g,J="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),tt=0;function et(t,e=J){const i=[];let s;for(;s=Q.exec(t);)i.push(s[1]);if(!i.length)return t;const o="suffix"+(16777216*Math.random()|Date.now()).toString(16);return i.forEach(i=>{const s="function"==typeof e?e(i):e+(tt++).toString(),n=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),t=t.replace(new RegExp(o,"g"),"")}var it=Object.create(null);function st(t){return it[t]||it[""]}function ot(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 nt=Object.create(null),at=["https://api.simplesvg.com","https://api.unisvg.com"],rt=[];at.length>0;)1===at.length||Math.random()>.5?rt.push(at.shift()):rt.push(at.pop());function lt(t,e){const i=ot(e);return null!==i&&(nt[t]=i,!0)}function ct(t){return nt[t]}nt[""]=ot({resources:["https://api.iconify.design"].concat(rt)});var ht=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(e){}})(),dt={prepare:(t,e,i)=>{const s=[],o=function(t,e){const i=ct(t);if(!i)return 0;let s;if(i.maxURL){let t=0;i.resources.forEach(e=>{t=Math.max(t,e.length)});const o=e+".json?icons=";s=i.maxURL-t-i.path.length-o.length}else s=0;return s}(t,e),n="icons";let a={type:n,provider:t,prefix:e,icons:[]},r=0;return i.forEach((i,l)=>{r+=i.length+1,r>=o&&l>0&&(s.push(a),a={type:n,provider:t,prefix:e,icons:[]},r=i.length),a.icons.push(i)}),s.push(a),s},send:(t,e,i)=>{if(!ht)return void i("abort",424);let s=function(t){if("string"==typeof t){const e=ct(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 o=503;ht(t+s).then(t=>{const e=t.status;if(200===e)return o=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",o)})}).catch(()=>{i("next",o)})}};function pt(t,e){t.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(t=>t.id!==e))})}var ut=0,mt={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ft(t){const e={...mt,...t};let i=[];function s(){i=i.filter(t=>"pending"===t().status)}return{query:function(t,o,n){const a=function(t,e,i,s){const o=t.resources.length,n=t.random?Math.floor(Math.random()*o):t.index;let a;if(t.random){let e=t.resources.slice(0);for(a=[];e.length>1;){const t=Math.floor(Math.random()*e.length);a.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}a=a.concat(e)}else a=t.resources.slice(n).concat(t.resources.slice(0,n));const r=Date.now();let l,c="pending",h=0,d=null,p=[],u=[];function m(){d&&(clearTimeout(d),d=null)}function f(){"pending"===c&&(c="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 y(){c="failed",u.forEach(t=>{t(void 0,l)})}function _(){p.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),p=[]}return"function"==typeof s&&u.push(s),setTimeout(function s(){if("pending"!==c)return;m();const o=a.shift();if(void 0===o)return p.length?void(d=setTimeout(()=>{m(),"pending"===c&&(_(),y())},t.timeout)):void y();const n={status:"pending",resource:o,callback:(e,i)=>{!function(e,i,o){const n="success"!==i;switch(p=p.filter(t=>t!==e),c){case"pending":break;case"failed":if(n||!t.dataAfterTimeout)return;break;default:return}if("abort"===i)return l=o,void y();if(n)return l=o,void(p.length||(a.length?s():y()));if(m(),_(),!t.random){const i=t.resources.indexOf(e.resource);-1!==i&&i!==t.index&&(t.index=i)}c="completed",u.forEach(t=>{t(o)})}(n,e,i)}};p.push(n),h++,d=setTimeout(s,t.rotate),i(o,e,n.callback)}),function(){return{startTime:r,payload:e,status:c,queriesSent:h,queriesPending:p.length,subscribe:g,abort:f}}}(e,t,o,(t,e)=>{s(),n&&n(t,e)});return i.push(a),a},find:function(t){return i.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:s}}function gt(){}var yt=Object.create(null);function _t(){}function vt(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(!R(t,i).length)return void s()}catch(o){console.error(o)}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,o=t.prefix;e.forEach(e=>{const n=e.icons,a=n.pending.length;n.pending=n.pending.filter(e=>{if(e.prefix!==o)return!0;const a=e.name;if(t.icons[a])n.loaded.push({provider:s,prefix:o,name:a});else{if(!t.missing.has(a))return i=!0,!0;n.missing.push({provider:s,prefix:o,name:a})}return!1}),n.pending.length!==a&&(i||pt([t],e.id),e.callback(n.loaded.slice(0),n.missing.slice(0),n.pending.slice(0),e.abort))})}))}(t)}))}(t)}function bt(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}function xt(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 o=t.loadIcon;if(t.loadIcons&&(s.length>1||!o))return void bt(t.loadIcons(s,i,e),e=>{vt(t,s,e)});if(o)return void s.forEach(s=>{bt(o(s,i,e),e=>{vt(t,[s],e?{prefix:i,icons:{[s]:e}}:null)})});const{valid:n,invalid:a}=function(t){const e=[],i=[];return t.forEach(t=>{(t.match(j)?e:i).push(t)}),{valid:e,invalid:i}}(s);if(a.length&&vt(t,a,null),!n.length)return;const r=i.match(j)?st(e):null;r?r.prepare(e,i,n).forEach(i=>{!function(t,e,i){let s,o;if("string"==typeof t){const e=st(t);if(!e)return i(void 0,424),gt;o=e.send;const n=function(t){if(!yt[t]){const e=ct(t);if(!e)return;yt[t]={config:e,redundancy:ft(e)}}return yt[t]}(t);n&&(s=n.redundancy)}else{const e=ot(t);if(e){s=ft(e);const i=st(t.resources?t.resources[0]:"");i&&(o=i.send)}}s&&o?s.query(e,o,i)().abort:i(void 0,424)}(e,i,e=>{vt(t,i.icons,e)})}):vt(t,n,null)}))}var wt,Tt=(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 o=t.provider,n=t.prefix,a=t.name,r=i[o]||(i[o]=Object.create(null)),l=r[n]||(r[n]=B(o,n));let c;c=a in l.icons?e.loaded:""===n||l.missing.has(a)?e.missing:e.pending;const h={provider:o,prefix:n,name:a};c.push(h)}),e}(function(t,e=!0,i=!1){const s=[];return t.forEach(t=>{const o="string"==typeof t?H(t,e,i):t;o&&s.push(o)}),s}(t,!0,V()));if(!i.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(i.loaded,i.missing,i.pending,_t)}),()=>{t=!1}}const s=Object.create(null),o=[];let n,a;return i.pending.forEach(t=>{const{provider:e,prefix:i}=t;if(i===a&&e===n)return;n=e,a=i,o.push(B(e,i));const r=s[e]||(s[e]=Object.create(null));r[i]||(r[i]=[])}),i.pending.forEach(t=>{const{provider:e,prefix:i,name:o}=t,n=B(e,i),a=n.pendingIcons||(n.pendingIcons=/* @__PURE__ */new Set);a.has(o)||(a.add(o),s[e][i].push(o))}),o.forEach(t=>{const e=s[t.provider][t.prefix];e.length&&xt(t,e)}),e?function(t,e,i){const s=ut++,o=pt.bind(null,i,s);if(!e.pending.length)return o;const n={id:s,icons:e,callback:t,abort:o};return i.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(n)}),o}(e,i,o):_t},St=/[\s,]+/;function Pt(t,e){e.split(St).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}})}function It(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 o=parseFloat(t.slice(0,t.length-i.length));return isNaN(o)?0:(o/=e,o%1==0?s(o):0)}}return e}function zt(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 Ct={...G,inline:!1},Lt={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},kt={display:"inline-block"},At={backgroundColor:"currentColor"},Ot={backgroundColor:"transparent"},Et={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Zt={WebkitMask:At,mask:At,background:Ot};for(const Mi in Zt){const t=Zt[Mi];for(const e in Et)t[Mi+e]=Et[e]}var Dt={...Ct,inline:!0};function Ft(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}var Mt;if(V(!0),Mt=dt,it[""]=Mt,"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||""),$&&!e&&!t.prefix){let e=!1;return M(t)&&(t.prefix="",Z(t,(t,s)=>{(function(t,e){const s=H(t,!0,$);if(!s)return!1;const o=B(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}(o,s.name,e):(o.missing.add(s.name),!0)})(t,s)&&(e=!0)})),e}const s=t.prefix;return!!W({prefix:s,name:"a"})&&!!R(B(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;lt(t,s)||console.error(i)}catch(Fi){console.error(i)}}}}function Nt(t){const[e,i]=z(!!t.ssr),[s,o]=z({}),[n,a]=z(function(e){if(e){const e=t.icon;if("object"==typeof e)return{name:"",data:e};const i=q(e);if(i)return{name:e,data:i}}return{name:""}}(!!t.ssr));function r(){const t=s.callback;t&&(t(),o({}))}function l(t){if(JSON.stringify(n)!==JSON.stringify(t))return r(),a(t),!0}function c(){var e;const i=t.icon;if("object"==typeof i)return void l({name:"",data:i});const s=q(i);l({name:i,data:s})&&(void 0===s?o({callback:Tt([i],c)}):s&&(null===(e=t.onLoad)||void 0===e||e.call(t,i)))}S(()=>(i(!0),r),[]),S(()=>{e&&c()},[t.icon,e]);const{name:h,data:d}=n;return d?((t,e,i)=>{const s=e.inline?Dt:Ct,o=function(t,e){const i={...t};for(const s in e){const t=e[s],o=typeof t;s in U?(null===t||t&&("string"===o||"number"===o))&&(i[s]=t):o===typeof i[s]&&(i[s]="rotate"===s?t%4:t)}return i}(s,e),n=e.mode||"svg",a={},r=e.style||{},l={..."svg"===n?Lt:{}};if(i){const t=H(i,!1,!0);if(t){const e=["iconify"];for(const i of["provider","prefix"])t[i]&&e.push("iconify--"+t[i]);l.className=e.join(" ")}}for(let y in e){const t=e[y];if(void 0!==t)switch(y){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":l.ref=t;break;case"className":l[y]=(l[y]?l[y]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":o[y]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&Pt(o,t);break;case"color":a.color=t;break;case"rotate":"string"==typeof t?o[y]=It(t):"number"==typeof t&&(o[y]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete l["aria-hidden"];break;default:void 0===s[y]&&(l[y]=t)}}const c=function(t,e){const i={...k,...t},s={...G,...e},o={left:i.left,top:i.top,width:i.width,height:i.height};let n=i.body;[i,s].forEach(t=>{const e=[],i=t.hFlip,s=t.vFlip;let a,r=t.rotate;switch(i?s?r+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):s&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0),r<0&&(r-=4*Math.floor(r/4)),r%=4,r){case 1:a=o.height/2+o.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:a=o.width/2+o.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}r%2==1&&(o.left!==o.top&&(a=o.left,o.left=o.top,o.top=a),o.width!==o.height&&(a=o.width,o.width=o.height,o.height=a)),e.length&&(n=function(t,e){const i=function(t,e="defs"){let i="";const s=t.indexOf("<"+e);for(;s>=0;){const o=t.indexOf(">",s),n=t.indexOf("</"+e);if(-1===o||-1===n)break;const a=t.indexOf(">",n);if(-1===a)break;i+=t.slice(o+1,n).trim(),t=t.slice(0,s).trim()+t.slice(a+1)}return{defs:i,content:t}}(t);return s=i.defs,o=e+i.content+"</g>",s?"<defs>"+s+"</defs>"+o:o;var s,o}(n,'<g transform="'+e.join(" ")+'">'))});const a=s.width,r=s.height,l=o.width,c=o.height;let h,d;null===a?(d=null===r?"1em":"auto"===r?c:r,h=Y(d,l/c)):(h="auto"===a?l:a,d=null===r?Y(h,c/l):"auto"===r?c:r);const p={},u=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};u("width",h),u("height",d);const m=[o.left,o.top,l,c];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:n}}(t,o),h=c.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),"svg"===n){l.style={...a,...r},Object.assign(l,h);let t=0,i=e.id;return"string"==typeof i&&(i=i.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:zt(et(c.body,i?()=>i+"ID"+t++:"iconifyReact"))},x("svg",l)}const{body:d,width:p,height:u}=t,m="mask"===n||"bg"!==n&&-1!==d.indexOf("currentColor"),f=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>"}(d,{...h,width:p+"",height:u+""});var g;return l.style={...a,"--svg":(g=f,'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)}(g)+'")'),width:Ft(h.width),height:Ft(h.height),...kt,...m?At:Ot,...r},x("span",l)})({...k,...d},t,h):t.children?t.children:t.fallback?t.fallback:x("span",{})}var Bt=w((t,e)=>Nt({...t,_ref:e})),Rt=(w((t,e)=>Nt({inline:!0,...t,_ref:e})),t=>"boolean"==typeof t?`${t}`:0===t?"0":t),jt=r,Ht=(t,e)=>i=>{var s;if(null==(null==e?void 0:e.variants))return jt(t,null==i?void 0:i.class,null==i?void 0:i.className);const{variants:o,defaultVariants:n}=e,a=Object.keys(o).map(t=>{const e=null==i?void 0:i[t],s=null==n?void 0:n[t];if(null===e)return null;const a=Rt(e)||Rt(s);return o[t][a]}),r=i&&Object.entries(i).reduce((t,e)=>{let[i,s]=e;return void 0===s||(t[i]=s),t},{});return jt(t,a,null==e||null===(s=e.compoundVariants)||void 0===s?void 0:s.reduce((t,e)=>{let{class:i,className:s,...o}=e;return Object.entries(o).every(t=>{let[e,i]=t;return Array.isArray(i)?i.includes({...n,...r}[e]):{...n,...r}[e]===i})?[...t,i,s]:t},[]),null==i?void 0:i.class,null==i?void 0:i.className)},Wt=Ht("",{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"}}),$t=({className:t,color:e="foreground",size:i="md",variant:s="default",name:o="line-md:iconify1",...a})=>/* @__PURE__ */h(Bt,{icon:o,className:n(Wt({color:e,size:i,variant:s,className:t})),...a});function Vt({children:t,asChild:e=!1,...i}){if(e){const e=Array.isArray(t)?t[0]:t;if(e&&e.type)return a(e,{...i,...e.props})}/* @__PURE__ */
|
|
2
|
+
return h("button",{...i,children:t})}var qt=Ht("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"}}),Ut=({className:t,type:e="button",disabled:i,loading:s,fullWidth:o,color:a,size:r,variant:l,icon:c,iconName:d,iconSvg:p,asChild:u=!1,immutable:m,elementRef:f,children:g,...y})=>{const _=u?Vt:"button",v=u?{asChild:!0}:{},b=p||c||(d?/* @__PURE__ */h($t,{name:d,className:"text-primary-foreground"}):null);/* @__PURE__ */
|
|
3
|
+
return h(_,{ref:f,type:e,disabled:i||s,className:n(qt({color:a,size:r,variant:l}),t,o&&"w-full"),...v,...y,children:[/* @__PURE__ */h("div",{className:n(s?"collapse":"visible flex items-center gap-3"),children:[b&&!s&&b,g]}),s&&/* @__PURE__ */h("span",{className:"icon-[eos-icons--three-dots-loading] absolute size-6"})]})},Gt={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"},Xt=Ht("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"}}),Kt=({variant:t="body1",color:e,align:i,weight:s,transform:o,lines:a,shadow:r,noWrap:l,className:c,immutable:d,...p})=>/* @__PURE__ */h(Gt[t],{className:n(Xt({variant:t,color:e,align:i,weight:s}),o,a&&a>0?`line-clamp-${a}`:void 0,r&&"drop-shadow-[0_1px_2px_rgba(0,0,0,0.5)]",l&&"truncate",c),...p,children:p.children}),Yt=async()=>{const t=await y();return"string"==typeof t?t:t?.fingerprint},Qt=()=>{const t=d(null),{props:e,sessionId:i,user:s}=f(),o=e?.organizationId,n=d(null),a=d(null),r=async(e,i)=>{if(e&&i&&(t.current||(t.current=await Yt()),t.current))try{await p.post(u.UPDATE_AD_ANALYTICS,{json:{adId:e,type:i,browserFingerprint:t.current},headers:{"x-org-id":o}})}catch(Fi){console.error(Fi)}},l=async t=>{if(i)try{await p.post(u.UPDATE_SESSION,{headers:{"x-org-id":o},json:{sessionId:i,pageViews:t}})}catch(Fi){console.error(Fi)}};return{incrementEventView:async e=>{if(e&&(t.current||(t.current=await Yt()),t.current))try{await p.post(u.INCREMENT_EVENT_VIEW,{json:{eventSlug:e,browserFingerprint:t.current},headers:{"x-org-id":o,Authorization:s?`Bearer ${s.token}`:void 0}})}catch(Fi){console.error(Fi)}},captureAdImpression:async t=>r(t,g.AD_IMPRESSION),captureAdEngagement:async t=>r(t,g.AD_ENGAGEMENT),captureAdClick:(t,e,i)=>{if(r(t,g.AD_CLICK),i)switch(e){case _.LINK:window.open(String(i),"_blank");break;case _.EMAIL:window.location.href=`mailto:${String(i)}`;break;case _.PHONE:window.location.href=`tel:${String(i)}`;break;case _.SMS:window.location.href=`sms:${String(i)}`;break;case _.WHATSAPP:window.location.href=`https://wa.me/${String(i)}`;break;case _.MESSENGER:window.location.href=`https://m.me/${String(i)}`;break;default:window.open(String(i),"_blank")}},trackPageView:t=>{n.current&&a.current&&l([{page:n.current,entryTime:a.current,exitTime:Date.now()}]),n.current=t??null,a.current=Date.now()},exportPageViewsData:l}},Jt=i(null),te=({open:t,onOpenChange:i,children:o})=>{const[n,a]=s(!!t);return e(()=>{"boolean"==typeof t&&a(t)},[t]),/* @__PURE__ */h(Jt.Provider,{value:{open:n,setOpen:t=>{a(t),i?.(t)}},children:o})},ee=({children:e})=>/* @__PURE__ */h(t,{children:e}),ie=({className:t,...e})=>/* @__PURE__ */h("div",{"data-state":o(Jt)?.open?"open":"closed",className:n("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}),se=({className:t,children:i,...s})=>{const{organization:a}=f(),r=o(Jt);return e(()=>{if(!r?.open)return;const t=t=>{"Escape"===t.key&&r.setOpen(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[r?.open]),r?.open?/* @__PURE__ */h(ee,{children:[/* @__PURE__ */h(ie,{onClick:()=>r.setOpen(!1)}),/* @__PURE__ */h("div",{role:"dialog","aria-modal":"true","data-state":r?.open?"open":"closed",className:n("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:c(a),...s,children:i})]}):null},oe=({className:t,...e})=>/* @__PURE__ */h("div",{className:n("flex flex-col space-y-1 p-3 text-center sm:text-left",t),...e}),ne=({className:t,...e})=>/* @__PURE__ */h("div",{className:n("p- flex justify-end space-x-3",t),...e}),ae=({className:t,...e})=>/* @__PURE__ */h("h2",{className:n("text-center text-lg font-semibold",t),...e}),re=({className:t,...e})=>/* @__PURE__ */h("p",{className:n("text-muted-foreground text-center text-sm",t),...e});!function(t){if("undefined"==typeof document)return;let e=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}(':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n');var le=t=>"number"==typeof t&&!isNaN(t),ce=t=>"string"==typeof t,he=t=>"function"==typeof t;function de({enter:t,exit:e,appendPosition:i=!1,collapse:s=!0,collapseDuration:o=300}){return function({children:n,position:a,preventExitTransition:r,done:l,nodeRef:c,isIn:h,playToast:d}){let p=i?`${t}--${a}`:t,u=i?`${e}--${a}`:e,m=I(0);return P(()=>{let t=c.current,e=p.split(" "),i=s=>{s.target===c.current&&(d(),t.removeEventListener("animationend",i),t.removeEventListener("animationcancel",i),0===m.current&&"animationcancel"!==s.type&&t.classList.remove(...e))};t.classList.add(...e),t.addEventListener("animationend",i),t.addEventListener("animationcancel",i)},[]),S(()=>{let t=c.current,e=()=>{t.removeEventListener("animationend",e),s?function(t,e,i=300){let{scrollHeight:s,style:o}=t;requestAnimationFrame(()=>{o.minHeight="initial",o.height=s+"px",o.transition=`all ${i}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(e,i)})})}(t,l,o):l()};h||(r?e():(m.current=1,t.className+=` ${u}`,t.addEventListener("animationend",e)))},[h]),b.createElement(b.Fragment,null,n)}}var pe=1,ue=()=>""+pe++,me=/* @__PURE__ */new Map,fe=[],ge=/* @__PURE__ */new Set,ye=()=>me.size>0;function _e(t,e){me.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 ve(t){return t&&(ce(t.toastId)||le(t.toastId))?t.toastId:ue()}function be(t,e){return function(t,e){(t=>T(t)||ce(t)||he(t)||le(t))(t)&&(ye()||fe.push({content:t,options:e}),me.forEach(i=>{i.buildToast(t,e)}))}(t,e),e.toastId}function xe(t,e){return{...e,type:e&&e.type||t,toastId:ve(e)}}function we(t){return(e,i)=>be(e,xe(t,i))}function Te(t,e){return be(t,xe("default",e))}Te.loading=(t,e)=>be(t,xe("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),Te.promise=function(t,{pending:e,error:i,success:s},o){let n;e&&(n=ce(e)?Te.loading(e,o):Te.loading(e.render,{...o,...e}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},r=(t,e,i)=>{if(null==e)return void Te.dismiss(n);let s={type:t,...a,...o,data:i},r=ce(e)?{render:e}:e;return n?Te.update(n,{...s,...r}):Te(r.render,{...s,...r}),i},l=he(t)?t():t;return l.then(t=>r("success",s,t)).catch(t=>r("error",i,t)),l},Te.success=we("success"),Te.info=we("info"),Te.error=we("error"),Te.warning=we("warning"),Te.warn=Te.warning,Te.dark=(t,e)=>be(t,xe("default",{theme:"dark",...e})),Te.dismiss=function(t){!function(t){if(ye()){if(null==t||(t=>ce(t)||le(t))(t))me.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=me.get(t.containerId);e?e.removeToast(t.id):me.forEach(e=>{e.removeToast(t.id)})}}else fe=fe.filter(e=>null!=t&&e.options.toastId!==t)}(t)},Te.clearWaitingQueue=(t={})=>{me.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})},Te.isActive=function(t,e){var i;if(e)return!(null==(i=me.get(e))||!i.isToastActive(t));let s=!1;return me.forEach(e=>{e.isToastActive(t)&&(s=!0)}),s},Te.update=(t,e={})=>{let i=((t,{containerId:e})=>{var i;return null==(i=me.get(e||1))?void 0:i.toasts.get(t)})(t,e);if(i){let{props:s,content:o}=i,n={delay:100,...s,...e,toastId:e.toastId||t,updateId:ue()};n.toastId!==t&&(n.staleId=t);let a=n.render||o;delete n.render,be(a,n)}},Te.done=t=>{Te.update(t,{progress:1})},Te.onChange=function(t){return ge.add(t),()=>{ge.delete(t)}},Te.play=t=>_e(!0,t),Te.pause=t=>_e(!1,t);var Se=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),Pe=(de(Se("bounce",!0)),de(Se("slide",!0)),de(Se("zoom")),de(Se("flip")),({url:e,alt:i="",thumbnailUrl:s,blurhash:o,pswpData:n={},curateLink:a,onClick:r})=>{const c=/* @__PURE__ */h(t,{children:[/* @__PURE__ */h(v,{threshold:.1,src:s||e,blurhash:o,alt:i}),n.type===m.VIDEO&&/* @__PURE__ */h("div",{className:"absolute inset-0 top-0 left-0 flex items-center justify-center opacity-75",children:/* @__PURE__ */h("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-16 text-white lg:w-24",viewBox:"0 0 24 24",children:/* @__PURE__ */h("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__ */h("button",{className:"h-full w-full",onClick:r,children:c}):a?/* @__PURE__ */h(l,{to:a,className:"h-full w-full",children:c}):/* @__PURE__ */h("a",{href:e,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:c})});function Ie(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function ze(t,e){return t.x=e.x,t.y=e.y,void 0!==e.id&&(t.id=e.id),t}function Ce(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function Le(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 Ae(t,e,i){return Math.min(Math.max(t,e),i)}function Oe(t,e,i){let s=`translate3d(${t}px,${e||0}px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function Ee(t,e,i,s){t.style.transform=Oe(e,i,s)}function Ze(t,e,i,s){t.style.transition=e?`${e} ${i}ms ${s||"cubic-bezier(.4,0,.22,1)"}`:"none"}function De(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}var Fe="loading",Me="loaded",Ne="error";function Be(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function Re(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 o="string"==typeof t?t:e;o&&(s=Array.from(i.querySelectorAll(o)))}return s}function je(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}var He=class{constructor(t,e){if(this.element=Ie("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?(De(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Oe(0,0,t/250)):De(this.element,t,e))}destroy(){this.element?.parentNode&&this.element.remove(),this.element=null}},We=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 this.placeholder=new He(this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this),this.slide.container);this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=Ie("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=Ie("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=Fe,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=Me,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!==Me&&this.state!==Ne||this.removePlaceholder())}onError(){this.state=Ne,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===Fe,this)}isError(){return this.state===Ne}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&&(De(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!==Ne,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=Ie("pswp__error-msg","div");t.innerText=this.instance.options?.errorMsg??"",t=this.instance.applyFilters("contentErrorElement",t,this),this.element=Ie("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===Ne)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||je())?(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&&!je()?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!==Me&&this.state!==Ne||this.removePlaceholder()))}};function $e(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function Ve(t,e,i,s,o){let n=0;if(e.paddingFn)n=e.paddingFn(i,s,o)[t];else if(e.padding)n=e.padding[t];else{const i=`padding${t[0].toUpperCase()}${t.slice(1)}`;e[i]&&(n=e[i])}return Number(n)||0}function qe(t,e,i,s){return{x:e.x-Ve("left",t,e,i,s)-Ve("right",t,e,i,s),y:e.y-Ve("top",t,e,i,s)-Ve("bottom",t,e,i,s)}}var Ue=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 o=i.x/s.x,n=i.y/s.y;this.fit=Math.min(1,o<n?o:n),this.fill=Math.min(1,o>n?o:n),this.vFill=Math.min(1,n),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 Ge(t,e,i){const s=e.createContentFromData(t,i);let o;const{options:n}=e;if(n){let a;o=new Ue(n,t,-1),a=e.pswp?e.pswp.viewportSize:$e(n,e);const r=qe(n,a,t,i);o.update(s.width,s.height,r)}return s.lazyLoad(),o&&s.setDisplayedSize(Math.ceil(s.width*o.initial),Math.ceil(s.height*o.initial)),s}function Xe(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return Ge(i,e,t)}var Ke=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 o;for(o=0;o<=i[1];o++)this.loadSlideByIndex(e.currIndex+(s?o:-o));for(o=1;o<=i[0];o++)this.loadSlideByIndex(e.currIndex+(s?-o:o))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=Xe(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=[]}},Ye=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},Qe=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 Ye(t,e);return this._listeners[t]?.forEach(t=>{t.call(this,i)}),i}},Je=class extends Qe{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 We(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 o=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",o.itemData,t)}_getGalleryDOMElements(t){return this.options?.children||this.options?.childSelector?Re(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 o=["element","src","srcset","width","height","type","msrc","alt","thumbCropped"];Object.keys(i.dataset).filter(t=>t.startsWith("pswp")&&!o.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 Ge(t,this,e)}},ti=class extends Je{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Re(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(Be(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=Re(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=Re(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=[],o=typeof i.pswpModule;if("function"==typeof(n=i.pswpModule)&&n.prototype&&n.prototype.goTo)s.push(Promise.resolve(i.pswpModule));else{if("string"===o)throw new Error("pswpModule as string is no longer supported");if("function"!==o)throw new Error("pswpModule is not valid");s.push(i.pswpModule())}var n;"function"==typeof i.openPromise&&s.push(i.openPromise()),!1!==i.preloadFirstSlide&&t>=0&&(this._preloadedContent=Xe(t,this));const a=++this._uid;Promise.all(s).then(t=>{if(this.shouldOpen){const e=t[0];this._openPhotoswipe(e,a)}})}_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={},Re(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}},ei=class{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&ze(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&&(Ce(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:o}=i,n=s[t],a=this.pswp.bgOpacity<1&&"y"===t,r=n+e[t]*.995/(1-.995);if(a){const t=this._getVerticalDragRatio(n),e=this._getVerticalDragRatio(r);if(t<0&&e<-.4||t>0&&e>.4)return void this.pswp.close()}const l=o.correctPan(t,r);if(n===l)return;const c=l===r?1:.82,h=this.pswp.bgOpacity,d=l-n;this.pswp.animations.startSpring({name:`panGesture${t}`,isPan:!0,start:n,end:l,velocity:e[t],dampingRatio:c,onUpdate:e=>{if(a&&this.pswp.bgOpacity<1){const t=1-(l-e)/d;this.pswp.applyBgOpacity(Ae(h+(1-h)*t,0,1))}s[t]=Math.floor(e),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:s,isMultitouch:o}=this.gestures,{currSlide:n,mainScroll:a}=this.pswp,r=e[t]-s[t],l=a.x+r;if(!r||!n)return!1;if("x"===t&&!n.isPannable()&&!o)return a.moveTo(l,!0),!0;const{bounds:c}=n,h=n.pan[t]+r;if(this.pswp.options.allowPanToNext&&"x"===i&&"x"===t&&!o){const e=a.getCurrSlideX(),i=a.x-e,s=r>0,o=!s;if(h>c.min[t]&&s){if(c.min[t]<=this.startPan[t])return a.moveTo(l,!0),!0;this._setPanWithFriction(t,h)}else if(h<c.max[t]&&o){if(this.startPan[t]<=c.max[t])return a.moveTo(l,!0),!0;this._setPanWithFriction(t,h)}else if(0!==i){if(i>0)return a.moveTo(Math.max(l,e),!0),!0;if(i<0)return a.moveTo(Math.min(l,e),!0),!0}else this._setPanWithFriction(t,h)}else"y"===t&&(a.isShifted()||c.min.y===c.max.y)||this._setPanWithFriction(t,h);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:o,bounds:n}=s;if(n.correctPan(t,e)!==e||i){const s=Math.round(e-o[t]);o[t]+=s*(i||.35)}else o[t]=e}};function ii(t){return!!t.target.closest(".pswp__container")}var si=class{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,s=i.contains("pswp__img"),o=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,e):o&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){ii(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){ii(e)&&this._doClickOrTapAction("doubleTap",t,e)}_doClickOrTapAction(t,e,i){const{pswp:s}=this.gestures,{currSlide:o}=s,n=`${t}Action`,a=s.options[n];if(!s.dispatch(n,{point:e,originalEvent:i}).defaultPrevented)if("function"!=typeof a)switch(a){case"close":case"next":s[a]();break;case"zoom":o?.toggleZoom(e);break;case"zoom-or-close":o?.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(e):s.options.clickToCloseNonZoomable&&s.close();break;case"toggle-controls":this.gestures.pswp.element?.classList.toggle("pswp--ui-visible")}else a.call(s,e,i)}};function oi(t,e,i){return t.x=(e.x+i.x)/2,t.y=(e.y+i.y)/2,t}var ni=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,ze(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:e,p2:i,startP2:s,pswp:o}=this.gestures,{currSlide:n}=o;if(!n)return;const a=n.zoomLevels.min,r=n.zoomLevels.max;if(!n.isZoomable()||o.mainScroll.isShifted())return;oi(this._startZoomPoint,e,s),oi(this._zoomPoint,t,i);let l=1/Le(e,s)*Le(t,i)*this._startZoomLevel;if(l>n.zoomLevels.initial+n.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),l<a)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=n.zoomLevels.initial){const t=1-(a-l)/(a/1.2);o.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||o.applyBgOpacity(t)}else l=a-.15*(a-l);else l>r&&(l=r+.05*(l-r));n.pan.x=this._calculatePanForZoomLevel("x",l),n.pan.y=this._calculatePanForZoomLevel("y",l),n.setZoomLevel(l),n.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 o,n=!0;s<i.zoomLevels.initial?o=i.zoomLevels.initial:s>i.zoomLevels.max?o=i.zoomLevels.max:(n=!1,o=s);const a=e.bgOpacity,r=e.bgOpacity<1,l=ze({x:0,y:0},i.pan);let c=ze({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,ze(this._startPan,l)),n&&(c={x:this._calculatePanForZoomLevel("x",o),y:this._calculatePanForZoomLevel("y",o)}),i.setZoomLevel(o),c={x:i.bounds.correctPan("x",c.x),y:i.bounds.correctPan("y",c.y)},i.setZoomLevel(s);const h=!ke(c,l);if(!h&&!n&&!r)return i._setResolution(o),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,h||n){if(h&&(i.pan.x=l.x+(c.x-l.x)*t,i.pan.y=l.y+(c.y-l.y)*t),n){const e=s+(o-s)*t;i.setZoomLevel(e)}i.applyCurrentZoomPan()}r&&e.bgOpacity<1&&e.applyBgOpacity(Ae(a+(1-a)*t,0,1))},onComplete:()=>{i._setResolution(o),i.applyCurrentZoomPan()}})}},ai=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 ei(this),this.zoomLevels=new ni(this),this.tapHandler=new si(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:o}=this,{events:n}=o,a=s?t+s:"";n.add(o.scrollWrap,t+e,this.onPointerDown.bind(this)),n.add(window,`${t}move`,this.onPointerMove.bind(this)),n.add(window,t+i,this.onPointerUp.bind(this)),a&&n.add(o.scrollWrap,a,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,ze(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,ze(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,ze(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(),Le(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(ze(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&&ze(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&ze(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(){ze(this.prevP1,this.p1),ze(this.prevP2,this.p2)}_updateStartPoints(){ze(this.startP1,this.p1),ze(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())}},ri=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=Ve("x"===t?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),o=this.slide.panAreaSize[t];this.center[t]=Math.round((o-i)/2)+s,this.max[t]=i>o?Math.round(o-i)+s:this.center[t],this.min[t]=i>o?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 Ae(e,this.max[t],this.min[t])}},li=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 Ue(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=Ie("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 ri(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:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),o.animations.stopAllPan();const n=this.currZoomLevel;s||(t=Ae(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,n),this.pan.y=this.calculateZoomToPanOffset("y",e,n),Ce(this.pan);const a=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:i,easing:o.options.easing}):a()}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),ze(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,Ee(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;ze(this.panAreaSize,qe(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 Oe(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}};function ci(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 hi={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:ci},di={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)=>{ci(t,e,!0)}},pi={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"},ui={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"},mi={name:"counter",order:5,onInit:(t,e)=>{e.on("change",()=>{t.innerText=e.currIndex+1+e.options.indexIndicatorSep+e.getNumItems()})}},fi={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 o=e=>{var s;i!==e&&(i=e,s=e,t.classList.toggle("pswp__preloader--active",s))},n=()=>{if(!e.currSlide?.content.isLoading())return o(!1),void(s&&(clearTimeout(s),s=null));s||(s=setTimeout(()=>{o(Boolean(e.currSlide?.content.isLoading())),s=null},e.options.preloaderDelay))};e.on("change",n),e.on("loadComplete",t=>{e.currSlide===t.slide&&n()}),e.ui&&(e.ui.updatePreloaderVisibility=n)}},gi=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 o="";e.isButton?(o+="pswp__button ",o+=e.className||`pswp__button--${e.name}`):o+=e.className||`pswp__${e.name}`;let n=e.isButton?e.tagName||"button":e.tagName||"div";n=n.toLowerCase();const a=Ie(o,n);if(e.isButton){"button"===n&&(a.type="button");let{title:s}=e;const{ariaLabel:o}=e;"string"==typeof t.options[`${i}Title`]&&(s=t.options[`${i}Title`]),s&&(a.title=s);const r=o||s;r&&a.setAttribute("aria-label",r)}a.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(a,t),e.onClick&&(a.onclick=i=>{"string"==typeof e.onClick?t[e.onClick]():"function"==typeof e.onClick&&e.onClick(i,a,t)});const r=e.appendTo||"bar";let l=t.element;"bar"===r?(t.topBar||(t.topBar=Ie("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),l=t.topBar):(a.classList.add("pswp__hide-on-close"),"wrapper"===r&&(l=t.scrollWrap)),l?.appendChild(t.applyFilters("uiElement",a,e))}};function yi(t,e){t.classList.toggle("pswp--zoomed-in",e)}var _i=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=[pi,hi,di,ui,fi,mi],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 gi(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 o=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(o)<.01||!e.isZoomable())return yi(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),yi(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")}},vi="cubic-bezier(.4,0,.22,1)",bi=class{constructor(t){this.props=t;const{target:e,onComplete:i,transform:s,onFinish:o=()=>{},duration:n=333,easing:a=vi}=t;this.onFinish=o;const r=s?"transform":"opacity",l=t[r]??"";this._target=e,this._onComplete=i,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{Ze(e,r,n,a),this._helperTimeout=setTimeout(()=>{e.addEventListener("transitionend",this._onTransitionEnd,!1),e.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},n+500),e.style[r]=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),Ze(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}},xi=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 o=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(1===this._dampingRatio)i=this.velocity+this._naturalFrequency*t,s=(t+i*e)*o,this.velocity=s*-this._naturalFrequency+i*o;else if(this._dampingRatio<1){i=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const n=Math.cos(this._dampedFrequency*e),a=Math.sin(this._dampedFrequency*e);s=o*(t*n+i*a),this.velocity=s*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*a+this._dampedFrequency*i*n)}return s}},wi=class{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:s,onUpdate:o,onComplete:n,onFinish:a=()=>{},dampingRatio:r,naturalFrequency:l}=t;this.onFinish=a;const c=new xi(s,r,l);let h=Date.now(),d=e-i;const p=()=>{this._raf&&(d=c.easeFrame(d,Date.now()-h),Math.abs(d)<1&&Math.abs(c.velocity)<50?(o(i),n&&n(),this.onFinish()):(h=Date.now(),o(d+i),this._raf=requestAnimationFrame(p)))};this._raf=requestAnimationFrame(p)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}},Ti=class{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new wi(t):new bi(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)}},Si=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{Si=!0}}))}catch(Fi){}var Pi=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,o,n){if(!t)return;const a=o?"removeEventListener":"addEventListener";e.split(" ").forEach(e=>{if(e){n||(o?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 r=!!Si&&{passive:s||!1};t[a](e,i,r)}})}},Ii={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},zi=(t,e)=>e?t:Ii[t],Ci=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(Be(t))return;let i,s,o=!1;const n="key"in t;switch(n?t.key:t.keyCode){case zi("Escape",n):e.options.escKey&&(i="close");break;case zi("z",n):i="toggleZoom";break;case zi("ArrowLeft",n):s="x";break;case zi("ArrowUp",n):s="y";break;case zi("ArrowRight",n):s="x",o=!0;break;case zi("ArrowDown",n):o=!0,s="y";break;case zi("Tab",n):this._focusRoot()}if(s){t.preventDefault();const{currSlide:n}=e;e.options.arrowKeys&&"x"===s&&e.getNumItems()>1?i=o?"next":"prev":n&&n.currZoomLevel>n.zoomLevels.fit&&(n.pan[s]+=o?-80:80,n.panTo(n.pan.x,n.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()}},Li=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&&Ee(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=Ie("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 o=s.potentialIndex+t;const n=s.getNumItems();if(s.canLoop()){o=s.getLoopedIndex(o);const e=(t+n)%n;t=e<=n/2?e:e-n}else o<0?o=0:o>=n&&(o=n-1),t=o-s.potentialIndex;s.potentialIndex=o,this._currPositionIndex-=t,s.animations.stopMainScroll();const a=this.getCurrSlideX();if(e){s.animations.startSpring({isMainScroll:!0,start:this.x,end:a,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+n)%n;t=e<=n/2?e:e-n}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(a),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 o=0;o<s;o++)e>0?(i=this.itemHolders.shift(),i&&(this.itemHolders[2]=i,this._containerShiftIndex++,Ee(i.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(i,t.currIndex-s+o+2))):(i=this.itemHolders.pop(),i&&(this.itemHolders.unshift(i),this._containerShiftIndex--,Ee(i.el,this._containerShiftIndex*this.slideWidth),t.setContent(i,t.currIndex+s-o-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&&Ee(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:e??!1})}},ki=.003,Ai=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:o}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const e=-o.x+(this._thumbBounds.x-i.x)+i.w,s=-o.y+(this._thumbBounds.y-i.y)+i.h,n=o.x-i.w,a=o.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",Oe(e,s)),this._animateTo(this._cropContainer2,"transform",Oe(n,a))):(Ee(this._cropContainer1,e,s),Ee(this._cropContainer2,n,a))}s&&(ze(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,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};o[e]=i,s.startTransition(o)}},Oi=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 o=e.currZoomLevel*i;e.zoomTo(o,{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))}},Ei={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)"},Zi=class extends Je{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 Pi,this.animations=new Ti,this.mainScroll=new Li(this),this.gestures=new ai(this),this.opener=new Ai(this),this.keyboard=new Ci(this),this.contentLoader=new Ke(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 Oi(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)),Ae(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 li(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=$e(this.options,this);!t&&ke(e,this._prevViewportSize)||(ze(this._prevViewportSize,e),this.dispatch("beforeResize"),ze(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=Ie("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=Ie("pswp__bg","div",this.element),this.scrollWrap=Ie("pswp__scroll-wrap","section",this.element),this.container=Ie("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 _i(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:o}=e;let n,a;if(o&&!1!==i.options.thumbSelector){const t=i.options.thumbSelector||"img";a=o.matches(t)?o:o.querySelector(t)}return a=i.applyFilters("thumbEl",a,e,t),a&&(n=e.thumbCropped?function(t,e,i){const s=t.getBoundingClientRect(),o=s.width/e,n=s.height/i,a=o>n?o:n,r=(s.width-e*a)/2,l=(s.height-i*a)/2,c={x:s.left+r,y:s.top+l,w:e*a};return c.innerRect={w:s.width,h:s.height,x:r,y:l},c}(a,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}}(a)),i.applyFilters("thumbBounds",n,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),{...Ei,...t}}},Di=()=>Promise.resolve(Zi);export{te as a,ne as c,Qt as d,Kt as f,Ht as g,$t as h,Te as i,oe as l,Ut as m,ti as n,se as o,Xt as p,Pe as r,re as s,Di as t,ae as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require("./BLzjjF3u.js");const e=require("./BSo7livb.js"),r=require("./
|
|
1
|
+
require("./BLzjjF3u.js");const e=require("./BSo7livb.js"),r=require("./CQPNrnGa.js");var t=r.z(()=>Promise.resolve().then(()=>require("./CDxcCZ0e.js"))),o=r.z(()=>Promise.resolve().then(()=>require("./BLyySAIG.js"))),s=r.z(()=>Promise.resolve().then(()=>require("./By2TDGd0.js"))),i=r.z(()=>Promise.resolve().then(()=>require("./iNYjrgIk.js")));exports.default=({events:l,isLoading:n=!1})=>{const{organization:a}=r.useSession(),u=e.useNavigate(),c=a?.integrationSettings??{},d=c.mapProvider??"openstreetmap",p=c.mapTilerApiKey??"",m=c.googleMapsApiKey??"",g=c.mapboxApiKey??"",h=l.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y),x="openstreetmap"===d&&!p||"google"===d&&!m||"mapbox"===d&&!g,v=e=>{u(r.PAGE_ROUTES.GALLERY(e))};return e.u("div",{class:"w relative mt-3 h-screen sm:mt-6",children:n?e.u("div",{class:"flex h-full items-center justify-center",children:e.u("div",{class:"border-primary bt-transparent size-8 animate-spin rounded-full"})}):x?e.u("div",{class:"flex h-full items-center justify-center",children:e.u("div",{class:"text-center",children:[e.u("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[e.u("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),e.u("circle",{cx:"12",cy:"9",r:"2.5"})]}),e.u("p",{class:"text-foreground",children:"Map API Key Required"}),e.u("p",{class:"text-muted-foreground mt-1 text-xs",children:"Configure your map provider API key in the integration settings."})]})}):0===h.length?e.u("div",{class:"flex h-full items-center justify-center",children:e.u("div",{class:"text-center",children:[e.u("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[e.u("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),e.u("circle",{cx:"12",cy:"9",r:"2.5"})]}),e.u("p",{class:"text-foreground tex",children:"No events with location data"}),e.u("p",{class:"text-muted-foreground mt-1 text-xs",children:"Events need a location to appear on the map."})]})}):e.u(r.P,{fallback:e.u("div",{class:"flex h-full items-center justify-center",children:e.u("div",{class:"border-primary rounde size-8 animate-spin border-t-transparent"})}),children:["openstreetmap_free"===d&&e.u(t,{events:h,onExplore:v,logoUrl:a?.logoUrl}),"openstreetmap"===d&&e.u(o,{is3D:!0,events:h,apiKey:p,onExplore:v,logoUrl:a?.logoUrl}),"mapbox"===d&&e.u(i,{onExplore:v,apiKey:g,is3D:!1,logoUrl:a?.logoUrl}),"google"===d&&e.u(s,{events:h,apiKey:m,onExplore:v,logoUrl:a?.logoUrl})]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=require("./C02SORiV.js");function e(e){return{onFetch:(a,n)=>{const r=a.options,o=a.fetchOptions?.meta?.fetchMore?.direction,u=a.state.data?.pages||[],h=a.state.data?.pageParams||[];let c={pages:[],pageParams:[]},l=0;const d=async()=>{let n=!1;const d=t.ensureQueryFn(a.options,a.fetchOptions),f=async(e,s,i)=>{if(n)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);const r=await d((()=>{const e={client:a.client,queryKey:a.queryKey,pageParam:s,direction:i?"backward":"forward",meta:a.options.meta};var r;return r=e,t.addConsumeAwareSignal(r,()=>a.signal,()=>n=!0),e})()),{maxPages:o}=a.options,u=i?t.addToStart:t.addToEnd;return{pages:u(e.pages,r,o),pageParams:u(e.pageParams,s,o)}};if(o&&u.length){const t="backward"===o,e=t?i:s,a={pages:u,pageParams:h};c=await f(a,e(r,a),t)}else{const t=e??u.length;do{const t=0===l?h[0]??r.initialPageParam:s(r,c);if(l>0&&null==t)break;c=await f(c,t),l++}while(l<t)}return c};a.options.persister?a.fetchFn=()=>a.options.persister?.(d,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},n):a.fetchFn=d}}}function s(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 i(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function a(t,e){return!!e&&null!=s(t,e)}function n(t,e){return!(!e||!t.getPreviousPageParam)&&null!=i(t,e)}var r=class extends t.Removable{#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(e){const s=()=>{this.#a({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=t.createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const a="pending"===this.state.status,n=!this.#i.canStart();try{if(a)s();else{this.#a({type:"pending",variables:e,isPaused:n}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,i);const t=await(this.options.onMutate?.(e,i));t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:n})}const t=await this.#i.start();return await(this.#s.config.onSuccess?.(t,e,this.state.context,this,i)),await(this.options.onSuccess?.(t,e,this.state.context,i)),await(this.#s.config.onSettled?.(t,null,this.state.variables,this.state.context,this,i)),await(this.options.onSettled?.(t,null,e,this.state.context,i)),this.#a({type:"success",data:t}),t}catch(r){try{await(this.#s.config.onError?.(r,e,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onError?.(r,e,this.state.context,i))}catch(o){Promise.reject(o)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onSettled?.(void 0,r,e,this.state.context,i))}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}},o=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#n=new Set,this.#r=new Map,this.#o=0}#n;#r;#o;build(t,e,s){const i=new r({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#n.add(t);const e=u(t);if("string"==typeof e){const s=this.#r.get(e);s?s.push(t):this.#r.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#n.delete(t)){const e=u(t);if("string"==typeof e){const s=this.#r.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#r.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=u(t);if("string"==typeof e){const s=this.#r.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=u(t);return"string"==typeof e?(this.#r.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){t.notifyManager.batch(()=>{this.#n.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#n.clear(),this.#r.clear()})}getAll(){return Array.from(this.#n)}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchMutation(s,e))}findAll(e={}){return this.getAll().filter(s=>t.matchMutation(e,s))}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return t.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(t.noop))))}};function u(t){return t.options.scope?.id}var h=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#u=new Map}#u;build(e,s,i){const a=s.queryKey,n=s.queryHash??t.hashQueryKeyByOptions(a,s);let r=this.get(n);return r||(r=new t.Query({client:e,queryKey:a,queryHash:n,options:e.defaultQueryOptions(s),state:i,defaultOptions:e.getQueryDefaults(a)}),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(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchQuery(s,e))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(s=>t.matchQuery(e,s)):s}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},c=class{#h;#s;#c;#l;#d;#f;#y;#p;constructor(t={}){this.#h=t.queryCache||new h,this.#s=t.mutationCache||new o,this.#c=t.defaultOptions||{},this.#l=new Map,this.#d=new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#y=t.focusManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=t.onlineManager.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(e){const s=this.defaultQueryOptions(e),i=this.#h.build(this,s),a=i.state.data;return void 0===a?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(a))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(e,s,i){const a=this.defaultQueryOptions({queryKey:e}),n=this.#h.get(a.queryHash)?.state.data,r=t.functionalUpdate(s,n);if(void 0!==r)return this.#h.build(this,a).setData(r,{...i,manual:!0})}setQueriesData(e,s,i){return t.notifyManager.batch(()=>this.#h.findAll(e).map(({queryKey:t})=>[t,this.setQueryData(t,s,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(e){const s=this.#h;t.notifyManager.batch(()=>{s.findAll(e).forEach(t=>{s.remove(t)})})}resetQueries(e,s){const i=this.#h;return t.notifyManager.batch(()=>(i.findAll(e).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...e},s)))}cancelQueries(e,s={}){const i={revert:!0,...s},a=t.notifyManager.batch(()=>this.#h.findAll(e).map(t=>t.cancel(i)));return Promise.all(a).then(t.noop).catch(t.noop)}invalidateQueries(e,s={}){return t.notifyManager.batch(()=>(this.#h.findAll(e).forEach(t=>{t.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},s)))}refetchQueries(e,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},a=t.notifyManager.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.noop)),"paused"===e.state.fetchStatus?Promise.resolve():s}));return Promise.all(a).then(t.noop)}fetchQuery(e){const s=this.defaultQueryOptions(e);void 0===s.retry&&(s.retry=!1);const i=this.#h.build(this,s);return i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(t.noop).catch(t.noop)}fetchInfiniteQuery(t){return t.behavior=e(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(t.noop).catch(t.noop)}ensureInfiniteQueryData(t){return t.behavior=e(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return t.onlineManager.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(e,s){this.#l.set(t.hashKey(e),{queryKey:e,defaultOptions:s})}getQueryDefaults(e){const s=[...this.#l.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,s){this.#d.set(t.hashKey(e),{mutationKey:e,defaultOptions:s})}getMutationDefaults(e){const s=[...this.#d.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const s={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return s.queryHash||(s.queryHash=t.hashQueryKeyByOptions(s.queryKey,s)),void 0===s.refetchOnReconnect&&(s.refetchOnReconnect="always"!==s.networkMode),void 0===s.throwOnError&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===t.skipToken&&(s.enabled=!1),s}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()}},l=(e=[],s)=>{const i=new Map;e?.forEach(t=>{i.set(t._id,t)});const a=[];let n=i.get(s);for(;n;)a.unshift({_id:n._id,name:n.name,href:t.PAGE_ROUTES.FOLDER_EVENTS(n?._id),color:n.color}),n=i.get(n.parentFolderId);return a};Object.defineProperty(exports,"QueryClient",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"getBreadcrumbFromFlatFolders",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"hasNextPage",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"hasPreviousPage",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"infiniteQueryBehavior",{enumerable:!0,get:function(){return e}});
|
|
1
|
+
const t=require("./CQPNrnGa.js");function e(e){return{onFetch:(a,n)=>{const r=a.options,o=a.fetchOptions?.meta?.fetchMore?.direction,u=a.state.data?.pages||[],h=a.state.data?.pageParams||[];let c={pages:[],pageParams:[]},l=0;const d=async()=>{let n=!1;const d=t.ensureQueryFn(a.options,a.fetchOptions),f=async(e,s,i)=>{if(n)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);const r=await d((()=>{const e={client:a.client,queryKey:a.queryKey,pageParam:s,direction:i?"backward":"forward",meta:a.options.meta};var r;return r=e,t.addConsumeAwareSignal(r,()=>a.signal,()=>n=!0),e})()),{maxPages:o}=a.options,u=i?t.addToStart:t.addToEnd;return{pages:u(e.pages,r,o),pageParams:u(e.pageParams,s,o)}};if(o&&u.length){const t="backward"===o,e=t?i:s,a={pages:u,pageParams:h};c=await f(a,e(r,a),t)}else{const t=e??u.length;do{const t=0===l?h[0]??r.initialPageParam:s(r,c);if(l>0&&null==t)break;c=await f(c,t),l++}while(l<t)}return c};a.options.persister?a.fetchFn=()=>a.options.persister?.(d,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},n):a.fetchFn=d}}}function s(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 i(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function a(t,e){return!!e&&null!=s(t,e)}function n(t,e){return!(!e||!t.getPreviousPageParam)&&null!=i(t,e)}var r=class extends t.Removable{#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(e){const s=()=>{this.#a({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=t.createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const a="pending"===this.state.status,n=!this.#i.canStart();try{if(a)s();else{this.#a({type:"pending",variables:e,isPaused:n}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,i);const t=await(this.options.onMutate?.(e,i));t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:n})}const t=await this.#i.start();return await(this.#s.config.onSuccess?.(t,e,this.state.context,this,i)),await(this.options.onSuccess?.(t,e,this.state.context,i)),await(this.#s.config.onSettled?.(t,null,this.state.variables,this.state.context,this,i)),await(this.options.onSettled?.(t,null,e,this.state.context,i)),this.#a({type:"success",data:t}),t}catch(r){try{await(this.#s.config.onError?.(r,e,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onError?.(r,e,this.state.context,i))}catch(o){Promise.reject(o)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onSettled?.(void 0,r,e,this.state.context,i))}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}},o=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#n=new Set,this.#r=new Map,this.#o=0}#n;#r;#o;build(t,e,s){const i=new r({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#n.add(t);const e=u(t);if("string"==typeof e){const s=this.#r.get(e);s?s.push(t):this.#r.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#n.delete(t)){const e=u(t);if("string"==typeof e){const s=this.#r.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#r.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=u(t);if("string"==typeof e){const s=this.#r.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=u(t);return"string"==typeof e?(this.#r.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){t.notifyManager.batch(()=>{this.#n.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#n.clear(),this.#r.clear()})}getAll(){return Array.from(this.#n)}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchMutation(s,e))}findAll(e={}){return this.getAll().filter(s=>t.matchMutation(e,s))}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return t.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(t.noop))))}};function u(t){return t.options.scope?.id}var h=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#u=new Map}#u;build(e,s,i){const a=s.queryKey,n=s.queryHash??t.hashQueryKeyByOptions(a,s);let r=this.get(n);return r||(r=new t.Query({client:e,queryKey:a,queryHash:n,options:e.defaultQueryOptions(s),state:i,defaultOptions:e.getQueryDefaults(a)}),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(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchQuery(s,e))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(s=>t.matchQuery(e,s)):s}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},c=class{#h;#s;#c;#l;#d;#f;#y;#p;constructor(t={}){this.#h=t.queryCache||new h,this.#s=t.mutationCache||new o,this.#c=t.defaultOptions||{},this.#l=new Map,this.#d=new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#y=t.focusManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=t.onlineManager.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(e){const s=this.defaultQueryOptions(e),i=this.#h.build(this,s),a=i.state.data;return void 0===a?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(a))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(e,s,i){const a=this.defaultQueryOptions({queryKey:e}),n=this.#h.get(a.queryHash)?.state.data,r=t.functionalUpdate(s,n);if(void 0!==r)return this.#h.build(this,a).setData(r,{...i,manual:!0})}setQueriesData(e,s,i){return t.notifyManager.batch(()=>this.#h.findAll(e).map(({queryKey:t})=>[t,this.setQueryData(t,s,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(e){const s=this.#h;t.notifyManager.batch(()=>{s.findAll(e).forEach(t=>{s.remove(t)})})}resetQueries(e,s){const i=this.#h;return t.notifyManager.batch(()=>(i.findAll(e).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...e},s)))}cancelQueries(e,s={}){const i={revert:!0,...s},a=t.notifyManager.batch(()=>this.#h.findAll(e).map(t=>t.cancel(i)));return Promise.all(a).then(t.noop).catch(t.noop)}invalidateQueries(e,s={}){return t.notifyManager.batch(()=>(this.#h.findAll(e).forEach(t=>{t.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},s)))}refetchQueries(e,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},a=t.notifyManager.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.noop)),"paused"===e.state.fetchStatus?Promise.resolve():s}));return Promise.all(a).then(t.noop)}fetchQuery(e){const s=this.defaultQueryOptions(e);void 0===s.retry&&(s.retry=!1);const i=this.#h.build(this,s);return i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(t.noop).catch(t.noop)}fetchInfiniteQuery(t){return t.behavior=e(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(t.noop).catch(t.noop)}ensureInfiniteQueryData(t){return t.behavior=e(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return t.onlineManager.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(e,s){this.#l.set(t.hashKey(e),{queryKey:e,defaultOptions:s})}getQueryDefaults(e){const s=[...this.#l.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,s){this.#d.set(t.hashKey(e),{mutationKey:e,defaultOptions:s})}getMutationDefaults(e){const s=[...this.#d.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const s={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return s.queryHash||(s.queryHash=t.hashQueryKeyByOptions(s.queryKey,s)),void 0===s.refetchOnReconnect&&(s.refetchOnReconnect="always"!==s.networkMode),void 0===s.throwOnError&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===t.skipToken&&(s.enabled=!1),s}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()}},l=(e=[],s)=>{const i=new Map;e?.forEach(t=>{i.set(t._id,t)});const a=[];let n=i.get(s);for(;n;)a.unshift({_id:n._id,name:n.name,href:t.PAGE_ROUTES.FOLDER_EVENTS(n?._id),color:n.color}),n=i.get(n.parentFolderId);return a};Object.defineProperty(exports,"QueryClient",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"getBreadcrumbFromFlatFolders",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"hasNextPage",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"hasPreviousPage",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"infiniteQueryBehavior",{enumerable:!0,get:function(){return e}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,k as n,r as t,v as r,y as o}from"./Cpox5nFJ.js";import{t as a}from"./
|
|
1
|
+
import{E as e,k as n,r as t,v as r,y as o}from"./Cpox5nFJ.js";import{t as a}from"./BB64mo-u.js";var i=(e,o,i)=>{n(/* @__PURE__ */r(t,{children:/* @__PURE__ */r(a,{event:e,onExplore:i})}),o)},s=({events:n,apiKey:t,onExplore:a,logoUrl:s})=>{const l=o(null),c=o(null);return e(()=>{if(l.current&&!c.current)return(async()=>{const{setOptions:e,importLibrary:r}=await import("./CtCRzhKd.js");e({key:t,v:"weekly"}),await Promise.all([r("maps"),r("marker")]);const o=window.google.maps;if(!l.current)return;const d=new o.Map(l.current,{mapId:"DEMO_MAP_ID",renderingType:"VECTOR",mapTypeId:"roadmap",center:{lat:20,lng:0},zoom:2,mapTypeControl:!1,streetViewControl:!1});o.event.addListenerOnce(d,"idle",()=>{d.getRenderingType?.()!==o.RenderingType?.VECTOR&&console.warn("Google Maps fell back to raster rendering; globe view is unavailable in raster mode.")}),c.current=d;const p=n.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===p.length)return;const m=new o.LatLngBounds,u=new o.InfoWindow({maxWidth:200});for(const n of p){const e=n.location.x,t={lat:n.location.y,lng:e};m.extend(t);const r=document.createElement("div");if(r.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 ",s){const e=document.createElement("img");e.src=s,e.style.cssText="width: 24px; height: 24px; border-radius: 50%; object-fit: cover; transform: rotate(45deg);",r.appendChild(e)}const l=new o.marker.AdvancedMarkerElement({map:d,position:t,content:r,gmpClickable:!0});l.addListener("click",()=>{const e=document.createElement("div");i(n,e,a),u.close(),u.setContent(e),u.open(d,l)})}d.fitBounds(m)})(),()=>{c.current=null}},[t]),/* @__PURE__ */r("div",{ref:l,class:"size-full"})};export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./BLzjjF3u.js"),t=require("./BSo7livb.js"),r=require("./
|
|
1
|
+
const e=require("./BLzjjF3u.js"),t=require("./BSo7livb.js"),r=require("./CQPNrnGa.js"),o=require("./DnZjfS5P.js"),n=require("./2loTkxKJ.js"),l=require("./DYF1izRu.js");var s=new o.QueryClient,a=(e,o,l)=>{t.R(t.u(r.QueryClientProvider,{client:s,children:t.u(t.MemoryRouter,{children:t.u(n.EventPreviewCard,{event:e,onExplore:l})})}),o)};exports.default=({folderId:r,onExplore:o,apiKey:n,is3D:s,logoUrl:i})=>{const c=t.A(null),d=t.A(null),u=t.A(null),f=t.A(null),[p,m]=t.d(!1),{activeFolderId:h,visibleFolders:b,visibleEvents:x,folderFeatureCollection:v,breadcrumb:g,isBusy:y,setActiveFolderId:w,goBack:k,activeFolder:j,folderBounds:C}=l.useHierarchicalMap({folderId:r}),L=x?.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);return t.y(()=>{if(!c.current||d.current)return;let t;return(async()=>{const r=(await Promise.resolve().then(()=>e.__toESM(require("./CQZJGufb.js").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(!c.current)return;r.accessToken=n;const l=new r.Map({container:c.current,style:"mapbox://styles/mapbox/streets-v12",center:[0,20],zoom:3,minZoom:2,pitch:s?30:0,bearing:s?-20:0,antialias:!0});d.current=l,l.on("load",()=>{if(0===L.length)return;const e=new r.LngLatBounds;for(const n of L){const t=n.location.x,s=n.location.y;e.extend([t,s]);const c=document.createElement("div");if(c.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 ",i){const e=document.createElement("img");e.src=i,e.style.cssText="width: 24px; height: 24px; border-radius: 50%; object-fit: cover; transform: rotate(45deg);",c.appendChild(e)}const d=document.createElement("div");a(n,d,o);const u=new r.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-20]}).setDOMContent(d);new r.Marker({element:c}).setLngLat([t,s]).setPopup(u).addTo(l)}e.isEmpty()||l.fitBounds(e,{padding:60,maxZoom:14,duration:1200}),m(!0),l.addSource("folder-areas",{type:"geojson",data:v}),l.addLayer({id:"folder-fill",type:"fill",source:"folder-areas",paint:{"fill-color":["case",["boolean",["feature-state","hover"],!1],"#ffb703","#ffb703"],"fill-opacity":.28}}),l.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]}}),l.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}}),l.on("mousemove","folder-fill",e=>{const t=e.features?.[0];if(!t)return;const o=String(t.properties?.folderId);f.current!==o&&(f.current&&l.setFeatureState({source:"folder-areas",id:f.current},{hover:!1}),f.current=o,l.setFeatureState({source:"folder-areas",id:o},{hover:!0})),l.getCanvas().style.cursor="pointer",((e,t)=>{const o=e.properties??{},n=String(o.name??"Folder"),s=Number(o.eventCount??0);u.current||(u.current=new r.Popup({closeButton:!1,closeOnClick:!1,offset:12})),u.current.setLngLat(t).setHTML(`<div class='text-sm font-semibold text-slate-900'>${n}</div><div class='text-xs text-slate-700'>${s} event${1===s?"":"s"}</div>`).addTo(l)})(t,e.lngLat)}),l.on("mouseleave","folder-fill",()=>{f.current&&(l.setFeatureState({source:"folder-areas",id:f.current},{hover:!1}),f.current=null,u.current?.remove()),l.getCanvas().style.cursor=""});const t=e=>{const t=(e.features?.[0])?.properties?.folderId;t&&w(String(t))};l.on("click","folder-fill",t),l.on("click","folder-border",t),l.on("click","folder-point",t)}),t=()=>{l.remove(),d.current=null,u.current=null}})(),()=>{t?.()}},[n,s,o,w]),t.y(()=>{if(!d.current||!p)return;const e=d.current;try{e.getSource("folder-areas")?.setData(v)}catch{}},[v,p]),t.y(()=>{(()=>{const e=d.current;if(!e||!p)return;const t=C;if(!t)return;const[r,o,n,l]=t;e.fitBounds([[r,o],[n,l]],{padding:72,duration:800,maxZoom:14})})()},[C,p]),t.y(()=>{d.current&&d.current.easeTo({pitch:s?30:0,bearing:s?-20:0,duration:800})},[s]),t.u("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",children:[t.u("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:[t.u("div",{class:"flex items-center justify-between gap-3",children:[t.u("div",{children:[t.u("div",{class:"text-sm font-semibold text-slate-900",children:j?.name??"Home"}),t.u("div",{class:"text-xs text-slate-600",children:["Tap a folder region to drill into its contents. ",b?.length??0," folder",1===b?.length?"":"s",", ",L.length," event",1===L.length?"":"s"," total"]})]}),h&&t.u("button",{type:"button",onClick:k,class:"rounded bg-slate-100 px-3 py-1 text-xs font-semibold text-slate-700 hover:bg-slate-200",children:"Back"})]}),g.length>0&&t.u("div",{class:"flex flex-wrap gap-1 text-xs text-slate-500",children:[t.u("span",{children:"All folders"}),g.map(e=>t.u("span",{class:"inline-flex items-center gap-1",children:[t.u("span",{class:"text-slate-300",children:"/"}),t.u("span",{children:e.name})]},e._id))]})]}),y&&t.u("div",{class:"absolute inset-0 z-10 flex items-center justify-center bg-white/70",children:t.u("div",{class:"border-primary flex h-12 w-12 animate-spin items-center justify-center rounded-full border-4 border-t-transparent"})}),t.u("div",{ref:c,class:"h-full w-full rounded-xl border border-slate-200"})]})};
|