@micrio/client 5.4.33 → 5.5.1
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/micrio.min.b.js +25 -0
- package/micrio.min.d.ts +238 -192
- package/micrio.min.js +5 -6
- package/package.json +1 -1
package/micrio.min.b.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* Micrio Client 5.5.0
|
|
2
|
+
* Copyright (C) 2015 - 2025 Q42 Internet B.V., Micrio <https://micr.io>
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
5
|
+
* and associated documentation files (the "Software"), to deal in the Software without
|
|
6
|
+
* restriction, including without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
|
|
8
|
+
* Software is furnished to do so, subject to the following conditions:
|
|
9
|
+
*
|
|
10
|
+
* The above copyright notice and this permission notice shall be included in all copies or
|
|
11
|
+
* substantial portions of the Software.
|
|
12
|
+
*
|
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
|
14
|
+
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
15
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
16
|
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
17
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
((M,I,C,R='O')=>{
|
|
21
|
+
if(!(typeof window !== undefined && typeof window !== 'undefined')) return;M='H4sIAAAAAAACA+29e3xc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v7zxcZRg4#vhPJ7bW2LJ5TG8UM2DfBKcJ8F9ErwnsQj9GRZtZiGHvDoiRfQxvUL0$ePd+GjH3$T0ve8P$636y+$7Ro$WK2Qamph60CvSLceGdc+8WNN6hcf2KYi+WLTCNyKqT6N6yKIV+aw3yHoLSp0#FovoPYGqXSHSP0cIUaW+2C12i31iSAyKKTEq9om9AsSU2Cf2CRC7xaCYELeLEdNxX14glwuFEPeI3WJUbBeXiQkxJS4Tk2JK3CG2i0vFlJgU8$6i9xQULLMCpFjgL$pYQXWtsgJ83IrRnLXH$xf8i$52XiqsIZa1UewVd4pBqucwtWxE7BW3iymxE2tUPLNdr8m0C$thQgyKu8R2cYfYIXaIETGRbV$05eLZt#t7RTUrp+cV9lYhxG1irxgRB8S4GBFDYkqMUEVfK$aK#2iQXos7ldgr9okpAWJQTIpJMSpup1QIuU9MCBA7xKAYpeZh2BDBTYmLz6yG#rPJK4QQk2JCDInLxNso5R5xGeXBnTc5f0Cjx0vqpNx770+a6PuLN732xYvP7bvxoQ9t$$rJv1vzbx8duvmn0f1XX7F+74onBr$45N9$59KNuef+8obeZd+94KfLHviLwr+9$h3PX$XoxZ94zfjD3z7U9+Sl6$7q$euie7Z96te3HXr4x+tuvff0f3rhojdUf$LUry+67PvlB$2$$$N71u65aE$xLTt6rrnpicKXXvsnn3ntHZ3f2fbhf1+Xv$LtP$in735i23$s+s4Dt7z7mi73jcGvvPci+#yfn$rorre$#Pj+b$7#BWt$fGTb#x8aCTr++a2zXzv93tr#+pI3nZvLXf7ayRtE9GLLmbNm6cuMf9IF0cdas+#N7mD+uEdfbj3bjp4U#6kcHLr5Hf2ecrasC0xZTnbNlM9mBn75rKC+d1ZQ79GvDvW$AbXnzp#yuAAA',I=window.DecompressionStream,C=(b,t,d,a)=>(a=atob(b.replace(/\$/g,'/').replace(/#/g,'O')).split('').map(x=>x.charCodeAt(0)),d=I?new Response(new Blob([new Uint8Array(a)]).stream().pipeThrough(new I('gzip'))):(new Zlib.Gunzip(a)).decompress())&&(I?t?d.arrayBuffer():d.text():t?d:new self.TextDecoder('utf-8').decode(d));(I?new Promise(a=>a()):fetch('https://r2.micr.io/gunzip.min.js').then(r=>r.text()).then(js=>Function(js)())).then(()=>(function(){const [_c,_u,_b]=arguments,_css=document.createElement('style');
|
|
22
|
+
_css.className='micrio-interface';_css.textContent=_c;
|
|
23
|
+
document.head.insertBefore(_css,document.head.firstChild);
|
|
24
|
+
!function(){"undefined"!=typeof window&&((window.__svelte??={}).v??=new Set).add("5");var t={},e=Symbol(),i=(Symbol("filename"),"http://www.w3.org/2000/svg"),r=Array.isArray,s=Array.prototype.indexOf,n=Array.prototype.includes,a=Array.from,o=Object.keys,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,d=Object.prototype,u=Array.prototype,m=Object.getPrototypeOf,f=Object.isExtensible;function p(t){return"function"==typeof t}var g=()=>{};function v(){var t,e;return{promise:new Promise((i,r)=>{t=i,e=r}),resolve:t,reject:e}}function w(t,e){if(Array.isArray(t))return t;if(void 0===e||!(Symbol.iterator in t))return Array.from(t);const i=[];for(const r of t)if(i.push(r),i.length===e)break;return i}var b=1024,y=2048,k=4096,T=8192,_=32768,x=1<<25,E=65536,S=1<<19,A=1<<25,M=65536,I=1<<21,$=1<<23,P=Symbol("$state"),L=Symbol("legacy props"),C=Symbol(""),R=(Symbol("proxy path"),Symbol("hmr anchor"),new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"}),D=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function F(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function O(t,e,i){throw new Error("https://svelte.dev/e/each_key_duplicate")}function z(t){console.warn("https://svelte.dev/e/hydration_mismatch")}var N,V=!1;function U(t){V=t}function B(e){if(null===e)throw z(),t;return N=e}function W(){return B(Te(N))}function q(e){if(V){if(null!==Te(N))throw z(),t;N=e}}function X(t=1){if(V){for(var e=t,i=N;e--;)i=Te(i);N=i}}function Y(t=!0){for(var e=0,i=N;;){if(8===i.nodeType){var r=i.data;if("]"===r){if(0===e)return i;e-=1}else("["===r||"[!"===r||"["===r[0]&&!isNaN(Number(r.slice(1))))&&(e+=1)}var s=Te(i);t&&i.remove(),i=s}}function j(e){if(!e||8!==e.nodeType)throw z(),t;return e.data}function G(t){return t===this.v}function H(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function Z(t){return!H(t,this.v)}var J=null;function K(t){J=t}function Q(t){return rt("getContext").get(t)}function tt(t,e){return rt("setContext").set(t,e),e}function et(t,e=!1,i){J={p:J,i:!1,c:null,e:null,s:t,x:null,r:ci,l:null}}function it(t){var e=J,i=e.e;if(null!==i)for(var r of(e.e=null,i))ze(r);return void 0!==t&&(e.x=t),e.i=!0,J=e.p,t??{}}function rt(t){return null===J&&F(),J.c??=new Map(function(t){let e=t.p;for(;null!==e;){const t=e.c;if(null!==t)return t;e=e.p}return null}(J)||void 0)}var st=[];function nt(){var t=st;st=[],function(t){for(var e=0;e<t.length;e++)t[e]()}(t)}function at(t){if(0===st.length&&!Mt){var e=st;queueMicrotask(()=>{e===st&&nt()})}st.push(t)}function ot(){for(;st.length>0;)nt()}function ct(t){var e=ci;if(null===e)return ni.f|=$,t;if(!(32768&e.f||4&e.f))throw t;lt(t,e)}function lt(t,e){for(;null!==e;){if(128&e.f){if(!(32768&e.f))throw t;try{return void e.b.error(t)}catch(i){t=i}}e=e.parent}throw t}var ht=-7169;function dt(t,e){t.f=t.f&ht|e}function ut(t){512&t.f||null===t.deps?dt(t,b):dt(t,k)}function mt(t){if(null!==t)for(const e of t)2&e.f&&65536&e.f&&(e.f^=M,mt(e.deps))}function ft(t,e,i){2048&t.f?e.add(t):4096&t.f&&i.add(t),mt(t.deps),dt(t,b)}function pt(t,e,i){if(null==t)return e(void 0),i&&i(void 0),g;const r=$i(()=>t.subscribe(e,i));return r.unsubscribe?()=>r.unsubscribe():r}var gt=[];function vt(t,e=g){let i=null;const r=new Set;function s(e){if(H(t,e)&&(t=e,i)){const e=!gt.length;for(const i of r)i[1](),gt.push(i,t);if(e){for(let t=0;t<gt.length;t+=2)gt[t][0](gt[t+1]);gt.length=0}}}function n(e){s(e(t))}return{set:s,update:n,subscribe:function(a,o=g){const c=[a,o];return r.add(c),1===r.size&&(i=e(s,n)||g),a(t),()=>{r.delete(c),0===r.size&&i&&(i(),i=null)}}}}function wt(t){let e;return pt(t,t=>e=t)(),e}var bt=!1,yt=Symbol();function kt(t,e,i){const r=i[e]??={store:null,source:ae(void 0),unsubscribe:g};if(r.store!==t&&!(yt in i))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=g;else{var s=!0;r.unsubscribe=pt(t,t=>{s?r.source.v=t:oe(r.source,t)}),s=!1}return t&&yt in i?wt(t):Ai(r.source)}function Tt(t,e,i){let r=i[e];return r&&r.store!==t&&(r.unsubscribe(),r.unsubscribe=g),t}function _t(){const t={};return[t,function(){Fe(()=>{for(var e in t)t[e].unsubscribe();c(t,yt,{enumerable:!1,value:!0})})}]}var xt=new Set,Et=null,St=null,At=null,Mt=!1,It=!1,$t=null,Pt=null,Lt=0,Ct=1,Rt=class t{id=Ct++;current=new Map;previous=new Map;#t=new Set;#e=new Set;#i=new Set;#r=new Map;#s=new Map;#n=null;#a=[];#o=[];#c=new Set;#l=new Set;#h=new Map;#d=new Set;is_fork=!1;#u=!1;#m=new Set;#f(){return this.is_fork||this.#s.size>0}#p(){for(const i of this.#m)for(const r of i.#s.keys()){for(var t=!1,e=r;null!==e.parent;){if(this.#h.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(t){this.#h.has(t)||this.#h.set(t,{d:[],m:[]}),this.#d.delete(t)}unskip_effect(t,e=t=>this.schedule(t)){var i=this.#h.get(t);if(i){for(var r of(this.#h.delete(t),i.d))dt(r,y),e(r);for(r of i.m)dt(r,k),e(r)}this.#d.add(t)}#g(){if(Lt++>1e3&&(xt.delete(this),function(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){0,lt(t,At)}}()),!this.#f()){for(const t of this.#c)this.#l.delete(t),dt(t,y),this.schedule(t);for(const t of this.#l)dt(t,k),this.schedule(t)}const e=this.#a;this.#a=[],this.apply();var i=$t=[],r=[],s=Pt=[];for(const t of e)try{this.#v(t,i,r)}catch(o){throw Bt(t),o}if(Et=null,s.length>0){var n=t.ensure();for(const t of s)n.schedule(t)}if($t=null,Pt=null,this.#f()||this.#p()){this.#w(r),this.#w(i);for(const[t,e]of this.#h)Ut(t,e)}else{0===this.#r.size&&xt.delete(this),this.#c.clear(),this.#l.clear();for(const t of this.#t)t(this);this.#t.clear(),Ot(r),Ot(i),this.#n?.resolve()}var a=Et;if(this.#a.length>0){const t=a??=this;t.#a.push(...this.#a.filter(e=>!t.#a.includes(e)))}null!==a&&(xt.add(a),a.#g())}#v(t,e,i){t.f^=b;for(var r=t.first;null!==r;){var s=r.f,n=!!(96&s);if(!(n&&1024&s||8192&s||this.#h.has(r))&&null!==r.fn){n?r.f^=b:4&s?e.push(r):yi(r)&&(16&s&&this.#l.add(r),Ei(r));var a=r.first;if(null!==a){r=a;continue}}for(;null!==r;){var o=r.next;if(null!==o){r=o;break}r=r.parent}}}#w(t){for(var e=0;e<t.length;e+=1)ft(t[e],this.#c,this.#l)}capture(t,i,r=!1){t.v===e||this.previous.has(t)||this.previous.set(t,t.v),8388608&t.f||(this.current.set(t,[i,r]),St?.set(t,i)),this.is_fork||(t.v=i)}activate(){Et=this}deactivate(){Et=null,St=null}flush(){try{It=!0,Et=this,this.#g()}finally{Lt=0,At=null,$t=null,Pt=null,It=!1,Et=null,St=null,ie.clear()}}discard(){for(const t of this.#e)t(this);this.#e.clear(),this.#i.clear(),xt.delete(this)}register_created_effect(t){this.#o.push(t)}#b(){for(const l of xt){var t=l.id<this.id,e=[];for(const[r,[s,n]]of this.current){if(l.current.has(r)){var i=l.current.get(r)[0];if(!t||s===i)continue;l.current.set(r,[s,n])}e.push(r)}var r=[...l.current.keys()].filter(t=>!this.current.has(t));if(0===r.length)t&&l.discard();else if(e.length>0){if(t)for(const t of this.#d)l.unskip_effect(t,t=>{4194320&t.f?l.schedule(t):l.#w([t])});l.activate();var s=new Set,n=new Map;for(var a of e)zt(a,r,s,n);n=new Map;var o=[...l.current.keys()].filter(t=>!this.current.has(t)||this.current.get(t)[0]!==t);for(const t of this.#o)155648&t.f||!Nt(t,o,n)||(4194320&t.f?(dt(t,y),l.schedule(t)):l.#c.add(t));if(l.#a.length>0){for(var c of(l.apply(),l.#a))l.#v(c,[],[]);l.#a=[]}l.deactivate()}}for(const l of xt)l.#m.has(this)&&(l.#m.delete(this),0!==l.#m.size||l.#f()||(l.activate(),l.#g()))}increment(t,e){let i=this.#r.get(e)??0;if(this.#r.set(e,i+1),t){let t=this.#s.get(e)??0;this.#s.set(e,t+1)}}decrement(t,e,i){let r=this.#r.get(e)??0;if(1===r?this.#r.delete(e):this.#r.set(e,r-1),t){let t=this.#s.get(e)??0;1===t?this.#s.delete(e):this.#s.set(e,t-1)}this.#u||i||(this.#u=!0,at(()=>{this.#u=!1,this.flush()}))}transfer_effects(t,e){for(const i of t)this.#c.add(i);for(const i of e)this.#l.add(i);t.clear(),e.clear()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}on_fork_commit(t){this.#i.add(t)}run_fork_commit_callbacks(){for(const t of this.#i)t(this);this.#i.clear()}settled(){return(this.#n??=v()).promise}static ensure(){if(null===Et){const e=Et=new t;It||(xt.add(Et),Mt||at(()=>{Et===e&&e.flush()}))}return Et}apply(){St=null}schedule(t){if(At=t,!(t.b?.is_pending&&16777228&t.f)||32768&t.f){for(var e=t;null!==e.parent;){var i=(e=e.parent).f;if(!(null===$t||e!==ci||null!==ni&&2&ni.f))return;if(96&i){if(!(1024&i))return;e.f^=b}}this.#a.push(e)}else t.b.defer_effect(t)}};function Dt(t){var e=Mt;Mt=!0;try{var i;for(t&&(null===Et||Et.is_fork||Et.flush(),i=t());;){if(ot(),null===Et)return i;Et.flush()}}finally{Mt=e}}var Ft=null;function Ot(t){var e=t.length;if(0!==e){for(var i=0;i<e;){var r=t[i++];if(!(24576&r.f)&&yi(r)&&(Ft=new Set,Ei(r),null===r.deps&&null===r.first&&null===r.nodes&&null===r.teardown&&null===r.ac&&He(r),Ft?.size>0)){ie.clear();for(const t of Ft){if(24576&t.f)continue;const e=[t];let i=t.parent;for(;null!==i;)Ft.has(i)&&(Ft.delete(i),e.push(i)),i=i.parent;for(let t=e.length-1;t>=0;t--){const i=e[t];24576&i.f||Ei(i)}}Ft.clear()}}Ft=null}}function zt(t,e,i,r){if(!i.has(t)&&(i.add(t),null!==t.reactions))for(const s of t.reactions){const t=s.f;2&t?zt(s,e,i,r):4194320&t&&!(2048&t)&&Nt(s,e,r)&&(dt(s,y),Vt(s))}}function Nt(t,e,i){const r=i.get(t);if(void 0!==r)return r;if(null!==t.deps)for(const s of t.deps){if(n.call(e,s))return!0;if(2&s.f&&Nt(s,e,i))return i.set(s,!0),!0}return i.set(t,!1),!1}function Vt(t){Et.schedule(t)}function Ut(t,e){if(!(32&t.f&&1024&t.f)){2048&t.f?e.d.push(t):4096&t.f&&e.m.push(t),dt(t,b);for(var i=t.first;null!==i;)Ut(i,e),i=i.next}}function Bt(t){dt(t,b);for(var e=t.first;null!==e;)Bt(e),e=e.next}var Wt=class{parent;is_pending=!1;transform_error;#y;#k=V?N:null;#T;#_;#x;#E=null;#S=null;#A=null;#M=null;#I=0;#$=0;#P=!1;#c=new Set;#l=new Set;#L=null;#C=function(t){let e,i=0,r=se(0);return()=>{De()&&(Ai(r),Ve(()=>(0===i&&(e=$i(()=>t(()=>he(r)))),i+=1,()=>{at(()=>{i-=1,0===i&&(e?.(),e=void 0,he(r))})})))}}(()=>(this.#L=se(this.#I),()=>{this.#L=null}));constructor(t,e,i,r){this.#y=t,this.#T=e,this.#_=t=>{var e=ci;e.b=this,e.f|=128,i(t)},this.parent=ci.b,this.transform_error=r??this.parent?.transform_error??(t=>t),this.#x=Be(()=>{if(V){const t=this.#k;W();const e="[!"===t.data;if(t.data.startsWith("[?")){const e=JSON.parse(t.data.slice(2));this.#R(e)}else e?this.#D():this.#F()}else this.#O()},589824),V&&(this.#y=N)}#F(){try{this.#E=qe(()=>this.#_(this.#y))}catch(t){this.error(t)}}#R(t){const e=this.#T.failed;e&&(this.#A=qe(()=>{e(this.#y,()=>t,()=>()=>{})}))}#D(){const t=this.#T.pending;t&&(this.is_pending=!0,this.#S=qe(()=>t(this.#y)),at(()=>{var t=this.#M=document.createDocumentFragment(),e=ye();t.append(e),this.#E=this.#z(()=>qe(()=>this.#_(e))),0===this.#$&&(this.#y.before(t),this.#M=null,Ze(this.#S,()=>{this.#S=null}),this.#N(Et))}))}#O(){try{if(this.is_pending=this.has_pending_snippet(),this.#$=0,this.#I=0,this.#E=qe(()=>{this.#_(this.#y)}),this.#$>0){var t=this.#M=document.createDocumentFragment();ti(this.#E,t);const e=this.#T.pending;this.#S=qe(()=>e(this.#y))}else this.#N(Et)}catch(e){this.error(e)}}#N(t){this.is_pending=!1,t.transfer_effects(this.#c,this.#l)}defer_effect(t){ft(t,this.#c,this.#l)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#T.pending}#z(t){var e=ci,i=ni,r=J;li(this.#x),oi(this.#x),K(this.#x.ctx);try{return Rt.ensure(),t()}catch(s){return ct(s),null}finally{li(e),oi(i),K(r)}}#V(t,e){this.has_pending_snippet()?(this.#$+=t,0===this.#$&&(this.#N(e),this.#S&&Ze(this.#S,()=>{this.#S=null}),this.#M&&(this.#y.before(this.#M),this.#M=null))):this.parent&&this.parent.#V(t,e)}update_pending_count(t,e){this.#V(t,e),this.#I+=t,this.#L&&!this.#P&&(this.#P=!0,at(()=>{this.#P=!1,this.#L&&ce(this.#L,this.#I)}))}get_effect_pending(){return this.#C(),Ai(this.#L)}error(t){if(!this.#T.onerror&&!this.#T.failed)throw t;Et?.is_fork?(this.#E&&Et.skip_effect(this.#E),this.#S&&Et.skip_effect(this.#S),this.#A&&Et.skip_effect(this.#A),Et.on_fork_commit(()=>{this.#U(t)})):this.#U(t)}#U(t){this.#E&&(je(this.#E),this.#E=null),this.#S&&(je(this.#S),this.#S=null),this.#A&&(je(this.#A),this.#A=null),V&&(B(this.#k),X(),B(Y()));var e=this.#T.onerror;let i=this.#T.failed;var r=!1,s=!1;const n=()=>{r?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(r=!0,s&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),null!==this.#A&&Ze(this.#A,()=>{this.#A=null}),this.#z(()=>{this.#O()}))},a=r=>{try{s=!0,e?.(r,n),s=!1}catch(t){lt(t,this.#x&&this.#x.parent)}i&&(this.#A=this.#z(()=>{try{return qe(()=>{var t=ci;t.b=this,t.f|=128,i(this.#y,()=>r,()=>n)})}catch(t){return lt(t,this.#x.parent),null}}))};at(()=>{var e;try{e=this.transform_error(t)}catch(i){return void lt(i,this.#x&&this.#x.parent)}null!==e&&"object"==typeof e&&"function"==typeof e.then?e.then(a,t=>lt(t,this.#x&&this.#x.parent)):a(e)})}};function qt(t,e,i,r){const s=jt;var n=t.filter(t=>!t.settled);if(0!==i.length||0!==n.length){var a=ci,o=function(){var t=ci,e=ni,i=J,r=Et;return function(s=!0){li(t),oi(e),K(i),!s||16384&t.f||(r?.activate(),r?.apply())}}(),c=1===n.length?n[0].promise:n.length>1?Promise.all(n.map(t=>t.promise)):null;if(0!==i.length){var l=Yt();c?c.then(()=>{o(),d(),Xt()}):d()}else c.then(()=>h(e.map(s)))}else r(e.map(s));function h(t){o();try{r(t)}catch(e){16384&a.f||lt(e,a)}Xt()}function d(){Promise.all(i.map(t=>Gt(t))).then(t=>h([...e.map(s),...t])).catch(t=>lt(t,a)).finally(()=>l())}}function Xt(t=!0){li(null),oi(null),K(null),t&&Et?.deactivate()}function Yt(){var t=ci,e=t.b,i=Et,r=e.is_rendered();return e.update_pending_count(1,i),i.increment(r,t),(s=!1)=>{e.update_pending_count(-1,i),i.decrement(r,t,s)}}function jt(t){null!==ci&&(ci.f|=S);const i={ctx:J,deps:null,effects:null,equals:G,f:2050,fn:t,reactions:null,rv:0,v:e,wv:0,parent:ci,ac:null};return i}function Gt(t,i,r){let s=ci;null===s&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var n=void 0,a=se(e);var o=!ni,c=new Map;return function(t){Re(4718592,t)}(()=>{var e=ci;var i=v();n=i.promise;try{Promise.resolve(t()).then(i.resolve,i.reject).finally(Xt)}catch(d){i.reject(d),Xt()}var r=Et;if(o){if(32768&e.f)var l=Yt();if(s.b.is_rendered())c.get(r)?.reject(R),c.delete(r);else{for(const t of c.values())t.reject(R);c.clear()}c.set(r,i)}const h=(t,i=void 0)=>{if(l&&l(i===R),!(i===R||16384&e.f)){if(r.activate(),i)a.f|=$,ce(a,i);else{8388608&a.f&&(a.f^=$),ce(a,t);for(const[t,e]of c){if(c.delete(t),t===r)break;e.reject(R)}0}r.deactivate()}};i.promise.then(h,t=>h(null,t||"unknown"))}),Fe(()=>{for(const t of c.values())t.reject(R)}),new Promise(t=>{!function e(i){function r(){i===n?t(a):e(n)}i.then(r,r)}(n)})}function Ht(t){const e=jt(t);return di(e),e}function Zt(t){const e=jt(t);return e.equals=Z,e}function Jt(t){var e=t.effects;if(null!==e){t.effects=null;for(var i=0;i<e.length;i+=1)je(e[i])}}function Kt(t){var e,i=ci,r=t.parent;if(!ri&&null!==r&&24576&r.f)return console.warn("https://svelte.dev/e/derived_inert"),t.v;li(r);try{t.f&=-65537,Jt(t),e=Ti(t)}finally{li(i)}return e}function Qt(t){var e=Kt(t);t.equals(e)||(t.wv=bi(),Et?.is_fork&&null!==t.deps||(null!==Et?Et.capture(t,e,!0):t.v=e,null!==t.deps))?ri||(null!==St?(De()||Et?.is_fork)&&St.set(t,e):ut(t)):dt(t,b)}function te(t){if(null!==t.effects)for(const e of t.effects)e.teardown&&Ei(e)}var ee=new Set,ie=new Map;var re=!1;function se(t,e){var i={f:0,v:t,reactions:null,equals:G,rv:0,wv:0};return i}function ne(t,e){const i=se(t);return di(i),i}function ae(t,e=!1,i=!0){const r=se(t);return e||(r.equals=Z),r}function oe(t,e,i=!1){null!==ni&&(!ai||131072&ni.f)&&4325394&ni.f&&(null===hi||!n.call(hi,t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}();let r=i?ue(e):e;return ce(t,r,Pt)}function ce(t,e,i=null){if(!t.equals(e)){ie.set(t,ri?e:t.v);var r=Rt.ensure();if(r.capture(t,e),2&t.f){const e=t;2048&t.f&&Kt(e),null===St&&ut(e)}t.wv=bi(),de(t,y,i),null!==ci&&1024&ci.f&&!(96&ci.f)&&(null===fi?function(t){fi=t}([t]):fi.push(t)),!r.is_fork&&ee.size>0&&!re&&le()}return e}function le(){re=!1;for(const t of ee)1024&t.f&&dt(t,k),yi(t)&&Ei(t);ee.clear()}function he(t){oe(t,t.v+1)}function de(t,e,i){var r=t.reactions;if(null!==r)for(var s=r.length,n=0;n<s;n++){var a=r[n],o=a.f;0;var c=0===(o&y);if(c&&dt(a,e),2&o){var l=a;St?.delete(l),65536&o||(512&o&&(a.f|=M),de(l,k,i))}else if(c){var h=a;16&o&&null!==Ft&&Ft.add(h),null!==i?i.push(h):Vt(h)}}}function ue(t){if("object"!=typeof t||null===t||P in t)return t;const i=m(t);if(i!==d&&i!==u)return t;var s=new Map,n=r(t),a=ne(0),o=vi,c=t=>{if(vi===o)return t();var e=ni,i=vi;oi(null),wi(o);var r=t();return oi(e),wi(i),r};n&&s.set("length",ne(t.length));return new Proxy(t,{defineProperty(t,e,i){"value"in i&&!1!==i.configurable&&!1!==i.enumerable&&!1!==i.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var r=s.get(e);return void 0===r?c(()=>{var t=ne(i.value);return s.set(e,t),t}):oe(r,i.value,!0),!0},deleteProperty(t,i){var r=s.get(i);if(void 0===r){if(i in t){const t=c(()=>ne(e));s.set(i,t),he(a)}}else oe(r,e),he(a);return!0},get(i,r,n){if(r===P)return t;var a=s.get(r),o=r in i;if(void 0!==a||o&&!l(i,r)?.writable||(a=c(()=>{var t=ne(ue(o?i[r]:e));return t}),s.set(r,a)),void 0!==a){var h=Ai(a);return h===e?void 0:h}return Reflect.get(i,r,n)},getOwnPropertyDescriptor(t,i){var r=Reflect.getOwnPropertyDescriptor(t,i);if(r&&"value"in r){var n=s.get(i);n&&(r.value=Ai(n))}else if(void 0===r){var a=s.get(i),o=a?.v;if(void 0!==a&&o!==e)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(t,i){if(i===P)return!0;var r=s.get(i),n=void 0!==r&&r.v!==e||Reflect.has(t,i);return!((void 0!==r||null!==ci&&(!n||l(t,i)?.writable))&&(void 0===r&&(r=c(()=>{var r=ne(n?ue(t[i]):e);return r}),s.set(i,r)),Ai(r)===e))&&n},set(t,i,r,o){var h=s.get(i),d=i in t;if(n&&"length"===i)for(var u=r;u<h.v;u+=1){var m=s.get(u+"");void 0!==m?oe(m,e):u in t&&(m=c(()=>ne(e)),s.set(u+"",m))}void 0===h?d&&!l(t,i)?.writable||(oe(h=c(()=>ne(void 0)),ue(r)),s.set(i,h)):(d=h.v!==e,oe(h,c(()=>ue(r))));var f=Reflect.getOwnPropertyDescriptor(t,i);if(f?.set&&f.set.call(o,r),!d){if(n&&"string"==typeof i){var p=s.get("length"),g=Number(i);Number.isInteger(g)&&g>=p.v&&oe(p,g+1)}he(a)}return!0},ownKeys(t){Ai(a);var i=Reflect.ownKeys(t).filter(t=>{var i=s.get(t);return void 0===i||i.v!==e});for(var[r,n]of s)n.v===e||r in t||i.push(r);return i},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function me(t){try{if(null!==t&&"object"==typeof t&&P in t)return t[P]}catch{}return t}function fe(t,e){return Object.is(me(t),me(e))}var pe,ge,ve,we;new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function be(){if(void 0===pe){pe=window,document,ge=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;ve=l(e,"firstChild").get,we=l(e,"nextSibling").get,f(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),f(i)&&(i.__t=void 0)}}function ye(t=""){return document.createTextNode(t)}function ke(t){return ve.call(t)}function Te(t){return we.call(t)}function _e(t,e){if(!V)return ke(t);var i=ke(N);if(null===i)i=N.appendChild(ye());else if(e&&3!==i.nodeType){var r=ye();return i?.before(r),B(r),r}return e&&Me(i),B(i),i}function xe(t,e=!1){if(!V){var i=ke(t);return i instanceof Comment&&""===i.data?Te(i):i}if(e){if(3!==N?.nodeType){var r=ye();return N?.before(r),B(r),r}Me(N)}return N}function Ee(t,e=1,i=!1){let r=V?N:t;for(var s;e--;)s=r,r=Te(r);if(!V)return r;if(i){if(3!==r?.nodeType){var n=ye();return null===r?s?.after(n):r.before(n),B(n),n}Me(r)}return B(r),r}function Se(t){t.textContent=""}function Ae(t,e,i){let r=i?{is:i}:void 0;return document.createElementNS(e??"http://www.w3.org/1999/xhtml",t,r)}function Me(t){if(t.nodeValue.length<65536)return;let e=t.nextSibling;for(;null!==e&&3===e.nodeType;)e.remove(),t.nodeValue+=e.nodeValue,e=t.nextSibling}function Ie(t,e){if(e){const e=document.body;t.autofocus=!0,at(()=>{document.activeElement===e&&t.focus()})}}var $e=!1;function Pe(t,e,i,r=!0){for(var s of(r&&i(),e))t.addEventListener(s,i);Fe(()=>{for(var r of e)t.removeEventListener(r,i)})}function Le(t){var e=ni,i=ci;oi(null),li(null);try{return t()}finally{oi(e),li(i)}}function Ce(t){null===ci&&(null===ni&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}()),ri&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function Re(t,e){var i=ci;null!==i&&8192&i.f&&(t|=T);var r={ctx:J,deps:null,nodes:null,f:t|y|512,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,wv:0,ac:null};Et?.register_created_effect(r);var s=r;if(4&t)null!==$t?$t.push(r):Rt.ensure().schedule(r);else if(null!==e){try{Ei(r)}catch(s){throw je(r),s}null!==s.deps||null!==s.teardown||null!==s.nodes||s.first!==s.last||524288&s.f||(s=s.first,16&t&&65536&t&&null!==s&&(s.f|=E))}if(null!==s&&(s.parent=i,null!==i&&function(t,e){var i=e.last;null===i?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}(s,i),null!==ni&&2&ni.f&&!(64&t))){var n=ni;(n.effects??=[]).push(s)}return r}function De(){return null!==ni&&!ai}function Fe(t){const e=Re(8,null);return dt(e,b),e.teardown=t,e}function Oe(t){Ce();var e=ci.f;if(ni||!(32&e)||32768&e)return ze(t);var i=J;(i.e??=[]).push(t)}function ze(t){return Re(1048580,t)}function Ne(t){return Re(4,t)}function Ve(t,e=0){return Re(8|e,t)}function Ue(t,e=[],i=[],r=[]){qt(r,e,i,e=>{Re(8,()=>t(...e.map(Ai)))})}function Be(t,e=0){var i=Re(16|e,t);return i}function We(t,e=0){var i=Re(16777216|e,t);return i}function qe(t){return Re(524320,t)}function Xe(t){var e=t.teardown;if(null!==e){const t=ri,i=ni;si(!0),oi(null);try{e.call(null)}finally{si(t),oi(i)}}}function Ye(t,e=!1){var i=t.first;for(t.first=t.last=null;null!==i;){const t=i.ac;null!==t&&Le(()=>{t.abort(R)});var r=i.next;64&i.f?i.parent=null:je(i,e),i=r}}function je(t,e=!0){var i=!1;(e||262144&t.f)&&null!==t.nodes&&null!==t.nodes.end&&(Ge(t.nodes.start,t.nodes.end),i=!0),dt(t,x),Ye(t,e&&!i),xi(t,0);var r=t.nodes&&t.nodes.t;if(null!==r)for(const n of r)n.stop();Xe(t),t.f^=x,t.f|=16384;var s=t.parent;null!==s&&null!==s.first&&He(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Ge(t,e){for(;null!==t;){var i=t===e?null:Te(t);t.remove(),t=i}}function He(t){var e=t.parent,i=t.prev,r=t.next;null!==i&&(i.next=r),null!==r&&(r.prev=i),null!==e&&(e.first===t&&(e.first=r),e.last===t&&(e.last=i))}function Ze(t,e,i=!0){var r=[];Je(t,r,!0);var s=()=>{i&&je(t),e&&e()},n=r.length;if(n>0){var a=()=>--n||s();for(var o of r)o.out(a)}else s()}function Je(t,e,i){if(!(8192&t.f)){t.f^=T;var r=t.nodes&&t.nodes.t;if(null!==r)for(const t of r)(t.is_global||i)&&e.push(t);for(var s=t.first;null!==s;){var n=s.next;if(!(64&s.f))Je(s,e,!!(!!(65536&s.f)||!!(32&s.f)&&!!(16&t.f))&&i);s=n}}}function Ke(t){Qe(t,!0)}function Qe(t,e){if(8192&t.f){t.f^=T,1024&t.f||(dt(t,y),Rt.ensure().schedule(t));for(var i=t.first;null!==i;){var r=i.next;Qe(i,!!(!!(65536&i.f)||!!(32&i.f))&&e),i=r}var s=t.nodes&&t.nodes.t;if(null!==s)for(const t of s)(t.is_global||e)&&t.in()}}function ti(t,e){if(t.nodes)for(var i=t.nodes.start,r=t.nodes.end;null!==i;){var s=i===r?null:Te(i);e.append(i),i=s}}var ei=null,ii=!1,ri=!1;function si(t){ri=t}var ni=null,ai=!1;function oi(t){ni=t}var ci=null;function li(t){ci=t}var hi=null;function di(t){null!==ni&&(null===hi?hi=[t]:hi.push(t))}var ui=null,mi=0,fi=null;var pi=1,gi=0,vi=gi;function wi(t){vi=t}function bi(){return++pi}function yi(t){var e=t.f;if(2048&e)return!0;if(2&e&&(t.f&=-65537),4096&e){for(var i=t.deps,r=i.length,s=0;s<r;s++){var n=i[s];if(yi(n)&&Qt(n),n.wv>t.wv)return!0}512&e&&null===St&&dt(t,b)}return!1}function ki(t,e,i=!0){var r=t.reactions;if(null!==r&&(null===hi||!n.call(hi,t)))for(var s=0;s<r.length;s++){var a=r[s];2&a.f?ki(a,e,!1):e===a&&(i?dt(a,y):1024&a.f&&dt(a,k),Vt(a))}}function Ti(t){var e=ui,i=mi,r=fi,s=ni,n=hi,a=J,o=ai,c=vi,l=t.f;ui=null,mi=0,fi=null,ni=96&l?null:t,hi=null,K(t.ctx),ai=!1,vi=++gi,null!==t.ac&&(Le(()=>{t.ac.abort(R)}),t.ac=null);try{t.f|=I;var h=(0,t.fn)();t.f|=_;var d=t.deps,u=Et?.is_fork;if(null!==ui){var m;if(u||xi(t,mi),null!==d&&mi>0)for(d.length=mi+ui.length,m=0;m<ui.length;m++)d[mi+m]=ui[m];else t.deps=d=ui;if(De()&&512&t.f)for(m=mi;m<d.length;m++)(d[m].reactions??=[]).push(t)}else!u&&null!==d&&mi<d.length&&(xi(t,mi),d.length=mi);if(!(null===fi||ai||null===d||6146&t.f))for(m=0;m<fi.length;m++)ki(fi[m],t);if(null!==s&&s!==t){if(gi++,null!==s.deps)for(let t=0;t<i;t+=1)s.deps[t].rv=gi;if(null!==e)for(const t of e)t.rv=gi;null!==fi&&(null===r?r=fi:r.push(...fi))}return 8388608&t.f&&(t.f^=$),h}catch(f){return ct(f)}finally{t.f^=I,ui=e,mi=i,fi=r,ni=s,hi=n,K(a),ai=o,vi=c}}function _i(t,i){let r=i.reactions;if(null!==r){var a=s.call(r,t);if(-1!==a){var o=r.length-1;0===o?r=i.reactions=null:(r[a]=r[o],r.pop())}}if(null===r&&2&i.f&&(null===ui||!n.call(ui,i))){var c=i;512&c.f&&(c.f^=512,c.f&=-65537),c.v!==e&&ut(c),function(t){if(null!==t.effects)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac?.abort(R),e.teardown=g,e.ac=null,xi(e,0),Ye(e))}(c),xi(c,0)}}function xi(t,e){var i=t.deps;if(null!==i)for(var r=e;r<i.length;r++)_i(t,i[r])}function Ei(t){var e=t.f;if(!(16384&e)){dt(t,b);var i=ci,r=ii;ci=t,ii=!0;try{16777232&e?function(t){for(var e=t.first;null!==e;){var i=e.next;32&e.f||je(e),e=i}}(t):Ye(t),Xe(t);var s=Ti(t);t.teardown="function"==typeof s?s:null,t.wv=pi}finally{ii=r,ci=i}}}async function Si(){await Promise.resolve(),Dt()}function Ai(t){var e=!!(2&t.f);if(ei?.add(t),null!==ni&&!ai&&!(null!==ci&&16384&ci.f||null!==hi&&n.call(hi,t))){var i=ni.deps;if(2097152&ni.f)t.rv<gi&&(t.rv=gi,null===ui&&null!==i&&i[mi]===t?mi++:null===ui?ui=[t]:ui.push(t));else{(ni.deps??=[]).push(t);var r=t.reactions;null===r?t.reactions=[ni]:n.call(r,ni)||r.push(ni)}}if(ri&&ie.has(t))return ie.get(t);if(e){var s=t;if(ri){var a=s.v;return(1024&s.f||null===s.reactions)&&!Ii(s)||(a=Kt(s)),ie.set(s,a),a}var o=!(512&s.f)&&!ai&&null!==ni&&(ii||!!(512&ni.f)),c=0===(s.f&_);yi(s)&&(o&&(s.f|=512),Qt(s)),o&&!c&&(te(s),Mi(s))}if(St?.has(t))return St.get(t);if(8388608&t.f)throw t.v;return t.v}function Mi(t){if(t.f|=512,null!==t.deps)for(const e of t.deps)(e.reactions??=[]).push(t),2&e.f&&!(512&e.f)&&(te(e),Mi(e))}function Ii(t){if(t.v===e)return!0;if(null===t.deps)return!1;for(const e of t.deps){if(ie.has(e))return!0;if(2&e.f&&Ii(e))return!0}return!1}function $i(t){var e=ai;try{return ai=!0,t()}finally{ai=e}}function Pi(t,e=new Set){if(!("object"!=typeof t||null===t||t instanceof EventTarget||e.has(t))){e.add(t),t instanceof Date&&t.getTime();for(let s in t)try{Pi(t[s],e)}catch(i){}const r=m(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=h(r);for(let r in e){const s=e[r].get;if(s)try{s.call(t)}catch(i){}}}}}var Li=Symbol("events"),Ci=new Set,Ri=new Set;function Di(t,e,i,r={}){function s(t){if(r.capture||Ni.call(e,t),!t.cancelBubble)return Le(()=>i?.call(this,t))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?at(()=>{e.addEventListener(t,s,r)}):e.addEventListener(t,s,r),s}function Fi(t,e,i,r,s){var n={capture:r,passive:s},a=Di(t,e,i,n);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Fe(()=>{e.removeEventListener(t,a,n)})}function Oi(t,e,i){(e[Li]??={})[t]=i}function zi(t){for(var e=0;e<t.length;e++)Ci.add(t[e]);for(var i of Ri)i(t)}function Ni(t){var e=this,i=e.ownerDocument,r=t.type,s=t.composedPath?.()||[],n=s[0]||t.target,a=0,o=t===t&&t[Li];if(o){var l=s.indexOf(o);if(-1!==l&&(e===document||e===window))return void(t[Li]=e);var h=s.indexOf(e);if(-1===h)return;l<=h&&(a=l)}if((n=s[a]||t.target)!==e){c(t,"currentTarget",{configurable:!0,get:()=>n||i});var d=ni,u=ci;oi(null),li(null);try{for(var m,f=[];null!==n;){var p=n.assignedSlot||n.parentNode||n.host||null;try{var g=n[Li]?.[r];null==g||n.disabled&&t.target!==n||g.call(n,t)}catch(v){m?f.push(v):m=v}if(t.cancelBubble||p===e||null===p)break;n=p}if(m){for(let t of f)queueMicrotask(()=>{throw t});throw m}}finally{t[Li]=e,delete t.currentTarget,oi(d),li(u)}}}var Vi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Ui(t){var e=Ae("template");return e.innerHTML=function(t){return Vi?.createHTML(t)??t}(t.replaceAll("<!>","\x3c!----\x3e")),e.content}function Bi(t,e){var i=ci;null===i.nodes&&(i.nodes={start:t,end:e,a:null,t:null})}function Wi(t,e){var i,r=!!(1&e),s=!!(2&e),n=!t.startsWith("<!>");return()=>{if(V)return Bi(N,null),N;void 0===i&&(i=Ui(n?t:"<!>"+t),r||(i=ke(i)));var e=s||ge?document.importNode(i,!0):i.cloneNode(!0);r?Bi(ke(e),e.lastChild):Bi(e,e);return e}}function qi(t,e,i="svg"){var r,s=!t.startsWith("<!>"),n=!!(1&e),a=`<${i}>${s?t:"<!>"+t}</${i}>`;return()=>{if(V)return Bi(N,null),N;if(!r){var t=ke(Ui(a));if(n)for(r=document.createDocumentFragment();ke(t);)r.appendChild(ke(t));else r=ke(t)}var e=r.cloneNode(!0);n?Bi(ke(e),e.lastChild):Bi(e,e);return e}}function Xi(t,e){return qi(t,e,"svg")}function Yi(t=""){if(!V){var e=ye(t+"");return Bi(e,e),e}var i=N;return 3!==i.nodeType?(i.before(i=ye()),B(i)):Me(i),Bi(i,i),i}function ji(){if(V)return Bi(N,null),N;var t=document.createDocumentFragment(),e=document.createComment(""),i=ye();return t.append(e,i),Bi(e,i),t}function Gi(t,e){if(V){var i=ci;return 32768&i.f&&null!==i.nodes.end||(i.nodes.end=N),void W()}null!==t&&t.before(e)}function Hi(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}var Zi=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ji(t){return Zi.includes(t)}var Ki={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Qi(t){return t=t.toLowerCase(),Ki[t]??t}var tr=["touchstart","touchmove"];function er(t){return tr.includes(t)}var ir=["textarea","script","style","title"];var rr=!0;function sr(t){rr=t}function nr(t,e){var i=null==e?"":"object"==typeof e?`${e}`:e;i!==(t.__t??=t.nodeValue)&&(t.__t=i,t.nodeValue=`${i}`)}function ar(t,e){return lr(t,e)}function or(e,i){be(),i.intro=i.intro??!1;const r=i.target,s=V,n=N;try{for(var a=ke(r);a&&(8!==a.nodeType||"["!==a.data);)a=Te(a);if(!a)throw t;U(!0),B(a);const s=lr(e,{...i,anchor:a});return U(!1),s}catch(o){if(o instanceof Error&&o.message.split("\n").some(t=>t.startsWith("https://svelte.dev/e/")))throw o;return o!==t&&console.warn("Failed to hydrate: ",o),!1===i.recover&&function(){throw new Error("https://svelte.dev/e/hydration_failed")}(),be(),Se(r),U(!1),ar(e,i)}finally{U(s),B(n)}}var cr=new Map;function lr(e,{target:i,anchor:r,props:s={},events:n,context:o,intro:c=!0,transformError:l}){be();var h=void 0,d=function(t){Rt.ensure();const e=Re(524352,t);return(t={})=>new Promise(i=>{t.outro?Ze(e,()=>{je(e),i(void 0)}):(je(e),i(void 0))})}(()=>{var d=r??i.appendChild(ye());!function(t,e,i,r){new Wt(t,e,i,r)}(d,{pending:()=>{}},i=>{if(et({}),o&&(J.c=o),n&&(s.$$events=n),V&&Bi(i,null),rr=c,h=e(i,s)||{},rr=!0,V&&(ci.nodes.end=N,null===N||8!==N.nodeType||"]"!==N.data))throw z(),t;it()},l);var u=new Set,m=t=>{for(var e=0;e<t.length;e++){var r=t[e];if(!u.has(r)){u.add(r);var s=er(r);for(const t of[i,document]){var n=cr.get(t);void 0===n&&(n=new Map,cr.set(t,n));var a=n.get(r);void 0===a?(t.addEventListener(r,Ni,{passive:s}),n.set(r,1)):n.set(r,a+1)}}}};return m(a(Ci)),Ri.add(m),()=>{for(var t of u)for(const r of[i,document]){var e=cr.get(r),s=e.get(t);0==--s?(r.removeEventListener(t,Ni),e.delete(t),0===e.size&&cr.delete(r)):e.set(t,s)}Ri.delete(m),d!==r&&d.parentNode?.removeChild(d)}});return hr.set(h,d),h}var hr=new WeakMap;function dr(t,e){const i=hr.get(t);return i?(hr.delete(t),i(e)):Promise.resolve()}var ur,mr=class{anchor;#B=new Map;#W=new Map;#q=new Map;#X=new Set;#Y=!0;constructor(t,e=!0){this.anchor=t,this.#Y=e}#b=t=>{if(this.#B.has(t)){var e=this.#B.get(t),i=this.#W.get(e);if(i)Ke(i),this.#X.delete(e);else{var r=this.#q.get(e);r&&(this.#W.set(e,r.effect),this.#q.delete(e),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),i=r.effect)}for(const[e,i]of this.#B){if(this.#B.delete(e),e===t)break;const r=this.#q.get(i);r&&(je(r.effect),this.#q.delete(i))}for(const[t,r]of this.#W){if(t===e||this.#X.has(t))continue;const s=()=>{if(Array.from(this.#B.values()).includes(t)){var e=document.createDocumentFragment();ti(r,e),e.append(ye()),this.#q.set(t,{effect:r,fragment:e})}else je(r);this.#X.delete(t),this.#W.delete(t)};this.#Y||!i?(this.#X.add(t),Ze(r,s,!1)):s()}}};#j=t=>{this.#B.delete(t);const e=Array.from(this.#B.values());for(const[i,r]of this.#q)e.includes(i)||(je(r.effect),this.#q.delete(i))};ensure(t,e){var i=Et;!e||this.#W.has(t)||this.#q.has(t)||this.#W.set(t,qe(()=>e(this.anchor)));this.#B.set(i,t),V&&(this.anchor=N),this.#b(i)}};function fr(t,e,...i){var r=new mr(t);Be(()=>{const t=e()??null;r.ensure(t,t&&(e=>t(e,...i)))},E)}function pr(t){null===J&&F(),Oe(()=>{const e=$i(t);if("function"==typeof e)return e})}function gr(t){null===J&&F(),pr(()=>()=>$i(t))}function vr(t,e,i=!1){var r;V&&(r=N,W());var s=new mr(t);function n(t,e){if(V){var i=j(r);if(t!==parseInt(i.substring(1))){var n=Y();return B(n),s.anchor=n,U(!1),s.ensure(t,e),void U(!0)}}s.ensure(t,e)}Be(()=>{var t=!1;e((e,i=0)=>{t=!0,n(i,e)}),t||n(-1,null)},i?E:0)}function wr(t,e){return e}function br(t,e,i=!0){var r;if(t.pending.size>0){r=new Set;for(const e of t.pending.values())for(const i of e)r.add(t.items.get(i).e)}for(var s=0;s<e.length;s++){var n=e[s];r?.has(n)?(n.f|=A,ti(n,document.createDocumentFragment())):je(e[s],i)}}function yr(t,e,i,s,n,o=null){var c=t,l=new Map;if(4&e){var h=t;c=V?B(ke(h)):h.appendChild(ye())}V&&W();var d,u=null,m=Zt(()=>{var t=i();return r(t)?t:null==t?[]:a(t)});var f=new Map,p=!0;function g(t){16384&v.effect.f||(v.pending.delete(t),v.fallback=u,function(t,e,i,r,s){var n,o,c,l,h,d=!!(8&r),u=e.length,m=t.items,f=kr(t.effect.first),p=null,g=[],v=[];if(d)for(h=0;h<u;h+=1)c=s(e[h],h),33554432&(l=m.get(c).e).f||(l.nodes?.a?.measure(),(o??=new Set).add(l));for(h=0;h<u;h+=1){if(c=s(e[h],h),l=m.get(c).e,null!==t.outrogroups)for(const e of t.outrogroups)e.pending.delete(l),e.done.delete(l);if(8192&l.f&&(Ke(l),d&&(l.nodes?.a?.unfix(),(o??=new Set).delete(l))),33554432&l.f){if(l.f^=A,l!==f){var w=p?p.next:f;l===t.effect.last&&(t.effect.last=l.prev),l.prev&&(l.prev.next=l.next),l.next&&(l.next.prev=l.prev),xr(t,p,l),xr(t,l,w),_r(l,w,i),g=[],v=[],f=kr((p=l).next);continue}_r(l,null,i)}if(l!==f){if(void 0!==n&&n.has(l)){if(g.length<v.length){var b,y=v[0];p=y.prev;var k=g[0],T=g[g.length-1];for(b=0;b<g.length;b+=1)_r(g[b],y,i);for(b=0;b<v.length;b+=1)n.delete(v[b]);xr(t,k.prev,T.next),xr(t,p,k),xr(t,T,y),f=y,p=T,h-=1,g=[],v=[]}else n.delete(l),_r(l,f,i),xr(t,l.prev,l.next),xr(t,l,null===p?t.effect.first:p.next),xr(t,p,l),p=l;continue}for(g=[],v=[];null!==f&&f!==l;)(n??=new Set).add(f),v.push(f),f=kr(f.next);if(null===f)continue}33554432&l.f||g.push(l),p=l,f=kr(l.next)}if(null!==t.outrogroups){for(const e of t.outrogroups)0===e.pending.size&&(br(t,a(e.done)),t.outrogroups?.delete(e));0===t.outrogroups.size&&(t.outrogroups=null)}if(null!==f||void 0!==n){var _=[];if(void 0!==n)for(l of n)8192&l.f||_.push(l);for(;null!==f;)8192&f.f||f===t.fallback||_.push(f),f=kr(f.next);var x=_.length;if(x>0){var E=4&r&&0===u?i:null;if(d){for(h=0;h<x;h+=1)_[h].nodes?.a?.measure();for(h=0;h<x;h+=1)_[h].nodes?.a?.fix()}!function(t,e,i){for(var r,s=e.length,n=e.length,o=0;o<s;o++){let i=e[o];Ze(i,()=>{if(r){if(r.pending.delete(i),r.done.add(i),0===r.pending.size){var e=t.outrogroups;br(t,a(r.done)),e.delete(r),0===e.size&&(t.outrogroups=null)}}else n-=1},!1)}if(0===n){var c=null!==i;if(c){var l=i,h=l.parentNode;Se(h),h.append(l),t.items.clear()}br(t,e,!c)}else r={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(r)}(t,_,E)}}d&&at(()=>{if(void 0!==o)for(l of o)l.nodes?.a?.apply()})}(v,d,c,e,s),null!==u&&(0===d.length?33554432&u.f?(u.f^=A,_r(u,null,c)):Ke(u):Ze(u,()=>{u=null})))}var v={effect:Be(()=>{var t=(d=Ai(m)).length;let r=!1;V&&"[!"===j(c)!=(0===t)&&(B(c=Y()),U(!1),r=!0);for(var a=new Set,h=Et,v=0;v<t;v+=1){V&&8===N.nodeType&&"]"===N.data&&(c=N,r=!0,U(!1));var w=d[v],b=s(w,v),y=p?null:l.get(b);y?(y.v&&ce(y.v,w),y.i&&ce(y.i,v)):(y=Tr(l,p?c:ur??=ye(),w,b,v,n,e,i),p||(y.e.f|=A),l.set(b,y)),a.add(b)}0===t&&o&&!u&&(p?u=qe(()=>o(c)):(u=qe(()=>o(ur??=ye()))).f|=A),t>a.size&&O(),V&&t>0&&B(Y()),p||(f.set(h,a),g(h)),r&&U(!0),Ai(m)}),flags:e,items:l,pending:f,outrogroups:null,fallback:u};p=!1,V&&(c=N)}function kr(t){for(;null!==t&&!(32&t.f);)t=t.next;return t}function Tr(t,e,i,r,s,n,a,o){var c=1&a?16&a?se(i):ae(i,!1,!1):null,l=2&a?se(s):null;return{v:c,i:l,e:qe(()=>(n(e,c??i,l??s,o),()=>{t.delete(r)}))}}function _r(t,e,i){if(t.nodes)for(var r=t.nodes.start,s=t.nodes.end,n=!e||33554432&e.f?i:e.nodes.start;null!==r;){var a=Te(r);if(n.before(r),r===s)return;r=a}}function xr(t,e,i){null===e?t.effect.first=i:e.next=i,null===i?t.effect.last=e:i.prev=e}function Er(e,r,s=!1,n=!1,a=!1,o=!1){var c=e,l="";if(s){var h=e;V&&(c=B(ke(h)))}Ue(()=>{var e=ci;if(l!==(l=r()??"")){if(s&&!V)return e.nodes=null,h.innerHTML=l,void(""!==l&&Bi(ke(h),h.lastChild));if(null!==e.nodes&&(Ge(e.nodes.start,e.nodes.end),e.nodes=null),""!==l){if(V){N.data;for(var o=W(),d=o;null!==o&&(8!==o.nodeType||""!==o.data);)d=o,o=Te(o);if(null===o)throw z(),t;return Bi(N,d),void(c=B(o))}var u=Ae(n?"svg":a?"math":"template",n?i:a?"http://www.w3.org/1998/Math/MathML":void 0);u.innerHTML=l;var m=n||a?u:u.content;if(Bi(ke(m),m.lastChild),n||a)for(;ke(m);)c.before(ke(m));else c.before(m)}}else V&&W()})}var Sr=()=>performance.now(),Ar={tick:t=>requestAnimationFrame(t),now:()=>Sr(),tasks:new Set};function Mr(){const t=Ar.now();Ar.tasks.forEach(e=>{e.c(t)||(Ar.tasks.delete(e),e.f())}),0!==Ar.tasks.size&&Ar.tick(Mr)}function Ir(t,e){Le(()=>{t.dispatchEvent(new CustomEvent(e))})}function $r(t){if("float"===t)return"cssFloat";if("offset"===t)return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return 1===e.length?e[0]:e[0]+e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}function Pr(t){const e={},i=t.split(";");for(const r of i){const[t,i]=r.split(":");if(!t||void 0===i)break;e[$r(t.trim())]=i.trim()}return e}var Lr=t=>t;function Cr(t){0}function Rr(t,e,i,r){var s,n,a,o=!!(1&t),c=!!(2&t),l=!!(4&t),h=o&&c?"both":o?"in":"out",d=e.inert,u=e.style.overflow;function m(){return Le(()=>s??=i()(e,r?.()??{},{direction:h}))}var f={is_global:l,in(){if(e.inert=d,!o)return a?.abort(),void a?.reset?.();c||n?.abort(),n=Dr(e,m(),a,1,()=>{Ir(e,"introend"),n?.abort(),n=s=void 0,e.style.overflow=u})},out(t){if(!c)return t?.(),void(s=void 0);e.inert=!0,a=Dr(e,m(),n,0,()=>{Ir(e,"outroend"),t?.()})},stop:()=>{n?.abort(),a?.abort()}},p=ci;if((p.nodes.t??=[]).push(f),o&&rr){var g=l;if(!g){for(var v=p.parent;v&&65536&v.f;)for(;(v=v.parent)&&!(16&v.f););g=!v||!!(32768&v.f)}g&&Ne(()=>{$i(()=>f.in())})}}function Dr(t,e,i,r,s){var n=1===r;if(p(e)){var a,o=!1;return at(()=>{o||(a=Dr(t,e({direction:n?"in":"out"}),i,r,s))}),{abort:()=>{o=!0,a?.abort()},deactivate:()=>a.deactivate(),reset:()=>a.reset(),t:()=>a.t()}}if(i?.deactivate(),!e?.duration&&!e?.delay)return Ir(t,n?"introstart":"outrostart"),s(),{abort:g,deactivate:g,reset:g,t:()=>r};const{delay:c=0,css:l,tick:h,easing:d=Lr}=e;var u=[];if(n&&void 0===i&&(h&&h(0,1),l)){var m=Pr(l(0,1));u.push(m,m)}var f=()=>1-r,v=t.animate(u,{duration:c,fill:"forwards"});return v.onfinish=()=>{v.cancel(),Ir(t,n?"introstart":"outrostart");var a=i?.t()??1-r;i?.abort();var o=r-a,c=e.duration*Math.abs(o),u=[];if(c>0){var m=!1;if(l)for(var p=Math.ceil(c/(1e3/60)),g=0;g<=p;g+=1){var w=a+o*d(g/p),b=Pr(l(w,1-w));u.push(b),m||="hidden"===b.overflow}m&&(t.style.overflow="hidden"),f=()=>{var t=v.currentTime;return a+o*d(t/c)},h&&function(t){let e;0===Ar.tasks.size&&Ar.tick(Mr),new Promise(i=>{Ar.tasks.add(e={c:t,f:i})})}(()=>{if("running"!==v.playState)return!1;var t=f();return h(t,1-t),!0})}(v=t.animate(u,{duration:c,fill:"forwards"})).onfinish=()=>{f=()=>r,h?.(r,1-r),s()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=g)},deactivate:()=>{s=g},reset:()=>{0===r&&h?.(1,0)},t:()=>f()}}function Fr(t,e,r,s,n,a){let o=V;V&&W();var c=null;V&&1===N.nodeType&&(c=N,W());var l=V?N:t,h=ci,d=new mr(l,!1);Be(()=>{const t=e()||null;var a=n?n():r||"svg"===t?i:void 0;return null===t?(d.ensure(null,null),void sr(!0)):(d.ensure(t,e=>{if(t){if(Bi(c=V?c:Ae(t,a),c),s){V&&(r=t,ir.includes(r))&&c.append(document.createComment(""));var i=V?ke(c):c.appendChild(ye());V&&(null===i?U(!1):B(i)),Cr(h),s(c,i),Cr(null)}ci.nodes.end=c,e.before(c)}var r;V&&B(e)}),sr(!0),()=>{t&&sr(!1)})},E),Fe(()=>{sr(!0)}),o&&(U(!0),B(l))}function Or(t,e,i){Ne(()=>{var r=$i(()=>e(t,i?.())||{});if(i&&r?.update){var s=!1,n={};Ve(()=>{var t=i();!function(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(P in t)Pi(t);else if(!Array.isArray(t))for(let e in t){const i=t[e];"object"==typeof i&&i&&P in i&&Pi(i)}}(t),s&&H(n,t)&&(n=t,r.update(t))}),s=!0}if(r?.destroy)return()=>r.destroy()})}function zr(t,e){var i,r=void 0;We(()=>{r!==(r=e())&&(i&&(je(i),i=null),r&&(i=qe(()=>{Ne(()=>r(t))})))})}function Nr(t){var e,i,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(i=Nr(t[e]))&&(r&&(r+=" "),r+=i)}else for(i in t)t[i]&&(r&&(r+=" "),r+=i);return r}function Vr(t){return"object"==typeof t?function(){for(var t,e,i=0,r="",s=arguments.length;i<s;i++)(t=arguments[i])&&(e=Nr(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}var Ur=[..." \t\n\r\f \v\ufeff"];function Br(t,e=!1){var i=e?" !important;":";",r="";for(var s of Object.keys(t)){var n=t[s];null!=n&&""!==n&&(r+=" "+s+": "+n+i)}return r}function Wr(t){return"-"!==t[0]||"-"!==t[1]?t.toLowerCase():t}function qr(t,e,i,r,s,n){var a=t.__className;if(V||a!==i||void 0===a){var o=function(t,e,i){var r=null==t?"":""+t;if(e&&(r=r?r+" "+e:e),i)for(var s of Object.keys(i))if(i[s])r=r?r+" "+s:s;else if(r.length)for(var n=s.length,a=0;(a=r.indexOf(s,a))>=0;){var o=a+n;0!==a&&!Ur.includes(r[a-1])||o!==r.length&&!Ur.includes(r[o])?a=o:r=(0===a?"":r.substring(0,a))+r.substring(o+1)}return""===r?null:r}(i,r,n);V&&o===t.getAttribute("class")||(null==o?t.removeAttribute("class"):e?t.className=o:t.setAttribute("class",o)),t.__className=i}else if(n&&s!==n)for(var c in n){var l=!!n[c];null!=s&&l===!!s[c]||t.classList.toggle(c,l)}return n}function Xr(t,e={},i,r){for(var s in i){var n=i[s];e[s]!==n&&(null==i[s]?t.style.removeProperty(s):t.style.setProperty(s,n,r))}}function Yr(t,e,i,r){var s=t.__style;if(V||s!==e){var n=function(t,e){if(e){var i,r,s="";if(Array.isArray(e)?(i=e[0],r=e[1]):i=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,a=0,o=!1,c=[];i&&c.push(...Object.keys(i).map(Wr)),r&&c.push(...Object.keys(r).map(Wr));var l=0,h=-1;const e=t.length;for(var d=0;d<e;d++){var u=t[d];if(o?"/"===u&&"*"===t[d-1]&&(o=!1):n?n===u&&(n=!1):"/"===u&&"*"===t[d+1]?o=!0:'"'===u||"'"===u?n=u:"("===u?a++:")"===u&&a--,!o&&!1===n&&0===a)if(":"===u&&-1===h)h=d;else if(";"===u||d===e-1){if(-1!==h){var m=Wr(t.substring(l,h).trim());c.includes(m)||(";"!==u&&d++,s+=" "+t.substring(l,d).trim()+";")}l=d+1,h=-1}}}return i&&(s+=Br(i)),r&&(s+=Br(r,!0)),""===(s=s.trim())?null:s}return null==t?null:String(t)}(e,r);V&&n===t.getAttribute("style")||(null==n?t.removeAttribute("style"):t.style.cssText=n),t.__style=e}else r&&(Array.isArray(r)?(Xr(t,i?.[0],r[0]),Xr(t,i?.[1],r[1],"important")):Xr(t,i,r));return r}function jr(t,e,i=!1){if(t.multiple){if(null==e)return;if(!r(e))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var s of t.options)s.selected=e.includes(Gr(s))}else{for(s of t.options)if(fe(Gr(s),e))return void(s.selected=!0);i&&void 0===e||(t.selectedIndex=-1)}}function Gr(t){return"__value"in t?t.__value:t.value}var Hr=Symbol("class"),Zr=Symbol("style"),Jr=Symbol("is custom element"),Kr=Symbol("is html"),Qr=D?"link":"LINK",ts=D?"input":"INPUT",es=D?"option":"OPTION",is=D?"select":"SELECT",rs=D?"progress":"PROGRESS";function ss(t){if(V){var e=!1,i=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var i=t.value;as(t,"value",null),t.value=i}if(t.hasAttribute("checked")){var r=t.checked;as(t,"checked",null),t.checked=r}}};t.__on_r=i,at(i),$e||($e=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}}function ns(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function as(t,e,i,r){var s=ls(t);V&&(s[e]=t.getAttribute(e),"src"===e||"srcset"===e||"href"===e&&t.nodeName===Qr)||s[e]!==(s[e]=i)&&("loading"===e&&(t[C]=i),null==i?t.removeAttribute(e):"string"!=typeof i&&ds(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function os(t,e,i){var r=ni,s=ci;let n=V;V&&U(!1),oi(null),li(null);try{"style"!==e&&(hs.has(t.getAttribute("is")||t.nodeName)||!customElements||customElements.get(t.getAttribute("is")||t.nodeName.toLowerCase())?ds(t).includes(e):i&&"object"==typeof i)?t[e]=i:as(t,e,null==i?i:String(i))}finally{oi(r),li(s),n&&U(!0)}}function cs(t,i,r=[],s=[],n=[],a,o=!1,c=!1){qt(n,r,s,r=>{var s=void 0,n={},l=t.nodeName===is,h=!1;if(We(()=>{var d=i(...r.map(Ai)),u=function(t,i,r,s,n=!1){if(V&&n&&t.nodeName===ts){var a=t;("checkbox"===a.type?"defaultChecked":"defaultValue")in r||ss(a)}var o=ls(t),c=o[Jr],l=!o[Kr];let h=V&&c;h&&U(!1);var d=i||{},u=t.nodeName===es;for(var m in i)m in r||(r[m]=null);r.class?r.class=Vr(r.class):(s||r[Hr])&&(r.class=null),r[Zr]&&(r.style??=null);var f=ds(t);for(const k in r){let T=r[k];if(u&&"value"===k&&null==T)t.value=t.__value="",d[k]=T;else if("class"!==k)if("style"!==k){var p=d[k];if(T!==p||void 0===T&&t.hasAttribute(k)){d[k]=T;var g=k[0]+k[1];if("$$"!==g)if("on"===g){const _={},x="$$"+k;let E=k.slice(2);var v=Ji(E);if(Hi(E)&&(E=E.slice(0,-7),_.capture=!0),!v&&p){if(null!=T)continue;t.removeEventListener(E,d[x],_),d[x]=null}if(v)Oi(E,t,T),zi([E]);else if(null!=T){function w(t){d[k].call(this,t)}d[x]=Di(E,t,w,_)}}else if("style"===k)as(t,k,T);else if("autofocus"===k)Ie(t,Boolean(T));else if(c||"__value"!==k&&("value"!==k||null==T))if("selected"===k&&u)ns(t,T);else{var b=k;l||(b=Qi(b));var y="defaultValue"===b||"defaultChecked"===b;if(null!=T||c||y)y||f.includes(b)&&(c||"string"!=typeof T)?(t[b]=T,b in o&&(o[b]=e)):"function"!=typeof T&&as(t,b,T);else if(o[k]=null,"value"===b||"checked"===b){let S=t;const A=void 0===i;if("value"===b){let M=S.defaultValue;S.removeAttribute(b),S.defaultValue=M,S.value=S.__value=A?M:null}else{let I=S.defaultChecked;S.removeAttribute(b),S.defaultChecked=I,S.checked=!!A&&I}}else t.removeAttribute(k)}else t.value=t.__value=T}}else Yr(t,T,i?.[Zr],r[Zr]),d[k]=T,d[Zr]=r[Zr];else qr(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,T,s,i?.[Hr],r[Hr]),d[k]=T,d[Hr]=r[Hr]}return h&&U(!0),d}(t,s,d,a,o,c);h&&l&&"value"in d&&jr(t,d.value);for(let t of Object.getOwnPropertySymbols(n))d[t]||je(n[t]);for(let e of Object.getOwnPropertySymbols(d)){var m=d[e];"@attach"!==e.description||s&&m===s[e]||(n[e]&&je(n[e]),n[e]=qe(()=>zr(t,()=>m))),u[e]=m}s=u}),l){var d=t;Ne(()=>{jr(d,s.value,!0),function(t){var e=new MutationObserver(()=>{jr(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Fe(()=>{e.disconnect()})}(d)})}h=!0})}function ls(t){return t.__attributes??={[Jr]:t.nodeName.includes("-"),[Kr]:"http://www.w3.org/1999/xhtml"===t.namespaceURI}}var hs=new Map;function ds(t){var e,i=t.getAttribute("is")||t.nodeName,r=hs.get(i);if(r)return r;hs.set(i,r=[]);for(var s=t,n=Element.prototype;n!==s;){for(var a in e=h(s))e[a].set&&r.push(a);s=m(s)}return r}function us(t,e,i=e){var r,s,n=()=>{cancelAnimationFrame(r),t.paused||(r=requestAnimationFrame(n));var e=t.currentTime;s!==e&&i(s=e)};r=requestAnimationFrame(n),t.addEventListener("timeupdate",n),Ve(()=>{var i=Number(e());s===i||isNaN(i)||(t.currentTime=s=i)}),Fe(()=>{cancelAnimationFrame(r),t.removeEventListener("timeupdate",n)})}function ms(t,e){Pe(t,["seeking","seeked"],()=>e(t.seeking))}function fs(t,e,i=e){var r=e();Pe(t,["play","pause","canplay"],()=>{r!==t.paused&&i(r=t.paused)},null==r),Ne(()=>{(r=!!e())!==t.paused&&(r?t.pause():t.play().catch(t=>{throw i(r=!0),t}))})}function ps(t,e){return t===e||t?.[P]===e}function gs(t={},e,i,r){var s=J.r,n=ci;return Ne(()=>{var a,o;return Ve(()=>{a=o,o=r?.()||[],$i(()=>{t!==i(...o)&&(e(t,...o),a&&ps(i(...a),t)&&e(null,...a))})}),()=>{let r=n;for(;r!==s&&null!==r.parent&&33554432&r.parent.f;)r=r.parent;const a=r.teardown;r.teardown=()=>{o&&ps(i(...o),t)&&e(null,...o),a?.()}}}),t}function vs(t,e,i,r,s){var n=()=>{r(i[t])};i.addEventListener(e,n),s?Ve(()=>{i[t]=s()}):n(),i!==document.body&&i!==window&&i!==document||Fe(()=>{i.removeEventListener(e,n)})}var ws={get(t,e){let i=t.props.length;for(;i--;){let r=t.props[i];if(p(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r)return r[e]}},set(t,e,i){let r=t.props.length;for(;r--;){let s=t.props[r];p(s)&&(s=s());const n=l(s,e);if(n&&n.set)return n.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let r=t.props[i];if(p(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=l(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===P||e===L)return!1;for(let i of t.props)if(p(i)&&(i=i()),null!=i&&e in i)return!0;return!1},ownKeys(t){const e=[];for(let i of t.props)if(p(i)&&(i=i()),i){for(const t in i)e.includes(t)||e.push(t);for(const t of Object.getOwnPropertySymbols(i))e.includes(t)||e.push(t)}return e}};function bs(...t){return new Proxy({props:t},ws)}function ys(t,e,i,r){var s=!!(8&i),n=!!(16&i),a=r,o=!0,c=()=>(o&&(o=!1,a=n?$i(r):r),a);let h;if(s){var d=P in t||L in t;h=l(t,e)?.set??(d&&e in t?i=>t[e]=i:void 0)}var u,m,f=!1;if(s?[u,f]=function(t){var e=bt;try{return bt=!1,[t(),bt]}finally{bt=e}}(()=>t[e]):u=t[e],void 0===u&&void 0!==r&&(u=c(),h&&(function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),h(u))),m=()=>{var i=t[e];return void 0===i?c():(o=!0,i)},!(4&i))return m;if(h){var p=t.$$legacy;return function(t,e){return arguments.length>0?((!e||p||f)&&h(e?m():t),t):m()}}var g=!1,v=(1&i?jt:Zt)(()=>(g=!1,m()));s&&Ai(v);var w=ci;return function(t,e){if(arguments.length>0){const i=e?Ai(v):s?ue(t):t;return oe(v,i),g=!0,void 0!==a&&(a=i),t}return ri&&g||16384&w.f?v.v:Ai(v)}}var ks=class{#G;#H;constructor(t){var e=new Map,i=(t,i)=>{var r=ae(i,!1,!1);return e.set(t,r),r};const r=new Proxy({...t.props||{},$$events:{}},{get:(t,r)=>Ai(e.get(r)??i(r,Reflect.get(t,r))),has:(t,r)=>r===L||(Ai(e.get(r)??i(r,Reflect.get(t,r))),Reflect.has(t,r)),set:(t,r,s)=>(oe(e.get(r)??i(r,s),s),Reflect.set(t,r,s))});this.#H=(t.hydrate?or:ar)(t.component,{target:t.target,anchor:t.anchor,props:r,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),t?.props?.$$host&&!1!==t.sync||Dt(),this.#G=r.$$events;for(const s of Object.keys(this.#H))"$set"!==s&&"$destroy"!==s&&"$on"!==s&&c(this,s,{get(){return this.#H[s]},set(t){this.#H[s]=t},enumerable:!0});this.#H.$set=t=>{Object.assign(r,t)},this.#H.$destroy=()=>{dr(this.#H)}}$set(t){this.#H.$set(t)}$on(t,e){this.#G[t]=this.#G[t]||[];const i=(...t)=>e.call(this,...t);return this.#G[t].push(i),()=>{this.#G[t]=this.#G[t].filter(t=>t!==i)}}$destroy(){this.#H.$destroy()}};function Ts(t,e,i,r){const s=i[t]?.type;if(e="Boolean"===s&&"boolean"!=typeof e?null!=e:e,!r||!i[t])return e;if("toAttribute"===r)switch(s){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(s){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}"function"==typeof HTMLElement&&HTMLElement;var _s="E001",xs="E002",Es="E003",Ss="E004",As="E005",Ms="E100",Is="E101",$s="E102",Ps="E103",Ls="E200",Cs="E201",Rs="E202",Ds="E203",Fs="E300",Os="E301",zs="E302",Ns="E303",Vs="E999",Us={[_s]:"You appear to be offline. Please check your internet connection and try again.",[xs]:"The connection timed out. Please try again.",[Es]:"Unable to load content due to security restrictions.",[Ss]:"The requested image or content could not be found.",[As]:"The server encountered an error. Please try again later.",[Ms]:"Your browser does not support WebGL, which is required to view this content. Please try a different browser.",[Is]:"The graphics context was lost. The page will attempt to recover.",[$s]:"There was a problem initializing the graphics. Please try refreshing the page.",[Ps]:"Your device is low on memory. Try closing other browser tabs or applications.",[Ls]:"The image data appears to be invalid or corrupted.",[Cs]:"The requested content could not be loaded.",[Rs]:"There was a problem processing the image information.",[Ds]:"This image uses an unsupported format version.",[Fs]:"Failed to load the image viewer engine. Please try refreshing the page.",[Os]:"An error occurred in the image viewer. Please try refreshing the page.",[zs]:"Failed to load the image. Please try again.",[Ns]:"Failed to load the tour. Some features may be unavailable.",[Vs]:"An unexpected error occurred. Please try refreshing the page."},Bs=class t extends Error{constructor(e,i){super(e),this.name="MicrioError",this.code=i?.code??Vs,this.displayMessage=i?.displayMessage??Us[this.code],this.cause=i?.cause,this.statusCode=i?.statusCode,"captureStackTrace"in Error&&"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}static fromResponse(e,i){const r=e.status;let s=Vs;return 404===r?s=Ss:r>=500&&r<600?s=As:0===r?s=_s:408!==r&&504!==r||(s=xs),new t(`${i?i+": ":""}HTTP ${r}`,{code:s,statusCode:r})}static fromError(e,i){const r=e.message.toLowerCase();let s=Vs;return r.includes("network")||r.includes("internet")||r.includes("offline")?s=_s:r.includes("timeout")?s=xs:r.includes("cors")||r.includes("cross-origin")?s=Es:r.includes("webgl")||r.includes("webglcontext")?s=Ms:r.includes("memory")||r.includes("out of memory")?s=Ps:(r.includes("wasm")||r.includes("webassembly"))&&(s=Fs),new t(`${i?i+": ":""}${e.message}`,{code:s,cause:e})}},Ws=(t,e=1)=>(t%e+e)%e,qs=t=>JSON.parse(JSON.stringify(t));function Xs(t,e,i={}){if(!t||"object"!=typeof t)return e;for(const r in t){const s=t[r];if(s&&"object"==typeof s&&Object.getPrototypeOf(s)===Object.prototype){const t=e;t[r]&&"object"==typeof t[r]||(t[r]={}),Xs(s,t[r],i)}else{const t=e;i.mergeArrays&&t[r]instanceof Array&&s instanceof Array?t[r].push(...s):i.noOverwrite&&r in e||(t[r]=s)}}return e}var Ys=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1),js=()=>Ys()+Ys()+"-"+Ys()+"-"+Ys()+"-"+Ys()+"-"+Ys()+Ys()+Ys(),Gs=t=>{if(void 0===t)return t;t=(t=t.replace(/^\s+|\s+$/g,"")).toLowerCase();for(let e=0,i=28;e<i;e++)t=t.replace(new RegExp("àáäâèéëêìíïîòóöôùúüûñç·/_,:;".charAt(e),"g"),"aaaaeeeeiiiioooouuuunc------".charAt(e));return t=t.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")};function Hs(t){const e=t<0;e&&(t=-t);const i=Math.ceil(t),r=Math.floor(i/3600),s=Math.floor(i%3600/60),n=i%60,a=t=>t<10?"0"+t:""+t;return(e?"-":"")+(r?r+":"+a(s):""+s)+":"+a(n)}var Zs=navigator.userAgent,Js={iOS:/ipad|iphone|ipod/i.test(Zs),firefox:/firefox/i.test(Zs),OSX:/macintosh/i.test(Zs)&&/os\ x/i.test(Zs),hasTouch:"TouchEvent"in self,safari:!1};Js.safari=(Js.OSX||Js.iOS)&&(/safari/i.test(Zs)||/instagram/i.test(Zs))&&!/chrome/i.test(Zs),Js.OSX&&Js.safari&&"TouchEvent"in self&&(Js.iOS=!0,Js.OSX=!1);var Ks=t=>new Promise(e=>t?setTimeout(e,t):e()),Qs=[],tn=(t,e,i)=>new Promise((r,s)=>{if(i||Qs.includes(t))return r();const n=document.createElement("script"),a=()=>{Qs.push(t),r()};e?self[e]=a:n.onload=a,n.onerror=()=>s&&s(),n.async=!0,n.defer=!0,self.crossOriginIsolated&&(n.crossOrigin="anonymous"),n.src=t,document.head.appendChild(n)}),en=(t,e={})=>new Promise(i=>{let r,s=!0;r=t.subscribe(t=>{s&&e.allowUndefined&&void 0===t||(s=!1,(void 0!==e.targetValue?t===e.targetValue:e.allowUndefined||void 0!==t)&&(r?r():Si().then(()=>r()),i(t)))})}),rn=new WeakSet,sn={fromLegacy:t=>{if(!t)return;if(rn.has(t))return t;const e=[t[0],t[1],t[2]-t[0],t[3]-t[1]];return rn.add(t),e},toCenterJSON:t=>({centerX:t[0]+t[2]/2,centerY:t[1]+t[3]/2,width:t[2],height:t[3]}),rectToCenterJSON:t=>sn.toCenterJSON([t[0],t[1],t[2]-t[0],t[3]-t[1]])},nn={"micrio-cdn.azureedge.net":"micrio.vangoghmuseum.nl/micrio","micrio-cdn.vangoghmuseum.nl":"micrio.vangoghmuseum.nl/micrio","rijks-micrio.azureedge.net":"micrio.rijksmuseum.nl"},an=t=>{if(t instanceof Object&&"fileUrl"in t&&!t.src&&(t.src=t.fileUrl),t?.src)for(let e in nn)t.src.includes(e)&&(t.src=t.src.replace(e,nn[e]))},on=t=>!t.viewsWH,cn=new WeakMap,ln=t=>{an(t.image),t.children?.forEach(ln)},hn=new Set,dn=(t,e,i,r)=>{const s=e+"-"+t.id;if(hn.has(s))return;hn.add(s),t.data||(t.data={}),t.id||(t.id=js()),t.tags||(t.tags=[]),"type"in t||(t.type="default"),t.popupType||(t.popupType="popup"),"string"==typeof t.data.icon&&(t.data.icon={title:"",size:0,uploaded:0,width:-1,height:-1,src:t.data.icon}),t.images?.forEach(an),an(t.positionalAudio),an(t.data?.icon),Object.values(t.i18n??{}).forEach(t=>an(t.audio));const n="embedImages"in t?t.embedImages:void 0;n&&n.forEach(t=>an(t));const a=t.data?._meta?.secondary;a&&(t.data.micrioSplitLink=a),i&&"class"in t&&(t.tags??=[]).push(...t.class.split(" ").map(t=>t.trim()).filter(e=>!!e&&!t.tags.includes(e))),t.tags?.includes("default")&&(t.type="default"),r&&(t.view=sn.fromLegacy(t.view),un(t.videoTour))};function un(t){if(!t||!("i18n"in t)&&!("timeline"in t))return;const e="i18n"in t?t.i18n:{en:t};for(const i in e)e[i]?.timeline.forEach(t=>t.rect=sn.fromLegacy(t.rect))}var mn=new Map,fn=new Map,pn=new Map,gn=async(t,e)=>{if(!e&&mn.has(t))return qs(mn.get(t));if(fn.has(t))return fn.get(t);if(pn.has(t))throw pn.get(t)[1];const i=fetch(t+(e?(t.includes("?")?"&":"?")+Math.random():"")).then(async e=>{if(200==e.status)return e.json();{const i=Bs.fromResponse(e,`fetchJson(${t})`);throw pn.set(t,[e.status,i.message]),i}}).then(i=>(e||mn.set(t,i),fn.delete(t),qs(i))).catch(e=>{throw fn.delete(t),e});return fn.set(t,i),i},vn=t=>"MICRIO_DATA"in self?(self?.MICRIO_DATA).find(e=>e[0]==t):void 0,wn=(t,e,i)=>{const r=vn(t)?.[1];return r?Promise.resolve(r):gn(`${e??"https://i.micr.io/"}${t}/info.json`,i).then(t=>{var e;return t&&("Height"in t&&(t.height=t.Height,t.version=1,t.tileSize=512),"Width"in t&&(t.width=t.Width)),(e=t)&&(cn.has(e)||(an(e.organisation?.logo),an(e.settings?._markers?.markerIcon),e.settings?._markers?.customIcons?.forEach(an),an(e.settings?._360?.video),e?.settings&&on(e)&&(e.settings.view=sn.fromLegacy(e.settings.view),e.settings.restrict=sn.fromLegacy(e.settings.restrict)),cn.set(e,!0))),t})};async function bn(t,e,i,r){if(!("steps"in e)||e.stepInfo)return;const s=[...new Set(e.steps.map(t=>t.split(",")[1]).filter(e=>!!e&&e!=t.id))],[n,a]=await Promise.all([Promise.all(s.map(e=>gn((e=>t.dataPath+(t.isV5?e+"/data/pub.json":e+"/data."+i+".json"))(e)))),Promise.all(s.map(t=>wn(t)))]);n.forEach((e,r)=>{const s=on(a[r]);e?.markers?.forEach(e=>dn(e,i,!t.isV5,s))}),an(e.image);let o=-1;const c=[];e.stepInfo=e.steps.map((e,a)=>{const[l,h]=e.split(","),d=n[s.indexOf(h)]??r,u=d?.markers?.find(t=>t.id==l),m=u?.i18n?.[i]??u;m?.title&&(o=a);const f=u?.videoTour?"timeline"in u.videoTour?u.videoTour:u.videoTour.i18n?.[i]??void 0:void 0;return an(f?.audio),an(f?.subtitle),u?(an(m?.audio),u.videoTour&&m?.audio&&(u.videoTour.audio=m.audio),{markerId:l,marker:u,micrioId:h||t.id,duration:Number(f?.duration||m?.audio?.duration||0),startView:f?.timeline?.length?f.timeline[0].rect:u?.view,imageHasOtherMarkers:!!h&&!!d?.markers?.find(t=>t.id!=l&&!t.noMarker),gridView:!(!u.data?._meta?.gridView&&!u.data?._meta?.gridAction),chapter:o,hasSubtitle:!!f?.subtitle}):(console.warn(`[Micrio] Warning: tour step ${a+1} with id [${l}] not found! Removing it from the tour`),void c.push(a))}).filter(t=>void 0!==t),c.reverse().forEach(t=>e.steps.splice(t,1)),e.initialStep=0,e.duration=e.stepInfo.reduce((t,e)=>t+(e.duration||0),0)}var yn=t=>{let e=t.charCodeAt(0),i=e<91;return(e-=i?65:97)-(e>7?1:0)+(i?24:e>10?-1:0)},kn=t=>6==t.length||7==t.length;function Tn(t,e){const i=t.$current;if(!i)return;const r=t.spaceData?.images.find(t=>t.id==i.id),s=t.spaceData?.images.find(t=>t.id==e);if(!r||!s)return;const n=[(s.x??.5)-(r.x??.5),(r.y??.5)-(s.y??.5),(s.z??.5)-(r.z??.5)];let a=n[0]*n[0]+n[1]*n[1]+n[2]*n[2];a>0&&(a=1/Math.sqrt(a));const o=[n[0]*a,n[1]*a,n[2]*a],c=Ws(Math.atan2(-o[0],o[2])/Math.PI/2);return{v:n,vN:o,directionX:c,vector:{direction:c%1,distanceX:Math.max(0,Math.min(.4,Math.sqrt(o[0]*o[0]+o[2]*o[2]))),distanceY:-n[1]}}}function _n([t,e,i=0,r=0],[s,n,a=0,o=0],c){const l=Math.max(r/2,c),h=Math.max(o/2,c);return!(t+i+c<s-c||t-c>s+a+c||e+l<n-h||e-l>n+h)}var xn,En=function(t){return t[t.None=0]="None",t[t.IFrame=1]="IFrame",t[t.Video=2]="Video",t[t.Audio=3]="Audio",t[t.VideoTour=4]="VideoTour",t[t.Micrio=5]="Micrio",t}({}),Sn=function(t){return t[t.YouTube=1]="YouTube",t[t.Vimeo=2]="Vimeo",t}({}),An=/((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube\.com|youtu.be|youtube-nocookie\.com))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?/,Mn=/vimeo\.com/,In=/^.*t=(\d+).*$/,$n="https://www.youtube-nocookie.com";function Pn(t){if(t)return"fileUrl"in t?t.fileUrl:t.src}function Ln(t,e){return t.i18n?.[e]??t}var Cn=t=>t;function Rn(t){const e=t-1;return e*e*e+1}function Dn(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Fn(t,{delay:e=0,duration:i=400,easing:r=Cn}={}){const s=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:r,css:t=>"opacity: "+t*s}}function On(t,{delay:e=0,duration:i=400,easing:r=Rn,x:s=0,y:n=0,opacity:a=0}={}){const o=getComputedStyle(t),c=+o.opacity,l="none"===o.transform?"":o.transform,h=c*(1-a),[d,u]=Dn(s),[m,f]=Dn(n);return{delay:e,duration:i,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${l} translate(${(1-t)*d}${u}, ${(1-t)*m}${f});\n\t\t\topacity: ${c-h*e}`}}var zn=Wi('<a rel="noopener" href="https://micr.io/" title="Powered by Micrio" aria-label="Micrio homepage"></a>');function Nn(t,e){et(e,!0);const[i,r]=_t(),s=Q("micrio"),{tour:n,marker:a}=s.state,o=/micr\.io/.test(location.origin)&&self.parent==self?void 0:"_blank";let c,l=ne(!1);pr(()=>s.loading.subscribe(t=>{clearTimeout(c),t?Ai(l)||(c=setTimeout(()=>oe(l,!0),750)):oe(l,!1)}));const h=Ht(()=>!!kt(n,"$tour",i)||!!kt(a,"$marker",i));var d=ji(),u=xe(d),m=t=>{var e=zn();let i;Ue(()=>{as(e,"target",o),i=qr(e,1,"micrio-logo",null,i,{loading:Ai(l)})}),Rr(3,e,()=>Fn,()=>({duration:200})),Gi(t,e)};vr(u,t=>{Ai(h)||t(m)}),Gi(t,d),it(),r()}var Vn=Wi('<a rel="noopener" target="_blank" class="micrio-logo-org"><img alt="Logo" class="micrio-logo-org"/></a>');function Un(t,e){et(e,!0);const[i,r]=_t(),{tour:s,marker:n,popover:a}=Q("micrio").state;const o=Ht(()=>!!kt(s,"$tour",i)||!!kt(n,"$marker",i)||!!kt(a,"$popover",i));var c=ji(),l=xe(c),h=t=>{var i=Vn(),r=_e(i);q(i),Ue(t=>{as(i,"href",e.organisation.href??"#"),as(i,"title",e.organisation.name),as(i,"aria-label",`${e.organisation.name??""} homepage`),as(r,"src",t)},[()=>function(t){if("string"==typeof t)return t;let e=0,i=Math.max(t.width,t.height);for(;i>1024;)e++,i/=2;return t.micrioId&&t.width>1024?"https://r2.micr.io/"+t.micrioId+"/"+e+"/0-0."+(t.isPng?"png":t.isWebP?"webp":"jpg"):t.src}(e.organisation.logo)]),Rr(3,i,()=>Fn,()=>({duration:200})),Gi(t,i)};vr(l,t=>{!Ai(o)&&e.organisation.logo&&t(h)}),Gi(t,c),it(),r()}var Bn={en:{close:"Close",zoomIn:"Zoom in",zoomOut:"Zoom out",fullscreenToggle:"Toggle fullscreen",switchLanguage:"Switch language",share:"Share",audioMute:"Mute audio",audioUnmute:"Unmute audio",closeMarker:"Close this marker",tourStepNext:"Next step",tourStepPrev:"Previous step",tourStop:"Stop this tour",minimize:"Minimize",play:"Play",pause:"Pause",stop:"Stop",subtitlesToggle:"Toggle subtitles",galleryPrev:"Previous image",galleryNext:"Next image",menuToggle:"Toggle menu",waypointFollow:"Go this way"},nl:{close:"Sluit",zoomIn:"Zoom in",zoomOut:"Zoom uit",fullscreenToggle:"Volledig scherm aan / uit",switchLanguage:"Kies taal",share:"Deel",audioMute:"Geluid uit",audioUnmute:"Geluid aan",closeMarker:"Sluit deze marker",tourStepNext:"Volgende stap",tourStepPrev:"Vorige stap",tourStop:"Stop deze tour",minimize:"Minimaliseer",play:"Start",pause:"Pauzeer",stop:"Stop",subtitlesToggle:"Ondertitels aan / uit",galleryPrev:"Vorige afbeelding",galleryNext:"Volgende afbeelding",menuToggle:"Menu openen / sluiten",waypointFollow:"Ga deze richting"}},Wn=vt(Bn.en),qn=navigator?.language??"en-EN",Xn="Intl"in self&&Intl.DisplayNames?new Intl.DisplayNames([qn],{type:"language"}):void 0,Yn=["ar","ar-AE","ar-BH","ar-DJ","ar-DZ","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-MA","ar-OM","ar-QA","ar-SA","ar-SD","ar-SY","ar-TN","ar-YE","dv","dv-MV","fa","fa-AF","fa-IR","he","he-IL","iw","iw-PS","kd","ku","ku-IQ","ku-IR","ku-SY","ku-TR","pk-PK","ps","ps-AF","sd","sd-PK","syr-SY","ug","ug-CN","ur","ur-IN","ur-PK","yi","yi-IL","yi-US"],jn={arrowDown:[384,512,"M169.4 502.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 402.7 224 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 370.7-105.4-105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"],arrowLeft:[512,512,"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 288 480 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-370.7 0 105.4-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"],arrowRight:[512,512,"M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l370.7 0-105.4 105.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"],arrowUp:[384,512,"M214.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 109.3 160 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-370.7 105.4 105.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"],bars:[448,512,"M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"],chevronDown:[448,512,"M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"],circleExclamation:[512,512,"M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"],closedCaptioning:[512,512,"M0 128C0 92.7 28.7 64 64 64l384 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zm152 80l32 0c4.4 0 8 3.6 8 8 0 13.3 10.7 24 24 24s24-10.7 24-24c0-30.9-25.1-56-56-56l-32 0c-30.9 0-56 25.1-56 56l0 80c0 30.9 25.1 56 56 56l32 0c30.9 0 56-25.1 56-56 0-13.3-10.7-24-24-24s-24 10.7-24 24c0 4.4-3.6 8-8 8l-32 0c-4.4 0-8-3.6-8-8l0-80c0-4.4 3.6-8 8-8zm168 8c0-4.4 3.6-8 8-8l32 0c4.4 0 8 3.6 8 8 0 13.3 10.7 24 24 24s24-10.7 24-24c0-30.9-25.1-56-56-56l-32 0c-30.9 0-56 25.1-56 56l0 80c0 30.9 25.1 56 56 56l32 0c30.9 0 56-25.1 56-56 0-13.3-10.7-24-24-24s-24 10.7-24 24c0 4.4-3.6 8-8 8l-32 0c-4.4 0-8-3.6-8-8l0-80z"],compress:[448,512,"M160 64c0-17.7-14.3-32-32-32S96 46.3 96 64l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 320c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0z"],ellipsisVertical:[128,512,"M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z"],expand:[448,512,"M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32S0 334.3 0 352l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"],externalLink:[512,512,"M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l82.7 0-201.4 201.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3 448 192c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-17.7-14.3-32-32-32L320 0zM80 96C35.8 96 0 131.8 0 176L0 432c0 44.2 35.8 80 80 80l256 0c44.2 0 80-35.8 80-80l0-80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 80c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l80 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 96z"],globe:[512,512,"M351.9 280l-190.9 0c2.9 64.5 17.2 123.9 37.5 167.4 11.4 24.5 23.7 41.8 35.1 52.4 11.2 10.5 18.9 12.2 22.9 12.2s11.7-1.7 22.9-12.2c11.4-10.6 23.7-28 35.1-52.4 20.3-43.5 34.6-102.9 37.5-167.4zM160.9 232l190.9 0C349 167.5 334.7 108.1 314.4 64.6 303 40.2 290.7 22.8 279.3 12.2 268.1 1.7 260.4 0 256.4 0s-11.7 1.7-22.9 12.2c-11.4 10.6-23.7 28-35.1 52.4-20.3 43.5-34.6 102.9-37.5 167.4zm-48 0C116.4 146.4 138.5 66.9 170.8 14.7 78.7 47.3 10.9 131.2 1.5 232l111.4 0zM1.5 280c9.4 100.8 77.2 184.7 169.3 217.3-32.3-52.2-54.4-131.7-57.9-217.3L1.5 280zm398.4 0c-3.5 85.6-25.6 165.1-57.9 217.3 92.1-32.7 159.9-116.5 169.3-217.3l-111.4 0zm111.4-48C501.9 131.2 434.1 47.3 342 14.7 374.3 66.9 396.4 146.4 399.9 232l111.4 0z"],image:[448,512,"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm64 80a48 48 0 1 1 0 96 48 48 0 1 1 0-96zM272 224c8.4 0 16.1 4.4 20.5 11.5l88 144c4.5 7.4 4.7 16.7 .5 24.3S368.7 416 360 416L88 416c-8.9 0-17.2-5-21.3-12.9s-3.5-17.5 1.6-24.8l56-80c4.5-6.4 11.8-10.2 19.7-10.2s15.2 3.8 19.7 10.2l26.4 37.8 61.4-100.5c4.4-7.1 12.1-11.5 20.5-11.5z"],layerGroup:[512,512,"M232.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L13.9 149.8C5.4 145.8 0 137.3 0 128s5.4-17.9 13.9-21.8L232.5 5.2zM48.1 218.4l164.3 75.9c27.7 12.8 59.6 12.8 87.3 0l164.3-75.9 34.1 15.8c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L13.9 277.8C5.4 273.8 0 265.3 0 256s5.4-17.9 13.9-21.8l34.1-15.8zM13.9 362.2l34.1-15.8 164.3 75.9c27.7 12.8 59.6 12.8 87.3 0l164.3-75.9 34.1 15.8c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L13.9 405.8C5.4 401.8 0 393.3 0 384s5.4-17.9 13.9-21.8z"],link:[576,512,"M419.5 96c-16.6 0-32.7 4.5-46.8 12.7-15.8-16-34.2-29.4-54.5-39.5 28.2-24 64.1-37.2 101.3-37.2 86.4 0 156.5 70 156.5 156.5 0 41.5-16.5 81.3-45.8 110.6l-71.1 71.1c-29.3 29.3-69.1 45.8-110.6 45.8-86.4 0-156.5-70-156.5-156.5 0-1.5 0-3 .1-4.5 .5-17.7 15.2-31.6 32.9-31.1s31.6 15.2 31.1 32.9c0 .9 0 1.8 0 2.6 0 51.1 41.4 92.5 92.5 92.5 24.5 0 48-9.7 65.4-27.1l71.1-71.1c17.3-17.3 27.1-40.9 27.1-65.4 0-51.1-41.4-92.5-92.5-92.5zM275.2 173.3c-1.9-.8-3.8-1.9-5.5-3.1-12.6-6.5-27-10.2-42.1-10.2-24.5 0-48 9.7-65.4 27.1L91.1 258.2c-17.3 17.3-27.1 40.9-27.1 65.4 0 51.1 41.4 92.5 92.5 92.5 16.5 0 32.6-4.4 46.7-12.6 15.8 16 34.2 29.4 54.6 39.5-28.2 23.9-64 37.2-101.3 37.2-86.4 0-156.5-70-156.5-156.5 0-41.5 16.5-81.3 45.8-110.6l71.1-71.1c29.3-29.3 69.1-45.8 110.6-45.8 86.6 0 156.5 70.6 156.5 156.9 0 1.3 0 2.6 0 3.9-.4 17.7-15.1 31.6-32.8 31.2s-31.6-15.1-31.2-32.8c0-.8 0-1.5 0-2.3 0-33.7-18-63.3-44.8-79.6z"],minus:[448,512,"M0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32z"],pause:[384,512,"M48 32C21.5 32 0 53.5 0 80L0 432c0 26.5 21.5 48 48 48l64 0c26.5 0 48-21.5 48-48l0-352c0-26.5-21.5-48-48-48L48 32zm224 0c-26.5 0-48 21.5-48 48l0 352c0 26.5 21.5 48 48 48l64 0c26.5 0 48-21.5 48-48l0-352c0-26.5-21.5-48-48-48l-64 0z"],play:[448,512,"M91.2 36.9c-12.4-6.8-27.4-6.5-39.6 .7S32 57.9 32 72l0 368c0 14.1 7.5 27.2 19.6 34.4s27.2 7.5 39.6 .7l336-184c12.8-7 20.8-20.5 20.8-35.1s-8-28.1-20.8-35.1l-336-184z"],playCircle:[512,512,"M0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"],plus:[448,512,"M256 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 160-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0 0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0 0-160z"],share:[512,512,"M307.8 18.4c-12 5-19.8 16.6-19.8 29.6l0 80-112 0c-97.2 0-176 78.8-176 176 0 113.3 81.5 163.9 100.2 174.1 2.5 1.4 5.3 1.9 8.1 1.9 10.9 0 19.7-8.9 19.7-19.7 0-7.5-4.3-14.4-9.8-19.5-9.4-8.8-22.2-26.4-22.2-56.7 0-53 43-96 96-96l96 0 0 80c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-9.2-9.2-22.9-11.9-34.9-6.9z"],video:[576,512,"M96 64c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L96 64zM464 336l73.5 58.8c4.2 3.4 9.4 5.2 14.8 5.2 13.1 0 23.7-10.6 23.7-23.7l0-240.6c0-13.1-10.6-23.7-23.7-23.7-5.4 0-10.6 1.8-14.8 5.2L464 176 464 336z"],volumeHigh:[640,512,"M533.6 32.5c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C557.5 113.8 592 180.8 592 256s-34.5 142.2-88.7 186.3c-10.3 8.4-11.8 23.5-3.5 33.8s23.5 11.8 33.8 3.5C598.5 426.7 640 346.2 640 256S598.5 85.2 533.6 32.5zM473.1 107c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C475.3 170.7 496 210.9 496 256s-20.7 85.3-53.2 111.8c-10.3 8.4-11.8 23.5-3.5 33.8s23.5 11.8 33.8 3.5c43.2-35.2 70.9-88.9 70.9-149s-27.7-113.8-70.9-149zm-60.5 74.5c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C393.1 227.6 400 241 400 256s-6.9 28.4-17.7 37.3c-10.3 8.4-11.8 23.5-3.5 33.8s23.5 11.8 33.8 3.5C434.1 312.9 448 286.1 448 256s-13.9-56.9-35.4-74.5zM80 352l48 0 134.1 119.2c6.4 5.7 14.6 8.8 23.1 8.8 19.2 0 34.8-15.6 34.8-34.8l0-378.4c0-19.2-15.6-34.8-34.8-34.8-8.5 0-16.7 3.1-23.1 8.8L128 160 80 160c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48z"],volumeXmark:[576,512,"M48 352l48 0 134.1 119.2c6.4 5.7 14.6 8.8 23.1 8.8 19.2 0 34.8-15.6 34.8-34.8l0-378.4c0-19.2-15.6-34.8-34.8-34.8-8.5 0-16.7 3.1-23.1 8.8L96 160 48 160c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48zM367 175c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z"],xmark:[384,512,"M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},Gn=Xi('<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path></path></svg>');function Hn(t,e){et(e,!0);let i=ys(e,"style",3,void 0);const r=Q("micrio"),s="chevron-down"==e.name||"link-ext"==e.name,n=r.defaultSettings?.ui?.icons,a=Ht(()=>n&&("zoom-in"==e.name?n.zoomIn:"zoom-out"==e.name?n.zoomOut:"maximize"==e.name?n.fullscreenEnter:"minimize"==e.name?n.fullscreenLeave:"close"==e.name?n.close:"arrow-right"==e.name?n.next:"arrow-left"==e.name?n.prev:"arrow-up"==e.name?n.up:"arrow-down"==e.name?n.down:"play"==e.name?n.play:"pause"==e.name?n.pause:"subtitles"==e.name?n.subtitles:"subtitles-off"==e.name?n.subtitlesOff:"volume-off"==e.name?n.muted:"volume-up"==e.name?n.unmuted:null)),o={play:jn.play,pause:jn.pause,close:jn.xmark,"play-filled":jn.playCircle,a11y:jn.globe,menu:jn.bars,"zoom-in":jn.plus,"zoom-out":jn.minus,maximize:jn.expand,minimize:jn.compress,"volume-off":jn.volumeXmark,"volume-up":jn.volumeHigh,subtitles:jn.closedCaptioning,"subtitles-off":jn.closedCaptioning,"arrow-left":jn.arrowLeft,"arrow-up":jn.arrowUp,"arrow-right":jn.arrowRight,"arrow-down":jn.arrowDown,video:jn.video,audio:jn.volumeHigh,image:jn.image,share:jn.share,error:jn.circleExclamation,"chevron-down":jn.chevronDown,link:jn.link,"link-ext":jn.externalLink,"ellipsis-vertical":jn.ellipsisVertical},c=Ht(()=>o[e.name]);var l=ji(),h=xe(l),d=t=>{var e=ji();Er(xe(e),()=>Ai(a),void 0,!0),Gi(t,e)},u=t=>{var e=Gn();let r;var n=_e(e);q(e),Ue(()=>{as(e,"viewBox",`0 0 ${Ai(c)[0]??""} ${Ai(c)[1]??""}`),r=qr(e,0,"svelte-fa micrio-icon",null,r,{small:s}),Yr(e,i()),as(n,"d",Ai(c)[2])}),Gi(t,e)};vr(h,t=>{Ai(a)?t(d):Ai(c)&&t(u,1)}),Gi(t,l),it()}var Zn=vt(void 0),Jn=()=>Zn.set(void 0),Kn=!1;Zn.subscribe(t=>{t?Kn||window.addEventListener("click",Jn):Kn&&window.removeEventListener("click",Jn),Kn=!!t});var Qn=Wi('<a class="micrio-menu-action micrio-menu"><strong class="micrio-menu"> <!></strong></a>'),ta=Xi('<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="svelte-fa" style="height:1em;vertical-align:-.125em;margin-right:10px;"><path></path></svg>'),ea=Wi('<button class="micrio-menu-action micrio-menu" type="button"><!> <strong class="micrio-menu"> <!></strong></button>'),ia=Wi('<div class="items micrio-menu"></div>'),ra=Wi("<menu><!> <!></menu>");function sa(t,e){et(e,!0);const i=()=>kt(Zn,"$opened",r),[r,s]=_t();let n=ys(e,"menu",15),a=ys(e,"originalId",3,null);const o=Q("micrio"),{events:c,state:l,_lang:h}=o;let d=ne(void 0);const u=Ht(()=>{return t=n(),e=kt(h,"$_lang",r),t.i18n?.[e]??t;var t,e});function m(t){n().link||t.preventDefault(),n().action&&n().action();const i=!!(Ai(p)||n().action||n().link);Zn.set(i?void 0:n()),i&&e.onclose?.()}pr(()=>{Ai(u)?.title||1!=n().children?.length||n(n().children[0]),n().action||(n().markerId?n(n().action=()=>{a()&&o.$current?.id!=a()&&o.open(a()),o.$current?.state.marker.set(n().markerId)},!0):(Ai(u)?.content||Ai(u)?.embed||n().image)&&n(n().action=()=>{c.dispatch("page-open",n()),l.popover.set({contentPage:n()})},!0)),n(n()._button=Ai(d),!0)});const f=t=>t==i()||!!t.children?.some(f),p=Ht(()=>i()&&f(n()));var g=ra();let v;var w=_e(g),b=t=>{var e=Qn(),i=_e(e),r=_e(i),s=Ee(r);{let t=Ht(()=>n().linkTargetBlank?"link-ext":"link");Hn(s,{style:"opacity:.75",get name(){return Ai(t)}})}q(i),q(e),Ue(()=>{as(e,"href",n().link),as(e,"target",n().linkTargetBlank?"_blank":void 0),nr(r,`${Ai(u)?.title??"(Unknown)"??""} `)}),Oi("click",e,m),Gi(t,e)},y=t=>{var e=ea(),i=_e(e),r=t=>{var e=ta(),i=_e(e);q(e),Ue(()=>{as(e,"viewBox",`0 0 ${n().icon[0]??""} ${n().icon[1]??""}`),as(i,"d",n().icon[2])}),Gi(t,e)};vr(i,t=>{n().icon&&t(r)});var s=Ee(i,2),a=_e(s),o=Ee(a),c=t=>{Hn(t,{name:"chevron-down"})};vr(o,t=>{n().children&&n().children.length&&t(c)}),q(s),q(e),gs(e,t=>oe(d,t),()=>Ai(d)),Ue(()=>nr(a,`${Ai(u)?.title??"(Unknown)"??""} `)),Oi("click",e,m),Gi(t,e)};vr(w,t=>{n().link?t(b):t(y,-1)});var k=Ee(w,2),T=t=>{var e=ia();yr(e,23,()=>n().children,(t,e)=>e+t.id,(t,e)=>{sa(t,{get menu(){return Ai(e)},get originalId(){return a()},onclose:Jn})}),q(e),Gi(t,e)};vr(k,t=>{n().children&&n().children.length&&t(T)}),q(g),Ue(t=>{as(g,"data-title",t),v=qr(g,1,"micrio-menu",null,v,{opened:Ai(p)})},[()=>Ai(u)?.title?.toLowerCase()]),Gi(t,g),it(),s()}zi(["click"]);var na=Wi('<img alt="Icon" class="micrio-button"/>'),aa=Wi("<!><!>",1);function oa(t,e){et(e,!0);let i=ys(e,"type",3,void 0),r=ys(e,"icon",3,void 0),s=ys(e,"title",3,null),n=ys(e,"disabled",3,!1),a=ys(e,"active",3,!1),o=ys(e,"className",3,""),c=ys(e,"href",3,void 0),l=ys(e,"blankTarget",3,!1),h=ys(e,"noClick",3,!1);var d=ji();Fr(xe(d),()=>c()?"a":"button",!1,(t,d)=>{var u=t=>e.onclick?.(t),m=t=>e.onfocus?.(t),f=t=>e.onpointerdown?.(t);cs(t,()=>({href:c(),target:l()?"_blank":void 0,disabled:!!n()||void 0,title:s(),"aria-label":s(),role:c()?void 0:"button",tabindex:c()?void 0:0,class:`micrio-button ${i()??""??""} ${o()??""}`,onclick:u,onfocus:m,onpointerdown:f,[Hr]:{active:a(),"no-click":h()}}),void 0,void 0,void 0,"micrio-button");var p=aa(),v=xe(p),w=t=>{Hn(t,{get name(){return i()}})},b=t=>{var e=na();Ue(()=>as(e,"src",r().src)),Gi(t,e)};vr(v,t=>{i()?t(w):r()&&t(b,1)}),fr(Ee(v),()=>e.children??g),Gi(d,p)}),Gi(t,d),it()}var ca=Wi("<menu><!> <!> <!></menu> <!>",1);function la(t,e){et(e,!0);const i=()=>kt(l,"$current",s),r=()=>kt(h,"$_lang",s),[s,n]=_t();let a=ne(void 0);const o=Q("micrio"),{state:c,current:l,_lang:h,spaceData:d}=o,{tour:u,marker:m,popover:f}=c;let p=ne(!1),g=ne(!1);const v=i().id;let w=ne(void 0),b=ne(window.innerWidth<=500);const y=()=>oe(b,window.innerWidth<=500),k=()=>{Ai(b)&&oe(p,!1)},T=Ht(()=>!!kt(u,"$tour",s)||!!kt(m,"$marker",s)||!!kt(f,"$popover",s)),_=Ht(()=>(Ai(a)?.markerTours??[]).concat(d?.markerTours??[])),x=Ht(()=>Ai(_)?.length>0),E=Ht(()=>Ai(a)?.tours&&Ai(a)?.tours?.length>0),S=Ht(()=>Ai(x)&&Ai(E)),A=Ht(()=>!(Ai(w)?.length||Ai(x)||Ai(E))),M=[],I=(t,e)=>("title"in t?t.title:t.i18n?.[e]?.title)??"(Untitled)";pr(()=>{const t=o.current.subscribe(t=>{if(t){for(;M.length;)M.shift()?.();en(t.info).then(()=>oe(g,!t.$settings.noLogo)),M.push(t.data.subscribe(t=>{oe(a,t,!0),Si().then(()=>{if(!t?.pages)return;Ai(w)||oe(w,t.pages?.filter(t=>!t.id?.startsWith("_")),!0);const e=t.pages?.filter(t=>t.id?.startsWith("_"));e.length&&oe(w,[...Ai(w)?.filter(t=>!t.id?.startsWith("_"))??[],...e],!0)})}))}});return window.addEventListener("resize",y),()=>{for(window.removeEventListener("resize",y);M.length;)M.shift()?.();t()}});var $=ji(),P=xe($),L=t=>{var e=ca(),n=xe(e);let c;var l=_e(n),h=t=>{var e=ji();yr(xe(e),17,()=>Ai(w),t=>t.id,(t,e)=>{sa(t,{get menu(){return Ai(e)},get originalId(){return v},onclose:k})}),Gi(t,e)};vr(l,t=>{Ai(w)&&t(h)});var d=Ee(l,2),m=t=>{{let e=Ht(()=>({id:js(),i18n:{[r()]:{title:Ai(S)?"Marker tours":"Tours"}},children:Ai(_).map(t=>({id:js(),i18n:{[r()]:{title:I(t,r())}},action:()=>{t.initialStep=0,u.set(t)}}))}));sa(t,{onclose:k,get menu(){return Ai(e)}})}};vr(d,t=>{Ai(x)&&t(m)});var f=Ee(d,2),y=t=>{{let e=Ht(()=>({id:js(),i18n:{[r()]:{title:Ai(S)?"Video tours":"Tours"}},children:Ai(a)&&Ai(a).tours?Ai(a).tours.map(t=>({id:js(),i18n:{[r()]:{title:I(t,r())}},action:()=>{i()&&i().id!=v&&o.open(v),u.set(t)}})):[]}));sa(t,{onclose:k,get menu(){return Ai(e)}})}};vr(f,t=>{Ai(E)&&t(y)}),q(n);var A=Ee(n,2),M=t=>{{let e=Ht(()=>Ai(p)?"close":"ellipsis-vertical"),i=Ht(()=>"toggle transparent"+(Ai(g)?" indent":""));oa(t,{get title(){return kt(Wn,"$i18n",s).menuToggle},get type(){return Ai(e)},get className(){return Ai(i)},onclick:()=>oe(p,!Ai(p))})}};vr(A,t=>{Ai(b)&&t(M)}),Ue(()=>c=qr(n,1,"micrio-toolbar micrio-toolbar",null,c,{shown:!Ai(T)&&Ai(p),indent:Ai(g)})),Rr(3,n,()=>Fn,()=>({duration:200})),Gi(t,e)};vr(P,t=>{Ai(A)||Ai(T)||t(L)}),Gi(t,$),it(),n()}var ha=Wi("<canvas></canvas>");function da(t,e){et(e,!0);const[i,r]=_t(),s=Q("micrio"),{current:n}=s;s.canvas.viewport;const a=e.image.$info,o=e.image.camera,c=e.image.$settings,l=c.minimapWidth??200,h=c.minimapHeight??160,d=!c.alwaysShowMinimap,u=!!c.noControls,m=a.width/a.height,f=l/m>h?Math.round(h*m):l,p=l/m<=h?Math.round(l/m):h;let g,v=ne(void 0),w=ne(!1),b=ne(ue(!a.is360&&o.isZoomedOut()));function y(t){if(!t||!g)return;M();const i=sn.toCenterJSON(t);if(g.clearRect(0,0,f,p),e.image.thumbSrc?(g.globalCompositeOperation="source-over",g.fillStyle="rgba(0,0,0,.5)",g.fillRect(0,0,f,p),g.globalAlpha=1,g.globalCompositeOperation="destination-out"):(g.fillStyle="rgba(0,0,0,.5)",g.fillRect(0,0,f,p)),g.beginPath(),g.fillStyle="white",a.is360){const e=function(t){const e=[];let{centerX:i,centerY:r,width:s,height:n}=sn.toCenterJSON(t);i=(i%1+1)%1;let a=i-s/2,o=i+s/2;const c=Math.max(0,r-n/2),l=Math.min(1,r+n/2);return a<0?(e.push({x:a+1,y:c,width:1-(a+1),height:l-c}),e.push({x:0,y:c,width:o,height:l-c})):o>1?(e.push({x:a,y:c,width:1-a,height:l-c}),e.push({x:0,y:c,width:o-1,height:l-c})):e.push({x:a,y:c,width:o-a,height:l-c}),e}(t);for(const t of e)g.rect(Math.floor(t.x*f),Math.floor(t.y*p),Math.ceil(t.width*f),Math.ceil(t.height*p))}else oe(b,o.isZoomedOut(),!0),g.rect(Math.floor((i.centerX-i.width/2)*f),Math.floor((i.centerY-i.height/2)*p),Math.ceil(i.width*f),Math.ceil(i.height*p));e.image.thumbSrc&&(g.fill(),g.globalCompositeOperation="source-over"),g.stroke()}const k=-1!=navigator.userAgent.indexOf("Firefox");let T,_=ne(!1);let x,E=ne(void 0);function S(t){if(T){const e=Math.max(0,Math.min(1,(t.clientX-T.left)/T.width)),i=Math.max(0,Math.min(1,(t.clientY-T.top)/T.height));if(Ai(E)){const t=[e-Ai(E).width/2,i-Ai(E).height/2,Ai(E).width,Ai(E).height];o.setView(t)}else o.setCoo(e,i)}}function A(){window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",A),oe(_,!1),oe(E,void 0)}function M(){oe(w,!1),clearTimeout(x),x=setTimeout(()=>oe(w,!0),2500)}const I=.5-e.image.camera.trueNorth,$=self.crossOriginIsolated;let P=ne(ue($?void 0:e.image.thumbSrc));const L={passive:!0};let C=ne(!1);pr(()=>{let t;g=Ai(v).getContext("2d"),g&&(g.lineWidth=1,g.strokeStyle="white"),$&&e.image.thumbSrc&&fetch(e.image.thumbSrc).then(t=>t.blob()).then(e=>oe(P,t=URL.createObjectURL(e),!0)),s.canvas.element.addEventListener("mousemove",M,L);const i=e.image.state.view.subscribe(y);return setTimeout(()=>oe(C,!0),10),()=>{t&&URL.revokeObjectURL(t),s.canvas.element.removeEventListener("mousemove",M,L),A(),i()}});const R=Ht(()=>Ai(P)?`background-image: url('${Ai(P)}')`+(0!=I?`;background-position-x:${f*I}px`:""):null);var D=ha();let F;gs(D,t=>oe(v,t),()=>Ai(v)),Ue(()=>{as(D,"width",f),as(D,"height",p),Yr(D,Ai(R)),F=qr(D,1,"micrio-minimap",null,F,{hidden:!Ai(C)||kt(n,"$current",i)!=e.image||d&&(Ai(b)||Ai(w)),dragging:Ai(_),controls:!u})}),Fi("wheel",D,function(t){o.zoom(t.deltaY*(k?50:1))}),Oi("mousedown",D,function(t){if(0!=t.button)return;window.addEventListener("mousemove",S),window.addEventListener("mouseup",A),T=Ai(v).getClientRects()[0];const e=o.getView();e&&oe(E,{width:e[2],height:e[3]},!0),S(t),oe(_,!0)}),Gi(t,D),it(),r()}zi(["mousedown"]);var ua=Wi("<div><!></div>");function ma(t,e){let i=ys(e,"className",3,"");var r=ua();fr(_e(r),()=>e.children??g),q(r),Ue(()=>qr(r,1,Vr(i()),"micrio-button-group")),Gi(t,r)}function fa(t,e){et(e,!0);const[i,r]=_t(),s="requestFullscreen"in e.el,n="webkitRequestFullscreen"in e.el,a=Q("micrio"),o=()=>s?document.fullscreenElement:document.webkitFullscreenElement??null;let c=ne(o()===e.el);const l=s||n&&!o(),h=()=>new Promise(t=>setTimeout(t,500));let d;function u(){Ai(c)?async function(){s?(await document.exitFullscreen().then(h),d&&d instanceof HTMLElement&&d.requestFullscreen(),d=void 0):"webkitExitFullscreen"in document&&document.webkitExitFullscreen()}():async function(){s?(d=o(),Js.safari&&d&&await document.exitFullscreen().then(h),e.el.requestFullscreen()):"webkitRequestFullscreen"in e.el&&e.el.webkitRequestFullscreen()}()}const m=e.el==a&&!a.events.scrollHooked,f=()=>{oe(c,o()===e.el),m&&(Ai(c)?a.events.hookScroll():a.events.unhookScroll())};l&&pr(()=>{const t=s?"fullscreenchange":"webkitfullscreenchange";return document.addEventListener(t,f),()=>document.removeEventListener(t,f)});var p=ji(),g=xe(p),v=t=>{{let e=Ht(()=>Ai(c)?"minimize":"maximize");oa(t,{get type(){return Ai(e)},get title(){return kt(Wn,"$i18n",i).fullscreenToggle},onclick:u})}};vr(g,t=>{l&&t(v)}),Gi(t,p),it(),r()}var pa=Wi("<!> <!>",1);function ga(t,e){et(e,!0);const i=()=>kt(Wn,"$i18n",r),[r,s]=_t();let n=ys(e,"image",15,void 0);const a=Q("micrio");let o=ne(!1),c=ne(!1),l=ne(!1),h=ne(!1);const d=()=>{a.events.clicked=!0},u=()=>{d(),n()?.camera.zoomIn().then(()=>a.events.clicked=!1)},m=()=>{d(),n()?.camera.zoomOut().then(()=>a.events.clicked=!1)};function f(){oe(o,n()?.camera.isZoomedIn()??!0,!0),oe(c,n()?.camera.isZoomedOut(!0)??!0,!0);const t=n()?.camera.getMinScale()??0;oe(l,t>1&&t>(n()?.$settings.zoomLimit??1),!0)}let p,g;pr(()=>(n()?p=n().state.view.subscribe(f):g=a.current.subscribe(t=>{p&&(p(),p=void 0),oe(h,!0),n(t)?en(t.info).then(()=>{n()&&(p=n().state.view.subscribe(f)),oe(h,!1)}):oe(h,!1)}),()=>{g&&g(),p&&p()}));var v=ji(),w=xe(v),b=t=>{var e=pa(),r=xe(e);{let t=Ht(()=>Ai(h)||Ai(o));oa(r,{type:"zoom-in",get title(){return i().zoomIn},get disabled(){return Ai(t)},onclick:u})}var s=Ee(r,2);{let t=Ht(()=>Ai(h)||Ai(c));oa(s,{type:"zoom-out",get title(){return i().zoomOut},get disabled(){return Ai(t)},onclick:m})}Gi(t,e)};vr(w,t=>{Ai(l)||Ai(o)&&Ai(c)||t(b)}),Gi(t,v),it(),s()}var va=Wi('<menu class="popout micrio-controls"><!> <!></menu>'),wa=Wi("<!> <!> <!>",1),ba=Wi("<!> <!>",1),ya=Wi("<aside><!></aside>"),ka=Wi('<aside class="micrio-controls"><!> <!></aside> <!>',1);function Ta(t,e){et(e,!0);const i=()=>kt(m,"$current",l),r=()=>kt(Ai(T),"$info",l),s=()=>kt(g,"$_lang",l),n=()=>kt(v,"$tour",l),a=()=>kt(y,"$zoom",l),o=()=>kt(p,"$isMuted",l),c=()=>kt(Wn,"$i18n",l),[l,h]=_t();let d=ys(e,"hasAudio",3,!1);const u=ue(Q("micrio")),{current:m,state:f,isMuted:p,_lang:g}=u,{tour:v,popup:w}=f,{controls:b,zoom:y,hidden:k}=u.state.ui,T=Ht(()=>i()?.info),_=Ht(()=>r()&&i()?i().isV5?Object.keys(r().revision??{[s()]:0}):("cultures"in r()?r().cultures:"")?.split(",")??[]:[]),x=Ht(()=>n()&&"steps"in n()&&n().isSerialTour);function E(){if(navigator.share&&i()?.$info){const t=i().$data?i().$data?.i18n?i().$data.i18n[s()]:i().$data:void 0;navigator.share({title:i().$info?.title,text:t?.description||`${i().$info.width} x ${i().$info.height} | Micrio`,url:location.href})}}let S=ne(null),A=ne(!1);function M(t){const e=t.detail;oe(A,u.canvas.viewport.portrait,!0),e.opts.isPassive||oe(S,e,!0)}function I(){oe(S,null)}let $=ne(!1),P=ne(!1),L=ne(!1);function C(t){y.set(!t.noZoom),b.set(!t.noControls),oe($,!!t.ui?.controls?.cultureSwitch),oe(P,!!t.social),oe(L,!!t.fullscreen)}i()&&C(i().$settings),pr(()=>{let t;u.addEventListener("splitscreen-start",M),u.addEventListener("splitscreen-stop",I);const e=u.current.subscribe(e=>{e&&en(e.info).then(i=>{!i||n()&&"steps"in n()||(t?.(),t=e.settings.subscribe(C))})});return()=>{u.removeEventListener("splitscreen-start",M),u.removeEventListener("splitscreen-stop",I),t?.(),e()}});const R=Ht(()=>"micrioAudioContext"in window||d()),D=Ht(()=>Ai($)&&Ai(_).length>1),F=Ht(()=>Ai(P)&&"share"in navigator),O=Ht(()=>Ai(L)&&!Ai(x)),z=Ht(()=>kt(b,"$controls",l)&&!kt(k,"$hidden",l)&&(Ai(R)||Ai(D)||Ai(F)||a()||Ai(O))),N=Ht(()=>kt(w,"$popup",l)&&u.canvas.$isMobile);var V=ji(),U=xe(V),B=t=>{var e=ka(),i=xe(e),r=_e(i),n=t=>{var e=wa(),i=xe(e),r=t=>{{let e=Ht(()=>o()?"volume-off":"volume-up"),i=Ht(()=>o()?c().audioUnmute:c().audioMute);oa(t,{get type(){return Ai(e)},get title(){return Ai(i)},onclick:()=>p.set(!o())})}};vr(i,t=>{Ai(R)&&t(r)});var n=Ee(i,2),a=t=>{var e=va(),i=_e(e);oa(i,{get title(){return c().switchLanguage},type:"a11y"}),yr(Ee(i,2),17,()=>Ai(_),wr,(t,e)=>{{let i=Ht(()=>Xn?.of(Ai(e))??Ai(e)),r=Ht(()=>Ai(e)==s());oa(t,{onclick:()=>u.lang=Ai(e),get title(){return Ai(i)},get active(){return Ai(r)},children:(t,i)=>{X();var r=Yi();Ue(t=>nr(r,t),[()=>Ai(e).toUpperCase()]),Gi(t,r)},$$slots:{default:!0}})}}),q(e),Gi(t,e)};vr(n,t=>{Ai(D)&&t(a)});var l=Ee(n,2),h=t=>{oa(t,{type:"share",get title(){return c().share},onclick:E})};vr(l,t=>{Ai(F)&&t(h)}),Gi(t,e)};vr(r,t=>{Ai(N)||t(n)}),ma(Ee(r,2),{children:(t,e)=>{var i=ba(),r=xe(i),s=t=>{var e=ji(),i=xe(e),r=t=>{ga(t,{get image(){return Ai(S)}})},s=t=>{ga(t,{})};vr(i,t=>{Ai(S)?t(r):t(s,-1)}),Gi(t,e)};vr(r,t=>{a()&&!Ai(N)&&t(s)});var n=Ee(r,2),o=t=>{fa(t,{get el(){return u}})};vr(n,t=>{Ai(O)&&t(o)}),Gi(t,i)},$$slots:{default:!0}}),q(i);var l=Ee(i,2),h=t=>{var e=ya();let i;ma(_e(e),{children:(t,e)=>{ga(t,{})},$$slots:{default:!0}}),q(e),Ue(()=>i=qr(e,1,"primary micrio-controls",null,i,{portrait:Ai(A)})),Rr(3,e,()=>Fn),Gi(t,e)};vr(l,t=>{a()&&Ai(S)&&t(h)}),Gi(t,e)};vr(U,t=>{Ai(z)&&t(B)}),Gi(t,V),it(),h()}var _a=class{constructor(t,e){this.image=t,this.data=e,this.timeline=[],this._paused=!0,this.playing=!1,this.wasPaused=!1,this.unhookEvents=!1,this.micrio=t.wasm.micrio;const i="timeline"in e?e:e.i18n?.[wt(this.micrio._lang)]??void 0;if(!i)throw new Error("No valid content for video tour!");this.content=i,this.unhookEvents=!e.keepInteraction&&this.micrio.events.$enabled,e.instance=this,this.read(),this.micrio.events.dispatch("videotour-start",this.data)}destroy(){this.unhookEvents&&this.micrio.events.enabled.set(!0),this.playing&&(this.image.camera.stop(),this.micrio.removeAttribute("data-videotour-playing"),this.micrio.events.dispatch("videotour-stop",this.data),this.playing=!1,delete this.startedAt,delete this.data.instance,this.startAt=void 0,clearTimeout(this._to))}read(){const t=this.data.i18n?1:this.content.duration,e=this.content.timeline;this.timeline.length=0;for(let i=0;i<e.length;i++){const r=e[i],s=e[i-1],n=s?s.end*t:0;this.timeline.push({view:this.data.isLegacy?sn.fromLegacy(r.rect):r.rect,start:1e3*n,duration:1e3*(r.start*t-n),pauseDuration:(r.end-r.start)*t*1e3})}this.startedAt&&!this.playing&&(this.progress=this.currentTime)}get duration(){return Number(this.content.duration)}set duration(t){this.content.duration=t}get paused(){return this._paused}get ended(){return this.currentTime>=this.duration}get currentTime(){return(this.pausedAt?this.pausedAt:this.startedAt?Date.now()-this.startedAt:0)/1e3}set currentTime(t){this.setProgress(t/this.content.duration)}get progress(){return this.currentTime/this.content.duration}set progress(t){this.setProgress(t)}play(){this.startedPlaying(),this.wasPaused=!1,this.pausedAt?(this.startedAt=Date.now()-this.pausedAt,this._paused=!1,this.gotoTime(this.pausedAt),this.pausedAt=void 0):this.playing||(this.startedAt=Date.now(),void 0===this.startAt?this.gotoStep(0,0):this.gotoTime(this.duration*this.startAt*1e3),this.startAt=void 0),this._paused=!1,this.playing=!0}pause(){this._paused||null==this.currentIndex||null==this.startedAt||(this._paused=!0,this.stoppedPlaying(),clearTimeout(this._to),this.currentIndex>=0&&this.image.camera.stop(),this.ended?this.reset():this.pausedAt=Date.now()-this.startedAt)}reset(){this.stoppedPlaying(),this.pausedAt=void 0,this.playing=!1,this.read()}gotoStep(t,e){if(null==this.startedAt)return;if(clearTimeout(this._to),!this.timeline[t]){if(!this.paused||!this.wasPaused){const t=Math.max(0,Math.round(1e3*this.duration-(Date.now()-this.startedAt)));this._to=setTimeout(()=>this.pause(),t)}return}const i=this.timeline[t],r=Math.round(i.start-(Date.now()-this.startedAt));this.currentIndex=t,this.image.camera.stop(),r>0?this._paused||(this._to=setTimeout(()=>this.startAni(e),r)):this.startAni(e)}nextStep(){null!=this.currentIndex&&this.gotoStep(this.currentIndex+1)}getView(t){return this.timeline[t]?.view}startAni(t=0){if(null==this.currentIndex||isNaN(t))return;const e=this.timeline[this.currentIndex];if(null==e)return;const i=sn.toCenterJSON(e.view),r=this.getView(this.currentIndex-1),s=r?sn.toCenterJSON(r):void 0,n=this.image.opts?.area;if(this.wasPaused&&s){const e=this.micrio.wasm.ease(t),r={centerX:s.centerX*(1-e)+i.centerX*e,centerY:s.centerY*(1-e)+i.centerY*e,width:s.width*(1-e)+i.width*e,height:s.height*(1-e)+i.height*e};this.image.camera.setView([r.centerX-r.width/2,r.centerY-r.height/2,r.width,r.height],{noLimit:!0,area:n}),this.nextStep()}else this.image.camera.flyToView(e.view,{duration:e.duration,progress:t,prevView:s?[s.centerX-s.width/2,s.centerY-s.height/2,s.width,s.height]:void 0,area:n}).then(()=>{null!=this.currentIndex&&e==this.timeline[this.currentIndex]&&this.nextStep()}).catch(()=>{})}startedPlaying(){this.micrio.setAttribute("data-videotour-playing",""),this.micrio.events.dispatch("videotour-play"),this.unhookEvents&&this.micrio.events.enabled.set(!1)}stoppedPlaying(){this.micrio.removeAttribute("data-videotour-playing"),this.micrio.events.dispatch("videotour-pause"),this.unhookEvents&&this.micrio.events.enabled.set(!0)}setProgress(t){t=Math.max(0,Math.min(1,t)),this.wasPaused=!!this.paused||!this.playing,this.pause(),this.wasPaused||(this._paused=!1,this.startedPlaying());const e=this.duration*t*1e3;this.pausedAt=e,this.gotoTime(e),this.wasPaused?this.pause():(this.pausedAt=void 0,this._paused=!1)}gotoTime(t){let e=null,i=0;for(;i<this.timeline.length&&!(this.timeline[i].start>t);i++)e=this.timeline[i];if(i--,e||!(i>0))if(e){this.image.camera.stop();const r=e.duration>0?(t-e.start)/e.duration:0;this.startedAt=Date.now()-e.start-e.duration*r,isNaN(this.startedAt)&&(this.startedAt=Date.now()-t),r>1?(this.gotoStep(i+1),null!=e.view&&this.image.camera.setView(e.view,{noLimit:!0})):(i>0&&this.image.camera.setView(this.timeline[i-1].view,{noLimit:!0}),this.gotoStep(i,r))}else this.timeline.length&&this.image.camera.stop(),this.paused||this.gotoStep(0)}};window.MicrioVideoTour=_a;var xa={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},Ea=class{constructor(t,e,i={}){this.frame=t,this.config=e,this.callbacks=i,this.requiresTimeTick=!0,this.destroyed=!1}async initialize(){if("YT"in window||await tn("https://i.micr.io/youtube.js","onYouTubeIframeAPIReady"),!("YT"in window))throw new Error("Failed to load YouTube API");return new Promise((t,e)=>{this.player=new window.YT.Player(this.frame,{host:$n,width:this.config.width.toString(),height:this.config.height.toString(),playerVars:{controls:0},events:{onError:()=>{this.callbacks.onError?.(new Error("YouTube player error")),e(new Error("YouTube player error"))},onReady:()=>{this.destroyed?e(new Error("Player destroyed during initialization")):(this.callbacks.onReady?.(),this.callbacks.onDurationChange?.(this.player.getDuration()),t())},onStateChange:t=>this.handleStateChange(t.data)}})})}handleStateChange(t){switch(t){case xa.UNSTARTED:this.callbacks.onBlocked?.(),this.callbacks.onPause?.();break;case xa.ENDED:this.callbacks.onEnded?.();break;case xa.PLAYING:this.callbacks.onPlay?.(),this.callbacks.onSeeked?.();break;case xa.PAUSED:this.callbacks.onPause?.();break;case xa.BUFFERING:this.callbacks.onBuffering?.(),this.callbacks.onSeeking?.()}}async play(){this.player?.playVideo()}pause(){this.destroyed||this.player?.pauseVideo?.()}async getCurrentTime(){return this.player?.getCurrentTime?.()??0}setCurrentTime(t){this.callbacks.onSeeking?.(),this.player?.seekTo?.(t)}async getDuration(){return this.player?.getDuration?.()??0}async isPaused(){if(!this.player)return!0;const t=this.player.getPlayerState?.();return void 0===t||[xa.UNSTARTED,xa.ENDED,xa.PAUSED].includes(t)}setMuted(t){t?this.player?.mute?.():this.player?.unMute?.()}setVolume(t){}destroy(){this.destroyed=!0,this.player?.destroy?.(),this.player=void 0}},Sa=class{constructor(t,e,i={}){this.frame=t,this.config=e,this.callbacks=i,this.requiresTimeTick=!1,this.destroyed=!1}async initialize(){if("Vimeo"in window||await tn("https://i.micr.io/vimeo.min.js"),!("Vimeo"in window))throw new Error("Failed to load Vimeo API");return new Promise((t,e)=>{this.player=new window.Vimeo.Player(this.frame,{width:this.config.width.toString(),height:this.config.height.toString(),title:!1,autoplay:!1});const i=this.player;i.on("error",()=>{this.callbacks.onError?.(new Error("Vimeo player error")),e(new Error("Vimeo player error"))}),i.on("loaded",()=>{this.destroyed?e(new Error("Player destroyed during initialization")):i.getVolume().then(()=>{this.callbacks.onReady?.(),t()})}),i.on("play",()=>{this.callbacks.onPlay?.(),this.callbacks.onSeeked?.()}),i.on("bufferstart",()=>{this.callbacks.onBuffering?.(),this.callbacks.onSeeking?.()}),i.on("seeked",()=>{this.callbacks.onSeeked?.()}),i.on("pause",()=>{this.callbacks.onPause?.()}),i.on("timeupdate",t=>{t&&(this.callbacks.onDurationChange?.(t.duration),this.callbacks.onTimeUpdate?.(t.seconds))}),i.on("ended",()=>{this.callbacks.onEnded?.()})})}async play(){this.player?.play()}pause(){this.player?.pause()}async getCurrentTime(){return await(this.player?.getCurrentTime?.())??0}setCurrentTime(t){this.player?.setCurrentTime?.(t)}async getDuration(){return await(this.player?.getDuration?.())??0}async isPaused(){return await(this.player?.getPaused?.())??!0}setMuted(t){this.player?.setVolume?.(t?0:1)}setVolume(t){this.player?.setVolume?.(Math.max(0,Math.min(1,t)))}destroy(){if(this.destroyed=!0,this.player){for(const t of["error","loaded","play","bufferstart","seeked","pause","volumechange","timeupdate","ended"])this.player.off(t);this.player.destroy(),this.player=void 0}}},Aa=class{constructor(t,e={}){this.element=t,this.callbacks=e,this.requiresTimeTick=!1,this.attachEventListeners()}attachEventListeners(){const t=this.element,e=this.callbacks;e.onPlay&&t.addEventListener("play",e.onPlay),e.onPause&&t.addEventListener("pause",e.onPause),e.onEnded&&t.addEventListener("ended",e.onEnded),e.onSeeking&&t.addEventListener("seeking",e.onSeeking),e.onSeeked&&t.addEventListener("seeked",e.onSeeked),e.onTimeUpdate&&t.addEventListener("timeupdate",()=>e.onTimeUpdate?.(t.currentTime)),e.onDurationChange&&t.addEventListener("durationchange",()=>e.onDurationChange?.(t.duration)),e.onError&&t.addEventListener("error",()=>e.onError?.(new Error("Media playback error"))),e.onReady&&t.addEventListener("canplay",e.onReady)}async play(){try{await this.element.play()}catch(t){throw t instanceof Error&&!/pause\(\)/.test(t.message)&&this.callbacks.onBlocked?.(),t}}pause(){this.element.pause()}async getCurrentTime(){return this.element.currentTime}setCurrentTime(t){this.element.currentTime=t}async getDuration(){return this.element.duration}async isPaused(){return this.element.paused}setMuted(t){this.element.muted=t}setVolume(t){this.element.volume=Math.max(0,Math.min(1,t))}destroy(){const t=this.element,e=this.callbacks;e.onPlay&&t.removeEventListener("play",e.onPlay),e.onPause&&t.removeEventListener("pause",e.onPause),e.onEnded&&t.removeEventListener("ended",e.onEnded),e.onSeeking&&t.removeEventListener("seeking",e.onSeeking),e.onSeeked&&t.removeEventListener("seeked",e.onSeeked)}},Ma=class{constructor(t,e,i={}){this.element=t,this.hlsSrc=e,this.callbacks=i,this.requiresTimeTick=!1,this.destroyed=!1}async initialize(){if("Hls"in window||await tn("https://r2.micr.io/hls-1.6.15.min.js",void 0,"Hls"in window?{}:void 0),!("Hls"in window))throw new Error("Failed to load HLS.js");if(this.destroyed)throw new Error("Adapter destroyed during initialization");const t=new window.Hls({abrEwmaDefaultEstimate:1e7,abrEwmaDefaultEstimateMax:5e7});this.hls=t,t.loadSource(this.hlsSrc),t.attachMedia(this.element),this.html5Adapter=new Aa(this.element,this.callbacks),this.callbacks.onReady?.()}async play(){return this.html5Adapter?.play()}pause(){this.html5Adapter?.pause()}async getCurrentTime(){return this.html5Adapter?.getCurrentTime()??Promise.resolve(0)}setCurrentTime(t){this.html5Adapter?.setCurrentTime(t)}async getDuration(){return this.html5Adapter?.getDuration()??Promise.resolve(0)}async isPaused(){return this.html5Adapter?.isPaused()??Promise.resolve(!0)}setMuted(t){this.html5Adapter?.setMuted(t)}setVolume(t){this.html5Adapter?.setVolume(t)}destroy(){this.destroyed=!0,this.html5Adapter?.destroy(),this.hls?.destroy(),this.hls=void 0,this.html5Adapter=void 0}},Ia="micrio-captions-disable",$a=vt("1"!=localStorage.getItem(Ia));$a.subscribe(t=>{t?localStorage.removeItem(Ia):localStorage.setItem(Ia,"1")});var Pa=Wi('<div><p class="micrio-subtitles"> </p></div>');function La(t,e){et(e,!0);const[i,r]=_t();let s=ys(e,"raised",3,!1);const n=ue([]);fetch(e.src).then(t=>t.text()).then(t=>{const e=t.split("\n");for(let i=0;i<e.length;i++)if(/-->/.test(e[i])){let t=i+1;const r=[];for(;!e[t]&&t<e.length;)t++;for(;e[t]&&e[t].trim();)r.push(e[t++]);const[s,a]=e[i].split(" --\x3e ").map(t=>t.trim().replace(",",".").split(":").map(Number)).map(t=>3===t.length?3600*t[0]+60*t[1]+t[2]:2===t.length?60*t[0]+t[1]:0);n.push({start:s,end:a,data:r.join("\n")}),i+=r.length+1}}).catch(t=>console.error("Subtitles: fetch error:",t));const a=Q("micrio");let o=ne(0);const c=t=>oe(o,t.detail,!0);pr(()=>(a.addEventListener("timeupdate",c),()=>a.removeEventListener("timeupdate",c)));const l=Ht(()=>n.filter(t=>t.start<=Ai(o)&&t.end>=Ai(o)));var h=ji(),d=xe(h),u=t=>{var e=ji();yr(xe(e),16,()=>Ai(l),t=>t,(t,e)=>{var i=Pa();let r;var n=_e(i),a=_e(n,!0);q(n),q(i),Ue(()=>{r=qr(i,1,"micrio-subtitles",null,r,{raised:s()}),nr(a,e.data)}),Rr(3,i,()=>Fn),Gi(t,i)}),Gi(t,e)};vr(d,t=>{kt($a,"$captionsEnabled",i)&&t(u)}),Gi(t,h),it(),r()}var Ca=Wi('<div class="container micrio-progress-bar"><div class="bars micrio-progress-bar"><!></div> <div class="time micrio-progress-bar"> </div></div>');function Ra(t,e){et(e,!0);let i=ys(e,"ended",11,!1);var r=Ca(),s=_e(r);fr(_e(s),()=>e.children??g),q(s);var n=Ee(s,2),a=_e(n,!0);q(n),q(r),Ue((t,e)=>{Yr(r,t),nr(a,e)},[()=>`--progress: ${Math.round((e.currentTime??0)/e.duration*1e4)/100}%;--time: '${Hs(e.currentTime??0)}';`,()=>Hs(i()||!e.currentTime||e.currentTime<=0?e.duration:(e.currentTime??0)-e.duration)]),Oi("click",r,t=>t.stopPropagation()),Oi("keydown",r,t=>t.stopPropagation()),Gi(t,r),it()}zi(["click","keydown"]);var Da=Xi('<svg height="42" width="42" class="micrio-media-controls"><circle r="19" cx="21" cy="21" class="micrio-media-controls"></circle></svg>'),Fa=Wi("<!> <!> <!>",1),Oa=Wi('<div class="bar active"></div>'),za=Wi('<aside class="micrio-media-controls"><!> <!></aside> <!>',1);zi(["click","keydown","mousedown"]);var Na=Wi("<iframe></iframe>"),Va=Wi('<source type="video/mp4;codecs=hvc1"/>'),Ua=Wi("<!> <source/>",1),Ba=Wi('<video playsinline="" class="micrio-media"><!></video>',2),Wa=Wi("<audio></audio>"),qa=Wi("<micr-io></micr-io>",2),Xa=Wi("<aside><!></aside>"),Ya=Wi('<figcaption class="micrio-media"></figcaption>'),ja=Wi('<div class="show-play micrio-media"><!></div>'),Ga=Wi("<figure><div><!> <!> <!></div> <!></figure> <!>",1);function Ha(t,e){et(e,!0);const i=()=>kt(O,"$_lang",r),[r,s]=_t(),n=Q("micrio");let a=ys(e,"src",11,void 0),o=ys(e,"volume",15,1),c=ys(e,"width",3,640),l=ys(e,"height",3,380),h=ys(e,"frameScale",3,1),d=ys(e,"autoplay",15,!1),u=ys(e,"loop",3,!1),m=ys(e,"loopDelay",3,void 0),f=ys(e,"controls",15,!1),p=ys(e,"title",3,void 0),g=ys(e,"figcaption",3,null),v=ys(e,"paused",15,!0),w=ys(e,"forcePause",3,void 0),b=ys(e,"seeking",15,!0),y=ys(e,"duration",31,()=>-1),k=ys(e,"currentTime",15),T=ys(e,"is360",3,!1),_=ys(e,"tour",3,null),x=ys(e,"secondary",3,!1),E=ys(e,"fullscreen",3,void 0),S=ys(e,"className",3,null),A=ys(e,"hasTransparentH265",3,!1),M=ys(e,"noPlayOverlay",3,!1),I=ys(e,"uuid",15,""),$=ys(e,"image",19,()=>wt(n.current)),P=ys(e,"destroying",3,void 0),L=ys(e,"_media",15,void 0),C=ne(!1);I(I()+(a()??_()?.id));const R=$().$info,{events:D,state:F,_lang:O}=n,z=Q("volume"),N=0==kt(z,"$mainVolume",r),U=Q("srt"),B=Q("mediaPaused"),W=n.hasAttribute("data-native-frame"),X=function(t,e,i=!1,r=0){t=function(t){if(t)return/<iframe /.test(t)&&(t=t.replace(/^.* src="([^"]+)".*$/,"$1")),t.startsWith("video://")&&(t=t.replace("video:","https:")),t}(t);const s=t?.toLowerCase(),n={type:En.None,originalSrc:t,isCloudflare:!1};if(!t&&e)return n.type=En.VideoTour,n;if(!t||!s)return n;if(t.startsWith("cfvid://"))return n.isCloudflare=!0,n.cloudflareId=t.slice(8),n.hlsSrc=`https://videodelivery.net/${n.cloudflareId}/manifest/video.m3u8`,n.type=En.Video,n;if(s.endsWith(".mp3"))return n.type=En.Audio,n.src=t,n;if(s.endsWith(".mp4")||s.endsWith(".webm"))return n.type=En.Video,n.src=t,n;if(s.startsWith("micrio://"))return n.type=En.Micrio,n.micrioEmbed=t.slice(9).split(","),n;if(!i){const e=An.exec(t);if(e?.[5]){if("playlist"!==e[5]){n.type=En.IFrame,n.frameType=Sn.YouTube,n.youtubeId=e[5];const i=In.test(t)?Number(t.replace(In,"$1")):r;return n.startTime=Math.round(i),n.src=`${$n}/embed/${e[5]}?autoplay=0&enablejsapi=1&controls=0&start=${n.startTime}`,n}{const e=/list=([^&]+)/.exec(t);if(e?.[1])return n.type=En.IFrame,n.src=`${$n}/embed/videoseries?list=${e[1]}`,n}}if(Mn.test(t)){const e=t.match(/\/(\d+)/);if(e?.[1]){n.type=En.IFrame,n.frameType=Sn.Vimeo,n.vimeoId=e[1],n.vimeoToken=t.slice(t.indexOf(e[1])+e[1].length+1).replace(/\?.*$/,"")||void 0;const i=Math.round(r);return n.src=`https://player.vimeo.com/video/${e[1]}?${n.vimeoToken?`h=${n.vimeoToken}&`:""}title=0&portrait=0&sidedock=0&byline=0&controls=0#t=${i}s`,n}}}return s.startsWith("http")?(n.type=En.IFrame,n.src=t,n):n}(a(),_(),W,k()??0),{type:Y,frameType:j,isCloudflare:G,micrioEmbed:H,hlsSrc:Z}=X;let J,K=ne(ue(X.src??a()));Y==En.Micrio&&v(!1),(Y==En.Micrio||Y==En.IFrame&&!j)&&f(!1);let tt=-1,rt=ne(ue(j==Sn.YouTube||j==Sn.Vimeo));const st=Y==En.Audio&&Js.iOS;let nt,at=ne(void 0);const ot=F.mediaState.get(I());ot&&(k(ot.currentTime),d(!v(ot.paused))),F.mediaState.set(I(),{get currentTime(){return k()??0},set currentTime(t){At(t)},get paused(){return v()},set paused(t){t?bt():vt()}});let ct=ne(void 0);if(_()){const t=new _a($(),_());null!=k()&&k()>0&&(t.currentTime=k()),Y==En.VideoTour&&(y("duration"in _()?Number(_().duration):_().i18n?.[i()]?.duration??0),o(NaN)),oe(ct,t,!0)}const lt=_()&&!("steps"in _())?"subtitle"in _()?_().subtitle:_().i18n?.[n.lang]?.subtitle:void 0,ht=lt&&("fileUrl"in lt?lt.fileUrl:lt.src);let dt,ut=ne(!1),mt=ne(!1),ft=!1,pt=ne(!1);function gt(t){t&&"button"in t&&0!=t.button||(v()?vt():bt())}async function vt(t){if(!(t instanceof PointerEvent&&0!=t.button)&&(!ft||await async function(){return L()?L().paused:Ai(ct)?v():!!J&&J.isPaused()}())){switch(oe(mt,!1),y()>0&&null!=k()&&k()>=y()&&k(0),!x()&&ht&&U.set(ht),Y){case En.VideoTour:v(b(!1)),Ai(ct)?.play(),$t();break;case En.Audio:case En.Video:L()?.addEventListener("play",()=>{L()&&(isNaN(L().duration)?L().addEventListener("durationchange",yt,{once:!0}):yt())},{once:!0}),L()?.play().catch(t=>{M()?v(!0):/pause\(\)/.test(t.toString())||(oe(ut,!0),n.events.dispatch("media-blocked"),e.onblocked?.())});break;case En.IFrame:J?.play();break;default:return}ft=!0,D.dispatch("media-play"),B.set(!1),e.onplay?.(),T()||N||Ai(ct)&&!L()||z.set($().$settings.mutedVolume||0)}}function bt(){D.dispatch("media-pause"),B.set(!0),L()?(L().pause(),st&&v(!0)):Ai(ct)?(Ai(ct).pause(),v(!0),Pt()):J&&!Ai(Ft)&&J.pause()}function yt(){oe(ut,!1),v(!1),Ai(ct)&&L()&&(L().duration>Ai(ct).duration&&(Ai(ct).duration=L().duration),Ai(ct).currentTime=L().currentTime,Ai(ct).play())}function Tt(){b(!1),T()&&$()&&!$()._video&&$().video.set(L())}function xt(){Ai(mt)||(Ai(ct)?bt():(v(!0),Pt()),oe(mt,!0),D.dispatch("media-ended"),e.onended?.(),Dt())}function Et(t){L()?L(L().muted=t,!0):J&&J.setMuted(t)}function St(){oe(C,!Ai(C)),Et(Ai(C)),N||z.set(Ai(C)?1:$().$settings.mutedVolume||0)}function At(t){b(!0),L()?L(L().currentTime=t,!0):Ai(ct)?(k(Ai(ct).currentTime=t),b(!1)):J&&J.setCurrentTime(t)}function Mt(){Ai(ct)?(k(Ai(ct).currentTime),Ai(ct).ended&&xt()):J&&J.getCurrentTime().then(t=>{k(t)}),It()}function It(){x()||D.dispatch("timeupdate",k())}function $t(){tt>=0||(tt=setInterval(Mt,250),Mt())}function Pt(){clearInterval(tt),tt=-1}async function Lt(){if(G&&Z&&("MediaSource"in window||"ManagedMediaSource"in window)){const t=new Ma(L(),Z,{onReady:()=>b(!1),onEnded:xt});return await t.initialize(),void(J=t)}if(Y==En.IFrame&&Ai(at)){if(j==Sn.YouTube){const t=new Ea(Ai(at),{width:Ai(qt),height:Ai(Xt)},{onReady:()=>b(!1),onDurationChange:t=>y(t),onPlay:()=>{$t(),oe(pt,v(b(!1)),!0)},onPause:()=>{v(!0),Pt()},onEnded:xt,onBlocked:()=>{oe(pt,v(!0),!0),Pt()},onSeeking:()=>{Mt(),b(!0),Pt()}});return b(!0),await t.initialize(),void(J=t)}if(j==Sn.Vimeo){const t=new Sa(Ai(at),{width:Ai(qt),height:Ai(Xt)},{onReady:()=>b(!1),onPlay:()=>v(b(!1)),onPause:()=>v(!0),onSeeking:()=>b(!0),onSeeked:()=>b(!1),onTimeUpdate:t=>k(t),onDurationChange:t=>y(t),onEnded:xt});return b(!0),await t.initialize(),void(J=t)}}L()&&(G&&Z&&oe(K,Z,!0),function(){if(!L())return;L(L().ontimeupdate=It,!0),Ai(ct)&&(L(L().onpause=()=>{Rt=!!L()?.ended,L()?.ended||Ai(ct).pause()},!0),L(L().onseeked=()=>{!L()||L().ended||Rt||(Ai(ct).currentTime=L().currentTime,Ct&&(L().pause(),Ct=!1))},!0));null!=k()&&k()>0&&(L().duration>0?L(L().currentTime=k(),!0):L(L().oncanplay=()=>{L()&&(L(L().oncanplay=null,!0),d()||(L().play(),Ct=!0),L(L().currentTime=nt,!0))},!0));const t=u()&&void 0!==m()?m():-1;L(L().onended=t>=0?()=>{clearTimeout(dt),dt=setTimeout(()=>{w()||L()?.play()},1e3*t)}:xt,!0)}())}let Ct=!1,Rt=!1;function Dt(){N||z.set(1)}let Ft=ne(!1);const Ot=P()&&P().subscribe(t=>{t&&Nt()}),zt=()=>k(L()?.currentTime??0);function Nt(){Ai(Ft)||(oe(Ft,!0),Ot&&Ot(),T()&&$()&&$().video.set(void 0),F.mediaState.delete(I()),Pt(),bt(),Dt(),ht&&U.set(void 0),L()&&(L(L().onended=null,!0),st&&(L(L().onloadedmetadata=L(L().onplay=L(L().onseeking=L(L().onseeked=null,!0),!0),!0),!0),L().removeEventListener("timeupdate",zt)),L(L().ontimeupdate=L(L().onpause=L(L().onseeked=L(L().oncanplay=null,!0),!0),!0),!0)),Ai(ct)&&Ai(ct).destroy(),J&&(J.destroy(),J=void 0))}const Vt=Y==En.Video;let Ut=ne(ue(Vt&&G&&1!=h()&&Js.iOS));const Bt=R.is360?Math.PI/2:1,Wt=Ht(()=>Vt?h()*Bt:Y==En.IFrame?Math.max(h(),Math.min(c()/512,l()/512)):1),qt=Ht(()=>Vt?c():Math.round(c()/Ai(Wt)*Bt)),Xt=Ht(()=>Vt?l():Math.round(l()/Ai(Wt)*Bt));let Yt=ne(void 0),jt=ne(void 0);const Gt=Ht(()=>Ai(ct)&&_()?"events"in _()?_().events:_().i18n?.[i()]?.events??void 0:void 0);pr(()=>{e.onid?.(I()),a()&&st&&(L((xn||(xn=new Audio),xn)),L(L().controls=!1,!0),L(L().onloadedmetadata=()=>y(L()?.duration??0),!0),L(L().src=a(),!0),L(L().oncanplay=Tt,!0),L(L().onended=xt,!0),L().addEventListener("timeupdate",zt),L(L().onseeking=()=>b(!0),!0),L(L().onseeked=()=>b(!1),!0)),nt=k()||0,oe(rt,j==Sn.YouTube||j==Sn.Vimeo,!0),Lt().then(()=>{d()&&vt()}).catch(()=>{}),Ai(Ut)&&L()?.addEventListener("playing",()=>oe(Ut,!1),{once:!0});let t=!1;const i=n.isMuted.subscribe(e=>{t?(oe(C,e,!0),Et(e)):t=!0});return()=>{Nt(),i(),st&&L(void 0),J?.destroy()}}),Oe(()=>{void 0!==w()&&v(w())}),Oe(()=>{u()&&void 0!==m()&&clearTimeout(dt)});var Zt=ji(),Jt=xe(Zt),Kt=t=>{var e=Ga(),i=xe(e);let s;Yr(i,null);var n=_e(i);let a;var h=_e(n),w=t=>{var e=Na();cs(e,t=>({...t,title:p(),src:Ai(K),width:Ai(qt),height:Ai(Xt),frameborder:"0",allow:"fullscreen *;autoplay *;encrypted-media *",[Hr]:{hooked:Ai(rt)&&!Ai(pt)}}),[()=>({credentialless:!0})],void 0,void 0,"micrio-media"),gs(e,t=>oe(at,t),()=>Ai(at)),function(t){if(!V)return;t.removeAttribute("onload"),t.removeAttribute("onerror");const e=t.__e;void 0!==e&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}(e),Gi(t,e)},_=t=>{var e=Ba();e.controls=!1;var i=_e(e),r=t=>{var e=Ua(),i=xe(e),r=t=>{var e=Va();Ue(t=>as(e,"src",t),[()=>Ai(K).replace(".webm",".mp4")]),Gi(t,e)},s=Ht(()=>A()&&Ai(K).endsWith(".webm"));vr(i,t=>{Ai(s)&&t(r)});var n=Ee(i,2);Ue(()=>{as(n,"src",Ai(K)),as(n,"type",G?"application/x-mpegURL":void 0)}),Gi(t,e)};vr(i,t=>{Ai(K)&&t(r)}),q(e),gs(e,t=>L(t),()=>L()),Ue(()=>{e.loop=u()&&(null==m()||m()<=0),as(e,"width",c()),as(e,"height",l()),Yr(e,Ai(Ut)?"opacity: 0":void 0),e.muted=Ai(C),e.autoplay=!!d()}),Fi("canplay",e,Tt),Fi("ended",e,xt),vs("duration","durationchange",e,y),us(e,k),ms(e,b),fs(e,v),Gi(t,e)},x=t=>{var e=Wa();e.controls=!1,gs(e,t=>L(t),()=>L()),Ue(()=>{as(e,"src",Ai(K)),e.muted=Ai(C)}),Fi("canplay",e,()=>b(!1)),Fi("ended",e,xt),vs("duration","durationchange",e,y),us(e,k),ms(e,b),fs(e,v),Gi(t,e)},M=t=>{var e=qa();os(e,"data-logo","false"),Ue(()=>os(e,"id",H[0])),Ue(()=>os(e,"width",H[1])),Ue(()=>os(e,"height",H[2])),Ue(()=>os(e,"lang",H[3])),Ue(()=>os(e,"data-path",R.path)),Gi(t,e)};vr(h,t=>{Y==En.IFrame?t(w):Y==En.Video?t(_,1):Y!=En.Audio||st?Y==En.Micrio&&H&&t(M,3):t(x,2)});var I=Ee(h,2),$=t=>{!function(t,e){et(e,!0);let i=ys(e,"currentTime",11,0);const r=Q("micrio");e.events.forEach(t=>{t.start=Number(t.start||0),t.end=Math.min(Number(t.end||0),e.duration)});const s=t=>e.events.forEach(e=>{const i=e.start<=t&&e.end>=t;i!=!!e.active&&(e.active=i,r.events.dispatch("tour-event",{...e}))});Oe(()=>{s(i())}),gr(()=>s(1/0)),it()}(0,{get events(){return Ai(Gt)},get currentTime(){return k()},set currentTime(t){k(t)},get duration(){return y()},set duration(t){y(t)}})};vr(I,t=>{Ai(Gt)?.length&&y()>0&&!Ai(Ft)&&t($)});var P=Ee(I,2),D=t=>{var e=Xa();let i;var r=_e(e);{let t=Ht(()=>!!ht),e=Ht(()=>!isNaN(o())),i=Ht(()=>T()||Y!=En.IFrame&&Y!=En.Video?E():Ai(Yt));!function(t,e){et(e,!0);const i=()=>kt(Wn,"$i18n",s),r=()=>kt($a,"$captionsEnabled",s),[s,n]=_t();let a=ys(e,"currentTime",15),o=ys(e,"duration",11,0),c=ys(e,"seeking",11,!0),l=ys(e,"minimal",3,!1),h=ys(e,"ended",15),d=ys(e,"fullscreen",3,void 0),u=ys(e,"subtitles",3,!1),m=ys(e,"hasAudio",3,!0),f=ys(e,"muted",3,!1),p=ne(void 0);function g(t){0==t.button&&(window.addEventListener("mousemove",v),window.addEventListener("mouseup",w),v(t))}function v(t){const i=Ai(p).getClientRects()[0],r=Math.min(1,Math.max(0,(t.clientX-i.left)/i.width));e.onseek?.(r*o())}function w(){window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",w)}var b=za(),y=xe(b),k=_e(y);{let t=Ht(()=>e.paused?"play":"pause"),r=Ht(()=>e.paused?i().play:i().pause);oa(k,{get type(){return Ai(t)},get title(){return Ai(r)},get onclick(){return e.onplaypause},children:(t,e)=>{var i=ji(),r=xe(i),s=t=>{var e=Da(),i=_e(e);q(e),Ue(()=>as(i,"stroke-dashoffset",119.4*(1-a()/o()))),Gi(t,e)};vr(r,t=>{l()&&void 0!==a()&&a()>0&&t(s)}),Gi(t,i)},$$slots:{default:!0}})}var T=Ee(k,2),_=t=>{var s=Fa(),n=xe(s),a=t=>{{let r=Ht(()=>f()?"volume-off":"volume-up"),s=Ht(()=>f()?i().audioUnmute:i().audioMute);oa(t,{get disabled(){return c()},get type(){return Ai(r)},get title(){return Ai(s)},get onclick(){return e.onmute}})}};vr(n,t=>{m()&&t(a)});var o=Ee(n,2),l=t=>{{let e=Ht(()=>r()?"subtitles":"subtitles-off");oa(t,{get type(){return Ai(e)},get active(){return r()},get title(){return i().subtitlesToggle},onclick:()=>$a.set(!r())})}};vr(o,t=>{u()&&t(l)});var h=Ee(o,2),p=t=>{fa(t,{get el(){return d()}})};vr(h,t=>{d()&&t(p)}),Gi(t,s)};vr(T,t=>{l()||t(_)}),q(y);var x=Ee(y,2),E=t=>{Ra(t,{get duration(){return o()},get currentTime(){return a()},set currentTime(t){a(t)},get ended(){return h()},set ended(t){h(t)},children:(t,e)=>{var i=Oa();gs(i,t=>oe(p,t),()=>Ai(p)),Ue(()=>Yr(i,`--progress:${(a()??0)/o()*100}%;`)),Oi("mousedown",i,g),Gi(t,i)},$$slots:{default:!0}})};vr(x,t=>{l()||t(E)}),Oi("click",y,t=>t.stopPropagation()),Oi("keydown",y,t=>t.stopPropagation()),Gi(t,b),it(),n()}(r,{get subtitles(){return Ai(t)},get hasAudio(){return Ai(e)},get muted(){return Ai(C)},get fullscreen(){return Ai(i)},onplaypause:gt,onmute:St,onseek:t=>At(t),get paused(){return v()},set paused(t){v(t)},get seeking(){return b()},set seeking(t){b(t)},get duration(){return y()},set duration(t){y(t)},get currentTime(){return k()},set currentTime(t){k(t)},get ended(){return Ai(mt)},set ended(t){oe(mt,t,!0)}})}q(e),Ue(()=>i=qr(e,1,"micrio-media",null,i,{inside:"inside"==f()})),Gi(t,e)};vr(P,t=>{f()&&t(D)}),q(n),gs(n,t=>oe(jt,t),()=>Ai(jt));var F=Ee(n,2),O=t=>{var e=Ya();Er(e,g,!0),q(e),Gi(t,e)};vr(F,t=>{g()&&t(O)}),q(i),gs(i,t=>oe(Yt,t),()=>Ai(Yt));var z=Ee(i,2),N=t=>{var e=ja();oa(_e(e),{get title(){return kt(Wn,"$i18n",r).play},type:"play"}),q(e),Oi("pointerup",e,vt),Gi(t,e)};vr(z,t=>{Ai(ut)&&t(N)}),Ue(()=>{s=qr(i,1,Vr(S()),"micrio-media",s,{paused:v(),is360:T(),"media-video":Y==En.IFrame||Y==En.Video,"media-micrio":Y==En.Micrio}),Yr(n,1==Ai(Wt)||Y!=En.Video&&R.is360?"":`transform:scale(${Ai(Wt)})`),a=qr(n,1,"micrio-media",null,a,{videotour:!!Ai(ct)})}),Oi("pointerup",n,t=>{t.target==Ai(jt)&>(t)}),Gi(t,e)};vr(Jt,t=>{$().$settings.noUI||t(Kt)}),Gi(t,Zt),it(),s()}zi(["pointerup"]);var Za=Wi("<article><!></article>");function Ja(t,e){et(e,!0);let i=ys(e,"cn",3,null);function r(t){t.target&&t.target instanceof HTMLAnchorElement&&!t.target.getAttribute("href")?.startsWith("#")&&(t.target.target="_blank")}var s=Za();fr(_e(s),()=>e.children??g),q(s),Ue(()=>qr(s,1,Vr(i()),"micrio-article")),Oi("click",s,t=>t.stopPropagation()),Oi("keydown",s,r),Oi("pointerdown",s,r),Gi(t,s),it()}zi(["click","keydown","pointerdown"]);var Ka=Wi('<h1 class="micrio-marker-content"> </h1>'),Qa=Wi('<figcaption class="micrio-marker-content"> </figcaption>'),to=Wi('<button class="micrio-marker-content"><figure class="micrio-marker-content"><img class="micrio-marker-content"/> <!></figure></button>'),eo=Wi('<section class="micrio-marker-content"></section>'),io=Wi("<!> <!>",1),ro=Wi("<main><!> <!> <!> <!> <!> <!> <!></main>");function so(t,e){et(e,!0);const i=()=>kt(m,"$tour",s),r=()=>kt(u,"$lang",s),[s,n]=_t();let a=ys(e,"noEmbed",3,!1),o=ys(e,"noImages",3,!1),c=ys(e,"noGallery",3,!1),l=ys(e,"_content",15),h=ys(e,"_title",15);const d=Q("micrio"),u=d._lang,m=d.state.tour,f=i()&&"steps"in i()&&i().isSerialTour,p=Q("markerImages").get(e.marker.id),g=p.$settings._markers??{},v=!g.preventAutoPlay,w=!e.marker.data?.preventImageOpen&&!c(),b=1==e.marker.images?.length,y=Ht(()=>Ln(e.marker,r())),k=Ht(()=>!(Ai(y)?.title||Ai(y)?.audio||e.marker.images&&e.marker.images.length||Ai(y)?.embedUrl||e.marker.videoTour||Ai(y)?.body||Ai(y)?.bodySecondary)),T=()=>{i()&&"steps"in i()&&(i().isSerialTour||g.tourAutoProgress)&&e.onclose?.()};const _=Ht(()=>!v||!e.marker?.audioAutoPlay),x=Ht(()=>!1===e.marker?.embedAutoPlay||!v||!(!Ai(y)?.audio||!e.marker?.audioAutoPlay)),E=p.tileBase?.includes("micrio.dev"),S=t=>t.i18n?.[r()]?.title,A=Ht(()=>e.marker.videoTour?.i18n?.[r()]?.audio??Ai(y)?.audio),M=Ht(()=>Pn(Ai(A))),I=Ht(()=>b&&e.marker.images?.[0]?.i18n?.[r()]?.description);var $=ji(),P=xe($),L=t=>{var i=ro();let r;var s=_e(i),n=t=>{var e=Ka(),i=_e(e,!0);q(e),gs(e,t=>h(t),()=>h()),Ue(()=>nr(i,Ai(y).title)),Gi(t,e)};vr(s,t=>{Ai(y).title&&t(n)});var c=Ee(s,2),u=t=>{Ja(t,{children:(t,e)=>{var i=ji();Er(xe(i),()=>Ai(y).body),Gi(t,i)},$$slots:{default:!0}})};vr(c,t=>{Ai(y).body&&g.primaryBodyFirst&&t(u)});var m=Ee(c,2),A=t=>{{let i=Ht(()=>e.marker.audioAutoPlay||!Ai(y).audio&&!!e.marker.videoTour),r=Ht(()=>!e.marker.videoTour||!Ai(y)||!Ai(y).embedUrl);Ha(t,{get src(){return Ai(M)},noPlayOverlay:!0,get image(){return p},get uuid(){return e.marker.id},get tour(){return e.marker.videoTour},get autoplay(){return Ai(i)},get controls(){return Ai(r)},onended:T,get paused(){return Ai(_)}})}};vr(m,t=>{!f&&((!Ai(y)||!Ai(y).embedUrl)&&e.marker.videoTour||Ai(y)&&Ai(y).audio)&&t(A)});var $=Ee(m,2),P=t=>{var i=eo();yr(i,21,()=>e.marker.images,t=>t.id??t.src,(t,i)=>{var r=to(),s=_e(r),n=_e(s),a=Ee(n,2),o=t=>{var e=Qa(),i=_e(e,!0);q(e),Ue(()=>nr(i,Ai(I))),Gi(t,e)};vr(a,t=>{Ai(I)&&t(o)}),q(s),q(r),Ue((t,e,i)=>{as(r,"title",t),r.disabled=!w,as(n,"alt",e),as(n,"src",i)},[()=>S(Ai(i)),()=>S(Ai(i)),()=>Ai(i).micrioId?`https://iiif.${E?"micrio.dev":"micr.io"}/${Ai(i).micrioId}/full/${b?"^"+Math.min(Ai(i).width,640)+",":"^,320"}/0/default.webp`:Ai(i).src]),Oi("click",r,function(...t){(w?()=>{return t=Ai(i).micrioId,void(w&&d.state.popover.set({gallery:e.marker.images,galleryStart:t,image:p}));var t}:void 0)?.apply(this,t)}),Gi(t,r)}),q(i),Gi(t,i)};vr($,t=>{!o()&&e.marker.images?.length&&t(P)});var L=Ee($,2),C=t=>{var i=io(),r=xe(i),s=t=>{Ha(t,{get image(){return p},className:"hidden",get uuid(){return e.marker.id},get tour(){return e.marker.videoTour},get autoplay(){return v},secondary:!0})};vr(r,t=>{!Ai(y).audio&&e.marker.videoTour&&t(s)});var n=Ee(r,2);{let t=Ht(()=>!Ai(x));Ha(n,{get image(){return p},get src(){return Ai(y).embedUrl},get uuid(){return e.marker.id},width:400,height:240,controls:!0,get title(){return Ai(y).embedTitle},get figcaption(){return Ai(y).embedDescription},get autoplay(){return Ai(t)},onended:T,get paused(){return Ai(x)}})}Gi(t,i)};vr(L,t=>{Ai(y).embedUrl&&!a()&&t(C)});var R=Ee(L,2),D=t=>{Ja(t,{children:(t,e)=>{var i=ji();Er(xe(i),()=>Ai(y).body),Gi(t,i)},$$slots:{default:!0}})};vr(R,t=>{Ai(y).body&&!g.primaryBodyFirst&&t(D)});var F=Ee(R,2),O=t=>{Ja(t,{cn:"secondary",children:(t,e)=>{var i=ji();Er(xe(i),()=>Ai(y).bodySecondary),Gi(t,i)},$$slots:{default:!0}})};vr(F,t=>{Ai(y).bodySecondary&&t(O)}),q(i),gs(i,t=>l(t),()=>l()),Ue(()=>r=qr(i,1,"micrio-marker-content",null,r,{empty:Ai(k)})),Gi(t,i)};vr(P,t=>{Ai(y)&&t(L)}),Gi(t,$),it(),n()}zi(["click"]);var no=Wi('<button class="micrio-button tour-step micrio-marker-popup" disabled=""> </button>'),ao=Wi("<!> <!> <!>",1),oo=Wi('<progress class="progress micrio-marker-popup"></progress> <!>',1),co=Wi('<div><aside class="micrio-marker-popup"><!> <!> <!></aside> <!></div>');function lo(t,e){et(e,!0);const i=()=>kt(l,"$tour",n),r=()=>kt(c,"$current",n),s=()=>kt(Wn,"$i18n",n),[n,a]=_t(),o=Q("micrio"),{current:c}=o,l=o.state.tour,h=Q("markerImages").get(e.marker.id),d=h.$settings._markers??{},u=Ht(()=>i()&&"steps"in i()?o.canvases.find(t=>t.$data?.markerTours?.find(t=>t.id===i().id)):void 0),m=e.marker.data||{},f=d.canMinimizePopup;let p=ne(void 0);function g(t){i()&&Ai(w)&&"steps"in i()?t instanceof Event&&Ai(T)?l.set(void 0):i().next?.():r()&&!h.opts.secondaryTo&&r().id!=h.id&&m.micrioLink?.id==r().id?(o.open(h.id),h.state.marker.set(void 0),o.state.popup.set(void 0)):h.state.marker.set(void 0)}const v=Ht(()=>i()&&"steps"in i()?i():void 0),w=Ht(()=>Ai(v)&&Ai(v)?.steps.findIndex(t=>t.startsWith(e.marker.id))>=0),b=Ht(()=>Ai(w)&&!Ai(v)?.isSerialTour&&(Ai(u)?.$settings._markers?.tourControlsInPopup??d.tourControlsInPopup)),y=Ht(()=>Ai(w)&&!Ai(v)?.isSerialTour&&(Ai(u)?.$settings._markers?.tourStepCounterInPopup??d.tourStepCounterInPopup)),k=Ht(()=>Ai(v)?.currentStep??-1),T=Ht(()=>Ai(b)||(Ai(v)?Ai(v).currentStep==Ai(v).steps.length-1:void 0));let _=ne(!1);const x=(t=!1)=>{Ai(v)&&(t?Ai(v).prev?.():Ai(v).next?.(),oe(_,!0),setTimeout(()=>oe(_,!1),200))};let E=ne(!1),S=ne(void 0),A=ne(void 0);const M=new WeakMap,I=()=>{if(oe(E,!Ai(E)),Ai(S))for(let t=0;t<Ai(S).children.length;t++){const e=Ai(S).children[t];e instanceof HTMLElement&&e!=Ai(A)&&(M.has(e)||(M.set(e,e.offsetHeight),e.style.height=e.offsetHeight+"px"),setTimeout(()=>{e.style.height=Ai(E)?"0px":M.get(e)+"px"},100))}};let $=ne(!1);pr(()=>{e.marker.tags.forEach(t=>Ai(p)?.classList.add(t)),setTimeout(()=>Ai(p)?.querySelector("button")?.focus(),500);const t="embedImages"in e.marker?e.marker.embedImages:void 0;t&&o.$current?.data.update(e=>(e||(e={embeds:[]}),e.embeds=[...e.embeds??[],...t],e));const i=o.state.popup.subscribe(t=>oe($,!t||t!=e.marker,!0));return()=>{i(),t&&o.$current?.data.update(e=>e?.embeds?(e.embeds=e.embeds.filter(e=>!t.find(t=>t.id==e.id)),e):e)}});var P=co();let L;var C=_e(P),R=_e(C),D=t=>{{let e=Ht(()=>!Ai(w)||Ai(T)?"close":"arrow-right"),i=Ht(()=>!Ai(w)||Ai(T)?s().closeMarker:s().tourStepNext);oa(t,{get type(){return Ai(e)},get title(){return Ai(i)},get disabled(){return Ai(_)},onclick:g})}};vr(R,t=>{m.alwaysOpen||t(D)});var F=Ee(R,2),O=t=>{{let e=Ht(()=>Ai(E)?"arrow-up":"arrow-down");oa(t,{get type(){return Ai(e)},get title(){return s().minimize},onclick:I})}};vr(F,t=>{f&&t(O)});var z=Ee(F,2),N=t=>{var e=oo(),r=xe(e);as(r,"aria-hidden",!0),ma(Ee(r,2),{className:"micrio-tour-controls",children:(t,e)=>{var r=ao(),n=xe(r);{let t=Ht(()=>Ai(_)||0==Ai(k));oa(n,{type:"arrow-left",get disabled(){return Ai(t)},get title(){return s().tourStepPrev},onclick:()=>x(!0)})}var a=Ee(n,2),o=t=>{var e=no(),r=_e(e);q(e),Ue(()=>nr(r,`${Ai(k)+1} / ${i().steps.length??""}`)),Gi(t,e)};vr(a,t=>{Ai(y)&&t(o)});var c=Ee(a,2);{let t=Ht(()=>Ai(_)||Ai(k)+1==i().steps.length);oa(c,{type:"arrow-right",get disabled(){return Ai(t)},get title(){return s().tourStepNext},onclick:()=>x()})}Gi(t,r)},$$slots:{default:!0}}),Ue(()=>function(t,e){var i=ls(t);i.value!==(i.value=e??void 0)&&(t.value!==e||0===e&&t.nodeName===rs)&&(t.value=e??"")}(r,(Ai(k)+1)/i().steps.length)),Gi(t,e)};vr(z,t=>{Ai(b)&&i()&&"steps"in i()&&t(N)}),q(C),so(Ee(C,2),{get marker(){return e.marker},onclose:g,get _content(){return Ai(S)},set _content(t){oe(S,t,!0)},get _title(){return Ai(A)},set _title(t){oe(A,t,!0)}}),q(P),gs(P,t=>oe(p,t),()=>Ai(p)),Ue(()=>L=qr(P,1,"micrio-marker-popup",null,L,{destroying:Ai($),minimized:Ai(E)})),Rr(3,P,()=>On,()=>d.popupAnimation),Gi(t,P),it(),a()}var ho=Wi('<li><button class="micrio-serial-tour"> </button></li>'),uo=Wi('<ol class="micrio-serial-tour"></ol>'),mo=Wi("<!> <!> <!> <!>",1),fo=Wi('<div role="progressbar"></div>'),po=Wi('<!> <aside class="micrio-media-controls micrio-serial-tour"><!> <!></aside> <!>',1);function go(t,e){et(e,!0);const i=()=>kt(l,"$lang",n),r=()=>kt(Wn,"$i18n",n),s=()=>kt($a,"$captionsEnabled",n),[n,a]=_t(),o=e.tour.stepInfo,c=Q("micrio"),l=c._lang,h=c.$current,d=c.state.marker,u=!!h.$settings?.ui?.controls?.serialTourNoTimeScrub,m=o.reduce((t,e)=>t+e.duration,0)??0,f="controls"in e.tour?!1!==e.tour.controls:!e.tour.noControls;let p=ne(!1),g=ne(!1),v=ne(!1);Oe(()=>c.isMuted.subscribe(t=>{oe(v,t,!0)}));let w=ne(void 0),b=ne(void 0),y=ne(0),k=ne("");function T(){const t=c.state.mediaState.get(Ai(k));t&&(t.paused=oe(p,!t.paused)),Ai(p)?(c.events.dispatch("serialtour-pause",e.tour),c.events.enabled.set(!0)):(c.events.dispatch("serialtour-play",e.tour),c.events.enabled.set(!1))}function _(t,i){if(!e.tour.goto)return;const r=t==e.tour.currentStep;if(u&&r)return;r||e.tour.goto(t);const s=!u&&i?i.offsetX/i.target.offsetWidth:0;o.forEach((e,r)=>e.ended=!i&&r<t),S();const n=o[t];n.currentTime=s*n.duration,r&&Ai(w)?.instance&&(Ai(w).instance.currentTime=n.currentTime),M(t)}function x(){c.isMuted.update(t=>!t)}function E(){const t=Ai(b);t&&(t.ended=!0),null!=e.tour.currentStep&&e.tour.currentStep<e.tour.steps.length-1&&e.tour.next?e.tour.next():(oe(p,oe(g,!0),!0),e.onended?.()),Si().then(()=>{S(),t&&(t.ended=!1)})}function S(){e.tour.stepInfo?.forEach(t=>t.currentTime=0)}const A=vt([]);function M(t=e.tour.currentStep??0){const i=o.map((e,i)=>i<t||e.ended||Ai(g)?100:i==t?Math.round((e.currentTime||0)/e.duration*1e4)/100:0);oe(y,i.reduce((t,e,i)=>t+e/100*o[i].duration,0),!0),A.set(i)}function I(t){const i=t&&!!e.tour.steps.find(e=>e.startsWith(t.id));oe(w,void 0),i&&t.videoTour&&setTimeout(()=>{const i=o[e.tour.currentStep??0];i.markerId==t.id&&(i.ended=!1,oe(b,i,!0),oe(w,t.videoTour,!0),M())},10)}const $=t=>t.i18n?t.i18n[i()]?.title:t.title;pr(()=>{const t=()=>M();c.addEventListener("timeupdate",t);const e=d.subscribe(I);return()=>{e(),c.removeEventListener("timeupdate",t),S()}});const P=Ht(()=>Ai(w)?"audio"in Ai(w)?Ai(w).audio:Ai(w).i18n?.[i()]?.audio:void 0),L=Ht(()=>Pn(Ai(P))),C=Ht(()=>!!Ai(b)?.hasSubtitle),R=Ht(()=>o.some(t=>t.hasSubtitle));var D=po(),F=xe(D),O=t=>{var e=uo();yr(e,21,()=>o,wr,(t,e,i)=>{var r=ji(),s=xe(r),n=t=>{var r=ho();let s;var n=_e(r),a=_e(n,!0);q(n),q(r),Ue(t=>{s=qr(r,1,"micrio-serial-tour",null,s,{active:Ai(b)&&Ai(b).chapter==i,enriched:Ai(e).imageHasOtherMarkers}),nr(a,t)},[()=>$(Ai(e).marker)]),Oi("click",n,()=>_(i)),Gi(t,r)},a=Ht(()=>$(Ai(e).marker));vr(s,t=>{Ai(a)&&t(n)}),Gi(t,r)}),q(e),Gi(t,e)};vr(F,t=>{e.tour.printChapters&&t(O)});var z=Ee(F,2),N=_e(z),V=t=>{{let e=Ht(()=>!Ai(p));Ha(t,{get tour(){return Ai(w)},get src(){return Ai(L)},get autoplay(){return Ai(e)},onid:t=>oe(k,t,!0),onended:E,onplay:()=>oe(p,!1),onblocked:()=>oe(p,!0),get currentTime(){return Ai(b).currentTime},set currentTime(t){Ai(b).currentTime=t}})}};vr(N,t=>{Ai(w)&&Ai(b)&&t(V)});var U=Ee(N,2),B=t=>{var e=mo(),i=xe(e);{let t=Ht(()=>Ai(p)?"play":"pause"),e=Ht(()=>Ai(p)?r().play:r().pause);oa(i,{get type(){return Ai(t)},get title(){return Ai(e)},onclick:T})}var n=Ee(i,2);{let t=Ht(()=>Ai(v)?"volume-off":"volume-up"),e=Ht(()=>Ai(v)?r().audioUnmute:r().audioMute);oa(n,{get type(){return Ai(t)},get title(){return Ai(e)},onclick:x})}var a=Ee(n,2),o=t=>{{let e=Ht(()=>!Ai(C)),i=Ht(()=>s()?"subtitles":"subtitles-off");oa(t,{get disabled(){return Ai(e)},get type(){return Ai(i)},get active(){return s()},get title(){return r().subtitlesToggle},onclick:()=>$a.set(!s())})}};vr(a,t=>{Ai(R)&&t(o)}),fa(Ee(a,2),{get el(){return c}}),Gi(t,e)};vr(U,t=>{f&&t(B)}),q(z);var W=Ee(z,2),X=t=>{Ra(t,{get duration(){return m},get currentTime(){return Ai(y)},set currentTime(t){oe(y,t,!0)},get ended(){return Ai(g)},set ended(t){oe(g,t,!0)},children:(t,i)=>{var r=ji();yr(xe(r),17,()=>o,wr,(t,i,r)=>{var s=ji(),a=xe(s),o=t=>{var s=fo();let a;Ue(t=>{a=qr(s,1,"bar",null,a,{active:r==e.tour.currentStep}),as(s,"title",t),Yr(s,`width:${Ai(i).duration/m*100}%; --progress: ${kt(A,"$times",n)[r]||0}%`)},[()=>$(Ai(i).marker)]),Oi("click",s,t=>_(r,t)),Fi("keypress",s,t=>{"Enter"===t.key&&_(r)}),Gi(t,s)};vr(a,t=>{Ai(i).duration>0&&t(o)}),Gi(t,s)}),Gi(t,r)},$$slots:{default:!0}})};vr(W,t=>{f&&t(X)}),Gi(t,D),it(),a()}zi(["click"]);var vo=Wi('<article class="scroll-tour micrio-tour"></article> <!>',1),wo=Wi("<!> <!> <!>",1),bo=Wi("<div><!> <!></div>");function yo(t,e){et(e,!0);const i=()=>kt(d,"$_lang",s),r=()=>kt(Wn,"$i18n",s),[s,n]=_t();let a=ys(e,"tour",15),o=ys(e,"noHTML",3,!1);const c=Q("micrio"),{events:l,state:h,_lang:d}=c,u=c.$current,m=u.$data,f=u.$settings,p=c.canvases[0].grid,g=u.state.marker,v="steps"in a()&&a().isSerialTour,w=!("steps"in a()),b="scrollable"in a()&&a().scrollable,y="steps"in a()&&("controls"in a()?!1!==a().controls:!!a().noControls),k=!(!v&&"steps"in a()&&f._markers?.tourControlsInPopup),T=k&&(w||v),_=!!f._markers?.keepPopupsDuringTourTransitions,x=()=>M(Ai(C)-1),E=()=>M(Ai(C)+1),S=()=>l.enabled.set(!0);let A;function M(t){if(!("steps"in a())||!a().stepInfo)return;const e=a().stepInfo[t];if(e&&e.markerId==c.state.$marker?.id)return I(e);const i=a().stepInfo[Ai(C)]?.micrioImage?.state;i&&i.marker.set(void 0),c.$current?.state.marker.set(void 0),_||c.state.popup.set(void 0),c.removeEventListener("marker-opened",S),g.set(void 0),e&&(A=setTimeout($,200,e))}async function I(t){let e=u,i=!1;if(p&&!t.gridView&&p.images.find(e=>e.id==t.micrioId)){const r=!!("steps"in a()&&a().stepInfo&&t)&&a().stepInfo?.indexOf(t)<Ai(C),s=t.marker.data?.gridTourTransition??t.marker.data?._meta?.gridTourTransition,n=s?.startsWith("slide")?"slide":"swipe";await Si().then(()=>{const a=p.focus(e=p.images.find(e=>e.id==t.micrioId),{view:t.startView,transition:s==n||s==`${n}-horiz`?r?`${n}-left`:`${n}-right`:s==`${n}-vert`?r?`${n}-up`:`${n}-down`:"behind"==s?r?"behind-left":"behind-right":s}).catch(()=>i=!0);return c.events.enabled.set(!1),a})}else if(c.$current?.id!=t.micrioId){if(t.gridView&&t.marker.data?._meta?.gridAction&&p){t.micrioImage||(t.micrioImage=p.images.find(e=>e.id==t.micrioId)),e=t.micrioImage;const i=t.marker.data._meta.gridAction.split("|");p.action(i.shift(),i.join("|"))}else"steps"in a()&&a().stepInfo&&oe(C,a().stepInfo.indexOf(t),!0),e=c.open(t.micrioId,{gridView:t.gridView,startView:t.startView});await Si()}else e=c.$current;return[e,i]}async function $(t){let e=u,i=!1;t.micrioId&&([e,i]=await I(t)),i||(t.micrioImage||(t.micrioImage=e),l.enabled.set(!1),e.state.marker.set(t.markerId),c.addEventListener("marker-opened",S,{once:!0}),await Si(),l.dispatch("tour-step",a()))}function P(){h.tour.set(void 0)}function L(){l.dispatch("tour-ended",a()),(a().closeOnFinish||!a().cannotClose&&y)&&P()}let C=ne(-1),R=ne(!1);const D=u.camera.getView(),F=f._markers;"steps"in a()&&(a(a().prev=x,!0),a(a().next=E,!0),a(a().goto=M,!0),Oe(()=>{a(a().currentStep=Ai(C),!0)}));const O=vt(!1);let z;function N(){O.set(!1),clearTimeout(z),z=setTimeout(()=>O.set(!0),5e3)}O.subscribe(t=>l.dispatch("tour-minimize",t));let V,U=ne(void 0);function B(t){if(!("steps"in a())||!Ai(U))return;const e=a().steps,i=t.filter(t=>t.isIntersecting).map(t=>t.target)[0];if(i)for(let r=0;r<Ai(U).children.length;r++)if(Ai(U).children[r]==i){const t=m.markers?.find(t=>t.id==e[r].split(",")[0]);return void(t&&c.$current?.camera.flyToView(t.view).catch(()=>{}))}}let W=[];pr(()=>("steps"in a()&&bn(u,a(),i(),u.$data).then(()=>function(t){if(b||c.$current?.state.$marker||void 0!==t.initialStep&&M(t.initialStep),b&&Ai(U)){V=new IntersectionObserver(B,{root:Ai(U),threshold:1});for(let t=0;t<Ai(U).children.length;t++)V.observe(Ai(U).children[t])}W.push(c.state.marker.subscribe(e=>{if(!e)return void oe(R,!1);const i="string"==typeof e?e:e.id,r=t.steps.findIndex(t=>t.startsWith(i));if(r>=0&&t.stepInfo){const e=t.stepInfo[oe(C,r,!0)];e&&!e.micrioImage&&(e.micrioImage=c.canvases.find(t=>t.id==e.micrioId)??p?.images.find(t=>t.id==e.micrioId)??c.$current)}oe(R,r<0)}))}(a())),y||W.push(O.subscribe(t=>e.onminimize?.(t))),o()||"steps"in a()&&!v||!1===a().minimize||(c.addEventListener("pointermove",N),c.addEventListener("touchstart",N),N()),T&&c.setAttribute("data-tour-active",""),()=>{for(clearTimeout(z),clearTimeout(A);W.length;)W.shift()?.();c.removeEventListener("pointermove",N),c.removeEventListener("touchstart",N),c.removeEventListener("marker-opened",S),T&&c.removeAttribute("data-tour-active"),S(),V&&V.disconnect();const t=c.state.$marker;if("steps"in a()&&a().stepInfo&&null!=a().currentStep){const e=a().stepInfo[a().currentStep];delete a().goto,delete a().next,delete a().prev,t&&e?.markerId==t.id&&(e.micrioImage?.state.marker.set(void 0),c.state.marker.set(void 0))}u.camera.aniDone=void 0,p||"steps"in a()&&a().keepLastStep||c.$current==u||c.open(u.id),Si().then(()=>{l.dispatch("tour-stop",a()),"steps"in a()&&delete a().currentStep,!("steps"in a())&&F?.zoomOutAfterClose&&!t&&D&&u.camera.flyToView(D,{speed:F?.zoomOutAfterCloseSpeed})})})),l.dispatch("tour-start",a());let Y=ne(0),j=ne(!1);const G=Ht(()=>"steps"in a()?void 0:a()),H=Ht(()=>Ai(G)?"audio"in a()?a().audio:Ai(G).i18n?.[i()]?.audio:void 0),Z=Ht(()=>Pn(Ai(H)));var J=ji(),K=xe(J),tt=t=>{var e=ji(),i=xe(e),n=t=>{var e=vo(),i=xe(e);yr(i,21,()=>a().steps.map(t=>m.markers&&m.markers.find(e=>e.id==t.split(",")[0])),wr,(t,e)=>{var i=ji(),r=xe(i),s=t=>{lo(t,{get marker(){return Ai(e)}})};vr(r,t=>{Ai(e)&&t(s)}),Gi(t,i)}),q(i),gs(i,t=>oe(U,t),()=>Ai(U));var s=Ee(i,2),n=t=>{oa(t,{type:"close",get title(){return r().tourStop},className:"scroll-tour-end",onclick:P})};vr(s,t=>{a().cannotClose||t(n)}),Gi(t,e)},o=t=>{var e=bo();let i;var n=_e(e),o=t=>{var e=ji(),i=xe(e),s=t=>{go(t,{get tour(){return a()},onended:L})},n=t=>{var e=wo(),i=xe(e);{let t=Ht(()=>0==Ai(C));oa(i,{type:"arrow-left",get title(){return r().tourStepPrev},get disabled(){return Ai(t)},onclick:x})}var s=Ee(i,2);oa(s,{noClick:!0,children:(t,e)=>{X();var i=Yi();Ue(()=>nr(i,`${Ai(C)+1} / ${a().steps.length??""}`)),Gi(t,i)},$$slots:{default:!0}});var n=Ee(s,2);{let t=Ht(()=>Ai(C)==a().steps.length-1);oa(n,{type:"arrow-right",get title(){return r().tourStepNext},get disabled(){return Ai(t)},onclick:E})}Gi(t,e)};vr(i,t=>{v?t(s):t(n,-1)}),Gi(t,e)},l=t=>{Ha(t,{get tour(){return a()},get src(){return Ai(Z)},get fullscreen(){return c},controls:!0,autoplay:!0,onended:L,get paused(){return Ai(j)},set paused(t){oe(j,t,!0)},get currentTime(){return Ai(Y)},set currentTime(t){oe(Y,t,!0)}})};vr(n,t=>{"steps"in a()?t(o):t(l,-1)});var h=Ee(n,2),d=t=>{oa(t,{type:"close",get title(){return r().close},onclick:P})};vr(h,t=>{a().cannotClose||t(d)}),q(e),Ue(()=>i=qr(e,1,"micrio-tour",null,i,{left:v,"serial-tour":v,"video-tour":w,"no-controls":y,minimized:!Ai(j)&&(kt(O,"$minimized",s)||Ai(R))})),Rr(1,e,()=>Fn,()=>({duration:200})),Gi(t,e)},l=t=>{Ha(t,{get tour(){return Ai(G)},get src(){return Ai(Z)},autoplay:!0,onended:L,get currentTime(){return Ai(Y)},set currentTime(t){oe(Y,t,!0)}})};vr(i,t=>{b&&"steps"in a()?t(n):k?t(o,1):Ai(G)&&t(l,2)}),Gi(t,e)},rt=t=>{Ha(t,{get tour(){return Ai(G)},get src(){return Ai(Z)},autoplay:!0,onended:L,get currentTime(){return Ai(Y)},set currentTime(t){oe(Y,t,!0)}})};vr(K,t=>{o()?Ai(G)&&t(rt,1):t(tt)}),Gi(t,J),it(),n()}var ko=class{get currentIndex(){return this.micrio.wasm.getActiveImageIdx(this.image.ptr)}constructor(t,e,i,r={}){this.micrio=t,this.length=e,this.goto=i,this.opts=r,this.hitTresh=!1,this.snapTo=[],this.pointers=new Map,this.isFullWidth=!1,this.startedWithShift=!1,this.isDragging=()=>2==this.pointers.size||(this.isFullWidth||this.startedWithShift)&&1==this.pointers.size,r.sensitivity||(r.sensitivity=Number(t.getAttribute("data-swipe-sensitivity")??1));const s=t.getAttribute("data-swipe-snap");s&&(this.snapTo=s.split(",").map(Number)),this.micrio.setAttribute("data-hooked",""),this.dStart=this.dStart.bind(this),this.dMove=this.dMove.bind(this),this.dStop=this.dStop.bind(this),this.mouseleave=this.mouseleave.bind(this),this.image=t.$current,this.image.state.view.subscribe(t=>this.isFullWidth=r.coverLimit?this.image.camera.isZoomedOut():!t||Math.round(1e3*t[3])/1e3>=1),t.wasm.setNoPinchPan(!0),t.wasm.setIsSwipe(!0),this.micrio.canvas.element.addEventListener("pointerdown",this.dStart)}destroy(){this.micrio.canvas.element.removeEventListener("pointerdown",this.dStart),this.mouseleave()}dStart(t){this.startedWithShift=t.shiftKey;const e=!this.isDragging();this.pointers.set(t.pointerId,!0),this.pointers.size>2&&this.mouseleave(),e&&(this.hitTresh=!1,this.micrio.setAttribute("data-panning",""),this.startIndex=this.currentIndex,this.startX=t.clientX,this.firstTouchId=t.pointerId,this.micrio.addEventListener("pointermove",this.dMove),this.micrio.addEventListener("pointerup",this.dStop),this.micrio.setPointerCapture(t.pointerId))}dMove(t){if(!this.isDragging()||t.pointerId!=this.firstTouchId||void 0===this.startX||void 0===this.startIndex)return;if(!this.hitTresh&&void 0!==this.startX&&(this.hitTresh=2!=this.pointers.size||Math.abs(t.clientX-this.startX)>(this.micrio.events.pinchFactor&&this.micrio.events.pinchFactor>1.25?.3:.15)*this.micrio.offsetWidth)&&(this.startX=t.clientX),!this.hitTresh)return;const e=this.micrio.$current.camera,i=this.opts.continuous?Math.max(.1,(e.getXY(1,.5)[0]-e.getXY(0,.5)[0])/this.micrio.offsetWidth):1,r=Math.round((t.clientX-this.startX)/(this.micrio.offsetWidth*i)*this.length*(this.opts.sensitivity??1));let s=this.startIndex-r;if(this.opts.continuous){for(;s<0;)s+=this.length;for(;s>this.length-1;)s-=this.length}s=Math.max(0,Math.min(this.length-1,s)),s!=this.currentIndex&&this.goto(s)}dStop(t){this.pointers.delete(t.pointerId),t.pointerId==this.firstTouchId&&(this.micrio.releasePointerCapture(this.firstTouchId),this.firstTouchId=void 0),this.pointers.size||this.swipeEnd()}mouseleave(){this.pointers.clear(),this.swipeEnd()}swipeEnd(){if(this.micrio.removeAttribute("data-panning"),this.micrio.removeEventListener("pointermove",this.dMove),this.micrio.removeEventListener("pointerup",this.dStop),this.hitTresh=!1,this.snapTo.length){const t=this.snapTo[this.snapTo.map((t,e)=>[e,Math.abs(t-this.currentIndex)]).sort((t,e)=>t[1]>e[1]?1:t[1]<e[1]?-1:0)[0][0]];t!=this.currentIndex&&this.animateTo(t)}}animateTo(t){this.raf&&cancelAnimationFrame(this.raf);const e=performance.now(),i=this.currentIndex,r=i-t,s=t=>{const n=Math.min(1,(t-e)/250);n<1&&(this.raf=requestAnimationFrame(s));const a=i-Math.round(this.micrio.wasm.ease(n)*r);a!=this.currentIndex&&this.goto(a)};this.raf=requestAnimationFrame(s)}},To=Wi('<span class="micrio-dial"> </span>'),_o=Wi('<div data-scroll-through="" class="micrio-dial"><!></div>');var xo,Eo=Wi("<button>✥</button>"),So=Wi('<li><button class="bullet micrio-gallery">•</button></li>'),Ao=Wi('<div><!> <ul class="micrio-gallery"><!> <button aria-label="drag handle"></button></ul> <!></div>');function Mo(t,e){et(e,!0);const i=()=>kt(w,"$settings",n),r=()=>kt(v,"$layer",n),s=()=>kt(Wn,"$i18n",n),[n,a]=_t();let o=ys(e,"images",19,()=>[]),c=ys(e,"omni",3,null);const l=Q("micrio"),{wasm:h,current:d,events:u,_lang:m}=l,f=!l.canvas.isMobile,p=kt(d,"$current",n),g=p.$info,v=p.state.layer,w=p.settings,b=p.camera;if(c())for(let q=0;q<c().frames;q++)o().push({id:g.id+"/"+q,image:p,visible:vt(!1),frame:q,opts:{area:[0,0,1,1]},ptr:-1,baseTileIdx:-1,thumbSrc:p.getTileSrc(p.levels,0,0,q)});const y=i().gallery,k="omni"==y.type,T=k||"swipe-full"==y.type,_=T||"switch"==y.type,x=k,E=!!y.isSpreads,S=y.coverPages??0,A=i().omni,M=k&&!!A?.twoAxes,I=y.startId||l.getAttribute("data-gallery-start-id"),$=y.archive,P=!!i().limitToCoverScale,L=!!i().noUI,C=A?.frontIndex??0,R=A?.layers?.length??1,D=l.hasAttribute("data-gallery-start")?Number(l.getAttribute("data-gallery-start")):i()?.omni?.startIndex;let F=null==D||isNaN(D)?I?o().findIndex(t=>t.id==I):0:D;F<0&&(F=0);const O=[],z=[];if(o())for(let q=0;q<o().length;q++){let t=o()[q].opts?.area;if(!t)continue;const e=t.slice(0);if(z.push([q]),E&&q-S>=0&&(q-S)%2==0&&o()[q+1]){if(t=o()[++q].opts?.area,!t)continue;z[z.length-1].push(q),e[2]=t[2],e[3]=t[3]}O.push(e)}const N=O.length/R,V=A?.layers?.map(t=>({i18n:Object.fromEntries(Object.entries(t.i18n).map(([t,e],i)=>[t,{title:e??"Layer "+(i+1)}]))}))??[];Object.keys(g.revision??{[(()=>kt(m,"$_lang",n))()]:0}).forEach(t=>V.forEach((e,i)=>{e.i18n[t]||(e.i18n[t]={title:"Layer "+(i+1)})}));let U=ne(-1),B=_,W=ne(!0),X=ne(!1),Y=ne(!0),j=!1,G=ne(0);function H(t,e=!1,i=150,r=!1){if(x){for(;t<0;)t+=N;t%=N}const s=t=Math.round(Math.max(0,Math.min(N-1,t))),n=r||s!=Ai(U);if(oe(U,s,!0),n&&Z(),_)n&&(h.setActiveImage(p.ptr,z[Ai(U)][0],z[Ai(U)].length-1),k?h.render():(b.flyToView(O[Ai(U)],{duration:i,speed:2}).then(()=>st(O[Ai(U)],!0)).catch(()=>{}),Ot()));else{const r=b.getViewLegacy(),s=O[t],a=sn.fromLegacy(s),o=j&&(B&&!Ai(X)||n||r[0]<s[0]!=r[2]>s[2]);oe(X,!1),o?b.flyToView(a,{duration:i,speed:1,progress:e?.5:0}).then(()=>st(s,!0)).catch(()=>{}):(a&&0==i&&b.setView(a),st(s,!0))}p.album.hooked=j=!0}function Z(t){if(Dt&&t){if(Dt.currentIndex==Ai(U))return;oe(U,Dt.currentIndex,!0)}rt(Ai(U)),u.dispatch("gallery-show",Ai(U)),k&&oe(G,(Ai(U)-C)/N*360)}const J="requestIdleCallback"in self?k?Math.max(36,2*Math.floor(o().length/8)):100:50,K=new Map,tt=self.requestIdleCallback??self.requestAnimationFrame;function rt(t){const e=[];V.length&&(t+=r()*Math.floor(o().length/V.length)),E&&t>=S&&(t=2*t-S);const i=Math.floor(t/Mt);for(let r=-J;r<=J;r++)if(r){let s=t+r;if(M){const t=Math.floor(s/Mt);t<i&&(s+=Mt),t>i&&(s-=Mt)}if(x){for(;s<0;)s+=o().length;for(;s>=o().length;)s-=o().length}e.push(s)}if(M)for(let r=-J;r<=J;r++)r&&e.push(t+r*Mt);e.filter((t,i)=>t>=0&&t<o().length&&e.indexOf(t)==i).map(t=>o()[t]).filter(t=>!!t&&!K.has(t.id)).forEach(t=>K.set(t.id,tt(()=>h.getTexture(t.baseTileIdx,t.thumbSrc,!1,{force:!!$}))))}function st(t,e){B=b.isZoomedOut(),b.setLimit(!e&&B?[-1,t[1],2,t[3]]:t)}function nt(t){const e=Ai(ot)?.childNodes[t];return e?-2+e.offsetLeft+e.offsetWidth/2:0}let at,ot=ne(void 0),ct=ne(0);const lt=Ht(()=>!Ai(ot)||Ai(W)?Ai(ct):nt(Ai(U)));let ht=!1;function dt(t){t.preventDefault(),t.stopPropagation(),Ai(W)||(ht="button"in t)&&0!=t.button||!Ai(ot)||(at=Ai(ot).getClientRects()[0],l.keepRendering=oe(W,!0),oe(gt,-1),window.addEventListener(ht?"pointermove":"touchmove",mt),window.addEventListener(ht?"pointerup":"touchend",bt),mt(t))}function ut(t){const e=at??Ai(ot).getClientRects()[0],i="button"in t?t.clientX:t.touches[0].clientX,r=Math.min(1,Math.max(0,(i-e.left-14)/(e.width-32)));return[r,Math.max(0,Math.min(N-1,Math.floor(r*N)))]}function mt(t){const[e,i]=ut(t);oe(ct,16+e*(at.width-32)),i!=Ai(U)&&H(i,!0)}let ft,pt,gt=ne(-1);function wt(t){Ai(W)||oe(gt,ut(t)[1],!0)}function bt(){window.removeEventListener(ht?"pointermove":"touchmove",mt),window.removeEventListener(ht?"pointerup":"touchend",bt),oe(W,l.keepRendering=!1,!0),H(Ai(U))}function yt(){B&&(pt=ft=Ai(U),oe(X,B,!0),st(O[Ai(U)],!1))}function Tt(t){const e=t.detail;"panend"!=t.type||e?H(pt!=Ai(U)?pt:Ai(U)+(ft==Ai(U)&&Ai(X)&&e?Math.round(Math.min(1,Math.max(-1,-e.movedX/e.duration))):0)):oe(X,!1)}function xt(t){if(!t)return;const e=sn.toCenterJSON(t),i=e.centerX,r=O.map((t,r)=>(1-Math.min(Math.abs(i-t[0]),Math.abs(i-t[2])))*Math.max(0,(Math.min(i+e.width/2,t[2])-Math.max(i-e.width/2,t[0]))/(t[2]-t[0]))*(1-.1*Math.abs(Ai(U)-r)));h.setFocus(p.ptr,O[pt=r.every(t=>!t)?Ai(U):r.indexOf(Math.max(...r))],Ai(X)),B=b.isZoomedOut()}let Et=0,St=[0,0,0,0];function At(t){t.stopPropagation(),t.preventDefault(),0==t.button&&(oe(W,!0),St=[t.clientX,t.clientY,Ai(U),Et],window.addEventListener("pointermove",$t),window.addEventListener("pointerup",Pt))}const Mt=o().length,It=1;function $t(t){Et=Math.max(0,Math.min(It-1,St[3]+Math.round((St[1]-t.clientY)/360*It)));let e=(St[2]+Math.round((St[0]-t.clientX)/360*Mt))%Mt;for(;e<0;)e+=Mt;H(Et*Mt+e)}function Pt(){removeEventListener("pointermove",$t),removeEventListener("pointerup",Pt),oe(W,!1)}let Lt=-1;const Ct=()=>{V.length&&p.data.update(t=>{t||(t={}),t.pages||(t.pages=[]);const e={id:"_omni-layers",i18n:V[r()].i18n,icon:jn.layerGroup,children:V.map((t,e)=>({id:"omni-layer-"+e,i18n:t.i18n,action:()=>{v.set(e),rt(Ai(U))}})).filter(t=>t.id!="omni-layer-"+r())};return Lt>=0&&Lt<t.pages.length?t.pages.splice(Lt,1,e):t.pages.push(e),Lt=t.pages.length-1,t})};let Rt,Dt,Ft=l.state.ui.hidden;function Ot(){Ft.set(!1),clearTimeout(Rt),Rt=setTimeout(()=>Ft.set(!0),2e3)}p.album={numPages:O.length,get currentIndex(){return Ai(U)},info:p.$settings.album,prev:()=>H(Ai(U)-1),next:()=>H(Ai(U)+1),goto:H},pr(()=>{Promise.all(o().map(t=>("state"in t&&!("image"in t)&&(t.camera=p.camera),h.addEmbed(t,p,{opacity:0,asImage:"camera"in t})))).then(()=>{h.setActiveImage(p.ptr,F),H(F,!1,0),oe(W,!1)}),k&&R>1&&Ct(),oe(Y,!1),l.goto=H;const t=[],e=[];return k&&t.push(p.state.layer.subscribe(Ct)),T&&(Dt=p.swiper=new ko(l,N,H,{continuous:x,coverLimit:P})),e.push(()=>{l.canvas.element.removeEventListener("pointermove",Ot),l.canvas.element.removeEventListener("pointerdown",Ot)}),!f||k||M||T||(l.canvas.element.addEventListener("pointermove",Ot),l.canvas.element.addEventListener("pointerdown",Ot),Ot()),_&&t.push(p.state.view.subscribe(()=>{B=b.isZoomedOut()})),_||T||o().length<=1||(M||oe(ct,nt(F),!0),t.push(p.state.view.subscribe(xt)),l.addEventListener("panstart",yt),l.addEventListener("panend",Tt),l.addEventListener("pinchend",Tt),e.push(()=>{l.removeEventListener("panstart",yt),l.removeEventListener("panend",Tt),l.removeEventListener("pinchend",Tt)})),k&&l.addEventListener("move",Z),()=>{for(Dt&&Dt.destroy();t.length;)t.shift()?.();for(;e.length;)e.shift()?.();k&&l.removeEventListener("move",Z)}});var zt=ji();Fi("keydown",pe,function(t){if(!i().omni?.noKeys){switch(t.key){case"PageUp":case"ArrowLeft":H(Ai(U)-(k?-1:1),!0);break;case"PageDown":case"ArrowRight":H(Ai(U)+(k?-1:1),!0);break;case"ArrowUp":M&&H(Ai(U)+Mt);break;case"ArrowDown":M&&H(Ai(U)-Mt);break;case"Home":H(0);break;case"End":H(N);break;default:return}Ot()}});var Nt=xe(zt),Vt=t=>{var e=ji(),r=xe(e),a=t=>{var e=Eo();let i;Ue(()=>i=qr(e,1,"angular micrio-gallery",null,i,{dragging:Ai(W)})),Fi("pointerdown",e,At,!0),Gi(t,e)},c=t=>{{let e=Ht(()=>i().omni?.showDegrees);!function(t,e){et(e,!0);const i=Q("micrio"),r=i.$current.camera;let s,n=ne(void 0),a=0,o=0;function c(t){const s=Math.max(1,(r.getXY(1,.5)[0]-r.getXY(0,.5)[0])/i.offsetWidth),c=(o/360+(a-t.clientX)/(Ai(n).offsetWidth*s))*e.frames;e.onturn?.(c)}function l(){s&&i.releasePointerCapture(s),i.removeAttribute("data-panning"),i.removeEventListener("pointermove",c),i.removeEventListener("pointerup",l)}const h=Ht(()=>-e.currentRotation/360*(Ai(n)?.offsetWidth??0));var d=_o(),u=_e(d),m=t=>{var i=To(),r=_e(i);q(i),Ue(t=>nr(r,`${t??""}º`),[()=>Math.round(10*e.currentRotation)/10]),Gi(t,i)};vr(u,t=>{e.degrees&&t(m)}),q(d),gs(d,t=>oe(n,t),()=>Ai(n)),Ue(()=>Yr(d,`--micrio-dial-offset:${Ai(h)??""}px;`)),Fi("pointerdown",d,function(t){t.stopPropagation(),t.preventDefault(),0==t.button&&(i.addEventListener("pointermove",c),i.addEventListener("pointerup",l),i.setAttribute("data-panning",""),i.setPointerCapture(s=t.pointerId),o=e.currentRotation,a=t.clientX)},!0),Gi(t,d),it()}(t,{get currentRotation(){return Ai(G)},get frames(){return N},get degrees(){return Ai(e)},onturn:t=>H(t)})}},l=t=>{var e=Ao();let i;var r=_e(e);{let t=Ht(()=>0==Ai(U));oa(r,{type:"arrow-left",get title(){return s().galleryPrev},className:"gallery-btn",onpointerdown:t=>0===t.button&&H(Ai(U)-1),get disabled(){return Ai(t)}})}var a=Ee(r,2),c=_e(a);yr(c,17,()=>O,wr,(t,e,i)=>{var r=So();let s;var n=_e(r);q(r),Ue(()=>s=qr(r,1,"micrio-gallery",null,s,{active:i==Ai(U),hover:i==Ai(gt)})),Oi("click",n,()=>H(i,!0)),Fi("keypress",n,t=>{"Enter"===t.key&&H(i,!0)}),Gi(t,r)});var l=Ee(c,2);let h;q(a),gs(a,t=>oe(ot,t),()=>Ai(ot));var d=Ee(a,2);{let t=Ht(()=>Ai(U)==o().length-1);oa(d,{type:"arrow-right",get title(){return s().galleryNext},className:"gallery-btn",onpointerdown:t=>0===t.button&&H(Ai(U)+1),get disabled(){return Ai(t)}})}q(e),Ue(()=>{i=qr(e,1,"micrio-gallery",null,i,{hidden:Ai(Y)||kt(Ft,"$hidden",n)&&!Ai(W)&&!Ai(X)}),Yr(l,`left: ${Ai(lt)}px`),h=qr(l,1,"micrio-gallery",null,h,{dragging:Ai(W)})}),Oi("pointermove",a,wt),Fi("pointerleave",a,()=>oe(gt,-1)),Fi("pointerdown",l,dt,!0),Fi("touchstart",l,dt,!0,!0),Gi(t,e)};vr(r,t=>{M?t(a):A&&!A.noDial&&k?t(c,1):!T&&o().length>1&&t(l,2)}),Gi(t,e)};vr(Nt,t=>{L||t(Vt)}),Gi(t,zt),it(),a()}zi(["pointermove","click"]);var Io,$o,Po={},Lo=vt(),Co=vt(!1);function Ro(t,e,i){$o&&($o.setPosition?$o.setPosition(t,e,i):"positionX"in $o&&($o.positionX.value=t,$o.positionY.value=e,$o.positionZ.value=i))}function Do(t,e,i){$o&&($o.setOrientation?$o.setOrientation(t,e,i,0,1,0):"forwardX"in $o&&($o.forwardX.value=t,$o.forwardY.value=e,$o.forwardZ.value=i))}function Fo(t,e){et(e,!0);const[i,r]=_t();let s=ys(e,"volume",3,1);const{events:n,current:a}=Q("micrio"),o=kt(a,"$current",i),c=o.$info,l=c.height/c.width,h="AudioContext"in window||"webkitAudioContext"in window;const d=()=>Co.set(!0),u=new Audio("data:audio/mpeg;base64,/+MYxAAAAANIAUAAAASEEB/jwOFM/0MM/90b/+RhST//w4NFwOjf///PZu////9lns5GFDv//l9GlUIEEIAAAgIg8Ir/JGq3/+MYxDsLIj5QMYcoAP0dv9HIjUcH//yYSg+CIbkGP//8w0bLVjUP///3Z0x5QCAv/yLjwtGKTEFNRTMuOTeqqqqqqqqqqqqq/+MYxEkNmdJkUYc4AKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq");u.volume=Js.iOS?0:1e-4,h&&pr(()=>{let t,i;return i=Co.subscribe(r=>{r&&(Io||(!function(t){if(!xo){if(Io||(Io="micrioAudioContext"in window?window.micrioAudioContext:"AudioContext"in window?new window.AudioContext:"webkitAudioContext"in window?new window.webkitAudioContext:null),!Io)return console.warn("[Micrio] Your browser does not support the Web Audio API");(xo=Io.createGain()).connect(Io.destination),xo.gain.value=t,Lo.set(Io),"upX"in($o=Io.listener)&&($o.upX.value=0,$o.upY.value=1,$o.upZ.value=0)}}(s()),n.dispatch("audio-init")),Io&&e.data.markers?.filter(t=>!!t.positionalAudio).length&&(t=o.state.view.subscribe(t=>{if(!t)return;const i=Math.max(0,1.05-o.camera.getScale());!function(t,i,r){if(e.is360){t*=2*-Math.PI,i-=.5,i*=-Math.PI;const e=10*(1-r),s=Math.cos(i)*Math.sin(t)*e,n=Math.sin(i)*e,a=Math.cos(i)*Math.cos(t)*e;Ro(s,n,a);let o=s*s+n*n+a*a;o>0&&(o=1/Math.sqrt(o)),Do(s*o,n*o,a*o)}else Ro(2*(t-.5),2*(.5-i)*l,r),Do(0,0,-1)}(t[0]+t[2]/2,t[1]+t[3]/2,i*(e.is360?1:1.5))})),i&&(i(),i=null))}),Io||u.play().then(d).catch(()=>{n.dispatch("autoplay-blocked"),addEventListener("pointerup",d,{once:!0})}),()=>{t&&t(),i&&i(),removeEventListener("pointerup",d)}}),Oe(()=>{xo&&(xo.gain.value=s())});var m=ji(),f=xe(m),p=t=>{{let t=Ht(()=>s()*(e.data.music.volume??1));!function(t,e){et(e,!0);let i=ys(e,"loop",3,!0),r=ys(e,"volume",3,1);const s=ue(new Audio);s.preload="none",s.loop=!1,s.onended=a;let n=-1;function a(){if(!i()&&n+1==e.list.length)return;const t=e.list[++n%e.list.length];s.src=Pn(t)??"",s.play()}pr(()=>(a(),()=>s.pause())),Oe(()=>{s.volume=r()}),it()}(0,{get list(){return e.data.music.items},get loop(){return e.data.music.loop},get volume(){return Ai(t)}})}};vr(f,t=>{kt(Co,"$interacted",i)&&kt(Lo,"$ctx",i)&&e.data.music?.items.length&&t(p)}),Gi(t,m),it(),r()}var Oo=Wi('<cite class="micrio-details"> </cite>'),zo=Wi('<small class="micrio-details"> </small>'),No=Wi('<summary class="micrio-details"><!> <!></summary>'),Vo=Wi('<p class="micrio-details"><a rel="noopener noreferrer" target="_blank"> </a></p>'),Uo=Wi("<details><!> <!> <!> <!></details>");function Bo(t,e){et(e,!0);const i=()=>kt(o,"$current",s),r=()=>kt(e.data,"$data",s),[s,n]=_t(),{_lang:a,current:o}=Q("micrio");let c=ne(!1);function l(t){let e="cm";return t>=1e5?(e="km",t/=1e5):t>=100?(e="m",t/=100):t<1e-6?(e="nm",t*=1e7):t<.001?(e="µm",t*=1e4):t<1&&(e="mm",t*=10),t.toFixed(2)+" "+e}const h=Ht(()=>i()?.$settings.cmWidth),d=Ht(()=>i()?.$settings.cmHeight),u=Ht(()=>r()?r()?.i18n?r().i18n[kt(a,"$_lang",s)]:r():void 0),m=Ht(()=>Ai(u)?.title??kt(e.info,"$info",s)?.title??""),f=Ht(()=>Ai(u)?.description),p=Ht(()=>Ai(u)?.sourceUrl),g=Ht(()=>Ai(u)?.copyright),v=Ht(()=>Ai(h)&&Ai(d)?l(Ai(h))+" x "+l(Ai(d)):null);let w=ne(void 0);pr(()=>{Ai(w).ontoggle=()=>{oe(c,Ai(w).open,!0)}});var b=ji(),y=xe(b),k=t=>{var e=Uo();let i;var r=_e(e),n=t=>{var e=No(),i=_e(e),r=t=>{var e=Oo(),i=_e(e,!0);q(e),Ue(()=>nr(i,Ai(m))),Gi(t,e)};vr(i,t=>{Ai(m)&&t(r)});var s=Ee(i,2),n=t=>{var e=zo(),i=_e(e,!0);q(e),Ue(()=>nr(i,Ai(v))),Gi(t,e)};vr(s,t=>{Ai(v)&&t(n)}),q(e),Gi(t,e)};vr(r,t=>{(Ai(m)||Ai(v))&&t(n)});var a=Ee(r,2),o=t=>{var e=ji();Er(xe(e),()=>Ai(f)),Gi(t,e)};vr(a,t=>{Ai(f)&&t(o)});var l=Ee(a,2),h=t=>{var e=Vo(),i=_e(e),r=_e(i,!0);q(i),q(e),Ue(()=>{as(i,"href",Ai(p)),nr(r,Ai(g)||Ai(p))}),Gi(t,e)};vr(l,t=>{Ai(p)&&t(h)});var d=Ee(l,2),u=t=>{oa(t,{type:"close",get title(){return kt(Wn,"$i18n",s).close},onclick:()=>Ai(w).open=!1})};vr(d,t=>{Ai(c)&&t(u)}),q(e),gs(e,t=>oe(w,t),()=>Ai(w)),Ue(()=>i=qr(e,1,"micrio-details",null,i,{opened:Ai(c)})),Rr(3,e,()=>Fn,()=>({duration:200})),Gi(t,e)};vr(y,t=>{(Ai(m)||Ai(f)||Ai(p))&&t(k)}),Gi(t,b),it(),n()}var Wo=Wi('<div class="micrio-error"><!> </div>');var qo=Wi('<figcaption class="micrio-micrio-gallery"></figcaption>'),Xo=Wi('<figure class="micrio-micrio-gallery"><micr-io></micr-io> <!></figure>',2);function Yo(t,e){et(e,!0);const i=()=>kt(o,"$current",r),[r,s]=_t();let n=ys(e,"startId",3,void 0);const{_lang:a,current:o}=Q("micrio");let c=ne(void 0),l=ne(0);const h=Ht(()=>e.gallery[Ai(l)]),d=Ht(()=>Ai(h)?.i18n?.[kt(a,"$_lang",r)]?.description??void 0);gr(()=>Ai(c)?.destroy());var u=Xo(),m=_e(u);Ue(()=>os(m,"data-gallery",e.gallery.map(t=>`${t.micrioId},${t.width},${t.height},${t.isDeepZoom?"d":""}${t.isWebP?",w":t.isPng||!i()?.isV5&&t.src?.endsWith(".png")?",p":""}`).join(";"))),Ue(()=>os(m,"data-start",n())),Ue(()=>os(m,"data-path",i()&&i().$info&&i().$info.path)),os(m,"data-logo","false"),qr(m,1,"micrio-micrio-gallery"),gs(m,t=>oe(c,t),()=>Ai(c));var f=Ee(m,2),p=t=>{var e=qo();Er(e,()=>Ai(d),!0),q(e),Gi(t,e)};vr(f,t=>{Ai(d)&&t(p)}),q(u),Fi("gallery-show",m,t=>{oe(l,t.detail,!0)}),Gi(t,u),it(),s()}var jo=Wi("<!> <!>",1),Go=Wi("<aside><!> <!></aside>"),Ho=Wi("<!> <!>",1),Zo=Wi('<menu class="micrio-popover"></menu>'),Jo=Wi('<h2 class="micrio-popover"> </h2>'),Ko=Wi('<img alt=""/>'),Qo=Wi("<!> <!> <!> <!>",1),tc=Wi('<menu class="right micrio-popover"></menu>'),ec=Wi("<!> <!> <!>",1),ic=Wi("<dialog><!> <!></dialog>");function rc(t,e){et(e,!0);const i=()=>kt(h,"$current",n),r=()=>kt(d,"$_lang",n),s=()=>kt(Wn,"$i18n",n),[n,a]=_t(),o=ue(Q("micrio")),{events:c,state:l,current:h,_lang:d}=o,u=i()?.$data,m=Object.keys(u?.revision??{[r()]:0});function f(){Ai(w)?.close()}const p=vt(!1);let g=ne(!0),v=r(),w=ne(void 0);pr(()=>{Ai(w).showModal(),Si().then(()=>{(Ai(w).querySelector("button.active")??Ai(w).querySelector("button"))?.focus()});const t=d.subscribe(t=>{t&&t!=v&&(oe(g,!1),v=t,setTimeout(()=>oe(g,!0),200))});return()=>{t()}});const b=Ht(()=>e.popover.marker),y=Ht(()=>Ai(b)?Ln(Ai(b),r()):void 0),k=Ht(()=>e.popover.markerTour),T=Ht(()=>e.popover.contentPage),_=Ht(()=>{return Ai(T)?(t=Ai(T),e=r(),t.i18n?.[e]??t):void 0;var t,e}),x=Ht(()=>Ai(T)&&Ai(_)&&!Ai(T)?.buttons?.length?!(!Ai(_).embed||Ai(_).content&&!(Ai(_).content.length<250)||Ai(T).image):void 0),E=Ht(()=>Ai(T)?.image?"string"==typeof Ai(T).image?Ai(T).image:Ai(T).image.src:void 0),S=Ht(()=>!!Ai(_)?.embed||!!Ai(E)),A=Ht(()=>!!Ai(T)?.buttons?.find(t=>"close"==t.type)),M=Ht(()=>!!e.popover.marker?.images&&e.popover.marker.images.length>0),I=Ht(()=>!(!Ai(y)||!Ai(y).body)||Ai(M)),$=Ht(()=>Ai(y)&&Ai(y).body||Ai(M)&&Ai(_)?.embed),P=Ht(()=>!Ai(A)||Ai(k)&&null!=Ai(k).currentStep);var L=ic();let C;var R=_e(L),D=t=>{var e=Go();let i;var r=_e(e),n=t=>{oa(t,{type:"close",get title(){return s().close},className:"close-popover",onclick:f})};vr(r,t=>{Ai(A)||t(n)});var a=Ee(r,2),o=t=>{var e=jo(),i=xe(e),r=t=>{oa(t,{type:"arrow-left",get title(){return s().tourStepPrev},className:"prev-tour-step",onclick:()=>Ai(k)&&Ai(k).prev&&Ai(k).prev()})};vr(i,t=>{Ai(k).currentStep>0&&t(r)});var n=Ee(i,2),a=t=>{oa(t,{type:"arrow-right",get title(){return s().tourStepNext},className:"next-tour-step",onclick:()=>Ai(k)&&Ai(k).next&&Ai(k).next()})};vr(n,t=>{Ai(k).currentStep<Ai(k).steps.length-1&&t(a)}),Gi(t,e)};vr(a,t=>{Ai(k)&&null!=Ai(k).currentStep&&t(o)}),q(e),Ue(()=>i=qr(e,1,"micrio-popover",null,i,{inside:Ai(T)?!Ai(x):!Ai(I)&&!Ai(y)?.embedUrl})),Gi(t,e)};vr(R,t=>{Ai(P)&&t(D)});var F=Ee(R,2),O=t=>{var e=Ho(),i=xe(e),r=t=>{Ha(t,{get src(){return Ai(y).embedUrl},get uuid(){return Ai(b).id},get figcaption(){return Ai(y).embedDescription},controls:!0,get autoplay(){return Ai(b).embedAutoPlay}})},s=t=>{Yo(t,{get gallery(){return Ai(b).images}})};vr(i,t=>{Ai(y)&&Ai(y).embedUrl?t(r):Ai(b).images&&Ai(b).images.length&&t(s,1)});var n=Ee(i,2),a=t=>{{let e=Ht(()=>!Ai(y)||!Ai(y).embedUrl);so(t,{get marker(){return Ai(b)},noEmbed:!0,noGallery:!0,get noImages(){return Ai(e)},onclose:f})}};vr(n,t=>{Ai($)&&t(a)}),Gi(t,e)},z=t=>{Yo(t,{get gallery(){return e.popover.gallery},get startId(){return e.popover.galleryStart}})},N=t=>{var e=ec(),s=xe(e),n=t=>{var e=Zo();yr(e,21,()=>m,wr,(t,e)=>{{let i=Ht(()=>Xn?.of(Ai(e))??Ai(e)),s=Ht(()=>Ai(e)==r());oa(t,{onclick:()=>o.lang=Ai(e),get title(){return Ai(i)},get active(){return Ai(s)},children:(t,i)=>{X();var r=Yi();Ue(t=>nr(r,t),[()=>Ai(e).toUpperCase()]),Gi(t,r)},$$slots:{default:!0}})}}),q(e),Gi(t,e)};vr(s,t=>{m.length>1&&t(n)});var a=Ee(s,2),c=t=>{var e=ji(),i=xe(e),r=t=>{Ha(t,{get src(){return Ai(_).embed},get figcaption(){return Ai(_).content},controls:!0,autoplay:!0})};vr(i,t=>{Ai(g)&&t(r)}),Gi(t,e)},l=t=>{Ja(t,{children:(t,e)=>{var i=Qo(),r=xe(i),s=t=>{var e=Jo(),i=_e(e,!0);q(e),Ue(()=>nr(i,Ai(_).title)),Gi(t,e)};vr(r,t=>{Ai(_).title&&t(s)});var n=Ee(r,2),a=t=>{Ha(t,{get src(){return Ai(_).embed},controls:!0})};vr(n,t=>{Ai(_).embed&&Ai(g)&&t(a)});var o=Ee(n,2),c=t=>{var e=Ko();Ue(()=>as(e,"src",Ai(E))),Gi(t,e)};vr(o,t=>{Ai(E)&&t(c)});var l=Ee(o,2),h=t=>{var e=ji();Er(xe(e),()=>Ai(_).content),Gi(t,e)};vr(l,t=>{Ai(_).content&&t(h)}),Gi(t,i)},$$slots:{default:!0}})};vr(a,t=>{Ai(x)?t(c):t(l,-1)});var h=Ee(a,2),d=t=>{var e=tc();yr(e,21,()=>Ai(T).buttons,wr,(t,e)=>{{let s=Ht(()=>"link"==Ai(e).type?Ai(e).action:void 0);oa(t,{get href(){return Ai(s)},get blankTarget(){return Ai(e).blankTarget},onclick:()=>function(t){f(),"close"!=t.type&&setTimeout(()=>{switch(t.type){case"marker":i()?.state.marker.set(t.action);break;case"mtour":o.state.tour.set(u?.markerTours?.find(e=>e.id==t.action));break;case"vtour":o.state.tour.set(u?.tours?.find(e=>e.id==t.action))}},200)}(Ai(e)),children:(t,i)=>{X();var s=Yi();Ue(()=>nr(s,Ai(e).i18nTitle[r()])),Gi(t,s)},$$slots:{default:!0}})}}),q(e),Gi(t,e)};vr(h,t=>{Ai(T).buttons&&Ai(T).buttons.length&&t(d)}),Gi(t,e)};vr(F,t=>{Ai(b)?t(O):e.popover.gallery?t(z,1):Ai(T)&&Ai(_)&&t(N,2)}),q(L),gs(L,t=>oe(w,t),()=>Ai(w)),Ue(()=>C=qr(L,1,"micrio-popover",null,C,{page:!!Ai(T),article:!!Ai(T)&&!Ai(x),"has-media":Ai(S),gallery:!!e.popover.gallery})),Fi("close",L,function(){e.popover.contentPage?c.dispatch("page-closed"):Ai(k)?l.tour.set(void 0):e.popover.marker&&e.popover.image?.state.marker.set(void 0),l.popover.set(void 0)}),Fi("outrostart",L,()=>p.set(!0)),Gi(t,L),it(),a()}function sc(t,e){et(e,!0);const i=Ht(()=>e.marker.positionalAudio),r=e.ctx.createGain();r.connect(xo);const s=Q("micrio"),n=s.$current.$info,a=n.width,o=n.height,c=e.ctx.createPanner();c.panningModel="equalpower",c.rolloffFactor=1,c.coneOuterGain=0;function l(){if(r.gain.value=Ai(i).volume??1,e.is360){c.refDistance=2.75*Ai(i).radius,c.maxDistance=Ai(i).radius*(11/3);const t=e.marker.x*-Math.PI*2,r=(e.marker.y-.5)*-Math.PI,s=Math.cos(r)*Math.sin(t)*11,n=11*Math.sin(r),a=Math.cos(r)*Math.cos(t)*11;c.positionX.value=s,c.positionY.value=n,c.positionZ.value=a;let o=s*s+n*n+a*a;o>0&&(o=1/Math.sqrt(o)),c.orientationX.value=s*o,c.orientationY.value=n*o,c.orientationZ.value=a*o}else c.distanceModel="linear",c.positionX.value=2*(e.marker.x-.5),c.positionY.value=2*(.5-e.marker.y)*(o/a),c.positionZ.value=-.2,c.rolloffFactor=2,c.refDistance=Ai(i).radius*Ai(i).radius*10,c.maxDistance=5*Ai(i).radius}let h,d;function u(){h&&h.disconnect(),h=e.ctx.createBufferSource(),Ai(i).loop&&(Ai(i).repeatAfter>0?h.onended=()=>{d=setTimeout(u,1e3*Ai(i).repeatAfter)}:h.loop=!0),r.gain.value=Ai(i).volume??1,h.buffer=Po[Ai(i).src],h.connect(c),h.start()}let m=ne(ue(JSON.stringify(e.marker.positionalAudio)));Oe(()=>{const t=JSON.stringify(Ai(i));Ai(m)!=t&&oe(m,t,!0)&&l()}),pr(()=>(l(),c.connect(r),async function(){Ai(i).src&&(Po[Ai(i).src]||(Po[Ai(i).src]=await fetch(Ai(i).src).then(t=>t.arrayBuffer()).then(t=>e.ctx.decodeAudioData(t))),Ai(i).alwaysPlay&&Ai(i).repeatAfter>0?d=setTimeout(u,1e3*Ai(i).repeatAfter):u())}(),s.addEventListener("audio-update",l),()=>{s.removeEventListener("audio-update",l),h&&h.disconnect(),clearTimeout(d),c.disconnect(),r.disconnect()})),it()}var nc=Wi('<img alt="" class="micrio-marker"/>'),ac=Wi('<label data-scroll-through=""> </label>'),oc=Wi('<button data-scroll-through="" class="micrio-marker"><!> <!></button>'),cc=Wi("<div><!></div>"),lc=Wi("<!> <!>",1);function hc(t,e){et(e,!0);const i=()=>kt(d,"$current",c),r=()=>kt(T,"$tour",c),s=()=>kt(k,"$currentPopup",c),n=()=>kt(f,"$_lang",c),a=()=>kt(g,"$isMobile",c),o=()=>kt(Lo,"$ctx",c),[c,l]=_t(),h=Q("micrio"),{current:d,events:u,state:m,_lang:f,spaceData:p}=h,g=h.canvas.isMobile,v=m.markerHoverId,b=Q("inView"),y=Q("markerImages"),k=h.state.popup,T=m.tour;let _=ys(e,"marker",15),x=ys(e,"image",31,()=>ue(i())),E=ys(e,"forceHidden",3,!1),S=ys(e,"coords",3,void 0),A=ys(e,"overlapped",3,!1);_().tags||_(_().tags=[],!0);const M=y.has(_().id);!M&&x()&&y.set(_().id,x());const I=!(!x().isOmni||!x().$settings.omni?.sideLabels||x().$settings._markers?.noTitles),$=t=>t.steps.findIndex(t=>t.startsWith(_().id))>=0,P=_().data??{},L=P._meta||{},C=x().$settings.omni;_().imageLayer&&_().imageLayer>(C?.layers?.length??1)-1&&delete _().imageLayer,i()?.$data?.markers?.find(t=>t.data?._micrioSplitLink?.markerId==_().id&&"none"!=t.popupType)&&(_(_().popupType="none",!0),_(_().noMarker=!0,!0)),"embedUrl"in _()&&_().embedUrl&&"embedInPopover"in _()&&_().embedInPopover&&_(_().popupType="popover",!0);const R=x().$settings._markers??{},D=!!x().$settings.doTourJumps,F=_().tags.join(" "),O="cluster"==_().type,z=!1===_().data?.showTitle||!!R.noTitles||!!C?.sideLabels,N=!!P.scales||!!x().$settings.markersScale,V=N&&!!R.titlesNoScale,U=P._micrioSplitLink,B=!!R.keepPopupsDuringTourTransitions,W=/[?&]micrioNoTooltips/.test(location.search)||!!C?.sideLabels,X=L.gridAction,Y=x().$settings?._markers?.autoStartTour?h.wasm.images.map(t=>"camera"in t?t.$data?.markerTours?.find($):void 0).filter(t=>!!t)[0]??p?.markerTours?.find($):void 0,j=Y?.steps.findIndex(t=>t.startsWith(_().id)),G=!!x().$settings?._markers?.autoStartTourAtBeginning;let H=!M&&(!!P.alwaysOpen||m.$marker==_())||m.$tour?.id==Y?.id&&Y?.currentStep==(j??0);const Z=M&&x().state.$marker==_();let J,K,tt,rt=ne(ue(Z)),st=ne(ue(Z)),nt=ne(!1),at=ne(""),ot=ne(0),ct=ne(0),lt=ne(1),ht=!1;function dt(){if(mt(),_().onclick)return _().onclick(_());if(!R.noMarkerActions)if("cluster"==_().type){if(_().view&&i()?.$info){const t=i().camera.getScale();x().camera.flyToView(_().view,{area:x().opts?.area,limitZoom:!0,margin:[20/i().$info.width*t,20/i().$info.height*t]})}}else x().state.marker.set(_())}function ut(){R.noMarkerActions||(Ai(At)?.parentNode?.scrollTo(0,0),mt(),tt=setTimeout(()=>{const t=x().camera.getXY(_().x,_().y);!Ai(rt)&&(t[0]<0||t[0]>=h.offsetWidth||t[1]<0||t[1]>=h.offsetHeight||x().is360&&t[3]>4)&&x().camera.flyToCoo([_().x,_().y],{speed:2,limit:!0}).catch(()=>{})},150))}function mt(){clearTimeout(tt)}const ft=()=>v.set(_().id),pt=()=>v.set(void 0);let gt;async function vt(){if(O)return;if(x().state.$marker!=_())return x().state.marker.set(_());if(R.noMarkerActions)return;if(Y&&Y.id!=r()?.id&&!r()){Y.initialStep=G?0:j;const t=Y.stepInfo?.[0];if(G&&t&&t.micrioId!=x().id){const e=h.canvases[0]?.grid;e?.images.find(e=>e.id==t.micrioId)?h.current.set(e.image):h.open(t.micrioId)}if(T.set(Y),setTimeout(()=>L.gridAction=X,100),G&&null!=j&&j>0)return void x().state.marker.set(void 0);await Si()}var t;H=!1,oe(st,!0),u.dispatch("marker-opened",_()),r()&&"steps"in r()&&r().isSerialTour&&r().printChapters&&r().steps.findIndex(t=>t.startsWith(_().id))>=0&&_().videoTour||(Ai(Ct)?"popover"==_().popupType?(await Si(),h.state.popover.set({marker:_(),image:x(),markerTour:r()&&"steps"in r()?r():void 0})):_().videoTour&&!r()&&(T.set(_().videoTour),(t=T,new Promise(e=>{let i;i=t.subscribe(t=>{null==t&&(i?i():Si().then(()=>i()),e(t))})})).then(()=>x().state.marker.set(void 0))):Si().then(()=>k.set(_())));const e=P.micrioLink?.id;if(e&&Si().then(()=>{x().camera.stop();const t=Tn(h,e);t&&(x(x().openedView=void 0,!0),x().state.marker.set(void 0)),h.open(e,{vector:t?.vector})}),U&&!ht&&!x().opts.secondaryTo){const t=h.canvases[0]?.grid;t?.lastPromise&&await t.lastPromise,gt=setTimeout(()=>{U&&(K=h.open(U.micrioId,{splitScreen:!0,splitTo:x(),isPassive:!(!U.follows||h.state.$tour),startView:U.view}),ht=!0)},200)}}let bt,yt,Tt=ne(!1);function xt(){if(x().is360&&N)oe(at,x().camera.getMatrix(_().x,_().y,1,1,0,0,0).join(","),!0);else{let i=Ai(ot),r=Ai(ct);if(t=x().camera.getXYDirect(_().x,_().y,{radius:_().radius,rotation:_().rotation}),e=w(t,4),oe(ot,e[0],!0),oe(ct,e[1],!0),oe(lt,e[2],!0),J=e[3],x().is360)oe(nt,J>0);else if(x().isOmni&&C){if(null!=Ai(Dt)[0]&&null!=Ai(Dt)[1]&&null!=_().rotation){const t=C.frames/(C.layers?.length??1);let e=(x().swiper?.currentIndex??0)-(Ai(Rt)??0);e>t/2&&(e-=t),e<-t/2&&(e+=t),oe(nt,e<=Ai(Dt)[0]||e>=Ai(Dt)[1],!0)}else C.distance&&oe(nt,J<0);C.sideLabels&&!R.noTitles&&Ai($t)?.title&&b&&(i!=Ai(ot)||r!=Ai(ct))&&function(t,e){const i=h.canvas.element.offsetWidth,r=h.canvas.element.offsetHeight,s=!(t<0||t>i||e<0||e>r||Ai(nt));(s||Ai(Tt))&&b.update(r=>{const n=r.findIndex(([t])=>t==_());return s?n>=0?r[n]=[_(),t/i,e]:r.push([_(),t/i,e]):n>=0&&r.splice(n,1),oe(Tt,s,!0),r})}(Ai(ot),Ai(ct))}x().$settings.clusterMarkers&&S()&&S().set(_().id,[Ai(ot),Ai(ct),A()?bt:bt=Ai(Mt)?.offsetWidth,A()?yt:yt=Ai(Mt)?.offsetHeight])}var t,e}function Et(t){const e=t.detail;_(_().x=e.x,!0),_(_().y=e.y,!0),xt()}let St=ne(void 0),At=ne(void 0),Mt=ne(void 0);const It=Q("mediaPaused");pr(()=>{if(_().videoTour){const t="timeline"in _().videoTour?_().videoTour.timeline:_().videoTour.i18n?.[n()]?.timeline;t?.length&&_(_().view=t[0].rect,!0)}const t=[x().state.marker.subscribe(t=>{"string"==typeof t&&t==_().id?x().state.marker.set(_()):t==_()?async function(){if(Ai(rt))return;if(oe(rt,!0),mt(),R.noMarkerActions)return;u.dispatch("marker-open",_()),!r()||"steps"in r()&&($(r())||r().cannotClose)||(T.set(void 0),await Si());const t=r()&&"steps"in r();Ai(Ct)||t&&B||(k.set(void 0),h.state.popover.set(void 0)),pt(),U?.markerId&&(K||(K=h.canvases.find(t=>t.id==U.micrioId)),K&&(ht=wt(K.visible),ht&&U?.view&&K.camera.flyToView(U.view,{isJump:!0}).catch(()=>{}))),void 0!==_().imageLayer&&x().state.layer.set(_().imageLayer);const e=Y&&G&&Y!=r()&&null!=j&&j>0;e&&delete L.gridAction;const i=_().view;e||!i||P.noAnimate||_().videoTour||L.gridView?vt():H?(x().camera.setView(_().view,{area:x().opts?.area}),vt()):x().camera.flyToView(_().view,{omniIndex:Ai(Rt),area:x().opts?.area,isJump:!!P.doJump||D&&!!m.$tour}).then(vt).catch(()=>{r()||x().state.marker.set(void 0)})}():P.alwaysOpen||(Ai(rt)&&function(){clearTimeout(gt),u.dispatch("marker-closed",_());const t=r()&&"steps"in r();if(r()||x().state.$marker||(_().videoTour||x().openedView?setTimeout(()=>x().camera.aniDoneAdd.push(()=>{wt(T)||x().state.$marker||Ai(St)?.focus()}),10):Ai(St)?.focus()),h.state.popover.set(void 0),!Ai(Ct)){s()!=_()||t&&B||k.set(void 0);const e=h.canvases.find(t=>t!=x()&&t.state.$marker);e&&Si().then(()=>{const t=e.state.$marker;t&&"popup"==t.popupType&&k.set(t)})}U&&K&&setTimeout(()=>{const t=wt(h.state.marker);K&&U.micrioId!=t?.data?._micrioSplitLink?.micrioId&&h.close(K)},210)}(),oe(rt,oe(st,!1),!0))})];return Ai(Lt)||(t.push(x().camera.image.state.view.subscribe(xt)),xt()),E()||Si().then(()=>{Ai(rt)&&!_().noMarker&&s()&&s()!=_()&&!r()?x().state.marker.set(void 0):(H||P.alwaysOpen)&&vt()}),_().htmlElement&&Ai(At)&&Ai(At).appendChild(_().htmlElement),()=>{for(clearTimeout(gt);t.length;)t.shift()?.()}});const $t=Ht(()=>Ln(_(),n())),Pt=Ht(()=>!(Ai($t)?.title||Ai($t)?.body||Ai($t)?.bodySecondary||Ai($t)?.embedUrl||_().images&&_().images.length)),Lt=Ht(()=>E()||_().noMarker),Ct=Ht(()=>"popup"!=_().popupType||Ai(Pt)),Rt=Ht(()=>x().camera.getOmniFrame((_().rotation??0)+(_().backside?Math.PI:0))),Dt=Ht(()=>_().visibleArc?[x().camera.getOmniFrame(_().visibleArc[0]),x().camera.getOmniFrame(_().visibleArc[1])]:[]),Ft=Ht(()=>r()&&(!("steps"in r())&&!r().keepMarkers||R.hideMarkersDuringTour&&!kt(It,"$tourPaused",c))&&!Ai(rt));Oe(()=>{Ai(Ft)&&Ai(Tt)&&b.update(t=>{const e=t.findIndex(t=>t[0]==_());return e>=0&&t.splice(e,1),t})});const Ot=Ht(()=>"default"==_().type?void 0:"link"==_().type?"link":"media"==_().type?"play":"cluster"==_().type?void 0:_().type??void 0),zt=Ht(()=>(null!=_().data?.customIconIdx?x().$settings._markers?.customIcons?.[_().data?.customIconIdx]:void 0)??_().data?.icon??R.markerIcon??void 0),Nt=Ht(()=>!!Ai(Ot)||!!Ai(zt)),Vt=Ht(()=>!("class"in _()&&""===_().class||!Ai(Nt)&&"default"!=_().type)),Ut=Ht(()=>Ai($t)&&(!z||a()&&I)&&(Ai($t).label||Ai($t).title));var Bt=lc(),Wt=xe(Bt),qt=t=>{var e=cc();let i;var r=_e(e),s=t=>{var e=oc(),i=_e(e),r=t=>{var e=nc();Ue(()=>as(e,"src","string"==typeof Ai(zt)?Ai(zt):Ai(zt).src)),Gi(t,e)},s=t=>{Hn(t,{get name(){return Ai(Ot)}})};vr(i,t=>{Ai(zt)?t(r):Ai(Ot)&&t(s,1)});var n=Ee(i,2),a=t=>{var e=ac();let i;var r=_e(e,!0);q(e),gs(e,t=>oe(Mt,t),()=>Ai(Mt)),Ue(()=>{as(e,"for",_().id),i=qr(e,1,"micrio-marker",null,i,{static:V}),nr(r,Ai($t).label||Ai($t).title)}),Gi(t,e)};vr(n,t=>{Ai(Ut)&&t(a)}),q(e),gs(e,t=>oe(St,t),()=>Ai(St)),Ue(()=>{as(e,"title",W||O?null:Ai($t)?Ai($t).label||Ai($t).title:null),as(e,"id",_().id)}),Oi("click",e,dt),Fi("focus",e,ut),Fi("blur",e,mt),Fi("mouseenter",e,ft),Fi("mouseleave",e,pt),Gi(t,e)};vr(r,t=>{_().htmlElement||t(s)}),q(e),gs(e,t=>oe(At,t),()=>Ai(At)),Or(e,(t,e)=>{return r=e,(i=t).addEventListener("change",r),{destroy:()=>i.removeEventListener("change",r)};var i,r},()=>Et),Ue(()=>{as(e,"id",`m-${_().id}`),i=qr(e,1,Vr(F),"micrio-marker",i,{overlapped:A()&&!Ai(rt),cluster:O,behind:Ai(nt),hovered:kt(v,"$hovered",c)==_().id,default:Ai(Vt),mat3d:!!Ai(at),opened:Ai(rt),"micrio-link":!!P.micrioLink,"has-icon":Ai(Nt),"has-custom-icon":!!Ai(zt)}),Yr(e,Ai(at)?`--mat:matrix3d(${Ai(at)})`:Ai(ot)?`--x:${Ai(ot)}px;--y:${Ai(ct)}px${N?`;--scale:${Ai(lt)}`:""}`:null)}),Gi(t,e)};vr(Wt,t=>{Ai(Lt)||!x()||Ai(Ft)||t(qt)});var Xt=Ee(Wt,2),Yt=t=>{sc(0,{get marker(){return _()},get ctx(){return o()},get is360(){return x().is360}})};vr(Xt,t=>{_().positionalAudio&&o()&&(!_().positionalAudio.noMobile||a())&&(_().positionalAudio.alwaysPlay||Ai(rt))&&t(Yt)}),Gi(t,Bt),it(),l()}zi(["click"]);var dc=Wi("<div><!></div>");function uc(t,e){et(e,!0);const i=()=>kt(c,"$_lang",r),[r,s]=_t();let n=ys(e,"settings",31,()=>ue({i18n:{}})),a=ys(e,"image",15);const o=Q("micrio"),{_lang:c,spaceData:l}=o,h=a().$info,d=a().$settings,u=vn(e.targetId)?.[2],m=Tn(o,e.targetId);m||console.error(`[Micrio Waypoint] Could not calculate vector for target ${e.targetId}`);const{directionX:f,v:p,vN:g,vector:v}=m;let w=ne(void 0);const b=Math.abs(g[1])<.3,y=b?.65:.5+g[1]/10,k={x:f,y:y,baseScale:h.width/1024,scale:1,rotX:(1+(b?-(1-y):g[1]))*Math.PI/2,rotY:0,rotZ:0},T=n()?.coords??qs(k);let _,x=T.custom,E=x?T:k;function S(){d._markers?.noMarkerActions||(Ai(w).parentNode.scrollTo(0,0),clearTimeout(_),_=setTimeout(()=>{const t=a().camera.getXY(E.x,E.y);!Ai($)&&(t[0]<0||t[0]>=o.offsetWidth||t[1]<0||t[1]>=o.offsetHeight||a().is360&&t[3]>4)&&a().camera.flyToCoo([E.x,E.y],{speed:2,limit:!0}).catch(()=>{})},150))}let A=ne(""),M=n().customIconIdx;const I=()=>{C.deleted?oe(L,!0):(M!=C.settings.customIconIdx&&(n(n().customIconIdx=C.settings.customIconIdx,!0),M=n().customIconIdx),T.custom!=x&&(x=T.custom,E=x?T:k),oe(A,a().camera.getMatrix(E.x,E.y,E.baseScale*E.scale,1,E.rotX,E.rotY,E.rotZ,0,1,1,!0).join(","),!0))};let $=ne(!1);function P(){d._markers?.noMarkerActions||(oe($,!0),a(a().openedView=void 0,!0),a().state.marker.set(void 0),o.open(e.targetId,{vector:v}))}let L=ne(!1);const C={coords:T,settings:n()};I(),pr(()=>{C.el=Ai(w),Ai(w)._iface=C,o.dispatchEvent(new CustomEvent("wp-print",{detail:C}));const t=a().state.view.subscribe(I);return()=>t()});const R=Ht(()=>n().i18n?.[i()]?.title||u?.i18n?.[i()]?.title),D=Ht(()=>l?.icons?.[n().customIconIdx??-1]);var F=ji(),O=xe(F),z=t=>{var i=dc();let s;var n=_e(i);{let t=Ht(()=>Ai(D)?void 0:"arrow-up"),e=Ht(()=>Ai(R)??kt(Wn,"$i18n",r).waypointFollow);oa(n,{get type(){return Ai(t)},get icon(){return Ai(D)},onclick:P,onfocus:S,get title(){return Ai(e)}})}q(i),gs(i,t=>oe(w,t),()=>Ai(w)),Ue(()=>{Yr(i,`--matrix: matrix3d(${Ai(A)??""})`),as(i,"id",`w-${e.targetId}`),s=qr(i,1,"micrio-waypoint",null,s,{clicked:Ai($),active:Ai($),"direction-up":p[1]<0,"direction-down":p[1]>0})}),Rr(3,i,()=>Fn),Gi(t,i)};vr(O,t=>{Ai(L)||t(z)}),Gi(t,F),it(),s()}var mc,fc="5.5.0",pc="https://b.micr.io/",gc=["ttBWO","IicaE","KLTce","xjQrB","pfhXT","rNIPa","rdFIY","mvRXc"],vc={b64:_b,ugz:_u},wc="micrio-muted",bc={id:"",version:fc,path:pc,width:0,height:0,tileSize:1024,lang:"en",settings:{camspeed:1,view:[0,0,1,1],restrict:[0,0,1,1],focus:[.5,.5],zoomLimit:1,fullscreen:!0,hookEvents:!0,hookScroll:!0,hookPinch:!0,hookDrag:!0,minimap:!0,doTourJumps:!0,audio:!0,startVolume:1,mutedVolume:0,_markers:{showTitles:!1,popupAnimation:{duration:200,x:-50},zoomOutAfterClose:!0},ui:{controls:{cultureSwitch:!0}},_360:{},_meta:{}}},yc={STRINGS:{id:{r:!0},lang:{r:!0},"data-thumb":{f:"thumbSrc"},"data-title":{r:!0},"data-format":{r:!0},"data-extension":{r:!0,f:"tileExtension"},"data-tiles":{r:!0,f:"tilesId"},"data-path":{r:!0},"data-inittype":{f:"initType"},"data-start":{f:"gallery.startId"},"data-gallery":{f:"gallery.archive"},"data-gallery-sort":{f:"gallery.sort"},"data-iiif":{r:!0,f:"iiifManifest"},"data-grid":{r:!0},"data-gallery-type":{f:"gallery.type"}},BOOLEANS:{"data-static":{},muted:{f:"audio",n:!0},"data-png":{r:!0,f:"isPng"},"data-webp":{r:!0,f:"isWebP"},"data-dz":{r:!0,f:"isDeepZoom"},"data-is360":{r:!0},"data-no-externals":{f:"noExternals"},"data-skipmeta":{f:"skipMeta"},"data-force-data-refresh":{f:"forceDataRefresh"},"data-keeprendering":{f:"keepRendering"},"data-coverlimit":{f:"limitToCoverScale"},"data-events":{f:"hookEvents"},"data-keys":{f:"hookKeys"},"data-zooming":{f:"noZoom",n:!0},"data-scroll-zoom":{f:"hookScroll"},"data-pinch-zoom":{f:"hookPinch"},"data-dragging":{f:"hookDrag"},"data-two-finger-pan":{f:"twoFingerPan"},"data-control-zoom":{f:"controlZoom"},"data-ui":{f:"noUI",n:!0},"data-gtag":{f:"noGTag",n:!0},"data-controls":{f:"noControls",n:!0},"data-logo":{f:"noLogo",n:!0},"data-logo-org":{f:"noOrgLogo",n:!0},"data-toolbar":{f:"noToolbar",n:!0},"data-show-info":{f:"showInfo"},"data-social":{},"data-fullscreen":{},"data-minimap":{},"data-minimap-hide":{f:"alwaysShowMinimap",n:!0},"data-normalize-dpr":{f:"zoomLimitDPRFix"},"data-grid-clickable":{f:"gridClickable"},"data-gallery-spreads":{f:"gallery.isSpreads"},"data-freemove":{f:"freeMove"},"data-force-path":{f:"forceInfoPath",r:!0}},NUMBERS:{"data-version":{r:!0},height:{r:!0},width:{r:!0},volume:{f:"startVolume"},"data-tilesize":{r:!0,f:"tileSize"},"data-camspeed":{},"data-zoomlimit":{f:"zoomLimit"},"data-minimap-height":{f:"minimapHeight"},"data-minimap-width":{f:"minimapWidth"},"data-mutedvolume":{f:"mutedVolume"},"data-width-cm":{f:"cmWidth"},"data-height-cm":{f:"cmHeight"},"data-gallery-cover-pages":{f:"gallery.coverPages"},lazyload:{dN:0},"data-elasticity":{f:"dragElasticity"},"data-skip-base-levels":{f:"skipBaseLevels"},"data-watermark-opacity":{f:"watermarkOpacity"}},ARRAYS:{"data-focus":{},"data-view":{}}};!function(t){let e;let i;(e||(e=t.Grid||(t.Grid={}))).GridActionType=function(t){return t[t.focus=0]="focus",t[t.flyTo=1]="flyTo",t[t.focusWithTagged=2]="focusWithTagged",t[t.focusTagged=3]="focusTagged",t[t.reset=4]="reset",t[t.back=5]="back",t[t.switchToGrid=6]="switchToGrid",t[t.filterTourImages=7]="filterTourImages",t[t.nextFadeDuration=8]="nextFadeDuration",t}({}),(i||(i=t.Camera||(t.Camera={}))).TimingFunction=function(t){return t[t.ease=0]="ease",t[t["ease-in"]=1]="ease-in",t[t["ease-out"]=2]="ease-out",t[t.linear=3]="linear",t}({})}(mc||(mc={}));var kc,Tc=class{get e(){return this.image.wasm.e}constructor(t){if(this.image=t,this.center=[0,0,1],this.view=[0,0,1,1],this.trueNorth=.5,this.aniDoneAdd=[],this.cooToArea=(t,e,i)=>({x:i[0]+t*(i[2]-i[0]),y:i[1]+e*(i[3]-i[1])}),this.getView=()=>this.view,this.getViewRaw=()=>this._view,this.getViewLegacy=()=>{if(this.e)return[this._view[0]-this._view[2]/2,this._view[1]-this._view[3]/2,this._view[0]+this._view[2]/2,this._view[1]+this._view[3]/2]},this.getCoo=(t,e,i=!1,r=!1)=>this.getCooDirect(t,e,i,r).slice(0).map(t=>Math.round(1e6*t)/1e6),this.getXY=(t,e,i=!1,r,s,n)=>this.getXYDirect(t,e,{abs:i,radius:r,rotation:s,noTrueNorth:n}).slice(0),this.getScale=()=>this.center[2]??1,this.setScale=t=>this.setCoo(this.center[0],this.center[1],t),this.getCoverScale=()=>this.e?._getCoverScale(this.image.ptr)??1,this.getMinScale=()=>this.e?._getMinScale(this.image.ptr)??.1,this.isZoomedIn=()=>1==this.e?._isZoomedIn(this.image.ptr),this.isZoomedOut=(t=!1)=>1==this.e?._isZoomedOut(this.image.ptr,t),this.getCoverLimit=()=>!!this.e?._getCoverLimit(this.image.ptr),this.flyToView=(t,e={})=>new Promise((i,r)=>{if(!this.e)return r(new Error("Wasm not ready"));let{centerX:s,centerY:n,width:a,height:o}=sn.toCenterJSON(t);if(2==e.margin?.length&&(s+=e.margin[0],n+=e.margin[1],a-=2*e.margin[0],o-=2*e.margin[1]),e.area){const t=this.cooToArea(s,n,e.area);s=t.x,n=t.y,a*=e.area[2]-e.area[0],o*=e.area[3]-e.area[1]}if(e.prevView){const t=sn.toCenterJSON(e.prevView);this.e._setStartView(this.image.ptr,t.centerX,t.centerY,t.width,t.height)}if(this.image.$settings.omni?.frames){const i=this.image.$settings.omni.layers?.length??1,r=this.image.$settings.omni.frames/i;if(null==e.omniIndex){const i=t[4]?t[4]:Array.isArray(t)&&void 0!==t[5]?t[5]:void 0;void 0!==i&&(e.omniIndex=Math.round(Ws(i/(2*Math.PI))*r))}null!=e.omniIndex&&(e.omniIndex=Ws(e.omniIndex,r))}const c=this.e._flyTo(this.image.ptr,s,n,a,o,e.duration??-1,e.speed??-1,e.progress??0,!!e.isJump,!!e.limit,!!e.limitZoom,e.omniIndex??0,mc.Camera.TimingFunction[e.timingFunction??"ease"],performance.now());this.image.wasm.render(),0==c?i():this.setAniPromises(i,r)}),this.flyToFullView=(t={})=>this.flyToCoo([.5,.5,this.getMinScale()],t),this.flyToCoverView=(t={})=>{const e=this.image.$settings.focus??[.5,.5];return e[2]=this.getCoverScale(),this.flyToCoo(e,t)},this.flyToCoo=(t,e={})=>new Promise((i,r)=>{if(!this.e)return r(new Error("Wasm not ready"));e.duration=this.e._setCoo(this.image.ptr,t[0],t[1],t[2]||this.center[2],e.duration??-1,e.speed??-1,e.limit??!1,mc.Camera.TimingFunction[e.timingFunction??"ease"],performance.now()),this.image.wasm.render(),0==e.duration?i():this.setAniPromises(i,r)}),this.zoom=(t,e=0,i=void 0,r=void 0,s=1,n=!1)=>new Promise((a,o)=>{if(!this.e)return o(new Error("Wasm not ready"));const c=this.getXY(this.center[0],this.center[1]);if(null==i&&(i=c[0]),null==r&&(r=c[1]),this.image.album&&!this.image.album.hooked)return a();e=this.e._zoom(this.image.ptr,t,i,r,e,s,n,performance.now()),this.image.wasm.render(),0==e?a():this.setAniPromises(a,o)}),this.zoomIn=(t=1,e=250,i=1)=>this.zoom(200*-t,e,void 0,void 0,i).catch(()=>{}),this.zoomOut=(t=1,e=250,i=1)=>{const r=this.image.wasm.micrio.canvas.viewport,s=r.width/r.height,n=this.image.$info.width/this.image.$info.height;return this.zoom(t*(400/Math.max(1,s/n/2)),e,void 0,void 0,i).catch(()=>{})},this.getDirection=()=>this.e?._getYaw(this.image.ptr)??0,this.getPitch=()=>this.e?._getPitch(this.image.ptr)??0,!t.is360){const e=t.state.$view;e&&t.$info?.width&&Si().then(()=>this.setView(e))}}assign(t,e,i,r){this._view=t,this._xy=e,this._coo=i,this._mat=r}viewChanged(){const t=this._view,e=this.center.join(","),i=this.getCoo(0,0);this.view[0]=t[0]-t[2]/2,this.view[1]=t[1]-t[3]/2,this.view[2]=t[2],this.view[3]=t[3],this.center[0]=t[0],this.center[1]=t[1],this.center[2]=i[2],this.image.is360&&(this.center[3]=i[3],this.center[4]=i[4]),this.image.isOmni&&(this.center[5]=this.image.swiper?.currentIndex),(this.center.join(",")!=e||this.image.wasm.micrio.canvas.resizing||this.image.wasm.areaAnimating(this.image.ptr))&&this.image.state.view.set(this.view)}getXYDirect(t,e,i={}){const r=this.image.is360&&!i.noTrueNorth?.5-(this.image.$settings._360?.trueNorth??.5):0;return this.e._getXY(this.image.ptr,t-r,e,!0===i.abs,i.radius,i.rotation),this._xy}getCooDirect(t,e,i=!1,r=!1){if(i){const i=this.image.wasm.micrio.getBoundingClientRect();t-=i.left,e-=i.top}return this.e._getCoo(this.image.ptr,t,e,!0===i,!0===r),this._coo}setView(t,e={}){if(!this.e)return;let{centerX:i,centerY:r,width:s,height:n}=sn.toCenterJSON(t);if(e.area){const t=this.cooToArea(i,r,e.area);i=t.x,r=t.y,s*=e.area[2]-e.area[0],n*=e.area[3]-e.area[1]}this.e._setView(this.image.ptr,i,r,s,n,!!e.noLimit,!1,e.correctNorth),e.noRender||this.image.wasm.render()}setCoo(t,e,i=this.center[2]??1){this.e&&(this.e._setCoo(this.image.ptr,t,e,i,0,0),this.image.wasm.render())}getMatrix(t,e,i,r,s,n,a,o,c,l,h){return this.e?(this.e._getMatrix(this.image.ptr,t,e,i,r,s||0,n||0,a||0,o||0,c??1,l??1,h),this._mat):new Float32Array(16)}setMinScale(t){this.e?._setMinScale(this.image.ptr,t)}setMinScreenSize(t){this.image.album||this.e?._setMinSize(this.image.ptr,Math.max(0,Math.min(1,t??1)))}setLimit(t){if(!this.e)return;const e=sn.rectToCenterJSON(t);this.e._setLimit(this.image.ptr,e.centerX,e.centerY,e.width,e.height),this.image.wasm.render()}setCoverLimit(t){this.e&&this.e._setCoverLimit(this.image.ptr,!!t)}set360RangeLimit(t=0,e=0){this.e&&(this.e._set360RangeLimit(this.image.ptr,t,e),this.image.wasm.render())}setAniPromises(t,e){this.aniDone=t,this.aniAbort=e}pan(t,e,i=0,r={}){this.e&&(this.e._pan(this.image.ptr,t,e,i,!!r.noLimit,performance.now()),(i>0||r.render)&&this.image.wasm.render())}stop(){this.e&&this.e._aniStop(this.image.ptr)}pause(){this.e&&this.e._aniPause(this.image.ptr,performance.now())}resume(){this.e&&(this.e._aniResume(this.image.ptr,performance.now()),this.image.wasm.render())}aniIsKinetic(){return!!this.e?._isKinetic(this.image.ptr)}setDirection(t,e){this.e&&(this.e._setDirection(this.image.ptr,t,e),this.image.wasm.render())}setArea(t,e={}){this.e&&(this.image.opts.isEmbed?this.image.ptr>0&&(this.image.opts.area=t,this.e._setImageArea(this.image.ptr,t[0],t[1],t[2],t[3])):(this.image.opts.area=t,this.e._setArea(this.image.ptr,t[0],t[1],t[2],t[3],!!e.direct,!!e.noDispatch)),e.noRender||this.image.wasm.render())}setRotation(t=0,e=0,i=0){!this.image.opts.isEmbed||this.image.ptr<=0||!this.image.wasm.ready||(this.image.wasm.setImageRotation(this.image.ptr,t,e,i),this.image.wasm.render())}getOmniRotation(){const t=this.image.$settings.omni;return t&&this.e?(this.image.swiper?.currentIndex??0)/((t?.frames??1)/(t?.layers?.length??1))*Math.PI*2:0}getOmniFrame(t){const e=this.image.$settings.omni;if(!e||null==t)return;const i=e.frames/(e.layers?.length??1);return Math.floor(t/(2*Math.PI)*i)}getOmniXY(t,e,i){return this.e?(this.e._getOmniXY(this.image.ptr,t,e,i),this._xy):new Float64Array(5)}setOmniSettings(){const t=this.image,e=t.$settings.omni;e&&this.e&&(t.wasm.setOmniSettings(t.ptr,-e.distance||0,e.fieldOfView??0,e.verticalAngle??0,e.offsetX??0),this.image.state.view.set(this.view))}};!function(t){t.Main=class{get $tour(){return this._tour}get $marker(){return this._marker}constructor(t){this.micrio=t,this.tour=vt(),this.marker=vt(),this.markerHoverId=vt(),this.popup=vt(),this.popover=vt(),this.ui={controls:vt(!0),zoom:vt(!0),hidden:vt(!1)},this.mediaState=new Map,this.tour.subscribe(t=>{"string"!=typeof t&&(this._tour=t)}),this.marker.subscribe(t=>{"string"!=typeof t&&(this._marker=t)})}get(){if(this.micrio.$current)return this.value={id:this.micrio.$current.id,c:this.micrio.canvases.map(t=>t.state.get())},this._tour&&(this.value.t=[this._tour.id],"instance"in this._tour&&this._tour.instance?this.value.t.push(this._tour.instance.currentTime,this._tour.instance.paused?"p":void 0):"steps"in this._tour&&void 0!==this._tour.currentStep&&this.value.t.push(this._tour.currentStep)),this.value}async set(t){if(this.value=t){if(void 0!==t.t?.[1]){const e=t.t[0],i=this.mediaState.get(e);i?(i.currentTime=t.t[1],i.paused="p"==t.t[2]):this.mediaState.set(e,{currentTime:t.t[1],paused:"p"==t.t[2]})}if(t.c?.forEach(t=>{if(void 0!==t[6]&&void 0!==t[7]){const e=t[6],i=this.mediaState.get(e);i?(i.currentTime=t[7],i.paused="p"==t[8]):this.mediaState.set(e,{currentTime:t[7],paused:"p"==t[8]})}}),t.t&&await this.setTour(t.t[0]),this.micrio.$current?.id!=t.id&&(this.micrio.open(t.id),this.micrio.$current&&await en(this.micrio.$current.data,{allowUndefined:!0})),this.micrio.canvases.forEach(e=>{e.state.set(t.c.find(t=>t[0]==e.id))}),t.t)return this.setTour(t.t[0],t.t[1]);{const e=t.c.find(e=>e[0]==t.id);e&&!e[5]&&this.micrio.$current&&this.micrio.$current.camera.flyToView(e.slice(1,5),{speed:2}).catch(()=>{})}}}async setTour(t,e){if(!this.micrio.$current)return;const i=await en(this.micrio.$current.data,{allowUndefined:!0});if(i){const r=i.markerTours?.find(e=>e.id==t)||i.tours?.find(e=>e.id==t);r&&"steps"in r&&void 0!==e&&(r.initialStep=e),this._tour?.id!=t&&this.tour.set(r)}}};t.Image=class{get $view(){return this._view}get $marker(){return this._marker}constructor(t){this.image=t,this.view=vt(void 0),this.marker=vt(void 0),this.layer=vt(0);const e=t.wasm.micrio;let i,r,s;this.view.subscribe(n=>{this._view=n;const a=n?.toString();if(n&&a&&i!=a){const o={image:t,view:n};i=a;const c=n[2],l=n[3];(!r||!s||Math.abs(c-r+(l-s))>1e-5)&&(e.events.dispatch("zoom",o),r=c,s=l),e.events.dispatch("move",o)}}),this.marker.subscribe(t=>{const i=this._marker;this._marker=t&&"string"!=typeof t?t:void 0,this._marker?e.state.marker.set(this._marker):t||e.state.$marker!=i||e.state.marker.set(void 0)})}hookOmni(){const t=this.image;this.layer.subscribe(e=>{t.ptr<0||!t.wasm.ready||(t.wasm.setActiveLayer(t.ptr,e),t.wasm.render())})}get(){const t=this._marker,e=t?Array.from(this.image.wasm.micrio.state.mediaState).reverse().find(e=>e[0].startsWith(t.id)):null;return[this.image.id,...this._view?this._view.slice(0,4):[0,0,1,1],...t?[t.id,...e?[e[0],e[1].currentTime,e[1].paused?"p":void 0]:[]]:[void 0]].filter(t=>void 0!==t)}set(t){t?.length&&(this.view.set(t.slice(1,4)),t[5]?this._marker?.id!=t[5]&&this.marker.set(t[5]):this._marker&&this.marker.set(void 0))}}}(kc||(kc={}));var _c=new class{constructor(){this.data=new Map,this.db=new Map,this.images=[],this.get=t=>new Promise((e,i)=>{const r=this.db.get(t);if(!r||!this.data.has(r[0]))return i(new Error("Could not get blob: "+t));const s=new FileReader;s.onload=()=>e(JSON.parse(s.result)),s.readAsText(new Blob([new Uint8Array(this.data.get(r[0]),r[1],r[2])]))}),this.getImage=async t=>new Promise((e,i)=>{const r=this.db.get(t);if(!r||!this.data.has(r[0]))return i(new Error("Could not get blob: "+t));const s=new Blob([new Uint8Array(this.data.get(r[0]),r[1],r[2])]);if("createImageBitmap"in self)e(self.createImageBitmap(s));else{let t=this.images.find(t=>!t.src);t||this.images.push(t=new Image),t.onload=()=>{t&&(e(t),requestAnimationFrame(()=>{t&&(URL.revokeObjectURL(t.src),t.src=null)}))},t.src=URL.createObjectURL(s)}})}async load(t,e,i){if(this.data.has(e))return;const r=e.replace(/^.*\//,"").split(".")[0],s=/\/base$/.test(e),n=s||kn(r),a=new XMLHttpRequest,o=await new Promise((r,s)=>{let o=0;a.responseType="arraybuffer",a.onprogress=t=>{o||(o=Number(a.getResponseHeader("Content-Length"))),i?.(Math.min(1,t.loaded/o))},a.onload=()=>{4===a.readyState&&200===a.status?(i?.(1),r(a.response)):s()},a.onerror=s,a.open("GET",t+e+(n?".bin":".mdp")),a.send()});if(!o)return;this.data.set(e,o);const c=s?e.split("/")[0]+"/":"";let l=0;for(;l<o.byteLength&&!(l+32>o.byteLength);){const i=this.parseHeader(new Uint8Array(o,l,32));if(i.name&&i.size>0)this.db.set(t+c+i.name.replace("./",""),[e,l+32,i.size]);else if(0===i.size&&!i.name)break;l+=32+i.size}}parseHeader(t){const e=(new TextDecoder).decode(t),i=t=>e.slice(r,r+=t).replace(/\x00/g,"").trim();let r=0;return{name:i(20),size:parseInt(i(12),8)}}},xc=[],Ec=class t{get $info(){return this.__info}get $settings(){return wt(this.settings)}get $data(){return wt(this.data)}constructor(t,e,i={}){if(this.wasm=t,this.attr=e,this.opts=i,this.uuid=js(),this.__info=qs(bc),this.settings=vt({}),this.data=vt(void 0),this.video=vt(void 0),this.visible=vt(!1),this.ptr=-1,this.baseTileIdx=-1,this.is360=!1,this.isVideo=!1,this.isOmni=!1,this.levels=1,this.dzLevels=0,this.noImage=!1,this.opacity=1,this.viewport=vt(),this.embeds=[],this.isV5=!1,this._loadedData=!1,this.embedElements=new Map,this.state=new kc.Image(this),i.useParentCamera||(this.camera=new Tc(this)),this.id=(e.id??"").replace("https://i.micr.io/",""),this.id.startsWith("external/")){const t=this.id.indexOf("/",this.id.indexOf("/")+1);-1!==t&&(this.id=this.id.substring(0,t+1)+encodeURIComponent(this.id.substring(t+1)))}this.isV5=kn(this.id.split("/")[0]),this.infoBasePath=e.path&&e.forceInfoPath?e.path:void 0,this.dataPath=e.path||this.__info.path,this.isV5&&!e.path&&(this.dataPath="https://r2.micr.io/"),i.secondaryTo?(this.opacity=0,i.area=this.wasm.micrio.canvas.viewport.portrait?[0,1,1,1]:[1,0,1,1],void 0===i.isPassive&&(i.isPassive=!0)):i.area||(i.area=[0,0,1,1]),this.preset=vn(this.id);let r=!1;var s;this.info=(s=t=>{r?t(this.__info):this.load().then(t),r=!0},{subscribe:vt(void 0,s).subscribe});const n=this.wasm.micrio,a=!!this.attr.revision;let o,c=wt(this.visible);i.isEmbed&&!a||this.visible.subscribe(t=>{t!=c&&(c=t,t&&!this._loadedData&&(!a&&this.isV5?(this._loadedData=!0,this.data.set(void 0)):this.loadData()),i.secondaryTo&&(i.isPassive&&(o?(o(),o=null):t&&(o=i.secondaryTo.state.view.subscribe(t=>{t&&!this.camera.aniDone&&this.camera.setView(t,{noLimit:!0})}))),t?n.events.dispatch("splitscreen-start",this):n.events.dispatch("splitscreen-stop",this)),n.visible.update(e=>(t?e.push(this):e.splice(e.indexOf(this),1),e)),t&&n.$current==this&&n.switching.set(!1))}),this.video.subscribe(t=>this._video=t),this.data.subscribe(t=>{t&&((t,e,i,r)=>{t&&(t.revision&&(t.revision=Object.fromEntries(Object.entries(t.revision??{}).filter(t=>Number(t[1])>0))),t.embeds?.forEach(t=>{t.uuid||(t.uuid=t.id??t.micrioId),an(t.video),an(t),r&&(t.area=sn.fromLegacy(t.area))}),t.markers?.forEach(t=>dn(t,e,i,r)),r&&t.tours?.forEach(un),t.music?.items?.forEach(an),t.pages?.forEach(ln))})(t,n.lang,this.isV5,on(this.__info))})}setError(t,e){const i=t instanceof Bs?t.displayMessage:e??(t instanceof Error?t.message:t)??"An unknown error has occurred";throw this.error=i,this.wasm.micrio.printError(t instanceof Bs?t:i),this.wasm.micrio.loading.set(!1),t instanceof Error?t:new Error(i)}async load(){let t=this.__info;const e=this.attr,i=this.wasm.micrio;e.id&&e.width&&(e.settings&&Xs(bc.settings,e.settings,{noOverwrite:!0}),this.__info=t=e);let r=t.iiifManifest||e.iiifManifest;t.isIIIF=this.id.startsWith("http")||"iiif"==t.format;const s=!!e.settings?.forceDataRefresh;let n;if(!this.id||e.width&&e.height&&!r)this.preset?.[1]&&Xs(this.preset[1],t);else{const e=t=>this.setError(t,"string"==typeof t?t:'Image with id "'+this.id+'" not found, published, or embeddable.');Xs(this.preset?.[1]||await(t.isIIIF?gn(this.id):wn(this.id,this.infoBasePath,s).then(e=>(e?.id&&!t.isIIIF&&this.id.split("/").length>=3&&this.id.startsWith("external/")&&(n=e.id.split("/").reverse()[0],(this.isV5=kn(n))&&(this.dataPath=e.path||"https://r2.micr.io/")),e))).catch(e),t),!r&&t.iiifManifest&&(r=t.iiifManifest),t.isIIIF||(t.isIIIF=!!r),r&&Xs(await gn(r).catch(e),t),t.settings?._meta?.noLogo&&(t.settings.noLogo=!0),t.settings?._meta?.noSmoothing&&(t.settings.noSmoothing=!0)}if(t.id.startsWith("https://iiif.micr.io/")&&(t.id=t.id.slice(21)),7==this.id?.length){const e=yn(this.id[1+yn(this.id)%6]);t.is360=!!(e>>4&1)||t.is360,t.isWebP=!(3&e),t.isPng=2==(3&e),e>>3&1&&kn(t.tilesId??this.id)&&(t.format="dz"),t.path||(t.path=`https://${e>>2&1?"eu":"r2"}.micr.io/`)}const a=this.isV5&&this.id.startsWith("i")&&!this.id.includes("/");a&&!t.tilesId&&(t.tilesId=this.id.slice(1));const o=gc.includes(t.id)||t.tilesId&&gc.includes(t.tilesId);if(Xs(e,t),n&&(this.id=t.id=n),this.tileBase=a&&!t.tileBasePath?.includes("micr.io")?t.tileBasePath??"https://b.micr.io/":o||a?pc:t.tileBasePath??t.path??(this.isV5?"https://r2.micr.io/":"https://b.micr.io/"),t.organisation?.baseUrl&&!e.path?(this.dataPath=t.path=t.organisation.baseUrl,a&&!o||(this.tileBase=this.dataPath)):"https://eu.micr.io/"==t.path&&(this.dataPath=t.path),t.settings?.omni&&(this.isOmni=!0,parseFloat(t.version)>=5&&(await _c.load(this.tileBase??this.dataPath,(t.tilesId??t.id)+"/base",t=>i._ui?.setProps?.({loadingProgress:t})).catch(t=>this.setError(t,"Could not find object base package.")),t.settings.gallery||(t.settings.gallery={}),t.settings.gallery.type="omni",t.settings.gallery.archive=t.id)),!t.organisation?.branding||t.settings&&t.settings.noUI||this.loadStyle(this.dataPath+"style/"+t.organisation.slug+".css").then(()=>{const t=getComputedStyle(this.wasm.micrio).getPropertyValue("--micrio-font-family")?.replace(/^'([^']+)'.*$/,"$1");t&&document.fonts.ready.then(()=>{document.fonts.check("16px "+t)||this.loadStyle(`https://fonts.googleapis.com/css2?family=${t}:ital,wght@0,300;0,400;0,500;0,600;0,800;1,300;1,400;1,500;1,600;1,800&display=swap`)})}),t.isIIIF)if(t.sequences&&t.sequences.length)this.parseIIIFSequenceV2(t,!!r);else if("Manifest"==t.type)this.parseIIIFSequenceV3(t);else{const e=(r||("@id"in t?t["@id"]:t.id)).replace("/info.json","");t.path=e.replace(/\/[^/]*$/,""),t.id=e.replace(/^.*\/([^/]*)$/,"$1")}if(t.spacesId&&!i.spaceData&&(i.spaceData="MICRIO_SPACE_DATA"in self?self.MICRIO_SPACE_DATA:await gn("https://i.micr.io/spaces/"+t.spacesId+".json"),1==i.spaceData?.images.length&&delete i.spaceData),t.settings?._360){let e=i.spaceData?.images.find(t=>t.id==this.id)?.rotationY??0;for(;e<0;)e+=2*Math.PI;t.settings._360.trueNorth=(.5+e/Math.PI/2)%1}this.noImage=this.noImage||this.isOmni||!t.id&&!t.tilesId,this.extension=t.tileExtension||t.isPng&&"png"||t.isWebP&&"webp"||"jpg","dz"==t.format&&(t.isDeepZoom=!0),this.is360=!!t.is360,this.isVideo=!!t.isVideo;let c=this.isV5?wt(i._lang):("cultures"in t?void 0:e.lang)??void 0;if(this.isV5){if(t.revision){const e=Object.keys(t.revision);e.length&&!e.includes(c)&&(i.lang=e[0])}}else if(!t.settings?.skipMeta&&"cultures"in t){const e=(t.cultures||"").split(","),r=this.opts.isEmbed||!!this.opts.area,s=t.settings?.onlyPreferredLang||r;c=t.lang&&e.includes(t.lang)?t.lang:s?void 0:e[0],c&&!r&&(i.lang=c)}const l=t.settings;l&&!l?.noExternals&&await Promise.all([l.css?this.loadStyle(l.css.href):null,l.js?this.loadScript(l.js.href,c):null].filter(t=>!!t));for(let d=t.tileSize;d<Math.max(t.width,t.height);d*=2,this.levels++);let h=Math.max(t.width,t.height);do{this.dzLevels++}while((h/=2)>1);return l?.gallery?.archive&&(this.levels-=1-(l.gallery.archiveLayerOffset??0)),this.noImage||(this.thumbSrc=this.getTileSrc(this.levels,0,0)),i.events.dispatch("pre-info",t),this.isV5&&null!=t.revision&&!this.opts.isEmbed?await this.loadData():t.settings?.skipMeta||this.opts.isEmbed||this.isV5||i._lang.subscribe(t=>{!t||!this.id||"cultures"in this.__info&&(this.__info.cultures||"").split(",").includes(t)||(t=void 0),this.data.set(void 0),!t&&this.preset?.[2]&&(t="preset"),t&&this.id&&(this.isV5||(i.state.tour.set(void 0),this.state.marker.set(void 0)),this.preset?.[2]?this.enrichData(this.preset[2]).then(t=>{this.data.set(t),this.preset?.[2]&&(this.preset[2]=void 0)}):gn(this.dataPath+this.id+"/data."+t+".json").catch(()=>{}).then(t=>t&&this.enrichData(t).then(t=>this.data.update(e=>(Xs(t,e||(e={}),{mergeArrays:!0}),e)))))}),t.settings?.micrioSplitLink&&!this.opts.secondaryTo&&i.open({id:t.settings.micrioSplitLink,settings:{hookEvents:!1!==t.settings.secondaryInteractive}},{splitScreen:!0,isPassive:!t.settings.noFollow}),t.settings&&this.settings.set(t.settings),t.watermark&&this.wasm.micrio.webgl.loadWatermark(t.watermark,t.settings?.watermarkOpacity),delete t.settings,this.isOmni&&this.state.hookOmni(),t}async loadData(){const t=this.$settings?.skipMeta||this.__info.settings?.skipMeta;if(this._loadedData||t)return Promise.resolve();this._loadedData=!0;const e=this.preset?.[2]??(this.isV5&&await gn(this.dataPath+this.id+"/data/pub.json",this.__info.settings?.forceDataRefresh).catch(()=>{}));e&&this.enrichData(e).then(t=>this.data.set(t))}getTileSrc(t,e,i,r){const s=this.__info;if(s){if(s.isDeepZoom&&(t=this.dzLevels-t),s.isIIIF){const r=s.tileSize,n=Math.pow(2,t)*r,a=Math.min(s.width,e*n),o=Math.min(s.height,i*n),c=Math.min(s.width-a,n),l=Math.min(s.height-o,n),h=Math.round(Math.min(r,c/n*r)),d=Math.round(Math.min(r,l/n*r));return`${s.path}/${s.id}/${[a,o,c,l].join(",")}/${[h,d].join(",")}/0/default.jpg`}if(s.settings?._360?.video?.src)throw"Video thumb";return`${this.tileBase}${s.tilesId||s.id}/${void 0!==r?r+"/":""}${t}/${e}${s.isDeepZoom?"_":"-"}${i}.${this.extension}`}}loadScript(t,e=""){return new Promise(i=>{if(xc.includes(t)||document.querySelector('script[src="'+t+'"]'))i();else{xc.push(t);const r=document.createElement("script");r.type="text/javascript",r.async=!0,r.defer=!0,r.micrioElement=this.wasm.micrio,r.src=t.replace("$lang",e),r.onload=i,document.head.appendChild(r)}})}loadStyle(t){return new Promise(e=>{if(xc.includes(t)||document.head.querySelector('link[href="'+t+'"]'))e();else{xc.push(t);const i=document.createElement("link");i.setAttribute("type","text/css"),i.setAttribute("rel","stylesheet"),i.setAttribute("href",t),i.onload=e,document.head.appendChild(i)}})}async enrichData(e){if(!e)return e;"error"in e&&(this.__info.error="403"==e.status?"Could not load image data. Are you logged in and do you have the right credentials?":e.error);const i=this.wasm.micrio.lang,r=[];e.markers?.forEach(t=>{if(dn(t,i,!this.isV5,on(this.__info)),t.data?.micrioSplitLink){const e=t.data.micrioSplitLink.split(",").map(t=>t.trim()),i=t.data._micrioSplitLink={micrioId:e[0],markerId:e[1],follows:!!e[2]&&"false"!=e[2]};i.markerId&&r.push(i.micrioId)}}),e.markerTours?.length&&r.push(...e.markerTours.flatMap(t=>t.steps).map(t=>t.split(",")[1]).filter(t=>!!t&&t!=this.id));const s=t=>"autostart"in t&&t.autostart,n=e.markerTours?.find(s)||e.tours?.find(s);n&&(this.$settings.start={type:"steps"in n?"markerTour":"tour",id:n.id});const a=r.filter((t,e)=>r.indexOf(t)==e),o=t=>this.dataPath+(this.isV5?t+"/data/pub.json":t+"/data."+i+".json"),[c,l]=await Promise.all([Promise.all(a.map(t=>gn(o(t)))),Promise.all(a.map(t=>wn(t,this.infoBasePath)))]);c.forEach((t,e)=>{const r=on(l[e]);t?.markers?.forEach(t=>dn(t,i,5==a[e].length,r))});const h=this.wasm.micrio.spaceData;return e.markerTours&&(await Promise.all(e.markerTours.map(t=>bn(this,t,i,e))),h&&(e.markerTours=e.markerTours.filter(t=>!t.steps.find(t=>t.includes(","))))),h?.markerTours&&await Promise.all(h.markerTours.filter(t=>!t.stepInfo).map(t=>bn(this,t,i,e))),e.markers?.forEach(t=>{if(!t.data?._micrioSplitLink)return;const e=t.data?._micrioSplitLink?.markerId;if(e)for(let i=0;i<c.length;i++){const r=c[i]?.markers?.find(t=>t.id==e);if(r)return void(t.data._micrioSplitLink.view=r.view)}}),this.wasm.micrio.events.dispatch("pre-data",{[this.id]:e,...Object.fromEntries(a.map((t,e)=>[t,c[e]]))}),c.forEach((e,i)=>{if(e){const s=this.wasm.images.find(t=>t.id==a[i]);s&&s instanceof t&&!s.$data&&(r=o(s.id),!mn.has(r)&&!fn.has(r))&&s.data.set(e)}var r}),e}parseIIIFSequenceV2(e,i=!1){const r=e.sequences?.[0];if(!r)return;const s="top-to-bottom"==r.viewingDirection,n=r.canvases.map(t=>t.images[0]).map(t=>t.resource);this.noImage=!0,e.width=s?Math.max(...n.map(t=>t.width)):n.reduce((t,e)=>t+e.width,0),e.height=s?n.reduce((t,e)=>t+e.height,0):Math.max(...n.map(t=>t.height));let a=0,o=this.embeds;e.settings||(e.settings={}),i&&n.length>10&&(o=e.gallery=[],e.settings.gallery||(e.settings.gallery={})),n.forEach(i=>{const r=[(1-i.width/e.width)/2,(1-i.height/e.height)/2];o.push(new t(this.wasm,{id:i.service["@id"],width:i.width,height:i.height,isPng:"image/png"==i.format,settings:{}},{area:s?[r[0],a/e.height,1-r[0],(a+i.height)/e.height]:[a/e.width,r[1],(a+i.width)/e.width,1-r[1]]})),a+=s?i.height:i.width})}parseIIIFSequenceV3(e){const i=e.items?.flatMap(t=>t.items?.[0]?.items?.[0]?.body).filter(t=>!!t?.service?.[0]?.id).filter(t=>!!t);if(!i?.length)return;this.noImage=!0,e.width=i.reduce((t,e)=>t+e.width,0),e.height=Math.max(...i.map(t=>t.height));let r=0;const s=e.gallery=[];e.settings||(e.settings={}),e.settings.gallery||(e.settings.gallery={}),i.forEach(i=>{const n=[(1-i.width/e.width)/2,(1-i.height/e.height)/2];s.push(new t(this.wasm,{id:i.service[0].id,width:i.width,height:i.height,isPng:"image/png"==i.format,tileSize:e.tileSize,settings:{}},{area:[r/e.width,n[1],(r+i.width)/e.width,1-n[1]]})),r+=i.width})}addEmbed(e,i,r={}){const s=i.slice(0),n=new t(this.wasm,e,{area:s,isEmbed:!0,useParentCamera:r.asImage});return n.camera||(n.camera=this.camera),this.embeds.push(n),void 0===r.opacity&&(r.opacity=1),en(n.info).then(t=>{if(t){if("cover"==r.fit||"contain"==r.fit){const e=this.is360?2:1,i="cover"==r.fit,n=s[2]-s[0],a=s[3]-s[1],o=s[0]+n/2,c=s[1]+a/2,l=n/a*e,h=t.width/t.height;if(i&&h<l||!i&&h>=l){const t=n/h*e;s[1]=c-t/2,s[3]=c+t/2}else{const t=a*h/e;s[0]=o-t/2,s[2]=o+t/2}}this.wasm.addEmbed(n,this,r),this.wasm.render()}}),n}setEmbedMediaElement(t,e){e?this.embedElements.set(t,e):this.embedElements.delete(t)}getEmbedMediaElement(t){return this.embedElements.get(t)}splitStart(){const t=this.wasm.micrio.canvas.viewport.portrait;this.opts.secondaryTo?.camera.setArea(t?[0,0,1,.5]:[0,0,.5,1],{noRender:!0}),this.camera.setArea(t?[0,.5,1,1]:[.5,0,1,1],{noRender:!0}),this.camera.setView(this.__info?.settings?.view??[0,0,1,1]),this.wasm.render()}splitEnd(){const t=this.opts.area;if(!t)return;const e=t[2]-t[0],i=t[3]-t[1];if(Math.round(1e3*e)/1e3==0||Math.round(1e3*i)/1e3==0)return;const r=e>i;this.camera.setArea(r?[0,1,1,1]:[1,0,1,1],{noRender:!0}),this.opts.secondaryTo?.grid&&this.opts.secondaryTo.camera.aniDone||this.opts.secondaryTo?.camera.setArea([0,0,1,1],{noRender:!0}),this.wasm.render()}fadeIn(t=!1){this.wasm.fadeImage(this.ptr,1,t),this.wasm.render()}fadeOut(t=!1){this.wasm.fadeImage(this.ptr,0,t),this.wasm.render()}},Sc=class{constructor(t,e,i,r,s){this.wasm=t,this.image=e,this.embed=i,this.paused=r,this.moved=s,this.ism3u=!1,this.hlsPlayer=void 0,this.usVid=void 0,this.vidRepeatTo=void 0,this.placeTo=void 0,this.autoplay=!0,this._vid=void 0,this.isMounted=!0,this.events={play:()=>this.setPlaying(!0),pause:()=>this.setPlaying(!1),playing:()=>{!this.image._video&&this._vid&&("requestVideoFrameCallback"in this._vid?this._vid.requestVideoFrameCallback(()=>{this._vid&&this.isMounted&&(this.image.video.set(this._vid),this.wasm.render())}):this.image.video.set(this._vid))},canplayEvt:Js.iOS?"loadedmetadata":"canplay",canplay:()=>{this._vid&&this.isMounted&&(this.autoplay&&!this.paused?(this._vid.play().catch(t=>console.warn("WebGL Embed video play() failed on canplay:",t)),this.moved()):this.embed.hideWhenPaused||(this.setPlaying(!0),Si().then(()=>{this.setPlaying(!1),setTimeout(()=>this._vid?.remove(),50)})))}},this.ism3u=!!i.video?.streamId&&!i.video?.transparent,this._vid=e._video,this.autoplay=i.video?.autoplay??!0;let n=!0;this.usVid=this.image.visible.subscribe(t=>{clearTimeout(this.placeTo),this.placeTo=t?setTimeout(()=>{this.isMounted&&(this._vid?(this.hook(),this.autoplay&&!this.paused&&this._vid.play().catch(t=>console.warn("WebGL Embed video play() failed",t))):this.load())},n?0:100):setTimeout(()=>this._vid?.pause(),0),n=!1})}unmount(){this.isMounted=!1,clearTimeout(this.placeTo),clearTimeout(this.vidRepeatTo),this._vid?.pause(),this.unhook(),this.usVid?.()}setPlaying(t){this._vid&&(this.paused=!t,t?this._vid.dataset.playing="1":delete this._vid.dataset.playing,this.wasm.setImageVideoPlaying(this.image.ptr,t),this.embed.hideWhenPaused&&this.wasm.fadeImage(this.image.ptr,t?1:0),t&&this.wasm.render())}load(){if(!this.embed.video||this._vid)return;const t=this.ism3u?`https://videodelivery.net/${this.embed.video.streamId}/manifest/video.m3u8`:this.embed.video.src;t?(this._vid=document.createElement("video"),this._vid.crossOrigin="anonymous",this._vid.playsInline=!0,this._vid.width=this.embed.width,this._vid.height=this.embed.height,this._vid.muted=this.embed.video.muted,this.hook(),this.ism3u&&("MediaSource"in window||"ManagedMediaSource"in window)?tn("https://r2.micr.io/hls-1.6.15.min.js",void 0,"Hls"in window?{}:void 0).then(()=>{this.hlsPlayer=new window.Hls({abrEwmaDefaultEstimate:1e7,abrEwmaDefaultEstimateMax:5e7}),this.hlsPlayer.loadSource(t),this._vid&&this.hlsPlayer.attachMedia(this._vid)}).catch(t=>console.error("[Micrio GL Embed] Failed to load HLS.js:",t)):this._vid.src=t):console.error("[Micrio GL Embed] No video source found for embed:",this.embed.id)}hook(){if(!this.embed.video||!this._vid)return;const t=this.embed.video.loopAfter;this.embed.video.loop&&t?(this._vid.loop=!1,this._vid.onended=()=>{this.setPlaying(!1),this.vidRepeatTo=setTimeout(()=>this._vid?.play().catch(t=>console.warn("WebGL Embed video loop play() failed:",t)),1e3*t)},this._vid.onplay=()=>this.setPlaying(!0)):(this._vid.loop=this.embed.video.loop,this._vid.onended=null,this._vid.onplay=null),this._vid.parentNode||this.autoplay||this.ism3u||(this._vid.setAttribute("style","opacity:0;position:absolute;top:0;left:0;transform-origin:left top;transform:scale(0.1);pointer-events:none;"),document.body.appendChild(this._vid)),this._vid.addEventListener("play",this.events.play),this._vid.addEventListener("pause",this.events.pause),this._vid.addEventListener("playing",this.events.playing,{once:!0}),this._vid.addEventListener(this.events.canplayEvt,this.events.canplay,{once:!0})}unhook(){this._vid&&(this._vid.removeEventListener("play",this.events.play),this._vid.removeEventListener("pause",this.events.pause),this._vid.removeEventListener("playing",this.events.playing),this._vid.removeEventListener(this.events.canplayEvt,this.events.canplay),this._vid.onended=null,this._vid.onplay=null)}},Ac=Wi('<img alt="Embed" data-scroll-through="" class="micrio-embed"/>'),Mc=Wi('<button data-scroll-through="" aria-label="embed-button" class="micrio-embed"></button>');function Ic(t,e){et(e,!0);const i=()=>kt(a,"$current",r),[r,s]=_t(),n=Q("micrio"),{current:a,wasm:o,canvas:c,_lang:l}=n;let h=ys(e,"embed",15);h().src?.startsWith("/r2")&&h(h().src="http://localhost:6100"+h().src,!0);const d=i(),u=d.$info;h().uuid||h(h().uuid=js(),!0);const m=h().uuid,f=d.is360,p=h().video?.autoplay??!0;let g=d.embeds.find(t=>t.uuid==m||t.$info?.title==m);const v=window.matchMedia("(dynamic-range: high)").matches||Js.OSX,b=h().area,y=h().src?.toLowerCase().endsWith(".svg"),k=!(!h().width||!h().height)&&h().width*h().height<Math.pow(1024,2),T=/iPhone OS 14_/i.test(navigator.userAgent),_="data-embeds-inside-gl",x=n.getAttribute(_),E=!(y||T||!v&&!n.hasAttribute(_)&&h().video||"false"==x||(!h().micrioId||k&&h().src)&&(!h().video||h().video.controls||h().video.transparent)),S=!h().clickAction&&!h().frameSrc&&!e.marker,A="href"==h().clickAction?h().clickTarget:void 0,M=A&&h().clickTargetBlank;let I=ne(ue(b[2])),$=ne(ue(b[3])),P=ne(b[0]+b[2]/2),L=ne(b[1]+b[3]/2),C=ne(ue(h().scale||1)),R=ne(ue(h().rotX??0)),D=ne(ue(h().rotY??0)),F=ne(ue(h().rotZ??0)),O=ne(ue(h().scaleX??1)),z=ne(ue(h().scaleY??1)),N=ne(""),V=ne(0);function U(){const t=h().area;oe(I,t[2],!0),oe($,t[3],!0),oe(P,t[0]+Ai(I)/2),oe(L,t[1]+Ai($)/2),oe(C,h().scale||1,!0),oe(R,h().rotX??0,!0),oe(D,h().rotY??0,!0),oe(F,h().rotZ??0,!0),oe(O,h().scaleX??1,!0),oe(z,h().scaleY??1,!0);const e=E&&h().micrioId&&h().width,i=e?10:1;let r=Ai(I)*u.width/(h().width??100)/(E?h().width?Ai(I):1:Ai(C))*(f?Math.PI/2:1);const s=[];e&&h().width&&(r=Ai(I)/(h().width/u.width)*i*(f?Math.PI/2:1),s.push(`width:${h().width/i}px`)),s.push(`--ratio:${Ai(I)/Ai($)*u.width/u.height};--scale:${r}`),y&&oe(N,Ai(N)+`height:${h().height}px`),oe(N,s.join(";"),!0),h().video&&(h().video.width>h().video.height?oe(V,Math.min(h().video.width,Ai(I)*u.width,2048),!0):oe(V,Math.min(h().video.height,Ai($)*u.height,2048)/(h().video.height/h().video.width)))}U();const B=Ht(()=>Math.round(Ai(I)*u.width)),W=Ht(()=>Math.round(Ai($)*u.height));let q,X=ne(!1),Y=ne(0),j=ne(0),G=ne(""),H=ne(!1),Z=ne("");function J(){if(!d.wasm.ready)return;const t=d.camera.getXYDirect(Ai(P),Ai(L));if((t=>{var e=w(t,3);oe(Y,e[0],!0),oe(j,e[1],!0),q=e[2]})(t),f&&(oe(G,d.camera.getMatrix(Ai(P),Ai(L),Ai(C),1,Ai(R),Ai(D),Ai(F),void 0,Ai(O),Ai(z)).join(","),!0),oe(H,t[3]>2)),oe(Z,(f?`transform:matrix3d(${Ai(G)});`:`--x:${Ai(Y)}px;--y:${Ai(j)}px;--s:${q};`)+(void 0!==h().opacity&&1!==h().opacity?`--opacity:${h().opacity};`:"")),(h().video?.pauseWhenSmallerThan||h().video?.pauseWhenLargerThan)&&Ai(B)){const t=Ai(X);oe(X,function(){if(!h().video?.pauseWhenSmallerThan&&!h().video?.pauseWhenLargerThan)return!p;const t=q?Math.max(Ai(B)*q/c.viewport.width,Ai(W)*q/c.viewport.height):0;return!!(h().video.pauseWhenSmallerThan&&t<h().video.pauseWhenSmallerThan||h().video.pauseWhenLargerThan&&t>h().video.pauseWhenLargerThan)}(),!0),Ai(nt)?._vid&&Ai(X)!=t&&(Ai(X)?Ai(nt)._vid.pause():(d?.$settings?.embedRestartWhenShown&&(Ai(nt)._vid.currentTime=0),Ai(nt)._vid.play()))}}function K(){const t="markerId"==h().clickAction?h().clickTarget:e.marker?.id;t&&i()&&!A&&i().state.marker.set(t)}function tt(t){if(t&&"detail"in t){const e=t.detail;for(const t in e)h(h()[t]=e[t],!0)}U(),J()}const rt=vt(!1);h().video&&(h().video.controls||h(h().video.muted=!0,!0));const st=E&&!!h().video;let nt=ne(void 0);const at=!E||!!h().clickAction;let ot=ne(void 0);Oe(()=>{h().video&&h().id&&i()&&i().setEmbedMediaElement(h().id,Ai(ot)??Ai(nt)?._vid)});const ct=Ht(()=>h().video||E?Ai(V):Ai(B)),lt=Ht(()=>h().video?Ai(V)/(h().video.width/h().video.height):Ai(W)),ht=Ht(()=>Ai(B)/Ai(ct));pr(()=>{const t=[];return E&&function(){const t=h().hideWhenPaused?.01:h().opacity??1,e=[h().area[0],h().area[1],h().area[0]+h().area[2],h().area[1]+h().area[3]];g&&g.ptr>=0?(g.camera.setArea(e),g.camera.setRotation(h().rotX,h().rotY,h().rotZ),o.fadeImage(g.ptr,t)):g=d.addEmbed({id:h().video?h().id:h().micrioId,title:m,width:h().width,height:h().height,isPng:h().isPng,isWebP:h().isWebP,isDeepZoom:h().isDeepZoom,path:u.tileBasePath??u.path,isSingle:!!h().video,isVideo:!!h().video,settings:{_360:{rotX:Ai(R),rotY:Ai(D),rotZ:Ai(F)}}},e,{opacity:t,asImage:!1}),st&&en(g.visible,{targetValue:!0}).then(()=>{oe(nt,new Sc(o,g,h(),Ai(X),J),!0)}),o.render()}(),(at||h().video?.pauseWhenSmallerThan||h().video?.pauseWhenLargerThan)&&t.push(d.state.view.subscribe(J)),()=>{for(Ai(nt)?.unmount(),g&&g.ptr>=0&&(o.fadeImage(g.ptr,0),o.render()),h().video&&h().id&&i()&&i().setEmbedMediaElement(h().id);t.length;)t.shift()?.()}});var dt=ji(),ut=xe(dt),mt=t=>{var i=ji();Fr(xe(i),()=>A?"a":"div",!1,(t,i)=>{Or(t,(t,e)=>{return r=e,(i=t).addEventListener("change",r),{destroy:()=>i.removeEventListener("change",r)};var i,r},()=>tt),cs(t,()=>({id:h().id?"e-"+h().id:void 0,style:Ai(Z),role:A?void 0:"figure",onclick:K,onkeypress:K,href:A,target:A&&M?"_blank":null,class:"",[Hr]:{"embed-container":!0,embed3d:f,"no-events":S,behind:f&&Ai(H)}}),void 0,void 0,void 0,"micrio-embed");var s=ji(),n=xe(s),a=t=>{{let e=Ht(()=>h().video.streamId&&!h().video.transparent?"cfvid://"+h().video.streamId:h().video.src),i=Ht(()=>h().video.muted?0:1),r=Ht(()=>!Ai(X)&&h().video.autoplay),s=Ht(()=>h().video.transparent&&h().video.hasH265);Ha(t,{get forcePause(){return Ai(X)},get src(){return Ai(e)},get width(){return Ai(ct)},get height(){return Ai(lt)},get frameScale(){return Ai(ht)},get controls(){return h().video.controls},get destroying(){return rt},get loop(){return h().video.loop},get loopDelay(){return h().video.loopAfter},get volume(){return Ai(i)},get autoplay(){return Ai(r)},get hasTransparentH265(){return Ai(s)},get _media(){return Ai(ot)},set _media(t){oe(ot,t,!0)}})}},o=t=>{Ha(t,{get src(){return h().frameSrc},get width(){return Ai(B)},get height(){return Ai(W)},get frameScale(){return h().scale},get autoplay(){return h().autoplayFrame},get destroying(){return rt}})},c=t=>{var e=Ac();Ue(()=>{as(e,"src",h().src),Yr(e,Ai(N)),as(e,"width",y?h().width:void 0),as(e,"height",y?h().height:void 0)}),Gi(t,e)},d=t=>{var i=Mc();Ue(()=>{Yr(i,Ai(N)),as(i,"title",h().title||e.marker?.i18n?.[kt(l,"$_lang",r)]?.title)}),Gi(t,i)};vr(n,t=>{h().video&&!E?t(a):h().frameSrc?t(o,1):!E&&h().src?t(c,2):t(d,-1)}),Gi(i,s)}),Gi(t,i)};vr(ut,t=>{at&&(Ai(G)||Ai(Y)||Ai(j))&&t(mt)}),Gi(t,dt),it(),s()}var $c=Xi("<line></line>"),Pc=Wi('<article class="micrio-markers"><label> </label></article>'),Lc=Wi('<article class="micrio-markers"><label> </label></article>'),Cc=Wi('<svg class="micrio-markers"></svg> <aside class="micrio-markers"><section class="micrio-markers"></section> <section class="micrio-markers"></section></aside>',1),Rc=Wi("<!> <!>",1),Dc=Wi("<div><!> <!></div>"),Fc=Wi("<!> <!> <!> <!>",1);function Oc(t,e){et(e,!0);const i=()=>kt(m,"$settings",c),r=()=>kt(E,"$inView",c),s=()=>kt(x,"$hoveredId",c),n=()=>kt(g,"$switching",c),a=()=>kt(d,"$data",c),o=()=>kt(v,"$_lang",c),[c,l]=_t();let h=ys(e,"image",15);const{data:d,info:u,settings:m}=h(),f=h().state.marker,p=h().wasm.micrio,{switching:g,_lang:v,state:w}=p,b=p.canvas.isMobile,y=p.canvases[0]?.grid,k=y?.focussed,T=y?.markersShown,_=i().clusterMarkerRadius??16,x=w.markerHoverId,E=vt([]);tt("inView",E);const S=i()._markers??{},A=i().omni,M=!(S.noTitles||A?.sideLabels||!S.showTitles&&5!=h().id.length);let I=!1;function $(t){t?"string"==typeof t||h().openedView||t.noMarker||!t.view||(h(h().openedView=p.state.$tour&&!("steps"in p.state.$tour)?void 0:qs(h().state.$view),!0),I=!!t.videoTour):h().openedView&&!p.state.$tour&&setTimeout(()=>{Ai(H)||h().camera.aniDone||!h().openedView||h().camera.flyToView((t=>{const e=Math.min(1,t[2]),i=Math.min(1,t[3]),r=e/2,s=i/2;return[Math.max(r,Math.min(1-r,t[0]+t[2]/2))-r,Math.max(s,Math.min(1-s,t[1]+t[3]/2))-s,e,i]})(h().openedView),{speed:i()._markers?.zoomOutAfterCloseSpeed}).catch(()=>{}),h(h().openedView=void 0,!0),I=!1},I?250:10)}let P=!1;w.tour.subscribe(t=>{t&&"steps"in t?(P=!0,t.keepLastStep&&h(h().openedView=void 0,!0)):(t||h().openedView||!P||h().camera.stop(),P=!1)});const L=[];let C=ne(""),R=ne(!1),D=ne(!1);const F=t=>(t=t?.map(t=>Math.round(100*t)/100))&&oe(C,[...L,t[0]?`left: ${t[0]}px`:null,t[1]?`top: ${t[1]}px`:null,`width: ${t[2]}px`,`height: ${t[3]}px`].filter(t=>!!t).join(";")+";");let O=ne(ue([])),z=_,N=ne(ue([]));const V=new Map,U=()=>{const t=function(t,e,i,r){if(!t)return{overlapped:[],clusterMarkers:[]};const s=t,n=[],a=s.length,o=[];for(let c=0;c<a;c++)for(let t=c+1;t<a;t++){if(s[t].tags?.includes("no-cluster"))continue;const r=e.get(s[c].id),a=e.get(s[t].id);if(r&&a&&_n(r,a,i)){o.push(c,t);const e=n.find(e=>e.findIndex(e=>e==c||e==t)>-1);e?e.push(c,t):n.push([c,t])}}return{overlapped:o,clusterMarkers:n.map(t=>t.filter((e,i)=>t.indexOf(e)===i)).map(t=>{let e,i,n,a,o,c;if(r){o=t.reduce((t,e)=>t+s[e].x,0)/t.length,c=t.reduce((t,e)=>t+s[e].y,0)/t.length;const r=.3;e=Math.max(0,o-r/2),n=Math.max(0,c-r/2),i=Math.min(1,o+r/2),a=Math.min(1,c+r/2)}else e=Math.min(...t.map(t=>s[t].view?s[t].view[0]:s[t].x)),i=Math.max(...t.map(t=>s[t].view?s[t].view[0]+s[t].view[2]:s[t].x)),n=Math.min(...t.map(t=>s[t].view?s[t].view[1]:s[t].y)),a=Math.max(...t.map(t=>s[t].view?s[t].view[1]+s[t].view[3]:s[t].y)),o=(e+i)/2,c=(n+a)/2;const l=r?t.reduce((t,e)=>t+(s[e].rotation??0),0)/t.length:void 0,h=r?t.reduce((t,e)=>t+(s[e].radius??1),0)/t.length:void 0;return{title:t.length+"",type:"cluster",view:[e,n,Math.max(.1,i-e),Math.max(.1,a-n)],x:o,y:c,rotation:l,radius:h,id:t.sort((t,e)=>t-e).join(","),data:{},popupType:"none",tags:[]}})}}(Ai(J),V,z,h().isOmni);oe(O,t.overlapped,!0),oe(N,t.clusterMarkers,!0)},B=[];pr(()=>{const t=[];return en(u).then(e=>{if(!e)return;oe(R,!!e.is360);const r=i()._markers;if(!r)return;const s=parseFloat(e.version)>=4.2;r.markerIcon&&L.push(`--micrio-marker-icon: url("${r.markerIcon}")`),r.markerColor&&r.markerColor!=(s?"#ffffff":"#ffbb00")&&L.push("--micrio-marker-color: "+r.markerColor),r.markerSize&&r.markerSize!=(s?"16":"25")&&L.push("--micrio-marker-size: "+(z=Number(r.markerSize))+"px"),t.push(h().viewport.subscribe(F)),i().clusterMarkers&&(t.push(h().state.view.subscribe(U)),t.push(h().data.subscribe(()=>Si().then(U)))),!h().grid&&i()._markers?.zoomOutAfterClose&&t.push(h().state.marker.subscribe($)),h().isOmni&&i().omni?.sideLabels&&!i()._markers?.noTitles&&t.push(b.subscribe(t=>{t&&Ai(D)?function(){for(;B.length;)B.shift()?.()}():t||Ai(D)||(B.push(h().state.view.subscribe(j)),B.push(x.subscribe(j)),B.push(f.subscribe(j))),oe(D,!t)}))}),()=>{for(;t.length;)t.shift()?.()}});const W=t=>!t.noMarker;let X=ne(void 0),Y=ne(ue([]));function j(){Si().then(()=>{if(!Ai(X))return;const t=p.canvas,e=t.element.offsetWidth,i=[];r().forEach(([r,n,a])=>{const o=Ai(X).querySelector('label[for="'+r.id+'"]')?.getBoundingClientRect();o?.width&&o.width>0&&i.push([n*e,a,(n>=.5?o.left:o.right)-t.viewport.left,o.top+o.height/2-t.viewport.top,s()==r.id])}),oe(Y,i,!0)})}const G=(t,e)=>t.i18n?t.i18n[e]?.title:t.title,H=Ht(()=>y&&kt(k,"$focussed",c)!=h()&&T&&wt(T).indexOf(h())<0),Z=Ht(()=>!n()&&p.spaceData?p.spaceData.links.filter(t=>t[0]==h().id||t[1]==h().id).map(t=>({targetId:t[0]==h().id?t[1]:t[0],settings:t[2]?.[h().id]})):void 0),J=Ht(()=>Ai(H)?[]:a()?.markers?.filter(W)),K=Ht(()=>Ai(H)?a()?.markers:a()?.markers?.filter(t=>!W(t))),Q=Ht(()=>Ai(H)?[]:a()?.markers?.filter(t=>t.clickableArea)),rt=Ht(()=>!(!Ai(J)?.length&&!Ai(Z)?.length)),st=Ht(()=>[...r()].sort(([,,t],[,,e])=>t>e?1:t<e?-1:0));var nt=Fc(),at=xe(nt),ot=t=>{var e=Cc(),i=xe(e);yr(i,21,()=>Ai(Y),wr,(t,e)=>{var i=$c();let r;Ue(()=>{as(i,"x1",Ai(e)[0]),as(i,"y1",Ai(e)[1]),as(i,"x2",Ai(e)[2]),as(i,"y2",Ai(e)[3]),r=qr(i,0,"micrio-markers",null,r,{hovered:Ai(e)[4]})}),Gi(t,i)}),q(i);var r=Ee(i,2),n=_e(r);yr(n,21,()=>Ai(st).filter(([,t])=>t<.5),t=>t[0].id,(t,e)=>{var i=Pc(),r=_e(i);let n;var a=_e(r,!0);q(r),q(i),Ue(t=>{as(r,"for",Ai(e)[0].id),n=qr(r,1,"micrio-markers",null,n,{hover:s()==Ai(e)[0].id}),nr(a,t)},[()=>G(Ai(e)[0],o())]),Fi("mouseenter",r,()=>x.set(Ai(e)[0].id)),Fi("mouseleave",r,()=>x.set(void 0)),Gi(t,i)}),q(n);var a=Ee(n,2);yr(a,21,()=>Ai(st).filter(([,t])=>t>=.5),t=>t[0].id,(t,e)=>{var i=Lc(),r=_e(i);let n;var a=_e(r,!0);q(r),q(i),Ue(t=>{as(r,"for",Ai(e)[0].id),n=qr(r,1,"micrio-markers",null,n,{hover:s()==Ai(e)[0].id}),nr(a,t)},[()=>G(Ai(e)[0],o())]),Fi("mouseenter",r,()=>x.set(Ai(e)[0].id)),Fi("mouseleave",r,()=>x.set(void 0)),Gi(t,i)}),q(a),q(r),gs(r,t=>oe(X,t),()=>Ai(X)),Gi(t,e)};vr(at,t=>{Ai(D)&&Ai(st).length&&!kt(f,"$currentMarker",c)&&t(ot)});var ct=Ee(at,2),lt=t=>{var e=ji();yr(xe(e),17,()=>Ai(Q),t=>t.id,(t,e)=>{var i=ji(),r=xe(i),s=t=>{Ic(t,{get embed(){return Ai(e).clickableArea},get marker(){return Ai(e)}})};vr(r,t=>{Ai(e).clickableArea&&t(s)}),Gi(t,i)}),Gi(t,e)};vr(ct,t=>{Ai(Q)&&t(lt)});var ht=Ee(ct,2),dt=t=>{var e=Dc();let i;var r=_e(e),s=t=>{var e=ji();yr(xe(e),17,()=>Ai(Z),t=>t.targetId,(t,e)=>{uc(t,bs({get image(){return h()}},()=>Ai(e)))}),Gi(t,e)};vr(r,t=>{Ai(Z)&&Ai(Z).length&&t(s)});var a=Ee(r,2),o=t=>{var e=Rc(),i=xe(e);yr(i,19,()=>Ai(J),t=>t.id,(t,e,i)=>{{let r=Ht(()=>Ai(O).includes(Ai(i)));hc(t,{get marker(){return Ai(e)},get image(){return h()},get coords(){return V},get overlapped(){return Ai(r)}})}}),yr(Ee(i,2),17,()=>Ai(N),t=>t.id,(t,e)=>{hc(t,{get marker(){return Ai(e)},get image(){return h()}})}),Gi(t,e)};vr(a,t=>{Ai(J)&&t(o)}),q(e),Ue(()=>{Yr(e,Ai(rt)?Ai(C):null),i=qr(e,1,"micrio-markers",null,i,{"show-titles":M,is360:Ai(R),inactive:Ai(H)||Ai(R)&&n()})}),Gi(t,e)};vr(ht,t=>{Ai(rt)&&t(dt)});var ut=Ee(ht,2),mt=t=>{var e=ji();yr(xe(e),17,()=>Ai(K),t=>t.id,(t,e)=>{hc(t,{get marker(){return Ai(e)},get image(){return h()},forceHidden:!0})}),Gi(t,e)};vr(ut,t=>{Ai(K)&&t(mt)}),Gi(t,nt),it(),l()}var zc=Xi('<svg width="100" height="100" class="micrio-progress-circle"><circle fill="transparent" stroke="#e0e0e0" stroke-width="8px" class="micrio-progress-circle"></circle><circle fill="transparent" stroke="#00d4ee" stroke-width="8px" class="micrio-progress-circle"></circle></svg>');var Nc=Wi("<!> <!> <!>",1),Vc=Wi("<!> <!> <!>",1),Uc=Wi("<!> <!>",1),Bc=Wi("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1);var Wc=!self.createImageBitmap,qc=URL.createObjectURL(new Blob(["let controller = null, prevUri = null;\nself.addEventListener('message', e => {\n\t// Handle abort message\n\tif(e.data == 'abort') return controller && controller.abort();\n\t// Create new AbortController for this fetch\n\tcontroller = new AbortController();\n\t// Fetch the image blob\n\tfetch(e.data.src, { signal: controller.signal })\n\t\t.then(r => r.blob())"+(Wc?"\n\t\t// Fallback for older Safari: create Object URL\n\t\t.then(blob => {\n\t\t\t// Revoke previous Object URL to free memory\n\t\t\tURL.revokeObjectURL(prevUri);\n\t\t\t// Post Object URL back\n\t\t\tself.postMessage({src: (prevUri = URL.createObjectURL(blob, {type: e.data.type}))})\n\t\t})":"\n\t\t// If createImageBitmap is supported, use it (preferred)\n\t\t.then(blob => self.createImageBitmap(blob))\n\t\t// Post ImageBitmap back, transferring ownership\n\t\t.then(data => self.postMessage({data:data, src:e.data.src}, [data]))")+"\n\t\t// Handle fetch errors (including abort)\n\t\t.catch(err => self.postMessage({error: e.data.src+': '+err.message, type: err.name}))\n})"],{type:"text/javascript"})),Xc=Math.max(2,Math.min(6,(navigator.hardwareConcurrency||2)-1)),Yc=[],jc=new Map,Gc=new Map,Hc=[],Zc=new Map;for(let Rl=0;Rl<Xc;Rl++){const t=new Worker(qc);t.onmessage=t=>Kc(Rl,t.data.src,t.data.data,t.data.error,t.data.type),jc.set(Rl,t),Wc&&Gc.set(Rl,new Image)}var Jc=t=>new Promise((e,i)=>{Hc.push([t,e,i]),function(){if(!Hc.length)return;let t=0;for(;t<Xc&&Yc.includes(t);t++);if(t>=Xc)return;Yc.push(t);const e=Hc.shift();if(!e)return void Yc.splice(Yc.indexOf(t),1);Zc.set(t,e);const i=jc.get(t);if(!i)return console.error(`[Micrio Texture] Worker ${t} not found!`),e[2]("Internal error: Worker not found"),void Yc.splice(Yc.indexOf(t),1);i.postMessage({src:e[0],type:"image/"+e[0].split(".").pop()})}()});function Kc(t,e,i,r,s){const n=Zc.get(t);if(null!=n)if(Zc.delete(t),setTimeout(()=>{Yc.splice(Yc.indexOf(t),1)},50),r)n[2](r),"AbortError"!=s&&console.error(`[Micrio Texture] Error loading ${n[0]}: ${s} - ${r}`);else if(i)n[1](i);else if(e&&Wc){const i=Gc.get(t);if(!i)return void n[2]("Internal error: Image element fallback not found");i.onload=()=>{n[1](i)},i.onerror=()=>{n[2](`Failed to load image from Object URL: ${e}`)},i.src=e}else n[2](`Worker ${t} sent invalid message.`),console.error(`[Micrio Texture] Worker ${t} sent invalid message for ${n[0]}`);else console.warn(`[Micrio Texture] Received message from worker ${t} but no matching promise found.`)}function Qc(){return Yc.length}function tl(t){const e=[...Zc.entries()].find(e=>e[1][0]==t);if(null==e)return;const i=jc.get(e[0]);i&&i.postMessage("abort")}var el=document.currentScript?.getAttribute("src")?.toString(),il=el?.includes(".safe-wasm.js")?el.replace(".safe-wasm.js",".wasm"):"http://localhost:2000/build/optimized.wasm",rl=vc.ugz?vc.ugz(vc.b64,!0):fetch(il).then(t=>t.arrayBuffer()),sl=class t{static{this._textureBuffer=t.getTextureBuffer(1,1)}setVisibleCb(t,e){this.ptrToImage.get(t)?.visible.set(1===e)}static getTextureBuffer(t,e){const i=new Float32Array(12*t*e),r=1/t,s=1/e;for(let n=0,a=0;a<e;a++)for(let e=0;e<t;e++,n+=12)i[n+3]=i[n+7]=i[n+9]=(i[n+1]=i[n+5]=i[n+11]=a*s)+s,i[n+4]=i[n+8]=i[n+10]=(i[n+0]=i[n+2]=i[n+6]=e*r)+r;return i}constructor(t){this.micrio=t,this.ready=!1,this.memory=new self.WebAssembly.Memory({initial:100,maximum:100}),this.b=this.memory.buffer,this.i=-1,this.c=-1,this.now=-1,this.raf=-1,this.drawing=!1,this.images=[],this.bareBone=!1,this.baseTiles=[],this.drawnSet=new Set,this.prevDrawnSet=new Set,this.tiles=new Map,this.requests=new Map,this.unsubscribe=[],this.cameras=new Map,this.ptrToImage=new Map,this.preventDirectionSet=!1,this._pMatrices=new Map,this.isGallery=!1,this.imports={env:{memory:this.memory,abort:console.error},main:{"console.log":console.log,"console.log2":console.log,"console.log3":console.log,"console.log4":console.log,drawTile:this.drawTile.bind(this),drawQuad:t=>this.micrio.webgl.drawTile(void 0,t),aniAbort:t=>{const e=this.cameras.get(t);e&&(e.aniAbort&&e.aniAbort(),e.aniDoneAdd.length=0,e.aniAbort=e.aniDone=void 0)},aniDone:t=>{const e=this.cameras.get(t);if(e){for(e.aniDone&&e.aniDone();e.aniDoneAdd.length;)e.aniDoneAdd.shift()?.();e.aniAbort=e.aniDone=void 0}},getTileOpacity:t=>this.tiles.get(t)?.opacity||0,setTileOpacity:(t,e=!1,i=1)=>{const r=this.tiles.get(t);return r?(r.opacity<1&&(r.opacity=e?1:r.loadedAt&&r.loadedAt>0?Math.min(1,(this.now-r.loadedAt)/250)*i:0),r.opacity):0},setMatrix:t=>this.micrio.webgl.gl.uniformMatrix4fv(this.micrio.webgl.pmLoc,!1,this._pMatrices.get(t)),setViewport:(t,e,i,r)=>this.micrio.webgl.gl.viewport(Math.floor(t),Math.floor(e),Math.ceil(i),Math.ceil(r)),viewSet:t=>this.cameras.get(t)?.viewChanged(),viewportSet:(t,e,i,r,s)=>{const n=this.ptrToImage.get(t);n&&"camera"in n&&n.viewport.set([e,i,r,s])},setVisible:this.setVisibleCb.bind(this),setVisible2:this.setVisibleCb.bind(this)}},this.addImage=async(t,e,i=!1,r=1)=>en(t.info).then(s=>{if(!s)return;this.images.push(t);const n=t.opts.area??[0,0,1,1],a=t.$settings._360??{};if(t.ptr=i?this.e._addImage(e.ptr,n[0],n[1],n[2],n[3],s.width,s.height,s.tileSize||1024,s.isSingle??!1,s.isVideo??!1,r,a.rotX??0,a.rotY??0,a.rotZ??0,a.scale??1,0):this.e._addChild(e.ptr,n[0],n[1],n[2],n[3],s.width,s.height),this.ptrToImage.set(t.ptr,t),!i){this.bindCamera(t),t.$settings.focus&&this.e._setCoo(t.ptr,t.$settings.focus[0],t.$settings.focus[1],0,0,performance.now());const e=this.e._getPMatrix(t.ptr);this._pMatrices.set(e,new Float32Array(this.b,e+32,16));const i=t.$info.view;i&&"0,0,1,1"!=i.toString()&&this.e._setView(t.ptr,i[0],i[1],i[2],i[3]),this.e._sendViewport(t.ptr)}t.baseTileIdx=this.e.getNumTiles(this.i)-1,this.getTileEntry(t.baseTileIdx).opacity=1,this.baseTiles.push(t.baseTileIdx)}),this.addChild=(t,e)=>this.addImage(t,e),this.deleteAfterSeconds=Js.iOS?5:wt(this.micrio.canvas.isMobile)?30:90,this.render=this.render.bind(this),this.draw=this.draw.bind(this),this.unsubscribe.push(t.current.subscribe(this.setCanvas.bind(this)))}async load(){if(this.i>=0)return;this.i=0;const e=await rl;if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw new Bs("Invalid WebAssembly binary data",{code:Fs,displayMessage:"Failed to load the image viewer engine. Please try refreshing the page."});this.e=(await self.WebAssembly.instantiate(e,this.imports)).instance.exports,this.i=this.e.constructor(),t.segsX=this.e.segsX.value,t.segsY=this.e.segsY.value,t._textureBuffer360=t.getTextureBuffer(t.segsX,t.segsY),this._vertexBuffer=new Float32Array(this.b,this.e.getVertexBuffer(this.i)+32,18),this._vertexBuffer360=new Float32Array(this.b,this.e.getVertexBuffer360(this.i)+32,18*t.segsX*t.segsY),this.unsubscribe.push(this.micrio.barebone.subscribe(t=>this.e.setBareBone(this.i,this.bareBone=t)))}unbind(){for(this.stop();this.unsubscribe.length;)this.unsubscribe.shift()?.();this.requests.forEach(t=>tl(t)),this.requests.clear();for(const[t,e]of this.tiles.entries())e.timeoutId&&clearTimeout(e.timeoutId),this.deleteTile(t);this.tiles.clear(),this.i>0&&this.e.reset(this.i)}getPtr(){return this.i}addCanvas(t){const e=t.$info;if(!e)return;if(t.error)return void this.micrio.loading.set(!1);if(!(t.noImage||e.width&&e.height))throw"Invalid Micrio image size";const i=t.$settings;this.isGallery=!!e.gallery||t.isOmni,i.gallery?.archive&&this.e.setHasArchive(this.i,!0,i.gallery.archiveLayerOffset??0),e.version&&parseFloat(e.version)<=3.1&&this.e.setNoUnderzoom(this.i,!0),e.is360&&(i.limitToCoverScale=!1);const r=!!i.limitToCoverScale,s=r||"cover"==i.initType;t.noImage&&this.micrio.loading.set(!1);const n=[.5,.5],a=i.focus,o=!!e.spacesId;a&&(isNaN(a[0])||null===a[0]||(n[0]=a[0]),isNaN(a[1])||null===a[1]||(n[1]=a[1])),e.is360&&(t.camera.trueNorth=i._360?.trueNorth??.5);const c=i._360?.video,l=e.is360&&c&&(c.src||"video"in c&&c.video),h=!!this.isGallery&&("switch"==i.gallery?.type||"omni"==i.gallery?.type||"swipe-full"==i.gallery?.type),d=i.omni?.layers?.length??1;i.omni&&(i.omni.layerStartIndex=Math.min(d-1,i.omni?.layerStartIndex??0)),t.ptr=this.e._constructor(this.i,e.width,e.height,e.tileSize??1024,e.is360??!1,t.noImage,!(!e.isSingle&&!l),t.opacity,i.freeMove??!1,r,s,i.zoomLimit||1,!1!==i.zoomLimitDPRFix?this.micrio.canvas.getRatio(t.$settings):1,i.camspeed??1,t.camera.trueNorth,h,!!i.gallery?.isSpreads&&"swipe"==i.gallery.type,t.isOmni,i.pinchZoomOutLimit??!1,d,i.omni?.layerStartIndex??0),this.bindCamera(t),t.opts.area&&t.camera.setArea(t.opts.area,{direct:!0,noDispatch:!0,noRender:!0}),i?.restrict&&t.camera.setLimit(i.restrict),i?.crossfadeDuration&&this.setCrossfadeDuration(i.crossfadeDuration),i?.embedFadeDuration&&this.e.setEmbedFadeDuration(this.i,i.embedFadeDuration),void 0!==i?.dragElasticity&&this.e.setDragElasticity(this.i,i.dragElasticity),i?.skipBaseLevels&&this.e.setSkipBaseLevels(this.i,i.skipBaseLevels),i?.omni&&t.camera.setOmniSettings(),this.micrio.hasAttribute("data-limited")&&this.setLimited(t.ptr,!0),this.images.push(t),this.ptrToImage.set(t.ptr,t),this.e._sendViewport(t.ptr);const u=this.e.getNumTiles(this.i);if(u>0){const t=u-1;this.getTileEntry(t).opacity=1,this.baseTiles.push(t)}const m=this.e._getPMatrix(t.ptr);this._pMatrices.set(m,new Float32Array(this.b,m+32,16));const f=wt(t.state.view)||i.view;!f||0==f[0]&&0==f[1]&&1==f[2]&&1==f[3]?!o&&e.is360||!n||"0.5,0.5"==n.toString()||(this.e._setCoo(t.ptr,n[0],n[1],0,0,performance.now()),i.focus=void 0):this.e._setView(t.ptr,f[0]+f[2]/2,f[1]+f[3]/2,f[2],f[3],!1,!1,!1),t.video.subscribe(t=>t&&t.addEventListener("play",this.render)),t.noImage&&t.visible.set(!0),this.setCanvas(t)}bindCamera(t){this.cameras.set(t.ptr,t.camera),t.camera.assign(new Float64Array(this.b,this.e._getView(t.ptr)+32,4),new Float64Array(this.b,this.e._getXY(t.ptr,0,0)+32,5),new Float64Array(this.b,this.e._getCoo(t.ptr,0,0)+32,5),new Float32Array(this.b,this.e._getMatrix(t.ptr)+32,16))}setCanvas(t){if(t&&!(t.ptr>0&&t.ptr==this.c))if(t.ptr<0)en(t.info).then(e=>{e&&this.micrio.$current&&(e.isIIIF||t.opts.secondaryTo||e.id==this.micrio.$current.id)&&(this.addCanvas(t),t.embeds.length&&t.embeds.forEach(e=>this.addEmbed(e,t)))});else if(this.c!=t.ptr){const e=t.is360&&this.c>=0?this.e._getYaw(this.c,!0):0,i=t.is360&&this.c>=0?this.e._getPitch(this.c):0;this.c=t.ptr,t.is360&&!this.preventDirectionSet&&e&&i&&this.e._setDirection(this.c,e+(.5-(t.$settings?._360?.trueNorth||0))*Math.PI*2,i,!0),0==this.e._getTargetOpacity(t.ptr)&&this.e._fadeIn(t.ptr),t.$settings.omni?.layerStartIndex&&t.state.layer.set(t.$settings.omni.layerStartIndex),this.preventDirectionSet=!1,this.ready=!0,this.render()}}removeCanvas(t){if(t.ptr<0)throw"Canvas is not placed yet";this.e._remove(t.ptr),this.render()}render(){this.raf<0&&(this.raf=this.micrio.webgl.display.requestAnimationFrame(this.draw))}draw(t=performance.now()){this.micrio.isConnected&&this.micrio.$current&&(this.raf=-1,this.drawing=!1,this.now=t,(1==this.e.shouldDraw(this.i,t)||this.micrio.keepRendering||this.micrio.events.isNavigating||!1===this.micrio._current?._video?.paused)&&this.render(),this.isGallery&&this.drawStart(),this.drawnSet.clear(),this.e.draw(this.i),this.micrio.events.dispatch("draw"),this.cleanup(),this.micrio.webgl.drawEnd())}stop(){this.raf<0||(this.micrio.webgl.display.cancelAnimationFrame(this.raf),this.raf=-1)}getTileEntry(t){let e=this.tiles.get(t);return e||(e={loadState:0,opacity:0},this.tiles.set(t,e)),e}drawTile(t,e,i,r,s,n,a,o){this.drawnSet.add(e);const c=this.getTileEntry(e);c.deleteAt=void 0;const l=Qc(),h=this.images[t],d="camera"in h&&h.isVideo,u="camera"in h&&h.is360,m="camera"in h?h:h.image,f="frame"in h?h.frame:void 0;if(0===c.loadState&&l<Xc){if(this.bareBone?l>2&&a:o&&a&&l>0)return!1;if(d&&!u)c.loadState=2,c.texture=this.micrio.webgl.getTexture();else{c.loadState=1;const t=m.getTileSrc(i,r,s,f);if(!t)return c.loadState=0,!1;this.getTexture(e,t,a,{noSmoothing:"$info"in h&&h.$settings.noSmoothing})}}else if(c.loadState>=2){if(this.drawing||this.drawStart(),c.texture){if(d){if(!m._video||!m._video.dataset.playing)return!1;this.micrio.webgl.updateTexture(c.texture,m._video)}this.micrio.webgl.drawTile(c.texture,n,u)}return 2===c.loadState&&(c.loadState=3,c.loadedAt=this.now),!0}return!1}drawStart(){this.drawing||(this.micrio.webgl.drawStart(),this.drawing=!0)}getTexture(t,e,i,r={}){if(this.tiles.get(t)?.texture||this.requests.has(t)||!r.force&&Qc()>=Xc)return;const s=_c.db.has(e);s||this.micrio.loading.set(!0),this.requests.set(t,e),(s?_c.getImage(e):Jc(e)).then(e=>this.gotTexture(t,e,i,r.noSmoothing)).catch(()=>this.deleteRequest(t))}gotTexture(t,e,i,r){const s=this.getTileEntry(t);s.texture=this.micrio.webgl.getTexture(e,s.texture,r),null!=self.ImageBitmap&&e instanceof ImageBitmap&&e.close instanceof Function&&e.close(),s.loadState=2,s.timeoutId=setTimeout(()=>{this.deleteRequest(t)},i?150:50)}deleteRequest(t){this.requests.delete(t);const e=this.tiles.get(t);e?.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=void 0),this.requests.size||this.micrio.loading.set(!1)}deleteTile(t){const e=this.tiles.get(t);e&&(e.texture&&this.micrio.webgl.gl.deleteTexture(e.texture),e.timeoutId&&clearTimeout(e.timeoutId),this.tiles.delete(t))}cleanup(){const t=performance.now();for(const e of this.prevDrawnSet){if(this.drawnSet.has(e))continue;if(this.baseTiles.includes(e))continue;const i=this.tiles.get(e);if(i&&0!==i.loadState)switch(i.opacity=0,i.loadState){case 1:const r=this.requests.get(e);r&&tl(r),i.loadState=0;break;case 2:this.requests.has(e)&&this.deleteRequest(e),this.deleteTile(e);break;case 3:i.deleteAt||(i.deleteAt=t)}}this.prevDrawnSet=new Set(this.drawnSet);for(const[e,i]of this.tiles.entries())i.deleteAt&&(t-i.deleteAt)/1e3>this.deleteAfterSeconds&&this.deleteTile(e)}resize(t){this.e.resize(this.i,t.width,t.height,t.left,t.top,t.ratio,t.scale,t.portrait),this.ready&&(this.stop(),this.draw())}addEmbed(t,e,i={}){if("camera"in t&&i.asImage)return this.addImage(t,e,!0,i.opacity??1);{const r="$info"in t?t.$info:e.$info;if(!r)return;this.images.push(t);const s=t.opts.area??[0,0,1,1],n=t instanceof Ec?t.$settings._360??{}:{};t.ptr=this.e._addImage(e.ptr,s[0],s[1],s[2],s[3],r.width,r.height,r.tileSize||1024,r.isSingle??!1,r.isVideo??!1,i.opacity??1,n.rotX??0,n.rotY??0,n.rotZ??0,n.scale??1,i.fromScale??0),this.ptrToImage.set(t.ptr,t),t.baseTileIdx=this.e.getNumTiles(this.i)-1,this.getTileEntry(t.baseTileIdx).opacity=1,this.baseTiles.push(t.baseTileIdx)}}setActiveImage(t,e,i){this.e._setActiveImage(t,e,i??0)}setActiveLayer(t,e){this.e._setActiveLayer(t,e)}fadeImage(t,e,i=!1){this.cameras.has(t)?this.e._fadeTo(t,e,i):this.e._fadeImage(t,e,i),this.render()}setFocus(t,e,i=!1){this.e._setFocus(t,e[0],e[1],e[2],e[3],i)}setZIndex(t,e){this.e._setZIndex(t,e)}setGridTransitionDuration(t){this.e.setGridTransitionDuration(this.i,t)}setGridTransitionTimingFunction(t){this.e.setGridTransitionTimingFunction(this.i,t)}setCrossfadeDuration(t){this.e.setCrossfadeDuration(this.i,t)}fadeTo(t,e,i){this.e._fadeTo(t,e,i)}fadeIn(t){this.e._fadeIn(t)}fadeOut(t){this.e._fadeOut(t)}areaAnimating(t){return!!this.e._areaAnimating(t)}getActiveImageIdx(t){return this.e._getActiveImageIdx(t)}setNoPinchPan(t){this.e.setNoPinchPan(this.i,t)}setIsSwipe(t){this.e.setIsSwipe(this.i,t)}ease(t){return this.e.ease(t)}panStart(t){this.e._panStart(t)}panStop(t){this.e._panStop(t)}pinchStart(t){this.e._pinchStart(t)}pinch(t,e,i,r,s){this.e._pinch(t,e,i,r,s)}pinchStop(t,e){this.e._pinchStop(t,e)}setLimited(t,e){this.e._setLimited(t,e)}set360Orientation(t,e,i){this.e.set360Orientation(this.i,t,e,i)}setCanvasArea(t,e){this.e.setArea(this.i,t,e)}setImageVideoPlaying(t,e){this.e._setImageVideoPlaying(t,e)}setImageRotation(t,e,i,r){this.e._setImageRotation(t,e,i,r)}setOmniSettings(t,e,i,r,s){this.e._setOmniSettings(t,e,i,r,s)}},nl=new Float32Array([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]),al=class{constructor(t,e,i){if(this.gl=t,this.program=t.createProgram(),e.webgl.getShader(this.program,t.VERTEX_SHADER,"\nattribute vec2 a_position; // Vertex position (-1 to 1)\nattribute vec2 a_texCoord; // Texture coordinate (0 to 1)\n\nvarying vec2 v_texCoord; // Pass texCoord to fragment shader\n\nvoid main() {\n\tv_texCoord = a_texCoord; // Pass through texture coordinate\n\tgl_Position = vec4(a_position, 0.0, 1.0); // Set clip space position\n}"),e.webgl.getShader(this.program,t.FRAGMENT_SHADER,i),t.linkProgram(this.program),t.getProgramParameter(this.program,t.LINK_STATUS)||console.error("Postprocess shader link error:",t.getProgramInfoLog(this.program)),t.useProgram(this.program),this.ppPositionLoc=t.getAttribLocation(this.program,"a_position"),this.ppTexCoordLoc=t.getAttribLocation(this.program,"a_texCoord"),this.ppTimeLoc=t.getUniformLocation(this.program,"u_time"),this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,0,t.RGBA,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),this.frameBuffer=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.texture,0),t.checkFramebufferStatus(t.FRAMEBUFFER)!==t.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer not complete");t.bindFramebuffer(t.FRAMEBUFFER,null),this.quad=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.quad),t.bufferData(t.ARRAY_BUFFER,nl,t.STATIC_DRAW)}render(){const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null),t.useProgram(this.program),t.bindBuffer(t.ARRAY_BUFFER,this.quad),t.enableVertexAttribArray(this.ppPositionLoc),t.vertexAttribPointer(this.ppPositionLoc,2,t.FLOAT,!1,4*Float32Array.BYTES_PER_ELEMENT,0),t.enableVertexAttribArray(this.ppTexCoordLoc),t.vertexAttribPointer(this.ppTexCoordLoc,2,t.FLOAT,!1,4*Float32Array.BYTES_PER_ELEMENT,2*Float32Array.BYTES_PER_ELEMENT),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,this.texture),t.uniform1f(this.ppTimeLoc,performance.now()/1e3),t.drawArrays(t.TRIANGLE_STRIP,0,4)}resize(){const t=this.gl;t.bindTexture(t.TEXTURE_2D,this.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,0,t.RGBA,t.UNSIGNED_BYTE,null),t.bindTexture(t.TEXTURE_2D,null)}dispose(){const t=this.gl;t.deleteFramebuffer(this.frameBuffer),t.deleteTexture(this.texture),t.deleteBuffer(this.quad),t.deleteProgram(this.program)}},ol=Js.firefox,cl=`\nprecision mediump float; // Use medium precision for fragment calculations\n\nvarying highp vec2 vTextureCoord; // Received texture coordinate from vertex shader\n\nuniform sampler2D uSampler; // The tile texture\nuniform float opacity; // Tile opacity (for fading)\nuniform int noTexture; // Flag indicating if texture is missing/not loaded\n\nvoid main() {\n\tif(noTexture==1) { // If texture is missing\n\t\tgl_FragColor = vec4(.1,.1,.1,.1); // Draw a placeholder color (dark semi-transparent gray)\n\t} else {\n\t${ol?"\n\t\t// Firefox premultiplied alpha workaround\n\t\tvec4 textureColor = texture2D(uSampler, vTextureCoord);\n\t\t// Manually apply opacity to RGB based on new alpha\n\t\tfloat newAlpha = min(1., textureColor.a * opacity);\n\t\tgl_FragColor = vec4(textureColor.rgb * newAlpha, newAlpha);":"\n\t\t// Standard alpha blending (premultiplied alpha assumed in blendFunc)\n\t\tgl_FragColor = texture2D(uSampler, vTextureCoord) * opacity;"}\n\t\t// Debug: Draw red instead of texture\n\t\t//gl_FragColor = vec4(1.,0.,0.,1.);\n\t}\n}`,ll=256,hl=class{constructor(t){this.micrio=t,this.display=self,this.txtAttr=-1,this.wmTexture=null,this.wmUrl=null,this.wmVerts=new Float32Array([-1,-1,0,1,-1,0,-1,1,0,-1,1,0,1,-1,0,1,1,0]),this.wmUvs=new Float32Array([0,0,0,0,0,0,0,0,0,0,0,0]),this.wmMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.wmOpacity=.075,this.posAttr=-1,this.was360=!1}init(){const t="WebGL2RenderingContext"in window,e=this.micrio.canvas.element.getContext(t?"webgl2":"webgl",{alpha:!0,preserveDrawingBuffer:this.micrio.hasAttribute("data-preserve-drawing-buffer"),stencil:!1,antialias:!1,depth:!1,desynchronized:!1});if(t?!(e instanceof window.WebGL2RenderingContext):!(e instanceof window.WebGLRenderingContext))throw new Bs("WebGL context creation failed",{code:Ms,displayMessage:"Your browser does not support WebGL, which is required to view this content. Please try a different browser."});this.gl=e;const i=this.micrio.$current?.$settings.postProcessingFragmentShader;i&&(this.postpocessor=new al(e,this.micrio,i),this.micrio.keepRendering=!0);const r=e.createProgram();if(!(r instanceof WebGLProgram))throw new Bs("Failed to create WebGL program",{code:$s,displayMessage:"There was a problem initializing the graphics. Please try refreshing the page."});this.program=r,this.getShader(this.program,e.VERTEX_SHADER,"\nuniform mat4 GLMatrix; // Combined ModelViewProjection matrix from Wasm\n\nattribute vec3 pos; // Vertex position (from Wasm buffer)\nattribute vec2 aTextureCoord; // Texture coordinate (from static buffer)\n\nvarying highp vec2 vTextureCoord; // Pass texture coordinate to fragment shader\n\nvoid main()\n{\n\tgl_Position = GLMatrix * vec4(pos, 1.0); // Calculate clip space position\n\tvTextureCoord = aTextureCoord; // Pass through texture coordinate\n}"),this.getShader(this.program,e.FRAGMENT_SHADER,cl),e.linkProgram(this.program),e.getProgramParameter(this.program,e.LINK_STATUS)||console.error("Main shader link error:",e.getProgramInfoLog(this.program)),e.useProgram(this.program),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.enable(e.BLEND),e.disable(e.DEPTH_TEST),e.clearColor(0,0,0,0);const s=e.getUniformLocation(this.program,"opacity");if(!s)throw new Bs("Failed to bind WebGL opacity uniform",{code:$s});this.opaLoc=s;const n=e.getUniformLocation(this.program,"GLMatrix");if(!n)throw new Bs("Failed to bind WebGL matrix uniform",{code:$s});this.pmLoc=n;const a=e.getUniformLocation(this.program,"noTexture");if(!a)throw new Bs("Failed to bind WebGL texture uniform",{code:$s});this.noTxtLoc=a,this.txtAttr=e.getAttribLocation(this.program,"aTextureCoord");const o=e.createBuffer();if(!o)throw new Bs("Failed to create WebGL texture buffer",{code:Ps,displayMessage:"Your device is low on memory. Try closing other browser tabs or applications."});this.txtBuffer=o,e.bindBuffer(e.ARRAY_BUFFER,this.txtBuffer),e.bufferData(e.ARRAY_BUFFER,sl._textureBuffer,e.STATIC_DRAW);const c=e.createBuffer();if(!c)throw new Bs("Failed to create WebGL watermark buffer",{code:Ps,displayMessage:"Your device is low on memory. Try closing other browser tabs or applications."});this.wmTxtBuffer=c;const l=e.createBuffer();if(!l)throw new Bs("Failed to create WebGL geometry buffer",{code:Ps,displayMessage:"Your device is low on memory. Try closing other browser tabs or applications."});this.geomBuffer=l,this.posAttr=e.getAttribLocation(this.program,"pos"),this.linkBuffers(),e.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}linkBuffers(){const t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,this.geomBuffer),t.bufferData(t.ARRAY_BUFFER,this.micrio.wasm._vertexBuffer,t.DYNAMIC_DRAW),t.enableVertexAttribArray(this.txtAttr),t.bindBuffer(t.ARRAY_BUFFER,this.txtBuffer),t.vertexAttribPointer(this.txtAttr,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(this.posAttr),t.bindBuffer(t.ARRAY_BUFFER,this.geomBuffer),t.vertexAttribPointer(this.posAttr,3,t.FLOAT,!1,0,0)}dispose(t=!1){const e=this.gl;if(e){if(e.bindBuffer(e.ARRAY_BUFFER,null),e.bindTexture(e.TEXTURE_2D,null),e.deleteBuffer(this.txtBuffer),e.deleteBuffer(this.geomBuffer),e.deleteBuffer(this.wmTxtBuffer),e.deleteProgram(this.program),this.postpocessor?.dispose(),this.wmTexture&&e.deleteTexture(this.wmTexture),t){const t=e.getExtension("WEBGL_lose_context");t instanceof Object&&t.loseContext instanceof Function&&t.loseContext()}this.gl=null}}getShader(t,e,i){const r=this.gl.createShader(e);if(!r)throw new Error(`Could not create WebGL shader (type: ${e})`);if(this.gl.shaderSource(r,i),this.gl.compileShader(r),!this.gl.getShaderParameter(r,this.gl.COMPILE_STATUS))throw console.error("Error compiling shader",this.gl.getShaderInfoLog(r)),this.gl.deleteProgram(t),new Error(`Shader compilation failed: ${this.gl.getShaderInfoLog(r)}`);this.gl.attachShader(t,r),this.gl.deleteShader(r)}getTexture(t,e,i){const r=this.gl,s=e??r.createTexture();if(!s)throw new Error("Could not create WebGL texture");return r.bindTexture(r.TEXTURE_2D,s),t&&r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,i?r.NEAREST:r.LINEAR),s}updateTexture(t,e){const i=this.gl;i.bindTexture(i.TEXTURE_2D,t),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e),i.bindTexture(i.TEXTURE_2D,null)}drawStart(){const t=this.gl;this.postpocessor&&t.bindFramebuffer(t.FRAMEBUFFER,this.postpocessor.frameBuffer),this.gl.clear(this.gl.COLOR_BUFFER_BIT)}drawEnd(){this.postpocessor&&(this.postpocessor.render(),this.gl.useProgram(this.program),this.linkBuffers()),this.wmTexture&&this.drawWatermark()}drawTile(t,e=1,i=!1){this.gl.uniform1i(this.noTxtLoc,t?0:1),this.gl.uniform1f(this.opaLoc,e),t&&(this.gl.activeTexture(this.gl.TEXTURE0),this.gl.bindTexture(this.gl.TEXTURE_2D,t));const r=i?6*sl.segsX*sl.segsY:6;i!=this.was360&&(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.txtBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,i?sl._textureBuffer360:sl._textureBuffer,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.geomBuffer),this.was360=i),this.gl.bufferData(this.gl.ARRAY_BUFFER,i?this.micrio.wasm._vertexBuffer360:this.micrio.wasm._vertexBuffer,this.gl.STATIC_DRAW),this.gl.drawArrays(this.gl.TRIANGLES,0,r)}loadWatermark(t,e){if(t===this.wmUrl)return;this.wmUrl=t;const i=new Image;e&&(this.wmOpacity=e),i.crossOrigin="anonymous",i.src=t,i.onload=()=>{const t=document.createElement("canvas");t.width=ll,t.height=ll;const e=t.getContext("2d");if(!e)return;const r=Math.min(96/i.width,64/i.height),s=i.width*r,n=i.height*r;e.drawImage(i,(ll-s)/2,(ll-n)/2,s,n),this.wmTexture&&this.gl.deleteTexture(this.wmTexture),this.wmTexture=this.getTexture(t);const a=this.gl;a.bindTexture(a.TEXTURE_2D,this.wmTexture),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.REPEAT),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.REPEAT),a.bindTexture(a.TEXTURE_2D,null),this.micrio.wasm.render()}}drawWatermark(){const t=this.gl;if(!this.wmTexture)return;t.useProgram(this.program),t.blendFunc(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA),t.uniformMatrix4fv(this.pmLoc,!1,this.wmMatrix),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,this.wmTexture),t.uniform1i(this.noTxtLoc,0),t.uniform1f(this.opaLoc,this.wmOpacity);const e=t.drawingBufferWidth/ll,i=t.drawingBufferHeight/ll,r=this.wmUvs;r[1]=i,r[2]=e,r[3]=i,r[8]=e,r[9]=i,r[10]=e,t.bindBuffer(t.ARRAY_BUFFER,this.geomBuffer),t.bufferData(t.ARRAY_BUFFER,this.wmVerts,t.DYNAMIC_DRAW),t.vertexAttribPointer(this.posAttr,3,t.FLOAT,!1,0,0),t.bindBuffer(t.ARRAY_BUFFER,this.wmTxtBuffer),t.bufferData(t.ARRAY_BUFFER,this.wmUvs,t.DYNAMIC_DRAW),t.vertexAttribPointer(this.txtAttr,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLES,0,6),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.linkBuffers(),this.was360=!1}},dl=class{get $isMobile(){return wt(this.isMobile)}constructor(t){this.micrio=t,this.element=document.createElement("canvas"),this.resizing=!1,this.hasPerspective=!1,this.viewport={width:0,height:0,left:0,top:0,ratio:0,scale:0,portrait:!1},this.isMobile=vt(!1),this.getRatio=(t=this.micrio.$current?.$settings??{})=>!Js.iOS&&!t?.noRetina&&self.devicePixelRatio&&Math.max(1,Math.min(2,self.devicePixelRatio))||1,this.onresize=this.onresize.bind(this),self.ResizeObserver&&(this.resizeObserver=new self.ResizeObserver(this.onresize)),this.element.className="micrio"}place(){if(this.element.parentNode)return;const t=this.micrio.querySelector("img.preview");this.micrio.insertBefore(this.element,t?t.nextSibling:this.micrio.firstChild)}hook(){this.onresize(),this.resizeObserver?this.resizeObserver.observe(this.element):window.addEventListener("resize",this.onresize)}unhook(){this.resizeObserver?this.resizeObserver.unobserve(this.element):window.removeEventListener("resize",this.onresize)}onresize(){const t=this.element.getBoundingClientRect();this.micrio.$current?.is360&&(this.hasPerspective=!0);let e=t.width,i=t.height;if(!e||!i)return;const r=self.getComputedStyle(this.element),s=parseFloat(r.width);isNaN(s)||(i=parseFloat(r.height)*e/Math.max(1,s));const n=this.micrio.hasAttribute("data-static")?1:Math.floor(e)/this.micrio.offsetWidth;e/=n,i/=n;const a=1!=n?1:this.getRatio(),o=this.viewport;o.width==e&&o.height==i&&o.ratio==a&&o.scale==n||(this.hasPerspective&&(this.micrio.style.perspective=i/2+"px"),o.width=e,o.height=i,o.ratio=a,o.scale=n,o.top=t.top,o.left=t.left,o.portrait=window.matchMedia("(orientation: portrait)")?.matches??i>e,this.resizing=!0,this.element.width=e*a,this.element.height=i*a,this.micrio.webgl.gl.viewport(0,0,o.width*o.ratio,o.height*o.ratio),this.micrio.webgl.postpocessor?.resize(),this.micrio.wasm.resize(o),this.resizing=!1,this.micrio.events.dispatch("resize",t),this.isMobile.set(/mobile/i.test(navigator.userAgent)))}setMargins(t,e){this.micrio.wasm.ready&&this.micrio.wasm.setCanvasArea(t,e)}},ul=["move","marker-open","marker-opened","marker-closed","tour-start","tour-step","tour-stop","tour-event","media-play","media-pause","splitscreen-start","splitscreen-stop"],ml=class{constructor(t){this.ctx=t,this.handleEvent=this.handleEvent.bind(this),this.dispatch=this.dispatch.bind(this)}hook(){ul.forEach(t=>this.ctx.micrio.addEventListener(t,this.handleEvent))}unhook(){ul.forEach(t=>this.ctx.micrio.removeEventListener(t,this.handleEvent))}handleEvent(t){if("move"==t.type&&!this.ctx.isPanning()&&!this.ctx.isPinching()&&!this.ctx.isWheeling())return;const e=this.ctx.vars.updates.stack;e[e.length-1]!=t.type&&e.push(t.type),clearTimeout(this.ctx.vars.updates.to),this.ctx.vars.updates.to<0&&(this.ctx.vars.updates.to=setTimeout(this.dispatch))}dispatch(){const t=this.ctx.vars.updates;clearTimeout(t.to),t.to=-1,t.stack.length&&(this.ctx.dispatch("update",t.stack),t.stack.length=0,t.to=setTimeout(this.dispatch,500))}},fl=class{get $enabled(){return wt(this.enabled)}constructor(t){this.micrio=t,this.enabled=vt(!1),this.hooked=!1,this.panning=!1,this.pinching=!1,this.clicked=!1,this.wheeling=!1,this.controlZoom=!1,this.twoFingerPan=!1,this.pScale=1,this.hasTouch=Js.hasTouch&&"ontouchstart"in self,this.hasUsedCtrl=!1,this.vars={drag:{prev:void 0,start:[0,0,0]},dbltap:{lastTapped:0},pinch:{image:void 0,sDst:0,wasPanning:!1},updates:{to:-1,stack:[]}},this.activePointers=new Map,this.el=t.canvas.element,this.dragHandler=new bl(this),this.pinchHandler=new yl(this,this.dragHandler),this.pointerPinchHandler=new kl(this,this.dragHandler),this.gestureHandler=new Tl(this),this.wheelHandler=new _l(this),this.keyboardHandler=new xl(this),this.doubleTapHandler=new El(this),this.updateHandler=new ml(this),this.enabled.subscribe(t=>{t?this.hook():this.unhook()}),t.visible.subscribe(t=>this.visible=t),t.current.subscribe(t=>{t&&!this.settings&&en(t.info).then(e=>{e&&(this.settings=t.$settings,!t.error&&this.settings.hookEvents&&this.enabled.set(!0))})})}isEnabled(){return this.$enabled}isPanning(){return this.panning}isPinching(){return this.pinching}setPanning(t){this.panning=t}setPinching(t){this.pinching=t}isWheeling(){return this.wheeling}setWheeling(t){this.wheeling=t}isControlZoom(){return this.controlZoom}isTwoFingerPan(){return this.twoFingerPan}getVisible(){return this.visible}setCapturedPointerId(t){this.capturedPointerId=t}setPinchFactor(t){this.pinchFactor=t}setPScale(t){this.pScale=t}setHasUsedCtrl(t){this.hasUsedCtrl=t}get isNavigating(){return this.panning||this.pinching||this.wheeling||this.clicked}dispatch(t,e){this.micrio.dispatchEvent(new CustomEvent(t,void 0!==e?{detail:e}:void 0))}getImage(t){if(!this.visible)return;const e=this.micrio.offsetWidth,i=this.micrio.offsetHeight,r=Math.max(0,Math.min(1,t.x/e)),s=Math.max(0,Math.min(1,t.y/i)),n=this.visible?.find(t=>!!t.opts.secondaryTo),a=1==this.visible.length?this.visible[0]:this.visible.find(({grid:t,opts:{area:e}})=>(!n||!t)&&(!!e&&(r>=e[0]&&r<=e[2]&&s>=e[1]&&s<=e[3])));return a&&a.opts.secondaryTo&&a.opts.isPassive&&a.opts.area&&(t.x-=a.opts.area[0]*e,t.y-=a.opts.area[1]*i),!a||a.grid||a.opts.secondaryTo&&a.opts.isPassive?this.micrio.$current:a}hook(){if(this.hooked)return;this.hooked=!0;const t=this.settings;t&&(this.twoFingerPan=!!t.twoFingerPan,this.twoFingerPan?this.micrio.setAttribute("data-can-pan",""):this.micrio.removeAttribute("data-can-pan"),t?.hookKeys&&this.hookKeys(),t.hookDrag&&this.hookDrag(),t.noZoom||this.hookZoom(),this.hookUpdate())}unhook(){this.hooked&&(this.hooked=!1,this.activePointers.clear(),this.unhookDrag(),this.unhookZoom(),this.unhookKeys(),this.unhookUpdate())}hookKeys(){this.keyboardHandler.hook()}unhookKeys(){this.keyboardHandler.unhook()}hookZoom(){const t=this.settings;this.controlZoom=!!t?.controlZoom,t&&!t.hookPinch||this.hookPinch(),(!t||t.hookScroll||this.controlZoom)&&this.hookScroll(),this.micrio.canvas.$isMobile?this.doubleTapHandler.hookTap():this.doubleTapHandler.hookClick()}unhookZoom(){this.unhookPinch(),this.unhookScroll(),this.micrio.canvas.$isMobile?this.doubleTapHandler.unhookTap():this.doubleTapHandler.unhookClick()}get scrollHooked(){return this.wheelHandler.hooked}hookScroll(){this.wheelHandler.hook()}unhookScroll(){this.wheelHandler.unhook()}hookPinch(){Js.iOS&&this.hasTouch?this.pinchHandler.hook():this.pointerPinchHandler.hook(),this.gestureHandler.hook()}unhookPinch(){Js.iOS&&this.hasTouch?this.pinchHandler.unhook():this.pointerPinchHandler.unhook(),this.gestureHandler.unhook()}hookDrag(){this.dragHandler.hook()}unhookDrag(){this.dragHandler.unhook()}hookUpdate(){this.updateHandler.hook()}unhookUpdate(){this.updateHandler.unhook()}},pl={passive:!0},gl={passive:!0,capture:!0},vl={passive:!1};function wl(t){t.stopPropagation(),t.preventDefault()}var bl=class{constructor(t){this.ctx=t,this.hooked=!1,this.start=this.start.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this)}hook(){this.hooked||(this.hooked=!0,this.ctx.micrio.addEventListener("dragstart",wl),this.ctx.micrio.addEventListener("pointerdown",this.start,pl),this.ctx.micrio.setAttribute("data-hooked",""))}unhook(){this.hooked&&(this.hooked=!1,this.ctx.micrio.removeEventListener("pointerdown",this.start,pl),this.ctx.micrio.removeEventListener("dragstart",wl),this.ctx.micrio.removeAttribute("data-hooked"))}start(t,e=!1){if(0!=t.button||"touch"==t.pointerType&&this.ctx.isTwoFingerPan())return;if(!(e||t.target==this.ctx.el||t.target instanceof Element&&t.target.closest("[data-scroll-through]")))return;if(this.ctx.micrio.$current?.isOmni&&t.shiftKey)return;if(this.ctx.isPinching())return;if(this.ctx.isPanning())return void(t instanceof TouchEvent&&t.touches.length>1&&this.stop());const i=this.ctx.getImage({x:t.clientX,y:t.clientY});i&&(this.ctx.setPanning(!0),this.ctx.vars.drag.start=[t.clientX,t.clientY,performance.now()],this.ctx.micrio.addEventListener("pointermove",this.move,pl),this.ctx.micrio.addEventListener("pointerup",this.stop,pl),this.ctx.micrio.setAttribute("data-panning",""),this.ctx.micrio.wasm.panStart(i.ptr),this.ctx.micrio.wasm.render(),this.ctx.dispatch("panstart"))}move(t){const e=t.clientX,i=t.clientY,r=Math.hypot(this.ctx.vars.drag.start[0]-t.clientX,this.ctx.vars.drag.start[1]-t.clientY);!this.ctx.capturedPointerId&&r>10&&(this.ctx.setCapturedPointerId(t.pointerId),this.ctx.micrio.setPointerCapture(t.pointerId)),this.ctx.vars.drag.prev&&this.ctx.getImage({x:e,y:i})?.camera.pan(this.ctx.vars.drag.prev[0]-e,this.ctx.vars.drag.prev[1]-i),this.ctx.vars.drag.prev=[e,i]}stop(t,e=!1,i=!1){if(this.ctx.isPanning()){if(this.ctx.setPanning(!1),this.ctx.vars.drag.prev=void 0,this.ctx.micrio.removeEventListener("pointermove",this.move,pl),this.ctx.micrio.removeEventListener("pointerup",this.stop,pl),this.ctx.capturedPointerId&&this.ctx.micrio.releasePointerCapture(this.ctx.capturedPointerId),this.ctx.setCapturedPointerId(void 0),this.ctx.micrio.removeAttribute("data-panning"),t&&0==e){const e=this.ctx.getImage({x:t.clientX,y:t.clientY});e&&(this.ctx.micrio.wasm.panStop(e.ptr),this.ctx.micrio.wasm.render())}i||this.ctx.dispatch("panend",t?{duration:performance.now()-this.ctx.vars.drag.start[2],movedX:t.clientX-this.ctx.vars.drag.start[0],movedY:t.clientY-this.ctx.vars.drag.start[1]}:void 0)}}},yl=class{constructor(t,e){this.ctx=t,this.dragHandler=e,this.start=this.start.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this)}hook(){Js.iOS&&this.ctx.hasTouch&&this.ctx.el.addEventListener("touchstart",this.start,pl)}unhook(){Js.iOS&&this.ctx.hasTouch&&this.ctx.el.removeEventListener("touchstart",this.start,pl),self.removeEventListener("touchmove",this.move,gl),self.removeEventListener("touchend",this.stop,gl)}start(t){if(!(Js.hasTouch&&t instanceof TouchEvent))return;if(this.ctx.isTwoFingerPan()&&t.touches.length<2)return;if(this.ctx.isPinching()||2!=t.touches.length)return void this.stop(t);t.stopPropagation(),this.ctx.vars.pinch.wasPanning=this.ctx.isPanning(),this.dragHandler.stop(void 0,!1,!0);const e=t.touches;this.ctx.setPinching(!0),self.addEventListener("touchmove",this.move,gl),self.addEventListener("touchend",this.stop,gl),this.ctx.micrio.setAttribute("data-pinching",""),this.ctx.vars.pinch.image=this.ctx.getImage({x:e[0].clientX,y:e[0].clientY}),this.ctx.vars.pinch.sDst=Math.hypot(e[0].clientX-e[1].clientX,e[0].clientY-e[1].clientY),this.ctx.setPinchFactor(void 0),this.ctx.vars.pinch.image&&this.ctx.micrio.wasm.pinchStart(this.ctx.vars.pinch.image.ptr),this.ctx.micrio.wasm.render(),this.ctx.dispatch("pinchstart"),this.ctx.isTwoFingerPan()&&this.ctx.dispatch("panstart")}move(t){if(!(Js.hasTouch&&t instanceof TouchEvent))return;const e=t.touches;if(e?.length<2)return;const i={x:e[0].clientX,y:e[0].clientY},r={x:e[1].clientX,y:e[1].clientY},s=this.ctx.vars.pinch,n=s.image;if(n){if(n?.opts.secondaryTo&&n.opts.isPassive&&n.opts.area){const t=n.opts.area[0]*this.ctx.micrio.offsetWidth,e=n.opts.area[1]*this.ctx.micrio.offsetHeight;i.x-=t,r.x-=t,i.y-=e,r.y-=e}this.ctx.setPinchFactor(Math.hypot(e[0].clientX-e[1].clientX,e[0].clientY-e[1].clientY)/s.sDst),this.ctx.micrio.wasm.pinch(n.ptr,i.x,i.y,r.x,r.y)}}stop(t){if(!this.ctx.isPinching())return;this.ctx.setPinching(!1),self.removeEventListener("touchmove",this.move,gl),self.removeEventListener("touchend",this.stop,gl),this.ctx.micrio.removeAttribute("data-pinching");const e=this.ctx.vars.pinch.image;e&&(this.ctx.micrio.wasm.pinchStop(e.ptr,performance.now()),this.ctx.micrio.wasm.render()),this.ctx.vars.pinch.image=void 0,this.ctx.setPinchFactor(void 0),this.ctx.dispatch("pinchend"),this.ctx.isTwoFingerPan()&&!this.ctx.vars.pinch.wasPanning&&this.ctx.dispatch("panend"),t instanceof TouchEvent&&1==t.touches.length&&this.dragHandler.start(t,!0)}},kl=class{constructor(t,e){this.ctx=t,this.dragHandler=e,this.start=this.start.bind(this),this.move=this.move.bind(this),this.end=this.end.bind(this)}hook(){this.ctx.el.addEventListener("pointerdown",this.start,pl),self.addEventListener("pointerup",this.end,pl),self.addEventListener("pointercancel",this.end,pl)}unhook(){this.ctx.el.removeEventListener("pointerdown",this.start,pl),self.removeEventListener("pointerup",this.end,pl),self.removeEventListener("pointercancel",this.end,pl),self.removeEventListener("pointermove",this.move,gl),this.ctx.activePointers.clear()}start(t){if("touch"===t.pointerType&&(this.ctx.activePointers.set(t.pointerId,{x:t.clientX,y:t.clientY}),2===this.ctx.activePointers.size&&!this.ctx.isPinching())){this.ctx.vars.pinch.wasPanning=this.ctx.isPanning(),this.dragHandler.stop(void 0,!1,!0),this.ctx.setPinching(!0),self.addEventListener("pointermove",this.move,gl),this.ctx.micrio.setAttribute("data-pinching","");const t=Array.from(this.ctx.activePointers.values()),e=t[0],i=t[1];this.ctx.vars.pinch.image=this.ctx.getImage({x:e.x,y:e.y}),this.ctx.vars.pinch.sDst=Math.hypot(e.x-i.x,e.y-i.y),this.ctx.setPinchFactor(void 0),this.ctx.vars.pinch.image&&this.ctx.micrio.wasm.pinchStart(this.ctx.vars.pinch.image.ptr),this.ctx.micrio.wasm.render(),this.ctx.dispatch("pinchstart"),this.ctx.isTwoFingerPan()&&this.ctx.dispatch("panstart")}}move(t){if("touch"!==t.pointerType)return;if(!this.ctx.activePointers.has(t.pointerId))return;if(this.ctx.activePointers.set(t.pointerId,{x:t.clientX,y:t.clientY}),!this.ctx.isPinching()||2!==this.ctx.activePointers.size)return;const e=Array.from(this.ctx.activePointers.values()),i=e[0],r=e[1],s=this.ctx.vars.pinch,n=s.image;if(!n)return;const a={x:i.x,y:i.y},o={x:r.x,y:r.y};if(n?.opts.secondaryTo&&n.opts.isPassive&&n.opts.area){const t=n.opts.area[0]*this.ctx.micrio.offsetWidth,e=n.opts.area[1]*this.ctx.micrio.offsetHeight;a.x-=t,o.x-=t,a.y-=e,o.y-=e}this.ctx.setPinchFactor(Math.hypot(i.x-r.x,i.y-r.y)/s.sDst),this.ctx.micrio.wasm.pinch(n.ptr,a.x,a.y,o.x,o.y)}end(t){if("touch"===t.pointerType&&(this.ctx.activePointers.delete(t.pointerId),this.ctx.isPinching()&&this.ctx.activePointers.size<2)){this.ctx.setPinching(!1),self.removeEventListener("pointermove",this.move,gl),this.ctx.micrio.removeAttribute("data-pinching");const t=this.ctx.vars.pinch.image;if(t&&(this.ctx.micrio.wasm.pinchStop(t.ptr,performance.now()),this.ctx.micrio.wasm.render()),this.ctx.vars.pinch.image=void 0,this.ctx.setPinchFactor(void 0),this.ctx.dispatch("pinchend"),this.ctx.isTwoFingerPan()&&!this.ctx.vars.pinch.wasPanning&&this.ctx.dispatch("panend"),1===this.ctx.activePointers.size){const t=Array.from(this.ctx.activePointers.entries())[0],e={button:0,pointerType:"touch",target:this.ctx.el,clientX:t[1].x,clientY:t[1].y,pointerId:t[0]};this.dragHandler.start(e,!0)}}}},Tl=class{constructor(t){this.ctx=t,this.handle=this.handle.bind(this)}hook(){Js.OSX&&(this.ctx.micrio.addEventListener("gesturestart",this.handle,vl),this.ctx.micrio.addEventListener("gesturechange",this.handle,vl),this.ctx.micrio.addEventListener("gestureend",this.handle,vl))}unhook(){Js.OSX&&(this.ctx.micrio.removeEventListener("gesturestart",this.handle,vl),this.ctx.micrio.removeEventListener("gesturechange",this.handle,vl),this.ctx.micrio.removeEventListener("gestureend",this.handle,vl))}getGestureEvent(t){if("scale"in t&&"number"==typeof t.scale){const e=t;return{scale:e.scale,clientX:e.clientX,clientY:e.clientY}}return null}handle(t){const e=this.getGestureEvent(t);if(!e||1===e.scale)return;const i=this.ctx.pScale-e.scale;this.ctx.setPScale(e.scale),t.stopPropagation(),t.preventDefault(),"gesturechange"==t.type&&this.ctx.getImage({x:e.clientX,y:e.clientY})?.camera.zoom(i*this.ctx.micrio.canvas.viewport.height,0,e.clientX,e.clientY)}},_l=class{constructor(t){this.ctx=t,this.hooked=!1,this.wheelEndTo=-1,this.handle=this.handle.bind(this),this.end=this.end.bind(this)}hook(){this.hooked||(this.ctx.micrio.addEventListener("wheel",this.handle,vl),this.hooked=!0)}unhook(){this.ctx.micrio.removeEventListener("wheel",this.handle,vl),this.hooked=!1}handle(t,e=!1,i=0){if(!(t instanceof WheelEvent))return;if(this.ctx.isControlZoom()&&!t.ctrlKey)return;if(!e&&t.target instanceof Element&&t.target!=this.ctx.el&&!t.target.classList.contains("marker")&&!t.target.closest("[data-scroll-through]"))return;let r=t.deltaY;t.ctrlKey&&this.ctx.setHasUsedCtrl(!0);const s=this.ctx.isControlZoom()&&10*r%1==0,n=this.ctx.hasUsedCtrl&&!s,a=Js.firefox||t.ctrlKey||!n;if(this.ctx.isTwoFingerPan()&&this.ctx.micrio.$current?.camera.isZoomedOut())return;t.stopPropagation(),t.preventDefault(),(Js.OSX||n)&&t.ctrlKey&&(r*=10);const o={x:t.clientX,y:t.clientY},c=this.ctx.getImage(o);if(c){if(a){const t=this.ctx.micrio.canvas.viewport;let e=0;const s=this.ctx.micrio.getBoundingClientRect();c.camera.zoom(1*r/Math.sqrt(t.scale),0,o.x-i-s.left,o.y-s.top-e)}else c.camera.pan(t.deltaX,t.deltaY);this.ctx.setWheeling(!0),clearTimeout(this.wheelEndTo),this.wheelEndTo=setTimeout(this.end,50)}}end(){this.ctx.setWheeling(!1)}},xl=class{constructor(t){this.ctx=t,this.handle=this.handle.bind(this)}hook(){document.addEventListener("keydown",this.handle)}unhook(){document.removeEventListener("keydown",this.handle)}handle(t){if(this.ctx.isPanning()||this.ctx.isPinching()||!this.ctx.micrio.$current?.camera)return;const e=this.ctx.micrio.$current.camera,i=this.ctx.micrio.offsetWidth/2,r=this.ctx.micrio.offsetHeight/2;let s=0,n=0;switch(t.key){case"ArrowUp":n-=r;break;case"ArrowDown":n+=r;break;case"ArrowLeft":s-=i;break;case"ArrowRight":s+=i;break;case"+":case"=":e.zoom(-200,150).catch(()=>{});break;case"-":case"_":e.zoom(200,150).catch(()=>{});break;default:return}t.preventDefault(),t.stopPropagation(),0==s&&0==n||e.pan(s,n,150)}},El=class{constructor(t){this.ctx=t,this.tap=this.tap.bind(this),this.click=this.click.bind(this)}hookTap(){this.ctx.el.addEventListener("touchstart",this.tap)}unhookTap(){this.ctx.el.removeEventListener("touchstart",this.tap)}hookClick(){this.ctx.el.addEventListener("dblclick",this.click)}unhookClick(){this.ctx.el.removeEventListener("dblclick",this.click)}tap(t){if(!(Js.hasTouch&&t instanceof TouchEvent))return;const e=performance.now();1==t.touches.length&&e-this.ctx.vars.dbltap.lastTapped<250&&(t.stopPropagation(),t.preventDefault(),this.click(t)),this.ctx.vars.dbltap.lastTapped=e}click(t){const e=t instanceof TouchEvent?t.touches[0]:t;this.ctx.getImage({x:e.clientX,y:e.clientY})?.camera.zoom(-300,500,e.clientX,e.clientY,1,!this.ctx.micrio.$current?.album).catch(()=>{})}},Sl=class t{static{this.events=["load","tour-start","tour-stop","marker-open","marker-closed","page-open","page-closed","lang-switch"]}constructor(t){this.micrio=t,this.isStatic=!1,this.loaded=!1,this.inited=!1,this.setting=!1,this.writeTitle=!1}hook(){this.isStatic="static"==this.micrio.getAttribute("data-router"),this.read=this.read.bind(this),this.write=this.write.bind(this),this.writeDeferred=this.writeDeferred.bind(this),en(this.micrio.current).then(()=>{this.loaded=!0,this.read()}),t.events.forEach(t=>this.micrio.addEventListener(t,this.write)),"i.micr.io"==location.hostname&&(this.writeTitle=!0),window.addEventListener(this.isStatic?"popstate":"hashchange",this.read)}unhook(){t.events.forEach(t=>this.micrio.removeEventListener(t,this.write)),window.removeEventListener(this.isStatic?"popstate":"hashchange",this.read)}findPage(t,e,i){if(e)for(let r=0;r<e.length;r++){let s=Gs((e[r]?.i18n?.[i]??e[r]).title)==t?e[r]:this.findPage(t,e[r].children,i);if(s)return s}}read(){if(!this.loaded||this.setting)return;this.route=(this.isStatic?location.pathname:location.hash).slice(1);const[t,e,i,r,s]=this.route.split("/"),n=this.micrio.$current,a=t&&n?.id!=t?this.micrio.open(t):void 0;n&&Promise.all([en(n.data,{allowUndefined:!0}),a?en(a.data,{allowUndefined:!0}):void 0]).then(t=>{if(!t[0])return this.inited=!0;if(void 0===this.prevLang&&(this.prevLang=this.micrio.lang),!1===a?.$settings.routerMarkerTours)return;if(t[0].pages?.length&&r){const i=this.findPage(r.toLowerCase(),t[0].pages,e);if(i)return void this.micrio.state.popover.set({contentPage:i})}const i=r?s?t.map(t=>t?.markerTours?.find(t=>Gs(t.i18n?.[e]?.slug)==r))[0]:t.map(t=>t?.tours?.find(t=>Gs(t.i18n?.[e]?.slug)==r))[0]:void 0,o=s||!i&&r,c=o?(t[1]??t[0]).markers?.find(t=>(t.i18n?.[e]?.slug??Gs(t.title))==o||i&&"steps"in i&&i.stepInfo?.map(t=>t.marker).find(t=>t.i18n?.[e]?.slug==o)):void 0;c&&i&&"steps"in i?i.initialStep=Math.max(0,i.steps.findIndex(t=>t.startsWith(c.id))):(c||this.micrio.state.popup.set(void 0),(a??n).state.marker.set(c)),this.micrio.state.tour.set(i),this.writeTitle&&this.setTitle(),this.inited=!0})}setTitle(){const t=wt(this.micrio._lang),e=this.micrio.$current;if(!e)return;const i=[e.$data?.i18n?.[t]?.title??e?.$info?.title,this.micrio.state.$tour?.i18n?.[t]?.title,this.micrio.state.$marker?.i18n?.[t]?.title].filter(t=>!!t).reverse();document.title=i.join(" - ")+" | Micrio"}write(t){if(this.micrio.$current&&this.loaded&&this.inited){if("marker-open"===t.type){const t=this.micrio.state.$marker;if(t&&t.data&&t.data.micrioLink)return}clearTimeout(this._to),this._to=setTimeout(()=>this.writeDeferred("load"==t.type),50)}}writeDeferred(t){const e=this.micrio.state.$tour;let i=this.micrio.$current,r=i?.state.$marker;const s=this.micrio.lang;s!=this.prevLang&&(t=!0,this.prevLang=s);const n=i?.$data?.i18n?.[s]?.title??i?.$info?.title??"",a=!1===i?.$settings.routerMarkerTours,o=r&&"string"!=typeof r?r.i18n?.[s]??r:void 0,c=wt(this.micrio.state.popover)?.contentPage,l=c?c.i18n?.[s]??c:void 0;let h=i?.id;if(e&&"steps"in e&&e.steps.length&&e.stepInfo){const t=e.stepInfo.find(t=>t.markerId==e.steps.find(t=>!t.includes(",")));t&&(h=t.micrioId,i=this.micrio.wasm.images.find(t=>t.id==h),r||void 0===e.initialStep||(r=e.stepInfo[Math.max(0,e.initialStep)].marker))}const d=[h,s,Gs(n)??"",...a?[]:l?[Gs(l.title)]:[e?.i18n?.[s]?.slug??null,o?.slug??Gs(o?.title)??null]].filter(t=>!!t).join("/");d!=this.route&&(this.setting=!0,this.isStatic?t?history.replaceState(null,"","/"+d+location.search):history.pushState(null,"","/"+d+location.search):location.hash=d,this.route=d,this.writeTitle&&this.setTitle(),setTimeout(()=>this.setting=!1,250))}},Al=class t{static{this.events=["load","show","hide","marker-open","marker-opened","marker-closed","tour-start","tour-stop","tour-step","tour-ended"]}constructor(t){this.micrio=t,this.gtag="gtag"in window?window.gtag:void 0,this.hooked=!1,this.tag=this.tag.bind(this)}hook(){!this.hooked&&this.gtag&&(this.hooked=!0,this.tag(new CustomEvent("init")),t.events.forEach(t=>this.micrio.addEventListener(t,this.tag)))}unhook(){this.hooked&&(this.hooked=!1,this.tag(new CustomEvent("hide")),t.events.forEach(t=>this.micrio.removeEventListener(t,this.tag)))}tag(t){if(!this.gtag)return;const e=t.detail,i=this.micrio.$current,r={event_category:"Micrio",event_action:t.type};this.micrio.lang&&(r.culture=this.micrio.lang),"init"==t.type&&(r.micrio_version=fc),"load"==t.type&&i?.$info&&(r.image_version=i.$info.version);const s=null!==e&&"object"==typeof e&&"currentStep"in e?e.currentStep:null;null!=s&&(r.event_value=s);const n=e&&e.title?e.title:i&&i.$info&&i.$info.title;r.event_label=this.micrio.id+(n?" - "+n:""),this.gtag("event",t.type,r)}},Ml=t=>Math.round(1e5*t)/1e5,Il={0:[0,-.5,1,0],90:[1,0,1.5,1],180:[0,1,1,1.5],270:[-.5,0,0,1]},$l={0:[0,-1,1,0],90:[1,0,2,1],180:[0,1,1,2],270:[-1,0,0,1]},Pl={0:[0,1,1,2],90:[-1,0,0,1],180:[0,-1,1,0],270:[1,0,2,1]},Ll=class t{static{this.getString=(t,e)=>[t.id,t.width,t.height,t.isDeepZoom?"d":"",t.isPng?"p":t.isWebP?"w":"",e.view?.map(Ml).join("/"),e.area?.map(Ml).join("/"),t.settings?.focus?.map(Ml).join("-"),e.cultures].join(",").replace(/,+$/,"")+(e.size?`|${e.size.join(",")}`:"")}get $focussed(){return wt(this.focussed)}constructor(e,i){this.micrio=e,this.image=i,this.images=[],this.imageMap=new Map,this.current=[],this._grid=document.createElement("div"),this._buttons=new Map,this.clickable=!1,this.focussed=vt(),this.markersShown=vt([]),this.history=[],this.depth=vt(0),this.aniDurationIn=1.5,this.aniDurationOut=.5,this.transitionDelay=.5,this.isHorizontal=!1,this.cellSizes=new Map,this.nextSize=new Map,this.timingFunction="ease",this.getString=(e,i={})=>t.getString(e,{view:i.view,area:i.area,size:i.size??this.nextSize.get(e.id),cultures:("cultures"in e&&e.cultures?e.cultures:"")?.replace(/,/g,"-")}),this.actionHandlers={[mc.Grid.GridActionType.focus]:(t,e)=>{const i=t?.split("|").map(t=>t.trim()),r=(i?.[0]??"").split(",").map(t=>this.imageMap.get(t.trim())).filter(t=>void 0!==t);1==r.length?this.focus(r[0],{duration:e}):r.length>0&&this.set(r.map(t=>this.getString(t.$info)).join(";"),{duration:e,horizontal:"h"==i?.[1]})},[mc.Grid.GridActionType.flyTo]:(t,e)=>{const i=t?.split(",").map(t=>this.current.find(e=>e.id==t?.trim()));i?.length?this.image.camera.flyToView([Math.min(...i.map(t=>t?.opts.area?.[0]??0)),Math.min(...i.map(t=>t?.opts.area?.[1]??0)),Math.max(...i.map(t=>t?.opts.area?.[2]??1)),Math.max(...i.map(t=>t?.opts.area?.[3]??1))],{duration:e?1e3*e:void 0}).catch(()=>{}):console.warn("Given image IDs gave no current displayed images")},[mc.Grid.GridActionType.focusTagged]:(t,e)=>{this.flyToMarkers(t,e)},[mc.Grid.GridActionType.focusWithTagged]:(t,e)=>{this.flyToMarkers(t,e,!0)},[mc.Grid.GridActionType.reset]:(t,e)=>{this.reset(e)},[mc.Grid.GridActionType.back]:(t,e)=>{this.back(e)},[mc.Grid.GridActionType.switchToGrid]:()=>{this.switchToGrid()},[mc.Grid.GridActionType.nextFadeDuration]:t=>{this.nextCrossFadeDuration=Number(t)},[mc.Grid.GridActionType.filterTourImages]:(t,e)=>{en(this.micrio.state.tour).then(i=>{if(!i)return;if(!("steps"in i)||!i.stepInfo)return;const r=i.stepInfo.map(t=>t.micrioId),s=r.filter((t,e)=>r.indexOf(t)==e).map(t=>this.imageMap.get(t)).filter(t=>!!t).map(t=>this.getString(t.$info)).join(";");s&&this.set(s,{duration:e,horizontal:"h"==t})})}},this.tourEvent=this.tourEvent.bind(this),this.updateGrid=this.updateGrid.bind(this);const r=i.$settings;this.clickable=!!r.gridClickable,void 0!==r.gridTransitionDuration&&(this.aniDurationIn=this.aniDurationOut=r.gridTransitionDuration),void 0!==r.gridTransitionDurationOut&&(this.aniDurationOut=r.gridTransitionDurationOut),this._grid.className="micrio-grid",this.set(i.$info?.grid);const s=()=>Si().then(()=>{this.hook(),e.events.dispatch("grid-load")});i.isV5?s():e._lang.subscribe(t=>{t?Promise.all(this.images.filter(e=>(e.$info&&"cultures"in e.$info&&e.$info?.cultures||"").indexOf(t)>=0).map(t=>en(t.data))).then(s):s()}),e.events.dispatch("grid-init",this)}hook(){if(this.micrio.state.marker.subscribe(t=>{if(t&&"string"!=typeof t){const e=t.data?._meta;if(e?.gridSize){const i="number"==typeof e.gridSize?[e.gridSize,e.gridSize]:e.gridSize.split(",").map(Number),r=this.images.find(e=>e.$data?.markers?.find(e=>e==t))?.id;r&&this.nextSize.set(r,i)}Si().then(()=>{const t=e?.gridAction?.split("|");t?.length&&"string"==typeof t[0]&&this.action(t.shift(),t.join("|"))})}}),this.clickable){this._grid.addEventListener("click",t=>{const e=t.target.dataset.id;e&&this.focus(this.imageMap.get(e))});const t=t=>{t?this.removeGrid():this.placeGrid()};this.micrio.state.tour.subscribe(t),this.micrio.state.marker.subscribe(t),this.focussed.subscribe(t)}this.micrio.addEventListener("tour-event",this.tourEvent),this.micrio.addEventListener("serialtour-pause",()=>this.images.forEach(t=>t.camera.pause())),this.micrio.addEventListener("serialtour-play",()=>this.images.forEach(t=>t.camera.resume()))}clearTimeouts(){clearTimeout(this._to),clearTimeout(this._fadeTo)}trackImage(t){this.images.push(t),this.imageMap.set(t.id,t)}parseInput(t){return"string"!=typeof t&&(t=t.map(t=>t instanceof Ec?{image:t}:t).filter(t=>!!t.image.$info).map(t=>this.getString(t.image.$info,t)).join(";")),t.split(";").filter(t=>!!t).map(t=>this.getImage(t))}setupBehindTransition(t,e,i){const r="behind-delayed"==e.transition,s=!0===e.coverLimit,{wasm:n}=this.micrio;e.forceAni=!0,e.coverLimit=s,e.forceAreaAni=!0;const a=r?1/t.length:1;let o=0;this.images.forEach(e=>{e.camera.setCoverLimit(s),t.find(t=>t.id==e.id)&&(e.camera.setArea([0,0,i?.id==e.id?1:a,1],{noDispatch:!0,direct:!0}),e!=i&&e.camera.setView([0,0,1,1]),r&&n.setZIndex(e.ptr,t.length-o++))}),t.forEach(t=>t.view=[0,0,1,1])}savePreviousLayout(){this.depth.set(this.history.push({layout:this.current.map(t=>this.getString(t.$info,{view:t.state.$view,size:this.cellSizes.get(t.id)})).join(";"),horizontal:this.isHorizontal,view:this.image.camera.getView()}))}set(t="",e={}){return this.lastPromise=new Promise((i,r)=>{delete this.image.$info?.settings?.focus,this.lastAction=void 0,!1===e.cover&&e.coverLimit&&(e.coverLimit=!1),e.coverLimit&&null==e.cover&&(e.cover=e.coverLimit);const s=this.parseInput(t),n=this.$focussed,a=e.transition?.endsWith("-delayed"),o="behind-delayed"==e.transition,{wasm:c}=this.micrio;"crossfade"==e.transition?e.duration=0:"behind"!=e.transition&&"behind-delayed"!=e.transition||this.setupBehindTransition(s,e,n);const l=this.image.ptr>=0,h=e.duration??(e.noHistory?this.aniDurationOut:this.aniDurationIn),d=this.nextCrossFadeDuration??this.image.$settings.crossfadeDuration??1,u=(h||this.aniDurationIn)/(o?2:1);this.nextCrossFadeDuration=void 0,l&&(c.setGridTransitionDuration(h),c.setCrossfadeDuration(u));const m=!e.noBlur&&n;m&&this.blur(),!e.noHistory&&this.current.length&&this.savePreviousLayout(),this.isHorizontal=!!e.horizontal,this.removeImages(this.images.filter(t=>!s.find(e=>e.id==t.id))),this.printGrid(s,{horizontal:e.horizontal,keepGrid:e.keepGrid,scale:e.scale,columns:e.columns}),this.clearTimeouts();let f=!1;const p=()=>{this.clearTimeouts(),f||r()};l&&!e.noCamAni&&(e.view?this.image.camera.flyToView(e.view,{duration:1e3*h}).catch(p):this.image.camera.flyToFullView({duration:1e3*h}).catch(p)),this.nextSize.clear(),null==e.coverLimit&&(e.coverLimit=!0),e.coverLimit||s.forEach(t=>this.imageMap.get(t.id)?.camera.setCoverLimit(!1));const g="appear-delayed"==e.transition,v=t=>t*this.transitionDelay+(t>0&&g?h:0);this.current=s.map((t,i)=>this.placeImage(t,{duration:!e.forceAni&&m&&t.id!=n?.id?0:h,delay:a?v(i):0,noCamAni:!!(g&&i>0)||!!e.noCamAni,forceAreaAni:!(g&&i>0)&&e.forceAreaAni,cover:e.cover})),g&&this.current.slice(1).forEach(t=>c.fadeTo(t.ptr,.9999,!0));const w=()=>this.current.forEach((t,e)=>Ks(a?1e3*(v(e)+(o?h/2:0)):0).then(()=>c.fadeIn(t.ptr))),b=()=>{this.clearTimeouts(),requestAnimationFrame(()=>c.setCrossfadeDuration(d)),a&&this.images.forEach(t=>c.setZIndex(t.ptr,0)),e.coverLimit&&s.forEach(t=>this.imageMap.get(t.id)?.camera.setCoverLimit(!0)),this.clickable&&this.placeGrid(),this.lastAction=void 0,f=!0,i(this.current)};h||u?(e.noFade||(this._fadeTo=setTimeout(w,Math.max(0,h/2*1e3))),this._to=setTimeout(b,1e3*(Math.max(u,h)+(a?(s.length-1)*this.transitionDelay:0)))):(e.noFade||w(),b())})}hasChanged(){return this.current.length!==this.images.length||this.current.some((t,e)=>t.id!==this.images[e].id)}getImage(t){const e=t.split("|"),i=e[0].split(","),r=e[1]?e[1].split(",").map(Number):[1];let s=0,n=0;return{path:this.image.$info?.path,id:i[0],width:s=Number(i[1])||s,height:n=Number(i[2])||n,isDeepZoom:"d"==i[3],isPng:"p"==i[4],isWebP:"w"==i[4],size:r,view:i[5]?i[5].split("/").map(Number):void 0,area:i[6]?i[6].split("/").map(Number):void 0,settings:Xs(this.image.$settings||{},{focus:i[7]?i[7].split("-").map(Number):void 0}),cultures:i[8]?.replace(/-/g,",")||void 0}}getCols(t,e){let i=Math.ceil(e/Math.ceil(Math.sqrt(e)));if(t==e){const e=Math.floor(Math.sqrt(t)),r=[];for(let s=e;s<i+e;s++)t%s||r.push(s);r.length&&(i=r[Math.floor(r.length/2)])}return i}printGrid(t,e){e.keepGrid||this.removeGrid();const i=t.reduce((t,e)=>t+e.size[0]*(e.size[1]??1),0),r=e.columns??(e.horizontal?t.length:this.getCols(t.length,i));this._grid.style.gridTemplateColumns=`repeat(${r}, auto)`,this._grid.textContent="",this._grid.style.removeProperty("--translate"),this._grid.style.removeProperty("--scale"),t.forEach(t=>{if(!t.id)return;this._buttons.has(t.id)||this._buttons.set(t.id,document.createElement("button"));const e=this._buttons.get(t.id);"1"!=t.size.toString()?(e.style.gridArea=`auto / auto / span ${t.size[1]} / span ${t.size[0]||t.size[1]}`,this.cellSizes.set(t.id,t.size)):(e.style.removeProperty("grid-area"),this.cellSizes.delete(t.id)),e.dataset.id=t.id,this._grid.appendChild(e)}),e.keepGrid&&this._grid.parentNode||this.micrio.insertBefore(this._grid,this.micrio.firstChild?.nextSibling??null),this.micrio.events.dispatch("grid-layout-set",this);const s=this.micrio.offsetWidth,n=this.micrio.offsetHeight,a=Math.max(0,Math.min(1,1-(e.scale??1)));this._grid.style.transform="",this._grid.childNodes.forEach(e=>{if(!e)return;const i=e,r=i.dataset.id,o=i.getBoundingClientRect(),c=t.find(t=>t.id==r),l=[a/2*o.width,a/2*o.height];c&&!c.area&&(c.area=[(o.x+l[0])/s,(o.y+l[1])/n,(o.x+o.width-l[0])/s,(o.y+o.height-l[1])/n])}),e.keepGrid||this._grid.remove()}placeGrid(){!this.clickable||this.micrio.state.$tour||this.micrio.state.$marker||this._grid.parentNode||(this.micrio.insertBefore(this._grid,this.micrio.firstChild?.nextSibling??null),this.viewUnsub=this.image.state.view.subscribe(this.updateGrid))}removeGrid(){this._grid.parentNode&&(this.viewUnsub&&this.viewUnsub(),this._grid.remove())}updateGrid(){const t=this.image.camera.getXY(0,0,!0);this._grid.style.setProperty("--translate",`translate3d(${t[0]}px, ${t[1]}px, 0)`),this._grid.style.setProperty("--scale",this.image.camera.getScale().toString()),this._grid.dispatchEvent(new CustomEvent("update"))}placeImage(t,e){const{wasm:i}=this.micrio;let r=this.imageMap.get(t.id);r&&t.area?Ks(1e3*e.delay).then(()=>{r.camera.setArea(t.area,{direct:0==e.duration||!e.forceAreaAni&&!wt(r.visible)}),e.delay&&i.render()}):(t.lang=this.micrio.lang,i.addChild(r=new Ec(i,t,{area:t.area}),this.image),this.trackImage(r));const s={duration:1e3*e.duration,timingFunction:this.timingFunction,limit:!1};if(!e.noCamAni&&!r.camera.aniDone&&r.ptr>0){const i=!!e.cover||r.camera.getCoverLimit();if(t.view||!i)r.camera.flyToView(t.view??[0,0,1,1],s).catch(()=>{});else if(t.area&&t.width&&t.height){const e=(t.area[2]-t.area[0])*this.micrio.offsetWidth/((t.area[3]-t.area[1])*this.micrio.offsetHeight);r.camera.flyToView(e<t.width/t.height?[.5,0,.5,1]:[0,.5,1,.5],s).catch(()=>{})}else r.camera.flyToCoverView(s).catch(()=>{})}return r}removeImages(t){const{wasm:e}=this.micrio;t.forEach(t=>{t.ptr>=0&&e.fadeOut(t.ptr),this._buttons.delete(t.id)}),e.render()}insideGrid(){const t=this.micrio.$current;return t==this.image||!!t&&this.imageMap.has(t.id)}async reset(t,e,i){const r=this.history[0];return this.images.forEach(t=>t.camera.stop()),this.image.camera.stop(),this.markersShown.set([]),await Si(),i||e||!this.micrio.camera?.isZoomedOut()||this.micrio.state.$tour||this.$focussed||this.hasChanged()||(t=0),this.set(r?.layout||this.image.$info?.grid,{noHistory:!0,duration:t,noCamAni:e,forceAni:i,horizontal:!!r&&r.horizontal}).then(t=>(this.depth.set(this.history.length=0),this.micrio.current.set(this.image),t))}switchToGrid(){const t=this.$focussed;if(!t)return;const e=t.camera.getView();e&&this.reset(0,!0).then(()=>{t.opts.area&&this.image.camera.setView(t.opts.area,{noLimit:!0}),t.camera.setView(e,{noLimit:!0}),this.micrio.current.set(this.image)})}async flyToMarkers(t,e,i){const r=t?.split("|").map(t=>t.trim()),s=r?.[0]??"",n=s?this.images.filter(t=>!!t.$data?.markers?.find(t=>t.tags?.includes(s))):this.images;return this.set(n.map(t=>{const e=t.$data?.markers?.find(t=>t.tags?.includes(s));return this.getString(t.$info,{view:i?void 0:e?.view})}).join(";"),{duration:e,horizontal:"h"==r?.[1]})}async back(t){const e=this.history.pop();e&&(this.depth.set(this.history.length),this.micrio.current.set(this.image),this.$focussed&&this.blur(),await this.set(e.layout,{duration:t,noHistory:!0,horizontal:e.horizontal,view:e.view}))}setTimingFunction(t){this.micrio.wasm.setGridTransitionTimingFunction(mc.Camera.TimingFunction[this.timingFunction=t])}async focus(t,e={}){if(!t)return this.back();e.coverLimit&&(e.cover=!0);const i=!e.view&&!e.cover,r=this.micrio;wt(r.visible).find(t=>t==this.image)||r.current.set(this.image);const s=this.$focussed;if(s==t)return;e.transition?.startsWith("slide-")||0!=e.duration&&(!s||r.wasm.areaAnimating(s.ptr)||this.current.includes(t))||t.camera.setArea([0,0,1,1],{noDispatch:!0,direct:!0}),s&&this.blur(),t.camera.setCoverLimit(!!e.cover),this.setTimingFunction("ease");const n=await this.transition(t,s,this.getString(t.$info,{view:e.view}),e);return r.wasm.setZIndex(t.ptr,3),this.focussed.set(t),wt(t.visible)||"crossfade"!=e.transition&&e.transition||(e.duration=0),this.set(n,{noBlur:!0,duration:e.duration,forceAreaAni:"crossfade"!=e.transition,cover:!!e.cover,coverLimit:!!e.coverLimit}).then(()=>{r.events.dispatch("grid-focus",t);const e=t.$info;this.removeGrid(),r.$current!=t&&r.current.set(t);const s=r.offsetWidth/r.offsetHeight,n=(1-e.width/e.height/s)/2;!t.camera.aniDone&&i&&t.camera.flyToFullView({duration:1e3*this.aniDurationIn}).catch(()=>{}),this.image.camera.setLimit([n,0,1-n,1])}).catch(()=>{})}async transition(t,e,i,{duration:r,view:s,transition:n,noViewAni:a,exitView:o,blur:c,cover:l}){if(!n)return i;const{wasm:h}=this.micrio;if("crossfade"==n&&(t.camera.setArea([0,0,1,1]),a=!0),s&&a&&t.camera.setView(s,{noRender:!0,noLimit:!0}),!e||"crossfade"==n)return i;const d=n.startsWith("slide")||n.startsWith("swipe"),u=n.startsWith("behind"),m=d?n.endsWith("-up")?0:n.endsWith("-down")?180:n.endsWith("-left")?270:90:void 0;if((d||u)&&h.fadeTo(t.ptr,.9999,!0),n.startsWith("slide"))t.camera.setArea(Il[m],{noDispatch:!0,direct:!0});else if(n.startsWith("swipe"))t.camera.setArea($l[m],{noDispatch:!0,direct:!0}),i=[this.getString(e.$info,{view:o??e.camera.getView(),area:Pl[m]}),this.getString(t.$info,{view:s,area:[0,0,1,1]})].join(";");else if(u){t.camera.setArea([0,0,1,1]),t.camera.setView([0,0,1,1]);const i=[this.getString(e.$info,{view:[0,0,1,1]}),this.getString(t.$info,{view:[0,0,1,1]})];"behind-left"==n&&i.reverse(),await this.set(i.join(";"),{noBlur:!0,horizontal:!0,coverLimit:l}).then(()=>Ks(200))}if(c&&!isNaN(c)&&c>0){const t=(r=r??this.nextCrossFadeDuration??this.aniDurationIn)/2,e=this.micrio.canvas.element.style;e.transition=`filter ${t}s ease`,e.filter=`blur(${c}px)`,setTimeout(()=>{e.filter="",setTimeout(()=>e.transform="",1e3*t)},1e3*t)}return i}blur(){const t=this.$focussed;t&&(this.micrio.wasm.setZIndex(t.ptr,2),this.micrio.events.dispatch("grid-blur"),this.focussed.set(void 0),this.image.camera.setLimit([0,0,1,1]),this.micrio.current.set(this.image))}tourEvent(t){const e=t.detail;e&&e.action?.startsWith("grid:")&&e.active&&this.action(e.action.slice(5),e.data,e.end-e.start)}action(t,e,i){"string"==typeof t&&(t=mc.Grid.GridActionType[t]);const r=t+(e??"");if(this.lastAction==r)return;const s=this.actionHandlers[t];s?s(e,i):console.warn("Warning: unknown grid tour event",t),this.lastAction=r}async enlarge(t,e,i=e){return this.set((this.history[this.history.length-1]?.layout||this.image.$info.grid).split(";").map((r,s)=>`${r}|${s==t?`${e},${i}`:1}`).join(";"),{noHistory:!0,keepGrid:!0,duration:500})}getRelativeView(t,e){const i=t.opts.area??[0,0,1,1],r=i[2]-i[0],s=i[3]-i[1];return[i[0]+r*e[0],i[1]+s*e[1],i[0]+r*e[2],i[1]+s*e[3]]}},Cl=class t extends HTMLElement{static get observedAttributes(){return["id","muted","data-grid","data-limited","lang"]}static{this.jsonCache=mn}get $current(){return this._current}get camera(){return this._current?.camera}constructor(){super(),this.printed=!1,this.canvases=[],this.current=vt(),this.visible=vt([]),this.canvas=new dl(this),this.events=new fl(this),this.state=new kc.Main(this),this.analytics=new Al(this),this._router=new Sl(this),this.barebone=vt(!1),this.webgl=new hl(this),this.wasm=new sl(this),this.defaultSettings=this.defaultSettings,this.loading=vt(!0),this.switching=vt(!1),this.isMuted=vt("1"==localStorage.getItem(wc)),this._lang=vt(),this.keepRendering=!1,this.initedFirst=!1,this.loadV5Album=(t,e)=>(t=>"MICRIO_ALBUM"in self?Promise.resolve(self.MICRIO_ALBUM):gn(`https://i.micr.io/album/${t}.json`))(t).then(t=>{if(!t)return;const i=t.id+"."+t.revision,r=e.path=t.organisation?.baseUrl??"https://r2.micr.io/";return e.organisation=t.organisation,e.settings.album=t,e.settings.gallery={archive:i,sort:t.sort,type:t.type,startId:e.id,isSpreads:t.isSpreads,coverPages:t.coverPages,revisions:t.published},delete e.id,this.loadArchiveBin(r,i).then(()=>this.loadGallery(e,r,!0))},t=>this.printError(t?.message||t)),this.getArchiveIndex=async(t,e=pc)=>_c.get(`${e}${t}.json`).then(t=>(t.images.forEach(t=>mn.set(`${e}${t.id}/info.json`,t)),t)),this.current.subscribe(t=>this._current=t);let t=!1;en(this.loading,{targetValue:!1}).then(()=>{this.setAttribute("data-loaded",""),this.switching.subscribe(e=>{e?this.setAttribute("data-switching",""):(t||Si().then(()=>this.events.dispatch("show",this)),t=!0,this.removeAttribute("data-switching"))});const e=this.querySelector("img.preview");e&&setTimeout(()=>e.remove(),500)})}attributeChangedCallback(t,e,i){switch(t){case"id":if(!this.isConnected||!i)return;this.printed?this.open(i):this.print();break;case"muted":this.isMuted.set(this.hasAttribute("muted"));break;case"data-grid":this.printed?this.$current?.grid?.set(i):this.print();break;case"data-limited":this.wasm?._vertexBuffer&&this.$current?.ptr&&this.wasm.setLimited(this.$current.ptr,!!i);break;case"lang":{let t=wt(this._lang);t!=i&&(this._lang.set(i),Wn.set(Bn[i]??Bn.en),i&&(Yn.includes(i)?this.setAttribute("dir","rtl"):this.removeAttribute("dir")),t&&this.events.dispatch("lang-switch",i));break}}}connectedCallback(){this.canvas.place(),(this.hasAttribute("data-router")||this.hasAttribute("data-space"))&&"false"!=this.getAttribute("data-router")&&this._router.hook(),!this.id&&!this.hasAttribute("data-gallery")||this.printed||this.print(),"muted"in this||(Object.defineProperty(this,"muted",{get(){return wt(this.isMuted)},set(t){t?this.setAttribute("muted",""):this.removeAttribute("muted")}}),this.isMuted.subscribe(t=>{this.muted=t,t?(localStorage.setItem(wc,"1"),this.events.dispatch("audio-mute")):(localStorage.removeItem(wc),this.events.dispatch("audio-unmute"))}))}addEventListener(t,e,i){super.addEventListener(t,e,i)}removeEventListener(t,e,i){super.removeEventListener(t,e,i)}destroy(){this.current.set(void 0),this._router.unhook(),this.events.enabled.set(!1),this.canvas.unhook(),this.analytics.unhook(),this.wasm.unbind(),this._ui&&dr(this._ui),delete this._ui,this.webgl.dispose(!0),this.printed=!1}loadArchiveBin(t,e){return this.printUI(!0,!0),_c.load(t,"g/"+e,t=>this._ui?.setProps?.({loadingProgress:t}))}async print(){if(this.printed)return;this.printed=!0,await Si();const t=this.getOptions();if(t.settings||(t.settings={}),t.settings.noControls&&this.state.ui.controls.set(!1),t.settings.gallery?.archive){const e=t.settings.gallery?.archive,i=/\.\d+$/.test(e),r=t.path||(kn(e.replace(/\.\d+$/,""))?"https://r2.micr.io/":"https://b.micr.io/");i&&await this.loadArchiveBin(r,e),t.settings.gallery.startId=t.id,t.grid?await this.setGrid(t,r):await this.loadGallery(t,r,i),i||delete t.settings.gallery.archive,t.path||(t.path=r),delete t.id}else t.id?.startsWith("album/")?await this.loadV5Album(t.id.replace("album/",""),t):t.id&&kn(t.id)&&!this.hasAttribute("width")&&!this.hasAttribute("height")&&await wn(t.id,t.forceInfoPath?t.path:void 0,t.settings?.forceDataRefresh).then(e=>e?.albumId?this.loadV5Album(e.albumId,t):void 0).catch(()=>{});this.keepRendering=!!t.settings.keepRendering;const e=t.id||t.gallery||t.grid;if(this.events.dispatch("print",t),void 0!==t.settings.lazyload&&"IntersectionObserver"in window){const i=new IntersectionObserver(r=>{r[0]&&r[0].isIntersecting&&(i.unobserve(this),e&&this.open(t))},{rootMargin:100*t.settings.lazyload+"% 0px"});i.observe(this)}else e&&requestAnimationFrame(()=>this.open(t))}printUI(e,i){this._ui?this._ui.setProps?.({noHTML:e,noLogo:i}):this._ui=ar(t.Svelte,{target:this,props:{micrio:this,noHTML:e,noLogo:i}})}printError(t){const e=t instanceof Bs?t.displayMessage:(t instanceof Error?t.message:t)??"An unknown error has occurred";console.error("Error:",e+(t instanceof Bs?` (${t.code}: ${t.message})`:"")),this._ui?.setProps?.({error:e})}open(t,e={}){this.printed||this.print();const i="string"==typeof t,r=this.getOptions();let s=i?{...r,id:t}:t;if(s.settings||(s.settings={}),r.settings?.gallery?.archive&&(/\.\d+$/.test(r.settings.gallery.archive)||delete r.settings.gallery.archive),i||Xs(r.settings,s.settings),this.defaultSettings&&Xs(this.defaultSettings,s.settings),this.$current&&s.id==this.$current?.id)return this.$current;e.splitScreen||e.gridView||!this.$current||this.switching.set(!0),s.settings.noGTag||this.analytics.hook(),this.printed=!0,this.printUI(!!s.settings.noUI,!!s.settings.noLogo);let n=this.canvases.find(t=>s.id&&t.id==s.id),a=!1;const o=this.canvases[0]?.grid;if(!n&&o){const t=s.id?o.images.find(t=>t.id==s.id):void 0;a=!!t,n=s.id?t:this.canvases[0],a&&!o.insideGrid()&&this.current.set(this.canvases[0])}if(!n){this.canvases.length&&(s.path=this.canvases[0].dataPath,s.lang=this.lang),this.canvases.push(n=new Ec(this.wasm,s,e.splitScreen?{secondaryTo:e.splitTo??this._current,isPassive:e.isPassive}:void 0));const t=this.state.value&&this.state.value.c.find(t=>t[0]==s.id);t&&n.state.set(t)}e.startView&&(n.state.view.set(s.settings.view=e.startView),n.ptr&&n.wasm.ready&&n.camera.setView(s.settings.view,{noRender:!0})),this.lang||(this.lang="en");const c=()=>{if(n){if(!this.webgl.gl)try{this.webgl.init()}catch(t){return void this.printError(t)}en(n.info).then(t=>{if(t&&n){if(!this.initedFirst){switch(this.canvas.hook(),this._current?.$settings?.theme){case"light":this.setAttribute("data-light-mode","");break;case"os":this.setAttribute("data-auto-scheme","")}this.initedFirst=!0}t.grid&&!n.grid&&(n.grid=new Ll(this,n)),Si().then(()=>this.dispatchEvent(new CustomEvent("load",{detail:n}))),e.splitScreen&&Si().then(()=>{n&&(o?.image.camera.aniDoneAdd&&o.image.camera.aniDoneAdd.length>0?o.image.camera.aniDoneAdd.push(()=>n?.splitStart()):n.splitStart())})}}),this.wasm.set360Orientation(e.vector?.direction??0,e.vector?.distanceX??0,e.vector?.distanceY??0),this.wasm.preventDirectionSet=!e.vector,!a||e.gridView&&o?.current.find(t=>t.id==s.id)?e.splitScreen?this.wasm.setCanvas(n):this.current.set(n):o?.focus(n,{view:s.settings?.view}).then(()=>this.current.set(n))}};return this.wasm.ready?c():this.wasm.load().then(c).catch(t=>this.printError(t)),n.noImage&&this.loading.set(!1),n}close(t){t.opts.secondaryTo?t.splitEnd():this.wasm.removeCanvas(t)}getOptions(){const t={gallery:{}},e={settings:t,id:this.id},i=(t,e,i)=>{const r=e.split(".");for(let s=0;s<r.length-1;s++)t=t[r[s]];t[r[r.length-1]]=i};for(const r in yc.STRINGS){const s=yc.STRINGS[r],n=this.getAttribute(r),a=s.f||r.replace("data-","");n&&i(s.r?e:t,a,n)}for(const r in yc.BOOLEANS){const s=yc.BOOLEANS[r],n=this.getAttribute(r),a=s.f||r.replace("data-",""),o=null!=n&&""==n||"true"==n;(o||"false"==n)&&i(s.r?e:t,a,s.n?!o:!!o)}for(const r in yc.NUMBERS){const s=yc.NUMBERS[r],n=s.f||r.replace("data-","");let a=this.getAttribute(r);void 0!==s.dN&&null==a&&(a=s.dN),null==a||isNaN(Number(a))||i(s.r?e:t,n,Number(a))}for(const r in yc.ARRAYS){const s=yc.ARRAYS[r],n=this.getAttribute(r),a=s.f||r.replace("data-","");null!=n&&i(s.r?e:t,a,n.split(",").map(t=>Number(t)))}return t.static&&(t.noUI=t.skipMeta=!0,t.hookEvents=!1),e.settings&&e.grid&&e.grid.indexOf(".")>0&&(e.settings.gallery.archive=e.grid),e}async loadGallery(t,e,i){let r=t.settings?.gallery,s=r?.archive;if(!r||!s)return;const n=t.settings;if(i){const t=await this.getArchiveIndex(s.split(".")[0],e);r.archiveLayerOffset=t.delta,s=t.images.sort("name"==r.sort?(t,e)=>t.title&&e.title?t.title<e.title?-1:t.title>e.title?1:0:0:"-name"==r.sort?(t,e)=>t.title&&e.title?t.title<e.title?1:t.title>e.title?-1:0:0:"-created"==r.sort?(t,e)=>t.created&&e.created?t.created<e.created?1:t.created>e.created?-1:0:0:(t,e)=>t.created&&e.created?t.created<e.created?-1:t.created>e.created?1:0:0).map(t=>`${t.id},${t.width},${t.height},${t.isDeepZoom?"d":""},${t.isPng?"p":t.isWebP?"w":""},${t.tileSize||""}`.replace(/\,+$/,"")).join(";")}const a=s.split(";").map(t=>t.trim());if(!i){const t=a.filter(t=>t.startsWith("http")).map(t=>gn(t));t.length&&await Promise.all(t).then(t=>t.forEach((t,e)=>{t&&(a[e]=`${t["@id"]},${t.width},${t.height}`)}))}const o=a.map(t=>t.split(",").map(t=>isNaN(t)?t:Number(t)));o.forEach((t,e)=>{e>0&&!t[2]&&t.push(...o[e-1].slice(1))});const c=t.height=Math.max(...o.map(t=>t[2]));r.type||(r.type="swipe");const l="switch"==r.type||"swipe-full"==r.type||"omni"==r.type,h=r.isSpreads,d=h&&!l?Math.round(o[0][1]/20):0,u=h?r.coverPages??0:0,m=t.width=l?Math.max(...o.map(t=>t[1]*(h?2:1))):o.reduce((t,e)=>t+e[1]+d,0);let f=0;t.gallery=o.map((t,i)=>new Ec(this.wasm,{id:t[0],path:e,width:t[1],height:t[2],isDeepZoom:"d"==t[3],isPng:"p"==t[4],isWebP:"w"==t[4],tileSize:t[5]||1024,revision:r?.revisions?.[t[0]],settings:{skipMeta:!0,gallery:r}},{isEmbed:l,useParentCamera:l,area:l?h?i-u<0||i==o.length-1&&(i-u)%2==0?[.25,0,.75,1]:(i-u)%2==0?[0,0,.5,1]:[.5,0,1,1]:[0,0,1,1]:[(f+=i>0&&(i<u||(i-u)%2==0)?d:0)/m,(c-t[2])/2/c,(f+=t[1])/m,((c-t[2])/2+t[2])/c]})),n.pinchZoomOutLimit=!0,t.gallery.length&&(n.view=sn.fromLegacy(t.gallery[Math.max(0,t.gallery.findIndex(t=>t.id==r.startId))].opts.area))}async setGrid(t,e){t.settings&&t.grid&&(t.settings.gallery?.archive==t.grid&&(this.gridInfoData=await this.getArchiveIndex(t.grid.split(".")[0],e),t.grid=this.gridInfoData.images.map(t=>Ll.getString(t,{cultures:"cultures"in t?t.cultures.join("-"):void 0})).join(";")),t.width=this.offsetWidth*this.canvas.getRatio(),t.height=this.offsetHeight*this.canvas.getRatio(),t.settings.zoomLimit=15,t.settings.minimap=!1,t.settings.initType="cover",this.removeAttribute("data-grid"))}get lang(){return wt(this._lang)}set lang(t){this.setAttribute("lang",t)}};Cl.Svelte=function(t,e){et(e,!0);const i=()=>kt(Ai(A),"$settings",h),r=()=>kt(Ai(E),"$info",h),s=()=>kt(Ai(S),"$data",h),n=()=>kt(k,"$tour",h),a=()=>kt(L,"$volume",h),o=()=>kt(w,"$visible",h),c=()=>kt(_,"$markerPopup",h),l=()=>kt(x,"$popover",h),[h,d]=_t();let u=ys(e,"noHTML",15),m=ys(e,"noLogo",23,u),f=ys(e,"loadingProgress",7,1),p=ys(e,"error",7,void 0);tt("micrio",e.micrio),tt("markerImages",new Map);const g="markers"==e.micrio.getAttribute("data-ui");g&&u(!0);const v="false"!=e.micrio.getAttribute("data-embeds"),{visible:w,state:b,isMuted:y}=e.micrio,{tour:k,marker:T,popup:_,popover:x}=b;let E=ne(void 0),S=ne(void 0),A=ne(void 0);function M(t,e){if(e)for(let i,r=0;r<e.length;r++)if(e[r].id==t||(i=M(t,e[r].children)))return i??e[r]}let I=ne(!1),$=ne(void 0);const P=[];e.micrio.current.subscribe(t=>{t&&(Tt(oe(E,t.info,!0),"$info",h),Tt(oe(A,void 0),"$settings",h),Ai(E)&&en(Ai(E)).then(e=>{e&&(oe(I,!0),Tt(oe(A,t.settings,!0),"$settings",h),!Ai($)&&e.organisation?.logo&&oe($,e.organisation,!0))}),Tt(oe(S,t.data,!0),"$data",h)&&P.indexOf(t.id)<0&&en(Ai(S)).then(async i=>{if(!i)return;if(P.push(t.id),await Si().then(Si),wt(e.micrio.state.popover)||wt(e.micrio.state.marker)||wt(e.micrio.state.tour))return;const r=t.$settings.start;if(r)switch(r.type){case"marker":t.state.marker.set(r.id);break;case"markerTour":const s=i.markerTours?.find(t=>t.id==r.id);s&&e.micrio.state.tour.set(s);break;case"tour":const n=i.tours?.find(t=>t.id==r.id);n&&e.micrio.state.tour.set(n);break;case"page":const a=M(r.id,i.pages);a&&e.micrio.state.popover.set({contentPage:a,showLangSelect:!0})}}))});const L=vt(kt(y,"$isMuted",h)?0:1);tt("volume",L),y.subscribe(t=>L.set(t?0:1)),tt("mediaPaused",vt(!1));let C=ne(!1),R=ne(ue([]));tt("srt",vt()).subscribe(t=>setTimeout(()=>{oe(R,t?[t]:[],!0)},20));const D=Ht(()=>i()?._360?.video),F=Ht(()=>Ai(D)?.src),O=Ht(()=>i()?.omni),z=Ht(()=>r()?.gallery),N=Ht(()=>s()?.markers?.filter(t=>!!t.positionalAudio)),V=Ht(()=>!!s()?.music?.items.length||!!Ai(N)?.length),U=Ht(()=>n()||kt(T,"$marker",h)),B=Ht(()=>!u()||g),W=Ht(()=>!(m()||r()&&u()||i()?.noLogo)),X=Ht(()=>u()||!Ai(W)||i()?.noOrgLogo?void 0:Ai($)),Y=Ht(()=>!(u()||Ai(O)||e.micrio.spaceData||n()||r()?.gallery)),j=Ht(()=>!!Ai(z)||!!Ai(O)),G=Ht(()=>!u()&&!!r()),H=Ht(()=>!u()&&!Ai(U)&&i()?.showInfo),Z=Ht(()=>!u()&&Ai(I)&&!i()?.noToolbar);var J={setProps:function(t){"error"in t&&p(t.error),void 0!==t.noHTML&&u(t.noHTML),void 0!==t.noLogo&&m(t.noLogo),void 0!==t.loadingProgress&&f(t.loadingProgress)}},K=Bc(),Q=xe(K),rt=t=>{{let e=Ht(()=>!!r().is360);Fo(t,{get volume(){return a()},get data(){return s()},get is360(){return Ai(e)}})}};vr(Q,t=>{Ai(V)&&s()&&r()&&t(rt)});var st=Ee(Q,2),nt=t=>{Ha(t,bs({get src(){return Ai(F)},get volume(){return a()},is360:!0,get width(){return r().width},get height(){return r().height}},()=>Ai(D)))};vr(st,t=>{Ai(F)&&r()&&t(nt)});var at=Ee(st,2),ot=t=>{var e=ji();yr(xe(e),1,()=>s().embeds,t=>t.uuid,(t,e)=>{Ic(t,{get embed(){return Ai(e)}})}),Gi(t,e)};vr(at,t=>{v&&s()&&s().embeds&&t(ot)});var ct=Ee(at,2),lt=t=>{Nn(t,{})};vr(ct,t=>{Ai(W)&&t(lt)});var ht=Ee(ct,2),dt=t=>{la(t,{})};vr(ht,t=>{Ai(Z)&&t(dt)});var ut=Ee(ht,2),mt=t=>{var e=ji();yr(xe(e),1,o,t=>t.uuid,(t,e)=>{Oc(t,{get image(){return Ai(e)}})}),Gi(t,e)};vr(ut,t=>{Ai(B)&&t(mt)});var ft=Ee(ut,2),pt=t=>{var e=ji();yr(xe(e),1,()=>o().filter(t=>t.$settings.minimap),t=>t.uuid,(t,e)=>{da(t,{get image(){return Ai(e)}})}),Gi(t,e)};vr(ft,t=>{Ai(Y)&&t(pt)});var gt=Ee(ft,2),bt=t=>{{let e=Ht(()=>Ai(V)||!(!Ai(F)||!Ai(D)||Ai(D).muted));Ta(t,{get hasAudio(){return Ai(e)}})}};vr(gt,t=>{Ai(G)&&t(bt)});var yt=Ee(gt,2),xt=t=>{var e=Nc(),i=xe(e),r=t=>{Mo(t,{get images(){return Ai(z)},get omni(){return Ai(O)}})};vr(i,t=>{Ai(j)&&t(r)});var s=Ee(i,2),n=t=>{Un(t,{get organisation(){return Ai(X)}})};vr(s,t=>{Ai(X)&&t(n)});var a=Ee(s,2),o=t=>{Bo(t,{get info(){return Ai(E)},get data(){return Ai(S)}})};vr(a,t=>{Ai(H)&&Ai(E)&&Ai(S)&&t(o)}),Gi(t,e)};vr(yt,t=>{(Ai(j)||Ai(X)||Ai(H)&&Ai(E)&&Ai(S))&&t(xt)});var Et=Ee(yt,2),St=t=>{var e=Vc(),i=xe(e),r=t=>{lo(t,{get marker(){return c()}})};vr(i,t=>{c()&&t(r)});var s=Ee(i,2),a=t=>{yo(t,{get tour(){return n()},get noHTML(){return u()},onminimize:t=>oe(C,!t)})};vr(s,t=>{n()&&t(a)});var o=Ee(s,2),h=t=>{rc(t,{get popover(){return l()}})};vr(o,t=>{l()&&t(h)}),Gi(t,e)};vr(Et,t=>{(c()||n()||l())&&t(St)});var At=Ee(Et,2);yr(At,16,()=>Ai(R),t=>t,(t,e)=>{La(t,{get src(){return e},get raised(){return Ai(C)}})});var Mt=Ee(At,2),It=t=>{var e=Uc(),i=xe(e),r=t=>{!function(t,e){var i=Wo(),r=_e(i);Hn(r,{name:"error"});var s=Ee(r);q(i),Ue(()=>nr(s,` ${e.message??""}`)),Gi(t,i)}(t,{get message(){return p()}})};vr(i,t=>{p()&&t(r)});var s=Ee(i,2),n=t=>{!function(t,e){const i=2*Math.PI*40,r=Ht(()=>i*(1-e.progress));var s=zc();as(s,"viewBox","0 0 100 100");var n=_e(s);as(n,"r",40),as(n,"cx",50),as(n,"cy",50);var a=Ee(n);as(a,"r",40),as(a,"cx",50),as(a,"cy",50),as(a,"stroke-dasharray","251.32741228718345px"),q(s),Ue(()=>as(a,"stroke-dashoffset",`${Ai(r)??""}px`)),Rr(1,s,()=>Fn,()=>({delay:500})),Rr(2,s,()=>Fn),Gi(t,s)}(t,{get progress(){return f()}})};vr(s,t=>{f()<1&&t(n)}),Gi(t,e)};vr(Mt,t=>{(p()||f()<1)&&t(It)}),Gi(t,K);var $t=it(J);return d(),$t},Cl.VERSION=fc,customElements.define("micr-io",Cl),console.info("%c◈%c Micrio %cv5.5.0 - https://micr.io/","color: #00d4ee","color: #c5ff5b","color: inherit")}();})(`html{--micrio-color:#fff;--micrio-color-hover:#45a4e4;--micrio-border-radius:4px;--micrio-background:#292929bf;--micrio-background-filter:blur(8px);--micrio-popover-background:#292929bf;--micrio-scrubber-background:#ffffff40;--micrio-icon-size:18px;--micrio-text-align:left;--micrio-line-height:1.5em;--micrio-border-margin:16px;--micrio-button-size:48px;--micrio-button-shadow:0 4px 8px #00000054;--micrio-marker-size:16px;--micrio-marker-text-color:#fff;--micrio-marker-text-shadow:0px 2px 4px #0009;--micrio-marker-highlight:#00d4ee;--micrio-marker-color:#fff;--micrio-marker-border-radius:100%;--micrio-marker-border-color:#fff3;--micrio-marker-border-size:8px;--micrio-marker-icon:none;--micrio-marker-transition:background-color .25s ease, opacity .15s ease, border-width .15s ease, width .15s ease, height .15s ease;--micrio-popup-shadow:0 8px 16px #00000054;--micrio-popup-padding:16px;--micrio-progress-bar-background:#ffffff40;--micrio-progress-bar-height:4px;--micrio-waypoint-size:120px}micr-io[data-light-mode]{--micrio-color:#000;--micrio-color-hover:#196da6;--micrio-background:#ffffffa8;--micrio-progress-bar-background:#00000040;--micrio-popover-background:#d3d3d3bf;--micrio-scrubber-background:#ffffff80}@media (prefers-color-scheme:light){micr-io[data-auto-scheme]{--micrio-color:#000;--micrio-color-hover:#196da6;--micrio-background:#ffffffa8;--micrio-progress-bar-background:#00000040;--micrio-popover-background:#d3d3d3bf}}@media (width<=500px){html{--micrio-border-margin:5px;--micrio-button-size:48px}}micr-io{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;backface-visibility:hidden;background-position:50%;background-repeat:no-repeat;background-size:contain;width:100%;height:100%;min-height:200px;display:block;position:relative;overflow:hidden;container-type:size}micr-io,micr-io button{font-family:var(--micrio-font-family,inherit);font-size:var(--micrio-font-size,inherit);background-color:var(--micrio-background-color,transparent)}micr-io h3{font-weight:600}micr-io[dir=rtl]{--micrio-text-align:right}canvas.micrio{backface-visibility:hidden;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;display:block;position:absolute;top:0;left:0;width:100%!important;height:100%!important}micr-io:not([static]){overscroll-behavior:none}micr-io[data-hooked]:not([data-panning])>canvas.micrio{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:-ms-grab;cursor:grab;-ms-content-zooming:none;-ms-touch-action:none;touch-action:none}micr-io[data-panning]{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-ms-grabbing;cursor:grabbing}micr-io[data-hooked][data-can-pan]>canvas.micrio{-ms-touch-action:pan-y;touch-action:pan-y;overscroll-behavior:initial}micr-io>.micrio-grid{grid-gap:0;will-change:transform;transform-origin:0 0;--translate:none;--scale:1;width:100%;height:100%;transform:var(--translate) scale3d(var(--scale), var(--scale), 1);grid-auto-flow:dense;display:grid;position:absolute;top:0;left:0}micr-io>.micrio-grid>button{cursor:pointer;background:0 0;border:none;grid-area:auto/auto/span 1/span 1;margin:0;padding:0}a.micrio-logo{top:calc(var(--micrio-border-margin) * 2);left:calc(var(--micrio-border-margin) * 2);z-index:2;cursor:pointer;width:22px;height:22px;transition:transform .25s;display:block;position:absolute}a.micrio-logo:hover{transform:rotate(-90deg)}a.micrio-logo:before,a.micrio-logo:after{content:"";will-change:transform;box-sizing:unset;display:block;position:absolute;transform:rotate(45deg)}a.micrio-logo:before{border:3px solid #00d4ee;width:16px;height:16px}a.loading.micrio-logo:before{animation:1s ease-out infinite micrio-logo-spin}a.micrio-logo:after{background:#c5ff5b;outline:1px solid #c5ff5b;width:6px;height:6px;top:8px;left:8px}a.loading.micrio-logo:after{animation:.5s ease-out infinite micrio-logo-spin}@keyframes micrio-logo-spin{0%{transform:rotate(45deg)}to{transform:rotate(135deg)}}a.micrio-logo-org{top:calc(var(--micrio-border-margin) * 2);right:calc(var(--micrio-border-margin) * 2);z-index:1;display:block;position:absolute}img.micrio-logo-org{max-height:64px;display:block}svg.micrio-icon{vertical-align:-.125em;height:1em;display:inline-block;overflow:visible}svg.small.micrio-icon{height:.75em}menu.micrio-menu{margin:0;padding:0;transition:background .2s,box-shadow .2s}.micrio-menu-action.micrio-menu{cursor:pointer;color:inherit;text-shadow:inherit;box-sizing:border-box;text-align:center;background:0 0;border:none;border-radius:0;padding:0 24px;font-family:inherit;font-size:.9em;text-decoration:none;display:block}@media (width<=500px){menu.micrio-menu{font-size:1em}.micrio-menu-action.micrio-menu{width:100%;margin-bottom:10px;padding:6px 0}strong.micrio-menu>svg{display:none}.items>menu.micrio-menu>.micrio-menu-action:where(.micrio-menu){font-size:1em}menu.micrio-toolbar>menu.micrio-menu>.micrio-menu-action:where(.micrio-menu){border-bottom:1px solid #ffffff80;margin-top:24px;font-size:1.5em}}@media (width>=501px){div.items.micrio-menu{max-height:calc(100vh - 160px);overflow:hidden auto}menu.micrio-toolbar>menu.micrio-menu{color:#fff;margin-right:var(--micrio-border-margin);border-radius:var(--micrio-border-radius);overflow:hidden}menu.micrio-toolbar>menu.micrio-menu:hover,menu.micrio-toolbar>menu.micrio-menu:focus-within{-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);background:var(--micrio-background);box-shadow:var(--micrio-button-shadow)}menu.micrio-toolbar>menu.micrio-menu>.micrio-menu-action:where(.micrio-menu){position:relative}menu.micrio-toolbar>menu.micrio-menu>.micrio-menu-action:where(.micrio-menu)>strong:where(.micrio-menu){margin:0 -5px;padding:5px}menu.micrio-toolbar>menu.micrio-menu:hover .micrio-menu-action:where(.micrio-menu),menu.micrio-toolbar>menu.micrio-menu:focus-within .micrio-menu-action:where(.micrio-menu){text-shadow:none;color:var(--micrio-color)}strong.micrio-menu>svg{margin-left:10px;line-height:2px}menu.micrio-menu{float:left;position:relative}menu.micrio-menu:not(:focus-within):not(:hover) .items:where(.micrio-menu){display:none}.micrio-menu-action.micrio-menu{height:var(--micrio-button-size);line-height:var(--micrio-button-size);width:100%;text-align:var(--micrio-text-align);white-space:pre;font-weight:600}.items menu.micrio-menu{float:none}.items .micrio-menu-action.micrio-menu{width:100%}.micrio-menu-action.micrio-menu:hover,.micrio-menu-action.micrio-menu:focus{text-shadow:none!important;color:var(--micrio-color-hover)!important}}.micrio-button{cursor:pointer;box-sizing:border-box;vertical-align:bottom;font:inherit;touch-action:none;color:var(--micrio-color);background:var(--micrio-button-background,var(--micrio-background,none)) var(--background,none) center center no-repeat;min-width:var(--micrio-button-size);height:var(--micrio-button-size);font-size:90%;line-height:var(--micrio-button-size);border-radius:var(--micrio-border-radius);box-shadow:var(--micrio-button-shadow);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);background-size:24px;border:none;margin:0;padding:0 8px;text-decoration:none;transition:opacity .25s;display:inline-block;position:relative}.micrio-button:hover{outline:none}.micrio-button.transparent.micrio-button,.micrio-button.transparent.micrio-button:hover{-webkit-backdrop-filter:none;backdrop-filter:none;background-color:#0000}.micrio-button>*{transition:opacity .25s}.micrio-button:disabled{pointer-events:none;cursor:default}.micrio-button:disabled>*{opacity:.4}.micrio-button.no-click.micrio-button{pointer-events:none}img.micrio-button{pointer-events:none;max-width:100%;max-height:100%;margin:0 auto;display:block}.micrio-button>*{width:var(--micrio-icon-size);font-size:var(--micrio-icon-size);fill:var(--micrio-color);margin:0 auto;display:block;height:var(--micrio-icon-size)!important}.micrio-button.active.micrio-button{color:var(--micrio-color-hover)}.micrio-button.active.micrio-button svg{fill:var(--micrio-color-hover)}@media (hover:hover){.micrio-button:hover{background-color:var(--micrio-button-background-hover,var(--micrio-button-background,var(--micrio-background)));color:var(--micrio-color-hover)}.micrio-button:hover svg{fill:var(--micrio-color-hover);stroke:var(--micrio-color-hover)}.micrio-button:focus{outline:1px solid var(--micrio-color-hover)}}menu.micrio-toolbar{top:calc(var(--micrio-border-margin) - (var(--micrio-button-size) / 2 - 27px));left:var(--micrio-border-margin);color:#fff;text-shadow:1px 1px 2px #000;z-index:1;margin:0;padding:0;transition:transform .25s;position:absolute}@media (width<=500px){.micrio-button.toggle{top:var(--micrio-border-margin);width:34px;height:34px;box-shadow:none;z-index:2;position:absolute;left:0}.micrio-button.toggle.indent{left:35px}menu.micrio-toolbar{box-sizing:border-box;width:100%;height:100%;-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);z-index:1;background:#000000bf;padding:32px 0;top:0;left:0;overflow:hidden auto;transform:translate(0,0)}menu.micrio-toolbar:not(.shown){transform:translate3d(calc(-100% - var(--micrio-border-margin) * 2), 0, 0)}}@media (width>=501px){menu.indent.micrio-toolbar{margin-left:calc(var(--micrio-border-margin) * 2 + 25px)}menu.micrio-toolbar>.micrio-menu:not(:hover)>button.micrio-menu{margin-bottom:-15px}}canvas.micrio-minimap{bottom:var(--micrio-border-margin);transform-origin:100% 100%;cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:-ms-grab;cursor:grab;-ms-content-zooming:none;-ms-touch-action:none;touch-action:none;border-radius:var(--micrio-border-radius);background-size:100%;transition:opacity .2s;display:block;position:absolute;right:5px}canvas:not(:hover).hidden.micrio-minimap{opacity:0;pointer-events:none}canvas.dragging.micrio-minimap{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-ms-grabbing;cursor:grabbing}canvas.controls.micrio-minimap{right:calc(var(--micrio-border-margin) + var(--micrio-button-size) + 8px)}@media (width<=800px){canvas.micrio-minimap{pointer-events:none;right:65px;transform:scale(.5)}}div.micrio-button-group{box-shadow:var(--micrio-button-shadow);border-radius:var(--micrio-border-radius);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);background:var(--micrio-button-background,var(--micrio-background,none))}div.micrio-button-group:empty{display:none}div.micrio-button-group>.micrio-button{box-shadow:none;--micrio-background-filter:none;--micrio-button-background:none;display:block}div.micrio-button-group .micrio-button{border-radius:0}div.micrio-button-group .micrio-button:first-child{border-radius:var(--micrio-border-radius) var(--micrio-border-radius) 0 0}div.micrio-button-group .micrio-button:last-child{border-radius:0 0 var(--micrio-border-radius) var(--micrio-border-radius)}@media (width<=500px){div.micrio-button-group>*{height:calc(var(--micrio-button-size) - 4px)}div.micrio-button-group .micrio-button:first-child{padding-top:0}div.micrio-button-group .micrio-button:last-child{padding-bottom:0}}aside.micrio-controls{right:var(--micrio-border-margin);bottom:var(--micrio-border-margin);direction:rtl;margin:0;padding:0;transition:transform .5s,opacity .5s;position:absolute}aside.primary.micrio-controls:not(.portrait){right:calc(50% + var(--micrio-border-margin))}aside.primary.portrait.micrio-controls{bottom:calc(50% + var(--micrio-border-margin))}micr-io[data-switching]>aside.micrio-controls,micr-io[data-tour-active]>aside.micrio-controls{opacity:0;pointer-events:none}aside.micrio-controls>menu,aside.micrio-controls>button{width:var(--micrio-button-size);margin:8px 0;padding:0;display:block}menu.popout.micrio-controls{width:var(--micrio-button-size);height:var(--micrio-button-size);white-space:pre;pointer-events:none;box-shadow:var(--micrio-button-shadow);border-radius:var(--micrio-border-radius);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);direction:rtl;padding:0}menu.popout.micrio-controls:focus-within{pointer-events:all}menu.popout.micrio-controls button{pointer-events:all;--micrio-button-shadow:none;--micrio-background-filter:none;transition:border-radius .2s,opacity .2s}menu.popout.micrio-controls:hover>button:first-child{border-radius:0 var(--micrio-border-radius) var(--micrio-border-radius) 0}menu.popout.micrio-controls>:not(:first-child){border-radius:0;padding:0;transition:opacity .2s;display:inline-block}menu.popout.micrio-controls>button:last-child{border-radius:var(--micrio-border-radius) 0 0 var(--micrio-border-radius)}menu.popout.micrio-controls:not(:focus-within)>:not(:first-child){pointer-events:none;opacity:0}div.micrio-subtitles{text-align:center;color:#fff;pointer-events:none;width:100cqw;transition:transform .2s;position:absolute;bottom:50px;left:50cqw;transform:translate(-50%)}div.raised.micrio-subtitles{transform:translate3d(-50%, calc(-1 * var(--micrio-button-size)), 0)}div.micrio-subtitles p:where(.micrio-subtitles){-webkit-box-decoration-break:clone;box-decoration-break:clone;white-space:pre-wrap;text-shadow:2px 2px 1px #0005;font-size:2.5em;line-height:inherit;background-color:#0009;margin:.5em 0;padding:0 14px;display:inline}@media (width<=640px){div.micrio-subtitles{width:95cqw;font-size:.7em}}div.container.micrio-progress-bar{width:auto;color:var(--micrio-color);background:var(--micrio-background);cursor:default;flex:1;align-items:center;line-height:8px;display:flex}div.bars.micrio-progress-bar{height:var(--micrio-progress-bar-height);background:var(--micrio-progress-bar-background);flex:1;display:flex;position:relative}div.bars.micrio-progress-bar>*{box-sizing:border-box;cursor:pointer;width:100%;height:100%;display:block;position:relative;overflow:hidden}div.bars.micrio-progress-bar>:before{content:" ";background:var(--micrio-color);pointer-events:none;height:100%;width:var(--progress,0%);will-change:width;display:block;position:absolute}div.bars.micrio-progress-bar:after{content:"";width:16px;height:16px;left:var(--progress);background-color:var(--micrio-color);pointer-events:none;border-radius:8px;display:block;position:absolute;top:50%;transform:translate(-50%,-50%)}div.time.micrio-progress-bar{text-align:center;font-variant-numeric:tabular-nums;min-width:50px;padding:0 10px;font-size:90%;display:block}aside.micrio-media-controls{cursor:default;background:var(--micrio-background);align-items:center;margin:0;display:flex;position:relative}aside.micrio-media-controls>button{border:none;border-radius:0;margin:0}aside.micrio-media-controls>button:last-child{margin-right:16px}aside.micrio-media-controls>*{--micrio-button-background:none;--micrio-background-filter:none;--micrio-button-shadow:none}:fullscreen>aside.micrio-media-controls{border-radius:var(--micrio-border-radius);width:430px;max-width:90cqw;position:absolute;bottom:5px;left:50%;transform:translate(-50%)}svg.micrio-media-controls{pointer-events:none;width:42px;height:42px;position:absolute;top:-1px;left:-1px;transform:rotate(-90deg)}circle.micrio-media-controls{stroke-width:2px;stroke:#fff;fill:#0000;stroke-dasharray:119.4 119.4;transform-origin:50%;transition:stroke-dashoffset .25s linear}figure.micrio-media{width:100%;margin:0;display:block;position:relative}figure.micrio-media div:where(.micrio-media){cursor:pointer}figure.micrio-media div.videotour:where(.micrio-media){display:flex}figure.micrio-media:fullscreen div:where(.micrio-media){flex-direction:column;width:100vw;height:100vh;display:flex}figure.micrio-media:fullscreen div:where(.micrio-media)>:first-child{flex:1}.marker-popup>figure.micrio-media>div:where(.micrio-media){width:100%}iframe.micrio-media,video.micrio-media{max-width:unset;display:block}figure.is360.micrio-media{width:360px;position:absolute;bottom:5px;left:50%;transform:translate(-50%)}figure.is360.micrio-media video:where(.micrio-media){width:200px;height:200px;display:none}iframe.hooked.micrio-media{pointer-events:none}figcaption.micrio-media{text-align:center;color:var(--micrio-color);margin:.5em 1em;font-size:90%;font-style:italic}:not(.micrio-popover)>figure.micrio-media>figcaption:where(.micrio-media)>*,.micrio-popover figure.micrio-media{margin:0}aside.micrio-media{width:100%;display:flex}aside.inside.micrio-media{position:absolute;transform:translateY(-100%)}div.show-play.micrio-media{cursor:pointer;background:#0008;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:fixed;top:0;left:0}div.show-play.micrio-media>button.micrio-button{transform:scale(2)}figure.micrio-media:not(.media-micrio) button.micrio-button{white-space:pre;--micrio-background-filter:none;--micrio-button-shadow:none;border:none;border-radius:0;margin:0}figure.media-micrio.micrio-media{text-align:var(--micrio-text-align)}article.micrio-article{text-align:var(--micrio-text-align);line-height:var(--micrio-line-height,1.5em)}article.micrio-article>:first-child{margin-top:0}article.micrio-article>:last-child{margin-bottom:0}article.micrio-article p a{color:var(--micrio-color-hover,inherit);word-wrap:break-word}main.micrio-marker-content{padding:var(--micrio-popup-padding);-webkit-user-select:text;user-select:text;color:var(--micrio-color);background:var(--micrio-background);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);box-shadow:var(--micrio-popup-shadow);border-radius:var(--micrio-border-radius);box-sizing:border-box;text-align:var(--micrio-text-align);padding-bottom:0;position:relative;overflow-y:auto}main.micrio-marker-content>*{--micrio-button-background:none;--micrio-background-filter:none;--micrio-button-shadow:none}main.micrio-marker-content .micrio-progress-bar.container{-webkit-backdrop-filter:none;backdrop-filter:none;background:0 0}main.micrio-marker-content::-webkit-scrollbar{background-color:#0000;width:10px}main.micrio-marker-content::-webkit-scrollbar-thumb{background:var(--micrio-color);border-radius:var(--micrio-border-radius);margin-top:10px}main.empty.micrio-marker-content{width:auto}main.micrio-marker-content h1:where(.micrio-marker-content){margin:0 0 1.25em;font-size:1.5em;font-weight:600}main.micrio-marker-content>figure.micrio-media{margin:calc(-1 * var(--micrio-popup-padding));--micrio-background:transparent;width:auto;margin-bottom:0}main.micrio-marker-content>figure.micrio-media:not(.media-video):not(:last-child)>:last-child:not(figcaption){margin-bottom:var(--micrio-popup-padding);background:var(--micrio-background);padding:0 var(--micrio-popup-padding)}main.micrio-marker-content>figure.micrio-media.media-video{margin-bottom:var(--micrio-popup-padding)}main.micrio-marker-content>figure.micrio-media>div>aside.micrio-media{--micrio-background:transparent}main.micrio-marker-content>article:last-child{margin-bottom:var(--micrio-popup-padding)}main.micrio-marker-content p{white-space:pre-line}main.micrio-marker-content figure.hidden{display:none}main.micrio-marker-content figure>div.micrio-media>:first-child{width:100%}button.micrio-marker-content{margin:0 calc(-1 * var(--micrio-popup-padding)) var(--micrio-popup-padding) calc(-1 * var(--micrio-popup-padding));padding:0}button.micrio-marker-content:disabled{cursor:default}figcaption.micrio-marker-content{margin-bottom:var(--micrio-popup-padding);text-align:center;padding:10px;font-size:.9em;font-style:italic}section.micrio-marker-content{margin-bottom:var(--micrio-popup-padding);grid-template-columns:repeat(auto-fit,minmax(100px,1fr));justify-items:center;gap:5px;display:grid}section.micrio-marker-content button:where(.micrio-marker-content){color:inherit;cursor:pointer;border:none;width:100%;margin:0;display:block}section.micrio-marker-content figure:where(.micrio-marker-content){margin:0;padding:0}section.micrio-marker-content img:where(.micrio-marker-content){object-fit:cover;width:100%;display:block}@media (width<=500px){section.micrio-marker-content{float:right;width:100px;margin-left:var(--micrio-border-margin);display:block}section.micrio-marker-content>button:where(.micrio-marker-content):not(:first-child),section.micrio-marker-content figcaption:where(.micrio-marker-content){display:none}}div.micrio-marker-popup{cursor:auto;pointer-events:all;top:var(--micrio-border-margin);left:var(--micrio-border-margin);display:block;position:absolute}div.destroying.micrio-marker-popup{pointer-events:none}div.micrio-marker-popup>main{max-height:80cqh}aside.micrio-marker-popup{padding:var(--micrio-border-margin)}aside.micrio-marker-popup progress:where(.micrio-marker-popup){display:none}@media (width>=501px){div.micrio-marker-popup{width:440px;min-width:20%}aside.micrio-marker-popup{padding-top:0;position:absolute;top:0;left:100%}aside.micrio-marker-popup>.micrio-button{margin:0 0 8px;padding:0;display:block}}div.micrio-marker-popup>main>:not(h3){transition-property:margin-top,margin-bottom,height,opacity;transition-duration:.5s;transition-timing-function:ease;overflow:hidden}div.minimized.micrio-marker-popup>main>:not(h3){opacity:0;margin-top:0;margin-bottom:0}@media (width<=500px){aside.micrio-marker-popup{margin-bottom:var(--micrio-border-margin);flex-direction:row-reverse;align-items:center;padding:0;display:flex;position:relative}aside.micrio-marker-popup progress:where(.micrio-marker-popup){opacity:0;pointer-events:none;flex:1;display:block}aside.micrio-marker-popup .micrio-tour-controls{display:flex;margin-bottom:0!important}aside.micrio-marker-popup .micrio-button{height:var(--micrio-button-size);margin:0 0 0 8px;padding:0!important;display:block!important}div.micrio-marker-popup{width:auto;right:var(--micrio-border-margin);bottom:calc(var(--micrio-button-size) + 2 * var(--micrio-border-margin));flex-direction:column;justify-content:space-between;display:flex}div.micrio-marker-popup>main{max-height:40vh}div.micrio-marker-popup>main>:not(h3){overflow:visible}}button.tour-step.micrio-marker-popup{vertical-align:middle;cursor:default;height:auto;line-height:normal}ol.micrio-serial-tour{color:var(--micrio-color);text-shadow:var(--micrio-marker-text-shadow);margin:0;list-style-type:decimal-leading-zero;position:absolute;bottom:75px;left:0}ol.micrio-serial-tour>li:where(.micrio-serial-tour){white-space:pre;height:1.5em;transition:height .25s,opacity .25s .25s}ol.micrio-serial-tour li.active:where(.micrio-serial-tour){font-weight:700}.minimized>ol.micrio-serial-tour>li:where(.micrio-serial-tour):not(.active){opacity:0;height:0;transition:height .25s .25s,opacity .25s}ol.micrio-serial-tour li:where(.micrio-serial-tour) button:where(.micrio-serial-tour){font:inherit;color:inherit;text-shadow:inherit;cursor:pointer;background:0 0;border:none;display:inline}ol.micrio-serial-tour li:where(.micrio-serial-tour) button:where(.micrio-serial-tour):hover{text-decoration:underline}aside.micrio-media-controls.micrio-serial-tour>figure.micrio-media{display:none}div.micrio-tour{bottom:var(--micrio-border-margin);max-width:calc(100% - var(--micrio-border-margin) * 2);box-sizing:border-box;border-radius:var(--micrio-border-radius);box-shadow:var(--micrio-button-shadow);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);background-color:var(--micrio-button-background,var(--micrio-background,none));padding:0;transition:transform .2s;display:flex;position:absolute;left:50%;transform:translate(-50%)}div:not(:hover).minimized.micrio-tour{transform:translate3d(-50%, calc(100% + var(--micrio-border-margin)), 0);pointer-events:none}.serial-tour.micrio-tour>*{--micrio-background:none}.serial-tour.minimized.micrio-tour{transform:translate3d(0, calc(100% + var(--micrio-border-margin)), 0)}.serial-tour.micrio-tour,.video-tour.micrio-tour{width:500px}div.micrio-tour>*{--micrio-button-background:none}div.micrio-tour button{white-space:pre;--micrio-background-filter:none;--micrio-button-shadow:none;border:none;border-radius:0;margin:0}article.scroll-tour.micrio-tour{scroll-snap-type:y mandatory;width:100%;height:100%;position:absolute;top:0;left:0;overflow:hidden scroll}button.micrio-button.scroll-tour-end{position:absolute;top:5px;right:5px}article.micrio-tour>div.micrio-marker-popup{scroll-snap-align:center;margin:20cqh 50px 50cqh;position:relative!important}article.micrio-tour>div.micrio-marker-popup:nth-child(2n){margin-left:auto}article.micrio-tour>div.micrio-marker-popup>aside{display:none}div.micrio-dial{bottom:var(--micrio-border-margin);width:320px;max-width:calc(100vw - calc(2 * (var(--micrio-button-size) + 4 * var(--micrio-border-margin))));max-width:calc(100cqw - calc(2 * (var(--micrio-button-size) + 4 * var(--micrio-border-margin))));height:calc(var(--micrio-button-size) * .6);touch-action:none;cursor:w-resize;background-color:#0000;position:absolute;left:50%;overflow:hidden;transform:translate(-50%)}div.micrio-dial:before,div.micrio-dial:after{content:"";background-position:var(--micrio-dial-offset,0px);width:100%;display:block;position:absolute}div.micrio-dial:before{background-image:repeating-linear-gradient(90deg,#8888 0% .5%,#0000 1% 2.5%);height:50%;top:25%}div.micrio-dial:after{background-image:repeating-linear-gradient(90deg,#fff8 0% .5%,#0000 1% 20%);height:100%}span.micrio-dial{line-height:calc(var(--micrio-button-size) * .6);color:var(--micrio-color);opacity:.85;pointer-events:none;text-shadow:1px 1px 3px #000,-1px -1px 3px #000;font-size:smaller;display:block;position:absolute;bottom:0;left:50%;transform:translate(calc(5px - 50%))}ul.micrio-gallery{bottom:var(--micrio-border-margin);background:var(--micrio-background);border-radius:var(--micrio-border-radius);color:var(--micrio-color);touch-action:none;width:520px;max-width:calc(100cqw - 50px);margin:0;padding:0 16px;list-style-type:none;transition:opacity .25s;display:flex;position:absolute;left:50%;transform:translate(-50%)}@media (width<=500px){ul.micrio-gallery{width:auto;left:5px;right:52px;transform:none}div.hidden.micrio-gallery>ul:where(.micrio-gallery){transition-delay:.25s}}li.micrio-gallery{line-height:var(--micrio-button-size);text-align:center;opacity:.5;flex:1;width:0;height:48px;padding:0;font-size:32px;transition:opacity .25s;display:block;position:relative}li.active.micrio-gallery{opacity:1;transition-duration:0s}li.micrio-gallery>button:where(.micrio-gallery){color:inherit;cursor:pointer;pointer-events:none;background:0 0;border:none;width:100%;min-width:48px;height:48px;padding:0;position:absolute;left:50%;transform:translate(-50%)}li.hover.micrio-gallery>button:where(.micrio-gallery){pointer-events:all}@media (hover:hover){li.hover.micrio-gallery{opacity:1;transition-duration:0s}}button.micrio-gallery:not(.bullet){width:var(--micrio-button-size);height:var(--micrio-button-size);box-sizing:border-box;background:var(--micrio-scrubber-background);border-radius:var(--micrio-border-radius);touch-action:none;border:none;transition:left .15s,background-color .2s;position:absolute;transform:translate(-50%)}ul.micrio-gallery>button:where(.micrio-gallery){cursor:ew-resize;top:0;left:0}button.angular.micrio-gallery{color:#444;cursor:move;padding:0;font-size:32px;line-height:42px;bottom:42px;left:50%}button.micrio-gallery:not(.bullet):hover{background:#eee8}button:not(.bullet).dragging.micrio-gallery{transition:none}div.micrio-gallery{transition:opacity .5s;display:contents}div.hidden.micrio-gallery:not(:hover)>*,div.micrio-gallery>button.gallery-btn:disabled{opacity:0;pointer-events:none}div.micrio-gallery>button.gallery-btn{position:absolute;top:50%;transform:translateY(-50%)}div.micrio-gallery>button.gallery-btn.arrow-left{left:var(--micrio-border-margin)}div.micrio-gallery>button.gallery-btn.arrow-right{right:var(--micrio-border-margin)}details.micrio-details{bottom:var(--micrio-border-margin);left:var(--micrio-border-margin);padding:var(--micrio-popup-padding);-webkit-user-select:text;user-select:text;white-space:normal;box-sizing:border-box;max-width:410px;color:var(--micrio-color);background:var(--micrio-background);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);box-shadow:var(--micrio-popup-shadow);border-radius:var(--micrio-border-radius);font-size:.9em;transition:all .5s;position:absolute}details.micrio-details summary:where(.micrio-details){cursor:pointer;list-style:none}details.micrio-details summary:where(.micrio-details)::-webkit-details-marker{display:none}details.micrio-details small:where(.micrio-details){font-style:italic;font-weight:400;display:block}details.micrio-details>:where(.micrio-details){text-overflow:ellipsis;margin:0;overflow:hidden}details.micrio-details a{color:var(--micrio-color-hover,inherit)}details.micrio-details button{position:absolute;top:0;left:calc(100% + 8px)}@media (width<=600px){details.micrio-details{max-width:calc(100% - 10px)}details.micrio-details:not([open]) cite:where(.micrio-details){display:none}details.micrio-details:not([open]) summary:where(.micrio-details)::marker{content:"?";margin-right:5px;font-size:20px;font-weight:700;line-height:20px;display:inline-block}details.micrio-details:not([open]) summary:where(.micrio-details)::-webkit-details-marker{content:"?";margin-right:5px;font-size:20px;font-weight:700;line-height:20px;display:inline-block}details.micrio-details button{position:absolute;inset:auto 0 calc(100% + 8px) auto}}div.micrio-error{color:#fff;text-align:center;white-space:pre-wrap;-webkit-user-select:text;user-select:text;z-index:10;background:#000000bf;border:1px solid #fff;border-radius:5px;padding:10px;line-height:24px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}div.micrio-error svg{vertical-align:middle;width:24px;height:24px;fill:var(--micrio-color);margin-right:10px}@media screen and (width<=520px){div.micrio-error{box-sizing:border-box;width:90%}}figure.micrio-micrio-gallery{position:relative}micr-io.micrio-micrio-gallery{background:0 0;width:100%;height:100%;display:block}micr-io.micrio-micrio-gallery ul.micrio-gallery{--micrio-border-margin:16px}figcaption.micrio-micrio-gallery{top:var(--micrio-border-margin);left:var(--micrio-border-margin);padding:var(--micrio-popup-padding);box-sizing:border-box;max-width:410px;color:var(--micrio-color);background:var(--micrio-background);-webkit-backdrop-filter:var(--micrio-background-filter);backdrop-filter:var(--micrio-background-filter);box-shadow:var(--micrio-popup-shadow);border-radius:var(--micrio-border-radius);position:absolute}@media (width>=501px){micr-io.micrio-micrio-gallery:not(:fullscreen)>aside{position:fixed}}@media (width<=501px){figcaption.micrio-micrio-gallery{max-width:calc(100% - 3 * var(--micrio-border-margin) - var(--micrio-button-size))}}dialog.micrio-popover::backdrop{color:#fff;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);animation:.2s forwards micrio-popover-fadeInBg}@keyframes micrio-popover-fadeInBg{0%{background:0 0}to{background:var(--micrio-popover-background)}}@keyframes micrio-popover-fadeIn{0%{opacity:0}to{opacity:1}}dialog.micrio-popover{pointer-events:all;background:0 0;border:none;max-width:90cqw;max-height:90cqh;padding:0;animation:.5s forwards micrio-popover-fadeIn;overflow:visible}dialog.micrio-popover div.micrio-media>:first-child{border-radius:var(--micrio-border-radius);overflow:hidden}dialog.micrio-popover div.micrio-media>aside{--micrio-background:none;--micrio-button-background:none}dialog.page.article.micrio-popover figure.media-video iframe{width:100%}aside.micrio-popover{--micrio-background-filter:none;z-index:1;position:absolute}dialog.micrio-popover:not(.article){display:flex}dialog.micrio-popover:not(.article) figure>div.micrio-media{height:100%}@media (width>=640px){aside.micrio-popover{margin-left:var(--micrio-border-margin);display:block;top:0;left:100%}aside.inside.micrio-popover{margin-left:0;margin-top:var(--micrio-border-margin);margin-right:var(--micrio-border-margin);top:0;left:auto;right:0}aside.micrio-popover:not(.inside){z-index:2;position:absolute;top:0;left:100%}aside.micrio-popover>.micrio-button{margin:0 0 8px;padding:0;display:block}dialog.micrio-popover:not(.article){width:calc(85cqw - 56px);height:47.8125cqw}dialog.micrio-popover>main{width:25cqw;min-width:unset;max-width:320px}dialog.micrio-popover>main>h1{margin-right:55px}}@media (width<=639px){aside.micrio-popover{top:var(--micrio-border-margin);right:var(--micrio-border-margin);position:fixed}aside.micrio-popover .micrio-button{height:var(--micrio-button-size);box-shadow:var(--micrio-button-shadow);margin-left:8px;border-radius:var(--micrio-border-radius)!important;padding:0!important;display:inline-block!important}dialog.micrio-popover:not(.article){flex-direction:column;width:100%;height:100%}dialog.micrio-popover:not(.article) figure.micrio-media{flex:1}}dialog.micrio-popover>figure{flex:1;margin:0;position:relative}dialog.micrio-popover>figure>div.micrio-media>:first-child{width:100%;height:calc(100% - var(--micrio-button-size))}dialog.micrio-popover>figure>div.micrio-media>micr-io{height:100%!important}@media (aspect-ratio>=16/9){dialog.micrio-popover:not(.article){width:133.333cqh;height:75cqh}}@media (width<=639px){dialog.micrio-popover div.micrio-media>:first-child{border-radius:0}dialog.micrio-popover:not(.article)>:first-child{flex-direction:column;justify-content:center;height:50cqh}dialog.micrio-popover:not(.article)>figure:first-child{flex-direction:column;flex:none;display:flex}}dialog.article.micrio-popover>article{text-shadow:none;color:var(--micrio-color);background:var(--micrio-background);box-sizing:border-box;border-radius:var(--micrio-border-radius);max-height:calc(90vh - 48px);padding:20px;overflow:hidden auto}@media (width>=640px){dialog.article.micrio-popover{width:540px}}dialog.article.micrio-popover h2:where(.micrio-popover){text-align:center}dialog.article.micrio-popover article img{width:100%;height:auto}menu.micrio-popover{margin:10px 0;padding:0;list-style:none}menu.micrio-popover>.micrio-button{margin-right:10px}menu.right.micrio-popover{text-align:right}menu.right.micrio-popover>.micrio-button{margin:0 0 0 10px}dialog.gallery.micrio-popover{width:100%;height:100%;max-width:unset;max-height:unset}div.micrio-marker{transform:translate3d(calc(var(--x,0) - 50%), calc(var(--y,0) - 50%), 0) scale3d(var(--scale,1), var(--scale,1), 1);will-change:transform;display:block;position:absolute;top:0;left:0}div.micrio-marker:not(.cluster):not(.no-fade){animation:.25s forwards micrio-marker-fadeIn}div.overlapped.micrio-marker{display:none}@keyframes micrio-marker-fadeIn{0%{opacity:0}to{opacity:1}}div.behind.micrio-marker{pointer-events:none;opacity:0!important}div.mat3d.micrio-marker{transform:var(--mat);transform-style:preserve-3d;top:50%;left:50%}div.mat3d.micrio-marker>button:where(.micrio-marker){position:absolute;transform:translate(-50%,-50%)}button.micrio-marker{width:var(--micrio-marker-size);height:var(--micrio-marker-size);color:var(--micrio-marker-text-color);cursor:pointer;font:inherit;background:50% no-repeat;background-image:var(--micrio-marker-icon);background-size:contain;border:none;margin:0;padding:0;display:block;position:relative}div.micrio-marker:not(.cluster) label:where(.micrio-marker){text-align:var(--micrio-text-align);cursor:pointer;white-space:pre-wrap;width:max-content;max-width:170px;text-shadow:var(--micrio-marker-text-shadow);opacity:0;pointer-events:none;padding-left:10px;font-size:90%;font-weight:600;line-height:1em;transition:opacity .1s;position:absolute;top:50%;left:100%;transform:translateY(-50%)}div.micrio-marker:hover{z-index:2}.show-titles>div.micrio-marker label:where(.micrio-marker),div.micrio-marker:hover label:where(.micrio-marker){opacity:1}@media (width<=640px){div.micrio-marker:not(.cluster) label:where(.micrio-marker){font-size:12px}}.show-titles>div.micrio-marker label:where(.micrio-marker){pointer-events:all}label.static.micrio-marker{transform:translate(-50%, 4px) scale3d(calc(1 / var(--scale,1)), calc(1 / var(--scale,1)), 1)}div.default.micrio-marker button:where(.micrio-marker){box-sizing:content-box;border-radius:var(--micrio-marker-border-radius);border:var(--micrio-marker-border-size) solid var(--micrio-marker-border-color);transition:var(--micrio-marker-transition);background-clip:content-box;background-color:var(--micrio-marker-color)}div.default.micrio-marker:hover,div.default.hovered.micrio-marker,div.default.opened.micrio-marker{z-index:1}div.default.micrio-marker:hover button:where(.micrio-marker),div.default.hovered.micrio-marker button:where(.micrio-marker),div.default.opened.micrio-marker button:where(.micrio-marker){background-color:var(--micrio-marker-highlight);width:calc(var(--micrio-marker-size) + var(--micrio-marker-border-size) * 2);height:calc(var(--micrio-marker-size) + var(--micrio-marker-border-size) * 2);border-width:0}div.has-icon.micrio-marker button:where(.micrio-marker){--micrio-marker-icon:none}div.has-custom-icon.micrio-marker{--micrio-marker-size:32px}div.default.has-icon.micrio-marker button:where(.micrio-marker){color:#fff;width:calc(var(--micrio-marker-size) + 24px);height:calc(var(--micrio-marker-size) + 24px);background-color:var(--micrio-marker-border-color);border:none}div.default.has-icon.micrio-marker button:where(.micrio-marker)>svg{margin:0 auto}div.default.has-icon.opened.micrio-marker button:where(.micrio-marker)>svg,div.default.has-icon.hovered.micrio-marker button:where(.micrio-marker)>svg,div.default.has-icon.micrio-marker:hover button:where(.micrio-marker)>svg{color:var(--micrio-marker-highlight)}div.default.has-custom-icon.micrio-marker button:where(.micrio-marker){background-color:var(--micrio-marker-color)}div.default.has-custom-icon.opened.micrio-marker button:where(.micrio-marker),div.default.has-custom-icon.hovered.micrio-marker button:where(.micrio-marker),div.default.has-custom-icon.micrio-marker:hover button:where(.micrio-marker){background-color:var(--micrio-marker-highlight,var(--micrio-marker-color))}div.cluster.micrio-marker button:where(.micrio-marker){border:2px solid var(--micrio-marker-color);background:var(--micrio-cluster-marker-background,#fff);color:var(--micrio-cluster-marker-color,#000);width:calc(var(--micrio-marker-size) + 12px);height:calc(var(--micrio-marker-size) + 12px);box-sizing:content-box;border-radius:100%}div.cluster.micrio-marker:hover button:where(.micrio-marker){background:var(--micrio-marker-highlight,#fff);border-color:var(--micrio-marker-highlight,#fff)}div.cluster.micrio-marker label:where(.micrio-marker){pointer-events:none;display:none}div.micrio-marker img:where(.micrio-marker){max-width:100%;max-height:100%;margin:auto;display:block}div.micrio-waypoint{transform-style:preserve-3d;transform:var(--matrix);--micrio-bb:var(--micrio-button-background);--micrio-bbh:var(--micrio-button-background-hover);width:0;height:0;display:block;position:absolute;top:50%;left:50%}div.micrio-waypoint>button{--micrio-button-background:var(--micrio-waypoint-background,var(--micrio-bb));--micrio-button-background-hover:var(--micrio-waypoint-background-hover,var(--micrio-bbh));--micrio-button-size:var(--micrio-waypoint-size);--micrio-border-radius:var(--micrio-waypoint-border-radius,100%);--micrio-icon-size:var(--micrio-waypoint-icon-size,calc(var(--micrio-button-size) - 50px));pointer-events:all;border:var(--micrio-waypoint-border-size,var(--micrio-marker-border-size)) solid var(--micrio-waypoint-border-color,var(--micrio-marker-border-color));margin:0;transition:background-color .25s,opacity .25s,border-color .25s,transform .25s;transform:translate(-50%,-50%)scale(.5)}div.micrio-waypoint>button>svg{pointer-events:none;margin:0 auto}div.micrio-waypoint:hover>button,div.active.micrio-waypoint>button{transition:background-color .25s,opacity .25s,transform .25s;transform:translate(-50%,-50%)scale(.6)}div.clicked.micrio-waypoint>button{animation:.75s infinite alternate micrio-waypoint-pulse}@keyframes micrio-waypoint-pulse{0%{transform:translate(-50%,-50%)scale(.5)}to{transform:translate(-50%,-50%)scale(.75)}}.embed-container.micrio-embed{transform:translate3d(calc(var(--x,0) - 50%), calc(var(--y,0) - 50%), 0) scale3d(var(--s),var(--s),1);opacity:var(--opacity,1);will-change:transform, opacity;direction:ltr;display:block;position:absolute;top:0;left:0}.embed3d.micrio-embed{top:50%;left:50%}.embed-container.no-events.micrio-embed{pointer-events:none}.embed-container.micrio-embed>:where(.micrio-embed){cursor:pointer}.embed-container.micrio-embed>*{transform:translate3d(-50%,-50%,0) scale3d(var(--scale,1), var(--scale,1), 1);position:absolute}.embed-container.micrio-embed>:not(button){width:auto!important}.embed-container.micrio-embed:not(.no-events)>*{pointer-events:all}.embed-container.behind.micrio-embed>*{pointer-events:none}.embed-container.micrio-embed>img:where(.micrio-embed){max-width:none}.embed-container.micrio-embed>button{--scale:1;--ratio:1;width:100px;aspect-ratio:var(--ratio);background:0 0;border:none;margin:0;padding:0}div.micrio-markers{pointer-events:none;will-change:width, height, top, left, opacity;width:100%;height:100%;perspective:inherit;position:absolute;top:0;left:0;overflow:hidden}div.micrio-markers:empty{display:none}div.micrio-markers>*{pointer-events:all}div.inactive.micrio-markers>*{pointer-events:none}div.is360.micrio-markers{transition:opacity .25s}div.is360.inactive.micrio-markers{opacity:0}aside.micrio-markers{pointer-events:none}aside.micrio-markers section:where(.micrio-markers){width:10cqw;min-width:200px;color:var(--micrio-marker-color);flex-direction:column;font-size:1em;font-weight:500;line-height:1em;display:flex;position:absolute;top:0;bottom:0}aside.micrio-markers section:where(.micrio-markers):first-child{align-items:flex-end;left:10px}aside.micrio-markers section:where(.micrio-markers):nth-child(2){align-items:flex-start;right:10px}aside.micrio-markers section:where(.micrio-markers) article:where(.micrio-markers){flex:1;align-items:center;max-height:30cqh;padding:10px;display:flex}aside.micrio-markers section:where(.micrio-markers) label:where(.micrio-markers){pointer-events:all;cursor:pointer;opacity:.75;max-width:160px;text-shadow:var(--micrio-marker-text-shadow);padding:10px;transition:opacity .25s,color .25s}label.hover.micrio-markers{color:var(--micrio-marker-highlight);opacity:1}aside.micrio-markers section:where(.micrio-markers):first-child article:where(.micrio-markers){justify-content:right}aside.micrio-markers section:where(.micrio-markers):first-child label:where(.micrio-markers){text-align:right}svg.micrio-markers{pointer-events:none;width:100%;height:100%;position:absolute}svg.micrio-markers line:where(.micrio-markers){stroke:var(--micrio-marker-highlight);stroke-width:2px}svg.micrio-markers line:where(.micrio-markers):not(.hovered){stroke:var(--micrio-marker-color);stroke-dasharray:10;stroke-width:1px;opacity:.75}svg.micrio-progress-circle{pointer-events:none;z-index:10;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)rotate(-90deg)}circle.micrio-progress-circle{transition:stroke-dashoffset .25s}
|
|
25
|
+
/*$vite$:1*/`,C,M))})();
|