PageSourceSearch

https://arona-note.netlify.app/_astro/PhotoSwipe.astro_astro_type_script_index_0_lang.rGeJF7Tz.js

js arona-note.netlify.app collected 2026-10-03 10:27:58 UTC 16,523 bytes, 1 lines download raw bytes

vendor: 13,602 bytes, line 1
1import{_ as L}from"./preload-helper.CVfkMyKi.js";function d(s,t,i){const e=document.createElement(t);return s&&(e.className=s),i&&i.appendChild(e),e}function C(s,t,i){let e=`translate3d(${s}px,0px,0)`;return i!==void 0&&(e+=` scale3d(${i},${i},1)`),e}function m(s,t,i){s.style.width=typeof t=="number"?`${t}px`:t,s.style.height=typeof i=="number"?`${i}px`:i}const a={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function D(s){return"button"in s&&s.button===1||s.ctrlKey||s.metaKey||s.altKey||s.shiftKey}function p(s,t,i=document){let e=[];if(s instanceof Element)e=[s];else if(s instanceof NodeList||Array.isArray(s))e=Array.from(s);else{const n=typeof s=="string"?s:t;n&&(e=Array.from(i.querySelectorAll(n)))}return e}function A(s){return typeof s=="function"&&s.prototype&&s.prototype.goTo}function v(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}class z{constructor(t,i){this.type=t,this.defaultPrevented=!1,i&&Object.assign(this,i)}preventDefault(){this.defaultPrevented=!0}}class P{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,i,e=100){var n,l,r;this._filters[t]||(this._filters[t]=[]),(n=this._filters[t])===null||n===void 0||n.push({fn:i,priority:e}),(l=this._filters[t])===null||l===void 0||l.sort((o,f)=>o.priority-f.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,i,e)}removeFilter(t,i){this._filters[t]&&(this._filters[t]=this._filters[t].filter(e=>e.fn!==i)),this.pswp&&this.pswp.removeFilter(t,i)}applyFilters(t,...i){var e;return(e=this._filters[t])===null||e===void 0||e.forEach(n=>{i[0]=n.fn.apply(this,i)}),i[0]}on(t,i){var e,n;this._listeners[t]||(this._listeners[t]=[]),(e=this._listeners[t])===null||e===void 0||e.push(i),(n=this.pswp)===null||n===void 0||n.on(t,i)}off(t,i){var e;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(n=>i!==n)),(e=this.pswp)===null||e===void 0||e.off(t,i)}dispatch(t,i){var e;if(this.pswp)return this.pswp.dispatch(t,i);const n=new z(t,i);return(e=this._listeners[t])===null||e===void 0||e.forEach(l=>{l.call(this,n)}),n}}class O{constructor(t,i){if(this.element=d("pswp__img pswp__img--placeholder",t?"img":"div",i),t){const e=this.element;e.decoding="async",e.alt="",e.src=t,e.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,i){this.element&&(this.element.tagName==="IMG"?(m(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=C(0,0,t/250)):m(this.element,t,i))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class b{constructor(t,i,e){this.instance=i,this.data=t,this.index=e,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=a.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new O(e,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=d("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=d("pswp__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var i,e;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=(i=this.data.src)!==null&&i!==void 0?i:"",n.alt=(e=this.data.alt)!==null&&e!==void 0?e:"",this.state=a.LOADING,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=a.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===a.LOADED||this.state===a.ERROR)&&this.removePlaceholder())}onError(){this.state=a.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===a.LOADING,this)}isError(){return this.state===a.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,i),!this.instance.dispatch("contentResize",{content:this,width:t,height:i}).defaultPrevented&&(m(this.element,t,i),this.isImageContent()&&!this.isError()))){const e=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=i,e?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==a.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,i=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||i>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=i+"px",t.dataset.largestUsedSize=String(i))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,i;let e=d("pswp__error-msg","div");e.innerText=(t=(i=this.instance.options)===null||i===void 0?void 0:i.errorMsg)!==null&&t!==void 0?t:"",e=this.instance.applyFilters("contentErrorElement",e,this),this.element=d("pswp__content pswp__error-msg-container","div"),this.element.appendChild(e),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===a.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||v())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!v()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===a.LOADED||this.state===a.ERROR)&&this.removePlaceholder()))}}function x(s,t){if(s.getViewportSizeFn){const i=s.getViewportSizeFn(s,t);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function c(s,t,i,e,n){let l=0;if(t.paddingFn)l=t.paddingFn(i,e,n)[s];else if(t.padding)l=t.padding[s];else{const r="padding"+s[0].toUpperCase()+s.slice(1);t[r]&&(l=t[r])}return Number(l)||0}function M(s,t,i,e){return{x:t.x-c("left",s,t,i,e)-c("right",s,t,i,e),y:t.y-c("top",s,t,i,e)-c("bottom",s,t,i,e)}}const w=4e3;class F{constructor(t,i,e,n){this.pswp=n,this.options=t,this.itemData=i,this.index=e,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,i,e){const n={x:t,y:i};this.elementSize=n,this.panAreaSize=e;const l=e.x/n.x,r=e.y/n.y;this.fit=Math.min(1,l<r?l:r),this.fill=Math.min(1,l>r?l:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const i=t+"ZoomLevel",e=this.options[i];if(e)return typeof e=="function"?e(this):e==="fill"?this.fill:e==="fit"?this.fit:Number(e)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>w&&(t=w/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}function I(s,t,i){const e=t.createContentFromData(s,i);let n;const{options:l}=t;if(l){n=new F(l,s,-1);let r;t.pswp?r=t.pswp.viewportSize:r=x(l,t);const o=M(l,r,s,i);n.update(e.width,e.height,o)}return e.lazyLoad(),n&&e.setDisplayedSize(Math.ceil(e.width*n.initial),Math.ceil(e.height*n.initial)),e}function T(s,t){const i=t.getItemData(s);if(!t.dispatch("lazyLoadSlide",{index:s,itemData:i}).defaultPrevented)return I(i,t,s)}class R extends P{getNumItems(){var t;let i=0;const e=(t=this.options)===null||t===void 0?void 0:t.dataSource;e&&"length"in e?i=e.length:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),e.items&&(i=e.items.length));const n=this.dispatch("numItems",{dataSource:e,numItems:i});return this.applyFilters("numItems",n.numItems,e)}createContentFromData(t,i){return new b(t,this,i)}getItemData(t){var i;const e=(i=this.options)===null||i===void 0?void 0:i.dataSource;let n={};Array.isArray(e)?n=e[t]:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),n=e.items[t]);let l=n;l instanceof Element&&(l=this._domElementToItemData(l));const r=this.dispatch("itemData",{itemData:l||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var i,e;return(i=this.options)!==null&&i!==void 0&&i.children||(e=this.options)!==null&&e!==void 0&&e.childSelector?p(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const i={element:t},e=t.tagName==="A"?t:t.querySelector("a");if(e){i.src=e.dataset.pswpSrc||e.href,e.dataset.pswpSrcset&&(i.srcset=e.dataset.pswpSrcset),i.width=e.dataset.pswpWidth?parseInt(e.dataset.pswpWidth,10):0,i.height=e.dataset.pswpHeight?parseInt(e.dataset.pswpHeight,10):0,i.w=i.width,i.h=i.height,e.dataset.pswpType&&(i.type=e.dataset.pswpType);const l=t.querySelector("img");if(l){var n;i.msrc=l.currentSrc||l.src,i.alt=(n=l.getAttribute("alt"))!==null&&n!==void 0?n:""}(e.dataset.pswpCropped||e.dataset.cropped)&&(i.thumbCropped=!0)}return this.applyFilters("domItemData",i,t,e)}lazyLoadData(t,i){return I(t,this,i)}}class k extends R{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){p(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(D(t)||window.pswp)return;let i={x:t.clientX,y:t.clientY};!i.x&&!i.y&&(i=null);let e=this.getClickedIndex(t);e=this.applyFilters("clickedIndex",e,t,this);const n={gallery:t.currentTarget};e>=0&&(t.preventDefault(),this.loadAndOpen(e,n,i))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const i=t.target,n=p(this.options.children,this.options.childSelector,t.currentTarget).findIndex(l=>l===i||l.contains(i));return n!==-1?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,i,e){if(window.pswp||!this.options)return!1;if(!i&&this.options.gallery&&this.options.children){const n=p(this.options.gallery);n[0]&&(i={gallery:n[0]})}return this.options.index=t,this.options.initialPointerPos=e,this.shouldOpen=!0,this.preload(t,i),!0}preload(t,i){const{options:e}=this;i&&(e.dataSource=i);const n=[],l=typeof e.pswpModule;
1if(A(e.pswpModule))n.push(Promise.resolve(e.pswpModule));else{if(l==="string")throw new Error("pswpModule as string is no longer supported");if(l==="function")n.push(e.pswpModule());else throw new Error("pswpModule is not valid")}typeof e.openPromise=="function"&&n.push(e.openPromise()),e.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=T(t,this));const r=++this._uid;Promise.all(n).then(o=>{if(this.shouldOpen){const f=o[0];this._openPhotoswipe(f,r)}})}_openPhotoswipe(t,i){if(i!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const e=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=e,window.pswp=e,Object.keys(this._listeners).forEach(n=>{var l;(l=this._listeners[n])===null||l===void 0||l.forEach(r=>{e.on(n,r)})}),Object.keys(this._filters).forEach(n=>{var l;(l=this._filters[n])===null||l===void 0||l.forEach(r=>{e.addFilter(n,r.fn,r.priority)})}),this._preloadedContent&&(e.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),e.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),e.init()}destroy(){var t;(t=this.pswp)===null||t===void 0||t.destroy(),this.shouldOpen=!1,this._listeners={},p(this.options.gallery,this.options.gallerySelector).forEach(i=>{i.removeEventListener("click",this.onThumbnailsClick,!1)})}}let h=null,u=[],g=new Map;function y(){S();const s=document.querySelector(".content");if(!s)return;const t=s.querySelectorAll("img");t.length!==0&&(u=Array.from(t),u.forEach(i=>{if(i.style.cursor="zoom-in",i.complete&&i.naturalWidth>0)i.dataset.pswpWidth=String(i.naturalWidth),i.dataset.pswpHeight=String(i.naturalHeight);else{const e=()=>{i.naturalWidth>0&&(i.dataset.pswpWidth=String(i.naturalWidth),i.dataset.pswpHeight=String(i.naturalHeight),_())};i.addEventListener("load",e),g.set(i,e)}}),_())}function _(){h&&(h.destroy(),h=null);const s=u.filter(t=>{const i=parseInt(t.dataset.pswpWidth||"0"),e=parseInt(t.dataset.pswpHeight||"0");return i>0&&e>0}).map(t=>({src:t.src,width:parseInt(t.dataset.pswpWidth||"0"),height:parseInt(t.dataset.pswpHeight||"0"),alt:t.alt||"",element:t}));s.length!==0&&(h=new k({dataSource:s,pswpModule:()=>L(()=>import("./photoswipe.esm.BXDdABy_.js"),[]),bgOpacity:.9,showHideAnimationType:"zoom",imageClickAction:"zoom",tapAction:"zoom",doubleTapAction:"zoom",wheelToZoom:!0,padding:{top:20,bottom:20,left:20,right:20}}),s.forEach((t,i)=>{t.element?.removeEventListener("click",E),t.element?.addEventListener("click",E),t.element&&(t.element.__pswpIndex=i)}),h.init())}function E(s){s.preventDefault();const t=s.currentTarget;h&&typeof t.__pswpIndex=="number"&&h.loadAndOpen(t.__pswpIndex)}function S(){g.forEach((s,t)=>{t.removeEventListener("load",s)}),g.clear(),h&&(h.destroy(),h=null),u=[]}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",y):y();document.addEventListener("astro:page-load",y);document.addEventListener("astro:before-swap",S);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.