@qratilabs/qrati-connect 2.23.0-beta.2 → 2.23.0-beta.21
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/README.md +34 -131
- package/element/1dmOpMwn2.js +1 -0
- package/{umd/CU_-C7Pt2.js → element/B04BM8Ax2.js} +9 -9
- package/element/B45gcsxb.js +8 -0
- package/element/{B5BVTFlf.js → BCQyxXhG.js} +2 -2
- package/element/BItKl1T42.js +9 -0
- package/element/BNaRcekR2.js +1 -0
- package/element/BUDCYszs.js +1 -0
- package/element/BWP-4cpS.js +9 -0
- package/element/Bb7aA27_2.js +16 -0
- package/element/Be1kxf1X.js +1 -0
- package/element/BgQoyn-N2.js +24 -0
- package/{umd/CYQ06kUR.js → element/Bgs5C4HD.js} +1 -1
- package/element/BhkJLPA42.js +39 -0
- package/element/BhxijXQM.js +3 -0
- package/element/{fwDYCLiL.js → BlknxKzR.js} +1 -1
- package/element/Bo39kG4k2.js +1 -0
- package/{umd/WX3mhhd9.js → element/BsYbcfkG.js} +1 -1
- package/element/{CMQUiMWC2.js → BurXvsRl2.js} +2 -2
- package/element/BwwxqSTC2.js +1 -0
- package/element/C5zfotWt2.js +93 -0
- package/{umd/CgUphJWo.js → element/C7zv6hcG.js} +1 -1
- package/{umd/C9HFLidt.js → element/CAETItHr.js} +1 -1
- package/element/CAGI3w1m2.js +1 -0
- package/element/CBLQRRGX2.js +3 -0
- package/element/{CKk0UYyd.js → CFnGGYmq.js} +1 -1
- package/element/{BekfKWcG.js → CILYMBwp.js} +1 -1
- package/element/CKhD3GGu2.js +5 -0
- package/element/CL_evx_l.js +1 -0
- package/element/{wuONdFBI2.js → CObeYQ-T.js} +4 -4
- package/element/{DPmrTFJt.js → CPK30X_R.js} +2 -2
- package/{umd/CJpmOICA.js → element/CZ9iaxjO2.js} +1 -1
- package/element/ChKwv0LI.js +3 -0
- package/element/CiRDwfEo.js +14 -0
- package/element/CnXoEQ4O.js +41 -0
- package/element/CpYO5bBq.js +3 -0
- package/element/Cqm7RQaC2.js +1 -0
- package/element/CtxIOzTC2.js +1 -0
- package/element/{DXrH_HhZ.js → D35mTuTT.js} +1 -1
- package/element/DBYSpPDT.js +4 -0
- package/element/DC180L58.js +1 -0
- package/element/DDsXvZQf2.js +1 -0
- package/element/DDy6e4u1.js +1 -0
- package/element/DG0xITSs2.js +36 -0
- package/element/DG2ImKMr2.js +3 -0
- package/element/{DWbLshVZ.js → DGGc10Cy.js} +1 -1
- package/element/DH3iGq80.js +11 -0
- package/element/DM971zPD.js +3 -0
- package/element/DPg_DKOi.js +5 -0
- package/element/DSeZQTI82.js +3 -0
- package/{umd/9VAO1NmP.js → element/DTNXbVBR.js} +1 -1
- package/{umd/Wun_Og5n2.js → element/DTl-ou-l2.js} +5 -9
- package/element/DdACKOZr.js +1 -0
- package/element/DjMXpQHg.js +8 -0
- package/element/{u7SUQ9Kb2.js → DlRUi0u42.js} +2 -2
- package/element/DmpmrPE5.js +1 -0
- package/element/DnIueBGr.js +1 -0
- package/element/Dpi8tX5M.js +1 -0
- package/element/DrrpB4Om.js +1 -0
- package/element/L4hWU3Nc.js +1 -0
- package/{umd/BCu0TrNB2.js → element/N4HKgEC52.js} +1 -1
- package/element/{BCTYvPrD.js → OnH8Izqn.js} +1 -1
- package/element/Ot24jlyb2.js +1 -0
- package/element/RVKBpT2F.js +87 -0
- package/element/Rcen6i0h.js +80 -0
- package/element/SOYsF7q9.js +1 -0
- package/element/{lVJD5cJY.js → TlERMTWp.js} +5 -5
- package/element/X0P7ujR0.js +4 -0
- package/element/{2SYk3iBo.js → oS3-bnne2.js} +1 -1
- package/element/qIS4OV76.js +1 -0
- package/element/tdnQ0RcT.js +5 -0
- package/element/web.es.js +40 -125
- package/element/zcb-9fSo.js +4 -0
- package/package.json +1 -10
- package/react/index.cjs +1 -1
- package/react/index.d.mts +65 -0
- package/react/index.d.ts +65 -0
- package/react/index.mjs +1 -1
- package/element/8nf23RYF2.js +0 -93
- package/element/9VAO1NmP.js +0 -1
- package/element/B2KTsK_w.js +0 -3
- package/element/BCu0TrNB2.js +0 -2
- package/element/Be-K0dao.js +0 -9
- package/element/BiO2AH5s2.js +0 -8
- package/element/BmCwXyo_2.js +0 -3
- package/element/BnWKlftk2.js +0 -16
- package/element/BqPEscWs2.js +0 -5
- package/element/BsT0vqml.js +0 -1
- package/element/BxeYKf-v2.js +0 -86
- package/element/C0MGOytI.js +0 -1
- package/element/C0vZ8zxT.js +0 -1
- package/element/C6SiAA6Z2.js +0 -2
- package/element/C9HFLidt.js +0 -2
- package/element/C9U01_vP2.js +0 -39
- package/element/CAGYFwGT2.js +0 -4
- package/element/CJpmOICA.js +0 -2
- package/element/CU_-C7Pt2.js +0 -13
- package/element/CYQ06kUR.js +0 -1
- package/element/CbpHG7X52.js +0 -9
- package/element/CgE_bYp32.js +0 -37
- package/element/CgUphJWo.js +0 -1
- package/element/Cko4QHwX.js +0 -1
- package/element/D8Se70tP2.js +0 -3
- package/element/DIYTs0k3.js +0 -10
- package/element/DVO71jbn2.js +0 -3
- package/element/DYUfJm8F.js +0 -9
- package/element/DibuO0dP.js +0 -1
- package/element/LJWh_4Di.js +0 -2
- package/element/O530RtWA.js +0 -1
- package/element/WX3mhhd9.js +0 -2
- package/element/WtQ5axEj.js +0 -41
- package/element/Wun_Og5n2.js +0 -9
- package/element/hJxQiXVJ2.js +0 -4
- package/element/htkJ94ea2.js +0 -14
- package/element/j7EIoFjZ.js +0 -1
- package/element/qJYsRQFB.js +0 -1
- package/element/qbHuxVSe.js +0 -1
- package/element/styles.css +0 -288
- package/element/we0Hcb5C.js +0 -3
- package/element/x2Vs8ihf.js +0 -8
- package/umd/2SYk3iBo.js +0 -7
- package/umd/8nf23RYF2.js +0 -93
- package/umd/B2KTsK_w.js +0 -3
- package/umd/B5BVTFlf.js +0 -3
- package/umd/BCTYvPrD.js +0 -1
- package/umd/Be-K0dao.js +0 -9
- package/umd/BekfKWcG.js +0 -1
- package/umd/BiO2AH5s2.js +0 -8
- package/umd/BkIDQGIs.js +0 -1
- package/umd/Bki5T_lb.js +0 -1
- package/umd/BmCwXyo_2.js +0 -3
- package/umd/BnWKlftk2.js +0 -16
- package/umd/BqPEscWs2.js +0 -5
- package/umd/BsT0vqml.js +0 -1
- package/umd/BxeYKf-v2.js +0 -86
- package/umd/C0MGOytI.js +0 -1
- package/umd/C0vZ8zxT.js +0 -1
- package/umd/C6SiAA6Z2.js +0 -2
- package/umd/C9U01_vP2.js +0 -39
- package/umd/CAGYFwGT2.js +0 -4
- package/umd/CKk0UYyd.js +0 -1
- package/umd/CMQUiMWC2.js +0 -2
- package/umd/CbpHG7X52.js +0 -9
- package/umd/CfMNBPpx2.js +0 -1
- package/umd/CgE_bYp32.js +0 -37
- package/umd/Cko4QHwX.js +0 -1
- package/umd/D8Se70tP2.js +0 -3
- package/umd/DIYTs0k3.js +0 -10
- package/umd/DPmrTFJt.js +0 -2
- package/umd/DVO71jbn2.js +0 -3
- package/umd/DWbLshVZ.js +0 -2
- package/umd/DXrH_HhZ.js +0 -2
- package/umd/DYUfJm8F.js +0 -9
- package/umd/DibuO0dP.js +0 -1
- package/umd/LJWh_4Di.js +0 -2
- package/umd/O530RtWA.js +0 -1
- package/umd/WtQ5axEj.js +0 -41
- package/umd/fwDYCLiL.js +0 -1
- package/umd/hJxQiXVJ2.js +0 -4
- package/umd/htkJ94ea2.js +0 -14
- package/umd/index.d.ts +0 -14
- package/umd/j7EIoFjZ.js +0 -1
- package/umd/lVJD5cJY.js +0 -5
- package/umd/qJYsRQFB.js +0 -1
- package/umd/qbHuxVSe.js +0 -1
- package/umd/rtH8O6Hc.js +0 -1
- package/umd/u7SUQ9Kb2.js +0 -7
- package/umd/we0Hcb5C.js +0 -3
- package/umd/web.es.js +0 -125
- package/umd/web.umd.js +0 -1
- package/umd/wuONdFBI2.js +0 -8
- package/umd/x2Vs8ihf.js +0 -8
- /package/element/{CfMNBPpx2.js → CfMNBPpx.js} +0 -0
package/umd/CgE_bYp32.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{D as t,E as e,O as n,T as i,_ as s,b as o,f as r,g as l,h as a,i as c,m as d,n as h,p as u,t as p,v as m,w as g,y as f}from"./qbHuxVSe.js";import{C as w,D as T,L as y,N as b,O as v,S as k,a as q,i as x,l as E,m as N,n as _,u as S,v as I}from"./WtQ5axEj.js";import{n as C,r as L,t as M}from"./j7EIoFjZ.js";import{t as R}from"./lVJD5cJY.js";import{t as B}from"./BekfKWcG.js";import{t as A}from"./2SYk3iBo.js";import{n as V,t as z}from"./DPmrTFJt.js";import{n as O}from"./BkIDQGIs.js";import{t as F}from"./Bki5T_lb.js";import{n as P,r as D,t as U}from"./qJYsRQFB.js";import{n as H}from"./CYQ06kUR.js";import{a as j,i as $,n as G,o as W,r as Q,s as K,t as Y}from"./we0Hcb5C.js";import{a as Z,n as J,o as X,r as tt,t as et}from"./CMQUiMWC2.js";function nt(t){return["react-photo-album",t].filter(Boolean).join("--")}function it({width:t,height:e}){const n=t/e;return Number.isFinite(n)?n:1}var st=Object.freeze([1200,600,300,0]);function ot(t,e){return"function"==typeof t?t(e):t}function rt(t,e){return void 0!==e?ot(t,e):void 0}function lt(t,e,n,i=0){if(void 0===e)return;const s=rt(t,e);return Math.round(Math.max(void 0===s?function(t,e){const n=st.findIndex(t=>t<=e);return ot(t[Math.max(n,0)],e)}(n,e):s,i))}function at(t,{spacing:e,padding:n,componentsProps:i,render:s}){return{spacing:lt(e,t,[20,15,10,5]),padding:lt(n,t,[0,0,0,0]),componentsProps:ot(i,t)||{},render:ot(s,t)}}function ct(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function dt(t,e,n,i,s,o,r){let l,a;const c=t=>{const e=o*(s-1)+2*r*s;return`calc((${t.match(/^\s*calc\((.*)\)\s*$/)?.[1]??t} - ${e}px) / ${ct((i-e)/n,5)})`},d=t.srcSet;return d&&d.length>0&&(l=d.concat(d.some(({width:e})=>e===t.width)?[]:[{src:t.src,width:t.width,height:t.height}]).sort((t,e)=>t.width-e.width).map(t=>`${t.src} ${t.width}w`).join(", ")),a=e?.size?(e.sizes||[]).map(({viewport:t,size:e})=>`${t} ${c(e)}`).concat(c(e.size)).join(", "):`${Math.ceil(n/i*100)}vw`,{srcSet:l,sizes:a}}var ht=c(function({as:t,render:e,context:n,classes:i=[],variables:s={},style:o,className:r,children:l,...a},c){const d=function(...t){return t.filter(Boolean).join(" ")}(...(Array.isArray(i)?i:[i]).filter(t=>"string"==typeof t).map(nt),r),h={style:{...Object.fromEntries(Object.entries(s).map(([t,e])=>{return[(n=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),`--${nt(n)}`),"number"==typeof e?ct(e,5):e];var n})),...o},className:d,children:l,...a};if(e){const t=e({ref:c,...h},n);if(t)return t}return p(t||"div",{ref:c,...h})}),ut=c(function({photo:t,index:e,width:n,height:i,onClick:s,render:{wrapper:o,link:r,button:l,image:a,extras:c}={},componentsProps:{link:d,button:h,wrapper:u,image:m}={}},g){const{href:f}=t,w={photo:t,index:e,width:ct(n,3),height:ct(i,3)};let T;return T=f?{...d,as:"a",render:r,classes:["photo","link"],href:f,onClick:s}:s?{...h,as:"button",type:"button",render:l,classes:["photo","button"],onClick:s}:{...u,render:o,classes:"photo"},p(ht,{ref:g,variables:{photoWidth:w.width,photoHeight:w.height},context:w,...T,children:[p(ht,{as:"img",classes:"image",render:a,context:w,...m}),c?.({},w)]})}),pt=c(function({layout:t,sizes:e,model:i,skeleton:s,onClick:o,render:{container:r,track:l,photo:a,...c}={},componentsProps:{container:d,track:h,link:u,button:m,wrapper:g,image:f}={}},w){const{spacing:T,padding:y,containerWidth:b,tracks:v,variables:k,horizontal:q}=i||{};return p(ht,{role:"group","aria-label":"Photo album",...d,variables:{spacing:T,padding:y,containerWidth:b,...k},classes:["",t],render:r,ref:w,children:[void 0!==T&&void 0!==y&&void 0!==b&&v?.map(({photos:t,variables:i},s)=>{const r=t.length,d=q?r:v.length;return n(ht,{...h,key:s,render:l,classes:"track",variables:{trackSize:r,...i}},t.map(t=>{const{photo:n,index:i,width:s}=t,{key:r,src:l,alt:h="",title:w,label:v}=n,k=o?t=>{o({event:t,photo:n,index:i})}:void 0;if(a){const e=a({onClick:k},t);if(e)return e}const q=t=>v?{"aria-label":v,...t}:t;return p(ut,{onClick:k,render:c,componentsProps:{image:{loading:"lazy",decoding:"async",src:l,alt:h,title:w,...dt(n,e,s,b,d,T,y),...ot(f,t)},link:q(ot(u,t)),button:q(ot(m,t)),wrapper:ot(g,t)},...t},r??i)}))}),void 0===b&&s]})});function mt(t,e,n,i){return(e-(t.length-1)*n-2*i*t.length)/t.reduce((t,e)=>t+it(e),0)}function gt(t,e,n,i,s,o,r){const l=t.slice(e,n),a=mt(l,i,s,o);return a>0?(a-r)**2*l.length:void 0}function ft(t,e){const[n,i]=t;if(n===e)return t;if(void 0!==i&&void 0!==e&&void 0!==n&&e===i&&Math.abs(e-n)<=20){const s=Math.min(n,e),o=Math.max(n,e);return s===n&&o===i?t:[s,o]}return[e,n]}function wt(t,e,n){const[[i],o]=s(ft,[n]),l=function(t){const[e,n]=a(t);return t===e||t&&e&&t.length===e.length&&!t.some((t,n)=>t!==e[n])?e:(n(t),t)}(e),c=r(void 0);return{containerRef:m(e=>{c.current?.disconnect(),c.current=void 0;const n=()=>o(function(t,e){let n=t?.clientWidth;if(void 0!==n&&e&&e.length>0){const t=[...e.filter(t=>t>0)].sort((t,e)=>e-t);t.push(Math.floor(t[t.length-1]/2)),n=t.find((e,i)=>e<=n||i===t.length-1)}return n}(e,l));n(),e&&"undefined"!=typeof ResizeObserver&&(c.current=new ResizeObserver(n),c.current.observe(e)),"function"==typeof t?t(e):t&&(t.current=e)},[t,l]),containerWidth:i}}var Tt=c(function({photos:t,breakpoints:e,defaultContainerWidth:n,...i},s){const{containerRef:o,containerWidth:r}=wt(s,e,n),{spacing:l,padding:a,targetRowHeight:c,minPhotos:d,maxPhotos:h,...m}=function(t,{photos:e,targetRowHeight:n,rowConstraints:i,...s}){const{spacing:o,padding:r,componentsProps:l,render:a}=at(t,s),{singleRowMaxHeight:c,minPhotos:d,maxPhotos:h}=rt(i,t)||{};if(void 0!==c&&void 0!==o&&void 0!==r){const t=Math.floor(e.reduce((t,{width:e,height:n})=>t+e/n*c+2*r,o*(e.length-1)));t>0&&(l.container={...l.container},l.container.style={maxWidth:t,...l.container.style})}return{...s,targetRowHeight:lt(n,t,[t=>t/5,t=>t/4,t=>t/3,t=>t/2]),render:a,spacing:o,padding:r,minPhotos:d,maxPhotos:h,componentsProps:l}}(r,{photos:t,...i});return p(pt,{layout:"rows",ref:o,model:u(()=>void 0!==r&&void 0!==l&&void 0!==a&&void 0!==c?function(t,e,n,i,s,o,r){const l=Math.min(function(t,e,n,i){return ct(e/n/Math.min(...t.map(t=>it(t))))+(i||0)+2}(t,i,s,o),r||1/0),a=o||1,c=t.length,d=new Array(c+1).fill(1/0),h=new Array(c+1).fill(-1);d[0]=0;for(let m=1;m<=c;m+=1)for(let o=m-a;o>=Math.max(0,m-l);o-=1){if(d[o]===1/0)continue;const r=gt(t,o,m,i,e,n,s);if(void 0===r)break;const l=d[o]+r;(d[m]===1/0||d[m]>l&&(d[m]/l>1.005||-1!==h[m]&&h[m]<o))&&(d[m]=l,h[m]=o)}if(d[c]===1/0)return;const u=[];for(let m=c;0!==m;m=h[m])u.push(m);u.push(0),u.reverse();const p=[];for(let m=1;m<u.length;m+=1){const s=t.slice(u[m-1],u[m]).map((t,e)=>({photo:t,index:u[m-1]+e})),o=mt(s.map(({photo:t})=>t),i,e,n);p.push({photos:s.map(({photo:t,index:e})=>({photo:t,index:e,width:o*it(t),height:o}))})}return{spacing:e,padding:n,containerWidth:i,tracks:p,horizontal:!0}}(t,l,a,r,c,d,h):void 0,[t,l,a,r,c,d,h]),...m})});function yt(t,e,n,i,s,o,r){const l=[],a=r.reduce((t,e)=>t+e,0);for(let c=0;c<t.length-1;c+=1){const d=e.slice(t[c],t[c+1]).map((e,n)=>({photo:e,index:t[c]+n})),h=r.reduce((t,e,n)=>t+(o[c]-o[n])*e,0),u=(s-(t.length-2)*n-2*(t.length-1)*i-h)*r[c]/a;l.push({photos:d.map(({photo:t,index:e})=>({photo:t,index:e,width:u,height:u/it(t)})),variables:{adjustedGaps:h,columnRatio:r[c]}})}return{tracks:l,variables:{totalRatio:a}}}function bt(t,e,n,i,s,o){const r=[],l=[];if(t.length<=o){const s=t.length>0?t.reduce((t,e)=>t+it(e),0)/t.length:1;for(let e=0;e<o;e+=1)r[e]=2*n,l[e]=e<t.length?it(t[e]):s;return yt(Array.from({length:o+1},(e,n)=>Math.min(n,t.length)),t,e,n,i,r,l)}const a=(c=function(t,e,n,i,s){return o=>{const r=[],l=1.5*s;let a=i/it(t[o])+2*n;for(let c=o+1;c<t.length+1&&(r.push([c,(s-a)**2]),!(a>l||c===t.length));c+=1)a+=i/it(t[c])+e+2*n;return r}}(t,e,n,s,(t.reduce((t,e)=>t+s/it(e),0)+e*(t.length-o)+2*n*t.length)/o),d=o,h=0,u=t.length,function(t,e,n){const i=[n];for(let s=n,o=e;o>0;o-=1)[s]=t.get(s)[o],i.push(s);return i.reverse()}(function(t,e,n,i){const s=/* @__PURE__ */new Map,o=/* @__PURE__ */new Set;o.add(n);for(let r=0;r<e;r+=1){const n=[...o.keys()];o.clear(),n.forEach(n=>{const l=r>0?s.get(n)[r][1]:0;t(n).forEach(([t,a])=>{let c=s.get(t);c||(c=[],s.set(t,c));const d=l+a,h=c[r+1];(!h||h[1]>d&&(h[1]/d>1.0001||n<h[0]))&&(c[r+1]=[n,d]),r<e-1&&t!==i&&o.add(t)})})}return s}(c,d,h,u),d,u));var c,d,h,u;for(let p=0;p<a.length-1;p+=1){const i=t.slice(a[p],a[p+1]);r[p]=e*(i.length-1)+2*n*i.length,l[p]=1/i.reduce((t,e)=>t+1/it(e),0)}return yt(a,t,e,n,i,r,l)}function vt(t,e,n,i,s){const{tracks:o,variables:r}=bt(t,e,n,i,(i-e*(s-1)-2*n*s)/s,s);return o.some(t=>t.photos.some(({width:t,height:e})=>t<=0||e<=0))?s>1?vt(t,e,n,i,s-1):void 0:{tracks:o,spacing:e,padding:n,containerWidth:i,variables:{columns:s,...r}}}var kt=c(function({photos:t,breakpoints:e,defaultContainerWidth:n,...i},s){const{containerRef:o,containerWidth:r}=wt(s,e,n),{spacing:l,padding:a,columns:c,...d}=function(t,{columns:e,...n}){return{...n,...at(t,n),columns:lt(e,t,[5,4,3,2],1)}}(r,{photos:t,...i});return p(pt,{layout:"columns",ref:o,model:u(()=>void 0!==r&&void 0!==l&&void 0!==a&&void 0!==c?vt(t,l,a,r,c):void 0,[t,l,a,r,c]),...d})});function qt(t,e,n,i,s){const o=(i-e*(s-1)-2*n*s)/s;if(o<=0)return s>1?qt(t,e,n,i,s-1):void 0;const r=[];for(let a=0;a<s;a+=1)r[a]=0;const l=t.reduce((t,i,s)=>{const l=r.reduce((t,e,n)=>e<r[t]-1?n:t,0);return r[l]=r[l]+o/it(i)+e+2*n,t[l].push({photo:i,index:s}),t},Array.from({length:s},()=>[]));return{spacing:e,padding:n,containerWidth:i,variables:{columns:s},tracks:l.map(t=>({photos:t.map(({photo:t,index:e})=>({photo:t,index:e,width:o,height:o/it(t)}))}))}}var xt=c(function({photos:t,breakpoints:e,defaultContainerWidth:n,...i},s){const{containerRef:o,containerWidth:r}=wt(s,e,n),{spacing:l,padding:a,columns:c,...d}=function(t,{columns:e,...n}){return{...n,...at(t,n),columns:lt(e,t,[5,4,3,2],1)}}(r,{photos:t,...i});return p(pt,{layout:"masonry",ref:o,model:u(()=>void 0!==r&&void 0!==l&&void 0!==a&&void 0!==c?qt(t,l,a,r,c):void 0,[t,l,a,r,c]),...d})}),Et='url("https://res.cloudinary.com/dectzk2b2/image/upload/v1736933014/black_rpie3v.png")',Nt=class{constructor(t){this.backdropOn=!1,this.lightbox=t,this.backgroundElement=null,this.backgroundVideoElement=null,this.referenceVideoElement=null,this.options={toggleBackdropButtonOrder:7},t.on("init",()=>{this.initPswpEvents(t.pswp)})}getRootNode(){return this.lightbox?.pswp?.element?.getRootNode?.()||document}querySelector(t){return this.getRootNode().querySelector?.(t)||document.querySelector(t)}initPswpEvents(t){t.on("afterInit",()=>{setTimeout(()=>{this.backgroundElement.style.display="block",this.backgroundVideoElement.style.display="block"},[500])}),t.on("uiRegister",()=>{t.ui.registerElement({name:"toggle-backdrop-button",title:"Toggle blur backdrop",order:this.options.toggleBackdropButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-0.5" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-backdrop"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-backdrop"/><path id="pswp__icn-show-backdrop" style="display:none" d="M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m0-4q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m0-4q-.425 0-.712-.288T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m0-4q-.425 0-.712-.288T5 6t.288-.712T6 5t.713.288T7 6t-.288.713T6 7m4 8.5q-.625 0-1.062-.437T8.5 14t.438-1.062T10 12.5t1.063.438T11.5 14t-.437 1.063T10 15.5m0-4q-.625 0-1.062-.437T8.5 10t.438-1.062T10 8.5t1.063.438T11.5 10t-.437 1.063T10 11.5m0 7.5q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m0-12q-.425 0-.712-.288T9 6t.288-.712T10 5t.713.288T11 6t-.288.713T10 7m0 14.5q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 12q-.625 0-1.062-.437T12.5 14t.438-1.062T14 12.5t1.063.438T15.5 14t-.437 1.063T14 15.5m0-4q-.625 0-1.062-.437T12.5 10t.438-1.062T14 8.5t1.063.438T15.5 10t-.437 1.063T14 11.5m0 7.5q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m0-12q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m0 14.5q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M18 19q-.425 0-.712-.288T17 18t.288-.712T18 17t.713.288T19 18t-.288.713T18 19m0-4q-.425 0-.712-.288T17 14t.288-.712T18 13t.713.288T19 14t-.288.713T18 15m0-4q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m0-4q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m3 7.5q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15"/><path id="pswp__icn-hide-backdrop" d="m19.1 21.9l-17-17q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l17 17q.275.275.275.7t-.275.7t-.7.275t-.7-.275m-9.1-.4q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m4 0q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m4 0q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m-4-3.5q-.65 0-1.075-.425T8.5 14t.425-1.075T10 12.5t1.075.425T11.5 14t-.425 1.075T10 15.5M6 15q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m11.8-.025l-.775-.775q-.1-.5.213-.85T18 13q.425 0 .713.288T19 14q0 .45-.35.763t-.85.212M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m-6.7-3.05L12.55 9.7q.125-.525.5-.862T14 8.5q.65 0 1.075.425T15.5 10q0 .575-.35.963t-.85.487M6 11q-.425 0-.712-.287T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m12 0q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m-15-.5q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M14 7q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m-4.175-.025l-.8-.8q-.075-.5.225-.837T10 5q.425 0 .712.287T11 6q0 .45-.337.75t-.838.225M18 7q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m-8-3.5q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15" /></svg>',onClick:()=>{this.toggleBackdrop(t)}}),this.createBlurBackground(t)}),t.on("change",()=>{this.backdropOn&&this.updateBlurBackground(t)}),t.on("close",()=>{this.removeBlurBackground(),this.backdropOn=!1})}createBlurBackground(t){const e=t.element;if(!this.backgroundElement){const t=document.createElement("div");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="100vw",t.style.height="100vh",t.style.backgroundSize="cover",t.style.backgroundPosition="center",t.style.filter="blur(44px)",t.style.zIndex=-1,t.style.transition="background-image 0.5s ease, opacity 0.5s ease",t.style.display="none",t.style.backgroundImage=Et,e.append(t),this.backgroundElement=t}if(!this.backgroundVideoElement){const t=document.createElement("video");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="100vw",t.style.height="100vh",t.style.objectFit="cover",t.style.filter="blur(44px)",t.style.zIndex=-1,t.style.display="none",t.style.transition="opacity 0.5s ease",t.muted=!0,t.loop=!0,t.autoplay=!1,t.muted=!0,t.volume=0,e.append(t),this.backgroundVideoElement=t}}toggleBackdrop(t){this.backdropOn?(this.backgroundElement.style.backgroundImage=Et,this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.pause(),this.backdropOn=!1):(this.updateBlurBackground(t),this.backdropOn=!0);const e=this.querySelector("#pswp__icn-hide-backdrop"),n=this.querySelector("#pswp__icn-show-backdrop");e&&(e.style.display=this.backdropOn?"none":"inline"),n&&(n.style.display=this.backdropOn?"inline":"none")}updateBlurBackground(t){const e=t.currSlide;if(e?.data)if("video"===e.data.type){const t=this.backgroundVideoElement,n=e.content.element;"video"===n?.tagName?.toLowerCase()&&(this.referenceVideoElement=n,this.registerVideoEvents(n,t)),t.style.opacity=0,setTimeout(()=>{t.src=e.data.src,t.load(),this.initBackgroundVideo(),t.style.opacity=1},500),this.backgroundElement&&(this.backgroundElement.style.opacity=0)}else{if(this.backgroundElement){const t=((t,e=32,n=32)=>{if(!t||t.length<6||"undefined"==typeof document)return null;try{const i=O(t,e,n),s=document.createElement("canvas");s.width=e,s.height=n;const o=s.getContext("2d");if(!o)return null;const r=o.createImageData(e,n);return r.data.set(i),o.putImageData(r,0,0),s.toDataURL()}catch(i){return console.warn("[PhotoSwipeBackdrop] Failed to decode blurhash:",i),null}})(e.data.blurhash)||e.data.thumbnailUrl||e.data.src;this.backgroundElement.style.backgroundImage=t?`url("${t}")`:Et,this.backgroundElement.style.backgroundColor="transparent",this.backgroundElement.style.opacity=1}this.backgroundVideoElement&&(this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.src="")}}initBackgroundVideo(){this.referenceVideoElement&&(this.backgroundVideoElement.currentTime=this.referenceVideoElement.currentTime,this.referenceVideoElement.currentTime>0&&!this.referenceVideoElement.paused&&!this.referenceVideoElement.ended&&this.referenceVideoElement.readyState>2&&this.backgroundVideoElement.play())}removeBlurBackground(){this.backgroundElement&&(this.backgroundElement.remove(),this.backgroundVideoElement.remove(),this.backgroundElement=null,this.backgroundVideoElement=null)}registerVideoEvents(t,e){this.foregroundVideoElement=t,t.addEventListener("play",()=>{e.currentTime=t.currentTime,e.play()}),t.addEventListener("pause",()=>{e.pause()}),t.addEventListener("ended",()=>{e.pause(),e.currentTime=0})}},_t=({contents:t=[],selectedIndex:e,onClick:n})=>{const i=r(null);o(()=>{i.current&&s(e)},[e,i.current]);const s=t=>{if(!i.current)return;const e=i.current,n=e.children;if(t<0||t>=n.length)return;const s=n[t],o=e.offsetWidth/2,r=s.offsetLeft+s.offsetWidth/2-o;e.scrollTo({left:r,behavior:"smooth"})};/* @__PURE__ */
|
|
2
|
-
return p("div",{ref:i,className:"scrollbar-hide flex h-28 w-auto items-center justify-center overflow-x-auto bg-black/50",style:{scrollBehavior:"smooth",userSelect:"none",whiteSpace:"nowrap"},children:t.map((t,i)=>/* @__PURE__ */p("button",{className:"relative mx-0.5 inline-block [contain-intrinsic-size:6rem_5rem] [content-visibility:auto] lg:mx-1.5",onClick:()=>((t,e)=>{n(e)})(0,i),children:[
|
|
3
|
-
/* @__PURE__ */p(z,{wrapperClassName:x("h-16 w-24 rounded-md lg:h-20 lg:w-20",i===e&&"border-2 border-[#ff4800]"),src:t.thumbnailUrl,placeholderSrc:t.blurImageUrl,alt:t.caption}),t.type===N.VIDEO&&/* @__PURE__ */p("div",{className:"absolute top-0 left-0 flex size-full items-center justify-center opacity-75",children:/* @__PURE__ */p("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-6 text-white lg:size-9",viewBox:"0 0 24 24",children:/* @__PURE__ */p("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"})})}),t.type===N.AD&&/* @__PURE__ */p("div",{className:"absolute top-1 left-1 text-xs",children:"Ad"})]},`filmstrip-thumbnail-${i}`))})},St=class{constructor(t){this.lightbox=t,this.filmstripVisible=!0,this.options={filmstripButtonOrder:7},t.on("init",()=>{this.initPswpEvents(t.pswp)})}getRootNode(){return this.lightbox?.pswp?.element?.getRootNode?.()||document}getElementById(t){const e=this.getRootNode();return"function"==typeof e.getElementById?e.getElementById(t):e.querySelector?.(`#${t}`)||document.getElementById(t)}querySelector(t){return this.getRootNode().querySelector?.(t)||document.querySelector(t)}initPswpEvents(t){t.on("uiRegister",()=>{t.ui.registerElement({name:"filmstrip-toggle-button",title:"Toggle filmstrip view",order:this.options.filmstripButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-0.5" viewBox="0 0 24 24" id="pswp__icn-show-filmstrip"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-filmstrip"/>\n <path\n d="M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h16q.825 0 1.413.588T22 6v12q0 .825-.587 1.413T20 20zm0-2h16V8H4z" />\n <path\n d="m 5.100795,16.58464 q -0.165328,0 -0.282961,-0.116899 Q 4.700201,16.350842 4.7,16.186347 V 13.398294 Q 4.7,13.233997 4.817834,13.117098 4.935667,13.000199 5.100795,13 h 2.805561 q 0.165328,0 0.283161,0.117098 0.117834,0.117099 0.117633,0.281196 v 2.788053 q 0,0.164296 -0.117633,0.281394 -0.117633,0.117099 -0.283161,0.116899 z"\n\n style="stroke-width:0.199771" />\n <path\n\n d="m 10.572144,16.65489 q -0.165329,0 -0.282961,-0.116899 -0.117633,-0.116899 -0.117834,-0.281394 v -2.788053 q 0,-0.164297 0.117834,-0.281196 0.117832,-0.116899 0.282961,-0.117098 h 2.805561 q 0.165328,0 0.283161,0.117098 0.117834,0.117099 0.117633,0.281196 v 2.788053 q 0,0.164296 -0.117633,0.281394 -0.117633,0.117099 -0.283161,0.116899 z"\n\n style="stroke-width:0.199771" />\n <path\n\n d="m 16.049385,16.724729 q -0.165328,0 -0.282961,-0.116899 -0.117633,-0.116899 -0.117834,-0.281394 v -2.788053 q 0,-0.164297 0.117834,-0.281196 0.117833,-0.116899 0.282961,-0.117098 h 2.805561 q 0.165328,0 0.283161,0.117098 0.117834,0.117099 0.117634,0.281196 v 2.788053 q 0,0.164296 -0.117634,0.281394 -0.117633,0.117099 -0.283161,0.116899 z"\n\n style="stroke-width:0.199771" />\n </svg>\n <svg aria-hidden="true" class="pswp__icn p-0.5" viewBox="0 0 24 24" id="pswp__icn-hide-filmstrip" style="display:none"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-filmstrip"/>\n <path\n d="M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4v2.85L1.35 4.2q-.3-.3-.3-.712t.3-.713t.713-.3t.712.3l18.4 18.4q.3.3.3.7t-.3.7t-.712.3t-.713-.3L17.15 20zm0-2h11.15l-10-10H4zM22 6v11q0 .5-.312.75T21 18t-.687-.262t-.313-.763V8h-8.325q-.4 0-.763-.15t-.637-.425L8.55 5.7q-.225-.25-.275-.525t.075-.55t.35-.45T9.275 4H20q.825 0 1.413.588T22 6"\n />\n <path\n\n d="m 5.100795,16.58464 q -0.165328,0 -0.282961,-0.116899 Q 4.700201,16.350842 4.7,16.186347 V 13.398294 Q 4.7,13.233997 4.817834,13.117098 4.935667,13.000199 5.100795,13 h 2.805561 q 0.165328,0 0.283161,0.117098 0.117834,0.117099 0.117633,0.281196 v 2.788053 q 0,0.164296 -0.117633,0.281394 -0.117633,0.117099 -0.283161,0.116899 z"\n\n style="stroke-width:0.199771" />\n <path\n\n d="m 10.572143,16.65489 q -0.165327,0 -0.282961,-0.116899 -0.117632,-0.116899 -0.117833,-0.281394 v -2.788053 q 0,-0.164297 0.117833,-0.281196 0.117834,-0.116899 0.282961,-0.117098 h 2.805562 q 0.165328,0 0.283161,0.117098 0.117834,0.117099 0.117633,0.281196 v 2.788053 q 0,0.164296 -0.117633,0.281394 -0.117633,0.117099 -0.283161,0.116899 z"\n\n style="stroke-width:0.199771" />\n <path\n\n d="m 16.049385,16.724729 q -0.165327,0 -0.282961,-0.116899 -0.117632,-0.116899 -0.117833,-0.281394 v -2.788053 q 0,-0.164297 0.117833,-0.281196 0.117834,-0.116899 0.282961,-0.117098 h 2.805561 q 0.165328,0 0.283161,0.117098 0.117834,0.117099 0.117634,0.281196 v 2.788053 q 0,0.164296 -0.117634,0.281394 -0.117633,0.117099 -0.283161,0.116899 z"\n\n style="stroke-width:0.199771" />\n </svg>\n\n ',onClick:()=>{this.toggleFilmstrip()}}),t.ui.registerElement({name:"filmstrip",isButton:!1,appendTo:"root",html:'\n <div id="filmstrip-container" class="w-full absolute bottom-0">\n </div>\n '})}),t.on("change",()=>{this.filmstripVisible&&this.updateFilmstrip(t)}),t.on("close",()=>{this.cleanupFilmstrip()})}onThumbnailClcik(t){this.lightbox.pswp.goTo(t)}getFilmstripContents(t){const e=t?.options?.dataSource?.items,n=e?.length??0;return this.filmstripContents&&this.filmstripContents.length===n||(this.filmstripContents=(e??[]).map(t=>({id:t.getAttribute("data-pswp-id"),type:t.getAttribute("data-pswp-type"),thumbnailUrl:t.getAttribute("data-pswp-thumbnail-url"),blurImageUrl:t.getAttribute("data-pswp-blur-image-url")||t.getAttribute("data-pswp-blurhash")}))),this.filmstripContents}updateFilmstrip(t){const e=this.getElementById("filmstrip-container");if(!e)return;g(/* @__PURE__ */p(_t,{contents:this.getFilmstripContents(t),selectedIndex:t.currSlide.index,onClick:t=>this.onThumbnailClcik(t)}),e);const n=this.getElementById("pswp-caption-container");n&&"7rem"!==n.style.bottom&&(n.style.bottom="7rem")}toggleFilmstrip(){this.filmstripVisible?this.cleanupFilmstrip():this.updateFilmstrip(this.lightbox.pswp),this.filmstripVisible=!this.filmstripVisible;const t=this.querySelector("#pswp__icn-show-filmstrip"),e=this.querySelector("#pswp__icn-hide-filmstrip");t&&(t.style.display=this.filmstripVisible?"inline":"none"),e&&(e.style.display=this.filmstripVisible?"none":"inline")}cleanupFilmstrip(){const t=this.getElementById("filmstrip-container"),e=this.getElementById("pswp-caption-container");e&&(e.style.bottom="0"),t&&g(null,t),this.filmstripContents=null}},It=class{constructor(t){this.lightbox=t,this.fullscreen=!1,this.options={fullScreenButtonOrder:7},t.on("init",()=>{this.initPswpEvents(t.pswp)})}getRootNode(){return this.lightbox?.pswp?.element?.getRootNode?.()||document}querySelector(t){return this.getRootNode().querySelector?.(t)||document.querySelector(t)}syncFullscreenState(){const t=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;this.fullscreen=Boolean(t);const e=this.querySelector("#pswp__icn-exit-fullscreen"),n=this.querySelector("#pswp__icn-fullscreen");e&&(e.style.display=this.fullscreen?"inline":"none"),n&&(n.style.display=this.fullscreen?"none":"inline")}initPswpEvents(t){const e=()=>this.syncFullscreenState();t.events.add(document,"fullscreenchange",e),t.events.add(document,"webkitfullscreenchange",e),t.on("uiRegister",()=>{(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)&&t.ui.registerElement({name:"fullscreen-button",title:"Toggle fullscreen view",order:this.options.fullScreenButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-1" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-fullscreen"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-exit-fullscreen"/><path id="pswp__icn-fullscreen" d="M5 19h2q.425 0 .713.288T8 20t-.288.713T7 21H4q-.425 0-.712-.288T3 20v-3q0-.425.288-.712T4 16t.713.288T5 17zm14 0v-2q0-.425.288-.712T20 16t.713.288T21 17v3q0 .425-.288.713T20 21h-3q-.425 0-.712-.288T16 20t.288-.712T17 19zM5 5v2q0 .425-.288.713T4 8t-.712-.288T3 7V4q0-.425.288-.712T4 3h3q.425 0 .713.288T8 4t-.288.713T7 5zm14 0h-2q-.425 0-.712-.288T16 4t.288-.712T17 3h3q.425 0 .713.288T21 4v3q0 .425-.288.713T20 8t-.712-.288T19 7z"/><path id="pswp__icn-exit-fullscreen" style="display:none" d="M6 18H4q-.425 0-.712-.288T3 17t.288-.712T4 16h3q.425 0 .713.288T8 17v3q0 .425-.288.713T7 21t-.712-.288T6 20zm12 0v2q0 .425-.288.713T17 21t-.712-.288T16 20v-3q0-.425.288-.712T17 16h3q.425 0 .713.288T21 17t-.288.713T20 18zM6 6V4q0-.425.288-.712T7 3t.713.288T8 4v3q0 .425-.288.713T7 8H4q-.425 0-.712-.288T3 7t.288-.712T4 6zm12 0h2q.425 0 .713.288T21 7t-.288.713T20 8h-3q-.425 0-.712-.288T16 7V4q0-.425.288-.712T17 3t.713.288T18 4z"/></svg>',onClick:()=>{this.toggleFullscreen(t)}})})}toggleFullscreen(t){const e=t.element;this.fullscreen?(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),t.options.showHideAnimationType="zoom",this.fullscreen=!1):(e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen(),t.options.showHideAnimationType="fade",this.fullscreen=!0);const n=this.querySelector("#pswp__icn-exit-fullscreen"),i=this.querySelector("#pswp__icn-fullscreen");n&&(n.style.display=this.fullscreen?"inline":"none"),i&&(i.style.display=this.fullscreen?"none":"inline")}},Ct=class{constructor(t,e={}){this.lightbox=t,this.autoHideTimer=null,this.uiVisible=!0,this.options=Object.assign({defaultDelayMs:4e3,playPauseButtonOrder:9,progressBarPosition:"top",progressBarTransition:"ease",restartOnSlideChange:!0,autoHideProgressBar:!0},e),this.setSlideshowLength(Number(localStorage.getItem("pswp_delay"))||this.options.defaultDelayMs),this.slideshowIsRunning=!1,this.slideshowTimerID=null,this.wakeLockIsRunning=!1,this.wakeLockSentinel=null,this.lightbox.on("init",()=>{this.init(this.lightbox.pswp)})}getRootNode(){return this.lightbox?.pswp?.element?.getRootNode?.()||document}querySelector(t){return this.getRootNode().querySelector?.(t)||document.querySelector(t)}injectProgressBarStyles(){const t=this.getRootNode(),e=t===document?document.head:t;if(!e||e.querySelector("style[data-pswp-slideshow]"))return;const n=document.createElement("style");n.setAttribute("data-pswp-slideshow",""),n.textContent=`.pswp__progress-bar{position:fixed;${this.options.progressBarPosition}:0;width:0;height:0}.pswp__progress-bar.running{width:100%;height:2px;transition-property:width;background:#ff4800}`,e.appendChild(n)}init(t){t.on("uiRegister",()=>{this.injectProgressBarStyles(),t.ui.registerElement({name:"playpause-button",title:"Toggle slideshow (Space)\nChange delay with +/- while running",order:this.options.playPauseButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-play"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-stop"/><path id="pswp__icn-play" 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"/><path id="pswp__icn-stop" style="display:none" d="M16 19q-.825 0-1.412-.587T14 17V7q0-.825.588-1.412T16 5t1.413.588T18 7v10q0 .825-.587 1.413T16 19m-8 0q-.825 0-1.412-.587T6 17V7q0-.825.588-1.412T8 5t1.413.588T10 7v10q0 .825-.587 1.413T8 19"/></svg>',onClick:()=>{this.setSlideshowState()}}),t.ui.registerElement({name:"playtime",appendTo:"wrapper",tagName:"div",className:"pswp__progress-bar"}),t.events.add(document,"keydown",t=>{switch(t.code){case"Space":this.setSlideshowState(),t.preventDefault();break;case"ArrowUp":case"NumpadAdd":case"Equal":this.changeSlideshowLength(1e3),t.preventDefault();break;case"ArrowDown":case"NumpadSubtract":case"Minus":this.changeSlideshowLength(-1e3),t.preventDefault()}})}),this.lightbox.on("change",()=>{this.slideshowIsRunning&&this.options.restartOnSlideChange&&this.goToNextSlideAfterTimeout()}),this.lightbox.on("close",()=>{this.slideshowIsRunning&&this.setSlideshowState()})}showUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.add("pswp--ui-visible"),this.uiVisible=!0}stopAutoHideTimer(){this.autoHideTimer&&(clearTimeout(this.autoHideTimer),this.autoHideTimer=null)}hideUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.remove("pswp--ui-visible"),this.uiVisible=!1}resetAutoHideTimer(){this.autoHideTimer&&clearTimeout(this.autoHideTimer),this.autoHideTimer=setTimeout(()=>{this.slideshowIsRunning&&this.hideUI(),this.autoHideTimer=null},[3e3])}setSlideshowState(){this.slideshowIsRunning=!this.slideshowIsRunning,this.slideshowIsRunning?(this.goToNextSlideAfterTimeout(),this.showUI(),this.resetAutoHideTimer(),document.addEventListener("touchstart",()=>{this.stopAutoHideTimer(),this.showUI()}),document.addEventListener("touchend",()=>{this.resetAutoHideTimer()}),document.addEventListener("mousemove",()=>{this.uiVisible||this.showUI(),this.resetAutoHideTimer()})):(this.showUI(),this.resetSlideshow(),this.stopAutoHideTimer());const t=this.querySelector("#pswp__icn-stop"),e=this.querySelector("#pswp__icn-play");t&&(t.style.display=this.slideshowIsRunning?"inline":"none"),e&&(e.style.display=this.slideshowIsRunning?"none":"inline");const n=this.querySelector(".pswp__progress-bar");n&&(n.style.opacity=this.options.autoHideProgressBar?null:1),this.toggleWakeLock()}setSlideshowLength(t){this.options.defaultDelayMs=Math.min(Math.max(t,1e3),2147483647),this.options.defaultDelayMs!=t&&localStorage.setItem("pswp_delay",this.options.defaultDelayMs)}changeSlideshowLength(t){if(!this.slideshowIsRunning)return;this.setSlideshowLength(this.options.defaultDelayMs+t),localStorage.setItem("pswp_delay",this.options.defaultDelayMs);const e=this.querySelector(".pswp__counter");e&&(e.innerHTML=this.options.defaultDelayMs/1e3+"s"),this.goToNextSlideAfterTimeout()}isVideoContent(t){return"video"===t?.data?.type}getSlideTimeout(){const t=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(t)){const e=t.element;if(e.paused)return this.options.defaultDelayMs;const n=e.duration,i=e.currentTime;return isNaN(n)||isNaN(i)?this.options.defaultDelayMs:1e3*(n-i)}return this.options.defaultDelayMs}slideContentHasLoaded(){const t=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(t)){const e=t.element;return e.ended||e.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA&&[HTMLMediaElement.NETWORK_IDLE,HTMLMediaElement.NETWORK_LOADING].includes(e.networkState)}return!t.isLoading()}goToNextSlideAfterTimeout(){if(this.resetSlideshow(),this.slideContentHasLoaded()){const t=this.getSlideTimeout();this.slideshowTimerID=setTimeout(()=>{this.lightbox.pswp.next(),this.options.restartOnSlideChange||this.goToNextSlideAfterTimeout()},t),setTimeout(()=>{this.slideshowIsRunning&&this.toggleProgressBar(t)},100)}else this.slideshowTimerID=setTimeout(()=>{this.goToNextSlideAfterTimeout()},200)}getSlideTransition(){return this.isVideoContent(this.lightbox.pswp.currSlide.content)?"linear":this.options.progressBarTransition}toggleProgressBar(t){const e=this.querySelector(".pswp__progress-bar");e&&(t?(e.style.transitionTimingFunction=this.getSlideTransition(),e.style.transitionDuration=`${t}ms`,e.classList.add("running")):e.classList.remove("running"))}toggleWakeLock(){this.wakeLockIsRunning!=this.slideshowIsRunning&&("keepAwake"in screen?screen.keepAwake=this.slideshowIsRunning:"wakeLock"in navigator&&(this.wakeLockSentinel?this.wakeLockSentinel.release().then(()=>(this.wakeLockSentinel=null,!0)).catch(t=>console.error(t)):navigator.wakeLock.request("screen").then(t=>(this.wakeLockSentinel=t,this.wakeLockSentinel.addEventListener("release",()=>{this.wakeLockSentinel=null,this.wakeLockIsRunning=!1}),!0)).catch(t=>{})),this.wakeLockIsRunning=this.slideshowIsRunning)}resetSlideshow(){this.toggleProgressBar(),this.slideshowTimerID&&(clearTimeout(this.slideshowTimerID),this.slideshowTimerID=null)}},Lt={[String(E.NONE)]:function({className:t}){/* @__PURE__ */
|
|
4
|
-
return p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */p("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5z"})})},[E.LINK]:function({className:t}){/* @__PURE__ */
|
|
5
|
-
return p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */p("path",{fill:"currentColor",d:"M7.95 21q-2.05 0-3.5-1.45T3 16.05q0-1 .375-1.9t1.075-1.6l2.625-2.625q.3-.3.713-.3t.712.3t.3.7t-.3.7l-2.65 2.65q-.425.425-.637.963T5 16.05q0 1.225.863 2.088T7.95 19q.575 0 1.125-.213t.975-.637l2.625-2.65q.3-.275.7-.275t.7.3t.3.7t-.3.7L11.45 19.55q-.7.7-1.6 1.075T7.95 21m1.25-6.2q-.3-.3-.3-.712t.3-.713L13.375 9.2q.3-.3.713-.3t.712.3t.3.713t-.3.712L10.625 14.8q-.3.3-.712.3t-.713-.3m6.3-.725q-.3-.3-.3-.7t.3-.7l2.65-2.625q.425-.425.625-.95t.2-1.1q0-1.25-.85-2.125T16.025 5q-.575 0-1.112.213t-.963.637L11.325 8.5q-.3.3-.7.3t-.7-.3t-.3-.712t.3-.713L12.55 4.45q.7-.7 1.6-1.075T16.05 3q2.05 0 3.488 1.45t1.437 3.525q0 .975-.363 1.875t-1.062 1.6l-2.625 2.625q-.3.3-.712.3t-.713-.3"})})},[E.EMAIL]:function({className:t}){/* @__PURE__ */
|
|
6
|
-
return p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */p("path",{fill:"currentColor",d:"M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12v1.45q0 1.475-1.012 2.513T18.5 17q-.875 0-1.65-.375t-1.3-1.075q-.725.725-1.638 1.088T12 17q-2.075 0-3.537-1.463T7 12t1.463-3.537T12 7t3.538 1.463T17 12v1.45q0 .65.425 1.1T18.5 15t1.075-.45t.425-1.1V12q0-3.35-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20h4q.425 0 .713.288T17 21t-.288.713T16 22zm2.125-7.875Q15 13.25 15 12t-.875-2.125T12 9t-2.125.875T9 12t.875 2.125T12 15t2.125-.875"})})},[E.PHONE]:function({className:t}){/* @__PURE__ */
|
|
7
|
-
return p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */p("path",{fill:"currentColor",d:"M19.95 21q-3.125 0-6.175-1.362t-5.55-3.863t-3.862-5.55T3 4.05q0-.45.3-.75t.75-.3H8.1q.35 0 .625.238t.325.562l.65 3.5q.05.4-.025.675T9.4 8.45L6.975 10.9q.5.925 1.187 1.787t1.513 1.663q.775.775 1.625 1.438T13.1 17l2.35-2.35q.225-.225.588-.337t.712-.063l3.45.7q.35.1.575.363T21 15.9v4.05q0 .45-.3.75t-.75.3M6.025 9l1.65-1.65L7.25 5H5.025q.125 1.025.35 2.025T6.025 9m8.95 8.95q.975.425 1.988.675T19 18.95v-2.2l-2.35-.475zm0 0"})})},[E.SMS]:function({className:t}){/* @__PURE__ */
|
|
8
|
-
return p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */p("path",{fill:"currentColor",d:"m6 18l-2.3 2.3q-.475.475-1.088.213T2 19.575V4q0-.825.588-1.412T4 2h16q.825 0 1.413.588T22 4v12q0 .825-.587 1.413T20 18zm-.85-2H20V4H4v13.125zM4 16V4zm4.713-5.288Q9 10.425 9 10t-.288-.712T8 9t-.712.288T7 10t.288.713T8 11t.713-.288m4 0Q13 10.426 13 10t-.288-.712T12 9t-.712.288T11 10t.288.713T12 11t.713-.288m4 0Q17 10.426 17 10t-.288-.712T16 9t-.712.288T15 10t.288.713T16 11t.713-.288"})})},[E.WHATSAPP]:function({className:t}){/* @__PURE__ */
|
|
9
|
-
return p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 258",className:t,"aria-hidden":"true",focusable:"false",children:[
|
|
10
|
-
/* @__PURE__ */p("defs",{children:[/* @__PURE__ */p("linearGradient",{id:"SVGK3KZq49U",x1:"50%",x2:"50%",y1:"100%",y2:"0%",children:[/* @__PURE__ */p("stop",{offset:"0%","stop-color":"#1faf38"}),/* @__PURE__ */p("stop",{offset:"100%","stop-color":"#60d669"})]}),/* @__PURE__ */p("linearGradient",{id:"SVGefMkoEOd",x1:"50%",x2:"50%",y1:"100%",y2:"0%",children:[/* @__PURE__ */p("stop",{offset:"0%","stop-color":"#f9f9f9"}),/* @__PURE__ */p("stop",{offset:"100%","stop-color":"#fff"})]})]}),
|
|
11
|
-
/* @__PURE__ */p("path",{fill:"url(#SVGK3KZq49U)",d:"M5.463 127.456c-.006 21.677 5.658 42.843 16.428 61.499L4.433 252.697l65.232-17.104a123 123 0 0 0 58.8 14.97h.054c67.815 0 123.018-55.183 123.047-123.01c.013-32.867-12.775-63.773-36.009-87.025c-23.23-23.25-54.125-36.061-87.043-36.076c-67.823 0-123.022 55.18-123.05 123.004"}),
|
|
12
|
-
/* @__PURE__ */p("path",{fill:"url(#SVGefMkoEOd)",d:"M1.07 127.416c-.007 22.457 5.86 44.38 17.014 63.704L0 257.147l67.571-17.717c18.618 10.151 39.58 15.503 60.91 15.511h.055c70.248 0 127.434-57.168 127.464-127.423c.012-34.048-13.236-66.065-37.3-90.15C194.633 13.286 162.633.014 128.536 0C58.276 0 1.099 57.16 1.071 127.416m40.24 60.376l-2.523-4.005c-10.606-16.864-16.204-36.352-16.196-56.363C22.614 69.029 70.138 21.52 128.576 21.52c28.3.012 54.896 11.044 74.9 31.06c20.003 20.018 31.01 46.628 31.003 74.93c-.026 58.395-47.551 105.91-105.943 105.91h-.042c-19.013-.01-37.66-5.116-53.922-14.765l-3.87-2.295l-40.098 10.513z"}),
|
|
13
|
-
/* @__PURE__ */p("path",{fill:"#fff",d:"M96.678 74.148c-2.386-5.303-4.897-5.41-7.166-5.503c-1.858-.08-3.982-.074-6.104-.074c-2.124 0-5.575.799-8.492 3.984c-2.92 3.188-11.148 10.892-11.148 26.561s11.413 30.813 13.004 32.94c1.593 2.123 22.033 35.307 54.405 48.073c26.904 10.609 32.379 8.499 38.218 7.967c5.84-.53 18.844-7.702 21.497-15.139c2.655-7.436 2.655-13.81 1.859-15.142c-.796-1.327-2.92-2.124-6.105-3.716s-18.844-9.298-21.763-10.361c-2.92-1.062-5.043-1.592-7.167 1.597c-2.124 3.184-8.223 10.356-10.082 12.48c-1.857 2.129-3.716 2.394-6.9.801c-3.187-1.598-13.444-4.957-25.613-15.806c-9.468-8.442-15.86-18.867-17.718-22.056c-1.858-3.184-.199-4.91 1.398-6.497c1.431-1.427 3.186-3.719 4.78-5.578c1.588-1.86 2.118-3.187 3.18-5.311c1.063-2.126.531-3.986-.264-5.579c-.798-1.593-6.987-17.343-9.819-23.64"})]})},[E.MESSENGER]:function({className:t}){/* @__PURE__ */
|
|
14
|
-
return p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:t,"aria-hidden":"true",focusable:"false",children:[
|
|
15
|
-
/* @__PURE__ */p("defs",{children:/* @__PURE__ */p("radialGradient",{id:"SVGhphmYc3G",cx:"19.247%",cy:"99.465%",r:"108.96%",fx:"19.247%",fy:"99.465%",children:[
|
|
16
|
-
/* @__PURE__ */p("stop",{offset:"0%","stop-color":"#09f"}),
|
|
17
|
-
/* @__PURE__ */p("stop",{offset:"60.975%","stop-color":"#a033ff"}),
|
|
18
|
-
/* @__PURE__ */p("stop",{offset:"93.482%","stop-color":"#ff5280"}),
|
|
19
|
-
/* @__PURE__ */p("stop",{offset:"100%","stop-color":"#ff7061"})]})}),
|
|
20
|
-
/* @__PURE__ */p("path",{fill:"url(#SVGhphmYc3G)",d:"M128 0C55.894 0 0 52.818 0 124.16c0 37.317 15.293 69.562 40.2 91.835c2.09 1.871 3.352 4.493 3.438 7.298l.697 22.77c.223 7.262 7.724 11.988 14.37 9.054L84.111 243.9a10.22 10.22 0 0 1 6.837-.501c11.675 3.21 24.1 4.92 37.052 4.92c72.106 0 128-52.818 128-124.16S200.106 0 128 0"}),
|
|
21
|
-
/* @__PURE__ */p("path",{fill:"#fff",d:"m51.137 160.47l37.6-59.653c5.98-9.49 18.788-11.853 27.762-5.123l29.905 22.43a7.68 7.68 0 0 0 9.252-.027l40.388-30.652c5.39-4.091 12.428 2.36 8.82 8.085l-37.6 59.654c-5.981 9.489-18.79 11.852-27.763 5.122l-29.906-22.43a7.68 7.68 0 0 0-9.25.027l-40.39 30.652c-5.39 4.09-12.427-2.36-8.818-8.085"})]})}},Mt=({open:t,ad:e,onClose:n,captureAdClick:i})=>{const s=Boolean(e?.targetType&&e.targetType!==E.NONE),o=Lt[e?.targetType]??Lt[E.LINK],r=e?.imageUrl&&F(e.imageUrl,["http:","https:"])?e.imageUrl:void 0;/* @__PURE__ */
|
|
22
|
-
return p(et,{open:Boolean(t&&e),onOpenChange:t=>!t&&n?.(),children:/* @__PURE__ */p(J,{className:"border-none p-0",children:[/* @__PURE__ */p(Z,{className:"sr-only",children:[/* @__PURE__ */p(X,{children:e?.title}),/* @__PURE__ */p(tt,{children:e?.description})]}),/* @__PURE__ */p("div",{className:"flex max-w-2xl flex-col overflow-hidden",children:[r&&/* @__PURE__ */p("img",{className:"h-auto w-full object-contain sm:max-h-96",src:r,alt:e?.title||"Advertisement"}),
|
|
23
|
-
/* @__PURE__ */p("div",{className:"flex flex-col gap-2 p-3",children:[/* @__PURE__ */p(B,{variant:"h4",align:"center",lines:2,children:e?.title}),/* @__PURE__ */p(B,{variant:"body3",color:"secondary",align:"center",lines:4,children:e?.description})]}),s&&/* @__PURE__ */p(A,{fullWidth:!0,className:"rounded-none",onClick:()=>{i?.(e?._id,e?.targetType??E.LINK,e?.targetUrl),n?.()},icon:/* @__PURE__ */p(o,{className:"size-5"}),children:e?.targetText})]})]})})},Rt=({style:t,content:e,curateLink:n,onAdClick:i})=>{const{captureAdImpression:s,captureAdEngagement:o,captureAdClick:r}=G(),l=Boolean(n&&i),a=e.ctaBg||"#ff4800",c=e.ctaForeground||"#FFFFFF",d=Lt[e?.targetType??E.LINK];/* @__PURE__ */
|
|
24
|
-
return p("div",{style:t,className:"group relative mb-1 overflow-hidden rounded",children:[
|
|
25
|
-
/* @__PURE__ */p(V,{className:"size-full",threshold:.8,triggerOnce:!0,onChange:t=>{t&&s(e._id)},onClick:()=>o(e._id),children:/* @__PURE__ */p(D,{url:e.src||e.imageUrl,thumbnailUrl:e.src||e.imageUrl,blurhash:e.blurhash,alt:e.caption,onClick:l?i:void 0,pswpData:{id:e._id,type:N.AD,hash:e._id,width:e.width,height:e.height,title:e.title,description:e.description,targetType:e.targetType,targetText:e.targetText,targetUrl:e.targetUrl,thumbnailUrl:e.imageUrl,blurhash:e.blurhash}})}),
|
|
26
|
-
/* @__PURE__ */p("span",{className:"bg-background/70 absolute top-1 right-1 rounded px-1 text-xs font-medium",children:"Ad"}),(e.title||e.targetType!==E.NONE)&&/* @__PURE__ */p("div",{className:"absolute bottom-0 flex w-full flex-col lg:opacity-0 lg:transition-opacity lg:group-hover:opacity-100",children:[e.title&&/* @__PURE__ */p("div",{className:"bg-background/60 px-3 py-1",children:/* @__PURE__ */p("h3",{className:"line-clamp-1 text-sm font-medium",children:e.title})}),e?.targetType!==E.NONE&&/* @__PURE__ */p("button",{className:"flex w-full items-center justify-center gap-1 rounded-none border-0 py-2 text-nowrap sm:gap-2",style:{backgroundColor:a,color:c},onClick:()=>{l?i?.():r(e._id,e.targetType,e.targetUrl)},children:[/* @__PURE__ */p("span",{style:{color:c},children:/* @__PURE__ */p(d,{})}),e?.targetText]})]})]})},Bt=({style:t,gamConfig:e,slotIndex:n,eventId:i,organizationId:s})=>{const l=r(null),a=r(null),{trackGamAnalytics:c}=G(),d=`gam-slot-${i??"ev"}-${n}`,h=Math.max(1,Math.round(t?.width||e.sizes[0]?.[0]||300)),u=Math.max(1,Math.round(t?.height||e.sizes[0]?.[1]||250)),m=r({w:h,h:u});return o(()=>{let t=!1,n=null,o=null,r=null,h=null;return(async()=>{await j(),!t&&l.current&&window.googletag.cmd.push(()=>{if(t)return;Q(d);const{w:u,h:p}=m.current,g=[[u,p],...e.sizes],f=window.googletag.defineSlot(e.adUnitPath,g,d)?.addService(window.googletag.pubads());if(!f)return;a.current=f,o=window.googletag.pubads(),i?f.setConfig({targeting:{qrati_event:i,...e.categories.length>0?{qrati_category:e.categories}:{}}}):e.categories.length>0&&f.setConfig({targeting:{qrati_category:e.categories}}),r=t=>{t.slot===f&&c({eventId:i,organizationId:s,type:w.GAM_IMPRESSION,creativeId:String(t.creativeId??""),lineItemId:String(t.lineItemId??""),advertiserId:String(t.advertiserId??""),isEmpty:t.isEmpty??!1})},o.addEventListener("slotRenderEnded",r),h=t=>{t.slot===f&&c({eventId:i,organizationId:s,type:w.GAM_VIEWABLE})},o.addEventListener("impressionViewable",h);const T=l.current;T&&(n=Y({container:T,onClick:()=>{c({eventId:i,organizationId:s,type:w.GAM_CLICK})}}),$(),window.googletag.display(d))})})(),()=>{t=!0,n?.(),o&&"function"==typeof o.removeEventListener&&(r&&o.removeEventListener("slotRenderEnded",r),h&&o.removeEventListener("impressionViewable",h));const e=a.current;a.current=null,e&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([e])})}},[i,e.adUnitPath,e.categories,s,d]),/* @__PURE__ */p("div",{style:{width:h,height:u},className:"relative overflow-hidden rounded bg-neutral-100 dark:bg-neutral-800","data-gam-slot-index":n,children:/* @__PURE__ */p("div",{id:d,ref:l,style:{width:h,height:u},className:"gam-ad-slot"})})},At=(t,e)=>{if(!t||!e)return null;const n=e[t];if(!n)return null;try{const t=new Date(String(n)),e=/* @__PURE__ */new Date,i=t.getFullYear()===e.getFullYear(),s={weekday:"long",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0};return i||(s.year="numeric"),t.toLocaleString("en-US",s).replace(","," •")}catch{return null}},Vt=t(null),zt=()=>{const t=f(Vt);if(!t)throw new Error("Popover components must be used within a Popover");return t},Ot=({children:t,className:e,open:n,onOpenChange:i})=>{const[s,o]=a(!1),c="boolean"==typeof n,d=c?n:s,h=l(),u=`popover-trigger-${h}`,m=`popover-content-${h}`,g=r(null);/* @__PURE__ */
|
|
27
|
-
return p(Vt.Provider,{value:{isOpen:d,setIsOpen:t=>{c||o(t),i?.(t)},triggerId:u,contentId:m,triggerRef:g},children:/* @__PURE__ */p("div",{"data-slot":"popover",className:x("relative inline-block",e),children:t})})},Ft=({children:t,asChild:n,className:i,onClick:s,...o})=>{const{isOpen:r,setIsOpen:l,triggerId:a,contentId:c,triggerRef:d}=zt();if(n){const n=Array.isArray(t)?t[0]:t;if(n&&n.type){const t=n.props?.className;return e(n,{ref:t=>{d.current=t},id:a,className:i?t?`${t} ${i}`:i:t,"aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r?c:void 0,onClick:t=>{l(!r),n.props?.onClick?.(t)},"data-state":r?"open":"closed"})}}/* @__PURE__ */
|
|
28
|
-
return p("button",{ref:d,id:a,type:"button","aria-haspopup":"dialog","aria-expanded":r,"aria-controls":r?c:void 0,"data-slot":"popover-trigger","data-state":r?"open":"closed",className:i,onClick:t=>{l(!r),s?.(t)},...o,children:t})},Pt=({children:t,className:e,align:n="center",side:i="top",sideOffset:s=4,...l})=>{const{isOpen:c,setIsOpen:u,contentId:m,triggerRef:g}=zt(),{organization:f,portalContainer:w}=_(),T=r(null),[y,b]=a(null);if(d(()=>{if(!c)return;const t=()=>{if(!g.current||!T.current)return;const t=g.current.getBoundingClientRect(),e=T.current.getBoundingClientRect();let o=t.left,r=t.bottom+s;"center"===n&&(o=t.left+t.width/2-e.width/2),"end"===n&&(o=t.right-e.width),"top"===i&&(r=t.top-e.height-s),"left"===i&&(o=t.left-e.width-s,r=t.top+t.height/2-e.height/2),"right"===i&&(o=t.right+s,r=t.top+t.height/2-e.height/2),"bottom"===i&&(r=t.bottom+s),b({top:r,left:o})},e=requestAnimationFrame(t);return window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),()=>{cancelAnimationFrame(e),window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0)}},[n,c,i,s,g]),o(()=>{if(!c)return;const t=t=>{const e="function"==typeof t.composedPath?t.composedPath():[],n=t.target,i=T.current&&(T.current.contains(n)||e.includes(T.current)),s=g.current&&(g.current.contains(n)||e.includes(g.current));i||s||u(!1)},e=t=>{"Escape"===t.key&&(u(!1),g.current?.focus())},n=window.setTimeout(()=>{document.addEventListener("mousedown",t)},0);return document.addEventListener("keydown",e),()=>{window.clearTimeout(n),document.removeEventListener("mousedown",t),document.removeEventListener("keydown",e)}},[c,u,g]),!c)return null;const v=/* @__PURE__ */p("div",{ref:T,id:m,role:"dialog","aria-modal":"false","data-state":c?"open":"closed",className:x("bg-background text-foreground border-border shadow-outer rounded outline-none",e),style:{position:"fixed",top:y?.top??0,left:y?.left??0,zIndex:2010,...q(f)},...l,children:t});return"undefined"!=typeof document?h(v,w??document.body):v},Dt=({eventId:t,contentId:e,emojis:n=[],counts:i={},userReaction:s})=>{const{user:l,props:c,organization:d}=_(),h=c?.loginUrl,{handleReactionClick:u,isPending:m}=(()=>{const t=y(),{props:e,user:n}=_(),i=e?.organizationId,s=L({mutationFn:async({eventId:t,contentId:e,emoji:s})=>{await b.post(S.UPDATE_REACTION,{json:{eventId:t,contentId:e,reaction:s},headers:{"x-org-id":i,Authorization:`Bearer ${n?.token}`}})},onMutate:async({eventId:e,contentId:n,emoji:i})=>{const s=[v.CONTENTS_BY_EVENT(e)];await t.cancelQueries({queryKey:s});const o=t.getQueriesData({queryKey:s});return t.setQueriesData({queryKey:s},t=>((t,e,n)=>t?.pages&&Array.isArray(t.pages)?{...t,pages:t.pages.map(t=>t.data?{...t,data:t.data.map(t=>{if(t._id!==e)return t;const i={...t.reactionCounts??{}};return t.userReaction&&t.userReaction!==n&&(i[t.userReaction]=Math.max(0,(i[t.userReaction]??1)-1)),t.userReaction===n?(i[n]=Math.max(0,(i[n]??1)-1),{...t,reactionCounts:i,userReaction:void 0}):(i[n]=(i[n]??0)+1,{...t,reactionCounts:i,userReaction:n})})}:t)}:t)(t,n,i)),{previousData:o}},onError:(e,n,i)=>{i?.previousData?.forEach(([e,n])=>{t.setQueryData(e,n)}),H.error("Failed to add reaction"),console.error("Error handling reaction click:",e,n)}});return{handleReactionClick:async(t,e,i)=>{if(!t||!e||!i)return!1;if(!n)return H.error("Please login to react"),!1;try{return await s.mutateAsync({eventId:t,contentId:e,emoji:i}),!0}catch(o){return!1}},isPending:s.isPending}})(),[g,f]=a(!1),[w,k]=a(null),q=r(null),E=Object.values(i).reduce((t,e)=>t+e,0);return o(()=>()=>{q.current&&clearTimeout(q.current)},[]),/* @__PURE__ */p(Ot,{open:g,onOpenChange:f,children:[/* @__PURE__ */p(Ft,{asChild:!0,children:/* @__PURE__ */p("button",{type:"button",className:x("bg-background/50 flex items-center gap-1 rounded px-2 py-1 backdrop-blur-sm transition-transform duration-150 ease-out will-change-transform active:scale-95 sm:gap-2 sm:py-0",w&&"scale-[1.03] shadow-sm"),children:[(n||[]).slice().sort((t,e)=>(i[e]||0)-(i[t]||0)).slice(0,1).map(t=>/* @__PURE__ */p("span",{className:x("text-sm transition-transform duration-150 ease-out sm:text-lg",w===(s||t)&&"scale-125"),children:s||t},`${e}-${t}-1`)),E>0&&/* @__PURE__ */p("span",{className:"text-xs font-bold sm:text-sm",children:E||0})]})}),/* @__PURE__ */p(Pt,{side:"top",align:"end",children:[l?null:/* @__PURE__ */p("div",d?.customAuth?{className:"p-2 font-semibold",children:["Please"," ",
|
|
29
|
-
/* @__PURE__ */p("a",{className:"text-info underline",href:h,children:"Login"})," ","to react"]}:{className:"p-2 font-semibold",children:["Please"," ",
|
|
30
|
-
/* @__PURE__ */p(R,{className:"text-info underline",to:T.LOGIN,children:"Login"})," ","to react"]}),l&&/* @__PURE__ */p("div",{className:"flex gap-1 p-2",children:n.map(n=>{const o=s===n;/* @__PURE__ */
|
|
31
|
-
return p("div",{className:"flex flex-col items-center",children:[/* @__PURE__ */p("span",{className:"text-xs font-medium",children:i[n]||0}),/* @__PURE__ */p("button",{type:"button",disabled:m,className:x("text-3xl transition-transform duration-150 ease-out disabled:opacity-50",o?"scale-125":"hover:scale-110",w===n&&"scale-125",m&&"cursor-not-allowed"),onClick:()=>(async n=>{!m&&u&&(k(n),f(!1),q.current&&clearTimeout(q.current),q.current=setTimeout(()=>k(null),180),u(t,e,n))})(n),children:n})]},`${e}-${n}-2`)})})]})]})},Ut=({event:t={},content:e,curateLink:n})=>t.engagementStyle===I.CONTEST?/* @__PURE__ */p("button",{className:"bg-background/75 flex items-center gap-1 rounded px-2 py-1",children:[/* @__PURE__ */p(K,{className:"size-4"}),/* @__PURE__ */p("span",{className:"text-xs font-semibold",children:parseFloat(String(e.score||0)).toFixed(1)})]}):t.engagementStyle===I.REACTION&&t.reactionEmojis?.length?/* @__PURE__ */p(Dt,{eventId:t?._id,contentId:e._id,emojis:t?.reactionEmojis,engagementStyle:t?.engagementStyle,counts:e.reactionCounts||{},userReaction:e.userReaction}):null,Ht=({content:t})=>/* @__PURE__ */p("div",{className:"w-full space-y-3 px-3 pb-3",children:[t?.caption&&/* @__PURE__ */p("span",{"data-tooltip-target":"tooltip-default",className:"hidden w-full text-xs drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)] sm:block",children:/* @__PURE__ */p("div",{role:"note",title:t?.caption,className:"lg:text-md line-clamp-1 text-xs text-white lg:font-medium",children:t?.caption})}),/* @__PURE__ */p("div",{className:"flex items-center justify-between",children:/* @__PURE__ */p("span",{className:"lg:text-md line-clamp-1 text-sm font-medium text-white drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)]",children:t?.user?.name})})]}),jt=({event:t,content:e,style:n,timestampField:s,curateLink:o,onChangeFaceUrl:r,hideControls:l,showQuickSearch:a})=>{const c=`content-${e._id}`,d=u(()=>At(s,e),[s,e]),h=m(()=>{r?.(e?.url);const t=document.getElementById("media-gallery-container");t&&t.scrollIntoView({behavior:"smooth",block:"start"})},[r,e?.url]),g=u(()=>({id:e._id,type:N.IMAGE,hash:e._id,width:e.width,height:e.height,thumbnailUrl:e.thumbnailUrl,blurhash:e.blurhash,caption:e.caption}),[e._id,e.width,e.height,e.thumbnailUrl,e.blurhash,e.caption]);/* @__PURE__ */
|
|
32
|
-
return p("div",{id:c,style:n,className:"group relative mb-1 overflow-hidden rounded [content-visibility:auto]",children:[/* @__PURE__ */p(D,{url:e.src,alt:e.caption,blurhash:e.blurhash,thumbnailUrl:e.thumbnailUrl,curateLink:o,pswpData:g}),!l&&/* @__PURE__ */p(i,{children:[d&&/* @__PURE__ */p("div",{className:"absolute top-2 left-2 max-w-[calc(100%-80px)] truncate rounded bg-black/50 px-2 py-0.5 text-xs text-white backdrop-blur-sm",children:d}),a&&(e.faces?.length??0)>0&&/* @__PURE__ */p("button",{className:"bg-primary absolute top-2 right-2 rounded-full p-1 text-gray-200 opacity-50 transition-all sm:p-1.5 sm:hover:scale-110 sm:hover:opacity-100",onClick:h,children:/* @__PURE__ */p(W,{className:"text-primary-foreground"})}),
|
|
33
|
-
/* @__PURE__ */p("div",{className:"",children:[/* @__PURE__ */p("div",{className:"absolute bottom-0 w-full rounded-b",children:/* @__PURE__ */p(Ht,{content:e})}),/* @__PURE__ */p("div",{className:"absolute right-2 bottom-2",children:/* @__PURE__ */p(Ut,{event:t,content:e,curateLink:o})})]})]})]})},$t=({content:t,style:e,event:n,timestampField:i,curateLink:s,hideControls:o})=>{const r=u(()=>At(i,t),[i,t]);/* @__PURE__ */
|
|
34
|
-
return p("div",{id:`content-${t._id}`,className:"group relative mb-1 overflow-hidden rounded [content-visibility:auto]",style:e,children:[/* @__PURE__ */p(D,{url:t.src??t.url,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,alt:t.caption,curateLink:s,pswpData:{id:t._id,type:N.VIDEO,hash:t._id,width:t.width,height:t.height,thumbnailUrl:t.thumbnailUrl,blurhash:t.blurhash,caption:t.caption}}),!o&&/* @__PURE__ */p("div",{className:"transition-opacity duration-500",children:[r&&/* @__PURE__ */p("div",{className:"absolute top-2 left-2 max-w-[calc(100%-80px)] truncate rounded bg-black/50 px-2 py-0.5 text-xs text-white backdrop-blur-sm",children:r}),
|
|
35
|
-
/* @__PURE__ */p("div",{className:"absolute bottom-0 w-full rounded-b",children:/* @__PURE__ */p(Ht,{content:t})}),
|
|
36
|
-
/* @__PURE__ */p("div",{className:"absolute right-2 bottom-2",children:/* @__PURE__ */p(Ut,{event:n,content:t,curateLink:s})})]})]})},Gt=({event:t,contents:e=[],gamConfig:n,singleColumnMode:s,kioskMode:l,timestampField:c,curateLink:d,onChangeFaceUrl:h,showQuickSearch:m})=>{const g=r(null),f=r(null),w=u(()=>`gallery-${t?._id??""}`,[t?._id]),{captureAdImpression:T,captureAdClick:y}=G(),{portalContainer:b,organization:v}=_(),q=v?._id,[E,S]=a(null);o(()=>{const t=f.current;if(!d&&t){const e=new P({gallery:t,children:"a",counter:!1,bgOpacity:1,wheelToZoom:!0,pinchToClose:!0,zoom:!1,pswpModule:U,appendToEl:b??document.body});g.current=e,new M(e),new St(e),new Nt(e),new C(e,T,y),new It(e),new Ct(e),e.init()}return()=>{g.current?.destroy?.(),g.current=null}},[t?.galleryLayout,d,y,T,w,b]);const I=u(()=>{switch(t?.galleryLayout){case k.ROW:return Tt;case k.COLUMN:return kt;case k.MASONRY:return xt;default:return Tt}},[t?.galleryLayout]),L=u(()=>e.map(t=>({src:t.type===N.IMAGE||t.type===N.VIDEO?t.url:t.type===N.GAM_AD?"":t.imageUrl,...t,width:t.dimension?.width||t.width||4,height:t.dimension?.height||t.height||3})),[e]),R=u(()=>({container:({ref:t,className:e,children:n})=>/* @__PURE__ */p("div",{ref:t,className:e??"",children:n}),photo:(e,{photo:i,width:s,height:o,index:r})=>{const a=i;let u=null;switch(a.type){case N.IMAGE:u=jt;break;case N.VIDEO:u=$t;break;case N.AD:u=Rt;break;case N.GAM_AD:return n?/* @__PURE__ */p(Bt,{style:{width:s,height:o},gamConfig:n,slotIndex:a.slotIndex??r,eventId:t?._id,organizationId:q},`${a._id??r}-${r}`):null;default:u=null}return u&&/* @__PURE__ */p(u,{style:{width:s,height:o},event:t,content:a,timestampField:c,onAdClick:d?()=>S(a):void 0,hideControls:l,curateLink:d?`${d}/${a._id}`:null,onChangeFaceUrl:h,showQuickSearch:m},`${a._id??r}-${r}`)}}),[t,n,q,c,d,l,h,m]);/* @__PURE__ */
|
|
37
|
-
return p(i,{children:[/* @__PURE__ */p("div",{id:w,ref:f,className:x(s?"w-full lg:w-1/3":"w-full"),children:/* @__PURE__ */p(I,{spacing:4,rowConstraints:t=>{const e={minPhotos:1,maxPhotos:4,singleRowMaxHeight:400};return s&&(e.minPhotos=1,e.maxPhotos=t<400?2:t<800?3:4),e},columns:t=>s?1:t<400?2:t<800?3:4,photos:L,render:R})}),/* @__PURE__ */p(Mt,{open:Boolean(E),ad:E,onClose:()=>S(null),captureAdClick:y})]})};export{Gt as default};
|
package/umd/Cko4QHwX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,n=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,p=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),a=(p,a,b)=>(b=null!=p?e(n(p)):{},((e,n,p,a)=>{if(n&&"object"==typeof n||"function"==typeof n)for(var b,c=o(n),u=0,O=c.length;u<O;u++)b=c[u],l.call(e,b)||void 0===b||t(e,b,{get:(e=>n[e]).bind(null,b),enumerable:!(a=r(n,b))||a.enumerable});return e})(!a&&p&&p.__esModule?b:t(b,"default",{value:p,enumerable:!0}),p));export{a as n,p as t};
|
package/umd/D8Se70tP2.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./qbHuxVSe.js";function t({className:t}){/* @__PURE__ */
|
|
2
|
-
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M6 20q-.825 0-1.412-.587T4 18v-2q0-.425.288-.712T5 15t.713.288T6 16v2h12v-2q0-.425.288-.712T19 15t.713.288T20 16v2q0 .825-.587 1.413T18 20zm5-12.15L9.125 9.725q-.3.3-.712.288T7.7 9.7q-.275-.3-.288-.7t.288-.7l3.6-3.6q.15-.15.325-.212T12 4.425t.375.063t.325.212l3.6 3.6q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L13 7.85V15q0 .425-.288.713T12 16t-.712-.288T11 15z"})})}function r(e,t){return new Promise(function(r,i){let o;return n(e).then(function(e){try{return o=e,r(new Blob([t.slice(0,2),o,t.slice(2)],{type:"image/jpeg"}))}catch(e){return i(e)}},i)})}var n=e=>new Promise((t,r)=>{const n=new FileReader;n.addEventListener("load",({target:{result:e}})=>{const n=new DataView(e);let i=0;if(65496!==n.getUint16(i))return r("not a valid JPEG");for(i+=2;;){const o=n.getUint16(i);if(65498===o)break;const a=n.getUint16(i+2);if(65505===o&&1165519206===n.getUint32(i+4)){const o=i+10;let f;switch(n.getUint16(o)){case 18761:f=!0;break;case 19789:f=!1;break;default:return r("TIFF header contains invalid endian")}if(42!==n.getUint16(o+2,f))return r("TIFF header contains invalid version");const s=n.getUint32(o+4,f),c=o+s+2+12*n.getUint16(o+s,f);for(let e=o+s+2;e<c;e+=12)if(274==n.getUint16(e,f)){if(3!==n.getUint16(e+2,f))return r("Orientation data type is invalid");if(1!==n.getUint32(e+4,f))return r("Orientation data count is invalid");n.setUint16(e+8,1,f);break}return t(e.slice(i,i+2+a))}i+=2+a}return t(new Blob)}),n.readAsArrayBuffer(e)}),i={},o={get exports(){return i},set exports(e){i=e}};!function(){var e,t,r={};o.exports=r,r.parse=function(e,t){for(var n=r.bin.readUshort,i=r.bin.readUint,o=0,a={},f=new Uint8Array(e),s=f.length-4;101010256!=i(f,s);)s--;o=s,o+=4;var c=n(f,o+=4);n(f,o+=2);var l=i(f,o+=2),u=i(f,o+=4);o+=4,o=u;for(var h=0;h<c;h++){i(f,o),o+=4,o+=4,o+=4,i(f,o+=4),l=i(f,o+=4);var d=i(f,o+=4),g=n(f,o+=4),A=n(f,o+2),w=n(f,o+4);o+=6;var p=i(f,o+=8);o+=4,o+=g+A+w,r._readLocal(f,p,a,l,d,t)}return a},r._readLocal=function(e,t,n,i,o,a){var f=r.bin.readUshort,s=r.bin.readUint;s(e,t),f(e,t+=4),f(e,t+=2);var c=f(e,t+=2);s(e,t+=2),s(e,t+=4),t+=4;var l=f(e,t+=8),u=f(e,t+=2);t+=2;var h=r.bin.readUTF8(e,t,l);if(t+=l,t+=u,a)n[h]={size:o,csize:i};else{var d=new Uint8Array(e.buffer,t);if(0==c)n[h]=new Uint8Array(d.buffer.slice(t,t+i));else{if(8!=c)throw"unknown compression method: "+c;var g=new Uint8Array(o);r.inflateRaw(d,g),n[h]=g}}},r.inflateRaw=function(e,t){return r.F.inflate(e,t)},r.inflate=function(e,t){return e[0],e[1],r.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},r.deflate=function(e,t){t??={level:6};var n=0,i=new Uint8Array(50+Math.floor(1.1*e.length));i[n]=120,i[n+1]=156,n+=2,n=r.F.deflateRaw(e,i,n,t.level);var o=r.adler(e,0,e.length);return i[n+0]=o>>>24&255,i[n+1]=o>>>16&255,i[n+2]=o>>>8&255,i[n+3]=o>>>0&255,new Uint8Array(i.buffer,0,n+4)},r.deflateRaw=function(e,t){t??={level:6};var n=new Uint8Array(50+Math.floor(1.1*e.length)),i=r.F.deflateRaw(e,n,i,t.level);return new Uint8Array(n.buffer,0,i)},r.encode=function(e,t){t??=!1;var n=0,i=r.bin.writeUint,o=r.bin.writeUshort,a={};for(var f in e){var s=!r._noNeed(f)&&!t,c=e[f],l=r.crc.crc(c,0,c.length);a[f]={cpr:s,usize:c.length,crc:l,file:s?r.deflateRaw(c):c}}for(var f in a)n+=a[f].file.length+30+46+2*r.bin.sizeUTF8(f);n+=22;var u=new Uint8Array(n),h=0,d=[];for(var f in a){var g=a[f];d.push(h),h=r._writeHeader(u,h,f,g,0)}var A=0,w=h;for(var f in a)g=a[f],d.push(h),h=r._writeHeader(u,h,f,g,1,d[A++]);var p=h-w;return i(u,h,101010256),h+=4,o(u,h+=4,A),o(u,h+=2,A),i(u,h+=2,p),i(u,h+=4,w),h+=4,h+=2,u.buffer},r._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},r._writeHeader=function(e,t,n,i,o,a){var f=r.bin.writeUint,s=r.bin.writeUshort,c=i.file;return f(e,t,0==o?67324752:33639248),t+=4,1==o&&(t+=2),s(e,t,20),s(e,t+=2,0),s(e,t+=2,i.cpr?8:0),f(e,t+=2,0),f(e,t+=4,i.crc),f(e,t+=4,c.length),f(e,t+=4,i.usize),s(e,t+=4,r.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==o&&(t+=2,t+=2,f(e,t+=6,a),t+=4),t+=r.bin.writeUTF8(e,t,n),0==o&&(e.set(c,t),t+=c.length),t},r.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var r=t,n=0;n<8;n++)1&r?r=3988292384^r>>>1:r>>>=1;e[t]=r}return e}(),update:function(e,t,n,i){for(var o=0;o<i;o++)e=r.crc.table[255&(e^t[n+o])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^r.crc.update(4294967295,e,t,n)}},r.adler=function(e,t,r){for(var n=1,i=0,o=t,a=t+r;o<a;){for(var f=Math.min(o+5552,a);o<f;)i+=n+=e[o++];n%=65521,i%=65521}return i<<16|n},r.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,r){e[t]=255&r,e[t+1]=r>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,r){e[t]=255&r,e[t+1]=r>>8&255,e[t+2]=r>>16&255,e[t+3]=r>>24&255},readASCII:function(e,t,r){for(var n="",i=0;i<r;i++)n+=String.fromCharCode(e[t+i]);return n},writeASCII:function(e,t,r){for(var n=0;n<r.length;n++)e[t+n]=r.charCodeAt(n)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,n){for(var i,o="",a=0;a<n;a++)o+="%"+r.bin.pad(e[t+a].toString(16));try{i=decodeURIComponent(o)}catch(i){return r.bin.readASCII(e,t,n)}return i},writeUTF8:function(e,t,r){for(var n=r.length,i=0,o=0;o<n;o++){var a=r.charCodeAt(o);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";e[t+i]=240|a>>18,e[t+i+1]=128|a>>12&63,e[t+i+2]=128|a>>6&63,e[t+i+3]=128|63&a,i+=4}else e[t+i]=224|a>>12,e[t+i+1]=128|a>>6&63,e[t+i+2]=128|63&a,i+=3;else e[t+i]=192|a>>6,e[t+i+1]=128|63&a,i+=2;else e[t+i]=a,i++}return i},sizeUTF8:function(e){for(var t=e.length,r=0,n=0;n<t;n++){var i=e.charCodeAt(n);if(4294967168&i)if(4294965248&i)if(4294901760&i){if(4292870144&i)throw"e";r+=4}else r+=3;else r+=2;else r++}return r}},r.F={},r.F.deflateRaw=function(e,t,n,i){var o=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][i],a=r.F.U,f=r.F._goodIndex;r.F._hash;var s=r.F._putsE,c=0,l=n<<3,u=0,h=e.length;if(0==i){for(;c<h;)s(t,l,c+(E=Math.min(65535,h-c))==h?1:0),l=r.F._copyExact(e,c,E,t,l+8),c+=E;return l>>>3}var d=a.lits,g=a.strt,A=a.prev,w=0,p=0,v=0,m=0,b=0,y=0;for(h>2&&(g[y=r.F._hash(e,0)]=0),c=0;c<h;c++){if(b=y,c+1<h-2){y=r.F._hash(e,c+1);var U=c+1&32767;A[U]=g[y],g[y]=U}if(u<=c){(w>14e3||p>26697)&&h-c>100&&(u<c&&(d[w]=c-u,w+=2,u=c),l=r.F._writeBlock(c==h-1||u==h?1:0,d,w,m,e,v,c-v,t,l),w=p=m=0,v=c);var F=0;c<h-2&&(F=r.F._bestMatch(e,c,A,b,Math.min(o[2],h-c),o[3]));var E=F>>>16,_=65535&F;if(0!=F){_=65535&F;var C=f(E=F>>>16,a.of0);a.lhst[257+C]++;var T=f(_,a.df0);a.dhst[T]++,m+=a.exb[C]+a.dxb[T],d[w]=E<<23|c-u,d[w+1]=_<<16|C<<8|T,w+=2,u=c+E}else a.lhst[e[c]]++;p++}}for(v==c&&0!=e.length||(u<c&&(d[w]=c-u,w+=2,u=c),l=r.F._writeBlock(1,d,w,m,e,v,c-v,t,l),w=0,p=0,w=p=m=0,v=c);7&l;)l++;return l>>>3},r.F._bestMatch=function(e,t,n,i,o,a){var f=32767&t,s=n[f],c=f-s+32768&32767;if(s==f||i!=r.F._hash(e,t-c))return 0;for(var l=0,u=0,h=Math.min(32767,t);c<=h&&0!=--a&&s!=f;){if(0==l||e[t+l]==e[t+l-c]){var d=r.F._howLong(e,t,c);if(d>l){if(u=c,(l=d)>=o)break;c+2<d&&(d=c+2);for(var g=0,A=0;A<d-2;A++){var w=t-c+A+32768&32767,p=w-n[w]+32768&32767;p>g&&(g=p,s=w)}}}c+=(f=s)-(s=n[f])+32768&32767}return l<<16|u},r.F._howLong=function(e,t,r){if(e[t]!=e[t-r]||e[t+1]!=e[t+1-r]||e[t+2]!=e[t+2-r])return 0;var n=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-r];)t++;return t-n},r.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(e,t,n,i,o,a,f,s,c){var l,u,h,d,g,A,w,p,v,m=r.F.U,b=r.F._putsF,y=r.F._putsE;m.lhst[256]++,u=(l=r.F.getTrees())[0],h=l[1],d=l[2],g=l[3],A=l[4],w=l[5],p=l[6],v=l[7];var U=32+(c+3&7?8-(c+3&7):0)+(f<<3),F=i+r.F.contSize(m.fltree,m.lhst)+r.F.contSize(m.fdtree,m.dhst),E=i+r.F.contSize(m.ltree,m.lhst)+r.F.contSize(m.dtree,m.dhst);E+=14+3*w+r.F.contSize(m.itree,m.ihst)+(2*m.ihst[16]+3*m.ihst[17]+7*m.ihst[18]);for(var _=0;_<286;_++)m.lhst[_]=0;for(_=0;_<30;_++)m.dhst[_]=0;for(_=0;_<19;_++)m.ihst[_]=0;var C=U<F&&U<E?0:F<E?1:2;if(b(s,c,e),b(s,c+1,C),c+=3,0==C){for(;7&c;)c++;c=r.F._copyExact(o,a,f,s,c)}else{var T,B;if(1==C&&(T=m.fltree,B=m.fdtree),2==C){r.F.makeCodes(m.ltree,u),r.F.revCodes(m.ltree,u),r.F.makeCodes(m.dtree,h),r.F.revCodes(m.dtree,h),r.F.makeCodes(m.itree,d),r.F.revCodes(m.itree,d),T=m.ltree,B=m.dtree,y(s,c,g-257),y(s,c+=5,A-1),y(s,c+=5,w-4),c+=4;for(var I=0;I<w;I++)y(s,c+3*I,m.itree[1+(m.ordr[I]<<1)]);c+=3*w,c=r.F._codeTiny(p,m.itree,s,c),c=r.F._codeTiny(v,m.itree,s,c)}for(var M=a,x=0;x<n;x+=2){for(var R=t[x],S=R>>>23,Q=M+(8388607&R);M<Q;)c=r.F._writeLit(o[M++],T,s,c);if(0!=S){var H=t[x+1],k=H>>16,O=H>>8&255,L=255&H;y(s,c=r.F._writeLit(257+O,T,s,c),S-m.of0[O]),c+=m.exb[O],b(s,c=r.F._writeLit(L,B,s,c),k-m.df0[L]),c+=m.dxb[L],M+=S}}c=r.F._writeLit(256,T,s,c)}return c},r.F._copyExact=function(e,t,r,n,i){var o=i>>>3;return n[o]=r,n[o+1]=r>>>8,n[o+2]=255-n[o],n[o+3]=255-n[o+1],o+=4,n.set(new Uint8Array(e.buffer,t,r),o),i+(r+4<<3)},r.F.getTrees=function(){for(var e=r.F.U,t=r.F._hufTree(e.lhst,e.ltree,15),n=r.F._hufTree(e.dhst,e.dtree,15),i=[],o=r.F._lenCodes(e.ltree,i),a=[],f=r.F._lenCodes(e.dtree,a),s=0;s<i.length;s+=2)e.ihst[i[s]]++;for(s=0;s<a.length;s+=2)e.ihst[a[s]]++;for(var c=r.F._hufTree(e.ihst,e.itree,7),l=19;l>4&&0==e.itree[1+(e.ordr[l-1]<<1)];)l--;return[t,n,c,o,f,l,i,a]},r.F.getSecond=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(e[r+1]);return t},r.F.nonZero=function(e){for(var t="",r=0;r<e.length;r+=2)0!=e[r+1]&&(t+=(r>>1)+",");return t},r.F.contSize=function(e,t){for(var r=0,n=0;n<t.length;n++)r+=t[n]*e[1+(n<<1)];return r},r.F._codeTiny=function(e,t,n,i){for(var o=0;o<e.length;o+=2){var a=e[o],f=e[o+1];i=r.F._writeLit(a,t,n,i);var s=16==a?2:17==a?3:7;a>15&&(r.F._putsE(n,i,f,s),i+=s)}return i},r.F._lenCodes=function(e,t){for(var r=e.length;2!=r&&0==e[r-1];)r-=2;for(var n=0;n<r;n+=2){var i=e[n+1],o=n+3<r?e[n+3]:-1,a=n+5<r?e[n+5]:-1,f=0==n?-1:e[n-1];if(0==i&&o==i&&a==i){for(var s=n+5;s+2<r&&e[s+2]==i;)s+=2;(c=Math.min(s+1-n>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),n+=2*c-2}else if(i==f&&o==i&&a==i){for(s=n+5;s+2<r&&e[s+2]==i;)s+=2;var c=Math.min(s+1-n>>>1,6);t.push(16,c-3),n+=2*c-2}else t.push(i,0)}return r>>>1},r.F._hufTree=function(e,t,n){var i=[],o=e.length,a=t.length,f=0;for(f=0;f<a;f+=2)t[f]=0,t[f+1]=0;for(f=0;f<o;f++)0!=e[f]&&i.push({lit:f,f:e[f]});var s=i.length,c=i.slice(0);if(0==s)return 0;if(1==s){var l=i[0].lit;return c=0==l?1:0,t[1+(l<<1)]=1,t[1+(c<<1)]=1,1}i.sort(function(e,t){return e.f-t.f});var u=i[0],h=i[1],d=0,g=1,A=2;for(i[0]={lit:-1,f:u.f+h.f,l:u,r:h,d:0};g!=s-1;)u=d!=g&&(A==s||i[d].f<i[A].f)?i[d++]:i[A++],h=d!=g&&(A==s||i[d].f<i[A].f)?i[d++]:i[A++],i[g++]={lit:-1,f:u.f+h.f,l:u,r:h};var w=r.F.setDepth(i[g-1],0);for(w>n&&(r.F.restrictDepth(c,n,w),w=n),f=0;f<s;f++)t[1+(c[f].lit<<1)]=c[f].d;return w},r.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(r.F.setDepth(e.l,t+1),r.F.setDepth(e.r,t+1))},r.F.restrictDepth=function(e,t,r){var n=0,i=1<<r-t,o=0;for(e.sort(function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d}),n=0;n<e.length&&e[n].d>t;n++){var a=e[n].d;e[n].d=t,o+=i-(1<<r-a)}for(o>>>=r-t;o>0;)(a=e[n].d)<t?(e[n].d++,o-=1<<t-a-1):n++;for(;n>=0;n--)e[n].d==t&&o<0&&(e[n].d--,o++);0!=o&&console.log("debt left")},r.F._goodIndex=function(e,t){var r=0;return t[16|r]<=e&&(r|=16),t[8|r]<=e&&(r|=8),t[4|r]<=e&&(r|=4),t[2|r]<=e&&(r|=2),t[1|r]<=e&&(r|=1),r},r.F._writeLit=function(e,t,n,i){return r.F._putsF(n,i,t[e<<1]),i+t[1+(e<<1)]},r.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var i=r.F,o=i._bitsF,a=i._bitsE,f=i._decodeTiny,s=i.makeCodes,c=i.codes2map,l=i._get17,u=i.U,h=null==t;h&&(t=new n(e.length>>>2<<3));for(var d,g,A=0,w=0,p=0,v=0,m=0,b=0,y=0,U=0,F=0;0==A;)if(A=o(e,F,1),w=o(e,F+1,2),F+=3,0!=w){if(h&&(t=r.F._check(t,U+(1<<17))),1==w&&(d=u.flmap,g=u.fdmap,b=511,y=31),2==w){p=a(e,F,5)+257,v=a(e,F+5,5)+1,m=a(e,F+10,4)+4,F+=14;for(var E=0;E<38;E+=2)u.itree[E]=0,u.itree[E+1]=0;var _=1;for(E=0;E<m;E++){var C=a(e,F+3*E,3);u.itree[1+(u.ordr[E]<<1)]=C,C>_&&(_=C)}F+=3*m,s(u.itree,_),c(u.itree,_,u.imap),d=u.lmap,g=u.dmap,F=f(u.imap,(1<<_)-1,p+v,e,F,u.ttree);var T=i._copyOut(u.ttree,0,p,u.ltree);b=(1<<T)-1;var B=i._copyOut(u.ttree,p,v,u.dtree);y=(1<<B)-1,s(u.ltree,T),c(u.ltree,T,d),s(u.dtree,B),c(u.dtree,B,g)}for(;;){var I=d[l(e,F)&b];F+=15&I;var M=I>>>4;if(M>>>8==0)t[U++]=M;else{if(256==M)break;var x=U+M-254;if(M>264){var R=u.ldef[M-257];x=U+(R>>>3)+a(e,F,7&R),F+=7&R}var S=g[l(e,F)&y];F+=15&S;var Q=S>>>4,H=u.ddef[Q],k=(H>>>4)+o(e,F,15&H);for(F+=15&H,h&&(t=r.F._check(t,U+(1<<17)));U<x;)t[U]=t[U++-k],t[U]=t[U++-k],t[U]=t[U++-k],t[U]=t[U++-k];U=x}}}else{7&F&&(F+=8-(7&F));var O=4+(F>>>3),L=e[O-4]|e[O-3]<<8;h&&(t=r.F._check(t,U+L)),t.set(new n(e.buffer,e.byteOffset+O,L),U),F=O+L<<3,U+=L}return t.length==U?t:t.slice(0,U)},r.F._check=function(e,t){var r=e.length;if(t<=r)return e;var n=new Uint8Array(Math.max(r<<1,t));return n.set(e,0),n},r.F._decodeTiny=function(e,t,n,i,o,a){for(var f=r.F._bitsE,s=r.F._get17,c=0;c<n;){var l=e[s(i,o)&t];o+=15&l;var u=l>>>4;if(u<=15)a[c]=u,c++;else{var h=0,d=0;16==u?(d=3+f(i,o,2),o+=2,h=a[c-1]):17==u?(d=3+f(i,o,3),o+=3):18==u&&(d=11+f(i,o,7),o+=7);for(var g=c+d;c<g;)a[c]=h,c++}}return o},r.F._copyOut=function(e,t,r,n){for(var i=0,o=0,a=n.length>>>1;o<r;){var f=e[o+t];n[o<<1]=0,n[1+(o<<1)]=f,f>i&&(i=f),o++}for(;o<a;)n[o<<1]=0,n[1+(o<<1)]=0,o++;return i},r.F.makeCodes=function(e,t){for(var n,i,o,a,f=r.F.U,s=e.length,c=f.bl_count,l=0;l<=t;l++)c[l]=0;for(l=1;l<s;l+=2)c[e[l]]++;var u=f.next_code;for(n=0,c[0]=0,i=1;i<=t;i++)n=n+c[i-1]<<1,u[i]=n;for(o=0;o<s;o+=2)0!=(a=e[o+1])&&(e[o]=u[a],u[a]++)},r.F.codes2map=function(e,t,n){for(var i=e.length,o=r.F.U.rev15,a=0;a<i;a+=2)if(0!=e[a+1])for(var f=a>>1,s=e[a+1],c=f<<4|s,l=t-s,u=e[a]<<l,h=u+(1<<l);u!=h;)n[o[u]>>>15-t]=c,u++},r.F.revCodes=function(e,t){for(var n=r.F.U.rev15,i=15-t,o=0;o<e.length;o+=2)e[o]=n[e[o]<<t-e[o+1]]>>>i},r.F._putsE=function(e,t,r){r<<=7&t;var n=t>>>3;e[n]|=r,e[n+1]|=r>>>8},r.F._putsF=function(e,t,r){r<<=7&t;var n=t>>>3;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},r.F._bitsE=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<r)-1},r.F._bitsF=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<r)-1},r.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},r.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},r.F.U=(e=Uint16Array,t=Uint32Array,{next_code:new e(16),bl_count:new e(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new e(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new t(32),flmap:new e(512),fltree:[],fdmap:new e(32),fdtree:[],lmap:new e(32768),ltree:[],ttree:[],dmap:new e(32768),dtree:[],imap:new e(512),itree:[],rev15:new e(32768),lhst:new t(286),dhst:new t(30),ihst:new t(19),lits:new t(15e3),strt:new e(65536),prev:new e(32768)}),function(){for(var e=r.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function i(e,t,r){for(;0!=t--;)e.push(0,r)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];i(e.fltree,144,8),i(e.fltree,112,9),i(e.fltree,24,7),i(e.fltree,8,8),r.F.makeCodes(e.fltree,9),r.F.codes2map(e.fltree,9,e.flmap),r.F.revCodes(e.fltree,9),i(e.fdtree,32,5),r.F.makeCodes(e.fdtree,5),r.F.codes2map(e.fdtree,5,e.fdmap),r.F.revCodes(e.fdtree,5),i(e.itree,19,0),i(e.ltree,286,0),i(e.dtree,30,0),i(e.ttree,320,0)}()}();var a=function(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})}),Object.freeze(e)}({__proto__:null,default:i},[i]),f=function(){var e={nextZero(e,t){for(;0!=e[t];)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,r){e[t]=r>>8&255,e[t+1]=255&r},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},readASCII(e,t,r){let n="";for(let i=0;i<r;i++)n+=String.fromCharCode(e[t+i]);return n},writeASCII(e,t,r){for(let n=0;n<r.length;n++)e[t+n]=r.charCodeAt(n)},readBytes(e,t,r){const n=[];for(let i=0;i<r;i++)n.push(e[t+i]);return n},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,r,n){let i,o="";for(let a=0;a<n;a++)o+=`%${e.pad(t[r+a].toString(16))}`;try{i=decodeURIComponent(o)}catch(i){return e.readASCII(t,r,n)}return i}};function t(t,r,n,i){const a=r*n,f=o(i),s=Math.ceil(r*f/8),c=new Uint8Array(4*a),l=new Uint32Array(c.buffer),{ctype:u}=i,{depth:h}=i,d=e.readUshort;if(6==u){const e=a<<2;if(8==h)for(var g=0;g<e;g+=4)c[g]=t[g],c[g+1]=t[g+1],c[g+2]=t[g+2],c[g+3]=t[g+3];if(16==h)for(g=0;g<e;g++)c[g]=t[g<<1]}else if(2==u){const e=i.tabs.tRNS;if(null==e){if(8==h)for(g=0;g<a;g++){var A=3*g;l[g]=255<<24|t[A+2]<<16|t[A+1]<<8|t[A]}if(16==h)for(g=0;g<a;g++)A=6*g,l[g]=255<<24|t[A+4]<<16|t[A+2]<<8|t[A]}else{var w=e[0];const r=e[1],n=e[2];if(8==h)for(g=0;g<a;g++){var p=g<<2;A=3*g,l[g]=255<<24|t[A+2]<<16|t[A+1]<<8|t[A],t[A]==w&&t[A+1]==r&&t[A+2]==n&&(c[p+3]=0)}if(16==h)for(g=0;g<a;g++)p=g<<2,A=6*g,l[g]=255<<24|t[A+4]<<16|t[A+2]<<8|t[A],d(t,A)==w&&d(t,A+2)==r&&d(t,A+4)==n&&(c[p+3]=0)}}else if(3==u){const e=i.tabs.PLTE,o=i.tabs.tRNS,f=o?o.length:0;if(1==h)for(var v=0;v<n;v++){var m=v*s,b=v*r;for(g=0;g<r;g++){p=b+g<<2;var y=3*(U=t[m+(g>>3)]>>7-(7&g)&1);c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255}}if(2==h)for(v=0;v<n;v++)for(m=v*s,b=v*r,g=0;g<r;g++)p=b+g<<2,y=3*(U=t[m+(g>>2)]>>6-((3&g)<<1)&3),c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255;if(4==h)for(v=0;v<n;v++)for(m=v*s,b=v*r,g=0;g<r;g++)p=b+g<<2,y=3*(U=t[m+(g>>1)]>>4-((1&g)<<2)&15),c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255;if(8==h)for(g=0;g<a;g++){var U;p=g<<2,y=3*(U=t[g]),c[p]=e[y],c[p+1]=e[y+1],c[p+2]=e[y+2],c[p+3]=U<f?o[U]:255}}else if(4==u){if(8==h)for(g=0;g<a;g++){p=g<<2;var F=t[E=g<<1];c[p]=F,c[p+1]=F,c[p+2]=F,c[p+3]=t[E+1]}if(16==h)for(g=0;g<a;g++){var E;p=g<<2,F=t[E=g<<2],c[p]=F,c[p+1]=F,c[p+2]=F,c[p+3]=t[E+2]}}else if(0==u)for(w=i.tabs.tRNS?i.tabs.tRNS:-1,v=0;v<n;v++){const e=v*s,n=v*r;if(1==h)for(var _=0;_<r;_++){var C=(F=255*(t[e+(_>>>3)]>>>7-(7&_)&1))==255*w?0:255;l[n+_]=C<<24|F<<16|F<<8|F}else if(2==h)for(_=0;_<r;_++)C=(F=85*(t[e+(_>>>2)]>>>6-((3&_)<<1)&3))==85*w?0:255,l[n+_]=C<<24|F<<16|F<<8|F;else if(4==h)for(_=0;_<r;_++)C=(F=17*(t[e+(_>>>1)]>>>4-((1&_)<<2)&15))==17*w?0:255,l[n+_]=C<<24|F<<16|F<<8|F;else if(8==h)for(_=0;_<r;_++)C=(F=t[e+_])==w?0:255,l[n+_]=C<<24|F<<16|F<<8|F;else if(16==h)for(_=0;_<r;_++)F=t[e+(_<<1)],C=d(t,e+(_<<1))==w?0:255,l[n+_]=C<<24|F<<16|F<<8|F}return c}function r(e,t,r,f){const s=o(e),c=Math.ceil(r*s/8),l=new Uint8Array((c+1+e.interlace)*f);return t=e.tabs.CgBI?i(t,l):n(t,l),0==e.interlace?t=a(t,e,0,r,f):1==e.interlace&&(t=function(e,t){const r=t.width,n=t.height,i=o(t),f=i>>3,s=Math.ceil(r*i/8),c=new Uint8Array(n*s);let l=0;const u=[0,0,4,0,2,0,1],h=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],g=[8,8,4,4,2,2,1];let A=0;for(;A<7;){const o=d[A],p=g[A];let v=0,m=0,b=u[A];for(;b<n;)b+=o,m++;let y=h[A];for(;y<r;)y+=p,v++;const U=Math.ceil(v*i/8);a(e,t,l,v,m);let F=0,E=u[A];for(;E<n;){let t=h[A],n=l+F*U<<3;for(;t<r;){var w;if(1==i&&(w=(w=e[n>>3])>>7-(7&n)&1,c[E*s+(t>>3)]|=w<<7-(7&t)),2==i&&(w=(w=e[n>>3])>>6-(7&n)&3,c[E*s+(t>>2)]|=w<<6-((3&t)<<1)),4==i&&(w=(w=e[n>>3])>>4-(7&n)&15,c[E*s+(t>>1)]|=w<<4-((1&t)<<2)),i>=8){const r=E*s+t*f;for(let t=0;t<f;t++)c[r+t]=e[(n>>3)+t]}n+=i,t+=p}F++,E+=o}v*m!=0&&(l+=m*(1+U)),A+=1}return c}(t,e)),t}function n(e,t){return i(new Uint8Array(e.buffer,2,e.length-6),t)}var i=function(){const e={H:{}};return e.H.N=function(t,r){const n=Uint8Array;let i,o,a=0,f=0,s=0,c=0,l=0,u=0,h=0,d=0,g=0;if(3==t[0]&&0==t[1])return r||new n(0);const A=e.H,w=A.b,p=A.e,v=A.R,m=A.n,b=A.A,y=A.Z,U=A.m,F=null==r;for(F&&(r=new n(t.length>>>2<<5));0==a;)if(a=w(t,g,1),f=w(t,g+1,2),g+=3,0!=f){if(F&&(r=e.H.W(r,d+(1<<17))),1==f&&(i=U.J,o=U.h,u=511,h=31),2==f){s=p(t,g,5)+257,c=p(t,g+5,5)+1,l=p(t,g+10,4)+4,g+=14;let e=1;for(var E=0;E<38;E+=2)U.Q[E]=0,U.Q[E+1]=0;for(E=0;E<l;E++){const r=p(t,g+3*E,3);U.Q[1+(U.X[E]<<1)]=r,r>e&&(e=r)}g+=3*l,m(U.Q,e),b(U.Q,e,U.u),i=U.w,o=U.d,g=v(U.u,(1<<e)-1,s+c,t,g,U.v);const r=A.V(U.v,0,s,U.C);u=(1<<r)-1;const n=A.V(U.v,s,c,U.D);h=(1<<n)-1,m(U.C,r),b(U.C,r,i),m(U.D,n),b(U.D,n,o)}for(;;){const e=i[y(t,g)&u];g+=15&e;const n=e>>>4;if(n>>>8==0)r[d++]=n;else{if(256==n)break;{let e=d+n-254;if(n>264){const r=U.q[n-257];e=d+(r>>>3)+p(t,g,7&r),g+=7&r}const i=o[y(t,g)&h];g+=15&i;const a=i>>>4,f=U.c[a],s=(f>>>4)+w(t,g,15&f);for(g+=15&f;d<e;)r[d]=r[d++-s],r[d]=r[d++-s],r[d]=r[d++-s],r[d]=r[d++-s];d=e}}}}else{7&g&&(g+=8-(7&g));const i=4+(g>>>3),o=t[i-4]|t[i-3]<<8;F&&(r=e.H.W(r,d+o)),r.set(new n(t.buffer,t.byteOffset+i,o),d),g=i+o<<3,d+=o}return r.length==d?r:r.slice(0,d)},e.H.W=function(e,t){const r=e.length;if(t<=r)return e;const n=new Uint8Array(r<<1);return n.set(e,0),n},e.H.R=function(t,r,n,i,o,a){const f=e.H.e,s=e.H.Z;let c=0;for(;c<n;){const e=t[s(i,o)&r];o+=15&e;const n=e>>>4;if(n<=15)a[c]=n,c++;else{let e=0,t=0;16==n?(t=3+f(i,o,2),o+=2,e=a[c-1]):17==n?(t=3+f(i,o,3),o+=3):18==n&&(t=11+f(i,o,7),o+=7);const r=c+t;for(;c<r;)a[c]=e,c++}}return o},e.H.V=function(e,t,r,n){let i=0,o=0;const a=n.length>>>1;for(;o<r;){const r=e[o+t];n[o<<1]=0,n[1+(o<<1)]=r,r>i&&(i=r),o++}for(;o<a;)n[o<<1]=0,n[1+(o<<1)]=0,o++;return i},e.H.n=function(t,r){const n=e.H.m,i=t.length;let o,a,f,s;const c=n.j;for(var l=0;l<=r;l++)c[l]=0;for(l=1;l<i;l+=2)c[t[l]]++;const u=n.K;for(o=0,c[0]=0,a=1;a<=r;a++)o=o+c[a-1]<<1,u[a]=o;for(f=0;f<i;f+=2)s=t[f+1],0!=s&&(t[f]=u[s],u[s]++)},e.H.A=function(t,r,n){const i=t.length,o=e.H.m.r;for(let e=0;e<i;e+=2)if(0!=t[e+1]){const i=e>>1,a=t[e+1],f=i<<4|a,s=r-a;let c=t[e]<<s;const l=c+(1<<s);for(;c!=l;)n[o[c]>>>15-r]=f,c++}},e.H.l=function(t,r){const n=e.H.m.r,i=15-r;for(let e=0;e<t.length;e+=2)t[e]=n[t[e]<<r-t[e+1]]>>>i},e.H.M=function(e,t,r){r<<=7&t;const n=t>>>3;e[n]|=r,e[n+1]|=r>>>8},e.H.I=function(e,t,r){r<<=7&t;const n=t>>>3;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},e.H.e=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<r)-1},e.H.b=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<r)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const t=e.H.m;for(var r=0;r<32768;r++){let e=r;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[r]=(e>>>16|e<<16)>>>17}function n(e,t,r){for(;0!=t--;)e.push(0,r)}for(r=0;r<32;r++)t.q[r]=t.S[r]<<3|t.T[r],t.c[r]=t.p[r]<<4|t.z[r];n(t._,144,8),n(t._,112,9),n(t._,24,7),n(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),n(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),n(t.Q,19,0),n(t.C,286,0),n(t.D,30,0),n(t.v,320,0)}(),e.H.N}();function o(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function a(e,t,r,n,i){let a=o(t);const s=Math.ceil(n*a/8);let c,l;a=Math.ceil(a/8);let u=e[r],h=0;if(u>1&&(e[r]=[0,0,1][u-2]),3==u)for(h=a;h<s;h++)e[h+1]=e[h+1]+(e[h+1-a]>>>1)&255;for(let o=0;o<i;o++)if(c=r+o*s,l=c+o+1,u=e[l-1],h=0,0==u)for(;h<s;h++)e[c+h]=e[l+h];else if(1==u){for(;h<a;h++)e[c+h]=e[l+h];for(;h<s;h++)e[c+h]=e[l+h]+e[c+h-a]}else if(2==u)for(;h<s;h++)e[c+h]=e[l+h]+e[c+h-s];else if(3==u){for(;h<a;h++)e[c+h]=e[l+h]+(e[c+h-s]>>>1);for(;h<s;h++)e[c+h]=e[l+h]+(e[c+h-s]+e[c+h-a]>>>1)}else{for(;h<a;h++)e[c+h]=e[l+h]+f(0,e[c+h-s],0);for(;h<s;h++)e[c+h]=e[l+h]+f(e[c+h-a],e[c+h-s],e[c+h-a-s])}return e}function f(e,t,r){const n=e+t-r,i=n-e,o=n-t,a=n-r;return i*i<=o*o&&i*i<=a*a?e:o*o<=a*a?t:r}function s(t,r,n){n.width=e.readUint(t,r),r+=4,n.height=e.readUint(t,r),r+=4,n.depth=t[r],r++,n.ctype=t[r],r++,n.compress=t[r],r++,n.filter=t[r],r++,n.interlace=t[r],r++}function c(e,t,r,n,i,o,a,f,s){const c=Math.min(t,i),l=Math.min(r,o);let u=0,h=0;for(let y=0;y<l;y++)for(let r=0;r<c;r++)if(a>=0&&f>=0?(u=y*t+r<<2,h=(f+y)*i+a+r<<2):(u=(-f+y)*t-a+r<<2,h=y*i+r<<2),0==s)n[h]=e[u],n[h+1]=e[u+1],n[h+2]=e[u+2],n[h+3]=e[u+3];else if(1==s){var d=e[u+3]*(1/255),g=e[u]*d,A=e[u+1]*d,w=e[u+2]*d,p=n[h+3]*(1/255),v=n[h]*p,m=n[h+1]*p,b=n[h+2]*p;const t=1-d,r=d+p*t,i=0==r?0:1/r;n[h+3]=255*r,n[h+0]=(g+v*t)*i,n[h+1]=(A+m*t)*i,n[h+2]=(w+b*t)*i}else if(2==s)d=e[u+3],g=e[u],A=e[u+1],w=e[u+2],p=n[h+3],v=n[h],m=n[h+1],b=n[h+2],d==p&&g==v&&A==m&&w==b?(n[h]=0,n[h+1]=0,n[h+2]=0,n[h+3]=0):(n[h]=g,n[h+1]=A,n[h+2]=w,n[h+3]=d);else if(3==s){if(d=e[u+3],g=e[u],A=e[u+1],w=e[u+2],p=n[h+3],v=n[h],m=n[h+1],b=n[h+2],d==p&&g==v&&A==m&&w==b)continue;if(d<220&&p>20)return!1}return!0}return{decode:function(t){const o=new Uint8Array(t);let a=8;const f=e,c=f.readUshort,l=f.readUint,u={tabs:{},frames:[]},h=new Uint8Array(o.length);let d,g=0,A=0;const w=[137,80,78,71,13,10,26,10];for(var p=0;p<8;p++)if(o[p]!=w[p])throw"The input is not a PNG file!";for(;a<o.length;){const t=f.readUint(o,a);a+=4;const w=f.readASCII(o,a,4);if(a+=4,"IHDR"==w)s(o,a,u);else if("iCCP"==w){for(var v=a;0!=o[v];)v++;f.readASCII(o,a,v-a),o[v+1];const r=o.slice(v+2,a+t);let s=null;try{s=n(r)}catch(e){s=i(r)}u.tabs[w]=s}else if("CgBI"==w)u.tabs[w]=o.slice(a,a+4);else if("IDAT"==w){for(p=0;p<t;p++)h[g+p]=o[a+p];g+=t}else if("acTL"==w)u.tabs[w]={num_frames:l(o,a),num_plays:l(o,a+4)},d=new Uint8Array(o.length);else if("fcTL"==w){0!=A&&((E=u.frames[u.frames.length-1]).data=r(u,d.slice(0,A),E.rect.width,E.rect.height),A=0);const e={x:l(o,a+12),y:l(o,a+16),width:l(o,a+4),height:l(o,a+8)};let t=c(o,a+22);t=c(o,a+20)/(0==t?100:t);const n={rect:e,delay:Math.round(1e3*t),dispose:o[a+24],blend:o[a+25]};u.frames.push(n)}else if("fdAT"==w){for(p=0;p<t-4;p++)d[A+p]=o[a+p+4];A+=t-4}else if("pHYs"==w)u.tabs[w]=[f.readUint(o,a),f.readUint(o,a+4),o[a+8]];else if("cHRM"==w)for(u.tabs[w]=[],p=0;p<8;p++)u.tabs[w].push(f.readUint(o,a+4*p));else if("tEXt"==w||"zTXt"==w){u.tabs[w]??(u.tabs[w]={});var m=f.nextZero(o,a),b=f.readASCII(o,a,m-a),y=a+t-m-1;if("tEXt"==w)F=f.readASCII(o,m+1,y);else{var U=n(o.slice(m+2,m+2+y));F=f.readUTF8(U,0,U.length)}u.tabs[w][b]=F}else if("iTXt"==w){u.tabs[w]??(u.tabs[w]={}),m=0,v=a,m=f.nextZero(o,v),b=f.readASCII(o,v,m-v);const e=o[v=m+1];var F;o[v+1],v+=2,m=f.nextZero(o,v),f.readASCII(o,v,m-v),v=m+1,m=f.nextZero(o,v),f.readUTF8(o,v,m-v),y=t-((v=m+1)-a),0==e?F=f.readUTF8(o,v,y):(U=n(o.slice(v,v+y)),F=f.readUTF8(U,0,U.length)),u.tabs[w][b]=F}else if("PLTE"==w)u.tabs[w]=f.readBytes(o,a,t);else if("hIST"==w){const e=u.tabs.PLTE.length/3;for(u.tabs[w]=[],p=0;p<e;p++)u.tabs[w].push(c(o,a+2*p))}else if("tRNS"==w)3==u.ctype?u.tabs[w]=f.readBytes(o,a,t):0==u.ctype?u.tabs[w]=c(o,a):2==u.ctype&&(u.tabs[w]=[c(o,a),c(o,a+2),c(o,a+4)]);else if("gAMA"==w)u.tabs[w]=f.readUint(o,a)/1e5;else if("sRGB"==w)u.tabs[w]=o[a];else if("bKGD"==w)0==u.ctype||4==u.ctype?u.tabs[w]=[c(o,a)]:2==u.ctype||6==u.ctype?u.tabs[w]=[c(o,a),c(o,a+2),c(o,a+4)]:3==u.ctype&&(u.tabs[w]=o[a]);else if("IEND"==w)break;a+=t,f.readUint(o,a),a+=4}var E;return 0!=A&&((E=u.frames[u.frames.length-1]).data=r(u,d.slice(0,A),E.rect.width,E.rect.height)),u.data=r(u,h,u.width,u.height),delete u.compress,delete u.interlace,delete u.filter,u},toRGBA8:function(e){const r=e.width,n=e.height;if(null==e.tabs.acTL)return[t(e.data,r,n,e).buffer];const i=[];e.frames[0].data??(e.frames[0].data=e.data);const o=r*n*4,a=new Uint8Array(o),f=new Uint8Array(o),s=new Uint8Array(o);for(let u=0;u<e.frames.length;u++){const h=e.frames[u],d=h.rect.x,g=h.rect.y,A=h.rect.width,w=h.rect.height,p=t(h.data,A,w,e);if(0!=u)for(var l=0;l<o;l++)s[l]=a[l];if(0==h.blend?c(p,A,w,a,r,n,d,g,0):1==h.blend&&c(p,A,w,a,r,n,d,g,1),i.push(a.buffer.slice(0)),0==h.dispose);else if(1==h.dispose)c(f,A,w,a,r,n,d,g,0);else if(2==h.dispose)for(l=0;l<o;l++)a[l]=s[l]}return i},_paeth:f,_copyTile:c,_bin:e}}();!function(){const{_copyTile:e}=f,{_bin:t}=f,r=f._paeth;var n={table:function(){const e=new Uint32Array(256);for(let t=0;t<256;t++){let r=t;for(let e=0;e<8;e++)1&r?r=3988292384^r>>>1:r>>>=1;e[t]=r}return e}(),update(e,t,r,i){for(let o=0;o<i;o++)e=n.table[255&(e^t[r+o])]^e>>>8;return e},crc:(e,t,r)=>4294967295^n.update(4294967295,e,t,r)};function i(e,t,r,n){t[r]+=e[0]*n>>4,t[r+1]+=e[1]*n>>4,t[r+2]+=e[2]*n>>4,t[r+3]+=e[3]*n>>4}function o(e){return Math.max(0,Math.min(255,e))}function s(e,t){const r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return r*r+n*n+i*i+o*o}function c(e,t,r,n,a,f,c){c??=1;const l=n.length,u=[];for(var h=0;h<l;h++){const e=n[h];u.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(h=0;h<l;h++){let e=4294967295;for(var d=0,g=0;g<l;g++){var A=s(u[h],u[g]);g!=h&&A<e&&(e=A,d=g)}}const w=new Uint32Array(a.buffer),p=new Int16Array(t*r*4),v=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(h=0;h<v.length;h++)v[h]=255*((v[h]+.5)/16-.5);for(let b=0;b<r;b++)for(let a=0;a<t;a++){var m;h=4*(b*t+a),2!=c?m=[o(e[h]+p[h]),o(e[h+1]+p[h+1]),o(e[h+2]+p[h+2]),o(e[h+3]+p[h+3])]:(A=v[4*(3&b)+(3&a)],m=[o(e[h]+A),o(e[h+1]+A),o(e[h+2]+A),o(e[h+3]+A)]),d=0;let y=16777215;for(g=0;g<l;g++){const e=s(m,u[g]);e<y&&(y=e,d=g)}const U=u[d],F=[m[0]-U[0],m[1]-U[1],m[2]-U[2],m[3]-U[3]];1==c&&(a!=t-1&&i(F,p,h+4,7),b!=r-1&&(0!=a&&i(F,p,h+4*t-4,3),i(F,p,h+4*t,5),a!=t-1&&i(F,p,h+4*t+4,1))),f[h>>2]=d,w[h>>2]=n[d]}}function l(e,r,i,o,a){a??={};const{crc:f}=n,s=t.writeUint,c=t.writeUshort,l=t.writeASCII;let u=8;const h=e.frames.length>1;let d,g=!1,A=33+(h?20:0);if(null!=a.sRGB&&(A+=13),null!=a.pHYs&&(A+=21),null!=a.iCCP&&(d=pako.deflate(a.iCCP),A+=21+d.length+4),3==e.ctype){for(var w=e.plte.length,p=0;p<w;p++)e.plte[p]>>>24!=255&&(g=!0);A+=8+3*w+4+(g?8+1*w+4:0)}for(var v=0;v<e.frames.length;v++)h&&(A+=38),A+=(U=e.frames[v]).cimg.length+12,0!=v&&(A+=4);A+=12;const m=new Uint8Array(A),b=[137,80,78,71,13,10,26,10];for(p=0;p<8;p++)m[p]=b[p];if(s(m,u,13),u+=4,l(m,u,"IHDR"),u+=4,s(m,u,r),u+=4,s(m,u,i),u+=4,m[u]=e.depth,u++,m[u]=e.ctype,u++,m[u]=0,u++,m[u]=0,u++,m[u]=0,u++,s(m,u,f(m,u-17,17)),u+=4,null!=a.sRGB&&(s(m,u,1),u+=4,l(m,u,"sRGB"),u+=4,m[u]=a.sRGB,u++,s(m,u,f(m,u-5,5)),u+=4),null!=a.iCCP){const e=13+d.length;s(m,u,e),u+=4,l(m,u,"iCCP"),u+=4,l(m,u,"ICC profile"),u+=11,u+=2,m.set(d,u),u+=d.length,s(m,u,f(m,u-(e+4),e+4)),u+=4}if(null!=a.pHYs&&(s(m,u,9),u+=4,l(m,u,"pHYs"),u+=4,s(m,u,a.pHYs[0]),u+=4,s(m,u,a.pHYs[1]),u+=4,m[u]=a.pHYs[2],u++,s(m,u,f(m,u-13,13)),u+=4),h&&(s(m,u,8),u+=4,l(m,u,"acTL"),u+=4,s(m,u,e.frames.length),u+=4,s(m,u,null!=a.loop?a.loop:0),u+=4,s(m,u,f(m,u-12,12)),u+=4),3==e.ctype){for(s(m,u,3*(w=e.plte.length)),u+=4,l(m,u,"PLTE"),u+=4,p=0;p<w;p++){const t=3*p,r=e.plte[p],n=255&r,i=r>>>8&255,o=r>>>16&255;m[u+t+0]=n,m[u+t+1]=i,m[u+t+2]=o}if(u+=3*w,s(m,u,f(m,u-3*w-4,3*w+4)),u+=4,g){for(s(m,u,w),u+=4,l(m,u,"tRNS"),u+=4,p=0;p<w;p++)m[u+p]=e.plte[p]>>>24&255;u+=w,s(m,u,f(m,u-w-4,w+4)),u+=4}}let y=0;for(v=0;v<e.frames.length;v++){var U=e.frames[v];h&&(s(m,u,26),u+=4,l(m,u,"fcTL"),u+=4,s(m,u,y++),u+=4,s(m,u,U.rect.width),u+=4,s(m,u,U.rect.height),u+=4,s(m,u,U.rect.x),u+=4,s(m,u,U.rect.y),u+=4,c(m,u,o[v]),u+=2,c(m,u,1e3),u+=2,m[u]=U.dispose,u++,m[u]=U.blend,u++,s(m,u,f(m,u-30,30)),u+=4);const t=U.cimg;s(m,u,(w=t.length)+(0==v?0:4)),u+=4;const r=u;l(m,u,0==v?"IDAT":"fdAT"),u+=4,0!=v&&(s(m,u,y++),u+=4),m.set(t,u),u+=w,s(m,u,f(m,r,u-r)),u+=4}return s(m,u,0),u+=4,l(m,u,"IEND"),u+=4,s(m,u,f(m,u-4,4)),u+=4,m.buffer}function u(e,t,r){for(let n=0;n<e.frames.length;n++){const i=e.frames[n];i.rect.width;const o=i.rect.height,a=new Uint8Array(o*i.bpl+o);i.cimg=A(i.img,o,i.bpp,i.bpl,a,t,r)}}function h(t,r,n,i,o){const a=o[0],f=o[1],s=o[2],l=o[3],u=o[4],h=o[5];let A=6,w=8,v=255;for(var m=0;m<t.length;m++){const e=new Uint8Array(t[m]);for(var b=e.length,y=0;y<b;y+=4)v&=e[y+3]}const U=255!=v,F=function(t,r,n,i,o,a){const f=[];for(var s=0;s<t.length;s++){const u=new Uint8Array(t[s]),d=new Uint32Array(u.buffer);var c;let A=0,w=0,p=r,v=n,m=i?1:0;if(0!=s){const b=a||i||1==s||0!=f[s-2].dispose?1:2;let y=0,U=1e9;for(let e=0;e<b;e++){var l=new Uint8Array(t[s-1-e]);const i=new Uint32Array(t[s-1-e]);let a=r,f=n,c=-1,u=-1;for(let e=0;e<n;e++)for(let t=0;t<r;t++)d[h=e*r+t]!=i[h]&&(t<a&&(a=t),t>c&&(c=t),e<f&&(f=e),e>u&&(u=e));-1==c&&(a=f=c=u=0),o&&(!(1&~a)&&a--,!(1&~f)&&f--);const g=(c-a+1)*(u-f+1);g<U&&(U=g,y=e,A=a,w=f,p=c-a+1,v=u-f+1)}l=new Uint8Array(t[s-1-y]),1==y&&(f[s-1].dispose=2),c=new Uint8Array(p*v*4),e(l,r,n,c,p,v,-A,-w,0),m=e(u,r,n,c,p,v,-A,-w,3)?1:0,1==m?g(u,r,n,c,{x:A,y:w,width:p,height:v}):e(u,r,n,c,p,v,-A,-w,0)}else c=u.slice(0);f.push({rect:{x:A,y:w,width:p,height:v},img:c,blend:m,dispose:0})}if(i)for(s=0;s<f.length;s++){if(1==(A=f[s]).blend)continue;const e=A.rect,i=f[s-1].rect,a=Math.min(e.x,i.x),c=Math.min(e.y,i.y),l={x:a,y:c,width:Math.max(e.x+e.width,i.x+i.width)-a,height:Math.max(e.y+e.height,i.y+i.height)-c};f[s-1].dispose=1,s-1!=0&&d(t,r,n,f,s-1,l,o),d(t,r,n,f,s,l,o)}let u=0;if(1!=t.length)for(var h=0;h<f.length;h++){var A;u+=(A=f[h]).rect.width*A.rect.height}return f}(t,r,n,a,f,s),E={},_=[],C=[];if(0!=i){const e=[];for(y=0;y<F.length;y++)e.push(F[y].img.buffer);const t=p(function(e){let t=0;for(var r=0;r<e.length;r++)t+=e[r].byteLength;const n=new Uint8Array(t);let i=0;for(r=0;r<e.length;r++){const t=new Uint8Array(e[r]),o=t.length;for(let e=0;e<o;e+=4){let r=t[e],o=t[e+1],a=t[e+2];const f=t[e+3];0==f&&(r=o=a=0),n[i+e]=r,n[i+e+1]=o,n[i+e+2]=a,n[i+e+3]=f}i+=o}return n.buffer}(e),i);for(y=0;y<t.plte.length;y++)_.push(t.plte[y].est.rgba);let r=0;for(y=0;y<F.length;y++){const e=(B=F[y]).img.length;var T=new Uint8Array(t.inds.buffer,r>>2,e>>2);C.push(T);const n=new Uint8Array(t.abuf,r,e);h&&c(B.img,B.rect.width,B.rect.height,_,n,T),B.img.set(n),r+=e}}else for(m=0;m<F.length;m++){var B=F[m];const e=new Uint32Array(B.img.buffer);var I=B.rect.width;for(b=e.length,T=new Uint8Array(b),C.push(T),y=0;y<b;y++){const t=e[y];if(0!=y&&t==e[y-1])T[y]=T[y-1];else if(y>I&&t==e[y-I])T[y]=T[y-I];else{let e=E[t];if(null==e&&(E[t]=e=_.length,_.push(t),_.length>=300))break;T[y]=e}}}const M=_.length;for(M<=256&&0==u&&(w=M<=2?1:M<=4?2:M<=16?4:8,w=Math.max(w,l)),m=0;m<F.length;m++){(B=F[m]).rect.x,B.rect.y,I=B.rect.width;const e=B.rect.height;let t=B.img;new Uint32Array(t.buffer);let r=4*I,n=4;if(M<=256&&0==u){r=Math.ceil(w*I/8);var x=new Uint8Array(r*e);const i=C[m];for(let t=0;t<e;t++){y=t*r;const e=t*I;if(8==w)for(var R=0;R<I;R++)x[y+R]=i[e+R];else if(4==w)for(R=0;R<I;R++)x[y+(R>>1)]|=i[e+R]<<4-4*(1&R);else if(2==w)for(R=0;R<I;R++)x[y+(R>>2)]|=i[e+R]<<6-2*(3&R);else if(1==w)for(R=0;R<I;R++)x[y+(R>>3)]|=i[e+R]<<7-1*(7&R)}t=x,A=3,n=1}else if(0==U&&1==F.length){x=new Uint8Array(I*e*3);const i=I*e;for(y=0;y<i;y++){const e=3*y,r=4*y;x[e]=t[r],x[e+1]=t[r+1],x[e+2]=t[r+2]}t=x,A=2,n=3,r=3*I}B.img=t,B.bpl=r,B.bpp=n}return{ctype:A,depth:w,plte:_,frames:F}}function d(t,r,n,i,o,a,f){const s=Uint8Array,c=Uint32Array,l=new s(t[o-1]),u=new c(t[o-1]),h=o+1<t.length?new s(t[o+1]):null,d=new s(t[o]),A=new c(d.buffer);let w=r,p=n,v=-1,m=-1;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++){const n=a.x+t,f=a.y+e,s=f*r+n,c=A[s];0==c||0==i[o-1].dispose&&u[s]==c&&(null==h||0!=h[4*s+3])||(n<w&&(w=n),n>v&&(v=n),f<p&&(p=f),f>m&&(m=f))}-1==v&&(w=p=v=m=0),f&&(!(1&~w)&&w--,!(1&~p)&&p--),a={x:w,y:p,width:v-w+1,height:m-p+1};const b=i[o];b.rect=a,b.blend=1,b.img=new Uint8Array(a.width*a.height*4),0==i[o-1].dispose?(e(l,r,n,b.img,a.width,a.height,-a.x,-a.y,0),g(d,r,n,b.img,a)):e(d,r,n,b.img,a.width,a.height,-a.x,-a.y,0)}function g(t,r,n,i,o){e(t,r,n,i,o.width,o.height,-o.x,-o.y,2)}function A(e,t,r,n,i,o,f){const s=[];let c,l=[0,1,2,3,4];-1!=o?l=[o]:(t*n>5e5||1==r)&&(l=[0]),f&&(c={level:0});const u=a;for(var h=0;h<l.length;h++){for(let o=0;o<t;o++)w(i,e,o,n,r,l[h]);s.push(u.deflate(i,c))}let d,g=1e9;for(h=0;h<s.length;h++)s[h].length<g&&(d=h,g=s[h].length);return s[d]}function w(e,t,n,i,o,a){const f=n*i;let s=f+n;if(e[s]=a,s++,0==a)if(i<500)for(var c=0;c<i;c++)e[s+c]=t[f+c];else e.set(new Uint8Array(t.buffer,f,i),s);else if(1==a){for(c=0;c<o;c++)e[s+c]=t[f+c];for(c=o;c<i;c++)e[s+c]=t[f+c]-t[f+c-o]+256&255}else if(0==n){for(c=0;c<o;c++)e[s+c]=t[f+c];if(2==a)for(c=o;c<i;c++)e[s+c]=t[f+c];if(3==a)for(c=o;c<i;c++)e[s+c]=t[f+c]-(t[f+c-o]>>1)+256&255;if(4==a)for(c=o;c<i;c++)e[s+c]=t[f+c]-r(t[f+c-o],0,0)+256&255}else{if(2==a)for(c=0;c<i;c++)e[s+c]=t[f+c]+256-t[f+c-i]&255;if(3==a){for(c=0;c<o;c++)e[s+c]=t[f+c]+256-(t[f+c-i]>>1)&255;for(c=o;c<i;c++)e[s+c]=t[f+c]+256-(t[f+c-i]+t[f+c-o]>>1)&255}if(4==a){for(c=0;c<o;c++)e[s+c]=t[f+c]+256-r(0,t[f+c-i],0)&255;for(c=o;c<i;c++)e[s+c]=t[f+c]+256-r(t[f+c-o],t[f+c-i],t[f+c-o-i])&255}}}function p(e,t){const r=new Uint8Array(e),n=r.slice(0),i=new Uint32Array(n.buffer),o=v(n,t),a=o[0],f=o[1],s=r.length,c=new Uint8Array(s>>2);let l;if(r.length<2e7)for(var u=0;u<s;u+=4)l=m(a,h=r[u]*(1/255),d=r[u+1]*(1/255),g=r[u+2]*(1/255),A=r[u+3]*(1/255)),c[u>>2]=l.ind,i[u>>2]=l.est.rgba;else for(u=0;u<s;u+=4){var h=r[u]*(1/255),d=r[u+1]*(1/255),g=r[u+2]*(1/255),A=r[u+3]*(1/255);for(l=a;l.left;)l=b(l.est,h,d,g,A)<=0?l.left:l.right;c[u>>2]=l.ind,i[u>>2]=l.est.rgba}return{abuf:n.buffer,inds:c,plte:f}}function v(e,t,r){r??=1e-4;const n=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=F(e,i.i0,i.i1),i.est=E(i.bst);const o=[i];for(;o.length<t;){let t=0,i=0;for(var a=0;a<o.length;a++)o[a].est.L>t&&(t=o[a].est.L,i=a);if(t<r)break;const f=o[i],s=y(e,n,f.i0,f.i1,f.est.e,f.est.eMq255);if(f.i0>=s||f.i1<=s){f.est.L=0;continue}const c={i0:f.i0,i1:s,bst:null,est:null,tdst:0,left:null,right:null};c.bst=F(e,c.i0,c.i1),c.est=E(c.bst);const l={i0:s,i1:f.i1,bst:null,est:null,tdst:0,left:null,right:null};for(l.bst={R:[],m:[],N:f.bst.N-c.bst.N},a=0;a<16;a++)l.bst.R[a]=f.bst.R[a]-c.bst.R[a];for(a=0;a<4;a++)l.bst.m[a]=f.bst.m[a]-c.bst.m[a];l.est=E(l.bst),f.left=c,f.right=l,o[i]=c,o.push(l)}for(o.sort((e,t)=>t.bst.N-e.bst.N),a=0;a<o.length;a++)o[a].ind=a;return[i,o]}function m(e,t,r,n,i){if(null==e.left)return e.tdst=function(e,t,r,n,i){const o=t-e[0],a=r-e[1],f=n-e[2],s=i-e[3];return o*o+a*a+f*f+s*s}(e.est.q,t,r,n,i),e;const o=b(e.est,t,r,n,i);let a=e.left,f=e.right;o>0&&(a=e.right,f=e.left);const s=m(a,t,r,n,i);if(s.tdst<=o*o)return s;const c=m(f,t,r,n,i);return c.tdst<s.tdst?c:s}function b(e,t,r,n,i){const{e:o}=e;return o[0]*t+o[1]*r+o[2]*n+o[3]*i-e.eMq}function y(e,t,r,n,i,o){for(n-=4;r<n;){for(;U(e,r,i)<=o;)r+=4;for(;U(e,n,i)>o;)n-=4;if(r>=n)break;const a=t[r>>2];t[r>>2]=t[n>>2],t[n>>2]=a,r+=4,n-=4}for(;U(e,r,i)>o;)r-=4;return r+4}function U(e,t,r){return e[t]*r[0]+e[t+1]*r[1]+e[t+2]*r[2]+e[t+3]*r[3]}function F(e,t,r){const n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],o=r-t>>2;for(let a=t;a<r;a+=4){const t=e[a]*(1/255),r=e[a+1]*(1/255),o=e[a+2]*(1/255),f=e[a+3]*(1/255);i[0]+=t,i[1]+=r,i[2]+=o,i[3]+=f,n[0]+=t*t,n[1]+=t*r,n[2]+=t*o,n[3]+=t*f,n[5]+=r*r,n[6]+=r*o,n[7]+=r*f,n[10]+=o*o,n[11]+=o*f,n[15]+=f*f}return n[4]=n[1],n[8]=n[2],n[9]=n[6],n[12]=n[3],n[13]=n[7],n[14]=n[11],{R:n,m:i,N:o}}function E(e){const{R:t}=e,{m:r}=e,{N:n}=e,i=r[0],o=r[1],a=r[2],f=r[3],s=0==n?0:1/n,c=[t[0]-i*i*s,t[1]-i*o*s,t[2]-i*a*s,t[3]-i*f*s,t[4]-o*i*s,t[5]-o*o*s,t[6]-o*a*s,t[7]-o*f*s,t[8]-a*i*s,t[9]-a*o*s,t[10]-a*a*s,t[11]-a*f*s,t[12]-f*i*s,t[13]-f*o*s,t[14]-f*a*s,t[15]-f*f*s],l=c,u=_;let h=[Math.random(),Math.random(),Math.random(),Math.random()],d=0,g=0;if(0!=n)for(let w=0;w<16&&(h=u.multVec(l,h),g=Math.sqrt(u.dot(h,h)),h=u.sml(1/g,h),!(0!=w&&Math.abs(g-d)<1e-9));w++)d=g;const A=[i*s,o*s,a*s,f*s];return{Cov:c,q:A,e:h,L:d,eMq255:u.dot(u.sml(255,A),h),eMq:u.dot(h,A),rgba:(Math.round(255*A[3])<<24|Math.round(255*A[2])<<16|Math.round(255*A[1])<<8|Math.round(255*A[0]))>>>0}}var _={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};f.encode=function(e,t,r,n,i,o,a){n??=0,a??=!1;const f=h(e,t,r,n,[!1,!1,!1,0,a,!1]);return u(f,-1),l(f,t,r,i,o)},f.encodeLL=function(e,t,r,n,i,o,a,f){const s={ctype:0+(1==n?0:2)+(0==i?0:4),depth:o,frames:[]},c=(n+i)*o,h=c*t;for(let l=0;l<e.length;l++)s.frames.push({rect:{x:0,y:0,width:t,height:r},img:new Uint8Array(e[l]),blend:0,dispose:1,bpp:Math.ceil(c/8),bpl:Math.ceil(h/8)});return u(s,0,!0),l(s,t,r,a,f)},f.encode.compress=h,f.encode.dither=c,f.quantize=p,f.quantize.getKDtree=v,f.quantize.getNearest=m}();var s,c={toArrayBuffer(e,t){const r=e.width,n=e.height,i=r<<2,o=e.getContext("2d").getImageData(0,0,r,n),a=new Uint32Array(o.data.buffer),f=(32*r+31)/32<<2,s=f*n,l=122+s,u=new ArrayBuffer(l),h=new DataView(u),d=1<<20;let g,A,w,p,v=d,m=0,b=0,y=0;function U(e){h.setUint16(b,e,!0),b+=2}function F(e){h.setUint32(b,e,!0),b+=4}function E(e){b+=e}U(19778),F(l),E(4),F(122),F(108),F(r),F(-n>>>0),U(1),U(32),F(3),F(s),F(2835),F(2835),E(8),F(16711680),F(65280),F(255),F(4278190080),F(1466527264),function e(){for(;m<n&&v>0;){for(p=122+m*f,g=0;g<i;)v--,A=a[y++],w=A>>>24,h.setUint32(p+g,A<<8|w),g+=4;m++}y<a.length?(v=d,setTimeout(e,c._dly)):t(u)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9},l={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},u={[l.CHROME]:16384,[l.FIREFOX]:11180,[l.DESKTOP_SAFARI]:16384,[l.IE]:8192,[l.IOS]:4096,[l.ETC]:8192},h="undefined"!=typeof window,d="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,g=h&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),A=(h||d)&&(g&&g.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),w=(h||d)&&(g&&g.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function p(e,t,r=Date.now()){return new Promise(n=>{const i=e.split(","),o=i[0].match(/:(.*?);/)[1],a=globalThis.atob(i[1]);let f=a.length;const s=new Uint8Array(f);for(;f--;)s[f]=a.charCodeAt(f);const c=new Blob([s],{type:o});c.name=t,c.lastModified=r,n(c)})}function v(e){return new Promise((t,r)=>{const n=new w;n.onload=()=>t(n.result),n.onerror=e=>r(e),n.readAsDataURL(e)})}function m(e){return new Promise((t,r)=>{const n=new Image;n.onload=()=>t(n),n.onerror=e=>r(e),n.src=e})}function b(){if(void 0!==b.cachedResult)return b.cachedResult;let e=l.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=l.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=l.IOS:/Safari/i.test(t)?e=l.DESKTOP_SAFARI:/Firefox/i.test(t)?e=l.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=l.IE),b.cachedResult=e,b.cachedResult}function y(e,t){const r=u[b()];let n=e,i=t,o=n*i;const a=n>i?i/n:n/i;for(;o>r*r;){const e=(r+n)/2,t=(r+i)/2;e<t?(i=t,n=t*a):(i=e*a,n=e),o=n*i}return{width:n,height:i}}function U(e,t){let r,n;try{if(r=new OffscreenCanvas(e,t),n=r.getContext("2d"),null===n)throw new Error("getContext of OffscreenCanvas returns null")}catch(e){r=document.createElement("canvas"),n=r.getContext("2d")}return r.width=e,r.height=t,[r,n]}function F(e,t){const{width:r,height:n}=y(e.width,e.height),[i,o]=U(r,n);return t&&/jpe?g/.test(t)&&(o.fillStyle="white",o.fillRect(0,0,i.width,i.height)),o.drawImage(e,0,0,i.width,i.height),i}function E(){return void 0!==E.cachedResult||(E.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),E.cachedResult}function _(e,t={}){return new Promise(function(r,n){let i,o;var a=function(){try{return o=F(i,t.fileType||e.type),r([i,o])}catch(e){return n(e)}},f=function(t){try{var r=function(e){try{throw e}catch(e){return n(e)}};try{let t;return v(e).then(function(e){try{return t=e,m(t).then(function(e){try{return i=e,function(){try{return a()}catch(e){return n(e)}}()}catch(e){return r(e)}},r)}catch(e){return r(e)}},r)}catch(e){r(e)}}catch(e){return n(e)}};try{if(E()||[l.DESKTOP_SAFARI,l.MOBILE_SAFARI].includes(b()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(e){try{return i=e,a()}catch(e){return f()}},f)}catch(e){f()}})}function C(e,t,r,n,i=1){return new Promise(function(o,a){let s;if("image/png"===t){let u,h,d;return u=e.getContext("2d"),({data:h}=u.getImageData(0,0,e.width,e.height)),d=f.encode([h.buffer],e.width,e.height,4096*i),s=new Blob([d],{type:t}),s.name=r,s.lastModified=n,l.call(this)}{if("image/bmp"===t)return new Promise(t=>c.toBlob(e,t)).then(function(e){try{return s=e,s.name=r,s.lastModified=n,g.call(this)}catch(e){return a(e)}}.bind(this),a);{if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:i}).then(function(e){try{return s=e,s.name=r,s.lastModified=n,A.call(this)}catch(e){return a(e)}}.bind(this),a);{let w;return w=e.toDataURL(t,i),p(w,r,n).then(function(e){try{return s=e,A.call(this)}catch(e){return a(e)}}.bind(this),a)}function A(){return g.call(this)}}function g(){return l.call(this)}}function l(){return o(s)}})}function T(e){e.width=0,e.height=0}function B(){return new Promise(function(e,t){let r,n,i,o;return void 0!==B.cachedResult?e(B.cachedResult):p("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return r=a,_(r).then(function(a){try{return n=a[1],C(n,r.type,r.name,r.lastModified).then(function(r){try{return i=r,T(n),_(i).then(function(r){try{return o=r[0],B.cachedResult=1===o.width&&2===o.height,e(B.cachedResult)}catch(e){return t(e)}},t)}catch(e){return t(e)}},t)}catch(e){return t(e)}},t)}catch(e){return t(e)}},t)})}function I(e){return new Promise((t,r)=>{const n=new w;n.onload=e=>{const r=new DataView(e.target.result);if(65496!=r.getUint16(0,!1))return t(-2);const n=r.byteLength;let i=2;for(;i<n;){if(r.getUint16(i+2,!1)<=8)return t(-1);const e=r.getUint16(i,!1);if(i+=2,65505==e){if(1165519206!=r.getUint32(i+=2,!1))return t(-1);const e=18761==r.getUint16(i+=6,!1);i+=r.getUint32(i+4,e);const n=r.getUint16(i,e);i+=2;for(let o=0;o<n;o++)if(274==r.getUint16(i+12*o,e))return t(r.getUint16(i+12*o+8,e))}else{if(65280&~e)break;i+=r.getUint16(i,!1)}}return t(-1)},n.onerror=e=>r(e),n.readAsArrayBuffer(e)})}function M(e,t){const{width:r}=e,{height:n}=e,{maxWidthOrHeight:i}=t;let o,a=e;return isFinite(i)&&(r>i||n>i)&&([a,o]=U(r,n),r>n?(a.width=i,a.height=n/r*i):(a.width=r/n*i,a.height=i),o.drawImage(e,0,0,a.width,a.height),T(e)),a}function x(e,t){const{width:r}=e,{height:n}=e,[i,o]=U(r,n);switch(t>4&&t<9?(i.width=n,i.height=r):(i.width=r,i.height=n),t){case 2:o.transform(-1,0,0,1,r,0);break;case 3:o.transform(-1,0,0,-1,r,n);break;case 4:o.transform(1,0,0,-1,0,n);break;case 5:o.transform(0,1,1,0,0,0);break;case 6:o.transform(0,1,-1,0,n,0);break;case 7:o.transform(0,-1,-1,0,n,r);break;case 8:o.transform(0,-1,1,0,0,r)}return o.drawImage(e,0,0,r,n),T(e),i}function R(e,t,r=0){return new Promise(function(n,i){let o,a,f,s,c,l,u,h,d,g,A,w,p,v,m,b,y,F,E,R;function S(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;o+=e,t.onProgress(Math.min(o,100))}function Q(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;o=Math.min(Math.max(e,o),100),t.onProgress(o)}return o=r,a=t.maxIteration||10,f=1024*t.maxSizeMB*1024,S(),_(e,t).then(function(r){try{return[,s]=r,S(),c=M(s,t),S(),new Promise(function(r,n){var i;if(!(i=t.exifOrientation))return I(e).then(function(e){try{return i=e,o.call(this)}catch(e){return n(e)}}.bind(this),n);function o(){return r(i)}return o.call(this)}).then(function(r){try{return l=r,S(),B().then(function(r){try{return u=r?c:x(c,l),S(),h=t.initialQuality||1,d=t.fileType||e.type,C(u,d,e.name,e.lastModified,h).then(function(r){try{{if(g=r,S(),A=g.size>f,w=g.size>e.size,!A&&!w)return Q(100),n(g);var o;function _(){if(a--&&(m>f||m>p)){let t,r;return t=R?.95*E.width:E.width,r=R?.95*E.height:E.height,[y,F]=U(t,r),F.drawImage(E,0,0,t,r),h*="image/png"===d?.85:.95,C(y,d,e.name,e.lastModified,h).then(function(e){try{return b=e,T(E),E=y,m=b.size,Q(Math.min(99,Math.floor((v-m)/(v-f)*100))),_}catch(e){return i(e)}},i)}return[1]}return p=e.size,v=g.size,m=v,E=u,R=!t.alwaysKeepResolution&&A,(o=function(e){for(;e;){if(e.then)return void e.then(o,i);try{if(e.pop){if(e.length)return e.pop()?B.call(this):e;e=_}else e=e.call(this)}catch(e){return i(e)}}}.bind(this))(_);function B(){return T(E),T(y),T(c),T(u),T(s),Q(100),n(b)}}}catch(l){return i(l)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)})}function S(e,t){return new Promise((r,n)=>{s||(s=function(e){const t=[];return t.push(e),URL.createObjectURL(new Blob(t))}("\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n"));const i=new Worker(s);i.addEventListener("message",function(e){if(t.signal&&t.signal.aborted)i.terminate();else if(void 0===e.data.progress){if(e.data.error)return n(new Error(e.data.error)),void i.terminate();r(e.data.file),i.terminate()}else t.onProgress(e.data.progress)}),i.addEventListener("error",n),t.signal&&t.signal.addEventListener("abort",()=>{n(t.signal.reason),i.terminate()}),i.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}function Q(e,t){return new Promise(function(n,i){let o,a,f,s,c,l;if(o={...t},f=0,({onProgress:s}=o),o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,c="boolean"!=typeof o.useWebWorker||o.useWebWorker,delete o.useWebWorker,o.onProgress=e=>{f=e,"function"==typeof s&&s(f)},!(e instanceof Blob||e instanceof A))return i(/* @__PURE__ */new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return i(/* @__PURE__ */new Error("The file given is not an image"));if(l="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!c||"function"!=typeof Worker||l)return R(e,o).then(function(e){try{return a=e,d.call(this)}catch(e){return i(e)}}.bind(this),i);var u=function(){try{return d.call(this)}catch(e){return i(e)}}.bind(this),h=function(t){try{return R(e,o).then(function(e){try{return a=e,u()}catch(e){return i(e)}},i)}catch(e){return i(e)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",S(e,o).then(function(e){try{return a=e,u()}catch(e){return h()}},h)}catch(e){h()}function d(){try{a.name=e.name,a.lastModified=e.lastModified}catch(e){}try{o.preserveExif&&"image/jpeg"===e.type&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(a=r(e,a))}catch(e){}return n(a)}})}function H({className:t}){/* @__PURE__ */
|
|
3
|
-
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:t,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M12 20q-3.35 0-5.675-2.325T4 12t2.325-5.675T12 4q1.725 0 3.3.712T18 6.75V5q0-.425.288-.712T19 4t.713.288T20 5v5q0 .425-.288.713T19 11h-5q-.425 0-.712-.288T13 10t.288-.712T14 9h3.2q-.8-1.4-2.187-2.2T12 6Q9.5 6 7.75 7.75T6 12t1.75 4.25T12 18q1.7 0 3.113-.862t2.187-2.313q.2-.35.563-.487t.737-.013q.4.125.575.525t-.025.75q-1.025 2-2.925 3.2T12 20"})})}Q.getDataUrlFromFile=v,Q.getFilefromDataUrl=p,Q.loadImage=m,Q.drawImageInCanvas=F,Q.drawFileInCanvas=_,Q.canvasToFile=C,Q.getExifOrientation=I,Q.handleMaxWidthOrHeight=M,Q.followExifOrientation=x,Q.cleanupCanvasMemory=T,Q.isAutoOrientationInBrowser=B,Q.approximateBelowMaximumCanvasSizeOfBrowser=y,Q.copyExifWithoutOrientation=r,Q.getBrowserName=b,Q.version="2.0.2";export{Q as n,t as r,H as t};
|
package/umd/DIYTs0k3.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{D as e,E as t,S as r,T as a,b as n,f as o,h as s,p as l,t as i,v as d,y as c}from"./qbHuxVSe.js";import{a as p,i as m,n as u,s as f}from"./WtQ5axEj.js";import{t as h}from"./lVJD5cJY.js";import{r as b}from"./BekfKWcG.js";import{t as v}from"./WX3mhhd9.js";var g=b("inline-flex h-fit flex-auto cursor-pointer items-center justify-center border transition-all duration-200 focus:outline-none active:scale-95",{variants:{size:{sm:"gap-1.5 p-1.5 text-xs",md:"gap-3 px-3 py-2 text-sm",lg:"gap-3 px-4 py-3 text-base"}},defaultVariants:{size:"md"}}),x=({size:e,buttons:t=[],onChange:r,selected:a,className:n})=>/* @__PURE__ */i("div",{className:m("button-group-overlap shadow-outer z-0 flex h-fit rounded",n),children:t.map((n,o)=>{const s=0===o,l=o===t.length-1,d=n.value===a;/* @__PURE__ */
|
|
2
|
-
return i("button",{type:"button",onClick:()=>r?.(n.value),className:m(g({size:e}),d?n.activeClassName?n.activeClassName:"bg-primary border-primary text-primary-foreground hover:bg-primary/90 border":"hover:bg-muted/50 active:bg-muted border-border border",s&&"rounded-l",l&&"rounded-r"),children:[!n.icon&&/* @__PURE__ */i("span",{className:"font-medium sm:py-0.5",children:n.text}),n.icon&&/* @__PURE__ */i("div",{className:"size-6",children:n.icon})]},n.value)})}),N=()=>{const{initializing:e,orgRole:t,user:r,loadingUser:a}=u();return{role:t??void 0,isSuper:Boolean(r?.isSuper),loading:Boolean(a||e),isOwner:t===f.OWNER,isAdmin:t===f.ADMIN,isModerator:t===f.MODERATOR}};function q({content:e,children:t,position:r="top",className:a,contentClassName:n}){const[o,l]=s(!1),{organization:d}=u();/* @__PURE__ */
|
|
3
|
-
return i("div",{className:m("relative inline-block",a),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onClick:()=>l(!1),onBlur:()=>l(!1),children:[t,o&&/* @__PURE__ */i("div",{className:m("bg-popover text-popover-foreground border-border animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 pointer-events-auto absolute z-50 rounded border px-3 py-2 text-sm whitespace-nowrap shadow-md",{top:"bottom-full left-1/2 -translate-x-1/2 mb-2",right:"left-full top-1/2 -translate-y-1/2 ml-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2"}[r],n),"data-side":r,style:p(d),role:"tooltip",children:[e,/* @__PURE__ */i("div",{className:m("border-popover absolute h-0 w-0 border-4",{top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent"}[r])})]})]})}function y({className:e}){/* @__PURE__ */
|
|
4
|
-
return i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */i("path",{fill:"currentColor",d:"M10.825 22q-.675 0-1.162-.45t-.588-1.1L8.85 18.8q-.325-.125-.612-.3t-.563-.375l-1.55.65q-.625.275-1.25.05t-.975-.8l-1.175-2.05q-.35-.575-.2-1.225t.675-1.075l1.325-1Q4.5 12.5 4.5 12.337v-.675q0-.162.025-.337l-1.325-1Q2.675 9.9 2.525 9.25t.2-1.225L3.9 5.975q.35-.575.975-.8t1.25.05l1.55.65q.275-.2.575-.375t.6-.3l.225-1.65q.1-.65.588-1.1T10.825 2h2.35q.675 0 1.163.45t.587 1.1l.225 1.65q.325.125.613.3t.562.375l1.55-.65q.625-.275 1.25-.05t.975.8l1.175 2.05q.35.575.2 1.225t-.675 1.075l-1.325 1q.025.175.025.338v.674q0 .163-.05.338l1.325 1q.525.425.675 1.075t-.2 1.225l-1.2 2.05q-.35.575-.975.8t-1.25-.05l-1.5-.65q-.275.2-.575.375t-.6.3l-.225 1.65q-.1.65-.587 1.1t-1.163.45zM11 20h1.975l.35-2.65q.775-.2 1.438-.587t1.212-.938l2.475 1.025l.975-1.7l-2.15-1.625q.125-.35.175-.737T17.5 12t-.05-.787t-.175-.738l2.15-1.625l-.975-1.7l-2.475 1.05q-.55-.575-1.212-.962t-1.438-.588L13 4h-1.975l-.35 2.65q-.775.2-1.437.588t-1.213.937L5.55 7.15l-.975 1.7l2.15 1.6q-.125.375-.175.75t-.05.8q0 .4.05.775t.175.75l-2.15 1.625l.975 1.7l2.475-1.05q.55.575 1.213.963t1.437.587zm1.05-4.5q1.45 0 2.475-1.025T15.55 12t-1.025-2.475T12.05 8.5q-1.475 0-2.487 1.025T8.55 12t1.013 2.475T12.05 15.5M12 12"})})}var w=e({open:!1,setOpen:()=>{}});function C({children:e,className:t,open:r,defaultOpen:a=!1,onOpenChange:n}){const[o,c]=s(a),p=void 0!==r?r:o,u=d(e=>{c(e),n?.(e)},[n]),f=l(()=>({open:p,setOpen:u}),[p,u]);/* @__PURE__ */
|
|
5
|
-
return i(w.Provider,{value:f,children:/* @__PURE__ */i("div",{className:m("relative",t),children:e})})}function T({children:e,className:a,asChild:n=!1}){const{open:o,setOpen:s}=c(w),l=d(e=>{e.stopPropagation(),s(!o)},[o,s]);if(n){const n=r(e)[0];return n?t(n,{onClick:e=>{l(e),n.props?.onClick?.(e)},className:m(n.props?.className,a,"cursor-pointer")}):null}/* @__PURE__ */
|
|
6
|
-
return i("span",{onClick:l,className:m("cursor-pointer",a),children:e})}function k({children:e,className:t,align:r="end",side:a="bottom",sideOffset:s=4}){const{open:l,setOpen:d}=c(w),f=o(null),{organization:h}=u();if(n(()=>{if(!l)return;const e=e=>{f.current&&!f.current.contains(e.target)&&d(!1)},t=e=>{"Escape"===e.key&&d(!1)};return document.addEventListener("click",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("click",e),document.removeEventListener("keydown",t)}},[l,d]),!l)return null;const b="start"===r?"left-0":"end"===r?"right-0":"left-1/2 -translate-x-1/2",v="bottom"===a?{top:`calc(100% + ${s}px)`}:{bottom:`calc(100% + ${s}px)`};/* @__PURE__ */
|
|
7
|
-
return i("div",{ref:f,style:{...p(h),...v},className:m("bg-popover text-popover-foreground border-border z-50 min-w-32 rounded border p-1 shadow-md","animate-in fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",b,t),"data-side":a,children:e})}function z({children:e,className:n,href:o,onClick:s,onSelect:l,disabled:p,icon:u,title:f,variant:b="default",isChecked:g,isBeta:x,suffix:N,asChild:q}){const{setOpen:y}=c(w),C=m("hover:bg-primary/20 relative flex w-full cursor-pointer items-center gap-3 rounded px-3 py-2 text-left text-sm transition-colors outline-none select-none",p&&"pointer-events-none opacity-50","destructive"===b&&"text-destructive hover:bg-destructive/10 focus:bg-destructive/10",n),T=e??/* @__PURE__ */i(a,{children:[u,
|
|
8
|
-
/* @__PURE__ */i("span",{className:"flex-1 truncate font-medium",children:f}),g&&/* @__PURE__ */i(v,{className:"text-primary size-5"}),x&&/* @__PURE__ */i("span",{className:"bg-primary text-primary-foreground rounded px-1.5 py-0.5 text-[10px]",children:"BETA"}),N&&/* @__PURE__ */i("span",{children:N})]}),k=d(e=>{p||(l?.(e),s?.(),y(!1))},[p,l,s,y]);if(q&&e){const a=r(e)[0];return a?t(a,{onClick:e=>{k(e),a.props?.onClick?.(e)},className:m(a.props?.className,C)}):null}return o?/* @__PURE__ */i(h,{to:o,onClick:k,className:C,children:T}):/* @__PURE__ */i("button",{onClick:k,className:C,disabled:p,type:"button",children:T})}function O({className:e}){/* @__PURE__ */
|
|
9
|
-
return i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */i("path",{fill:"currentColor",d:"M9.5 16q-2.725 0-4.612-1.888T3 9.5t1.888-4.612T9.5 3t4.613 1.888T16 9.5q0 1.1-.35 2.075T14.7 13.3l5.6 5.6q.275.275.275.7t-.275.7t-.7.275t-.7-.275l-5.6-5.6q-.75.6-1.725.95T9.5 16m0-2q1.875 0 3.188-1.312T14 9.5t-1.312-3.187T9.5 5T6.313 6.313T5 9.5t1.313 3.188T9.5 14"})})}function M({className:e}){/* @__PURE__ */
|
|
10
|
-
return i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:[/* @__PURE__ */i("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"}),/* @__PURE__ */i("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:/* @__PURE__ */i("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}export{z as a,q as c,k as i,N as l,O as n,T as o,C as r,y as s,M as t,x as u};
|
package/umd/DPmrTFJt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{O as e,a as t,b as r,f as o,h as n,t as s}from"./qbHuxVSe.js";import{i}from"./WtQ5axEj.js";import{n as a}from"./BkIDQGIs.js";var l=({as:t="div",className:n,threshold:s=.5,rootMargin:i="0px",triggerOnce:a,onChange:l,onClick:h,children:c})=>{const u=o(null),d=o(!1),p=o(l);return p.current=l,r(()=>{const e=u.current;if(!e)return;d.current=!1;const t=new IntersectionObserver(e=>{e.forEach(e=>{a&&d.current||(e.isIntersecting&&(d.current=!0),p.current?.(e.isIntersecting))})},{threshold:s,rootMargin:i});return t.observe(e),()=>t.disconnect()},[s,i,a]),e(t,{ref:u,className:n,onClick:h},c)},h=Object.defineProperty,c=Object.defineProperties,u=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&g(e,r,t[r]);if(d)for(var r of d(t))f.call(t,r)&&g(e,r,t[r]);return e},b=(e,t)=>c(e,u(t)),w=(e,t)=>{var r={};for(var o in e)p.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&d)for(var o of d(e))t.indexOf(o)<0&&f.call(e,o)&&(r[o]=e[o]);return r},v=class extends t{constructor(){super(...arguments),this.canvas=null,this.handleRef=e=>{this.canvas=e,this.draw()},this.draw=()=>{let{hash:e,height:t,punch:r,width:o}=this.props;if(this.canvas){let n=a(e,o,t,r),s=this.canvas.getContext("2d"),i=s.createImageData(o,t);i.data.set(n),s.putImageData(i,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:r,height:o,width:n}=t,s=w(t,["hash","height","width"]);return e("canvas",b(m({},s),{height:o,width:n,ref:this.handleRef}))}};v.defaultProps={height:128,width:128};var y={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};(class extends t{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:r,height:o,width:n,punch:s,resolutionX:i,resolutionY:a,style:l}=t,h=w(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return e("div",b(m({},h),{style:b(m({display:"inline-block",height:o,width:n},l),{position:"relative"})}),e(v,{hash:r,height:a,width:i,punch:s,style:y}))}}).defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var j=v,O=({src:e,alt:t,threshold:a=.1,rootMargin:h="200px 0px",blurhash:c,containerClassName:u="size-full",wrapperClassName:d,imgClassName:p="",sizeMode:f="cover",position:g="center",delayMs:m=100,delayTime:b,onClick:w})=>{const v=c&&c.length>=6?c:"LEHV6nWB2yk8pyo0adR*.7kCMdnj",[y,O]=n(!1),[C,x]=n(!1),[N,k]=n(!1),z=o(null);r(()=>{O(!1),x(!1)},[e]);const M="number"==typeof b?b:m,P=d??u;r(()=>{if(!y)return N?z.current=window.setTimeout(()=>{x(!0)},M):z.current&&(clearTimeout(z.current),z.current=null),()=>{z.current&&clearTimeout(z.current)}},[N,y,M]);const I=C&&N||y;/* @__PURE__ */
|
|
2
|
-
return s(l,{as:"div",className:i(P,"relative overflow-hidden"),threshold:a,rootMargin:h,onChange:e=>k(e),children:[N&&!y&&/* @__PURE__ */s(j,{className:"size-full blur-2xl",hash:v}),I&&e&&/* @__PURE__ */s("img",{alt:t,src:e,loading:"lazy",decoding:"async",onLoad:()=>O(!0),className:i("absolute top-0 left-0 size-full object-center transition-all duration-300",y?"scale-100 opacity-100":"scale-95 opacity-0","contain"===f?"object-contain":"object-cover","top"===g?"object-top":"bottom"===g?"object-bottom":"object-center",p),onClick:e=>w?.(e)})]})};export{l as n,O as t};
|
package/umd/DVO71jbn2.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./Cko4QHwX.js";import{b as t,f as o,h as l,p as r,t as a,w as n}from"./qbHuxVSe.js";import{I as i,a as f,n as c,w as p}from"./WtQ5axEj.js";import{t as s}from"./O530RtWA.js";import{a as d,i as u,n as m,o as g,r as b,t as h}from"./CbpHG7X52.js";import{t as x}from"./CfMNBPpx2.js";var k=[[90,-180],[-90,180]],v=[20,0],y="#fb8500",w={topLeft:[276,60],bottomRight:[60,60]},z=new s,A=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),E=({onExplore:s,logoUrl:E})=>{const L=o(null),R=o(null),C=o(null),T=o(null),M=o(null),O=o(null),I=o(null),W=o(!1),S=o(!1),Z=r(()=>(()=>{try{const e=sessionStorage.getItem(p);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.center?.lat&&"number"==typeof t?.center?.lng&&"number"==typeof t?.zoom)return t}catch{}return null})(),[]),[j,q]=l(!0),[D,B]=l(!1),{folderTree:H,activeFolderId:N,activeFolder:P,visibleEvents:U,setActiveFolderId:F,isLoadingEvents:Y}=g(),{organization:J}=c();return t(()=>{if(!L.current||R.current)return;x("leaflet",'.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;top:0;left:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:0 0}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{-webkit-transform-origin:0 0;width:1600px;height:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{width:auto;padding:0;max-width:none!important;max-height:none!important}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:#33b5e566}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;z-index:800;width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{z-index:800;pointer-events:visiblePainted;pointer-events:auto;position:relative}.leaflet-top,.leaflet-bottom{z-index:1000;pointer-events:none;position:absolute}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{outline-offset:1px;background:#ddd}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:#ffffff80;border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px #000000a6}.leaflet-bar a{text-align:center;color:#000;background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;text-decoration:none;display:block}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.leaflet-bar a.leaflet-disabled{cursor:default;color:#bbb;background-color:#f4f4f4}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{text-indent:1px;font:700 18px Lucida Console,Monaco,monospace}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px #0006}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{color:#333;background:#fff;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{padding-right:5px;overflow:hidden scroll}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{font-size:1.08333em;display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{width:1em;height:.6669em;vertical-align:baseline!important;display:inline!important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{white-space:nowrap;box-sizing:border-box;text-shadow:1px 1px #fff;background:#fffc;border:2px solid #777;border-top:none;padding:2px 5px 1px;line-height:1.1}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{background-clip:padding-box;border:2px solid #0003}.leaflet-popup{text-align:center;margin-bottom:20px;position:absolute}.leaflet-popup-content-wrapper{text-align:left;border-radius:12px;padding:1px}.leaflet-popup-content{min-height:1px;margin:13px 24px 13px 20px;font-size:1.08333em;line-height:1.3}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{pointer-events:none;width:40px;height:20px;margin-top:-1px;margin-left:-20px;position:absolute;left:50%;overflow:hidden}.leaflet-popup-tip{pointer-events:auto;width:17px;height:17px;margin:-10px auto 0;padding:1px;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{color:#333;background:#fff;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{text-align:center;color:#757575;background:0 0;border:none;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;text-decoration:none;position:absolute;top:0;right:0}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";width:24px;filter:progid:DXImageTransform.Microsoft.Matrix(M11=.707107, M12=.707107, M21=-.707107, M22=.707107);margin:0 auto}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{color:#222;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:#fff;border:1px solid #fff;border-radius:3px;padding:6px;position:absolute;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{pointer-events:none;content:"";background:0 0;border:6px solid #0000;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{margin-left:-6px;left:50%}.leaflet-tooltip-top:before{border-top-color:#fff;margin-bottom:-12px;bottom:0}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-top:-12px;margin-left:-6px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;margin-left:-12px;left:0}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}'),x("marker-cluster",".leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{transition:transform .3s ease-out,opacity .3s ease-in}.leaflet-cluster-spider-leg{transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in}.marker-cluster-small{background-color:#b5e28c99}.marker-cluster-small div{background-color:#6ecc3999}.marker-cluster-medium{background-color:#f1d35799}.marker-cluster-medium div{background-color:#f0c20c99}.marker-cluster-large{background-color:#fd9c7399}.marker-cluster-large div{background-color:#f1801799}.leaflet-oldie .marker-cluster-small{background-color:#b5e28c}.leaflet-oldie .marker-cluster-small div{background-color:#6ecc39}.leaflet-oldie .marker-cluster-medium{background-color:#f1d357}.leaflet-oldie .marker-cluster-medium div{background-color:#f0c20c}.leaflet-oldie .marker-cluster-large{background-color:#fd9c73}.leaflet-oldie .marker-cluster-large div{background-color:#f18017}.marker-cluster{background-clip:padding-box;border-radius:20px}.marker-cluster div{text-align:center;border-radius:15px;width:30px;height:30px;margin-top:5px;margin-left:5px}.marker-cluster span{line-height:30px}");let t,o=!1;return(async()=>{try{const l=await import("./BCTYvPrD.js").then(t=>/* @__PURE__ */e(t.default,1));if(o)return;if("undefined"!=typeof window&&(window.L=l),await Promise.all([import("./CgUphJWo.js").then(t=>/* @__PURE__ */e(t.default,1)),import("./rtH8O6Hc.js")]),o)return;const r=window.L??l;if(!L.current)return;const a=l.map(L.current,{center:Z?.center?[Z.center.lat??v[0],Z.center.lng??v[1]]:v,zoom:Z?.zoom??3,minZoom:3,zoomControl:!0,worldCopyJump:!1,maxBounds:l.latLngBounds(k),maxBoundsViscosity:1});l.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap contributors",maxZoom:19,noWrap:!0}).addTo(a);const n=l.layerGroup().addTo(a),i="function"==typeof r.heatLayer?r.heatLayer([],{radius:30,blur:30,maxZoom:10,minOpacity:.35}):null;i?.addTo(a);const f="function"==typeof r.markerClusterGroup?r.markerClusterGroup({chunkedLoading:!0,showCoverageOnHover:!1,spiderfyOnMaxZoom:!0,zoomToBoundsOnClick:!0,maxClusterRadius:48}):l.layerGroup();f.addTo(a);const c=()=>{I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{try{sessionStorage.setItem(p,JSON.stringify({center:a.getCenter(),zoom:a.getZoom()}))}catch{}},250)};let s;a.on("zoomend",c),a.on("moveend",c),R.current=a,C.current=r,T.current=n,O.current=i,M.current=f,"undefined"!=typeof ResizeObserver&&L.current&&(s=new ResizeObserver(()=>a.invalidateSize(!1)),s.observe(L.current)),requestAnimationFrame(()=>a.invalidateSize(!1)),B(!0),q(!1),t=()=>{s?.disconnect(),I.current&&clearTimeout(I.current),a.off("zoomend",c),a.off("moveend",c),a.remove(),C.current=null,R.current=null,T.current=null,O.current=null,M.current=null}}finally{o||q(!1)}})(),()=>{o=!0,t?.()}},[Z]),t(()=>{if(!D)return;const e=C.current;if(!e)return;const t=R.current;if(T.current?.clearLayers(),M.current?.clearLayers(),null===N&&H.length>0){t&&O.current&&(O.current.setLatLngs?.([]),t.hasLayer(O.current)&&t.removeLayer(O.current));const o=t=>{for(const l of t)if(l.centroid){const[t,o]=l.centroid,r=e.divIcon({className:"",html:`<div style="transform:translate(-50%,-50%);background:${b(l.color,y)};color:#fff;border-radius:20px;padding:5px 10px;font-size:12px;font-weight:600;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,0.25);border:2px solid rgba(255,255,255,0.4);cursor:pointer;display:inline-flex;align-items:center;gap:6px;"><span>${A(l.folder.name)}</span><span style="background:rgba(0,0,0,0.18);border-radius:10px;padding:1px 5px;font-size:10px;">${l.eventCount}</span></div>`,iconSize:[0,0],iconAnchor:[0,0]});e.marker([o,t],{icon:r}).on("click",()=>F(l.folder._id)).addTo(T.current)}else l.children.length>0&&o(l.children)};o(H)}else{if(0===U.length)return;const o=0===H.length&&null===N,l=b(P?.color,y);if(t&&O.current&&(o&&!t.hasLayer(O.current)?O.current.addTo(t):o||(O.current.setLatLngs?.([]),t.hasLayer(O.current)&&t.removeLayer(O.current))),U.forEach(t=>{const o=t.location.x,r=t.location.y,f=e.divIcon({className:"qrati-leaflet-marker-wrapper",html:`<div style="width:36px;height:36px;cursor:pointer;background:${l};border-radius:50% 50% 50% 0;transform:rotate(-45deg);border:2px solid white;box-shadow:0 2px 8px rgba(0,0,0,0.3);display:flex;align-items:center;justify-content:center;overflow:hidden;">${u(E)?`<img src="${u(E)}" style="width:24px;height:24px;border-radius:50%;object-fit:cover;transform:rotate(45deg);" />`:""}</div>`,iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-36]}),c=e.marker([r,o],{icon:f}),p=document.createElement("div");p.style.width="fit-content",((e,t,o)=>{n(/* @__PURE__ */a(i,{client:z,children:/* @__PURE__ */a(d,{event:e,onExplore:o})}),t)})(t,p,s),c.bindPopup(p,{closeButton:!0,maxWidth:256}),M.current?.addLayer(c)}),o&&O.current){const e=U.reduce((e,t)=>Math.max(e,t.views??0),1),t=U.map(e=>[e.location.y,e.location.x,e.views??1]);O.current.setOptions?.({radius:30,blur:30,maxZoom:10,minOpacity:.35,max:e}),O.current.setLatLngs?.(t)}if(o&&!S.current&&t&&(S.current=!0,!Z)){const o=e.latLngBounds([]);U.forEach(e=>o.extend([e.location.y,e.location.x])),o.isValid()&&t.fitBounds(o,{paddingTopLeft:w.topLeft,paddingBottomRight:w.bottomRight,maxZoom:8})}}},[N,H,U,D,s,E,F,P,Z]),t(()=>{if(!D)return;const e=R.current,t=C.current;if(!e||!t)return;if(!W.current&&Z)return void(W.current=!0);W.current=!0;const o={paddingTopLeft:w.topLeft,paddingBottomRight:w.bottomRight,duration:3,easeLinearity:1};if(N){const l=m(H,N);if(!l?.folder.boundary?.length)return;const r=t.latLngBounds([]);for(const e of l.folder.boundary)r.extend([e.y,e.x]);r.isValid()&&e.flyToBounds(r,{...o,maxZoom:14})}else{const l=t.latLngBounds([]),r=e=>{for(const t of e)t.centroid?l.extend([t.centroid[1],t.centroid[0]]):r(t.children)};r(H),l.isValid()&&e.flyToBounds(l,{...o,maxZoom:8})}},[N,H,D,Z]),/* @__PURE__ */a("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",style:f(J),children:[
|
|
2
|
-
/* @__PURE__ */a(h,{positionClass:"absolute top-3 left-16 z-[1000]",folderTree:H,activeFolderId:N,setActiveFolderId:F}),Y&&/* @__PURE__ */a("div",{class:"absolute inset-0 z-10 flex items-center justify-center bg-white/60",children:/* @__PURE__ */a("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"})}),j&&/* @__PURE__ */a("div",{class:"absolute inset-0 z-20 flex items-center justify-center bg-white/85",children:/* @__PURE__ */a("div",{class:"flex flex-col items-center gap-3",children:[/* @__PURE__ */a("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"}),/* @__PURE__ */a("p",{class:"text-sm font-medium text-slate-700",children:"Loading map…"})]})}),
|
|
3
|
-
/* @__PURE__ */a("div",{ref:L,class:"h-full w-full rounded-xl border border-slate-200"})]})};export{E as default};
|
package/umd/DWbLshVZ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{D as r,p as n,t as o,v as a,y as s}from"./qbHuxVSe.js";var t={loading:"Loading...",error:"Error",not_found:"Translation not found"},e=r({locale:"en",translations:t,isLoading:!1,error:null}),i=()=>{const r=s(e);if(!r)throw new Error("useI18n must be used within an I18nProvider");const{translations:n,isLoading:o,error:i}=r;return{t:a((r,a)=>o?t.loading:i?t.error:n[r]||a||r,[n,o,i])}},l=i,d=({children:r,locale:a="en",translations:s})=>{const i=n(()=>({locale:a,translations:{...t,...s||{}},isLoading:!1,error:null}),[a,s]);/* @__PURE__ */
|
|
2
|
-
return o(e.Provider,{value:i,children:r})};export{i as n,l as r,d as t};
|
package/umd/DXrH_HhZ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./qbHuxVSe.js";var r=()=>/* @__PURE__ */e("div",{className:"text-muted-foreground text-center text-sm",children:["Powered by"," ",
|
|
2
|
-
/* @__PURE__ */e("a",{href:"https://qrati.com",target:"_blank",rel:"noopener noreferrer",children:/* @__PURE__ */e("strong",{children:"Qrati"})})]});export{r as t};
|
package/umd/DYUfJm8F.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{T as e,t}from"./qbHuxVSe.js";import{D as n,n as a}from"./WtQ5axEj.js";import{c as r,l as i,t as s}from"./lVJD5cJY.js";import{t as o}from"./fwDYCLiL.js";import{t as l}from"./BekfKWcG.js";import{n as c}from"./DWbLshVZ.js";import{t as m}from"./2SYk3iBo.js";import{t as d}from"./DXrH_HhZ.js";function h({className:e}){/* @__PURE__ */
|
|
2
|
-
return t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */t("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19v-3q0-.425.288-.712T4 15t.713.288T5 16v3h14V5H5v3q0 .425-.288.713T4 9t-.712-.288T3 8V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm6.65-8H4q-.425 0-.712-.288T3 12t.288-.712T4 11h7.65L9.8 9.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.312t.712.287L14.8 11.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-3.575 3.575q-.3.3-.712.288T9.8 16.25q-.275-.3-.288-.7t.288-.7z"})})}var u=()=>{const{t:e}=c(),d=r(),u=i(),{initializing:p,organization:g,loadingUser:v,user:f,signout:N}=a();/* @__PURE__ */
|
|
3
|
-
return t("div",p||v?{className:"my-2 flex justify-end",children:/* @__PURE__ */t(o,{className:"h-9 w-64"})}:{className:"mx-auto mb-4",children:[!f&&/* @__PURE__ */t("div",{className:"flex justify-end gap-4",children:/* @__PURE__ */t(s,{to:`${n.LOGIN}?ref=${encodeURIComponent(d.pathname)}`,children:/* @__PURE__ */t(m,{children:e("button.login","Login")})})}),f&&/* @__PURE__ */t("div",{className:"mt-2 flex items-center justify-end gap-4",children:[/* @__PURE__ */t(l,{variant:"h5",children:f.name}),!g?.customAuth&&/* @__PURE__ */t("button",{onClick:async()=>{await N(),u(n.PUBLIC_EVENTS)},children:/* @__PURE__ */t(h,{className:"text-destructive"})})]})]})},p=()=>{const{user:r,organization:o,signout:c}=a(),m=i(),h=o?.integrationSettings?.hideQratiBranding;/* @__PURE__ */
|
|
4
|
-
return t("div",{className:"pt-16 sm:pt-24",children:[o&&/* @__PURE__ */t("div",{className:"mx-auto py-2",children:o.customAuth?r&&/* @__PURE__ */t(l,{variant:"h6",align:"center",children:[r.name," •"," ",
|
|
5
|
-
/* @__PURE__ */t(s,{className:"hover:underline",to:n.MY_UPLOADS,children:"My Uploads"})]}):/* @__PURE__ */t(e,{children:[!r&&/* @__PURE__ */t(l,{variant:"h6",align:"center",children:[
|
|
6
|
-
/* @__PURE__ */t(s,{className:"text-primary hover:underline",to:n.LOGIN,children:"Login"})," ","•"," ",
|
|
7
|
-
/* @__PURE__ */t(s,{className:"text-primary hover:underline",to:n.REGISTER,children:"Register"})]}),r&&/* @__PURE__ */t(l,{variant:"h6",align:"center",children:[r.name," •"," ",
|
|
8
|
-
/* @__PURE__ */t(s,{className:"hover:underline",to:n.MY_UPLOADS,children:"My Uploads"})," ","•"," ",
|
|
9
|
-
/* @__PURE__ */t("button",{type:"button",className:"text-destructive cursor-pointer border-none bg-transparent p-0 hover:underline",onClick:async()=>{await c(),m(n.PUBLIC_EVENTS)},children:"Logout"})]})]})}),!h&&/* @__PURE__ */t(d,{})]})};export{u as n,p as t};
|
package/umd/DibuO0dP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{G as t,H as e,U as s}from"./WtQ5axEj.js";var i=class extends e{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#a({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=s({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(/* @__PURE__ */new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const a="pending"===this.state.status,o=!this.#i.canStart();try{if(a)e();else{this.#a({type:"pending",variables:t,isPaused:o}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,i);const e=await(this.options.onMutate?.(t,i));e!==this.state.context&&this.#a({type:"pending",context:e,variables:t,isPaused:o})}const s=await this.#i.start();return await(this.#s.config.onSuccess?.(s,t,this.state.context,this,i)),await(this.options.onSuccess?.(s,t,this.state.context,i)),await(this.#s.config.onSettled?.(s,null,this.state.variables,this.state.context,this,i)),await(this.options.onSettled?.(s,null,t,this.state.context,i)),this.#a({type:"success",data:s}),s}catch(r){try{await(this.#s.config.onError?.(r,t,this.state.context,this,i))}catch(n){Promise.reject(n)}try{await(this.options.onError?.(r,t,this.state.context,i))}catch(n){Promise.reject(n)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,i))}catch(n){Promise.reject(n)}try{await(this.options.onSettled?.(void 0,r,t,this.state.context,i))}catch(n){Promise.reject(n)}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.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}export{a as n,i as t};
|