diff --git a/public/assets/CastReceiverView-1vQ3DTnH.js b/public/assets/CastReceiverView-6i1cNs5y.js similarity index 94% rename from public/assets/CastReceiverView-1vQ3DTnH.js rename to public/assets/CastReceiverView-6i1cNs5y.js index c851f01..1b37631 100644 --- a/public/assets/CastReceiverView-1vQ3DTnH.js +++ b/public/assets/CastReceiverView-6i1cNs5y.js @@ -1 +1 @@ -import"./engine-DDeQk6Ow.js";import{c as Ee}from"./presentations-G0Dt4vNe.js";import{_ as Se}from"./DeckViewer.vue_vue_type_style_index_0_lang-VLaT-7ba.js";import{A as Z,d as Me,o as Re,aK as _e,aQ as ie,c as W,s as Ce,f as ne,b as Y,F as Te,r as J,aR as se,n as P,aP as Ae,aS as Le,Z as Ne}from"./index-CtNAsql9.js";import{C as re,f as ue,a as Pe,c as De,r as Ie,b as Fe}from"./log-Xlt5jeld.js";import{b as Oe,R as je}from"./remote-aOKX75Mt.js";const Be=/^U\+(0-FF|100-2BA)\b/i;function We(e){return e.status==="unloaded"&&Be.test(e.unicodeRange.trim())}async function ze(e){const o=[...e].filter(We);return await Promise.allSettled(o.map(r=>r.load())),o.length}async function Ue(e,o){const r=e.filter(l=>l.classList.contains("on"));try{for(const l of e){for(const c of e)c.classList.toggle("on",c===l);l.offsetHeight,await o()}}finally{for(const l of e)l.classList.toggle("on",r.includes(l))}return e.length}async function $e(e,o,r=50){const l=Date.now()+o;for(;;){if(e())return!0;if(Date.now()>=l)return!1;await new Promise(c=>setTimeout(c,r))}}function fe(){return{raf:e=>requestAnimationFrame(()=>e()),cancelRaf:e=>cancelAnimationFrame(e),setTimeout:(e,o)=>window.setTimeout(e,o),clearTimeout:e=>window.clearTimeout(e),now:()=>performance.now()}}async function qe(e,o=fe()){return(await de(Number.POSITIVE_INFINITY,e,o)).frames}function de(e,o,r=fe()){return new Promise(l=>{const c=r.now();let h=0,g=0,f=0,y=!1;const d=s=>{y||(y=!0,r.cancelRaf(g),r.clearTimeout(f),l({frames:h,ms:Math.round(r.now()-c),ok:s}))},v=()=>{y||(h++,h>=e?d(!0):g=r.raf(v))};f=r.setTimeout(()=>d(!1),o),g=r.raf(v)})}const Ge="https://www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js",ce="bm-caf",me=["READY","SENDER_CONNECTED","SENDER_DISCONNECTED","SHUTDOWN","VISIBILITY_CHANGED","STANDBY_CHANGED","ERROR"],Ke=540*1e3,Ve="/icons/icon-96.png";function z(){const o=globalThis.cast?.framework;return o&&typeof o.CastReceiverContext?.getInstance=="function"?o:null}function He(){return z()!==null}function xe(e=1e4){return z()?Promise.resolve(!0):new Promise(o=>{let r=document.getElementById(ce);r||(r=document.createElement("script"),r.id=ce,r.src=Ge,document.head.appendChild(r));const l=r;let c=!1;const h=v=>{c||(c=!0,window.clearInterval(y),window.clearTimeout(d),l.removeEventListener("load",g),l.removeEventListener("error",f),o(v))},g=()=>h(z()!==null),f=()=>h(!1);l.addEventListener("load",g),l.addEventListener("error",f);const y=window.setInterval(()=>{z()&&h(!0)},50),d=window.setTimeout(()=>h(z()!==null),e)})}function Ye(e,o,r){const l=e.messages,c=o.getPlayerManager?.();if(!l||!c)return()=>r("keep-awake-failed",{error:"no player manager"});const h=document.createElement("cast-media-player");h.style.display="none",document.body.append(h);const g=()=>{for(const v of document.body.querySelectorAll("touch-controls"))v.style.display!=="none"&&(v.style.display="none")};new MutationObserver(g).observe(document.body,{childList:!0,subtree:!0});const f=e.events?.EventType?.ERROR;f!==void 0&&c.addEventListener&&c.addEventListener(f,v=>{const s=v.error;r("keep-awake-error",{detailedErrorCode:v.detailedErrorCode??null,reason:v.reason??null,error:s?.message??(s?String(s):null)})});let y=0;const d=()=>{try{const v=new l.LoadRequestData;v.autoplay=!0;const s=new l.MediaInformation;s.contentId=new URL(Ve,location.origin).href,s.contentType="image/png",s.streamType=l.StreamType.NONE;const E=new l.GenericMediaMetadata;E.title="BM · prezentacja",s.metadata=E,v.media=s,v.requestId=0,y++,Promise.resolve(c.load(v)).then(()=>r("keep-awake",{count:y}),b=>{const k=b;r("keep-awake-failed",{count:y,error:String(k?.type??b),reason:k?.reason??null,detailedErrorCode:k?.detailedErrorCode??null})})}catch(v){r("keep-awake-failed",{count:y,error:v instanceof Error?v.message:String(v)})}};return()=>{d(),window.setInterval(d,Ke)}}function Je(e){const o=z();if(!o)throw new Error("cast: the receiver SDK is not loaded");const r=o.CastReceiverContext.getInstance(),l=()=>{try{return r.getSenders().length}catch{return 0}},c=new o.CastReceiverOptions;c.customNamespaces={[re]:o.system.MessageType.JSON},c.disableIdleTimeout=!0,c.maxInactivity=3600,c.statusText=e.statusText;for(const f of me){const y=o.system.EventType[f];y!==void 0&&r.addEventListener(y,d=>{e.onEvent(f,{reason:d?.reason,senderId:d?.senderId,isVisible:d?.isVisible,isStandby:d?.isStandby,senders:l()})})}r.addCustomMessageListener(re,f=>e.onMessage(f?.data,f?.senderId));const h=Ye(o,r,e.onEvent),g=o.system.EventType.READY;if(g!==void 0){let f=!1;r.addEventListener(g,()=>{f||(f=!0,h())})}return r.start(c),{send(f,y){if(!ue(f))return e.onEvent("send-dropped",{type:f.type}),!1;try{return r.sendCustomMessage(re,y,f),!0}catch(d){return e.onEvent("send-failed",{type:f.type,error:d instanceof Error?d.message:String(d)}),!1}},senders:l,setStatusText(f){try{r.setApplicationState(f)}catch{}},deviceCapabilities(){try{return r.getDeviceCapabilities?.()??null}catch{return null}}}}const Qe=2e3,Ze=5e3,Xe=/data-deck-image="([^"]+)"/g;function et(e){const o=new Set,r=c=>{if(c)for(const h of c.matchAll(Xe))o.add(h[1])},l=c=>{r(c.body_html),r(c.comment_html),r(c.sources_html),c.special&&l(c.special)};for(const c of e.slides??[])l(c);return[...o]}function K(e){return e instanceof Z?e.status:0}function Q(e){return e instanceof Z?`${e.status} ${e.message}`:e instanceof Error?e.message:String(e)}function tt(e){const o=e.now??(()=>Date.now());let r=null,l=null,c=null,h=null,g="waiting",f="off",y="",d=0,v=-1/0,s=!1,E,b,k=-1/0,S=null,U=!1,T=[],D="",$=0,V=0,H=0;function A(){const t=e.view.current();return{type:"status",phase:g,ws:f,number:t?.number??0,special:t?.special??!1,title:y}}function I(){return E??b}function x(){const t=I();t!==void 0&&e.send(A(),t)}function F(){const t=A();e.onStatus?.(t);const n=I();n!==void 0&&e.send(t,n)}function q(t){g!==t&&(g=t,e.log("phase",t),F())}function O(t){if(f===t)return;const n=f;n==="connected"&&t==="connecting"&&H++,f=t,e.log("ws",`${n} -> ${t}`),F()}function j(t){const n=o();n-v(await G("connection")).token,subscription:async t=>{const n=await G("subscription");if(n.channel!==t)throw e.log("token","subscription channel mismatch"),new Z(403,"cast: channel mismatch");return n.channel_token}})}function i(t=T){for(const n of t)e.revokeURL(n);t===T&&(T=[])}async function u(t,n,a){const m={};return await Promise.all(et(t).map(async w=>{try{const N=await B("image",R=>e.api.image(R,w),n);if(a!==d||s)return;const C=e.objectURL(N);T.push(C),m[w]=C}catch(N){e.log("image","image skipped",{name:w,status:K(N)})}})),m}function p(){h?.close(),h=null}function M(t){const n=()=>t===d&&!s;return{onPublication(a){if(!n())return;const m=Oe(a);if(!m||m.event!==je)return;const w=m.payload;if(w.tab!==l){V++,e.log("foreign","state from another tab",{tab:w.tab});return}$++,e.view.show(w.number,w.special,w.panel==="notes"||w.panel==="srcs"?w.panel:null),e.log("state","applied",{number:w.number,special:w.special})},onSubscribed(){n()&&(e.log("ws","subscribed"),g==="ready"&&F())},onConnection(a){n()&&O(a)},onDenied(a){n()&&(e.log("ws","subscription denied",{code:a}),a===401&&j("subscription denied"))},onUnavailable(){n()&&(O("off"),j("realtime unavailable"))}}}async function _(t,n){const a=await e.realtime.openChannel(n,M(t));if(t!==d||s){a.close();return}h=a}async function L(t,n){const a=++d,m=r,w=o();p(),e.realtime.disconnect(),c=null,D="",q("loading");const N=T;T=[];let C;try{if(C=n??await B("deck",e.api.deck,m),a!==d||s)return;y=C.title??"";const R=o(),oe=await u(C,m??"",a);if(a!==d||s)return;const ae=o();if(await e.view.load(C,oe),a!==d||s)return;D=JSON.stringify(C),e.log("perf","deck up",{fetchMs:Math.round(R-w),imagesMs:Math.round(ae-R),images:Object.keys(oe).length,loadMs:Math.round(o()-ae),totalMs:Math.round(o()-w),slides:C.slides?.length??0})}catch(R){if(a!==d||s)return;e.log("error","deck load failed",{error:Q(R)}),q("error");return}finally{i(N)}try{X();const R=t??await B("realtime",e.api.realtime,m);if(a!==d||s)return;c=R.channel,await _(a,R.channel)}catch(R){if(a!==d||s)return;e.log("error","channel join failed",{error:Q(R)}),O("off")}a!==d||s||q("ready")}async function ee(){if(!c)return;const t=d;p(),e.realtime.disconnect();try{await _(t,c)}catch(n){e.log("error","channel reopen failed",{error:Q(n)})}}async function te(t,n,a){if(!r){r=t,l=n,b=a,e.log("ticket","first hello",{tab:n}),await L(),r===t&&g==="ready"&&(E=a);return}if(t===r){if(l!==n&&e.log("tab","casting tab switched",{tab:n}),l=n,E=a,g==="error"||g==="ready"&&!h){await L();return}e.send(A(),a);return}let m;try{m=await e.api.realtime(t)}catch(w){e.log("ticket","refused",{status:K(w)}),e.send({...A(),title:""},a);return}if(!s){if(r=t,l=n,E=a,b=a,v=-1/0,c&&m.channel===c&&g==="ready"){let w=null;try{w=await e.api.deck(t)}catch(N){e.log("ticket","deck check failed",{status:K(N)})}if(s)return;if(w&&JSON.stringify(w)!==D){e.log("ticket","deck changed",{tab:n}),await L(m,w);return}if(e.log("ticket","swapped",{tab:n}),await ee(),s)return;e.send(A(),a);return}e.log("ticket","new deck",{tab:n}),await L(m)}}function we(t){const n=e.report?.()??{summary:null,device:null,events:[],previousRun:[]},a=De(JSON.stringify(Ie(n)));e.log("log","sending",{parts:a.length,senderId:t});for(const m of a){if(!ue(m)){e.log("log","part dropped",{part:m.part});continue}e.send(m,t)}}function ge(t){const n=e.view.current();e.send({type:"position",number:n?.number??0,special:n?.special??!1},t)}async function pe(t,n){if(s)return;const a=Pe(t);if(!a){e.log("foreign","unknown message",{senderId:n});return}if(e.log("rx",a.type,{senderId:n}),a.type==="where"){ge(n);return}if(a.type==="log"){if(n===void 0||n!==I()){e.log("foreign","log request refused",{senderId:n});return}we(n);return}const m=E!==void 0&&n===E||a.ticket===r;if(!m&&E!==void 0){if(o(){if(S){if(S.trusted&&!m){e.log("foreign","hello dropped behind a trusted one",{senderId:a}),w();return}e.log("rx","hello superseded",{senderId:S.senderId}),S.settle()}S={ticket:t,tab:n,senderId:a,trusted:m,settle:w},U||he()})}async function he(){U=!0;try{for(;S&&!s;){const t=S;S=null;try{await te(t.ticket,t.tab,t.senderId)}catch(n){e.log("error","hello failed",{error:Q(n)})}finally{t.settle()}}}finally{U=!1,S?.settle(),S=null}}function ye(t){t!==void 0&&t===b&&(b=void 0),!(t===void 0||t!==E)&&(E=void 0,e.log("rx","pinned sender left",{senderId:t}))}function ke(){s=!0,d++,p(),e.realtime.setTokenSource(null),i()}function be(){return{ws:f,applied:$,foreign:V,reconnects:H}}return{handle:pe,senderLeft:ye,status:A,announce:x,stats:be,close:ke}}const nt={key:1,class:"cast-screen cast-cover",role:"status"},rt={key:2,class:"cast-screen"},ot={key:0,class:"cast-hint"},at={key:3,class:"cast-screen"},it={key:4,class:"cast-screen"},st=6e4,le=1e3,wt=Me({__name:"CastReceiverView",setup(e){const o=J("boot"),r=se(null),l=se({}),c=J("pending"),h=J(null),g=J(!1);let f=null,y=null,d=0;const v=new Set(me),s=Fe("bm.cast.log"),E=Date.now();let b={};function k(i,u,p){s.note(i,u,p),i==="error"&&s.persist()}function S(){const i=performance.memory;return i?Math.round(i.usedJSHeapSize/1048576):null}function U(){const i=navigator;return{ua:navigator.userAgent,screen:`${window.screen.width}x${window.screen.height}`,viewport:`${window.innerWidth}x${window.innerHeight}`,dpr:window.devicePixelRatio,cores:navigator.hardwareConcurrency,memoryGB:i.deviceMemory??null}}function T(i,u){if(!v.has(i)){k(i.startsWith("keep-awake")?"awake":"send",i,u),i.startsWith("keep-awake-")&&s.persist();return}i==="READY"&&f?(b={...b,capabilities:f.deviceCapabilities()},k("caf",i,{...u,capabilities:b.capabilities})):k("caf",i,u),i==="SENDER_DISCONNECTED"&&typeof u?.senderId=="string"&&y?.senderLeft(u.senderId),s.persist()}function D(){return"serviceWorker"in navigator&&navigator.serviceWorker.controller!==null}function $(){return{screen:o.value,covered:g.value,coverInDom:document.querySelector(".cast-cover")!==null,visibility:document.visibilityState,focus:document.hasFocus(),sw:D()}}async function V(){const i=await qe(le),u=y?.stats();k("beat","heartbeat",{uptimeMin:+((Date.now()-E)/6e4).toFixed(1),ws:u?.ws??"off",applied:u?.applied??0,foreign:u?.foreign??0,reconnects:u?.reconnects??0,heapMB:S(),frames:i,frameSampleMs:le,...$()}),s.persist(),y?.announce()}async function H(){const i=await de(3,3e3);k("paint",i.ok?"frames after the cover":"no frames after the cover",{...i,...$()}),s.persist()}async function A(){if(!("serviceWorker"in navigator))return;const i=navigator.serviceWorker;try{const u=await i.getRegistrations(),p=i.controller!==null;if(u.length===0&&!p)return;const M=await Promise.all(u.map(_=>_.unregister().catch(()=>!1)));k("boot","service worker unregistered",{controlled:p,scopes:u.map(_=>_.scope),unregistered:M.filter(Boolean).length})}catch(u){k("boot","service worker check failed",String(u))}s.persist()}function I(i){k("error","window error",{message:String(i.message),source:i.filename,line:i.lineno})}function x(i){const u=i.reason instanceof Error?i.reason.message:String(i.reason);k("error","unhandled rejection",{reason:u})}function F(){k("boot","pagehide"),s.persist()}function q(i){return new Promise(u=>window.setTimeout(u,i))}function O(){return new Promise(i=>requestAnimationFrame(()=>i()))}function j(){return h.value?.sections()??[]}async function B(i,u){g.value=!0;const p=performance.now();try{r.value=i,l.value=u,c.value="ready",o.value="deck",await Ne(),await $e(()=>j().some(te=>te.classList.contains("on")),2e4)||k("error","the first slide did not show in 20 s"),await document.fonts.ready,await q(50);const M=performance.now(),_=await ze(document.fonts),L=performance.now(),ee=await Ue(j(),O);await O(),k("perf","warm-up",{stageMs:Math.round(M-p),faces:_,warmMs:Math.round(L-M),sections:ee,prerenderMs:Math.round(performance.now()-L),totalMs:Math.round(performance.now()-p)})}finally{g.value=!1,H()}}let G=null;function X(i){i.phase!==G&&(G=i.phase,i.phase==="loading"?g.value=!0:i.phase==="error"?(g.value=!1,o.value="error"):i.phase==="ready"&&r.value&&(g.value=!1,o.value="deck"))}return Re(async()=>{b=U();const i=s.previous[s.previous.length-1];if(k("boot","receiver loaded",{...b,cafAtBoot:He(),sw:D(),previousRunEvents:s.previous.length,lastPrevious:i??null}),s.persist(),A(),window.addEventListener("error",I),window.addEventListener("unhandledrejection",x),window.addEventListener("pagehide",F),d=window.setInterval(()=>{V()},st),document.documentElement.classList.add("deck-public"),!document.querySelector('meta[data-deck-public="1"]')){const p=document.createElement("meta");p.name="robots",p.content="noindex",p.dataset.deckPublic="1",document.head.appendChild(p)}if(!await xe()){o.value="unsupported",k("boot","no CAF SDK");return}o.value="waiting",y=tt({api:Ee,realtime:{setTokenSource:Le,openChannel:Ae,disconnect:ie},view:{load:B,show:(p,M,_)=>{h.value?.showSlide(p,M,_)},current:()=>h.value?.current()??null},send:(p,M)=>{f?.send(p,M)},log:k,objectURL:p=>URL.createObjectURL(p),revokeURL:p=>URL.revokeObjectURL(p),onStatus:X,report:()=>({summary:s.summary(),device:b,events:s.events,previousRun:s.previous})});const u=y;try{f=Je({statusText:"BM · prezentacja",onMessage:(p,M)=>{u.handle(p,M)},onEvent:T}),k("caf","started")}catch(p){k("error","receiver start failed",String(p)),o.value="unsupported"}}),_e(()=>{window.clearInterval(d),window.removeEventListener("error",I),window.removeEventListener("unhandledrejection",x),window.removeEventListener("pagehide",F),s.persist(),y?.close(),ie(),document.documentElement.classList.remove("deck-public"),document.querySelector('meta[data-deck-public="1"]')?.remove()}),(i,u)=>(P(),W(Te,null,[r.value?(P(),Ce(Se,{key:0,ref_key:"viewer",ref:h,phase:c.value,deck:r.value,error:"",mode:"public","no-toolbar":"","extra-css":r.value.css,theme:r.value.theme,images:l.value},null,8,["phase","deck","extra-css","theme","images"])):ne("",!0),g.value?(P(),W("div",nt,[...u[0]||(u[0]=[Y("p",null,"Przygotowuję slajdy…",-1)])])):o.value==="boot"||o.value==="waiting"?(P(),W("div",rt,[u[1]||(u[1]=Y("p",null,"BM · czekam na pilota…",-1)),o.value==="waiting"?(P(),W("p",ot,"Na telefonie otwórz pilota prezentacji i wybierz Wyświetl na TV.")):ne("",!0)])):o.value==="unsupported"?(P(),W("div",at,[...u[2]||(u[2]=[Y("p",null,"Ta strona działa tylko na urządzeniu Google Cast.",-1)])])):o.value==="error"?(P(),W("div",it,[...u[3]||(u[3]=[Y("p",null,"Nie mogę wczytać prezentacji. Połącz ponownie z telefonu.",-1)])])):ne("",!0)],64))}});export{wt as default}; +import"./engine-DDeQk6Ow.js";import{c as Ee}from"./presentations-CsatGkk7.js";import{_ as Se}from"./DeckViewer.vue_vue_type_style_index_0_lang-CR_mIh7U.js";import{A as Q,d as Me,o as Re,b1 as _e,b5 as ie,c as W,s as Ce,f as ne,b as Y,F as Te,r as J,b6 as se,n as P,b4 as Ae,b7 as Le,Z as Ne}from"./index-BhVKyY57.js";import{C as re,f as ue,a as Pe,c as De,r as Ie,b as Fe}from"./log-Xlt5jeld.js";import{b as Oe,R as je}from"./remote-aOKX75Mt.js";const Be=/^U\+(0-FF|100-2BA)\b/i;function We(e){return e.status==="unloaded"&&Be.test(e.unicodeRange.trim())}async function ze(e){const o=[...e].filter(We);return await Promise.allSettled(o.map(r=>r.load())),o.length}async function Ue(e,o){const r=e.filter(l=>l.classList.contains("on"));try{for(const l of e){for(const c of e)c.classList.toggle("on",c===l);l.offsetHeight,await o()}}finally{for(const l of e)l.classList.toggle("on",r.includes(l))}return e.length}async function $e(e,o,r=50){const l=Date.now()+o;for(;;){if(e())return!0;if(Date.now()>=l)return!1;await new Promise(c=>setTimeout(c,r))}}function fe(){return{raf:e=>requestAnimationFrame(()=>e()),cancelRaf:e=>cancelAnimationFrame(e),setTimeout:(e,o)=>window.setTimeout(e,o),clearTimeout:e=>window.clearTimeout(e),now:()=>performance.now()}}async function qe(e,o=fe()){return(await de(Number.POSITIVE_INFINITY,e,o)).frames}function de(e,o,r=fe()){return new Promise(l=>{const c=r.now();let h=0,g=0,f=0,y=!1;const d=s=>{y||(y=!0,r.cancelRaf(g),r.clearTimeout(f),l({frames:h,ms:Math.round(r.now()-c),ok:s}))},v=()=>{y||(h++,h>=e?d(!0):g=r.raf(v))};f=r.setTimeout(()=>d(!1),o),g=r.raf(v)})}const Ge="https://www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js",ce="bm-caf",me=["READY","SENDER_CONNECTED","SENDER_DISCONNECTED","SHUTDOWN","VISIBILITY_CHANGED","STANDBY_CHANGED","ERROR"],Ke=540*1e3,Ve="/icons/icon-96.png";function z(){const o=globalThis.cast?.framework;return o&&typeof o.CastReceiverContext?.getInstance=="function"?o:null}function He(){return z()!==null}function xe(e=1e4){return z()?Promise.resolve(!0):new Promise(o=>{let r=document.getElementById(ce);r||(r=document.createElement("script"),r.id=ce,r.src=Ge,document.head.appendChild(r));const l=r;let c=!1;const h=v=>{c||(c=!0,window.clearInterval(y),window.clearTimeout(d),l.removeEventListener("load",g),l.removeEventListener("error",f),o(v))},g=()=>h(z()!==null),f=()=>h(!1);l.addEventListener("load",g),l.addEventListener("error",f);const y=window.setInterval(()=>{z()&&h(!0)},50),d=window.setTimeout(()=>h(z()!==null),e)})}function Ye(e,o,r){const l=e.messages,c=o.getPlayerManager?.();if(!l||!c)return()=>r("keep-awake-failed",{error:"no player manager"});const h=document.createElement("cast-media-player");h.style.display="none",document.body.append(h);const g=()=>{for(const v of document.body.querySelectorAll("touch-controls"))v.style.display!=="none"&&(v.style.display="none")};new MutationObserver(g).observe(document.body,{childList:!0,subtree:!0});const f=e.events?.EventType?.ERROR;f!==void 0&&c.addEventListener&&c.addEventListener(f,v=>{const s=v.error;r("keep-awake-error",{detailedErrorCode:v.detailedErrorCode??null,reason:v.reason??null,error:s?.message??(s?String(s):null)})});let y=0;const d=()=>{try{const v=new l.LoadRequestData;v.autoplay=!0;const s=new l.MediaInformation;s.contentId=new URL(Ve,location.origin).href,s.contentType="image/png",s.streamType=l.StreamType.NONE;const E=new l.GenericMediaMetadata;E.title="BM · prezentacja",s.metadata=E,v.media=s,v.requestId=0,y++,Promise.resolve(c.load(v)).then(()=>r("keep-awake",{count:y}),b=>{const k=b;r("keep-awake-failed",{count:y,error:String(k?.type??b),reason:k?.reason??null,detailedErrorCode:k?.detailedErrorCode??null})})}catch(v){r("keep-awake-failed",{count:y,error:v instanceof Error?v.message:String(v)})}};return()=>{d(),window.setInterval(d,Ke)}}function Je(e){const o=z();if(!o)throw new Error("cast: the receiver SDK is not loaded");const r=o.CastReceiverContext.getInstance(),l=()=>{try{return r.getSenders().length}catch{return 0}},c=new o.CastReceiverOptions;c.customNamespaces={[re]:o.system.MessageType.JSON},c.disableIdleTimeout=!0,c.maxInactivity=3600,c.statusText=e.statusText;for(const f of me){const y=o.system.EventType[f];y!==void 0&&r.addEventListener(y,d=>{e.onEvent(f,{reason:d?.reason,senderId:d?.senderId,isVisible:d?.isVisible,isStandby:d?.isStandby,senders:l()})})}r.addCustomMessageListener(re,f=>e.onMessage(f?.data,f?.senderId));const h=Ye(o,r,e.onEvent),g=o.system.EventType.READY;if(g!==void 0){let f=!1;r.addEventListener(g,()=>{f||(f=!0,h())})}return r.start(c),{send(f,y){if(!ue(f))return e.onEvent("send-dropped",{type:f.type}),!1;try{return r.sendCustomMessage(re,y,f),!0}catch(d){return e.onEvent("send-failed",{type:f.type,error:d instanceof Error?d.message:String(d)}),!1}},senders:l,setStatusText(f){try{r.setApplicationState(f)}catch{}},deviceCapabilities(){try{return r.getDeviceCapabilities?.()??null}catch{return null}}}}const Ze=2e3,Qe=5e3,Xe=/data-deck-image="([^"]+)"/g;function et(e){const o=new Set,r=c=>{if(c)for(const h of c.matchAll(Xe))o.add(h[1])},l=c=>{r(c.body_html),r(c.comment_html),r(c.sources_html),c.special&&l(c.special)};for(const c of e.slides??[])l(c);return[...o]}function K(e){return e instanceof Q?e.status:0}function Z(e){return e instanceof Q?`${e.status} ${e.message}`:e instanceof Error?e.message:String(e)}function tt(e){const o=e.now??(()=>Date.now());let r=null,l=null,c=null,h=null,g="waiting",f="off",y="",d=0,v=-1/0,s=!1,E,b,k=-1/0,S=null,U=!1,T=[],D="",$=0,V=0,H=0;function A(){const t=e.view.current();return{type:"status",phase:g,ws:f,number:t?.number??0,special:t?.special??!1,title:y}}function I(){return E??b}function x(){const t=I();t!==void 0&&e.send(A(),t)}function F(){const t=A();e.onStatus?.(t);const n=I();n!==void 0&&e.send(t,n)}function q(t){g!==t&&(g=t,e.log("phase",t),F())}function O(t){if(f===t)return;const n=f;n==="connected"&&t==="connecting"&&H++,f=t,e.log("ws",`${n} -> ${t}`),F()}function j(t){const n=o();n-v(await G("connection")).token,subscription:async t=>{const n=await G("subscription");if(n.channel!==t)throw e.log("token","subscription channel mismatch"),new Q(403,"cast: channel mismatch");return n.channel_token}})}function i(t=T){for(const n of t)e.revokeURL(n);t===T&&(T=[])}async function u(t,n,a){const m={};return await Promise.all(et(t).map(async w=>{try{const N=await B("image",R=>e.api.image(R,w),n);if(a!==d||s)return;const C=e.objectURL(N);T.push(C),m[w]=C}catch(N){e.log("image","image skipped",{name:w,status:K(N)})}})),m}function p(){h?.close(),h=null}function M(t){const n=()=>t===d&&!s;return{onPublication(a){if(!n())return;const m=Oe(a);if(!m||m.event!==je)return;const w=m.payload;if(w.tab!==l){V++,e.log("foreign","state from another tab",{tab:w.tab});return}$++,e.view.show(w.number,w.special,w.panel==="notes"||w.panel==="srcs"?w.panel:null),e.log("state","applied",{number:w.number,special:w.special})},onSubscribed(){n()&&(e.log("ws","subscribed"),g==="ready"&&F())},onConnection(a){n()&&O(a)},onDenied(a){n()&&(e.log("ws","subscription denied",{code:a}),a===401&&j("subscription denied"))},onUnavailable(){n()&&(O("off"),j("realtime unavailable"))}}}async function _(t,n){const a=await e.realtime.openChannel(n,M(t));if(t!==d||s){a.close();return}h=a}async function L(t,n){const a=++d,m=r,w=o();p(),e.realtime.disconnect(),c=null,D="",q("loading");const N=T;T=[];let C;try{if(C=n??await B("deck",e.api.deck,m),a!==d||s)return;y=C.title??"";const R=o(),oe=await u(C,m??"",a);if(a!==d||s)return;const ae=o();if(await e.view.load(C,oe),a!==d||s)return;D=JSON.stringify(C),e.log("perf","deck up",{fetchMs:Math.round(R-w),imagesMs:Math.round(ae-R),images:Object.keys(oe).length,loadMs:Math.round(o()-ae),totalMs:Math.round(o()-w),slides:C.slides?.length??0})}catch(R){if(a!==d||s)return;e.log("error","deck load failed",{error:Z(R)}),q("error");return}finally{i(N)}try{X();const R=t??await B("realtime",e.api.realtime,m);if(a!==d||s)return;c=R.channel,await _(a,R.channel)}catch(R){if(a!==d||s)return;e.log("error","channel join failed",{error:Z(R)}),O("off")}a!==d||s||q("ready")}async function ee(){if(!c)return;const t=d;p(),e.realtime.disconnect();try{await _(t,c)}catch(n){e.log("error","channel reopen failed",{error:Z(n)})}}async function te(t,n,a){if(!r){r=t,l=n,b=a,e.log("ticket","first hello",{tab:n}),await L(),r===t&&g==="ready"&&(E=a);return}if(t===r){if(l!==n&&e.log("tab","casting tab switched",{tab:n}),l=n,E=a,g==="error"||g==="ready"&&!h){await L();return}e.send(A(),a);return}let m;try{m=await e.api.realtime(t)}catch(w){e.log("ticket","refused",{status:K(w)}),e.send({...A(),title:""},a);return}if(!s){if(r=t,l=n,E=a,b=a,v=-1/0,c&&m.channel===c&&g==="ready"){let w=null;try{w=await e.api.deck(t)}catch(N){e.log("ticket","deck check failed",{status:K(N)})}if(s)return;if(w&&JSON.stringify(w)!==D){e.log("ticket","deck changed",{tab:n}),await L(m,w);return}if(e.log("ticket","swapped",{tab:n}),await ee(),s)return;e.send(A(),a);return}e.log("ticket","new deck",{tab:n}),await L(m)}}function we(t){const n=e.report?.()??{summary:null,device:null,events:[],previousRun:[]},a=De(JSON.stringify(Ie(n)));e.log("log","sending",{parts:a.length,senderId:t});for(const m of a){if(!ue(m)){e.log("log","part dropped",{part:m.part});continue}e.send(m,t)}}function ge(t){const n=e.view.current();e.send({type:"position",number:n?.number??0,special:n?.special??!1},t)}async function pe(t,n){if(s)return;const a=Pe(t);if(!a){e.log("foreign","unknown message",{senderId:n});return}if(e.log("rx",a.type,{senderId:n}),a.type==="where"){ge(n);return}if(a.type==="log"){if(n===void 0||n!==I()){e.log("foreign","log request refused",{senderId:n});return}we(n);return}const m=E!==void 0&&n===E||a.ticket===r;if(!m&&E!==void 0){if(o(){if(S){if(S.trusted&&!m){e.log("foreign","hello dropped behind a trusted one",{senderId:a}),w();return}e.log("rx","hello superseded",{senderId:S.senderId}),S.settle()}S={ticket:t,tab:n,senderId:a,trusted:m,settle:w},U||he()})}async function he(){U=!0;try{for(;S&&!s;){const t=S;S=null;try{await te(t.ticket,t.tab,t.senderId)}catch(n){e.log("error","hello failed",{error:Z(n)})}finally{t.settle()}}}finally{U=!1,S?.settle(),S=null}}function ye(t){t!==void 0&&t===b&&(b=void 0),!(t===void 0||t!==E)&&(E=void 0,e.log("rx","pinned sender left",{senderId:t}))}function ke(){s=!0,d++,p(),e.realtime.setTokenSource(null),i()}function be(){return{ws:f,applied:$,foreign:V,reconnects:H}}return{handle:pe,senderLeft:ye,status:A,announce:x,stats:be,close:ke}}const nt={key:1,class:"cast-screen cast-cover",role:"status"},rt={key:2,class:"cast-screen"},ot={key:0,class:"cast-hint"},at={key:3,class:"cast-screen"},it={key:4,class:"cast-screen"},st=6e4,le=1e3,wt=Me({__name:"CastReceiverView",setup(e){const o=J("boot"),r=se(null),l=se({}),c=J("pending"),h=J(null),g=J(!1);let f=null,y=null,d=0;const v=new Set(me),s=Fe("bm.cast.log"),E=Date.now();let b={};function k(i,u,p){s.note(i,u,p),i==="error"&&s.persist()}function S(){const i=performance.memory;return i?Math.round(i.usedJSHeapSize/1048576):null}function U(){const i=navigator;return{ua:navigator.userAgent,screen:`${window.screen.width}x${window.screen.height}`,viewport:`${window.innerWidth}x${window.innerHeight}`,dpr:window.devicePixelRatio,cores:navigator.hardwareConcurrency,memoryGB:i.deviceMemory??null}}function T(i,u){if(!v.has(i)){k(i.startsWith("keep-awake")?"awake":"send",i,u),i.startsWith("keep-awake-")&&s.persist();return}i==="READY"&&f?(b={...b,capabilities:f.deviceCapabilities()},k("caf",i,{...u,capabilities:b.capabilities})):k("caf",i,u),i==="SENDER_DISCONNECTED"&&typeof u?.senderId=="string"&&y?.senderLeft(u.senderId),s.persist()}function D(){return"serviceWorker"in navigator&&navigator.serviceWorker.controller!==null}function $(){return{screen:o.value,covered:g.value,coverInDom:document.querySelector(".cast-cover")!==null,visibility:document.visibilityState,focus:document.hasFocus(),sw:D()}}async function V(){const i=await qe(le),u=y?.stats();k("beat","heartbeat",{uptimeMin:+((Date.now()-E)/6e4).toFixed(1),ws:u?.ws??"off",applied:u?.applied??0,foreign:u?.foreign??0,reconnects:u?.reconnects??0,heapMB:S(),frames:i,frameSampleMs:le,...$()}),s.persist(),y?.announce()}async function H(){const i=await de(3,3e3);k("paint",i.ok?"frames after the cover":"no frames after the cover",{...i,...$()}),s.persist()}async function A(){if(!("serviceWorker"in navigator))return;const i=navigator.serviceWorker;try{const u=await i.getRegistrations(),p=i.controller!==null;if(u.length===0&&!p)return;const M=await Promise.all(u.map(_=>_.unregister().catch(()=>!1)));k("boot","service worker unregistered",{controlled:p,scopes:u.map(_=>_.scope),unregistered:M.filter(Boolean).length})}catch(u){k("boot","service worker check failed",String(u))}s.persist()}function I(i){k("error","window error",{message:String(i.message),source:i.filename,line:i.lineno})}function x(i){const u=i.reason instanceof Error?i.reason.message:String(i.reason);k("error","unhandled rejection",{reason:u})}function F(){k("boot","pagehide"),s.persist()}function q(i){return new Promise(u=>window.setTimeout(u,i))}function O(){return new Promise(i=>requestAnimationFrame(()=>i()))}function j(){return h.value?.sections()??[]}async function B(i,u){g.value=!0;const p=performance.now();try{r.value=i,l.value=u,c.value="ready",o.value="deck",await Ne(),await $e(()=>j().some(te=>te.classList.contains("on")),2e4)||k("error","the first slide did not show in 20 s"),await document.fonts.ready,await q(50);const M=performance.now(),_=await ze(document.fonts),L=performance.now(),ee=await Ue(j(),O);await O(),k("perf","warm-up",{stageMs:Math.round(M-p),faces:_,warmMs:Math.round(L-M),sections:ee,prerenderMs:Math.round(performance.now()-L),totalMs:Math.round(performance.now()-p)})}finally{g.value=!1,H()}}let G=null;function X(i){i.phase!==G&&(G=i.phase,i.phase==="loading"?g.value=!0:i.phase==="error"?(g.value=!1,o.value="error"):i.phase==="ready"&&r.value&&(g.value=!1,o.value="deck"))}return Re(async()=>{b=U();const i=s.previous[s.previous.length-1];if(k("boot","receiver loaded",{...b,cafAtBoot:He(),sw:D(),previousRunEvents:s.previous.length,lastPrevious:i??null}),s.persist(),A(),window.addEventListener("error",I),window.addEventListener("unhandledrejection",x),window.addEventListener("pagehide",F),d=window.setInterval(()=>{V()},st),document.documentElement.classList.add("deck-public"),!document.querySelector('meta[data-deck-public="1"]')){const p=document.createElement("meta");p.name="robots",p.content="noindex",p.dataset.deckPublic="1",document.head.appendChild(p)}if(!await xe()){o.value="unsupported",k("boot","no CAF SDK");return}o.value="waiting",y=tt({api:Ee,realtime:{setTokenSource:Le,openChannel:Ae,disconnect:ie},view:{load:B,show:(p,M,_)=>{h.value?.showSlide(p,M,_)},current:()=>h.value?.current()??null},send:(p,M)=>{f?.send(p,M)},log:k,objectURL:p=>URL.createObjectURL(p),revokeURL:p=>URL.revokeObjectURL(p),onStatus:X,report:()=>({summary:s.summary(),device:b,events:s.events,previousRun:s.previous})});const u=y;try{f=Je({statusText:"BM · prezentacja",onMessage:(p,M)=>{u.handle(p,M)},onEvent:T}),k("caf","started")}catch(p){k("error","receiver start failed",String(p)),o.value="unsupported"}}),_e(()=>{window.clearInterval(d),window.removeEventListener("error",I),window.removeEventListener("unhandledrejection",x),window.removeEventListener("pagehide",F),s.persist(),y?.close(),ie(),document.documentElement.classList.remove("deck-public"),document.querySelector('meta[data-deck-public="1"]')?.remove()}),(i,u)=>(P(),W(Te,null,[r.value?(P(),Ce(Se,{key:0,ref_key:"viewer",ref:h,phase:c.value,deck:r.value,error:"",mode:"public","no-toolbar":"","extra-css":r.value.css,theme:r.value.theme,images:l.value},null,8,["phase","deck","extra-css","theme","images"])):ne("",!0),g.value?(P(),W("div",nt,[...u[0]||(u[0]=[Y("p",null,"Przygotowuję slajdy…",-1)])])):o.value==="boot"||o.value==="waiting"?(P(),W("div",rt,[u[1]||(u[1]=Y("p",null,"BM · czekam na pilota…",-1)),o.value==="waiting"?(P(),W("p",ot,"Na telefonie otwórz pilota prezentacji i wybierz Wyświetl na TV.")):ne("",!0)])):o.value==="unsupported"?(P(),W("div",at,[...u[2]||(u[2]=[Y("p",null,"Ta strona działa tylko na urządzeniu Google Cast.",-1)])])):o.value==="error"?(P(),W("div",it,[...u[3]||(u[3]=[Y("p",null,"Nie mogę wczytać prezentacji. Połącz ponownie z telefonu.",-1)])])):ne("",!0)],64))}});export{wt as default}; diff --git a/public/assets/ChecklistView-BDzS2ISd.js b/public/assets/ChecklistView-CRar4YSq.js similarity index 59% rename from public/assets/ChecklistView-BDzS2ISd.js rename to public/assets/ChecklistView-CRar4YSq.js index fbb5282..5470160 100644 --- a/public/assets/ChecklistView-BDzS2ISd.js +++ b/public/assets/ChecklistView-CRar4YSq.js @@ -1 +1 @@ -import{d as J,ae as Y,o as ee,r as v,aw as te,U as Z,n as a,c as n,h as se,b as t,w as z,as as S,F as h,E as U,t as r,e as p,ax as Q,ay as le,ah as ae,v as P,f as d,ar as X,x as B,az as oe,af as ne,i as N,j as I,D as ie,p as j,G as ue,aA as q,H as re,_ as O,s as T,C as de,a8 as ve,q as H,ap as K,l as me,m as pe,aB as ce}from"./index-CtNAsql9.js";import{_ as ye}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as ke}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{p as _e}from"./presentations-G0Dt4vNe.js";import{f as fe}from"./forms-CHet_2fA.js";const be={class:"form-grid"},ge={class:"field"},$e=["value"],ze={class:"field"},we=["value"],he={class:"field"},Ce={key:0,class:"error-text"},xe={class:"field"},Ie=["value"],je={class:"form-grid"},Ue={class:"field"},De=["value"],Ve={class:"field"},Ne=["value"],Te={class:"form-grid"},Be={class:"field"},Ee={class:"field"},Le={class:"field"},Me={class:"field"},Re={key:0,class:"notice error",role:"alert"},Se={class:"btn-row"},Pe=["disabled"],G=J({__name:"ChecklistItemForm",props:{item:{},meetingId:{},save:{type:Function}},emits:["done","cancel"],setup(W,{emit:F}){const c=W,A=F,f=Y(),i=v([]);ee(()=>{Promise.all([f.loadCourses(),f.loadReadings(),f.loadDeadlines()]),_e.mine().then(k=>i.value=k).catch(()=>{})});const _=c.item,b=v(_?.kind??"lektura"),y=v(_?.title??""),g=v(_?.course_id??""),$=v(_?.reading_id??""),C=v(_?.deadline_id??""),D=v(_?.presentation_slug??""),E=v(_?.estimate_minutes??""),L=v(te(_?.due_at??null)),M=v(_?.url??""),R=v(_?.notes??""),V=v(""),u=v({}),o=v(!1),x=B(()=>[...f.allReadings.filter(e=>g.value===""||e.course_id===g.value)].sort((e,s)=>+(s.meeting_id===c.meetingId)-+(e.meeting_id===c.meetingId))),m=B(()=>f.deadlines.filter(k=>g.value===""||k.course_id===g.value||k.course_id===null));Z($,k=>{const e=f.allReadings.find(s=>s.id===k);e&&(y.value.trim()||(y.value=e.author?`${e.author}, ${e.title}`:e.title),g.value===""&&(g.value=e.course_id))}),Z(D,k=>{const e=i.value.find(s=>s.slug===k);e&&!y.value.trim()&&(y.value=`Prezentacja: ${e.title}`),e&&(b.value="prezentacja")});const l=k=>k===""?null:k;async function w(){o.value=!0,V.value="",u.value={};try{await c.save({kind:b.value,title:y.value.trim(),course_id:l(g.value),reading_id:l($.value),deadline_id:l(C.value),presentation_slug:D.value||null,estimate_minutes:l(E.value),due_at:oe(L.value),url:M.value.trim()||null,notes:R.value.trim()||null}),A("done")}catch(k){const e=fe(k);u.value=e.fields,V.value=e.message||Object.values(e.fields)[0]||""}finally{o.value=!1}}return(k,e)=>(a(),n("form",{class:"card item-form",onSubmit:se(w,["prevent"])},[t("div",be,[t("div",ge,[e[11]||(e[11]=t("label",{for:"it-kind"},"Rodzaj",-1)),z(t("select",{id:"it-kind","onUpdate:modelValue":e[0]||(e[0]=s=>b.value=s)},[(a(!0),n(h,null,U(p(le),s=>(a(),n("option",{key:s,value:s},r(p(Q)[s]),9,$e))),128))],512),[[S,b.value]])]),t("div",ze,[e[13]||(e[13]=t("label",{for:"it-course"},"Przedmiot",-1)),z(t("select",{id:"it-course","onUpdate:modelValue":e[1]||(e[1]=s=>g.value=s)},[e[12]||(e[12]=t("option",{value:""},"ogólne",-1)),(a(!0),n(h,null,U(p(f).visibleCourses,s=>(a(),n("option",{key:s.id,value:s.id},r(s.name)+" ("+r(p(ae)[s.form])+")",9,we))),128))],512),[[S,g.value]])])]),t("div",he,[e[14]||(e[14]=t("label",{for:"it-title"},"Co",-1)),z(t("input",{id:"it-title","onUpdate:modelValue":e[2]||(e[2]=s=>y.value=s),type:"text",required:"",maxlength:"500"},null,512),[[P,y.value]]),u.value.title?(a(),n("small",Ce,r(u.value.title),1)):d("",!0)]),t("div",xe,[e[16]||(e[16]=t("label",{for:"it-reading"},"Lektura z listy (odhaczenie = przeczytana)",-1)),z(t("select",{id:"it-reading","onUpdate:modelValue":e[3]||(e[3]=s=>$.value=s)},[e[15]||(e[15]=t("option",{value:""},"brak",-1)),(a(!0),n(h,null,U(x.value,s=>(a(),n("option",{key:s.id,value:s.id},r(s.author?s.author+", ":"")+r(s.title),9,Ie))),128))],512),[[S,$.value]])]),t("div",je,[t("div",Ue,[e[18]||(e[18]=t("label",{for:"it-deadline"},"Termin",-1)),z(t("select",{id:"it-deadline","onUpdate:modelValue":e[4]||(e[4]=s=>C.value=s)},[e[17]||(e[17]=t("option",{value:""},"brak",-1)),(a(!0),n(h,null,U(m.value,s=>(a(),n("option",{key:s.id,value:s.id},r(p(X)(s.due_at))+" · "+r(s.title),9,De))),128))],512),[[S,C.value]])]),t("div",Ve,[e[20]||(e[20]=t("label",{for:"it-deck"},"Moja prezentacja",-1)),z(t("select",{id:"it-deck","onUpdate:modelValue":e[5]||(e[5]=s=>D.value=s)},[e[19]||(e[19]=t("option",{value:""},"brak",-1)),(a(!0),n(h,null,U(i.value,s=>(a(),n("option",{key:s.slug,value:s.slug},r(s.title),9,Ne))),128))],512),[[S,D.value]])])]),t("div",Te,[t("div",Be,[e[21]||(e[21]=t("label",{for:"it-est"},"Szacowany czas (min)",-1)),z(t("input",{id:"it-est","onUpdate:modelValue":e[6]||(e[6]=s=>E.value=s),type:"number",min:"0",max:"10000",step:"5",inputmode:"numeric"},null,512),[[P,E.value,void 0,{number:!0}]])]),t("div",Ee,[e[22]||(e[22]=t("label",{for:"it-due"},"Zrobić do",-1)),z(t("input",{id:"it-due","onUpdate:modelValue":e[7]||(e[7]=s=>L.value=s),type:"datetime-local"},null,512),[[P,L.value]])])]),t("div",Le,[e[23]||(e[23]=t("label",{for:"it-url"},"Link",-1)),z(t("input",{id:"it-url","onUpdate:modelValue":e[8]||(e[8]=s=>M.value=s),type:"text",inputmode:"url",maxlength:"2048"},null,512),[[P,M.value]])]),t("div",Me,[e[24]||(e[24]=t("label",{for:"it-notes"},"Notatki",-1)),z(t("textarea",{id:"it-notes","onUpdate:modelValue":e[9]||(e[9]=s=>R.value=s),rows:"3",maxlength:"10000"},null,512),[[P,R.value]])]),V.value?(a(),n("p",Re,r(V.value),1)):d("",!0),t("div",Se,[t("button",{class:"btn primary",type:"submit",disabled:o.value||!y.value.trim()},r(W.item?"Zapisz":"Dodaj"),9,Pe),t("button",{class:"btn ghost",type:"button",onClick:e[10]||(e[10]=s=>A("cancel"))},"Anuluj")])],32))}}),We={class:"card","aria-label":"Postęp"},Ae={style:{margin:"0 0 8px"}},Fe={class:"big-num nums",title:"Wg szacowanego czasu"},Oe={class:"muted"},Ze={key:0,class:"muted small"},qe=["aria-valuenow"],He={key:0,class:"muted small",style:{margin:"10px 0 0","white-space":"pre-line"}},Ke={class:"chips wrap",style:{"margin-top":"12px"}},Ge=["aria-pressed"],Je=["aria-pressed"],Qe=["aria-label"],Xe={key:0,class:"section-head"},Ye={class:"muted small nums"},et={class:"rows"},tt=["checked","onChange"],st={class:"text"},lt={class:"badge"},at={key:0,class:"muted nums"},ot={key:2,class:"muted mono"},nt={key:3,class:"item-notes muted small"},it={class:"item-links small"},ut=["href"],rt={class:"item-actions"},dt=["aria-label","onClick"],vt=["aria-label","onClick"],mt=["aria-label","onClick"],pt=["aria-label","onClick"],ct={key:1,class:"empty",style:{"margin-top":"16px"}},yt={key:2,class:"empty",style:{"margin-top":"16px"}},$t=J({__name:"ChecklistView",props:{id:{}},setup(W){const F=W,c=ne(),A=pe(),f=B(()=>Number(F.id));Z(f,u=>{c.loadOne(u)},{immediate:!0});const i=B(()=>c.details[f.value]??null),_=B(()=>i.value?.items??[]),b=v(!1),y=v(!0),g=B(()=>{const u=_.value.filter(o=>!b.value||!o.done);return y.value?ce(u):[{key:"all",label:"",items:u}]}),$=v(!1),C=v(null),D=u=>c.addItem(f.value,u),E=u=>o=>c.updateItem(u,o);async function L(u){if(window.confirm(`Usunąć „${u.title}”?`))try{await c.removeItem(u)}catch(o){H().show(`Nie udało się usunąć. ${K(o)}`)}}async function M(){if(!(!i.value||!window.confirm(`Usunąć checklistę „${i.value.title}” ze wszystkimi pozycjami?`)))try{await c.remove(i.value.id),await A.push("/checklisty")}catch(u){H().show(`Nie udało się usunąć. ${K(u)}`)}}const R=u=>`/moje-prezentacje/${encodeURIComponent(u)}`,V=u=>!u.done&&u.due_at!==null&&Date.parse(u.due_at){const x=me("router-link");return a(),n("div",null,[N(ye,{eyebrow:i.value?.meeting?`Zjazd ${i.value.meeting.number} · ${p(ie)(i.value.meeting.starts_on,i.value.meeting.ends_on)}`:"Checklista",title:i.value?.title??"Checklista"},{default:I(()=>[N(x,{class:"btn ghost small",to:"/checklisty"},{default:I(()=>[...o[8]||(o[8]=[j("Wszystkie",-1)])]),_:1})]),_:1},8,["eyebrow","title"]),N(ke,{ready:!!i.value,error:p(c).detailError,onRetry:o[7]||(o[7]=m=>p(c).loadOne(f.value))},{default:I(()=>[i.value?(a(),n(h,{key:0},[t("section",We,[t("p",Ae,[t("span",Fe,r(i.value.progress.percent)+"%",1),t("span",Oe," · "+r(p(ue)(i.value.progress)),1),i.value.progress.minutes_total?(a(),n("span",Ze," · razem "+r(p(q)(i.value.progress.minutes_total)),1)):d("",!0)]),t("div",{class:"progress-bar",role:"progressbar","aria-valuenow":i.value.progress.percent,"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Postęp (wg szacowanego czasu)"},[t("span",{style:re({width:i.value.progress.percent+"%"})},null,4)],8,qe),i.value.description?(a(),n("p",He,r(i.value.description),1)):d("",!0)]),t("div",Ke,[t("button",{class:"chip",type:"button","aria-pressed":b.value,onClick:o[0]||(o[0]=m=>b.value=!b.value)},"Tylko do zrobienia",8,Ge),t("button",{class:"chip",type:"button","aria-pressed":y.value,onClick:o[1]||(o[1]=m=>y.value=!y.value)},"Wg przedmiotów",8,Je),$.value?d("",!0):(a(),n("button",{key:0,class:"chip",type:"button",onClick:o[2]||(o[2]=m=>$.value=!0)},[N(O,{name:"plus",class:"chip-icon"}),o[9]||(o[9]=j(" Dodaj pozycję",-1))]))]),$.value?(a(),T(G,{key:0,style:{"margin-top":"12px"},"meeting-id":i.value.meeting_id,save:D,onDone:o[3]||(o[3]=m=>$.value=!1),onCancel:o[4]||(o[4]=m=>$.value=!1)},null,8,["meeting-id"])):d("",!0),(a(!0),n(h,null,U(g.value,m=>(a(),n("section",{key:m.key,class:"section","aria-label":m.label||"Pozycje"},[m.label?(a(),n("div",Xe,[t("h2",null,r(m.label),1),t("span",Ye,r(m.items.filter(l=>l.done).length)+"/"+r(m.items.length),1)])):d("",!0),t("ul",et,[(a(!0),n(h,null,U(m.items,l=>(a(),n("li",{key:l.id,class:"reading checklist-item"},[C.value===l.id?(a(),T(G,{key:0,class:"grow",item:l,"meeting-id":i.value.meeting_id,save:E(l),onDone:o[5]||(o[5]=w=>C.value=null),onCancel:o[6]||(o[6]=w=>C.value=null)},null,8,["item","meeting-id","save"])):(a(),n(h,{key:1},[t("label",null,[t("input",{type:"checkbox",checked:l.done,onChange:w=>p(c).toggle(l,w.target.checked)},null,40,tt),t("span",st,[t("span",lt,r(p(Q)[l.kind]),1),j(" "+r(l.title)+" ",1),l.estimate_minutes?(a(),n("small",at," · "+r(p(q)(l.estimate_minutes)),1)):d("",!0),l.due_at?(a(),n("small",{key:1,class:de(["mono",V(l)?"error-text":"muted"])}," · do "+r(p(ve)(l.due_at)),3)):d("",!0),l.done_at?(a(),n("small",ot," · zrobione "+r(p(X)(l.done_at)),1)):d("",!0),l.notes?(a(),n("span",nt,r(l.notes),1)):d("",!0)])]),t("span",it,[l.reading?(a(),T(x,{key:0,to:`/lektury#lektura-${l.reading.id}`},{default:I(()=>[...o[10]||(o[10]=[j("lektura",-1)])]),_:1},8,["to"])):d("",!0),l.deadline?(a(),T(x,{key:1,to:"/terminarz",title:l.deadline.title},{default:I(()=>[...o[11]||(o[11]=[j("termin",-1)])]),_:1},8,["title"])):d("",!0),l.material?(a(),T(x,{key:2,to:`/materialy/${l.material.id}`},{default:I(()=>[...o[12]||(o[12]=[j("materiał",-1)])]),_:1},8,["to"])):d("",!0),l.presentation?(a(),T(x,{key:3,to:R(l.presentation.slug)},{default:I(()=>[...o[13]||(o[13]=[j("talia",-1)])]),_:1},8,["to"])):d("",!0),l.url?(a(),n("a",{key:4,href:l.url,target:"_blank",rel:"noopener noreferrer"},"link",8,ut)):d("",!0)]),t("span",rt,[!y.value&&!b.value?(a(),n("button",{key:0,class:"icon-btn",type:"button","aria-label":`W górę: ${l.title}`,onClick:w=>p(c).move(l,-1)},"↑",8,dt)):d("",!0),!y.value&&!b.value?(a(),n("button",{key:1,class:"icon-btn",type:"button","aria-label":`W dół: ${l.title}`,onClick:w=>p(c).move(l,1)},"↓",8,vt)):d("",!0),t("button",{class:"icon-btn",type:"button","aria-label":`Edytuj: ${l.title}`,onClick:w=>C.value=l.id},[N(O,{name:"pencil"})],8,mt),t("button",{class:"icon-btn",type:"button","aria-label":`Usuń: ${l.title}`,onClick:w=>L(l)},[N(O,{name:"trash"})],8,pt)])],64))]))),128))])],8,Qe))),128)),_.value.length?b.value&&!g.value.some(m=>m.items.length)?(a(),n("p",yt,"Wszystko zrobione.")):d("",!0):(a(),n("p",ct,"Pusto. Dodaj lektury, artykuły, prezentacje i zadania na ten zjazd.")),t("div",{class:"btn-row",style:{"margin-top":"24px"}},[t("button",{class:"btn miss small",type:"button",onClick:M},"Usuń checklistę")])],64)):d("",!0)]),_:1},8,["ready","error"])])}}});export{$t as default}; +import{d as Q,ae as Y,o as ee,r as v,aQ as te,U as Z,n as a,c as n,h as se,b as t,w as z,as as B,F as h,E as U,t as r,e as p,aR as J,aS as le,ah as ae,v as P,f as d,ar as X,x as R,aT as oe,af as ne,i as N,j as I,D as ie,p as j,G as ue,aU as q,H as re,_ as A,s as T,C as de,a8 as ve,q as H,ap as K,l as me,m as pe,aV as ce}from"./index-BhVKyY57.js";import{_ as ke}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as ye}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{p as _e}from"./presentations-CsatGkk7.js";import{f as fe}from"./forms-CbFOvcno.js";const be={class:"form-grid"},ge={class:"field"},$e=["value"],ze={class:"field"},we=["value"],he={class:"field"},Ce={key:0,class:"error-text"},xe={class:"field"},Ie=["value"],je={class:"form-grid"},Ue={class:"field"},Ve=["value"],De={class:"field"},Ne=["value"],Te={class:"form-grid"},Re={class:"field"},Ee={class:"field"},Le={class:"field"},Me={class:"field"},Se={key:0,class:"notice error",role:"alert"},Be={class:"btn-row"},Pe=["disabled"],G=Q({__name:"ChecklistItemForm",props:{item:{},meetingId:{},save:{type:Function}},emits:["done","cancel"],setup(W,{emit:O}){const c=W,F=O,f=Y(),i=v([]);ee(()=>{Promise.all([f.loadCourses(),f.loadReadings(),f.loadDeadlines()]),_e.mine().then(y=>i.value=y).catch(()=>{})});const _=c.item,b=v(_?.kind??"lektura"),k=v(_?.title??""),g=v(_?.course_id??""),$=v(_?.reading_id??""),C=v(_?.deadline_id??""),V=v(_?.presentation_slug??""),E=v(_?.estimate_minutes??""),L=v(te(_?.due_at??null)),M=v(_?.url??""),S=v(_?.notes??""),D=v(""),u=v({}),o=v(!1),x=R(()=>[...f.allReadings.filter(e=>g.value===""||e.course_id===g.value)].sort((e,s)=>+(s.meeting_id===c.meetingId)-+(e.meeting_id===c.meetingId))),m=R(()=>f.deadlines.filter(y=>g.value===""||y.course_id===g.value||y.course_id===null));Z($,y=>{const e=f.allReadings.find(s=>s.id===y);e&&(k.value.trim()||(k.value=e.author?`${e.author}, ${e.title}`:e.title),g.value===""&&(g.value=e.course_id))}),Z(V,y=>{const e=i.value.find(s=>s.slug===y);e&&!k.value.trim()&&(k.value=`Prezentacja: ${e.title}`),e&&(b.value="prezentacja")});const l=y=>y===""?null:y;async function w(){o.value=!0,D.value="",u.value={};try{await c.save({kind:b.value,title:k.value.trim(),course_id:l(g.value),reading_id:l($.value),deadline_id:l(C.value),presentation_slug:V.value||null,estimate_minutes:l(E.value),due_at:oe(L.value),url:M.value.trim()||null,notes:S.value.trim()||null}),F("done")}catch(y){const e=fe(y);u.value=e.fields,D.value=e.message||Object.values(e.fields)[0]||""}finally{o.value=!1}}return(y,e)=>(a(),n("form",{class:"card item-form",onSubmit:se(w,["prevent"])},[t("div",be,[t("div",ge,[e[11]||(e[11]=t("label",{for:"it-kind"},"Rodzaj",-1)),z(t("select",{id:"it-kind","onUpdate:modelValue":e[0]||(e[0]=s=>b.value=s)},[(a(!0),n(h,null,U(p(le),s=>(a(),n("option",{key:s,value:s},r(p(J)[s]),9,$e))),128))],512),[[B,b.value]])]),t("div",ze,[e[13]||(e[13]=t("label",{for:"it-course"},"Przedmiot",-1)),z(t("select",{id:"it-course","onUpdate:modelValue":e[1]||(e[1]=s=>g.value=s)},[e[12]||(e[12]=t("option",{value:""},"ogólne",-1)),(a(!0),n(h,null,U(p(f).visibleCourses,s=>(a(),n("option",{key:s.id,value:s.id},r(s.name)+" ("+r(p(ae)[s.form])+")",9,we))),128))],512),[[B,g.value]])])]),t("div",he,[e[14]||(e[14]=t("label",{for:"it-title"},"Co",-1)),z(t("input",{id:"it-title","onUpdate:modelValue":e[2]||(e[2]=s=>k.value=s),type:"text",required:"",maxlength:"500"},null,512),[[P,k.value]]),u.value.title?(a(),n("small",Ce,r(u.value.title),1)):d("",!0)]),t("div",xe,[e[16]||(e[16]=t("label",{for:"it-reading"},"Lektura z listy (odhaczenie = przeczytana)",-1)),z(t("select",{id:"it-reading","onUpdate:modelValue":e[3]||(e[3]=s=>$.value=s)},[e[15]||(e[15]=t("option",{value:""},"brak",-1)),(a(!0),n(h,null,U(x.value,s=>(a(),n("option",{key:s.id,value:s.id},r(s.author?s.author+", ":"")+r(s.title),9,Ie))),128))],512),[[B,$.value]])]),t("div",je,[t("div",Ue,[e[18]||(e[18]=t("label",{for:"it-deadline"},"Termin",-1)),z(t("select",{id:"it-deadline","onUpdate:modelValue":e[4]||(e[4]=s=>C.value=s)},[e[17]||(e[17]=t("option",{value:""},"brak",-1)),(a(!0),n(h,null,U(m.value,s=>(a(),n("option",{key:s.id,value:s.id},r(p(X)(s.due_at))+" · "+r(s.title),9,Ve))),128))],512),[[B,C.value]])]),t("div",De,[e[20]||(e[20]=t("label",{for:"it-deck"},"Moja prezentacja",-1)),z(t("select",{id:"it-deck","onUpdate:modelValue":e[5]||(e[5]=s=>V.value=s)},[e[19]||(e[19]=t("option",{value:""},"brak",-1)),(a(!0),n(h,null,U(i.value,s=>(a(),n("option",{key:s.slug,value:s.slug},r(s.title),9,Ne))),128))],512),[[B,V.value]])])]),t("div",Te,[t("div",Re,[e[21]||(e[21]=t("label",{for:"it-est"},"Szacowany czas (min)",-1)),z(t("input",{id:"it-est","onUpdate:modelValue":e[6]||(e[6]=s=>E.value=s),type:"number",min:"0",max:"10000",step:"5",inputmode:"numeric"},null,512),[[P,E.value,void 0,{number:!0}]])]),t("div",Ee,[e[22]||(e[22]=t("label",{for:"it-due"},"Zrobić do",-1)),z(t("input",{id:"it-due","onUpdate:modelValue":e[7]||(e[7]=s=>L.value=s),type:"datetime-local"},null,512),[[P,L.value]])])]),t("div",Le,[e[23]||(e[23]=t("label",{for:"it-url"},"Link",-1)),z(t("input",{id:"it-url","onUpdate:modelValue":e[8]||(e[8]=s=>M.value=s),type:"text",inputmode:"url",maxlength:"2048"},null,512),[[P,M.value]])]),t("div",Me,[e[24]||(e[24]=t("label",{for:"it-notes"},"Notatki",-1)),z(t("textarea",{id:"it-notes","onUpdate:modelValue":e[9]||(e[9]=s=>S.value=s),rows:"3",maxlength:"10000"},null,512),[[P,S.value]])]),D.value?(a(),n("p",Se,r(D.value),1)):d("",!0),t("div",Be,[t("button",{class:"btn primary",type:"submit",disabled:o.value||!k.value.trim()},r(W.item?"Zapisz":"Dodaj"),9,Pe),t("button",{class:"btn ghost",type:"button",onClick:e[10]||(e[10]=s=>F("cancel"))},"Anuluj")])],32))}}),We={class:"card","aria-label":"Postęp"},Fe={style:{margin:"0 0 8px"}},Oe={class:"big-num nums",title:"Wg szacowanego czasu"},Ae={class:"muted"},Ze={key:0,class:"muted small"},qe=["aria-valuenow"],He={key:0,class:"muted small",style:{margin:"10px 0 0","white-space":"pre-line"}},Ke={class:"chips wrap",style:{"margin-top":"12px"}},Ge=["aria-pressed"],Qe=["aria-pressed"],Je=["aria-label"],Xe={key:0,class:"section-head"},Ye={class:"muted small nums"},et={class:"rows"},tt=["checked","onChange"],st={class:"text"},lt={class:"badge"},at={key:0,class:"muted nums"},ot={key:2,class:"muted mono"},nt={key:3,class:"item-notes muted small"},it={class:"item-links small"},ut=["href"],rt={class:"item-actions"},dt=["aria-label","onClick"],vt=["aria-label","onClick"],mt=["aria-label","onClick"],pt=["aria-label","onClick"],ct={key:1,class:"empty",style:{"margin-top":"16px"}},kt={key:2,class:"empty",style:{"margin-top":"16px"}},$t=Q({__name:"ChecklistView",props:{id:{}},setup(W){const O=W,c=ne(),F=pe(),f=R(()=>Number(O.id));Z(f,u=>{c.loadOne(u)},{immediate:!0});const i=R(()=>c.details[f.value]??null),_=R(()=>i.value?.items??[]),b=v(!1),k=v(!0),g=R(()=>{const u=_.value.filter(o=>!b.value||!o.done);return k.value?ce(u):[{key:"all",label:"",items:u}]}),$=v(!1),C=v(null),V=u=>c.addItem(f.value,u),E=u=>o=>c.updateItem(u,o);async function L(u){if(window.confirm(`Usunąć „${u.title}”?`))try{await c.removeItem(u)}catch(o){H().show(`Nie udało się usunąć. ${K(o)}`)}}async function M(){if(!(!i.value||!window.confirm(`Usunąć checklistę „${i.value.title}” ze wszystkimi pozycjami?`)))try{await c.remove(i.value.id),await F.push("/checklisty")}catch(u){H().show(`Nie udało się usunąć. ${K(u)}`)}}const S=u=>`/moje-prezentacje/${encodeURIComponent(u)}`,D=u=>!u.done&&u.due_at!==null&&Date.parse(u.due_at){const x=me("router-link");return a(),n("div",null,[N(ke,{eyebrow:i.value?.meeting?`Zjazd ${i.value.meeting.number} · ${p(ie)(i.value.meeting.starts_on,i.value.meeting.ends_on)}`:"Checklista",title:i.value?.title??"Checklista"},{default:I(()=>[N(x,{class:"btn ghost small",to:"/checklisty"},{default:I(()=>[...o[8]||(o[8]=[j("Wszystkie",-1)])]),_:1})]),_:1},8,["eyebrow","title"]),N(ye,{ready:!!i.value,error:p(c).detailError,onRetry:o[7]||(o[7]=m=>p(c).loadOne(f.value))},{default:I(()=>[i.value?(a(),n(h,{key:0},[t("section",We,[t("p",Fe,[t("span",Oe,r(i.value.progress.percent)+"%",1),t("span",Ae," · "+r(p(ue)(i.value.progress)),1),i.value.progress.minutes_total?(a(),n("span",Ze," · razem "+r(p(q)(i.value.progress.minutes_total)),1)):d("",!0)]),t("div",{class:"progress-bar",role:"progressbar","aria-valuenow":i.value.progress.percent,"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Postęp (wg szacowanego czasu)"},[t("span",{style:re({width:i.value.progress.percent+"%"})},null,4)],8,qe),i.value.description?(a(),n("p",He,r(i.value.description),1)):d("",!0)]),t("div",Ke,[t("button",{class:"chip",type:"button","aria-pressed":b.value,onClick:o[0]||(o[0]=m=>b.value=!b.value)},"Tylko do zrobienia",8,Ge),t("button",{class:"chip",type:"button","aria-pressed":k.value,onClick:o[1]||(o[1]=m=>k.value=!k.value)},"Wg przedmiotów",8,Qe),$.value?d("",!0):(a(),n("button",{key:0,class:"chip",type:"button",onClick:o[2]||(o[2]=m=>$.value=!0)},[N(A,{name:"plus",class:"chip-icon"}),o[9]||(o[9]=j(" Dodaj pozycję",-1))]))]),$.value?(a(),T(G,{key:0,style:{"margin-top":"12px"},"meeting-id":i.value.meeting_id,save:V,onDone:o[3]||(o[3]=m=>$.value=!1),onCancel:o[4]||(o[4]=m=>$.value=!1)},null,8,["meeting-id"])):d("",!0),(a(!0),n(h,null,U(g.value,m=>(a(),n("section",{key:m.key,class:"section","aria-label":m.label||"Pozycje"},[m.label?(a(),n("div",Xe,[t("h2",null,r(m.label),1),t("span",Ye,r(m.items.filter(l=>l.done).length)+"/"+r(m.items.length),1)])):d("",!0),t("ul",et,[(a(!0),n(h,null,U(m.items,l=>(a(),n("li",{key:l.id,class:"reading checklist-item"},[C.value===l.id?(a(),T(G,{key:0,class:"grow",item:l,"meeting-id":i.value.meeting_id,save:E(l),onDone:o[5]||(o[5]=w=>C.value=null),onCancel:o[6]||(o[6]=w=>C.value=null)},null,8,["item","meeting-id","save"])):(a(),n(h,{key:1},[t("label",null,[t("input",{type:"checkbox",checked:l.done,onChange:w=>p(c).toggle(l,w.target.checked)},null,40,tt),t("span",st,[t("span",lt,r(p(J)[l.kind]),1),j(" "+r(l.title)+" ",1),l.estimate_minutes?(a(),n("small",at," · "+r(p(q)(l.estimate_minutes)),1)):d("",!0),l.due_at?(a(),n("small",{key:1,class:de(["mono",D(l)?"error-text":"muted"])}," · do "+r(p(ve)(l.due_at)),3)):d("",!0),l.done_at?(a(),n("small",ot," · zrobione "+r(p(X)(l.done_at)),1)):d("",!0),l.notes?(a(),n("span",nt,r(l.notes),1)):d("",!0)])]),t("span",it,[l.reading?(a(),T(x,{key:0,to:`/lektury#lektura-${l.reading.id}`},{default:I(()=>[...o[10]||(o[10]=[j("lektura",-1)])]),_:1},8,["to"])):d("",!0),l.deadline?(a(),T(x,{key:1,to:"/terminarz",title:l.deadline.title},{default:I(()=>[...o[11]||(o[11]=[j("termin",-1)])]),_:1},8,["title"])):d("",!0),l.material?(a(),T(x,{key:2,to:`/materialy/${l.material.id}`},{default:I(()=>[...o[12]||(o[12]=[j("materiał",-1)])]),_:1},8,["to"])):d("",!0),l.presentation?(a(),T(x,{key:3,to:S(l.presentation.slug)},{default:I(()=>[...o[13]||(o[13]=[j("talia",-1)])]),_:1},8,["to"])):d("",!0),l.url?(a(),n("a",{key:4,href:l.url,target:"_blank",rel:"noopener noreferrer"},"link",8,ut)):d("",!0)]),t("span",rt,[!k.value&&!b.value?(a(),n("button",{key:0,class:"icon-btn",type:"button","aria-label":`W górę: ${l.title}`,onClick:w=>p(c).move(l,-1)},"↑",8,dt)):d("",!0),!k.value&&!b.value?(a(),n("button",{key:1,class:"icon-btn",type:"button","aria-label":`W dół: ${l.title}`,onClick:w=>p(c).move(l,1)},"↓",8,vt)):d("",!0),t("button",{class:"icon-btn",type:"button","aria-label":`Edytuj: ${l.title}`,onClick:w=>C.value=l.id},[N(A,{name:"pencil"})],8,mt),t("button",{class:"icon-btn",type:"button","aria-label":`Usuń: ${l.title}`,onClick:w=>L(l)},[N(A,{name:"trash"})],8,pt)])],64))]))),128))])],8,Je))),128)),_.value.length?b.value&&!g.value.some(m=>m.items.length)?(a(),n("p",kt,"Wszystko zrobione.")):d("",!0):(a(),n("p",ct,"Pusto. Dodaj lektury, artykuły, prezentacje i zadania na ten zjazd.")),t("div",{class:"btn-row",style:{"margin-top":"24px"}},[t("button",{class:"btn miss small",type:"button",onClick:M},"Usuń checklistę")])],64)):d("",!0)]),_:1},8,["ready","error"])])}}});export{$t as default}; diff --git a/public/assets/ChecklistsView-BFTAa0Tm.js b/public/assets/ChecklistsView-P9tat5HV.js similarity index 92% rename from public/assets/ChecklistsView-BFTAa0Tm.js rename to public/assets/ChecklistsView-P9tat5HV.js index bc02f69..e032188 100644 --- a/public/assets/ChecklistsView-BFTAa0Tm.js +++ b/public/assets/ChecklistsView-P9tat5HV.js @@ -1 +1 @@ -import{d as B,ae as N,af as Z,o as E,c as o,i as b,j as g,h as S,b as s,w as k,as as U,F as z,E as w,e as d,v as D,t as r,f as c,x as h,r as v,n as l,D as j,s as L,H as P,G as R,l as T,m as F}from"./index-CtNAsql9.js";import{_ as q}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as A}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{f as G}from"./forms-CHet_2fA.js";const H={class:"field"},I=["value"],J={class:"field"},K={key:0,class:"notice error",role:"alert"},O={class:"btn-row"},Q=["disabled"],W={class:"stack"},X={class:"row-main"},Y={key:0,class:"muted small"},ee={class:"big-num nums"},te=["aria-valuenow","aria-label"],se={class:"muted small nums"},ae={key:0,class:"empty"},ue=B({__name:"ChecklistsView",setup(le){const _=N(),i=Z(),x=F();E(()=>{Promise.all([i.loadList(),_.loadMeetings()])});const C=h(()=>i.list!==null),y=h(()=>[...i.list??[]].sort((a,t)=>a.sort_order-t.sort_order||a.id-t.id)),m=v(!1),n=v(""),u=v(""),f=v(!1),p=v("");function $(){const a=_.meetings?.find(t=>t.id===u.value);a&&(!n.value||/^Zjazd \d+$/.test(n.value))&&(n.value=`Zjazd ${a.number}`)}async function M(){f.value=!0,p.value="";try{const a=await i.create({title:n.value,meeting_id:u.value===""?null:u.value});m.value=!1,n.value="",u.value="",await x.push(`/checklisty/${a.id}`)}catch(a){p.value=G(a).message}finally{f.value=!1}}return(a,t)=>{const V=T("router-link");return l(),o("div",null,[b(q,{eyebrow:"Przygotowanie do zjazdów",title:"Checklisty"},{default:g(()=>[m.value?c("",!0):(l(),o("button",{key:0,class:"btn primary small",type:"button",onClick:t[0]||(t[0]=e=>m.value=!0)},"Nowa"))]),_:1}),m.value?(l(),o("form",{key:0,class:"card",style:{"margin-bottom":"16px"},onSubmit:S(M,["prevent"])},[s("div",H,[t[6]||(t[6]=s("label",{for:"cl-meeting"},"Zjazd",-1)),k(s("select",{id:"cl-meeting","onUpdate:modelValue":t[1]||(t[1]=e=>u.value=e),onChange:$},[t[5]||(t[5]=s("option",{value:""},"bez zjazdu",-1)),(l(!0),o(z,null,w(d(_).meetings??[],e=>(l(),o("option",{key:e.id,value:e.id},"Zjazd "+r(e.number)+" · "+r(d(j)(e.starts_on,e.ends_on)),9,I))),128))],544),[[U,u.value]])]),s("div",J,[t[7]||(t[7]=s("label",{for:"cl-title"},"Tytuł",-1)),k(s("input",{id:"cl-title","onUpdate:modelValue":t[2]||(t[2]=e=>n.value=e),type:"text",required:"",maxlength:"255"},null,512),[[D,n.value]])]),p.value?(l(),o("p",K,r(p.value),1)):c("",!0),s("div",O,[s("button",{class:"btn primary",type:"submit",disabled:f.value||!n.value.trim()},"Utwórz",8,Q),s("button",{class:"btn ghost",type:"button",onClick:t[3]||(t[3]=e=>m.value=!1)},"Anuluj")])],32)):c("",!0),b(A,{ready:C.value,error:d(i).listError,onRetry:t[4]||(t[4]=e=>d(i).loadList())},{default:g(()=>[s("div",W,[(l(!0),o(z,null,w(y.value,e=>(l(),L(V,{key:e.id,to:`/checklisty/${e.id}`,class:"card link checklist-card"},{default:g(()=>[s("div",X,[s("div",null,[s("h3",null,r(e.title),1),e.meeting?(l(),o("span",Y,"Zjazd "+r(e.meeting.number)+" · "+r(d(j)(e.meeting.starts_on,e.meeting.ends_on)),1)):c("",!0)]),s("span",ee,r(e.progress.percent)+"%",1)]),s("div",{class:"progress-bar",role:"progressbar","aria-valuenow":e.progress.percent,"aria-valuemin":"0","aria-valuemax":"100","aria-label":`Postęp: ${e.title}`},[s("span",{style:P({width:e.progress.percent+"%"})},null,4)],8,te),s("span",se,r(d(R)(e.progress)),1)]),_:2},1032,["to"]))),128))]),y.value.length?c("",!0):(l(),o("p",ae,"Nie masz jeszcze checklist. Utwórz pierwszą, np. na najbliższy zjazd."))]),_:1},8,["ready","error"])])}}});export{ue as default}; +import{d as B,ae as N,af as Z,o as E,c as o,i as b,j as g,h as S,b as s,w as k,as as U,F as z,E as w,e as d,v as D,t as r,f as c,x as h,r as v,n as l,D as j,s as L,H as P,G as R,l as T,m as F}from"./index-BhVKyY57.js";import{_ as q}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as A}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{f as G}from"./forms-CbFOvcno.js";const H={class:"field"},I=["value"],J={class:"field"},K={key:0,class:"notice error",role:"alert"},O={class:"btn-row"},Q=["disabled"],W={class:"stack"},X={class:"row-main"},Y={key:0,class:"muted small"},ee={class:"big-num nums"},te=["aria-valuenow","aria-label"],se={class:"muted small nums"},ae={key:0,class:"empty"},ue=B({__name:"ChecklistsView",setup(le){const _=N(),i=Z(),x=F();E(()=>{Promise.all([i.loadList(),_.loadMeetings()])});const C=h(()=>i.list!==null),y=h(()=>[...i.list??[]].sort((a,t)=>a.sort_order-t.sort_order||a.id-t.id)),m=v(!1),n=v(""),u=v(""),f=v(!1),p=v("");function $(){const a=_.meetings?.find(t=>t.id===u.value);a&&(!n.value||/^Zjazd \d+$/.test(n.value))&&(n.value=`Zjazd ${a.number}`)}async function M(){f.value=!0,p.value="";try{const a=await i.create({title:n.value,meeting_id:u.value===""?null:u.value});m.value=!1,n.value="",u.value="",await x.push(`/checklisty/${a.id}`)}catch(a){p.value=G(a).message}finally{f.value=!1}}return(a,t)=>{const V=T("router-link");return l(),o("div",null,[b(q,{eyebrow:"Przygotowanie do zjazdów",title:"Checklisty"},{default:g(()=>[m.value?c("",!0):(l(),o("button",{key:0,class:"btn primary small",type:"button",onClick:t[0]||(t[0]=e=>m.value=!0)},"Nowa"))]),_:1}),m.value?(l(),o("form",{key:0,class:"card",style:{"margin-bottom":"16px"},onSubmit:S(M,["prevent"])},[s("div",H,[t[6]||(t[6]=s("label",{for:"cl-meeting"},"Zjazd",-1)),k(s("select",{id:"cl-meeting","onUpdate:modelValue":t[1]||(t[1]=e=>u.value=e),onChange:$},[t[5]||(t[5]=s("option",{value:""},"bez zjazdu",-1)),(l(!0),o(z,null,w(d(_).meetings??[],e=>(l(),o("option",{key:e.id,value:e.id},"Zjazd "+r(e.number)+" · "+r(d(j)(e.starts_on,e.ends_on)),9,I))),128))],544),[[U,u.value]])]),s("div",J,[t[7]||(t[7]=s("label",{for:"cl-title"},"Tytuł",-1)),k(s("input",{id:"cl-title","onUpdate:modelValue":t[2]||(t[2]=e=>n.value=e),type:"text",required:"",maxlength:"255"},null,512),[[D,n.value]])]),p.value?(l(),o("p",K,r(p.value),1)):c("",!0),s("div",O,[s("button",{class:"btn primary",type:"submit",disabled:f.value||!n.value.trim()},"Utwórz",8,Q),s("button",{class:"btn ghost",type:"button",onClick:t[3]||(t[3]=e=>m.value=!1)},"Anuluj")])],32)):c("",!0),b(A,{ready:C.value,error:d(i).listError,onRetry:t[4]||(t[4]=e=>d(i).loadList())},{default:g(()=>[s("div",W,[(l(!0),o(z,null,w(y.value,e=>(l(),L(V,{key:e.id,to:`/checklisty/${e.id}`,class:"card link checklist-card"},{default:g(()=>[s("div",X,[s("div",null,[s("h3",null,r(e.title),1),e.meeting?(l(),o("span",Y,"Zjazd "+r(e.meeting.number)+" · "+r(d(j)(e.meeting.starts_on,e.meeting.ends_on)),1)):c("",!0)]),s("span",ee,r(e.progress.percent)+"%",1)]),s("div",{class:"progress-bar",role:"progressbar","aria-valuenow":e.progress.percent,"aria-valuemin":"0","aria-valuemax":"100","aria-label":`Postęp: ${e.title}`},[s("span",{style:P({width:e.progress.percent+"%"})},null,4)],8,te),s("span",se,r(d(R)(e.progress)),1)]),_:2},1032,["to"]))),128))]),y.value.length?c("",!0):(l(),o("p",ae,"Nie masz jeszcze checklist. Utwórz pierwszą, np. na najbliższy zjazd."))]),_:1},8,["ready","error"])])}}});export{ue as default}; diff --git a/public/assets/ConnectView-BAbH9RG9.js b/public/assets/ConnectView-d3rdvEsh.js similarity index 89% rename from public/assets/ConnectView-BAbH9RG9.js rename to public/assets/ConnectView-d3rdvEsh.js index 01e0a85..96e2ec2 100644 --- a/public/assets/ConnectView-BAbH9RG9.js +++ b/public/assets/ConnectView-d3rdvEsh.js @@ -1 +1 @@ -import{aC as g,d as x,o as B,c as n,b as t,t as u,p as z,F as j,E as A,f as y,i as N,j as T,r as _,l as I,k as E,m as P,x as R,A as S,n as s}from"./index-CtNAsql9.js";const C=a=>"/oauth/mcp/requests/"+encodeURIComponent(a),q={consentRequest:a=>g.request(C(a)),decide:(a,i)=>g.request(C(a),{method:"POST",body:i})};function V(a,i){if(i!=="allow")return{decision:i};const k={decision:i,scopes:[...a.scopes]};return a.backend_admin&&(k.backend_admin=a.backend_admin.login),k}const D=409,M={class:"auth"},W={key:0,class:"muted",role:"status"},O={key:1,class:"notice",role:"status"},F={key:2,class:"notice error",role:"alert"},K={key:3,class:"stack"},L={class:"muted"},U={key:0,class:"notice",role:"status"},$={key:1,class:"notice error",role:"alert"},G={class:"btn-row"},H=["disabled"],Z=["disabled"],J={class:"auth-links"},X=x({__name:"ConnectView",setup(a){const i=E(),k=P(),v=R(()=>typeof i.query.request=="string"?i.query.request:""),o=_(null),r=_("loading"),m=_(!1),c=_(""),w={read:"odczyt Twoich danych w BM: pulpit, plan, przedmioty, lektury i materiały",write:"zmiany w Twoim imieniu, np. oznaczanie lektur, a dla właściciela także zarządzanie danymi i prezentacjami",ai:"funkcje AI aplikacji",offline_access:"dostęp bez ponownego logowania (token odświeżania)",backend:"działanie jako powiązane konto administratora"};function b(l){return l instanceof S?l.status:0}async function f(){if(!v.value){r.value="expired";return}try{o.value=await q.consentRequest(v.value),r.value="ready"}catch(l){const e=b(l);if(e===401){await k.replace({name:"login",query:{redirect:i.fullPath}});return}r.value=e===404||e===410?"expired":"error"}}async function h(l){if(o.value){m.value=!0,c.value="";try{const e=await q.decide(v.value,V(o.value,l));window.location.assign(e.redirect_uri)}catch(e){const d=b(e);d===404||d===410?r.value="expired":d===D?(await f(),c.value="Powiązane konto administratora zmieniło się. Sprawdź prośbę jeszcze raz."):d===422?c.value="Żadnego z tych zakresów nie można przyznać.":c.value="Coś poszło nie tak. Spróbuj ponownie."}finally{m.value=!1}}}return B(f),(l,e)=>{const d=I("router-link");return s(),n("div",M,[e[4]||(e[4]=t("header",{class:"page-head"},[t("span",{class:"eyebrow"},"BM II° · UWr"),t("h1",null,"Połącz aplikację")],-1)),r.value==="loading"?(s(),n("p",W,"Wczytywanie prośby…")):r.value==="expired"?(s(),n("p",O,"Ta prośba wygasła lub nie istnieje. Wróć do aplikacji i połącz ją jeszcze raz.")):r.value==="error"?(s(),n("p",F,"Coś poszło nie tak. Spróbuj ponownie.")):o.value?(s(),n("div",K,[t("p",null,[t("strong",null,u(o.value.client.name),1),e[2]||(e[2]=z(" prosi o dostęp do Twojego konta BM. ",-1))]),t("p",L,"Po zgodzie wrócisz do: "+u(o.value.client.redirect_host),1),t("ul",null,[(s(!0),n(j,null,A(o.value.scopes,p=>(s(),n("li",{key:p},[t("strong",null,u(p),1),w[p]?(s(),n(j,{key:0},[z(": "+u(w[p]),1)],64)):y("",!0)]))),128))]),o.value.backend_admin?(s(),n("p",U," Aplikacja będzie działać także jako administrator "+u(o.value.backend_admin.name)+" ("+u(o.value.backend_admin.login)+"). ",1)):y("",!0),c.value?(s(),n("div",$,u(c.value),1)):y("",!0),t("div",G,[t("button",{type:"button",class:"btn primary",disabled:m.value,onClick:e[0]||(e[0]=p=>h("allow"))},"Zezwól",8,H),t("button",{type:"button",class:"btn",disabled:m.value,onClick:e[1]||(e[1]=p=>h("deny"))},"Odmów",8,Z)])])):y("",!0),t("div",J,[N(d,{to:"/"},{default:T(()=>[...e[3]||(e[3]=[z("Wróć do pulpitu",-1)])]),_:1})])])}}});export{X as default}; +import{aW as g,d as x,o as B,c as n,b as t,t as u,p as z,F as j,E as A,f as y,i as N,j as T,r as _,l as I,k as E,m as P,x as R,A as S,n as s}from"./index-BhVKyY57.js";const C=a=>"/oauth/mcp/requests/"+encodeURIComponent(a),q={consentRequest:a=>g.request(C(a)),decide:(a,i)=>g.request(C(a),{method:"POST",body:i})};function V(a,i){if(i!=="allow")return{decision:i};const k={decision:i,scopes:[...a.scopes]};return a.backend_admin&&(k.backend_admin=a.backend_admin.login),k}const W=409,D={class:"auth"},M={key:0,class:"muted",role:"status"},O={key:1,class:"notice",role:"status"},F={key:2,class:"notice error",role:"alert"},K={key:3,class:"stack"},L={class:"muted"},U={key:0,class:"notice",role:"status"},$={key:1,class:"notice error",role:"alert"},G={class:"btn-row"},H=["disabled"],Z=["disabled"],J={class:"auth-links"},X=x({__name:"ConnectView",setup(a){const i=E(),k=P(),v=R(()=>typeof i.query.request=="string"?i.query.request:""),o=_(null),r=_("loading"),m=_(!1),c=_(""),w={read:"odczyt Twoich danych w BM: pulpit, plan, przedmioty, lektury i materiały",write:"zmiany w Twoim imieniu, np. oznaczanie lektur, a dla właściciela także zarządzanie danymi i prezentacjami",ai:"funkcje AI aplikacji",offline_access:"dostęp bez ponownego logowania (token odświeżania)",backend:"działanie jako powiązane konto administratora"};function b(l){return l instanceof S?l.status:0}async function f(){if(!v.value){r.value="expired";return}try{o.value=await q.consentRequest(v.value),r.value="ready"}catch(l){const e=b(l);if(e===401){await k.replace({name:"login",query:{redirect:i.fullPath}});return}r.value=e===404||e===410?"expired":"error"}}async function h(l){if(o.value){m.value=!0,c.value="";try{const e=await q.decide(v.value,V(o.value,l));window.location.assign(e.redirect_uri)}catch(e){const d=b(e);d===404||d===410?r.value="expired":d===W?(await f(),c.value="Powiązane konto administratora zmieniło się. Sprawdź prośbę jeszcze raz."):d===422?c.value="Żadnego z tych zakresów nie można przyznać.":c.value="Coś poszło nie tak. Spróbuj ponownie."}finally{m.value=!1}}}return B(f),(l,e)=>{const d=I("router-link");return s(),n("div",D,[e[4]||(e[4]=t("header",{class:"page-head"},[t("span",{class:"eyebrow"},"BM II° · UWr"),t("h1",null,"Połącz aplikację")],-1)),r.value==="loading"?(s(),n("p",M,"Wczytywanie prośby…")):r.value==="expired"?(s(),n("p",O,"Ta prośba wygasła lub nie istnieje. Wróć do aplikacji i połącz ją jeszcze raz.")):r.value==="error"?(s(),n("p",F,"Coś poszło nie tak. Spróbuj ponownie.")):o.value?(s(),n("div",K,[t("p",null,[t("strong",null,u(o.value.client.name),1),e[2]||(e[2]=z(" prosi o dostęp do Twojego konta BM. ",-1))]),t("p",L,"Po zgodzie wrócisz do: "+u(o.value.client.redirect_host),1),t("ul",null,[(s(!0),n(j,null,A(o.value.scopes,p=>(s(),n("li",{key:p},[t("strong",null,u(p),1),w[p]?(s(),n(j,{key:0},[z(": "+u(w[p]),1)],64)):y("",!0)]))),128))]),o.value.backend_admin?(s(),n("p",U," Aplikacja będzie działać także jako administrator "+u(o.value.backend_admin.name)+" ("+u(o.value.backend_admin.login)+"). ",1)):y("",!0),c.value?(s(),n("div",$,u(c.value),1)):y("",!0),t("div",G,[t("button",{type:"button",class:"btn primary",disabled:m.value,onClick:e[0]||(e[0]=p=>h("allow"))},"Zezwól",8,H),t("button",{type:"button",class:"btn",disabled:m.value,onClick:e[1]||(e[1]=p=>h("deny"))},"Odmów",8,Z)])])):y("",!0),t("div",J,[N(d,{to:"/"},{default:T(()=>[...e[3]||(e[3]=[z("Wróć do pulpitu",-1)])]),_:1})])])}}});export{X as default}; diff --git a/public/assets/CourseView-DanUZy74.js b/public/assets/CourseView-B4u4d13U.js similarity index 95% rename from public/assets/CourseView-DanUZy74.js rename to public/assets/CourseView-B4u4d13U.js index 3cb68cc..9bf7f78 100644 --- a/public/assets/CourseView-DanUZy74.js +++ b/public/assets/CourseView-B4u4d13U.js @@ -1 +1 @@ -import{_ as L}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as N}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{_ as B}from"./ReadingItem.vue_vue_type_script_setup_true_lang-CyMMq5Kb.js";import{d as R,ae as D,o as S,U as V,c as a,i as p,j as y,r as T,al as j,ap as M,n as t,F as r,e as d,ah as q,p as z,b as e,t as n,f as i,E as g,C as A,K as F,a6 as C,s as O,T as P,ag as K,x as f,l as Z}from"./index-CtNAsql9.js";const U={class:"card"},W={style:{margin:"0",display:"grid","grid-template-columns":"auto 1fr",gap:"4px 16px"}},Y={style:{margin:"0"}},G={style:{margin:"0"},class:"mono small"},H={style:{margin:"0"}},I={style:{margin:"0"}},J={key:0,style:{margin:"10px 0 0","white-space":"pre-line"}},Q={key:1,style:{margin:"10px 0 0"}},X=["href"],ee={class:"section","aria-labelledby":"sess-h"},se={class:"section-head"},te={class:"muted small"},ae={key:0,class:"rows"},le={class:"row-main"},oe={class:"title"},ne={class:"when"},ie={class:"muted small"},re={key:0},de={key:1,class:"badge online",style:{"margin-left":"6px"}},ue={key:2,class:"badge onsite",style:{"margin-left":"6px"}},_e={key:3},ce={key:4},me={key:1,class:"empty"},pe={class:"section","aria-labelledby":"read-h"},ye={class:"section-head"},ge={class:"muted small"},ve={class:"rows"},he={class:"rows"},ke={key:1,class:"empty"},fe={class:"section","aria-labelledby":"mat-h"},be={class:"section-head"},we={class:"muted small"},xe={key:0,class:"rows"},Be={class:"muted small"},Te={class:"badge"},ze={key:0},Ce={key:1},Oe={key:1,class:"empty"},Re=R({__name:"CourseView",props:{id:{}},setup($){const v=$,c=D(),o=T(null),h=T("");async function k(){o.value=null,h.value="";try{o.value=await j.course(Number(v.id))}catch(u){h.value=M(u)}}S(()=>{k(),c.loadReadings()}),V(()=>v.id,()=>{k()});const m=f(()=>c.allReadings.filter(u=>u.course_id===Number(v.id))),b=f(()=>m.value.filter(u=>u.is_required)),w=f(()=>m.value.filter(u=>!u.is_required)),E=Date.now();return(u,l)=>{const x=Z("router-link");return t(),a("div",null,[p(N,{ready:!!o.value,error:h.value,onRetry:l[0]||(l[0]=s=>k())},{default:y(()=>[o.value?(t(),a(r,{key:0},[p(L,{eyebrow:`${d(q)[o.value.form]} · semestr ${o.value.semester}`,title:o.value.name},{default:y(()=>[p(x,{class:"btn small ghost",to:"/przedmioty"},{default:y(()=>[...l[1]||(l[1]=[z("← Przedmioty",-1)])]),_:1})]),_:1},8,["eyebrow","title"]),e("section",U,[e("dl",W,[o.value.lecturer?(t(),a(r,{key:0},[l[2]||(l[2]=e("dt",{class:"muted"},"Prowadzący",-1)),e("dd",Y,n(o.value.lecturer),1)],64)):i("",!0),o.value.code?(t(),a(r,{key:1},[l[3]||(l[3]=e("dt",{class:"muted"},"Kod",-1)),e("dd",G,n(o.value.code),1)],64)):i("",!0),o.value.ects?(t(),a(r,{key:2},[l[4]||(l[4]=e("dt",{class:"muted"},"ECTS",-1)),e("dd",H,n(o.value.ects),1)],64)):i("",!0),o.value.assessment?(t(),a(r,{key:3},[l[5]||(l[5]=e("dt",{class:"muted"},"Zaliczenie",-1)),e("dd",I,n(o.value.assessment),1)],64)):i("",!0),o.value.elective_group?(t(),a(r,{key:4},[l[6]||(l[6]=e("dt",{class:"muted"},"Wybór",-1)),l[7]||(l[7]=e("dd",{style:{margin:"0"}},[e("span",{class:"badge alert"},"do wyboru")],-1))],64)):i("",!0)]),o.value.description?(t(),a("p",J,n(o.value.description),1)):i("",!0),o.value.syllabus_url?(t(),a("p",Q,[e("a",{href:o.value.syllabus_url,target:"_blank",rel:"noopener noreferrer"},"Sylabus",8,X)])):i("",!0)]),e("section",ee,[e("div",se,[l[8]||(l[8]=e("h2",{id:"sess-h"},"Zajęcia",-1)),e("span",te,n(o.value.sessions.length),1)]),o.value.sessions.length?(t(),a("ul",ae,[(t(!0),a(r,null,g(o.value.sessions,s=>(t(),a("li",{key:s.id,class:A({past:Date.parse(s.ends_at)s.read_at).length)+"/"+n(m.value.length),1)]),m.value.length?(t(),a(r,{key:0},[b.value.length?(t(),a(r,{key:0},[l[10]||(l[10]=e("h3",{class:"subhead"},"Obowiązkowe",-1)),e("ul",ve,[(t(!0),a(r,null,g(b.value,s=>(t(),O(B,{key:s.id,reading:s,onToggle:_=>d(c).toggleReading(s.id,_),onOwn:_=>d(c).toggleOwned(s.id,_)},null,8,["reading","onToggle","onOwn"]))),128))])],64)):i("",!0),w.value.length?(t(),a(r,{key:1},[l[11]||(l[11]=e("h3",{class:"subhead"},"Dodatkowe",-1)),e("ul",he,[(t(!0),a(r,null,g(w.value,s=>(t(),O(B,{key:s.id,reading:s,onToggle:_=>d(c).toggleReading(s.id,_),onOwn:_=>d(c).toggleOwned(s.id,_)},null,8,["reading","onToggle","onOwn"]))),128))])],64)):i("",!0)],64)):(t(),a("p",ke,"Brak lektur."))]),e("section",fe,[e("div",be,[l[12]||(l[12]=e("h2",{id:"mat-h"},"Materiały",-1)),e("span",we,n(o.value.materials.length),1)]),o.value.materials.length?(t(),a("ul",xe,[(t(!0),a(r,null,g(o.value.materials,s=>(t(),a("li",{key:s.id},[p(x,{to:`/materialy/${s.id}`,class:"title"},{default:y(()=>[z(n(s.title),1)]),_:2},1032,["to"]),e("div",Be,[e("span",Te,n(d(P)[s.type]),1),s.is_private?(t(),a("span",ze,[...l[13]||(l[13]=[e("span",{class:"badge alert"},"prywatny",-1)])])):i("",!0),s.files_count?(t(),a("span",Ce," · "+n(d(K)(s.files_count,"plik","pliki","plików")),1)):i("",!0)])]))),128))])):(t(),a("p",Oe,"Brak materiałów."))])],64)):i("",!0)]),_:1},8,["ready","error"])])}}});export{Re as default}; +import{_ as L}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as N}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{_ as B}from"./ReadingItem.vue_vue_type_script_setup_true_lang-BLPuAInn.js";import{d as R,ae as D,o as S,U as V,c as a,i as p,j as y,r as T,al as j,ap as M,n as t,F as r,e as d,ah as q,p as z,b as e,t as n,f as i,E as g,C as A,K as F,a6 as C,s as O,T as P,ag as K,x as f,l as Z}from"./index-BhVKyY57.js";const U={class:"card"},W={style:{margin:"0",display:"grid","grid-template-columns":"auto 1fr",gap:"4px 16px"}},Y={style:{margin:"0"}},G={style:{margin:"0"},class:"mono small"},H={style:{margin:"0"}},I={style:{margin:"0"}},J={key:0,style:{margin:"10px 0 0","white-space":"pre-line"}},Q={key:1,style:{margin:"10px 0 0"}},X=["href"],ee={class:"section","aria-labelledby":"sess-h"},se={class:"section-head"},te={class:"muted small"},ae={key:0,class:"rows"},le={class:"row-main"},oe={class:"title"},ne={class:"when"},ie={class:"muted small"},re={key:0},de={key:1,class:"badge online",style:{"margin-left":"6px"}},ue={key:2,class:"badge onsite",style:{"margin-left":"6px"}},_e={key:3},ce={key:4},me={key:1,class:"empty"},pe={class:"section","aria-labelledby":"read-h"},ye={class:"section-head"},ge={class:"muted small"},ve={class:"rows"},he={class:"rows"},ke={key:1,class:"empty"},fe={class:"section","aria-labelledby":"mat-h"},be={class:"section-head"},we={class:"muted small"},xe={key:0,class:"rows"},Be={class:"muted small"},Te={class:"badge"},ze={key:0},Ce={key:1},Oe={key:1,class:"empty"},Re=R({__name:"CourseView",props:{id:{}},setup($){const v=$,c=D(),o=T(null),h=T("");async function k(){o.value=null,h.value="";try{o.value=await j.course(Number(v.id))}catch(u){h.value=M(u)}}S(()=>{k(),c.loadReadings()}),V(()=>v.id,()=>{k()});const m=f(()=>c.allReadings.filter(u=>u.course_id===Number(v.id))),b=f(()=>m.value.filter(u=>u.is_required)),w=f(()=>m.value.filter(u=>!u.is_required)),E=Date.now();return(u,l)=>{const x=Z("router-link");return t(),a("div",null,[p(N,{ready:!!o.value,error:h.value,onRetry:l[0]||(l[0]=s=>k())},{default:y(()=>[o.value?(t(),a(r,{key:0},[p(L,{eyebrow:`${d(q)[o.value.form]} · semestr ${o.value.semester}`,title:o.value.name},{default:y(()=>[p(x,{class:"btn small ghost",to:"/przedmioty"},{default:y(()=>[...l[1]||(l[1]=[z("← Przedmioty",-1)])]),_:1})]),_:1},8,["eyebrow","title"]),e("section",U,[e("dl",W,[o.value.lecturer?(t(),a(r,{key:0},[l[2]||(l[2]=e("dt",{class:"muted"},"Prowadzący",-1)),e("dd",Y,n(o.value.lecturer),1)],64)):i("",!0),o.value.code?(t(),a(r,{key:1},[l[3]||(l[3]=e("dt",{class:"muted"},"Kod",-1)),e("dd",G,n(o.value.code),1)],64)):i("",!0),o.value.ects?(t(),a(r,{key:2},[l[4]||(l[4]=e("dt",{class:"muted"},"ECTS",-1)),e("dd",H,n(o.value.ects),1)],64)):i("",!0),o.value.assessment?(t(),a(r,{key:3},[l[5]||(l[5]=e("dt",{class:"muted"},"Zaliczenie",-1)),e("dd",I,n(o.value.assessment),1)],64)):i("",!0),o.value.elective_group?(t(),a(r,{key:4},[l[6]||(l[6]=e("dt",{class:"muted"},"Wybór",-1)),l[7]||(l[7]=e("dd",{style:{margin:"0"}},[e("span",{class:"badge alert"},"do wyboru")],-1))],64)):i("",!0)]),o.value.description?(t(),a("p",J,n(o.value.description),1)):i("",!0),o.value.syllabus_url?(t(),a("p",Q,[e("a",{href:o.value.syllabus_url,target:"_blank",rel:"noopener noreferrer"},"Sylabus",8,X)])):i("",!0)]),e("section",ee,[e("div",se,[l[8]||(l[8]=e("h2",{id:"sess-h"},"Zajęcia",-1)),e("span",te,n(o.value.sessions.length),1)]),o.value.sessions.length?(t(),a("ul",ae,[(t(!0),a(r,null,g(o.value.sessions,s=>(t(),a("li",{key:s.id,class:A({past:Date.parse(s.ends_at)s.read_at).length)+"/"+n(m.value.length),1)]),m.value.length?(t(),a(r,{key:0},[b.value.length?(t(),a(r,{key:0},[l[10]||(l[10]=e("h3",{class:"subhead"},"Obowiązkowe",-1)),e("ul",ve,[(t(!0),a(r,null,g(b.value,s=>(t(),O(B,{key:s.id,reading:s,onToggle:_=>d(c).toggleReading(s.id,_),onOwn:_=>d(c).toggleOwned(s.id,_)},null,8,["reading","onToggle","onOwn"]))),128))])],64)):i("",!0),w.value.length?(t(),a(r,{key:1},[l[11]||(l[11]=e("h3",{class:"subhead"},"Dodatkowe",-1)),e("ul",he,[(t(!0),a(r,null,g(w.value,s=>(t(),O(B,{key:s.id,reading:s,onToggle:_=>d(c).toggleReading(s.id,_),onOwn:_=>d(c).toggleOwned(s.id,_)},null,8,["reading","onToggle","onOwn"]))),128))])],64)):i("",!0)],64)):(t(),a("p",ke,"Brak lektur."))]),e("section",fe,[e("div",be,[l[12]||(l[12]=e("h2",{id:"mat-h"},"Materiały",-1)),e("span",we,n(o.value.materials.length),1)]),o.value.materials.length?(t(),a("ul",xe,[(t(!0),a(r,null,g(o.value.materials,s=>(t(),a("li",{key:s.id},[p(x,{to:`/materialy/${s.id}`,class:"title"},{default:y(()=>[z(n(s.title),1)]),_:2},1032,["to"]),e("div",Be,[e("span",Te,n(d(P)[s.type]),1),s.is_private?(t(),a("span",ze,[...l[13]||(l[13]=[e("span",{class:"badge alert"},"prywatny",-1)])])):i("",!0),s.files_count?(t(),a("span",Ce," · "+n(d(K)(s.files_count,"plik","pliki","plików")),1)):i("",!0)])]))),128))])):(t(),a("p",Oe,"Brak materiałów."))])],64)):i("",!0)]),_:1},8,["ready","error"])])}}});export{Re as default}; diff --git a/public/assets/CoursesView-Dq4MIMnp.js b/public/assets/CoursesView-CTFWnUtE.js similarity index 89% rename from public/assets/CoursesView-Dq4MIMnp.js rename to public/assets/CoursesView-CTFWnUtE.js index 6efea66..ba70364 100644 --- a/public/assets/CoursesView-Dq4MIMnp.js +++ b/public/assets/CoursesView-CTFWnUtE.js @@ -1 +1 @@ -import{_ as C}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as w}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{_ as x}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-DxZMSXIh.js";import{d as z,ae as B,an as $,o as S,c as t,i as m,j as k,e as o,n as s,b as r,F as c,E as v,t as a,f as n,s as E,ah as V,ao as j,p as _,ag as h,r as N,x as f,l as F}from"./index-CtNAsql9.js";const L={key:0,class:"chips",role:"group","aria-label":"Semestr"},M=["aria-pressed"],P=["aria-pressed","onClick"],R={key:1,class:"stack",style:{"margin-top":"10px"}},T={class:"row-main"},A={class:"badge"},D={class:"muted small",style:{margin:"0 0 6px"}},O={key:0},U={key:1},W={key:2},q={class:"small",style:{margin:"0"}},G={key:0,class:"badge alert"},H={class:"muted"},I={key:2,class:"empty"},ee=z({__name:"CoursesView",setup(J){const l=B(),g=$(),i=N(null);S(()=>{l.loadCourses()});const p=f(()=>[...new Set((l.courses??[]).map(u=>u.semester))].sort((u,d)=>u-d)),y=f(()=>l.visibleCourses.filter(u=>i.value===null||u.semester===i.value));return(u,d)=>{const b=F("router-link");return s(),t("div",null,[m(C,{eyebrow:"Program studiów",title:"Przedmioty"}),m(w,{ready:o(l).loaded.courses,error:o(l).error,onRetry:d[1]||(d[1]=e=>o(l).retry())},{default:k(()=>[m(x),p.value.length>1?(s(),t("div",L,[r("button",{class:"chip",type:"button","aria-pressed":i.value===null,onClick:d[0]||(d[0]=e=>i.value=null)},"Wszystkie",8,M),(s(!0),t(c,null,v(p.value,e=>(s(),t("button",{key:e,class:"chip",type:"button","aria-pressed":i.value===e,onClick:K=>i.value=e},"Semestr "+a(e),9,P))),128))])):n("",!0),y.value.length?(s(),t("div",R,[(s(!0),t(c,null,v(y.value,e=>(s(),E(b,{key:e.id,to:`/przedmioty/${e.id}`,class:"card link"},{default:k(()=>[r("div",T,[r("h3",null,a(e.name),1),r("span",A,a(o(V)[e.form]),1)]),r("p",D,[e.lecturer?(s(),t("span",O,a(e.lecturer),1)):n("",!0),e.ects?(s(),t("span",U," · "+a(e.ects)+" ECTS",1)):n("",!0),e.assessment?(s(),t("span",W," · "+a(e.assessment),1)):n("",!0)]),r("p",q,[o(j)(e,o(g).choices)?(s(),t("span",G,"do wyboru")):n("",!0),r("span",H,[_(a(o(h)(e.counts.sessions,"zajęcia","zajęcia","zajęć")),1),e.counts.readings?(s(),t(c,{key:0},[_(" · lektury "+a(e.counts.readings_read)+"/"+a(e.counts.readings),1)],64)):n("",!0),e.counts.materials?(s(),t(c,{key:1},[_(" · "+a(o(h)(e.counts.materials,"materiał","materiały","materiałów")),1)],64)):n("",!0)])])]),_:2},1032,["to"]))),128))])):(s(),t("p",I,"Brak przedmiotów."))]),_:1},8,["ready","error"])])}}});export{ee as default}; +import{_ as C}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as w}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{_ as x}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-05LZv84e.js";import{d as z,ae as B,an as $,o as S,c as t,i as m,j as k,e as o,n as s,b as r,F as c,E as v,t as a,f as n,s as E,ah as V,ao as j,p as _,ag as h,r as N,x as f,l as F}from"./index-BhVKyY57.js";const L={key:0,class:"chips",role:"group","aria-label":"Semestr"},M=["aria-pressed"],P=["aria-pressed","onClick"],R={key:1,class:"stack",style:{"margin-top":"10px"}},T={class:"row-main"},A={class:"badge"},D={class:"muted small",style:{margin:"0 0 6px"}},O={key:0},U={key:1},W={key:2},q={class:"small",style:{margin:"0"}},G={key:0,class:"badge alert"},H={class:"muted"},I={key:2,class:"empty"},ee=z({__name:"CoursesView",setup(J){const l=B(),g=$(),i=N(null);S(()=>{l.loadCourses()});const p=f(()=>[...new Set((l.courses??[]).map(u=>u.semester))].sort((u,d)=>u-d)),y=f(()=>l.visibleCourses.filter(u=>i.value===null||u.semester===i.value));return(u,d)=>{const b=F("router-link");return s(),t("div",null,[m(C,{eyebrow:"Program studiów",title:"Przedmioty"}),m(w,{ready:o(l).loaded.courses,error:o(l).error,onRetry:d[1]||(d[1]=e=>o(l).retry())},{default:k(()=>[m(x),p.value.length>1?(s(),t("div",L,[r("button",{class:"chip",type:"button","aria-pressed":i.value===null,onClick:d[0]||(d[0]=e=>i.value=null)},"Wszystkie",8,M),(s(!0),t(c,null,v(p.value,e=>(s(),t("button",{key:e,class:"chip",type:"button","aria-pressed":i.value===e,onClick:K=>i.value=e},"Semestr "+a(e),9,P))),128))])):n("",!0),y.value.length?(s(),t("div",R,[(s(!0),t(c,null,v(y.value,e=>(s(),E(b,{key:e.id,to:`/przedmioty/${e.id}`,class:"card link"},{default:k(()=>[r("div",T,[r("h3",null,a(e.name),1),r("span",A,a(o(V)[e.form]),1)]),r("p",D,[e.lecturer?(s(),t("span",O,a(e.lecturer),1)):n("",!0),e.ects?(s(),t("span",U," · "+a(e.ects)+" ECTS",1)):n("",!0),e.assessment?(s(),t("span",W," · "+a(e.assessment),1)):n("",!0)]),r("p",q,[o(j)(e,o(g).choices)?(s(),t("span",G,"do wyboru")):n("",!0),r("span",H,[_(a(o(h)(e.counts.sessions,"zajęcia","zajęcia","zajęć")),1),e.counts.readings?(s(),t(c,{key:0},[_(" · lektury "+a(e.counts.readings_read)+"/"+a(e.counts.readings),1)],64)):n("",!0),e.counts.materials?(s(),t(c,{key:1},[_(" · "+a(o(h)(e.counts.materials,"materiał","materiały","materiałów")),1)],64)):n("",!0)])])]),_:2},1032,["to"]))),128))])):(s(),t("p",I,"Brak przedmiotów."))]),_:1},8,["ready","error"])])}}});export{ee as default}; diff --git a/public/assets/DashboardView-BzEXGil-.js b/public/assets/DashboardView-BzEXGil-.js deleted file mode 100644 index bfe6b05..0000000 --- a/public/assets/DashboardView-BzEXGil-.js +++ /dev/null @@ -1,2 +0,0 @@ -import{y as ze,z as Re,B as Oe,T as _t,d as ie,n,c as s,C as ce,b as t,t as m,p as J,e as p,D as kt,f as I,F as K,E as ee,s as ve,j as me,G as gt,H as qe,i as B,x as v,l as lt,I as $t,J as wt,K as Be,r as $,L as zt,M as xt,R as It,N as it,O as rt,P as jt,Q as Ct,S as Et,U as le,V as Ce,_ as ne,w as Ae,v as We,W as Tt,h as Pe,X as Ee,Y as ut,Z as Y,$ as Ie,a0 as ye,a1 as Fe,o as Xe,a2 as Dt,a3 as St,a4 as je,a5 as Ye,a6 as Le,a7 as Mt,q as Bt,a8 as Ze,a9 as Lt,aa as Nt,ab as Rt,ac as qt,ad as At,u as Wt,ae as Pt,af as Ut,ag as Ot,k as Ht,m as Kt,ah as Ft,ai as Zt,aj as Vt,ak as Qt,al as Xt}from"./index-CtNAsql9.js";import{_ as Yt}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as Gt}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{_ as Je}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-DxZMSXIh.js";import{e as we,s as et,f as tt}from"./markdown-CbtkjRI4.js";const Jt=5,Ve=a=>`${a}T12:00:00Z`;function at(a,r){return Re(Ve(r),new Date(Ve(a)))}function ea(a,r,e,o=new Date){let l;if(r){const d=at(a.starts_on,a.ends_on)+1;l={value:`${Math.min(Math.max(at(a.starts_on,ze(o))+1,1),d)}/${d}`,caption:"dzień zjazdu"}}else{const d=Math.max(Re(Ve(a.starts_on),o),0);l={value:String(d),caption:Oe(d,"dzień do zjazdu","dni do zjazdu","dni do zjazdu")}}const i=a.sessions_count,c=o.getTime(),y=e.filter(d=>Date.parse(d.due_at)>=c&&ze(d.due_at)<=a.ends_on).length;return[l,{value:String(i),caption:Oe(i,"zajęcia","zajęcia","zajęć")},{value:String(y),caption:Oe(y,"termin do końca zjazdu","terminy do końca zjazdu","terminów do końca zjazdu")}]}function ta(a,r){return r.filter(e=>{if(e.meeting_id!==null)return e.meeting_id===a.id;const o=ze(e.starts_at);return o>=a.starts_on&&o<=a.ends_on})}const aa=/^https?:\/\//i;function nt(a){const r=[a.is_required?"obowiązkowa":"",a.author??"",a.course?.name??""].filter(o=>o!=="").join(" · "),e=a.url&&aa.test(a.url)?a.url:null;return{key:`r${a.id}`,title:a.title,meta:r,href:e,to:`/lektury#lektura-${a.id}`}}function na(a){const r=[_t[a.type]??"",a.course?.name??""].filter(e=>e!=="").join(" · ");return{key:`m${a.id}`,title:a.title,meta:r,href:null,to:`/materialy/${a.id}`}}function sa(a){return[...a.filter(r=>r.is_required),...a.filter(r=>!r.is_required)]}function oa(a,r,e,o,l=Jt){const i=e.filter(u=>u.meeting_id===a.id),c=o.filter(u=>u.meeting_id===a.id);let y,d;if(i.length||c.length)d=[...sa(i.filter(u=>u.read_at===null)).map(nt),...c.map(na)],y=d.length?"meeting":"done";else{const u=new Set(ta(a,r).map(h=>h.course_id));d=e.filter(h=>h.is_required&&h.read_at===null&&u.has(h.course_id)).map(nt),y=d.length?"courses":"none"}const k=d.slice(l),f=k.length&&k.every(u=>u.key.startsWith("m"))?"/materialy":"/lektury";return{source:y,items:d.slice(0,l),more:k.length,moreTo:f}}const la={class:"hero-main"},ia={class:"eyebrow hero-eyebrow"},ra={id:"hero-h",class:"hero-title"},ua={class:"hero-dates"},ca={key:0,class:"hero-extra muted"},da={class:"hero-stats"},ma={class:"hero-num"},va={class:"hero-cap"},pa={class:"hero-cap"},fa=["aria-valuenow"],ya={class:"hero-timeline"},ha={class:"eyebrow"},ba={key:0,class:"hero-rows"},_a=["href"],ka={key:2,class:"hero-read-meta"},ga={key:0,class:"hero-more"},$a={key:1,class:"muted"},wa={key:1,class:"card hero hero-empty","aria-labelledby":"hero-h"},za={class:"hero-main"},xa=ie({__name:"ZjazdHero",props:{meeting:{},isCurrent:{type:Boolean},schedule:{},deadlines:{},readings:{},materials:{},now:{},checklist:{}},setup(a){const r=a,e=v(()=>$t(r.meeting?.notes)),o=v(()=>wt(r.meeting?.notes)),l=v(()=>r.meeting?ea(r.meeting,r.isCurrent,r.deadlines,r.now):[]),i=v(()=>r.meeting&&r.materials?oa(r.meeting,r.schedule,r.readings,r.materials):null),c=v(()=>({name:"schedule",query:{zjazd:r.meeting?.number}}));return(y,d)=>{const k=lt("router-link");return a.meeting?(n(),s("section",{key:0,class:ce(["card hero",{hl:a.isCurrent}]),"aria-labelledby":"hero-h"},[t("div",la,[t("span",ia,m(a.isCurrent?"Trwa zjazd":"Najbliższy zjazd"),1),t("h2",ra,"Zjazd "+m(a.meeting.number),1),t("p",ua,[J(m(p(kt)(a.meeting.starts_on,a.meeting.ends_on))+" ",1),e.value?(n(),s("span",{key:0,class:ce(["badge",e.value==="online"?"online":"onsite"])},m(e.value),3)):I("",!0)]),o.value?(n(),s("p",ca,m(o.value),1)):I("",!0),t("ul",da,[(n(!0),s(K,null,ee(l.value,f=>(n(),s("li",{key:f.caption},[t("span",ma,m(f.value),1),t("span",va,m(f.caption),1)]))),128))]),a.checklist?(n(),ve(k,{key:1,class:"hero-prep",to:`/checklisty/${a.checklist.id}`,"aria-label":"Przygotowanie do zjazdu"},{default:me(()=>[t("span",pa,"Przygotowanie · "+m(p(gt)(a.checklist.progress)),1),t("span",{class:"progress-bar",role:"progressbar","aria-valuenow":a.checklist.progress.percent,"aria-valuemin":"0","aria-valuemax":"100"},[t("span",{style:qe({width:a.checklist.progress.percent+"%"})},null,4)],8,fa)]),_:1},8,["to"])):I("",!0),B(k,{class:"btn hero-btn",to:c.value},{default:me(()=>[...d[0]||(d[0]=[J("Zobacz plan zjazdu",-1)])]),_:1},8,["to"])]),t("div",ya,[t("span",ha,m(i.value?.source==="courses"?"Czytaj teraz":"Do przeczytania na zjazd"),1),i.value?(n(),s(K,{key:0},[i.value.items.length?(n(),s("ul",ba,[(n(!0),s(K,null,ee(i.value.items,f=>(n(),s("li",{key:f.key},[f.href?(n(),s("a",{key:0,class:"hero-read-title",href:f.href,target:"_blank",rel:"noopener"},m(f.title),9,_a)):(n(),ve(k,{key:1,class:"hero-read-title",to:f.to},{default:me(()=>[J(m(f.title),1)]),_:2},1032,["to"])),f.meta?(n(),s("span",ka,m(f.meta),1)):I("",!0)]))),128)),i.value.more>0?(n(),s("li",ga,[B(k,{to:i.value.moreTo},{default:me(()=>[J("+ "+m(i.value.more)+" więcej",1)]),_:1},8,["to"])])):I("",!0)])):(n(),s("p",$a,m(i.value.source==="done"?"Wszystko na ten zjazd przeczytane.":"Nic do przeczytania na ten zjazd."),1))],64)):I("",!0)])],2)):(n(),s("section",wa,[t("div",za,[d[2]||(d[2]=t("h2",{id:"hero-h",class:"hero-empty-h"},"Brak zaplanowanych zjazdów",-1)),d[3]||(d[3]=t("p",{class:"muted"},"Plan kolejnych zjazdów pojawi się tutaj, gdy zostanie opublikowany.",-1)),B(k,{class:"btn hero-btn",to:"/plan"},{default:me(()=>[...d[1]||(d[1]=[J("Cały plan",-1)])]),_:1})])]))}}});function ct(a){const r=a.indexOf("@");return r>0?a.slice(0,r):a}function $e(a,r=""){const e=a?.name?.trim()??"",o=a?.surname?.trim()??"";if(e&&a?.is_bot)return e;if(e&&o)return`${e} ${o[0]}.`;if(e)return e;if(a?.handle)return`@${a.handle}`;const l=r.trim();return l?ct(l):"Nieznana osoba"}function Ne(a,r=""){return[a?.name?.trim(),a?.surname?.trim()].filter(Boolean).join(" ")||$e(a,r)}function dt(a,r=""){const e=a?.name?.trim()??"",o=a?.surname?.trim()??"";let l="";return e||o?l=e.slice(0,1)+o.slice(0,1):a?.handle?l=a.handle.slice(0,2):l=ct(r.trim()).slice(0,2),(l||"?").toLocaleUpperCase("pl-PL")}function Ia(a){return Math.abs(Math.trunc(a))%8+1}function ja(a,r=new Date){const e=Re(a,r);if(e===0)return"DZIŚ";if(e===-1)return"WCZORAJ";const o=ze(a).slice(0,4);return(o===ze(r).slice(0,4)?Be(a):`${Be(a)} ${o}`).toLocaleUpperCase("pl-PL")}const Ca=300*1e3;function Ea(a,r=new Date){const e=[];let o=null,l="";for(const i of a){const c=ze(i.created_at),y=c!==l;y&&e.push({kind:"day",key:`day-${c}`,label:ja(i.created_at,r)});const d=!y&&o!==null&&o.sender_id===i.sender_id&&Date.parse(i.created_at)-Date.parse(o.created_at)<=Ca;e.push({kind:"message",key:`m-${i.id}`,message:i,followUp:d}),o=i,l=c}return e}function He(a){return a.toLocaleLowerCase("pl-PL").replace(/ł/g,"l").normalize("NFD").replace(/\p{Diacritic}/gu,"")}function Qe(a,r,e){const o=He(r.trim()),l=[];for(const i of a){if(i.id===e)continue;const c=He(i.name??""),y=He(i.surname??"");(!o||c.startsWith(o)||y.startsWith(o)||`${c} ${y}`.startsWith(o))&&l.push(i)}return l.sort((i,c)=>Ne(i).localeCompare(Ne(c),"pl"))}const Ta=10;function Da(a,r){const e=a.slice(0,Ta).map(l=>$e(r.get(l))),o=a.length-e.length;return o>0?`${e.join(", ")} i ${o} innych`:e.join(", ")}const st=' target="_blank" rel="noopener noreferrer nofollow"',mt=/(?"'`]+/gi;function pt(a,r){if(r(a))return{handle:a,rest:""};const e=a.replace(/[.-]+$/,"");return e.length>=2&&e!==a&&r(e)?{handle:e,rest:a.slice(e.length)}:null}function Ba(a){let r=a;for(;;){const e=r.at(-1);if(!e)break;if(`.,;:!?'"]}`.includes(e)){r=r.slice(0,-1);continue}if(e===")"&&(r.match(/\(/g)?.length??0)<(r.match(/\)/g)?.length??0)){r=r.slice(0,-1);continue}break}return{url:r,rest:a.slice(r.length)}}function La(a,r=new Map){if(!a)return"";const e=[],o=c=>c.replace(/\u0000(\d+)\u0000/g,(y,d)=>e[Number(d)]??""),l=c=>`\0${e.push(o(c))-1}\0`;let i=a.replace(/\r\n?/g,` -`).replace(/\u0000/g,"");return i=i.replace(vt,(c,y)=>l(`${we(y)}`)),i=i.replace(Sa,(c,y,d)=>{if(d.includes("\0"))return c;const k=et(d),f=tt(we(y));if(!k)return l(f);const u=/^https?:/i.test(k)?st:"";return l(`${f}`)}),i=i.replace(Ma,c=>{if(c.includes("\0"))return c;const{url:y,rest:d}=Ba(c),k=et(y);return k?l(`${we(y)}`)+d:c}),i=i.replace(mt,(c,y)=>{const d=pt(y,u=>r.has(u));if(!d)return c;const k=r.get(d.handle),f=`@${$e(k)}`;return l(`${we(f)}`)+d.rest}),i=tt(we(i)).replace(/\n/g,"
"),o(i)}function Na(a,r){if(!a||!r)return!1;const e=a.replace(vt," ");for(const o of e.matchAll(mt))if(pt(o[1],l=>l===r))return!0;return!1}function Ra(a,r){const e=a.slice(0,Math.max(0,r)),o=/(^|\s)@([^\s@]*)$/u.exec(e);return o?{start:e.length-o[2].length-1,query:o[2]}:null}function qa(a,r,e){const o=a.slice(0,r.start),l=a.slice(r.end),i=`@${e}`;return l.startsWith(" ")?{text:o+i+l,caret:o.length+i.length+1}:{text:`${o}${i} ${l}`,caret:o.length+i.length+1}}function Ge(a){const r=$(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return r;const e=window.matchMedia(a);r.value=e.matches;const o=l=>{r.value=l.matches};return e.addEventListener("change",o),zt()&&xt(()=>e.removeEventListener("change",o)),r}function Aa(a){return Ge(`(min-width: ${a}px)`)}const Wa={class:"embed-main"},Pa={class:"embed-type"},Ua={class:"embed-title"},Oa={key:0,class:"embed-meta"},Ha={key:1,class:"embed-card static"},Ka={class:"embed-main"},Fa={class:"embed-type"},Za={class:"embed-title"},Va={key:0,class:"embed-meta"},Qa={key:2,class:"embed-card unavailable"},Xa={class:"embed-main"},Ya={class:"embed-type"},Ga={key:3,class:"embed-card loading","aria-busy":"true"},Ja={class:"embed-main"},en={class:"embed-type"},ft=ie({__name:"EmbedCard",props:{embedRef:{},item:{},static:{type:Boolean}},setup(a){const r=a,e=v(()=>it[r.embedRef.type]),o=v(()=>r.item===void 0),l=v(()=>r.item??null),i=v(()=>l.value?rt(l.value):""),c=v(()=>l.value?jt(l.value):""),y=v(()=>l.value?Ct(l.value):null),d=v(()=>l.value?Et(l.value):"");return(k,f)=>l.value&&!a.static?(n(),ve(p(It),{key:0,class:"embed-card",to:d.value},{default:me(()=>[t("span",Wa,[t("span",Pa,m(e.value),1),t("span",Ua,m(i.value),1),c.value?(n(),s("span",Oa,m(c.value),1)):I("",!0)]),y.value?(n(),s("span",{key:0,class:ce(["badge",{warn:y.value.warn}])},m(y.value.text),3)):I("",!0)]),_:1},8,["to"])):l.value?(n(),s("span",Ha,[t("span",Ka,[t("span",Fa,m(e.value),1),t("span",Za,m(i.value),1),c.value?(n(),s("span",Va,m(c.value),1)):I("",!0)]),y.value?(n(),s("span",{key:0,class:ce(["badge",{warn:y.value.warn}])},m(y.value.text),3)):I("",!0)])):o.value?(n(),s("span",Ga,[t("span",Ja,[t("span",en,m(e.value),1),f[2]||(f[2]=t("span",{class:"embed-title"},[t("span",{class:"skeleton embed-skeleton","aria-label":"Wczytywanie"})],-1)),f[3]||(f[3]=t("span",{class:"embed-meta"}," ",-1))])])):(n(),s("div",Qa,[t("span",Xa,[t("span",Ya,m(e.value),1),f[0]||(f[0]=t("span",{class:"embed-title"},"Element niedostępny",-1)),f[1]||(f[1]=t("span",{class:"embed-meta"},"Ten element usunięto albo nie masz do niego dostępu.",-1))])]))}}),tn=["aria-labelledby"],an={class:"chat-dialog-head"},nn=["id"],sn={class:"embed-tabs",role:"tablist","aria-label":"Rodzaj elementu"},on=["id","aria-selected","aria-controls","tabindex","onClick","onKeydown"],ln=["id","aria-labelledby"],rn={class:"field"},un=["for"],cn=["id","placeholder"],dn={class:"picker-results"},mn={key:0,class:"embed-searching",role:"status"},vn={key:1,class:"chat-skeletons picker-skeletons","aria-busy":"true","aria-label":"Szukam…"},pn={key:2,class:"notice error",role:"alert"},fn={key:3,class:"empty"},yn={key:4,class:"empty"},hn={key:5,class:"picker-rows"},bn=["aria-disabled","onClick"],_n={key:0,class:"embed-staged"},kn=250,gn=ie({__name:"EmbedPicker",props:{staged:{}},emits:["pick"],setup(a,{expose:r,emit:e}){const o=a,l=e,i=[{type:"deadline",label:"Terminy",placeholder:"Szukaj terminu…"},{type:"class",label:"Zajęcia",placeholder:"Szukaj zajęć…"},{type:"reading",label:"Lektury",placeholder:"Szukaj lektury…"}],c=Ee(),y=$(null),d=$(null),k=$([]),f=$("deadline"),u=$(""),h=$(null),j=$("idle"),O=$("");let F=0,E=null,M=null,C=!1;const R=v(()=>i.find(D=>D.type===f.value)??i[0]),A=v(()=>new Set(o.staged));async function q(){E&&clearTimeout(E),E=null;const D=++F,U=f.value,_=u.value.trim();j.value="loading";try{const x=await ut.embeds(U,_);if(D!==F)return;h.value=Array.isArray(x)?x.filter(W=>W&&W.type===U):[],O.value=_,j.value="ready"}catch{if(D!==F)return;j.value="error"}}function se(){E&&clearTimeout(E),E=setTimeout(()=>{q()},kn)}le(u,se);function Q(D,U=!1){f.value!==D&&(f.value=D,h.value=null,q()),U&&Y(()=>k.value[i.findIndex(_=>_.type===D)]?.focus())}function te(D,U){let _=-1;D.key==="ArrowRight"?_=(U+1)%i.length:D.key==="ArrowLeft"?_=(U-1+i.length)%i.length:D.key==="Home"?_=0:D.key==="End"&&(_=i.length-1),!(_<0)&&(D.preventDefault(),Q(i[_].type,!0))}function V(){M=document.activeElement instanceof HTMLElement?document.activeElement:null,C=!1,u.value="",h.value=null,y.value?.showModal(),q(),Y(()=>d.value?.focus())}function ae(){y.value?.close()}function de(){E&&clearTimeout(E),E=null,F++,C||M?.focus(),M=null}function L(D){D.target===y.value&&ae()}function S(D){return A.value.has(Ie(D))}function N(D){S(D)||(C=!0,ae(),l("pick",D))}return Ce(()=>{E&&clearTimeout(E)}),r({open:V}),(D,U)=>(n(),s("dialog",{ref_key:"dialog",ref:y,class:"chat-dialog embed-picker","aria-labelledby":`embed-h-${p(c)}`,onClose:de,onClick:L},[t("div",an,[t("h2",{id:`embed-h-${p(c)}`,class:"chat-dialog-title"},"Podepnij do wiadomości",8,nn),t("button",{class:"icon-btn",type:"button","aria-label":"Zamknij",onClick:ae},[B(ne,{name:"close"})])]),t("div",sn,[(n(),s(K,null,ee(i,(_,x)=>t("button",{id:`embed-tab-${p(c)}-${_.type}`,key:_.type,ref_for:!0,ref_key:"tabEls",ref:k,class:"embed-tab",type:"button",role:"tab","aria-selected":f.value===_.type?"true":"false","aria-controls":`embed-panel-${p(c)}`,tabindex:f.value===_.type?0:-1,onClick:W=>Q(_.type),onKeydown:W=>te(W,x)},m(_.label),41,on)),64))]),t("div",{id:`embed-panel-${p(c)}`,class:"embed-panel",role:"tabpanel","aria-labelledby":`embed-tab-${p(c)}-${f.value}`},[t("div",rn,[t("label",{for:`embed-q-${p(c)}`},"Szukaj",8,un),Ae(t("input",{id:`embed-q-${p(c)}`,ref_key:"search",ref:d,"onUpdate:modelValue":U[0]||(U[0]=_=>u.value=_),type:"text",autocomplete:"off",placeholder:R.value.placeholder,onKeydown:U[1]||(U[1]=Tt(Pe(()=>{},["prevent"]),["enter"]))},null,40,cn),[[We,u.value]])]),t("div",dn,[j.value==="loading"&&h.value?(n(),s("p",mn,"Szukam…")):I("",!0),j.value==="loading"&&!h.value?(n(),s("div",vn,[...U[2]||(U[2]=[t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1)])])):j.value==="error"?(n(),s("div",pn,[U[3]||(U[3]=J(" Nie udało się wczytać wyników. ",-1)),t("button",{class:"linkish",type:"button",onClick:q},"Spróbuj ponownie")])):h.value&&!h.value.length&&O.value?(n(),s("p",fn,"Nic nie znaleziono dla „"+m(O.value)+"”.",1)):h.value&&!h.value.length?(n(),s("p",yn,"Nic tu jeszcze nie ma.")):h.value?(n(),s("ul",hn,[(n(!0),s(K,null,ee(h.value,_=>(n(),s("li",{key:`${_.type}:${_.id}`},[t("button",{class:"picker-row embed-pick",type:"button","aria-disabled":S(_)?"true":void 0,onClick:x=>N(_)},[B(ft,{"embed-ref":_,item:_,static:""},null,8,["embed-ref","item"]),S(_)?(n(),s("span",_n,"podpięte")):I("",!0)],8,bn)]))),128))])):I("",!0)])],8,ln)],40,tn))}}),Me=ie({__name:"Avatar",props:{userId:{},member:{default:null},fallback:{default:""},size:{default:32},me:{type:Boolean,default:!1}},setup(a){const r=a,e=v(()=>dt(r.member,r.fallback)),o=v(()=>r.me?void 0:{background:`var(--av-${Ia(r.userId)})`});return(l,i)=>(n(),s("span",{class:ce(["avatar",[`s${a.size}`,{me:a.me}]]),style:qe(o.value),"aria-hidden":"true"},m(e.value),7))}}),$n=["id"],wn={key:0,class:"mention-empty",role:"option","aria-disabled":"true","aria-selected":"false"},zn=["id","aria-selected","onMousedown","onMousemove"],xn={class:"mention-name"},In={class:"mention-handle"},jn=ie({__name:"MentionPopup",props:{id:{},options:{},active:{},query:{}},emits:["pick","hover"],setup(a,{emit:r}){const e=r;function o(l,i){return`${l}-opt-${i}`}return(l,i)=>(n(),s("ul",{id:a.id,class:"mention-pop",role:"listbox","aria-label":"Wspomnij osobę"},[a.options.length?I("",!0):(n(),s("li",wn,"Brak osób pasujących do „"+m(a.query)+"”.",1)),(n(!0),s(K,null,ee(a.options,(c,y)=>(n(),s("li",{id:o(a.id,y),key:c.id,class:ce(["mention-option",{active:y===a.active}]),role:"option","aria-selected":y===a.active?"true":"false",onMousedown:Pe(d=>e("pick",c),["prevent"]),onMousemove:d=>y!==a.active&&e("hover",y)},[B(Me,{"user-id":c.id,member:c,size:24},null,8,["user-id","member"]),t("span",xn,m(p(Ne)(c)),1),t("span",In,"@"+m(c.handle),1)],42,zn))),128))],8,$n))}}),Cn={key:0,class:"staging","aria-label":"Załączniki i podpięcia"},En=["title"],Tn={key:0,class:"staging-size"},Dn=["onClick"],Sn={key:2,class:"staging-size"},Mn=["aria-label","disabled","onClick"],Bn={class:"staging-type"},Ln=["title"],Nn=["aria-label","disabled","onClick"],ot=ie({__name:"StagingChips",props:{conversationId:{}},emits:["removed"],setup(a,{emit:r}){const e=a,o=r,l=ye(),i=v(()=>l.draft(e.conversationId));function c(k){const f=l.embedItem(k);return f===void 0?"Wczytywanie…":f===null?"Element niedostępny":rt(f)}function y(k){l.unstageEmbed(e.conversationId,k),o("removed")}function d(k){l.removeFile(e.conversationId,k.localId),o("removed")}return(k,f)=>i.value.files.length||i.value.embeds.length?(n(),s("ul",Cn,[(n(!0),s(K,null,ee(i.value.files,u=>(n(),s("li",{key:`file-${u.localId}`,class:ce(["staging-chip file",u.state])},[t("span",{class:"staging-name file-name",title:u.name},m(u.name),9,En),u.state==="uploading"?(n(),s("span",Tn,"Wysyłanie… "+m(u.progress)+"%",1)):u.state==="failed"?(n(),s(K,{key:1},[f[0]||(f[0]=t("span",{class:"staging-failed"},"Nie wysłano",-1)),t("button",{class:"linkish",type:"button",onClick:h=>p(l).retryUpload(a.conversationId,u.localId)},"Spróbuj ponownie",8,Dn)],64)):(n(),s("span",Sn,m(p(Fe)(u.size)),1)),t("button",{class:"staging-remove",type:"button","aria-label":`Usuń załącznik ${u.name}`,disabled:i.value.sending,onClick:h=>d(u)},[B(ne,{name:"close"})],8,Mn),u.state==="uploading"?(n(),s("span",{key:3,class:"staging-progress",style:qe({width:`${u.progress}%`}),"aria-hidden":"true"},null,4)):I("",!0)],2))),128)),(n(!0),s(K,null,ee(i.value.embeds,u=>(n(),s("li",{key:p(Ie)(u),class:"staging-chip embed"},[t("span",Bn,m(p(it)[u.type]),1),t("span",{class:"staging-name embed-name",title:c(u)},m(c(u)),9,Ln),t("button",{class:"staging-remove",type:"button","aria-label":`Usuń podpięcie ${c(u)}`,disabled:i.value.sending,onClick:h=>y(u)},[B(ne,{name:"close"})],8,Nn)]))),128))])):I("",!0)}}),Rn={key:0,class:"error-text",role:"alert"},qn={class:"composer-row"},An={key:0,class:"composer-add"},Wn=["aria-expanded","disabled"],Pn=["disabled","title","onClick"],Un={class:"composer-field"},On=["rows","placeholder","readonly","aria-expanded","aria-activedescendant"],Hn={key:2,class:"composer-tools"},Kn=["disabled"],Fn=["title","disabled"],Zn=["disabled"],Vn=["aria-busy","disabled"],Qn=["aria-busy","disabled"],Ke="Możesz podpiąć najwyżej 3 elementy do jednej wiadomości.",Xn=24,Yn=6,Gn=ie({__name:"ChatComposer",props:{conversationId:{},label:{},placeholder:{}},emits:["sent"],setup(a,{expose:r,emit:e}){const o=a,l=e,i=ye(),c=Ee(),y=`composer-${c}`,d=`composer-hint-${c}`,k=`mentions-${c}`,f=$(null),u=Ge("(min-width: 1100px) and (pointer: fine)"),h=v(()=>i.draft(o.conversationId)),j=$(""),O=v(()=>h.value.error||j.value),F=v({get:()=>h.value.text,set:b=>{j.value="",i.setDraftText(o.conversationId,b),b.trim()&&i.emitTyping(o.conversationId,b)}}),E=v(()=>i.canSend(o.conversationId)),M=$(null);function C(){h.value.sending||M.value?.click()}function R(){const b=M.value;b?.files?.length&&(j.value="",i.uploadFiles(o.conversationId,[...b.files]),b.value="",Y(Te))}const A=`composer-menu-${c}`,q=$(!1),se=$(null),Q=$([]);function te(){q.value=!0,Y(()=>Q.value[0]?.focus())}function V(b=!0){q.value&&(q.value=!1,b&&Y(()=>se.value?.focus()))}function ae(b){const z=Q.value.filter(oe=>!oe.disabled),H=z.indexOf(document.activeElement);if(b.key==="Escape")b.preventDefault(),b.stopPropagation(),V();else if(b.key==="ArrowDown"||b.key==="ArrowUp"){if(b.preventDefault(),!z.length)return;const oe=b.key==="ArrowDown"?(H+1)%z.length:(H-1+z.length)%z.length;z[oe]?.focus()}else b.key==="Home"||b.key==="End"?(b.preventDefault(),z[b.key==="Home"?0:z.length-1]?.focus()):b.key==="Tab"&&V(!1)}function de(){V(!1),C()}function L(){V(!1),se.value?.focus(),W()}const S=v(()=>[{label:"Dołącz plik",icon:"paperclip",disabled:!1,title:void 0,run:de},{label:"Podepnij termin, zajęcia lub lekturę",icon:"calendar",disabled:_.value,title:_.value?Ke:void 0,run:L}]);function N(b){const z=b.target;z instanceof Node&&(se.value?.contains(z)||Q.value.some(H=>H.contains(z)))||V(!1)}le(q,b=>{b?document.addEventListener("pointerdown",N,!0):document.removeEventListener("pointerdown",N,!0)}),le(u,()=>V(!1)),Ce(()=>document.removeEventListener("pointerdown",N,!0));const D=$(null),U=v(()=>h.value.embeds.map(Ie)),_=v(()=>h.value.embeds.length>=i.maxEmbeds),x=v(()=>_.value?Ke:"Podepnij termin, zajęcia lub lekturę");function W(){_.value||h.value.sending||D.value?.open()}function P(b){j.value="",i.stageEmbed(o.conversationId,{type:b.type,id:b.id},b),Y(Te)}function re(b){if(h.value.sending)return;const z=b.clipboardData?.getData("text/plain")??"";if(!z)return;const H=Dt(z,window.location.origin);if(!H.refs.length)return;const oe=new Set(U.value);let De=0,xe=0;for(const Ue of H.refs)oe.has(Ie(Ue))||(i.stageEmbed(o.conversationId,Ue)?(oe.add(Ie(Ue)),De++):xe++);H.insertText===""&&(De>0||xe===0)&&b.preventDefault(),xe>0&&setTimeout(()=>j.value=Ke)}function he(){const b=f.value;if(!b)return;b.style.height="auto";const z=getComputedStyle(b),H=parseFloat(z.paddingTop)+parseFloat(z.paddingBottom),oe=Xn*(u.value?8:4)+H;b.style.height=`${Math.min(b.scrollHeight,oe)}px`,b.style.overflowY=b.scrollHeight>oe?"auto":"hidden"}le([F,u],()=>{Y(he)}),Xe(he);const X=$(null),ue=$(0);let pe=null;const be=v(()=>X.value?Qe(i.members.values(),X.value.query,i.userId).slice(0,Yn):[]),g=v(()=>X.value!==null&&i.membersState==="ready"),w=v(()=>g.value&&be.value.length?`${k}-opt-${ue.value}`:void 0);function Z(){const b=f.value;if(!b)return;const z=b.selectionStart===b.selectionEnd?Ra(b.value,b.selectionStart??0):null;if(!z){pe=null,X.value=null;return}z.start!==pe&&((!X.value||X.value.start!==z.start||X.value.query!==z.query)&&(ue.value=0),X.value=z)}function _e(){X.value&&(pe=X.value.start),X.value=null}function T(b){const z=f.value,H=X.value;if(!z||!H||!b.handle)return;const oe=qa(z.value,{start:H.start,end:z.selectionStart??H.start+H.query.length+1},b.handle);F.value=oe.text,X.value=null,pe=null,Y(()=>{z.focus(),z.setSelectionRange(oe.caret,oe.caret)})}function fe(){const b=f.value;if(!b)return;const z=b.selectionStart??b.value.length,H=b.selectionEnd??z,oe=b.value.slice(0,z),De=oe===""||/\s$/.test(oe)?"@":" @";F.value=oe+De+b.value.slice(H),i.loadMembers(),Y(()=>{const xe=z+De.length;b.focus(),b.setSelectionRange(xe,xe),pe=null,Z()})}function G(b){if(!g.value)return!1;const z=be.value.length;switch(b.key){case"ArrowDown":return z&&(ue.value=(ue.value+1)%z),!0;case"ArrowUp":return z&&(ue.value=(ue.value-1+z)%z),!0;case"Enter":return b.shiftKey&&!z?!1:(z?T(be.value[ue.value]):_e(),!0);case"Tab":return z?(T(be.value[ue.value]),!0):(_e(),!1);case"Escape":return b.stopPropagation(),_e(),!0;default:return!1}}le(()=>o.conversationId,()=>{X.value=null,pe=null});async function ke(){E.value&&await i.send(o.conversationId)&&l("sent")}function ht(b){if(!b.isComposing){if(G(b)){b.preventDefault();return}b.key!=="Enter"||b.shiftKey||(b.preventDefault(),ke())}}function bt(b){(["ArrowLeft","ArrowRight","Home","End"].includes(b.key)||!g.value&&["ArrowUp","ArrowDown"].includes(b.key))&&Z()}function Te(){f.value?.focus()}return r({focus:Te}),(b,z)=>(n(),s("form",{class:ce(["composer",{compact:!p(u)}]),onSubmit:Pe(ke,["prevent"])},[t("label",{class:ce(p(u)?"composer-label":"sr-only"),for:y},m(a.label),3),O.value?(n(),s("p",Rn,m(O.value),1)):I("",!0),p(u)?I("",!0):(n(),ve(ot,{key:1,"conversation-id":a.conversationId,onRemoved:Te},null,8,["conversation-id"])),t("div",qn,[p(u)?I("",!0):(n(),s("div",An,[t("button",{ref_key:"menuButton",ref:se,class:"composer-plus",type:"button","aria-label":"Dodaj do wiadomości","aria-haspopup":"menu","aria-expanded":q.value?"true":"false","aria-controls":A,disabled:h.value.sending,onClick:z[0]||(z[0]=H=>q.value?V():te())},[B(ne,{name:"plus"})],8,Wn),q.value?(n(),s("div",{key:0,id:A,class:"composer-menu",role:"menu","aria-label":"Dodaj do wiadomości",onKeydown:ae},[(n(!0),s(K,null,ee(S.value,H=>(n(),s("button",{key:H.label,ref_for:!0,ref_key:"menuItems",ref:Q,class:"composer-menu-item",type:"button",role:"menuitem",tabindex:"-1",disabled:H.disabled,title:H.title,onClick:H.run},[B(ne,{name:H.icon},null,8,["name"]),J(m(H.label),1)],8,Pn))),128))],32)):I("",!0)])),t("div",Un,[p(u)?(n(),ve(ot,{key:0,"conversation-id":a.conversationId,onRemoved:Te},null,8,["conversation-id"])):I("",!0),g.value&&X.value?(n(),ve(jn,{key:1,id:k,options:be.value,active:ue.value,query:X.value.query,onPick:T,onHover:z[1]||(z[1]=H=>ue.value=H)},null,8,["options","active","query"])):I("",!0),Ae(t("textarea",{id:y,ref_key:"input",ref:f,"onUpdate:modelValue":z[2]||(z[2]=H=>F.value=H),rows:p(u)?3:1,placeholder:p(u)?"Napisz wiadomość…":a.placeholder,enterkeyhint:"send",readonly:h.value.sending,"aria-describedby":d,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":k,"aria-expanded":g.value?"true":"false","aria-activedescendant":w.value,onKeydown:ht,onKeyup:bt,onInput:Z,onClick:Z,onPaste:re,onBlur:z[3]||(z[3]=H=>X.value=null)},null,40,On),[[We,F.value]]),p(u)?(n(),s("div",Hn,[t("button",{class:"composer-tool",type:"button","aria-label":"Dołącz plik",title:"Dołącz plik",disabled:h.value.sending,onClick:C},[B(ne,{name:"paperclip"})],8,Kn),t("button",{class:"composer-tool",type:"button","aria-label":"Podepnij termin, zajęcia lub lekturę",title:x.value,disabled:h.value.sending||_.value,onClick:W},[B(ne,{name:"calendar"})],8,Fn),t("button",{class:"composer-tool",type:"button","aria-label":"Wspomnij osobę",title:"Wspomnij osobę",disabled:h.value.sending,onClick:fe},[B(ne,{name:"at"})],8,Zn),z[5]||(z[5]=t("span",{class:"composer-tools-gap"},null,-1)),t("button",{class:"btn primary small composer-send",type:"submit","aria-label":"Wyślij wiadomość","aria-busy":h.value.sending?"true":void 0,disabled:!E.value},[z[4]||(z[4]=J(" Wyślij",-1)),B(ne,{name:"arrow-right"})],8,Vn)])):I("",!0)]),p(u)?I("",!0):(n(),s("button",{key:1,class:"composer-send round",type:"submit","aria-label":"Wyślij wiadomość","aria-busy":h.value.sending?"true":void 0,disabled:!E.value},[B(ne,{name:"arrow-up"})],8,Qn))]),t("span",{id:d,class:"sr-only"},"Enter wysyła, Shift+Enter dodaje nową linię."),t("input",{ref_key:"fileInput",ref:M,class:"sr-only",type:"file",multiple:"",tabindex:"-1","aria-hidden":"true",onChange:R},null,544),B(gn,{ref_key:"picker",ref:D,staged:U.value,onPick:P},null,8,["staged"])],34))}});function yt(a,r,e){if(e<=0)return null;switch(a){case"ArrowRight":return(r+1)%e;case"ArrowLeft":return(r-1+e)%e;case"Home":return 0;case"End":return e-1;default:return null}}const Jn={class:"chat-head"},es={class:"chat-head-row"},ts={class:"chat-head-name"},as={class:"eyebrow"},ns={class:"chat-title"},ss={class:"chat-presence","aria-hidden":"true"},os={key:0,class:"presence-stack"},ls={key:1,class:"presence-text"},is={class:"presence-text"},rs={class:"chat-tabs",role:"tablist","aria-label":"Rozmowy"},us=["id","aria-selected","aria-controls","tabindex","onClick","onKeydown"],cs={key:0,class:"mention-badge"},ds={class:"sr-only"},ms={key:1,class:"unread-badge"},vs={"aria-hidden":"true"},ps={class:"sr-only"},fs={key:0,class:"chat-strip"},ys=ie({__name:"ChatHeader",props:{view:{},dmName:{},dmUserId:{},idBase:{}},emits:["select","back"],setup(a,{emit:r}){const e=a,o=r,l=[{key:"general",label:"# ogólny"},{key:"dms",label:"Wiadomości"}],i=E=>`${e.idBase}-tab-${E}`,c=ye(),y=v(()=>{switch(c.connection){case"connecting":return"Łączenie z czatem…";case"reconnecting":return"Ponowne łączenie…";case"unavailable":return"Czat bez aktualizacji na żywo — odświeżam co 15 s.";default:return""}}),d=v(()=>({general:{unread:c.generalId===null?0:c.unreadOf(c.generalId),mentions:c.totalMentions},dms:{unread:c.dmUnread,mentions:0}})),k=v(()=>c.othersOnline.slice(0,3)),f=v(()=>Math.max(0,c.othersOnline.length-3)),u=v(()=>e.view==="dm"&&e.dmUserId!=null&&c.isOnline(e.dmUserId)),h=v(()=>e.view==="general"?"general":"dms"),j=v(()=>e.view==="general"?"Czat roku":e.view==="dms"?"Wiadomości":"Wiadomość prywatna"),O=v(()=>e.view==="general"?"# ogólny":e.view==="dms"?"Wiadomości":e.dmName??"");function F(E,M){const C=yt(E.key,M,l.length);C!==null&&(E.preventDefault(),o("select",l[C].key),Y(()=>document.getElementById(i(l[C].key))?.focus()))}return(E,M)=>(n(),s(K,null,[t("header",Jn,[t("div",es,[a.view==="dm"?(n(),s("button",{key:0,class:"icon-btn chat-back",type:"button","aria-label":"Wróć do listy wiadomości",onClick:M[0]||(M[0]=C=>o("back"))},[B(ne,{name:"arrow-left"})])):I("",!0),t("div",ts,[t("span",as,m(j.value),1),t("h2",ns,m(O.value),1)]),t("div",ss,[a.view==="general"&&p(c).presenceAvailable?(n(),s(K,{key:0},[k.value.length?(n(),s("span",os,[(n(!0),s(K,null,ee(k.value,C=>(n(),ve(Me,{key:C,"user-id":C,member:p(c).members.get(C),size:24},null,8,["user-id","member"]))),128))])):I("",!0),f.value?(n(),s("span",ls,"+"+m(f.value),1)):I("",!0),M[1]||(M[1]=t("span",{class:"presence-dot"},null,-1)),t("span",is,m(p(c).onlineCount>1?`${p(c).onlineCount} online`:"tylko Ty"),1)],64)):u.value?(n(),s(K,{key:1},[M[2]||(M[2]=t("span",{class:"presence-dot"},null,-1)),M[3]||(M[3]=t("span",{class:"presence-text"},"online",-1))],64)):I("",!0)])]),t("div",rs,[(n(),s(K,null,ee(l,(C,R)=>t("button",{id:i(C.key),key:C.key,class:"chat-tab",type:"button",role:"tab","aria-selected":h.value===C.key,"aria-controls":`${a.idBase}-body`,tabindex:h.value===C.key?0:-1,onClick:A=>o("select",C.key),onKeydown:A=>F(A,R)},[J(m(C.label)+" ",1),d.value[C.key].mentions>0?(n(),s("span",cs,[M[4]||(M[4]=t("span",{"aria-hidden":"true"},"@",-1)),t("span",ds,", "+m(p(St)(d.value[C.key].mentions)),1)])):I("",!0),p(je)(d.value[C.key].unread)?(n(),s("span",ms,[t("span",vs,m(p(je)(d.value[C.key].unread)),1),t("span",ps,", "+m(p(Ye)(d.value[C.key].unread)),1)])):I("",!0)],40,us)),64))])]),y.value?(n(),s("p",fs,m(y.value),1)):I("",!0)],64))}}),hs={class:"dm-list"},bs={class:"dm-new"},_s={key:0,class:"chat-skeletons dm-skeletons","aria-busy":"true","aria-label":"Wczytywanie rozmów"},ks={key:1,class:"notice error dm-notice",role:"alert"},gs={key:2,class:"empty chat-empty dm-empty"},$s={key:3,class:"dm-rows"},ws=["onClick"],zs={class:"dm-text"},xs={class:"dm-name"},Is={class:"dm-preview"},js={class:"dm-meta"},Cs=["datetime"],Es={key:1,class:"unread-badge"},Ts={"aria-hidden":"true"},Ds={class:"sr-only"},Ss=ie({__name:"DmList",emits:["compose"],setup(a,{emit:r}){const e=r,o=ye(),l=v(()=>o.dmRows),i=v(()=>!l.value.length&&(o.bootstrapState==="loading"||o.bootstrapState==="idle")),c=v(()=>!l.value.length&&o.bootstrapState==="error");function y(f){return $e(o.members.get(f.other_user_id))}function d(f){const u=f.last_message;return u?u.sender_id===o.userId?`Ty: ${u.content}`:u.content:""}function k(f){const u=f.last_message?.created_at;return u?ze(u)===ze(new Date)?Le(u):Mt(u):""}return(f,u)=>(n(),s("div",hs,[t("div",bs,[t("button",{class:"btn small",type:"button",onClick:u[0]||(u[0]=h=>e("compose"))},[B(ne,{name:"plus"}),u[2]||(u[2]=J("Nowa wiadomość",-1))])]),i.value?(n(),s("div",_s,[...u[3]||(u[3]=[t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1)])])):c.value?(n(),s("div",ks,[u[4]||(u[4]=J(" Nie udało się wczytać rozmów. ",-1)),t("button",{class:"linkish",type:"button",onClick:u[1]||(u[1]=h=>p(o).bootstrap())},"Spróbuj ponownie")])):l.value.length?(n(),s("ul",$s,[(n(!0),s(K,null,ee(l.value,h=>(n(),s("li",{key:h.id},[t("button",{class:ce(["dm-row",{unread:h.unread>0}]),type:"button",onClick:j=>p(o).openDm(h.id)},[B(Me,{"user-id":h.other_user_id,member:p(o).members.get(h.other_user_id)},null,8,["user-id","member"]),t("span",zs,[t("span",xs,m(y(h)),1),t("span",Is,m(d(h)),1)]),t("span",js,[h.last_message?(n(),s("time",{key:0,datetime:h.last_message.created_at},m(k(h)),9,Cs)):I("",!0),p(je)(h.unread)?(n(),s("span",Es,[t("span",Ts,m(p(je)(h.unread)),1),t("span",Ds,", "+m(p(Ye)(h.unread)),1)])):I("",!0)])],10,ws)]))),128))])):(n(),s("div",gs,[...u[5]||(u[5]=[t("p",{class:"chat-empty-h"},"Nie masz jeszcze wiadomości prywatnych",-1),t("p",null,"Kliknij „Nowa wiadomość”, wybierz osobę i napisz do niej.",-1)])]))]))}}),Ms=["aria-labelledby"],Bs={class:"chat-dialog-head"},Ls=["id"],Ns={class:"field"},Rs=["for"],qs=["id"],As={key:0,class:"error-text",role:"alert"},Ws={class:"picker-results"},Ps={key:0,class:"chat-skeletons picker-skeletons","aria-busy":"true","aria-label":"Wczytywanie osób"},Us={key:1,class:"notice error",role:"alert"},Os={key:2,class:"empty"},Hs={key:3,class:"empty"},Ks={key:4,class:"picker-rows"},Fs=["disabled","onClick"],Zs={class:"picker-name"},Vs=ie({__name:"MemberPicker",emits:["started"],setup(a,{expose:r,emit:e}){const o=e,l=ye(),i=Ee(),c=$(null),y=$(null),d=$(""),k=$(!1);let f=null,u=!1;const h=v(()=>Qe(l.members.values(),"",l.userId)),j=v(()=>Qe(l.members.values(),d.value,l.userId));function O(){f=document.activeElement instanceof HTMLElement?document.activeElement:null,u=!1,d.value="",l.dmError="",l.loadMembers(),c.value?.showModal(),Y(()=>y.value?.focus())}function F(){c.value?.close()}function E(){u||f?.focus(),f=null}function M(R){R.target===c.value&&F()}async function C(R){if(!k.value){k.value=!0;try{const A=await l.startDm(R);if(A===null)return;u=!0,F(),o("started",A)}finally{k.value=!1}}}return r({open:O}),(R,A)=>(n(),s("dialog",{ref_key:"dialog",ref:c,class:"chat-dialog","aria-labelledby":`picker-h-${p(i)}`,onClose:E,onClick:M},[t("div",Bs,[t("h2",{id:`picker-h-${p(i)}`,class:"chat-dialog-title"},"Nowa wiadomość",8,Ls),t("button",{class:"icon-btn",type:"button","aria-label":"Zamknij",onClick:F},[B(ne,{name:"close"})])]),t("div",Ns,[t("label",{for:`picker-q-${p(i)}`},"Do kogo?",8,Rs),Ae(t("input",{id:`picker-q-${p(i)}`,ref_key:"search",ref:y,"onUpdate:modelValue":A[0]||(A[0]=q=>d.value=q),type:"text",autocomplete:"off",placeholder:"Wpisz imię lub nazwisko…"},null,8,qs),[[We,d.value]])]),p(l).dmError?(n(),s("p",As,m(p(l).dmError),1)):I("",!0),t("div",Ws,[p(l).membersState==="loading"&&!p(l).members.size?(n(),s("div",Ps,[...A[2]||(A[2]=[t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1)])])):p(l).membersState==="error"&&!p(l).members.size?(n(),s("div",Us,[A[3]||(A[3]=J(" Nie udało się wczytać listy osób. ",-1)),t("button",{class:"linkish",type:"button",onClick:A[1]||(A[1]=q=>p(l).loadMembers(!0))},"Spróbuj ponownie")])):h.value.length?j.value.length?(n(),s("ul",Ks,[(n(!0),s(K,null,ee(j.value,q=>(n(),s("li",{key:q.id},[t("button",{class:"picker-row",type:"button",disabled:k.value,onClick:se=>C(q.id)},[B(Me,{"user-id":q.id,member:q,size:24},null,8,["user-id","member"]),t("span",Zs,m(p(Ne)(q)),1)],8,Fs)]))),128))])):(n(),s("p",Hs,"Nikt nie pasuje do „"+m(d.value.trim())+"”.",1)):(n(),s("p",Os,"Na czacie nie ma jeszcze innych osób."))])],40,Ms))}}),Qs=["aria-pressed","aria-label","title","onClick"],Xs={class:"reaction-emoji","aria-hidden":"true"},Ys={class:"reaction-count","aria-hidden":"true"},Gs={class:"reaction-add-wrap"},Js=["aria-expanded","aria-controls","disabled"],eo=["aria-label","tabindex","onClick","onFocus"],ge=6,to=ie({__name:"ReactionBar",props:{message:{}},emits:["closed"],setup(a,{expose:r,emit:e}){const o=a,l=e,i=ye(),y=`reactions-${Ee()}`,d=$(null),k=$(null),f=$(null),u=$(!1),h=$(!1),j=$(0);let O=null;const F=v(()=>(o.message.reactions??[]).filter(L=>L.count>0).map(L=>{const S=i.userId!==null&&L.user_ids.includes(i.userId);return{key:L.key,count:L.count,mine:S,label:`${L.key} ${L.count}. ${S?"Cofnij swoją reakcję":"Dodaj swoją reakcję"}`,title:Da(L.user_ids,i.members)}})),E=v(()=>i.allowedReactions??[]),M=v(()=>E.value.length>0);function C(L){i.toggleReaction(o.message,L)}function R(){const L=d.value,S=L?.closest(".chat-list");if(!L||!S){h.value=!1;return}const N=Math.ceil(E.value.length/ge),D=N*36+(N-1)*4+16+2+8;h.value=L.getBoundingClientRect().top-S.getBoundingClientRect().topA()[j.value]?.focus())}function se(L){if(!M.value){i.loadReactions();return}O=L??k.value,j.value=0,R(),u.value=!0,document.addEventListener("pointerdown",te,!0),q()}function Q(L=!0){if(!u.value)return;u.value=!1,document.removeEventListener("pointerdown",te,!0);const S=O;O=null,L&&S?.focus(),l("closed")}function te(L){const S=L.target;if(S&&(f.value?.contains(S)||k.value?.contains(S)))return;const N=O;Q(!1),setTimeout(()=>{const D=document.activeElement;(!D||D===document.body||f.value?.contains(D))&&N?.focus()})}function V(L){C(L),Q()}function ae(){u.value?Q():se(k.value)}function de(L){const S=E.value.length;if(!S)return;let N=j.value;switch(L.key){case"Escape":L.preventDefault(),L.stopPropagation(),Q();return;case"ArrowRight":N=(j.value+1)%S;break;case"ArrowLeft":N=(j.value-1+S)%S;break;case"ArrowDown":N=j.value+ge=0?j.value-ge:Math.min(S-1,j.value%ge+Math.floor((S-1)/ge)*ge);break;case"Home":N=0;break;case"End":N=S-1;break;case"Tab":Q(!1);return;default:return}L.preventDefault(),j.value=N,q()}return Ce(()=>document.removeEventListener("pointerdown",te,!0)),r({openPicker:se}),(L,S)=>(n(),s("div",{ref_key:"root",ref:d,class:"reactions"},[(n(!0),s(K,null,ee(F.value,N=>(n(),s("button",{key:N.key,class:"reaction-chip",type:"button","aria-pressed":N.mine?"true":"false","aria-label":N.label,title:N.title,onClick:D=>C(N.key)},[t("span",Xs,m(N.key),1),t("span",Ys,m(N.count),1)],8,Qs))),128)),t("span",Gs,[t("button",{ref_key:"addBtn",ref:k,class:"reaction-add",type:"button","aria-label":"Dodaj reakcję","aria-haspopup":"true","aria-expanded":u.value?"true":"false","aria-controls":u.value?y:void 0,disabled:!M.value,onClick:ae},[B(ne,{name:"smile"})],8,Js),u.value?(n(),s("div",{key:0,id:y,ref_key:"pop",ref:f,class:ce(["reaction-pop",{below:h.value}]),role:"group","aria-label":"Dodaj reakcję",onKeydown:de},[(n(!0),s(K,null,ee(E.value,(N,D)=>(n(),s("button",{key:N,class:"reaction-pick",type:"button","aria-label":N,tabindex:D===j.value?0:-1,onClick:U=>V(N),onFocus:U=>j.value=D},m(N),41,eo))),128))],34)):I("",!0)])],512))}}),ao=["data-message-id"],no={class:"msg-gutter"},so=["datetime","title"],oo={class:"msg-content"},lo={key:0,class:"msg-head"},io={class:"msg-name"},ro={key:0,class:"msg-tag"},uo={key:1,class:"msg-tag me"},co=["datetime","title"],mo=["title"],vo={key:1,class:"sr-only"},po={key:2,class:"msg-deleted"},fo={class:"composer-field"},yo=["readonly"],ho={key:0,class:"error-text",role:"alert"},bo={class:"btn-row"},_o=["aria-busy"],ko=["disabled"],go=["innerHTML"],$o=["title"],wo={key:5,class:"msg-files"},zo=["aria-label","aria-busy","onClick"],xo={class:"msg-file-name"},Io={class:"msg-file-size"},jo={key:6,class:"msg-embeds"},Co={key:0,class:"msg-actions",role:"toolbar","aria-label":"Działania wiadomości"},Eo=["disabled"],Se=$(null),To=ie({__name:"ChatMessage",props:{message:{},followUp:{type:Boolean},author:{},meId:{}},emits:["delete"],setup(a,{emit:r}){const e=a,o=r,l=ye(),i=Ge("(hover: none)"),c=$(null),y=$(null),d=$(null),k=$(null),f=$(null),u=$(null),h=v(()=>e.meId!==null&&e.message.sender_id===e.meId),j=v(()=>$e(e.author,e.message.sender_name)),O=v(()=>Le(e.message.created_at)),F=v(()=>Ze(e.message.created_at)),E=v(()=>!!e.author?.is_bot),M=v(()=>!h.value&&Na(e.message.content,l.myHandle)),C=v(()=>e.message.edited_at?`Edytowano ${Ze(e.message.edited_at)}`:""),R=v(()=>(e.message.reactions??[]).some(T=>T.count>0)),A=$(!1),q=v(()=>Se.value===e.message.id),se=v(()=>!!l.allowedReactions?.length),Q=v(()=>!!e.message.deleted_at),te=v(()=>l.canEdit(e.message)),V=v(()=>l.canDelete(e.message)),ae=v(()=>Lt(e.message,l.maxEmbeds)),de=v(()=>!e.message.content||Nt(e.message.content,ae.value)),L=v(()=>e.message.attachments??[]),S=$(null),N=Bt();async function D(T){if(S.value===null){S.value=T.id;try{await ut.download(e.message.id,T.id,T.filename)}catch{N.show("Nie udało się pobrać pliku. Spróbuj ponownie.")}finally{S.value=null}}}const U=$(!1),_=$(""),x=$(!1),W=$(""),P=24;function re(){const T=u.value;if(!T)return;T.style.height="auto";const fe=getComputedStyle(T),G=P*8+parseFloat(fe.paddingTop)+parseFloat(fe.paddingBottom);T.style.height=`${Math.min(T.scrollHeight,G)}px`,T.style.overflowY=T.scrollHeight>G?"auto":"hidden"}async function he(){if(!te.value)return;_.value=e.message.content??"",W.value="",U.value=!0,Se.value=null,await Y();const T=u.value;T&&(re(),T.focus(),T.setSelectionRange(T.value.length,T.value.length))}function X(){U.value=!1,W.value="",Y(()=>k.value?.focus())}async function ue(){if(x.value)return;x.value=!0,W.value="";const T=await l.edit(e.message,_.value);if(x.value=!1,T){W.value=T;return}X()}function pe(T){if(!T.isComposing){if(T.key==="Escape"){T.preventDefault(),T.stopPropagation(),x.value||X();return}T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),ue())}}le(_,()=>{Y(re)}),le(Q,T=>{T&&(U.value=!1)});function be(){V.value&&o("delete",e.message,f.value)}async function g(){se.value&&(A.value=!0,await Y(),y.value?.openPicker(d.value))}function w(){A.value=!1}function Z(T){!i.value||T.target?.closest("a, button, textarea, input, .msg-actions")||(Se.value=q.value?null:e.message.id)}function _e(T){c.value&&T.target instanceof Node&&c.value.contains(T.target)||q.value&&(Se.value=null)}return le(q,T=>{T?document.addEventListener("pointerdown",_e,!0):document.removeEventListener("pointerdown",_e,!0)}),Ce(()=>{document.removeEventListener("pointerdown",_e,!0),q.value&&(Se.value=null)}),(T,fe)=>(n(),s("article",{ref_key:"root",ref:c,class:ce(["msg",{follow:a.followUp,"actions-open":q.value,"mentions-me":M.value}]),"data-message-id":a.message.id,onClick:Z},[t("div",no,[a.followUp?(n(),s("time",{key:1,class:"msg-time",datetime:a.message.created_at,title:F.value},m(O.value),9,so)):(n(),ve(Me,{key:0,"user-id":a.message.sender_id,member:a.author,fallback:a.message.sender_name,me:h.value},null,8,["user-id","member","fallback","me"]))]),t("div",oo,[a.followUp?(n(),s("span",vo,m(j.value)+", "+m(O.value)+":",1)):(n(),s("div",lo,[t("span",io,m(j.value),1),E.value?(n(),s("span",ro,"Bot")):h.value?(n(),s("span",uo,"Ty")):I("",!0),t("time",{class:"msg-time",datetime:a.message.created_at,title:F.value},m(O.value),9,co),a.message.edited_at?(n(),s("span",{key:2,class:"msg-edited",title:C.value},"(edytowano)",8,mo)):I("",!0)])),Q.value?(n(),s("p",po,"Wiadomość usunięta.")):U.value?(n(),s("form",{key:3,class:"msg-edit",onSubmit:Pe(ue,["prevent"])},[t("div",fo,[Ae(t("textarea",{ref_key:"editInput",ref:u,"onUpdate:modelValue":fe[0]||(fe[0]=G=>_.value=G),rows:"1","aria-label":"Edytuj wiadomość",readonly:x.value,onKeydown:pe},null,40,yo),[[We,_.value]])]),W.value?(n(),s("p",ho,m(W.value),1)):I("",!0),t("div",bo,[t("button",{class:"btn primary small",type:"submit","aria-busy":x.value?"true":void 0},"Zapisz zmiany",8,_o),t("button",{class:"btn ghost small",type:"button",disabled:x.value,onClick:X},"Anuluj edycję",8,ko)])],32)):(n(),s(K,{key:4},[de.value?I("",!0):(n(),s("div",{key:0,class:"msg-body prose",innerHTML:p(La)(a.message.content,p(l).membersByHandle)},null,8,go)),a.followUp&&a.message.edited_at?(n(),s("span",{key:1,class:"msg-edited",title:C.value},"(edytowano)",8,$o)):I("",!0)],64)),!Q.value&&L.value.length?(n(),s("ul",wo,[(n(!0),s(K,null,ee(L.value,G=>(n(),s("li",{key:G.id},[t("button",{class:"msg-file",type:"button","aria-label":`Pobierz ${G.filename} (${p(Fe)(G.size)})`,"aria-busy":S.value===G.id?"true":void 0,onClick:ke=>D(G)},[B(ne,{name:"file"}),t("span",xo,m(G.filename),1),t("span",Io,m(p(Fe)(G.size)),1)],8,zo)]))),128))])):I("",!0),!Q.value&&ae.value.length?(n(),s("div",jo,[(n(!0),s(K,null,ee(ae.value,G=>(n(),ve(ft,{key:p(Ie)(G),"embed-ref":G,item:p(l).embedItem(G)},null,8,["embed-ref","item"]))),128))])):I("",!0),!Q.value&&(R.value||A.value)?(n(),ve(to,{key:7,ref_key:"bar",ref:y,message:a.message,onClosed:w},null,8,["message"])):I("",!0)]),!Q.value&&!U.value?(n(),s("div",Co,[t("button",{ref_key:"reactBtn",ref:d,class:"msg-action",type:"button","aria-label":"Dodaj reakcję",title:"Dodaj reakcję",disabled:!se.value,onClick:g},[B(ne,{name:"smile"})],8,Eo),te.value?(n(),s("button",{key:0,ref_key:"editBtn",ref:k,class:"msg-action",type:"button","aria-label":"Edytuj",title:"Edytuj",onClick:he},[B(ne,{name:"pencil"})],512)):I("",!0),V.value?(n(),s("button",{key:1,ref_key:"deleteBtn",ref:f,class:"msg-action miss",type:"button","aria-label":"Usuń",title:"Usuń",onClick:be},[B(ne,{name:"trash"})],512)):I("",!0)])):I("",!0)],10,ao))}}),Do=["aria-labelledby","aria-describedby"],So=["id"],Mo=["id"],Bo={key:0,class:"error-text",role:"alert"},Lo={class:"btn-row chat-confirm-buttons"},No=["aria-busy","disabled"],Ro=["disabled"],qo=ie({__name:"DeleteDialog",setup(a,{expose:r}){const e=ye(),o=Ee(),l=$(null),i=$(null),c=$(null),y=$(!1),d=$("");let k=null,f=null;const u=v(()=>!!c.value&&c.value.sender_id===e.userId),h=v(()=>{const R=c.value;return!R||u.value?"Wiadomość zniknie z rozmowy u wszystkich. Tego nie można cofnąć.":`Usuniesz wiadomość od ${$e(e.members.get(R.sender_id),R.sender_name)} u wszystkich. Tego nie można cofnąć.`});function j(R,A){c.value=R,d.value="",y.value=!1,k=A??(document.activeElement instanceof HTMLElement?document.activeElement:null),f=k?.closest(".chat-list")??null,l.value?.showModal(),Y(()=>i.value?.focus())}function O(){l.value?.close()}function F(R){y.value&&R.preventDefault()}function E(){k?.isConnected?k.focus():f?.focus(),k=null,f=null,c.value=null}function M(R){R.target===l.value&&!y.value&&O()}async function C(){const R=c.value;if(!R||y.value)return;y.value=!0,d.value="";const A=await e.remove(R);if(y.value=!1,A){d.value=A;return}O()}return r({open:j}),(R,A)=>(n(),s("dialog",{ref_key:"dialog",ref:l,class:"chat-dialog chat-confirm","aria-labelledby":`delete-h-${p(o)}`,"aria-describedby":`delete-b-${p(o)}`,onCancel:F,onClose:E,onClick:M},[t("h2",{id:`delete-h-${p(o)}`,class:"chat-dialog-title"},"Usunąć wiadomość?",8,So),t("p",{id:`delete-b-${p(o)}`,class:"chat-confirm-body"},m(h.value),9,Mo),d.value?(n(),s("p",Bo,m(d.value),1)):I("",!0),t("div",Lo,[t("button",{class:"btn danger",type:"button","aria-busy":y.value?"true":void 0,disabled:y.value,onClick:C},"Usuń wiadomość",8,No),t("button",{ref_key:"keepBtn",ref:i,class:"btn ghost",type:"button",disabled:y.value,onClick:O},"Zostaw wiadomość",8,Ro)])],40,Do))}}),Ao={class:"chat-list-wrap"},Wo=["aria-label"],Po={key:0,class:"notice error",role:"alert"},Uo={key:1,class:"chat-skeletons","aria-busy":"true","aria-label":"Wczytywanie wiadomości"},Oo={key:2,class:"chat-start"},Ho={key:3,class:"empty chat-empty"},Ko={key:0,class:"error-text"},Fo={key:1,class:"chat-start"},Zo={key:2,class:"chat-start"},Vo=["aria-label"],Qo={"aria-hidden":"true"},Xo={key:0,class:"chat-new",role:"separator","aria-label":"Nowe wiadomości"},Yo={class:"sr-only","aria-live":"polite"},Go=ie({__name:"MessageList",props:{conversationId:{},name:{},kind:{default:"general"},otherName:{default:""},visible:{type:Boolean,default:!0}},setup(a,{expose:r}){const e=a,o=ye(),l=$(null),i=$(null),c=$(null);function y(g,w){c.value?.open(g,w)}const d=v(()=>o.messages[e.conversationId]),k=v(()=>o.errors[e.conversationId]??""),f=v(()=>Ea(d.value??[],new Date)),u=v(()=>d.value?.at(-1)?.id??null),h=v(()=>!!o.olderLoading[e.conversationId]),j=v(()=>o.olderError[e.conversationId]??""),O=v(()=>!!o.reachedStart[e.conversationId]),F=v(()=>e.kind==="dm"?"To początek Waszej rozmowy.":"To początek kanału # ogólny.");let E=!1;le(d,g=>{g&&(o.resolveFor(g,!E),E=!0)},{immediate:!0,deep:1});const M=o.unreadOf(e.conversationId),C=$(null);let R=!1;function A(){R||!d.value||(R=!0,C.value=Rt(d.value,M,o.userId))}const q=$(0),se=$(""),Q=typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function te(){return!!l.value&&l.value.clientHeight>0}function V(){const g=l.value;return!g||g.scrollHeight-g.scrollTop-g.clientHeight<=48}function ae(){return!l.value||!te()||!d.value?null:V()?{atBottom:!0,messageId:null,offset:0}:de()??{atBottom:!0,messageId:null,offset:0}}function de(){const g=l.value;if(!g)return null;for(const w of g.querySelectorAll("[data-message-id]"))if(w.offsetTop+w.offsetHeight>g.scrollTop)return{atBottom:!1,messageId:Number(w.dataset.messageId),offset:w.offsetTop-g.scrollTop};return null}function L(){const g=ae();g&&o.saveAnchor(e.conversationId,g)}let S=!0;const N=$(!1);function D(){if(!d.value||!te())return;qt({active:o.activeId===e.conversationId,visible:e.visible,focused:typeof document>"u"||document.hasFocus(),atBottom:V()})&&o.markRead(e.conversationId)}function U(g=!1){Y(()=>{const w=l.value;w&&(g&&!Q&&typeof w.scrollTo=="function"?w.scrollTo({top:w.scrollHeight,behavior:"smooth"}):w.scrollTop=w.scrollHeight,S=!0,q.value=0,te()&&o.saveAnchor(e.conversationId,{atBottom:!0,messageId:null,offset:0}),D())})}function _(g){if(C.value===null)return!1;const w=g.querySelector(".chat-new");if(!w)return!1;const Z=g.scrollHeight-g.clientHeight;return w.offsetTop>=Z?!1:(g.scrollTop=w.offsetTop-48,!0)}function x(){Y(()=>{const g=l.value;!g||!te()||!d.value||(A(),Y(()=>{const w=o.anchorFor(e.conversationId),Z=w&&!w.atBottom&&w.messageId!==null?g.querySelector(`[data-message-id="${w.messageId}"]`):null;Z?g.scrollTop=Z.offsetTop-(w?.offset??0):C.value!==null&&!N.value&&_(g)||(g.scrollTop=g.scrollHeight),S=V(),S&&(q.value=0),N.value=!0,D(),X()}))})}let W=0;function P(){S=V(),S&&(q.value=0),!W&&(W=requestAnimationFrame(()=>{W=0,L(),D()}))}le(()=>d.value===void 0,(g,w)=>{!g&&w&&x()}),le(u,(g,w)=>{if(g===null||g===w||w===null)return;const Z=d.value??[],_e=Z.filter(ke=>ke.id>w),T=Z.at(-1),fe=_e.filter(ke=>ke.sender_id!==o.userId),G=fe.at(-1);if(G&&e.visible){const ke=(G.content??"").replace(/\s+/g," ").trim().slice(0,80);se.value=`${$e(o.members.get(G.sender_id),G.sender_name)}: ${ke}`}S||T&&T.sender_id===o.userId?U():q.value+=fe.length}),le(()=>e.visible,(g,w)=>{w&&!g&&L(),g&&!w&&x()});let re=null;async function he(){const g=l.value;if(!g||!N.value||h.value||j.value||O.value)return;const w=de();if(await o.loadOlder(e.conversationId),await Y(),w?.messageId!=null){const Z=g.querySelector(`[data-message-id="${w.messageId}"]`);Z&&(g.scrollTop=Z.offsetTop-w.offset)}X()}function X(){const g=i.value;!re||!g||(re.unobserve(g),re.observe(g))}function ue(){o.olderError[e.conversationId]="",Y(()=>{he()})}le(i,(g,w)=>{w&&re?.unobserve(w),g&&re?.observe(g)});function pe(){D()}function be(){document.visibilityState==="visible"&&D()}return Xe(()=>{typeof IntersectionObserver<"u"&&l.value&&(re=new IntersectionObserver(g=>{g.some(w=>w.isIntersecting)&&he()},{root:l.value,rootMargin:"200px 0px 0px 0px"}),i.value&&re.observe(i.value)),window.addEventListener("focus",pe),document.addEventListener("visibilitychange",be),x()}),Ce(()=>{W&&cancelAnimationFrame(W),re?.disconnect(),window.removeEventListener("focus",pe),document.removeEventListener("visibilitychange",be),L()}),r({scrollToBottom:U}),(g,w)=>(n(),s("div",Ao,[t("div",{ref_key:"el",ref:l,class:"chat-list",role:"region","aria-label":`Wiadomości w ${a.name}`,tabindex:"0",onScrollPassive:P},[!d.value&&k.value?(n(),s("div",Po,[J(m(k.value)+" ",1),t("button",{class:"linkish",type:"button",onClick:w[0]||(w[0]=Z=>p(o).loadLatest(a.conversationId))},"Spróbuj ponownie")])):d.value?!d.value.length&&a.kind==="dm"?(n(),s("p",Oo,"To początek Waszej rozmowy z "+m(a.otherName)+".",1)):d.value.length?(n(),s(K,{key:4},[t("div",{ref_key:"sentinel",ref:i,class:"chat-older"},[j.value?(n(),s("p",Ko,[J(m(j.value)+" ",1),t("button",{class:"linkish",type:"button",onClick:ue},"Spróbuj ponownie")])):h.value?(n(),s("p",Fo,"Wczytywanie starszych wiadomości…")):O.value?(n(),s("p",Zo,m(F.value),1)):I("",!0)],512),(n(!0),s(K,null,ee(f.value,Z=>(n(),s(K,{key:Z.key},[Z.kind==="day"?(n(),s("div",{key:0,class:"chat-day",role:"separator","aria-label":Z.label},[t("span",Qo,m(Z.label),1)],8,Vo)):(n(),s(K,{key:1},[Z.message.id===C.value?(n(),s("div",Xo,[...w[4]||(w[4]=[t("span",{"aria-hidden":"true"},"Nowe wiadomości",-1)])])):I("",!0),B(To,{message:Z.message,"follow-up":Z.followUp&&Z.message.id!==C.value,author:p(o).members.get(Z.message.sender_id),"me-id":p(o).userId,onDelete:y},null,8,["message","follow-up","author","me-id"])],64))],64))),128))],64)):(n(),s("div",Ho,[...w[3]||(w[3]=[t("p",{class:"chat-empty-h"},"Na # ogólny jeszcze cisza",-1),t("p",null,"Napisz pierwszą wiadomość do całego roku. Przyciskiem kalendarza podepniesz termin, zajęcia albo lekturę.",-1)])])):(n(),s("div",Uo,[...w[2]||(w[2]=[t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1)])]))],40,Wo),q.value>0?(n(),s("button",{key:0,class:"btn small chat-jump",type:"button",onClick:w[1]||(w[1]=Z=>U(!0))},[B(ne,{name:"arrow-down"}),J("Nowe wiadomości: "+m(q.value),1)])):I("",!0),t("div",Yo,m(se.value),1),B(qo,{ref_key:"deleteDialog",ref:c},null,512)]))}}),Jo=["role","aria-label","aria-labelledby"],el=["id","aria-labelledby"],tl={class:"chat-typing","aria-hidden":"true"},al={key:2,class:"chat-list"},nl=ie({__name:"ChatPanel",props:{wide:{type:Boolean,default:!0},visible:{type:Boolean,default:!0},labelledBy:{default:void 0}},setup(a){const r=a,e=ye(),o=`chat-${Ee()}`,l=$(null),i=$(null),c=$(null),y=v(()=>r.wide?void 0:"tabpanel"),d=v(()=>e.view==="dms"?null:e.activeId),k=v(()=>e.view==="dm"?e.conversations.find(E=>E.id===e.activeId):void 0),f=v(()=>k.value?$e(e.members.get(k.value.other_user_id)):""),u=v(()=>e.view==="dm"?f.value:"# ogólny"),h=v(()=>d.value===null?"":At(e.typingIn(d.value).map(E=>$e(e.members.get(E),"Ktoś")))),j=v(()=>`${o}-tab-${e.view==="general"?"general":"dms"}`);le(()=>r.visible,E=>e.panelVisible=E,{immediate:!0}),Ce(()=>e.panelVisible=!1);function O(E){E==="general"?e.showGeneral():e.showDms()}function F(){Y(()=>i.value?.focus())}return(E,M)=>(n(),s("aside",{class:"chat",role:y.value,"aria-label":a.wide?"Czat":void 0,"aria-labelledby":a.wide?void 0:a.labelledBy},[B(ys,{view:p(e).view,"dm-name":f.value,"dm-user-id":k.value?.other_user_id??null,"id-base":o,onSelect:O,onBack:M[0]||(M[0]=C=>p(e).showDms())},null,8,["view","dm-name","dm-user-id"]),t("div",{id:`${o}-body`,class:"chat-body",role:"tabpanel","aria-labelledby":j.value},[p(e).view==="dms"?(n(),ve(Ss,{key:0,onCompose:M[1]||(M[1]=C=>c.value?.open())})):d.value!==null?(n(),s(K,{key:1},[(n(),ve(Go,{ref_key:"list",ref:l,key:d.value,"conversation-id":d.value,name:u.value,kind:p(e).view==="dm"?"dm":"general","other-name":f.value,visible:a.visible},null,8,["conversation-id","name","kind","other-name","visible"])),t("div",tl,m(h.value),1),B(Gn,{ref_key:"composer",ref:i,"conversation-id":d.value,label:`Wiadomość do ${u.value}`,placeholder:p(e).view==="dm"?`Napisz do ${f.value}…`:"Napisz na # ogólny…",onSent:M[2]||(M[2]=C=>l.value?.scrollToBottom())},null,8,["conversation-id","label","placeholder"])],64)):(n(),s("div",al,[...M[3]||(M[3]=[t("div",{class:"chat-skeletons","aria-busy":"true","aria-label":"Wczytywanie czatu"},[t("div",{class:"skeleton"}),t("div",{class:"skeleton"}),t("div",{class:"skeleton"})],-1)])]))],8,el),B(Vs,{ref_key:"picker",ref:c,onStarted:F},null,512)],8,Jo))}}),sl={key:0,class:"pulpit-tabs",role:"tablist","aria-label":"Widok"},ol=["id","aria-selected","aria-controls","tabindex","onClick","onKeydown"],ll={key:0,class:"unread-badge"},il={"aria-hidden":"true"},rl={class:"sr-only"},ul=["role","aria-labelledby"],cl={class:"pulpit-lists"},dl={"aria-labelledby":"next-h"},ml={class:"section-head"},vl={key:0,class:"rows"},pl={class:"row-main"},fl={class:"title"},yl={class:"when"},hl={class:"muted small"},bl={key:0,class:"badge online"},_l={key:1,class:"badge onsite"},kl={key:1,class:"empty"},gl={"aria-labelledby":"dl-h"},$l={class:"section-head"},wl={key:0,class:"rows"},zl={class:"row-main"},xl={class:"title"},Il={class:"muted small"},jl={key:0},Cl={key:1,class:"empty"},El={class:"pulpit-cards"},Tl={class:"card","aria-labelledby":"read-h"},Dl={style:{margin:"0 0 8px"}},Sl={class:"big-num"},Ml={class:"muted"},Bl=["aria-valuenow"],Ll={class:"muted small",style:{margin:"8px 0 10px"}},Nl={class:"card","aria-labelledby":"quiz-h"},Ul=ie({__name:"DashboardView",setup(a){const r=Wt(),e=Pt(),o=Ut(),l=ye(),i=Ht(),c=Kt(),y=$(new Date);Xe(()=>{y.value=new Date,Promise.all([e.loadDashboard(),e.loadCourses(),e.loadSchedule(),e.loadDeadlines(),e.loadReadings()]),o.loadList()});const d=v(()=>e.loaded.schedule&&e.loaded.courses&&e.loaded.readings&&e.loaded.deadlines&&e.loaded.dashboard),k=v(()=>e.dashboard?.current_meeting??e.dashboard?.next_meeting??null),f=v(()=>!!e.dashboard?.current_meeting),u=v(()=>o.list?.find(_=>_.meeting_id===k.value?.id)??null),h=$(null);let j=0;async function O(_){const x=++j;if(_===void 0){h.value=[];return}h.value=null;try{const W=await Xt.materials({meeting:_,per_page:100});x===j&&(h.value=W.data)}catch{x===j&&(h.value=[])}}le(()=>k.value?.id,_=>{O(_)},{immediate:!0});const F=v(()=>h.value===null?null:Qt(h.value,e.hidden)),E=v(()=>e.schedule.filter(_=>Date.parse(_.ends_at)>y.value.getTime()).slice(0,5)),M=v(()=>e.deadlines.filter(_=>Date.parse(_.due_at)>=y.value.getTime()).slice(0,5)),C=_=>{const x=Re(_,y.value);return x>=0&&x<=14},R=v(()=>e.readingStats),A=v(()=>R.value.requiredTotal?Math.round(R.value.requiredRead/R.value.requiredTotal*100):0),q=v(()=>r.user?.name?`Cześć, ${r.user.name}`:"Pulpit"),se=v(()=>`Pulpit · ${Be(y.value.toISOString())}`),Q=v(()=>{const _=r.user;return dt({name:_?.name??"",surname:_?.surname??"",handle:""},_?.email??"")}),te=Aa(1100),V=v(()=>l.member===!0),ae=v(()=>i.query.tab==="czat"?"czat":"pulpit"),de=v(()=>V.value&&!te.value),L=v(()=>V.value&&(te.value||ae.value==="czat")),S=[{key:"pulpit",label:"Pulpit",id:"tab-pulpit",panel:"panel-pulpit"},{key:"czat",label:"Czat",id:"tab-czat",panel:"panel-czat"}];function N(_){if(_==="czat")return{...i.query,tab:"czat"};const{tab:x,...W}=i.query;return W}function D(_){_!==ae.value&&c.push({query:N(_)})}function U(_,x){const W=yt(_.key,x,S.length);W!==null&&(_.preventDefault(),D(S[W].key),Y(()=>document.getElementById(S[W].id)?.focus()))}return le([()=>l.member,()=>i.query.tab],([_,x])=>{_===!1&&x==="czat"&&c.replace({query:N("pulpit")})},{immediate:!0}),(_,x)=>{const W=lt("router-link");return n(),s("div",{class:ce(["pulpit",{"with-chat":V.value,czat:V.value&&ae.value==="czat"}])},[B(Yt,{class:"pulpit-head",eyebrow:se.value,title:q.value},{default:me(()=>[B(Je,{part:"chip"}),B(W,{class:"profile-link",to:"/profil","aria-label":"Profil"},{default:me(()=>[J(m(Q.value),1)]),_:1})]),_:1},8,["eyebrow","title"]),V.value?(n(),s("div",sl,[(n(),s(K,null,ee(S,(P,re)=>t("button",{id:P.id,key:P.key,class:"pulpit-tab",type:"button",role:"tab","aria-selected":ae.value===P.key,"aria-controls":P.panel,tabindex:ae.value===P.key?0:-1,onClick:he=>D(P.key),onKeydown:he=>U(he,re)},[J(m(P.label)+" ",1),P.key==="czat"&&p(je)(p(l).totalUnread)?(n(),s("span",ll,[t("span",il,m(p(je)(p(l).totalUnread)),1),t("span",rl,", "+m(p(Ye)(p(l).totalUnread)),1)])):I("",!0)],40,ol)),64))])):I("",!0),t("div",{id:"panel-pulpit",class:"pulpit-main",role:de.value?"tabpanel":void 0,"aria-labelledby":de.value?"tab-pulpit":void 0},[B(Je,{part:"notice"}),B(Gt,{ready:d.value,error:p(e).error,onRetry:x[0]||(x[0]=P=>p(e).retry())},{default:me(()=>[B(xa,{meeting:k.value,"is-current":f.value,schedule:p(e).schedule,deadlines:p(e).deadlines,readings:p(e).readings,materials:F.value,now:y.value,checklist:u.value},null,8,["meeting","is-current","schedule","deadlines","readings","materials","now","checklist"]),t("div",cl,[t("section",dl,[t("div",ml,[x[2]||(x[2]=t("h2",{id:"next-h"},"Najbliższe zajęcia",-1)),B(W,{to:"/plan",class:"small"},{default:me(()=>[...x[1]||(x[1]=[J("Cały plan",-1)])]),_:1})]),E.value.length?(n(),s("ul",vl,[(n(!0),s(K,null,ee(E.value,P=>(n(),s("li",{key:P.id},[t("div",pl,[t("span",fl,m(P.course.name),1),t("span",yl,m(p(Le)(P.starts_at))+"–"+m(p(Le)(P.ends_at)),1)]),t("div",hl,[J(m(p(Be)(P.starts_at))+" · "+m(p(Ft)[P.course.form])+" ",1),P.is_online?(n(),s("span",bl,"online")):P.room?(n(),s("span",_l,"sala "+m(P.room),1)):I("",!0)])]))),128))])):(n(),s("p",kl,"Nie ma już zaplanowanych zajęć."))]),t("section",gl,[t("div",$l,[x[4]||(x[4]=t("h2",{id:"dl-h"},"Terminy",-1)),B(W,{to:"/terminarz",class:"small"},{default:me(()=>[...x[3]||(x[3]=[J("Terminarz",-1)])]),_:1})]),M.value.length?(n(),s("ul",wl,[(n(!0),s(K,null,ee(M.value,P=>(n(),s("li",{key:P.id},[t("div",zl,[t("span",xl,m(P.title),1),t("span",{class:ce(["badge",{warn:C(P.due_at)}])},m(p(Zt)(P.due_at,y.value)),3)]),t("div",Il,[J(m(p(Ze)(P.due_at))+" · "+m(p(Vt)[P.kind]),1),P.course?(n(),s("span",jl," · "+m(P.course.name),1)):I("",!0)])]))),128))])):(n(),s("p",Cl,"Brak nadchodzących terminów."))])]),t("div",El,[t("section",Tl,[x[6]||(x[6]=t("span",{class:"eyebrow"},"Lektury",-1)),x[7]||(x[7]=t("h2",{id:"read-h",style:{margin:"4px 0 8px"}},"Postęp czytania",-1)),t("p",Dl,[t("span",Sl,m(R.value.requiredRead),1),t("span",Ml," z "+m(R.value.requiredTotal)+" obowiązkowych",1)]),t("div",{class:"progress-bar",role:"progressbar","aria-valuenow":A.value,"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Przeczytane lektury obowiązkowe"},[t("span",{style:qe({width:A.value+"%"})},null,4)],8,Bl),t("p",Ll,"Łącznie przeczytano "+m(R.value.read)+" z "+m(p(Ot)(R.value.total,"lektury","lektur","lektur"))+".",1),B(W,{class:"btn small",to:"/lektury"},{default:me(()=>[...x[5]||(x[5]=[J("Lista lektur",-1)])]),_:1})]),t("section",Nl,[x[9]||(x[9]=t("span",{class:"eyebrow"},"Quizy",-1)),x[10]||(x[10]=t("h2",{id:"quiz-h",style:{margin:"4px 0 8px"}},"Sprawdź się",-1)),x[11]||(x[11]=t("p",{class:"muted",style:{margin:"0 0 12px"}},"Fiszki z powtórki: losuj po 5 pytań, oznaczaj Wiem / Nie wiem i wracaj do tych, których nie znasz.",-1)),B(W,{class:"btn primary small",to:"/quizy"},{default:me(()=>[...x[8]||(x[8]=[J("Zacznij quiz",-1)])]),_:1})])])]),_:1},8,["ready","error"])],8,ul),V.value?(n(),ve(nl,{key:1,id:"panel-czat",wide:p(te),visible:L.value,"labelled-by":"tab-czat"},null,8,["wide","visible"])):I("",!0)],2)}}});export{Ul as default}; diff --git a/public/assets/DashboardView-Dg7omPI2.js b/public/assets/DashboardView-Dg7omPI2.js new file mode 100644 index 0000000..beb9867 --- /dev/null +++ b/public/assets/DashboardView-Dg7omPI2.js @@ -0,0 +1,2 @@ +import{y as ze,z as Re,B as Oe,T as _t,d as ie,n,c as s,C as ce,b as t,t as m,p as J,e as p,D as kt,f as I,F as K,E as ee,s as ve,j as me,G as gt,H as qe,i as B,x as v,l as lt,I as $t,J as wt,K as Be,r as $,L as zt,M as xt,R as It,N as it,O as rt,P as jt,Q as Ct,S as Et,U as le,V as Ce,_ as ne,w as Ae,v as We,W as Tt,h as Pe,X as Ee,Y as ut,Z as Y,$ as Ie,a0 as ye,a1 as Fe,o as Xe,a2 as Dt,a3 as St,a4 as je,a5 as Ye,a6 as Le,a7 as Mt,q as Bt,a8 as Ze,a9 as Lt,aa as Nt,ab as Rt,ac as qt,ad as At,u as Wt,ae as Pt,af as Ut,ag as Ot,k as Ht,m as Kt,ah as Ft,ai as Zt,aj as Vt,ak as Qt,al as Xt}from"./index-BhVKyY57.js";import{_ as Yt}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as Gt}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{_ as Je}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-05LZv84e.js";import{e as we,s as et,f as tt}from"./safeText-O-oWGdGq.js";import{n as ct}from"./tabs-nNm7HGNT.js";const Jt=5,Ve=a=>`${a}T12:00:00Z`;function at(a,r){return Re(Ve(r),new Date(Ve(a)))}function ea(a,r,e,o=new Date){let l;if(r){const d=at(a.starts_on,a.ends_on)+1;l={value:`${Math.min(Math.max(at(a.starts_on,ze(o))+1,1),d)}/${d}`,caption:"dzień zjazdu"}}else{const d=Math.max(Re(Ve(a.starts_on),o),0);l={value:String(d),caption:Oe(d,"dzień do zjazdu","dni do zjazdu","dni do zjazdu")}}const i=a.sessions_count,c=o.getTime(),y=e.filter(d=>Date.parse(d.due_at)>=c&&ze(d.due_at)<=a.ends_on).length;return[l,{value:String(i),caption:Oe(i,"zajęcia","zajęcia","zajęć")},{value:String(y),caption:Oe(y,"termin do końca zjazdu","terminy do końca zjazdu","terminów do końca zjazdu")}]}function ta(a,r){return r.filter(e=>{if(e.meeting_id!==null)return e.meeting_id===a.id;const o=ze(e.starts_at);return o>=a.starts_on&&o<=a.ends_on})}const aa=/^https?:\/\//i;function nt(a){const r=[a.is_required?"obowiązkowa":"",a.author??"",a.course?.name??""].filter(o=>o!=="").join(" · "),e=a.url&&aa.test(a.url)?a.url:null;return{key:`r${a.id}`,title:a.title,meta:r,href:e,to:`/lektury#lektura-${a.id}`}}function na(a){const r=[_t[a.type]??"",a.course?.name??""].filter(e=>e!=="").join(" · ");return{key:`m${a.id}`,title:a.title,meta:r,href:null,to:`/materialy/${a.id}`}}function sa(a){return[...a.filter(r=>r.is_required),...a.filter(r=>!r.is_required)]}function oa(a,r,e,o,l=Jt){const i=e.filter(u=>u.meeting_id===a.id),c=o.filter(u=>u.meeting_id===a.id);let y,d;if(i.length||c.length)d=[...sa(i.filter(u=>u.read_at===null)).map(nt),...c.map(na)],y=d.length?"meeting":"done";else{const u=new Set(ta(a,r).map(b=>b.course_id));d=e.filter(b=>b.is_required&&b.read_at===null&&u.has(b.course_id)).map(nt),y=d.length?"courses":"none"}const k=d.slice(l),f=k.length&&k.every(u=>u.key.startsWith("m"))?"/materialy":"/lektury";return{source:y,items:d.slice(0,l),more:k.length,moreTo:f}}const la={class:"hero-main"},ia={class:"eyebrow hero-eyebrow"},ra={id:"hero-h",class:"hero-title"},ua={class:"hero-dates"},ca={key:0,class:"hero-extra muted"},da={class:"hero-stats"},ma={class:"hero-num"},va={class:"hero-cap"},pa={class:"hero-cap"},fa=["aria-valuenow"],ya={class:"hero-timeline"},ba={class:"eyebrow"},ha={key:0,class:"hero-rows"},_a=["href"],ka={key:2,class:"hero-read-meta"},ga={key:0,class:"hero-more"},$a={key:1,class:"muted"},wa={key:1,class:"card hero hero-empty","aria-labelledby":"hero-h"},za={class:"hero-main"},xa=ie({__name:"ZjazdHero",props:{meeting:{},isCurrent:{type:Boolean},schedule:{},deadlines:{},readings:{},materials:{},now:{},checklist:{}},setup(a){const r=a,e=v(()=>$t(r.meeting?.notes)),o=v(()=>wt(r.meeting?.notes)),l=v(()=>r.meeting?ea(r.meeting,r.isCurrent,r.deadlines,r.now):[]),i=v(()=>r.meeting&&r.materials?oa(r.meeting,r.schedule,r.readings,r.materials):null),c=v(()=>({name:"schedule",query:{zjazd:r.meeting?.number}}));return(y,d)=>{const k=lt("router-link");return a.meeting?(n(),s("section",{key:0,class:ce(["card hero",{hl:a.isCurrent}]),"aria-labelledby":"hero-h"},[t("div",la,[t("span",ia,m(a.isCurrent?"Trwa zjazd":"Najbliższy zjazd"),1),t("h2",ra,"Zjazd "+m(a.meeting.number),1),t("p",ua,[J(m(p(kt)(a.meeting.starts_on,a.meeting.ends_on))+" ",1),e.value?(n(),s("span",{key:0,class:ce(["badge",e.value==="online"?"online":"onsite"])},m(e.value),3)):I("",!0)]),o.value?(n(),s("p",ca,m(o.value),1)):I("",!0),t("ul",da,[(n(!0),s(K,null,ee(l.value,f=>(n(),s("li",{key:f.caption},[t("span",ma,m(f.value),1),t("span",va,m(f.caption),1)]))),128))]),a.checklist?(n(),ve(k,{key:1,class:"hero-prep",to:`/checklisty/${a.checklist.id}`,"aria-label":"Przygotowanie do zjazdu"},{default:me(()=>[t("span",pa,"Przygotowanie · "+m(p(gt)(a.checklist.progress)),1),t("span",{class:"progress-bar",role:"progressbar","aria-valuenow":a.checklist.progress.percent,"aria-valuemin":"0","aria-valuemax":"100"},[t("span",{style:qe({width:a.checklist.progress.percent+"%"})},null,4)],8,fa)]),_:1},8,["to"])):I("",!0),B(k,{class:"btn hero-btn",to:c.value},{default:me(()=>[...d[0]||(d[0]=[J("Zobacz plan zjazdu",-1)])]),_:1},8,["to"])]),t("div",ya,[t("span",ba,m(i.value?.source==="courses"?"Czytaj teraz":"Do przeczytania na zjazd"),1),i.value?(n(),s(K,{key:0},[i.value.items.length?(n(),s("ul",ha,[(n(!0),s(K,null,ee(i.value.items,f=>(n(),s("li",{key:f.key},[f.href?(n(),s("a",{key:0,class:"hero-read-title",href:f.href,target:"_blank",rel:"noopener"},m(f.title),9,_a)):(n(),ve(k,{key:1,class:"hero-read-title",to:f.to},{default:me(()=>[J(m(f.title),1)]),_:2},1032,["to"])),f.meta?(n(),s("span",ka,m(f.meta),1)):I("",!0)]))),128)),i.value.more>0?(n(),s("li",ga,[B(k,{to:i.value.moreTo},{default:me(()=>[J("+ "+m(i.value.more)+" więcej",1)]),_:1},8,["to"])])):I("",!0)])):(n(),s("p",$a,m(i.value.source==="done"?"Wszystko na ten zjazd przeczytane.":"Nic do przeczytania na ten zjazd."),1))],64)):I("",!0)])],2)):(n(),s("section",wa,[t("div",za,[d[2]||(d[2]=t("h2",{id:"hero-h",class:"hero-empty-h"},"Brak zaplanowanych zjazdów",-1)),d[3]||(d[3]=t("p",{class:"muted"},"Plan kolejnych zjazdów pojawi się tutaj, gdy zostanie opublikowany.",-1)),B(k,{class:"btn hero-btn",to:"/plan"},{default:me(()=>[...d[1]||(d[1]=[J("Cały plan",-1)])]),_:1})])]))}}});function dt(a){const r=a.indexOf("@");return r>0?a.slice(0,r):a}function $e(a,r=""){const e=a?.name?.trim()??"",o=a?.surname?.trim()??"";if(e&&a?.is_bot)return e;if(e&&o)return`${e} ${o[0]}.`;if(e)return e;if(a?.handle)return`@${a.handle}`;const l=r.trim();return l?dt(l):"Nieznana osoba"}function Ne(a,r=""){return[a?.name?.trim(),a?.surname?.trim()].filter(Boolean).join(" ")||$e(a,r)}function mt(a,r=""){const e=a?.name?.trim()??"",o=a?.surname?.trim()??"";let l="";return e||o?l=e.slice(0,1)+o.slice(0,1):a?.handle?l=a.handle.slice(0,2):l=dt(r.trim()).slice(0,2),(l||"?").toLocaleUpperCase("pl-PL")}function Ia(a){return Math.abs(Math.trunc(a))%8+1}function ja(a,r=new Date){const e=Re(a,r);if(e===0)return"DZIŚ";if(e===-1)return"WCZORAJ";const o=ze(a).slice(0,4);return(o===ze(r).slice(0,4)?Be(a):`${Be(a)} ${o}`).toLocaleUpperCase("pl-PL")}const Ca=300*1e3;function Ea(a,r=new Date){const e=[];let o=null,l="";for(const i of a){const c=ze(i.created_at),y=c!==l;y&&e.push({kind:"day",key:`day-${c}`,label:ja(i.created_at,r)});const d=!y&&o!==null&&o.sender_id===i.sender_id&&Date.parse(i.created_at)-Date.parse(o.created_at)<=Ca;e.push({kind:"message",key:`m-${i.id}`,message:i,followUp:d}),o=i,l=c}return e}function He(a){return a.toLocaleLowerCase("pl-PL").replace(/ł/g,"l").normalize("NFD").replace(/\p{Diacritic}/gu,"")}function Qe(a,r,e){const o=He(r.trim()),l=[];for(const i of a){if(i.id===e)continue;const c=He(i.name??""),y=He(i.surname??"");(!o||c.startsWith(o)||y.startsWith(o)||`${c} ${y}`.startsWith(o))&&l.push(i)}return l.sort((i,c)=>Ne(i).localeCompare(Ne(c),"pl"))}const Ta=10;function Da(a,r){const e=a.slice(0,Ta).map(l=>$e(r.get(l))),o=a.length-e.length;return o>0?`${e.join(", ")} i ${o} innych`:e.join(", ")}const st=' target="_blank" rel="noopener noreferrer nofollow"',vt=/(?"'`]+/gi;function ft(a,r){if(r(a))return{handle:a,rest:""};const e=a.replace(/[.-]+$/,"");return e.length>=2&&e!==a&&r(e)?{handle:e,rest:a.slice(e.length)}:null}function Ba(a){let r=a;for(;;){const e=r.at(-1);if(!e)break;if(`.,;:!?'"]}`.includes(e)){r=r.slice(0,-1);continue}if(e===")"&&(r.match(/\(/g)?.length??0)<(r.match(/\)/g)?.length??0)){r=r.slice(0,-1);continue}break}return{url:r,rest:a.slice(r.length)}}function La(a,r=new Map){if(!a)return"";const e=[],o=c=>c.replace(/\u0000(\d+)\u0000/g,(y,d)=>e[Number(d)]??""),l=c=>`\0${e.push(o(c))-1}\0`;let i=a.replace(/\r\n?/g,` +`).replace(/\u0000/g,"");return i=i.replace(pt,(c,y)=>l(`${we(y)}`)),i=i.replace(Sa,(c,y,d)=>{if(d.includes("\0"))return c;const k=et(d),f=tt(we(y));if(!k)return l(f);const u=/^https?:/i.test(k)?st:"";return l(`${f}`)}),i=i.replace(Ma,c=>{if(c.includes("\0"))return c;const{url:y,rest:d}=Ba(c),k=et(y);return k?l(`${we(y)}`)+d:c}),i=i.replace(vt,(c,y)=>{const d=ft(y,u=>r.has(u));if(!d)return c;const k=r.get(d.handle),f=`@${$e(k)}`;return l(`${we(f)}`)+d.rest}),i=tt(we(i)).replace(/\n/g,"
"),o(i)}function Na(a,r){if(!a||!r)return!1;const e=a.replace(pt," ");for(const o of e.matchAll(vt))if(ft(o[1],l=>l===r))return!0;return!1}function Ra(a,r){const e=a.slice(0,Math.max(0,r)),o=/(^|\s)@([^\s@]*)$/u.exec(e);return o?{start:e.length-o[2].length-1,query:o[2]}:null}function qa(a,r,e){const o=a.slice(0,r.start),l=a.slice(r.end),i=`@${e}`;return l.startsWith(" ")?{text:o+i+l,caret:o.length+i.length+1}:{text:`${o}${i} ${l}`,caret:o.length+i.length+1}}function Ge(a){const r=$(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return r;const e=window.matchMedia(a);r.value=e.matches;const o=l=>{r.value=l.matches};return e.addEventListener("change",o),zt()&&xt(()=>e.removeEventListener("change",o)),r}function Aa(a){return Ge(`(min-width: ${a}px)`)}const Wa={class:"embed-main"},Pa={class:"embed-type"},Ua={class:"embed-title"},Oa={key:0,class:"embed-meta"},Ha={key:1,class:"embed-card static"},Ka={class:"embed-main"},Fa={class:"embed-type"},Za={class:"embed-title"},Va={key:0,class:"embed-meta"},Qa={key:2,class:"embed-card unavailable"},Xa={class:"embed-main"},Ya={class:"embed-type"},Ga={key:3,class:"embed-card loading","aria-busy":"true"},Ja={class:"embed-main"},en={class:"embed-type"},yt=ie({__name:"EmbedCard",props:{embedRef:{},item:{},static:{type:Boolean}},setup(a){const r=a,e=v(()=>it[r.embedRef.type]),o=v(()=>r.item===void 0),l=v(()=>r.item??null),i=v(()=>l.value?rt(l.value):""),c=v(()=>l.value?jt(l.value):""),y=v(()=>l.value?Ct(l.value):null),d=v(()=>l.value?Et(l.value):"");return(k,f)=>l.value&&!a.static?(n(),ve(p(It),{key:0,class:"embed-card",to:d.value},{default:me(()=>[t("span",Wa,[t("span",Pa,m(e.value),1),t("span",Ua,m(i.value),1),c.value?(n(),s("span",Oa,m(c.value),1)):I("",!0)]),y.value?(n(),s("span",{key:0,class:ce(["badge",{warn:y.value.warn}])},m(y.value.text),3)):I("",!0)]),_:1},8,["to"])):l.value?(n(),s("span",Ha,[t("span",Ka,[t("span",Fa,m(e.value),1),t("span",Za,m(i.value),1),c.value?(n(),s("span",Va,m(c.value),1)):I("",!0)]),y.value?(n(),s("span",{key:0,class:ce(["badge",{warn:y.value.warn}])},m(y.value.text),3)):I("",!0)])):o.value?(n(),s("span",Ga,[t("span",Ja,[t("span",en,m(e.value),1),f[2]||(f[2]=t("span",{class:"embed-title"},[t("span",{class:"skeleton embed-skeleton","aria-label":"Wczytywanie"})],-1)),f[3]||(f[3]=t("span",{class:"embed-meta"}," ",-1))])])):(n(),s("div",Qa,[t("span",Xa,[t("span",Ya,m(e.value),1),f[0]||(f[0]=t("span",{class:"embed-title"},"Element niedostępny",-1)),f[1]||(f[1]=t("span",{class:"embed-meta"},"Ten element usunięto albo nie masz do niego dostępu.",-1))])]))}}),tn=["aria-labelledby"],an={class:"chat-dialog-head"},nn=["id"],sn={class:"embed-tabs",role:"tablist","aria-label":"Rodzaj elementu"},on=["id","aria-selected","aria-controls","tabindex","onClick","onKeydown"],ln=["id","aria-labelledby"],rn={class:"field"},un=["for"],cn=["id","placeholder"],dn={class:"picker-results"},mn={key:0,class:"embed-searching",role:"status"},vn={key:1,class:"chat-skeletons picker-skeletons","aria-busy":"true","aria-label":"Szukam…"},pn={key:2,class:"notice error",role:"alert"},fn={key:3,class:"empty"},yn={key:4,class:"empty"},bn={key:5,class:"picker-rows"},hn=["aria-disabled","onClick"],_n={key:0,class:"embed-staged"},kn=250,gn=ie({__name:"EmbedPicker",props:{staged:{}},emits:["pick"],setup(a,{expose:r,emit:e}){const o=a,l=e,i=[{type:"deadline",label:"Terminy",placeholder:"Szukaj terminu…"},{type:"class",label:"Zajęcia",placeholder:"Szukaj zajęć…"},{type:"reading",label:"Lektury",placeholder:"Szukaj lektury…"}],c=Ee(),y=$(null),d=$(null),k=$([]),f=$("deadline"),u=$(""),b=$(null),j=$("idle"),O=$("");let F=0,E=null,M=null,C=!1;const R=v(()=>i.find(D=>D.type===f.value)??i[0]),A=v(()=>new Set(o.staged));async function q(){E&&clearTimeout(E),E=null;const D=++F,U=f.value,_=u.value.trim();j.value="loading";try{const x=await ut.embeds(U,_);if(D!==F)return;b.value=Array.isArray(x)?x.filter(W=>W&&W.type===U):[],O.value=_,j.value="ready"}catch{if(D!==F)return;j.value="error"}}function se(){E&&clearTimeout(E),E=setTimeout(()=>{q()},kn)}le(u,se);function Q(D,U=!1){f.value!==D&&(f.value=D,b.value=null,q()),U&&Y(()=>k.value[i.findIndex(_=>_.type===D)]?.focus())}function te(D,U){let _=-1;D.key==="ArrowRight"?_=(U+1)%i.length:D.key==="ArrowLeft"?_=(U-1+i.length)%i.length:D.key==="Home"?_=0:D.key==="End"&&(_=i.length-1),!(_<0)&&(D.preventDefault(),Q(i[_].type,!0))}function V(){M=document.activeElement instanceof HTMLElement?document.activeElement:null,C=!1,u.value="",b.value=null,y.value?.showModal(),q(),Y(()=>d.value?.focus())}function ae(){y.value?.close()}function de(){E&&clearTimeout(E),E=null,F++,C||M?.focus(),M=null}function L(D){D.target===y.value&&ae()}function S(D){return A.value.has(Ie(D))}function N(D){S(D)||(C=!0,ae(),l("pick",D))}return Ce(()=>{E&&clearTimeout(E)}),r({open:V}),(D,U)=>(n(),s("dialog",{ref_key:"dialog",ref:y,class:"chat-dialog embed-picker","aria-labelledby":`embed-h-${p(c)}`,onClose:de,onClick:L},[t("div",an,[t("h2",{id:`embed-h-${p(c)}`,class:"chat-dialog-title"},"Podepnij do wiadomości",8,nn),t("button",{class:"icon-btn",type:"button","aria-label":"Zamknij",onClick:ae},[B(ne,{name:"close"})])]),t("div",sn,[(n(),s(K,null,ee(i,(_,x)=>t("button",{id:`embed-tab-${p(c)}-${_.type}`,key:_.type,ref_for:!0,ref_key:"tabEls",ref:k,class:"embed-tab",type:"button",role:"tab","aria-selected":f.value===_.type?"true":"false","aria-controls":`embed-panel-${p(c)}`,tabindex:f.value===_.type?0:-1,onClick:W=>Q(_.type),onKeydown:W=>te(W,x)},m(_.label),41,on)),64))]),t("div",{id:`embed-panel-${p(c)}`,class:"embed-panel",role:"tabpanel","aria-labelledby":`embed-tab-${p(c)}-${f.value}`},[t("div",rn,[t("label",{for:`embed-q-${p(c)}`},"Szukaj",8,un),Ae(t("input",{id:`embed-q-${p(c)}`,ref_key:"search",ref:d,"onUpdate:modelValue":U[0]||(U[0]=_=>u.value=_),type:"text",autocomplete:"off",placeholder:R.value.placeholder,onKeydown:U[1]||(U[1]=Tt(Pe(()=>{},["prevent"]),["enter"]))},null,40,cn),[[We,u.value]])]),t("div",dn,[j.value==="loading"&&b.value?(n(),s("p",mn,"Szukam…")):I("",!0),j.value==="loading"&&!b.value?(n(),s("div",vn,[...U[2]||(U[2]=[t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1)])])):j.value==="error"?(n(),s("div",pn,[U[3]||(U[3]=J(" Nie udało się wczytać wyników. ",-1)),t("button",{class:"linkish",type:"button",onClick:q},"Spróbuj ponownie")])):b.value&&!b.value.length&&O.value?(n(),s("p",fn,"Nic nie znaleziono dla „"+m(O.value)+"”.",1)):b.value&&!b.value.length?(n(),s("p",yn,"Nic tu jeszcze nie ma.")):b.value?(n(),s("ul",bn,[(n(!0),s(K,null,ee(b.value,_=>(n(),s("li",{key:`${_.type}:${_.id}`},[t("button",{class:"picker-row embed-pick",type:"button","aria-disabled":S(_)?"true":void 0,onClick:x=>N(_)},[B(yt,{"embed-ref":_,item:_,static:""},null,8,["embed-ref","item"]),S(_)?(n(),s("span",_n,"podpięte")):I("",!0)],8,hn)]))),128))])):I("",!0)])],8,ln)],40,tn))}}),Me=ie({__name:"Avatar",props:{userId:{},member:{default:null},fallback:{default:""},size:{default:32},me:{type:Boolean,default:!1}},setup(a){const r=a,e=v(()=>mt(r.member,r.fallback)),o=v(()=>r.me?void 0:{background:`var(--av-${Ia(r.userId)})`});return(l,i)=>(n(),s("span",{class:ce(["avatar",[`s${a.size}`,{me:a.me}]]),style:qe(o.value),"aria-hidden":"true"},m(e.value),7))}}),$n=["id"],wn={key:0,class:"mention-empty",role:"option","aria-disabled":"true","aria-selected":"false"},zn=["id","aria-selected","onMousedown","onMousemove"],xn={class:"mention-name"},In={class:"mention-handle"},jn=ie({__name:"MentionPopup",props:{id:{},options:{},active:{},query:{}},emits:["pick","hover"],setup(a,{emit:r}){const e=r;function o(l,i){return`${l}-opt-${i}`}return(l,i)=>(n(),s("ul",{id:a.id,class:"mention-pop",role:"listbox","aria-label":"Wspomnij osobę"},[a.options.length?I("",!0):(n(),s("li",wn,"Brak osób pasujących do „"+m(a.query)+"”.",1)),(n(!0),s(K,null,ee(a.options,(c,y)=>(n(),s("li",{id:o(a.id,y),key:c.id,class:ce(["mention-option",{active:y===a.active}]),role:"option","aria-selected":y===a.active?"true":"false",onMousedown:Pe(d=>e("pick",c),["prevent"]),onMousemove:d=>y!==a.active&&e("hover",y)},[B(Me,{"user-id":c.id,member:c,size:24},null,8,["user-id","member"]),t("span",xn,m(p(Ne)(c)),1),t("span",In,"@"+m(c.handle),1)],42,zn))),128))],8,$n))}}),Cn={key:0,class:"staging","aria-label":"Załączniki i podpięcia"},En=["title"],Tn={key:0,class:"staging-size"},Dn=["onClick"],Sn={key:2,class:"staging-size"},Mn=["aria-label","disabled","onClick"],Bn={class:"staging-type"},Ln=["title"],Nn=["aria-label","disabled","onClick"],ot=ie({__name:"StagingChips",props:{conversationId:{}},emits:["removed"],setup(a,{emit:r}){const e=a,o=r,l=ye(),i=v(()=>l.draft(e.conversationId));function c(k){const f=l.embedItem(k);return f===void 0?"Wczytywanie…":f===null?"Element niedostępny":rt(f)}function y(k){l.unstageEmbed(e.conversationId,k),o("removed")}function d(k){l.removeFile(e.conversationId,k.localId),o("removed")}return(k,f)=>i.value.files.length||i.value.embeds.length?(n(),s("ul",Cn,[(n(!0),s(K,null,ee(i.value.files,u=>(n(),s("li",{key:`file-${u.localId}`,class:ce(["staging-chip file",u.state])},[t("span",{class:"staging-name file-name",title:u.name},m(u.name),9,En),u.state==="uploading"?(n(),s("span",Tn,"Wysyłanie… "+m(u.progress)+"%",1)):u.state==="failed"?(n(),s(K,{key:1},[f[0]||(f[0]=t("span",{class:"staging-failed"},"Nie wysłano",-1)),t("button",{class:"linkish",type:"button",onClick:b=>p(l).retryUpload(a.conversationId,u.localId)},"Spróbuj ponownie",8,Dn)],64)):(n(),s("span",Sn,m(p(Fe)(u.size)),1)),t("button",{class:"staging-remove",type:"button","aria-label":`Usuń załącznik ${u.name}`,disabled:i.value.sending,onClick:b=>d(u)},[B(ne,{name:"close"})],8,Mn),u.state==="uploading"?(n(),s("span",{key:3,class:"staging-progress",style:qe({width:`${u.progress}%`}),"aria-hidden":"true"},null,4)):I("",!0)],2))),128)),(n(!0),s(K,null,ee(i.value.embeds,u=>(n(),s("li",{key:p(Ie)(u),class:"staging-chip embed"},[t("span",Bn,m(p(it)[u.type]),1),t("span",{class:"staging-name embed-name",title:c(u)},m(c(u)),9,Ln),t("button",{class:"staging-remove",type:"button","aria-label":`Usuń podpięcie ${c(u)}`,disabled:i.value.sending,onClick:b=>y(u)},[B(ne,{name:"close"})],8,Nn)]))),128))])):I("",!0)}}),Rn={key:0,class:"error-text",role:"alert"},qn={class:"composer-row"},An={key:0,class:"composer-add"},Wn=["aria-expanded","disabled"],Pn=["disabled","title","onClick"],Un={class:"composer-field"},On=["rows","placeholder","readonly","aria-expanded","aria-activedescendant"],Hn={key:2,class:"composer-tools"},Kn=["disabled"],Fn=["title","disabled"],Zn=["disabled"],Vn=["aria-busy","disabled"],Qn=["aria-busy","disabled"],Ke="Możesz podpiąć najwyżej 3 elementy do jednej wiadomości.",Xn=24,Yn=6,Gn=ie({__name:"ChatComposer",props:{conversationId:{},label:{},placeholder:{}},emits:["sent"],setup(a,{expose:r,emit:e}){const o=a,l=e,i=ye(),c=Ee(),y=`composer-${c}`,d=`composer-hint-${c}`,k=`mentions-${c}`,f=$(null),u=Ge("(min-width: 1100px) and (pointer: fine)"),b=v(()=>i.draft(o.conversationId)),j=$(""),O=v(()=>b.value.error||j.value),F=v({get:()=>b.value.text,set:h=>{j.value="",i.setDraftText(o.conversationId,h),h.trim()&&i.emitTyping(o.conversationId,h)}}),E=v(()=>i.canSend(o.conversationId)),M=$(null);function C(){b.value.sending||M.value?.click()}function R(){const h=M.value;h?.files?.length&&(j.value="",i.uploadFiles(o.conversationId,[...h.files]),h.value="",Y(Te))}const A=`composer-menu-${c}`,q=$(!1),se=$(null),Q=$([]);function te(){q.value=!0,Y(()=>Q.value[0]?.focus())}function V(h=!0){q.value&&(q.value=!1,h&&Y(()=>se.value?.focus()))}function ae(h){const z=Q.value.filter(oe=>!oe.disabled),H=z.indexOf(document.activeElement);if(h.key==="Escape")h.preventDefault(),h.stopPropagation(),V();else if(h.key==="ArrowDown"||h.key==="ArrowUp"){if(h.preventDefault(),!z.length)return;const oe=h.key==="ArrowDown"?(H+1)%z.length:(H-1+z.length)%z.length;z[oe]?.focus()}else h.key==="Home"||h.key==="End"?(h.preventDefault(),z[h.key==="Home"?0:z.length-1]?.focus()):h.key==="Tab"&&V(!1)}function de(){V(!1),C()}function L(){V(!1),se.value?.focus(),W()}const S=v(()=>[{label:"Dołącz plik",icon:"paperclip",disabled:!1,title:void 0,run:de},{label:"Podepnij termin, zajęcia lub lekturę",icon:"calendar",disabled:_.value,title:_.value?Ke:void 0,run:L}]);function N(h){const z=h.target;z instanceof Node&&(se.value?.contains(z)||Q.value.some(H=>H.contains(z)))||V(!1)}le(q,h=>{h?document.addEventListener("pointerdown",N,!0):document.removeEventListener("pointerdown",N,!0)}),le(u,()=>V(!1)),Ce(()=>document.removeEventListener("pointerdown",N,!0));const D=$(null),U=v(()=>b.value.embeds.map(Ie)),_=v(()=>b.value.embeds.length>=i.maxEmbeds),x=v(()=>_.value?Ke:"Podepnij termin, zajęcia lub lekturę");function W(){_.value||b.value.sending||D.value?.open()}function P(h){j.value="",i.stageEmbed(o.conversationId,{type:h.type,id:h.id},h),Y(Te)}function re(h){if(b.value.sending)return;const z=h.clipboardData?.getData("text/plain")??"";if(!z)return;const H=Dt(z,window.location.origin);if(!H.refs.length)return;const oe=new Set(U.value);let De=0,xe=0;for(const Ue of H.refs)oe.has(Ie(Ue))||(i.stageEmbed(o.conversationId,Ue)?(oe.add(Ie(Ue)),De++):xe++);H.insertText===""&&(De>0||xe===0)&&h.preventDefault(),xe>0&&setTimeout(()=>j.value=Ke)}function be(){const h=f.value;if(!h)return;h.style.height="auto";const z=getComputedStyle(h),H=parseFloat(z.paddingTop)+parseFloat(z.paddingBottom),oe=Xn*(u.value?8:4)+H;h.style.height=`${Math.min(h.scrollHeight,oe)}px`,h.style.overflowY=h.scrollHeight>oe?"auto":"hidden"}le([F,u],()=>{Y(be)}),Xe(be);const X=$(null),ue=$(0);let pe=null;const he=v(()=>X.value?Qe(i.members.values(),X.value.query,i.userId).slice(0,Yn):[]),g=v(()=>X.value!==null&&i.membersState==="ready"),w=v(()=>g.value&&he.value.length?`${k}-opt-${ue.value}`:void 0);function Z(){const h=f.value;if(!h)return;const z=h.selectionStart===h.selectionEnd?Ra(h.value,h.selectionStart??0):null;if(!z){pe=null,X.value=null;return}z.start!==pe&&((!X.value||X.value.start!==z.start||X.value.query!==z.query)&&(ue.value=0),X.value=z)}function _e(){X.value&&(pe=X.value.start),X.value=null}function T(h){const z=f.value,H=X.value;if(!z||!H||!h.handle)return;const oe=qa(z.value,{start:H.start,end:z.selectionStart??H.start+H.query.length+1},h.handle);F.value=oe.text,X.value=null,pe=null,Y(()=>{z.focus(),z.setSelectionRange(oe.caret,oe.caret)})}function fe(){const h=f.value;if(!h)return;const z=h.selectionStart??h.value.length,H=h.selectionEnd??z,oe=h.value.slice(0,z),De=oe===""||/\s$/.test(oe)?"@":" @";F.value=oe+De+h.value.slice(H),i.loadMembers(),Y(()=>{const xe=z+De.length;h.focus(),h.setSelectionRange(xe,xe),pe=null,Z()})}function G(h){if(!g.value)return!1;const z=he.value.length;switch(h.key){case"ArrowDown":return z&&(ue.value=(ue.value+1)%z),!0;case"ArrowUp":return z&&(ue.value=(ue.value-1+z)%z),!0;case"Enter":return h.shiftKey&&!z?!1:(z?T(he.value[ue.value]):_e(),!0);case"Tab":return z?(T(he.value[ue.value]),!0):(_e(),!1);case"Escape":return h.stopPropagation(),_e(),!0;default:return!1}}le(()=>o.conversationId,()=>{X.value=null,pe=null});async function ke(){E.value&&await i.send(o.conversationId)&&l("sent")}function bt(h){if(!h.isComposing){if(G(h)){h.preventDefault();return}h.key!=="Enter"||h.shiftKey||(h.preventDefault(),ke())}}function ht(h){(["ArrowLeft","ArrowRight","Home","End"].includes(h.key)||!g.value&&["ArrowUp","ArrowDown"].includes(h.key))&&Z()}function Te(){f.value?.focus()}return r({focus:Te}),(h,z)=>(n(),s("form",{class:ce(["composer",{compact:!p(u)}]),onSubmit:Pe(ke,["prevent"])},[t("label",{class:ce(p(u)?"composer-label":"sr-only"),for:y},m(a.label),3),O.value?(n(),s("p",Rn,m(O.value),1)):I("",!0),p(u)?I("",!0):(n(),ve(ot,{key:1,"conversation-id":a.conversationId,onRemoved:Te},null,8,["conversation-id"])),t("div",qn,[p(u)?I("",!0):(n(),s("div",An,[t("button",{ref_key:"menuButton",ref:se,class:"composer-plus",type:"button","aria-label":"Dodaj do wiadomości","aria-haspopup":"menu","aria-expanded":q.value?"true":"false","aria-controls":A,disabled:b.value.sending,onClick:z[0]||(z[0]=H=>q.value?V():te())},[B(ne,{name:"plus"})],8,Wn),q.value?(n(),s("div",{key:0,id:A,class:"composer-menu",role:"menu","aria-label":"Dodaj do wiadomości",onKeydown:ae},[(n(!0),s(K,null,ee(S.value,H=>(n(),s("button",{key:H.label,ref_for:!0,ref_key:"menuItems",ref:Q,class:"composer-menu-item",type:"button",role:"menuitem",tabindex:"-1",disabled:H.disabled,title:H.title,onClick:H.run},[B(ne,{name:H.icon},null,8,["name"]),J(m(H.label),1)],8,Pn))),128))],32)):I("",!0)])),t("div",Un,[p(u)?(n(),ve(ot,{key:0,"conversation-id":a.conversationId,onRemoved:Te},null,8,["conversation-id"])):I("",!0),g.value&&X.value?(n(),ve(jn,{key:1,id:k,options:he.value,active:ue.value,query:X.value.query,onPick:T,onHover:z[1]||(z[1]=H=>ue.value=H)},null,8,["options","active","query"])):I("",!0),Ae(t("textarea",{id:y,ref_key:"input",ref:f,"onUpdate:modelValue":z[2]||(z[2]=H=>F.value=H),rows:p(u)?3:1,placeholder:p(u)?"Napisz wiadomość…":a.placeholder,enterkeyhint:"send",readonly:b.value.sending,"aria-describedby":d,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":k,"aria-expanded":g.value?"true":"false","aria-activedescendant":w.value,onKeydown:bt,onKeyup:ht,onInput:Z,onClick:Z,onPaste:re,onBlur:z[3]||(z[3]=H=>X.value=null)},null,40,On),[[We,F.value]]),p(u)?(n(),s("div",Hn,[t("button",{class:"composer-tool",type:"button","aria-label":"Dołącz plik",title:"Dołącz plik",disabled:b.value.sending,onClick:C},[B(ne,{name:"paperclip"})],8,Kn),t("button",{class:"composer-tool",type:"button","aria-label":"Podepnij termin, zajęcia lub lekturę",title:x.value,disabled:b.value.sending||_.value,onClick:W},[B(ne,{name:"calendar"})],8,Fn),t("button",{class:"composer-tool",type:"button","aria-label":"Wspomnij osobę",title:"Wspomnij osobę",disabled:b.value.sending,onClick:fe},[B(ne,{name:"at"})],8,Zn),z[5]||(z[5]=t("span",{class:"composer-tools-gap"},null,-1)),t("button",{class:"btn primary small composer-send",type:"submit","aria-label":"Wyślij wiadomość","aria-busy":b.value.sending?"true":void 0,disabled:!E.value},[z[4]||(z[4]=J(" Wyślij",-1)),B(ne,{name:"arrow-right"})],8,Vn)])):I("",!0)]),p(u)?I("",!0):(n(),s("button",{key:1,class:"composer-send round",type:"submit","aria-label":"Wyślij wiadomość","aria-busy":b.value.sending?"true":void 0,disabled:!E.value},[B(ne,{name:"arrow-up"})],8,Qn))]),t("span",{id:d,class:"sr-only"},"Enter wysyła, Shift+Enter dodaje nową linię."),t("input",{ref_key:"fileInput",ref:M,class:"sr-only",type:"file",multiple:"",tabindex:"-1","aria-hidden":"true",onChange:R},null,544),B(gn,{ref_key:"picker",ref:D,staged:U.value,onPick:P},null,8,["staged"])],34))}}),Jn={class:"chat-head"},es={class:"chat-head-row"},ts={class:"chat-head-name"},as={class:"eyebrow"},ns={class:"chat-title"},ss={class:"chat-presence","aria-hidden":"true"},os={key:0,class:"presence-stack"},ls={key:1,class:"presence-text"},is={class:"presence-text"},rs={class:"chat-tabs",role:"tablist","aria-label":"Rozmowy"},us=["id","aria-selected","aria-controls","tabindex","onClick","onKeydown"],cs={key:0,class:"mention-badge"},ds={class:"sr-only"},ms={key:1,class:"unread-badge"},vs={"aria-hidden":"true"},ps={class:"sr-only"},fs={key:0,class:"chat-strip"},ys=ie({__name:"ChatHeader",props:{view:{},dmName:{},dmUserId:{},idBase:{}},emits:["select","back"],setup(a,{emit:r}){const e=a,o=r,l=[{key:"general",label:"# ogólny"},{key:"dms",label:"Wiadomości"}],i=E=>`${e.idBase}-tab-${E}`,c=ye(),y=v(()=>{switch(c.connection){case"connecting":return"Łączenie z czatem…";case"reconnecting":return"Ponowne łączenie…";case"unavailable":return"Czat bez aktualizacji na żywo — odświeżam co 15 s.";default:return""}}),d=v(()=>({general:{unread:c.generalId===null?0:c.unreadOf(c.generalId),mentions:c.totalMentions},dms:{unread:c.dmUnread,mentions:0}})),k=v(()=>c.othersOnline.slice(0,3)),f=v(()=>Math.max(0,c.othersOnline.length-3)),u=v(()=>e.view==="dm"&&e.dmUserId!=null&&c.isOnline(e.dmUserId)),b=v(()=>e.view==="general"?"general":"dms"),j=v(()=>e.view==="general"?"Czat roku":e.view==="dms"?"Wiadomości":"Wiadomość prywatna"),O=v(()=>e.view==="general"?"# ogólny":e.view==="dms"?"Wiadomości":e.dmName??"");function F(E,M){const C=ct(E.key,M,l.length);C!==null&&(E.preventDefault(),o("select",l[C].key),Y(()=>document.getElementById(i(l[C].key))?.focus()))}return(E,M)=>(n(),s(K,null,[t("header",Jn,[t("div",es,[a.view==="dm"?(n(),s("button",{key:0,class:"icon-btn chat-back",type:"button","aria-label":"Wróć do listy wiadomości",onClick:M[0]||(M[0]=C=>o("back"))},[B(ne,{name:"arrow-left"})])):I("",!0),t("div",ts,[t("span",as,m(j.value),1),t("h2",ns,m(O.value),1)]),t("div",ss,[a.view==="general"&&p(c).presenceAvailable?(n(),s(K,{key:0},[k.value.length?(n(),s("span",os,[(n(!0),s(K,null,ee(k.value,C=>(n(),ve(Me,{key:C,"user-id":C,member:p(c).members.get(C),size:24},null,8,["user-id","member"]))),128))])):I("",!0),f.value?(n(),s("span",ls,"+"+m(f.value),1)):I("",!0),M[1]||(M[1]=t("span",{class:"presence-dot"},null,-1)),t("span",is,m(p(c).onlineCount>1?`${p(c).onlineCount} online`:"tylko Ty"),1)],64)):u.value?(n(),s(K,{key:1},[M[2]||(M[2]=t("span",{class:"presence-dot"},null,-1)),M[3]||(M[3]=t("span",{class:"presence-text"},"online",-1))],64)):I("",!0)])]),t("div",rs,[(n(),s(K,null,ee(l,(C,R)=>t("button",{id:i(C.key),key:C.key,class:"chat-tab",type:"button",role:"tab","aria-selected":b.value===C.key,"aria-controls":`${a.idBase}-body`,tabindex:b.value===C.key?0:-1,onClick:A=>o("select",C.key),onKeydown:A=>F(A,R)},[J(m(C.label)+" ",1),d.value[C.key].mentions>0?(n(),s("span",cs,[M[4]||(M[4]=t("span",{"aria-hidden":"true"},"@",-1)),t("span",ds,", "+m(p(St)(d.value[C.key].mentions)),1)])):I("",!0),p(je)(d.value[C.key].unread)?(n(),s("span",ms,[t("span",vs,m(p(je)(d.value[C.key].unread)),1),t("span",ps,", "+m(p(Ye)(d.value[C.key].unread)),1)])):I("",!0)],40,us)),64))])]),y.value?(n(),s("p",fs,m(y.value),1)):I("",!0)],64))}}),bs={class:"dm-list"},hs={class:"dm-new"},_s={key:0,class:"chat-skeletons dm-skeletons","aria-busy":"true","aria-label":"Wczytywanie rozmów"},ks={key:1,class:"notice error dm-notice",role:"alert"},gs={key:2,class:"empty chat-empty dm-empty"},$s={key:3,class:"dm-rows"},ws=["onClick"],zs={class:"dm-text"},xs={class:"dm-name"},Is={class:"dm-preview"},js={class:"dm-meta"},Cs=["datetime"],Es={key:1,class:"unread-badge"},Ts={"aria-hidden":"true"},Ds={class:"sr-only"},Ss=ie({__name:"DmList",emits:["compose"],setup(a,{emit:r}){const e=r,o=ye(),l=v(()=>o.dmRows),i=v(()=>!l.value.length&&(o.bootstrapState==="loading"||o.bootstrapState==="idle")),c=v(()=>!l.value.length&&o.bootstrapState==="error");function y(f){return $e(o.members.get(f.other_user_id))}function d(f){const u=f.last_message;return u?u.sender_id===o.userId?`Ty: ${u.content}`:u.content:""}function k(f){const u=f.last_message?.created_at;return u?ze(u)===ze(new Date)?Le(u):Mt(u):""}return(f,u)=>(n(),s("div",bs,[t("div",hs,[t("button",{class:"btn small",type:"button",onClick:u[0]||(u[0]=b=>e("compose"))},[B(ne,{name:"plus"}),u[2]||(u[2]=J("Nowa wiadomość",-1))])]),i.value?(n(),s("div",_s,[...u[3]||(u[3]=[t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1)])])):c.value?(n(),s("div",ks,[u[4]||(u[4]=J(" Nie udało się wczytać rozmów. ",-1)),t("button",{class:"linkish",type:"button",onClick:u[1]||(u[1]=b=>p(o).bootstrap())},"Spróbuj ponownie")])):l.value.length?(n(),s("ul",$s,[(n(!0),s(K,null,ee(l.value,b=>(n(),s("li",{key:b.id},[t("button",{class:ce(["dm-row",{unread:b.unread>0}]),type:"button",onClick:j=>p(o).openDm(b.id)},[B(Me,{"user-id":b.other_user_id,member:p(o).members.get(b.other_user_id)},null,8,["user-id","member"]),t("span",zs,[t("span",xs,m(y(b)),1),t("span",Is,m(d(b)),1)]),t("span",js,[b.last_message?(n(),s("time",{key:0,datetime:b.last_message.created_at},m(k(b)),9,Cs)):I("",!0),p(je)(b.unread)?(n(),s("span",Es,[t("span",Ts,m(p(je)(b.unread)),1),t("span",Ds,", "+m(p(Ye)(b.unread)),1)])):I("",!0)])],10,ws)]))),128))])):(n(),s("div",gs,[...u[5]||(u[5]=[t("p",{class:"chat-empty-h"},"Nie masz jeszcze wiadomości prywatnych",-1),t("p",null,"Kliknij „Nowa wiadomość”, wybierz osobę i napisz do niej.",-1)])]))]))}}),Ms=["aria-labelledby"],Bs={class:"chat-dialog-head"},Ls=["id"],Ns={class:"field"},Rs=["for"],qs=["id"],As={key:0,class:"error-text",role:"alert"},Ws={class:"picker-results"},Ps={key:0,class:"chat-skeletons picker-skeletons","aria-busy":"true","aria-label":"Wczytywanie osób"},Us={key:1,class:"notice error",role:"alert"},Os={key:2,class:"empty"},Hs={key:3,class:"empty"},Ks={key:4,class:"picker-rows"},Fs=["disabled","onClick"],Zs={class:"picker-name"},Vs=ie({__name:"MemberPicker",emits:["started"],setup(a,{expose:r,emit:e}){const o=e,l=ye(),i=Ee(),c=$(null),y=$(null),d=$(""),k=$(!1);let f=null,u=!1;const b=v(()=>Qe(l.members.values(),"",l.userId)),j=v(()=>Qe(l.members.values(),d.value,l.userId));function O(){f=document.activeElement instanceof HTMLElement?document.activeElement:null,u=!1,d.value="",l.dmError="",l.loadMembers(),c.value?.showModal(),Y(()=>y.value?.focus())}function F(){c.value?.close()}function E(){u||f?.focus(),f=null}function M(R){R.target===c.value&&F()}async function C(R){if(!k.value){k.value=!0;try{const A=await l.startDm(R);if(A===null)return;u=!0,F(),o("started",A)}finally{k.value=!1}}}return r({open:O}),(R,A)=>(n(),s("dialog",{ref_key:"dialog",ref:c,class:"chat-dialog","aria-labelledby":`picker-h-${p(i)}`,onClose:E,onClick:M},[t("div",Bs,[t("h2",{id:`picker-h-${p(i)}`,class:"chat-dialog-title"},"Nowa wiadomość",8,Ls),t("button",{class:"icon-btn",type:"button","aria-label":"Zamknij",onClick:F},[B(ne,{name:"close"})])]),t("div",Ns,[t("label",{for:`picker-q-${p(i)}`},"Do kogo?",8,Rs),Ae(t("input",{id:`picker-q-${p(i)}`,ref_key:"search",ref:y,"onUpdate:modelValue":A[0]||(A[0]=q=>d.value=q),type:"text",autocomplete:"off",placeholder:"Wpisz imię lub nazwisko…"},null,8,qs),[[We,d.value]])]),p(l).dmError?(n(),s("p",As,m(p(l).dmError),1)):I("",!0),t("div",Ws,[p(l).membersState==="loading"&&!p(l).members.size?(n(),s("div",Ps,[...A[2]||(A[2]=[t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1)])])):p(l).membersState==="error"&&!p(l).members.size?(n(),s("div",Us,[A[3]||(A[3]=J(" Nie udało się wczytać listy osób. ",-1)),t("button",{class:"linkish",type:"button",onClick:A[1]||(A[1]=q=>p(l).loadMembers(!0))},"Spróbuj ponownie")])):b.value.length?j.value.length?(n(),s("ul",Ks,[(n(!0),s(K,null,ee(j.value,q=>(n(),s("li",{key:q.id},[t("button",{class:"picker-row",type:"button",disabled:k.value,onClick:se=>C(q.id)},[B(Me,{"user-id":q.id,member:q,size:24},null,8,["user-id","member"]),t("span",Zs,m(p(Ne)(q)),1)],8,Fs)]))),128))])):(n(),s("p",Hs,"Nikt nie pasuje do „"+m(d.value.trim())+"”.",1)):(n(),s("p",Os,"Na czacie nie ma jeszcze innych osób."))])],40,Ms))}}),Qs=["aria-pressed","aria-label","title","onClick"],Xs={class:"reaction-emoji","aria-hidden":"true"},Ys={class:"reaction-count","aria-hidden":"true"},Gs={class:"reaction-add-wrap"},Js=["aria-expanded","aria-controls","disabled"],eo=["aria-label","tabindex","onClick","onFocus"],ge=6,to=ie({__name:"ReactionBar",props:{message:{}},emits:["closed"],setup(a,{expose:r,emit:e}){const o=a,l=e,i=ye(),y=`reactions-${Ee()}`,d=$(null),k=$(null),f=$(null),u=$(!1),b=$(!1),j=$(0);let O=null;const F=v(()=>(o.message.reactions??[]).filter(L=>L.count>0).map(L=>{const S=i.userId!==null&&L.user_ids.includes(i.userId);return{key:L.key,count:L.count,mine:S,label:`${L.key} ${L.count}. ${S?"Cofnij swoją reakcję":"Dodaj swoją reakcję"}`,title:Da(L.user_ids,i.members)}})),E=v(()=>i.allowedReactions??[]),M=v(()=>E.value.length>0);function C(L){i.toggleReaction(o.message,L)}function R(){const L=d.value,S=L?.closest(".chat-list");if(!L||!S){b.value=!1;return}const N=Math.ceil(E.value.length/ge),D=N*36+(N-1)*4+16+2+8;b.value=L.getBoundingClientRect().top-S.getBoundingClientRect().topA()[j.value]?.focus())}function se(L){if(!M.value){i.loadReactions();return}O=L??k.value,j.value=0,R(),u.value=!0,document.addEventListener("pointerdown",te,!0),q()}function Q(L=!0){if(!u.value)return;u.value=!1,document.removeEventListener("pointerdown",te,!0);const S=O;O=null,L&&S?.focus(),l("closed")}function te(L){const S=L.target;if(S&&(f.value?.contains(S)||k.value?.contains(S)))return;const N=O;Q(!1),setTimeout(()=>{const D=document.activeElement;(!D||D===document.body||f.value?.contains(D))&&N?.focus()})}function V(L){C(L),Q()}function ae(){u.value?Q():se(k.value)}function de(L){const S=E.value.length;if(!S)return;let N=j.value;switch(L.key){case"Escape":L.preventDefault(),L.stopPropagation(),Q();return;case"ArrowRight":N=(j.value+1)%S;break;case"ArrowLeft":N=(j.value-1+S)%S;break;case"ArrowDown":N=j.value+ge=0?j.value-ge:Math.min(S-1,j.value%ge+Math.floor((S-1)/ge)*ge);break;case"Home":N=0;break;case"End":N=S-1;break;case"Tab":Q(!1);return;default:return}L.preventDefault(),j.value=N,q()}return Ce(()=>document.removeEventListener("pointerdown",te,!0)),r({openPicker:se}),(L,S)=>(n(),s("div",{ref_key:"root",ref:d,class:"reactions"},[(n(!0),s(K,null,ee(F.value,N=>(n(),s("button",{key:N.key,class:"reaction-chip",type:"button","aria-pressed":N.mine?"true":"false","aria-label":N.label,title:N.title,onClick:D=>C(N.key)},[t("span",Xs,m(N.key),1),t("span",Ys,m(N.count),1)],8,Qs))),128)),t("span",Gs,[t("button",{ref_key:"addBtn",ref:k,class:"reaction-add",type:"button","aria-label":"Dodaj reakcję","aria-haspopup":"true","aria-expanded":u.value?"true":"false","aria-controls":u.value?y:void 0,disabled:!M.value,onClick:ae},[B(ne,{name:"smile"})],8,Js),u.value?(n(),s("div",{key:0,id:y,ref_key:"pop",ref:f,class:ce(["reaction-pop",{below:b.value}]),role:"group","aria-label":"Dodaj reakcję",onKeydown:de},[(n(!0),s(K,null,ee(E.value,(N,D)=>(n(),s("button",{key:N,class:"reaction-pick",type:"button","aria-label":N,tabindex:D===j.value?0:-1,onClick:U=>V(N),onFocus:U=>j.value=D},m(N),41,eo))),128))],34)):I("",!0)])],512))}}),ao=["data-message-id"],no={class:"msg-gutter"},so=["datetime","title"],oo={class:"msg-content"},lo={key:0,class:"msg-head"},io={class:"msg-name"},ro={key:0,class:"msg-tag"},uo={key:1,class:"msg-tag me"},co=["datetime","title"],mo=["title"],vo={key:1,class:"sr-only"},po={key:2,class:"msg-deleted"},fo={class:"composer-field"},yo=["readonly"],bo={key:0,class:"error-text",role:"alert"},ho={class:"btn-row"},_o=["aria-busy"],ko=["disabled"],go=["innerHTML"],$o=["title"],wo={key:5,class:"msg-files"},zo=["aria-label","aria-busy","onClick"],xo={class:"msg-file-name"},Io={class:"msg-file-size"},jo={key:6,class:"msg-embeds"},Co={key:0,class:"msg-actions",role:"toolbar","aria-label":"Działania wiadomości"},Eo=["disabled"],Se=$(null),To=ie({__name:"ChatMessage",props:{message:{},followUp:{type:Boolean},author:{},meId:{}},emits:["delete"],setup(a,{emit:r}){const e=a,o=r,l=ye(),i=Ge("(hover: none)"),c=$(null),y=$(null),d=$(null),k=$(null),f=$(null),u=$(null),b=v(()=>e.meId!==null&&e.message.sender_id===e.meId),j=v(()=>$e(e.author,e.message.sender_name)),O=v(()=>Le(e.message.created_at)),F=v(()=>Ze(e.message.created_at)),E=v(()=>!!e.author?.is_bot),M=v(()=>!b.value&&Na(e.message.content,l.myHandle)),C=v(()=>e.message.edited_at?`Edytowano ${Ze(e.message.edited_at)}`:""),R=v(()=>(e.message.reactions??[]).some(T=>T.count>0)),A=$(!1),q=v(()=>Se.value===e.message.id),se=v(()=>!!l.allowedReactions?.length),Q=v(()=>!!e.message.deleted_at),te=v(()=>l.canEdit(e.message)),V=v(()=>l.canDelete(e.message)),ae=v(()=>Lt(e.message,l.maxEmbeds)),de=v(()=>!e.message.content||Nt(e.message.content,ae.value)),L=v(()=>e.message.attachments??[]),S=$(null),N=Bt();async function D(T){if(S.value===null){S.value=T.id;try{await ut.download(e.message.id,T.id,T.filename)}catch{N.show("Nie udało się pobrać pliku. Spróbuj ponownie.")}finally{S.value=null}}}const U=$(!1),_=$(""),x=$(!1),W=$(""),P=24;function re(){const T=u.value;if(!T)return;T.style.height="auto";const fe=getComputedStyle(T),G=P*8+parseFloat(fe.paddingTop)+parseFloat(fe.paddingBottom);T.style.height=`${Math.min(T.scrollHeight,G)}px`,T.style.overflowY=T.scrollHeight>G?"auto":"hidden"}async function be(){if(!te.value)return;_.value=e.message.content??"",W.value="",U.value=!0,Se.value=null,await Y();const T=u.value;T&&(re(),T.focus(),T.setSelectionRange(T.value.length,T.value.length))}function X(){U.value=!1,W.value="",Y(()=>k.value?.focus())}async function ue(){if(x.value)return;x.value=!0,W.value="";const T=await l.edit(e.message,_.value);if(x.value=!1,T){W.value=T;return}X()}function pe(T){if(!T.isComposing){if(T.key==="Escape"){T.preventDefault(),T.stopPropagation(),x.value||X();return}T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),ue())}}le(_,()=>{Y(re)}),le(Q,T=>{T&&(U.value=!1)});function he(){V.value&&o("delete",e.message,f.value)}async function g(){se.value&&(A.value=!0,await Y(),y.value?.openPicker(d.value))}function w(){A.value=!1}function Z(T){!i.value||T.target?.closest("a, button, textarea, input, .msg-actions")||(Se.value=q.value?null:e.message.id)}function _e(T){c.value&&T.target instanceof Node&&c.value.contains(T.target)||q.value&&(Se.value=null)}return le(q,T=>{T?document.addEventListener("pointerdown",_e,!0):document.removeEventListener("pointerdown",_e,!0)}),Ce(()=>{document.removeEventListener("pointerdown",_e,!0),q.value&&(Se.value=null)}),(T,fe)=>(n(),s("article",{ref_key:"root",ref:c,class:ce(["msg",{follow:a.followUp,"actions-open":q.value,"mentions-me":M.value}]),"data-message-id":a.message.id,onClick:Z},[t("div",no,[a.followUp?(n(),s("time",{key:1,class:"msg-time",datetime:a.message.created_at,title:F.value},m(O.value),9,so)):(n(),ve(Me,{key:0,"user-id":a.message.sender_id,member:a.author,fallback:a.message.sender_name,me:b.value},null,8,["user-id","member","fallback","me"]))]),t("div",oo,[a.followUp?(n(),s("span",vo,m(j.value)+", "+m(O.value)+":",1)):(n(),s("div",lo,[t("span",io,m(j.value),1),E.value?(n(),s("span",ro,"Bot")):b.value?(n(),s("span",uo,"Ty")):I("",!0),t("time",{class:"msg-time",datetime:a.message.created_at,title:F.value},m(O.value),9,co),a.message.edited_at?(n(),s("span",{key:2,class:"msg-edited",title:C.value},"(edytowano)",8,mo)):I("",!0)])),Q.value?(n(),s("p",po,"Wiadomość usunięta.")):U.value?(n(),s("form",{key:3,class:"msg-edit",onSubmit:Pe(ue,["prevent"])},[t("div",fo,[Ae(t("textarea",{ref_key:"editInput",ref:u,"onUpdate:modelValue":fe[0]||(fe[0]=G=>_.value=G),rows:"1","aria-label":"Edytuj wiadomość",readonly:x.value,onKeydown:pe},null,40,yo),[[We,_.value]])]),W.value?(n(),s("p",bo,m(W.value),1)):I("",!0),t("div",ho,[t("button",{class:"btn primary small",type:"submit","aria-busy":x.value?"true":void 0},"Zapisz zmiany",8,_o),t("button",{class:"btn ghost small",type:"button",disabled:x.value,onClick:X},"Anuluj edycję",8,ko)])],32)):(n(),s(K,{key:4},[de.value?I("",!0):(n(),s("div",{key:0,class:"msg-body prose",innerHTML:p(La)(a.message.content,p(l).membersByHandle)},null,8,go)),a.followUp&&a.message.edited_at?(n(),s("span",{key:1,class:"msg-edited",title:C.value},"(edytowano)",8,$o)):I("",!0)],64)),!Q.value&&L.value.length?(n(),s("ul",wo,[(n(!0),s(K,null,ee(L.value,G=>(n(),s("li",{key:G.id},[t("button",{class:"msg-file",type:"button","aria-label":`Pobierz ${G.filename} (${p(Fe)(G.size)})`,"aria-busy":S.value===G.id?"true":void 0,onClick:ke=>D(G)},[B(ne,{name:"file"}),t("span",xo,m(G.filename),1),t("span",Io,m(p(Fe)(G.size)),1)],8,zo)]))),128))])):I("",!0),!Q.value&&ae.value.length?(n(),s("div",jo,[(n(!0),s(K,null,ee(ae.value,G=>(n(),ve(yt,{key:p(Ie)(G),"embed-ref":G,item:p(l).embedItem(G)},null,8,["embed-ref","item"]))),128))])):I("",!0),!Q.value&&(R.value||A.value)?(n(),ve(to,{key:7,ref_key:"bar",ref:y,message:a.message,onClosed:w},null,8,["message"])):I("",!0)]),!Q.value&&!U.value?(n(),s("div",Co,[t("button",{ref_key:"reactBtn",ref:d,class:"msg-action",type:"button","aria-label":"Dodaj reakcję",title:"Dodaj reakcję",disabled:!se.value,onClick:g},[B(ne,{name:"smile"})],8,Eo),te.value?(n(),s("button",{key:0,ref_key:"editBtn",ref:k,class:"msg-action",type:"button","aria-label":"Edytuj",title:"Edytuj",onClick:be},[B(ne,{name:"pencil"})],512)):I("",!0),V.value?(n(),s("button",{key:1,ref_key:"deleteBtn",ref:f,class:"msg-action miss",type:"button","aria-label":"Usuń",title:"Usuń",onClick:he},[B(ne,{name:"trash"})],512)):I("",!0)])):I("",!0)],10,ao))}}),Do=["aria-labelledby","aria-describedby"],So=["id"],Mo=["id"],Bo={key:0,class:"error-text",role:"alert"},Lo={class:"btn-row chat-confirm-buttons"},No=["aria-busy","disabled"],Ro=["disabled"],qo=ie({__name:"DeleteDialog",setup(a,{expose:r}){const e=ye(),o=Ee(),l=$(null),i=$(null),c=$(null),y=$(!1),d=$("");let k=null,f=null;const u=v(()=>!!c.value&&c.value.sender_id===e.userId),b=v(()=>{const R=c.value;return!R||u.value?"Wiadomość zniknie z rozmowy u wszystkich. Tego nie można cofnąć.":`Usuniesz wiadomość od ${$e(e.members.get(R.sender_id),R.sender_name)} u wszystkich. Tego nie można cofnąć.`});function j(R,A){c.value=R,d.value="",y.value=!1,k=A??(document.activeElement instanceof HTMLElement?document.activeElement:null),f=k?.closest(".chat-list")??null,l.value?.showModal(),Y(()=>i.value?.focus())}function O(){l.value?.close()}function F(R){y.value&&R.preventDefault()}function E(){k?.isConnected?k.focus():f?.focus(),k=null,f=null,c.value=null}function M(R){R.target===l.value&&!y.value&&O()}async function C(){const R=c.value;if(!R||y.value)return;y.value=!0,d.value="";const A=await e.remove(R);if(y.value=!1,A){d.value=A;return}O()}return r({open:j}),(R,A)=>(n(),s("dialog",{ref_key:"dialog",ref:l,class:"chat-dialog chat-confirm","aria-labelledby":`delete-h-${p(o)}`,"aria-describedby":`delete-b-${p(o)}`,onCancel:F,onClose:E,onClick:M},[t("h2",{id:`delete-h-${p(o)}`,class:"chat-dialog-title"},"Usunąć wiadomość?",8,So),t("p",{id:`delete-b-${p(o)}`,class:"chat-confirm-body"},m(b.value),9,Mo),d.value?(n(),s("p",Bo,m(d.value),1)):I("",!0),t("div",Lo,[t("button",{class:"btn danger",type:"button","aria-busy":y.value?"true":void 0,disabled:y.value,onClick:C},"Usuń wiadomość",8,No),t("button",{ref_key:"keepBtn",ref:i,class:"btn ghost",type:"button",disabled:y.value,onClick:O},"Zostaw wiadomość",8,Ro)])],40,Do))}}),Ao={class:"chat-list-wrap"},Wo=["aria-label"],Po={key:0,class:"notice error",role:"alert"},Uo={key:1,class:"chat-skeletons","aria-busy":"true","aria-label":"Wczytywanie wiadomości"},Oo={key:2,class:"chat-start"},Ho={key:3,class:"empty chat-empty"},Ko={key:0,class:"error-text"},Fo={key:1,class:"chat-start"},Zo={key:2,class:"chat-start"},Vo=["aria-label"],Qo={"aria-hidden":"true"},Xo={key:0,class:"chat-new",role:"separator","aria-label":"Nowe wiadomości"},Yo={class:"sr-only","aria-live":"polite"},Go=ie({__name:"MessageList",props:{conversationId:{},name:{},kind:{default:"general"},otherName:{default:""},visible:{type:Boolean,default:!0}},setup(a,{expose:r}){const e=a,o=ye(),l=$(null),i=$(null),c=$(null);function y(g,w){c.value?.open(g,w)}const d=v(()=>o.messages[e.conversationId]),k=v(()=>o.errors[e.conversationId]??""),f=v(()=>Ea(d.value??[],new Date)),u=v(()=>d.value?.at(-1)?.id??null),b=v(()=>!!o.olderLoading[e.conversationId]),j=v(()=>o.olderError[e.conversationId]??""),O=v(()=>!!o.reachedStart[e.conversationId]),F=v(()=>e.kind==="dm"?"To początek Waszej rozmowy.":"To początek kanału # ogólny.");let E=!1;le(d,g=>{g&&(o.resolveFor(g,!E),E=!0)},{immediate:!0,deep:1});const M=o.unreadOf(e.conversationId),C=$(null);let R=!1;function A(){R||!d.value||(R=!0,C.value=Rt(d.value,M,o.userId))}const q=$(0),se=$(""),Q=typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function te(){return!!l.value&&l.value.clientHeight>0}function V(){const g=l.value;return!g||g.scrollHeight-g.scrollTop-g.clientHeight<=48}function ae(){return!l.value||!te()||!d.value?null:V()?{atBottom:!0,messageId:null,offset:0}:de()??{atBottom:!0,messageId:null,offset:0}}function de(){const g=l.value;if(!g)return null;for(const w of g.querySelectorAll("[data-message-id]"))if(w.offsetTop+w.offsetHeight>g.scrollTop)return{atBottom:!1,messageId:Number(w.dataset.messageId),offset:w.offsetTop-g.scrollTop};return null}function L(){const g=ae();g&&o.saveAnchor(e.conversationId,g)}let S=!0;const N=$(!1);function D(){if(!d.value||!te())return;qt({active:o.activeId===e.conversationId,visible:e.visible,focused:typeof document>"u"||document.hasFocus(),atBottom:V()})&&o.markRead(e.conversationId)}function U(g=!1){Y(()=>{const w=l.value;w&&(g&&!Q&&typeof w.scrollTo=="function"?w.scrollTo({top:w.scrollHeight,behavior:"smooth"}):w.scrollTop=w.scrollHeight,S=!0,q.value=0,te()&&o.saveAnchor(e.conversationId,{atBottom:!0,messageId:null,offset:0}),D())})}function _(g){if(C.value===null)return!1;const w=g.querySelector(".chat-new");if(!w)return!1;const Z=g.scrollHeight-g.clientHeight;return w.offsetTop>=Z?!1:(g.scrollTop=w.offsetTop-48,!0)}function x(){Y(()=>{const g=l.value;!g||!te()||!d.value||(A(),Y(()=>{const w=o.anchorFor(e.conversationId),Z=w&&!w.atBottom&&w.messageId!==null?g.querySelector(`[data-message-id="${w.messageId}"]`):null;Z?g.scrollTop=Z.offsetTop-(w?.offset??0):C.value!==null&&!N.value&&_(g)||(g.scrollTop=g.scrollHeight),S=V(),S&&(q.value=0),N.value=!0,D(),X()}))})}let W=0;function P(){S=V(),S&&(q.value=0),!W&&(W=requestAnimationFrame(()=>{W=0,L(),D()}))}le(()=>d.value===void 0,(g,w)=>{!g&&w&&x()}),le(u,(g,w)=>{if(g===null||g===w||w===null)return;const Z=d.value??[],_e=Z.filter(ke=>ke.id>w),T=Z.at(-1),fe=_e.filter(ke=>ke.sender_id!==o.userId),G=fe.at(-1);if(G&&e.visible){const ke=(G.content??"").replace(/\s+/g," ").trim().slice(0,80);se.value=`${$e(o.members.get(G.sender_id),G.sender_name)}: ${ke}`}S||T&&T.sender_id===o.userId?U():q.value+=fe.length}),le(()=>e.visible,(g,w)=>{w&&!g&&L(),g&&!w&&x()});let re=null;async function be(){const g=l.value;if(!g||!N.value||b.value||j.value||O.value)return;const w=de();if(await o.loadOlder(e.conversationId),await Y(),w?.messageId!=null){const Z=g.querySelector(`[data-message-id="${w.messageId}"]`);Z&&(g.scrollTop=Z.offsetTop-w.offset)}X()}function X(){const g=i.value;!re||!g||(re.unobserve(g),re.observe(g))}function ue(){o.olderError[e.conversationId]="",Y(()=>{be()})}le(i,(g,w)=>{w&&re?.unobserve(w),g&&re?.observe(g)});function pe(){D()}function he(){document.visibilityState==="visible"&&D()}return Xe(()=>{typeof IntersectionObserver<"u"&&l.value&&(re=new IntersectionObserver(g=>{g.some(w=>w.isIntersecting)&&be()},{root:l.value,rootMargin:"200px 0px 0px 0px"}),i.value&&re.observe(i.value)),window.addEventListener("focus",pe),document.addEventListener("visibilitychange",he),x()}),Ce(()=>{W&&cancelAnimationFrame(W),re?.disconnect(),window.removeEventListener("focus",pe),document.removeEventListener("visibilitychange",he),L()}),r({scrollToBottom:U}),(g,w)=>(n(),s("div",Ao,[t("div",{ref_key:"el",ref:l,class:"chat-list",role:"region","aria-label":`Wiadomości w ${a.name}`,tabindex:"0",onScrollPassive:P},[!d.value&&k.value?(n(),s("div",Po,[J(m(k.value)+" ",1),t("button",{class:"linkish",type:"button",onClick:w[0]||(w[0]=Z=>p(o).loadLatest(a.conversationId))},"Spróbuj ponownie")])):d.value?!d.value.length&&a.kind==="dm"?(n(),s("p",Oo,"To początek Waszej rozmowy z "+m(a.otherName)+".",1)):d.value.length?(n(),s(K,{key:4},[t("div",{ref_key:"sentinel",ref:i,class:"chat-older"},[j.value?(n(),s("p",Ko,[J(m(j.value)+" ",1),t("button",{class:"linkish",type:"button",onClick:ue},"Spróbuj ponownie")])):b.value?(n(),s("p",Fo,"Wczytywanie starszych wiadomości…")):O.value?(n(),s("p",Zo,m(F.value),1)):I("",!0)],512),(n(!0),s(K,null,ee(f.value,Z=>(n(),s(K,{key:Z.key},[Z.kind==="day"?(n(),s("div",{key:0,class:"chat-day",role:"separator","aria-label":Z.label},[t("span",Qo,m(Z.label),1)],8,Vo)):(n(),s(K,{key:1},[Z.message.id===C.value?(n(),s("div",Xo,[...w[4]||(w[4]=[t("span",{"aria-hidden":"true"},"Nowe wiadomości",-1)])])):I("",!0),B(To,{message:Z.message,"follow-up":Z.followUp&&Z.message.id!==C.value,author:p(o).members.get(Z.message.sender_id),"me-id":p(o).userId,onDelete:y},null,8,["message","follow-up","author","me-id"])],64))],64))),128))],64)):(n(),s("div",Ho,[...w[3]||(w[3]=[t("p",{class:"chat-empty-h"},"Na # ogólny jeszcze cisza",-1),t("p",null,"Napisz pierwszą wiadomość do całego roku. Przyciskiem kalendarza podepniesz termin, zajęcia albo lekturę.",-1)])])):(n(),s("div",Uo,[...w[2]||(w[2]=[t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1),t("div",{class:"skeleton"},null,-1)])]))],40,Wo),q.value>0?(n(),s("button",{key:0,class:"btn small chat-jump",type:"button",onClick:w[1]||(w[1]=Z=>U(!0))},[B(ne,{name:"arrow-down"}),J("Nowe wiadomości: "+m(q.value),1)])):I("",!0),t("div",Yo,m(se.value),1),B(qo,{ref_key:"deleteDialog",ref:c},null,512)]))}}),Jo=["role","aria-label","aria-labelledby"],el=["id","aria-labelledby"],tl={class:"chat-typing","aria-hidden":"true"},al={key:2,class:"chat-list"},nl=ie({__name:"ChatPanel",props:{wide:{type:Boolean,default:!0},visible:{type:Boolean,default:!0},labelledBy:{default:void 0}},setup(a){const r=a,e=ye(),o=`chat-${Ee()}`,l=$(null),i=$(null),c=$(null),y=v(()=>r.wide?void 0:"tabpanel"),d=v(()=>e.view==="dms"?null:e.activeId),k=v(()=>e.view==="dm"?e.conversations.find(E=>E.id===e.activeId):void 0),f=v(()=>k.value?$e(e.members.get(k.value.other_user_id)):""),u=v(()=>e.view==="dm"?f.value:"# ogólny"),b=v(()=>d.value===null?"":At(e.typingIn(d.value).map(E=>$e(e.members.get(E),"Ktoś")))),j=v(()=>`${o}-tab-${e.view==="general"?"general":"dms"}`);le(()=>r.visible,E=>e.panelVisible=E,{immediate:!0}),Ce(()=>e.panelVisible=!1);function O(E){E==="general"?e.showGeneral():e.showDms()}function F(){Y(()=>i.value?.focus())}return(E,M)=>(n(),s("aside",{class:"chat",role:y.value,"aria-label":a.wide?"Czat":void 0,"aria-labelledby":a.wide?void 0:a.labelledBy},[B(ys,{view:p(e).view,"dm-name":f.value,"dm-user-id":k.value?.other_user_id??null,"id-base":o,onSelect:O,onBack:M[0]||(M[0]=C=>p(e).showDms())},null,8,["view","dm-name","dm-user-id"]),t("div",{id:`${o}-body`,class:"chat-body",role:"tabpanel","aria-labelledby":j.value},[p(e).view==="dms"?(n(),ve(Ss,{key:0,onCompose:M[1]||(M[1]=C=>c.value?.open())})):d.value!==null?(n(),s(K,{key:1},[(n(),ve(Go,{ref_key:"list",ref:l,key:d.value,"conversation-id":d.value,name:u.value,kind:p(e).view==="dm"?"dm":"general","other-name":f.value,visible:a.visible},null,8,["conversation-id","name","kind","other-name","visible"])),t("div",tl,m(b.value),1),B(Gn,{ref_key:"composer",ref:i,"conversation-id":d.value,label:`Wiadomość do ${u.value}`,placeholder:p(e).view==="dm"?`Napisz do ${f.value}…`:"Napisz na # ogólny…",onSent:M[2]||(M[2]=C=>l.value?.scrollToBottom())},null,8,["conversation-id","label","placeholder"])],64)):(n(),s("div",al,[...M[3]||(M[3]=[t("div",{class:"chat-skeletons","aria-busy":"true","aria-label":"Wczytywanie czatu"},[t("div",{class:"skeleton"}),t("div",{class:"skeleton"}),t("div",{class:"skeleton"})],-1)])]))],8,el),B(Vs,{ref_key:"picker",ref:c,onStarted:F},null,512)],8,Jo))}}),sl={key:0,class:"pulpit-tabs",role:"tablist","aria-label":"Widok"},ol=["id","aria-selected","aria-controls","tabindex","onClick","onKeydown"],ll={key:0,class:"unread-badge"},il={"aria-hidden":"true"},rl={class:"sr-only"},ul=["role","aria-labelledby"],cl={class:"pulpit-lists"},dl={"aria-labelledby":"next-h"},ml={class:"section-head"},vl={key:0,class:"rows"},pl={class:"row-main"},fl={class:"title"},yl={class:"when"},bl={class:"muted small"},hl={key:0,class:"badge online"},_l={key:1,class:"badge onsite"},kl={key:1,class:"empty"},gl={"aria-labelledby":"dl-h"},$l={class:"section-head"},wl={key:0,class:"rows"},zl={class:"row-main"},xl={class:"title"},Il={class:"muted small"},jl={key:0},Cl={key:1,class:"empty"},El={class:"pulpit-cards"},Tl={class:"card","aria-labelledby":"read-h"},Dl={style:{margin:"0 0 8px"}},Sl={class:"big-num"},Ml={class:"muted"},Bl=["aria-valuenow"],Ll={class:"muted small",style:{margin:"8px 0 10px"}},Nl={class:"card","aria-labelledby":"quiz-h"},Ol=ie({__name:"DashboardView",setup(a){const r=Wt(),e=Pt(),o=Ut(),l=ye(),i=Ht(),c=Kt(),y=$(new Date);Xe(()=>{y.value=new Date,Promise.all([e.loadDashboard(),e.loadCourses(),e.loadSchedule(),e.loadDeadlines(),e.loadReadings()]),o.loadList()});const d=v(()=>e.loaded.schedule&&e.loaded.courses&&e.loaded.readings&&e.loaded.deadlines&&e.loaded.dashboard),k=v(()=>e.dashboard?.current_meeting??e.dashboard?.next_meeting??null),f=v(()=>!!e.dashboard?.current_meeting),u=v(()=>o.list?.find(_=>_.meeting_id===k.value?.id)??null),b=$(null);let j=0;async function O(_){const x=++j;if(_===void 0){b.value=[];return}b.value=null;try{const W=await Xt.materials({meeting:_,per_page:100});x===j&&(b.value=W.data)}catch{x===j&&(b.value=[])}}le(()=>k.value?.id,_=>{O(_)},{immediate:!0});const F=v(()=>b.value===null?null:Qt(b.value,e.hidden)),E=v(()=>e.schedule.filter(_=>Date.parse(_.ends_at)>y.value.getTime()).slice(0,5)),M=v(()=>e.deadlines.filter(_=>Date.parse(_.due_at)>=y.value.getTime()).slice(0,5)),C=_=>{const x=Re(_,y.value);return x>=0&&x<=14},R=v(()=>e.readingStats),A=v(()=>R.value.requiredTotal?Math.round(R.value.requiredRead/R.value.requiredTotal*100):0),q=v(()=>r.user?.name?`Cześć, ${r.user.name}`:"Pulpit"),se=v(()=>`Pulpit · ${Be(y.value.toISOString())}`),Q=v(()=>{const _=r.user;return mt({name:_?.name??"",surname:_?.surname??"",handle:""},_?.email??"")}),te=Aa(1100),V=v(()=>l.member===!0),ae=v(()=>i.query.tab==="czat"?"czat":"pulpit"),de=v(()=>V.value&&!te.value),L=v(()=>V.value&&(te.value||ae.value==="czat")),S=[{key:"pulpit",label:"Pulpit",id:"tab-pulpit",panel:"panel-pulpit"},{key:"czat",label:"Czat",id:"tab-czat",panel:"panel-czat"}];function N(_){if(_==="czat")return{...i.query,tab:"czat"};const{tab:x,...W}=i.query;return W}function D(_){_!==ae.value&&c.push({query:N(_)})}function U(_,x){const W=ct(_.key,x,S.length);W!==null&&(_.preventDefault(),D(S[W].key),Y(()=>document.getElementById(S[W].id)?.focus()))}return le([()=>l.member,()=>i.query.tab],([_,x])=>{_===!1&&x==="czat"&&c.replace({query:N("pulpit")})},{immediate:!0}),(_,x)=>{const W=lt("router-link");return n(),s("div",{class:ce(["pulpit",{"with-chat":V.value,czat:V.value&&ae.value==="czat"}])},[B(Yt,{class:"pulpit-head",eyebrow:se.value,title:q.value},{default:me(()=>[B(Je,{part:"chip"}),B(W,{class:"profile-link",to:"/profil","aria-label":"Profil"},{default:me(()=>[J(m(Q.value),1)]),_:1})]),_:1},8,["eyebrow","title"]),V.value?(n(),s("div",sl,[(n(),s(K,null,ee(S,(P,re)=>t("button",{id:P.id,key:P.key,class:"pulpit-tab",type:"button",role:"tab","aria-selected":ae.value===P.key,"aria-controls":P.panel,tabindex:ae.value===P.key?0:-1,onClick:be=>D(P.key),onKeydown:be=>U(be,re)},[J(m(P.label)+" ",1),P.key==="czat"&&p(je)(p(l).totalUnread)?(n(),s("span",ll,[t("span",il,m(p(je)(p(l).totalUnread)),1),t("span",rl,", "+m(p(Ye)(p(l).totalUnread)),1)])):I("",!0)],40,ol)),64))])):I("",!0),t("div",{id:"panel-pulpit",class:"pulpit-main",role:de.value?"tabpanel":void 0,"aria-labelledby":de.value?"tab-pulpit":void 0},[B(Je,{part:"notice"}),B(Gt,{ready:d.value,error:p(e).error,onRetry:x[0]||(x[0]=P=>p(e).retry())},{default:me(()=>[B(xa,{meeting:k.value,"is-current":f.value,schedule:p(e).schedule,deadlines:p(e).deadlines,readings:p(e).readings,materials:F.value,now:y.value,checklist:u.value},null,8,["meeting","is-current","schedule","deadlines","readings","materials","now","checklist"]),t("div",cl,[t("section",dl,[t("div",ml,[x[2]||(x[2]=t("h2",{id:"next-h"},"Najbliższe zajęcia",-1)),B(W,{to:"/plan",class:"small"},{default:me(()=>[...x[1]||(x[1]=[J("Cały plan",-1)])]),_:1})]),E.value.length?(n(),s("ul",vl,[(n(!0),s(K,null,ee(E.value,P=>(n(),s("li",{key:P.id},[t("div",pl,[t("span",fl,m(P.course.name),1),t("span",yl,m(p(Le)(P.starts_at))+"–"+m(p(Le)(P.ends_at)),1)]),t("div",bl,[J(m(p(Be)(P.starts_at))+" · "+m(p(Ft)[P.course.form])+" ",1),P.is_online?(n(),s("span",hl,"online")):P.room?(n(),s("span",_l,"sala "+m(P.room),1)):I("",!0)])]))),128))])):(n(),s("p",kl,"Nie ma już zaplanowanych zajęć."))]),t("section",gl,[t("div",$l,[x[4]||(x[4]=t("h2",{id:"dl-h"},"Terminy",-1)),B(W,{to:"/terminarz",class:"small"},{default:me(()=>[...x[3]||(x[3]=[J("Terminarz",-1)])]),_:1})]),M.value.length?(n(),s("ul",wl,[(n(!0),s(K,null,ee(M.value,P=>(n(),s("li",{key:P.id},[t("div",zl,[t("span",xl,m(P.title),1),t("span",{class:ce(["badge",{warn:C(P.due_at)}])},m(p(Zt)(P.due_at,y.value)),3)]),t("div",Il,[J(m(p(Ze)(P.due_at))+" · "+m(p(Vt)[P.kind]),1),P.course?(n(),s("span",jl," · "+m(P.course.name),1)):I("",!0)])]))),128))])):(n(),s("p",Cl,"Brak nadchodzących terminów."))])]),t("div",El,[t("section",Tl,[x[6]||(x[6]=t("span",{class:"eyebrow"},"Lektury",-1)),x[7]||(x[7]=t("h2",{id:"read-h",style:{margin:"4px 0 8px"}},"Postęp czytania",-1)),t("p",Dl,[t("span",Sl,m(R.value.requiredRead),1),t("span",Ml," z "+m(R.value.requiredTotal)+" obowiązkowych",1)]),t("div",{class:"progress-bar",role:"progressbar","aria-valuenow":A.value,"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Przeczytane lektury obowiązkowe"},[t("span",{style:qe({width:A.value+"%"})},null,4)],8,Bl),t("p",Ll,"Łącznie przeczytano "+m(R.value.read)+" z "+m(p(Ot)(R.value.total,"lektury","lektur","lektur"))+".",1),B(W,{class:"btn small",to:"/lektury"},{default:me(()=>[...x[5]||(x[5]=[J("Lista lektur",-1)])]),_:1})]),t("section",Nl,[x[9]||(x[9]=t("span",{class:"eyebrow"},"Quizy",-1)),x[10]||(x[10]=t("h2",{id:"quiz-h",style:{margin:"4px 0 8px"}},"Sprawdź się",-1)),x[11]||(x[11]=t("p",{class:"muted",style:{margin:"0 0 12px"}},"Fiszki z powtórki: losuj po 5 pytań, oznaczaj Wiem / Nie wiem i wracaj do tych, których nie znasz.",-1)),B(W,{class:"btn primary small",to:"/quizy"},{default:me(()=>[...x[8]||(x[8]=[J("Zacznij quiz",-1)])]),_:1})])])]),_:1},8,["ready","error"])],8,ul),V.value?(n(),ve(nl,{key:1,id:"panel-czat",wide:p(te),visible:L.value,"labelled-by":"tab-czat"},null,8,["wide","visible"])):I("",!0)],2)}}});export{Ol as default}; diff --git a/public/assets/DeadlinesView-CaD0eVv6.js b/public/assets/DeadlinesView-BGDvcTFu.js similarity index 90% rename from public/assets/DeadlinesView-CaD0eVv6.js rename to public/assets/DeadlinesView-BGDvcTFu.js index 736b701..edb3a82 100644 --- a/public/assets/DeadlinesView-CaD0eVv6.js +++ b/public/assets/DeadlinesView-BGDvcTFu.js @@ -1 +1 @@ -import{d as C,ae as B,o as N,U as T,c as t,i as m,j as g,e as a,r as w,x as y,n as o,F as h,E as D,b as i,t as s,C as V,z as b,ai as j,p as f,K as z,a6 as E,aj as $,f as p,ag as L,l as M,k as S}from"./index-CtNAsql9.js";import{_ as F}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as K}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{_ as P}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-DxZMSXIh.js";import{u as R}from"./scrollToHash-B7Lws5_Z.js";const U={key:0,class:"rows card"},A=["id"],H={class:"row-main"},I={class:"title"},Z={class:"muted small"},q={class:"badge"},G={key:0,class:"small",style:{margin:"6px 0 0"}},J={key:1,class:"empty"},O={key:2,class:"section"},Q=["aria-pressed"],W={key:0,class:"rows card past",style:{"margin-top":"10px"}},X=["id"],Y={class:"row-main"},ee={class:"title"},se={class:"when"},te={class:"muted small"},de=C({__name:"DeadlinesView",setup(ae){const n=B(),l=w(new Date),u=w(!1);N(()=>{l.value=new Date,Promise.all([n.loadDeadlines(),n.loadCourses()])});const k=y(()=>n.deadlines.filter(d=>Date.parse(d.due_at)>=l.value.getTime())),c=y(()=>n.deadlines.filter(d=>Date.parse(d.due_at)n.loaded.deadlines&&n.loaded.courses),x=S();return T([v,()=>x.hash],([d,r])=>{const _=Number(/^#termin-(\d+)$/.exec(r)?.[1]);d&&_&&c.value.some(e=>e.id===_)&&(u.value=!0)},{immediate:!0}),R(v),(d,r)=>{const _=M("router-link");return o(),t("div",null,[m(F,{eyebrow:"Zaliczenia, egzaminy, sprawy organizacyjne",title:"Terminarz"}),m(K,{ready:v.value,error:a(n).error,onRetry:r[1]||(r[1]=e=>a(n).retry())},{default:g(()=>[m(P),k.value.length?(o(),t("ul",U,[(o(!0),t(h,null,D(k.value,e=>(o(),t("li",{id:`termin-${e.id}`,key:e.id},[i("div",H,[i("span",I,s(e.title),1),i("span",{class:V(["badge",{alert:a(b)(e.due_at,l.value)<=3}])},s(a(j)(e.due_at,l.value)),3)]),i("div",Z,[f(s(a(z)(e.due_at))+", "+s(a(E)(e.due_at))+" · ",1),i("span",q,s(a($)[e.kind]),1),e.course?(o(),t(h,{key:0},[r[2]||(r[2]=f(" · ",-1)),m(_,{to:`/przedmioty/${e.course.id}`},{default:g(()=>[f(s(e.course.name),1)]),_:2},1032,["to"])],64)):p("",!0)]),e.description?(o(),t("p",G,s(e.description),1)):p("",!0)],8,A))),128))])):(o(),t("p",J,"Brak nadchodzących terminów.")),c.value.length?(o(),t("div",O,[i("button",{class:"chip",type:"button","aria-pressed":u.value,onClick:r[0]||(r[0]=e=>u.value=!u.value)},"Minione ("+s(c.value.length)+")",9,Q),u.value?(o(),t("ul",W,[(o(!0),t(h,null,D(c.value,e=>(o(),t("li",{id:`termin-${e.id}`,key:e.id},[i("div",Y,[i("span",ee,s(e.title),1),i("span",se,s(a(L)(Math.abs(a(b)(e.due_at,l.value)),"dzień","dni","dni"))+" temu",1)]),i("div",te,s(a(z)(e.due_at))+" · "+s(a($)[e.kind]),1)],8,X))),128))])):p("",!0)])):p("",!0)]),_:1},8,["ready","error"])])}}});export{de as default}; +import{d as C,ae as B,o as N,U as T,c as t,i as m,j as g,e as a,r as w,x as y,n as o,F as h,E as D,b as i,t as s,C as V,z as b,ai as j,p as f,K as z,a6 as E,aj as $,f as p,ag as L,l as M,k as S}from"./index-BhVKyY57.js";import{_ as F}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as K}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{_ as P}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-05LZv84e.js";import{u as R}from"./scrollToHash-DSRl5dJ4.js";const U={key:0,class:"rows card"},A=["id"],H={class:"row-main"},I={class:"title"},Z={class:"muted small"},q={class:"badge"},G={key:0,class:"small",style:{margin:"6px 0 0"}},J={key:1,class:"empty"},O={key:2,class:"section"},Q=["aria-pressed"],W={key:0,class:"rows card past",style:{"margin-top":"10px"}},X=["id"],Y={class:"row-main"},ee={class:"title"},se={class:"when"},te={class:"muted small"},de=C({__name:"DeadlinesView",setup(ae){const n=B(),l=w(new Date),u=w(!1);N(()=>{l.value=new Date,Promise.all([n.loadDeadlines(),n.loadCourses()])});const k=y(()=>n.deadlines.filter(d=>Date.parse(d.due_at)>=l.value.getTime())),c=y(()=>n.deadlines.filter(d=>Date.parse(d.due_at)n.loaded.deadlines&&n.loaded.courses),x=S();return T([v,()=>x.hash],([d,r])=>{const _=Number(/^#termin-(\d+)$/.exec(r)?.[1]);d&&_&&c.value.some(e=>e.id===_)&&(u.value=!0)},{immediate:!0}),R(v),(d,r)=>{const _=M("router-link");return o(),t("div",null,[m(F,{eyebrow:"Zaliczenia, egzaminy, sprawy organizacyjne",title:"Terminarz"}),m(K,{ready:v.value,error:a(n).error,onRetry:r[1]||(r[1]=e=>a(n).retry())},{default:g(()=>[m(P),k.value.length?(o(),t("ul",U,[(o(!0),t(h,null,D(k.value,e=>(o(),t("li",{id:`termin-${e.id}`,key:e.id},[i("div",H,[i("span",I,s(e.title),1),i("span",{class:V(["badge",{alert:a(b)(e.due_at,l.value)<=3}])},s(a(j)(e.due_at,l.value)),3)]),i("div",Z,[f(s(a(z)(e.due_at))+", "+s(a(E)(e.due_at))+" · ",1),i("span",q,s(a($)[e.kind]),1),e.course?(o(),t(h,{key:0},[r[2]||(r[2]=f(" · ",-1)),m(_,{to:`/przedmioty/${e.course.id}`},{default:g(()=>[f(s(e.course.name),1)]),_:2},1032,["to"])],64)):p("",!0)]),e.description?(o(),t("p",G,s(e.description),1)):p("",!0)],8,A))),128))])):(o(),t("p",J,"Brak nadchodzących terminów.")),c.value.length?(o(),t("div",O,[i("button",{class:"chip",type:"button","aria-pressed":u.value,onClick:r[0]||(r[0]=e=>u.value=!u.value)},"Minione ("+s(c.value.length)+")",9,Q),u.value?(o(),t("ul",W,[(o(!0),t(h,null,D(c.value,e=>(o(),t("li",{id:`termin-${e.id}`,key:e.id},[i("div",Y,[i("span",ee,s(e.title),1),i("span",se,s(a(L)(Math.abs(a(b)(e.due_at,l.value)),"dzień","dni","dni"))+" temu",1)]),i("div",te,s(a(z)(e.due_at))+" · "+s(a($)[e.kind]),1)],8,X))),128))])):p("",!0)])):p("",!0)]),_:1},8,["ready","error"])])}}});export{de as default}; diff --git a/public/assets/DeckViewer.vue_vue_type_style_index_0_lang-VLaT-7ba.js b/public/assets/DeckViewer.vue_vue_type_style_index_0_lang-CR_mIh7U.js similarity index 88% rename from public/assets/DeckViewer.vue_vue_type_style_index_0_lang-VLaT-7ba.js rename to public/assets/DeckViewer.vue_vue_type_style_index_0_lang-CR_mIh7U.js index c276471..d404656 100644 --- a/public/assets/DeckViewer.vue_vue_type_style_index_0_lang-VLaT-7ba.js +++ b/public/assets/DeckViewer.vue_vue_type_style_index_0_lang-CR_mIh7U.js @@ -1,9 +1,9 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/opsz-DD7j1RRT.css","assets/opsz-italic-l9KtpeZ8.css","assets/index-CtNAsql9.js","assets/index-D22Gy7R4.css","assets/summer-DcZGwnDj.css","assets/pptx-i3lkIKMN.js"])))=>i.map(i=>d[i]); -import{aO as w,d as yt,U as D,o as wt,Z as W,aK as zt,aT as St,aU as Et,c as b,s as _t,aV as Tt,aJ as Me,f as y,F as ke,b as f,t as T,p as I,C as Re,E as Ct,H as Oe,r as z,x as $,n as g,e as Lt}from"./index-CtNAsql9.js";import{c as Pt,a as He}from"./engine-DDeQk6Ow.js";const jt=':host{color-scheme:light dark;--deck-paper: #e9ebe3;--deck-paper-2: #dfe2d8;--deck-ink: #16201f;--deck-ink-2: #4b5551;--deck-rule: #b9beb3;--deck-empire: #b5302c;--deck-khaki: #7f7047;--deck-display: "Libre Caslon Display", "Times New Roman", Georgia, serif;--deck-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;--deck-mono: "Courier Prime", "Courier New", Courier, monospace}@media(prefers-color-scheme:dark){:host:not([data-theme=light]){--deck-paper: #141a18;--deck-paper-2: #1c2421;--deck-ink: #e4e4da;--deck-ink-2: #a7ada4;--deck-rule: #3a443f;--deck-empire: #e0675f;--deck-khaki: #c2ad72;color-scheme:dark}}:host[data-theme=dark]{--deck-paper: #141a18;--deck-paper-2: #1c2421;--deck-ink: #e4e4da;--deck-ink-2: #a7ada4;--deck-rule: #3a443f;--deck-empire: #e0675f;--deck-khaki: #c2ad72;color-scheme:dark}*{box-sizing:border-box}:host,.deck{height:100%;margin:0}.deck{position:relative;background:var(--deck-paper);color:var(--deck-ink);font-family:var(--deck-body);font-size:24px;line-height:1.4;overflow:hidden}h1,h2,h3{font-family:var(--deck-display);font-weight:400;margin:0;text-wrap:balance;line-height:1.08}p{margin:0}ul{margin:0;padding-left:1.1em}li{margin-block:.25em}li::marker{color:var(--deck-empire)}em{font-style:italic}strong{font-weight:600}a{color:inherit}.k{font-family:var(--deck-mono);font-size:.72em;letter-spacing:.08em;text-transform:uppercase;color:var(--deck-khaki)}.red{color:var(--deck-empire)}.muted{color:var(--deck-ink-2)}.small{font-size:.78em;line-height:1.35}.bib{font-size:17px;line-height:1.3;gap:36px}.bib li{margin-block:.2em}.bib .k{font-size:13px;margin-bottom:6px}#stage{position:absolute;left:50%;top:50%;width:1280px;height:720px;transform-origin:0 0}.slide{position:absolute;inset:0;display:none;padding:64px 88px 72px;background:var(--deck-paper);grid-template-rows:auto 1fr;gap:28px;overflow:hidden}[hidden]{display:none!important}.slide.on{display:grid}.slide.special{border-top:6px solid var(--deck-khaki)}.sp-close{position:absolute;top:18px;right:22px;width:44px;height:44px;border:1px solid var(--deck-rule);background:transparent;color:var(--deck-ink-2);font-size:28px;line-height:1;cursor:pointer}.sp-link{border-bottom:2px dotted var(--deck-empire);cursor:pointer}.slide>header{display:grid;gap:10px}.slide>header h2{font-size:50px}.slide .body{min-height:0;display:grid;gap:22px;align-content:start}.cols{display:grid;grid-template-columns:1fr 1fr;gap:44px;align-items:start}.cols>*{min-width:0}.cols.w{grid-template-columns:1.3fr 1fr}.rule-top{border-top:1px solid var(--deck-rule);padding-top:16px}.note{font-size:20px;color:var(--deck-ink-2);border-left:3px solid var(--deck-empire);padding-left:14px}.quote{font-family:var(--deck-display);font-size:34px;line-height:1.25}.quote+.k{margin-top:6px}.slide.sec{grid-template-rows:1fr;align-content:center;background:var(--deck-paper-2)}.slide.sec>div:not(.notes,.srcs,.speak) .k{font-size:20px}.slide.sec h2{font-size:72px;max-width:18ch;margin-top:12px}.slide.sec>div:not(.notes,.srcs,.speak) p{font-size:26px;color:var(--deck-ink-2);max-width:44ch;margin-top:22px}.slide.title{grid-template-rows:1fr auto;background:var(--deck-paper-2)}.slide.title h1{font-size:86px;max-width:14ch}.slide.title .sub{font-size:30px;color:var(--deck-ink-2);margin-top:20px;font-family:var(--deck-display)}.slide.title footer{display:flex;justify-content:space-between;align-items:end;border-top:1px solid var(--deck-rule);padding-top:18px;font-size:20px}.tl{display:grid;grid-template-columns:max-content 1fr;column-gap:26px;row-gap:8px;font-size:22px;align-content:start}.tl .y{font-family:var(--deck-mono);color:var(--deck-empire);font-variant-numeric:tabular-nums}.tl.compact{font-size:20px;row-gap:6px}table{border-collapse:collapse;width:100%;font-size:21px}th,td{text-align:left;vertical-align:top;padding:8px 12px 8px 0;border-bottom:1px solid var(--deck-rule)}th{font-family:var(--deck-mono);font-weight:400;font-size:16px;letter-spacing:.08em;text-transform:uppercase;color:var(--deck-khaki)}.people{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.p{border-top:2px solid var(--deck-empire);padding-top:10px;font-size:20px;line-height:1.35;min-width:0}.p b{display:block;font-family:var(--deck-display);font-weight:400;font-size:26px;margin-bottom:4px}.theses{display:grid;gap:18px;counter-reset:t}.theses>div{display:grid;grid-template-columns:56px 1fr;gap:14px;align-items:start}.theses>div:before{counter-increment:t;content:counter(t);font-family:var(--deck-display);font-size:48px;line-height:1;color:var(--deck-empire)}.theses b{font-weight:600}.body.v2{grid-template-rows:1fr;align-content:stretch;gap:20px}.body.v2>:first-child{align-self:start}.body.v2>.people+.cols{align-self:start}.pts{font-size:28px;line-height:1.3}.pts li{margin-block:.4em}.tl.big{font-size:26px;row-gap:10px}table.big{font-size:24px}.sum{font-family:var(--deck-display);font-size:30px;line-height:1.25;border-top:2px solid var(--deck-empire);padding-top:14px;align-self:end;text-wrap:balance}.body.v2 .p{font-size:22px}.body.v2 .theses{font-size:30px;gap:26px}.body.v2 .theses>div{align-items:center}.notes .full{opacity:.9}@media screen and (max-width:900px)and (orientation:portrait){.pts{font-size:17px}.tl.big{font-size:16px}table.big{font-size:15px}.sum{font-size:20px}.body.v2 .p{font-size:16px}}#bar{position:fixed;left:0;right:0;bottom:0;height:4px;background:var(--deck-rule)}#bar i{display:block;height:100%;width:0;background:var(--deck-empire);transition:width .25s}#meta{position:fixed;right:20px;bottom:12px;font-family:var(--deck-mono);font-size:14px;color:var(--deck-ink-2);letter-spacing:.06em}#meta b{font-weight:400;color:var(--deck-ink)}#sect{position:fixed;left:20px;bottom:12px;font-family:var(--deck-mono);font-size:14px;color:var(--deck-ink-2);letter-spacing:.08em;text-transform:uppercase}.notes,.srcs{display:none}.deck.notes-on .notes,.deck.srcs-on .srcs{display:block;position:absolute;left:0;right:0;bottom:0;max-height:46%;overflow:auto;background:var(--deck-ink);color:var(--deck-paper);padding:18px 88px;font-size:19px;line-height:1.45}.notes:before,.srcs:before{display:block;font-family:var(--deck-mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:6px;opacity:.7}.notes:before{content:"Komentarz · N"}.srcs:before{content:"Źródła · Z"}.srcs ul{margin:0;padding-left:1.1em}.srcs li+li{margin-top:.35em}.deck.notes-on .notes p+p{margin-top:.5em}.deck.notes-on #nav,.deck.srcs-on #nav{bottom:50%}#nav{position:fixed;inset:0;display:grid;grid-template-columns:1fr 2fr 1fr;overflow:hidden}#nav button{background:transparent;border:0;cursor:pointer;opacity:0;font-size:0;outline:none}#nav button:focus,#nav button:focus-visible{outline:none}#nav button:focus-visible{opacity:1;box-shadow:inset 4px 0 0 var(--deck-empire)}#nav button:last-of-type:focus-visible{box-shadow:inset -4px 0 0 var(--deck-empire)}#nav .mid{pointer-events:none}.status-retry{margin-top:28px;font:16px var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink);background:var(--deck-paper);border:1px solid var(--deck-rule);min-height:44px;padding:8px 16px;cursor:pointer}.status-retry:focus-visible{outline:3px solid var(--deck-empire)}.export-overlay{position:fixed;inset:0;z-index:20;display:grid;place-content:center;justify-items:center;gap:12px;background:var(--deck-paper);color:var(--deck-ink);font:16px/1.4 var(--deck-mono);text-align:center;padding:24px}@media screen and (max-width:900px)and (orientation:portrait){.deck{overflow:auto;font-size:17px}#stage{position:static;width:auto;height:auto;transform:none!important;padding:0 16px;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}.slide{position:static;display:grid!important;padding:28px 0;border-bottom:1px solid var(--deck-rule);gap:16px}.slide>header h2{font-size:30px}.slide.sec h2{font-size:36px}.slide.sec>div:not(.notes,.srcs,.speak) p{font-size:18px}.slide.title h1{font-size:40px}.slide.title .sub{font-size:20px}.slide.title footer{flex-direction:column;align-items:start;gap:6px;font-size:15px}.cols,.cols.w{grid-template-columns:1fr;gap:16px}.people{grid-template-columns:1fr}.tl,.tl.compact{font-size:16px}table{font-size:15px}.quote{font-size:22px}.note,.p{font-size:16px}.p b{font-size:20px}.theses>div{grid-template-columns:36px 1fr}.theses>div:before{font-size:30px}.notes,.srcs{display:block;margin-top:10px;padding:12px 14px;background:var(--deck-paper-2);font-size:15px;color:var(--deck-ink-2);border-left:3px solid var(--deck-khaki);position:static;max-height:none}.notes p+p{margin-top:.5em}.notes.is-empty,.srcs.is-empty{display:none}.slide.title :is(.notes,.srcs),.slide.sec :is(.notes,.srcs){background:var(--deck-paper)}.slide{overflow:visible}#bar,#meta,#sect,#nav,.sp-close,.tools,.tools-show{display:none}}@media print{:host,.deck{height:auto}.deck{overflow:visible}.deck,.slide{-webkit-print-color-adjust:exact;print-color-adjust:exact}#stage{display:contents;transform:none!important}#stage>.slide{position:relative;display:grid!important;width:1280px;height:720px;overflow:hidden;break-before:auto;break-after:auto;break-inside:avoid}#stage>.slide+.slide{break-before:page}#bar,#meta,#sect,#nav,.notes,.srcs,.sp-close,.tools,.tools-show,.export-overlay,.deck>.sr-only,#stage>.slide.special{display:none!important}.deck>.print-link{display:block;position:absolute;z-index:1;top:24px;right:32px;font:14px/1.3 var(--deck-mono);letter-spacing:.04em;color:var(--deck-khaki);text-decoration:underline;text-underline-offset:3px}}@media(prefers-reduced-motion:reduce){#bar i,.tools-show{transition:none}}.tools{position:fixed;z-index:6;top:0;left:0;right:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 24px;min-height:56px;padding:8px 16px;background:var(--deck-paper-2);border-bottom:1px solid var(--deck-rule)}.tools-group{display:flex;align-items:center;gap:8px}.tools-end{margin-left:auto}.tools-pos{font:14px/1 var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink-2);font-variant-numeric:tabular-nums;min-width:7ch}.tools button,.tools-show{font:14px/1 var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink);background:var(--deck-paper);border:1px solid var(--deck-ink-2);border-radius:0;min-height:40px;padding:0 16px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}.tools kbd,.tools-show kbd{font:inherit;color:var(--deck-empire)}.tools button:hover{border-color:var(--deck-empire)}.tools button:focus-visible,.tools-show:focus-visible,.sp-close:focus-visible{outline:3px solid var(--deck-empire);outline-offset:2px}.tools button[aria-pressed=true]{background:var(--deck-ink);border-color:var(--deck-ink);color:var(--deck-paper)}.tools button[aria-pressed=true] kbd{color:inherit}.tools button:disabled{opacity:.4;cursor:default}.tool-s.unavailable{visibility:hidden}.tools-show{position:fixed;z-index:6;top:8px;left:50%;transform:translate(-50%);min-height:32px;padding:0 8px;background:var(--deck-paper-2);border:1px solid var(--deck-rule);opacity:.55;transition:opacity .15s}.tools-show:hover,.tools-show:focus,.tools-show:focus-visible{opacity:1}.print-link{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.deck.notes-on .notes.is-empty:after{content:"Brak komentarza do tego slajdu.";opacity:.7}.deck.srcs-on .srcs.is-empty:after{content:"Brak źródeł do tego slajdu.";opacity:.7}@media(max-height:480px){.tools{flex-wrap:nowrap;overflow-x:auto;min-height:40px;padding:4px 16px}.tools-group{flex-wrap:nowrap}.tools button{min-height:32px;padding:0 8px;white-space:nowrap}}',$t=/^[a-z][a-z0-9-]*$/;function At(e){return`${e.special?'':""}${e.body_html}`}function Dt(e,t={}){const o=["slide"];for(const i of e.split(/\s+/))$t.test(i)&&o.push(i);return t.special&&o.push("special"),t.on&&o.push("on"),o.join(" ")}const It=["@import","expression(","url(","javascript:","vbscript:","data:","http:","https:","ftp:","file:"],Mt=new Set(["@font-face","@page","@counter-style","@font-palette-values","@property","@color-profile","@font-feature-values"]);function Be(e){return e===" "||e===" "||e===` -`||e==="\r"||e==="\f"}function Rt(e){return e?e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F":!1}function me(e){return e?e>="A"&&e<="Z"||e>="a"&&e<="z"||e>="0"&&e<="9"||e==="_"||e==="-"||e.charCodeAt(0)>=128:!1}function M(e,t){return e[t]==="/"&&e[t+1]==="*"}function R(e,t){for(t+=2;t+1e.length)break;o=i;continue}t+=e[o],o++}return t}function Ot(e){let t="";for(let o=0;o=e.length)break;const a=e[o+1];if(a===` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/opsz-DD7j1RRT.css","assets/opsz-italic-l9KtpeZ8.css","assets/index-BhVKyY57.js","assets/index-CrQqZK_d.css","assets/summer-DcZGwnDj.css","assets/pptx-B3Fp3Q3v.js"])))=>i.map(i=>d[i]); +import{aL as w,d as yt,U as D,o as wt,Z as W,b1 as zt,b8 as St,b9 as Et,c as b,s as _t,ba as Ct,aP as Me,f as y,F as ke,b as f,t as C,p as I,C as Re,E as Tt,H as He,r as z,x as A,n as g,e as Lt}from"./index-BhVKyY57.js";import{c as Pt,a as Oe}from"./engine-DDeQk6Ow.js";const jt=':host{color-scheme:light dark;--deck-paper: #e9ebe3;--deck-paper-2: #dfe2d8;--deck-ink: #16201f;--deck-ink-2: #4b5551;--deck-rule: #b9beb3;--deck-empire: #b5302c;--deck-khaki: #7f7047;--deck-display: "Libre Caslon Display", "Times New Roman", Georgia, serif;--deck-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;--deck-mono: "Courier Prime", "Courier New", Courier, monospace}@media(prefers-color-scheme:dark){:host:not([data-theme=light]){--deck-paper: #141a18;--deck-paper-2: #1c2421;--deck-ink: #e4e4da;--deck-ink-2: #a7ada4;--deck-rule: #3a443f;--deck-empire: #e0675f;--deck-khaki: #c2ad72;color-scheme:dark}}:host[data-theme=dark]{--deck-paper: #141a18;--deck-paper-2: #1c2421;--deck-ink: #e4e4da;--deck-ink-2: #a7ada4;--deck-rule: #3a443f;--deck-empire: #e0675f;--deck-khaki: #c2ad72;color-scheme:dark}*{box-sizing:border-box}:host,.deck{height:100%;margin:0}.deck{position:relative;background:var(--deck-paper);color:var(--deck-ink);font-family:var(--deck-body);font-size:24px;line-height:1.4;overflow:hidden}h1,h2,h3{font-family:var(--deck-display);font-weight:400;margin:0;text-wrap:balance;line-height:1.08}p{margin:0}ul{margin:0;padding-left:1.1em}li{margin-block:.25em}li::marker{color:var(--deck-empire)}em{font-style:italic}strong{font-weight:600}a{color:inherit}.k{font-family:var(--deck-mono);font-size:.72em;letter-spacing:.08em;text-transform:uppercase;color:var(--deck-khaki)}.red{color:var(--deck-empire)}.muted{color:var(--deck-ink-2)}.small{font-size:.78em;line-height:1.35}.bib{font-size:17px;line-height:1.3;gap:36px}.bib li{margin-block:.2em}.bib .k{font-size:13px;margin-bottom:6px}#stage{position:absolute;left:50%;top:50%;width:1280px;height:720px;transform-origin:0 0}.slide{position:absolute;inset:0;display:none;padding:64px 88px 72px;background:var(--deck-paper);grid-template-rows:auto 1fr;gap:28px;overflow:hidden}[hidden]{display:none!important}.slide.on{display:grid}.slide.special{border-top:6px solid var(--deck-khaki)}.sp-close{position:absolute;top:18px;right:22px;width:44px;height:44px;border:1px solid var(--deck-rule);background:transparent;color:var(--deck-ink-2);font-size:28px;line-height:1;cursor:pointer}.sp-link{border-bottom:2px dotted var(--deck-empire);cursor:pointer}.slide>header{display:grid;gap:10px}.slide>header h2{font-size:50px}.slide .body{min-height:0;display:grid;gap:22px;align-content:start}.cols{display:grid;grid-template-columns:1fr 1fr;gap:44px;align-items:start}.cols>*{min-width:0}.cols.w{grid-template-columns:1.3fr 1fr}.rule-top{border-top:1px solid var(--deck-rule);padding-top:16px}.note{font-size:20px;color:var(--deck-ink-2);border-left:3px solid var(--deck-empire);padding-left:14px}.quote{font-family:var(--deck-display);font-size:34px;line-height:1.25}.quote+.k{margin-top:6px}.slide.sec{grid-template-rows:1fr;align-content:center;background:var(--deck-paper-2)}.slide.sec>div:not(.notes,.srcs,.speak) .k{font-size:20px}.slide.sec h2{font-size:72px;max-width:18ch;margin-top:12px}.slide.sec>div:not(.notes,.srcs,.speak) p{font-size:26px;color:var(--deck-ink-2);max-width:44ch;margin-top:22px}.slide.title{grid-template-rows:1fr auto;background:var(--deck-paper-2)}.slide.title h1{font-size:86px;max-width:14ch}.slide.title .sub{font-size:30px;color:var(--deck-ink-2);margin-top:20px;font-family:var(--deck-display)}.slide.title footer{display:flex;justify-content:space-between;align-items:end;border-top:1px solid var(--deck-rule);padding-top:18px;font-size:20px}.tl{display:grid;grid-template-columns:max-content 1fr;column-gap:26px;row-gap:8px;font-size:22px;align-content:start}.tl .y{font-family:var(--deck-mono);color:var(--deck-empire);font-variant-numeric:tabular-nums}.tl.compact{font-size:20px;row-gap:6px}table{border-collapse:collapse;width:100%;font-size:21px}th,td{text-align:left;vertical-align:top;padding:8px 12px 8px 0;border-bottom:1px solid var(--deck-rule)}th{font-family:var(--deck-mono);font-weight:400;font-size:16px;letter-spacing:.08em;text-transform:uppercase;color:var(--deck-khaki)}.people{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.p{border-top:2px solid var(--deck-empire);padding-top:10px;font-size:20px;line-height:1.35;min-width:0}.p b{display:block;font-family:var(--deck-display);font-weight:400;font-size:26px;margin-bottom:4px}.theses{display:grid;gap:18px;counter-reset:t}.theses>div{display:grid;grid-template-columns:56px 1fr;gap:14px;align-items:start}.theses>div:before{counter-increment:t;content:counter(t);font-family:var(--deck-display);font-size:48px;line-height:1;color:var(--deck-empire)}.theses b{font-weight:600}.body.v2{grid-template-rows:1fr;align-content:stretch;gap:20px}.body.v2>:first-child{align-self:start}.body.v2>.people+.cols{align-self:start}.pts{font-size:28px;line-height:1.3}.pts li{margin-block:.4em}.tl.big{font-size:26px;row-gap:10px}table.big{font-size:24px}.sum{font-family:var(--deck-display);font-size:30px;line-height:1.25;border-top:2px solid var(--deck-empire);padding-top:14px;align-self:end;text-wrap:balance}.body.v2 .p{font-size:22px}.body.v2 .theses{font-size:30px;gap:26px}.body.v2 .theses>div{align-items:center}.notes .full{opacity:.9}@media screen and (max-width:900px)and (orientation:portrait){.pts{font-size:17px}.tl.big{font-size:16px}table.big{font-size:15px}.sum{font-size:20px}.body.v2 .p{font-size:16px}}#bar{position:fixed;left:0;right:0;bottom:0;height:4px;background:var(--deck-rule)}#bar i{display:block;height:100%;width:0;background:var(--deck-empire);transition:width .25s}#meta{position:fixed;right:20px;bottom:12px;font-family:var(--deck-mono);font-size:14px;color:var(--deck-ink-2);letter-spacing:.06em}#meta b{font-weight:400;color:var(--deck-ink)}#sect{position:fixed;left:20px;bottom:12px;font-family:var(--deck-mono);font-size:14px;color:var(--deck-ink-2);letter-spacing:.08em;text-transform:uppercase}.notes,.srcs{display:none}.deck.notes-on .notes,.deck.srcs-on .srcs{display:block;position:absolute;left:0;right:0;bottom:0;max-height:46%;overflow:auto;background:var(--deck-ink);color:var(--deck-paper);padding:18px 88px;font-size:19px;line-height:1.45}.notes:before,.srcs:before{display:block;font-family:var(--deck-mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:6px;opacity:.7}.notes:before{content:"Komentarz · N"}.srcs:before{content:"Źródła · Z"}.srcs ul{margin:0;padding-left:1.1em}.srcs li+li{margin-top:.35em}.deck.notes-on .notes p+p{margin-top:.5em}.deck.notes-on #nav,.deck.srcs-on #nav{bottom:50%}#nav{position:fixed;inset:0;display:grid;grid-template-columns:1fr 2fr 1fr;overflow:hidden}#nav button{background:transparent;border:0;cursor:pointer;opacity:0;font-size:0;outline:none}#nav button:focus,#nav button:focus-visible{outline:none}#nav button:focus-visible{opacity:1;box-shadow:inset 4px 0 0 var(--deck-empire)}#nav button:last-of-type:focus-visible{box-shadow:inset -4px 0 0 var(--deck-empire)}#nav .mid{pointer-events:none}.status-retry{margin-top:28px;font:16px var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink);background:var(--deck-paper);border:1px solid var(--deck-rule);min-height:44px;padding:8px 16px;cursor:pointer}.status-retry:focus-visible{outline:3px solid var(--deck-empire)}.export-overlay{position:fixed;inset:0;z-index:20;display:grid;place-content:center;justify-items:center;gap:12px;background:var(--deck-paper);color:var(--deck-ink);font:16px/1.4 var(--deck-mono);text-align:center;padding:24px}@media screen and (max-width:900px)and (orientation:portrait){.deck{overflow:auto;font-size:17px}#stage{position:static;width:auto;height:auto;transform:none!important;padding:0 16px;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}.slide{position:static;display:grid!important;padding:28px 0;border-bottom:1px solid var(--deck-rule);gap:16px}.slide>header h2{font-size:30px}.slide.sec h2{font-size:36px}.slide.sec>div:not(.notes,.srcs,.speak) p{font-size:18px}.slide.title h1{font-size:40px}.slide.title .sub{font-size:20px}.slide.title footer{flex-direction:column;align-items:start;gap:6px;font-size:15px}.cols,.cols.w{grid-template-columns:1fr;gap:16px}.people{grid-template-columns:1fr}.tl,.tl.compact{font-size:16px}table{font-size:15px}.quote{font-size:22px}.note,.p{font-size:16px}.p b{font-size:20px}.theses>div{grid-template-columns:36px 1fr}.theses>div:before{font-size:30px}.notes,.srcs{display:block;margin-top:10px;padding:12px 14px;background:var(--deck-paper-2);font-size:15px;color:var(--deck-ink-2);border-left:3px solid var(--deck-khaki);position:static;max-height:none}.notes p+p{margin-top:.5em}.notes.is-empty,.srcs.is-empty{display:none}.slide.title :is(.notes,.srcs),.slide.sec :is(.notes,.srcs){background:var(--deck-paper)}.slide{overflow:visible}#bar,#meta,#sect,#nav,.sp-close,.tools,.tools-show{display:none}}@media print{:host,.deck{height:auto}.deck{overflow:visible}.deck,.slide{-webkit-print-color-adjust:exact;print-color-adjust:exact}#stage{display:contents;transform:none!important}#stage>.slide{position:relative;display:grid!important;width:1280px;height:720px;overflow:hidden;break-before:auto;break-after:auto;break-inside:avoid}#stage>.slide+.slide{break-before:page}#bar,#meta,#sect,#nav,.notes,.srcs,.sp-close,.tools,.tools-show,.export-overlay,.deck>.sr-only,#stage>.slide.special{display:none!important}.deck>.print-link{display:block;position:absolute;z-index:1;top:24px;right:32px;font:14px/1.3 var(--deck-mono);letter-spacing:.04em;color:var(--deck-khaki);text-decoration:underline;text-underline-offset:3px}}@media(prefers-reduced-motion:reduce){#bar i,.tools-show{transition:none}}.tools{position:fixed;z-index:6;top:0;left:0;right:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 24px;min-height:56px;padding:8px 16px;background:var(--deck-paper-2);border-bottom:1px solid var(--deck-rule)}.tools-group{display:flex;align-items:center;gap:8px}.tools-end{margin-left:auto}.tools-pos{font:14px/1 var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink-2);font-variant-numeric:tabular-nums;min-width:7ch}.tools button,.tools-show{font:14px/1 var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink);background:var(--deck-paper);border:1px solid var(--deck-ink-2);border-radius:0;min-height:40px;padding:0 16px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}.tools kbd,.tools-show kbd{font:inherit;color:var(--deck-empire)}.tools button:hover{border-color:var(--deck-empire)}.tools button:focus-visible,.tools-show:focus-visible,.sp-close:focus-visible{outline:3px solid var(--deck-empire);outline-offset:2px}.tools button[aria-pressed=true]{background:var(--deck-ink);border-color:var(--deck-ink);color:var(--deck-paper)}.tools button[aria-pressed=true] kbd{color:inherit}.tools button:disabled{opacity:.4;cursor:default}.tool-s.unavailable{visibility:hidden}.tools-show{position:fixed;z-index:6;top:8px;left:50%;transform:translate(-50%);min-height:32px;padding:0 8px;background:var(--deck-paper-2);border:1px solid var(--deck-rule);opacity:.55;transition:opacity .15s}.tools-show:hover,.tools-show:focus,.tools-show:focus-visible{opacity:1}.print-link{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.deck.notes-on .notes.is-empty:after{content:"Brak komentarza do tego slajdu.";opacity:.7}.deck.srcs-on .srcs.is-empty:after{content:"Brak źródeł do tego slajdu.";opacity:.7}@media(max-height:480px){.tools{flex-wrap:nowrap;overflow-x:auto;min-height:40px;padding:4px 16px}.tools-group{flex-wrap:nowrap}.tools button{min-height:32px;padding:0 8px;white-space:nowrap}}',At=/^[a-z][a-z0-9-]*$/;function $t(e){return`${e.special?'':""}${e.body_html}`}function Dt(e,t={}){const o=["slide"];for(const i of e.split(/\s+/))At.test(i)&&o.push(i);return t.special&&o.push("special"),t.on&&o.push("on"),o.join(" ")}const It=["@import","expression(","url(","javascript:","vbscript:","data:","http:","https:","ftp:","file:"],Mt=new Set(["@font-face","@page","@counter-style","@font-palette-values","@property","@color-profile","@font-feature-values"]);function Be(e){return e===" "||e===" "||e===` +`||e==="\r"||e==="\f"}function Rt(e){return e?e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F":!1}function me(e){return e?e>="A"&&e<="Z"||e>="a"&&e<="z"||e>="0"&&e<="9"||e==="_"||e==="-"||e.charCodeAt(0)>=128:!1}function M(e,t){return e[t]==="/"&&e[t+1]==="*"}function R(e,t){for(t+=2;t+1e.length)break;o=i;continue}t+=e[o],o++}return t}function Ht(e){let t="";for(let o=0;o=e.length)break;const a=e[o+1];if(a===` `){o++;continue}if(a==="\r"){o++,e[o+1]===` `&&o++;continue}let l=o+1,c=0;for(;l0){t+=String.fromCodePoint(Number.parseInt(e.slice(o+1,l),16)),Be(e[l])&&(e[l]==="\r"&&e[l+1]===` -`?l+=2:l++),o=l-1;continue}t+=a,o++}return t}function ve(e){const t=Ot(he(e)).toLowerCase();let o="";for(const i of t)i<=" "||i.charCodeAt(0)<32||(o+=i);return o}function Z(e){const t=ve(e);if(!t)return!1;for(const o of It)if(t.includes(o))return!0;return t.includes("//")}function Ve(e){let t="",o=0,i=0;for(;ie.length)return!0;i=l;continue}const a=e[i];if(t){if(a==="\\"&&i+1="a"&&t[o]<="z"||t[o]>="0"&&t[o]<="9");)o++;return t.slice(0,o)}function xe(e){return Mt.has(q(e))}function Ht(e,t){const o=t;let i="",a=1;for(;te.length)return null;continue}const l=e[t];if(i){if(l==="\\"&&t+1e.length)return null;continue}const l=e[t];if(i){if(l==="\\"&&t+10){a--,t++;continue}if(a===0&&l==="{"){const c=Ht(e,t+1);return c?{item:{prelude:e.slice(o,t),block:c.block,braced:!0},next:c.end}:null}if(a===0&&l===";")return{item:{prelude:e.slice(o,t),block:"",braced:!1},next:t+1};t++}return null}function G(e){const t=[];let o=0;for(;o=e.length)break;const i=Nt(e,o);if(!i)break;t.push(i.item),o=i.next}return t}function Fe(e){const t=[];let o="",i="",a=0,l=0;for(;le.length){o+=e.slice(l);break}o+=e.slice(l,x),l=x;continue}const c=e[l];if(i){if(o+=c,c==="\\"&&l+10){a--,o+=c,l++;continue}if(c===";"&&a===0){t.push(o),o="",l++;continue}o+=c,l++}return o&&t.push(o),t}function Ne(e){const t=[];for(const o of Fe(e)){const i=o.trim();i&&(Ve(o)||Z(o)||t.push(i))}return t.length===0?"":`${t.join("; ")};`}function Kt(e){const t=e.prelude.trim();if(!t&&!e.braced||Z(t)||q(t)==="@import")return"";if(!e.braced)return Z(e.prelude)?"":`${t};`;if(Ve(e.block)&&Z(e.block))return"";let o="";return xe(t)?o=Ne(e.block):q(t).startsWith("@")?o=Ue(e.block):o=Ne(e.block),o.trim()?`${t} { ${o.trim()} }`:""}function Ue(e){const t=[];for(const o of G(e)){const i=Kt(o);i&&t.push(i)}return t.join(` -`)}function We(e,t){const o=e[t];let i=o;for(t++;te.length){t+=e.slice(o);break}t+=e.slice(o,a),o=a;continue}const i=e[o];if(i==='"'||i==="'"){const a=We(e,o);t+=a.text,o=a.next;continue}if(i==="["){const a=qt(e,o);t+=a.text,o=a.next;continue}if(e.slice(o,o+5).toLowerCase()===":root"&&!me(e[o+5])){t+=":host",o+=5;continue}if(e.slice(o,o+4).toLowerCase()==="body"&&!me(e[o+4])){const a=o===0?"":e[o-1];if(!me(a)&&a!=="."&&a!=="#"&&a!==":"&&a!=="@"){t+=".deck",o+=4;continue}}t+=i,o++}return t}function Vt(e){const t=e.prelude.trim();if(!e.braced)return t?`${t};`:"";const o=q(t);let i=t,a=e.block;return o.startsWith("@")?xe(t)||(a=Xe(e.block)):i=Bt(t),`${i} { ${a.trim()} }`}function Xe(e){const t=[];for(const o of G(e)){const i=Vt(o);i&&t.push(i)}return t.join(` -`)}function Ft(e){const t=ve(e);if(!t.startsWith("@media"))return null;const o=t.includes("prefers-color-scheme:dark"),i=t.includes("prefers-color-scheme:light");return o&&!i?"dark":i&&!o?"light":null}function ge(e,t){const o=[];for(const i of G(e)){const a=i.prelude.trim(),l=Ft(a);if(l){if(l===t&&i.braced){const x=ge(i.block,t).trim();x&&o.push(x)}continue}if(!i.braced){a&&o.push(`${a};`);continue}if(q(a).startsWith("@")&&!xe(a)){const x=ge(i.block,t).trim();x&&o.push(`${a} { ${x} }`);continue}o.push(`${a} { ${i.block.trim()} }`)}return o.join(` -`)}function B(e,t){return!e.trim()||t==="auto"?e.trim():ge(e,t).trim()}const be=["paper","paper-2","ink","ink-2","rule","empire","khaki"],Q={paper:"#141a18","paper-2":"#1c2421",ink:"#e4e4da","ink-2":"#a7ada4",rule:"#3a443f",empire:"#e0675f",khaki:"#c2ad72"},Ze={paper:"#e9ebe3","paper-2":"#dfe2d8",ink:"#16201f","ink-2":"#4b5551",rule:"#b9beb3",empire:"#b5302c",khaki:"#7f7047"};function Ge(e){return e==="light"?Ze:Q}function Qe(e,t=Ge(e)){const o=t;return[":host {",`--paper: ${o.paper}; --paper-2: ${o["paper-2"]}; --ink: ${o.ink}; --ink-2: ${o["ink-2"]};`,`--rule: ${o.rule}; --empire: ${o.empire}; --khaki: ${o.khaki};`,`--deck-paper: ${o.paper}; --deck-paper-2: ${o["paper-2"]}; --deck-ink: ${o.ink}; --deck-ink-2: ${o["ink-2"]};`,`--deck-rule: ${o.rule}; --deck-empire: ${o.empire}; --deck-khaki: ${o.khaki};`,`color-scheme: ${e};`,"}",".deck { background: var(--paper); color: var(--ink); }","#nav button:focus, #nav button:focus-visible { outline: none; }","#nav button:focus-visible { box-shadow: inset 4px 0 0 var(--empire, var(--deck-empire)); }","#nav button:last-of-type:focus-visible { box-shadow: inset -4px 0 0 var(--empire, var(--deck-empire)); }"].join(" ")}function Ye(e=Q){return Qe("dark",e)}Ye();function Ut(e=Q){const t={};for(const o of be)t[`--${o}`]=e[o];for(const o of be)t[`--deck-${o}`]=e[o];return t}const Wt=/^[#a-z0-9(),.%\s/-]+$/i;function Xt(e){return be.includes(e)}function Je(e,t){const o={...Ge(t)};for(const i of G(B(e,t)))if(!(!i.braced||he(i.prelude).trim()!==":host"))for(const a of Fe(i.block)){const l=he(a),c=l.indexOf(":");if(c<0)continue;const x=l.slice(0,c).trim(),C=l.slice(c+1).trim();if(!x.startsWith("--deck-"))continue;const _=x.slice(7);Xt(_)&&Wt.test(C)&&(o[_]=C)}return o}function Zt(e){return Je(e,"dark")}const Gt=/@media\s*\(\s*max-width\s*:\s*900px\s*\)\s*and\s*\(\s*orientation\s*:\s*portrait\s*\)/gi;function Qt(e){if(!e.trim())return"";const t=Ue(e).trim();return t?Xe(t).trim().replace(Gt,"@media screen and (max-width: 900px) and (orientation: portrait)"):""}const Yt=':host{--deck-paper: #e5eef0;--deck-paper-2: #d0e1e3;--deck-ink: #12303a;--deck-ink-2: #48646c;--deck-rule: #a8c1c5;--deck-empire: #b84e12;--deck-khaki: #17705f;--deck-contour: rgba(18, 48, 58, .13);--deck-display: "Fraunces Variable", "Fraunces", Georgia, "Times New Roman", serif;--deck-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace}@media(prefers-color-scheme:dark){:host{--deck-paper: #0d2b2a;--deck-paper-2: #092120;--deck-ink: #e2eeec;--deck-ink-2: #9bb8b4;--deck-rule: #2a4d4a;--deck-empire: #f09a5a;--deck-khaki: #7fd1bd;--deck-contour: rgba(226, 238, 236, .1)}}.slide{isolation:isolate}.slide h1,.slide h2{font-weight:500;letter-spacing:-.012em}.slide.title>div>.sub{font-style:italic}.slide.sec>div>.k{color:var(--deck-khaki)}.slide .tl{column-gap:0;row-gap:0}.slide .tl .y{position:relative;padding:8px 30px 8px 0;text-align:right;color:var(--deck-ink);border-right:2px solid var(--deck-empire)}.slide .tl .y:after{content:"";position:absolute;right:-8px;top:50%;width:10px;height:10px;margin-top:-7px;border-radius:50%;background:var(--deck-paper);border:2px solid var(--deck-empire)}.slide .tl>span:not(.y){padding:8px 0 8px 28px}.slide .sum{border-top:0;background:var(--deck-paper-2);padding:16px 22px}.slide .quote{font-style:italic}@media not screen and (max-width:900px)and (orientation:portrait){.slide:before{content:"";position:absolute;z-index:-1;right:-200px;top:-200px;width:560px;height:560px;border-radius:50%;background:repeating-radial-gradient(circle,transparent 0 22px,var(--deck-contour) 22px 23.5px)}.slide:is(.sec,.title):before{right:-160px;top:auto;bottom:-320px;width:960px;height:960px}.slide>header h2{font-size:52px}.slide.sec{align-items:center}.slide.title>div>h1{margin-top:22px}.slide .sum{font-size:28px}.slide .quote{font-size:38px}}@media print{.slide:before{content:none}.slide .sum{background:none}.slide .tl .y{border-right-color:#000}.slide .tl .y:after{background:#fff;border-color:#000}}',Jt=':host{--deck-paper: #f8f8f5;--deck-paper-2: #efeee8;--deck-ink: #1b1d22;--deck-ink-2: #5b5f69;--deck-rule: #d3d2ca;--deck-empire: #7a1f2b;--deck-khaki: #5b5f69;--deck-display: "Source Serif 4 Variable", "Source Serif 4", Georgia, "Times New Roman", serif;--deck-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace}@media(prefers-color-scheme:dark){:host{--deck-paper: #17181d;--deck-paper-2: #1e2027;--deck-ink: #ebe9e1;--deck-ink-2: #a4a7af;--deck-rule: #363944;--deck-empire: #e39aa3;--deck-khaki: #a4a7af}}.slide h1,.slide h2{font-weight:600;letter-spacing:-.015em}.slide .k{font-family:var(--deck-body);font-weight:500;letter-spacing:.16em}.slide>header{padding-bottom:22px;border-bottom:1px solid var(--deck-rule)}.slide.title>div>.sub{font-style:italic}.slide.sec>div>h2{font-style:italic;font-weight:400}.slide.sec>div>p:not(.k){font-family:var(--deck-display)}.slide li::marker{content:"– "}.slide :is(.notes,.srcs,.speak) li::marker{content:normal}.slide .tl .y{font-family:var(--deck-display);font-style:italic}.slide .sum{font-style:italic;border-top:0;border-left:2px solid var(--deck-empire);padding:2px 0 2px 22px}.slide .quote{font-style:italic}@media not screen and (max-width:900px)and (orientation:portrait){.slide{padding:72px 120px 80px}.slide .k{font-size:.64em}.slide .bib .k{font-size:13px}.slide>header{gap:12px}.slide>header h2{font-size:48px}.slide.title,.slide.sec{text-align:center;justify-items:center}.slide.sec{align-items:center}.slide :is(.notes,.srcs,.speak){text-align:left}.slide.title>div{align-self:center}.slide.title>div>h1{max-width:16ch;font-size:84px;margin-top:22px;margin-inline:auto}.slide.title>footer{width:100%;justify-content:center;gap:48px}.slide.sec>div>h2{font-size:88px;max-width:none;margin-top:0}.slide.sec>div>.k:after{content:"";display:block;width:64px;height:2px;background:var(--deck-empire);margin:20px auto 26px}.slide.sec>div>p:not(.k){margin-inline:auto}.slide .tl .y{font-size:1.06em}.slide .quote{font-size:40px}}',en=':host{--deck-paper: #f6f7fa;--deck-paper-2: #eceff4;--deck-ink: #1d2940;--deck-ink-2: #4c586d;--deck-rule: #c9d0dc;--deck-empire: #9a6200;--deck-khaki: #7c5100;--deck-card: #ffffff;--deck-line: rgba(29, 41, 64, .12);--deck-pill: rgba(154, 98, 0, .08);--deck-pill-line: rgba(154, 98, 0, .35);--deck-ray: rgba(29, 41, 64, .05);--deck-glow: rgba(245, 197, 90, .4);--deck-shadow: 0 24px 60px -30px rgba(29, 41, 64, .35);--deck-display: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;--deck-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;--deck-mono: "Roboto Mono", ui-monospace, Menlo, Consolas, monospace}@media(prefers-color-scheme:dark){:host{--deck-paper: #233148;--deck-paper-2: #1d2940;--deck-ink: #e9edf3;--deck-ink-2: #b3bccb;--deck-rule: #3e4a5f;--deck-empire: #f5c55a;--deck-khaki: #fbd77e;--deck-card: #29344a;--deck-line: rgba(255, 255, 255, .1);--deck-pill: rgba(245, 197, 90, .08);--deck-pill-line: rgba(245, 197, 90, .35);--deck-ray: rgba(255, 255, 255, .035);--deck-glow: rgba(245, 197, 90, .16);--deck-shadow: 0 40px 100px -40px rgba(0, 0, 0, .6)}}.slide{isolation:isolate}.slide h1,.slide h2{font-weight:700;letter-spacing:-.02em}.slide h3,.slide strong,.slide b{font-weight:600}.slide .k{font-weight:500;letter-spacing:.06em}.slide>header>.k,.slide:is(.sec,.title)>div:not(.notes,.srcs,.speak)>.k{font-family:var(--deck-body);letter-spacing:.16em;color:var(--deck-empire)}.slide.title>div:not(.notes,.srcs,.speak)>.sub{font-family:var(--deck-body);font-weight:300}.slide.title>footer .k{color:var(--deck-khaki)}.slide.sec>div:not(.notes,.srcs,.speak)>p:not(.k){font-weight:300}.slide .tl .y{justify-self:stretch;align-self:baseline;text-align:center;white-space:nowrap;line-height:1.3;font-family:var(--deck-body);font-variant-numeric:tabular-nums;font-weight:500;color:var(--deck-empire);background:var(--deck-pill);border:1px solid var(--deck-pill-line);border-radius:999px;padding:0 .6em}.slide .tl>span:not(.y){align-self:baseline}.slide .sum{font-family:var(--deck-body);font-weight:500;border-top:0;background:var(--deck-card);border:1px solid var(--deck-line);border-radius:16px;padding:14px 24px}.slide .p{border-top:0;background:var(--deck-card);border:1px solid var(--deck-line);border-radius:16px;padding:18px 24px}.slide .p b{font-family:var(--deck-display);font-weight:700;letter-spacing:-.01em;line-height:1.15}.slide .note{border-left-color:var(--deck-empire)}.slide .theses>div:before{font-weight:700;color:var(--deck-empire)}.slide th{font-weight:500}.slide figure img{border-radius:12px;box-shadow:var(--deck-shadow)}.slide figcaption{margin-top:8px}.slide .quote{font-weight:300}@media not screen and (max-width:900px)and (orientation:portrait){.slide:is(.sec,.title):before{content:"";position:absolute;z-index:-1;inset:-40% -20%;background:radial-gradient(circle at 80% 50%,var(--deck-glow),transparent 30%),repeating-conic-gradient(from 0deg at 80% 50%,var(--deck-ray) 0deg 7deg,transparent 7deg 15deg);-webkit-mask-image:radial-gradient(circle at 80% 50%,#000 12%,transparent 58%);mask-image:radial-gradient(circle at 80% 50%,#000 12%,transparent 58%)}.slide.title:after{content:"";position:absolute;z-index:-1;left:80%;top:44%;width:168px;height:168px;margin:-84px 0 0 -84px;border-radius:50%;background:radial-gradient(circle at 50% 35%,#fde9b4,#f5c55a 62%,#e9a93a);box-shadow:0 0 0 18px #f5c55a1a,0 0 120px 20px #f5c55a4d}.slide>header{gap:12px}.slide>header .k{font-size:17px}.slide>header h2{font-size:50px;line-height:1.1}.slide.sec>div:not(.notes,.srcs,.speak)>.k{font-size:17px}.slide.sec>div:not(.notes,.srcs,.speak)>h2{font-size:76px;max-width:15ch;margin-top:16px;line-height:1.04}.slide.sec>div:not(.notes,.srcs,.speak)>p:not(.k){font-size:28px;max-width:34ch}.slide.title>div:not(.notes,.srcs,.speak){align-self:center}.slide.title>div:not(.notes,.srcs,.speak)>.k{font-size:17px}.slide.title>div:not(.notes,.srcs,.speak)>h1{font-size:104px;line-height:1;margin-top:18px;letter-spacing:-.03em}.slide.title>div:not(.notes,.srcs,.speak)>.sub{font-size:32px;max-width:32ch;line-height:1.3;margin-top:24px}.slide.title>footer{font-size:20px}.slide .tl{column-gap:22px}.slide .tl .y{font-size:.8em}.slide .sum{font-size:27px;line-height:1.3}.slide .quote{font-size:38px}}@media print{.slide:before,.slide:after{content:none}.slide .sum,.slide .p,.slide .tl .y{background:none;border-color:#000}.slide figure img{box-shadow:none}}',tn=':host{--deck-paper: #eef1f2;--deck-paper-2: #dde4e7;--deck-ink: #131c2b;--deck-ink-2: #4a586b;--deck-rule: #b4c0c9;--deck-empire: #a85f00;--deck-khaki: #1d6a78;--deck-grid: rgba(19, 28, 43, .06);--deck-display: "Archivo Narrow", "Arial Narrow", Arial, sans-serif;--deck-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace}@media(prefers-color-scheme:dark){:host{--deck-paper: #131c2b;--deck-paper-2: #0d1420;--deck-ink: #e7ecf0;--deck-ink-2: #94a3b5;--deck-rule: #2b3a50;--deck-empire: #f2b23e;--deck-khaki: #72c6cf;--deck-grid: rgba(231, 236, 240, .05)}}.slide{background-image:linear-gradient(var(--deck-grid) 1px,transparent 1px),linear-gradient(90deg,var(--deck-grid) 1px,transparent 1px);background-size:40px 40px}.slide h1,.slide h2{font-weight:700;line-height:1;letter-spacing:-.005em}.slide>header{border-left:6px solid var(--deck-empire);padding-left:20px}.slide.title>div:not(.notes,.srcs,.speak)>h1,.slide.sec>div:not(.notes,.srcs,.speak)>h2{text-transform:uppercase}.slide.title>div:not(.notes,.srcs,.speak)>.sub{font-family:var(--deck-body)}.slide.sec>div:not(.notes,.srcs,.speak)>.k{color:var(--deck-empire)}.slide ul{list-style:square}.slide .tl{column-gap:0;row-gap:0}.slide .tl>span{padding:9px 0;border-bottom:1px solid var(--deck-rule)}.slide .tl .y{padding-right:26px;font-weight:500}.slide .sum{font-family:var(--deck-body);font-weight:500;border:1px solid var(--deck-empire);padding:14px 18px;background:var(--deck-paper-2)}.slide .sum:before{content:"Wniosek";display:block;font:500 14px var(--deck-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--deck-empire);margin-bottom:6px}.slide .quote{font-family:var(--deck-body);font-weight:500}@media not screen and (max-width:900px)and (orientation:portrait){.slide>header h2{font-size:58px}.slide.title>div:not(.notes,.srcs,.speak)>h1{font-size:104px;max-width:15ch}.slide.sec>div:not(.notes,.srcs,.speak)>h2{font-size:112px;max-width:14ch}.slide.title>div:not(.notes,.srcs,.speak)>.sub{font-size:28px}.slide .sum{font-size:25px}.slide .quote{font-size:33px}}@media print{.slide{background-image:none}.slide .sum{background:none;border-color:#000}.slide .sum:before{color:#000}}',et="screen and (max-width: 900px) and (orientation: portrait)";function nn(e){return e(et).matches}function Ke(e,t,o){if(e==="reading")return t;for(const i of o)if(i.bottom>0)return i.id;return t}function on(e){return e.complete?Promise.resolve():new Promise(t=>{const o=()=>t();e.addEventListener("load",o,{once:!0}),e.addEventListener("error",o,{once:!0})})}async function qe(e,t){t.scrollTo(e),await Promise.all(t.imagesBefore(e).map(on)),t.scrollTo(e)}function X(e,t,o){return{key:e,sheet:B(t,"dark"),dark:Zt(t),lightSheet:B(t,"light"),light:Je(t,"light"),loadFonts:o}}const rn=new Map([["atlas",X("atlas",Yt,()=>Promise.all([w(()=>Promise.resolve({}),__vite__mapDeps([0])),w(()=>Promise.resolve({}),__vite__mapDeps([1])),w(()=>import("./index-CtNAsql9.js").then(e=>e.a$),__vite__mapDeps([2,3])),w(()=>import("./index-CtNAsql9.js").then(e=>e.b0),__vite__mapDeps([2,3]))]))],["monografia",X("monografia",Jt,()=>Promise.all([w(()=>import("./index-CtNAsql9.js").then(e=>e.aZ),__vite__mapDeps([2,3])),w(()=>import("./index-CtNAsql9.js").then(e=>e.a_),__vite__mapDeps([2,3])),w(()=>import("./index-CtNAsql9.js").then(e=>e.a$),__vite__mapDeps([2,3])),w(()=>import("./index-CtNAsql9.js").then(e=>e.b0),__vite__mapDeps([2,3]))]))],["summer",X("summer",en,()=>w(()=>Promise.resolve({}),__vite__mapDeps([4])))],["sztab",X("sztab",tn,()=>Promise.all([w(()=>import("./index-CtNAsql9.js").then(e=>e.aX),__vite__mapDeps([2,3])),w(()=>import("./index-CtNAsql9.js").then(e=>e.aY),__vite__mapDeps([2,3])),w(()=>import("./index-CtNAsql9.js").then(e=>e.a$),__vite__mapDeps([2,3])),w(()=>import("./index-CtNAsql9.js").then(e=>e.b0),__vite__mapDeps([2,3]))]))]]);function sn(e){return typeof e!="string"||e===""?null:rn.get(e)??null}function an(e,t,o,i="dark"){const a=i==="light";return[B(e,i),t?a?t.lightSheet:t.sheet:"",...o,a?Qe("light",t?t.light:void 0):Ye(t?t.dark:void 0)].filter(l=>!!l)}function ln(e,t){return t==="light"?e?e.light:Ze:e?e.dark:Q}const dn=["data-theme","aria-busy"],cn={key:0,class:"tools",role:"group","aria-label":"Sterowanie prezentacją"},pn={class:"tools-group"},un={class:"tools-pos","aria-hidden":"true"},fn=["aria-pressed"],kn=["aria-pressed"],mn=["aria-pressed"],hn={class:"tools-group tools-end"},gn=["aria-pressed"],bn=["disabled"],vn={id:"stage"},xn={key:1,class:"slide sec on","aria-busy":"true"},yn={key:2,class:"slide sec on"},wn={key:3,class:"slide sec on"},zn={key:4,class:"slide sec on"},Sn=["id","innerHTML"],En={key:2,id:"bar"},_n=["innerHTML"],Tn={key:4,id:"sect"},Cn={key:5,id:"nav"},Ln={key:6,class:"export-overlay",role:"status","aria-live":"polite"},Pn={key:0},jn=["href"],$n=["href"],An={key:9,class:"sr-only","aria-live":"polite"},Mn=yt({__name:"DeckViewer",props:{phase:{},deck:{},error:{},mode:{},compose:{type:Function},labels:{},announce:{type:Function},extraCss:{},theme:{},images:{},noToolbar:{type:Boolean}},emits:["retry","position","navigate","clock","snapshot","scheme"],setup(e,{expose:t,emit:o}){const i=e,a=o,l=z(null),c=z(null),x=z(null),C=z(0),_=z(""),Y=z(!1),O=z(""),ye=$(()=>i.deck?.slides?.length??0),J=z(!1),A=z(!0),h=z(null),H=z("");let u=null,V=null,ee=null,F=null,te=null,N=null,K=[],L="";const ne=$(()=>sn(i.theme)),P=$(()=>A.value?"dark":"light"),tt=new Set(["ArrowUp","ArrowDown","PageUp","PageDown"," ","Home","End"]);function nt(n){return{body_html:n.body_html,sources_html:n.sources_html,comment_html:"comment_html"in n?n.comment_html:"",say_html:"say_html"in n?n.say_html:"",notes_html:"notes_html"in n?n.notes_html:""}}function ot(n,r){const s=nt(n);return i.compose?i.compose(s,r):At({body_html:s.body_html,comment_html:s.comment_html??"",sources_html:s.sources_html,special:r})}function S(){return nn(n=>window.matchMedia(n))}D(()=>[i.phase,i.deck],()=>{if(L="",K=[],i.phase!=="ready"||!i.deck||i.deck.slides.length===0){u=null,C.value++;return}u=Pt({slides:i.deck.slides.map(n=>({number:n.number,hasSpecial:n.special!=null})),history:window.history,hash:window.location.hash,mode:i.mode==="speaker"?"speaker":"public",onChange:()=>{C.value++},onNavigate:n=>{a("navigate",n)}}),a("position",u.snapshot().index),C.value++},{immediate:!0});const m=$(()=>(C.value,u?.snapshot()??null)),U=$(()=>{const n=i.deck?.slides??[],r=new Set(m.value?.on??[]),s=[];for(const d of n){const p=String(d.number);if(s.push({id:p,slide:d,special:!1,on:r.has(p)}),d.special){const k=`${d.number}s`;s.push({id:k,slide:d.special,special:!0,on:r.has(k)})}}return s}),it=$(()=>{const n=m.value,r=i.deck?.slides.length??0;return!n||!r?"":`${n.index+1} / ${r}`}),rt=$(()=>{const n=m.value,r=i.deck?.slides;if(!n||!r)return"";const s=r[n.index];return s?n.special&&s.special?s.special.section_label:s.section_label:""});function st(){const n=i.extraCss,r=Array.isArray(n)?n:n?[n]:[],s=[];for(const d of r){if(!d)continue;const p=B(Qt(d),P.value);p&&s.push(p)}return s}function oe(n){const r=an(jt,ne.value,st(),P.value);try{n.adoptedStyleSheets=r.map(s=>{const d=new CSSStyleSheet;return d.replaceSync(s),d})}catch{n.querySelectorAll("style[data-deck-style]").forEach(s=>s.remove());for(const s of r){const d=document.createElement("style");d.dataset.deckStyle="1",d.textContent=s,n.appendChild(d)}}}function ie(){const n=l.value;if(n){for(const[r,s]of Object.entries(Ut(ln(ne.value,P.value))))n.style.setProperty(r,s);n.style.colorScheme=P.value,n.dataset.theme=P.value,document.documentElement.dataset.theme=P.value,document.documentElement.style.colorScheme=P.value}}function re(){i.mode==="speaker"&&(A.value=!A.value,ie(),c.value&&oe(c.value),a("scheme",!A.value))}function E(){const n=c.value?.getElementById("stage"),r=l.value;if(!n||!r)return;const s=c.value?.getElementById("nav");if(S()){n.style.transform="",s&&(s.style.top="");return}const d=c.value?.querySelector(".tools"),p=d instanceof HTMLElement?d.getBoundingClientRect().height:0,k=Math.max(0,window.innerHeight-p),v=Math.min(window.innerWidth/1280,k/720),pe=p/2;n.style.transform=`translate(${-640*v}px, ${-360*v+pe}px) scale(${v})`,s&&(s.style.top=`${p}px`)}function se(){F?.disconnect();const n=c.value?.querySelector(".tools");n&&F?.observe(n)}function at(){const n=c.value;if(!n)return;const r=i.images;n.querySelectorAll("img[data-deck-image]").forEach(s=>{if(!(s instanceof HTMLImageElement))return;const d=s.getAttribute("data-deck-image")??"",p=d&&r?r[d]:void 0;if(!p){s.removeAttribute("src");return}s.getAttribute("src")!==p&&s.setAttribute("src",p)})}function we(){const n=c.value,r=x.value;if(!n||!r)return;const s=u?.snapshot().panel??null;if(r.classList.toggle("speaker",i.mode==="speaker"),r.classList.toggle("notes-on",s==="notes"),r.classList.toggle("srcs-on",s==="srcs"),r.classList.toggle("speak-on",s==="say"),n.querySelectorAll("aside.notes, aside.srcs, aside.speak").forEach(p=>{const k=(p.textContent??"").replace(/\u00a0/g," ").trim()==="";p.classList.toggle("is-empty",k),p.removeAttribute("tabindex"),p.removeAttribute("role"),p.removeAttribute("aria-label")}),s){const p=s==="notes"?"notes":s==="srcs"?"srcs":"speak",k=s==="notes"?i.labels?.notes??"Komentarz":s==="srcs"?i.labels?.sources??"Źródła":i.labels?.say??"",v=n.querySelector(`.slide.on aside.${p}`);v&&(v.setAttribute("tabindex","0"),v.setAttribute("role","region"),v.setAttribute("aria-label",k))}const d=i.labels?.specialLink??"Slajd dodatkowy (S)";n.querySelectorAll(".sp-link").forEach(p=>{p.setAttribute("title",d)})}function ze(){return c.value?.activeElement??document.activeElement}function lt(){const r=ze()?.closest?.(".notes, .srcs, .speak");return r instanceof HTMLElement?r:null}function dt(n,r){const d=n.clientHeight;r==="ArrowDown"?n.scrollTop+=40:r==="ArrowUp"?n.scrollTop-=40:r==="PageDown"||r===" "?n.scrollTop+=d:r==="PageUp"?n.scrollTop-=d:r==="Home"?n.scrollTop=0:r==="End"&&(n.scrollTop=n.scrollHeight)}function ct(){window.print()}async function Se(){if(h.value||!u||i.phase!=="ready"||!i.deck||!c.value||S())return;const n=i.deck,r=new Map(U.value.map(k=>[k.id,k])),s=[];for(const k of c.value.querySelectorAll("#stage > section.slide")){const v=r.get(k.id);v&&s.push({el:k,slide:v.slide,special:v.special})}if(!s.length)return;const d=u,p=d.snapshot().panel;p&&d.togglePanel(p),H.value="",h.value={done:0,total:s.length},await W();try{const{exportDeck:k,downloadPptx:v,pptxFileName:pe}=await w(async()=>{const{exportDeck:ue,downloadPptx:fe,pptxFileName:xt}=await import("./pptx-i3lkIKMN.js");return{exportDeck:ue,downloadPptx:fe,pptxFileName:xt}},__vite__mapDeps([5,2,3])),Ie=i.mode==="speaker"?"speaker":"public",vt=await k({title:n.title,mode:Ie,sections:s,onProgress:(ue,fe)=>{h.value={done:ue,total:fe}}});v(vt,pe(n.title,Ie))}catch(k){H.value=k instanceof Error&&k.message?k.message:"Nieznany błąd"}finally{const k=new Map(U.value.map(v=>[v.id,v.on]));for(const{el:v}of s)v.classList.toggle("on",k.get(v.id)??!1);u===d&&p&&d.snapshot().panel!==p&&d.togglePanel(p),h.value=null,le()}}function ae(){document.fullscreenEnabled&&(document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()?.catch(()=>{}))}function Ee(n){return n!=="pause"&&n!=="clock"&&n!=="reset"?!1:(a("clock",n),!0)}function _e(n){if(h.value||!u||i.phase!=="ready")return;const s=!!ze()?.closest("button"),d=lt(),p=He(u,{key:n.key,ctrlKey:n.ctrlKey,metaKey:n.metaKey,altKey:n.altKey,targetIsButton:s,targetIsPanel:!!d,reading:S()});if(p==="fullscreen"){n.preventDefault(),ae();return}if(p==="scheme"){n.preventDefault(),re();return}if(Ee(p)){n.preventDefault();return}if(p==="ignored"){if(s&&(n.key===" "||n.key==="Enter"))return;d&&tt.has(n.key)&&!n.ctrlKey&&!n.metaKey&&!n.altKey&&!S()&&(n.preventDefault(),dt(d,n.key));return}n.preventDefault()}function pt(n){if(h.value||!u||i.phase!=="ready"||i.mode!=="speaker"||n.toLowerCase()==="f")return"ignored";const r=He(u,{key:n,reading:S()});return r==="fullscreen"?"ignored":(Ee(r),r==="scheme"&&re(),r)}function ut(n){if(h.value||!u||i.phase!=="ready"||i.mode!=="speaker"||!i.deck||S())return!1;const r=i.deck.slides.findIndex(s=>s.number===n);return r<0?!1:(u.go(r),!0)}function ft(n,r,s=null){if(h.value||!u||i.phase!=="ready"||!i.deck)return!1;const d=i.deck.slides.find(k=>k.number===n);if(!d)return!1;u.showId(r&&d.special?`${n}s`:String(n));const p=u.snapshot().panel;return s!==p&&u.togglePanel(s??p),!0}function kt(){if(!u||i.phase!=="ready")return null;const n=u.snapshot();return{number:n.number,special:n.special,panel:n.panel}}function mt(){return[...c.value?.querySelectorAll("#stage > section.slide")??[]]}t({runKey:pt,goToNumber:ut,showSlide:ft,current:kt,sections:mt});function le(){h.value||!u||window.location.hash!==u.snapshot().hash&&u.followHash(window.location.hash)}function Te(){J.value=document.fullscreenElement!=null,E()}function ht(n){if(h.value||!(n instanceof MouseEvent)||!u||S())return;const r=n.target instanceof Element?n.target:null;if(n.detail>0){const d=r?.closest("#nav button");d instanceof HTMLElement&&d.blur()}if(r?.closest(".tools, .tools-show, #speaker-clock, .export-overlay"))return;const s=c.value;if(s){for(const d of s.elementsFromPoint(n.clientX,n.clientY))if(d instanceof Element){if(d.classList.contains("sp-link")){n.preventDefault(),n.stopPropagation(),u.openSpecial();return}if(d.classList.contains("sp-close")){n.preventDefault(),n.stopPropagation(),u.closeSpecial();return}}}}function Ce(n){V=n.touches[0]?.clientX??null}function Le(n){if(h.value||V==null||!u)return;const r=V;V=null;const s=n.changedTouches[0]?.clientX;s!=null&&u.swipe(s-r,S())}function de(n){h.value||u?.togglePanel(n)}function Pe(){h.value||u?.toggleSpecial()}function ce(){h.value||u?.toggleToolbar()}function gt(){h.value||u?.previous()}function bt(){h.value||u?.next()}function je(){const n=c.value;return n?[...n.querySelectorAll("section.slide")].flatMap(r=>!(r instanceof HTMLElement)||!r.id?[]:[{id:r.id,bottom:r.getBoundingClientRect().bottom}]):[]}function j(){if(!S())return;const n=je();n.length&&(K=n)}const $e={scrollTo(n){c.value?.getElementById(n)?.scrollIntoView({block:"start"})},imagesBefore(n){const r=c.value;if(!r)return[];const s=[...r.querySelectorAll("section.slide")],d=s.findIndex(k=>k.id===n);if(d<=0)return[];const p=[];for(let k=0;kj()))}function De(){if(!u||i.phase!=="ready"||!N)return;const n=u.snapshot().on[0]??"";if(!n)return;if(N.matches){const s=Ke("reading",n,K);L="",W(()=>{j(),L=s,qe(s,$e).then(()=>j())});return}const r=Ke("slide",n,K.length?K:je());L="",u.showId(r),E()}return wt(()=>{const n=l.value;if(!n)return;Y.value=document.fullscreenEnabled,O.value=window.location.origin+window.location.pathname;const r=n.attachShadow({mode:"open"});c.value=r,ie(),oe(r);const s=document.createElement("div");s.className="deck",r.appendChild(s),x.value=s,r.addEventListener("click",ht,!0),window.addEventListener("hashchange",le),window.addEventListener("keydown",_e),window.addEventListener("resize",E),window.addEventListener("scroll",j,!0),window.addEventListener("touchstart",Ce,{passive:!0}),window.addEventListener("touchend",Le,{passive:!0}),document.addEventListener("fullscreenchange",Te),N=window.matchMedia(et),N.addEventListener("change",De),ee=new ResizeObserver(()=>E()),ee.observe(n),F=new ResizeObserver(()=>E()),te=new MutationObserver(()=>{se(),E()}),te.observe(s,{childList:!0,subtree:!0}),W(()=>{we(),se(),E(),j(),Ae()})}),zt(()=>{window.removeEventListener("hashchange",le),window.removeEventListener("keydown",_e),window.removeEventListener("resize",E),window.removeEventListener("scroll",j,!0),window.removeEventListener("touchstart",Ce),window.removeEventListener("touchend",Le),document.removeEventListener("fullscreenchange",Te),N?.removeEventListener("change",De),ee?.disconnect(),F?.disconnect(),te?.disconnect(),St(Et()),document.documentElement.style.removeProperty("color-scheme")}),D([()=>i.extraCss,()=>i.theme],()=>{ie(),c.value&&oe(c.value)}),D(ne,n=>{n?.loadFonts().catch(()=>{})},{immediate:!0}),D(m,n=>{n&&a("snapshot",n)}),D(m,(n,r)=>{if(!n){_.value="";return}if(!r||n.number!==r.number||n.special!==r.special){if(i.announce){_.value=i.announce({number:n.number,total:n.total,special:n.special});return}n.special&&!r?.special?_.value=`Slajd dodatkowy do slajdu ${n.number}`:_.value=`Slajd ${n.number} z ${n.total}`}},{immediate:!0}),D([()=>i.phase,U,m,()=>i.images],()=>{W(()=>{we(),at(),se(),E();const n=u?.snapshot().on[0]??"";n&&n!==L?Ae():j()})}),(n,r)=>(g(),b("div",{ref_key:"host",ref:l,class:"deck-host","data-theme":A.value?"dark":"light","aria-busy":e.phase==="loading"?"true":void 0},[x.value?(g(),_t(Tt,{key:0,to:x.value},[e.phase==="ready"&&m.value&&e.mode==="speaker"?Me(n.$slots,"tools",{panel:m.value.panel,special:m.value.special,hasSpecial:m.value.hasSpecial,fullscreenEnabled:Y.value,fullscreenOn:J.value,toolbarHidden:m.value.toolbarHidden,togglePanel:de,toggleSpecial:Pe,toggleToolbar:ce,toggleFullscreen:ae,light:!A.value,toggleScheme:re,exportPptx:Se,exporting:h.value!=null},void 0,void 0,0):y("",!0),e.phase==="ready"&&m.value&&e.mode!=="speaker"&&!e.noToolbar?(g(),b(ke,{key:1},[m.value.toolbarHidden?y("",!0):(g(),b("div",cn,[f("div",pn,[f("span",un,T(it.value),1),f("button",{type:"button","aria-pressed":m.value.panel==="notes","aria-keyshortcuts":"N",onClick:r[0]||(r[0]=s=>de("notes"))},[...r[4]||(r[4]=[I(" Komentarz ",-1),f("kbd",null,"N",-1)])],8,fn),f("button",{type:"button","aria-pressed":m.value.panel==="srcs","aria-keyshortcuts":"Z",onClick:r[1]||(r[1]=s=>de("srcs"))},[...r[5]||(r[5]=[I(" Źródła ",-1),f("kbd",null,"Z",-1)])],8,kn),f("button",{type:"button",class:Re(["tool-s",{unavailable:!m.value.hasSpecial}]),"aria-pressed":m.value.special,"aria-keyshortcuts":"S",onClick:Pe},[...r[6]||(r[6]=[I(" Slajd dodatkowy ",-1),f("kbd",null,"S",-1)])],10,mn)]),f("div",hn,[Y.value?(g(),b("button",{key:0,type:"button","aria-pressed":J.value,"aria-keyshortcuts":"F",onClick:ae},[...r[7]||(r[7]=[I(" Pełny ekran ",-1),f("kbd",null,"F",-1)])],8,gn)):y("",!0),f("button",{type:"button",title:"Drukuj albo zapisz jako PDF, slajd na stronę",onClick:ct}," PDF "),f("button",{type:"button",disabled:h.value!=null,title:"Pobierz jako PowerPoint: slajd jako obraz, komentarz i źródła w notatkach",onClick:Se}," PPTX ",8,bn),f("button",{type:"button","aria-keyshortcuts":"H",onClick:ce},[...r[8]||(r[8]=[I(" Ukryj pasek ",-1),f("kbd",null,"H",-1)])])])])),m.value.toolbarHidden?(g(),b("button",{key:1,type:"button",class:"tools-show","aria-keyshortcuts":"H",onClick:ce},[...r[9]||(r[9]=[I(" Pokaż pasek ",-1),f("kbd",null,"H",-1)])])):y("",!0)],64)):y("",!0),f("div",vn,[e.mode==="speaker"&&e.phase==="ready"?Me(n.$slots,"reading-close",{},void 0,void 0,0):y("",!0),e.phase==="loading"?(g(),b("section",xn,[...r[10]||(r[10]=[f("div",null,[f("p",{class:"k"},"Wczytywanie prezentacji…")],-1)])])):e.phase==="notfound"?(g(),b("section",yn,[...r[11]||(r[11]=[f("div",null,[f("p",{class:"k"},"404"),f("h2",null,"Nie ma takiej prezentacji"),f("p",null,"Link jest nieaktualny albo prezentacja nie jest już udostępniona.")],-1)])])):e.phase==="error"?(g(),b("section",wn,[f("div",null,[r[12]||(r[12]=f("p",{class:"k"},"Błąd",-1)),r[13]||(r[13]=f("h2",null,"Nie udało się wczytać prezentacji",-1)),f("p",null,T(e.error),1),f("button",{type:"button",class:"status-retry",onClick:r[2]||(r[2]=s=>a("retry"))},"Spróbuj ponownie")])])):e.phase==="empty"?(g(),b("section",zn,[f("div",null,[f("h2",null,T(e.deck?.title),1),r[14]||(r[14]=f("p",null,"Ta prezentacja nie ma jeszcze slajdów.",-1))])])):e.phase==="ready"?(g(!0),b(ke,{key:5},Ct(U.value,s=>(g(),b("section",{id:s.id,key:s.id,class:Re(Lt(Dt)(s.slide.css_class,{special:s.special,on:s.on})),innerHTML:ot(s.slide,s.special)},null,10,Sn))),128)):y("",!0)]),e.phase==="ready"&&m.value?(g(),b("div",En,[f("i",{style:Oe({width:m.value.progress+"%"})},null,4)])):y("",!0),e.phase==="ready"&&m.value?(g(),b("div",{key:3,id:"meta",innerHTML:m.value.metaHTML},null,8,_n)):y("",!0),e.phase==="ready"&&m.value?(g(),b("div",Tn,T(rt.value),1)):y("",!0),e.phase==="ready"?(g(),b("div",Cn,[f("button",{type:"button","aria-label":"Poprzedni slajd",onClick:gt}),r[15]||(r[15]=f("div",{class:"mid"},null,-1)),f("button",{type:"button","aria-label":"Następny slajd",onClick:bt})])):y("",!0),h.value||H.value?(g(),b("div",Ln,[h.value?(g(),b("p",Pn,"Eksportuję do PPTX… slajd "+T(h.value.done)+" z "+T(h.value.total),1)):(g(),b(ke,{key:1},[r[16]||(r[16]=f("p",null,"Nie udało się utworzyć pliku PPTX.",-1)),f("p",null,T(H.value),1),f("button",{type:"button",class:"status-retry",onClick:r[3]||(r[3]=s=>H.value="")},"Zamknij")],64))])):y("",!0),e.phase==="ready"&&e.mode!=="speaker"&&O.value?(g(),b("a",{key:7,class:"print-link",href:O.value}," Kliknij, aby zobaczyć wersję z notatkami i dodatkowymi slajdami ",8,jn)):y("",!0),e.phase==="ready"&&e.mode!=="speaker"&&O.value&&ye.value>1?(g(),b("a",{key:8,class:"print-link",href:O.value,style:Oe({top:`${(ye.value-1)*720+24}px`})}," Pełna wersja prezentacji z notatkami i dodatkowymi slajdami jest dostępna pod tym linkiem ",12,$n)):y("",!0),e.phase==="ready"?(g(),b("div",An,T(_.value),1)):y("",!0)],8,["to"])):y("",!0)],8,dn))}});export{Mn as _,nn as r}; +`?l+=2:l++),o=l-1;continue}t+=a,o++}return t}function ve(e){const t=Ht(he(e)).toLowerCase();let o="";for(const i of t)i<=" "||i.charCodeAt(0)<32||(o+=i);return o}function Z(e){const t=ve(e);if(!t)return!1;for(const o of It)if(t.includes(o))return!0;return t.includes("//")}function Ve(e){let t="",o=0,i=0;for(;ie.length)return!0;i=l;continue}const a=e[i];if(t){if(a==="\\"&&i+1="a"&&t[o]<="z"||t[o]>="0"&&t[o]<="9");)o++;return t.slice(0,o)}function xe(e){return Mt.has(K(e))}function Ot(e,t){const o=t;let i="",a=1;for(;te.length)return null;continue}const l=e[t];if(i){if(l==="\\"&&t+1e.length)return null;continue}const l=e[t];if(i){if(l==="\\"&&t+10){a--,t++;continue}if(a===0&&l==="{"){const c=Ot(e,t+1);return c?{item:{prelude:e.slice(o,t),block:c.block,braced:!0},next:c.end}:null}if(a===0&&l===";")return{item:{prelude:e.slice(o,t),block:"",braced:!1},next:t+1};t++}return null}function G(e){const t=[];let o=0;for(;o=e.length)break;const i=Nt(e,o);if(!i)break;t.push(i.item),o=i.next}return t}function Fe(e){const t=[];let o="",i="",a=0,l=0;for(;le.length){o+=e.slice(l);break}o+=e.slice(l,x),l=x;continue}const c=e[l];if(i){if(o+=c,c==="\\"&&l+10){a--,o+=c,l++;continue}if(c===";"&&a===0){t.push(o),o="",l++;continue}o+=c,l++}return o&&t.push(o),t}function Ne(e){const t=[];for(const o of Fe(e)){const i=o.trim();i&&(Ve(o)||Z(o)||t.push(i))}return t.length===0?"":`${t.join("; ")};`}function qt(e){const t=e.prelude.trim();if(!t&&!e.braced||Z(t)||K(t)==="@import")return"";if(!e.braced)return Z(e.prelude)?"":`${t};`;if(Ve(e.block)&&Z(e.block))return"";let o="";return xe(t)?o=Ne(e.block):K(t).startsWith("@")?o=Ue(e.block):o=Ne(e.block),o.trim()?`${t} { ${o.trim()} }`:""}function Ue(e){const t=[];for(const o of G(e)){const i=qt(o);i&&t.push(i)}return t.join(` +`)}function We(e,t){const o=e[t];let i=o;for(t++;te.length){t+=e.slice(o);break}t+=e.slice(o,a),o=a;continue}const i=e[o];if(i==='"'||i==="'"){const a=We(e,o);t+=a.text,o=a.next;continue}if(i==="["){const a=Kt(e,o);t+=a.text,o=a.next;continue}if(e.slice(o,o+5).toLowerCase()===":root"&&!me(e[o+5])){t+=":host",o+=5;continue}if(e.slice(o,o+4).toLowerCase()==="body"&&!me(e[o+4])){const a=o===0?"":e[o-1];if(!me(a)&&a!=="."&&a!=="#"&&a!==":"&&a!=="@"){t+=".deck",o+=4;continue}}t+=i,o++}return t}function Vt(e){const t=e.prelude.trim();if(!e.braced)return t?`${t};`:"";const o=K(t);let i=t,a=e.block;return o.startsWith("@")?xe(t)||(a=Xe(e.block)):i=Bt(t),`${i} { ${a.trim()} }`}function Xe(e){const t=[];for(const o of G(e)){const i=Vt(o);i&&t.push(i)}return t.join(` +`)}function Ft(e){const t=ve(e);if(!t.startsWith("@media"))return null;const o=t.includes("prefers-color-scheme:dark"),i=t.includes("prefers-color-scheme:light");return o&&!i?"dark":i&&!o?"light":null}function ge(e,t){const o=[];for(const i of G(e)){const a=i.prelude.trim(),l=Ft(a);if(l){if(l===t&&i.braced){const x=ge(i.block,t).trim();x&&o.push(x)}continue}if(!i.braced){a&&o.push(`${a};`);continue}if(K(a).startsWith("@")&&!xe(a)){const x=ge(i.block,t).trim();x&&o.push(`${a} { ${x} }`);continue}o.push(`${a} { ${i.block.trim()} }`)}return o.join(` +`)}function B(e,t){return!e.trim()||t==="auto"?e.trim():ge(e,t).trim()}const be=["paper","paper-2","ink","ink-2","rule","empire","khaki"],Q={paper:"#141a18","paper-2":"#1c2421",ink:"#e4e4da","ink-2":"#a7ada4",rule:"#3a443f",empire:"#e0675f",khaki:"#c2ad72"},Ze={paper:"#e9ebe3","paper-2":"#dfe2d8",ink:"#16201f","ink-2":"#4b5551",rule:"#b9beb3",empire:"#b5302c",khaki:"#7f7047"};function Ge(e){return e==="light"?Ze:Q}function Qe(e,t=Ge(e)){const o=t;return[":host {",`--paper: ${o.paper}; --paper-2: ${o["paper-2"]}; --ink: ${o.ink}; --ink-2: ${o["ink-2"]};`,`--rule: ${o.rule}; --empire: ${o.empire}; --khaki: ${o.khaki};`,`--deck-paper: ${o.paper}; --deck-paper-2: ${o["paper-2"]}; --deck-ink: ${o.ink}; --deck-ink-2: ${o["ink-2"]};`,`--deck-rule: ${o.rule}; --deck-empire: ${o.empire}; --deck-khaki: ${o.khaki};`,`color-scheme: ${e};`,"}",".deck { background: var(--paper); color: var(--ink); }","#nav button:focus, #nav button:focus-visible { outline: none; }","#nav button:focus-visible { box-shadow: inset 4px 0 0 var(--empire, var(--deck-empire)); }","#nav button:last-of-type:focus-visible { box-shadow: inset -4px 0 0 var(--empire, var(--deck-empire)); }"].join(" ")}function Ye(e=Q){return Qe("dark",e)}Ye();function Ut(e=Q){const t={};for(const o of be)t[`--${o}`]=e[o];for(const o of be)t[`--deck-${o}`]=e[o];return t}const Wt=/^[#a-z0-9(),.%\s/-]+$/i;function Xt(e){return be.includes(e)}function Je(e,t){const o={...Ge(t)};for(const i of G(B(e,t)))if(!(!i.braced||he(i.prelude).trim()!==":host"))for(const a of Fe(i.block)){const l=he(a),c=l.indexOf(":");if(c<0)continue;const x=l.slice(0,c).trim(),T=l.slice(c+1).trim();if(!x.startsWith("--deck-"))continue;const _=x.slice(7);Xt(_)&&Wt.test(T)&&(o[_]=T)}return o}function Zt(e){return Je(e,"dark")}const Gt=/@media\s*\(\s*max-width\s*:\s*900px\s*\)\s*and\s*\(\s*orientation\s*:\s*portrait\s*\)/gi;function Qt(e){if(!e.trim())return"";const t=Ue(e).trim();return t?Xe(t).trim().replace(Gt,"@media screen and (max-width: 900px) and (orientation: portrait)"):""}const Yt=':host{--deck-paper: #e5eef0;--deck-paper-2: #d0e1e3;--deck-ink: #12303a;--deck-ink-2: #48646c;--deck-rule: #a8c1c5;--deck-empire: #b84e12;--deck-khaki: #17705f;--deck-contour: rgba(18, 48, 58, .13);--deck-display: "Fraunces Variable", "Fraunces", Georgia, "Times New Roman", serif;--deck-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace}@media(prefers-color-scheme:dark){:host{--deck-paper: #0d2b2a;--deck-paper-2: #092120;--deck-ink: #e2eeec;--deck-ink-2: #9bb8b4;--deck-rule: #2a4d4a;--deck-empire: #f09a5a;--deck-khaki: #7fd1bd;--deck-contour: rgba(226, 238, 236, .1)}}.slide{isolation:isolate}.slide h1,.slide h2{font-weight:500;letter-spacing:-.012em}.slide.title>div>.sub{font-style:italic}.slide.sec>div>.k{color:var(--deck-khaki)}.slide .tl{column-gap:0;row-gap:0}.slide .tl .y{position:relative;padding:8px 30px 8px 0;text-align:right;color:var(--deck-ink);border-right:2px solid var(--deck-empire)}.slide .tl .y:after{content:"";position:absolute;right:-8px;top:50%;width:10px;height:10px;margin-top:-7px;border-radius:50%;background:var(--deck-paper);border:2px solid var(--deck-empire)}.slide .tl>span:not(.y){padding:8px 0 8px 28px}.slide .sum{border-top:0;background:var(--deck-paper-2);padding:16px 22px}.slide .quote{font-style:italic}@media not screen and (max-width:900px)and (orientation:portrait){.slide:before{content:"";position:absolute;z-index:-1;right:-200px;top:-200px;width:560px;height:560px;border-radius:50%;background:repeating-radial-gradient(circle,transparent 0 22px,var(--deck-contour) 22px 23.5px)}.slide:is(.sec,.title):before{right:-160px;top:auto;bottom:-320px;width:960px;height:960px}.slide>header h2{font-size:52px}.slide.sec{align-items:center}.slide.title>div>h1{margin-top:22px}.slide .sum{font-size:28px}.slide .quote{font-size:38px}}@media print{.slide:before{content:none}.slide .sum{background:none}.slide .tl .y{border-right-color:#000}.slide .tl .y:after{background:#fff;border-color:#000}}',Jt=':host{--deck-paper: #f8f8f5;--deck-paper-2: #efeee8;--deck-ink: #1b1d22;--deck-ink-2: #5b5f69;--deck-rule: #d3d2ca;--deck-empire: #7a1f2b;--deck-khaki: #5b5f69;--deck-display: "Source Serif 4 Variable", "Source Serif 4", Georgia, "Times New Roman", serif;--deck-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace}@media(prefers-color-scheme:dark){:host{--deck-paper: #17181d;--deck-paper-2: #1e2027;--deck-ink: #ebe9e1;--deck-ink-2: #a4a7af;--deck-rule: #363944;--deck-empire: #e39aa3;--deck-khaki: #a4a7af}}.slide h1,.slide h2{font-weight:600;letter-spacing:-.015em}.slide .k{font-family:var(--deck-body);font-weight:500;letter-spacing:.16em}.slide>header{padding-bottom:22px;border-bottom:1px solid var(--deck-rule)}.slide.title>div>.sub{font-style:italic}.slide.sec>div>h2{font-style:italic;font-weight:400}.slide.sec>div>p:not(.k){font-family:var(--deck-display)}.slide li::marker{content:"– "}.slide :is(.notes,.srcs,.speak) li::marker{content:normal}.slide .tl .y{font-family:var(--deck-display);font-style:italic}.slide .sum{font-style:italic;border-top:0;border-left:2px solid var(--deck-empire);padding:2px 0 2px 22px}.slide .quote{font-style:italic}@media not screen and (max-width:900px)and (orientation:portrait){.slide{padding:72px 120px 80px}.slide .k{font-size:.64em}.slide .bib .k{font-size:13px}.slide>header{gap:12px}.slide>header h2{font-size:48px}.slide.title,.slide.sec{text-align:center;justify-items:center}.slide.sec{align-items:center}.slide :is(.notes,.srcs,.speak){text-align:left}.slide.title>div{align-self:center}.slide.title>div>h1{max-width:16ch;font-size:84px;margin-top:22px;margin-inline:auto}.slide.title>footer{width:100%;justify-content:center;gap:48px}.slide.sec>div>h2{font-size:88px;max-width:none;margin-top:0}.slide.sec>div>.k:after{content:"";display:block;width:64px;height:2px;background:var(--deck-empire);margin:20px auto 26px}.slide.sec>div>p:not(.k){margin-inline:auto}.slide .tl .y{font-size:1.06em}.slide .quote{font-size:40px}}',en=':host{--deck-paper: #f6f7fa;--deck-paper-2: #eceff4;--deck-ink: #1d2940;--deck-ink-2: #4c586d;--deck-rule: #c9d0dc;--deck-empire: #9a6200;--deck-khaki: #7c5100;--deck-card: #ffffff;--deck-line: rgba(29, 41, 64, .12);--deck-pill: rgba(154, 98, 0, .08);--deck-pill-line: rgba(154, 98, 0, .35);--deck-ray: rgba(29, 41, 64, .05);--deck-glow: rgba(245, 197, 90, .4);--deck-shadow: 0 24px 60px -30px rgba(29, 41, 64, .35);--deck-display: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;--deck-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;--deck-mono: "Roboto Mono", ui-monospace, Menlo, Consolas, monospace}@media(prefers-color-scheme:dark){:host{--deck-paper: #233148;--deck-paper-2: #1d2940;--deck-ink: #e9edf3;--deck-ink-2: #b3bccb;--deck-rule: #3e4a5f;--deck-empire: #f5c55a;--deck-khaki: #fbd77e;--deck-card: #29344a;--deck-line: rgba(255, 255, 255, .1);--deck-pill: rgba(245, 197, 90, .08);--deck-pill-line: rgba(245, 197, 90, .35);--deck-ray: rgba(255, 255, 255, .035);--deck-glow: rgba(245, 197, 90, .16);--deck-shadow: 0 40px 100px -40px rgba(0, 0, 0, .6)}}.slide{isolation:isolate}.slide h1,.slide h2{font-weight:700;letter-spacing:-.02em}.slide h3,.slide strong,.slide b{font-weight:600}.slide .k{font-weight:500;letter-spacing:.06em}.slide>header>.k,.slide:is(.sec,.title)>div:not(.notes,.srcs,.speak)>.k{font-family:var(--deck-body);letter-spacing:.16em;color:var(--deck-empire)}.slide.title>div:not(.notes,.srcs,.speak)>.sub{font-family:var(--deck-body);font-weight:300}.slide.title>footer .k{color:var(--deck-khaki)}.slide.sec>div:not(.notes,.srcs,.speak)>p:not(.k){font-weight:300}.slide .tl .y{justify-self:stretch;align-self:baseline;text-align:center;white-space:nowrap;line-height:1.3;font-family:var(--deck-body);font-variant-numeric:tabular-nums;font-weight:500;color:var(--deck-empire);background:var(--deck-pill);border:1px solid var(--deck-pill-line);border-radius:999px;padding:0 .6em}.slide .tl>span:not(.y){align-self:baseline}.slide .sum{font-family:var(--deck-body);font-weight:500;border-top:0;background:var(--deck-card);border:1px solid var(--deck-line);border-radius:16px;padding:14px 24px}.slide .p{border-top:0;background:var(--deck-card);border:1px solid var(--deck-line);border-radius:16px;padding:18px 24px}.slide .p b{font-family:var(--deck-display);font-weight:700;letter-spacing:-.01em;line-height:1.15}.slide .note{border-left-color:var(--deck-empire)}.slide .theses>div:before{font-weight:700;color:var(--deck-empire)}.slide th{font-weight:500}.slide figure img{border-radius:12px;box-shadow:var(--deck-shadow)}.slide figcaption{margin-top:8px}.slide .quote{font-weight:300}@media not screen and (max-width:900px)and (orientation:portrait){.slide:is(.sec,.title):before{content:"";position:absolute;z-index:-1;inset:-40% -20%;background:radial-gradient(circle at 80% 50%,var(--deck-glow),transparent 30%),repeating-conic-gradient(from 0deg at 80% 50%,var(--deck-ray) 0deg 7deg,transparent 7deg 15deg);-webkit-mask-image:radial-gradient(circle at 80% 50%,#000 12%,transparent 58%);mask-image:radial-gradient(circle at 80% 50%,#000 12%,transparent 58%)}.slide.title:after{content:"";position:absolute;z-index:-1;left:80%;top:44%;width:168px;height:168px;margin:-84px 0 0 -84px;border-radius:50%;background:radial-gradient(circle at 50% 35%,#fde9b4,#f5c55a 62%,#e9a93a);box-shadow:0 0 0 18px #f5c55a1a,0 0 120px 20px #f5c55a4d}.slide>header{gap:12px}.slide>header .k{font-size:17px}.slide>header h2{font-size:50px;line-height:1.1}.slide.sec>div:not(.notes,.srcs,.speak)>.k{font-size:17px}.slide.sec>div:not(.notes,.srcs,.speak)>h2{font-size:76px;max-width:15ch;margin-top:16px;line-height:1.04}.slide.sec>div:not(.notes,.srcs,.speak)>p:not(.k){font-size:28px;max-width:34ch}.slide.title>div:not(.notes,.srcs,.speak){align-self:center}.slide.title>div:not(.notes,.srcs,.speak)>.k{font-size:17px}.slide.title>div:not(.notes,.srcs,.speak)>h1{font-size:104px;line-height:1;margin-top:18px;letter-spacing:-.03em}.slide.title>div:not(.notes,.srcs,.speak)>.sub{font-size:32px;max-width:32ch;line-height:1.3;margin-top:24px}.slide.title>footer{font-size:20px}.slide .tl{column-gap:22px}.slide .tl .y{font-size:.8em}.slide .sum{font-size:27px;line-height:1.3}.slide .quote{font-size:38px}}@media print{.slide:before,.slide:after{content:none}.slide .sum,.slide .p,.slide .tl .y{background:none;border-color:#000}.slide figure img{box-shadow:none}}',tn=':host{--deck-paper: #eef1f2;--deck-paper-2: #dde4e7;--deck-ink: #131c2b;--deck-ink-2: #4a586b;--deck-rule: #b4c0c9;--deck-empire: #a85f00;--deck-khaki: #1d6a78;--deck-grid: rgba(19, 28, 43, .06);--deck-display: "Archivo Narrow", "Arial Narrow", Arial, sans-serif;--deck-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace}@media(prefers-color-scheme:dark){:host{--deck-paper: #131c2b;--deck-paper-2: #0d1420;--deck-ink: #e7ecf0;--deck-ink-2: #94a3b5;--deck-rule: #2b3a50;--deck-empire: #f2b23e;--deck-khaki: #72c6cf;--deck-grid: rgba(231, 236, 240, .05)}}.slide{background-image:linear-gradient(var(--deck-grid) 1px,transparent 1px),linear-gradient(90deg,var(--deck-grid) 1px,transparent 1px);background-size:40px 40px}.slide h1,.slide h2{font-weight:700;line-height:1;letter-spacing:-.005em}.slide>header{border-left:6px solid var(--deck-empire);padding-left:20px}.slide.title>div:not(.notes,.srcs,.speak)>h1,.slide.sec>div:not(.notes,.srcs,.speak)>h2{text-transform:uppercase}.slide.title>div:not(.notes,.srcs,.speak)>.sub{font-family:var(--deck-body)}.slide.sec>div:not(.notes,.srcs,.speak)>.k{color:var(--deck-empire)}.slide ul{list-style:square}.slide .tl{column-gap:0;row-gap:0}.slide .tl>span{padding:9px 0;border-bottom:1px solid var(--deck-rule)}.slide .tl .y{padding-right:26px;font-weight:500}.slide .sum{font-family:var(--deck-body);font-weight:500;border:1px solid var(--deck-empire);padding:14px 18px;background:var(--deck-paper-2)}.slide .sum:before{content:"Wniosek";display:block;font:500 14px var(--deck-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--deck-empire);margin-bottom:6px}.slide .quote{font-family:var(--deck-body);font-weight:500}@media not screen and (max-width:900px)and (orientation:portrait){.slide>header h2{font-size:58px}.slide.title>div:not(.notes,.srcs,.speak)>h1{font-size:104px;max-width:15ch}.slide.sec>div:not(.notes,.srcs,.speak)>h2{font-size:112px;max-width:14ch}.slide.title>div:not(.notes,.srcs,.speak)>.sub{font-size:28px}.slide .sum{font-size:25px}.slide .quote{font-size:33px}}@media print{.slide{background-image:none}.slide .sum{background:none;border-color:#000}.slide .sum:before{color:#000}}',et="screen and (max-width: 900px) and (orientation: portrait)";function nn(e){return e(et).matches}function qe(e,t,o){if(e==="reading")return t;for(const i of o)if(i.bottom>0)return i.id;return t}function on(e){return e.complete?Promise.resolve():new Promise(t=>{const o=()=>t();e.addEventListener("load",o,{once:!0}),e.addEventListener("error",o,{once:!0})})}async function Ke(e,t){t.scrollTo(e),await Promise.all(t.imagesBefore(e).map(on)),t.scrollTo(e)}function X(e,t,o){return{key:e,sheet:B(t,"dark"),dark:Zt(t),lightSheet:B(t,"light"),light:Je(t,"light"),loadFonts:o}}const rn=new Map([["atlas",X("atlas",Yt,()=>Promise.all([w(()=>Promise.resolve({}),__vite__mapDeps([0])),w(()=>Promise.resolve({}),__vite__mapDeps([1])),w(()=>import("./index-BhVKyY57.js").then(e=>e.bg),__vite__mapDeps([2,3])),w(()=>import("./index-BhVKyY57.js").then(e=>e.bh),__vite__mapDeps([2,3]))]))],["monografia",X("monografia",Jt,()=>Promise.all([w(()=>import("./index-BhVKyY57.js").then(e=>e.be),__vite__mapDeps([2,3])),w(()=>import("./index-BhVKyY57.js").then(e=>e.bf),__vite__mapDeps([2,3])),w(()=>import("./index-BhVKyY57.js").then(e=>e.bg),__vite__mapDeps([2,3])),w(()=>import("./index-BhVKyY57.js").then(e=>e.bh),__vite__mapDeps([2,3]))]))],["summer",X("summer",en,()=>w(()=>Promise.resolve({}),__vite__mapDeps([4])))],["sztab",X("sztab",tn,()=>Promise.all([w(()=>import("./index-BhVKyY57.js").then(e=>e.bc),__vite__mapDeps([2,3])),w(()=>import("./index-BhVKyY57.js").then(e=>e.bd),__vite__mapDeps([2,3])),w(()=>import("./index-BhVKyY57.js").then(e=>e.bg),__vite__mapDeps([2,3])),w(()=>import("./index-BhVKyY57.js").then(e=>e.bh),__vite__mapDeps([2,3]))]))]]);function sn(e){return typeof e!="string"||e===""?null:rn.get(e)??null}function an(e,t,o,i="dark"){const a=i==="light";return[B(e,i),t?a?t.lightSheet:t.sheet:"",...o,a?Qe("light",t?t.light:void 0):Ye(t?t.dark:void 0)].filter(l=>!!l)}function ln(e,t){return t==="light"?e?e.light:Ze:e?e.dark:Q}const dn=["data-theme","aria-busy"],cn={key:0,class:"tools",role:"group","aria-label":"Sterowanie prezentacją"},pn={class:"tools-group"},un={class:"tools-pos","aria-hidden":"true"},fn=["aria-pressed"],kn=["aria-pressed"],mn=["aria-pressed"],hn={class:"tools-group tools-end"},gn=["aria-pressed"],bn=["disabled"],vn={id:"stage"},xn={key:1,class:"slide sec on","aria-busy":"true"},yn={key:2,class:"slide sec on"},wn={key:3,class:"slide sec on"},zn={key:4,class:"slide sec on"},Sn=["id","innerHTML"],En={key:2,id:"bar"},_n=["innerHTML"],Cn={key:4,id:"sect"},Tn={key:5,id:"nav"},Ln={key:6,class:"export-overlay",role:"status","aria-live":"polite"},Pn={key:0},jn=["href"],An=["href"],$n={key:9,class:"sr-only","aria-live":"polite"},Mn=yt({__name:"DeckViewer",props:{phase:{},deck:{},error:{},mode:{},compose:{type:Function},labels:{},announce:{type:Function},extraCss:{},theme:{},images:{},noToolbar:{type:Boolean}},emits:["retry","position","navigate","clock","snapshot","scheme"],setup(e,{expose:t,emit:o}){const i=e,a=o,l=z(null),c=z(null),x=z(null),T=z(0),_=z(""),Y=z(!1),H=z(""),ye=A(()=>i.deck?.slides?.length??0),J=z(!1),$=z(!0),h=z(null),O=z("");let u=null,V=null,ee=null,F=null,te=null,N=null,q=[],L="";const ne=A(()=>sn(i.theme)),P=A(()=>$.value?"dark":"light"),tt=new Set(["ArrowUp","ArrowDown","PageUp","PageDown"," ","Home","End"]);function nt(n){return{body_html:n.body_html,sources_html:n.sources_html,comment_html:"comment_html"in n?n.comment_html:"",say_html:"say_html"in n?n.say_html:"",notes_html:"notes_html"in n?n.notes_html:""}}function ot(n,r){const s=nt(n);return i.compose?i.compose(s,r):$t({body_html:s.body_html,comment_html:s.comment_html??"",sources_html:s.sources_html,special:r})}function S(){return nn(n=>window.matchMedia(n))}D(()=>[i.phase,i.deck],()=>{if(L="",q=[],i.phase!=="ready"||!i.deck||i.deck.slides.length===0){u=null,T.value++;return}u=Pt({slides:i.deck.slides.map(n=>({number:n.number,hasSpecial:n.special!=null})),history:window.history,hash:window.location.hash,mode:i.mode==="speaker"?"speaker":"public",onChange:()=>{T.value++},onNavigate:n=>{a("navigate",n)}}),a("position",u.snapshot().index),T.value++},{immediate:!0});const m=A(()=>(T.value,u?.snapshot()??null)),U=A(()=>{const n=i.deck?.slides??[],r=new Set(m.value?.on??[]),s=[];for(const d of n){const p=String(d.number);if(s.push({id:p,slide:d,special:!1,on:r.has(p)}),d.special){const k=`${d.number}s`;s.push({id:k,slide:d.special,special:!0,on:r.has(k)})}}return s}),it=A(()=>{const n=m.value,r=i.deck?.slides.length??0;return!n||!r?"":`${n.index+1} / ${r}`}),rt=A(()=>{const n=m.value,r=i.deck?.slides;if(!n||!r)return"";const s=r[n.index];return s?n.special&&s.special?s.special.section_label:s.section_label:""});function st(){const n=i.extraCss,r=Array.isArray(n)?n:n?[n]:[],s=[];for(const d of r){if(!d)continue;const p=B(Qt(d),P.value);p&&s.push(p)}return s}function oe(n){const r=an(jt,ne.value,st(),P.value);try{n.adoptedStyleSheets=r.map(s=>{const d=new CSSStyleSheet;return d.replaceSync(s),d})}catch{n.querySelectorAll("style[data-deck-style]").forEach(s=>s.remove());for(const s of r){const d=document.createElement("style");d.dataset.deckStyle="1",d.textContent=s,n.appendChild(d)}}}function ie(){const n=l.value;if(n){for(const[r,s]of Object.entries(Ut(ln(ne.value,P.value))))n.style.setProperty(r,s);n.style.colorScheme=P.value,n.dataset.theme=P.value,document.documentElement.dataset.theme=P.value,document.documentElement.style.colorScheme=P.value}}function re(){i.mode==="speaker"&&($.value=!$.value,ie(),c.value&&oe(c.value),a("scheme",!$.value))}function E(){const n=c.value?.getElementById("stage"),r=l.value;if(!n||!r)return;const s=c.value?.getElementById("nav");if(S()){n.style.transform="",s&&(s.style.top="");return}const d=c.value?.querySelector(".tools"),p=d instanceof HTMLElement?d.getBoundingClientRect().height:0,k=Math.max(0,window.innerHeight-p),v=Math.min(window.innerWidth/1280,k/720),pe=p/2;n.style.transform=`translate(${-640*v}px, ${-360*v+pe}px) scale(${v})`,s&&(s.style.top=`${p}px`)}function se(){F?.disconnect();const n=c.value?.querySelector(".tools");n&&F?.observe(n)}function at(){const n=c.value;if(!n)return;const r=i.images;n.querySelectorAll("img[data-deck-image]").forEach(s=>{if(!(s instanceof HTMLImageElement))return;const d=s.getAttribute("data-deck-image")??"",p=d&&r?r[d]:void 0;if(!p){s.removeAttribute("src");return}s.getAttribute("src")!==p&&s.setAttribute("src",p)})}function we(){const n=c.value,r=x.value;if(!n||!r)return;const s=u?.snapshot().panel??null;if(r.classList.toggle("speaker",i.mode==="speaker"),r.classList.toggle("notes-on",s==="notes"),r.classList.toggle("srcs-on",s==="srcs"),r.classList.toggle("speak-on",s==="say"),n.querySelectorAll("aside.notes, aside.srcs, aside.speak").forEach(p=>{const k=(p.textContent??"").replace(/\u00a0/g," ").trim()==="";p.classList.toggle("is-empty",k),p.removeAttribute("tabindex"),p.removeAttribute("role"),p.removeAttribute("aria-label")}),s){const p=s==="notes"?"notes":s==="srcs"?"srcs":"speak",k=s==="notes"?i.labels?.notes??"Komentarz":s==="srcs"?i.labels?.sources??"Źródła":i.labels?.say??"",v=n.querySelector(`.slide.on aside.${p}`);v&&(v.setAttribute("tabindex","0"),v.setAttribute("role","region"),v.setAttribute("aria-label",k))}const d=i.labels?.specialLink??"Slajd dodatkowy (S)";n.querySelectorAll(".sp-link").forEach(p=>{p.setAttribute("title",d)})}function ze(){return c.value?.activeElement??document.activeElement}function lt(){const r=ze()?.closest?.(".notes, .srcs, .speak");return r instanceof HTMLElement?r:null}function dt(n,r){const d=n.clientHeight;r==="ArrowDown"?n.scrollTop+=40:r==="ArrowUp"?n.scrollTop-=40:r==="PageDown"||r===" "?n.scrollTop+=d:r==="PageUp"?n.scrollTop-=d:r==="Home"?n.scrollTop=0:r==="End"&&(n.scrollTop=n.scrollHeight)}function ct(){window.print()}async function Se(){if(h.value||!u||i.phase!=="ready"||!i.deck||!c.value||S())return;const n=i.deck,r=new Map(U.value.map(k=>[k.id,k])),s=[];for(const k of c.value.querySelectorAll("#stage > section.slide")){const v=r.get(k.id);v&&s.push({el:k,slide:v.slide,special:v.special})}if(!s.length)return;const d=u,p=d.snapshot().panel;p&&d.togglePanel(p),O.value="",h.value={done:0,total:s.length},await W();try{const{exportDeck:k,downloadPptx:v,pptxFileName:pe}=await w(async()=>{const{exportDeck:ue,downloadPptx:fe,pptxFileName:xt}=await import("./pptx-B3Fp3Q3v.js");return{exportDeck:ue,downloadPptx:fe,pptxFileName:xt}},__vite__mapDeps([5,2,3])),Ie=i.mode==="speaker"?"speaker":"public",vt=await k({title:n.title,mode:Ie,sections:s,onProgress:(ue,fe)=>{h.value={done:ue,total:fe}}});v(vt,pe(n.title,Ie))}catch(k){O.value=k instanceof Error&&k.message?k.message:"Nieznany błąd"}finally{const k=new Map(U.value.map(v=>[v.id,v.on]));for(const{el:v}of s)v.classList.toggle("on",k.get(v.id)??!1);u===d&&p&&d.snapshot().panel!==p&&d.togglePanel(p),h.value=null,le()}}function ae(){document.fullscreenEnabled&&(document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()?.catch(()=>{}))}function Ee(n){return n!=="pause"&&n!=="clock"&&n!=="reset"?!1:(a("clock",n),!0)}function _e(n){if(h.value||!u||i.phase!=="ready")return;const s=!!ze()?.closest("button"),d=lt(),p=Oe(u,{key:n.key,ctrlKey:n.ctrlKey,metaKey:n.metaKey,altKey:n.altKey,targetIsButton:s,targetIsPanel:!!d,reading:S()});if(p==="fullscreen"){n.preventDefault(),ae();return}if(p==="scheme"){n.preventDefault(),re();return}if(Ee(p)){n.preventDefault();return}if(p==="ignored"){if(s&&(n.key===" "||n.key==="Enter"))return;d&&tt.has(n.key)&&!n.ctrlKey&&!n.metaKey&&!n.altKey&&!S()&&(n.preventDefault(),dt(d,n.key));return}n.preventDefault()}function pt(n){if(h.value||!u||i.phase!=="ready"||i.mode!=="speaker"||n.toLowerCase()==="f")return"ignored";const r=Oe(u,{key:n,reading:S()});return r==="fullscreen"?"ignored":(Ee(r),r==="scheme"&&re(),r)}function ut(n){if(h.value||!u||i.phase!=="ready"||i.mode!=="speaker"||!i.deck||S())return!1;const r=i.deck.slides.findIndex(s=>s.number===n);return r<0?!1:(u.go(r),!0)}function ft(n,r,s=null){if(h.value||!u||i.phase!=="ready"||!i.deck)return!1;const d=i.deck.slides.find(k=>k.number===n);if(!d)return!1;u.showId(r&&d.special?`${n}s`:String(n));const p=u.snapshot().panel;return s!==p&&u.togglePanel(s??p),!0}function kt(){if(!u||i.phase!=="ready")return null;const n=u.snapshot();return{number:n.number,special:n.special,panel:n.panel}}function mt(){return[...c.value?.querySelectorAll("#stage > section.slide")??[]]}t({runKey:pt,goToNumber:ut,showSlide:ft,current:kt,sections:mt});function le(){h.value||!u||window.location.hash!==u.snapshot().hash&&u.followHash(window.location.hash)}function Ce(){J.value=document.fullscreenElement!=null,E()}function ht(n){if(h.value||!(n instanceof MouseEvent)||!u||S())return;const r=n.target instanceof Element?n.target:null;if(n.detail>0){const d=r?.closest("#nav button");d instanceof HTMLElement&&d.blur()}if(r?.closest(".tools, .tools-show, #speaker-clock, .export-overlay"))return;const s=c.value;if(s){for(const d of s.elementsFromPoint(n.clientX,n.clientY))if(d instanceof Element){if(d.classList.contains("sp-link")){n.preventDefault(),n.stopPropagation(),u.openSpecial();return}if(d.classList.contains("sp-close")){n.preventDefault(),n.stopPropagation(),u.closeSpecial();return}}}}function Te(n){V=n.touches[0]?.clientX??null}function Le(n){if(h.value||V==null||!u)return;const r=V;V=null;const s=n.changedTouches[0]?.clientX;s!=null&&u.swipe(s-r,S())}function de(n){h.value||u?.togglePanel(n)}function Pe(){h.value||u?.toggleSpecial()}function ce(){h.value||u?.toggleToolbar()}function gt(){h.value||u?.previous()}function bt(){h.value||u?.next()}function je(){const n=c.value;return n?[...n.querySelectorAll("section.slide")].flatMap(r=>!(r instanceof HTMLElement)||!r.id?[]:[{id:r.id,bottom:r.getBoundingClientRect().bottom}]):[]}function j(){if(!S())return;const n=je();n.length&&(q=n)}const Ae={scrollTo(n){c.value?.getElementById(n)?.scrollIntoView({block:"start"})},imagesBefore(n){const r=c.value;if(!r)return[];const s=[...r.querySelectorAll("section.slide")],d=s.findIndex(k=>k.id===n);if(d<=0)return[];const p=[];for(let k=0;kj()))}function De(){if(!u||i.phase!=="ready"||!N)return;const n=u.snapshot().on[0]??"";if(!n)return;if(N.matches){const s=qe("reading",n,q);L="",W(()=>{j(),L=s,Ke(s,Ae).then(()=>j())});return}const r=qe("slide",n,q.length?q:je());L="",u.showId(r),E()}return wt(()=>{const n=l.value;if(!n)return;Y.value=document.fullscreenEnabled,H.value=window.location.origin+window.location.pathname;const r=n.attachShadow({mode:"open"});c.value=r,ie(),oe(r);const s=document.createElement("div");s.className="deck",r.appendChild(s),x.value=s,r.addEventListener("click",ht,!0),window.addEventListener("hashchange",le),window.addEventListener("keydown",_e),window.addEventListener("resize",E),window.addEventListener("scroll",j,!0),window.addEventListener("touchstart",Te,{passive:!0}),window.addEventListener("touchend",Le,{passive:!0}),document.addEventListener("fullscreenchange",Ce),N=window.matchMedia(et),N.addEventListener("change",De),ee=new ResizeObserver(()=>E()),ee.observe(n),F=new ResizeObserver(()=>E()),te=new MutationObserver(()=>{se(),E()}),te.observe(s,{childList:!0,subtree:!0}),W(()=>{we(),se(),E(),j(),$e()})}),zt(()=>{window.removeEventListener("hashchange",le),window.removeEventListener("keydown",_e),window.removeEventListener("resize",E),window.removeEventListener("scroll",j,!0),window.removeEventListener("touchstart",Te),window.removeEventListener("touchend",Le),document.removeEventListener("fullscreenchange",Ce),N?.removeEventListener("change",De),ee?.disconnect(),F?.disconnect(),te?.disconnect(),St(Et()),document.documentElement.style.removeProperty("color-scheme")}),D([()=>i.extraCss,()=>i.theme],()=>{ie(),c.value&&oe(c.value)}),D(ne,n=>{n?.loadFonts().catch(()=>{})},{immediate:!0}),D(m,n=>{n&&a("snapshot",n)}),D(m,(n,r)=>{if(!n){_.value="";return}if(!r||n.number!==r.number||n.special!==r.special){if(i.announce){_.value=i.announce({number:n.number,total:n.total,special:n.special});return}n.special&&!r?.special?_.value=`Slajd dodatkowy do slajdu ${n.number}`:_.value=`Slajd ${n.number} z ${n.total}`}},{immediate:!0}),D([()=>i.phase,U,m,()=>i.images],()=>{W(()=>{we(),at(),se(),E();const n=u?.snapshot().on[0]??"";n&&n!==L?$e():j()})}),(n,r)=>(g(),b("div",{ref_key:"host",ref:l,class:"deck-host","data-theme":$.value?"dark":"light","aria-busy":e.phase==="loading"?"true":void 0},[x.value?(g(),_t(Ct,{key:0,to:x.value},[e.phase==="ready"&&m.value&&e.mode==="speaker"?Me(n.$slots,"tools",{panel:m.value.panel,special:m.value.special,hasSpecial:m.value.hasSpecial,fullscreenEnabled:Y.value,fullscreenOn:J.value,toolbarHidden:m.value.toolbarHidden,togglePanel:de,toggleSpecial:Pe,toggleToolbar:ce,toggleFullscreen:ae,light:!$.value,toggleScheme:re,exportPptx:Se,exporting:h.value!=null},void 0,void 0,0):y("",!0),e.phase==="ready"&&m.value&&e.mode!=="speaker"&&!e.noToolbar?(g(),b(ke,{key:1},[m.value.toolbarHidden?y("",!0):(g(),b("div",cn,[f("div",pn,[f("span",un,C(it.value),1),f("button",{type:"button","aria-pressed":m.value.panel==="notes","aria-keyshortcuts":"N",onClick:r[0]||(r[0]=s=>de("notes"))},[...r[4]||(r[4]=[I(" Komentarz ",-1),f("kbd",null,"N",-1)])],8,fn),f("button",{type:"button","aria-pressed":m.value.panel==="srcs","aria-keyshortcuts":"Z",onClick:r[1]||(r[1]=s=>de("srcs"))},[...r[5]||(r[5]=[I(" Źródła ",-1),f("kbd",null,"Z",-1)])],8,kn),f("button",{type:"button",class:Re(["tool-s",{unavailable:!m.value.hasSpecial}]),"aria-pressed":m.value.special,"aria-keyshortcuts":"S",onClick:Pe},[...r[6]||(r[6]=[I(" Slajd dodatkowy ",-1),f("kbd",null,"S",-1)])],10,mn)]),f("div",hn,[Y.value?(g(),b("button",{key:0,type:"button","aria-pressed":J.value,"aria-keyshortcuts":"F",onClick:ae},[...r[7]||(r[7]=[I(" Pełny ekran ",-1),f("kbd",null,"F",-1)])],8,gn)):y("",!0),f("button",{type:"button",title:"Drukuj albo zapisz jako PDF, slajd na stronę",onClick:ct}," PDF "),f("button",{type:"button",disabled:h.value!=null,title:"Pobierz jako PowerPoint: slajd jako obraz, komentarz i źródła w notatkach",onClick:Se}," PPTX ",8,bn),f("button",{type:"button","aria-keyshortcuts":"H",onClick:ce},[...r[8]||(r[8]=[I(" Ukryj pasek ",-1),f("kbd",null,"H",-1)])])])])),m.value.toolbarHidden?(g(),b("button",{key:1,type:"button",class:"tools-show","aria-keyshortcuts":"H",onClick:ce},[...r[9]||(r[9]=[I(" Pokaż pasek ",-1),f("kbd",null,"H",-1)])])):y("",!0)],64)):y("",!0),f("div",vn,[e.mode==="speaker"&&e.phase==="ready"?Me(n.$slots,"reading-close",{},void 0,void 0,0):y("",!0),e.phase==="loading"?(g(),b("section",xn,[...r[10]||(r[10]=[f("div",null,[f("p",{class:"k"},"Wczytywanie prezentacji…")],-1)])])):e.phase==="notfound"?(g(),b("section",yn,[...r[11]||(r[11]=[f("div",null,[f("p",{class:"k"},"404"),f("h2",null,"Nie ma takiej prezentacji"),f("p",null,"Link jest nieaktualny albo prezentacja nie jest już udostępniona.")],-1)])])):e.phase==="error"?(g(),b("section",wn,[f("div",null,[r[12]||(r[12]=f("p",{class:"k"},"Błąd",-1)),r[13]||(r[13]=f("h2",null,"Nie udało się wczytać prezentacji",-1)),f("p",null,C(e.error),1),f("button",{type:"button",class:"status-retry",onClick:r[2]||(r[2]=s=>a("retry"))},"Spróbuj ponownie")])])):e.phase==="empty"?(g(),b("section",zn,[f("div",null,[f("h2",null,C(e.deck?.title),1),r[14]||(r[14]=f("p",null,"Ta prezentacja nie ma jeszcze slajdów.",-1))])])):e.phase==="ready"?(g(!0),b(ke,{key:5},Tt(U.value,s=>(g(),b("section",{id:s.id,key:s.id,class:Re(Lt(Dt)(s.slide.css_class,{special:s.special,on:s.on})),innerHTML:ot(s.slide,s.special)},null,10,Sn))),128)):y("",!0)]),e.phase==="ready"&&m.value?(g(),b("div",En,[f("i",{style:He({width:m.value.progress+"%"})},null,4)])):y("",!0),e.phase==="ready"&&m.value?(g(),b("div",{key:3,id:"meta",innerHTML:m.value.metaHTML},null,8,_n)):y("",!0),e.phase==="ready"&&m.value?(g(),b("div",Cn,C(rt.value),1)):y("",!0),e.phase==="ready"?(g(),b("div",Tn,[f("button",{type:"button","aria-label":"Poprzedni slajd",onClick:gt}),r[15]||(r[15]=f("div",{class:"mid"},null,-1)),f("button",{type:"button","aria-label":"Następny slajd",onClick:bt})])):y("",!0),h.value||O.value?(g(),b("div",Ln,[h.value?(g(),b("p",Pn,"Eksportuję do PPTX… slajd "+C(h.value.done)+" z "+C(h.value.total),1)):(g(),b(ke,{key:1},[r[16]||(r[16]=f("p",null,"Nie udało się utworzyć pliku PPTX.",-1)),f("p",null,C(O.value),1),f("button",{type:"button",class:"status-retry",onClick:r[3]||(r[3]=s=>O.value="")},"Zamknij")],64))])):y("",!0),e.phase==="ready"&&e.mode!=="speaker"&&H.value?(g(),b("a",{key:7,class:"print-link",href:H.value}," Kliknij, aby zobaczyć wersję z notatkami i dodatkowymi slajdami ",8,jn)):y("",!0),e.phase==="ready"&&e.mode!=="speaker"&&H.value&&ye.value>1?(g(),b("a",{key:8,class:"print-link",href:H.value,style:He({top:`${(ye.value-1)*720+24}px`})}," Pełna wersja prezentacji z notatkami i dodatkowymi slajdami jest dostępna pod tym linkiem ",12,An)):y("",!0),e.phase==="ready"?(g(),b("div",$n,C(_.value),1)):y("",!0)],8,["to"])):y("",!0)],8,dn))}});export{Mn as _,nn as r}; diff --git a/public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-DxZMSXIh.js b/public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-05LZv84e.js similarity index 95% rename from public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-DxZMSXIh.js rename to public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-05LZv84e.js index 7e0b1d9..fdad812 100644 --- a/public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-DxZMSXIh.js +++ b/public/assets/ElectiveBar.vue_vue_type_script_setup_true_lang-05LZv84e.js @@ -1 +1 @@ -import{d as v,an as z,ae as g,n as s,c as a,e as o,p as n,t as h,i as m,j as b,f as p,b as f,x as u,l as _,ag as C}from"./index-CtNAsql9.js";const x=["aria-pressed"],A={key:1,class:"notice"},B={key:2,class:"stack",style:{"margin-bottom":"16px"}},E={key:0,class:"notice"},N={key:1,class:"chips wrap"},V=["aria-pressed"],M=v({__name:"ElectiveBar",props:{part:{default:"both"}},setup(r){const c=r,t=z(),d=g(),y=u(()=>C(d.pendingElectives.length,"grupa przedmiotów do wyboru","grupy przedmiotów do wyboru","grup przedmiotów do wyboru")),i=u(()=>c.part!=="chip"&&d.pendingElectives.length>0),l=u(()=>c.part!=="notice"&&t.hasChoices);return(D,e)=>{const w=_("router-link");return r.part==="chip"&&l.value?(s(),a("button",{key:0,class:"chip",type:"button","aria-pressed":o(t).showAll,onClick:e[0]||(e[0]=k=>o(t).setShowAll(!o(t).showAll))},"Pokaż wszystkie przedmioty do wyboru",8,x)):r.part==="notice"&&i.value?(s(),a("p",A,[n(" Masz "+h(y.value)+". Do czasu wyboru widać wszystkie alternatywy. ",1),m(w,{to:{name:"profile",hash:"#wybor"}},{default:b(()=>[...e[2]||(e[2]=[n("Wybierz",-1)])]),_:1})])):r.part==="both"&&(i.value||l.value)?(s(),a("div",B,[i.value?(s(),a("p",E,[n(" Masz "+h(y.value)+". Do czasu wyboru widać wszystkie alternatywy. ",1),m(w,{to:{name:"profile",hash:"#wybor"}},{default:b(()=>[...e[3]||(e[3]=[n("Wybierz",-1)])]),_:1})])):p("",!0),l.value?(s(),a("div",N,[f("button",{class:"chip",type:"button","aria-pressed":o(t).showAll,onClick:e[1]||(e[1]=k=>o(t).setShowAll(!o(t).showAll))},"Pokaż wszystkie przedmioty do wyboru",8,V)])):p("",!0)])):p("",!0)}}});export{M as _}; +import{d as v,an as z,ae as g,n as s,c as a,e as o,p as n,t as h,i as m,j as b,f as p,b as f,x as u,l as _,ag as C}from"./index-BhVKyY57.js";const x=["aria-pressed"],A={key:1,class:"notice"},B={key:2,class:"stack",style:{"margin-bottom":"16px"}},E={key:0,class:"notice"},N={key:1,class:"chips wrap"},V=["aria-pressed"],M=v({__name:"ElectiveBar",props:{part:{default:"both"}},setup(r){const c=r,t=z(),d=g(),y=u(()=>C(d.pendingElectives.length,"grupa przedmiotów do wyboru","grupy przedmiotów do wyboru","grup przedmiotów do wyboru")),i=u(()=>c.part!=="chip"&&d.pendingElectives.length>0),l=u(()=>c.part!=="notice"&&t.hasChoices);return(D,e)=>{const w=_("router-link");return r.part==="chip"&&l.value?(s(),a("button",{key:0,class:"chip",type:"button","aria-pressed":o(t).showAll,onClick:e[0]||(e[0]=k=>o(t).setShowAll(!o(t).showAll))},"Pokaż wszystkie przedmioty do wyboru",8,x)):r.part==="notice"&&i.value?(s(),a("p",A,[n(" Masz "+h(y.value)+". Do czasu wyboru widać wszystkie alternatywy. ",1),m(w,{to:{name:"profile",hash:"#wybor"}},{default:b(()=>[...e[2]||(e[2]=[n("Wybierz",-1)])]),_:1})])):r.part==="both"&&(i.value||l.value)?(s(),a("div",B,[i.value?(s(),a("p",E,[n(" Masz "+h(y.value)+". Do czasu wyboru widać wszystkie alternatywy. ",1),m(w,{to:{name:"profile",hash:"#wybor"}},{default:b(()=>[...e[3]||(e[3]=[n("Wybierz",-1)])]),_:1})])):p("",!0),l.value?(s(),a("div",N,[f("button",{class:"chip",type:"button","aria-pressed":o(t).showAll,onClick:e[1]||(e[1]=k=>o(t).setShowAll(!o(t).showAll))},"Pokaż wszystkie przedmioty do wyboru",8,V)])):p("",!0)])):p("",!0)}}});export{M as _}; diff --git a/public/assets/ForgotView-DuTJzz4K.js b/public/assets/ForgotView-BTYOeeYh.js similarity index 92% rename from public/assets/ForgotView-DuTJzz4K.js rename to public/assets/ForgotView-BTYOeeYh.js index 102635d..188d11f 100644 --- a/public/assets/ForgotView-DuTJzz4K.js +++ b/public/assets/ForgotView-BTYOeeYh.js @@ -1 +1 @@ -import{d as f,c as t,b as a,h as y,t as n,f as m,w as _,v as w,i as b,j as k,r,l as h,n as o,p as g,a as x}from"./index-CtNAsql9.js";import{f as V}from"./forms-CHet_2fA.js";const j={class:"auth"},B={key:0,class:"notice",role:"status"},C={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},N={class:"field"},W={key:0,class:"error-text"},M=["disabled"],z={class:"auth-links"},I=f({__name:"ForgotView",setup(A){const l=r(""),i=r(!1),u=r(!1),s=r(null);async function c(){i.value=!0,s.value=null;try{await x.forgotPassword(l.value.trim()),u.value=!0}catch(d){s.value=V(d)}finally{i.value=!1}}return(d,e)=>{const p=h("router-link");return o(),t("div",j,[e[3]||(e[3]=a("header",{class:"page-head"},[a("span",{class:"eyebrow"},"BM II° · UWr"),a("h1",null,"Przypomnij hasło")],-1)),u.value?(o(),t("p",B,"Jeśli konto o tym adresie istnieje, wysłaliśmy na nie wiadomość z linkiem do ustawienia nowego hasła.")):(o(),t("form",{key:1,onSubmit:y(c,["prevent"]),novalidate:""},[s.value?.message?(o(),t("div",C,n(s.value.message),1)):m("",!0),a("div",N,[e[1]||(e[1]=a("label",{for:"email"},"Adres e-mail",-1)),_(a("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=v=>l.value=v),type:"email",autocomplete:"email",inputmode:"email",required:"",autofocus:""},null,512),[[w,l.value]]),s.value?.fields.email?(o(),t("p",W,n(s.value.fields.email),1)):m("",!0)]),a("button",{class:"btn primary block",type:"submit",disabled:i.value||!l.value},n(i.value?"Wysyłanie…":"Wyślij link"),9,M)],32)),a("div",z,[b(p,{to:"/logowanie"},{default:k(()=>[...e[2]||(e[2]=[g("Wróć do logowania",-1)])]),_:1})])])}}});export{I as default}; +import{d as f,c as t,b as a,h as y,t as n,f as m,w as _,v as w,i as b,j as k,r,l as h,n as o,p as g,a as x}from"./index-BhVKyY57.js";import{f as V}from"./forms-CbFOvcno.js";const j={class:"auth"},B={key:0,class:"notice",role:"status"},C={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},N={class:"field"},W={key:0,class:"error-text"},M=["disabled"],z={class:"auth-links"},I=f({__name:"ForgotView",setup(A){const l=r(""),i=r(!1),u=r(!1),s=r(null);async function c(){i.value=!0,s.value=null;try{await x.forgotPassword(l.value.trim()),u.value=!0}catch(d){s.value=V(d)}finally{i.value=!1}}return(d,e)=>{const p=h("router-link");return o(),t("div",j,[e[3]||(e[3]=a("header",{class:"page-head"},[a("span",{class:"eyebrow"},"BM II° · UWr"),a("h1",null,"Przypomnij hasło")],-1)),u.value?(o(),t("p",B,"Jeśli konto o tym adresie istnieje, wysłaliśmy na nie wiadomość z linkiem do ustawienia nowego hasła.")):(o(),t("form",{key:1,onSubmit:y(c,["prevent"]),novalidate:""},[s.value?.message?(o(),t("div",C,n(s.value.message),1)):m("",!0),a("div",N,[e[1]||(e[1]=a("label",{for:"email"},"Adres e-mail",-1)),_(a("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=v=>l.value=v),type:"email",autocomplete:"email",inputmode:"email",required:"",autofocus:""},null,512),[[w,l.value]]),s.value?.fields.email?(o(),t("p",W,n(s.value.fields.email),1)):m("",!0)]),a("button",{class:"btn primary block",type:"submit",disabled:i.value||!l.value},n(i.value?"Wysyłanie…":"Wyślij link"),9,M)],32)),a("div",z,[b(p,{to:"/logowanie"},{default:k(()=>[...e[2]||(e[2]=[g("Wróć do logowania",-1)])]),_:1})])])}}});export{I as default}; diff --git a/public/assets/LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js b/public/assets/LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js similarity index 81% rename from public/assets/LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js rename to public/assets/LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js index 480fde8..0435a1d 100644 --- a/public/assets/LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js +++ b/public/assets/LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js @@ -1 +1 @@ -import{d as n,c as r,p as l,t as i,b as o,aJ as d,n as s}from"./index-CtNAsql9.js";const y={key:0,class:"notice error",role:"alert"},c={key:1,class:"stack","aria-busy":"true","aria-label":"Wczytywanie"},m=n({__name:"LoadState",props:{loading:{type:Boolean},error:{},ready:{type:Boolean}},emits:["retry"],setup(e){return(a,t)=>e.error&&!e.ready?(s(),r("div",y,[l(i(e.error)+" ",1),o("button",{class:"linkish",type:"button",onClick:t[0]||(t[0]=u=>a.$emit("retry"))},"Spróbuj ponownie")])):e.ready?d(a.$slots,"default",{},void 0,void 0,2):(s(),r("div",c,[...t[1]||(t[1]=[o("div",{class:"skeleton"},null,-1),o("div",{class:"skeleton"},null,-1),o("div",{class:"skeleton"},null,-1)])]))}});export{m as _}; +import{d as n,c as r,p as l,t as i,b as o,aP as d,n as s}from"./index-BhVKyY57.js";const y={key:0,class:"notice error",role:"alert"},c={key:1,class:"stack","aria-busy":"true","aria-label":"Wczytywanie"},m=n({__name:"LoadState",props:{loading:{type:Boolean},error:{},ready:{type:Boolean}},emits:["retry"],setup(e){return(a,t)=>e.error&&!e.ready?(s(),r("div",y,[l(i(e.error)+" ",1),o("button",{class:"linkish",type:"button",onClick:t[0]||(t[0]=u=>a.$emit("retry"))},"Spróbuj ponownie")])):e.ready?d(a.$slots,"default",{},void 0,void 0,2):(s(),r("div",c,[...t[1]||(t[1]=[o("div",{class:"skeleton"},null,-1),o("div",{class:"skeleton"},null,-1),o("div",{class:"skeleton"},null,-1)])]))}});export{m as _}; diff --git a/public/assets/LoginView-B3MVwe0A.js b/public/assets/LoginView-Ded3G-tr.js similarity index 95% rename from public/assets/LoginView-B3MVwe0A.js rename to public/assets/LoginView-Ded3G-tr.js index eeabbc9..72461ae 100644 --- a/public/assets/LoginView-B3MVwe0A.js +++ b/public/assets/LoginView-Ded3G-tr.js @@ -1 +1 @@ -import{d as C,u as q,o as z,a as N,c as o,b as s,e as U,f as i,t as p,w as y,v as w,g as Z,h as B,i as g,j as k,k as S,r as a,l as A,m as I,n as l,p as _}from"./index-CtNAsql9.js";import{s as h,f as R}from"./forms-CHet_2fA.js";import{o as T}from"./oauth-zzthF4BZ.js";const D={class:"auth"},E={key:0,class:"notice",role:"status"},L={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},P={class:"field"},W={key:0,class:"error-text"},H={class:"field"},F={key:0,class:"error-text"},G={class:"check",style:{"margin-bottom":"16px"}},J=["disabled"],K={class:"auth-links"},$=C({__name:"LoginView",setup(O){const x=q(),c=S(),j=I(),n=a(""),u=a(""),v=a(!0),d=a(!1),t=a(null),f=a(!1);z(async()=>{try{const m=await N.oauthProviders();f.value=m.providers.some(e=>e.name==="microsoft")}catch{f.value=!1}});function V(){window.location.assign(T("microsoft",{action:"login",returnTo:h(c.query.redirect)}))}async function M(){d.value=!0,t.value=null;try{await x.login(n.value.trim(),u.value,v.value),await j.replace(h(c.query.redirect))}catch(m){t.value=R(m)}finally{d.value=!1}}return(m,e)=>{const b=A("router-link");return l(),o("div",D,[e[8]||(e[8]=s("header",{class:"page-head"},[s("span",{class:"eyebrow"},"BM II° · UWr"),s("h1",null,"Zaloguj się")],-1)),U(c).query.expired?(l(),o("p",E,"Sesja wygasła. Zaloguj się ponownie.")):i("",!0),s("form",{onSubmit:B(M,["prevent"]),novalidate:""},[t.value?.message?(l(),o("div",L,p(t.value.message),1)):i("",!0),s("div",P,[e[3]||(e[3]=s("label",{for:"email"},"Adres e-mail",-1)),y(s("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=r=>n.value=r),type:"email",autocomplete:"username",inputmode:"email",required:"",autofocus:""},null,512),[[w,n.value]]),t.value?.fields.email?(l(),o("p",W,p(t.value.fields.email),1)):i("",!0)]),s("div",H,[e[4]||(e[4]=s("label",{for:"password"},"Hasło",-1)),y(s("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=r=>u.value=r),type:"password",autocomplete:"current-password",required:""},null,512),[[w,u.value]]),t.value?.fields.password?(l(),o("p",F,p(t.value.fields.password),1)):i("",!0)]),s("label",G,[y(s("input",{"onUpdate:modelValue":e[2]||(e[2]=r=>v.value=r),type:"checkbox"},null,512),[[Z,v.value]]),e[5]||(e[5]=s("span",null,"Pamiętaj mnie na tym urządzeniu",-1))]),s("button",{class:"btn primary block",type:"submit",disabled:d.value||!n.value||!u.value},p(d.value?"Logowanie…":"Zaloguj się"),9,J)],32),f.value?(l(),o("button",{key:1,class:"btn block",type:"button",style:{"margin-top":"12px"},onClick:V},"Zaloguj przez Microsoft 365")):i("",!0),s("div",K,[g(b,{to:"/przypomnij-haslo"},{default:k(()=>[...e[6]||(e[6]=[_("Nie pamiętam hasła",-1)])]),_:1}),g(b,{to:"/rejestracja"},{default:k(()=>[...e[7]||(e[7]=[_("Załóż konto",-1)])]),_:1})])])}}});export{$ as default}; +import{d as C,u as q,o as z,a as N,c as o,b as s,e as U,f as i,t as p,w as y,v as w,g as Z,h as B,i as g,j as k,k as S,r as a,l as A,m as I,n as l,p as _}from"./index-BhVKyY57.js";import{s as h,f as R}from"./forms-CbFOvcno.js";import{o as T}from"./oauth-zzthF4BZ.js";const D={class:"auth"},E={key:0,class:"notice",role:"status"},L={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},P={class:"field"},W={key:0,class:"error-text"},H={class:"field"},F={key:0,class:"error-text"},G={class:"check",style:{"margin-bottom":"16px"}},J=["disabled"],K={class:"auth-links"},$=C({__name:"LoginView",setup(O){const x=q(),c=S(),j=I(),n=a(""),u=a(""),v=a(!0),d=a(!1),t=a(null),f=a(!1);z(async()=>{try{const m=await N.oauthProviders();f.value=m.providers.some(e=>e.name==="microsoft")}catch{f.value=!1}});function V(){window.location.assign(T("microsoft",{action:"login",returnTo:h(c.query.redirect)}))}async function M(){d.value=!0,t.value=null;try{await x.login(n.value.trim(),u.value,v.value),await j.replace(h(c.query.redirect))}catch(m){t.value=R(m)}finally{d.value=!1}}return(m,e)=>{const b=A("router-link");return l(),o("div",D,[e[8]||(e[8]=s("header",{class:"page-head"},[s("span",{class:"eyebrow"},"BM II° · UWr"),s("h1",null,"Zaloguj się")],-1)),U(c).query.expired?(l(),o("p",E,"Sesja wygasła. Zaloguj się ponownie.")):i("",!0),s("form",{onSubmit:B(M,["prevent"]),novalidate:""},[t.value?.message?(l(),o("div",L,p(t.value.message),1)):i("",!0),s("div",P,[e[3]||(e[3]=s("label",{for:"email"},"Adres e-mail",-1)),y(s("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=r=>n.value=r),type:"email",autocomplete:"username",inputmode:"email",required:"",autofocus:""},null,512),[[w,n.value]]),t.value?.fields.email?(l(),o("p",W,p(t.value.fields.email),1)):i("",!0)]),s("div",H,[e[4]||(e[4]=s("label",{for:"password"},"Hasło",-1)),y(s("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=r=>u.value=r),type:"password",autocomplete:"current-password",required:""},null,512),[[w,u.value]]),t.value?.fields.password?(l(),o("p",F,p(t.value.fields.password),1)):i("",!0)]),s("label",G,[y(s("input",{"onUpdate:modelValue":e[2]||(e[2]=r=>v.value=r),type:"checkbox"},null,512),[[Z,v.value]]),e[5]||(e[5]=s("span",null,"Pamiętaj mnie na tym urządzeniu",-1))]),s("button",{class:"btn primary block",type:"submit",disabled:d.value||!n.value||!u.value},p(d.value?"Logowanie…":"Zaloguj się"),9,J)],32),f.value?(l(),o("button",{key:1,class:"btn block",type:"button",style:{"margin-top":"12px"},onClick:V},"Zaloguj przez Microsoft 365")):i("",!0),s("div",K,[g(b,{to:"/przypomnij-haslo"},{default:k(()=>[...e[6]||(e[6]=[_("Nie pamiętam hasła",-1)])]),_:1}),g(b,{to:"/rejestracja"},{default:k(()=>[...e[7]||(e[7]=[_("Załóż konto",-1)])]),_:1})])])}}});export{$ as default}; diff --git a/public/assets/MarkdownEditor-CDQeviuk.js b/public/assets/MarkdownEditor-CDQeviuk.js new file mode 100644 index 0000000..7a2dc87 --- /dev/null +++ b/public/assets/MarkdownEditor-CDQeviuk.js @@ -0,0 +1,46 @@ +import{d as gu,o as mu,V as Su,U as Qu,n as Yl,c as _l,b as bu,f as ku,C as $u,r as br}from"./index-BhVKyY57.js";let Jr=[],Ga=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e>1;if(n=Ga[i])e=i+1;else return!0;if(e==t)return!1}}function El(n){return n>=127462&&n<=127487}const zl=8205;function yu(n,e,t=!0,i=!0){return(t?Na:wu)(n,e,i)}function Na(n,e,t){if(e==n.length)return e;e&&Fa(n.charCodeAt(e))&&Ha(n.charCodeAt(e-1))&&e--;let i=kr(n,e);for(e+=ql(i);e=0&&El(kr(n,l));)s++,l-=2;if(s%2==0)break;e+=2}else break}return e}function wu(n,e,t){for(;e>1;){let i=Na(n,e-2,t);if(i=56320&&n<57344}function Ha(n){return n>=55296&&n<56320}function ql(n){return n<65536?1:2}class W{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Nt(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),Fe.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Nt(this,e,t);let i=[];return this.decompose(e,t,i,0),Fe.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new vi(this),s=new vi(e);for(let l=t,o=t;;){if(r.next(l),s.next(l),l=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(o+=r.value.length,r.done||o>=i)return!0}}iter(e=1){return new vi(this,e)}iterRange(e,t=this.length){return new Ka(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Ja(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?W.empty:e.length<=32?new se(e):Fe.from(se.split(e,[]))}}class se extends W{constructor(e,t=Pu(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let l=this.text[s],o=r+l.length;if((t?i:o)>=e)return new vu(r,o,i,l);r=o+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new se(Wl(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let l=i.pop(),o=vn(s.text,l.text.slice(),0,s.length);if(o.length<=32)i.push(new se(o,l.length+s.length));else{let a=o.length>>1;i.push(new se(o.slice(0,a)),new se(o.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof se))return super.replace(e,t,i);[e,t]=Nt(this,e,t);let r=vn(this.text,vn(i.text,Wl(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new se(r,s):Fe.from(se.split(r,[]),s)}sliceString(e,t=this.length,i=` +`){[e,t]=Nt(this,e,t);let r="";for(let s=0,l=0;s<=t&&le&&l&&(r+=i),es&&(r+=o.slice(Math.max(0,e-s),t-s)),s=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new se(i,r)),i=[],r=-1);return r>-1&&t.push(new se(i,r)),t}}class Fe extends W{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let l=this.children[s],o=r+l.length,a=i+l.lines-1;if((t?a:o)>=e)return l.lineInner(e,t,i,r);r=o+1,i=a+1}}decompose(e,t,i,r){for(let s=0,l=0;l<=t&&s=l){let h=r&((l<=e?1:0)|(a>=t?2:0));l>=e&&a<=t&&!h?i.push(o):o.decompose(e-l,t-l,i,h)}l=a+1}}replace(e,t,i){if([e,t]=Nt(this,e,t),i.lines=s&&t<=o){let a=l.replace(e-s,t-s,i),h=this.lines-l.lines+a.lines;if(a.lines>4&&a.lines>h>>6){let f=this.children.slice();return f[r]=a,new Fe(f,this.length-(t-e)+i.length)}return super.replace(s,o,a)}s=o+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` +`){[e,t]=Nt(this,e,t);let r="";for(let s=0,l=0;se&&s&&(r+=i),el&&(r+=o.sliceString(e-l,t-l,i)),l=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Fe))return 0;let i=0,[r,s,l,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==l||s==o)return i;let a=this.children[r],h=e.children[s];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let O of e)i+=O.lines;if(i<32){let O=[];for(let d of e)d.flatten(O);return new se(O,t)}let r=Math.max(32,i>>5),s=r<<1,l=r>>1,o=[],a=0,h=-1,f=[];function c(O){let d;if(O.lines>s&&O instanceof Fe)for(let p of O.children)c(p);else O.lines>l&&(a>l||!a)?(u(),o.push(O)):O instanceof se&&a&&(d=f[f.length-1])instanceof se&&O.lines+d.lines<=32?(a+=O.lines,h+=O.length+1,f[f.length-1]=new se(d.text.concat(O.text),d.length+1+O.length)):(a+O.lines>r&&u(),a+=O.lines,h+=O.length+1,f.push(O))}function u(){a!=0&&(o.push(f.length==1?f[0]:Fe.from(f,h)),h=-1,a=f.length=0)}for(let O of e)c(O);return u(),o.length==1?o[0]:new Fe(o,t)}}W.empty=new se([""],0);function Pu(n){let e=-1;for(let t of n)e+=t.length+1;return e}function vn(n,e,t=0,i=1e9){for(let r=0,s=0,l=!0;s=t&&(a>i&&(o=o.slice(0,i-r)),r0?1:(e instanceof se?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],l=s>>1,o=r instanceof se?r.text.length:r.children.length;if(l==(t>0?o:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(r instanceof se){let a=r.text[l+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[l+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof se?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Ka{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new vi(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Ja{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(W.prototype[Symbol.iterator]=function(){return this.iter()},vi.prototype[Symbol.iterator]=Ka.prototype[Symbol.iterator]=Ja.prototype[Symbol.iterator]=function(){return this});let vu=class{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}};function Nt(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function ge(n,e,t=!0,i=!0){return yu(n,e,t,i)}function Xu(n){return n>=56320&&n<57344}function Zu(n){return n>=55296&&n<56320}function Cu(n,e){let t=n.charCodeAt(e);if(!Zu(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Xu(i)?(t-55296<<10)+(i-56320)+65536:t}function Tu(n){return n<65536?1:2}const es=/\r\n?|\n/;var de=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(de||(de={}));class it{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return s+(e-r);s+=o}else{if(i!=de.Simple&&h>=e&&(i==de.TrackDel&&re||i==de.TrackBefore&&re))return null;if(h>e||h==e&&t<0&&!o)return e==r||t<0?s:s+a;s+=a}r=h}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let i=0,r=0;i=0&&r<=t&&o>=e)return rt?"cover":!0;r=o}return!1}toString(){let e="";for(let t=0;t=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new it(e)}static create(e){return new it(e)}}class ae extends it{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return ts(this,(t,i,r,s,l)=>e=e.replace(r,r+(i-t),l),!1),e}mapDesc(e,t=!1){return is(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,s=0;r=0){t[r]=o,t[r+1]=l;let a=r>>1;for(;i.length0&&kt(i,t,s.text),s.forward(f),o+=f}let h=e[l++];for(;o>1].toJSON()))}return e}static of(e,t,i){let r=[],s=[],l=0,o=null;function a(f=!1){if(!f&&!r.length)return;lu||c<0||u>t)throw new RangeError(`Invalid change range ${c} to ${u} (in doc of length ${t})`);let d=O?typeof O=="string"?W.of(O.split(i||es)):O:W.empty,p=d.length;if(c==u&&p==0)return;cl&&pe(r,c-l,-1),pe(r,u-c,p),kt(s,r,d),l=u}}return h(e),a(!o),o}static empty(e){return new ae(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;ro&&typeof l!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length=0&&t<=0&&t==n[r+1]?n[r]+=e:r>=0&&e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function kt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||l==n.sections.length||n.sections[l+1]<0);)o=n.sections[l++],a=n.sections[l++];e(r,h,s,f,c),r=h,s=f}}}function is(n,e,t,i=!1){let r=[],s=i?[]:null,l=new Mi(n),o=new Mi(e);for(let a=-1;;){if(l.done&&o.len||o.done&&l.len)throw new Error("Mismatched change set lengths");if(l.ins==-1&&o.ins==-1){let h=Math.min(l.len,o.len);pe(r,h,-1),l.forward(h),o.forward(h)}else if(o.ins>=0&&(l.ins<0||a==l.i||l.off==0&&(o.len=0&&a=0){let h=0,f=l.len;for(;f;)if(o.ins==-1){let c=Math.min(f,o.len);h+=c,f-=c,o.forward(c)}else if(o.ins==0&&o.lena||l.ins>=0&&l.len>a)&&(o||i.length>h),s.forward2(a),l.forward(a)}}}}class Mi{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?W.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?W.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Qt{constructor(e,t,i,r){this.from=e,this.to=t,this.flags=i,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Qt(i,r,this.flags,this.goalColumn)}extend(e,t=e,i=0){if(e<=this.anchor&&t>=this.anchor)return Q.range(e,t,void 0,void 0,i);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Q.range(this.anchor,r,void 0,void 0,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Q.range(e.anchor,e.head)}static create(e,t,i,r){return new Qt(e,t,i,r)}}class Q{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Q.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Q(e.ranges.map(t=>Qt.fromJSON(t)),e.main)}static single(e,t=e){return new Q([Q.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;rr.from-s.from),t=e.indexOf(i);for(let r=1;rs.head?Q.range(a,o):Q.range(o,a))}}return new Q(e,t)}}function th(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Ks=0;class R{constructor(e,t,i,r,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=Ks++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new R(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Js),!!e.static,e.enables)}of(e){return new Xn([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Xn(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Xn(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Js(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Xn{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=Ks++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,s=this.id,l=e[s]>>1,o=this.type==2,a=!1,h=!1,f=[];for(let c of this.dependencies)c=="doc"?a=!0:c=="selection"?h=!0:(((t=e[c.id])!==null&&t!==void 0?t:1)&1)==0&&f.push(e[c.id]);return{create(c){return c.values[l]=i(c),1},update(c,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||ns(c,f)){let O=i(c);if(o?!Bl(O,c.values[l],r):!r(O,c.values[l]))return c.values[l]=O,1}return 0},reconfigure:(c,u)=>{let O,d=u.config.address[s];if(d!=null){let p=Yn(u,d);if(this.dependencies.every(m=>m instanceof R?u.facet(m)===c.facet(m):m instanceof rt?u.field(m,!1)==c.field(m,!1):!0)||(o?Bl(O=i(c),p,r):r(O=i(c),p)))return c.values[l]=p,0}else O=i(c);return c.values[l]=O,1}}}get extension(){return this}}function Bl(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[a.id]),r=t.map(a=>a.type),s=i.filter(a=>!(a&1)),l=n[e.id]>>1;function o(a){let h=[];for(let f=0;fi===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(hn).find(i=>i.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let s=i.values[t],l=this.updateF(s,r);return this.compareF(s,l)?0:(i.values[t]=l,1)},reconfigure:(i,r)=>{let s=i.facet(hn),l=r.facet(hn),o;return(o=s.find(a=>a.field==this))&&o!=l.find(a=>a.field==this)?(i.values[t]=o.create(i),1):r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}}init(e){return[this,hn.of({field:this,create:e})]}get extension(){return this}}const Ct={lowest:4,low:3,default:2,high:1,highest:0};function pi(n){return e=>new ih(e,n)}const hi={highest:pi(Ct.highest),high:pi(Ct.high),default:pi(Ct.default),low:pi(Ct.low),lowest:pi(Ct.lowest)};class ih{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}}class lr{of(e){return new rs(this,e)}reconfigure(e){return lr.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class rs{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}}class Ln{constructor(e,t,i,r,s,l){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=l,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let r=[],s=Object.create(null),l=new Map;for(let u of Ru(e,t,l))u instanceof rt?r.push(u):(s[u.facet.id]||(s[u.facet.id]=[])).push(u);let o=Object.create(null),a=[],h=[];for(let u of r)o[u.id]=h.length<<1,h.push(O=>u.slot(O));let f=i?.config.facets;for(let u in s){let O=s[u],d=O[0].facet,p=f&&f[u]||[];if(O.every(m=>m.type==0))if(o[d.id]=a.length<<1|1,Js(p,O))a.push(i.facet(d));else{let m=d.combine(O.map(S=>S.value));a.push(i&&d.compare(m,i.facet(d))?i.facet(d):m)}else{for(let m of O)m.type==0?(o[m.id]=a.length<<1|1,a.push(m.value)):(o[m.id]=h.length<<1,h.push(S=>m.dynamicSlot(S)));o[d.id]=h.length<<1,h.push(m=>Au(m,d,O))}}let c=h.map(u=>u(o));return new Ln(e,l,c,o,a,s)}}function Ru(n,e,t){let i=[[],[],[],[],[]],r=new Map;function s(l,o){let a=r.get(l);if(a!=null){if(a<=o)return;let h=i[a].indexOf(l);h>-1&&i[a].splice(h,1),l instanceof rs&&t.delete(l.compartment)}if(r.set(l,o),Array.isArray(l))for(let h of l)s(h,o);else if(l instanceof rs){if(t.has(l.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(l.compartment)||l.inner;t.set(l.compartment,h),s(h,o)}else if(l instanceof ih)s(l.inner,l.prec);else if(l instanceof rt)i[o].push(l),l.provides&&s(l.provides,o);else if(l instanceof Xn)i[o].push(l),l.facet.extensions&&s(l.facet.extensions,Ct.default);else{let h=l.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${l}).`);if(h==l)throw new Error(`Unrecognized extension value in extension set (${l}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,o)}}return s(n,Ct.default),i.reduce((l,o)=>l.concat(o))}function Xi(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function Yn(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const nh=R.define(),ss=R.define({combine:n=>n.some(e=>e),static:!0}),rh=R.define({combine:n=>n.length?n[0]:void 0,static:!0}),sh=R.define(),lh=R.define(),oh=R.define(),ah=R.define({combine:n=>n.length?n[0]:!1});class pt{constructor(e,t){this.type=e,this.value=t}static define(){return new ju}}class ju{of(e){return new pt(this,e)}}class Mu{constructor(e){this.map=e}of(e){return new ee(this,e)}}class ee{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new ee(this.type,t)}is(e){return this.type==e}static define(e={}){return new Mu(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(t);s&&i.push(s)}return i}}ee.reconfigure=ee.define();ee.appendConfig=ee.define();class oe{constructor(e,t,i,r,s,l){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=l,this._doc=null,this._state=null,i&&th(i,t.newLength),s.some(o=>o.type==oe.time)||(this.annotations=s.concat(oe.time.of(Date.now())))}static create(e,t,i,r,s,l){return new oe(e,t,i,r,s,l)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(oe.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}oe.time=pt.define();oe.userEvent=pt.define();oe.addToHistory=pt.define();oe.remote=pt.define();function Lu(n,e){let t=[];for(let i=0,r=0;;){let s,l;if(i=n[i]))s=n[i++],l=n[i++];else if(r=0;r--){let s=i[r](n);s instanceof oe?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof oe?n=s[0]:n=fh(e,Wt(s),!1)}return n}function _u(n){let e=n.startState,t=e.facet(oh),i=n;for(let r=t.length-1;r>=0;r--){let s=t[r](n);s&&Object.keys(s).length&&(i=hh(i,ls(e,s,n.changes.newLength),!0))}return i==n?n:oe.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const Eu=[];function Wt(n){return n==null?Eu:Array.isArray(n)?n:[n]}var ht=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(ht||(ht={}));const zu=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let os;try{os=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function qu(n){if(os)return os.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||zu.test(t)))return!0}return!1}function Wu(n){return e=>{if(!/\S/.test(e))return ht.Space;if(qu(e))return ht.Word;for(let t=0;t-1)return ht.Word;return ht.Other}}class U{constructor(e,t,i,r,s,l){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,l&&(l._state=this);for(let o=0;or.set(h,a)),t=null),r.set(o.value.compartment,o.value.extension)):o.is(ee.reconfigure)?(t=null,i=o.value):o.is(ee.appendConfig)&&(t=null,i=Wt(i).concat(o.value));let s;t?s=e.startState.values.slice():(t=Ln.resolve(i,r,this),s=new U(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let l=e.startState.facet(ss)?e.newSelection:e.newSelection.asSingle();new U(t,e.newDoc,l,s,(o,a)=>a.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Q.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),s=[i.range],l=Wt(i.effects);for(let o=1;ol.spec.fromJSON(o,a)))}}return U.create({doc:e.doc,selection:Q.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Ln.resolve(e.extensions||[],new Map),i=e.doc instanceof W?e.doc:W.of((e.doc||"").split(t.staticFacet(U.lineSeparator)||es)),r=e.selection?e.selection instanceof Q?e.selection:Q.single(e.selection.anchor,e.selection.head):Q.single(0);return th(r,i.length),t.staticFacet(ss)||(r=r.asSingle()),new U(t,i,r,t.dynamicSlots.map(()=>null),(s,l)=>l.create(s),null)}get tabSize(){return this.facet(U.tabSize)}get lineBreak(){return this.facet(U.lineSeparator)||` +`}get readOnly(){return this.facet(ah)}phrase(e,...t){for(let i of this.facet(U.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>t.length?i:t[s-1]})),e}languageDataAt(e,t,i=-1){let r=[];for(let s of this.facet(nh))for(let l of s(this,t,i))Object.prototype.hasOwnProperty.call(l,e)&&r.push(l[e]);return r}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return Wu(t.length?t[0]:"")}wordAt(e){let{text:t,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),l=e-i,o=e-i;for(;l>0;){let a=ge(t,l,!1);if(s(t.slice(a,l))!=ht.Word)break;l=a}for(;on.length?n[0]:4});U.lineSeparator=rh;U.readOnly=ah;U.phrases=R.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(r=>n[r]==e[r])}});U.languageData=nh;U.changeFilter=sh;U.transactionFilter=lh;U.transactionExtender=oh;lr.reconfigure=ee.define();function ch(n,e,t={}){let i={};for(let r of n)for(let s of Object.keys(r)){let l=r[s],o=i[s];if(o===void 0)i[s]=l;else if(!(o===l||l===void 0))if(Object.hasOwnProperty.call(t,s))i[s]=t[s](o,l);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class $t{eq(e){return this==e}range(e,t=e){return as.create(e,t,this)}}$t.prototype.startSide=$t.prototype.endSide=0;$t.prototype.point=!1;$t.prototype.mapMode=de.TrackDel;function el(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let as=class uh{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new uh(e,t,i)}};function hs(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class tl{constructor(e,t,i,r){this.from=e,this.to=t,this.value=i,this.maxPoint=r}get length(){return _t(this.to)}findIndex(e,t,i,r=0){let s=i?this.to:this.from;for(let l=r,o=s.length;;){if(l==o)return l;let a=l+o>>1,h=s[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==l)return h>=0?l:o;h>=0?o=a:l=a+1}}between(e,t,i,r){for(let s=this.findIndex(t,-1e9,!0),l=this.findIndex(i,1e9,!1,s);sm||p==m&&u.startSide>0&&u.endSide<=0)continue;if(!((m-p||u.endSide-u.startSide)<0))if(h<0&&(h=p),u.point&&(f=Math.max(f,m-p)),(p-i||u.startSide-r)>=0)l.push(u),o.push(p-h),a.push(m-h),i=m,r=u.endSide;else{if(p==m)for(let S=l.length;S>0;S--){if((p-(a[S-1]+h)||u.startSide-l[S-1].endSide)>=0){l.splice(S,0,u),o.splice(S,0,p-h),a.splice(S,0,m-h);continue e}if((p-(o[S-1]+h)||u.endSide-l[S-1].startSide)>0)break}s(p,m,u)}}return{mapped:l.length?new tl(o,a,l,f):null,pos:h}}}class F{constructor(e,t,i,r){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=r}static create(e,t,i,r){return new F(e,t,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,l=e.filter;if(t.length==0&&!l)return this;if(i&&(t=t.slice().sort(hs)),this.isEmpty)return t.length?F.of(t):this;let o=new Oh(this,null,-1).goto(0),a=0,h=[],f=new Bt;for(;o.value||a=0){let c=t[a++];f.addInner(c.from,c.to,c.value,!1)||h.push(c)}else o.rangeIndex==1&&o.chunkIndexthis.chunkEnd(o.chunkIndex)||so.to||s{s||(s=new Bt),s.addRange(a,h,f,!1)};for(let a=0;a=s&&e<=s+l.length&&l.between(s,e-s,t-s,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return Li.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Li.from(e).goto(t)}static compare(e,t,i,r,s=-1){let l=e.filter(c=>c.maxPoint>0||!c.isEmpty&&c.maxPoint>=s),o=t.filter(c=>c.maxPoint>0||!c.isEmpty&&c.maxPoint>=s),a=Vl(l,o,i),h=new gi(l,a,s),f=new gi(o,a,s);i.iterGaps((c,u,O)=>Dl(h,c,f,u,O,r)),i.empty&&i.length==0&&Dl(h,0,f,0,0,r)}static eq(e,t,i=0,r){r==null&&(r=999999999);let s=e.filter(f=>!f.isEmpty&&t.indexOf(f)<0),l=t.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(s.length!=l.length)return!1;if(!s.length)return!0;let o=Vl(s,l),a=new gi(s,o,0).goto(i),h=new gi(l,o,0).goto(i);for(;;){if(a.to!=h.to||!fs(a.active,h.active)||a.point&&(!h.point||!el(a.point,h.point)))return!1;if(a.to>r)return!0;a.next(),h.next()}}static spans(e,t,i,r,s=-1){let l=new gi(e,null,s).goto(t),o=t,a=l.openStart;for(;;){let h=Math.min(l.to,i);if(l.point){let f=l.activeForPoint(l.to),c=l.pointFromo&&(r.span(o,h,l.active,a),a=l.openEnd(h));if(l.to>i)return a+(l.point&&l.to>i?1:0);o=l.to,l.next()}}static of(e,t=!1){let i=new Bt;for(let r of e instanceof as?[e]:t?Bu(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return F.empty;let t=_t(e);for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=F.empty;r=r.nextLayer)t=new F(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}F.empty=new F([],[],null,-1);function _t(n){return n[n.length-1]}function Bu(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(hs);e=i}return n}F.empty.nextLayer=F.empty;class Bt{finishChunk(e){this.chunks.push(new tl(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addRange(e,t,i,!0)}addRange(e,t,i,r){this.addInner(e,t,i,r)||(this.nextLayer||(this.nextLayer=new Bt)).addRange(e,t,i,r)}addInner(e,t,i,r){let s=e-this.lastTo||i.startSide-this.last.endSide;if(r&&s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(F.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=F.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Vl(n,e,t){let i=new Map;for(let s of n)for(let l=0;l=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new Oh(l,t,i,s));return r.length==1?r[0]:new Li(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)$r(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)$r(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),$r(this.heap,0)}}}function $r(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let r=n[i];if(i+1=0&&(r=n[i+1],i++),t.compare(r)<0)break;n[i]=t,n[e]=r,e=i}}class gi{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Li.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){fn(this.active,e),fn(this.activeTo,e),fn(this.activeRank,e),this.minActive=Il(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:r,rank:s}=this.cursor;for(;t0;)t++;cn(this.active,t,i),cn(this.activeTo,t,r),cn(this.activeRank,t,s),e&&cn(e,t,this.cursor.from),this.minActive=Il(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&fn(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function Dl(n,e,t,i,r,s){n.goto(e),t.goto(i);let l=i+r,o=i,a=i-e,h=!!s.boundChange;for(let f=!1;;){let c=n.to+a-t.to,u=c||n.endSide-t.endSide,O=u<0?n.to+a:t.to,d=Math.min(O,l);if(n.point||t.point?(n.point&&t.point&&el(n.point,t.point)&&fs(n.activeForPoint(n.to),t.activeForPoint(t.to))||s.comparePoint(o,d,n.point,t.point),f=!1):(f&&(s.boundChange(o),f=!1),d>o&&!fs(n.active,t.active)&&s.compareRange(o,d,n.active,t.active),h&&dl)break;o=O,u<=0&&n.next(),u>=0&&t.next()}}function fs(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function Il(n,e){let t=-1,i=1e9;for(let r=0;r=e)return r;if(r==n.length)break;s+=n.charCodeAt(r)==9?t-s%t:1,r=ge(n,r)}return n.length}const cs="ͼ",Ul=typeof Symbol>"u"?"__"+cs:Symbol.for(cs),us=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Gl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class xt{constructor(e,t){this.rules=[];let{finish:i}=t||{};function r(l){return/^@/.test(l)?[l]:l.split(/,\s*/)}function s(l,o,a,h){let f=[],c=/^@(\w+)\b/.exec(l[0]),u=c&&c[1]=="keyframes";if(c&&o==null)return a.push(l[0]+";");for(let O in o){let d=o[O];if(/&/.test(O))s(O.split(/,\s*/).map(p=>l.map(m=>p.replace(/&/,m))).reduce((p,m)=>p.concat(m)),d,a);else if(d&&typeof d=="object"){if(!c)throw new RangeError("The value of a property ("+O+") should be a primitive value.");s(r(O),d,f,u)}else d!=null&&f.push(O.replace(/_.*/,"").replace(/[A-Z]/g,p=>"-"+p.toLowerCase())+": "+d+";")}(f.length||u)&&a.push((i&&!c&&!h?l.map(i):l).join(", ")+" {"+f.join(" ")+"}")}for(let l in e)s(r(l),e[l],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=Gl[Ul]||1;return Gl[Ul]=e+1,cs+e.toString(36)}static mount(e,t,i){let r=e[us],s=i&&i.nonce;r?s&&r.setNonce(s):r=new Du(e,s),r.mount(Array.isArray(t)?t:[t],e)}}let Nl=new Map;class Du{constructor(e,t){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=Nl.get(i);if(s)return e[us]=s;this.sheet=new r.CSSStyleSheet,Nl.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[us]=this}mount(e,t){let i=this.sheet,r=0,s=0,l=!1;for(let o=0;o-1&&(this.modules.splice(h,1),l=!0,s--,h=-1),h==-1){if(this.modules.splice(s++,0,a),l=!0,i)for(let f=0;f",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Iu=typeof navigator<"u"&&/Mac/.test(navigator.platform),Uu=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Oe=0;Oe<10;Oe++)yt[48+Oe]=yt[96+Oe]=String(Oe);for(var Oe=1;Oe<=24;Oe++)yt[Oe+111]="F"+Oe;for(var Oe=65;Oe<=90;Oe++)yt[Oe]=String.fromCharCode(Oe+32),Yi[Oe]=String.fromCharCode(Oe);for(var xr in yt)Yi.hasOwnProperty(xr)||(Yi[xr]=yt[xr]);function Gu(n){var e=Iu&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Uu&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Yi:yt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}let be=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Os=typeof document<"u"?document:{documentElement:{style:{}}};const ds=/Edge\/(\d+)/.exec(be.userAgent),dh=/MSIE \d/.test(be.userAgent),ps=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(be.userAgent),or=!!(dh||ps||ds),Fl=!or&&/gecko\/(\d+)/i.test(be.userAgent),yr=!or&&/Chrome\/(\d+)/.exec(be.userAgent),Hl="webkitFontSmoothing"in Os.documentElement.style,gs=!or&&/Apple Computer/.test(be.vendor),Kl=gs&&(/Mobile\/\w+/.test(be.userAgent)||be.maxTouchPoints>2);var X={mac:Kl||/Mac/.test(be.platform),windows:/Win/.test(be.platform),linux:/Linux|X11/.test(be.platform),ie:or,ie_version:dh?Os.documentMode||6:ps?+ps[1]:ds?+ds[1]:0,gecko:Fl,gecko_version:Fl?+(/Firefox\/(\d+)/.exec(be.userAgent)||[0,0])[1]:0,chrome:!!yr,chrome_version:yr?+yr[1]:0,ios:Kl,android:/Android\b/.test(be.userAgent),webkit:Hl,webkit_version:Hl?+(/\bAppleWebKit\/(\d+)/.exec(be.userAgent)||[0,0])[1]:0,safari:gs,safari_version:gs?+(/\bVersion\/(\d+(\.\d+)?)/.exec(be.userAgent)||[0,0])[1]:0,tabSize:Os.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function il(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const _n=Object.create(null);function nl(n,e,t){if(n==e)return!0;n||(n=_n),e||(e=_n);let i=Object.keys(n),r=Object.keys(e);if(i.length-0!=r.length-0)return!1;for(let s of i)if(s!=t&&(r.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function Nu(n,e){for(let t=n.attributes.length-1;t>=0;t--){let i=n.attributes[t].name;e[i]==null&&n.removeAttribute(i)}for(let t in e){let i=e[t];t=="style"?n.style.cssText=i:n.getAttribute(t)!=i&&n.setAttribute(t,i)}}function Jl(n,e,t){let i=!1;if(e)for(let r in e)t&&r in t||(i=!0,r=="style"?n.style.cssText="":n.removeAttribute(r));if(t)for(let r in t)e&&e[r]==t[r]||(i=!0,r=="style"?n.style.cssText=t[r]:n.setAttribute(r,t[r]));return i}function Fu(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Mt(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:l}=ph(e,t);i=(s?t?-3e8:-1:5e8)-1,r=(l?t?2e8:1:-6e8)+1}return new Mt(e,i,r,t,e.widget||null,!0)}static line(e){return new Ji(e)}static set(e,t=!1){return F.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}te.none=F.empty;class Ki extends te{constructor(e){let{start:t,end:i}=ph(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?il(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||_n}eq(e){return this==e||e instanceof Ki&&this.tagName==e.tagName&&nl(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Ki.prototype.point=!1;class Ji extends te{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Ji&&this.spec.class==e.spec.class&&nl(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Ji.prototype.mapMode=de.TrackBefore;Ji.prototype.point=!0;class Mt extends te{constructor(e,t,i,r,s,l){super(t,i,s,e),this.block=r,this.isReplace=l,this.mapMode=r?t<=0?de.TrackBefore:de.TrackAfter:de.TrackDel}get type(){return this.startSide!=this.endSide?ke.WidgetRange:this.startSide<=0?ke.WidgetBefore:ke.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Mt&&Hu(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Mt.prototype.point=!0;function ph(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function Hu(n,e){return n==e||!!(n&&e&&n.compare(e))}function Vt(n,e,t,i=0){let r=t.length-1;r>=0&&t[r]+i>=n?t[r]=Math.max(t[r],e):t.push(n,e)}class _i extends $t{constructor(e,t,i){super(),this.tagName=e,this.attributes=t,this.rank=i}eq(e){return e==this||e instanceof _i&&this.tagName==e.tagName&&nl(this.attributes,e.attributes)}static create(e){return new _i(e.tagName,e.attributes||_n,e.rank==null?50:Math.max(0,Math.min(e.rank,100)))}static set(e,t=!1){return F.of(e,t)}}_i.prototype.startSide=_i.prototype.endSide=-1;const ce=n=>n.nodeType==1,Ft=n=>n.nodeType==3;function Ei(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function ms(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Zi(n,e){if(!e.anchorNode)return!1;try{return ms(n,e.anchorNode)}catch{return!1}}function Ci(n){return Ft(n)?qi(n,0,n.nodeValue.length).getClientRects():ce(n)?n.getClientRects():[]}function Ti(n,e,t,i){return t?eo(n,e,t,i,-1)||eo(n,e,t,i,1):!1}function wt(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function En(n){return ce(n)&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function eo(n,e,t,i,r){for(;;){if(n==t&&e==i)return!0;if(e==(r<0?0:Ot(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||!ce(s))return!1;e=wt(n)+(r<0?0:1),n=s}else if(ce(n)){if(n=n.childNodes[e+(r<0?-1:0)],ce(n)&&(n.nodeName=="IMG"||n.nodeName=="BR"||n.contentEditable=="false"))return!1;e=r<0?Ot(n):0}else return!1}}function Ot(n){return Ft(n)?n.nodeValue.length:n.childNodes.length}function zi(n,e){let{left:t,right:i}=n;if(t==i)return n;let r=e?t:i;return{left:r,right:r,top:n.top,bottom:n.bottom}}function Ku(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function gh(n,e){let t=e.width/n.offsetWidth,i=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-n.offsetHeight)<1)&&(i=1),{scaleX:t,scaleY:i}}function Ju(n,e,t,i,r,s,l,o){let a=n.ownerDocument,h=a.defaultView||window;for(let f=n,c=!1;f&&!c;)if(ce(f)){let u,O=f==a.body,d=1,p=1,m=!0,S=!0;if(O)u=Ku(h);else{let T=getComputedStyle(f);if(/^(fixed|sticky)$/.test(T.position)&&(c=!0),(f.scrollHeight<=f.clientHeight||!/auto|scroll/.test(T.overflowY))&&(S=!1),(f.scrollWidth<=f.clientWidth||!/auto|scroll/.test(T.overflowX))&&(m=!1),!m&&!S){f=f.assignedSlot||f.parentNode;continue}let k=f.getBoundingClientRect();({scaleX:d,scaleY:p}=gh(f,k)),u={left:k.left,right:k.left+f.clientWidth*d,top:k.top,bottom:k.top+f.clientHeight*p}}let $=0,b=0;if(S)if(r=="nearest")e.top0&&e.bottom>u.bottom+b&&(b=e.bottom-u.bottom+l)):e.bottom>u.bottom-l&&(b=e.bottom-u.bottom+l,t<0&&e.top-b0&&e.right>u.right+$&&($=e.right-u.right+s)):e.right>u.right-s&&($=e.right-u.right+s,t<0&&e.leftu.bottom||e.leftu.right)&&(e={left:Math.max(e.left,u.left),right:Math.min(e.right,u.right),top:Math.max(e.top,u.top),bottom:Math.min(e.bottom,u.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function mh(n,e=!0){let t=n.ownerDocument,i=null,r=null;for(let s=n.parentNode;s&&!(s==t.body||(!e||i)&&r);)if(ce(s))!r&&s.scrollHeight>s.clientHeight&&/scroll|auto/.test(getComputedStyle(s).overflowY)&&(r=s),e&&!i&&s.scrollWidth>s.clientWidth&&/scroll|auto/.test(getComputedStyle(s).overflowX)&&(i=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:i,y:r}}class eO{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?Ot(t):0),i,Math.min(e.focusOffset,i?Ot(i):0))}set(e,t,i,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=r}}function Sh(n){let e=[];for(let t=n;t;t=t.nodeType==11?t.host:t.parentNode)ce(t)&&e.push({node:t,left:t.scrollLeft,top:t.scrollTop});return e}function Qh(n,e=!0){for(let{node:t,left:i,top:r}of n)e&&t.scrollTop!=r&&(t.scrollTop=r),t.scrollLeft!=i&&(t.scrollLeft=i)}let Zt=null;X.safari&&X.safari_version>=26&&(Zt=!1);function bh(n){if(n.setActive)return n.setActive();if(Zt)return n.focus(Zt);let e=Sh(n);n.focus(Zt==null?{get preventScroll(){return Zt={preventScroll:!0},!0}}:void 0),Zt||(Zt=!1,Qh(e))}let to;function qi(n,e,t=e){let i=to||(to=document.createRange());return i.setEnd(n,t),i.setStart(n,e),i}function Dt(n,e,t,i){let r={key:e,code:e,keyCode:t,which:t,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let s=new KeyboardEvent("keydown",r);s.synthetic=!0,n.dispatchEvent(s);let l=new KeyboardEvent("keyup",r);return l.synthetic=!0,n.dispatchEvent(l),s.defaultPrevented||l.defaultPrevented}function tO(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function iO(n,e){let t=e.focusNode,i=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=i)return!1;for(i=Math.min(i,Ot(t));;)if(i){if(!ce(t))return!1;let r=t.childNodes[i-1];r.contentEditable=="false"?i--:(t=r,i=Ot(t))}else{if(t==n)return!0;i=wt(t),t=t.parentNode}}function kh(n){return n instanceof Window?n.pageYOffset>Math.max(0,n.document.documentElement.scrollHeight-n.innerHeight-4):n.scrollTop>Math.max(1,n.scrollHeight-n.clientHeight-4)}function $h(n,e){for(let t=n,i=e;;){if(Ft(t)&&i>0)return{node:t,offset:i};if(ce(t)&&i>0){if(t.contentEditable=="false")return null;t=t.childNodes[i-1],i=Ot(t)}else if(t.parentNode&&!En(t))i=wt(t),t=t.parentNode;else return null}}function xh(n,e){for(let t=n,i=e;;){if(Ft(t)&&i=t){if(o.level==i)return l;(s<0||(r!=0?r<0?o.fromt:e[s].level>o.level))&&(s=l)}}if(s<0)throw new RangeError("Index out of range");return s}}function Ph(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;p-=3)if(Ie[p+1]==-O){let m=Ie[p+2],S=m&2?r:m&4?m&1?s:r:0;S&&(K[c]=K[Ie[p]]=S),o=p;break}}else{if(Ie.length==189)break;Ie[o++]=c,Ie[o++]=u,Ie[o++]=a}else if((d=K[c])==2||d==1){let p=d==r;a=p?0:1;for(let m=o-3;m>=0;m-=3){let S=Ie[m+2];if(S&2)break;if(p)Ie[m+2]|=2;else{if(S&4)break;Ie[m+2]|=4}}}}}function aO(n,e,t,i){for(let r=0,s=i;r<=t.length;r++){let l=r?t[r-1].to:n,o=ra;)d==m&&(d=t[--p].from,m=p?t[p-1].to:n),K[--d]=O;a=f}else s=h,a++}}}function Qs(n,e,t,i,r,s,l){let o=i%2?2:1;if(i%2==r%2)for(let a=e,h=0;aa&&l.push(new Ke(a,p.from,O));let m=p.direction==Ht!=!(O%2);bs(n,m?i+1:i,r,p.inner,p.from,p.to,l),a=p.to}d=p.to}else{if(d==t||(f?K[d]!=o:K[d]==o))break;d++}u?Qs(n,a,d,i+1,r,u,l):ae;){let f=!0,c=!1;if(!h||a>s[h-1].to){let p=K[a-1];p!=o&&(f=!1,c=p==16)}let u=!f&&o==1?[]:null,O=f?i:i+1,d=a;e:for(;;)if(h&&d==s[h-1].to){if(c)break e;let p=s[--h];if(!f)for(let m=p.from,S=h;;){if(m==e)break e;if(S&&s[S-1].to==m)m=s[--S].from;else{if(K[m-1]==o)break e;break}}if(u)u.push(p);else{p.toK.length;)K[K.length]=256;let i=[],r=e==Ht?0:1;return bs(n,r,r,t,0,n.length,i),i}function vh(n){return[new Ke(0,n,0)]}let Xh="";function fO(n,e,t,i,r){var s;if(!n.length)return null;let l=i.head-n.from,o;if(i.head==n.from&&i.assoc<0){if(!r)return null;l=e[o=0].side(!1,t)}else if(i.head==n.to&&i.assoc>0){if(r)return null;l=e[o=e.length-1].side(!0,t)}else o=Ke.find(e,l,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc);let a=e[o],h=a.side(r,t);if(l==h){let u=o+=r?1:-1;if(u<0||u>=e.length)return null;a=e[o=u],l=a.side(!r,t),h=a.side(r,t)}let f=ge(n.text,l,a.forward(r,t));(fa.to)&&(f=h),Xh=n.text.slice(Math.min(l,f),Math.max(l,f));let c=o==(r?e.length-1:0)?null:e[o+(r?1:-1)];if(f==h){if(!c)return r?Q.cursor(n.to,1):Q.cursor(n.from,-1);if(c.level+(r?0:1)n.some(e=>e)}),Lh=R.define({combine:n=>n.some(e=>e)}),Yh=R.define();class It{constructor(e,t,i,r,s,l=!1){this.range=e,this.y=t,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=l}map(e){return e.empty?this:new It(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new It(Q.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const un=ee.define({map:(n,e)=>n.map(e)}),_h=ee.define();function Je(n,e,t){let i=n.facet(Ah);i.length?i[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const at=R.define({combine:n=>n.length?n[0]:!0});let uO=0;const zt=R.define({combine(n){return n.filter((e,t)=>{for(let i=0;i{let a=[];return l&&a.push(ar.of(h=>{let f=h.plugin(o);return f?l(f):te.none})),s&&a.push(s(o)),a})}static fromClass(e,t){return dt.define((i,r)=>new e(i,r),t)}}class wr{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(Je(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Je(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){Je(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Eh=R.define(),ol=R.define(),ar=R.define(),zh=R.define(),al=R.define(),en=R.define(),qh=R.define();function io(n,e){let t=n.state.facet(qh);if(!t.length)return t;let i=t.map(s=>s instanceof Function?s(n):s),r=[];return F.spans(i,e.from,e.to,{point(){},span(s,l,o,a){let h=s-e.from,f=l-e.from,c=r;for(let u=o.length-1;u>=0;u--,a--){let O=o[u].spec.bidiIsolate,d;if(a>0&&c.length&&(d=c[c.length-1]).to==h&&d.direction==O)d.to=f,c=d.inner;else{let p={from:h,to:f,direction:O,inner:[]};c.push(p),c=p.inner}}}}),Wh(e.text,r)}function Wh(n,e){for(let t of e){if(t.direction==null){for(let i=t.from,r=0;i0;t--){let r=e[t-1];if(!(r.fromA>i.toA)){if(r.toAr.push(new Me(s,l,o,a))),this.changedRanges=r}static create(e,t,i){return new zn(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const OO=[];class ne{constructor(e,t,i=0){this.dom=e,this.length=t,this.flags=i,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return OO}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&Nu(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let i=t;for(let r of this.children){if(r==e)return i;i+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,i){return null}domPosFor(e,t){let i=wt(this.dom),r=this.length?e>0:t>0;return new We(this.parent.dom,i+(r?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof fr)return e;return null}static get(e){return e.cmTile}}class hr extends ne{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,i=null,r,s=e?.node==t?e:null,l=0;for(let o of this.children){if(o.sync(e),l+=o.length+o.breakAfter,r=i?i.nextSibling:t.firstChild,s&&r!=o.dom&&(s.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=no(r);else t.insertBefore(o.dom,r);i=o.dom}for(r=i?i.nextSibling:t.firstChild,s&&r&&(s.written=!0);r;)r=no(r);this.length=l}}function no(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class fr extends hr{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=ne.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],i=this,r=0,s=0;;)if(r==i.children.length){if(!t.length)return;i=i.parent,i.breakAfter&&s++,r=t.pop()}else{let l=i.children[r++];if(l instanceof ft)t.push(r),i=l,r=0;else{let o=s+l.length,a=e(l,s);if(a!==void 0)return a;s=o+l.breakAfter}}}resolveBlock(e,t){let i,r=-1,s,l=-1;if(this.blockTiles((o,a)=>{let h=a+o.length;if(e>=a&&e<=h){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(i=void 0)}(ae||e==a&&(t>1?o.length:o.covers(-1)))&&(!s||!o.isWidget()&&s.isWidget())&&(s=o,l=e-a)}}),!i&&!s)throw new Error("No tile at position "+e);return i&&t<0||!s?{tile:i,offset:r}:{tile:s,offset:l}}}class ft extends hr{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,t){let i=new ft(t||document.createElement(e.tagName),e);return t||(i.flags|=4),i}}class Kt extends hr{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,i){let r=new Kt(t||document.createElement("div"),e);return(!t||!i)&&(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(e,t,i=!1){let r=null,s=-1,l=null,o=-1;function a(f,c){for(let u=0,O=0;u=c&&(d.isComposite()?a(d,c-O):(!l||i&&l.isHidden&&(t>0&&!(l.flags&32)||i&&pO(l,d)))&&(p>c||d.flags&32&&t<=1)?(l=d,o=c-O):(O=-1)&&(r=d,s=c-O)),O=p}}a(this,e);let h=(t<0?r:l)||r||l;return h?{tile:h,offset:h==r?s:o}:null}coordsIn(e,t,i){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,i):dO(this)}domIn(e,t){let i=this.resolveInline(e,t);if(i){let{tile:r,offset:s}=i;if(this.dom.contains(r.dom))return r.isText()?new We(r.dom,Math.min(r.dom.nodeValue.length,s)):r.domPosFor(s,r.flags&16?1:r.flags&32?-1:t);let l=i.tile.parent,o=!1;for(let a of l.children){if(o)return new We(a.dom,0);a==i.tile&&(o=!0)}}return new We(this.dom,0)}}function dO(n){let e=n.dom.lastChild;if(!e)return n.dom.getBoundingClientRect();let t=Ci(e);return t[t.length-1]||null}function pO(n,e){let t=n.coordsIn(0,1),i=e.coordsIn(0,1);return t&&i&&i.topr&&(e=r);let s=e,l=e,o=0;e==0&&t<0||e==r&&t>=0?X.chrome||X.gecko||(e?(s--,o=1):l=0)?0:a.length-1];return X.safari&&!o&&h.width==0&&(h=Array.prototype.find.call(a,f=>f.width)||h),i==null?h:zi(h,(o?o>0:t<0)==i)}static of(e,t){let i=new At(t||document.createTextNode(e),e);return t||(i.flags|=2),i}}class Lt extends ne{constructor(e,t,i,r){super(e,t,r),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,i){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(i)return zi(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let s=this.dom.getClientRects(),l=null;if(!s.length)return null;let o=this.flags&16?!0:this.flags&32?!1:e>0;for(let a=o?s.length-1:0;l=s[a],!(e>0?a==0:a==s.length-1||l.top0==i)}}class gO{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,i){let{tile:r,index:s,beforeBreak:l,parents:o}=this;for(;e||t>0;)if(r.isComposite())if(l){if(!e)break;i&&i.break(),e--,l=!1}else if(s==r.children.length){if(!e&&!o.length)break;i&&i.leave(r),l=!!r.breakAfter,{tile:r,index:s}=o.pop(),s++}else{let a=r.children[s],h=a.breakAfter;(t>0?a.length<=e:a.length=0;o--){let a=t.marks[o],h=r.lastChild;if(h instanceof we&&h.mark.eq(a.mark))h.dom!=a.dom&&h.setDOM(Pr(a.dom)),r=h;else{let{dom:f}=a;this.cache.reused.get(a)&&ne.get(a.dom)&&(f=Pr(a.dom));let c=we.of(a.mark,f);r.append(c),r=c}this.cache.reused.set(a,2)}let s=ne.get(e.text);s&&this.cache.reused.set(s,2);let l=new At(e.text,e.text.nodeValue);l.flags|=8,this.pos=e.range.toB,r.append(l)}addInlineWidget(e,t,i){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let s=this.ensureMarks(t,i);!r&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,i){this.flushBuffer(),this.ensureMarks(t,i).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var i;e||(e=Dh);let r=Kt.start(e,t||((i=this.cache.find(Kt))===null||i===void 0?void 0:i.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var i;let r=this.curLine;for(let s=e.length-1;s>=0;s--){let l=e[s],o;if(t>0&&(o=r.lastChild)&&o instanceof we&&o.mark.eq(l))r=o,t--;else{let a=we.of(l,(i=this.cache.find(we,h=>h.mark.eq(l)))===null||i===void 0?void 0:i.dom);r.append(a),r=a,t=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!ro(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(X.ios&&ro(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(vr,0,32)||new Lt(vr.toDOM(),0,vr,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to=this.pos){let t=e.rank*102+e.value.rank,i=new mO(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-i.rank||this.wrappers[r-1].to-i.to)<0;)r--;this.wrappers.splice(r,0,i)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let i of this.wrappers){let r=t.lastChild;if(i.froml.wrapper.eq(i.wrapper)))===null||e===void 0?void 0:e.dom);t.append(s),t=s}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),i=this.cache.find(qn,void 0,1);return i&&(i.flags=t),i||new qn(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class QO{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:s,done:l}=this.cursor.next(this.skipCount);if(this.skipCount=0,l)throw new Error("Ran out of text content when drawing inline views");this.text=r;let o=this.textOff=Math.min(e,r.length);return s?null:r.slice(0,o)}let t=Math.min(this.text.length,this.textOff+e),i=this.text.slice(this.textOff,t);return this.textOff=t,i}}const Wn=[Lt,Kt,At,we,qn,ft,fr];for(let n=0;n[]),this.index=Wn.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,i=this.buckets[t];i.length<6?i.push(e):i[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,i=2){let r=e.bucket,s=this.buckets[r],l=this.index[r];for(let o=0;o{if(this.cache.add(l),l.isComposite())return!1},enter:l=>this.cache.add(l),leave:()=>{},break:()=>{}}}run(e,t){let i=t&&this.getCompositionContext(t.text);for(let r=0,s=0,l=0;;){let o=lr){let h=a-r;this.preserve(h,!l,!o),r=a,s+=h}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA{if(l.isWidget())if(this.openWidget)this.builder.continueWidget(a-o);else{let h=a>0||o{l.isLine()?this.builder.addLineStart(l.attrs,this.cache.maybeReuse(l)):(this.cache.add(l),l instanceof we&&r.unshift(l.mark)),this.openWidget=!1},leave:l=>{l.isLine()?r.length&&(r.length=s=0):l instanceof we&&(r.shift(),s=Math.min(s,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let i=null,r=this.builder,s=-1,l=F.spans(this.decorations,e,t,{point:(o,a,h,f,c,u)=>{if(h instanceof Mt){if(this.disallowBlockEffectsFor[u]){if(h.block)throw new RangeError("Block decorations may not be specified via plugins");if(a>this.view.state.doc.lineAt(o).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=f.length,c>f.length)r.continueWidget(a-o);else{let O=h.widget||(h.block?Jt.block:Jt.inline),d=$O(h),p=this.cache.findWidget(O,a-o,d)||Lt.of(O,this.view,a-o,d);h.block?(h.startSide>0&&r.addLineStartIfNotCovered(i),r.addBlockWidget(p)):(r.ensureLine(i),r.addInlineWidget(p,f,c))}i=null}else i=xO(i,h);a>o&&this.text.skip(a-o)},span:(o,a,h,f)=>{for(let c=o;c-1&&(this.openWidget=l>s),this.openWidget||r.addLineStartIfNotCovered(i),this.openMarks=l}forward(e,t,i=1){t-e<=10?this.old.advance(t-e,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(e){let t=[],i=null;for(let r=e.parentNode;;r=r.parentNode){let s=ne.get(r);if(r==this.view.contentDOM)break;s instanceof we?t.push(s):s?.isLine()?i=s:s instanceof ft||(r.nodeName=="DIV"&&!i?i=new Kt(r,Dh):i||t.push(we.of(new Ki({tagName:r.nodeName.toLowerCase(),attributes:Fu(r)}),r)))}return i?{line:i,marks:t}:null}}function ro(n,e){let t=i=>{for(let r of i.children)if((e?r.isText():r.length)||t(r))return!0;return!1};return t(n)}function $O(n){let e=n.isReplace?(n.startSide<0?64:0)|(n.endSide>0?128:0):n.startSide>0?32:16;return n.block&&(e|=256),e}const Dh={class:"cm-line"};function xO(n,e){let t=e.spec.attributes,i=e.spec.class;return!t&&!i||(n||(n={class:"cm-line"}),t&&il(t,n),i&&(n.class+=" "+i)),n}function yO(n){let e=[];for(let t=n.parents.length;t>1;t--){let i=t==n.parents.length?n.tile:n.parents[t].tile;i instanceof we&&e.push(i.mark)}return e}function Pr(n){let e=ne.get(n);return e&&e.setDOM(n.cloneNode()),n}class Jt extends fi{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Jt.inline=new Jt("span");Jt.block=new Jt("div");const vr=new class extends fi{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class so{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=te.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new fr(e,e.contentDOM),this.updateInner([new Me(0,0,0,e.state.doc.length)],null)}update(e){var t;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:f,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?r=this.domChanged.newSel.head:!RO(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?PO(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:f,to:c}=this.hasComposition;i=new Me(f,c,e.changes.mapPos(f,-1),e.changes.mapPos(c,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(X.ie||X.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let l=this.decorations,o=this.blockWrappers;this.updateDeco();let a=ZO(l,this.decorations,e.changes);a.length&&(i=Me.extendWithRanges(i,a));let h=TO(o,this.blockWrappers,e.changes);return h.length&&(i=Me.extendWithRanges(i,h)),s&&!i.some(f=>f.fromA<=s.range.fromA&&f.toA>=s.range.toA)&&(i=s.range.addToSet(i.slice())),this.tile.flags&2&&i.length==0?!1:(this.updateInner(i,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(t||e.length){let l=this.tile,o=new kO(this.view,l,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&ne.get(t.text)&&o.cache.reused.set(ne.get(t.text),2),this.tile=o.run(e,t),$s(l,o.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=X.chrome||X.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||i.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to-1)&&Zi(i,this.view.observer.selectionRange)&&!(r&&i.contains(r));if(!(s||t||l))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,h,f;if(a.empty?f=h=this.inlineDOMNearPos(a.anchor,a.assoc||1):(f=this.inlineDOMNearPos(a.head,a.head==a.from?1:-1),h=this.inlineDOMNearPos(a.anchor,a.anchor==a.from?1:-1)),X.gecko&&a.empty&&!this.hasComposition&&wO(h)){let u=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(u,h.node.childNodes[h.offset]||null)),h=f=new We(u,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||(!Ti(h.node,h.offset,c.anchorNode,c.anchorOffset)||!Ti(f.node,f.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,a))&&(this.view.observer.ignore(()=>{X.android&&X.chrome&&i.contains(c.focusNode)&&AO(c.focusNode,i)&&(i.blur(),i.focus({preventScroll:!0}));let u=Ei(this.view.root);if(u)if(a.empty){if(X.gecko){let O=vO(h.node,h.offset);if(O&&O!=3){let d=(O==1?$h:xh)(h.node,h.offset);d&&(h=new We(d.node,d.offset))}}u.collapse(h.node,h.offset),a.bidiLevel!=null&&u.caretBidiLevel!==void 0&&(u.caretBidiLevel=a.bidiLevel)}else if(u.extend){u.collapse(h.node,h.offset);try{u.extend(f.node,f.offset)}catch{}}else{let O=document.createRange();a.anchor>a.head&&([h,f]=[f,h]),O.setEnd(f.node,f.offset),O.setStart(h.node,h.offset),u.removeAllRanges(),u.addRange(O)}l&&this.view.root.activeElement==i&&(i.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(h,f)),this.impreciseAnchor=h.precise?null:new We(c.anchorNode,c.anchorOffset),this.impreciseHead=f.precise?null:new We(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Ti(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=Ei(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let l=this.lineAt(t.head,t.assoc);if(!l)return;let o=l.posAtStart;if(t.head==o||t.head==o+l.length)return;let a=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!a||!h||a.bottom>h.top)return;let f=this.domAtPos(t.head+t.assoc,t.assoc);i.collapse(f.node,f.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let c=e.observer.selectionRange;e.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=t.from&&i.collapse(r,s)}posFromDOM(e,t){let i=this.tile.nearest(e);if(!i)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=i.posAtStart;if(i.isComposite()){let s;if(e==i.dom)s=i.dom.childNodes[t];else{let l=Ot(e)==0?0:t==0?-1:1;for(;;){let o=e.parentNode;if(o==i.dom)break;l==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?l=-1:l=1),e=o}l<0?s=e:s=e.nextSibling}if(s==i.dom.firstChild)return r;for(;s&&!ne.get(s);)s=s.nextSibling;if(!s)return r+i.length;for(let l=0,o=r;;l++){let a=i.children[l];if(a.dom==s)return o;o+=a.length+a.breakAfter}}else return i.isText()?e==i.dom?r+t:r+(t?i.length:0):r}domAtPos(e,t){let{tile:i,offset:r}=this.tile.resolveBlock(e,t);return i.isWidget()?i.domPosFor(r,t):i.domIn(r,t)}inlineDOMNearPos(e,t){let i,r=-1,s=!1,l,o=-1,a=!1;return this.tile.blockTiles((h,f)=>{if(h.isWidget()){if(h.flags&32&&f>=e)return!0;h.flags&16&&(s=!0)}else{let c=f+h.length;if(f<=e&&(i=h,r=e-f,s=c=e&&!l&&(l=h,o=e-f,a=f>e),f>e&&l)return!0}}),!i&&!l?this.domAtPos(e,t):(s&&l?i=null:a&&i&&(l=null),i&&t<0||!l?i.domIn(r,t):l.domIn(o,t))}coordsAt(e,t,i){let{tile:r,offset:s}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof Xr?null:r.coordsInWidget(s,t,!0):r.coordsIn(s,t,i)}lineAt(e,t){let{tile:i}=this.tile.resolveBlock(e,t);return i.isLine()?i:null}coordsForChar(e){let{tile:t,offset:i}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(s,l){if(s.isComposite())for(let o of s.children){if(o.length>=l){let a=r(o,l);if(a)return a}if(l-=o.length,l<0)break}else if(s.isText()&&lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,a=this.view.textDirection==ie.LTR,h=0,f=(c,u,O)=>{for(let d=0;dr);d++){let p=c.children[d],m=u+p.length,S=p.dom.getBoundingClientRect(),{height:$}=S;if(O&&!d&&(h+=S.top-O.top),p instanceof ft)m>i&&f(p,u,S);else if(u>=i&&(h>0&&t.push(-h),t.push($+h),h=0,l)){let b=p.dom.lastChild,T=b?Ci(b):[];if(T.length){let k=T[T.length-1],w=a?k.right-S.left:S.right-k.left;w>o&&(o=w,this.minWidth=s,this.minWidthFrom=u,this.minWidthTo=m)}}O&&d==c.children.length-1&&(h+=O.bottom-S.bottom),u=m+p.breakAfter}};return f(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?ie.RTL:ie.LTR}measureTextSize(){let e=this.tile.blockTiles(l=>{if(l.isLine()&&l.children.length&&l.length<=20){let o=0,a;for(let h of l.children){if(!h.isText()||/[^ -~]/.test(h.text))return;let f=Ci(h.dom);if(f.length!=1)return;o+=f[0].width,a=f[0].height}if(o)return{lineHeight:l.dom.getBoundingClientRect().height,charWidth:o/l.length,textHeight:a}}});if(e)return e;let t=document.createElement("div"),i,r,s;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let l=Ci(t.firstChild)[0];i=t.getBoundingClientRect().height,r=l&&l.width?l.width/27:7,s=l&&l.height?l.height:i,t.remove()}),{lineHeight:i,charWidth:r,textHeight:s}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,r=0;;r++){let s=r==t.viewports.length?null:t.viewports[r],l=s?s.from-1:this.view.state.doc.length;if(l>i){let o=(t.lineBlockAt(l).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(te.replace({widget:new Xr(o),block:!0,inclusive:!0,isBlockGap:!0}).range(i,l))}if(!s)break;i=s.to+1}return te.set(e)}updateDeco(){let e=1,t=this.view.state.facet(ar).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(al).map((s,l)=>{let o=typeof s=="function";return o&&(i=!0),o?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=i,t.push(F.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];etypeof s=="function"?s(this.view):s)}scrollIntoView(e){if(e.isSnapshot){let h=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=h.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let h of this.view.state.facet(Yh))try{if(h(this.view,e.range,e))return!0}catch(f){Je(this.view.state,f,"scroll handler")}let{range:t}=e,i=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!i)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=Vh(this.view),l={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:o,offsetHeight:a}=this.view.scrollDOM;if(Ju(this.view.scrollDOM,l,t.head1&&(i.top>window.visualViewport.offsetTop+window.visualViewport.height||i.bottomi.isWidget()||i.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){$s(this.tile)}}function $s(n,e){let t=e?.get(n);if(t!=1){t==null&&n.destroy();for(let i of n.children)$s(i,e)}}function wO(n){return ce(n.node)&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}function Ih(n,e){let t=n.observer.selectionRange;if(!t.focusNode)return null;let i=$h(t.focusNode,t.focusOffset),r=xh(t.focusNode,t.focusOffset),s=i||r;if(r&&i&&r.node!=i.node){let o=ne.get(r.node);if(!o||o.isText()&&o.text!=r.node.nodeValue)s=r;else if(n.docView.lastCompositionAfterCursor){let a=ne.get(i.node);!a||a.isText()&&a.text!=i.node.nodeValue||(s=r)}}if(n.docView.lastCompositionAfterCursor=s!=i,!s)return null;let l=e-s.offset;return{from:l,to:l+s.node.nodeValue.length,node:s.node}}function PO(n,e,t){let i=Ih(n,t);if(!i)return null;let{node:r,from:s,to:l}=i,o=r.nodeValue;if(/[\n\r]/.test(o)||n.state.doc.sliceString(i.from,i.to)!=o)return null;let a=e.invertedDesc;return{range:new Me(a.mapPos(s),a.mapPos(l),s,l),text:r}}function vO(n,e){return ce(n)?(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e{ie.from&&(t=!0)}),t}class Xr extends fi{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function jO(n,e,t=1){let i=n.charCategorizer(e),r=n.doc.lineAt(e),s=e-r.from;if(r.length==0)return Q.cursor(e);s==0?t=1:s==r.length&&(t=-1);let l=s,o=s;t<0?l=ge(r.text,s,!1):o=ge(r.text,s);let a=i(r.text.slice(l,o));for(;l>0;){let h=ge(r.text,l,!1);if(i(r.text.slice(h,l))!=a)break;l=h}for(;on.defaultLineHeight*1.5){let o=n.viewState.heightOracle.textHeight,a=Math.floor((r-t.top-(n.defaultLineHeight-o)*.5)/o);s+=a*n.viewState.heightOracle.lineLength}let l=n.state.sliceDoc(t.from,t.to);return t.from+Vu(l,s,n.state.tabSize)}function xs(n,e,t){let i=n.lineBlockAt(e);if(Array.isArray(i.type)){let r;for(let s of i.type){if(s.from>e)break;if(!(s.toe)return s;(!r||s.type==ke.Text&&(r.type!=s.type||(t<0?s.frome)))&&(r=s)}}return r||i}return i}function LO(n,e,t,i){let r=xs(n,e.head,e.assoc||-1),s=!i||r.type!=ke.Text||!(n.lineWrapping||r.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let l=n.dom.getBoundingClientRect(),o=n.textDirectionAt(r.from),a=n.posAndSideAtCoords({x:t==(o==ie.LTR)?l.right-1:l.left+1,y:(s.top+s.bottom)/2});if(a)return Q.cursor(a.pos,a.assoc)}return Q.cursor(t?r.to:r.from,t?1:-1)}function lo(n,e,t,i){let r=n.state.doc.lineAt(e.head),s=n.bidiSpans(r),l=n.textDirectionAt(r.from);for(let o=e,a=null;;){let h=fO(r,s,l,o,t),f=Xh;if(!h){if(r.number==(t?n.state.doc.lines:1))return o;f=` +`,r=n.state.doc.line(r.number+(t?1:-1)),s=n.bidiSpans(r),h=t?Q.cursor(r.from,-1):Q.cursor(r.to,1)}if(a){if(!a(f))return o}else{if(!i)return h;a=i(f)}o=h}}function YO(n,e,t){let i=n.state.charCategorizer(e),r=i(t);return s=>{let l=i(s);return r==ht.Space&&(r=l),r==l}}function _O(n,e,t,i){let r=e.head,s=t?1:-1;if(r==(t?n.state.doc.length:0))return Q.cursor(r,e.assoc);let l=e.goalColumn,o,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(r,e.assoc||((e.empty?t:e.head==e.from)?1:-1)),f=n.documentTop;if(h)l==null&&(l=h.left-a.left),o=s<0?h.top:h.bottom;else{let d=n.viewState.lineBlockAt(r);l==null&&(l=Math.min(a.right-a.left,n.defaultCharacterWidth*(r-d.from))),o=(s<0?d.top:d.bottom)+f}let c=a.left+l,u=n.viewState.heightOracle.textHeight>>1,O=i??u;for(let d=0;;d+=u){let p=o+(O+d)*s,m=ys(n,{x:c,y:p},!1,s);if(t?p>a.bottom:po:${if(e>s&&er(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:Q.cursor(i,in.viewState.docHeight)return new He(n.state.doc.length,-1);if(h=n.elementAtHeight(a),i==null)break;if(h.type==ke.Text){if(i<0?h.ton.viewport.to)break;let u=n.docView.coordsAt(i<0?h.from:h.to,i>0?-1:1);if(u&&(i<0?u.top<=a+s:u.bottom>=a+s))break}let c=n.viewState.heightOracle.textHeight/2;a=i>0?h.bottom+c:h.top-c}if(n.viewport.from>=h.to||n.viewport.to<=h.from){if(t)return null;if(h.type==ke.Text){let c=MO(n,r,h,l,o);return new He(c,c==h.from?1:-1)}}if(h.type!=ke.Text)return a<(h.top+h.bottom)/2?new He(h.from,1):new He(h.to,-1);let f=n.docView.lineAt(h.from,2);return(!f||f.length!=h.length)&&(f=n.docView.lineAt(h.from,-2)),new EO(n,l,o,n.textDirectionAt(h.from)).scanTile(f,h.from)}class EO{constructor(e,t,i,r){this.view=e,this.x=t,this.y=i,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to1||i.length&&(i[0].level!=this.baseDir||i[0].to+r.from>1;t:if(l.has(p)){for(let $=1;$=s&&(b-=d),!l.has(b)){p=b;break t}}break e}l.add(p);let m=t(p),S=0;if(m)for(let $=0;$1))if(b.bottomthis.y)(!h||h.top>b.top)&&(h=b),S=-1;else{let T=b.left>this.x?this.x-b.left:b.right(d+d+p)/3)return this.y=a.bottom-1,this.scan(e,t,!0);if(h&&h.top<(d+p+p)/3)return this.y=h.top+1,this.scan(e,t,!0)}let O=(o?this.dirAt(e[f],1):this.baseDir)==ie.LTR;return{i:f,after:this.x>(u.left+u.right)/2==O}}scanText(e,t){let i=[];for(let s=0;s{let l=i[s]-t,o=i[s+1]-t;return qi(e.dom,l,o).getClientRects()});return r.after?new He(i[r.i+1],-1):new He(i[r.i],1)}scanTile(e,t){if(!e.length)return new He(t,1);if(e.children.length==1){let o=e.children[0];if(o.isText())return this.scanText(o,t);if(o.isComposite())return this.scanTile(o,t)}let i=[t];for(let o=0,a=t;o{let a=e.children[o];return a.flags&48?null:(ce(a.dom)?a.dom:qi(a.dom,0,a.length)).getClientRects()}),s=e.children[r.i],l=i[r.i];return s.isText()?this.scanText(s,l):s.isComposite()?this.scanTile(s,l):r.after?new He(i[r.i+1],-1):new He(l,1)}}const Et="￿";class zO{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(U.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Et}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let l=ne.get(r),o=r.nextSibling;if(o==t){l?.breakAfter&&!o&&i!=this.view.contentDOM&&this.lineBreak();break}let a=ne.get(o);(l&&a?l.breakAfter:(l?l.breakAfter:En(r))||En(o)&&(r.nodeName!="BR"||l?.isWidget())&&this.text.length>s)&&!WO(o,t)&&this.lineBreak(),r=o}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,l=1,o;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,i),l=this.lineSeparator.length):(o=r.exec(t))&&(s=o.index,l=o[0].length),this.append(t.slice(i,s<0?t.length:s)),s<0)break;if(this.lineBreak(),l>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=l-1);i=s+l}}readNode(e){let t=ne.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else Ft(e)?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():ce(e)&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(Ft(e)?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(qO(e,i.node,i.offset)?t:0))}}function qO(n,e,t){for(;;){if(!e||t-1;let{impreciseHead:s,impreciseAnchor:l}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=Gh(e.docView.tile,t,i,0))){let a=s||l?[]:DO(e),h=new zO(a,e);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=IO(a,this.bounds.from)}else{let a=e.observer.selectionRange,h=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!ms(e.contentDOM,a.focusNode)?o.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),f=l&&l.node==a.anchorNode&&l.offset==a.anchorOffset||!ms(e.contentDOM,a.anchorNode)?o.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),c=e.viewport;if((X.ios||X.chrome)&&h!=f&&Math.min(h,f)<=o.main.from&&Math.max(h,f)>=o.main.to&&(c.from>0||c.to-1&&o.ranges.length>1)this.newSel=o.replaceRange(Q.range(f,h));else if(e.lineWrapping&&f==h&&!(o.main.empty&&o.main.head==h)&&e.inputState.lastTouchTime>Date.now()-100){let u=e.coordsAtPos(h,-1),O=0;u&&(O=e.inputState.lastTouchY<=u.bottom?-1:1),this.newSel=Q.create([Q.cursor(h,O)])}else this.newSel=Q.single(f,h)}}}function Gh(n,e,t,i){if(n.isComposite()){let r=-1,s=-1,l=-1,o=-1;for(let a=0,h=i,f=i;at)return Gh(c,e,t,h);if(u>=e&&r==-1&&(r=a,s=h),h>t&&c.dom.parentNode==n.dom){l=a,o=f;break}f=u,h=u+c.breakAfter}return{from:s,to:o<0?i+n.length:o,startDOM:(r?n.children[r-1].dom.nextSibling:null)||n.dom.firstChild,endDOM:l=0?n.children[l].dom:null}}else return n.isText()?{from:i,to:i+n.length,startDOM:n.dom,endDOM:n.dom.nextSibling}:null}function Nh(n,e){let t,{newSel:i}=e,{state:r}=n,s=r.selection.main,l=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,h=s.from,f=null;(l===8||X.android&&e.text.length=o&&s.to<=a&&(e.typeOver||c!=e.text)&&c.slice(0,s.from-o)==e.text.slice(0,s.from-o)&&c.slice(s.to-o)==e.text.slice(u=e.text.length-(c.length-(s.to-o)))?t={from:s.from,to:s.to,insert:W.of(e.text.slice(s.from-o,u).split(Et))}:(O=Fh(c,e.text,h-o,f))&&(X.chrome&&l==13&&O.toB==O.from+2&&e.text.slice(O.from,O.toB)==Et+Et&&O.toB--,t={from:o+O.from,to:o+O.toA,insert:W.of(e.text.slice(O.from,O.toB).split(Et))})}else i&&(!n.hasFocus&&r.facet(at)||ws(i,s))&&(i=null);if(!t&&!i)return!1;if((X.mac||X.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=Q.single(i.main.anchor-1,i.main.head-1)),t={from:t.from,to:t.to,insert:W.of([t.insert.toString().replace("."," ")])}):r.doc.lineAt(s.from).toDate.now()-50?t={from:s.from,to:s.to,insert:r.toText(n.inputState.insertingText)}:X.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==` + `&&n.lineWrapping&&(i&&(i=Q.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:W.of([" "])}),t)return hl(n,t,i,l);if(i&&!ws(i,s)){let o=!1,a="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),a=n.inputState.lastSelectionOrigin,a=="select.pointer"&&(i=Uh(r.facet(en).map(h=>h(n)),i))),n.dispatch({selection:i,scrollIntoView:o,userEvent:a}),!0}else return!1}function hl(n,e,t,i=-1){if(X.ios&&n.inputState.flushIOSKey(e))return!0;let r=n.state.selection.main;if(X.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&n.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Dt(n.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.lengthr.head)&&Dt(n.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&Dt(n.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let l,o=()=>l||(l=VO(n,e,t));return n.state.facet(Rh).some(a=>a(n,e.from,e.to,s,o))||n.dispatch(o()),!0}function VO(n,e,t){let i,r=n.state,s=r.selection.main,l=-1;if(e.from==e.to&&e.froms.to){let a=e.fromc(n)),h,a);e.from==f&&(l=f)}if(l>-1)i={changes:e,selection:Q.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let a=s.frome.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(n.state.toText(a+e.insert.sliceString(0,void 0,n.state.lineBreak)+h))}else{let a=r.changes(e),h=t&&t.main.to<=a.newLength?t.main:void 0;if(r.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let f=n.state.sliceDoc(e.from,e.to),c,u=t&&Ih(n,t.main.head);if(u){let d=e.insert.length-(e.to-e.from);c={from:u.from,to:u.to-d}}else c=n.state.doc.lineAt(s.head);let O=s.to-e.to;i=r.changeByRange(d=>{if(d.from==s.from&&d.to==s.to)return{changes:a,range:h||d.map(a)};let p=d.to-O,m=p-f.length;if(n.state.sliceDoc(m,p)!=f||p>=c.from&&m<=c.to)return{range:d};let S=r.changes({from:m,to:p,insert:e.insert}),$=d.to-s.to;return{changes:S,range:h?Q.range(Math.max(0,h.anchor+$),Math.max(0,h.head+$)):d.map(S)}})}else i={changes:a,selection:h&&r.selection.replaceRange(h)}}let o="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,o+=".compose",n.inputState.compositionFirstChange&&(o+=".start",n.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:o,scrollIntoView:!0})}function Fh(n,e,t,i){let r=Math.min(n.length,e.length),s=0;for(;s0&&o>0&&n.charCodeAt(l-1)==e.charCodeAt(o-1);)l--,o--;if(i=="end"){let a=Math.max(0,s-Math.min(l,o));t-=l+a-s}if(l=l?s-t:0;s-=a,o=s+(o-l),l=s}else if(o=o?s-t:0;s-=a,l=s+(l-o),o=s}return{from:s,toA:l,toB:o}}function DO(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:r,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new oo(t,i)),(r!=t||s!=i)&&e.push(new oo(r,s))),e}function IO(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t<0||i<0?null:t==i?Q.create([Q.cursor(i+e,-1)]):Q.single(t+e,i+e)}function ws(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class UO{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,X.safari&&e.contentDOM.addEventListener("input",()=>null),X.gecko&&hd(e.contentDOM.ownerDocument)}handleEvent(e){!id(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,t);for(let r of i.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=NO(e),i=this.handlers,r=this.view.contentDOM;for(let s in t)if(s!="scroll"){let l=!t[s].handlers.length,o=i[s];o&&l!=!o.handlers.length&&(r.removeEventListener(s,this.handleEvent),o=null),o||r.addEventListener(s,this.handleEvent,{passive:l})}for(let s in i)s!="scroll"&&!t[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Kh.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),X.android&&X.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(X.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(Hh.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||FO.indexOf(e.key)>-1&&e.ctrlKey)){let t={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};t.shiftKey&&X.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&GO(this.view.win)&&(t.shiftKey=!1);let i=this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:t};return setTimeout(()=>{this.pendingIOSKey==i&&this.flushIOSKey()},50),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!t||this.view.observer.pendingRecords().length||t.key=="Enter"&&e&&e.from0?!0:X.safari&&!X.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function GO(n){return n.visualViewport?n.visualViewport.height*n.visualViewport.scale/n.document.documentElement.clientHeight<.85:!1}function ao(n,e){return(t,i)=>{try{return e.call(n,i,t)}catch(r){Je(t.state,r)}}}function NO(n){let e=Object.create(null);function t(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of n){let r=i.spec,s=r&&r.plugin.domEventHandlers,l=r&&r.plugin.domEventObservers;if(s)for(let o in s){let a=s[o];a&&t(o).handlers.push(ao(i.value,a))}if(l)for(let o in l){let a=l[o];a&&t(o).observers.push(ao(i.value,a))}}for(let i in Be)t(i).handlers.push(Be[i]);for(let i in xe)t(i).observers.push(xe[i]);return e}const Hh=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],FO="dthko",Kh=[16,17,18,20,91,92,224,225],On=6;function dn(n){return Math.max(0,n)*.7+8}function HO(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class KO{constructor(e,t,i,r){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=mh(e.contentDOM),this.atoms=e.state.facet(en).map(l=>l(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(U.allowMultipleSelections)&&JO(e,t),this.dragging=td(e,t)&&tf(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&HO(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,i=0,r=0,s=0,l=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:l}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:o}=this.scrollParents.y.getBoundingClientRect());let a=Vh(this.view);e.clientX-a.left<=r+On?t=-dn(r-e.clientX):e.clientX+a.right>=l-On&&(t=dn(e.clientX-l)),e.clientY-a.top<=s+On?i=-dn(s-e.clientY):e.clientY+a.bottom>=o-On&&(i=dn(e.clientY-o)),this.setScrollSpeed(t,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,i=Uh(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function JO(n,e){let t=n.state.facet(Zh);return t.length?t[0](e):X.mac?e.metaKey:e.ctrlKey}function ed(n,e){let t=n.state.facet(Ch);return t.length?t[0](e):X.mac?!e.altKey:!e.ctrlKey}function td(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=Ei(n.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s=e.clientX&&l.top<=e.clientY&&l.bottom>=e.clientY)return!0}return!1}function id(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=ne.get(t))&&i.isWidget()&&!i.isHidden&&i.widget.ignoreEvent(e))return!1;return!0}const Be=Object.create(null),xe=Object.create(null),Jh=X.ie&&X.ie_version<15||X.ios&&X.webkit_version<604;function nd(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),ef(n,t.value)},50)}function cr(n,e,t){for(let i of n.facet(e))t=i(t,n);return t}function ef(n,e){e=cr(n.state,sl,e);let{state:t}=n,i,r=1,s=t.toText(e),l=s.lines==t.selection.ranges.length;if(Ps!=null&&t.selection.ranges.every(a=>a.empty)&&Ps==s.toString()){let a=-1;i=t.changeByRange(h=>{let f=t.doc.lineAt(h.from);if(f.from==a)return{range:h};a=f.from;let c=t.toText((l?s.line(r++).text:e)+t.lineBreak);return{changes:{from:f.from,insert:c},range:Q.cursor(h.from+c.length,-1)}})}else l?i=t.changeByRange(a=>{let h=s.line(r++);return{changes:{from:a.from,to:a.to,insert:h.text},range:Q.cursor(a.from+h.length,-1)}}):i=t.replaceSelection(s);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}xe.scroll=n=>{let e=n.inputState;e.lastScrollTop=n.scrollDOM.scrollTop,e.lastScrollLeft=n.scrollDOM.scrollLeft,X.ios&&!e.touchActive&&(e.lastIOSMomentumScroll=Date.now())};xe.wheel=xe.mousewheel=n=>{n.inputState.lastWheelEvent=Date.now()};Be.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);xe.touchstart=(n,e)=>{let t=n.inputState,i=e.targetTouches[0];t.touchActive=!0,t.lastTouchTime=Date.now(),i&&(t.lastTouchX=i.clientX,t.lastTouchY=i.clientY),t.setSelectionOrigin("select.pointer")};xe.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};xe.touchend=(n,e)=>{n.inputState.touchActive=!1};Be.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let i of n.state.facet(Th))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=sd(n,e)),t){let i=!n.hasFocus;n.inputState.startMouseSelection(new KO(n,e,t,i)),i&&n.observer.ignore(()=>{bh(n.contentDOM);let s=n.root.activeElement;s&&!s.contains(n.contentDOM)&&s.blur()});let r=n.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}else n.inputState.setSelectionOrigin("select.pointer");return!1};function ho(n,e,t,i){if(i==1)return Q.cursor(e,t);if(i==2)return jO(n.state,e,t);{let r=n.docView.lineAt(e,t),s=n.state.doc.lineAt(r?r.posAtEnd:e),l=r?r.posAtStart:s.from,o=r?r.posAtEnd:s.to;return oDate.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(co+1)%3:1}function sd(n,e){let t=n.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),i=tf(e),r=n.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),r=r.map(s.changes))},get(s,l,o){let a=n.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),h,f=ho(n,a.pos,a.assoc,i);if(t.pos!=a.pos&&!l){let c=ho(n,t.pos,t.assoc,i),u=Math.min(c.from,f.from),O=Math.max(c.to,f.to);f=u1&&(h=ld(r,a.pos))?h:o?r.addRange(f):Q.create([f])}}}function ld(n,e){for(let t=0;t=e)return Q.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}Be.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let r=n.docView.tile.nearest(e.target);if(r&&r.isWidget()){let s=r.posAtStart,l=s+r.length;(s>=t.to||l<=t.from)&&(t=Q.undirectionalRange(s,l))}}let{inputState:i}=n;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",cr(n.state,ll,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Be.dragend=n=>(n.inputState.draggedContent=null,!1);function Oo(n,e,t,i){if(t=cr(n.state,sl,t),!t)return;let r=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=n.inputState,l=i&&s&&ed(n,e)?{from:s.from,to:s.to}:null,o={from:r,insert:t},a=n.state.changes(l?[l,o]:o);n.focus(),n.dispatch({changes:a,selection:{anchor:a.mapPos(r,-1),head:a.mapPos(r,1)},userEvent:l?"move.drop":"input.drop"}),n.inputState.draggedContent=null}Be.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let i=Array(t.length),r=0,s=()=>{++r==t.length&&Oo(n,e,i.filter(l=>l!=null).join(n.state.lineBreak),!1)};for(let l=0;l{/[\x00-\x08\x0e-\x1f]{2}/.test(o.result)||(i[l]=o.result),s()},o.readAsText(t[l])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Oo(n,e,i,!0),!0}return!1};Be.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=Jh?null:e.clipboardData;return t?(ef(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(nd(n),!1)};function od(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function ad(n){let e=[],t=[],i=!1;for(let r of n.selection.ranges)r.empty||(e.push(n.sliceDoc(r.from,r.to)),t.push(r));if(!e.length){let r=-1;for(let{from:s}of n.selection.ranges){let l=n.doc.lineAt(s);l.number>r&&(e.push(l.text),t.push({from:l.from,to:Math.min(n.doc.length,l.to+1)})),r=l.number}i=!0}return{text:cr(n,ll,e.join(n.lineBreak)),ranges:t,linewise:i}}let Ps=null;Be.copy=Be.cut=(n,e)=>{if(!Zi(n.contentDOM,n.observer.selectionRange))return!1;let{text:t,ranges:i,linewise:r}=ad(n.state);if(!t&&!r)return!1;Ps=r?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=Jh?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(od(n,t),!1)};const nf=pt.define();function rf(n,e){let t=[];for(let i of n.facet(jh)){let r=i(n,e);r&&t.push(r)}return t.length?n.update({effects:t,annotations:nf.of(!0)}):null}function sf(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=rf(n.state,e);t?n.dispatch(t):n.update([])}},10)}xe.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),sf(n)};xe.blur=n=>{n.observer.clearSelectionRange(),sf(n)};xe.compositionstart=xe.compositionupdate=(n,e)=>{if(!n.observer.editContext&&(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0)){let{main:t}=n.state.selection;!t.empty&&n.lineBlockAt(t.from).from!=n.lineBlockAt(t.to).from&&!n.state.readOnly&&n.dispatch({changes:n.state.selection.ranges.filter(i=>!i.empty).map(i=>({from:i.from,to:i.to})),userEvent:"input"}),n.inputState.composing=0}};xe.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,X.chrome&&X.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};xe.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};Be.beforeinput=(n,e)=>{var t,i;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(n.inputState.insertingText=e.data,n.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&n.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),l=e.getTargetRanges();if(s&&l.length){let o=l[0],a=n.posAtDOM(o.startContainer,o.startOffset),h=n.posAtDOM(o.endContainer,o.endOffset);return hl(n,{from:a,to:h,insert:n.state.toText(s)},null),!0}}let r;if(X.chrome&&X.android&&(r=Hh.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var l;(((l=window.visualViewport)===null||l===void 0?void 0:l.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return X.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),X.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>xe.compositionend(n,e),20),!1};const po=new Set;function hd(n){po.has(n)||(po.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const go=["pre-wrap","normal","pre-line","break-spaces"];let ei=!1;function mo(){ei=!1}class fd{constructor(e){this.lineWrapping=e,this.doc=W.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return go.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,a=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=i,this.textHeight=r,this.lineLength=s,a){this.heightSamples={};for(let h=0;h0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Zn&&(ei=!0),this.height=e)}replace(e,t,i){return $e.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,r){let s=this,l=i.doc;for(let o=r.length-1;o>=0;o--){let{fromA:a,toA:h,fromB:f,toB:c}=r[o],u=s.lineAt(a,J.ByPosNoHeight,i.setDoc(t),0,0),O=u.to>=h?u:s.lineAt(h,J.ByPosNoHeight,i,0,0);for(c+=O.to-h,h=O.to;o>0&&u.from<=r[o-1].toA;)a=r[o-1].fromA,f=r[o-1].fromB,o--,as*2){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),i+=1+o.break,r-=o.size}else if(s>r*2){let o=e[i];o.break?e.splice(i,1,o.left,null,o.right):e.splice(i,1,o.left,o.right),i+=2+o.break,s-=o.size}else break;else if(r=s&&l(this.lineAt(0,J.ByPos,i,r,s))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,i=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ce extends lf{constructor(e,t,i){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=i}mainBlock(e,t){return new qe(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,i){let r=i[0];return i.length==1&&(r instanceof Ce||r instanceof ue&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof ue?r=new Ce(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):$e.of(i)}updateHeight(e,t=0,i=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(i||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ue extends $e{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,s=r-i+1,l,o=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*s);l=a/s,this.length>s+1&&(o=(this.height-a)/(this.length-s-1))}else l=this.height/s;return{firstLine:i,lastLine:r,perLine:l,perChar:o}}blockAt(e,t,i,r){let{firstLine:s,lastLine:l,perLine:o,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let h=r+(e0){let s=i[i.length-1];s instanceof ue?i[i.length-1]=new ue(s.length+r):i.push(null,new ue(r-1))}if(e>0){let s=i[0];s instanceof ue?i[0]=new ue(e+s.length):i.unshift(new ue(e-1),null)}return $e.of(i)}decomposeLeft(e,t){t.push(new ue(e-1),null)}decomposeRight(e,t){t.push(null,new ue(this.length-e-1))}updateHeight(e,t=0,i=!1,r){let s=t+this.length;if(r&&r.from<=t+this.length&&r.more){let l=[],o=Math.max(t,r.from),a=-1;for(r.from>t&&l.push(new ue(r.from-t-1).updateHeight(e,t));o<=s&&r.more;){let f=e.doc.lineAt(o).length;l.length&&l.push(null);let c=r.heights[r.index++],u=0;c<0&&(u=-c,c=r.heights[r.index++]),a==-1?a=c:Math.abs(c-a)>=Zn&&(a=-2);let O=new Ce(f,c,u);O.outdated=!1,l.push(O),o+=f+1}o<=s&&l.push(null,new ue(s-o).updateHeight(e,o));let h=$e.of(l);return(a<0||Math.abs(h.height-this.height)>=Zn||Math.abs(a-this.heightMetrics(e,t).perLine)>=Zn)&&(ei=!0),Bn(this,h)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Od extends $e{constructor(e,t,i){super(e.length+(t?1:0)+i.length,e.height+i.height,(t?1:0)|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,r){let s=i+this.left.height;return eo))return h;let f=t==J.ByPosNoHeight?J.ByPosNoHeight:J.ByPos;return a?h.join(this.right.lineAt(o,f,i,l,o)):this.left.lineAt(o,f,i,r,s).join(h)}forEachLine(e,t,i,r,s,l){let o=r+this.left.height,a=s+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,i,o,a,l);else{let h=this.lineAt(a,J.ByPos,i,r,s);e=e&&h.from<=t&&l(h),t>h.to&&this.right.forEachLine(Math.max(e,h.to+1),t,i,o,a,l)}}replace(e,t,i){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let l=s.length;for(let o of i)s.push(o);if(e>0&&So(s,l-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?$e.of(this.break?[e,null,t]:[e,t]):(this.left=Bn(this.left,e),this.right=Bn(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,r){let{left:s,right:l}=this,o=t+s.length+this.break,a=null;return r&&r.from<=t+s.length&&r.more?a=s=s.updateHeight(e,t,i,r):s.updateHeight(e,t,i),r&&r.from<=o+l.length&&r.more?a=l=l.updateHeight(e,o,i,r):l.updateHeight(e,o,i),a?this.balanced(s,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function So(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof ue&&(i=n[e+1])instanceof ue&&n.splice(e-1,3,new ue(t.length+1+i.length))}const dd=5;class fl{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Ce?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ce(i-this.pos,-1,0)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=dd)&&this.addLineDeco(r,s,l)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Ce(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let i=new ue(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ce)return e;let t=new Ce(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Ce)&&!this.isCovered?this.nodes.push(new Ce(0,-1,0)):(this.writtenToh.clientHeight||h.scrollWidth>h.clientWidth)&&f.overflow!="visible"){let c=h.getBoundingClientRect();s=Math.max(s,c.left),l=Math.min(l,c.right),o=Math.max(o,c.top),a=Math.min(h==n.parentNode?r.innerHeight:a,c.bottom)}h=f.position=="absolute"||f.position=="fixed"?h.offsetParent:h.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:s-t.left,right:Math.max(s,l)-t.left,top:o-(t.top+e),bottom:Math.max(o,a)-(t.top+e)}}function Sd(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView||window;return e.left0&&e.top0}function Qd(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Cr{constructor(e,t,i,r){this.from=e,this.to=t,this.size=i,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new fd(i),this.stateDeco=bo(t),this.heightMap=$e.empty().applyChanges(this.stateDeco,W.empty,this.heightOracle.setDoc(t.doc),[new Me(0,0,0,t.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=te.set(this.lineGaps.map(r=>r.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let r=i?t.head:t.anchor;if(!e.some(({from:s,to:l})=>r>=s&&r<=l)){let{from:s,to:l}=this.lineBlockAt(r);e.push(new pn(s,l))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?vs:Vn.get(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(yi(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=bo(this.state);let r=e.changedRanges,s=Me.extendWithRanges(r,pd(i,this.stateDeco,e?e.changes:ae.empty(this.state.doc.length))),l=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);mo(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=l||ei)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=l);let a=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let h=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Lh)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,i=window.getComputedStyle(t),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?ie.RTL:ie.LTR;let l=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",o=t.getBoundingClientRect(),a=l||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let h=0,f=0;if(o.width&&o.height){let{scaleX:k,scaleY:w}=gh(t,o);(k>.005&&Math.abs(this.scaleX-k)>.005||w>.005&&Math.abs(this.scaleY-w)>.005)&&(this.scaleX=k,this.scaleY=w,h|=16,l=a=!0)}let c=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=c||this.paddingBottom!=u)&&(this.paddingTop=c,this.paddingBottom=u,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let O=mh(this.view.contentDOM,!1).y;O!=this.scrollParent&&(this.scrollParent=O,this.scrollAnchorHeight=-1,this.scrollOffset=0);let d=this.getScrollOffset();this.scrollOffset!=d&&(this.scrollAnchorHeight=-1,this.scrollOffset=d),this.scrolledToBottom=kh(this.scrollParent||e.win);let p=(this.printing?Qd:md)(t,this.paddingTop),m=p.top-this.pixelViewport.top,S=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let $=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if($!=this.inView&&(this.inView=$,$&&(a=!0)),!this.inView&&!this.scrollTarget&&!Sd(e.dom))return 0;let b=o.width;if((this.contentDOMWidth!=b||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),a){let k=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(k)&&(l=!0),l||r.lineWrapping&&Math.abs(b-this.contentDOMWidth)>r.charWidth){let{lineHeight:w,charWidth:P,textHeight:_}=e.docView.measureTextSize();l=w>0&&r.refresh(s,w,P,_,Math.max(5,b/P),k),l&&(e.docView.minWidth=0,h|=16)}m>0&&S>0?f=Math.max(m,S):m<0&&S<0&&(f=Math.min(m,S)),mo();for(let w of this.viewports){let P=w.from==this.viewport.from?k:e.docView.measureVisibleLineHeights(w);this.heightMap=(l?$e.empty().applyChanges(this.stateDeco,W.empty,this.heightOracle,[new Me(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,l,new cd(w.from,P))}ei&&(h|=2)}let T=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return T&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),h|=this.updateForViewport()),(h&2||T)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(l?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:l,visibleBottom:o}=this,a=new pn(r.lineAt(l-i*1e3,J.ByHeight,s,0,0).from,r.lineAt(o+(1-i)*1e3,J.ByHeight,s,0,0).to);if(t){let{head:h}=t.range;if(ha.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),c=r.lineAt(h,J.ByPos,s,0,0),u;t.y=="center"?u=(c.top+c.bottom)/2-f/2:t.y=="start"||t.y=="nearest"&&h=o+Math.max(10,Math.min(i,250)))&&r>l-2*1e3&&s>1,l=r<<1;if(this.defaultTextDirection!=ie.LTR&&!i)return[];let o=[],a=(f,c,u,O)=>{if(c-ff&&SS.from>=u.from&&S.to<=u.to&&Math.abs(S.from-f)S.from<$&&S.to>$));if(!m){if(cb.from<=c&&b.to>=c)){let b=t.moveToLineBoundary(Q.cursor(c),!1,!0).head;b>f&&(c=b)}let S=this.gapSize(u,f,c,O),$=i||S<2e6?S:2e6;m=new Cr(f,c,S,$)}o.push(m)},h=f=>{if(f.length2e6)for(let w of e)w.from>=f.from&&w.fromf.from&&a(f.from,O,f,c),dt.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let i=[];F.spans(t,this.viewport.from,this.viewport.to,{span(s,l){i.push({from:s,to:l})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let s=0;s=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||yi(this.heightMap.lineAt(e,J.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||yi(this.heightMap.lineAt(this.scaler.fromDOM(e),J.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+12-this.paddingTop);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return yi(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class pn{constructor(e,t){this.from=e,this.to=t}}function kd(n,e,t){let i=[],r=n,s=0;return F.spans(t,n,e,{span(){},point(l,o){l>r&&(i.push({from:r,to:l}),s+=l-r),r=o}},20),r=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let r=0;;r++){let{from:s,to:l}=e[r],o=l-s;if(i<=o)return s+i;i-=o}}function mn(n,e){let t=0;for(let{from:i,to:r}of n.ranges){if(e<=r){t+=e-i;break}t+=r-i}return t/n.total}function $d(n,e){for(let t of n)if(e(t))return t}const vs={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};function bo(n){let e=n.facet(ar).filter(i=>typeof i!="function"),t=n.facet(al).filter(i=>typeof i!="function");return t.length&&e.push(F.join(t)),e}class Vn{constructor(e,t){this.scale=e,this.viewports=t}static get(e,t,i){let r=0,s=0,l=0,o=i.map(({from:h,to:f})=>{let c=t.lineAt(h,J.ByPos,e,0,0).top,u=t.lineAt(f,J.ByPos,e,0,0).bottom;return r+=u-c,{from:h,to:f,top:c,bottom:u,domTop:0,domBottom:0}});if(t.height-r<10)return vs;let a=(7e6-r)/(t.height-r);for(let h of o)h.domTop=l+(h.top-s)*a,l=h.domBottom=h.domTop+(h.bottom-h.top),s=h.bottom;return new Vn(a,o)}toDOM(e){for(let t=0,i=0,r=0;;t++){let s=tt.from==e.viewports[i].from&&t.to==e.viewports[i].to):!1}}function yi(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),i=e.toDOM(n.bottom);return new qe(n.from,n.length,t,i-t,Array.isArray(n._content)?n._content.map(r=>yi(r,e)):n._content)}const Sn=R.define({combine:n=>n.join(" ")}),Xs=R.define({combine:n=>n.indexOf(!0)>-1}),Zs=xt.newName(),of=xt.newName(),af=xt.newName(),hf={"&light":"."+of,"&dark":"."+af};function Cs(n,e,t){return new xt(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return n;if(!t||!t[r])throw new RangeError(`Unsupported selector: ${r}`);return t[r]}):n+" "+i}})}const xd=Cs("."+Zs,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},".cm-panels-top":{top:"0"},".cm-panels-bottom":{bottom:"0"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"baseline",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{background:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat",backgroundSize:".4em",backgroundPosition:"calc(min(50%, 0px)) center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},hf),yd={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Tr=X.ie&&X.ie_version<=11;class wd{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new eO,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(X.ie&&X.ie_version<=11||X.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&X.android&&e.constructor.EDIT_CONTEXT!==!1&&!(X.chrome&&X.chrome_version<126)&&(this.editContext=new vd(e),e.state.facet(at)&&(e.contentDOM.editContext=this.editContext.editContext)),Tr&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(this.pendingRecords().length>0),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(at)?i.root.activeElement!=this.dom:!Zi(this.dom,r))return;let s=r.anchorNode&&i.docView.tile.nearest(r.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(X.ie&&X.ie_version<=11||X.android&&X.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Ti(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Ei(e.root);if(!t)return!1;let i=X.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Pd(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let r=Zi(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Dt(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,r=!1;for(let s of e){let l=this.readMutation(s);l&&(l.typeOver&&(r=!0),t==-1?{from:t,to:i}=l:(t=Math.min(l.from,t),i=Math.max(l.to,i)))}return{from:t,to:i,typeOver:r}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Zi(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new BO(this.view,e,t,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.selectionChanged,i=this.readChange();if(!i)return this.view.requestMeasure(),!1;let r=this.view.state,s=Nh(this.view,i);return this.view.state==r&&(i.domChanged||t)&&this.view.update([]),s}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let i=ko(t,e.previousSibling||e.target.previousSibling,-1),r=ko(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(at)!=e.state.facet(at)&&(e.view.contentDOM.editContext=e.state.facet(at)?this.editContext.editContext:null))}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function ko(n,e,t){for(;e;){let i=ne.get(e);if(i&&i.parent==n)return i;let r=e.parentNode;e=r!=n.dom?r:t>0?e.nextSibling:e.previousSibling}return null}function $o(n,e){let t=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,l=n.docView.domAtPos(n.state.selection.main.anchor,1);return Ti(l.node,l.offset,r,s)&&([t,i,r,s]=[r,s,t,i]),{anchorNode:t,anchorOffset:i,focusNode:r,focusOffset:s}}function Pd(n,e){if(e.getComposedRanges){let r=e.getComposedRanges(n.root)[0];if(r)return $o(n,r)}let t=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),t=r.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",i,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",i,!0),t?$o(n,t):null}class vd{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let r=e.state.selection.main,{anchor:s,head:l}=r,o=this.toEditorPos(i.updateRangeStart),a=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:o,drifted:!1});let h=a-o>i.text.length;o==this.from&&sthis.to&&(a=s);let f=Fh(e.state.sliceDoc(o,a),i.text,(h?r.from:r.to)-o,h?"end":null);if(!f){let u=Q.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));ws(u,r)||e.dispatch({selection:u,userEvent:"select"});return}let c={from:f.from+o,to:f.toA+o,insert:W.of(i.text.slice(f.from,f.toB).split(` +`))};if((X.mac||X.android)&&c.from==l-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(c={from:o,to:a,insert:W.of([i.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let u=this.to-this.from+(c.to-c.from+c.insert.length);hl(e,c,Q.single(this.toEditorPos(i.selectionStart,u),this.toEditorPos(i.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),c.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(t.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],s=null;for(let l=this.toEditorPos(i.rangeStart),o=this.toEditorPos(i.rangeEnd);l{let r=[];for(let s of i.getTextFormats()){let l=s.underlineStyle,o=s.underlineThickness;if(!/none/i.test(l)&&!/none/i.test(o)){let a=this.toEditorPos(s.rangeStart),h=this.toEditorPos(s.rangeEnd);if(a{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{let r=Ei(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((s,l,o,a,h)=>{if(i)return;let f=h.length-(l-s);if(r&&l>=r.to)if(r.from==s&&r.to==l&&r.insert.eq(h)){r=this.pendingContextChange=null,t+=f,this.to+=f;return}else r=null,this.revertPending(e.state);if(s+=t,l+=t,l<=this.from)this.from+=f,this.to+=f;else if(sthis.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(l),h.toString()),this.to+=f}t+=f}),r&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class A{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.clearAnnouncement=-1,this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(r=>r.forEach(s=>i(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||tO(e.parent)||document,this.viewState=new Qo(this,e.state||U.create(e)),e.scrollTo&&e.scrollTo.is(un)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(zt).map(r=>new wr(r));for(let r of this.plugins)r.update(this);this.observer=new wd(this),this.inputState=new UO(this),this.inputState.ensureHandlers(this.plugins),this.docView=new so(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof oe?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,r,s=this.state;for(let u of e){if(u.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=u.state}if(this.destroyed){this.viewState.state=s;return}let l=this.hasFocus,o=0,a=null;e.some(u=>u.annotation(nf))?(this.inputState.notifiedFocused=l,o=1):l!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=l,a=rf(s,l),a||(o=1));let h=this.observer.delayedAndroidKey,f=null;if(h?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(f=null)):this.observer.clear(),s.facet(U.phrases)!=this.state.facet(U.phrases))return this.setState(s);r=zn.create(this,s,e),r.flags|=o;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let u of e){if(c&&(c=c.map(u.changes)),u.scrollIntoView){let{main:O}=u.state.selection,{x:d,y:p}=this.state.facet(A.cursorScrollMargin);c=new It(O.empty?O:Q.cursor(O.head,O.head>O.anchor?-1:1),"nearest","nearest",p,d)}for(let O of u.effects)O.is(un)&&(c=O.value.clip(this.state))}this.viewState.update(r,c),this.bidiCache=Dn.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(xi)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(u=>u.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Sn)!=r.state.facet(Sn)&&(this.viewState.mustMeasureContent=!0),(t||i||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!r.empty)for(let u of this.state.facet(ks))try{u(r)}catch(O){Je(this.state,O,"update listener")}(a||f)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),f&&!Nh(this,f)&&h.force&&Dt(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new Qo(this,e),this.plugins=e.facet(zt).map(i=>new wr(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new so(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(zt),i=e.state.facet(zt);if(t!=i){let r=[];for(let s of i){let l=t.indexOf(s);if(l<0)r.push(new wr(s));else{let o=this.plugins[l];o.mustUpdate=e,r.push(o)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:l,scaleY:o}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(l=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(l<0){if(kh(i||this.win))s=-1,l=this.viewState.heightMap.height/this.viewState.scaleY;else{let d=this.viewState.scrollAnchorAt(r);s=d.from,l=d.top}o=this.viewState.scaleY}this.updateState=1;let h=this.viewState.measure();if(!h&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let f=[];h&4||([this.measureRequests,f]=[f,this.measureRequests]);let c=f.map(d=>{try{return d.read(this)}catch(p){return Je(this.state,p),xo}}),u=zn.create(this,this.state,[]),O=!1;u.flags|=h,t?t.flags|=h:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),O=this.docView.update(u),O&&this.docViewUpdate());for(let d=0;d1||p<-1)&&!(X.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(i==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r=r+p,i?s<0?i.scrollTop=i.scrollHeight:i.scrollTop+=p:this.win.scrollBy(0,p),l=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet(ks))a(t)}get themeClasses(){return Zs+" "+(this.state.facet(Xs)?af:of)+" "+this.state.facet(Sn)}updateAttrs(){let e=yo(this,Eh,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(at)?"true":"false",class:"cm-content",style:`${X.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),yo(this,ol,t);let i=this.observer.ignore(()=>{let r=Jl(this.contentDOM,this.contentAttrs,t),s=Jl(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let r of i.effects)if(r.is(A.announce)){t&&(this.announceDOM.textContent="",this.win.clearTimeout(this.clearAnnouncement),this.clearAnnouncement=this.win.setTimeout(()=>{this.announceDOM.textContent=" "},200),t=!1);let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(xi);let e=this.state.facet(A.cspNonce);xt.mount(this.root,this.styleModules.concat(xd).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;ti.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return Zr(this,e,lo(this,e,t,i))}moveByGroup(e,t){return Zr(this,e,lo(this,e,t,i=>YO(this,e.head,i)))}visualLineSide(e,t){return t?Q.cursor(e.to,1):Q.cursor(e.from,-1)}moveToLineBoundary(e,t,i=!0){return LO(this,e,t,i)}moveVertically(e,t,i){return Zr(this,e,_O(this,e,t,i))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let i=ys(this,e,t);return i&&i.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),ys(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.state.doc.lineAt(e),r=this.bidiSpans(i),s=r[Ke.find(r,e-i.from,-1,t)];return i.length&&(e==i.from&&t<0||e==i.to&&t>0)&&s.dir!=this.textDirectionAt(i.from)&&(e==i.to?(e=i.from+s.from,t=1):(e=i.from+s.to,t=-1)),this.docView.coordsAt(e,t,s.dir==ie.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Mh)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Xd)return vh(e.length);let t=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||Ph(s.isolates,i=io(this,e))))return s.order;i||(i=io(this,e));let r=hO(e.text,t,i);return this.bidiCache.push(new Dn(e.from,e.to,t,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||X.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{bh(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.win.clearTimeout(this.clearAnnouncement),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){var i,r,s,l;return un.of(new It(typeof e=="number"?Q.cursor(e):e,(i=t.y)!==null&&i!==void 0?i:"nearest",(r=t.x)!==null&&r!==void 0?r:"nearest",(s=t.yMargin)!==null&&s!==void 0?s:5,(l=t.xMargin)!==null&&l!==void 0?l:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return un.of(new It(Q.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return dt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return dt.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=xt.newName(),r=[Sn.of(i),xi.of(Cs(`.${i}`,e))];return t&&t.dark&&r.push(Xs.of(!0)),r}static baseTheme(e){return hi.lowest(xi.of(Cs("."+Zs,e,hf)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),r=i&&ne.get(i)||ne.get(e);return((t=r?.root)===null||t===void 0?void 0:t.view)||null}}A.styleModule=xi;A.inputHandler=Rh;A.clipboardInputFilter=sl;A.clipboardOutputFilter=ll;A.scrollHandler=Yh;A.focusChangeEffect=jh;A.perLineTextDirection=Mh;A.exceptionSink=Ah;A.updateListener=ks;A.editable=at;A.mouseSelectionStyle=Th;A.dragMovesSelection=Ch;A.clickAddsSelectionRange=Zh;A.decorations=ar;A.blockWrappers=zh;A.outerDecorations=al;A.atomicRanges=en;A.bidiIsolatedRanges=qh;A.cursorScrollMargin=R.define({combine:n=>{let e=5,t=5;for(let i of n)typeof i=="number"?e=t=i:{x:e,y:t}=i;return{x:e,y:t}}});A.scrollMargins=Bh;A.darkTheme=Xs;A.cspNonce=R.define({combine:n=>n.length?n[0]:""});A.contentAttributes=ol;A.editorAttributes=Eh;A.lineWrapping=A.contentAttributes.of({class:"cm-lineWrapping"});A.announce=ee.define();const Xd=4096,xo={};class Dn{constructor(e,t,i,r,s,l){this.from=e,this.to=t,this.dir=i,this.isolates=r,this.fresh=s,this.order=l}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:ie.LTR;for(let s=Math.max(0,e.length-10);s=0;r--){let s=i[r],l=typeof s=="function"?s(n):s;l&&il(l,t)}return t}const Zd=X.mac?"mac":X.windows?"win":X.linux?"linux":"key";function Cd(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let r,s,l,o;for(let a=0;ai.concat(r),[]))),t}let bt=null;const Rd=4e3;function jd(n,e=Zd){let t=Object.create(null),i=Object.create(null),r=(l,o)=>{let a=i[l];if(a==null)i[l]=o;else if(a!=o)throw new Error("Key binding "+l+" is used both as a regular binding and as a multi-stroke prefix")},s=(l,o,a,h,f)=>{var c,u;let O=t[l]||(t[l]=Object.create(null)),d=o.split(/ (?!$)/).map(S=>Cd(S,e));for(let S=1;S{let T=bt={view:b,prefix:$,scope:l};return setTimeout(()=>{bt==T&&(bt=null)},Rd),!0}]})}let p=d.join(" ");r(p,!1);let m=O[p]||(O[p]={preventDefault:!1,stopPropagation:!1,run:((u=(c=O._any)===null||c===void 0?void 0:c.run)===null||u===void 0?void 0:u.slice())||[]});a&&m.run.push(a),h&&(m.preventDefault=!0),f&&(m.stopPropagation=!0)};for(let l of n){let o=l.scope?l.scope.split(" "):["editor"];if(l.any)for(let h of o){let f=t[h]||(t[h]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:c}=l;for(let u in f)f[u].run.push(O=>c(O,Ts))}let a=l[e]||l.key;if(a)for(let h of o)s(h,a,l.run,l.preventDefault,l.stopPropagation),l.shift&&s(h,"Shift-"+a,l.shift,l.preventDefault,l.stopPropagation)}return t}let Ts=null;function Md(n,e,t,i){Ts=e;let r=Gu(e),s=Cu(r,0),l=Tu(s)==r.length&&r!=" ",o="",a=!1,h=!1,f=!1;bt&&bt.view==t&&bt.scope==i&&(o=bt.prefix+" ",Kh.indexOf(e.keyCode)<0&&(h=!0,bt=null));let c=new Set,u=m=>{if(m){for(let S of m.run)if(!c.has(S)&&(c.add(S),S(t)))return m.stopPropagation&&(f=!0),!0;m.preventDefault&&(m.stopPropagation&&(f=!0),h=!0)}return!1},O=n[i],d,p;return O&&(u(O[o+Qn(r,e,!l)])?a=!0:l&&(e.altKey||e.metaKey||e.ctrlKey)&&!(X.windows&&e.ctrlKey&&e.altKey)&&!(X.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(d=yt[e.keyCode])&&d!=r?(u(O[o+Qn(d,e,!0)])||e.shiftKey&&(p=Yi[e.keyCode])!=r&&p!=d&&u(O[o+Qn(p,e,!1)]))&&(a=!0):l&&e.shiftKey&&u(O[o+Qn(r,e,!0)])&&(a=!0),!a&&u(O._any)&&(a=!0)),h&&(a=!0),a&&f&&e.stopPropagation(),Ts=null,a}class jt{constructor(e,t,i,r,s){this.className=e,this.left=t,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=ff(e);return[new jt(t,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return Ld(e,t,i)}}function ff(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==ie.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function Po(n,e,t,i){let r=n.coordsAtPos(e,t*2);if(!r)return i;let s=n.dom.getBoundingClientRect(),l=(r.top+r.bottom)/2,o=n.posAtCoords({x:s.left+1,y:l}),a=n.posAtCoords({x:s.right-1,y:l});return o==null||a==null?i:{from:Math.max(i.from,Math.min(o,a)),to:Math.min(i.to,Math.max(o,a))}}function Ld(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),r=Math.min(t.to,n.viewport.to),s=n.textDirection==ie.LTR,l=n.contentDOM,o=l.getBoundingClientRect(),a=ff(n),h=l.querySelector(".cm-line"),f=h&&window.getComputedStyle(h),c=o.left+(f?parseInt(f.paddingLeft)+Math.min(0,parseInt(f.textIndent)):0),u=o.right-(f?parseInt(f.paddingRight):0),O=xs(n,i,1),d=xs(n,r,-1),p=O.type==ke.Text?O:null,m=d.type==ke.Text?d:null;if(p&&(n.lineWrapping||O.widgetLineBreaks)&&(p=Po(n,i,1,p)),m&&(n.lineWrapping||d.widgetLineBreaks)&&(m=Po(n,r,-1,m)),p&&m&&p.from==m.from&&p.to==m.to)return $(b(t.from,t.to,p));{let k=p?b(t.from,null,p):T(O,!1),w=m?b(null,t.to,m):T(d,!0),P=[];return(p||O).to<(m||d).from-(p&&m?1:0)||O.widgetLineBreaks>1&&k.bottom+n.defaultLineHeight/2j&&B.from=fe)break;M>H&&Y(Math.max(Z,H),k==null&&Z<=j,Math.min(M,fe),w==null&&M>=V,y.dir)}if(H=Qe.to+1,H>=fe)break}return G.length==0&&Y(j,k==null,V,w==null,n.textDirection),{top:_,bottom:E,horizontal:G}}function T(k,w){let P=o.top+(w?k.top:k.bottom);return{top:P,bottom:P,horizontal:[]}}}function Yd(n,e){return n.constructor==e.constructor&&n.eq(e)}class _d{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Cn)!=e.state.facet(Cn)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(Cn);for(;t!Yd(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[i].constructor&&r.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(r.draw(),t);for(;t;){let r=t.nextSibling;t.remove(),t=r}this.drawn=e,X.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Cn=R.define();function cf(n){return[dt.define(e=>new _d(e,n)),Cn.of(n)]}const As=!X.ios,ti=R.define({combine(n){return ch(n,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Ed(n={}){return[ti.of(n),zd,qd,Bd,Lh.of(!0)]}function uf(n){return n.startState.facet(ti)!=n.state.facet(ti)}const zd=cf({above:!0,markers(n){let{state:e}=n,t=e.facet(ti),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty||t.drawRangeCursor&&!(s&&X.ios&&t.iosSelectionHandles)){let l=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",o=r.empty?r:Q.cursor(r.head,r.assoc);for(let a of jt.forRange(n,l,o))i.push(a)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=uf(n);return t&&vo(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){vo(e.state,n)},class:"cm-cursorLayer"});function vo(n,e){e.style.animationDuration=n.facet(ti).cursorBlinkRate+"ms"}const qd=cf({above:!1,markers(n){let e=[],{main:t,ranges:i}=n.state.selection;for(let r of i)if(!r.empty&&(As||r!=t))for(let s of jt.forRange(n,"cm-selectionBackground",r))e.push(s);if(X.ios&&!t.empty&&n.state.facet(ti).iosSelectionHandles){for(let r of jt.forRange(n,"cm-selectionHandle cm-selectionHandle-start",Q.cursor(t.from,1)))e.push(r);for(let r of jt.forRange(n,"cm-selectionHandle cm-selectionHandle-end",Q.cursor(t.to,1)))e.push(r)}return e},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||uf(n)},class:"cm-selectionLayer"}),Wd=X.gecko&&X.gecko_version==153?"#ffffff01":"transparent",Bd=hi.highest(A.theme({".cm-line":{...As?{"& ::selection, &::selection":{backgroundColor:`${Wd} !important`}}:{},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important",...As?{"&::selection, & ::selection":{backgroundColor:"Highlight !important"}}:{}}}}));class Vd extends fi{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?Ci(e.firstChild):[];if(!t.length)return null;let i=window.getComputedStyle(e.parentNode),r=zi(t[0],i.direction!="rtl"),s=parseInt(i.lineHeight);return r.bottom-r.top>s*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+s}:r}ignoreEvent(){return!1}}function Dd(n){return[dt.fromClass(class{constructor(t){this.view=t,this.placeholder=te.set([te.widget({widget:new Vd(n),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?te.none:this.placeholder}},{decorations:t=>t.decorations}),A.contentAttributes.of({"aria-placeholder":n})]}class ii extends $t{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ii.prototype.elementClass="";ii.prototype.toDOM=void 0;ii.prototype.mapMode=de.TrackBefore;ii.prototype.startSide=ii.prototype.endSide=-1;ii.prototype.point=!0;const Of=1024;let Id=0;class Le{constructor(e,t){this.from=e,this.to=t}}class L{constructor(e={}){this.id=Id++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=he.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}L.closedBy=new L({deserialize:n=>n.split(" ")});L.openedBy=new L({deserialize:n=>n.split(" ")});L.group=new L({deserialize:n=>n.split(" ")});L.isolate=new L({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});L.contextHash=new L({perNode:!0});L.lookAhead=new L({perNode:!0});L.mounted=new L({perNode:!0});class Ut{constructor(e,t,i,r=!1){this.tree=e,this.overlay=t,this.parser=i,this.bracketed=r}static get(e){return e&&e.props&&e.props[L.mounted.id]}}const Ud=Object.create(null);class he{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):Ud,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new he(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(L.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(L.group),s=-1;s<(r?r.length:0);s++){let l=t[s<0?i.name:r[s]];if(l)return l}}}}he.none=new he("",Object.create(null),0,8);class tn{constructor(e){this.types=e;for(let t=0;t0;for(let a=this.cursor(l|z.IncludeAnonymous);;){let h=!1;if(a.from<=s&&a.to>=r&&(!o&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(o||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Ol(he.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new D(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new D(he.none,t,i,r)))}static build(e){return Hd(e)}}D.empty=new D(he.none,[],[],0);class cl{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new cl(this.buffer,this.index)}}class Pt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return he.none}toString(){let e=[];for(let t=0;t0));a=l[a+3]);return o}slice(e,t,i){let r=this.buffer,s=new Uint16Array(t-e),l=0;for(let o=e,a=0;o=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Wi(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?o.length:-1;e!=h;e+=t){let f=o[e],c=a[e]+l.from,u;if(!(!(s&z.EnterBracketed&&f instanceof D&&(u=Ut.get(f))&&!u.overlay&&u.bracketed&&i>=c&&i<=c+f.length)&&!df(r,i,c,c+f.length))){if(f instanceof Pt){if(s&z.ExcludeBuffers)continue;let O=f.findChild(0,f.buffer.length,t,i-c,r);if(O>-1)return new et(new Gd(l,f,e,c),null,O)}else if(s&z.IncludeAnonymous||!f.type.isAnonymous||ul(f)){let O;if(!(s&z.IgnoreMounts)&&(O=Ut.get(f))&&!O.overlay)return new me(O.tree,c,e,l);let d=new me(f,c,e,l);return s&z.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?f.children.length-1:0,t,i,r,s)}}}if(s&z.IncludeAnonymous||!l.type.isAnonymous||(l.index>=0?e=l.index+t:e=t<0?-1:l._parent._tree.children.length,l=l._parent,!l))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,i=0){let r;if(!(i&z.IgnoreOverlays)&&(r=Ut.get(this._tree))&&r.overlay){let s=e-this.from,l=i&z.EnterBracketed&&r.bracketed;for(let{from:o,to:a}of r.overlay)if((t>0||l?o<=s:o=s:a>s))return new me(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Zo(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(let l=!1;!l;)if(l=r.type.is(t),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function Rs(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class Gd{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class et extends pf{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new et(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,i=0){if(i&z.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new et(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new et(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new et(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let l=i.buffer[this.index+1];e.push(i.slice(r,s,l)),t.push(0)}return new D(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function gf(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;st.from||l.to=e){let o=new me(l.tree,l.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(Wi(o,e,t,!1))}}return r?gf(r):i}class In{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~z.EnterBracketed,e instanceof me)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof me?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&z.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&z.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&z.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let s=t+e,l=e<0?-1:i._tree.children.length;s!=l;s+=e){let o=i._tree.children[s];if(this.mode&z.IncludeAnonymous||o instanceof Pt||!o.type.isAnonymous||ul(o))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let l=e;l;l=l._parent)if(l.index==r){if(r==this.index)return l;t=l,i=s+1;break e}r=this.stack[--s]}for(let r=i;r=0;s--){if(s<0)return Rs(this._tree,e,r);let l=i[t.buffer[this.stack[s]]];if(!l.isAnonymous){if(e[r]&&e[r]!=l.name)return!1;r--}}return!0}}function ul(n){return n.children.some(e=>e instanceof Pt||!e.type.isAnonymous||ul(e))}function Hd(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=Of,reused:s=[],minRepeatType:l=i.types.length}=n,o=Array.isArray(t)?new cl(t,t.length):t,a=i.types,h=0,f=0;function c(k,w,P,_,E,G){let{id:Y,start:j,end:V,size:B}=o,H=f,fe=h;if(B<0)if(o.next(),B==-1){let I=s[Y];P.push(I),_.push(j-k);return}else if(B==-3){h=Y;return}else if(B==-4){f=Y;return}else throw new RangeError(`Unrecognized record size: ${B}`);let Qe=a[Y],y,Z,M=j-k;if(V-j<=r&&(Z=m(o.pos-w,E))){let I=new Uint16Array(Z.size-Z.skip),N=o.pos-Z.size,le=I.length;for(;o.pos>N;)le=S(Z.start,I,le);y=new Pt(I,V-Z.start,i),M=Z.start-k}else{let I=o.pos-B;o.next();let N=[],le=[],ve=Y>=l?Y:-1,ze=0,st=V,di=H;for(;o.pos>I;)ve>=0&&o.id==ve&&o.size>=0?(o.end<=st-r&&(d(N,le,j,ze,o.end,st,ve,di,fe),ze=N.length,st=o.end,di=f),o.next()):G>2500?u(j,I,N,le):(ve>=0&&o.size==-1&&s[o.id].type==i.types[ve]&&(ze=0&&ze>0&&ze-1&&ze>0){let Ll=O(Qe,fe);y=Ol(Qe,N,le,0,N.length,0,V-j,Ll,Ll)}else y=p(Qe,N,le,V-j,H-V,fe)}P.push(y),_.push(M)}function u(k,w,P,_){let E=[],G=0,Y=-1;for(;o.pos>w;){let{id:j,start:V,end:B,size:H}=o;if(H>4)o.next();else{if(Y>-1&&V=0;B-=3)j[H++]=E[B],j[H++]=E[B+1]-V,j[H++]=E[B+2]-V,j[H++]=H;P.push(new Pt(j,E[2]-V,i)),_.push(V-k)}}function O(k,w){return(P,_,E)=>{let G=0,Y=P.length-1,j,V;if(Y>=0&&(j=P[Y])instanceof D){if(!Y&&j.type==k&&j.length==E)return j;(V=j.prop(L.lookAhead))&&(G=_[Y]+j.length+V-E)}return p(k,P,_,E,G,w)}}function d(k,w,P,_,E,G,Y,j,V){let B=[],H=[];for(;k.length>_;)B.push(k.pop()),H.push(w.pop()+P-E);k.push(p(i.types[Y],B,H,G-E,j-G,V)),w.push(E-P)}function p(k,w,P,_,E,G,Y){if(G){let j=[L.contextHash,G];Y=Y?[j].concat(Y):[j]}if(E>25){let j=[L.lookAhead,E];Y=Y?[j].concat(Y):[j]}return new D(k,w,P,_,Y)}function m(k,w){let P=o.fork(),_=0,E=0,G=0,Y=P.end-r,j={size:0,start:0,skip:0};e:for(let V=P.pos-k;P.pos>V;){let B=P.size;if(P.id==w&&B>=0){j.size=_,j.start=E,j.skip=G,G+=4,_+=4,P.next();continue}let H=P.pos-B;if(B<0||H=l?4:0,Qe=P.start;for(P.next();P.pos>H;){if(P.size<0)if(P.size==-3||P.size==-4)fe+=4;else break e;else P.id>=l&&(fe+=4);P.next()}E=Qe,_+=B,G+=fe}return(w<0||_==k)&&(j.size=_,j.start=E,j.skip=G),j.size>4?j:void 0}function S(k,w,P){let{id:_,start:E,end:G,size:Y}=o;if(o.next(),Y>=0&&_4){let V=o.pos-(Y-4);for(;o.pos>V;)P=S(k,w,P)}w[--P]=j,w[--P]=G-k,w[--P]=E-k,w[--P]=_}else Y==-3?h=_:Y==-4&&(f=_);return P}let $=[],b=[];for(;o.pos>0;)c(n.start||0,n.bufferStart||0,$,b,-1,0);let T=(e=n.length)!==null&&e!==void 0?e:$.length?b[0]+$[0].length:0;return new D(a[n.topID],$.reverse(),b.reverse(),T)}const Co=new WeakMap;function Tn(n,e){if(!n.isAnonymous||e instanceof Pt||e.type!=n)return 1;let t=Co.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof D)){t=1;break}t+=Tn(n,i)}Co.set(e,t)}return t}function Ol(n,e,t,i,r,s,l,o,a){let h=0;for(let d=i;d=f)break;w+=P}if(b==T+1){if(w>f){let P=d[T];O(P.children,P.positions,0,P.children.length,p[T]+$);continue}c.push(d[T])}else{let P=p[b-1]+d[b-1].length-k;c.push(Ol(n,d,p,T,b,k,P,null,a))}u.push(k+$-s)}}return O(e,t,i,r,0),(o||a)(c,u,l)}class mf{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof et?this.setBuffer(e.context.buffer,e.index,t):e instanceof me&&this.map.set(e.tree,t)}get(e){return e instanceof et?this.getBuffer(e.context.buffer,e.index):e instanceof me?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ct{constructor(e,t,i,r,s=!1,l=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(l?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new ct(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,l=e.length?e[0]:null;for(let o=0,a=0,h=0;;o++){let f=o=i)for(;l&&l.from=u.from||c<=u.to||h){let O=Math.max(u.from,a)-h,d=Math.min(u.to,c)-h;u=O>=d?null:new ct(O,d,u.tree,u.offset+h,o>0,!!f)}if(u&&r.push(u),l.to>c)break;l=snew Le(r.from,r.to)):[new Le(0,0)]:[new Le(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class Kd{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Sf(n){return(e,t,i,r)=>new ep(e,n,t,i,r)}class To{constructor(e,t,i,r,s,l){this.parser=e,this.parse=t,this.overlay=i,this.bracketed=r,this.target=s,this.from=l}}function Ao(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class Jd{constructor(e,t,i,r,s,l,o,a){this.parser=e,this.predicate=t,this.mounts=i,this.index=r,this.start=s,this.bracketed=l,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}}const Qf=new L({perNode:!0});class ep{constructor(e,t,i,r,s){this.nest=t,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new D(i.type,i.children,i.positions,i.length,i.propValues.concat([[Qf,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[L.mounted.id]=new Ut(t,e.overlay,e.parser,e.bracketed),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t=this.stoppedAt)o=!1;else if(e.hasNode(r)){if(t){let h=t.mounts.find(f=>f.frag.from<=r.from&&f.frag.to>=r.to&&f.mount.overlay);if(h)for(let f of h.mount.overlay){let c=f.from+h.pos,u=f.to+h.pos;c>=r.from&&u<=r.to&&!t.ranges.some(O=>O.fromc)&&t.ranges.push({from:c,to:u})}}o=!1}else if(i&&(l=tp(i.ranges,r.from,r.to)))o=l!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.fromnew Le(c.from-r.from,c.to-r.from)):null,!!s.bracketed,r.tree,f.length?f[0].from:r.from)),s.overlay?f.length&&(i={ranges:f,depth:0,prev:i}):o=!1}}else if(t&&(a=t.predicate(r))&&(a===!0&&(a=new Le(r.from,r.to)),a.from=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(o&&r.firstChild())t&&t.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let h=Lo(this.ranges,t.ranges);h.length&&(Ao(h),this.inner.splice(t.index,0,new To(t.parser,t.parser.startParse(this.input,Yo(t.mounts,h),h),t.ranges.map(f=>new Le(f.from-t.start,f.to-t.start)),t.bracketed,t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function tp(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Ro(n,e,t,i,r,s){if(e=i&&t.enter(i,1,z.IncludeAnonymous|z.IgnoreMounts|z.IgnoreOverlays|z.ExcludeBuffers)))if(t.to<=i)t.next(!1)||(this.done=!0);else break}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof D)t=t.children[0];else break}return!1}}function Mo(n){let e=n.tree.prop(Qf);return e==null?n.to:Math.min(n.to,e-n.offset)}let np=class{constructor(e){if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let t=this.curFrag=e[0];this.curTo=Mo(t),this.inner=new jo(t.tree,-t.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=Mo(e),this.inner=new jo(e.tree,-e.offset)}}findMounts(e,t){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let l=(i=s.tree)===null||i===void 0?void 0:i.prop(L.mounted);if(l&&l.parser==t)for(let o=this.fragI;o=s.to)break;a.tree==this.curFrag.tree&&r.push({frag:a,pos:s.from-a.offset,mount:l})}}}return r}};function Lo(n,e){let t=null,i=e;for(let r=1,s=0;r=o)break;a.to<=l||(t||(i=t=e.slice()),a.fromo&&t.splice(s+1,0,new Le(o,a.to))):a.to>o?t[s--]=new Le(o,a.to):t.splice(s--,1))}}return i}function rp(n,e,t,i){let r=0,s=0,l=!1,o=!1,a=-1e9,h=[];for(;;){let f=r==n.length?1e9:l?n[r].to:n[r].from,c=s==e.length?1e9:o?e[s].to:e[s].from;if(l!=o){let u=Math.max(a,t),O=Math.min(f,c,i);unew Le(u.from+i,u.to+i)),c=rp(e,f,a,h);for(let u=0,O=a;;u++){let d=u==c.length,p=d?h:c[u].from;if(p>O&&t.push(new ct(O,p,r.tree,-l,s.from>=O||s.openStart,s.to<=p||s.openEnd)),d)break;O=c[u].to}}else t.push(new ct(a,h,r.tree,-l,s.from>=l||s.openStart,s.to<=o||s.openEnd))}return t}let sp=0;class Ae{constructor(e,t,i,r){this.name=e,this.set=t,this.base=i,this.modified=r,this.id=sp++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let i=typeof e=="string"?e:"?";if(e instanceof Ae&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let r=new Ae(i,[],null,[]);if(r.set.push(r),t)for(let s of t.set)r.set.push(s);return r}static defineModifier(e){let t=new Un(e);return i=>i.modified.indexOf(t)>-1?i:Un.get(i.base||i,i.modified.concat(t).sort((r,s)=>r.id-s.id))}}let lp=0;class Un{constructor(e){this.name=e,this.instances=[],this.id=lp++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(o=>o.base==e&&op(t,o.modified));if(i)return i;let r=[],s=new Ae(e.name,r,e,t);for(let o of t)o.instances.push(s);let l=ap(t);for(let o of e.set)if(!o.modified.length)for(let a of l)r.push(Un.get(o,a));return s}}function op(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function ap(n){let e=[[]];for(let t=0;ti.length-t.length)}function ci(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let r of t.split(" "))if(r){let s=[],l=2,o=r;for(let c=0;;){if(o=="..."&&c>0&&c+3==r.length){l=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!u)throw new RangeError("Invalid path: "+r);if(s.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),c+=u[0].length,c==r.length)break;let O=r[c++];if(c==r.length&&O=="!"){l=0;break}if(O!="/")throw new RangeError("Invalid path: "+r);o=r.slice(c)}let a=s.length-1,h=s[a];if(!h)throw new RangeError("Invalid path: "+r);let f=new Bi(i,l,a>0?s.slice(0,a):null);e[h]=f.sort(e[h])}}return bf.add(e)}const bf=new L({combine(n,e){let t,i,r;for(;n||e;){if(!n||e&&n.depth<=e.depth?(r=e,e=e.next):(r=n,n=n.next),t&&t.mode==r.mode&&!r.context&&!t.context)continue;let s=new Bi(r.tags,r.mode,r.context);t?t.next=s:i=s,t=s}return i}});class Bi{constructor(e,t,i,r){this.tags=e,this.mode=t,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let l=r;for(let o of s)for(let a of o.set){let h=t[a.id];if(h){l=l?l+" "+h:h;break}}return l},scope:i}}function hp(n,e){let t=null;for(let i of n){let r=i.style(e);r&&(t=t?t+" "+r:r)}return t}function fp(n,e,t,i=0,r=n.length){let s=new cp(i,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),i,r,"",s.highlighters),s.flush(r)}class cp{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,r,s){let{type:l,from:o,to:a}=e;if(o>=i||a<=t)return;l.isTop&&(s=this.highlighters.filter(O=>!O.scope||O.scope(l)));let h=r,f=up(e)||Bi.empty,c=hp(s,f.tags);if(c&&(h&&(h+=" "),h+=c,f.mode==1&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(t,o),h),f.opaque)return;let u=e.tree&&e.tree.prop(L.mounted);if(u&&u.overlay){let O=e.node.enter(u.overlay[0].from+o,1),d=this.highlighters.filter(m=>!m.scope||m.scope(u.tree.type)),p=e.firstChild();for(let m=0,S=o;;m++){let $=m=b||!e.nextSibling())););if(!$||b>i)break;S=$.to+o,S>t&&(this.highlightRange(O.cursor(),Math.max(t,$.from+o),Math.min(i,S),"",d),this.startSpan(Math.min(i,S),h))}p&&e.parent()}else if(e.firstChild()){u&&(r="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,r,s),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function up(n){let e=n.type.prop(bf);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const v=Ae.define,kn=v(),mt=v(),_o=v(mt),Eo=v(mt),St=v(),$n=v(St),Ar=v(St),Ne=v(),Xt=v(Ne),Ue=v(),Ge=v(),js=v(),mi=v(js),xn=v(),g={comment:kn,lineComment:v(kn),blockComment:v(kn),docComment:v(kn),name:mt,variableName:v(mt),typeName:_o,tagName:v(_o),propertyName:Eo,attributeName:v(Eo),className:v(mt),labelName:v(mt),namespace:v(mt),macroName:v(mt),literal:St,string:$n,docString:v($n),character:v($n),attributeValue:v($n),number:Ar,integer:v(Ar),float:v(Ar),bool:v(St),regexp:v(St),escape:v(St),color:v(St),url:v(St),keyword:Ue,self:v(Ue),null:v(Ue),atom:v(Ue),unit:v(Ue),modifier:v(Ue),operatorKeyword:v(Ue),controlKeyword:v(Ue),definitionKeyword:v(Ue),moduleKeyword:v(Ue),operator:Ge,derefOperator:v(Ge),arithmeticOperator:v(Ge),logicOperator:v(Ge),bitwiseOperator:v(Ge),compareOperator:v(Ge),updateOperator:v(Ge),definitionOperator:v(Ge),typeOperator:v(Ge),controlOperator:v(Ge),punctuation:js,separator:v(js),bracket:mi,angleBracket:v(mi),squareBracket:v(mi),paren:v(mi),brace:v(mi),content:Ne,heading:Xt,heading1:v(Xt),heading2:v(Xt),heading3:v(Xt),heading4:v(Xt),heading5:v(Xt),heading6:v(Xt),contentSeparator:v(Ne),list:v(Ne),quote:v(Ne),emphasis:v(Ne),strong:v(Ne),link:v(Ne),monospace:v(Ne),strikethrough:v(Ne),inserted:v(),deleted:v(),changed:v(),invalid:v(),meta:xn,documentMeta:v(xn),annotation:v(xn),processingInstruction:v(xn),definition:Ae.defineModifier("definition"),constant:Ae.defineModifier("constant"),function:Ae.defineModifier("function"),standard:Ae.defineModifier("standard"),local:Ae.defineModifier("local"),special:Ae.defineModifier("special")};for(let n in g){let e=g[n];e instanceof Ae&&(e.name=n)}kf([{tag:g.link,class:"tok-link"},{tag:g.heading,class:"tok-heading"},{tag:g.emphasis,class:"tok-emphasis"},{tag:g.strong,class:"tok-strong"},{tag:g.keyword,class:"tok-keyword"},{tag:g.atom,class:"tok-atom"},{tag:g.bool,class:"tok-bool"},{tag:g.url,class:"tok-url"},{tag:g.labelName,class:"tok-labelName"},{tag:g.inserted,class:"tok-inserted"},{tag:g.deleted,class:"tok-deleted"},{tag:g.literal,class:"tok-literal"},{tag:g.string,class:"tok-string"},{tag:g.number,class:"tok-number"},{tag:[g.regexp,g.escape,g.special(g.string)],class:"tok-string2"},{tag:g.variableName,class:"tok-variableName"},{tag:g.local(g.variableName),class:"tok-variableName tok-local"},{tag:g.definition(g.variableName),class:"tok-variableName tok-definition"},{tag:g.special(g.variableName),class:"tok-variableName2"},{tag:g.definition(g.propertyName),class:"tok-propertyName tok-definition"},{tag:g.typeName,class:"tok-typeName"},{tag:g.namespace,class:"tok-namespace"},{tag:g.className,class:"tok-className"},{tag:g.macroName,class:"tok-macroName"},{tag:g.propertyName,class:"tok-propertyName"},{tag:g.operator,class:"tok-operator"},{tag:g.comment,class:"tok-comment"},{tag:g.meta,class:"tok-meta"},{tag:g.invalid,class:"tok-invalid"},{tag:g.punctuation,class:"tok-punctuation"}]);var Rr;const Rt=new L;function pl(n){return R.define({combine:n?e=>e.concat(n):void 0})}const gl=new L;class Ye{constructor(e,t,i=[],r=""){this.data=e,this.name=r,U.prototype.hasOwnProperty("tree")||Object.defineProperty(U.prototype,"tree",{get(){return re(this)}}),this.parser=t,this.extension=[si.of(this),U.languageData.of((s,l,o)=>{let a=zo(s,l,o),h=a.type.prop(Rt);if(!h)return[];let f=s.facet(h),c=a.type.prop(gl);if(c){let u=a.resolve(l-a.from,o);for(let O of c)if(O.test(u,s)){let d=s.facet(O.facet);return O.type=="replace"?d:d.concat(f)}}return f})].concat(i)}isActiveAt(e,t,i=-1){return zo(e,t,i).type.prop(Rt)==this.data}findRegions(e){let t=e.facet(si);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],r=(s,l)=>{if(s.prop(Rt)==this.data){i.push({from:l,to:l+s.length});return}let o=s.prop(L.mounted);if(o){if(o.tree.prop(Rt)==this.data){if(o.overlay)for(let a of o.overlay)i.push({from:a.from+l,to:a.to+l});else i.push({from:l,to:l+s.length});return}else if(o.overlay){let a=i.length;if(r(o.tree,o.overlay[0].from+l),i.length>a)return}}for(let a=0;ai.isTop?t:void 0)]}),e.name)}configure(e,t){return new ni(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function re(n){let e=n.field(Ye.state,!1);return e?e.tree:D.empty}class Op{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let Si=null;class Vi{constructor(e,t,i=[],r,s,l,o,a){this.parser=e,this.state=t,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=l,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new Vi(e,t,[],D.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Op(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=D.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(ct.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Si;Si=this;try{return e()}finally{Si=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=qo(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:r,treeLen:s,viewport:l,skipped:o}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((h,f,c,u)=>a.push({fromA:h,toA:f,fromB:c,toB:u})),i=ct.applyChanges(i,a),r=D.empty,s=0,l={from:e.mapPos(l.from,-1),to:e.mapPos(l.to,1)},this.skipped.length){o=[];for(let h of this.skipped){let f=e.mapPos(h.from,1),c=e.mapPos(h.to,-1);fe.from&&(this.fragments=qo(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends dl{createParse(t,i,r){let s=r[0].from,l=r[r.length-1].to;return{parsedPos:s,advance(){let a=Si;if(a){for(let h of r)a.tempSkipped.push(h);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=l,new D(he.none,[],[],l-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Si}}function qo(n,e,t){return ct.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class ri{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new ri(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=Vi.create(e.facet(si).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new ri(i)}}Ye.state=rt.define({create:ri.init,update(n,e){for(let t of e.effects)if(t.is(Ye.setState))return t.value;return e.startState.facet(si)!=e.state.facet(si)?ri.init(e.state):n.apply(e)}});let $f=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&($f=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const jr=typeof navigator<"u"&&(!((Rr=navigator.scheduling)===null||Rr===void 0)&&Rr.isInputPending)?()=>navigator.scheduling.isInputPending():null,dp=dt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Ye.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Ye.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=$f(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,a=s.context.work(()=>jr&&jr()||Date.now()>l,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Ye.setState.of(new ri(s.context))})),this.chunkBudget>0&&!(a&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Je(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),si=R.define({combine(n){return n.length?n[0]:null},enables:n=>[Ye.state,dp,A.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Di{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class Gn{constructor(e,t,i,r,s,l=void 0){this.name=e,this.alias=t,this.extensions=i,this.filename=r,this.loadFunc=s,this.support=l,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:i}=e;if(!t){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(i)}return new Gn(e.name,(e.alias||[]).concat(e.name).map(r=>r.toLowerCase()),e.extensions||[],e.filename,t,i)}static matchFilename(e,t){for(let r of e)if(r.filename&&r.filename.test(t))return r;let i=/\.([^.]+)$/.exec(t);if(i){for(let r of e)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(e,t,i=!0){t=t.toLowerCase();for(let r of e)if(r.alias.some(s=>s==t))return r;if(i)for(let r of e)for(let s of r.alias){let l=t.indexOf(s);if(l>-1&&(s.length>2||!/\w/.test(t[l-1])&&!/\w/.test(t[l+s.length])))return r}return null}}const pp=R.define(),nn=R.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Nn(n){let e=n.facet(nn);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Fn(n,e){let t="",i=n.tabSize,r=n.facet(nn)[0];if(r==" "){for(;e>=i;)t+=" ",e-=i;r=" "}for(let s=0;s=e?gp(n,t,e):null}class Or{constructor(e,t={}){this.state=e,this.options=t,this.unit=Nn(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(t<0?r-1&&(s+=l-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,t=e.length){return ut(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:r}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let l=s(r);if(l>-1)return l}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const rn=new L;function gp(n,e,t){let i=e.resolveStack(t),r=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(r!=i.node){let s=[];for(let l=r;l&&!(l.fromi.node.to||l.from==i.node.from&&l.type==i.node.type);l=l.parent)s.push(l);for(let l=s.length-1;l>=0;l--)i={node:s[l],next:i}}return yf(i,n,t)}function yf(n,e,t){for(let i=n;i;i=i.next){let r=Sp(i.node);if(r)return r(ml.create(e,t,i))}return 0}function mp(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function Sp(n){let e=n.type.prop(rn);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(L.closedBy))){let r=n.lastChild,s=r&&i.indexOf(r.name)>-1;return l=>wf(l,!0,1,void 0,s&&!mp(l)?r.from:void 0)}return n.parent==null?Qp:null}function Qp(){return 0}class ml extends Or{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.context=i}get node(){return this.context.node}static create(e,t,i){return new ml(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(bp(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){return yf(this.context.next,this.base,this.pos)}}function bp(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function kp(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let r=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),l=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let o=t.to;;){let a=e.childAfter(o);if(!a||a==i)return null;if(!a.type.isSkipped){if(a.from>=l)return null;let h=/^ */.exec(s.text.slice(t.to-s.from))[0].length;return{from:t.from,to:t.to+h}}o=a.to}}function $p({closing:n,align:e=!0,units:t=1}){return i=>wf(i,e,t,n)}function wf(n,e,t,i,r){let s=n.textAfter,l=s.match(/^\s*/)[0].length,o=i&&s.slice(l,l+i.length)==i||r==n.pos+l,a=e?kp(n):null;return a?o?n.column(a.from):n.column(a.to):n.baseIndent+(o?0:n.unit*t)}const xp=n=>n.baseIndent;function An({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const yp=R.define(),sn=new L;function Pf(n){let e=n.firstChild,t=n.lastChild;return e&&e.too.prop(Rt)==l.data:l?o=>o==l:void 0,this.style=kf(e.map(o=>({tag:o.tag,class:o.class||r(Object.assign({},o,{tag:null}))})),{all:s}).style,this.module=i?new xt(i):null,this.themeType=t.themeType}static define(e,t){return new dr(e,t||{})}}const Ms=R.define(),wp=R.define({combine(n){return n.length?[n[0]]:null}});function Mr(n){let e=n.facet(Ms);return e.length?e:n.facet(wp)}function Pp(n,e){let t=[Xp],i;return n instanceof dr&&(n.module&&t.push(A.styleModule.of(n.module)),i=n.themeType),i?t.push(Ms.computeN([A.darkTheme],r=>r.facet(A.darkTheme)==(i=="dark")?[n]:[])):t.push(Ms.of(n)),t}class vp{constructor(e){this.markCache=Object.create(null),this.tree=re(e.state),this.decorations=this.buildDeco(e,Mr(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=re(e.state),i=Mr(e.state),r=i!=Mr(e.startState),{viewport:s}=e.view,l=e.changes.mapPos(this.decoratedTo,1);t.length=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=l):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return te.none;let i=new Bt;for(let{from:r,to:s}of e.visibleRanges)fp(this.tree,t,(l,o,a)=>{i.add(l,o,this.markCache[a]||(this.markCache[a]=te.mark({class:a})))},r,s);return i.finish()}}const Xp=hi.high(dt.fromClass(vp,{decorations:n=>n.decorations})),Zp=1e4,Cp="()[]{}",vf=new L;function Ls(n,e,t){let i=n.prop(e<0?L.openedBy:L.closedBy);if(i)return i;if(n.name.length==1){let r=t.indexOf(n.name);if(r>-1&&r%2==(e<0?1:0))return[t[r+e]]}return null}function Ys(n){let e=n.type.prop(vf);return e?e(n.node):n}function qt(n,e,t,i={}){let r=i.maxScanDistance||Zp,s=i.brackets||Cp,l=re(n),o=l.resolveInner(e,t);for(let a=o;a;a=a.parent){let h=Ls(a.type,t,s);if(h&&a.from0?e>=f.from&&ef.from&&e<=f.to))return Tp(n,e,t,a,f,h,s)}}return Ap(n,e,t,l,o.type,r,s)}function Tp(n,e,t,i,r,s,l){let o=i.parent,a={from:r.from,to:r.to},h=0,f=o?.cursor();if(f&&(t<0?f.childBefore(i.from):f.childAfter(i.to)))do if(t<0?f.to<=i.from:f.from>=i.to){if(h==0&&s.indexOf(f.type.name)>-1&&f.from0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},f=n.doc.iterRange(e,t>0?n.doc.length:0),c=0;for(let u=0;!f.next().done&&u<=s;){let O=f.value;t<0&&(u+=O.length);let d=e+u*t;for(let p=t>0?0:O.length-1,m=t>0?O.length:-1;p!=m;p+=t){let S=l.indexOf(O[p]);if(!(S<0||i.resolveInner(d+p,1).type!=r))if(S%2==0==t>0)c++;else{if(c==1)return{start:h,end:{from:d+p,to:d+p+1},matched:S>>1==a>>1};c--}}t>0&&(u+=O.length)}return f.done?{start:h,matched:!1}:null}const Rp=Object.create(null),Wo=[he.none],Bo=[],Vo=Object.create(null),jp=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])jp[n]=Mp(Rp,e);function Lr(n,e){Bo.indexOf(n)>-1||(Bo.push(n),console.warn(e))}function Mp(n,e){let t=[];for(let o of e.split(" ")){let a=[];for(let h of o.split(".")){let f=n[h]||g[h];f?typeof f=="function"?a.length?a=a.map(f):Lr(h,`Modifier ${h} used at start of tag`):a.length?Lr(h,`Tag ${h} used as modifier`):a=Array.isArray(f)?f:[f]:Lr(h,`Unknown highlighting tag ${h}`)}for(let h of a)t.push(h)}if(!t.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+t.map(o=>o.id),s=Vo[r];if(s)return s.id;let l=Vo[r]=he.define({id:Wo.length,name:i,props:[ci({[i]:t})]});return Wo.push(l),l.id}ie.RTL,ie.LTR;const Lp=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),i=Ql(n.state,t.from);return i.line?Yp(n):i.block?Ep(n):!1};function Sl(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let r=n(e,t);return r?(i(t.update(r)),!0):!1}}const Yp=Sl(Wp,0),_p=Sl(Xf,0),Ep=Sl((n,e)=>Xf(n,e,qp(e)),0);function Ql(n,e){let t=n.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const Qi=50;function zp(n,{open:e,close:t},i,r){let s=n.sliceDoc(i-Qi,i),l=n.sliceDoc(r,r+Qi),o=/\s*$/.exec(s)[0].length,a=/^\s*/.exec(l)[0].length,h=s.length-o;if(s.slice(h-e.length,h)==e&&l.slice(a,a+t.length)==t)return{open:{pos:i-o,margin:o&&1},close:{pos:r+a,margin:a&&1}};let f,c;r-i<=2*Qi?f=c=n.sliceDoc(i,r):(f=n.sliceDoc(i,i+Qi),c=n.sliceDoc(r-Qi,r));let u=/^\s*/.exec(f)[0].length,O=/\s*$/.exec(c)[0].length,d=c.length-O-t.length;return f.slice(u,u+e.length)==e&&c.slice(d,d+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(f.charAt(u+e.length))?1:0},close:{pos:r-O-t.length,margin:/\s/.test(c.charAt(d-1))?1:0}}:null}function qp(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),r=t.to<=i.to?i:n.doc.lineAt(t.to);r.from>i.from&&r.from==t.to&&(r=t.to==i.to+1?i:n.doc.lineAt(t.to-1));let s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function Xf(n,e,t=e.selection.ranges){let i=t.map(s=>Ql(e,s.from).block);if(!i.every(s=>s))return null;let r=t.map((s,l)=>zp(e,i[l],s.from,s.to));if(n!=2&&!r.every(s=>s))return{changes:e.changes(t.map((s,l)=>r[l]?[]:[{from:s.from,insert:i[l].open+" "},{from:s.to,insert:" "+i[l].close}]))};if(n!=1&&r.some(s=>s)){let s=[];for(let l=0,o;lr&&(s==l||l>c.from)){r=c.from;let u=/^\s*/.exec(c.text)[0].length,O=u==c.length,d=c.text.slice(u,u+h.length)==h?u:-1;us.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:o,token:a,indent:h,empty:f,single:c}of i)(c||!f)&&s.push({from:o.from+h,insert:a+" "});let l=e.changes(s);return{changes:l,selection:e.selection.map(l,1)}}else if(n!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:l,comment:o,token:a}of i)if(o>=0){let h=l.from+o,f=h+a.length;l.text[f-l.from]==" "&&f++,s.push({from:h,to:f})}return{changes:s}}return null}const _s=pt.define(),Bp=pt.define(),Vp=R.define(),Zf=R.define({combine(n){return ch(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,r)=>e(i,r)||t(i,r)})}}),Cf=rt.define({create(){return tt.empty},update(n,e){let t=e.state.facet(Zf),i=e.annotation(_s);if(i){let a=Pe.fromTransaction(e,i.selection),h=i.side,f=h==0?n.undone:n.done;return a?f=Hn(f,f.length,t.minDepth,a):f=Rf(f,e.startState.selection),new tt(h==0?i.rest:f,h==0?f:i.rest)}let r=e.annotation(Bp);if((r=="full"||r=="before")&&(n=n.isolate()),e.annotation(oe.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let s=Pe.fromTransaction(e),l=e.annotation(oe.time),o=e.annotation(oe.userEvent);return s?n=n.addChanges(s,l,o,t,e):e.selection&&(n=n.addSelection(e.startState.selection,l,o,t.newGroupDelay)),(r=="full"||r=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new tt(n.done.map(Pe.fromJSON),n.undone.map(Pe.fromJSON))}});function Dp(n={}){return[Cf,Zf.of(n),A.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?Tf:e.inputType=="historyRedo"?Es:null;return i?(e.preventDefault(),i(t)):!1}})]}function pr(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let r=t.field(Cf,!1);if(!r)return!1;let s=r.pop(n,t,e);return s?(i(s),!0):!1}}const Tf=pr(0,!1),Es=pr(1,!1),Ip=pr(0,!0),Up=pr(1,!0);class Pe{constructor(e,t,i,r,s){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new Pe(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new Pe(e.changes&&ae.fromJSON(e.changes),[],e.mapped&&it.fromJSON(e.mapped),e.startSelection&&Q.fromJSON(e.startSelection),e.selectionsAfter.map(Q.fromJSON))}static fromTransaction(e,t){let i=_e;for(let r of e.startState.facet(Vp)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new Pe(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,_e)}static selection(e){return new Pe(void 0,_e,void 0,void 0,e)}}function Hn(n,e,t,i){let r=e+1>t+20?e-t-1:0,s=n.slice(r,e);return s.push(i),s}function Gp(n,e){let t=[],i=!1;return n.iterChangedRanges((r,s)=>t.push(r,s)),e.iterChangedRanges((r,s,l,o)=>{for(let a=0;a=h&&l<=f&&(i=!0)}}),i}function Np(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function Af(n,e){return n.length?e.length?n.concat(e):n:e}const _e=[],Fp=200;function Rf(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-Fp));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),Hn(n,n.length-1,1e9,t.setSelAfter(i)))}else return[Pe.selection([e])]}function Hp(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Yr(n,e){if(!n.length)return n;let t=n.length,i=_e;for(;t;){let r=Kp(n[t-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=n.slice(0,t);return s[t-1]=r,s}else e=r.mapped,t--,i=r.selectionsAfter}return i.length?[Pe.selection(i)]:_e}function Kp(n,e,t){let i=Af(n.selectionsAfter.length?n.selectionsAfter.map(o=>o.map(e)):_e,t);if(!n.changes)return Pe.selection(i);let r=n.changes.map(e),s=e.mapDesc(n.changes,!0),l=n.mapped?n.mapped.composeDesc(s):s;return new Pe(r,ee.mapEffects(n.effects,e),l,n.startSelection.map(s),i)}const Jp=/^(input\.type|delete)($|\.)/;class tt{constructor(e,t,i=0,r=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new tt(this.done,this.undone):this}addChanges(e,t,i,r,s){let l=this.done,o=l[l.length-1];return o&&o.changes&&!o.changes.empty&&e.changes&&(!i||Jp.test(i))&&(!o.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):gr(t,e))}function Se(n){return n.textDirectionAt(n.state.selection.main.head)==ie.LTR}const Mf=n=>jf(n,!Se(n)),Lf=n=>jf(n,Se(n));function Yf(n,e){return De(n,t=>t.empty?n.moveByGroup(t,e):gr(t,e))}const tg=n=>Yf(n,!Se(n)),ig=n=>Yf(n,Se(n));function ng(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function mr(n,e,t){let i=re(n).resolveInner(e.head),r=t?L.closedBy:L.openedBy;for(let a=e.head;;){let h=t?i.childAfter(a):i.childBefore(a);if(!h)break;ng(n,h,r)?i=h:a=t?h.to:h.from}let s=i.type.prop(r),l,o;return s&&(l=t?qt(n,i.from,1):qt(n,i.to,-1))&&l.matched?o=t?l.end.to:l.end.from:o=t?i.to:i.from,Q.cursor(o,t?-1:1)}const rg=n=>De(n,e=>mr(n.state,e,!Se(n))),sg=n=>De(n,e=>mr(n.state,e,Se(n)));function _f(n,e){return De(n,t=>{if(!t.empty)return gr(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const Ef=n=>_f(n,!1),zf=n=>_f(n,!0);function qf(n){let e=n.scrollDOM.clientHeightl.empty?n.moveVertically(l,e,t.height):gr(l,e));if(r.eq(i.selection))return!1;let s;if(t.selfScroll){let l=n.coordsAtPos(i.selection.main.head),o=n.scrollDOM.getBoundingClientRect(),a=o.top+t.marginTop,h=o.bottom-t.marginBottom;l&&l.top>a&&l.bottomWf(n,!1),zs=n=>Wf(n,!0);function vt(n,e,t){let i=n.lineBlockAt(e.head),r=n.moveToLineBoundary(e,t);if(r.head==e.head&&r.head!=(t?i.to:i.from)&&(r=n.moveToLineBoundary(e,t,!1)),!t&&r.head==i.from&&i.length){let s=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=Q.cursor(i.from+s))}return r}const lg=n=>De(n,e=>vt(n,e,!0)),og=n=>De(n,e=>vt(n,e,!1)),ag=n=>De(n,e=>vt(n,e,!Se(n))),hg=n=>De(n,e=>vt(n,e,Se(n))),fg=n=>De(n,e=>n.moveToLineBoundary(e,!1,!1)),cg=n=>De(n,e=>n.moveToLineBoundary(e,!0,!1));function ug(n,e,t){let i=!1,r=ui(n.selection,s=>{let l=qt(n,s.head,-1)||qt(n,s.head,1)||s.head>0&&qt(n,s.head-1,1)||s.headug(n,e);function Ee(n,e,t){let i=ui(n.state.selection,r=>{r.undirectional&&r.head>=r.anchor!=e&&(r=Q.range(r.head,r.anchor));let s=t(r);return Q.range(r.anchor,s.head,s.goalColumn,s.bidiLevel||void 0,s.assoc)});return i.eq(n.state.selection)?!1:(n.dispatch(Ve(n.state,i)),!0)}function Bf(n,e){return Ee(n,e,t=>n.moveByChar(t,e))}const Vf=n=>Bf(n,!Se(n)),Df=n=>Bf(n,Se(n));function If(n,e){return Ee(n,e,t=>n.moveByGroup(t,e))}const dg=n=>If(n,!Se(n)),pg=n=>If(n,Se(n)),gg=n=>{let e=!Se(n);return Ee(n,e,t=>mr(n.state,t,e))},mg=n=>{let e=Se(n);return Ee(n,e,t=>mr(n.state,t,e))};function Uf(n,e){return Ee(n,e,t=>n.moveVertically(t,e))}const Gf=n=>Uf(n,!1),Nf=n=>Uf(n,!0);function Ff(n,e){return Ee(n,e,t=>n.moveVertically(t,e,qf(n).height))}const Io=n=>Ff(n,!1),Uo=n=>Ff(n,!0),Sg=n=>Ee(n,!0,e=>vt(n,e,!0)),Qg=n=>Ee(n,!1,e=>vt(n,e,!1)),bg=n=>{let e=!Se(n);return Ee(n,e,t=>vt(n,t,e))},kg=n=>{let e=Se(n);return Ee(n,e,t=>vt(n,t,e))},$g=n=>Ee(n,!1,e=>Q.cursor(n.lineBlockAt(e.head).from)),xg=n=>Ee(n,!0,e=>Q.cursor(n.lineBlockAt(e.head).to)),Go=({state:n,dispatch:e})=>(e(Ve(n,{anchor:0})),!0),No=({state:n,dispatch:e})=>(e(Ve(n,{anchor:n.doc.length})),!0),Fo=({state:n,dispatch:e})=>(e(Ve(n,{anchor:n.selection.main.anchor,head:0})),!0),Ho=({state:n,dispatch:e})=>(e(Ve(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),yg=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),wg=({state:n,dispatch:e})=>{let t=Sr(n).map(({from:i,to:r})=>Q.undirectionalRange(i,Math.min(r+1,n.doc.length)));return e(n.update({selection:Q.create(t),userEvent:"select"})),!0},Pg=({state:n,dispatch:e})=>{let t=ui(n.selection,i=>{let r=re(n),s=r.resolveStack(i.from,1);if(i.empty){let l=r.resolveStack(i.from,-1);l.node.from>=s.node.from&&l.node.to<=s.node.to&&(s=l)}for(let l=s;l;l=l.next){let{node:o}=l;if((o.from=i.to||o.to>i.to&&o.from<=i.from)&&l.next)return Q.undirectionalRange(o.from,o.to)}return i});return t.eq(n.selection)?!1:(e(Ve(n,t)),!0)};function Hf(n,e){let{state:t}=n,i=t.selection,r=t.selection.ranges.slice();for(let s of t.selection.ranges){let l=t.doc.lineAt(s.head);if(e?l.to0)for(let o=s;;){let a=n.moveVertically(o,e);if(a.headl.to){r.some(h=>h.head==a.head)||r.push(a);break}else{if(a.head==o.head)break;o=a}}}return r.length==i.ranges.length?!1:(n.dispatch(Ve(t,Q.create(r,r.length-1))),!0)}const vg=n=>Hf(n,!1),Xg=n=>Hf(n,!0),Zg=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=Q.create([t.main]):t.main.empty||(i=Q.create([Q.cursor(t.main.head)])),i?(e(Ve(n,i)),!0):!1};function ln(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,r=i.changeByRange(s=>{let{from:l,to:o}=s;if(l==o){let a=e(s);al&&(t="delete.forward",a=yn(n,a,!0)),l=Math.min(l,a),o=Math.max(o,a)}else l=yn(n,l,!1),o=yn(n,o,!0);return l==o?{range:s}:{changes:{from:l,to:o},range:Q.cursor(l,lr(n)))i.between(e,e,(r,s)=>{re&&(e=t?s:r)});return e}const Kf=(n,e,t)=>ln(n,i=>{let r=i.from,{state:s}=n,l=s.doc.lineAt(r),o,a;if(t&&!e&&r>l.from&&rKf(n,!1,!0),Jf=n=>Kf(n,!0,!1),ec=(n,e)=>ln(n,t=>{let i=t.head,{state:r}=n,s=r.doc.lineAt(i),l=r.charCategorizer(i);for(let o=null;;){if(i==(e?s.to:s.from)){i==t.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let a=ge(s.text,i-s.from,e)+s.from,h=s.text.slice(Math.min(i,a)-s.from,Math.max(i,a)-s.from),f=l(h);if(o!=null&&f!=o)break;(h!=" "||i!=t.head)&&(o=f),i=a}return i}),tc=n=>ec(n,!1),Cg=n=>ec(n,!0),Tg=n=>ln(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headln(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),Rg=n=>ln(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:W.of(["",""])},range:Q.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},Mg=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let r=i.from,s=n.doc.lineAt(r),l=r==s.from?r-1:ge(s.text,r-s.from,!1)+s.from,o=r==s.to?r+1:ge(s.text,r-s.from,!0)+s.from;return{changes:{from:l,to:o,insert:n.doc.slice(r,o).append(n.doc.slice(l,r))},range:Q.cursor(o)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Sr(n){let e=[],t=-1;for(let i of n.selection.ranges){let r=n.doc.lineAt(i.from),s=n.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=n.doc.lineAt(i.to-1)),t>=r.number){let l=e[e.length-1];l.to=s.to,l.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});t=s.number+1}return e}function ic(n,e,t){if(n.readOnly)return!1;let i=[],r=[];for(let s of Sr(n)){if(t?s.to==n.doc.length:s.from==0)continue;let l=n.doc.lineAt(t?s.to+1:s.from-1),o=l.length+1;if(t){i.push({from:s.to,to:l.to},{from:s.from,insert:l.text+n.lineBreak});for(let a of s.ranges)r.push(Q.range(Math.min(n.doc.length,a.anchor+o),Math.min(n.doc.length,a.head+o)))}else{i.push({from:l.from,to:s.from},{from:s.to,insert:n.lineBreak+l.text});for(let a of s.ranges)r.push(Q.range(a.anchor-o,a.head-o))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:Q.create(r,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Lg=({state:n,dispatch:e})=>ic(n,e,!1),Yg=({state:n,dispatch:e})=>ic(n,e,!0);function nc(n,e,t){if(n.readOnly)return!1;let i=[];for(let s of Sr(n))t?i.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):i.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});let r=n.changes(i);return e(n.update({changes:r,selection:n.selection.map(r,t?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const _g=({state:n,dispatch:e})=>nc(n,e,!1),Eg=({state:n,dispatch:e})=>nc(n,e,!0),zg=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Sr(e).map(({from:r,to:s})=>(r>0?r--:s{let s;if(n.lineWrapping){let l=n.lineBlockAt(r.head),o=n.coordsAtPos(r.head,r.assoc||1);o&&(s=l.bottom+n.documentTop-o.bottom+n.defaultLineHeight/2)}return n.moveVertically(r,!0,s)}).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function qg(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=re(n).resolveInner(e),i=t.childBefore(e),r=t.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(L.closedBy))&&s.indexOf(r.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(r.from).from&&!/\S/.test(n.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const Ko=rc(!1),Wg=rc(!0);function rc(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:l}=r,o=e.doc.lineAt(s),a=!n&&s==l&&qg(e,s);n&&(s=l=(l<=o.to?o:e.doc.lineAt(l)).to);let h=new Or(e,{simulateBreak:s,simulateDoubleBreak:!!a}),f=xf(h,s);for(f==null&&(f=ut(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));lo.from&&s{let r=[];for(let l=i.from;l<=i.to;){let o=n.doc.lineAt(l);o.number>t&&(i.empty||i.to>o.from)&&(e(o,r,i),t=o.number),l=o.to+1}let s=n.changes(r);return{changes:r,range:Q.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const Bg=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new Or(n,{overrideIndentation:s=>{let l=t[s];return l??-1}}),r=bl(n,(s,l,o)=>{let a=xf(i,s.from);if(a==null)return;/\S/.test(s.text)||(a=0);let h=/^\s*/.exec(s.text)[0],f=Fn(n,a);(h!=f||o.fromn.readOnly?!1:(e(n.update(bl(n,(t,i)=>{i.push({from:t.from,insert:n.facet(nn)})}),{userEvent:"input.indent"})),!0),Dg=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(bl(n,(t,i)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let s=ut(r,n.tabSize),l=0,o=Fn(n,Math.max(0,s-Nn(n)));for(;l(n.setTabFocusMode(),!0),Ug=[{key:"Ctrl-b",run:Mf,shift:Vf,preventDefault:!0},{key:"Ctrl-f",run:Lf,shift:Df},{key:"Ctrl-p",run:Ef,shift:Gf},{key:"Ctrl-n",run:zf,shift:Nf},{key:"Ctrl-a",run:fg,shift:$g},{key:"Ctrl-e",run:cg,shift:xg},{key:"Ctrl-d",run:Jf},{key:"Ctrl-h",run:qs},{key:"Ctrl-k",run:Tg},{key:"Ctrl-Alt-h",run:tc},{key:"Ctrl-o",run:jg},{key:"Ctrl-t",run:Mg},{key:"Ctrl-v",run:zs}],Gg=[{key:"ArrowLeft",run:Mf,shift:Vf,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:tg,shift:dg,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:ag,shift:bg,preventDefault:!0},{key:"ArrowRight",run:Lf,shift:Df,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:ig,shift:pg,preventDefault:!0},{mac:"Cmd-ArrowRight",run:hg,shift:kg,preventDefault:!0},{key:"ArrowUp",run:Ef,shift:Gf,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Go,shift:Fo},{mac:"Ctrl-ArrowUp",run:Do,shift:Io},{key:"ArrowDown",run:zf,shift:Nf,preventDefault:!0},{mac:"Cmd-ArrowDown",run:No,shift:Ho},{mac:"Ctrl-ArrowDown",run:zs,shift:Uo},{key:"PageUp",run:Do,shift:Io},{key:"PageDown",run:zs,shift:Uo},{key:"Home",run:og,shift:Qg,preventDefault:!0},{key:"Mod-Home",run:Go,shift:Fo},{key:"End",run:lg,shift:Sg,preventDefault:!0},{key:"Mod-End",run:No,shift:Ho},{key:"Enter",run:Ko,shift:Ko},{key:"Mod-a",run:yg},{key:"Backspace",run:qs,shift:qs,preventDefault:!0},{key:"Delete",run:Jf,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:tc,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:Cg,preventDefault:!0},{mac:"Mod-Backspace",run:Ag,preventDefault:!0},{mac:"Mod-Delete",run:Rg,preventDefault:!0}].concat(Ug.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Ng=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:rg,shift:gg},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:sg,shift:mg},{key:"Alt-ArrowUp",run:Lg},{key:"Shift-Alt-ArrowUp",run:_g},{key:"Alt-ArrowDown",run:Yg},{key:"Shift-Alt-ArrowDown",run:Eg},{key:"Mod-Alt-ArrowUp",run:vg},{key:"Mod-Alt-ArrowDown",run:Xg},{key:"Escape",run:Zg},{key:"Mod-Enter",run:Wg},{key:"Alt-l",mac:"Ctrl-l",run:wg},{key:"Mod-i",run:Pg,preventDefault:!0},{key:"Mod-[",run:Dg},{key:"Mod-]",run:Vg},{key:"Mod-Alt-\\",run:Bg},{key:"Shift-Mod-k",run:zg},{key:"Shift-Mod-\\",run:Og},{key:"Mod-/",run:Lp},{key:"Alt-A",mac:"Ctrl-A",run:_p},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Ig}].concat(Gg);class Fg{constructor(e,t,i,r){this.state=e,this.pos=t,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=re(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),r=t.text.slice(i-t.from,this.pos-t.from),s=r.search(em(e));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function Jo(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Hg(n){let e=Object.create(null),t=Object.create(null);for(let{label:r}of n){e[r[0]]=!0;for(let s=1;stypeof r=="string"?{label:r}:r),[t,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:Hg(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:t}:null}}function Jg(n,e){return t=>{for(let i=re(t.state).resolveInner(t.pos,-1);i;i=i.parent){if(n.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(t)}}function em(n,e){var t;let{source:i}=n,r=i[i.length-1]!="$";return r?new RegExp(`(?:${i})${r?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":""):n}const tm=pt.define(),im=A.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class nm{constructor(e,t,i,r){this.field=e,this.line=t,this.from=i,this.to=r}}class kl{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,de.TrackDel),i=e.mapPos(this.to,1,de.TrackDel);return t==null||i==null?null:new kl(this.field,t,i)}}class $l{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],r=[t],s=e.doc.lineAt(t),l=/^\s*/.exec(s.text)[0];for(let a of this.lines){if(i.length){let h=l,f=/^\t*/.exec(a)[0].length;for(let c=0;cnew kl(a.field,r[a.line]+a.from,r[a.line]+a.to));return{text:i,ranges:o}}static parse(e){let t=[],i=[],r=[],s;for(let l of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(l);){let o=s[1]?+s[1]:null,a=s[2]||s[3]||"",h=-1;o===0&&(o=1e9);let f=a.replace(/\\[{}]/g,c=>c[1]);for(let c=0;c=h&&u.field++}for(let c of r)if(c.line==i.length&&c.from>s.index){let u=s[2]?3+(s[1]||"").length:2;c.from-=u,c.to-=u}r.push(new nm(h,i.length,s.index,s.index+f.length)),l=l.slice(0,s.index)+a+l.slice(s.index+s[0].length)}l=l.replace(/\\([{}])/g,(o,a,h)=>{for(let f of r)f.line==i.length&&f.from>h&&(f.from--,f.to--);return a}),i.push(l)}return new $l(i,r)}}let rm=te.widget({widget:new class extends fi{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),sm=te.mark({class:"cm-snippetField"});class Oi{constructor(e,t){this.ranges=e,this.active=t,this.deco=te.set(e.map(i=>(i.from==i.to?rm:sm).range(i.from,i.to)),!0)}map(e){let t=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;t.push(r)}return new Oi(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const on=ee.define({map(n,e){return n&&n.map(e)}}),lm=ee.define(),Ii=rt.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(on))return t.value;if(t.is(lm)&&n)return new Oi(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>A.decorations.from(n,e=>e?e.deco:te.none)});function xl(n,e){return Q.create(n.filter(t=>t.field==e).map(t=>Q.range(t.from,t.to)))}function om(n){let e=$l.parse(n);return(t,i,r,s)=>{let{text:l,ranges:o}=e.instantiate(t.state,r),{main:a}=t.state.selection,h={changes:{from:r,to:s==a.from?a.to:s,insert:W.of(l)},scrollIntoView:!0,annotations:i?[tm.of(i),oe.userEvent.of("input.complete")]:void 0};if(o.length&&(h.selection=xl(o,0)),o.some(f=>f.field>0)){let f=new Oi(o,0),c=h.effects=[on.of(f)];t.state.field(Ii,!1)===void 0&&c.push(ee.appendConfig.of([Ii,um,Om,im]))}t.dispatch(t.state.update(h))}}function sc(n){return({state:e,dispatch:t})=>{let i=e.field(Ii,!1);if(!i||n<0&&i.active==0)return!1;let r=i.active+n,s=n>0&&!i.ranges.some(l=>l.field==r+n);return t(e.update({selection:xl(i.ranges,r),effects:on.of(s?null:new Oi(i.ranges,r)),scrollIntoView:!0})),!0}}const am=({state:n,dispatch:e})=>n.field(Ii,!1)?(e(n.update({effects:on.of(null)})),!0):!1,hm=sc(1),fm=sc(-1),cm=[{key:"Tab",run:hm,shift:fm},{key:"Escape",run:am}],ea=R.define({combine(n){return n.length?n[0]:cm}}),um=hi.highest(ur.compute([ea],n=>n.facet(ea)));function ye(n,e){return{...e,apply:om(n)}}const Om=A.domEventHandlers({mousedown(n,e){let t=e.state.field(Ii,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let r=t.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==t.active?!1:(e.dispatch({selection:xl(t.ranges,r.field),effects:on.of(t.ranges.some(s=>s.field>r.field)?new Oi(t.ranges,r.field):null),scrollIntoView:!0}),!0)}}),lc=new class extends $t{};lc.startSide=1;lc.endSide=-1;class Kn{static create(e,t,i,r,s){let l=r+(r<<8)+e+(t<<4)|0;return new Kn(e,t,i,l,s,[],[])}constructor(e,t,i,r,s,l,o){this.type=e,this.value=t,this.from=i,this.hash=r,this.end=s,this.children=l,this.positions=o,this.blankFirstLine=!1,this.hashProp=[[L.contextHash,r]]}addChild(e,t){e.prop(L.contextHash)!=this.hash&&(e=new D(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let i=this.children.length-1;return i>=0&&(t=Math.max(t,this.positions[i]+this.children[i].length+this.from)),new D(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(r,s,l)=>new D(he.none,r,s,l,this.hashProp)})}}var x;(function(n){n[n.Document=1]="Document",n[n.CodeBlock=2]="CodeBlock",n[n.FencedCode=3]="FencedCode",n[n.Blockquote=4]="Blockquote",n[n.HorizontalRule=5]="HorizontalRule",n[n.BulletList=6]="BulletList",n[n.OrderedList=7]="OrderedList",n[n.ListItem=8]="ListItem",n[n.ATXHeading1=9]="ATXHeading1",n[n.ATXHeading2=10]="ATXHeading2",n[n.ATXHeading3=11]="ATXHeading3",n[n.ATXHeading4=12]="ATXHeading4",n[n.ATXHeading5=13]="ATXHeading5",n[n.ATXHeading6=14]="ATXHeading6",n[n.SetextHeading1=15]="SetextHeading1",n[n.SetextHeading2=16]="SetextHeading2",n[n.HTMLBlock=17]="HTMLBlock",n[n.LinkReference=18]="LinkReference",n[n.Paragraph=19]="Paragraph",n[n.CommentBlock=20]="CommentBlock",n[n.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",n[n.Escape=22]="Escape",n[n.Entity=23]="Entity",n[n.HardBreak=24]="HardBreak",n[n.Emphasis=25]="Emphasis",n[n.StrongEmphasis=26]="StrongEmphasis",n[n.Link=27]="Link",n[n.Image=28]="Image",n[n.InlineCode=29]="InlineCode",n[n.HTMLTag=30]="HTMLTag",n[n.Comment=31]="Comment",n[n.ProcessingInstruction=32]="ProcessingInstruction",n[n.Autolink=33]="Autolink",n[n.HeaderMark=34]="HeaderMark",n[n.QuoteMark=35]="QuoteMark",n[n.ListMark=36]="ListMark",n[n.LinkMark=37]="LinkMark",n[n.EmphasisMark=38]="EmphasisMark",n[n.CodeMark=39]="CodeMark",n[n.CodeText=40]="CodeText",n[n.CodeInfo=41]="CodeInfo",n[n.LinkTitle=42]="LinkTitle",n[n.LinkLabel=43]="LinkLabel",n[n.URL=44]="URL"})(x||(x={}));class dm{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class pm{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Ri(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,i=0){for(let r=t;r=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let i=(n.type==x.OrderedList?Pl:wl)(t,e,!1);return i>0&&(n.type!=x.BulletList||yl(t,e,!1)<0)&&t.text.charCodeAt(t.pos+i-1)==n.value}const oc={[x.Blockquote](n,e,t){return t.next!=62?!1:(t.markers.push(q(x.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(Re(t.text.charCodeAt(t.pos+1))?2:1)),n.end=e.lineStart+t.text.length,!0)},[x.ListItem](n,e,t){return(t.next<0?n.blankFirstLine&&n.children.length==1:t.indentt&&Re(n.charCodeAt(e-1));)e--;return e}function ac(n){if(n.next!=96&&n.next!=126)return-1;let e=n.pos+1;for(;e-1&&n.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(gc.SetextHeading)>-1||i<3?-1:1}function fc(n,e){for(let t=n.stack.length-1;t>=0;t--)if(n.stack[t].type==e)return!0;return!1}function wl(n,e,t){return(n.next==45||n.next==43||n.next==42)&&(n.pos==n.text.length-1||Re(n.text.charCodeAt(n.pos+1)))&&(!t||fc(e,x.BulletList)||n.skipSpace(n.pos+2)=48&&r<=57;){i++;if(i==n.text.length)return-1;r=n.text.charCodeAt(i)}return i==n.pos||i>n.pos+9||r!=46&&r!=41||in.pos+1||n.next!=49)?-1:i+1-n.pos}function cc(n){if(n.next!=35)return-1;let e=n.pos+1;for(;e6?-1:t}function uc(n){if(n.next!=45&&n.next!=61||n.indent>=n.baseIndent+4)return-1;let e=n.pos+1;for(;e/,dc=/\?>/,Bs=[[/^<(?:script|pre|style|textarea)(?:\s|>|$)/i,/<\/(?:script|pre|style|textarea)>/i],[/^\s*)/.exec(i);if(s)return n.append(q(x.Comment,t,t+1+s[0].length));let l=/^\?[^]*?\?>/.exec(i);if(l)return n.append(q(x.ProcessingInstruction,t,t+1+l[0].length));let o=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/[a-zA-Z][\w-]*\s*>|[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*\/?>)/.exec(i);return o?n.append(q(x.HTMLTag,t,t+1+o[0].length)):-1},Emphasis(n,e,t){if(e!=95&&e!=42)return-1;let i=t+1;for(;n.char(i)==e;)i++;let r=n.slice(t-1,t),s=n.slice(i,i+1),l=Gi.test(r),o=Gi.test(s),a=/\s|^$/.test(r),h=/\s|^$/.test(s),f=!h&&(!o||a||l),c=!a&&(!l||h||o),u=f&&(e==42||!c||l),O=c&&(e==42||!f||o);return n.append(new Te(e==95?vl:Xl,t,i,(u?1:0)|(O?2:0)))},HardBreak(n,e,t){if(e==92&&n.char(t+1)==10)return n.append(q(x.HardBreak,t,t+2));if(e==32){let i=t+1;for(;n.char(i)==32;)i++;if(n.char(i)==10&&i>=t+2)return n.append(q(x.HardBreak,t,i+1))}return-1},Link(n,e,t){return e==91?n.append(new Te(Tt,t,t+1,1)):-1},Image(n,e,t){return e==33&&n.char(t+1)==91?n.append(new Te(Jn,t,t+2,1)):-1},LinkEnd(n,e,t){if(e!=93)return-1;for(let i=n.parts.length-1;i>=0;i--){let r=n.parts[i];if(r instanceof Te&&(r.type==Tt||r.type==Jn)){if(!r.side||n.skipSpace(r.to)==t&&!/[(\[]/.test(n.slice(t+1,t+2)))return n.parts[i]=null,-1;let s=n.takeContent(i),l=n.parts[i]=km(n,s,r.type==Tt?x.Link:x.Image,r.from,t+1);if(r.type==Tt)for(let o=0;oe?q(x.URL,e+t,s+t):s==n.length?null:!1}}function $c(n,e,t){let i=n.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let s=e+1,l=!1;s=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,i,r,s){return this.append(new Te(e,t,i,(r?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Te&&(t.type==Tt||t.type==Jn))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i=e;a--){let p=this.parts[a];if(p instanceof Te&&p.side&1&&p.type==r.type&&!(s&&(r.side&1||p.side&2)&&(p.size+r.size)%3==0&&(p.size%3||r.size%3))){o=p;break}}if(!o)continue;let h=r.type.resolve,f=[],c=o.from,u=r.to;if(s){let p=Math.min(2,o.to-o.from,l);c=o.to-p,u=r.from+p,h=p==1?"Emphasis":"StrongEmphasis"}o.type.mark&&f.push(this.elt(o.type.mark,c,o.to));for(let p=a+1;p=0;t--){let i=this.parts[t];if(i instanceof Te&&i.type==e&&i.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Te?t:null}skipSpace(e){return Ri(this.text,e-this.offset)+this.offset}elt(e,t,i,r){return typeof e=="string"?q(this.parser.getNodeType(e),t,i,r):new bc(e,t)}}an.linkStart=Tt;an.imageStart=Jn;an.emphasisAsterisk=Xl;an.emphasisUnderscore=vl;function Ds(n,e){if(!e.length)return n;if(!n.length)return e;let t=n.slice(),i=0;for(let r of e){for(;i(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=` +`;)s--;this.fragmentEnd=s?s-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(z.IncludeAnonymous|z.IgnoreMounts),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=t;if(!i.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;for(;t&&t.type.isAnonymous&&t.children[0]instanceof D;)t=t.children[0];return t&&t.prop(L.contextHash)==e}takeNodes(e){let t=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,l=s,o=e.block.children.length,a=e.lineStart-e.block.from>>2,h=l,f=o;e:for(;;){if(t.to-i>Math.min(r,e.to)||t.type.isAnonymous&&t.tree&&(t.to-t.from>a||!xm(t.tree))){if(t.type.isAnonymous&&t.firstChild())continue;break}let c=wc(t.from-i,e.ranges);if(t.to-i<=e.ranges[e.rangeI].to)e.addNode(t.tree,c);else{let u=new D(e.parser.nodeSet.types[x.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(u,t.tree),e.addNode(u,c)}for((t.type.isAnonymous||t.type.is("Block"))&&(t.type.isAnonymous||yc.indexOf(t.type.id)<0?(l=t.to-i,o=e.block.children.length):(l=h,o=f),h=t.to-i,f=e.block.children.length);;){if(t.nextSibling())continue e;if(!t.parent()||!t.type.isAnonymous)break e}}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return l-s}};function xm(n){for(;n.type.isAnonymous;){let e=n.children[n.children.length-1];if(e instanceof D)n=e;else return!1}return n.type.is("Block")&&yc.indexOf(n.type.id)<0}function wc(n,e){let t=n;for(let i=1;iwn[n]),Object.keys(wn).map(n=>gc[n]),Object.keys(wn),Sm,oc,Object.keys(Er).map(n=>Er[n]),Object.keys(Er),[]);function Pm(n,e,t){let i=[];for(let r=n.firstChild,s=e;;r=r.nextSibling){let l=r?r.from:t;if(l>s&&i.push({from:s,to:l}),!r)break;s=r.to}return i}function vm(n){let{codeParser:e,htmlParser:t}=n;return{wrap:Sf((r,s)=>{let l=r.type.id;if(e&&(l==x.CodeBlock||l==x.FencedCode)){let o="";if(l==x.FencedCode){let h=r.node.getChild(x.CodeInfo);h&&(o=s.read(h.from,h.to))}let a=e(o);if(a)return{parser:a,overlay:h=>h.type.id==x.CodeText,bracketed:l==x.FencedCode}}else if(t&&(l==x.HTMLBlock||l==x.HTMLTag||l==x.CommentBlock))return{parser:t,overlay:Pm(r.node,r.from,r.to)};return null})}}const Xm={resolve:"Strikethrough",mark:"StrikethroughMark"},Zm={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":g.strikethrough}},{name:"StrikethroughMark",style:g.processingInstruction}],parseInline:[{name:"Strikethrough",parse(n,e,t){if(e!=126||n.char(t+1)!=126||n.char(t+2)==126)return-1;let i=n.slice(t-1,t),r=n.slice(t+2,t+3),s=/\s|^$/.test(i),l=/\s|^$/.test(r),o=Gi.test(i),a=Gi.test(r);return n.addDelimiter(Xm,t,t+2,!l&&(!a||s||o),!s&&(!o||l||a))},after:"Emphasis"}]};function ji(n,e,t=0,i,r=0){let s=0,l=!0,o=-1,a=-1,h=!1,f=()=>{i.push(n.elt("TableCell",r+o,r+a,n.parser.parseInline(e.slice(o,a),r+o)))};for(let c=t;c-1)&&s++,l=!1,i&&(o>-1&&f(),i.push(n.elt("TableDelimiter",c+r,c+r+1))),o=a=-1):(h||u!=32&&u!=9)&&(o<0&&(o=c),a=c+1),h=!h&&u==92}return o>-1&&(s++,i&&f()),s}function sa(n,e){for(let t=e;t\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class la{constructor(){this.rows=null}nextLine(e,t,i){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&Pc.test(r=t.text.slice(t.pos))){let s=[];ji(e,i.content,0,s,i.start)==ji(e,r,0)&&(this.rows=[e.elt("TableHeader",i.start,i.start+i.content.length,s),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let r=[];ji(e,t.text,t.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,r))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}}const Cm={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":g.heading}},"TableRow",{name:"TableCell",style:g.content},{name:"TableDelimiter",style:g.processingInstruction}],parseBlock:[{name:"Table",leaf(n,e){return sa(e.content,0)?new la:null},endLeaf(n,e,t){if(t.parsers.some(r=>r instanceof la)||!sa(e.text,e.basePos))return!1;let i=n.peekLine();return Pc.test(i)&&ji(n,e.text,e.basePos)==ji(n,i,e.basePos)},before:"SetextHeading"}]};class Tm{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const Am={defineNodes:[{name:"Task",block:!0,style:g.list},{name:"TaskMarker",style:g.atom}],parseBlock:[{name:"TaskList",leaf(n,e){return/^\[[ xX]\][ \t]/.test(e.content)&&n.parentType().name=="ListItem"?new Tm:null},after:"SetextHeading"}]},oa=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,aa=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,Rm=/[\w-]+\.[\w-]+($|[/:])/,ha=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,fa=/\/[a-zA-Z\d@.]+/gy;function ca(n,e,t,i){let r=0;for(let s=e;s-1)return-1;let i=e+t[0].length;for(;;){let r=n[i-1],s;if(/[?!.,:*_~]/.test(r)||r==")"&&ca(n,e,i,")")>ca(n,e,i,"("))i--;else if(r==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(n.slice(e,i))))i=e+s.index;else break}return i}function ua(n,e){ha.lastIndex=e;let t=ha.exec(n);if(!t)return-1;let i=t[0][t[0].length-1];return i=="_"||i=="-"?-1:e+t[0].length-(i=="."?1:0)}const Mm={parseInline:[{name:"Autolink",parse(n,e,t){let i=t-n.offset;if(i&&/\w/.test(n.text[i-1]))return-1;oa.lastIndex=i;let r=oa.exec(n.text),s=-1;if(!r)return-1;if(r[1]||r[2]){if(s=jm(n.text,i+r[0].length),s>-1&&n.hasOpenLink){let l=/([^\[\]]|\[[^\]]*\])*/.exec(n.text.slice(i,s));s=i+l[0].length}}else r[3]?s=ua(n.text,i):(s=ua(n.text,i+r[0].length),s>-1&&r[0]=="xmpp:"&&(fa.lastIndex=s,r=fa.exec(n.text),r&&(s=r.index+r[0].length)));return s<0?-1:(n.addElement(n.elt("URL",t,s+n.offset)),s+n.offset)}}]},Lm=[Cm,Am,Zm,Mm];function vc(n,e,t){return(i,r,s)=>{if(r!=n||i.char(s+1)==n)return-1;let l=[i.elt(t,s,s+1)];for(let o=s+1;ot%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let r=e.parser.context;return new er(e,[],t,i,i,0,[],0,r?new da(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,r=e&65535,{parser:s}=this.p,l=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[r])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(r,h)}storeNode(e,t,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&this.buffer[l-4]==0&&this.buffer[l-1]>-1){if(t==i)return;if(this.buffer[l-2]>=t){this.buffer[l-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,t,i,r);else{let l=this.buffer.length;if(l>0&&(this.buffer[l-4]!=0||this.buffer[l-1]<0)){let o=!1;for(let a=l;a>0&&this.buffer[a-2]>i;a-=4)if(this.buffer[a-1]>=0){o=!0;break}if(o)for(;l>0&&this.buffer[l-2]>i;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4)}this.buffer[l]=e,this.buffer[l+1]=t,this.buffer[l+2]=i,this.buffer[l+3]=r}}shift(e,t,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:l}=this.p;this.pos=r;let o=l.stateFlag(s,1);!o&&(r>i||t<=l.maxNode)&&(this.reducePos=r),this.pushState(s,o?i:Math.min(i,this.reducePos)),this.shiftContext(t,i),t<=l.maxNode&&this.buffer.push(t,i,r,4)}else this.pos=r,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,r,4)}apply(e,t,i,r){e&65536?this.reduce(e):this.shift(e,t,i,r)}useNode(e,t,i){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let s=this.reducePos=this.pos=i+e.length;this.pushState(t,i),this.buffer.push(r,i,s,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(t&&e.buffer[t-4]==0&&(t-=4);t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new er(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new zm(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if((i&65536)==0)return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let s=0,l;sa&1&&o==l)||r.push(t[s],l)}t=r}let i=[];for(let r=0;r>19,r=t&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let l=this.findForcedReduction();if(l==null)return!1;t=l}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(r,s)=>{if(!t.includes(r))return t.push(r),e.allActions(r,l=>{if(!(l&393216))if(l&65536){let o=(l>>19)-s;if(o>1){let a=l&65535,h=this.stack.length-o*3;if(h>=0&&e.getGoto(this.stack[h],a,!1)>=0)return o<<19|65536|a}}else{let o=i(l,s+1);if(o!=null)return o}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t0&&this.emitLookAhead()}}class da{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class zm{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class tr{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new tr(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new tr(this.stack,this.pos,this.index)}}function wi(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,r=0;i=92&&l--,l>=34&&l--;let a=l-32;if(a>=46&&(a-=46,o=!0),s+=a,o)break;s*=46}t?t[r++]=s:t=new e(s)}return t}class Rn{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const pa=new Rn;class qm{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=pa,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;si.to:s>=i.to;){if(r==this.ranges.length-1)return null;let l=this.ranges[++r];s+=l.from-i.to,i=l}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,r;if(t>=0&&t=this.chunk2Pos&&io.to&&(this.chunk2=this.chunk2.slice(0,o.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=pa,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return i}}class Gt{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;Xc(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}Gt.prototype.contextual=Gt.prototype.fallback=Gt.prototype.extend=!1;class ir{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?wi(e):e}token(e,t){let i=e.pos,r=0;for(;;){let s=e.next<0,l=e.resolveOffset(1,1);if(Xc(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,l==null)break;e.reset(l,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}ir.prototype.contextual=Gt.prototype.fallback=Gt.prototype.extend=!1;class je{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Xc(n,e,t,i,r,s){let l=0,o=1<0){let d=n[O];if(a.allows(d)&&(e.token.value==-1||e.token.value==d||Wm(d,e.token.value,r,s))){e.acceptToken(d);break}}let f=e.next,c=0,u=n[l+2];if(e.next<0&&u>c&&n[h+u*3-3]==65535){l=n[h+u*3-1];continue e}for(;c>1,d=h+O+(O<<1),p=n[d],m=n[d+1]||65536;if(f=m)c=O+1;else{l=n[d+2],e.advance();continue e}}break}}function ga(n,e,t){for(let i=e,r;(r=n[i])!=65535;i++)if(r==t)return i-e;return-1}function Wm(n,e,t,i){let r=ga(t,i,e);return r<0||ga(t,i,n)e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}class Bm{constructor(e,t){this.fragments=e,this.minRepeat=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?ma(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?ma(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=l,null;if(s instanceof D){let o=l>this.lastRepeatPos&&s.type.id>=this.minRepeat;if(l==e||o){let a=l+s.length,h;if(l>=this.safeFrom&&a<=this.safeTo&&(!(h=s.prop(L.lookAhead))||a+h=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(l),this.index.push(0))}else this.index[t]++,this.nextStart=l+s.length}}}class Vm{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Rn)}getActions(e){let t=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,l=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,a=0;for(let h=0;hc.end+25&&(a=Math.max(c.lookAhead,a)),c.value!=0)){let u=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!f.extend&&(i=c,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new Rn,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Rn,{pos:i,p:r}=e;return t.start=i,t.end=Math.min(i+1,r.stream.end),t.value=i==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,i){let r=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let l=0;l=0&&i.p.parser.dialect.allows(o>>1)){(o&1)==0?e.value=o>>1:e.extended=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,i,r){for(let s=0;se.bufferLength*4?new Bm(i,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[l]=e;for(;l.forceReduce()&&l.stack.length&&l.stack[l.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let l=0;lt)i.push(o);else{if(this.advanceStack(o,i,e))continue;{r||(r=[],s=[]),r.push(o);let a=this.tokens.getMainToken(o);s.push(a.value,a.end)}}break}}if(!i.length){let l=r&&Um(r);if(l)return Xe&&console.log("Finish with "+this.stackID(l)),this.stackToTree(l);if(this.parser.strict)throw Xe&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let l=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(l)return Xe&&console.log("Force-finish "+this.stackID(l)),this.stackToTree(l.forceAll())}if(this.recovering){let l=this.recovering==1?1:this.recovering*3;if(i.length>l)for(i.sort((o,a)=>a.score-o.score);i.length>l;)i.pop();i.some(o=>o.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let l=0;l500&&h.buffer.length>500)if((o.score-h.score||o.buffer.length-h.buffer.length)>0)i.splice(a--,1);else{i.splice(l--,1);continue e}}}i.length>12&&(i.sort((l,o)=>o.score-l.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let l=1;l-1&&i.length&&(!s||(i.prop(L.contextHash)||0)==l))return e.useNode(i,o,t),i;if(i.children.length==0||i.positions[0]>0)break;let a=i.children[0];if(a instanceof D&&(!r||a.type.id>=this.parser.minRepeatTerm))i=a;else break}return null}advanceStack(e,t,i){let r=e.pos,{parser:s}=this,l=Xe?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.reducePos0)return e.reduce(o),Xe&&console.log(l+this.stackID(e)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let h=0;hr?t.push(d):i.push(d)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Sa(e,t),!0}}runRecovery(e,t,i){let r=null,s=!1;for(let l=0;l ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),Xe&&console.log(f+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))))continue;let c=o.split(),u=f;for(let O=0;O<10&&c.forceReduce()&&(Xe&&console.log(u+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,i));O++)Xe&&(u=this.stackID(c)+" -> ");for(let O of o.recoverByInsert(a))Xe&&console.log(f+this.stackID(O)+" (via recover-insert)"),this.advanceFully(O,i);this.stream.end>o.pos?(h==o.pos&&(h++,a=0),o.recoverByDelete(a,h),Xe&&console.log(f+this.stackID(o)+` (via recover-delete ${this.parser.getName(a)})`),Sa(o,i)):(!r||r.scoren;class Zc{constructor(e){this.start=e.start,this.shift=e.shift||qr,this.reduce=e.reduce||qr,this.reuse=e.reuse||qr,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class oi extends dl{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let o=0;oe.topRules[o][1]),r=[];for(let o=0;o=0)s(f,a,o[h++]);else{let c=o[h+-f];for(let u=-f;u>0;u--)s(o[h++],a,c);h++}}}this.nodeSet=new tn(t.map((o,a)=>he.define({name:a>=this.minRepeatTerm?void 0:o,id:a,props:r[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Of;let l=wi(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;otypeof o=="number"?new Gt(l,o):o),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let r=new Dm(this,e,t,i);for(let s of this.wrappers)r=s(r,e,t,i);return r}getGoto(e,t,i=!1){let r=this.goto;if(t>=r[0])return-1;for(let s=r[t+1];;){let l=r[s++],o=l&1,a=r[s++];if(o&&i)return a;for(let h=s+(l>>1);s0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),r=i?t(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=ot(this.data,s+2);else break;r=t(ot(this.data,s+1))}return r}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=ot(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];t.some((s,l)=>l&1&&s==r)||t.push(this.data[i],r)}}return t}configure(e){let t=Object.assign(Object.create(oi.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(o=>o.from==i.external);if(!s)return i;let l=Object.assign(Object.assign({},i),{external:s.to});return t.specializers[r]=Qa(l),l})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let s of e.split(" ")){let l=t.indexOf(s);l>=0&&(i[l]=!0)}let r=null;for(let s=0;si)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,i)<<1|e}return n.get}const Gm=55,Nm=1,Fm=56,Hm=2,Km=57,Jm=3,ba=4,e0=5,Zl=6,Cc=7,Tc=8,Ac=9,Rc=10,t0=11,i0=12,n0=13,Wr=58,r0=14,s0=15,ka=59,jc=21,l0=23,Mc=24,o0=25,Is=27,Lc=28,a0=29,h0=32,f0=35,c0=37,u0=38,O0=0,d0=1,p0={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},g0={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},$a={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function m0(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}let xa=null,ya=null,wa=0;function Us(n,e){let t=n.pos+e;if(wa==t&&ya==n)return xa;let i=n.peek(e),r="";for(;m0(i);)r+=String.fromCharCode(i),i=n.peek(++e);return ya=n,wa=t,xa=r?r.toLowerCase():i==S0||i==Q0?void 0:null}const Yc=60,nr=62,Cl=47,S0=63,Q0=33,b0=45;function Pa(n,e){this.name=n,this.parent=e}const k0=[Zl,Rc,Cc,Tc,Ac],$0=new Zc({start:null,shift(n,e,t,i){return k0.indexOf(e)>-1?new Pa(Us(i,1)||"",n):n},reduce(n,e){return e==jc&&n?n.parent:n},reuse(n,e,t,i){let r=e.type.id;return r==Zl||r==c0?new Pa(Us(i,1)||"",n):n},strict:!1}),x0=new je((n,e)=>{if(n.next!=Yc){n.next<0&&e.context&&n.acceptToken(Wr);return}n.advance();let t=n.next==Cl;t&&n.advance();let i=Us(n,0);if(i===void 0)return;if(!i)return n.acceptToken(t?s0:r0);let r=e.context?e.context.name:null;if(t){if(i==r)return n.acceptToken(t0);if(r&&g0[r])return n.acceptToken(Wr,-2);if(e.dialectEnabled(O0))return n.acceptToken(i0);for(let s=e.context;s;s=s.parent)if(s.name==i)return;n.acceptToken(n0)}else{if(i=="script")return n.acceptToken(Cc);if(i=="style")return n.acceptToken(Tc);if(i=="textarea")return n.acceptToken(Ac);if(p0.hasOwnProperty(i))return n.acceptToken(Rc);r&&$a[r]&&$a[r][i]?n.acceptToken(Wr,-1):n.acceptToken(Zl)}},{contextual:!0}),y0=new je(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(ka);break}if(n.next==b0)e++;else if(n.next==nr&&e>=2){t>=3&&n.acceptToken(ka,-2);break}else e=0;n.advance()}});function w0(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const P0=new je((n,e)=>{if(n.next==Cl&&n.peek(1)==nr){let t=e.dialectEnabled(d0)||w0(e.context);n.acceptToken(t?e0:ba,2)}else n.next==nr&&n.acceptToken(ba,1)});function Tl(n,e,t){let i=2+n.length;return new je(r=>{for(let s=0,l=0,o=0;;o++){if(r.next<0){o&&r.acceptToken(e);break}if(s==0&&r.next==Yc||s==1&&r.next==Cl||s>=2&&sl?r.acceptToken(e,-l):r.acceptToken(t,-(l-2));break}else if((r.next==10||r.next==13)&&o){r.acceptToken(e,1);break}else s=l=0;r.advance()}})}const v0=Tl("script",Gm,Nm),X0=Tl("style",Fm,Hm),Z0=Tl("textarea",Km,Jm),C0=ci({"Text RawText IncompleteTag IncompleteCloseTag":g.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":g.angleBracket,TagName:g.tagName,"MismatchedCloseTag/TagName":[g.tagName,g.invalid],AttributeName:g.attributeName,"AttributeValue UnquotedAttributeValue":g.attributeValue,Is:g.definitionOperator,"EntityReference CharacterReference":g.character,Comment:g.blockComment,ProcessingInst:g.processingInstruction,DoctypeDecl:g.documentMeta}),T0=oi.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:",c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:$0,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[C0],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let h=o.type.id;if(h==a0)return Br(o,a,t);if(h==h0)return Br(o,a,i);if(h==f0)return Br(o,a,r);if(h==jc&&s.length){let f=o.node,c=f.firstChild,u=c&&va(c,a),O;if(u){for(let d of s)if(d.tag==u&&(!d.attrs||d.attrs(O||(O=_c(c,a))))){let p=f.lastChild,m=p.type.id==u0?p.from:f.to;if(m>c.to)return{parser:d.parser,overlay:[{from:c.to,to:m}]}}}}if(l&&h==Mc){let f=o.node,c;if(c=f.firstChild){let u=l[a.read(c.from,c.to)];if(u)for(let O of u){if(O.tagName&&O.tagName!=va(f.parent,a))continue;let d=f.lastChild;if(d.type.id==Is){let p=d.from+1,m=d.lastChild,S=d.to-(m&&m.isError?0:1);if(S>p)return{parser:O.parser,overlay:[{from:p,to:S}],bracketed:!0}}else if(d.type.id==Lc)return{parser:O.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}const A0=148,Xa=1,R0=149,j0=150,zc=2,M0=151,L0=3,Y0=4,_0=152,qc=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],E0=58,z0=40,Wc=95,q0=91,jn=45,W0=46,B0=35,V0=37,D0=38,I0=92,U0=10,G0=42;function Ni(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function Al(n){return n>=48&&n<=57}function Za(n){return Al(n)||n>=97&&n<=102||n>=65&&n<=70}const Bc=(n,e,t)=>(i,r)=>{for(let s=!1,l=0,o=0;;o++){let{next:a}=i;if(Ni(a)||a==jn||a==Wc||s&&Al(a))!s&&(a!=jn||o>0)&&(s=!0),l===o&&a==jn&&l++,i.advance();else if(a==I0&&i.peek(1)!=U0){if(i.advance(),Za(i.next)){do i.advance();while(Za(i.next));i.next==32&&i.advance()}else i.next>-1&&i.advance();s=!0}else{s&&i.acceptToken(l>=2&&r.canShift(zc)?e:a==z0?t:n);break}}},N0=new je(Bc(R0,zc,j0),{contextual:!0}),F0=new je(Bc(M0,L0,Y0),{contextual:!0}),H0=new je(n=>{if(qc.includes(n.peek(-1))){let{next:e}=n;(Ni(e)||e==Wc||e==B0||e==W0||e==G0||e==q0||e==E0&&Ni(n.peek(1))||e==jn||e==D0)&&n.acceptToken(A0)}}),K0=new je(n=>{if(!qc.includes(n.peek(-1))){let{next:e}=n;if(e==V0&&(n.advance(),n.acceptToken(Xa)),Ni(e)){do n.advance();while(Ni(n.next)||Al(n.next));n.acceptToken(Xa)}}});function Ca(n){let e=n.length;return(e==4||e==5||e==7||e==9)&&/^#[a-f\d]+$/i.test(n)?_0:-1}const J0=ci({"AtKeyword import charset namespace keyframes media supports font-feature-values":g.definitionKeyword,"from to selector scope MatchFlag":g.keyword,NamespaceName:g.namespace,KeyframeName:g.labelName,KeyframeRangeName:g.operatorKeyword,TagName:g.tagName,ClassName:g.className,PseudoClassName:g.constant(g.className),IdName:g.labelName,"FeatureName PropertyName":g.propertyName,AttributeName:g.attributeName,NumberLiteral:g.number,KeywordQuery:g.keyword,UnaryQueryOp:g.operatorKeyword,"CallTag ValueName FontName":g.atom,VariableName:g.variableName,Callee:g.operatorKeyword,Unit:g.unit,"UniversalSelector NestingSelector":g.definitionOperator,"MatchOp CompareOp":g.compareOperator,"ChildOp SiblingOp, LogicOp":g.logicOperator,BinOp:g.arithmeticOperator,Important:g.modifier,Comment:g.blockComment,ColorLiteral:g.color,"ParenthesizedContent StringLiteral":g.string,":":g.punctuation,PseudoOp:g.derefOperator,"; , |":g.separator,"( )":g.paren,"[ ]":g.squareBracket,"{ }":g.brace}),e1={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:88,url:158,"url-prefix":158,domain:158,regexp:158},t1={__proto__:null,or:102,and:102,not:112,only:112,layer:212},i1={__proto__:null,selector:118,style:124,layer:208},n1={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},r1={__proto__:null,to:249},s1=oi.deserialize({version:14,states:"MrQYQdOOO$TQdOOP$[O`OOO%XQaO'#CfOOQP'#Ce'#CeO%`QdO'#CgO%eQ`O'#CgO%jQaO'#FrO&eQdO'#CkO'XQaO'#CcO'cQdO'#CnOOQP'#ES'#ESOOQP'#ER'#ERO'nQdO'#ETO'yQdO'#E[O'yQdO'#E_OOQP'#Fr'#FrO)`QhO'#FQOOQS'#Fq'#FqOOQS'#FT'#FTQYQdOOO)gQdO'#EeO*vQhO'#EkO)gQdO'#EmO*}QdO'#EoO+YQdO'#ErO*[QhO'#ExO+bQdO'#EzO+mQdO'#E}O+rQaO'#CfO+yQ`O'#EbO,OQ`O'#GPO,ZQdO'#GPQOQ`OOP,eO&jO'#CaPOOO)CAa)CAaOOQP'#Ci'#CiOOQP,59R,59RO%`QdO,59ROOQP'#Cm'#CmOOQP,59V,59VO&eQdO,59VO,pQdO,59YOOQP,5:m,5:mO'nQdO,5:oO'yQdO,5:vO'yQdO,5:xO'yQdO,5:yO'yQdO'#F[O,{Q`O,58}O-TQdO'#EaOOQS,58},58}OOQP'#Cq'#CqOOQO'#EP'#EPOOQP,59Y,59YO-[Q`O,59YO-aQ`O,59YO-fQpO'#EUO-qQdO'#EVO-vQ`O'#EVO-{QpO,5:oO.iQaO,5:vO/PQaO,5:yOOQW'#D]'#D]O0OQhO'#DgO0cQhO,5;lO*[QhO'#DeO0pQ`O'#DnO0uQhO'#D{OOQW'#Fx'#FxOOQS,5;l,5;lO0zQ`O'#DhO1PQ`O'#DkOOQS-E9R-E9ROOQ['#Cv'#CvO1UQdO'#CwO1iQdO'#C|O1|QdO'#DPOOQ['#DQ'#DQO2aQ!pO'#DRO4jQ!jO,5;POOQO'#DW'#DWO-aQ`O'#DVO4zQ!nO'#FuO6}Q`O'#DXO7SQ`O'#D|OOQ['#Fu'#FuO7XQhO'#GSO7gQ`O,5;VO7lQ!bO,5;XOOQS'#Eq'#EqO7tQ`O,5;ZO7yQdO,5;ZOOQO'#Et'#EtO8RQ`O,5;^O8WQhO,5;dO'yQdO'#DjOOQS,5;f,5;fO0zQ`O,5;fO8`QdO,5;fOOQS'#Fc'#FcO8hQdO'#FPO7gQ`O,5;iO8pQdO,5:|O9QQdO'#F^O9_Q`O,5mQhO'#DoOOQW,5:Y,5:YOOQW,5:g,5:gOOQW,5:S,5:SO>wQhO,5:VO?cQ!fO'#FvOOQS'#Fv'#FvOOQS'#FV'#FVO@pQdO,59cOOQ[,59c,59cOATQdO,59hOOQ[,59h,59hOAhQdO,59kOOQ[,59k,59kOOQ[,59m,59mO)gQdO,59oOA{QhO'#EgOOQW'#Eg'#EgOBjQ`O1G0kO4sQhO1G0kOOQ[,59q,59qO*[QhO'#DZOOQ[,59s,59sOBoQ#tO,5:hOBzQhO'#F`OCXQ`O,5wQhO'#DmOISQhO'#DsOI[QhO'#DuOIaQ!jO'#F{OOQO'#F{'#F{OIlQ`O'#DxOItQ!bO'#DzOOQO'#Fz'#FzOIyQ`O1G/qOOQS-E9T-E9TOOQ[1G.}1G.}OOQ[1G/S1G/SOOQ[1G/V1G/VOOQ[1G/Z1G/ZOJOQdO,5;ROOQS7+&V7+&VOJTQ`O7+&VOJYQhO'#D[OJbQ`O,59uO*[QhO,59uOOQ[1G0S1G0SOJjQ`O1G0SOJoQhO,5;zOOQO-E9^-E9^OOQS7+&a7+&aOJ}QbO'#DROOQO'#Ew'#EwOK]Q`O'#EvOOQO'#Ev'#EvOKhQ`O'#FaOKpQdO,5;aOOQS,5;a,5;aOOQ[1G/p1G/pOOQS7+&l7+&lO7gQ`O7+&lOK{Q!fO'#F]O)gQdO'#F]OMSQdO7+&SOOQO7+&S7+&SOOQO,5;O,5;OOOQO1G1d1G1dOMgQ!bO<wQhO'#DtOOQO,5:_,5:_O! hQhO,5:aO! pQhO,5:fO)gQdO,5:dOOQW7+%]7+%]OOQO'#Ei'#EiO! wQ`O1G0mOOQS<{AN>{O!$RQ`OAN>{O!$WQaO,5;uOOQO-E9X-E9XO!$bQdO,5;tOOQO-E9W-E9WOOQW<wQhO'#DwOOQO1G/{1G/{O!&UQ!bO1G0QO!&^QdO1G0OOJOQdO'#F_O!&eQ`O7+&XOOQW7+&X7+&XO!&mQ!bO1G/bOOQ[7+${7+${O!&xQhO7+${P!'PQ`O'#FWOOQO,5;|,5;|OOQO-E9`-E9`OOQS1G1g1G1gOOQPG24gG24gO!'UQ`OAN>YO)gQdO1G1_O!'ZQ`O7+'nOOQO1G/z1G/zO!'cQ`O,5:cO!'hQhO7+%lOOQO,5;y,5;yOOQO-E9]-E9]OOQW<^!a!b%Z!b!c?_!c!k%Z!k!lAl!l!u%Z!u!vAl!v!}%Z!}#OA}#O#P%Z#P#QB`#Q#R/w#R#]%Z#]#^Bq#^#g%Z#g#hAl#h#o%Z#o#pGU#p#qGg#q#rHO#r#sHa#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`Hx<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!r`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$`~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%j~'yh$`~!r`OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%jj)jS$uYOy%jz;'S%j;'S;=`%{<%lO%j~)yWOY)vZr)vrs*cs#O)v#O#P*h#P;'S)v;'S;=`+d<%lO)v~*hOv~~*kRO;'S)v;'S;=`*t;=`O)v~*wXOY)vZr)vrs*cs#O)v#O#P*h#P;'S)v;'S;=`+d;=`<%l)v<%lO)v~+gP;=`<%l)vj+maOy%jz}%j}!O,r!O!Q%j!Q![,r![!c%j!c!},r!}#O%j#O#P.O#P#R%j#R#S,r#S#T%j#T#o,r#o$g%j$g;'S,r;'S;=`/q<%lO,rj,ya$rY!r`Oy%jz}%j}!O,r!O!Q%j!Q![,r![!c%j!c!},r!}#O%j#O#P.O#P#R%j#R#S,r#S#T%j#T#o,r#o$g%j$g;'S,r;'S;=`/q<%lO,rj.TV!r`OY,rYZ%jZy,ryz.jz;'S,r;'S;=`/q<%lO,rY.oX$rY}!O.j!Q![.j!c!}.j#O#P/[#R#S.j#T#o.j$g;'S.j;'S;=`/k<%lO.jY/_SOY.jZ;'S.j;'S;=`/k<%lO.jY/nP;=`<%l.jj/tP;=`<%l,rd/zUOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%jd0eS!|S!r`Oy%jz;'S%j;'S;=`%{<%lO%jb0vS^QOy%jz;'S%j;'S;=`%{<%lO%j~1VWOY1SZw1Swx*cx#O1S#O#P1o#P;'S1S;'S;=`2k<%lO1S~1rRO;'S1S;'S;=`1{;=`O1S~2OXOY1SZw1Swx*cx#O1S#O#P1o#P;'S1S;'S;=`2k;=`<%l1S<%lO1S~2nP;=`<%l1Sj2vShYOy%jz;'S%j;'S;=`%{<%lO%j~3XOg~n3`UWQxWOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%jj3yWxW#SQOy%jz!O%j!O!P4c!P!Q%j!Q![7h![;'S%j;'S;=`%{<%lO%jj4hU!r`Oy%jz!Q%j!Q![4z![;'S%j;'S;=`%{<%lO%jj5RY!r`$kYOy%jz!Q%j!Q![4z![!g%j!g!h5q!h#X%j#X#Y5q#Y;'S%j;'S;=`%{<%lO%jj5vY!r`Oy%jz{%j{|6f|}%j}!O6f!O!Q%j!Q![6}![;'S%j;'S;=`%{<%lO%jj6kU!r`Oy%jz!Q%j!Q![6}![;'S%j;'S;=`%{<%lO%jj7UU!r`$kYOy%jz!Q%j!Q![6}![;'S%j;'S;=`%{<%lO%jj7o[!r`$kYOy%jz!O%j!O!P4z!P!Q%j!Q![7h![!g%j!g!h5q!h#X%j#X#Y5q#Y;'S%j;'S;=`%{<%lO%jj8jS!eYOy%jz;'S%j;'S;=`%{<%lO%jj8{WxWOy%jz!O%j!O!P4c!P!Q%j!Q![7h![;'S%j;'S;=`%{<%lO%jj9jU`YOy%jz!Q%j!Q![4z![;'S%j;'S;=`%{<%lO%j~:RTxWOy%jz{:b{;'S%j;'S;=`%{<%lO%j~:iS!r`$a~Oy%jz;'S%j;'S;=`%{<%lO%jj:z[$kYOy%jz!O%j!O!P4z!P!Q%j!Q![7h![!g%j!g!h5q!h#X%j#X#Y5q#Y;'S%j;'S;=`%{<%lO%jj;uUcYOy%jz![%j![!]QS!WW!|SOy%jz;'S%j;'S;=`%{<%lO%jj>eV#PQ!WWOy%jz!_%j!_!`=f!`!a>z!a;'S%j;'S;=`%{<%lO%jb?RS#PQ!r`Oy%jz;'S%j;'S;=`%{<%lO%jj?bYOy%jz}%j}!O@Q!O!c%j!c!}@o!}#T%j#T#o@o#o;'S%j;'S;=`%{<%lO%jj@VW!r`Oy%jz!c%j!c!}@o!}#T%j#T#o@o#o;'S%j;'S;=`%{<%lO%jj@v[lY!r`Oy%jz}%j}!O@o!O!Q%j!Q![@o![!c%j!c!}@o!}#T%j#T#o@o#o;'S%j;'S;=`%{<%lO%jhAqS!}WOy%jz;'S%j;'S;=`%{<%lO%jjBSSoYOy%jz;'S%j;'S;=`%{<%lO%jnBeSn^Oy%jz;'S%j;'S;=`%{<%lO%jjBvU!}WOy%jz#a%j#a#bCY#b;'S%j;'S;=`%{<%lO%jbC_U!r`Oy%jz#d%j#d#eCq#e;'S%j;'S;=`%{<%lO%jbCvU!r`Oy%jz#c%j#c#dDY#d;'S%j;'S;=`%{<%lO%jbD_U!r`Oy%jz#f%j#f#gDq#g;'S%j;'S;=`%{<%lO%jbDvU!r`Oy%jz#h%j#h#iEY#i;'S%j;'S;=`%{<%lO%jbE_U!r`Oy%jz#T%j#T#UEq#U;'S%j;'S;=`%{<%lO%jbEvU!r`Oy%jz#b%j#b#cFY#c;'S%j;'S;=`%{<%lO%jbF_U!r`Oy%jz#h%j#h#iFq#i;'S%j;'S;=`%{<%lO%jbFxS$tQ!r`Oy%jz;'S%j;'S;=`%{<%lO%jjGZSrYOy%jz;'S%j;'S;=`%{<%lO%jfGlU$gUOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%jjHTSqYOy%jz;'S%j;'S;=`%{<%lO%jfHfU#SQOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%j`H{P;=`<%l%Z",tokenizers:[H0,K0,N0,F0,1,2,3,4,new ir("m~RRYZ[z{a~~g~aO$c~~dP!P!Qg~lO$d~~",28,156)],topRules:{StyleSheet:[0,6],Styles:[1,129]},dynamicPrecedences:{97:1},specialized:[{term:172,get:(n,e)=>Ca(n)<<1,external:Ca},{term:150,get:n=>e1[n]||-1},{term:151,get:n=>t1[n]||-1},{term:4,get:n=>i1[n]||-1},{term:28,get:n=>n1[n]||-1},{term:149,get:n=>r1[n]||-1}],tokenPrec:2433});let Vr=null;function Dr(){if(!Vr&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let i in n)i!="cssText"&&i!="cssFloat"&&typeof n[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),t.has(i)||(e.push(i),t.add(i)));Vr=e.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return Vr||[]}const Ta=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),Aa=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),l1=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),o1=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(n=>({type:"keyword",label:n})),lt=/^(\w[\w-]*|-\w[\w-]*|)$/,a1=/^-(-[\w-]*)?$/;function h1(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let i=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return i?.name!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const Ra=new mf,f1=["Declaration"];function c1(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function Vc(n,e,t){if(e.to-e.from>4096){let i=Ra.get(e);if(i)return i;let r=[],s=new Set,l=e.cursor(z.IncludeAnonymous);if(l.firstChild())do for(let o of Vc(n,l.node,t))s.has(o.label)||(s.add(o.label),r.push(o));while(l.nextSibling());return Ra.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(s=>{var l;if(t(s)&&s.matchContext(f1)&&((l=s.node.nextSibling)===null||l===void 0?void 0:l.name)==":"){let o=n.sliceString(s.from,s.to);r.has(o)||(r.add(o),i.push({label:o,type:"variable"}))}}),i}}const u1=n=>e=>{let{state:t,pos:i}=e,r=re(t).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&t.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:Dr(),validFor:lt};if(r.name=="ValueName")return{from:r.from,options:Aa,validFor:lt};if(r.name=="PseudoClassName")return{from:r.from,options:Ta,validFor:lt};if(n(r)||(e.explicit||s)&&h1(r,t.doc))return{from:n(r)||s?r.from:i,options:Vc(t.doc,c1(r),n),validFor:a1};if(r.name=="TagName"){for(let{parent:a}=r;a;a=a.parent)if(a.name=="Block")return{from:r.from,options:Dr(),validFor:lt};return{from:r.from,options:l1,validFor:lt}}if(r.name=="AtKeyword")return{from:r.from,options:o1,validFor:lt};if(!e.explicit)return null;let l=r.resolve(i),o=l.childBefore(i);return o&&o.name==":"&&l.name=="PseudoClassSelector"?{from:i,options:Ta,validFor:lt}:o&&o.name==":"&&l.name=="Declaration"||l.name=="ArgList"?{from:i,options:Aa,validFor:lt}:l.name=="Block"||l.name=="Styles"?{from:i,options:Dr(),validFor:lt}:null},O1=u1(n=>n.name=="VariableName"),rr=ni.define({name:"css",parser:s1.configure({props:[rn.add({Declaration:An()}),sn.add({"Block KeyframeList":Pf})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function d1(){return new Di(rr,rr.data.of({autocomplete:O1}))}const p1=317,g1=318,ja=1,m1=2,S1=3,Q1=4,b1=319,k1=321,$1=322,x1=5,y1=6,w1=0,Gs=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Dc=125,P1=59,Ns=47,v1=42,X1=43,Z1=45,C1=60,T1=44,A1=63,R1=46,j1=91,M1=new Zc({start:!1,shift(n,e){return e==x1||e==y1||e==k1?n:e==$1},strict:!1}),L1=new je((n,e)=>{let{next:t}=n;(t==Dc||t==-1||e.context)&&n.acceptToken(b1)},{contextual:!0,fallback:!0}),Y1=new je((n,e)=>{let{next:t}=n,i;Gs.indexOf(t)>-1||t==Ns&&((i=n.peek(1))==Ns||i==v1)||t!=Dc&&t!=P1&&t!=-1&&!e.context&&n.acceptToken(p1)},{contextual:!0}),_1=new je((n,e)=>{n.next==j1&&!e.context&&n.acceptToken(g1)},{contextual:!0}),E1=new je((n,e)=>{let{next:t}=n;if(t==X1||t==Z1){if(n.advance(),t==n.next){n.advance();let i=!e.context&&e.canShift(ja);n.acceptToken(i?ja:m1)}}else t==A1&&n.peek(1)==R1&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(S1))},{contextual:!0});function Ir(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const z1=new je((n,e)=>{if(n.next!=C1||!e.dialectEnabled(w1)||(n.advance(),n.next==Ns))return;let t=0;for(;Gs.indexOf(n.next)>-1;)n.advance(),t++;if(Ir(n.next,!0)){for(n.advance(),t++;Ir(n.next,!1);)n.advance(),t++;for(;Gs.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==T1)return;for(let i=0;;i++){if(i==7){if(!Ir(n.next,!0))return;break}if(n.next!="extends".charCodeAt(i))break;n.advance(),t++}}n.acceptToken(Q1,-t)}),q1=ci({"get set async static":g.modifier,"for while do if else switch try catch finally return throw break continue default case defer":g.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":g.operatorKeyword,"let var const using function class extends":g.definitionKeyword,"import export from":g.moduleKeyword,"with debugger new":g.keyword,TemplateString:g.special(g.string),super:g.atom,BooleanLiteral:g.bool,this:g.self,null:g.null,Star:g.modifier,VariableName:g.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":g.function(g.variableName),VariableDefinition:g.definition(g.variableName),Label:g.labelName,PropertyName:g.propertyName,PrivatePropertyName:g.special(g.propertyName),"CallExpression/MemberExpression/PropertyName":g.function(g.propertyName),"FunctionDeclaration/VariableDefinition":g.function(g.definition(g.variableName)),"ClassDeclaration/VariableDefinition":g.definition(g.className),"NewExpression/VariableName":g.className,PropertyDefinition:g.definition(g.propertyName),PrivatePropertyDefinition:g.definition(g.special(g.propertyName)),UpdateOp:g.updateOperator,"LineComment Hashbang":g.lineComment,BlockComment:g.blockComment,Number:g.number,String:g.string,Escape:g.escape,ArithOp:g.arithmeticOperator,LogicOp:g.logicOperator,BitOp:g.bitwiseOperator,CompareOp:g.compareOperator,RegExp:g.regexp,Equals:g.definitionOperator,Arrow:g.function(g.punctuation),": Spread":g.punctuation,"( )":g.paren,"[ ]":g.squareBracket,"{ }":g.brace,"InterpolationStart InterpolationEnd":g.special(g.brace),".":g.derefOperator,", ;":g.separator,"@":g.meta,TypeName:g.typeName,TypeDefinition:g.definition(g.typeName),"type enum interface implements namespace module declare":g.definitionKeyword,"abstract global Privacy readonly override":g.modifier,"is keyof unique infer asserts":g.operatorKeyword,JSXAttributeValue:g.attributeValue,JSXText:g.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":g.angleBracket,"JSXIdentifier JSXNameSpacedName":g.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":g.attributeName,"JSXBuiltin/JSXIdentifier":g.standard(g.tagName)}),W1={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:237,private:237,protected:237,readonly:239,instanceof:258,satisfies:261,import:294,keyof:351,unique:355,infer:361,asserts:397,is:399,abstract:419,implements:421,type:423,let:426,var:428,using:431,interface:437,enum:441,namespace:447,module:449,declare:453,global:457,defer:473,for:478,of:487,while:490,with:494,do:498,if:502,else:504,switch:508,case:514,try:520,catch:524,finally:528,return:532,throw:536,break:540,continue:544,debugger:548},B1={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:403},V1={__proto__:null,"<":193},D1=oi.deserialize({version:14,states:"$GSQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Im'#ImO1XQ`O'#GtO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JsO6[Q!0MxO'#JtO6uQ`O'#F^O6zQ,UO'#FuOOQ!0Lf'#Fg'#FgO7VO7dO'#FgO9XQMhO'#F}O9`Q`O'#F|OOQ!0Lf'#Jt'#JtOOQ!0Lb'#Js'#JsO9eQ`O'#GxOOQ['#K`'#K`O9pQ`O'#IZO9uQ!0LrO'#I[OOQ['#Ja'#JaOOQ['#I`'#I`Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GtO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EzO;hQMhO'#FfO;xQ`O'#GtOOQO'#Ka'#KaO;}Q`O'#KaO<]Q`O'#G|O<]Q`O'#G}O<]Q`O'#HPO9kQ`O'#HSO=SQ`O'#HVO>kQ`O'#CeO>{Q`O'#HdO?TQ`O'#HjO?TQ`O'#HlO`QlO'#HnO?TQ`O'#HpO?TQ`O'#HsO?YQ`O'#HyO?_Q!0LsO'#IPO%[QlO'#IRO?jQ!0LsO'#ITO?uQ!0LsO'#IVO9uQ!0LrO'#IXO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FfOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jw'#JwO%[QlO'#JwOOQO'#Jz'#JzOOQO'#Ii'#IiOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#KO'#KOOC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jy'#JyODlQpO'#JzOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CEO)CEOOOOO'#Ia'#IaOFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ib'#IbOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Id'#IdOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IeOGyQ`O'#JuOIxQ!fO'#JuO+}QlO'#JuOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KUOKPQ`O'#KTOKPQ`O'#KTOKXQ`O,5;^OK^Q`O'#KSOOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KRONtQ`O'#KQO9eQ`O'#KQO! YQ`O'#KQO! bQ`O,5;]O! gQ`O'#KQO!#lQ!fO'#JtOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#J{'#J{OOQO-EuOOQ['#Ji'#JiOOQ[,5>v,5>vOOQ[-E<^-E<^O!OO!LOQ`O,5>OO`QlO,5>UO`QlO,5>WO!LTQ`O,5>YO`QlO,5>[O!LYQ`O,5>_O!L_QlO,5>eOOQ[,5>k,5>kO%[QlO,5>kO9uQ!0LrO,5>mOOQ[,5>o,5>oO#!iQ`O,5>oOOQ[,5>q,5>qO#!iQ`O,5>qOOQ[,5>s,5>sO##VQpO'#D_O%[QlO'#JwO##aQpO'#JwO##{QpO'#DmO#$^QpO'#DmO#&oQlO'#DmO#&vQ`O'#JvO#'OQ`O,5:WO#'TQ`O'#EtO#'`Q`O'#EtO#'eQ`O'#KVO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CZQpO,5;YO!CcQMhO,5;YO:dQMhO,5;YO#(`Q`O,5@cO#(eQ07dO,5:sOOQO-EQO$6lQ`O,5>QOOQ[1G3j1G3jO`QlO1G3jOOQ[1G3p1G3pOOQ[1G3r1G3rO?TQ`O1G3tO$6qQlO1G3vO$:uQlO'#HuOOQ[1G3y1G3yO$;SQ`O'#H{O?YQ`O'#H}OOQ[1G4P1G4PO$;[QlO1G4PO9uQ!0LrO1G4VOOQ[1G4X1G4XOOQ!0Lb'#G`'#G`O9uQ!0LrO1G4ZO9uQ!0LrO1G4]O$?cQ`O,5@cO9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CZQpO,5:XO$?hQ?MtO,5:XOOQO,5;`,5;`O$?rQpO'#IfO$@YQ`O,5@bOOQ!0Lf1G/r1G/rO!)[QlO,5;`O$@bQpO'#IlO$@lQ`O,5@qOOQ!0Lb1G0y1G0yO#$^QpO,5:XOOQO'#Ih'#IhO$@tQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CZQpO1G0tO!CcQMhO1G0tOOQ!0Lb1G5}1G5}O!COQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@{Q!0LrO1G0mO$AWQ!0LrO1G0mO!CZQpO1G0^ODWQpO1G0^O$AfQ!0LrO1G0mOOQO1G0^1G0^O$AzQ!0MxO1G0mPOOO-E<]-E<]POOO1G.h1G.hOOOO1G/i1G/iO$BUQ!bO,5WQ`O,5AOO%>`QpO,5AOOOQ!0Lb1G3d1G3dOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>kQ`O7+$VO%[QlO1G6mO%[QlO1G6nO%>pQ!0LrO1G6mO%>zQlO1G3lO%?RQ`O1G3lO%?WQlO1G3lOOQ[7+)U7+)UO9uQ!0LrO7+)`O`QlO7+)bOOQ['#Ki'#KiOOQ['#JT'#JTO%?_QlO,5>aOOQ[,5>a,5>aO%[QlO'#HvO%?lQ`O'#HxOOQ[,5>g,5>gO9eQ`O,5>gOOQ[,5>i,5>iOOQ[7+)k7+)kOOQ[7+)q7+)qOOQ[7+)u7+)uOOQ[7+)w7+)wO%?qQpO1G5}O%@]Q`O1G0zOOQO1G/s1G/sO%@hQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?Q,5?QOOQO-EXQ`O1G6jO9uQ!0LrO<aQ`O7+,XO&>fQ`O7+,YO%[QlO7+,XO%[QlO7+,YOOQ[7+)W7+)WO&>kQ`O7+)WO&>pQlO7+)WO&>wQ`O7+)WOOQ[<|Q`O,5>bOOQ[,5>d,5>dO&?RQ`O1G4RO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&?WQ?MtO1G6[O?YQ`O7+%_OOQ!0Lf<WO!l$xO#k<{O$X%`O$uSOe!iOpkOrQO(U)^O(WTO(ZUO(bVO(p[O~O!]$_Oa$ra'{$ra'x$ra!k$ra!Y$ra!_$ra%j$ra!g$ra~Ol)eO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#k%cO$X%`O$u%^O$w%_O$z%aO(U(wO(WTO(ZUO(b$uO(z$}O({%PO~Og(qP~P!,TO!Q)jO!g)iO!_$_X$[$_X$^$_X$`$_X$g$_X~O!g)iO!_(|X$[(|X$^(|X$`(|X$g(|X~O!Q)jO~P!.^O!Q)jO!_(|X$[(|X$^(|X$`(|X$g(|X~O!_)lO$[)pO$^)kO$`)kO$g)qO~O![)tO~P!)[O$^$hO$`$gO$g)xO~On${X!Q${X#S${X'z${X(z${X({${X~OgmXg${XnmX!]mX#`mX~P!0SOx)zO(c){O(d)}O~On*WO!Q*PO'z*QO(z$}O({%PO~Og*OO~P!1WOg*XO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!OWO!l$xO#k<{O$X%`O$uWO!l$xO#k<{O$X%`O$uSOe!iOpkOrQO(WTO(ZUO(bVO(p[O~O(U=RO~P#$oO!]-^O!^(jX~O!^-`O~O#`-aO!]#hX!^#hX~O!g-WO~O!]-bO!^(yX~O!^-dO~O!c-eO!d-eO(V!lO~P#$^O!^-hO~P'_On-kO!_'aO~O!Y-pO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(V!{a(W!{a(Z!{a(f!{a(p!{a~P!#vO!p-uO#`-sO~PChO!c-wO!d-wO(V!lO~PDWOa%nO#`-sO'{%nO~Oa%nO!g#vO#`-sO'{%nO~Oa%nO!g#vO!p-uO#`-sO'{%nO(s'qO~O(Q'yO(R'yO(S-|O~Ov-}O~O!Y'Xa!]'Xa~P!:tO![.RO!Y'XX!]'XX~P%[O!](WO!Y(ia~O!Y(ia~PHRO!](_O!Y(wa~O!S%hO![.VO!_%iO(U%gO!Y'_X!]'_X~O#`.XO!](ua!k(uaa(ua'{(ua~O!g#vO~P#,wO!](kO!k(ta~O!S%hO!_%iO#k.]O(U%gO~Op.bO!S%hO![._O!_%iO!|]O#j.aO#k._O(U%gO!]'bX!k'bX~OR.fO!l#xO~Oh%VOn.iO!_'aO%j.hO~Oa#ci!]#ci'{#ci'x#ci!Y#ci!k#civ#ci!_#ci%j#ci!g#ci~P!:tOn>^O!Q*PO'z*QO(z$}O({%PO~O#l#_aa#_a#`#_a'{#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#l(aXP(aXR(aX[(aXa(aXj(aXr(aX!S(aX!l(aX!p(aX#R(aX#o(aX#p(aX#q(aX#r(aX#s(aX#t(aX#u(aX#v(aX#w(aX#y(aX#{(aX#|(aX'{(aX(b(aX(s(aX!k(aX!Y(aX'x(aXv(aX!_(aX%j(aX!g(aX~P!6kO!].vO!k(lX~P!:tO!k.yO~O!Y.{O~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(bVO[#nia#nij#nir#ni!]#ni#R#ni#p#ni#q#ni#r#ni#s#ni#t#ni#u#ni#v#ni#w#ni#y#ni#{#ni#|#ni'{#ni(s#ni(z#ni({#ni'x#ni!Y#ni!k#niv#ni!_#ni%j#ni!g#ni~O#o#ni~P#3cO#o$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#o$OO#p$PO#q$PO#r$PO(bVO[#nia#nij#ni!]#ni#R#ni#t#ni#u#ni#v#ni#w#ni#y#ni#{#ni#|#ni'{#ni(s#ni(z#ni({#ni'x#ni!Y#ni!k#niv#ni!_#ni%j#ni!g#ni~O#s#ni~P#6QO#s$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#o$OO#p$PO#q$PO#r$PO#s$QO#t$RO#u$RO#v$bO(bVOa#ni!]#ni#y#ni#{#ni#|#ni'{#ni(s#ni(z#ni({#ni'x#ni!Y#ni!k#niv#ni!_#ni%j#ni!g#ni~O#w#ni~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#o$OO#p$PO#q$PO#r$PO#s$QO#t$RO#u$RO#v$bO#w$SO(bVO({#}Oa#ni!]#ni#{#ni#|#ni'{#ni(s#ni(z#ni'x#ni!Y#ni!k#niv#ni!_#ni%j#ni!g#ni~O#y$UO~P#;VO#y#ni~P#;VO#w$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#o$OO#p$PO#q$PO#r$PO#s$QO#t$RO#u$RO#v$bO#w$SO#y$UO(bVO(z#|O({#}Oa#ni!]#ni#|#ni'{#ni(s#ni'x#ni!Y#ni!k#niv#ni!_#ni%j#ni!g#ni~O#{#ni~P#={O#{$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#lfX#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#w]X#y]X#{]X#|]X$R]X(b]X(s]X(z]X({]X!]]X!^]X~O$P]X~P#@jOP$[OR#zO[^O!Q*PO'z*QO(z$}O({%POP#niR#ni!S#ni!l#ni!p#ni#o#ni#p#ni#q#ni#r#ni(b#ni~P#EyO!]/ROg(qX~P!1WOg/TO~Oa$Qi!]$Qi'{$Qi'x$Qi!Y$Qi!k$Qiv$Qi!_$Qi%j$Qi!g$Qi~P!:tO$^/UO$`/UO~O$^/VO$`/VO~O!g)iO#`/WO!_$dX$[$dX$^$dX$`$dX$g$dX~O![/XO~O!_)lO$[/ZO$^)kO$`)kO$g/[O~O!]WO!l$xO#k<{O$X%`O$u_O!Q*PO'z*QO(z$}O({%POP#niR#ni!S#ni!l#ni!p#ni#o#ni#p#ni#q#ni#r#ni(b#ni~P&,`O#S$dOP(aXR(aX[(aXj(aXn(aXr(aX!Q(aX!S(aX!l(aX!p(aX#R(aX#o(aX#p(aX#q(aX#r(aX#s(aX#t(aX#u(aX#v(aX#w(aX#y(aX#{(aX#|(aX$P(aX'z(aX(b(aX(s(aX(z(aX({(aX!](aX!^(aX~O$P$Qi!]$Qi!^$Qi~P#BwO$P!ri!^!ri~P$+}Og'^a!]'^a~P!1WO!^7pO~O!]'ea!^'ea~P#BwO!Y7qO~P#/sO!g#vO(s'qO!]'fa!k'fa~O!]/rO!k)Pi~O!]/rO!g#vO!k)Pi~Og$}q!]$}q#`$}q$P$}q~P!1WO!Y'ha!]'ha~P#/sO!g7xO~O!]/{O!Y)Qi~P#/sO!]/{O!Y)Qi~O!Y7{O~Oh%VOr8QO!l%eO(s'qO~Oj8SO!g#vO~Or8VO!g#vO(s'qO~O!Q*PO'z*QO({%POn'ka(z'ka!]'ka#`'ka~Og'ka$P'ka~P&5aO!Q*PO'z*QOn'ma(z'ma({'ma!]'ma#`'ma~Og'ma$P'ma~P&6SOg(`q!](`q~P!1WO#`8XOg(`q!](`q~P!1WO!Y8YO~Og%Pq!]%Pq#`%Pq$P%Pq~P!1WOa$py!]$py'{$py'x$py!Y$py!k$pyv$py!_$py%j$py!g$py~P!:tO!g6tO~O!]5^O!_)Ra~O!_'aOP$UaR$Ua[$Uaj$Uar$Ua!Q$Ua!S$Ua!]$Ua!l$Ua!p$Ua#R$Ua#o$Ua#p$Ua#q$Ua#r$Ua#s$Ua#t$Ua#u$Ua#v$Ua#w$Ua#y$Ua#{$Ua#|$Ua(b$Ua(s$Ua(z$Ua({$Ua~O%j7YO~P&8tO%_8^Oa%]i!_%]i'{%]i!]%]i~Oa#cy!]#cy'{#cy'x#cy!Y#cy!k#cyv#cy!_#cy%j#cy!g#cy~P!:tO[8`O~Ob8bO(U+sO(WTO(ZUO~O!]1VO!^)Yi~O`8fO~O(f(}O!]'qX!^'qX~O!]5wO!^)Va~O!^8pO~P%;sO(p!sO~P$&YO#[8qO~O!_1qO~O!_1qO%j8sO~On8vO!_1qO%j8sO~O[8{O!]'ta!^'ta~O!]1|O!^)Wi~O!k9PO~O!k9QO~O!k9TO~O!k9TO~P%[Oa9VO~O!g9WO~O!k9XO~O!](xi!^(xi~P#BwOa%nO#`9aO'{%nO~O!](uy!k(uya(uy'{(uy~P!:tO!](kO!k(ty~O%j9dO~P&8tO!_'aO%j9dO~O#l$}qP$}qR$}q[$}qa$}qj$}qr$}q!S$}q!]$}q!l$}q!p$}q#R$}q#o$}q#p$}q#q$}q#r$}q#s$}q#t$}q#u$}q#v$}q#w$}q#y$}q#{$}q#|$}q'{$}q(b$}q(s$}q!k$}q!Y$}q'x$}q#`$}qv$}q!_$}q%j$}q!g$}q~P#/sO#l'kaP'kaR'ka['kaa'kaj'kar'ka!S'ka!l'ka!p'ka#R'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#w'ka#y'ka#{'ka#|'ka'{'ka(b'ka(s'ka!k'ka!Y'ka'x'kav'ka!_'ka%j'ka!g'ka~P&5aO#l'maP'maR'ma['maa'maj'mar'ma!S'ma!l'ma!p'ma#R'ma#o'ma#p'ma#q'ma#r'ma#s'ma#t'ma#u'ma#v'ma#w'ma#y'ma#{'ma#|'ma'{'ma(b'ma(s'ma!k'ma!Y'ma'x'mav'ma!_'ma%j'ma!g'ma~P&6SO#l%PqP%PqR%Pq[%Pqa%Pqj%Pqr%Pq!S%Pq!]%Pq!l%Pq!p%Pq#R%Pq#o%Pq#p%Pq#q%Pq#r%Pq#s%Pq#t%Pq#u%Pq#v%Pq#w%Pq#y%Pq#{%Pq#|%Pq'{%Pq(b%Pq(s%Pq!k%Pq!Y%Pq'x%Pq#`%Pqv%Pq!_%Pq%j%Pq!g%Pq~P#/sO!]'Zi!k'Zi~P!:tO$P#cq!]#cq!^#cq~P#BwO(z$}OP%baR%ba[%baj%bar%ba!S%ba!l%ba!p%ba#R%ba#o%ba#p%ba#q%ba#r%ba#s%ba#t%ba#u%ba#v%ba#w%ba#y%ba#{%ba#|%ba$P%ba(b%ba(s%ba!]%ba!^%ba~On%ba!Q%ba'z%ba({%ba~P&JXO({%POP%daR%da[%daj%dar%da!S%da!l%da!p%da#R%da#o%da#p%da#q%da#r%da#s%da#t%da#u%da#v%da#w%da#y%da#{%da#|%da$P%da(b%da(s%da!]%da!^%da~On%da!Q%da'z%da(z%da~P&L`On>_O!Q*PO'z*QO({%PO~P&JXOn>_O!Q*PO'z*QO(z$}O~P&L`OR0mO!Q0mO!S0nO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#w}a#y}a#{}a#|}a$P}a'z}a(b}a(s}a(z}a({}a!]}a!^}a~O!Q*PO'z*QOP$taR$ta[$taj$tan$tar$ta!S$ta!l$ta!p$ta#R$ta#o$ta#p$ta#q$ta#r$ta#s$ta#t$ta#u$ta#v$ta#w$ta#y$ta#{$ta#|$ta$P$ta(b$ta(s$ta(z$ta({$ta!]$ta!^$ta~O!Q*PO'z*QOP$vaR$va[$vaj$van$var$va!S$va!l$va!p$va#R$va#o$va#p$va#q$va#r$va#s$va#t$va#u$va#v$va#w$va#y$va#{$va#|$va$P$va(b$va(s$va(z$va({$va!]$va!^$va~On>_O!Q*PO'z*QO(z$}O({%PO~OP%UaR%Ua[%Uaj%Uar%Ua!S%Ua!l%Ua!p%Ua#R%Ua#o%Ua#p%Ua#q%Ua#r%Ua#s%Ua#t%Ua#u%Ua#v%Ua#w%Ua#y%Ua#{%Ua#|%Ua$P%Ua(b%Ua(s%Ua!]%Ua!^%Ua~P''eO$P$nq!]$nq!^$nq~P#BwO$P$pq!]$pq!^$pq~P#BwO!^9qO~O$P9rO~P!1WO!g#vO!]'fi!k'fi~O!g#vO(s'qO!]'fi!k'fi~O!]/rO!k)Pq~O!Y'hi!]'hi~P#/sO!]/{O!Y)Qq~Or9yO!g#vO(s'qO~O[9{O!Y9zO~P#/sO!Y9zO~Oj:RO!g#vO~Og(`y!](`y~P!1WO!]'oa!_'oa~P#/sOa%]q!_%]q'{%]q!]%]q~P#/sO[:WO~O!]1VO!^)Yq~O`:[O~O#`:]O!]'qa!^'qa~O!]5wO!^)Vi~P#BwO!S:_O~O!_1qO%j:bO~O(WTO(ZUO(f:gO~O!]1|O!^)Wq~O!k:jO~O!k:kO~O!k:lO~O!k:lO~P%[O#`:oO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%j:tO~P&8tO!_'aO%j:tO~O$P#}y!]#}y!^#}y~P#BwOP$}iR$}i[$}ij$}ir$}i!S$}i!l$}i!p$}i#R$}i#o$}i#p$}i#q$}i#r$}i#s$}i#t$}i#u$}i#v$}i#w$}i#y$}i#{$}i#|$}i$P$}i(b$}i(s$}i!]$}i!^$}i~P''eO!Q*PO'z*QO({%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#w'ja#y'ja#{'ja#|'ja$P'ja(b'ja(s'ja(z'ja!]'ja!^'ja~O!Q*PO'z*QOP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#w'la#y'la#{'la#|'la$P'la(b'la(s'la(z'la({'la!]'la!^'la~O(z$}OP%biR%bi[%bij%bin%bir%bi!Q%bi!S%bi!l%bi!p%bi#R%bi#o%bi#p%bi#q%bi#r%bi#s%bi#t%bi#u%bi#v%bi#w%bi#y%bi#{%bi#|%bi$P%bi'z%bi(b%bi(s%bi({%bi!]%bi!^%bi~O({%POP%diR%di[%dij%din%dir%di!Q%di!S%di!l%di!p%di#R%di#o%di#p%di#q%di#r%di#s%di#t%di#u%di#v%di#w%di#y%di#{%di#|%di$P%di'z%di(b%di(s%di(z%di!]%di!^%di~O$P$py!]$py!^$py~P#BwO$P#cy!]#cy!^#cy~P#BwO!g#vO!]'fq!k'fq~O!]/rO!k)Py~O!Y'hq!]'hq~P#/sOr;OO!g#vO(s'qO~O[;SO!Y;RO~P#/sO!Y;RO~Og(`!R!](`!R~P!1WOa%]y!_%]y'{%]y!]%]y~P#/sO!]1VO!^)Yy~O!]5wO!^)Vq~O(U;ZO~O!_1qO%j;^O~O!k;aO~O%j;fO~P&8tOP$}qR$}q[$}qj$}qr$}q!S$}q!l$}q!p$}q#R$}q#o$}q#p$}q#q$}q#r$}q#s$}q#t$}q#u$}q#v$}q#w$}q#y$}q#{$}q#|$}q$P$}q(b$}q(s$}q!]$}q!^$}q~P''eO!Q*PO'z*QO({%POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#w'ka#y'ka#{'ka#|'ka$P'ka(b'ka(s'ka(z'ka!]'ka!^'ka~O!Q*PO'z*QOP'maR'ma['maj'man'mar'ma!S'ma!l'ma!p'ma#R'ma#o'ma#p'ma#q'ma#r'ma#s'ma#t'ma#u'ma#v'ma#w'ma#y'ma#{'ma#|'ma$P'ma(b'ma(s'ma(z'ma({'ma!]'ma!^'ma~OP%PqR%Pq[%Pqj%Pqr%Pq!S%Pq!l%Pq!p%Pq#R%Pq#o%Pq#p%Pq#q%Pq#r%Pq#s%Pq#t%Pq#u%Pq#v%Pq#w%Pq#y%Pq#{%Pq#|%Pq$P%Pq(b%Pq(s%Pq!]%Pq!^%Pq~P''eOg%f!Z!]%f!Z#`%f!Z$P%f!Z~P!1WO!Y;jO~P#/sOr;kO!g#vO(s'qO~O[;mO!Y;jO~P#/sO!]'qq!^'qq~P#BwO!]#h!Z!^#h!Z~P#BwO#l%f!ZP%f!ZR%f!Z[%f!Za%f!Zj%f!Zr%f!Z!S%f!Z!]%f!Z!l%f!Z!p%f!Z#R%f!Z#o%f!Z#p%f!Z#q%f!Z#r%f!Z#s%f!Z#t%f!Z#u%f!Z#v%f!Z#w%f!Z#y%f!Z#{%f!Z#|%f!Z'{%f!Z(b%f!Z(s%f!Z!k%f!Z!Y%f!Z'x%f!Z#`%f!Zv%f!Z!_%f!Z%j%f!Z!g%f!Z~P#/sOr;vO!g#vO(s'qO~O!Y;wO~P#/sOrSOe!iOpkOrQO(U)^O(WTO(ZUO(bVO(p[O~O!]XO!l$xO#k<|O$X%`O$uf!>nPPP!>tIZPPPPPPPPP!BTP!CbPPIZ!DsPIZPIZIZIZIZIZPIZ!FVP!IaP!LgP!Lk!Lu!Ly!LyP!I^P!L}!L}P#!TP#!XIZPIZ#!_#%dCiA]PA]PA]A]P#&qA]A]#)TA]#+{A]#.XA]A]#.w#1]#1]#1b#1k#1]#1vPP#1]PA]#2`A]#6_A]A]6lPPP#:dPPP#:}#:}P#:}P#;e#:}PP#;kP#;bP#;b#O#>U#>[#>b#>p#>v#?Q#?W#?b#?h#?x#@O#@p#AS#AY#A`#An#BT#Cx#DW#D_#Ey#FX#Gy#HX#H_#He#Hk#Hu#H{#IR#I]#Io#IuPPPPPPPPPPP#I{PPPPPPP#Jp#M}$ g$ n$ vPPP$'bP$'k$*d$0}$1Q$1T$2S$2V$2^$2fP$2l$2oP$3]$3a$4X$5g$5l$6SPP$6X$6_$6c$6f$6j$6n$7j$8R$8j$8n$8q$8t$9O$9R$9V$9ZR!|RoqOXst!Z#d%m&r&t&u&w,u,z2^2aY!vQ'a-g1q5}Q%tvQ%|yQ&T|Q&j!VS'W!e-^Q'g!iS'm!r!yU*l$|*[*pQ+q%}S,O&V&WQ,f&dQ-e'`Q-o'hQ-w'nQ0^*rQ1d,QQ1{,gR<}<[%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'c's(U(W(^(e(y({)P*O*j+Y+_,r,u,z-k-s.R.X.v.}/p0_0n0t1U1t2U2V2X2Z2^2a2c3S3Y3n4|6V6g6h6k7O8v9V9aS#q]TU+Q%]T!S!nQ!r!v!y!z$|'W'`'a'm'n'o*l*p*r*s-^-e-g-w0^0a1q5}6P%[$ti#v$b$c$d$x${%O%Q%^%_%c)z*S*U*W*Z*b*h*x*y+h+k,U,X.h/R/f/o/z/{/}0b0d0k0l0q1h1k1s3e4`4a4l4q5S5^5a6U7Y7x8S8X8^8s9d9r9{:R:b:t;S;^;f;mQ>Y>Z>^>_Q&X|S'U!e*[S']%i-bQ+v&PQ,R&WQ,h&gQ0p+TQ1[+wQ1a+}Q2S,lQ2T,mQ5h1VQ5q1cQ6^1|Q6a2OQ6b2RQ8b5iQ8e5nQ9O6dQ:Z8fQ:h8{R;X:[rnOXst!V!Z#d%m&i&r&t&u&w,u,z2^2aR,j&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'c's(W(^(e(y({)P)t*O*j+Y+_+i,r,u,z-Y-a-k-s.R.X.i.v.}/X/p0_0n0t1U1t2U2V2X2Z2^2a2c2q3S3Y3f3n4V4|5y6V6g6h6k6u7O7^8v9V9a:]:oS>T[#]WZ#W#Z'X(U!b%jm#h#i#l$x%e%h(_(i(j(k*Z*_*c+[+^+`,q-W.V.].^._.a/o/r2f3^3_4c6t7VQ%wxQ%{yW&Q|&V&W,QQ&_!TQ'd!hQ'f!iQ(r#sS+p%|%}Q+t&PQ,a&bQ,e&dS-n'g'hQ.k(sQ1T+qQ1Z+wQ1]+xQ1`+|Q1v,bS1z,f,gQ3O-oQ5g1VQ5k1YQ5p1bQ6]1{Q8a5iQ8d5mQ8h5rQ:V8`R;V:W!U$zi$d%O%Q%^%_%c*S*U*b*x*y/R/z0b0d0k0l0q4a5S8X9r>Q>Y>Z!^%yy!i!u%{%|%}'V'f'g'h'l'v*k+p+q-Z-n-o-v0T0W1T2w3O3V4t4u4x8P9}Q+j%wQ,V&[Q,Y&]Q,d&dQ.j(rQ1u,aU1y,e,f,gQ3g.kQ6W1vS6[1z1{Q8z6]#f>U#v$b$c$x${)z*W*Z*h+h+k,U,X.h/f/o/{/}1h1k1s3e4`4l4q5^5a6U7Y7x8S8^8s9d9{:R:b:t;S;^;f;m^>_o>VQS&[!Q&iQ&]!RQ&^!SU+O%[%d=tR,T&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)z*S*U*W*Z*b*h*x*y+h+k,U,X.h/R/f/o/z/{/}0b0d0k0l0q1h1k1s3e4`4a4l4q5S5^5a6U7Y7x8S8X8^8s9d9r9{:R:b:t;S;^;f;mQ>Y>Z>^>_T){$u)|V+Q%]T$i$^c#Y#e%q%s%u(T(Z(u(z)S)T)U)V)W)X)Y)Z)[)])_)a)c)h)r+f+z-[-z.P.U.W.u.x.|/O/P/Q/d0r2o2t3Q3X3m3r3s3t3u3v3w3x3y3z3{3|3}4O4R4S4Z5Z5e6w6}7S7c7d7m7n8m9Z9_9i9o9p:q;Y;bTQ'Y!eR2r-^!W!nQ!e!r!v!y!z$|'W'`'a'm'n'o*[*l*p*r*s-^-e-g-w0^0a1q5}6PR1n,]nqOXst!Z#d%m&r&t&u&w,u,z2^2aQ&y!^Q'w!xS(t#u<`Q+n%zQ,_&_Q,`&aQ-l'eQ-y'pS.t(y=QS0s+Y=[Q1R+oQ1p,^Q2e,|Q2g,}Q2n-XQ2|-mQ3P-qS5[0t=fQ5c1SS5f1U=gQ6v2pQ6z2}Q7P3UQ8_5dQ9[6xQ9]6{Q9`7QR:n9X$d$]c#Y#e%s%u(T(Z(u(z)S)T)U)V)W)X)Y)Z)[)])_)a)c)h)r+f+z-[-z.P.U.W.u.x.|/P/Q/d0r2o2t3Q3X3m3r3s3t3u3v3w3x3y3z3{3|3}4O4R4S4Z5Z5e6w6}7S7c7d7m7n8m9Z9_9i9o9p:q;Y;bTS#q]TU$fd)`,oS(q#p'jU*w%R(x4QU0o+P.p7iQ5`0zQ7X3bQ9f7[R:u9gm!tQ!r!v!y!z'a'm'n'o-g-w1q5}6PQ'u!uS(g#g2WS-u'l'xQ/u*^Q0T*kQ3W-xQ4h/vQ4t0VQ4u0WQ4z0`Q7t4bS8P4v4xS8T4{4}Q9t7uQ9x7{Q9}8QQ:S8VS:}9y9zS;i;O;RS;u;j;kS;};v;wSTR=p>S%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'c's(U(W(^(e(y({)P*O*j+Y+_+i,r,u,z-k-s.R.X.i.v.}/p0_0n0t1U1t2U2V2X2Z2^2a2c3S3Y3f3n4|6V6g6h6k7O7^8v9V9aQ%fj!^%xy!i!u%{%|%}'V'f'g'h'l'v*k+p+q-Z-n-o-v0T0W1T2w3O3V4t4u4x8P9}S&Oz!jQ+m%yQ,c&dW1x,d,e,f,gU6Z1y1z1{S8y6[6]Q:f8z!r=k$Z$n'X)t-Y-a/X2q4V5y6u:]:oTQ=u>RR=v>S%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'c's(W(^(e(y({)P*O*j+Y+_+i,r,u,z-k-s.R.X.i.v.}/p0_0n0t1U1t2U2V2X2Z2^2a2c3S3Y3f3n4|6V6g6h6k7O7^8v9V9aY#bWZ#W#Z(U!b%jm#h#i#l$x%e%h(_(i(j(k*Z*_*c+[+^+`,q-W.V.].^._.a/o/r2f3^3_4c6t7VQ,p&o!p=l$Z$n)t-Y-a/X2q4V5y6u:]:oTR=o'XU'^!e%i*[R2u-bX'[!e%i*[-b%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'c's(U(W(^(e(y({)P*O*j+Y+_,r,u,z-k-s.R.X.v.}/p0_0n0t1U1t2U2V2X2Z2^2a2c3S3Y3n4|6V6g6h6k7O8v9V9a!r)`$Z$n'X)t-Y-a/X2q4V5y6u:]:oTQ,o&oQ0z+iQ3b.iQ7[3fR9g7^!b$Tc#Y%q(T(Z(u(z)[)])a)h+z-z.P.U.W.u.x/d0r3Q3X3m3}5Z5e6}7S7c9_:qT)_)r-[/O2o2t3r4R4Z6w7d7m7n8m9Z9i9o9p;Y;b=wQ>Y>[R>Z>]'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'c's(U(W(^(e(y({)P)t*O*j+Y+_+i,r,u,z-Y-a-k-s.R.X.i.v.}/X/p0_0n0t1U1t2U2V2X2Z2^2a2c2q3S3Y3f3n4V4|5y6V6g6h6k6u7O7^8v9V9a:]:oTS$oh$pR4W/W'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'c's(U(W(^(e(y({)P)t*O*j+Y+_+i,r,u,z-Y-a-k-s.R.X.i.v.}/W/X/p0_0n0t1U1t2U2V2X2Z2^2a2c2q3S3Y3f3n4V4|5y6V6g6h6k6u7O7^8v9V9a:]:oTT$kf$qQ$ifS)k$l)oR)w$qT$jf$qT)m$l)o'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'c's(U(W(^(e(y({)P)t*O*j+Y+_+i,r,u,z-Y-a-k-s.R.X.i.v.}/W/X/p0_0n0t1U1t2U2V2X2Z2^2a2c2q3S3Y3f3n4V4|5y6V6g6h6k6u7O7^8v9V9a:]:oTT$oh$pQ$rhR)v$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'c's(U(W(^(e(y({)P*O*j+Y+_+i,r,u,z-k-s.R.X.i.v.}/p0_0n0t1U1t2U2V2X2Z2^2a2c3S3Y3f3n4|6V6g6h6k7O7^8v9V9a!s>R$Z$n'X)t-Y-a/X2q4V5y6u:]:oT#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'c)P)t*j+_+i,r,u,z-k.i/X/p0_0n1t2U2V2X2Z2^2a2c3f4V4|6V6g6h6k7^8v9V!U%Ri$d%O%Q%^%_%c*S*U*b*x*y/R/z0b0d0k0l0q4a5S8X9r>Q>Y>Z#f(x#v$b$c$x${)z*W*Z*h+h+k,U,X.h/f/o/{/}1h1k1s3e4`4l4q5^5a6U7Y7x8S8^8s9d9{:R:b:t;S;^;f;m^>_Q+U%aQ/e*Po4QQ>Y>ZQ*d$zU*m$|*[*pQ+V%bQ0Y*n#f=r#v$b$c$x${)z*W*Z*h+h+k,U,X.h/f/o/{/}1h1k1s3e4`4l4q5^5a6U7Y7x8S8^8s9d9{:R:b:t;S;^;f;m^>_n=sUQ=y>VQ=z>WR={>X!U%Ri$d%O%Q%^%_%c*S*U*b*x*y/R/z0b0d0k0l0q4a5S8X9r>Q>Y>Z#f(x#v$b$c$x${)z*W*Z*h+h+k,U,X.h/f/o/{/}1h1k1s3e4`4l4q5^5a6U7Y7x8S8^8s9d9{:R:b:t;S;^;f;m^>_o4QQ>Y>Z>^>_Q,W&]Q1j,YQ5u1iR8j5vV*o$|*[*pU*o$|*[*pT5|1q5}S0R*j/pQ4y0_T8U4|:_Q+l%xQ0X*mQ1Q+mQ1w,cQ6Y1xQ8x6ZQ:e8yR;`:f!U%Oi$d%O%Q%^%_%c*S*U*b*x*y/R/z0b0d0k0l0q4a5S8X9r>Q>Y>Zx*S$v)f*T*v+W/x0f0g4T4i5T5U5Y7r8W:T:z=q>O>PS0b*u0c#f^>_n[>]`=U4P7e7h7l9j:v:y;{S=`.n3kT=a7g9m!U%Qi$d%O%Q%^%_%c*S*U*b*x*y/R/z0b0d0k0l0q4a5S8X9r>Q>Y>Z|*U$v)f*V*u+W/i/x0f0g4T4i5O5T5U5Y7r8W:T:z=q>O>PS0d*v0e#f^>_n[>]d=W4P7f7g7l9j9k:v:w:y;{S=b.o3lT=c7h9nrnOXst!V!Z#d%m&i&r&t&u&w,u,z2^2aQ&f!UR,r&ornOXst!V!Z#d%m&i&r&t&u&w,u,z2^2aR&f!UQ,[&^R1f,TsnOXst!V!Z#d%m&i&r&t&u&w,u,z2^2aQ1r,aS6T1u1vU8r6R6S6WS:a8t8uS;[:`:cQ;o;]R;y;pQ&m!VR,k&iR6a2OR:h8{W&Q|&V&W,QR1]+xQ&r!WR,u&sR,{&xT2_,z2aR-P&yQ-O&yR2h-PQ'z!{R-{'zSsOtQ#dXT%ps#dQ#OTR'|#OQ#RUR(O#RQ)|$uR/b)|Q#UVR(R#UQ#XWU(X#X(Y.SQ(Y#YR.S(ZQ-_'YR2s-_Q.w(zS3o.w3pR3p.xQ-g'aR2x-gY!rQ'a-g1q5}R'k!rQ/S)fR4U/SU#_W%h*ZU(`#_(a.TQ(a#`R.T([Q-c'^R2v-ct`OXst!V!Z#d%m&i&k&r&t&u&w,u,z2^2aS#hZ%eU#r`#h.^R.^(kQ(l#jQ.Z(hW.c(l.Z3Z7TQ3Z.[R7T3[Q)o$lR/Y)oQ$phR)u$pQ$`cU)b$`.OO>P>[>]Q/|*fU4m/|4o7zQ4o0OR7z4nS*p$|*[R0[*px*T$v)f*u*v+W/x0f0g4T4i5T5U5Y7r8W:T:z=q>O>P!d.l(v)d*]*f.n.o.s/a/m0O0x1g3j4^4j4n5t7_7b7y7|8Z8]9v:O:U;P;T;g;l;x>[>]U/j*T.l7ea7e4P7g7h7l9j:v:y;{Q0c*uQ3k.nU5P0c3k9mR9m7g|*V$v)f*u*v+W/i/x0f0g4T4i5O5T5U5Y7r8W:T:z=q>O>P!h.m(v)d*]*f.n.o.s/a/m0O0x1g3h3j4^4j4n5t7_7`7b7y7|8Z8]9v:O:U;P;T;g;l;x>[>]U/l*V.m7fe7f4P7g7h7l9j9k:v:w:y;{Q0e*vQ3l.oU5R0e3l9nR9n7hQ*{%UR0i*{Q5_0xR8[5_Q+a%kR0w+aQ5x1lS8l5x:^R:^8mQ,^&_R1o,^Q5}1qR8o5}Q1},hS6_1}8|R8|6aQ1W+tW5j1W5l8c:XQ5l1ZQ8c5kR:X8dQ+y&QR1^+yQ2a,zR6o2aYrOXst#dQ&v!ZQ+c%mQ,t&rQ,v&tQ,w&uQ,y&wQ2[,uS2_,z2aR6n2^Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'r!uQ+b%lQ+n%zQ,S&XQ,j&mQ-R&|W-r'l't'u'xQ-y'pQ0Z*oQ1R+oQ1e,RS2Q,k,nQ2i-QQ2j-TQ2k-UQ3P-qW3R-t-u-x-zQ5c1SQ5o1aQ5s1gQ6X1wQ6c2SQ6m2]U6|3Q3T3WQ7P3UQ8_5dQ8g5qQ8i5tQ8n5|Q8w6YQ8}6bS9^6}7RQ9`7QQ:Y8eQ:d8xQ:i9OQ:p9_Q;W:ZQ;_:eQ;c:qQ;n;XR;q;`Q%zyQ'e!iQ'p!uU+o%{%|%}Q-X'VU-m'f'g'hS-q'l'vQ0S*kS1S+p+qQ2p-ZS2}-n-oQ3U-vS4r0T0WQ5d1TQ6x2wQ6{3OQ7Q3VU7}4t4u4xQ9|8PR;Q9}S$wi>QR*|%VU%Ui%V>QR0h*zQ$viS(v#v+kS)d$b$cQ)f$dQ*]$xS*f${*ZQ*u%OQ*v%QQ+R%^Q+S%_Q+W%cQ.nQQ>O>YQ>P>ZQ>[>^R>]>_Q+P%]Q.pTR#[WR'Z!el!tQ!r!v!y!z'a'm'n'o-g-w1q5}6PS'V!e-^U*k$|*[*pS-Z'W'`S0W*l*rQ0`*sQ2w-eQ4x0^R4}0aR(|#xQ!fQT-f'a-g]!qQ!r'a-g1q5}Q#p]R'j < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty VariableDefinition Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:381,context:M1,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,208,212,216,217,219,222,225,235,238,244,246,248,250,253,259,265,267,269,271,273,275,276,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,121,122,137,140,142,143,144,145,146,148,149,168,170,172,"Expression",-23,31,33,37,41,43,45,174,176,178,179,181,182,183,185,186,187,189,190,191,202,204,206,207,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",161,"JSXStartCloseTag"],["closedBy",-2,24,169,">",40,"InterpolationEnd",50,"]",61,"}",74,")",166,"JSXEndTag"]],propSources:[q1],skippedNodes:[0,5,6,279],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$j&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$j&j([!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU([!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$j&j(XpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(XpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Xp([!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$j&j(Xp([!b'}0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(Y#S$j&j(O0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$j&j(Xp([!b(O0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$j&j!p),Q(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#w(Ch$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#w(Ch$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(W':f$j&j([!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$j&j([!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$j&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$e`$j&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$e``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$e`$j&j([!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ([!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$e`([!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$j&j(Xp([!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$j&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS([!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$j&j(XpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(XpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Xp([!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$j&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$j&j([!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ([!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse([!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX([!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$j&j([!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$j&j(Xp([!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$j&j(Xp([!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$j&j(Xp([!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$j&j(Xp([!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$j&j$P)Lv(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-v$?V_!^(CdvBr$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$j&j(Xp([!b'}0/l$^#t(U,2j(f$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$j&j(Xp([!b(O0/l$^#t(U,2j(f$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Y1,_1,E1,z1,2,3,4,5,6,7,8,9,10,11,12,13,14,L1,new ir("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(d~~",141,341),new ir("j~RQYZXz{^~^O(R~~aP!P!Qd~iO(S~~",25,324)],topRules:{Script:[0,7],SingleExpression:[1,277],SingleClassItem:[2,278]},dialects:{jsx:0,ts:15179},dynamicPrecedences:{80:1,82:1,94:1,170:1,200:1},specialized:[{term:328,get:n=>W1[n]||-1},{term:344,get:n=>B1[n]||-1},{term:95,get:n=>V1[n]||-1}],tokenPrec:15205}),Ic=[ye("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),ye("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),ye("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),ye("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),ye("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),ye(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),ye("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),ye(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),ye(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),ye('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),ye('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],I1=Ic.concat([ye("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),ye("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),ye("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Ma=new mf,Uc=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function ki(n){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,n),!0}}const U1=["FunctionDeclaration"],G1={FunctionDeclaration:ki("function"),ClassDeclaration:ki("class"),ClassExpression:()=>!0,EnumDeclaration:ki("constant"),TypeAliasDeclaration:ki("type"),NamespaceDeclaration:ki("namespace"),VariableDefinition(n,e){n.matchContext(U1)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function Gc(n,e){let t=Ma.get(e);if(t)return t;let i=[],r=!0;function s(l,o){let a=n.sliceString(l.from,l.to);i.push({label:a,type:o})}return e.cursor(z.IncludeAnonymous).iterate(l=>{if(r)r=!1;else if(l.name){let o=G1[l.name];if(o&&o(l,s)||Uc.has(l.name))return!1}else if(l.to-l.from>8192){for(let o of Gc(n,l.node))i.push(o);return!1}}),Ma.set(e,i),i}const La=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Nc=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function N1(n){let e=re(n.state).resolveInner(n.pos,-1);if(Nc.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&La.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let i=[];for(let r=e;r;r=r.parent)Uc.has(r.name)&&(i=i.concat(Gc(n.state.doc,r)));return{options:i,from:t?e.from:n.pos,validFor:La}}const nt=ni.define({name:"javascript",parser:D1.configure({props:[rn.add({IfStatement:An({except:/^\s*({|else\b)/}),TryStatement:An({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:xp,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:i?1:2)*n.unit},Block:$p({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":An({except:/^\s*{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),sn.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Pf,BlockComment(n){return{from:n.from+2,to:n.to-2}},JSXElement(n){let e=n.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=n.lastChild;return{from:e.to,to:t.type.isError?n.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(n){var e;let t=(e=n.firstChild)===null||e===void 0?void 0:e.nextSibling,i=n.lastChild;return!t||t.type.isError?null:{from:t.to,to:i.type.isError?n.to:i.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Fc={test:n=>/^JSX/.test(n.name),facet:pl({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Hc=nt.configure({dialect:"ts"},"typescript"),Kc=nt.configure({dialect:"jsx",props:[gl.add(n=>n.isTop?[Fc]:void 0)]}),Jc=nt.configure({dialect:"jsx ts",props:[gl.add(n=>n.isTop?[Fc]:void 0)]},"typescript");let eu=n=>({label:n,type:"keyword"});const tu="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(eu),F1=tu.concat(["declare","implements","private","protected","public"].map(eu));function H1(n={}){let e=n.jsx?n.typescript?Jc:Kc:n.typescript?Hc:nt,t=n.typescript?I1.concat(F1):Ic.concat(tu);return new Di(e,[nt.data.of({autocomplete:Jg(Nc,Kg(t))}),nt.data.of({autocomplete:N1}),n.jsx?eS:[]])}function K1(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function Ya(n,e,t=n.length){for(let i=e?.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return n.sliceString(i.from,Math.min(i.to,t));return""}const J1=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),eS=A.inputHandler.of((n,e,t,i,r)=>{if((J1?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||i!=">"&&i!="/"||!nt.isActiveAt(n.state,e,-1))return!1;let s=r(),{state:l}=s,o=l.changeByRange(a=>{var h;let{head:f}=a,c=re(l).resolveInner(f-1,-1),u;if(c.name=="JSXStartTag"&&(c=c.parent),!(l.doc.sliceString(f-1,f)!=i||c.name=="JSXAttributeValue"&&c.to>f)){if(i==">"&&c.name=="JSXFragmentTag")return{range:a,changes:{from:f,insert:""}};if(i=="/"&&c.name=="JSXStartCloseTag"){let O=c.parent,d=O.parent;if(d&&O.from==f-2&&((u=Ya(l.doc,d.firstChild,f))||((h=d.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let p=`${u}>`;return{range:Q.cursor(f+p.length,-1),changes:{from:f,insert:p}}}}else if(i==">"){let O=K1(c);if(O&&O.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(l.doc.sliceString(f,f+2))&&(u=Ya(l.doc,O,f)))return{range:a,changes:{from:f,insert:``}}}}return{range:a}});return o.changes.empty?!1:(n.dispatch([s,l.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),$i=["_blank","_self","_top","_parent"],Ur=["ascii","utf-8","utf-16","latin1","latin1"],Gr=["get","post","put","delete"],Nr=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Ze=["true","false"],C={},tS={a:{attrs:{href:null,ping:null,type:null,media:null,target:$i,hreflang:null}},abbr:C,address:C,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:C,aside:C,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:C,base:{attrs:{href:null,target:$i}},bdi:C,bdo:C,blockquote:{attrs:{cite:null}},body:C,br:C,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Nr,formmethod:Gr,formnovalidate:["novalidate"],formtarget:$i,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:C,center:C,cite:C,code:C,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:C,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:C,div:C,dl:C,dt:C,em:C,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:C,figure:C,footer:C,form:{attrs:{action:null,name:null,"accept-charset":Ur,autocomplete:["on","off"],enctype:Nr,method:Gr,novalidate:["novalidate"],target:$i}},h1:C,h2:C,h3:C,h4:C,h5:C,h6:C,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:C,hgroup:C,hr:C,html:{attrs:{manifest:null}},i:C,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Nr,formmethod:Gr,formnovalidate:["novalidate"],formtarget:$i,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:C,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:C,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:C,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Ur,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:C,noscript:C,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:C,param:{attrs:{name:null,value:null}},pre:C,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:C,rt:C,ruby:C,samp:C,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Ur}},section:C,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:C,source:{attrs:{src:null,type:null,media:null}},span:C,strong:C,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:C,summary:C,sup:C,table:C,tbody:C,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:C,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:C,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:C,time:{attrs:{datetime:null}},title:C,tr:C,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:C,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:C},iu={accesskey:null,class:null,contenteditable:Ze,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Ze,autocorrect:Ze,autocapitalize:Ze,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Ze,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Ze,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Ze,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Ze,"aria-hidden":Ze,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Ze,"aria-multiselectable":Ze,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Ze,"aria-relevant":null,"aria-required":Ze,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},nu="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of nu)iu[n]=null;class Fi{constructor(e,t){this.tags={...tS,...e},this.globalAttrs={...iu,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Fi.default=new Fi;function Yt(n,e,t=n.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?n.sliceString(r.from,Math.min(r.to,t)):""}function ai(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function ru(n,e,t){let i=t.tags[Yt(n,ai(e))];return i?.children||t.allTags}function Rl(n,e){let t=[];for(let i=ai(e);i&&!i.type.isTop;i=ai(i.parent)){let r=Yt(n,i);if(r&&i.lastChild.name=="CloseTag")break;r&&t.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&t.push(r)}return t}const su=/^[:\-\.\w\u00b7-\uffff]*$/;function _a(n,e,t,i,r){let s=/\s*>/.test(n.sliceDoc(r,r+5))?"":">",l=ai(t,t.name=="StartTag"||t.name=="TagName");return{from:i,to:r,options:ru(n.doc,l,e).map(o=>({label:o,type:"type"})).concat(Rl(n.doc,t).map((o,a)=>({label:"/"+o,apply:"/"+o+s,type:"type",boost:99-a}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Ea(n,e,t,i){let r=/\s*>/.test(n.sliceDoc(i,i+5))?"":">";return{from:t,to:i,options:Rl(n.doc,e).map((s,l)=>({label:s,apply:s+r,type:"type",boost:99-l})),validFor:su}}function iS(n,e,t,i){let r=[],s=0;for(let l of ru(n.doc,t,e))r.push({label:"<"+l,type:"type"});for(let l of Rl(n.doc,t))r.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function nS(n,e,t,i,r){let s=ai(t),l=s?e.tags[Yt(n.doc,s)]:null,o=l&&l.attrs?Object.keys(l.attrs):[],a=l&&l.globalAttrs===!1?o:o.length?o.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:a.map(h=>({label:h,type:"property"})),validFor:su}}function rS(n,e,t,i,r){var s;let l=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),o=[],a;if(l){let h=n.sliceDoc(l.from,l.to),f=e.globalAttrs[h];if(!f){let c=ai(t),u=c?e.tags[Yt(n.doc,c)]:null;f=u?.attrs&&u.attrs[h]}if(f){let c=n.sliceDoc(i,r).toLowerCase(),u='"',O='"';/^['"]/.test(c)?(a=c[0]=='"'?/^[^"]*$/:/^[^']*$/,u="",O=n.sliceDoc(r,r+1)==c[0]?"":c[0],c=c.slice(1),i++):a=/^[^\s<>='"]*$/;for(let d of f)o.push({label:d,apply:u+d+O,type:"constant"})}}return{from:i,to:r,options:o,validFor:a}}function lu(n,e){let{state:t,pos:i}=e,r=re(t).resolveInner(i,-1),s=r.resolve(i);for(let l=i,o;s==r&&(o=r.childBefore(l));){let a=o.lastChild;if(!a||!a.type.isError||a.fromlu(i,r)}const oS=nt.parser.configure({top:"SingleExpression"}),ou=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:Hc.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:Kc.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:Jc.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:oS},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:nt.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:rr.parser}],au=[{name:"style",parser:rr.parser.configure({top:"Styles"})}].concat(nu.map(n=>({name:n,parser:nt.parser}))),hu=ni.define({name:"html",parser:T0.configure({props:[rn.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].lengthn.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Mn=hu.configure({wrap:Ec(ou,au)});function aS(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=Ec((n.nestedLanguages||[]).concat(ou),(n.nestedAttributes||[]).concat(au)));let i=t?hu.configure({wrap:t,dialect:e}):e?Mn.configure({dialect:e}):Mn;return new Di(i,[Mn.data.of({autocomplete:lS(n)}),n.autoCloseTags!==!1?fS:[],H1().support,d1().support])}const za=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));function hS(n,e,t){for(var i;;){if(((i=e.lastChild)===null||i===void 0?void 0:i.name)!="CloseTag")return!1;let r=e.parent;if(!r||Yt(n,r)!=t)return!0;e=r}}const fS=A.inputHandler.of((n,e,t,i,r)=>{if(n.composing||n.state.readOnly||e!=t||i!=">"&&i!="/"||!Mn.isActiveAt(n.state,e,-1))return!1;let s=r(),{state:l}=s,o=l.changeByRange(a=>{var h;let f=l.doc.sliceString(a.from-1,a.to)==i,{head:c}=a,u=re(l).resolveInner(c,-1),O;if(f&&i==">"&&u.name=="EndTag"){let d=u.parent;if((O=Yt(l.doc,d.parent,c))&&!za.has(O)&&!hS(l.doc,d.parent,O)){let p=c+(l.doc.sliceString(c,c+1)===">"?1:0),m=``;return{range:a,changes:{from:c,to:p,insert:m}}}}else if(f&&i=="/"&&u.name=="IncompleteCloseTag"){let d=u.parent;if(u.from==c-2&&((h=d.lastChild)===null||h===void 0?void 0:h.name)!="CloseTag"&&(O=Yt(l.doc,d,c))&&!za.has(O)){let p=c+(l.doc.sliceString(c,c+1)===">"?1:0),m=`${O}>`;return{range:Q.cursor(c+m.length,-1),changes:{from:c,to:p,insert:m}}}}return{range:a}});return o.changes.empty?!1:(n.dispatch([s,l.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),fu=pl({commentTokens:{block:{open:""}}}),cu=new L,uu=wm.configure({props:[sn.add(n=>!n.is("Block")||n.is("Document")||Fs(n)!=null||cS(n)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),cu.add(Fs),rn.add({Document:()=>null}),Rt.add({Document:fu})]});function Fs(n){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(n.name);return e?+e[1]:void 0}function cS(n){return n.name=="OrderedList"||n.name=="BulletList"}function uS(n,e){let t=n;for(;;){let i=t.nextSibling,r;if(!i||(r=Fs(i.type))!=null&&r<=e)break;t=i}return t.to}const OS=yp.of((n,e,t)=>{for(let i=re(n).resolveInner(t,-1);i&&!(i.fromt)return{from:t,to:s}}return null});function jl(n){return new Ye(fu,n,[],"markdown")}const dS=jl(uu),pS=uu.configure([Lm,_m,Ym,Em,{props:[sn.add({Table:(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}]),Hi=jl(pS);function gS(n,e){return t=>{if(t&&n){let i=null;if(t=/\S*/.exec(t)[0],typeof n=="function"?i=n(t):i=Gn.matchLanguageName(n,t,!0),i instanceof Gn)return i.support?i.support.language.parser:Vi.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}class Fr{constructor(e,t,i,r,s,l,o){this.node=e,this.from=t,this.to=i,this.spaceBefore=r,this.spaceAfter=s,this.type=l,this.item=o}blank(e,t=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length0;r--)i+=" ";return i+(t?this.spaceAfter:"")}}marker(e,t){let i=this.node.name=="OrderedList"?String(+du(this.item,e)[2]+t):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function Ou(n,e){let t=[],i=[];for(let r=n;r;r=r.parent){if(r.name=="FencedCode")return i;(r.name=="ListItem"||r.name=="Blockquote")&&t.push(r)}for(let r=t.length-1;r>=0;r--){let s=t[r],l,o=e.lineAt(s.from),a=s.from-o.from;if(s.name=="Blockquote"&&(l=/^ *>( ?)/.exec(o.text.slice(a))))i.push(new Fr(s,a,a+l[0].length,"",l[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(l=/^( *)\d+([.)])( *)/.exec(o.text.slice(a)))){let h=l[3],f=l[0].length;h.length>=4&&(h=h.slice(0,h.length-4),f-=4),i.push(new Fr(s.parent,a,a+f,l[1],h,l[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(l=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(a)))){let h=l[4],f=l[0].length;h.length>4&&(h=h.slice(0,h.length-4),f-=4);let c=l[2];l[3]&&(c+=l[3].replace(/[xX]/," ")),i.push(new Fr(s.parent,a,a+f,l[1],h,c,s))}}return i}function du(n,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(n.from,n.from+10))}function Hr(n,e,t,i=0){for(let r=-1,s=n;;){if(s.name=="ListItem"){let o=du(s,e),a=+o[2];if(r>=0){if(a!=r+1)return;t.push({from:s.from+o[1].length,to:s.from+o[0].length,insert:String(r+2+i)})}r=a}let l=s.nextSibling;if(!l)break;s=l}}function Ml(n,e){let t=/^[ \t]*/.exec(n)[0].length;if(!t||e.facet(nn)!=" ")return n;let i=ut(n,4,t),r="";for(let s=i;s>0;)s>=4?(r+=" ",s-=4):(r+=" ",s--);return r+n.slice(t)}const mS=(n={})=>({state:e,dispatch:t})=>{let i=re(e),{doc:r}=e,s=null,l=e.changeByRange(o=>{if(!o.empty||!Hi.isActiveAt(e,o.from,-1)&&!Hi.isActiveAt(e,o.from,1))return s={range:o};let a=o.from,h=r.lineAt(a),f=Ou(i.resolveInner(a,-1),r);for(;f.length&&f[f.length-1].from>a-h.from;)f.pop();if(!f.length)return s={range:o};let c=f[f.length-1];if(c.to-c.spaceAfter.length>a-h.from)return s={range:o};let u=a>=c.to-c.spaceAfter.length&&!/\S/.test(h.text.slice(c.to));if(c.item&&u){if(c.item.from]*$/.test(h.text.slice(0,c.to)))return s={range:o};let S=c.node.firstChild,$=c.node.getChild("ListItem","ListItem");if(S.to>=a||$&&$.to0&&!/[^\s>]/.test(r.lineAt(h.from-1).text)||n.nonTightLists===!1){let b=f.length>1?f[f.length-2]:null,T,k="";b&&b.item?(T=h.from+b.from,k=b.marker(r,1)):T=h.from+(b?b.to:0);let w=[{from:T,to:a,insert:k}];return c.node.name=="OrderedList"&&Hr(c.item,r,w,-2),b&&b.node.name=="OrderedList"&&Hr(b.item,r,w),{range:Q.cursor(T+k.length),changes:w}}else{let b=Wa(f,e,h);return{range:Q.cursor(a+b.length+1),changes:{from:h.from,insert:b+e.lineBreak}}}}if(c.node.name=="Blockquote"&&u&&h.from){let S=r.lineAt(h.from-1),$=/>\s*$/.exec(S.text);if($&&$.index==c.from){let b=e.changes([{from:S.from+$.index,to:S.to},{from:h.from+c.from,to:h.to}]);return{range:o.map(b),changes:b}}}let O=[];c.node.name=="OrderedList"&&Hr(c.item,r,O);let d=c.item&&c.item.from]*/.exec(h.text)[0].length>=c.to)for(let S=0,$=f.length-1;S<=$;S++)p+=S==$&&!d?f[S].marker(r,1):f[S].blank(S<$?ut(h.text,4,f[S+1].from)-p.length:null);let m=a;for(;m>h.from&&/\s/.test(h.text.charAt(m-h.from-1));)m--;return p=Ml(p,e),QS(c.node,e.doc)&&(p=Wa(f,e,h)+e.lineBreak+p),O.push({from:m,to:a,insert:e.lineBreak+p}),{range:Q.cursor(m+p.length+1),changes:O}});return s?!1:(t(e.update(l,{scrollIntoView:!0,userEvent:"input"})),!0)},SS=mS();function qa(n){return n.name=="QuoteMark"||n.name=="ListMark"}function QS(n,e){if(n.name!="OrderedList"&&n.name!="BulletList")return!1;let t=n.firstChild,i=n.getChild("ListItem","ListItem");if(!i)return!1;let r=e.lineAt(t.to),s=e.lineAt(i.from),l=/^[\s>]*$/.test(r.text);return r.number+(l?0:1){let t=re(n),i=null,r=n.changeByRange(s=>{let l=s.from,{doc:o}=n;if(s.empty&&Hi.isActiveAt(n,s.from)){let a=o.lineAt(l),h=Ou(bS(t,l),o);if(h.length){let f=h[h.length-1],c=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(l-a.from>c&&!/\S/.test(a.text.slice(c,l-a.from)))return{range:Q.cursor(a.from+c),changes:{from:a.from+c,to:l}};if(l-a.from==c&&(f.item&&a.from<=f.item.from||/^[\s>]*$/.test(a.text.slice(0,f.to)))){let u=a.from+f.from;if(f.item&&f.node.from{var t;let{main:i}=e.state.selection;if(i.empty)return!1;let r=(t=n.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r="https://"+r),!Hi.isActiveAt(e.state,i.from,1)))return!1;let s=re(e.state),l=!1;return s.iterate({from:i.from,to:i.to,enter:o=>{(o.from>i.from||PS.test(o.name))&&(l=!0)},leave:o=>{o.toi.to||i.from===i.to&&e===i.from)t+=i.insert.length-(i.to-i.from);else{if(e>=i.from)return i.from+t+(e===i.from?0:i.insert.length);break}return e+t}function Pi(n,e){return n.lastIndexOf(` +`,e-1)+1}function Hs(n,e){const t=n.indexOf(` +`,e);return t===-1?n.length:t}function Ba(n,e,t){let i=0;for(;e-i-1>=0&&n[e-i-1]===t;)i++;return i}function Va(n,e,t){let i=0;for(;e+i=2:n%2===1}function Ia(n,e,t,i){const r=i.length;if(e===t)return{changes:[{from:e,to:t,insert:i+i}],selection:{anchor:e+r,head:e+r}};const s=Math.min(Ba(n,e,"*"),Va(n,t,"*"));if(Da(s,i))return{changes:[{from:e-r,to:e,insert:""},{from:t,to:t+r,insert:""}],selection:{anchor:e-r,head:t-r}};const l=n.slice(e,t),o=Math.min(Va(l,0,"*"),Ba(l,l.length,"*"));return l.length>2*r&&Da(o,i)?{changes:[{from:e,to:e+r,insert:""},{from:t-r,to:t,insert:""}],selection:{anchor:e,head:t-2*r}}:{changes:[{from:e,to:e,insert:i},{from:t,to:t,insert:i}],selection:{anchor:e+r,head:t+r}}}function XS(n,e,t){const i=Pi(n,e),r=/^(#{1,6}) /.exec(n.slice(i,Hs(n,i))),s=r?r[1].length:0,l=s===0||s===1?"## ":s===2?"### ":"",a=[{from:i,to:i+(r?r[0].length:0),insert:l}];return{changes:a,selection:{anchor:sr(a,e),head:sr(a,t)}}}function Ua(n,e,t,i){const r=Pi(n,e),s=t>e&&Pi(n,t)===t?Pi(n,t-1):Pi(n,t),l=[];for(let u=r;l.push(u),!(u>=s);){const O=Hs(n,u);if(O>=n.length)break;u=O+1}const o=l.length>1,a=l.filter(u=>!o||Hs(n,u)>u),h=u=>n.startsWith(i,u),c=a.length>0&&a.every(u=>h(u))?a.map(u=>({from:u,to:u+i.length,insert:""})):a.filter(u=>!h(u)).map(u=>({from:u,to:u,insert:i}));return{changes:c,selection:{anchor:sr(c,e),head:sr(c,t)}}}function ZS(n,e,t){const i=n.slice(e,t);if(!i)return{changes:[{from:e,to:t,insert:"[tekst](https://)"}],selection:{anchor:e+1,head:e+1+5}};const r=`[${i}](https://)`,s=e+i.length+3;return{changes:[{from:e,to:t,insert:r}],selection:{anchor:s,head:s+8}}}const CS=`| Kolumna 1 | Kolumna 2 | +| --- | --- | +| | |`;function TS(n,e,t){const i=n.slice(0,e),r=n.slice(t),s=i===""||i.endsWith(` + +`)?"":i.endsWith(` +`)?` +`:` + +`,l=r===""?` +`:r.startsWith(` + +`)?"":r.startsWith(` +`)?` +`:` + +`,o=e+s.length+2;return{changes:[{from:e,to:t,insert:s+CS+l}],selection:{anchor:o,head:o+9}}}function AS(n,e,t,i){const r=Math.min(t,i),s=Math.max(t,i);switch(n){case"bold":return Ia(e,r,s,"**");case"italic":return Ia(e,r,s,"*");case"heading":return XS(e,r,s);case"list":return Ua(e,r,s,"- ");case"quote":return Ua(e,r,s,"> ");case"link":return ZS(e,r,s);case"table":return TS(e,r,s)}}const RS={key:0,class:"md-drop-overlay","aria-hidden":"true"},qS=gu({__name:"MarkdownEditor",props:{modelValue:{}},emits:["update:modelValue","save","images"],setup(n,{expose:e,emit:t}){const i=n,r=t,s=br(null),l=br(null),o=br(!1);let a=null;const h=ee.define(),f=ee.define(),c=rt.define({create:()=>new Map,update(y,Z){let M=y;if(Z.docChanged&&y.size>0){M=new Map;for(const[I,N]of y){const le=Z.changes.mapPos(N.pos,1,N.line?de.TrackAfter:de.Simple);le!==null&&M.set(I,{...N,pos:le})}}for(const I of Z.effects)I.is(h)?(M===y&&(M=new Map(y)),M.set(I.value.token,I.value.spot)):I.is(f)&&(M===y&&(M=new Map(y)),M.delete(I.value));return M}});let u=0;const O=y=>(y.type||"").toLowerCase().startsWith("image/"),d=y=>!!y&&Array.from(y.types??[]).includes("Files");function p(y){return d(y.dataTransfer)?(y.preventDefault(),y.dataTransfer&&(y.dataTransfer.dropEffect="copy"),o.value=!0,!0):!1}function m(y,Z){o.value=!1;const M=Array.from(y.dataTransfer?.files??[]);if(M.length===0)return!1;y.preventDefault();const I=Z.posAtCoords({x:y.clientX,y:y.clientY})??Z.state.selection.main.head;return r("images",{files:M,pos:I,pasted:!1}),!0}const S=A.domEventHandlers({paste(y,Z){const M=Array.from(y.clipboardData?.files??[]).filter(O);return M.length===0?!1:(y.preventDefault(),r("images",{files:M,pos:Z.state.selection.main.head,pasted:!0}),!0)},dragover:y=>p(y),drop:(y,Z)=>m(y,Z)});function $(y){y.defaultPrevented||p(y)}function b(y){const Z=y.relatedTarget;(!(Z instanceof Node)||!s.value?.contains(Z))&&(o.value=!1)}function T(y){if(y.defaultPrevented||!a){o.value=!1;return}m(y,a)}const k=dr.define([{tag:[g.heading1,g.heading2,g.heading3,g.heading4,g.heading5,g.heading6,g.heading],fontFamily:"var(--display)",fontWeight:"600"},{tag:g.strong,fontWeight:"600"},{tag:g.emphasis,fontStyle:"italic"},{tag:g.strikethrough,textDecoration:"line-through"},{tag:g.monospace,fontFamily:"var(--mono)",fontSize:"14.5px"},{tag:[g.processingInstruction,g.contentSeparator,g.labelName],color:"var(--muted)"},{tag:g.link,color:"var(--ink)"},{tag:g.url,color:"var(--accent)"}]),w=A.theme({"&":{background:"var(--panel)",color:"var(--ink)",borderRadius:"4px"},"&.cm-focused":{outline:"2px solid var(--accent)",outlineOffset:"0"},".cm-scroller":{fontFamily:"var(--body)",fontSize:"17px",lineHeight:"1.55"},".cm-content":{padding:"16px",caretColor:"var(--accent)"},".cm-line":{padding:"0"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"var(--accent)"},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, ::selection":{background:"var(--accent-soft)"},".cm-placeholder":{color:"var(--muted)"}});function P(){return r("save"),!0}function _(y,Z){const M=y.state.selection.main,I=AS(Z,y.state.doc.toString(),M.anchor,M.head);return y.dispatch({changes:I.changes,selection:I.selection,scrollIntoView:!0,userEvent:"input"}),!0}mu(()=>{l.value&&(a=new A({parent:l.value,state:U.create({doc:i.modelValue,extensions:[Dp(),Ed(),xS({base:Hi,completeHTMLTags:!1}),ur.of([{key:"Mod-b",run:y=>_(y,"bold")},{key:"Mod-i",run:y=>_(y,"italic")},{key:"Mod-k",run:y=>_(y,"link"),preventDefault:!0},{key:"Mod-s",run:P,preventDefault:!0},...Ng,...eg]),A.lineWrapping,A.contentAttributes.of({spellcheck:"true",lang:"pl","aria-label":"Treść (Markdown)"}),Dd("Treść w Markdownie. Obrazek wklej albo przeciągnij tutaj."),Pp(k),w,c,S,A.updateListener.of(y=>{y.docChanged&&r("update:modelValue",y.state.doc.toString())})]})}))}),Su(()=>{a?.destroy(),a=null}),Qu(()=>i.modelValue,y=>{if(!a)return;const Z=a.state.doc.toString();y!==Z&&a.dispatch({changes:{from:0,to:Z.length,insert:y}})});function E(){a?.focus()}function G(){a&&(a.dispatch({selection:{anchor:a.state.doc.length},scrollIntoView:!0}),a.focus())}function Y(y){a&&(_(a,y),a.focus())}function j(y,Z){const M=++u;if(!a)return M;const I=a.state.doc,N=Math.min(Math.max(y??a.state.selection.main.head,0),I.length),le=I.lineAt(N),ve=N>le.from?` +`:"",ze=N0&&(N=Z.line.from-1)),a.dispatch({changes:{from:N,to:le},effects:h.of({token:y,spot:{pos:N,line:!1,text:Z.text}}),userEvent:"delete"})}function fe(y){return a?.state.field(c).get(y)?.pos??null}function Qe(y){a?.dispatch({effects:f.of(y)})}return e({focus:E,focusEnd:G,run:Y,insertUpload:j,replaceUpload:B,removeUpload:H,uploadSpot:fe,forgetUpload:Qe}),(y,Z)=>(Yl(),_l("div",{ref_key:"root",ref:s,class:$u(["md-editor",{dragging:o.value}]),onDragover:$,onDragleave:b,onDrop:T},[bu("div",{ref_key:"host",ref:l,class:"md-editor-host"},null,512),o.value?(Yl(),_l("div",RS,"Upuść obrazek, żeby go dodać")):ku("",!0)],34))}});export{qS as default}; diff --git a/public/assets/MaterialEditView-D5T_uu3M.js b/public/assets/MaterialEditView-D5T_uu3M.js new file mode 100644 index 0000000..bcfe143 --- /dev/null +++ b/public/assets/MaterialEditView-D5T_uu3M.js @@ -0,0 +1,7 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkdownEditor-CDQeviuk.js","assets/index-BhVKyY57.js","assets/index-CrQqZK_d.css"])))=>i.map(i=>d[i]); +import{d as Se,n as l,c as r,F as A,E as R,f as E,h as Wa,i as U,_ as ta,r as w,x as L,V as re,e as x,b as i,t as g,C as be,ag as aa,X as na,Z as me,T as Ze,ax as Vt,at as ia,ay as Oa,A as sa,ae as Ua,q as Ra,o as ct,U as oe,az as Fa,j as Ee,al as fe,aA as G,ap as Me,aB as Va,aC as Ve,aD as Ka,aE as Kt,aF as vt,aG as Za,p as ge,s as qa,w as le,v as ft,as as Zt,aH as qt,av as mt,H as Ha,aI as Ga,aJ as Ja,aK as Ya,aw as Ht,l as Xa,m as Qa,aL as en,aM as tn,aN as pt,au as an,aO as nn}from"./index-BhVKyY57.js";import{_ as sn}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as on}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{n as oa}from"./tabs-nNm7HGNT.js";import{_ as yt,r as ln}from"./markdown-DEWb_HMw.js";import{c as Gt}from"./materialListCache-DwqU8sxL.js";import"./safeText-O-oWGdGq.js";const rn={key:0,class:"md-toolbar-sep","aria-hidden":"true"},un=["data-index","aria-label","title","tabindex","onClick"],dn=Se({__name:"MarkdownToolbar",emits:["command","pickImage"],setup(s,{emit:o}){const f=o,y=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform),h=v=>y?`⌘${v}`:`Ctrl+${v}`,u=[[{cmd:"bold",icon:"bold",label:"Pogrubienie",key:"B"},{cmd:"italic",icon:"italic",label:"Kursywa",key:"I"},{cmd:"heading",icon:"heading",label:"Nagłówek"}],[{cmd:"list",icon:"list",label:"Lista"},{cmd:"quote",icon:"quote",label:"Cytat"}],[{cmd:"link",icon:"link",label:"Link",key:"K"},{cmd:"image",icon:"image",label:"Obrazek z dysku",title:"Obrazek z dysku (możesz też wkleić albo przeciągnąć)"},{cmd:"table",icon:"table",label:"Tabela"}]],C=L(()=>u.flat()),T=w(0),k=w([]);function d(v){return C.value.indexOf(v)}function S(v){return v.title?v.title:v.key?`${v.label} (${h(v.key)})`:v.label}function c(v){const m=oa(v.key,T.value,C.value.length);m!==null&&(v.preventDefault(),T.value=m,k.value.find(J=>Number(J.dataset.index)===m)?.focus())}function j(v){T.value=d(v),v.cmd==="image"?f("pickImage"):f("command",v.cmd)}return(v,m)=>(l(),r("div",{class:"md-toolbar",role:"toolbar","aria-label":"Formatowanie",onKeydown:c},[(l(),r(A,null,R(u,(J,Y)=>(l(),r(A,{key:Y},[Y>0?(l(),r("span",rn)):E("",!0),(l(!0),r(A,null,R(J,I=>(l(),r("button",{key:I.cmd,ref_for:!0,ref_key:"buttons",ref:k,class:"icon-btn md-tool",type:"button","data-index":d(I),"aria-label":I.label,title:S(I),tabindex:d(I)===T.value?0:-1,onMousedown:m[0]||(m[0]=Wa(()=>{},["prevent"])),onClick:K=>j(I)},[U(ta,{name:I.icon},null,8,["name"])],40,un))),128))],64))),64))],32))}}),cn=2e3*2e3;function Jt(s){const o=s.replace(/\r\n?/g,` +`);return o?(o.endsWith(` +`)?o.slice(0,-1):o).split(` +`):[]}function vn(s,o,f,y){const h=s.length,u=o.length,C=[];if(h*u>cn){for(let c=0;c=0;c--)for(let j=u-1;j>=0;j--)k[c*T+j]=s[c]===o[j]?k[(c+1)*T+j+1]+1:Math.max(k[(c+1)*T+j],k[c*T+j+1]);let d=0,S=0;for(;d=u||d=k[d*T+S+1]?(C.push({kind:"server",i:f+d,j:-1}),d++):(C.push({kind:"mine",i:-1,j:y+S}),S++);return C}function fn(s,o){const f=Jt(s),y=Jt(o);let h=0;for(;h0;c--)C.push({kind:"same",i:f.length-c,j:y.length-c});const T=[];let k=[],d=[];const S=()=>{const c=Math.min(k.length,d.length);for(let j=0;jh.push(...k),C=k=>{k.length&&(h.length&&y.push({kind:"rows",rows:h}),h=[],y.push({kind:"gap",rows:k}))};let T=0;for(;Tc?.removeEventListener("change",v));function m(_){if(_==null)return"";const b=y.meetings?.find(N=>N.id===_);return b?ia(b):"Wybrany zjazd"}const J=(_,b)=>_.length===b.length&&_.every(N=>b.includes(N)),Y=L(()=>{const _=y.server,b=y.mine,N=[],D=(M,B,Ge)=>N.push({name:M,server:B,mine:Ge});return _.title.trim()!==b.title.trim()&&D("Tytuł",_.title.trim(),b.title.trim()),_.type!==b.type&&D("Rodzaj",Ze[_.type],Ze[b.type]),_.meeting_id!==b.meeting_id&&D("Zjazd",m(_.meeting_id),m(b.meeting_id)),_.source.trim()!==b.source.trim()&&D("Źródło",_.source.trim(),b.source.trim()),_.url.trim()!==b.url.trim()&&D("Link",_.url.trim(),b.url.trim()),J(_.tags,b.tags)||D("Tagi",_.tags.join(", "),b.tags.join(", ")),N}),I=L(()=>Vt(y.server.body)===Vt(y.mine.body)),K=L(()=>I.value?[]:mn(fn(y.server.body,y.mine.body))),X=w(new Set);function Ne(_){X.value=new Set(X.value).add(_)}function qe(_){const b=[];let N=[],D=[];const M=()=>{b.push(...N,...D),N=[],D=[]};for(const B of _){if(B.kind==="same"){M(),b.push({side:"same",no:B.mineNo,text:B.mine??""});continue}B.server!==void 0&&N.push({side:"server",no:B.serverNo,text:B.server}),B.mine!==void 0&&D.push({side:"mine",no:B.mineNo,text:B.mine})}return M(),b}function Pe(){k=document.activeElement instanceof HTMLElement?document.activeElement:null,d=null,X.value=new Set,C.value?.open||C.value?.showModal(),me(()=>T.value?.focus())}function ue(_=null){d=_,C.value?.close()}function de(){const _=d;d=null;const b=k;if(k=null,_==="load")return h("load");if(_==="overwrite")return h("overwrite");b?.isConnected&&b.focus(),h("close")}function He(_){_.target===C.value&&ue()}return o({open:Pe}),(_,b)=>(l(),r("dialog",{ref_key:"dialog",ref:C,class:"chat-dialog diff-dialog","aria-labelledby":`diff-h-${x(u)}`,onClose:de,onClick:He},[i("div",yn,[i("h2",{id:`diff-h-${x(u)}`,class:"chat-dialog-title"},"Zmiany względem rev "+g(y.revision),9,gn),i("button",{class:"icon-btn",type:"button","aria-label":"Zamknij porównanie",onClick:b[0]||(b[0]=N=>ue())},[U(ta,{name:"close"})])]),i("div",bn,[Y.value.length?(l(),r("table",hn,[i("thead",null,[i("tr",null,[b[4]||(b[4]=i("th",{scope:"col"},"Pole",-1)),i("th",wn,"Na serwerze (rev "+g(y.revision)+")",1),b[5]||(b[5]=i("th",{scope:"col"},"U Ciebie",-1))])]),i("tbody",null,[(l(!0),r(A,null,R(Y.value,N=>(l(),r("tr",{key:N.name},[i("th",kn,g(N.name),1),i("td",null,g(N.server||"—"),1),i("td",null,g(N.mine||"—"),1)]))),128))])])):E("",!0),I.value?(l(),r("p",_n,"Treść jest taka sama. Różnią się tylko pola powyżej.")):(l(),r("div",{key:2,class:be(["diff-body",{split:j.value}]),role:"region","aria-label":"Różnice w treści"},[i("div",zn,[i("span",null,"Na serwerze (rev "+g(y.revision)+")",1),b[6]||(b[6]=i("span",null,"U Ciebie",-1))]),(l(!0),r(A,null,R(K.value,(N,D)=>(l(),r(A,{key:D},[N.kind==="gap"&&!X.value.has(D)?(l(),r("button",{key:0,class:"linkish diff-gap",type:"button",onClick:M=>Ne(D)}," Pokaż "+g(x(aa)(N.rows.length,"niezmieniony wiersz","niezmienione wiersze","niezmienionych wierszy")),9,jn)):j.value?(l(!0),r(A,{key:1},R(N.rows,(M,B)=>(l(),r("div",{key:B,class:"diff-row"},[M.server!==void 0?(l(),r("div",{key:0,class:be(["diff-line",{server:M.kind!=="same"}])},[i("span",$n,g(M.serverNo),1),i("span",Tn,g(M.kind==="same"?"":"−"),1),M.kind!=="same"?(l(),r("span",xn,g(S.server)+": ",1)):E("",!0),i("span",En,g(M.server),1)],2)):(l(),r("div",Mn)),M.mine!==void 0?(l(),r("div",{key:2,class:be(["diff-line",{mine:M.kind!=="same"}])},[i("span",Cn,g(M.mineNo),1),i("span",Sn,g(M.kind==="same"?"":"+"),1),M.kind!=="same"?(l(),r("span",Nn,g(S.mine)+": ",1)):E("",!0),i("span",Pn,g(M.mine),1)],2)):(l(),r("div",In))]))),128)):(l(!0),r(A,{key:2},R(qe(N.rows),(M,B)=>(l(),r("div",{key:B,class:be(["diff-line",M.side==="same"?"":M.side])},[i("span",Ln,g(M.no),1),i("span",Dn,g(M.side==="server"?"−":M.side==="mine"?"+":""),1),M.side!=="same"?(l(),r("span",Bn,g(S[M.side])+": ",1)):E("",!0),i("span",An,g(M.text),1)],2))),128))],64))),128))],2))]),i("div",Wn,[i("button",{class:"btn ghost",type:"button",onClick:b[1]||(b[1]=N=>ue("load"))},"Wczytaj wersję z serwera"),i("button",{class:"btn miss",type:"button",onClick:b[2]||(b[2]=N=>ue("overwrite"))},"Nadpisz wersję z serwera"),i("button",{ref_key:"closeBtn",ref:T,class:"btn",type:"button",onClick:b[3]||(b[3]=N=>ue())},"Zamknij porównanie",512)])],40,pn))}}),Un=["image/png","image/jpeg","image/gif","image/webp"],Rn=50*1024*1024,Fn=20,la=s=>(s||"").split(";")[0].trim().toLowerCase();function Yt(s,o){return Oa(s)||!Un.includes(la(s.type))?"type":s.size>Rn?"size":o>=Fn?"count":null}function Vn(s,o){if(s===413)return"size";if(s!==422||!o||typeof o!="object")return null;const f=o.reason;return f==="type"||f==="size"||f==="count"?f:null}const Kn={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp"},Ce=s=>String(s).padStart(2,"0");function Zn(s,o=new Date){const f=`${o.getFullYear()}${Ce(o.getMonth()+1)}${Ce(o.getDate())}`,y=`${Ce(o.getHours())}${Ce(o.getMinutes())}${Ce(o.getSeconds())}`;return`wklejony-${f}-${y}.${Kn[la(s)]??"png"}`}function qn(s){return!s.trim()||/^(image|blob)(\.[a-z0-9]+)?$/i.test(s.trim())}const gt=s=>s.replace(/[[\]\\]/g,"");function Hn(s,o){if(o)return"obrazek";const f=s.lastIndexOf("."),y=f>0?s.slice(0,f):s;return gt(y).replace(/[-_]+/g," ").replace(/\s+/g," ").trim()||"obrazek"}function Gn(s){return`![Wysyłanie: ${gt(s)}…]()`}function Jn(s,o){const f=/[\s()<>]/.test(o)?`<${o.replace(/[<>]/g,"")}>`:o;return`![${gt(s)}](${f})`}function Yn(s){if(s.length===0)return"";const o=s.reduce((h,u)=>h+Math.max(0,u.loaded),0),f=s.reduce((h,u)=>h+Math.max(0,u.total),0),y=f>0?Math.min(100,Math.round(o/f*100)):0;return s.length===1?`Wysyłanie „${s[0].name}”… ${y}%`:`Wysyłanie ${s.length} obrazków… ${y}%`}function Ke(s,o,f=""){switch(s){case"type":return`„${o}”: wklej obrazek PNG, JPG, GIF albo WebP.`;case"size":return`„${o}”: plik jest większy niż 50 MB.`;case"count":return"Materiał ma już 20 plików. Usuń któryś w /bmadmin, żeby dodać obrazek.";case"network":return`„${o}”: nie udało się wysłać. ${f}`.trim()}}const Xt="Nie udało się wczytać danych.";function Xn(s){if(!s||typeof s!="object")return!1;const o=s;return typeof o.revision=="number"&&Number.isInteger(o.revision)&&o.revision>0&&!!o.data&&typeof o.data=="object"&&typeof o.data.id=="number"}function Qn(s){if(!(s instanceof sa))return{kind:"failed",message:Xt};switch(s.status){case 409:return Xn(s.body)?{kind:"conflict",revision:s.body.revision,updatedAt:typeof s.body.updated_at=="string"?s.body.updated_at:"",server:s.body.data}:{kind:"failed",message:s.message};case 422:return Object.keys(s.errors).length?{kind:"invalid",errors:s.errors}:{kind:"failed",message:s.message};case 404:return{kind:"gone"};case 403:return{kind:"forbidden"};default:return{kind:"failed",message:s.message||Xt}}}function ei(s,o,f){switch(s){case"title":return f.trim()?/already has this title/i.test(o)?"W tym przedmiocie jest już materiał o tym tytule.":/255 characters/.test(o)||f.trim().length>255?"Tytuł może mieć najwyżej 255 znaków.":o:"Podaj tytuł.";case"url":return/http/i.test(o)?"Podaj adres zaczynający się od https:// albo http://.":o;case"source":return/500 characters/.test(o)?"Źródło może mieć najwyżej 500 znaków.":o;case"tags":return/at most 4 tags/i.test(o)?"Wybierz najwyżej 4 tagi.":o;default:return o}}const ti="updated.jz.bm.material";function ai(s){return`materials:${s}`}const Qt=s=>typeof s=="number"&&Number.isInteger(s)&&s>=1;function ni(s){if(!s||typeof s!="object")return null;const o=s;if(o.event!==ti||!o.payload||typeof o.payload!="object")return null;const f=o.payload;return!Qt(f.material_id)||!Qt(f.revision)?null:{materialId:f.material_id,revision:f.revision}}const ii={class:"material-edit"},si={key:0,class:"empty"},oi=["href"],li=["role","aria-labelledby"],ri=["id"],ui={key:0,class:"conflict-line"},di={key:1,class:"conflict-line"},ci={class:"btn-row"},vi=["aria-busy"],fi=["disabled"],mi={key:2,class:"error-text",role:"alert"},pi={key:1,class:"notice draft-offer no-print",role:"status"},yi={class:"draft-offer-title"},gi={class:"btn-row"},bi={class:"field"},hi=["for"],wi=["id","aria-invalid","aria-describedby"],ki=["id"],_i=["open"],zi={class:"edit-details-values"},ji={class:"grid-3"},$i={class:"field"},Ti=["for"],xi=["id","aria-invalid","aria-describedby"],Ei=["value"],Mi=["id"],Ci={class:"field"},Si=["for"],Ni=["id","disabled","aria-invalid","aria-describedby"],Pi=["value"],Ii=["value"],Li=["id"],Di=["id"],Bi={class:"field"},Ai={class:"edit-course"},Wi={class:"grid-2"},Oi={class:"field"},Ui=["for"],Ri=["id","aria-invalid","aria-describedby"],Fi=["id"],Vi={class:"field"},Ki=["for"],Zi=["id","aria-invalid","aria-describedby"],qi=["id"],Hi={class:"field edit-tags"},Gi={class:"edit-tags-head"},Ji=["id"],Yi={class:"label edit-tags-count","aria-live":"polite"},Xi=["id","aria-labelledby","aria-describedby"],Qi=["aria-pressed","disabled","onClick"],es=["id","aria-labelledby","aria-describedby"],ts={key:0,class:"muted small"},as=["id"],ns={key:3,class:"muted small"},is={key:4,class:"error-text",role:"alert"},ss={class:"edit-block","aria-label":"Treść"},os={key:0,class:"pulpit-tabs edit-tabs no-print",role:"tablist","aria-label":"Widok treści"},ls=["id","aria-selected","aria-controls","tabindex","onClick","onKeydown"],rs={class:"edit-toolbar-row no-print"},us=["aria-expanded"],ds=["id"],cs={id:"md-preview",class:"edit-pane edit-preview prose",role:"region","aria-label":"Podgląd"},vs={key:0,class:"label edit-preview-caption"},fs=["innerHTML"],ms={key:2,class:"muted"},ps=["id"],ys={class:"edit-status-strip no-print"},gs={key:1,"aria-hidden":"true"},bs={key:2,class:"notice error edit-upload-errors no-print",role:"alert"},hs=["onClick"],ws={key:3,class:"notice error edit-save-error",role:"alert"},ks={key:4,class:"notice error edit-save-error",role:"alert"},_s={class:"edit-actions no-print"},zs={class:"btn-row"},js=["disabled","aria-busy"],$s=["href"],Ts={class:"muted small",role:"status"},ea="bm.editor.preview",Is=Se({__name:"MaterialEditView",props:{id:{}},setup(s){const o=s,f=Qa(),y=Ua(),h=Ra(),u=na(),C=Se({render:()=>pt("div",{class:"skeleton edit-pane-skeleton","aria-busy":"true","aria-label":"Wczytywanie edytora"})}),T=Se({render:()=>pt("div",{class:"notice error",role:"alert"},["Nie udało się wczytać edytora. Sprawdź połączenie i spróbuj ponownie. ",pt("button",{class:"linkish",type:"button",onClick:()=>window.location.reload()},"Spróbuj ponownie")])}),k=Ga({loader:()=>en(()=>import("./MarkdownEditor-CDQeviuk.js"),__vite__mapDeps([0,1,2])),loadingComponent:C,errorComponent:T,delay:0}),d=w(null),S=typeof window.matchMedia=="function"?window.matchMedia("(min-width: 900px)"):null,c=w(S?.matches??!0);function j(e){c.value=e.matches}S?.addEventListener("change",j),re(()=>S?.removeEventListener("change",j));const v=w(null),m=w(null),J=w("");async function Y(){st(),Wt(),je!==void 0&&ee(),O.value=null,ze=null,$e=null,v.value=null,m.value=null,J.value="",ae.value="",ne.value="",$.value=null,z.value={},Z.value=null,Ae.value=!1;try{const e=await fe.material(Number(o.id));v.value=e,lt(G(e))}catch(e){J.value=Me(e);return}v.value.can_manage&&(Ea(v.value),Ne(),He(),Ta(v.value.id))}ct(Y),oe(()=>o.id,Y);const I=L(()=>!!m.value&&!!v.value&&!Ve(m.value,G(v.value))),K=w(null),X=w("");async function Ne(){X.value="";try{K.value=await fe.tags()}catch(e){X.value=Me(e)}}const qe=L(()=>{const e=m.value;if(!e||!K.value)return[];const t=new Set(K.value.map(n=>n.name));return[...e.tags.filter(n=>!t.has(n)),...K.value.map(n=>n.name)]}),Pe=L(()=>(m.value?.tags.length??0)>=qt);function ue(e){const t=m.value;t&&(t.tags=Ja(t.tags,e))}const de=w(!1);async function He(){de.value=!1,await y.loadMeetings(),de.value=y.meetings===null}const _=L(()=>an(y.meetings??[])),b=L(()=>{const e=m.value?.meeting_id;return e==null?null:(y.meetings??[]).find(t=>t.id===e)?.number??null}),N=Object.entries(Ze),D=w(c.value);function M(e){D.value=e.target.open}const B=L(()=>{const e=m.value;if(!e)return"";const t=e.meeting_id==null?"bez zjazdu":b.value!=null?`Zjazd ${b.value}`:"zjazd";return`${Ze[e.type]} · ${t} · ${aa(e.tags.length,"tag","tagi","tagów")}`});function Ge(){try{const e=window.localStorage.getItem(ea);return e==="1"?!0:e==="0"?!1:null}catch{return null}}const ra=typeof window.matchMedia=="function"?window.matchMedia("(min-width: 1100px)").matches:!0,ce=w(Ge()??ra);function ua(){ce.value=!ce.value;try{window.localStorage.setItem(ea,ce.value?"1":"0")}catch{}}const Je=[{id:"edit",label:"Edycja"},{id:"preview",label:"Podgląd"}],te=w("edit"),bt=w([]);function da(e,t){const n=oa(e.key,t,Je.length);n!==null&&(e.preventDefault(),te.value=Je[n].id,bt.value[n]?.focus())}const ht=L(()=>c.value||te.value==="edit"),wt=L(()=>c.value?ce.value:te.value==="preview"),Ye=w("");let he;function kt(){clearTimeout(he),he=void 0,Ye.value=ln(m.value?.body??"",{newTabLinks:!0})}oe(()=>[m.value?.body,wt.value],([,e],t)=>{e&&(clearTimeout(he),!t||!t[1]?kt():he=setTimeout(kt,150))},{immediate:!0}),re(()=>clearTimeout(he)),oe(d,(e,t)=>{e&&!t&&c.value&&e.focus()});const Ie=["title","type","meeting_id","source","url","tags","body"],ca=new Set(["type","meeting_id","source","url","tags"]),z=w({}),va=L(()=>Object.keys(z.value).length>0),W=e=>`${e}-e-${u}`,fa=(...e)=>e.filter(Boolean).join(" ")||void 0;for(const e of Ie)oe(()=>m.value?.[e],()=>{z.value[e]!==void 0&&delete z.value[e]});function ma(e,t){const n=e[t];return Array.isArray(n)?n.join(", "):n==null?"":String(n)}function pa(e){if(e==="body"){te.value="edit",d.value?.focus();return}if(e==="tags"){document.getElementById(`tags-g-${u}`)?.querySelector("button:not(:disabled)")?.focus();return}const t={title:`title-${u}`,type:`type-${u}`,meeting_id:`meeting-${u}`,source:`source-${u}`,url:`url-${u}`};document.getElementById(t[e])?.focus()}async function ya(e){const t=m.value;if(!t)return;const n={};for(const p of Ie){const P=e[p]?.[0];P&&(n[p]=ei(p,P,ma(t,p)))}const a=Ie.find(p=>n[p]!==void 0);if(!a){ae.value=Ht(Object.values(e).flat()[0]??"Błąd 422");return}z.value=n,Ie.some(p=>n[p]!==void 0&&ca.has(p))&&(D.value=!0),await me(),pa(a)}const $=w(null),Xe=w(null),_t=w(null),zt=w(null),Le=w(0);function De(e){ae.value="",z.value={},we.value="",$.value=e}function Qe(e){v.value=e,$.value=null,ne.value="Wersja z serwera jest taka sama jak Twoja."}function jt(e){v.value=e,lt(G(e)),$.value=null,z.value={},ae.value="";const t=O.value;if(t){const n=Kt(t.draft,{fields:G(e),revision:e.revision});n==="none"?Oe():O.value={...t,kind:n}}}async function ga(){try{return await fe.material(Number(o.id))}catch(e){throw new Error(`Nie udało się pobrać wersji z serwera. ${Me(e)}`)}}async function $t(e=null){const t=$.value,n=_t.value;if(!t||!n)return;let a=t.server;const p=await n.open({from:e,action:async()=>{a||(a=await ga())}}),P=$.value;p!=="confirm"||!P||!a||(P.server&&P.server.revision>a.revision&&(a=P.server),jt(a),Oe(),ne.value=`Wczytano wersję z serwera (rev ${a.revision}).`,await me(),c.value&&d.value?.focus())}async function Tt(e=null){const t=$.value,n=zt.value;if(!t||!n||F.value||(Le.value=t.revision,await n.open({from:e})!=="confirm"||!$.value))return;const p=Le.value;$.value=null,await We(!0,p)}function et(e){return e.currentTarget instanceof HTMLElement?e.currentTarget:null}const xt=w(null),Be=w(!1),we=w("");let tt=null;const Et=L(()=>$.value?.server?G($.value.server):null);async function ba(e){const t=$.value;if(!(!t||Be.value)){if(tt=et(e),we.value="",!t.server){Be.value=!0;let n;try{n=await fe.material(Number(o.id))}catch(p){$.value===t&&(we.value=Me(p));return}finally{Be.value=!1}if($.value!==t)return;const a=m.value;if(a&&Ve(G(n),a)){Qe(n);return}$.value={...t,revision:Math.max(t.revision,n.revision),server:n}}await me(),xt.value?.open()}}function ha(){$t(tt)}function wa(){Tt(tt)}const Z=w(null),Ae=w(!1);let at;re(()=>clearTimeout(at));function ka(e){const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();let n=!1;try{n=document.execCommand("copy")}catch{n=!1}return t.remove(),n}async function _a(){const e=m.value?.body??"";let t=!1;try{await navigator.clipboard.writeText(e),t=!0}catch{t=ka(e)}t&&(Ae.value=!0,clearTimeout(at),at=setTimeout(()=>Ae.value=!1,4e3))}const Q=w(!1),ae=w(""),ne=w("");let Mt=!1,nt;const za=L(()=>Q.value?"Zapisywanie…":F.value?"Poczekaj, aż obrazki się wyślą.":$.value?"Najpierw zdecyduj, co zrobić z wersją z serwera.":Z.value?"":va.value?"Popraw zaznaczone pola.":I.value?"Niezapisane zmiany.":ne.value);oe(I,e=>{e?ne.value="":O.value||ee()});const ja=L(()=>I.value&&!Q.value&&!F.value&&!$.value&&!Z.value);async function We(e,t){const n=v.value,a=m.value;if(!(!n||!a||Q.value||Z.value||F.value)&&!(t===void 0&&($.value||!I.value))){Mt=e,nt=t,Q.value=!0,ae.value="",ne.value="",z.value={};try{const p=await fe.editMaterial(n.id,Ya(a,t??n.revision));if(v.value!==n)return;v.value=p,nt=void 0,Gt(),ee(),e?ne.value=`Zapisano (rev ${p.revision}).`:(h.show("Zapisano zmiany."),dt=!0,Rt())}catch(p){v.value===n&&await $a(Qn(p))}finally{Q.value=!1;const p=ve;ve=0,p&&v.value&&p>v.value.revision&&ot(p)}}}async function $a(e){switch(e.kind){case"conflict":{const t={...e.server,revision:e.revision},n=m.value;if(n&&Ve(G(t),n)){Qe(t);return}De({revision:e.revision,server:t,source:"save"}),await me(),Xe.value?.focus();return}case"invalid":await ya(e.errors);return;case"gone":case"forbidden":$.value=null,Z.value=e.kind;return;case"failed":ae.value=Ht(e.message);return}}let it=null,ke=0,_e=0,ve=0;async function Ta(e){if(st(),tn())return;const t=ke;try{const n=await Va(ai(e),{onPublication:a=>{const p=ni(a);p&&p.materialId===e&&ot(p.revision)},onSubscribed:()=>{ot(null)}});if(t!==ke)return n.close();it=n}catch{}}function st(){ke++,it?.close(),it=null,_e=0,ve=0}re(st);async function ot(e){const t=v.value;if(!t||Z.value)return;if(e!==null){if(e<=Math.max(t.revision,$.value?.revision??0,_e))return;if(Q.value){ve=Math.max(ve,e);return}_e=e}else if(Q.value)return;const n=ke;let a=null;try{a=await fe.material(t.id)}catch{a=null}finally{_e===e&&(_e=0)}const p=v.value;if(n!==ke||!p||p.id!==t.id||Z.value)return;if(!a){e!==null&&e>Math.max(p.revision,$.value?.revision??0)&&De({revision:e,server:null,source:$.value?.source??"live"});return}if(a.revision<=Math.max(p.revision,$.value?.server?.revision??0))return;if(Q.value){ve=Math.max(ve,a.revision);return}const P=m.value;P&&Ve(G(a),P)?Qe(a):I.value?De({revision:a.revision,server:a,source:$.value?.source??"live"}):(jt(a),ne.value=`Wczytano nowszą wersję z serwera (rev ${a.revision}).`)}function xa(){We(Mt,nt)}const O=w(null);let ze=null,je,$e=null;function lt(e){$e=JSON.stringify(e),m.value=e}function rt(){clearTimeout(je),je=void 0}function ee(){rt();const e=v.value,t=m.value;if(!(!e||!t||!e.can_manage||O.value)){if(!I.value){vt(e.id);return}Za(e.id,{base_revision:ze??e.revision,saved_at:new Date().toISOString(),fields:{...t,tags:[...t.tags]}})}}function Oe(){rt(),O.value=null,ze=null;const e=v.value;e&&vt(e.id)}function Ea(e){const t=Ka(e.id),n=Kt(t,{fields:G(e),revision:e.revision});if(!t||n==="none"){O.value=null,t&&vt(e.id);return}O.value={kind:n,draft:t}}oe(m,e=>{if(!e||!v.value)return;const t=$e!==null&&JSON.stringify(e)===$e;if($e=null,!t){if(O.value=null,!I.value){ee();return}rt(),je=setTimeout(ee,800)}},{deep:!0}),oe($,e=>{e||(ze=null)});function Ct(){document.visibilityState==="hidden"&&I.value&&ee()}ct(()=>document.addEventListener("visibilitychange",Ct)),re(()=>{document.removeEventListener("visibilitychange",Ct),je!==void 0&&ee()});const Ma=L(()=>{const e=O.value,t=v.value;if(!e||!t)return"";const n=nn(e.draft.saved_at);return e.kind==="same"?`Masz niezapisane zmiany z ${n}.`:`Masz niezapisane zmiany z ${n}, zrobione na rev ${e.draft.base_revision}. Na serwerze jest już rev ${t.revision}.`});function Ca(e,t){return e.type!==t.type||e.meeting_id!==t.meeting_id||e.source.trim()!==t.source.trim()||e.url.trim()!==t.url.trim()||[...e.tags].sort().join(` +`)!==[...t.tags].sort().join(` +`)}async function St(){const e=O.value,t=v.value;if(!e||!t)return;O.value=null;const n=e.draft.fields;if(lt({...n,tags:[...n.tags]}),Ca(n,G(t))&&(D.value=!0),e.kind==="older"){ze=e.draft.base_revision,De({revision:t.revision,server:t,source:"live"}),await me(),Xe.value?.focus();return}te.value="edit",await me(),d.value?.focusEnd()}const q=w([]),ie=w([]),F=L(()=>q.value.length>0),Nt=L(()=>Yn(q.value)),Sa=L(()=>{const e=q.value.reduce((n,a)=>n+a.total,0),t=q.value.reduce((n,a)=>n+a.loaded,0);return e>0?Math.min(100,Math.round(t/e*100)):0}),Pt=w("");oe(F,e=>{e&&(Pt.value=Nt.value)});const It=w(null);let Lt=0,Te=0;const Ue=new Map,pe=new Map,ut=new Set;function Dt(){const e=new Set((v.value?.files??[]).map(t=>t.id));for(const t of ut)e.add(t);return e.size+q.value.length}function Re(e,t=null){if(!t&&ie.value.some(a=>!a.retry&&a.text===e))return;const n=++Lt;t&&pe.set(n,t),ie.value.push({key:n,text:e,retry:!!t})}function Bt(e,t,n){const a=v.value;if(!a||!a.can_manage||Z.value||!d.value)return;let p=t;for(const P of e){const se=n&&qn(P.name),H=se?new File([P],Zn(P.type),{type:P.type}):P,xe=Yt(H,Dt());if(xe){Re(Ke(xe,H.name));continue}At(H,Hn(H.name,se),p)&&(p=null)}}function Na(e){Bt(e.files,e.pos,e.pasted)}function Pa(){It.value?.click()}function Ia(e){const t=e.target,n=Array.from(t.files??[]);t.value="",n.length!==0&&(Bt(n,null,!1),d.value?.focus())}function At(e,t,n){const a=v.value,p=d.value;if(!a||!p)return!1;const P=Te,se=p.insertUpload(n,Gn(e.name)),H=++Lt,xe=new AbortController;Ue.set(H,xe),q.value.push({key:H,token:se,name:e.name,loaded:0,total:Math.max(e.size,1)});const Ba=V=>{const ye=q.value.find(Aa=>Aa.key===H);ye&&(ye.loaded=V/100*ye.total)};return fe.uploadMaterialImage(a.id,e,Ba,xe.signal).then(V=>{P===Te&&(ut.add(V.id),d.value?.replaceUpload(se,Jn(t,V.url)),Gt())}).catch(V=>{if(P!==Te)return;d.value?.removeUpload(se);const ye=V instanceof sa?Vn(V.status,V.body):null;if(ye){d.value?.forgetUpload(se),Re(Ke(ye,e.name));return}Re(Ke("network",e.name,Me(V)),{file:e,alt:t,token:se})}).finally(()=>{Ue.delete(H),P===Te&&(q.value=q.value.filter(V=>V.key!==H))}),!0}function La(e){const t=pe.get(e);if(pe.delete(e),ie.value=ie.value.filter(P=>P.key!==e),!t)return;const n=d.value,a=n?.uploadSpot(t.token)??null;n?.forgetUpload(t.token);const p=Yt(t.file,Dt());if(p){Re(Ke(p,t.file.name));return}At(t.file,t.alt,a)}function Da(){for(const e of pe.values())d.value?.forgetUpload(e.token);pe.clear(),ie.value=[]}function Wt(){Te++;for(const e of Ue.values())e.abort();Ue.clear(),pe.clear(),ut.clear(),q.value=[],ie.value=[]}re(Wt);const Ot=w(null);let dt=!1;Fa(async()=>{const e=Ot.value;if(dt||!I.value||!e)return!0;const t=await e.open();return t==="cancel"?!1:(t==="confirm"?Oe():ee(),dt=!0,!0)});function Ut(e){I.value&&ee(),!(!I.value&&!F.value)&&(e.preventDefault(),e.returnValue="")}ct(()=>window.addEventListener("beforeunload",Ut)),re(()=>window.removeEventListener("beforeunload",Ut));const Fe=L(()=>`/materialy/${o.id}`);function Rt(){const e=window.history.state?.back;let t=!1;if(typeof e=="string"&&e)try{const n=f.resolve(e);t=n.name==="material"&&String(n.params.id)===o.id}catch{t=!1}t?f.back():f.replace(Fe.value)}function Ft(e){e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),Rt())}return(e,t)=>{const n=Xa("router-link");return l(),r("div",ii,[U(on,{ready:!!v.value,error:J.value,onRetry:t[11]||(t[11]=a=>Y())},{default:Ee(()=>[v.value?(l(),r(A,{key:0},[v.value.can_manage?m.value?(l(),r(A,{key:1},[U(sn,{eyebrow:`Edycja · rev ${v.value.revision}`,title:"Edytuj materiał"},{default:Ee(()=>[U(n,{to:Fe.value,custom:""},{default:Ee(({href:a})=>[i("a",{class:"btn small ghost",href:a,onClick:Ft},"← Materiał",8,oi)]),_:1},8,["to"])]),_:1},8,["eyebrow"]),$.value?(l(),r("div",{key:0,ref_key:"bannerEl",ref:Xe,class:"notice conflict no-print",role:$.value.source==="save"?"alert":"status",tabindex:"-1","aria-labelledby":`conflict-h-${x(u)}`},[i("p",{id:`conflict-h-${x(u)}`,class:"conflict-title"},"Zmieniono gdzie indziej (rev "+g($.value.revision)+")",9,ri),$.value.source==="save"?(l(),r("p",ui,"Na serwerze jest nowsza wersja. Twoje zmiany są nadal tutaj i w kopii w przeglądarce.")):(l(),r("p",di,"Ten materiał zmieniono w trakcie Twojej edycji. Twoje zmiany nie są jeszcze zapisane.")),i("div",ci,[i("button",{class:"btn small",type:"button","aria-busy":Be.value?"true":void 0,onClick:ba},"Pokaż zmiany",8,vi),i("button",{class:"btn small ghost",type:"button",onClick:t[0]||(t[0]=a=>$t(et(a)))},"Wczytaj wersję z serwera"),i("button",{class:"btn small miss",type:"button",disabled:F.value,onClick:t[1]||(t[1]=a=>Tt(et(a)))},"Nadpisz",8,fi)]),we.value?(l(),r("p",mi,"Nie udało się pobrać wersji z serwera. "+g(we.value),1)):E("",!0)],8,li)):E("",!0),O.value&&!$.value?(l(),r("div",pi,[i("p",yi,g(Ma.value),1),i("div",gi,[O.value.kind==="same"?(l(),r("button",{key:0,class:"btn small",type:"button",onClick:St},"Przywróć niezapisane zmiany")):(l(),r("button",{key:1,class:"btn small",type:"button",onClick:St},"Przywróć i porównaj")),i("button",{class:"btn small ghost",type:"button",onClick:Oe},"Odrzuć kopię")])])):E("",!0),$.value&&Et.value?(l(),qa(On,{key:2,ref_key:"diffDialog",ref:xt,revision:$.value.revision,server:Et.value,mine:m.value,meetings:x(y).meetings,onLoad:ha,onOverwrite:wa},null,8,["revision","server","mine","meetings"])):E("",!0),U(yt,{ref_key:"loadDialog",ref:_t,tone:"danger",title:"Wczytać wersję z serwera?",body:"Twoje zmiany w edytorze przepadną, razem z kopią w przeglądarce.","confirm-label":"Wczytaj wersję z serwera","cancel-label":"Zostaw moje zmiany"},null,512),U(yt,{ref_key:"overwriteDialog",ref:zt,tone:"danger",title:"Nadpisać wersję z serwera?",body:`Twoja wersja zastąpi rev ${Le.value}. Zmiany z rev ${Le.value}, których nie masz u siebie, przepadną.`,"confirm-label":"Nadpisz wersję z serwera","cancel-label":"Wróć do edycji"},null,8,["body"]),U(yt,{ref_key:"leaveDialog",ref:Ot,tone:"danger",title:"Wyjść z edytora?",body:"Masz niezapisane zmiany. Jeśli wyjdziesz, zostaną w tej przeglądarce i przy następnym otwarciu edytora zaproponujemy ich przywrócenie.","confirm-label":"Odrzuć zmiany","extra-label":"Wyjdź z edytora","extra-class":"btn ghost","cancel-label":"Wróć do edycji","cancel-class":"btn"},null,512),i("div",bi,[i("label",{for:`title-${x(u)}`},"Tytuł",8,hi),le(i("input",{id:`title-${x(u)}`,"onUpdate:modelValue":t[2]||(t[2]=a=>m.value.title=a),type:"text",maxlength:"255",required:"",autocomplete:"off","aria-invalid":z.value.title?"true":void 0,"aria-describedby":z.value.title?W("title"):void 0},null,8,wi),[[ft,m.value.title]]),z.value.title?(l(),r("p",{key:0,id:W("title"),class:"error-text"},g(z.value.title),9,ki)):E("",!0)]),i("details",{class:"edit-details",open:D.value,onToggle:M},[i("summary",null,[t[14]||(t[14]=ge(" Szczegóły ",-1)),i("span",zi,g(B.value),1)]),i("div",ji,[i("div",$i,[i("label",{for:`type-${x(u)}`},"Rodzaj",8,Ti),le(i("select",{id:`type-${x(u)}`,"onUpdate:modelValue":t[3]||(t[3]=a=>m.value.type=a),"aria-invalid":z.value.type?"true":void 0,"aria-describedby":z.value.type?W("type"):void 0},[(l(!0),r(A,null,R(x(N),([a,p])=>(l(),r("option",{key:a,value:a},g(p),9,Ei))),128))],8,xi),[[Zt,m.value.type]]),z.value.type?(l(),r("p",{key:0,id:W("type"),class:"error-text"},g(z.value.type),9,Mi)):E("",!0)]),i("div",Ci,[i("label",{for:`meeting-${x(u)}`},"Zjazd",8,Si),le(i("select",{id:`meeting-${x(u)}`,"onUpdate:modelValue":t[4]||(t[4]=a=>m.value.meeting_id=a),disabled:de.value,"aria-invalid":z.value.meeting_id?"true":void 0,"aria-describedby":fa(de.value?`meeting-e-${x(u)}`:"",z.value.meeting_id?W("meeting_id"):"")},[t[15]||(t[15]=i("option",{value:null},"Bez zjazdu",-1)),x(y).meetings?(l(!0),r(A,{key:0},R(_.value,a=>(l(),r("option",{key:a.id,value:a.id},g(x(ia)(a)),9,Pi))),128)):m.value.meeting_id!=null?(l(),r("option",{key:1,value:m.value.meeting_id},"Wybrany zjazd",8,Ii)):E("",!0)],8,Ni),[[Zt,m.value.meeting_id]]),de.value?(l(),r("p",{key:0,id:`meeting-e-${x(u)}`,class:"error-text"},"Nie udało się wczytać zjazdów.",8,Li)):E("",!0),z.value.meeting_id?(l(),r("p",{key:1,id:W("meeting_id"),class:"error-text"},g(z.value.meeting_id),9,Di)):E("",!0)]),i("div",Bi,[t[16]||(t[16]=i("span",{class:"label"},"Przedmiot",-1)),i("span",Ai,g(v.value.course?.name??"bez przedmiotu"),1),t[17]||(t[17]=i("span",{class:"muted small"},"Przedmiotu nie można zmienić.",-1))])]),i("div",Wi,[i("div",Oi,[i("label",{for:`source-${x(u)}`},"Źródło",8,Ui),le(i("input",{id:`source-${x(u)}`,"onUpdate:modelValue":t[5]||(t[5]=a=>m.value.source=a),type:"text",maxlength:"500",placeholder:"np. autor, tytuł, strony","aria-invalid":z.value.source?"true":void 0,"aria-describedby":z.value.source?W("source"):void 0},null,8,Ri),[[ft,m.value.source]]),z.value.source?(l(),r("p",{key:0,id:W("source"),class:"error-text"},g(z.value.source),9,Fi)):E("",!0)]),i("div",Vi,[i("label",{for:`url-${x(u)}`},"Link",8,Ki),le(i("input",{id:`url-${x(u)}`,"onUpdate:modelValue":t[6]||(t[6]=a=>m.value.url=a),type:"url",maxlength:"2048",inputmode:"url",placeholder:"https://…","aria-invalid":z.value.url?"true":void 0,"aria-describedby":z.value.url?W("url"):void 0},null,8,Zi),[[ft,m.value.url]]),z.value.url?(l(),r("p",{key:0,id:W("url"),class:"error-text"},g(z.value.url),9,qi)):E("",!0)])]),i("div",Hi,[i("div",Gi,[i("span",{id:`tags-${x(u)}`,class:"label"},"Tagi",8,Ji),i("span",Yi,g(m.value.tags.length)+" z "+g(x(qt)),1)]),K.value?(l(),r("div",{key:0,id:`tags-g-${x(u)}`,class:"chips wrap",role:"group","aria-labelledby":`tags-${x(u)}`,"aria-describedby":z.value.tags?W("tags"):void 0},[(l(!0),r(A,null,R(qe.value,a=>(l(),r("button",{key:a,class:"chip",type:"button","aria-pressed":m.value.tags.includes(a)?"true":"false",disabled:Pe.value&&!m.value.tags.includes(a),onClick:p=>ue(a)},g(a),9,Qi))),128))],8,Xi)):(l(),r("div",{key:1,id:`tags-g-${x(u)}`,class:"chips wrap",role:"group","aria-labelledby":`tags-${x(u)}`,"aria-describedby":z.value.tags?W("tags"):void 0},[(l(!0),r(A,null,R(m.value.tags,a=>(l(),r("span",{key:a,class:"chip on"},g(a),1))),128)),X.value?E("",!0):(l(),r("span",ts,"Wczytywanie tagów…"))],8,es)),z.value.tags?(l(),r("p",{key:2,id:W("tags"),class:"error-text"},g(z.value.tags),9,as)):E("",!0),K.value&&Pe.value?(l(),r("p",ns,"Maksymalnie 4 tagi. Odznacz któryś, żeby wybrać inny.")):E("",!0),X.value&&!K.value?(l(),r("p",is,[t[18]||(t[18]=ge(" Nie udało się wczytać tagów. ",-1)),i("button",{class:"linkish",type:"button",onClick:Ne},"Spróbuj ponownie")])):E("",!0)])],40,_i),i("section",ss,[c.value?E("",!0):(l(),r("div",os,[(l(),r(A,null,R(Je,(a,p)=>i("button",{id:`edit-tab-${a.id}-${x(u)}`,key:a.id,ref_for:!0,ref_key:"tabEls",ref:bt,class:"pulpit-tab",type:"button",role:"tab","aria-selected":te.value===a.id?"true":"false","aria-controls":a.id==="edit"?`md-editor-${x(u)}`:"md-preview",tabindex:te.value===a.id?0:-1,onClick:P=>te.value=a.id,onKeydown:P=>da(P,p)},g(a.label),41,ls)),64))])),i("div",rs,[le(U(dn,{onCommand:t[7]||(t[7]=a=>d.value?.run(a)),onPickImage:Pa},null,512),[[mt,ht.value]]),i("input",{ref_key:"imageInput",ref:It,type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",multiple:"",hidden:"",tabindex:"-1","aria-hidden":"true",onChange:Ia},null,544),c.value?(l(),r("button",{key:0,class:"btn small ghost edit-preview-toggle",type:"button","aria-controls":"md-preview","aria-expanded":ce.value?"true":"false",onClick:ua},g(ce.value?"Ukryj podgląd":"Pokaż podgląd"),9,us)):E("",!0)]),i("div",{class:be(["edit-panes",{split:c.value&&ce.value}])},[le(i("div",{id:`md-editor-${x(u)}`,class:"edit-pane edit-editor"},[U(x(k),{ref_key:"editor",ref:d,modelValue:m.value.body,"onUpdate:modelValue":t[8]||(t[8]=a=>m.value.body=a),onSave:t[9]||(t[9]=a=>We(!0)),onImages:Na},null,8,["modelValue"])],8,ds),[[mt,ht.value]]),le(i("section",cs,[c.value?(l(),r("span",vs,"Podgląd")):E("",!0),Ye.value?(l(),r("div",{key:1,innerHTML:Ye.value},null,8,fs)):(l(),r("p",ms,"Podgląd pojawi się, gdy coś napiszesz."))],512),[[mt,wt.value]])],2),z.value.body?(l(),r("p",{key:1,id:W("body"),class:"error-text"},g(z.value.body),9,ps)):E("",!0),i("div",ys,[F.value?(l(),r("span",{key:0,class:"edit-upload-bar",style:Ha({width:`${Sa.value}%`}),"aria-hidden":"true"},null,4)):E("",!0),F.value?(l(),r("span",gs,g(Nt.value),1)):E("",!0),i("span",{role:"status",class:be({"sr-only":F.value})},g(F.value?Pt.value:"Wklejone obrazki stają się plikami materiału, które widzi każdy, kto ma link."),3)]),ie.value.length?(l(),r("div",bs,[(l(!0),r(A,null,R(ie.value,a=>(l(),r("p",{key:a.key,class:"edit-upload-error"},[ge(g(a.text)+" ",1),a.retry?(l(),r("button",{key:0,class:"linkish",type:"button",onClick:p=>La(a.key)},"Spróbuj ponownie",8,hs)):E("",!0)]))),128)),i("button",{class:"linkish",type:"button",onClick:Da},"Ukryj błędy")])):E("",!0)]),Z.value?(l(),r("div",ws,[ge(g(Z.value==="gone"?"Tego materiału nie ma już w Materiałach (usunięty albo przeniesiony do szkiców). Twoje zmiany zostały w tej przeglądarce.":"Nie możesz już edytować tego materiału. Twoje zmiany zostały w tej przeglądarce.")+" ",1),i("button",{class:"linkish",type:"button",onClick:_a},g(Ae.value?"Skopiowano.":"Skopiuj treść"),1)])):ae.value?(l(),r("div",ks,[ge(" Nie udało się zapisać: "+g(ae.value)+". Twoje zmiany zostały w tej przeglądarce. ",1),i("button",{class:"linkish",type:"button",onClick:xa},"Spróbuj ponownie")])):E("",!0),i("div",_s,[i("div",zs,[i("button",{class:"btn primary",type:"button",disabled:!ja.value,"aria-busy":Q.value?"true":void 0,onClick:t[10]||(t[10]=a=>We(!1))},"Zapisz zmiany",8,js),U(n,{to:Fe.value,custom:""},{default:Ee(({href:a})=>[i("a",{class:"btn ghost",href:a,onClick:Ft},"Wróć do materiału",8,$s)]),_:1},8,["to"]),i("span",Ts,g(za.value),1)])])],64)):E("",!0):(l(),r("div",si,[t[13]||(t[13]=i("p",null,"Nie możesz edytować tego materiału.",-1)),U(n,{to:Fe.value},{default:Ee(()=>[...t[12]||(t[12]=[ge("Wróć do materiału",-1)])]),_:1},8,["to"])]))],64)):E("",!0)]),_:1},8,["ready","error"])])}}});export{Is as default}; diff --git a/public/assets/MaterialView-BQucFIf3.js b/public/assets/MaterialView-BQucFIf3.js deleted file mode 100644 index 997c103..0000000 --- a/public/assets/MaterialView-BQucFIf3.js +++ /dev/null @@ -1 +0,0 @@ -import{d as X,U as R,n,c as o,b as i,F as N,E as F,t as h,e as x,i as U,_ as Q,f as p,w as O,v as ee,av as ae,h as Y,C as se,X as te,r as k,x as M,Z as le,ae as ne,o as oe,j as L,al as W,ap as Z,T as ie,ar as re,s as ue,p as j,at as ce,a1 as de,g as ve,l as pe,m as me}from"./index-CtNAsql9.js";import{_ as fe}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as he}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{a as _e}from"./materialQuery-Co-XzH2C.js";import{r as ye,s as ke}from"./markdown-CbtkjRI4.js";function V(d){return d.name.trim()||d.email}function q(d){return d.toLocaleLowerCase("pl").replace(/ł/g,"l").normalize("NFD").replace(/\p{M}/gu,"")}function be(d,_){return q(d.name).includes(_)||q(d.email).includes(_)}function G(d){return[...d].sort((_,v)=>V(_).localeCompare(V(v),"pl"))}function we(d,_,v,w=8){const l=new Set(v),b=q(_.trim()),y=G(d.filter(r=>!l.has(r.id)));if(!b)return y.slice(0,w);const m=[],c=[];for(const r of y){if(!be(r,b))continue;const u=q(V(r));u.startsWith(b)||u.split(/[\s-]+/).some(g=>g.startsWith(b))?m.push(r):c.push(r)}return[...m,...c].slice(0,w)}function H(d,_){return{is_private:d,user_ids:[...new Set(_)].sort((v,w)=>v-w)}}const ge={class:"field"},$e={key:0,class:"share-chips","aria-label":"Udostępniono"},Me=["title"],Ve=["aria-label","onClick"],xe=["aria-expanded","aria-activedescendant","placeholder"],ze={key:0,class:"share-option share-empty",role:"option","aria-disabled":"true","aria-selected":"false"},Ce=["id","aria-selected","onMousedown","onMousemove"],De={class:"share-option-name"},Ue={key:0,class:"share-option-email"},Be={key:0,class:"muted small share-none"},Te={class:"sr-only",role:"status","aria-live":"polite"},Le=X({__name:"ShareUserInput",props:{users:{},modelValue:{}},emits:["update:modelValue"],setup(d,{emit:_}){const v=d,w=_,l=te(),b=`${l}-input`,y=`${l}-list`,m=k(null),c=k(""),r=k(!1),u=k(0),g=k(""),S=M(()=>new Map(v.users.map(e=>[e.id,e]))),z=M(()=>v.modelValue.map(e=>S.value.get(e)).filter(e=>!!e)),$=M(()=>we(v.users,c.value,v.modelValue,8)),A=M(()=>{const e=c.value.trim();return v.users.length&&e?`Nikt nie pasuje do „${e}”.`:"Brak innych osób."}),B=M(()=>r.value&&$.value.length?I(u.value):void 0);R($,()=>{u.value>=$.value.length&&(u.value=0)});function I(e){return`${y}-opt-${e}`}function T(e){g.value="",le(()=>{g.value=e})}function E(){r.value=c.value.trim()!=="",u.value=0}function C(e){v.modelValue.includes(e.id)||(w("update:modelValue",[...v.modelValue,e.id]),c.value="",r.value=!1,u.value=0,T(`Dodano: ${V(e)}`))}function K(e){w("update:modelValue",v.modelValue.filter(a=>a!==e.id)),T(`Usunięto: ${V(e)}`),m.value?.focus()}function P(e){const a=$.value.length;if(!r.value){r.value=!0,u.value=e===1||!a?0:a-1;return}a&&(u.value=(u.value+e+a)%a)}function t(e){if(e.key==="Enter"){e.preventDefault();const a=$.value[u.value];!e.isComposing&&r.value&&a&&C(a);return}switch(e.key){case"ArrowDown":e.preventDefault(),P(1);break;case"ArrowUp":e.preventDefault(),P(-1);break;case"Escape":r.value?(e.preventDefault(),r.value=!1):c.value&&(e.preventDefault(),c.value="");break;case"Backspace":{if(c.value!=="")return;const a=z.value[z.value.length-1];a&&K(a);break}case"Tab":r.value=!1;break}}function s(e){const a=e.target;(a===e.currentTarget||a.classList.contains("share-chips"))&&m.value?.focus()}return(e,a)=>(n(),o("div",ge,[i("label",{for:b},"Udostępnij osobom"),i("div",{class:"share-field",onClick:s},[z.value.length?(n(),o("ul",$e,[(n(!0),o(N,null,F(z.value,f=>(n(),o("li",{key:f.id,class:"share-chip"},[i("span",{class:"share-chip-label",title:f.email},h(x(V)(f)),9,Me),i("button",{class:"share-chip-remove",type:"button","aria-label":`Usuń ${x(V)(f)}`,onClick:D=>K(f)},[U(Q,{name:"close"})],8,Ve)]))),128))])):p("",!0),O(i("input",{id:b,ref_key:"input",ref:m,"onUpdate:modelValue":a[0]||(a[0]=f=>c.value=f),class:"share-input",type:"text",role:"combobox","aria-autocomplete":"list","aria-expanded":r.value?"true":"false","aria-controls":y,"aria-activedescendant":B.value,autocomplete:"off",enterkeyhint:"done",placeholder:c.value?void 0:"Imię, nazwisko lub e-mail",onInput:E,onKeydown:t,onBlur:a[1]||(a[1]=f=>r.value=!1)},null,40,xe),[[ee,c.value]]),O(i("ul",{id:y,class:"share-pop",role:"listbox","aria-label":"Pasujące osoby"},[$.value.length?p("",!0):(n(),o("li",ze,h(A.value),1)),(n(!0),o(N,null,F($.value,(f,D)=>(n(),o("li",{id:I(D),key:f.id,class:se(["share-option",{active:D===u.value}]),role:"option","aria-selected":D===u.value?"true":"false",onMousedown:Y(J=>C(f),["prevent"]),onMousemove:J=>D!==u.value&&(u.value=D)},[i("span",De,h(x(V)(f)),1),x(V)(f)!==f.email?(n(),o("span",Ue,h(f.email),1)):p("",!0)],42,Ce))),128))],512),[[ae,r.value]])]),d.modelValue.length?p("",!0):(n(),o("p",Be,"Nikomu nie udostępniono.")),i("span",Te,h(g.value),1)]))}}),je=["href"],Ne={class:"muted small"},Se={key:1},Ae={key:2},Ie={key:3},Ee={key:0},Ke={class:"btn-row"},Pe=["href"],Fe=["innerHTML"],qe={key:2,class:"section","aria-labelledby":"files-h"},We={class:"rows"},Ze=["href","download"],He={class:"when"},Re={key:3,class:"section no-print","aria-labelledby":"access-h"},Oe={class:"card"},Xe={key:0,class:"notice error",role:"alert"},Ye={key:1,class:"skeleton","aria-busy":"true"},Ge={class:"check"},Je={class:"muted small"},Qe={key:0,class:"muted small"},ea={class:"btn-row"},aa=["disabled"],sa={key:0,class:"muted small"},ta={key:1,class:"muted small",role:"status"},la={key:1,class:"notice error",role:"alert"},ca=X({__name:"MaterialView",props:{id:{}},setup(d){const _=d,v=me(),w=ne(),l=k(null),b=k(""),y=k(null),m=k(""),c=k(""),r=k(!1),u=k([]),g=k(!1);function S(t){y.value=t,r.value=t.is_private,u.value=G(t.shares).map(s=>s.id)}const z=M(()=>{const t=y.value;if(!t)return[];const s=new Set(t.users.map(e=>e.id));return[...t.users,...t.shares.filter(e=>!s.has(e.id))]}),$=M(()=>{const t=y.value;if(!t)return!1;const s=H(r.value,u.value),e=H(t.is_private,t.shares.map(a=>a.id));return s.is_private!==e.is_private||s.user_ids.join(",")!==e.user_ids.join(",")});R($,t=>{t&&(c.value="")});async function A(t){m.value="";try{S(await W.materialAccess(t))}catch(s){m.value=Z(s)}}async function B(){l.value=null,b.value="",y.value=null,c.value="",m.value="",w.loadMeetings();try{l.value=await W.material(Number(_.id))}catch(t){b.value=Z(t);return}l.value.can_manage&&await A(l.value.id)}async function I(){const t=l.value;if(!(!t||g.value)){g.value=!0,c.value="",m.value="";try{const s=await W.saveMaterialAccess(t.id,H(r.value,u.value));if(l.value!==t)return;S(s),t.is_private=s.is_private,c.value="Zapisano."}catch(s){m.value=Z(s)}finally{g.value=!1}}}oe(B),R(()=>_.id,B);const T=M(()=>ye(l.value?.body)),E=M(()=>l.value?.url?ke(l.value.url):null),C=M(()=>{const t=l.value?.meeting_id;return t==null?null:(w.meetings??[]).find(s=>s.id===t)??null});function K(t){t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),_e(window.history.state?.back,s=>v.resolve(s).name)?v.back():v.push("/materialy"))}function P(){window.print()}return(t,s)=>{const e=pe("router-link");return n(),o("div",null,[U(he,{ready:!!l.value,error:b.value,onRetry:s[3]||(s[3]=a=>B())},{default:L(()=>[l.value?(n(),o(N,{key:0},[U(fe,{eyebrow:`${x(ie)[l.value.type]}${l.value.published_at?" · "+x(re)(l.value.published_at):""}`,title:l.value.title},{default:L(()=>[U(e,{to:"/materialy",custom:""},{default:L(({href:a})=>[i("a",{class:"btn small ghost",href:a,onClick:K},"← Materiały",8,je)]),_:1})]),_:1},8,["eyebrow","title"]),i("p",Ne,[l.value.course?(n(),ue(e,{key:0,to:`/przedmioty/${l.value.course.id}`},{default:L(()=>[j(h(l.value.course.name),1)]),_:1},8,["to"])):p("",!0),C.value?(n(),o("span",Se,[s[4]||(s[4]=j(" · ",-1)),U(e,{to:`/plan?zjazd=${C.value.number}`},{default:L(()=>[j(h(x(ce)(C.value)),1)]),_:1},8,["to"])])):p("",!0),l.value.source?(n(),o("span",Ae," · "+h(l.value.source),1)):p("",!0),l.value.is_private?(n(),o("span",Ie,[...s[5]||(s[5]=[j(" · ",-1),i("span",{class:"badge alert"},"prywatny",-1)])])):p("",!0)]),l.value.tags.length?(n(),o("p",Ee,[(n(!0),o(N,null,F(l.value.tags,a=>(n(),o("span",{key:a.id,class:"badge",style:{"margin-right":"4px"}},h(a.name),1))),128))])):p("",!0),i("p",Ke,[E.value?(n(),o("a",{key:0,class:"btn small",href:E.value,target:"_blank",rel:"noopener noreferrer"},"Otwórz link",8,Pe)):p("",!0),i("button",{class:"btn small",type:"button",onClick:P},"Drukuj")]),T.value?(n(),o("div",{key:1,class:"prose card",innerHTML:T.value},null,8,Fe)):p("",!0),l.value.files.length?(n(),o("section",qe,[s[6]||(s[6]=i("div",{class:"section-head"},[i("h2",{id:"files-h"},"Pliki")],-1)),i("ul",We,[(n(!0),o(N,null,F(l.value.files,a=>(n(),o("li",{key:a.id,class:"row-main"},[i("a",{href:a.url,download:a.name},h(a.name),9,Ze),i("span",He,h(x(de)(a.size)),1)]))),128))])])):p("",!0),l.value.can_manage?(n(),o("section",Re,[s[8]||(s[8]=i("div",{class:"section-head"},[i("h2",{id:"access-h"},"Dostęp")],-1)),i("div",Oe,[m.value&&!y.value?(n(),o("div",Xe,[j(h(m.value)+" ",1),i("button",{class:"linkish",type:"button",onClick:s[0]||(s[0]=a=>A(l.value.id))},"Spróbuj ponownie")])):y.value?(n(),o("form",{key:2,onSubmit:Y(I,["prevent"])},[i("label",Ge,[O(i("input",{"onUpdate:modelValue":s[1]||(s[1]=a=>r.value=a),type:"checkbox"},null,512),[[ve,r.value]]),s[7]||(s[7]=i("span",null,"Materiał prywatny",-1))]),i("p",Je,h(r.value?"Widzisz go tylko Ty i osoby, którym go udostępnisz.":"Materiał publiczny: widzą go wszyscy."),1),U(Le,{modelValue:u.value,"onUpdate:modelValue":s[2]||(s[2]=a=>u.value=a),users:z.value},null,8,["modelValue","users"]),r.value?p("",!0):(n(),o("p",Qe,"Udostępnienie działa, gdy materiał jest prywatny.")),i("div",ea,[i("button",{class:"btn small",type:"submit",disabled:g.value},"Zapisz dostęp",8,aa),$.value?(n(),o("span",sa,"Niezapisane zmiany.")):c.value?(n(),o("span",ta,h(c.value),1)):p("",!0)]),m.value?(n(),o("div",la,h(m.value),1)):p("",!0)],32)):(n(),o("div",Ye))])])):p("",!0)],64)):p("",!0)]),_:1},8,["ready","error"])])}}});export{ca as default}; diff --git a/public/assets/MaterialView-Ccuh3g_S.js b/public/assets/MaterialView-Ccuh3g_S.js new file mode 100644 index 0000000..4aae316 --- /dev/null +++ b/public/assets/MaterialView-Ccuh3g_S.js @@ -0,0 +1 @@ +import{d as ee,U as X,n as l,c as o,b as n,F as E,E as H,t as f,e as M,i as T,_ as se,f as m,w as Y,v as le,av as ne,h as ae,C as oe,X as ie,r as h,x as g,Z as re,ae as ue,q as ce,o as de,j as V,al as F,ap as Z,T as ve,ar as me,s as J,p as x,at as pe,a1 as fe,g as he,A as ye,aw as _e,l as be,m as ke}from"./index-BhVKyY57.js";import{_ as we}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as ge}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{_ as $e,r as ze}from"./markdown-DEWb_HMw.js";import{b as Q,c as Me}from"./materialListCache-DwqU8sxL.js";import{s as Ce}from"./safeText-O-oWGdGq.js";function z(p){return p.name.trim()||p.email}function W(p){return p.toLocaleLowerCase("pl").replace(/ł/g,"l").normalize("NFD").replace(/\p{M}/gu,"")}function Ve(p,y){return W(p.name).includes(y)||W(p.email).includes(y)}function te(p){return[...p].sort((y,d)=>z(y).localeCompare(z(d),"pl"))}function xe(p,y,d,k=8){const U=new Set(d),t=W(y.trim()),w=te(p.filter(i=>!U.has(i.id)));if(!t)return w.slice(0,k);const _=[],c=[];for(const i of w){if(!Ve(i,t))continue;const u=W(z(i));u.startsWith(t)||u.split(/[\s-]+/).some(b=>b.startsWith(t))?_.push(i):c.push(i)}return[..._,...c].slice(0,k)}function O(p,y){return{is_private:p,user_ids:[...new Set(y)].sort((d,k)=>d-k)}}const Te={class:"field"},Ue={key:0,class:"share-chips","aria-label":"Udostępniono"},De=["title"],je=["aria-label","onClick"],Be=["aria-expanded","aria-activedescendant","placeholder"],Le={key:0,class:"share-option share-empty",role:"option","aria-disabled":"true","aria-selected":"false"},Ae=["id","aria-selected","onMousedown","onMousemove"],Ee={class:"share-option-name"},Ne={key:0,class:"share-option-email"},Se={key:0,class:"muted small share-none"},Ie={class:"sr-only",role:"status","aria-live":"polite"},Ke=ee({__name:"ShareUserInput",props:{users:{},modelValue:{}},emits:["update:modelValue"],setup(p,{emit:y}){const d=p,k=y,U=ie(),t=`${U}-input`,w=`${U}-list`,_=h(null),c=h(""),i=h(!1),u=h(0),b=h(""),D=g(()=>new Map(d.users.map(s=>[s.id,s]))),C=g(()=>d.modelValue.map(s=>D.value.get(s)).filter(s=>!!s)),$=g(()=>xe(d.users,c.value,d.modelValue,8)),N=g(()=>{const s=c.value.trim();return d.users.length&&s?`Nikt nie pasuje do „${s}”.`:"Brak innych osób."}),S=g(()=>i.value&&$.value.length?j(u.value):void 0);X($,()=>{u.value>=$.value.length&&(u.value=0)});function j(s){return`${w}-opt-${s}`}function I(s){b.value="",re(()=>{b.value=s})}function K(){i.value=c.value.trim()!=="",u.value=0}function L(s){d.modelValue.includes(s.id)||(k("update:modelValue",[...d.modelValue,s.id]),c.value="",i.value=!1,u.value=0,I(`Dodano: ${z(s)}`))}function B(s){k("update:modelValue",d.modelValue.filter(e=>e!==s.id)),I(`Usunięto: ${z(s)}`),_.value?.focus()}function P(s){const e=$.value.length;if(!i.value){i.value=!0,u.value=s===1||!e?0:e-1;return}e&&(u.value=(u.value+s+e)%e)}function R(s){if(s.key==="Enter"){s.preventDefault();const e=$.value[u.value];!s.isComposing&&i.value&&e&&L(e);return}switch(s.key){case"ArrowDown":s.preventDefault(),P(1);break;case"ArrowUp":s.preventDefault(),P(-1);break;case"Escape":i.value?(s.preventDefault(),i.value=!1):c.value&&(s.preventDefault(),c.value="");break;case"Backspace":{if(c.value!=="")return;const e=C.value[C.value.length-1];e&&B(e);break}case"Tab":i.value=!1;break}}function q(s){const e=s.target;(e===s.currentTarget||e.classList.contains("share-chips"))&&_.value?.focus()}return(s,e)=>(l(),o("div",Te,[n("label",{for:t},"Udostępnij osobom"),n("div",{class:"share-field",onClick:q},[C.value.length?(l(),o("ul",Ue,[(l(!0),o(E,null,H(C.value,a=>(l(),o("li",{key:a.id,class:"share-chip"},[n("span",{class:"share-chip-label",title:a.email},f(M(z)(a)),9,De),n("button",{class:"share-chip-remove",type:"button","aria-label":`Usuń ${M(z)(a)}`,onClick:v=>B(a)},[T(se,{name:"close"})],8,je)]))),128))])):m("",!0),Y(n("input",{id:t,ref_key:"input",ref:_,"onUpdate:modelValue":e[0]||(e[0]=a=>c.value=a),class:"share-input",type:"text",role:"combobox","aria-autocomplete":"list","aria-expanded":i.value?"true":"false","aria-controls":w,"aria-activedescendant":S.value,autocomplete:"off",enterkeyhint:"done",placeholder:c.value?void 0:"Imię, nazwisko lub e-mail",onInput:K,onKeydown:R,onBlur:e[1]||(e[1]=a=>i.value=!1)},null,40,Be),[[le,c.value]]),Y(n("ul",{id:w,class:"share-pop",role:"listbox","aria-label":"Pasujące osoby"},[$.value.length?m("",!0):(l(),o("li",Le,f(N.value),1)),(l(!0),o(E,null,H($.value,(a,v)=>(l(),o("li",{id:j(v),key:a.id,class:oe(["share-option",{active:v===u.value}]),role:"option","aria-selected":v===u.value?"true":"false",onMousedown:ae(r=>L(a),["prevent"]),onMousemove:r=>v!==u.value&&(u.value=v)},[n("span",Ee,f(M(z)(a)),1),M(z)(a)!==a.email?(l(),o("span",Ne,f(a.email),1)):m("",!0)],42,Ae))),128))],512),[[ne,i.value]])]),p.modelValue.length?m("",!0):(l(),o("p",Se,"Nikomu nie udostępniono.")),n("span",Ie,f(b.value),1)]))}}),Pe=["href"],qe={class:"muted small"},Fe={key:1},Ze={key:2},He={key:3},We={key:0},Re={class:"btn-row material-actions"},Oe=["href"],Xe={key:1,class:"btn-row author-actions"},Ye=["href","onClick"],Ge=["innerHTML"],Je={key:3,class:"section","aria-labelledby":"files-h"},Qe={class:"rows"},ea=["href","download"],aa={class:"when"},ta={key:4,class:"section no-print","aria-labelledby":"access-h"},sa={class:"card"},la={key:0,class:"notice error",role:"alert"},na={key:1,class:"skeleton","aria-busy":"true"},oa={class:"check"},ia={class:"muted small"},ra={key:0,class:"muted small"},ua={class:"btn-row"},ca=["disabled"],da={key:0,class:"muted small"},va={key:1,class:"muted small",role:"status"},ma={key:1,class:"notice error",role:"alert"},ka=ee({__name:"MaterialView",props:{id:{}},setup(p){const y=p,d=ke(),k=ue(),U=ce(),t=h(null),w=h(""),_=h(null),c=h(""),i=h(""),u=h(!1),b=h([]),D=h(!1);function C(e){_.value=e,u.value=e.is_private,b.value=te(e.shares).map(a=>a.id)}const $=g(()=>{const e=_.value;if(!e)return[];const a=new Set(e.users.map(v=>v.id));return[...e.users,...e.shares.filter(v=>!a.has(v.id))]}),N=g(()=>{const e=_.value;if(!e)return!1;const a=O(u.value,b.value),v=O(e.is_private,e.shares.map(r=>r.id));return a.is_private!==v.is_private||a.user_ids.join(",")!==v.user_ids.join(",")});X(N,e=>{e&&(i.value="")});async function S(e){c.value="";try{C(await F.materialAccess(e))}catch(a){c.value=Z(a)}}async function j(){t.value=null,w.value="",_.value=null,i.value="",c.value="",k.loadMeetings();try{t.value=await F.material(Number(y.id))}catch(e){w.value=Z(e);return}t.value.can_manage&&await S(t.value.id)}async function I(){const e=t.value;if(!(!e||D.value)){D.value=!0,i.value="",c.value="";try{const a=await F.saveMaterialAccess(e.id,O(u.value,b.value));if(t.value!==e)return;C(a),e.is_private=a.is_private,i.value="Zapisano."}catch(a){c.value=Z(a)}finally{D.value=!1}}}de(j),X(()=>y.id,j);const K=g(()=>ze(t.value?.body)),L=g(()=>t.value?.url?Ce(t.value.url):null),B=g(()=>{const e=t.value?.meeting_id;return e==null?null:(k.meetings??[]).find(a=>a.id===e)??null});function P(e){e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),Q(window.history.state?.back,a=>d.resolve(a).name)?d.back():d.push("/materialy"))}function R(){window.print()}const q=h(null);async function s(e){const a=t.value,v=q.value;if(!a||!v)return;let r=!1;await v.open({from:e.currentTarget instanceof HTMLElement?e.currentTarget:null,action:async()=>{try{await F.unpublishMaterial(a.id)}catch(A){if(A instanceof ye&&A.status===404){r=!0;return}throw new Error(`Nie udało się usunąć: ${_e(Z(A))}.`)}}})==="confirm"&&(Me(),U.show(r?"Tego materiału już nie ma w Materiałach.":"Materiał przeniesiony do szkiców."),Q(window.history.state?.back,A=>d.resolve(A).name)?d.back():d.replace("/materialy"))}return(e,a)=>{const v=be("router-link");return l(),o("div",null,[T(ge,{ready:!!t.value,error:w.value,onRetry:a[3]||(a[3]=r=>j())},{default:V(()=>[t.value?(l(),o(E,{key:0},[T(we,{eyebrow:`${M(ve)[t.value.type]}${t.value.published_at?" · "+M(me)(t.value.published_at):""}`,title:t.value.title},{default:V(()=>[T(v,{to:"/materialy",custom:""},{default:V(({href:r})=>[n("a",{class:"btn small ghost",href:r,onClick:P},"← Materiały",8,Pe)]),_:1})]),_:1},8,["eyebrow","title"]),n("p",qe,[t.value.course?(l(),J(v,{key:0,to:`/przedmioty/${t.value.course.id}`},{default:V(()=>[x(f(t.value.course.name),1)]),_:1},8,["to"])):m("",!0),B.value?(l(),o("span",Fe,[a[4]||(a[4]=x(" · ",-1)),T(v,{to:`/plan?zjazd=${B.value.number}`},{default:V(()=>[x(f(M(pe)(B.value)),1)]),_:1},8,["to"])])):m("",!0),t.value.source?(l(),o("span",Ze," · "+f(t.value.source),1)):m("",!0),t.value.is_private?(l(),o("span",He,[...a[5]||(a[5]=[x(" · ",-1),n("span",{class:"badge alert"},"prywatny",-1)])])):m("",!0)]),t.value.tags.length?(l(),o("p",We,[(l(!0),o(E,null,H(t.value.tags,r=>(l(),o("span",{key:r.id,class:"badge",style:{"margin-right":"4px"}},f(r.name),1))),128))])):m("",!0),n("div",Re,[L.value?(l(),o("a",{key:0,class:"btn small",href:L.value,target:"_blank",rel:"noopener noreferrer"},"Otwórz link",8,Oe)):m("",!0),n("button",{class:"btn small",type:"button",onClick:R},"Drukuj"),t.value.can_manage?(l(),o("span",Xe,[T(v,{to:`/materialy/${t.value.id}/edytuj`,custom:""},{default:V(({href:r,navigate:G})=>[n("a",{class:"btn small",href:r,onClick:G},"Edytuj",8,Ye)]),_:1},8,["to"]),n("button",{class:"btn small miss",type:"button",onClick:s},"Usuń")])):m("",!0)]),t.value.can_manage?(l(),J($e,{key:1,ref_key:"removeDialog",ref:q,tone:"danger",title:"Usunąć materiał?","confirm-label":"Usuń materiał","cancel-label":"Zostaw materiał"},{default:V(()=>[x(" „"+f(t.value.title)+"” zniknie z Materiałów u wszystkich, także u Ciebie. Trafi do szkiców: przywrócisz go w /bmadmin albo przez ",1),a[6]||(a[6]=n("code",null,"bm-notatka push",-1)),a[7]||(a[7]=x(". ",-1))]),_:1},512)):m("",!0),K.value?(l(),o("div",{key:2,class:"prose card",innerHTML:K.value},null,8,Ge)):m("",!0),t.value.files.length?(l(),o("section",Je,[a[8]||(a[8]=n("div",{class:"section-head"},[n("h2",{id:"files-h"},"Pliki")],-1)),n("ul",Qe,[(l(!0),o(E,null,H(t.value.files,r=>(l(),o("li",{key:r.id,class:"row-main"},[n("a",{href:r.url,download:r.name},f(r.name),9,ea),n("span",aa,f(M(fe)(r.size)),1)]))),128))])])):m("",!0),t.value.can_manage?(l(),o("section",ta,[a[10]||(a[10]=n("div",{class:"section-head"},[n("h2",{id:"access-h"},"Dostęp")],-1)),n("div",sa,[c.value&&!_.value?(l(),o("div",la,[x(f(c.value)+" ",1),n("button",{class:"linkish",type:"button",onClick:a[0]||(a[0]=r=>S(t.value.id))},"Spróbuj ponownie")])):_.value?(l(),o("form",{key:2,onSubmit:ae(I,["prevent"])},[n("label",oa,[Y(n("input",{"onUpdate:modelValue":a[1]||(a[1]=r=>u.value=r),type:"checkbox"},null,512),[[he,u.value]]),a[9]||(a[9]=n("span",null,"Materiał prywatny",-1))]),n("p",ia,f(u.value?"Widzisz go tylko Ty i osoby, którym go udostępnisz.":"Materiał publiczny: widzą go wszyscy."),1),T(Ke,{modelValue:b.value,"onUpdate:modelValue":a[2]||(a[2]=r=>b.value=r),users:$.value},null,8,["modelValue","users"]),u.value?m("",!0):(l(),o("p",ra,"Udostępnienie działa, gdy materiał jest prywatny.")),n("div",ua,[n("button",{class:"btn small",type:"submit",disabled:D.value},"Zapisz dostęp",8,ca),N.value?(l(),o("span",da,"Niezapisane zmiany.")):i.value?(l(),o("span",va,f(i.value),1)):m("",!0)]),c.value?(l(),o("div",ma,f(c.value),1)):m("",!0)],32)):(l(),o("div",na))])])):m("",!0)],64)):m("",!0)]),_:1},8,["ready","error"])])}}});export{ka as default}; diff --git a/public/assets/MaterialsView-B7ioBi_c.js b/public/assets/MaterialsView-B7ioBi_c.js new file mode 100644 index 0000000..f35045f --- /dev/null +++ b/public/assets/MaterialsView-B7ioBi_c.js @@ -0,0 +1 @@ +import{d as ae,n as a,c as l,t as o,f as m,F as g,E as x,p as N,x as y,ae as re,u as pe,r as _,o as de,U as ce,al as ve,A as me,ap as ye,V as ge,i as fe,b as n,w as $,v as ke,W as _e,h as Y,as as D,e as z,T as G,k as be,m as he,at as we,s as H,j as xe,ar as ze,ag as J,l as qe,au as Se}from"./index-BhVKyY57.js";import{_ as Te}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{r as X,m as U,i as ee,w as A,a as Ce,s as te,n as se}from"./materialListCache-DwqU8sxL.js";function je(f){const u=[];f.lead&&u.push({text:"…",hit:!1});for(const b of f.segments??[])b.text&&u.push({text:b.text,hit:!!b.hit});return f.trail&&u.push({text:"…",hit:!1}),u}function Me(f){if(f.source!=="file")return"";const u=f.file_name?.trim();return u?`z pliku ${u}: `:"z pliku: "}const $e={class:"snippet muted small"},Ne={key:0,class:"snippet-file"},Ve={key:0},Be=ae({__name:"SearchSnippet",props:{snippet:{}},setup(f){const u=f,b=y(()=>je(u.snippet)),h=y(()=>Me(u.snippet));return(q,i)=>(a(),l("p",$e,[h.value?(a(),l("span",Ne,o(h.value),1)):m("",!0),(a(!0),l(g,null,x(b.value,(c,S)=>(a(),l(g,{key:S},[c.hit?(a(),l("mark",Ve,o(c.text),1)):(a(),l(g,{key:1},[N(o(c.text),1)],64))],64))),128))]))}}),Fe={class:"field no-print"},Pe=["onKeydown"],We={class:"field"},De=["value"],Ue={class:"field"},Ae=["value"],Ee={class:"field"},Ke=["value"],Le={key:0,class:"chips wrap no-print",role:"group","aria-label":"Tagi",style:{"margin-bottom":"12px"}},Qe=["aria-pressed","onClick"],Ie={key:2,class:"notice error",role:"alert",style:{"margin-top":"12px"}},Oe={key:3,class:"notice error",role:"alert"},Re={key:4,class:"stack","aria-busy":"true"},Ze={key:0,class:"muted small nums no-print",role:"status","aria-live":"polite",style:{margin:"8px 0 0"}},Ye=["aria-busy"],Ge={class:"row-main"},He={class:"badges"},Je={key:0,class:"badge alert"},Xe={key:1,class:"badge"},et={class:"badge"},tt={class:"muted small",style:{margin:"0"}},st={key:0},at={key:1},lt={key:2},nt={key:1,style:{margin:"6px 0 0"}},it={key:2,class:"empty",style:{"margin-top":"12px"}},ot={style:{margin:"0"}},ut={key:3,class:"empty",style:{"margin-top":"12px"}},rt={key:4,class:"btn-row no-print",style:{"margin-top":"16px","justify-content":"space-between","align-items":"center"},"aria-label":"Strony"},pt=["disabled"],dt={class:"muted small nums"},ct=["disabled"],gt=ae({__name:"MaterialsView",setup(f){const u=re(),b=pe(),h=be(),q=he(),i=_(X(h.query)),c=_(i.value.q),S=s=>`${b.user?.id??0}|${Ce(s)}`,v=_(U.get(S(i.value))??null),p=_(i.value),V=_(!1),T=_(""),B=_(!1),C=_(new Map);function F(s){for(const e of s.data)for(const d of e.tags)C.value.set(d.slug,d);C.value=new Map(C.value)}v.value&&F(v.value),de(()=>{u.loadCourses(),u.loadMeetings(),ee(h.query,i.value)||q.replace({query:A(i.value)}),M()}),ce(()=>h.query,s=>{if(h.name!=="materials")return;const e=X(s);ee(s,e)||q.replace({query:A(e)}),!te(e,i.value)&&(i.value=e,se(c.value)!==e.q&&(c.value=e.q),M())});function k(s){const e={...i.value,...s};Object.keys(s).some(d=>d!=="page")&&(e.page=1),!te(e,i.value)&&(i.value=e,q.replace({query:A(e)}),M())}let j=0;async function M(){const s=++j,e=i.value,d=S(e),t=U.get(d);t&&(v.value=t,p.value=e,F(t)),V.value=!0,T.value="",B.value=!1;try{const r=await ve.materials({q:e.q||null,course:e.course,type:e.type||null,meeting:e.meeting,tag:e.tag||null,page:e.page});if(s!==j)return;U.set(d,r),v.value=r,p.value=e,F(r)}catch(r){if(s!==j)return;e.q&&r instanceof me&&r.status===503?B.value=!0:T.value=ye(r)}finally{s===j&&(V.value=!1)}}let w;function P(){clearTimeout(w),w=void 0,k({q:se(c.value)})}function le(){clearTimeout(w),c.value.trim()?w=setTimeout(P,300):P()}ge(()=>clearTimeout(w));const E=y({get:()=>i.value.course===null?"":String(i.value.course),set:s=>k({course:s?Number(s):null})}),K=y({get:()=>i.value.type,set:s=>k({type:s})}),L=y({get:()=>i.value.meeting===null?"":String(i.value.meeting),set:s=>k({meeting:s?Number(s):null})}),ne=y(()=>Se(u.meetings??[])),ie=y(()=>new Map((u.meetings??[]).map(s=>[s.id,s]))),Q=s=>s.meeting_id===null?void 0:ie.value.get(s.meeting_id);function I(s){k({page:s}),window.scrollTo({top:0})}const O=y(()=>{const s=[...C.value.values()].sort((d,t)=>d.name.localeCompare(t.name,"pl")),e=i.value.tag;return e&&!s.some(d=>d.slug===e)&&s.unshift({id:0,slug:e,name:e}),s}),W=s=>!!(s.q||s.course!==null||s.type||s.meeting!==null||s.tag),oe=y(()=>W(i.value));function R(){clearTimeout(w),c.value="",k({q:"",course:null,type:"",meeting:null,tag:""})}function ue(){clearTimeout(w),c.value="",k({q:""})}const Z=y(()=>{const s=v.value?.meta.total??0;return J(s,"materiał","materiały","materiałów")});return(s,e)=>{const d=qe("router-link");return a(),l("div",null,[fe(Te,{eyebrow:"Notatki, PDF-y, linki",title:"Materiały"}),n("div",Fe,[e[8]||(e[8]=n("label",{for:"f-q"},"Szukaj",-1)),$(n("input",{id:"f-q","onUpdate:modelValue":e[0]||(e[0]=t=>c.value=t),type:"search",enterkeyhint:"search",autocomplete:"off",maxlength:"100",placeholder:"Tytuł, treść, tekst z PDF-ów",onInput:le,onKeydown:_e(Y(P,["prevent"]),["enter"])},null,40,Pe),[[ke,c.value]])]),n("form",{class:"grid-3 no-print",style:{"margin-bottom":"8px"},onSubmit:e[4]||(e[4]=Y(()=>{},["prevent"]))},[n("div",We,[e[10]||(e[10]=n("label",{for:"f-course"},"Przedmiot",-1)),$(n("select",{id:"f-course","onUpdate:modelValue":e[1]||(e[1]=t=>E.value=t)},[e[9]||(e[9]=n("option",{value:""},"Wszystkie",-1)),(a(!0),l(g,null,x(z(u).visibleCourses,t=>(a(),l("option",{key:t.id,value:String(t.id)},o(t.name)+" ("+o(t.form==="wyklad"?"wykład":t.form==="cwiczenia"?"ćwiczenia":t.form)+")",9,De))),128))],512),[[D,E.value]])]),n("div",Ue,[e[12]||(e[12]=n("label",{for:"f-type"},"Rodzaj",-1)),$(n("select",{id:"f-type","onUpdate:modelValue":e[2]||(e[2]=t=>K.value=t)},[e[11]||(e[11]=n("option",{value:""},"Wszystkie",-1)),(a(!0),l(g,null,x(z(G),(t,r)=>(a(),l("option",{key:r,value:r},o(t),9,Ae))),128))],512),[[D,K.value]])]),n("div",Ee,[e[14]||(e[14]=n("label",{for:"f-meeting"},"Zjazd",-1)),$(n("select",{id:"f-meeting","onUpdate:modelValue":e[3]||(e[3]=t=>L.value=t)},[e[13]||(e[13]=n("option",{value:""},"Wszystkie",-1)),(a(!0),l(g,null,x(ne.value,t=>(a(),l("option",{key:t.id,value:String(t.id)},o(z(we)(t)),9,Ke))),128))],512),[[D,L.value]])])],32),O.value.length?(a(),l("div",Le,[(a(!0),l(g,null,x(O.value,t=>(a(),l("button",{key:t.slug,class:"chip",type:"button","aria-pressed":i.value.tag===t.slug,onClick:r=>k({tag:i.value.tag===t.slug?"":t.slug})},o(t.name),9,Qe))),128))])):m("",!0),oe.value?(a(),l("button",{key:1,class:"linkish small no-print",type:"button",onClick:R},"Wyczyść filtry")):m("",!0),B.value?(a(),l("div",Ie,[e[15]||(e[15]=N("Wyszukiwarka jest teraz niedostępna. Filtry działają bez niej. ",-1)),n("button",{class:"linkish",type:"button",onClick:ue},"Wyczyść wyszukiwanie")])):T.value?(a(),l("div",Oe,[N(o(T.value)+" ",1),n("button",{class:"linkish",type:"button",onClick:e[5]||(e[5]=t=>M())},"Spróbuj ponownie")])):v.value?(a(),l(g,{key:5},[W(p.value)&&v.value.data.length?(a(),l("p",Ze,o(p.value.q?`Znaleziono ${Z.value} · od najtrafniejszych`:Z.value),1)):m("",!0),v.value.data.length?(a(),l("div",{key:1,class:"stack",style:{"margin-top":"12px"},"aria-busy":V.value},[(a(!0),l(g,null,x(v.value.data,t=>(a(),H(d,{key:t.id,to:`/materialy/${t.id}`,class:"card link"},{default:xe(()=>[n("div",Ge,[n("h3",null,o(t.title),1),n("span",He,[t.is_private?(a(),l("span",Je,"prywatny")):m("",!0),Q(t)?(a(),l("span",Xe,"Zjazd "+o(Q(t).number),1)):m("",!0),n("span",et,o(z(G)[t.type]),1)])]),n("p",tt,[t.course?(a(),l("span",st,o(t.course.name),1)):m("",!0),t.published_at?(a(),l("span",at," · "+o(z(ze)(t.published_at)),1)):m("",!0),t.files_count?(a(),l("span",lt," · "+o(z(J)(t.files_count,"plik","pliki","plików")),1)):m("",!0)]),p.value.q&&t.snippet?(a(),H(Be,{key:0,snippet:t.snippet},null,8,["snippet"])):m("",!0),t.tags.length?(a(),l("p",nt,[(a(!0),l(g,null,x(t.tags,r=>(a(),l("span",{key:r.id,class:"badge",style:{"margin-right":"4px"}},o(r.name),1))),128))])):m("",!0)]),_:2},1032,["to"]))),128))],8,Ye)):p.value.q?(a(),l("div",it,[n("p",ot,"Nic nie znaleziono dla „"+o(p.value.q)+"”.",1),n("p",{class:"small",style:{margin:"4px 0 0"}},[e[17]||(e[17]=N("Sprawdź pisownię albo zmień filtry. ",-1)),n("button",{class:"linkish",type:"button",onClick:R},"Wyczyść filtry")])])):(a(),l("p",ut,o(W(p.value)?"Nic nie pasuje do filtrów.":"Nie ma jeszcze żadnych materiałów."),1)),v.value.meta.last_page>1?(a(),l("nav",rt,[n("button",{class:"btn small",type:"button",disabled:p.value.page<=1,onClick:e[6]||(e[6]=t=>I(p.value.page-1))},"← Poprzednia",8,pt),n("span",dt,o(p.value.page)+" / "+o(v.value.meta.last_page),1),n("button",{class:"btn small",type:"button",disabled:p.value.page>=v.value.meta.last_page,onClick:e[7]||(e[7]=t=>I(p.value.page+1))},"Następna →",8,ct)])):m("",!0)],64)):(a(),l("div",Re,[...e[16]||(e[16]=[n("div",{class:"skeleton"},null,-1),n("div",{class:"skeleton"},null,-1)])]))])}}});export{gt as default}; diff --git a/public/assets/MaterialsView-YleScEIL.js b/public/assets/MaterialsView-YleScEIL.js deleted file mode 100644 index f2b30eb..0000000 --- a/public/assets/MaterialsView-YleScEIL.js +++ /dev/null @@ -1 +0,0 @@ -import{d as ae,n as a,c as n,t as i,f as m,F as g,E as x,p as N,x as y,ae as re,u as pe,r as _,o as de,U as ce,al as ve,A as me,ap as ye,V as ge,i as fe,b as l,w as $,v as ke,W as _e,h as Y,as as D,e as z,T as G,k as be,m as he,at as we,s as H,j as xe,ar as ze,ag as J,l as qe,au as Se}from"./index-CtNAsql9.js";import{_ as Ce}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{r as X,i as ee,w as U,m as Te,s as te,n as se,b as je}from"./materialQuery-Co-XzH2C.js";function Me(f){const u=[];f.lead&&u.push({text:"…",hit:!1});for(const b of f.segments??[])b.text&&u.push({text:b.text,hit:!!b.hit});return f.trail&&u.push({text:"…",hit:!1}),u}function $e(f){if(f.source!=="file")return"";const u=f.file_name?.trim();return u?`z pliku ${u}: `:"z pliku: "}const Ne={class:"snippet muted small"},Ve={key:0,class:"snippet-file"},Be={key:0},Fe=ae({__name:"SearchSnippet",props:{snippet:{}},setup(f){const u=f,b=y(()=>Me(u.snippet)),h=y(()=>$e(u.snippet));return(q,o)=>(a(),n("p",Ne,[h.value?(a(),n("span",Ve,i(h.value),1)):m("",!0),(a(!0),n(g,null,x(b.value,(c,S)=>(a(),n(g,{key:S},[c.hit?(a(),n("mark",Be,i(c.text),1)):(a(),n(g,{key:1},[N(i(c.text),1)],64))],64))),128))]))}}),We={class:"field no-print"},Pe=["onKeydown"],De={class:"field"},Ue=["value"],Ae={class:"field"},Ee=["value"],Ke={class:"field"},Le=["value"],Qe={key:0,class:"chips wrap no-print",role:"group","aria-label":"Tagi",style:{"margin-bottom":"12px"}},Ie=["aria-pressed","onClick"],Oe={key:2,class:"notice error",role:"alert",style:{"margin-top":"12px"}},Re={key:3,class:"notice error",role:"alert"},Ze={key:4,class:"stack","aria-busy":"true"},Ye={key:0,class:"muted small nums no-print",role:"status","aria-live":"polite",style:{margin:"8px 0 0"}},Ge=["aria-busy"],He={class:"row-main"},Je={class:"badges"},Xe={key:0,class:"badge alert"},et={key:1,class:"badge"},tt={class:"badge"},st={class:"muted small",style:{margin:"0"}},at={key:0},nt={key:1},lt={key:2},ot={key:1,style:{margin:"6px 0 0"}},it={key:2,class:"empty",style:{"margin-top":"12px"}},ut={style:{margin:"0"}},rt={key:3,class:"empty",style:{"margin-top":"12px"}},pt={key:4,class:"btn-row no-print",style:{"margin-top":"16px","justify-content":"space-between","align-items":"center"},"aria-label":"Strony"},dt=["disabled"],ct={class:"muted small nums"},vt=["disabled"],A=je(20),ft=ae({__name:"MaterialsView",setup(f){const u=re(),b=pe(),h=be(),q=he(),o=_(X(h.query)),c=_(o.value.q),S=s=>`${b.user?.id??0}|${Te(s)}`,v=_(A.get(S(o.value))??null),p=_(o.value),V=_(!1),C=_(""),B=_(!1),T=_(new Map);function F(s){for(const e of s.data)for(const d of e.tags)T.value.set(d.slug,d);T.value=new Map(T.value)}v.value&&F(v.value),de(()=>{u.loadCourses(),u.loadMeetings(),ee(h.query,o.value)||q.replace({query:U(o.value)}),M()}),ce(()=>h.query,s=>{if(h.name!=="materials")return;const e=X(s);ee(s,e)||q.replace({query:U(e)}),!te(e,o.value)&&(o.value=e,se(c.value)!==e.q&&(c.value=e.q),M())});function k(s){const e={...o.value,...s};Object.keys(s).some(d=>d!=="page")&&(e.page=1),!te(e,o.value)&&(o.value=e,q.replace({query:U(e)}),M())}let j=0;async function M(){const s=++j,e=o.value,d=S(e),t=A.get(d);t&&(v.value=t,p.value=e,F(t)),V.value=!0,C.value="",B.value=!1;try{const r=await ve.materials({q:e.q||null,course:e.course,type:e.type||null,meeting:e.meeting,tag:e.tag||null,page:e.page});if(s!==j)return;A.set(d,r),v.value=r,p.value=e,F(r)}catch(r){if(s!==j)return;e.q&&r instanceof me&&r.status===503?B.value=!0:C.value=ye(r)}finally{s===j&&(V.value=!1)}}let w;function W(){clearTimeout(w),w=void 0,k({q:se(c.value)})}function ne(){clearTimeout(w),c.value.trim()?w=setTimeout(W,300):W()}ge(()=>clearTimeout(w));const E=y({get:()=>o.value.course===null?"":String(o.value.course),set:s=>k({course:s?Number(s):null})}),K=y({get:()=>o.value.type,set:s=>k({type:s})}),L=y({get:()=>o.value.meeting===null?"":String(o.value.meeting),set:s=>k({meeting:s?Number(s):null})}),le=y(()=>Se(u.meetings??[])),oe=y(()=>new Map((u.meetings??[]).map(s=>[s.id,s]))),Q=s=>s.meeting_id===null?void 0:oe.value.get(s.meeting_id);function I(s){k({page:s}),window.scrollTo({top:0})}const O=y(()=>{const s=[...T.value.values()].sort((d,t)=>d.name.localeCompare(t.name,"pl")),e=o.value.tag;return e&&!s.some(d=>d.slug===e)&&s.unshift({id:0,slug:e,name:e}),s}),P=s=>!!(s.q||s.course!==null||s.type||s.meeting!==null||s.tag),ie=y(()=>P(o.value));function R(){clearTimeout(w),c.value="",k({q:"",course:null,type:"",meeting:null,tag:""})}function ue(){clearTimeout(w),c.value="",k({q:""})}const Z=y(()=>{const s=v.value?.meta.total??0;return J(s,"materiał","materiały","materiałów")});return(s,e)=>{const d=qe("router-link");return a(),n("div",null,[fe(Ce,{eyebrow:"Notatki, PDF-y, linki",title:"Materiały"}),l("div",We,[e[8]||(e[8]=l("label",{for:"f-q"},"Szukaj",-1)),$(l("input",{id:"f-q","onUpdate:modelValue":e[0]||(e[0]=t=>c.value=t),type:"search",enterkeyhint:"search",autocomplete:"off",maxlength:"100",placeholder:"Tytuł, treść, tekst z PDF-ów",onInput:ne,onKeydown:_e(Y(W,["prevent"]),["enter"])},null,40,Pe),[[ke,c.value]])]),l("form",{class:"grid-3 no-print",style:{"margin-bottom":"8px"},onSubmit:e[4]||(e[4]=Y(()=>{},["prevent"]))},[l("div",De,[e[10]||(e[10]=l("label",{for:"f-course"},"Przedmiot",-1)),$(l("select",{id:"f-course","onUpdate:modelValue":e[1]||(e[1]=t=>E.value=t)},[e[9]||(e[9]=l("option",{value:""},"Wszystkie",-1)),(a(!0),n(g,null,x(z(u).visibleCourses,t=>(a(),n("option",{key:t.id,value:String(t.id)},i(t.name)+" ("+i(t.form==="wyklad"?"wykład":t.form==="cwiczenia"?"ćwiczenia":t.form)+")",9,Ue))),128))],512),[[D,E.value]])]),l("div",Ae,[e[12]||(e[12]=l("label",{for:"f-type"},"Rodzaj",-1)),$(l("select",{id:"f-type","onUpdate:modelValue":e[2]||(e[2]=t=>K.value=t)},[e[11]||(e[11]=l("option",{value:""},"Wszystkie",-1)),(a(!0),n(g,null,x(z(G),(t,r)=>(a(),n("option",{key:r,value:r},i(t),9,Ee))),128))],512),[[D,K.value]])]),l("div",Ke,[e[14]||(e[14]=l("label",{for:"f-meeting"},"Zjazd",-1)),$(l("select",{id:"f-meeting","onUpdate:modelValue":e[3]||(e[3]=t=>L.value=t)},[e[13]||(e[13]=l("option",{value:""},"Wszystkie",-1)),(a(!0),n(g,null,x(le.value,t=>(a(),n("option",{key:t.id,value:String(t.id)},i(z(we)(t)),9,Le))),128))],512),[[D,L.value]])])],32),O.value.length?(a(),n("div",Qe,[(a(!0),n(g,null,x(O.value,t=>(a(),n("button",{key:t.slug,class:"chip",type:"button","aria-pressed":o.value.tag===t.slug,onClick:r=>k({tag:o.value.tag===t.slug?"":t.slug})},i(t.name),9,Ie))),128))])):m("",!0),ie.value?(a(),n("button",{key:1,class:"linkish small no-print",type:"button",onClick:R},"Wyczyść filtry")):m("",!0),B.value?(a(),n("div",Oe,[e[15]||(e[15]=N("Wyszukiwarka jest teraz niedostępna. Filtry działają bez niej. ",-1)),l("button",{class:"linkish",type:"button",onClick:ue},"Wyczyść wyszukiwanie")])):C.value?(a(),n("div",Re,[N(i(C.value)+" ",1),l("button",{class:"linkish",type:"button",onClick:e[5]||(e[5]=t=>M())},"Spróbuj ponownie")])):v.value?(a(),n(g,{key:5},[P(p.value)&&v.value.data.length?(a(),n("p",Ye,i(p.value.q?`Znaleziono ${Z.value} · od najtrafniejszych`:Z.value),1)):m("",!0),v.value.data.length?(a(),n("div",{key:1,class:"stack",style:{"margin-top":"12px"},"aria-busy":V.value},[(a(!0),n(g,null,x(v.value.data,t=>(a(),H(d,{key:t.id,to:`/materialy/${t.id}`,class:"card link"},{default:xe(()=>[l("div",He,[l("h3",null,i(t.title),1),l("span",Je,[t.is_private?(a(),n("span",Xe,"prywatny")):m("",!0),Q(t)?(a(),n("span",et,"Zjazd "+i(Q(t).number),1)):m("",!0),l("span",tt,i(z(G)[t.type]),1)])]),l("p",st,[t.course?(a(),n("span",at,i(t.course.name),1)):m("",!0),t.published_at?(a(),n("span",nt," · "+i(z(ze)(t.published_at)),1)):m("",!0),t.files_count?(a(),n("span",lt," · "+i(z(J)(t.files_count,"plik","pliki","plików")),1)):m("",!0)]),p.value.q&&t.snippet?(a(),H(Fe,{key:0,snippet:t.snippet},null,8,["snippet"])):m("",!0),t.tags.length?(a(),n("p",ot,[(a(!0),n(g,null,x(t.tags,r=>(a(),n("span",{key:r.id,class:"badge",style:{"margin-right":"4px"}},i(r.name),1))),128))])):m("",!0)]),_:2},1032,["to"]))),128))],8,Ge)):p.value.q?(a(),n("div",it,[l("p",ut,"Nic nie znaleziono dla „"+i(p.value.q)+"”.",1),l("p",{class:"small",style:{margin:"4px 0 0"}},[e[17]||(e[17]=N("Sprawdź pisownię albo zmień filtry. ",-1)),l("button",{class:"linkish",type:"button",onClick:R},"Wyczyść filtry")])])):(a(),n("p",rt,i(P(p.value)?"Nic nie pasuje do filtrów.":"Nie ma jeszcze żadnych materiałów."),1)),v.value.meta.last_page>1?(a(),n("nav",pt,[l("button",{class:"btn small",type:"button",disabled:p.value.page<=1,onClick:e[6]||(e[6]=t=>I(p.value.page-1))},"← Poprzednia",8,dt),l("span",ct,i(p.value.page)+" / "+i(v.value.meta.last_page),1),l("button",{class:"btn small",type:"button",disabled:p.value.page>=v.value.meta.last_page,onClick:e[7]||(e[7]=t=>I(p.value.page+1))},"Następna →",8,vt)])):m("",!0)],64)):(a(),n("div",Ze,[...e[16]||(e[16]=[l("div",{class:"skeleton"},null,-1),l("div",{class:"skeleton"},null,-1)])]))])}}});export{ft as default}; diff --git a/public/assets/MoreView-BWCniPfN.js b/public/assets/MoreView-dMwsCkkj.js similarity index 73% rename from public/assets/MoreView-BWCniPfN.js rename to public/assets/MoreView-dMwsCkkj.js index 4895aa6..f6c623a 100644 --- a/public/assets/MoreView-BWCniPfN.js +++ b/public/assets/MoreView-dMwsCkkj.js @@ -1 +1 @@ -import{_ as b}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{d as z,u as h,aD as k,aE as _,c as i,i as s,b as t,F as w,E as g,e as n,f,t as l,x as j,n as o,s as v,j as x,l as P,_ as p}from"./index-CtNAsql9.js";const C={class:"stack"},B={class:"row-main",style:{"align-items":"center"}},D={class:"muted small"},N={class:"row-main",style:{"align-items":"center"}},L=z({__name:"MoreView",setup(V){const r=h(),c=k(),m=_(),u=[{to:"/terminarz",label:"Terminarz",hint:"Zaliczenia, egzaminy, sprawy organizacyjne",icon:"flag"},{to:"/przedmioty",label:"Przedmioty",hint:"Program studiów, prowadzący, materiały",icon:"grad"},{to:"/lektury",label:"Lektury",hint:"Lista lektur i postęp czytania",icon:"book"},{to:"/quizy",label:"Quizy",hint:"Sprawdź się przed zajęciami",icon:"quiz"},{to:"/sylabusy",label:"Sylabusy",hint:"Karty przedmiotów do pobrania (PDF)",icon:"file"},{to:"/moje-prezentacje",label:"Moje prezentacje",hint:"Wersje prelegenta i linki publiczne",icon:"slides"},{to:"/profil",label:"Profil",hint:"Dane, hasło, wybór przedmiotów",icon:"user"}],d=j(()=>m?[{to:"/pilot",label:"Pilot",hint:"Ostatnia prezentacja otwierana na tym urządzeniu",icon:"slides"},...u]:u);return($,e)=>{const y=P("router-link");return o(),i("div",null,[s(b,{eyebrow:"Pozostałe",title:"Więcej"}),t("div",C,[(o(!0),i(w,null,g(d.value,a=>(o(),v(y,{key:a.to,to:a.to,class:"card link"},{default:x(()=>[t("div",B,[t("div",null,[t("h3",null,l(a.label),1),t("span",D,l(a.hint),1)]),s(p,{name:"chevron",style:{width:"20px",height:"20px"}})])]),_:2},1032,["to"]))),128)),n(c).canInstall?(o(),i("button",{key:0,type:"button",class:"card link",onClick:e[0]||(e[0]=a=>n(c).install())},[t("div",N,[e[2]||(e[2]=t("div",null,[t("h3",null,"Zainstaluj aplikację"),t("span",{class:"muted small"},"Ikona na ekranie głównym i szybki dostęp do pilota")],-1)),s(p,{name:"chevron",style:{width:"20px",height:"20px"}})])])):f("",!0),t("button",{class:"btn miss",type:"button",onClick:e[1]||(e[1]=a=>n(r).logout())},"Wyloguj ("+l(n(r).displayName)+")",1)])])}}});export{L as default}; +import{_ as b}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{d as z,u as h,aX as k,aY as _,c as i,i as s,b as t,F as w,E as g,e as n,f,t as l,x as j,n as o,s as v,j as x,l as P,_ as p}from"./index-BhVKyY57.js";const C={class:"stack"},B={class:"row-main",style:{"align-items":"center"}},N={class:"muted small"},V={class:"row-main",style:{"align-items":"center"}},S=z({__name:"MoreView",setup($){const r=h(),c=k(),m=_(),u=[{to:"/terminarz",label:"Terminarz",hint:"Zaliczenia, egzaminy, sprawy organizacyjne",icon:"flag"},{to:"/przedmioty",label:"Przedmioty",hint:"Program studiów, prowadzący, materiały",icon:"grad"},{to:"/lektury",label:"Lektury",hint:"Lista lektur i postęp czytania",icon:"book"},{to:"/quizy",label:"Quizy",hint:"Sprawdź się przed zajęciami",icon:"quiz"},{to:"/sylabusy",label:"Sylabusy",hint:"Karty przedmiotów do pobrania (PDF)",icon:"file"},{to:"/moje-prezentacje",label:"Moje prezentacje",hint:"Wersje prelegenta i linki publiczne",icon:"slides"},{to:"/profil",label:"Profil",hint:"Dane, hasło, wybór przedmiotów",icon:"user"}],d=j(()=>m?[{to:"/pilot",label:"Pilot",hint:"Ostatnia prezentacja otwierana na tym urządzeniu",icon:"slides"},...u]:u);return(D,e)=>{const y=P("router-link");return o(),i("div",null,[s(b,{eyebrow:"Pozostałe",title:"Więcej"}),t("div",C,[(o(!0),i(w,null,g(d.value,a=>(o(),v(y,{key:a.to,to:a.to,class:"card link"},{default:x(()=>[t("div",B,[t("div",null,[t("h3",null,l(a.label),1),t("span",N,l(a.hint),1)]),s(p,{name:"chevron",style:{width:"20px",height:"20px"}})])]),_:2},1032,["to"]))),128)),n(c).canInstall?(o(),i("button",{key:0,type:"button",class:"card link",onClick:e[0]||(e[0]=a=>n(c).install())},[t("div",V,[e[2]||(e[2]=t("div",null,[t("h3",null,"Zainstaluj aplikację"),t("span",{class:"muted small"},"Ikona na ekranie głównym i szybki dostęp do pilota")],-1)),s(p,{name:"chevron",style:{width:"20px",height:"20px"}})])])):f("",!0),t("button",{class:"btn miss",type:"button",onClick:e[1]||(e[1]=a=>n(r).logout())},"Wyloguj ("+l(n(r).displayName)+")",1)])])}}});export{S as default}; diff --git a/public/assets/MyPresentationsView-Dsu-fTaU.js b/public/assets/MyPresentationsView-CqFZqvMF.js similarity index 94% rename from public/assets/MyPresentationsView-Dsu-fTaU.js rename to public/assets/MyPresentationsView-CqFZqvMF.js index 6618b1f..59cb500 100644 --- a/public/assets/MyPresentationsView-Dsu-fTaU.js +++ b/public/assets/MyPresentationsView-CqFZqvMF.js @@ -1 +1 @@ -import{d as q,o as L,c as n,i as b,f as y,t as c,j as w,b as s,p as i,F as x,k as O,m as F,r,ap as C,n as l,E as H,ag as Z,Z as A,l as I}from"./index-CtNAsql9.js";import{_ as S}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as G}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{p as T}from"./presentations-G0Dt4vNe.js";const J={key:0,class:"notice error",role:"alert"},K={key:1,class:"notice",role:"status"},Q={key:0,class:"stack"},W={class:"small muted",style:{display:"flex","flex-wrap":"wrap","align-items":"center",gap:"8px",margin:"4px 0 0"}},X={key:0,class:"badge online"},Y={key:1,class:"badge"},ee={style:{display:"flex","flex-wrap":"wrap",gap:"8px","margin-top":"14px"}},te=["href"],se=["href"],ae={key:1,class:"muted small",style:{margin:"0"}},ne=["onClick"],le={class:"sr-only"},oe={key:1,class:"empty"},re={id:"deck-delete-b",class:"chat-confirm-body"},ie={key:0,class:"error-text",role:"alert"},ue={class:"btn-row chat-confirm-buttons"},ce=["aria-busy","disabled"],de=["disabled"],_e=q({__name:"MyPresentationsView",setup(pe){const g=O(),M=F(),u=r(null),k=r(""),z=r(!1),_=r(""),m=r(null),j=r(null),d=r(null),o=r(!1),p=r("");let f=null;function N(t){const e=Z(t.slide_count,"slajd","slajdy","slajdów");return t.total_seconds===0?e:`${e} · ${Math.round(t.total_seconds/60)} min`}function $(t){return`/moje-prezentacje/${encodeURIComponent(t)}`}async function h(){k.value="";try{u.value=await T.mine()}catch(t){u.value=null,k.value=C(t)}}function B(t,e){d.value=t,p.value="",o.value=!1,f=e.currentTarget instanceof HTMLElement?e.currentTarget:null,m.value?.showModal(),A(()=>j.value?.focus())}function v(){m.value?.close()}function D(t){o.value&&t.preventDefault()}function U(){f?.isConnected&&f.focus(),f=null,d.value=null}function V(t){t.target===m.value&&!o.value&&v()}async function E(){const t=d.value;if(!(!t||o.value)){o.value=!0,p.value="";try{await T.deleteMine(t.slug)}catch(e){o.value=!1,p.value=C(e);return}o.value=!1,u.value=u.value?.filter(e=>e.slug!==t.slug)??null,_.value=`Usunięto prezentację „${t.title}”.`,f=null,v()}}return L(()=>{if(g.query.denied==="1"){z.value=!0;const t={...g.query};delete t.denied,M.replace({name:"my-presentations",query:t})}h()}),(t,e)=>{const P=I("router-link");return l(),n("div",null,[b(S,{eyebrow:"Dla prelegenta",title:"Moje prezentacje"}),z.value?(l(),n("p",J," Nie masz dostępu do tej prezentacji albo taka prezentacja nie istnieje. Poniżej są prezentacje przypisane do Twojego konta. ")):y("",!0),_.value?(l(),n("p",K,c(_.value),1)):y("",!0),b(G,{ready:u.value!==null,error:k.value,onRetry:e[0]||(e[0]=a=>h())},{default:w(()=>[u.value?.length?(l(),n("div",Q,[(l(!0),n(x,null,H(u.value,a=>(l(),n("article",{key:a.slug,class:"card accent"},[s("h3",null,c(a.title),1),s("p",W,[s("span",null,c(N(a)),1),a.is_published?(l(),n("span",X,"Opublikowana")):(l(),n("span",Y,"Nieopublikowana"))]),s("div",ee,[b(P,{class:"btn",to:{name:"presentation-remote",params:{slug:a.slug}}},{default:w(()=>[...e[1]||(e[1]=[i(" Pilot ",-1),s("span",{class:"sr-only"},"(otwórz na telefonie)",-1)])]),_:1},8,["to"]),s("a",{class:"btn primary",href:$(a.slug),target:"_blank",rel:"opener"},[...e[2]||(e[2]=[i(" Otwórz wersję prelegenta ",-1),s("span",{class:"sr-only"},"(otwiera się w nowej karcie)",-1)])],8,te),a.is_published&&a.public_path?(l(),n("a",{key:0,class:"btn",href:a.public_path,target:"_blank",rel:"noopener noreferrer"},[...e[3]||(e[3]=[i(" Otwórz wersję publiczną ",-1),s("span",{class:"sr-only"},"(otwiera się w nowej karcie)",-1)])],8,se)):a.is_published?y("",!0):(l(),n("p",ae,"Link publiczny zacznie działać po opublikowaniu prezentacji.")),s("button",{class:"btn ghost",type:"button",style:{"margin-left":"auto"},onClick:R=>B(a,R)},[e[4]||(e[4]=i(" Usuń ",-1)),s("span",le,"prezentację "+c(a.title),1)],8,ne)])]))),128))])):(l(),n("p",oe,[...e[5]||(e[5]=[s("span",{class:"title",style:{display:"block",color:"var(--ink)"}},"Nie masz jeszcze żadnych prezentacji.",-1),i(" Pojawią się tutaj, gdy administrator przypisze prezentację do Twojego konta. ",-1)])]))]),_:1},8,["ready","error"]),s("dialog",{ref_key:"dialog",ref:m,class:"chat-dialog chat-confirm","aria-labelledby":"deck-delete-h","aria-describedby":"deck-delete-b",onCancel:D,onClose:U,onClick:V},[e[7]||(e[7]=s("h2",{id:"deck-delete-h",class:"chat-dialog-title"},"Usunąć prezentację?",-1)),s("p",re,[i(" „"+c(d.value?.title)+"” zniknie razem ze wszystkimi slajdami i obrazkami",1),d.value?.is_published?(l(),n(x,{key:0},[i(", a link publiczny przestanie działać")],64)):y("",!0),e[6]||(e[6]=i(". Tego nie można cofnąć z aplikacji. ",-1))]),p.value?(l(),n("p",ie,c(p.value),1)):y("",!0),s("div",ue,[s("button",{class:"btn danger",type:"button","aria-busy":o.value?"true":void 0,disabled:o.value,onClick:E},"Usuń prezentację",8,ce),s("button",{ref_key:"keepBtn",ref:j,class:"btn ghost",type:"button",disabled:o.value,onClick:v},"Zostaw",8,de)])],544)])}}});export{_e as default}; +import{d as q,o as L,c as n,i as b,f as y,t as c,j as w,b as s,p as i,F as x,k as O,m as F,r,ap as C,n as l,E as H,ag as Z,Z as A,l as I}from"./index-BhVKyY57.js";import{_ as S}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as G}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{p as T}from"./presentations-CsatGkk7.js";const J={key:0,class:"notice error",role:"alert"},K={key:1,class:"notice",role:"status"},Q={key:0,class:"stack"},W={class:"small muted",style:{display:"flex","flex-wrap":"wrap","align-items":"center",gap:"8px",margin:"4px 0 0"}},X={key:0,class:"badge online"},Y={key:1,class:"badge"},ee={style:{display:"flex","flex-wrap":"wrap",gap:"8px","margin-top":"14px"}},te=["href"],se=["href"],ae={key:1,class:"muted small",style:{margin:"0"}},ne=["onClick"],le={class:"sr-only"},oe={key:1,class:"empty"},re={id:"deck-delete-b",class:"chat-confirm-body"},ie={key:0,class:"error-text",role:"alert"},ue={class:"btn-row chat-confirm-buttons"},ce=["aria-busy","disabled"],de=["disabled"],_e=q({__name:"MyPresentationsView",setup(pe){const g=O(),M=F(),u=r(null),k=r(""),z=r(!1),_=r(""),m=r(null),j=r(null),d=r(null),o=r(!1),p=r("");let f=null;function N(t){const e=Z(t.slide_count,"slajd","slajdy","slajdów");return t.total_seconds===0?e:`${e} · ${Math.round(t.total_seconds/60)} min`}function $(t){return`/moje-prezentacje/${encodeURIComponent(t)}`}async function h(){k.value="";try{u.value=await T.mine()}catch(t){u.value=null,k.value=C(t)}}function B(t,e){d.value=t,p.value="",o.value=!1,f=e.currentTarget instanceof HTMLElement?e.currentTarget:null,m.value?.showModal(),A(()=>j.value?.focus())}function v(){m.value?.close()}function D(t){o.value&&t.preventDefault()}function U(){f?.isConnected&&f.focus(),f=null,d.value=null}function V(t){t.target===m.value&&!o.value&&v()}async function E(){const t=d.value;if(!(!t||o.value)){o.value=!0,p.value="";try{await T.deleteMine(t.slug)}catch(e){o.value=!1,p.value=C(e);return}o.value=!1,u.value=u.value?.filter(e=>e.slug!==t.slug)??null,_.value=`Usunięto prezentację „${t.title}”.`,f=null,v()}}return L(()=>{if(g.query.denied==="1"){z.value=!0;const t={...g.query};delete t.denied,M.replace({name:"my-presentations",query:t})}h()}),(t,e)=>{const P=I("router-link");return l(),n("div",null,[b(S,{eyebrow:"Dla prelegenta",title:"Moje prezentacje"}),z.value?(l(),n("p",J," Nie masz dostępu do tej prezentacji albo taka prezentacja nie istnieje. Poniżej są prezentacje przypisane do Twojego konta. ")):y("",!0),_.value?(l(),n("p",K,c(_.value),1)):y("",!0),b(G,{ready:u.value!==null,error:k.value,onRetry:e[0]||(e[0]=a=>h())},{default:w(()=>[u.value?.length?(l(),n("div",Q,[(l(!0),n(x,null,H(u.value,a=>(l(),n("article",{key:a.slug,class:"card accent"},[s("h3",null,c(a.title),1),s("p",W,[s("span",null,c(N(a)),1),a.is_published?(l(),n("span",X,"Opublikowana")):(l(),n("span",Y,"Nieopublikowana"))]),s("div",ee,[b(P,{class:"btn",to:{name:"presentation-remote",params:{slug:a.slug}}},{default:w(()=>[...e[1]||(e[1]=[i(" Pilot ",-1),s("span",{class:"sr-only"},"(otwórz na telefonie)",-1)])]),_:1},8,["to"]),s("a",{class:"btn primary",href:$(a.slug),target:"_blank",rel:"opener"},[...e[2]||(e[2]=[i(" Otwórz wersję prelegenta ",-1),s("span",{class:"sr-only"},"(otwiera się w nowej karcie)",-1)])],8,te),a.is_published&&a.public_path?(l(),n("a",{key:0,class:"btn",href:a.public_path,target:"_blank",rel:"noopener noreferrer"},[...e[3]||(e[3]=[i(" Otwórz wersję publiczną ",-1),s("span",{class:"sr-only"},"(otwiera się w nowej karcie)",-1)])],8,se)):a.is_published?y("",!0):(l(),n("p",ae,"Link publiczny zacznie działać po opublikowaniu prezentacji.")),s("button",{class:"btn ghost",type:"button",style:{"margin-left":"auto"},onClick:R=>B(a,R)},[e[4]||(e[4]=i(" Usuń ",-1)),s("span",le,"prezentację "+c(a.title),1)],8,ne)])]))),128))])):(l(),n("p",oe,[...e[5]||(e[5]=[s("span",{class:"title",style:{display:"block",color:"var(--ink)"}},"Nie masz jeszcze żadnych prezentacji.",-1),i(" Pojawią się tutaj, gdy administrator przypisze prezentację do Twojego konta. ",-1)])]))]),_:1},8,["ready","error"]),s("dialog",{ref_key:"dialog",ref:m,class:"chat-dialog chat-confirm","aria-labelledby":"deck-delete-h","aria-describedby":"deck-delete-b",onCancel:D,onClose:U,onClick:V},[e[7]||(e[7]=s("h2",{id:"deck-delete-h",class:"chat-dialog-title"},"Usunąć prezentację?",-1)),s("p",re,[i(" „"+c(d.value?.title)+"” zniknie razem ze wszystkimi slajdami i obrazkami",1),d.value?.is_published?(l(),n(x,{key:0},[i(", a link publiczny przestanie działać")],64)):y("",!0),e[6]||(e[6]=i(". Tego nie można cofnąć z aplikacji. ",-1))]),p.value?(l(),n("p",ie,c(p.value),1)):y("",!0),s("div",ue,[s("button",{class:"btn danger",type:"button","aria-busy":o.value?"true":void 0,disabled:o.value,onClick:E},"Usuń prezentację",8,ce),s("button",{ref_key:"keepBtn",ref:j,class:"btn ghost",type:"button",disabled:o.value,onClick:v},"Zostaw",8,de)])],544)])}}});export{_e as default}; diff --git a/public/assets/NotFoundView-C3HgwQgy.js b/public/assets/NotFoundView-BpgWb5cH.js similarity index 87% rename from public/assets/NotFoundView-C3HgwQgy.js rename to public/assets/NotFoundView-BpgWb5cH.js index 0377083..ed77a20 100644 --- a/public/assets/NotFoundView-C3HgwQgy.js +++ b/public/assets/NotFoundView-BpgWb5cH.js @@ -1 +1 @@ -import{_ as s}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{n as a,c as n,b as t,i as r,j as l,p as c,l as i}from"./index-CtNAsql9.js";const p={},d={class:"stack"};function _(u,e){const o=i("router-link");return a(),n("div",d,[e[1]||(e[1]=t("header",{class:"page-head"},[t("span",{class:"eyebrow"},"404"),t("h1",null,"Nie ma takiej strony")],-1)),t("p",null,[r(o,{to:"/"},{default:l(()=>[...e[0]||(e[0]=[c("Wróć na pulpit",-1)])]),_:1})])])}const k=s(p,[["render",_]]);export{k as default}; +import{_ as s}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{n as a,c as n,b as t,i as r,j as l,p as c,l as i}from"./index-BhVKyY57.js";const p={},d={class:"stack"};function _(u,e){const o=i("router-link");return a(),n("div",d,[e[1]||(e[1]=t("header",{class:"page-head"},[t("span",{class:"eyebrow"},"404"),t("h1",null,"Nie ma takiej strony")],-1)),t("p",null,[r(o,{to:"/"},{default:l(()=>[...e[0]||(e[0]=[c("Wróć na pulpit",-1)])]),_:1})])])}const k=s(p,[["render",_]]);export{k as default}; diff --git a/public/assets/OAuthCallbackView-B9h39K0z.js b/public/assets/OAuthCallbackView-OjmWS0Rg.js similarity index 92% rename from public/assets/OAuthCallbackView-B9h39K0z.js rename to public/assets/OAuthCallbackView-OjmWS0Rg.js index 7f5ab61..7f11a45 100644 --- a/public/assets/OAuthCallbackView-B9h39K0z.js +++ b/public/assets/OAuthCallbackView-OjmWS0Rg.js @@ -1 +1 @@ -import{d as g,u as y,q as h,o as _,A as v,c as i,b as n,t as b,e as A,s as p,j as d,k as B,m as C,r as f,l as j,n as a,p as m}from"./index-CtNAsql9.js";import{s as x,f as z}from"./forms-CHet_2fA.js";import{p as q}from"./oauth-zzthF4BZ.js";const E={class:"auth"},I={key:0,class:"notice",role:"status"},L={key:1,class:"stack"},M={class:"notice error",role:"alert"},k=new Set,V=g({__name:"OAuthCallbackView",setup(O){const l=y(),u=B(),s=C(),w=h(),c=f(!0),t=f("");return _(async()=>{const o=q(u.query);if(o.kind==="pending"){const e={pending:o.pending,provider:o.provider};o.reason&&(e.reason=o.reason),o.email&&(e.email=o.email),await s.replace({name:"oauth-register",query:e});return}if(await s.replace({path:u.path}),o.kind==="error")t.value=o.message;else if(o.kind==="none")t.value="Brak danych logowania. Spróbuj zalogować się ponownie.";else{if(k.has(o.code))return;k.add(o.code);try{const{action:e,returnTo:r}=await l.completeOAuth(o.code);e==="link"?(w.show("Połączono konto Microsoft."),await s.replace("/profil")):await s.replace(x(r));return}catch(e){t.value=e instanceof v&&(e.status===410||e.status===422)?"Link logowania wygasł lub został już użyty.":z(e).message}}c.value=!1}),(o,e)=>{const r=j("router-link");return a(),i("div",E,[e[2]||(e[2]=n("header",{class:"page-head"},[n("span",{class:"eyebrow"},"BM II° · UWr"),n("h1",null,"Logowanie")],-1)),c.value?(a(),i("p",I,"Logowanie…")):(a(),i("div",L,[n("p",M,b(t.value),1),A(l).loggedIn?(a(),p(r,{key:0,class:"btn primary",to:"/profil"},{default:d(()=>[...e[0]||(e[0]=[m("Wróć do profilu",-1)])]),_:1})):(a(),p(r,{key:1,class:"btn primary",to:"/logowanie"},{default:d(()=>[...e[1]||(e[1]=[m("Przejdź do logowania",-1)])]),_:1}))]))])}}});export{V as default}; +import{d as g,u as y,q as h,o as _,A as v,c as i,b as n,t as b,e as A,s as p,j as d,k as B,m as C,r as f,l as j,n as a,p as m}from"./index-BhVKyY57.js";import{s as x,f as z}from"./forms-CbFOvcno.js";import{p as q}from"./oauth-zzthF4BZ.js";const E={class:"auth"},I={key:0,class:"notice",role:"status"},L={key:1,class:"stack"},M={class:"notice error",role:"alert"},k=new Set,V=g({__name:"OAuthCallbackView",setup(O){const l=y(),u=B(),s=C(),w=h(),c=f(!0),t=f("");return _(async()=>{const o=q(u.query);if(o.kind==="pending"){const e={pending:o.pending,provider:o.provider};o.reason&&(e.reason=o.reason),o.email&&(e.email=o.email),await s.replace({name:"oauth-register",query:e});return}if(await s.replace({path:u.path}),o.kind==="error")t.value=o.message;else if(o.kind==="none")t.value="Brak danych logowania. Spróbuj zalogować się ponownie.";else{if(k.has(o.code))return;k.add(o.code);try{const{action:e,returnTo:r}=await l.completeOAuth(o.code);e==="link"?(w.show("Połączono konto Microsoft."),await s.replace("/profil")):await s.replace(x(r));return}catch(e){t.value=e instanceof v&&(e.status===410||e.status===422)?"Link logowania wygasł lub został już użyty.":z(e).message}}c.value=!1}),(o,e)=>{const r=j("router-link");return a(),i("div",E,[e[2]||(e[2]=n("header",{class:"page-head"},[n("span",{class:"eyebrow"},"BM II° · UWr"),n("h1",null,"Logowanie")],-1)),c.value?(a(),i("p",I,"Logowanie…")):(a(),i("div",L,[n("p",M,b(t.value),1),A(l).loggedIn?(a(),p(r,{key:0,class:"btn primary",to:"/profil"},{default:d(()=>[...e[0]||(e[0]=[m("Wróć do profilu",-1)])]),_:1})):(a(),p(r,{key:1,class:"btn primary",to:"/logowanie"},{default:d(()=>[...e[1]||(e[1]=[m("Przejdź do logowania",-1)])]),_:1}))]))])}}});export{V as default}; diff --git a/public/assets/OAuthRegisterView-BE24PEnT.js b/public/assets/OAuthRegisterView-Caz16iGt.js similarity index 96% rename from public/assets/OAuthRegisterView-BE24PEnT.js rename to public/assets/OAuthRegisterView-Caz16iGt.js index 0a0e597..6bda240 100644 --- a/public/assets/OAuthRegisterView-BE24PEnT.js +++ b/public/assets/OAuthRegisterView-Caz16iGt.js @@ -1 +1 @@ -import{d as U,u as q,c as o,b as t,i as w,j as _,e as c,p as n,t as l,F as V,h as B,f as k,w as j,g as h,x as N,r as i,l as E,k as P,n as a,A as S,m as D}from"./index-CtNAsql9.js";import{s as F,f as I}from"./forms-CHet_2fA.js";const O={class:"auth"},T={key:0,class:"stack"},K={key:1,class:"stack"},L={class:"notice",role:"status"},W={key:0},G={class:"muted",style:{"margin-bottom":"14px"}},H={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},J={class:"check"},Q={key:1,class:"error-text"},X={class:"check"},Y={key:2,class:"error-text"},$={class:"check",style:{"margin-bottom":"16px"}},ee=["disabled"],te={class:"auth-links"},ne=U({__name:"OAuthRegisterView",setup(se){const A=q(),C=P(),Z=D();function d(s){const e=C.query[s];return typeof e=="string"?e:""}const x=d("pending"),p=d("email"),M=d("reason"),f=N(()=>{const s=d("provider");return s==="microsoft"||s===""?"Microsoft 365":s.charAt(0).toUpperCase()+s.slice(1)}),m=i(!1),v=i(!1),g=i(!1),y=i(!1),r=i(null),z=i(!x);async function R(){y.value=!0,r.value=null;try{const{returnTo:s}=await A.completeOAuthRegistration({pending_code:x,terms_accepted:m.value,privacy_accepted:v.value,marketing_consent:g.value});await Z.replace(F(s))}catch(s){s instanceof S&&s.status===410?z.value=!0:r.value=I(s)}finally{y.value=!1}}return(s,e)=>{const b=E("router-link");return a(),o("div",O,[e[13]||(e[13]=t("header",{class:"page-head"},[t("span",{class:"eyebrow"},"BM II° · UWr"),t("h1",null,"Rejestracja")],-1)),z.value?(a(),o("div",T,[e[4]||(e[4]=t("p",{class:"notice error",role:"alert"},"Sesja rejestracji wygasła. Zaloguj się ponownie.",-1)),w(b,{class:"btn primary",to:"/logowanie"},{default:_(()=>[...e[3]||(e[3]=[n("Przejdź do logowania",-1)])]),_:1})])):c(M)==="unverified_match"?(a(),o("div",K,[t("p",L,[e[5]||(e[5]=n(" Konto z adresem ",-1)),c(p)?(a(),o("b",W,l(c(p)),1)):(a(),o(V,{key:1},[n("e-mail z konta "+l(f.value),1)],64)),n(" już istnieje. Zaloguj się hasłem, a potem połącz konto "+l(f.value)+" w profilu („Połącz konto Microsoft”). ",1)]),w(b,{class:"btn primary",to:"/logowanie"},{default:_(()=>[...e[6]||(e[6]=[n("Zaloguj się hasłem",-1)])]),_:1})])):(a(),o("form",{key:2,onSubmit:B(R,["prevent"]),novalidate:""},[t("p",G,[n(" Pierwsze logowanie przez "+l(f.value),1),c(p)?(a(),o(V,{key:0},[e[7]||(e[7]=n(" jako ",-1)),t("b",null,l(c(p)),1)],64)):k("",!0),e[8]||(e[8]=n(". Zaakceptuj warunki, aby założyć konto. ",-1))]),r.value?.message?(a(),o("div",H,l(r.value.message),1)):k("",!0),t("label",J,[j(t("input",{"onUpdate:modelValue":e[0]||(e[0]=u=>m.value=u),type:"checkbox",required:""},null,512),[[h,m.value]]),e[9]||(e[9]=t("span",null,"Akceptuję regulamin serwisu (wymagane)",-1))]),r.value?.fields.terms_accepted?(a(),o("p",Q,l(r.value.fields.terms_accepted),1)):k("",!0),t("label",X,[j(t("input",{"onUpdate:modelValue":e[1]||(e[1]=u=>v.value=u),type:"checkbox",required:""},null,512),[[h,v.value]]),e[10]||(e[10]=t("span",null,"Zgadzam się na przetwarzanie moich danych zgodnie z polityką prywatności (wymagane)",-1))]),r.value?.fields.privacy_accepted?(a(),o("p",Y,l(r.value.fields.privacy_accepted),1)):k("",!0),t("label",$,[j(t("input",{"onUpdate:modelValue":e[2]||(e[2]=u=>g.value=u),type:"checkbox"},null,512),[[h,g.value]]),e[11]||(e[11]=t("span",null,"Chcę otrzymywać wiadomości o nowościach (opcjonalnie)",-1))]),t("button",{class:"btn primary block",type:"submit",disabled:y.value||!m.value||!v.value},l(y.value?"Zakładanie…":"Załóż konto"),9,ee)],32)),t("div",te,[w(b,{to:"/logowanie"},{default:_(()=>[...e[12]||(e[12]=[n("Mam już konto",-1)])]),_:1})])])}}});export{ne as default}; +import{d as U,u as q,c as o,b as t,i as w,j as _,e as c,p as n,t as l,F as V,h as B,f as k,w as j,g as h,x as N,r as i,l as E,k as P,n as a,A as S,m as D}from"./index-BhVKyY57.js";import{s as F,f as I}from"./forms-CbFOvcno.js";const O={class:"auth"},T={key:0,class:"stack"},K={key:1,class:"stack"},L={class:"notice",role:"status"},W={key:0},G={class:"muted",style:{"margin-bottom":"14px"}},H={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},J={class:"check"},Q={key:1,class:"error-text"},X={class:"check"},Y={key:2,class:"error-text"},$={class:"check",style:{"margin-bottom":"16px"}},ee=["disabled"],te={class:"auth-links"},ne=U({__name:"OAuthRegisterView",setup(se){const A=q(),C=P(),Z=D();function d(s){const e=C.query[s];return typeof e=="string"?e:""}const x=d("pending"),p=d("email"),M=d("reason"),f=N(()=>{const s=d("provider");return s==="microsoft"||s===""?"Microsoft 365":s.charAt(0).toUpperCase()+s.slice(1)}),m=i(!1),v=i(!1),g=i(!1),y=i(!1),r=i(null),z=i(!x);async function R(){y.value=!0,r.value=null;try{const{returnTo:s}=await A.completeOAuthRegistration({pending_code:x,terms_accepted:m.value,privacy_accepted:v.value,marketing_consent:g.value});await Z.replace(F(s))}catch(s){s instanceof S&&s.status===410?z.value=!0:r.value=I(s)}finally{y.value=!1}}return(s,e)=>{const b=E("router-link");return a(),o("div",O,[e[13]||(e[13]=t("header",{class:"page-head"},[t("span",{class:"eyebrow"},"BM II° · UWr"),t("h1",null,"Rejestracja")],-1)),z.value?(a(),o("div",T,[e[4]||(e[4]=t("p",{class:"notice error",role:"alert"},"Sesja rejestracji wygasła. Zaloguj się ponownie.",-1)),w(b,{class:"btn primary",to:"/logowanie"},{default:_(()=>[...e[3]||(e[3]=[n("Przejdź do logowania",-1)])]),_:1})])):c(M)==="unverified_match"?(a(),o("div",K,[t("p",L,[e[5]||(e[5]=n(" Konto z adresem ",-1)),c(p)?(a(),o("b",W,l(c(p)),1)):(a(),o(V,{key:1},[n("e-mail z konta "+l(f.value),1)],64)),n(" już istnieje. Zaloguj się hasłem, a potem połącz konto "+l(f.value)+" w profilu („Połącz konto Microsoft”). ",1)]),w(b,{class:"btn primary",to:"/logowanie"},{default:_(()=>[...e[6]||(e[6]=[n("Zaloguj się hasłem",-1)])]),_:1})])):(a(),o("form",{key:2,onSubmit:B(R,["prevent"]),novalidate:""},[t("p",G,[n(" Pierwsze logowanie przez "+l(f.value),1),c(p)?(a(),o(V,{key:0},[e[7]||(e[7]=n(" jako ",-1)),t("b",null,l(c(p)),1)],64)):k("",!0),e[8]||(e[8]=n(". Zaakceptuj warunki, aby założyć konto. ",-1))]),r.value?.message?(a(),o("div",H,l(r.value.message),1)):k("",!0),t("label",J,[j(t("input",{"onUpdate:modelValue":e[0]||(e[0]=u=>m.value=u),type:"checkbox",required:""},null,512),[[h,m.value]]),e[9]||(e[9]=t("span",null,"Akceptuję regulamin serwisu (wymagane)",-1))]),r.value?.fields.terms_accepted?(a(),o("p",Q,l(r.value.fields.terms_accepted),1)):k("",!0),t("label",X,[j(t("input",{"onUpdate:modelValue":e[1]||(e[1]=u=>v.value=u),type:"checkbox",required:""},null,512),[[h,v.value]]),e[10]||(e[10]=t("span",null,"Zgadzam się na przetwarzanie moich danych zgodnie z polityką prywatności (wymagane)",-1))]),r.value?.fields.privacy_accepted?(a(),o("p",Y,l(r.value.fields.privacy_accepted),1)):k("",!0),t("label",$,[j(t("input",{"onUpdate:modelValue":e[2]||(e[2]=u=>g.value=u),type:"checkbox"},null,512),[[h,g.value]]),e[11]||(e[11]=t("span",null,"Chcę otrzymywać wiadomości o nowościach (opcjonalnie)",-1))]),t("button",{class:"btn primary block",type:"submit",disabled:y.value||!m.value||!v.value},l(y.value?"Zakładanie…":"Załóż konto"),9,ee)],32)),t("div",te,[w(b,{to:"/logowanie"},{default:_(()=>[...e[12]||(e[12]=[n("Mam już konto",-1)])]),_:1})])])}}});export{ne as default}; diff --git a/public/assets/PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js b/public/assets/PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js similarity index 69% rename from public/assets/PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js rename to public/assets/PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js index 1cd93c9..a4ec172 100644 --- a/public/assets/PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js +++ b/public/assets/PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js @@ -1 +1 @@ -import{d as r,c as s,t as a,f as c,b as t,aJ as d,n as o}from"./index-CtNAsql9.js";const l={class:"page-head"},i={key:0,class:"eyebrow"},_={class:"row"},h={class:"btn-row"},p=r({__name:"PageHead",props:{eyebrow:{},title:{}},setup(e){return(n,m)=>(o(),s("header",l,[e.eyebrow?(o(),s("span",i,a(e.eyebrow),1)):c("",!0),t("div",_,[t("h1",null,a(e.title),1),t("div",h,[d(n.$slots,"default")])])]))}});export{p as _}; +import{d as r,c as s,t as a,f as c,b as t,aP as d,n as o}from"./index-BhVKyY57.js";const l={class:"page-head"},i={key:0,class:"eyebrow"},_={class:"row"},h={class:"btn-row"},p=r({__name:"PageHead",props:{eyebrow:{},title:{}},setup(e){return(n,m)=>(o(),s("header",l,[e.eyebrow?(o(),s("span",i,a(e.eyebrow),1)):c("",!0),t("div",_,[t("h1",null,a(e.title),1),t("div",h,[d(n.$slots,"default")])])]))}});export{p as _}; diff --git a/public/assets/PresentationPublicView-BvCmAAgB.js b/public/assets/PresentationPublicView-CkLUkVMd.js similarity index 85% rename from public/assets/PresentationPublicView-BvCmAAgB.js rename to public/assets/PresentationPublicView-CkLUkVMd.js index da2212e..89b256e 100644 --- a/public/assets/PresentationPublicView-BvCmAAgB.js +++ b/public/assets/PresentationPublicView-CkLUkVMd.js @@ -1 +1 @@ -import{d as h,U as k,o as b,aK as g,s as w,r as u,n as _,A as l}from"./index-CtNAsql9.js";import{p as y}from"./presentations-G0Dt4vNe.js";import{_ as E}from"./DeckViewer.vue_vue_type_style_index_0_lang-VLaT-7ba.js";import"./engine-DDeQk6Ow.js";const x="Sprawdź połączenie z internetem i spróbuj ponownie.",z="Za dużo żądań w krótkim czasie. Odczekaj minutę i spróbuj ponownie.",j="Prezentacja · BM II°",B=h({__name:"PresentationPublicView",props:{slugHash:{}},setup(f){const d=f,n=u("pending"),a=u(null),o=u("");let s=0,r=0;function c(){s&&window.clearTimeout(s),s=0}async function m(t){const i=++r;c(),document.title=j,n.value="pending",a.value=null,o.value="",s=window.setTimeout(()=>{i===r&&n.value==="pending"&&(n.value="loading")},200);try{const e=await y.publicDeck(t);if(i!==r)return;c();const p=e.slides??[];a.value={...e,slides:p},e.title&&(document.title=e.title),n.value=p.length===0?"empty":"ready"}catch(e){if(i!==r)return;if(c(),e instanceof l&&e.status===404){n.value="notfound";return}e instanceof l&&e.status===429?o.value=z:e instanceof l&&e.message?o.value=e.message:o.value=x,n.value="error"}}function v(){m(d.slugHash)}return k(()=>d.slugHash,t=>{m(t)},{immediate:!0}),b(()=>{if(document.documentElement.classList.add("deck-public"),!document.querySelector('meta[data-deck-public="1"]')){const t=document.createElement("meta");t.name="robots",t.content="noindex",t.dataset.deckPublic="1",document.head.appendChild(t)}}),g(()=>{r+=1,c(),document.documentElement.classList.remove("deck-public"),document.querySelector('meta[data-deck-public="1"]')?.remove()}),(t,i)=>(_(),w(E,{phase:n.value,deck:a.value,error:o.value,"extra-css":a.value?.css,theme:a.value?.theme,onRetry:v},null,8,["phase","deck","error","extra-css","theme"]))}});export{B as default}; +import{d as h,U as k,o as b,b1 as g,s as w,r as u,n as _,A as l}from"./index-BhVKyY57.js";import{p as y}from"./presentations-CsatGkk7.js";import{_ as E}from"./DeckViewer.vue_vue_type_style_index_0_lang-CR_mIh7U.js";import"./engine-DDeQk6Ow.js";const x="Sprawdź połączenie z internetem i spróbuj ponownie.",z="Za dużo żądań w krótkim czasie. Odczekaj minutę i spróbuj ponownie.",j="Prezentacja · BM II°",B=h({__name:"PresentationPublicView",props:{slugHash:{}},setup(f){const d=f,n=u("pending"),a=u(null),o=u("");let s=0,r=0;function c(){s&&window.clearTimeout(s),s=0}async function m(t){const i=++r;c(),document.title=j,n.value="pending",a.value=null,o.value="",s=window.setTimeout(()=>{i===r&&n.value==="pending"&&(n.value="loading")},200);try{const e=await y.publicDeck(t);if(i!==r)return;c();const p=e.slides??[];a.value={...e,slides:p},e.title&&(document.title=e.title),n.value=p.length===0?"empty":"ready"}catch(e){if(i!==r)return;if(c(),e instanceof l&&e.status===404){n.value="notfound";return}e instanceof l&&e.status===429?o.value=z:e instanceof l&&e.message?o.value=e.message:o.value=x,n.value="error"}}function v(){m(d.slugHash)}return k(()=>d.slugHash,t=>{m(t)},{immediate:!0}),b(()=>{if(document.documentElement.classList.add("deck-public"),!document.querySelector('meta[data-deck-public="1"]')){const t=document.createElement("meta");t.name="robots",t.content="noindex",t.dataset.deckPublic="1",document.head.appendChild(t)}}),g(()=>{r+=1,c(),document.documentElement.classList.remove("deck-public"),document.querySelector('meta[data-deck-public="1"]')?.remove()}),(t,i)=>(_(),w(E,{phase:n.value,deck:a.value,error:o.value,"extra-css":a.value?.css,theme:a.value?.theme,onRetry:v},null,8,["phase","deck","error","extra-css","theme"]))}});export{B as default}; diff --git a/public/assets/PresentationRemoteView-kS7sCJIb.js b/public/assets/PresentationRemoteView-DV7C-xR6.js similarity index 99% rename from public/assets/PresentationRemoteView-kS7sCJIb.js rename to public/assets/PresentationRemoteView-DV7C-xR6.js index 8081721..76f76c6 100644 --- a/public/assets/PresentationRemoteView-kS7sCJIb.js +++ b/public/assets/PresentationRemoteView-DV7C-xR6.js @@ -1 +1 @@ -import{c as sn}from"./engine-DDeQk6Ow.js";import{d as Te,c as u,b as c,C as I,i as ne,_ as Ye,t as _,f as E,x as p,n as r,U as he,F as L,E as ge,j as on,r as g,l as ln,p as Ct,Z as Et,s as Qe,o as rn,aK as cn,A as be,aL as un,aM as dn,m as vn,aP as fn}from"./index-CtNAsql9.js";import{p as R}from"./presentations-G0Dt4vNe.js";import{_ as _e}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{s as et,e as wt,f as tt,g as mn,h as pn,i as yn,d as bn,r as kn,j as wn,k as Je,a as hn,l as ht,S as gn,H as Tn,m as _n,o as Sn,D as Cn,b as En,R as zn,n as $n}from"./remote-aOKX75Mt.js";import{f as Nn,C as Ue,p as jn,i as An,j as Dn,d as xn}from"./log-Xlt5jeld.js";import{c as Rn,a as In}from"./clock-4r1aA6KU.js";const Ln={key:0,class:"cast"},Mn=["aria-busy"],Pn={class:"cast-label"},Bn={key:0,class:"cast-tv"},On={key:0,"aria-live":"polite"},Vn=Te({__name:"CastButton",props:{availability:{},deviceName:{},tv:{}},emits:["request","log"],setup(n,{emit:y}){const t=n,o=y,s=p(()=>t.availability!=="off"&&t.availability!=="no-devices"),i=p(()=>t.availability==="connected"),d=p(()=>t.availability==="connecting"?"Łączę z TV…":t.availability==="connected"?t.deviceName?`Na TV: ${t.deviceName}`:"Na TV":"Wyświetl na TV"),v=p(()=>{const k=t.tv;return k?k.phase==="waiting"?"TV: czekam na bilet":k.phase==="loading"?"TV: przygotowuję slajdy…":k.phase==="error"?"TV: błąd, połącz ponownie":`TV: slajd ${k.number}${k.special?" · specjalny":""}`:""});return(k,z)=>s.value?(r(),u("div",Ln,[c("button",{type:"button",class:I(["cast-row",{on:i.value}]),"aria-busy":n.availability==="connecting"?"true":void 0,onClick:z[0]||(z[0]=$=>o("request"))},[ne(Ye,{class:"cast-icon",name:"cast"}),c("span",Pn,_(d.value),1)],10,Mn),i.value?(r(),u("p",Bn,[v.value?(r(),u("span",On,_(v.value),1)):E("",!0),c("button",{type:"button",class:"cast-log",onClick:z[1]||(z[1]=$=>o("log"))},"Dziennik TV")])):E("",!0)])):E("",!0)}}),qn=_e(Vn,[["__scopeId","data-v-ff9a5014"]]),Hn={class:"drawer"},Wn=["id","aria-label"],Kn={class:"sheet-head"},Gn=["disabled"],Zn={class:"sheet-title"},Fn={class:"title"},Jn={key:0,class:"subtitle"},Un=["disabled"],Xn=["innerHTML"],Yn={key:1,class:"empty"},Qn=["innerHTML"],ea={key:1,class:"empty"},ta=["data-current","aria-current","onClick"],na={class:"num"},aa={class:"row-title"},sa={key:0,class:"tag"},oa={key:1,class:"now"},ia={class:"list-foot"},la={key:0,class:"hint"},ra={class:"bar","aria-label":"Szuflady na telefonie"},ca=["disabled","aria-expanded","aria-controls","onClick"],ua=Te({__name:"RemoteDrawer",props:{deck:{},state:{},live:{type:Boolean},cursor:{},open:{},disabled:{type:Boolean},wakeLockMissing:{type:Boolean}},emits:["goto","cursor","open","close"],setup(n,{emit:y}){const t=n,o=y,s=[{kind:"say",label:"Powiedz"},{kind:"notes",label:"Notatki"},{kind:"slides",label:"Slajdy"}],i=p(()=>t.deck.slides.length),d=p(()=>mn(t.deck,t.state,t.live,t.cursor)),v=p(()=>t.live&&t.state?t.state.number:t.deck.slides[et(t.deck.slides,t.cursor)]?.number??0),k=p(()=>et(t.deck.slides,t.cursor)),z=p(()=>t.live&&t.state?t.state.number:t.deck.slides[k.value]?.number??t.cursor),$=p(()=>{const h=t.live&&t.state?.special?"s":"";return`${z.value}${h}`});function P(h){return h?/]*>/g,"").replace(/ | /g," ").trim()!=="":!1}const w=p(()=>P(d.value?.say_html)?wt(d.value?.say_html??""):""),b=p(()=>P(d.value?.notes_html)?wt(d.value?.notes_html??""):""),S=p(()=>t.open==="say"?`Powiedz · slajd ${z.value}`:t.open==="notes"?`Notatki · slajd ${z.value}`:"Slajdy"),D=p(()=>t.open==="slides"?"":t.live?"Widzisz tylko Ty":`Przeglądasz na telefonie · slajd ${k.value+1} z ${i.value}`),N=p(()=>!t.live&&(t.open==="say"||t.open==="notes")),G=p(()=>k.value>0),ae=p(()=>k.valuet.deck.slides.map(h=>({number:h.number,title:tt(h),special:!!h.special})));function B(h){t.disabled||(t.open===h?o("close"):o("open",h))}function Y(h){const x=t.deck.slides[k.value+h];x&&o("cursor",x.number)}const Z=g(null),O=g(null);return he([$,()=>t.open],()=>{Z.value&&(Z.value.scrollTop=0)}),he(()=>t.open,async h=>{if(h!=="slides")return;await Et(),O.value?.querySelector('[data-current="true"]')?.scrollIntoView({block:"center"})}),(h,x)=>{const se=ln("router-link");return r(),u("div",Hn,[n.open?(r(),u("section",{key:0,id:`remote-drawer-${n.open}`,class:"sheet","aria-label":S.value},[c("header",Kn,[N.value?(r(),u("button",{key:0,type:"button",class:"icon-btn","aria-label":"Poprzedni slajd na telefonie",disabled:!G.value,onClick:x[0]||(x[0]=T=>Y(-1))}," ‹ ",8,Gn)):E("",!0),c("div",Zn,[c("p",Fn,_(S.value),1),D.value?(r(),u("p",Jn,_(D.value),1)):E("",!0)]),N.value?(r(),u("button",{key:1,type:"button",class:"icon-btn","aria-label":"Następny slajd na telefonie",disabled:!ae.value,onClick:x[1]||(x[1]=T=>Y(1))}," › ",8,Un)):E("",!0),c("button",{type:"button",class:"close-btn",onClick:x[2]||(x[2]=T=>o("close"))},"Zamknij")]),c("div",{ref_key:"body",ref:Z,class:I(["sheet-body",{reading:n.open!=="slides"}])},[n.open==="say"?(r(),u(L,{key:0},[w.value?(r(),u("div",{key:0,class:"text",innerHTML:w.value},null,8,Xn)):(r(),u("p",Yn,"Brak tekstu do powiedzenia na tym slajdzie."))],64)):n.open==="notes"?(r(),u(L,{key:1},[b.value?(r(),u("div",{key:0,class:"text",innerHTML:b.value},null,8,Qn)):(r(),u("p",ea,"Brak notatek do tego slajdu."))],64)):(r(),u(L,{key:2},[c("ol",{ref_key:"list",ref:O,class:"list"},[(r(!0),u(L,null,ge(A.value,T=>(r(),u("li",{key:T.number},[c("button",{type:"button",class:"row","data-current":T.number===v.value?"true":void 0,"aria-current":T.number===v.value?"true":void 0,onClick:Me=>o("goto",T.number)},[c("span",na,_(T.number),1),c("span",aa,_(T.title),1),T.special?(r(),u("span",sa,"+ specjalny")):E("",!0),T.number===v.value?(r(),u("span",oa,"teraz")):E("",!0)],8,ta)]))),128))],512),c("footer",ia,[ne(se,{class:"back-link",to:{name:"my-presentations"}},{default:on(()=>[...x[3]||(x[3]=[Ct("Wróć do moich prezentacji",-1)])]),_:1}),n.wakeLockMissing?(r(),u("p",la,"Ta przeglądarka nie pozwala zablokować wygaszania ekranu.")):E("",!0)])],64))],2)],8,Wn)):E("",!0),c("nav",ra,[(r(),u(L,null,ge(s,T=>c("button",{key:T.kind,type:"button",class:I(["tab",{open:n.open===T.kind}]),disabled:n.disabled,"aria-expanded":n.open===T.kind?"true":"false","aria-controls":`remote-drawer-${T.kind}`,onClick:Me=>B(T.kind)},_(T.label),11,ca)),64))])])}}}),da=_e(ua,[["__scopeId","data-v-9f920f42"]]),va=["aria-label"],fa={key:0,class:"eyebrow"},ma={class:"grid nav"},pa=["disabled","aria-busy","onClick"],ya={key:1,class:"grid fn"},ba=["disabled","aria-pressed","aria-busy","onClick"],ka={class:"label"},wa=Te({__name:"RemoteKeys",props:{state:{},live:{type:Boolean},busy:{},compact:{type:Boolean},cast:{type:Boolean}},emits:["press","reset"],setup(n,{emit:y}){const t=n,o=y,s=p(()=>pn(t.state,t.live,t.cast?"cast":"deck")),i=p(()=>t.cast?"Klawisze na TV":"Klawisze na komputerze"),d=p(()=>s.value.slice(0,2)),v=p(()=>s.value.slice(2));function k($){return(t.busy[$.action]??0)>0}function z($){$.enabled&&($.action==="clock-reset"?o("reset"):o("press",$.action))}return($,P)=>(r(),u("section",{class:I(["keys",{compact:n.compact}]),"aria-label":i.value},[n.compact?E("",!0):(r(),u("p",fa,_(i.value),1)),c("div",ma,[(r(!0),u(L,null,ge(d.value,w=>(r(),u("button",{key:w.action,type:"button",class:I(["key nav-key",w.action]),disabled:!w.enabled,"aria-busy":k(w)?"true":void 0,onClick:b=>z(w)},[w.action==="prev"?(r(),Qe(Ye,{key:0,class:"arrow",name:"arrow-left"})):E("",!0),c("span",null,_(w.label),1),w.action==="next"?(r(),Qe(Ye,{key:1,class:"arrow",name:"arrow-right"})):E("",!0)],10,pa))),128))]),n.compact?E("",!0):(r(),u("div",ya,[(r(!0),u(L,null,ge(v.value,w=>(r(),u("button",{key:w.action,type:"button",class:"key fn-key",disabled:!w.enabled,"aria-pressed":w.pressed===null?void 0:w.pressed?"true":"false","aria-busy":k(w)?"true":void 0,onClick:b=>z(w)},[c("span",ka,_(w.label),1),c("kbd",null,_(w.kbd),1)],8,ba))),128))]))],10,va))}}),gt=_e(wa,[["__scopeId","data-v-25e061a7"]]),ha={class:"top"},ga={class:"row row-title"},Ta={class:"deck-title"},_a={class:"row row-slide","aria-live":"polite"},Sa={class:"counter"},Ca={key:0,class:"slide-title"},Ea={key:1,class:"slide-title waiting"},za={class:"row row-chips","aria-label":"Na komputerze"},$a={class:"row row-clock"},Na={key:0,class:"idle"},ja={key:0,class:"chip"},Aa={key:2,class:"clock"},Da=Te({__name:"RemoteTopBar",props:{deckTitle:{},status:{},live:{type:Boolean},counter:{},slideTitle:{},chips:{},clock:{}},setup(n){const y=n,t=p(()=>yn(y.status));return(o,s)=>(r(),u("header",ha,[c("div",ga,[c("p",Ta,_(n.deckTitle),1),c("p",{class:I(["conn",{on:n.status==="live"}])},[s[0]||(s[0]=c("span",{class:"dot","aria-hidden":"true"},null,-1)),Ct(_(t.value),1)],2)]),c("div",_a,[c("p",Sa,_(n.counter),1),n.live?(r(),u("p",Ca,_(n.slideTitle),1)):(r(),u("p",Ea,"Czekam na wersję mówcy"))]),c("ul",za,[n.live?(r(!0),u(L,{key:0},ge(n.chips,i=>(r(),u("li",{key:i,class:I(["chip",{khaki:i==="Specjalny"}])},_(i),3))),128)):E("",!0)]),c("div",$a,[n.live&&n.clock&&n.clock.idle?(r(),u("p",Na,"Zegar ruszy przy pierwszej zmianie slajdu")):n.live&&n.clock?(r(),u(L,{key:1},[c("p",{class:I(["clock",{paused:n.clock.paused}])},[s[2]||(s[2]=c("span",{class:"lbl"},"Slajd",-1)),c("b",{class:I({over:n.clock.slideOver})},_(n.clock.slide),3),s[3]||(s[3]=c("span",{class:"sep","aria-hidden":"true"},"·",-1)),s[4]||(s[4]=c("span",{class:"lbl"},"Całość",-1)),c("b",{class:I({over:n.clock.totalOver})},_(n.clock.total),3),n.clock.pace?(r(),u(L,{key:0},[s[1]||(s[1]=c("span",{class:"sep","aria-hidden":"true"},"·",-1)),c("span",{class:I(["pace",{late:n.clock.late}])},_(n.clock.pace),3)],64)):E("",!0)],2),n.clock.paused?(r(),u("span",ja,"Pauza")):E("",!0)],64)):(r(),u("p",Aa,[...s[5]||(s[5]=[c("b",null,"—",-1)])]))])]))}}),xa=_e(Da,[["__scopeId","data-v-382e11de"]]),Ra="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",Xe="bm-cast-sender";function at(){return globalThis}function nt(){const n=at().cast?.framework;return n&&n.CastContext&&n.CastContextEventType?n:null}let ke=null;function Ia(n=1e4){return nt()?Promise.resolve(!0):ke||(typeof document>"u"?Promise.resolve(!1):(ke=new Promise(t=>{let o=!1,s=null;const i=d=>{o||(o=!0,s!==null&&clearTimeout(s),t(d&&nt()!==null))};try{at().__onGCastApiAvailable=v=>i(!!v);let d=document.getElementById(Xe);d||(d=document.createElement("script"),d.id=Xe,d.src=Ra,d.async=!0,d.addEventListener("error",()=>i(!1)),document.head.appendChild(d)),s=setTimeout(()=>i(!1),n)}catch{i(!1)}}).then(t=>(t||(ke=null,document.getElementById(Xe)?.remove()),t)),ke))}function La(n){switch(n){case"NOT_CONNECTED":return"available";case"CONNECTING":return"connecting";case"CONNECTED":return"connected";default:return"no-devices"}}function Ma(n){const y=nt();if(!y)return null;let t;try{t=y.CastContext.getInstance()}catch{return null}const o=y.CastContextEventType;let s=!1,i=null;const d=(b,S)=>{if(s)return;const D=jn(S);D&&n.onMessage(D)};function v(){const b=i;if(i=null,!!b)try{b.removeMessageListener(Ue,d)}catch{}}function k(){v();let b=null;try{b=t.getCurrentSession(),b?.addMessageListener(Ue,d)}catch{b=null}return i=b,b!==null}function z(b){s||n.onAvailability(La(b??""))}const $=b=>z(b.castState),P=b=>{if(s)return;const S=b.sessionState;S==="SESSION_STARTED"||S==="SESSION_RESUMED"?k()&&n.onSession(S==="SESSION_STARTED"?"started":"resumed"):S==="SESSION_ENDED"&&(v(),n.onSession("ended"))};try{t.addEventListener(o.CAST_STATE_CHANGED,$),t.addEventListener(o.SESSION_STATE_CHANGED,P)}catch{return null}try{const b=at().chrome?.cast?.AutoJoinPolicy?.ORIGIN_SCOPED??"origin_scoped";t.setOptions({receiverApplicationId:n.appId,autoJoinPolicy:b})}catch{}try{z(t.getCastState())}catch{z("")}let w=!1;try{w=t.getCurrentSession()!==null}catch{w=!1}return w&&queueMicrotask(()=>{!s&&i===null&&k()&&n.onSession("resumed")}),{async request(){if(!s)try{await t.requestSession()}catch{}},stop(){try{t.endCurrentSession(!0)}catch{}},async send(b){if(!Nn(b))throw new Error("cast message too large");let S=null;try{S=t.getCurrentSession()}catch{S=null}if(!S)throw new Error("no cast session");await S.sendMessage(Ue,b)},deviceName(){try{return t.getCurrentSession()?.getCastDevice()?.friendlyName??""}catch{return""}},connected(){try{return t.getCurrentSession()!==null}catch{return!1}},close(){if(!s){s=!0,v();try{t.removeEventListener(o.CAST_STATE_CHANGED,$),t.removeEventListener(o.SESSION_STATE_CHANGED,P)}catch{}}}}}const Pa=["speak","scheme","toolbar"],Ba=new Set(Pa);function Oa(n){const y=n.now??(()=>Date.now()),t=n.slides.map(i=>({number:i.number,hasSpecial:i.special!=null})),o=Rn({budgets:n.slides.map(i=>i.seconds),targetSeconds:n.targetSeconds,now:y}),s=sn({slides:t,history:{state:null,replaceState(){}},mode:"speaker",onNavigate:i=>{o.tick(),o.go(i)}});return{press(i){if(i==="sync"||i==="goto"||Ba.has(i))return!1;const d=kn(i);if(!d)return!1;const v=s.applyKey({key:d});return v==="pause"?o.pause():v==="clock"?o.toggleHidden():v==="reset"&&o.reset(),!0},goto(i){const d=t.findIndex(v=>v.number===i);return d<0?!1:(s.go(d),!0)},seed(i,d){t.some(v=>v.number===i)&&(o.tick(),s.showId(d?`${i}s`:String(i)),o.seek(s.snapshot().index))},state(i={}){return o.tick(),bn(s.snapshot(),o.view(),n.tab,{claim:!0,bye:i.bye,light:!1})},position(){const i=s.snapshot();return{number:i.number,special:i.special}}}}const Va=/^[A-Za-z0-9_-]{8,64}$/;function st(n){return"bm.cast."+n}function qa(n,y,t){if(!n)return null;let o;try{o=n.getItem(st(y))}catch{return null}if(!o)return null;let s;try{s=JSON.parse(o)}catch{return null}if(typeof s!="object"||s===null||Array.isArray(s))return null;const{tab:i,ticket:d,expires_at:v}=s;if(typeof i!="string"||!Va.test(i)||!An(d)||typeof v!="string")return null;const k=Date.parse(v);return!Number.isFinite(k)||k<=t?null:{tab:i,ticket:d,expires_at:v}}function Ha(n,y,t){if(n)try{n.setItem(st(y),JSON.stringify({tab:t.tab,ticket:t.ticket,expires_at:t.expires_at}))}catch{}}function Wa(n,y){if(n)try{n.removeItem(st(y))}catch{}}function Tt(n,y,t=10*6e4){const o=Date.parse(n);return Number.isFinite(o)?y>=o-t:!0}const Ka={key:0,class:"remote-status remote-label"},Ga={key:1,class:"remote-status"},Za={key:0,class:"remote-alert",role:"alert"},Fa={class:"remote-middle"},Ja={key:0,class:"remote-notice"},Ua={key:0,class:"remote-notice"},Xa={class:"remote-dialog-body"},Ya="Nie udało się wczytać prezentacji. Sprawdź połączenie z internetem i spróbuj ponownie.",Qa="Za dużo żądań w krótkim czasie. Odczekaj minutę i spróbuj ponownie.",te="Pilot niedostępny. Spróbuję połączyć się ponownie za 10 s.",es="Nie udało się połączyć z TV. Spróbuj ponownie.",we="TV nie odpowiada. Dotknij „Na TV”, aby zakończyć i połączyć ponownie.",_t="Nie udało się odnowić biletu TV. Spróbuję ponownie.",St="Nie udało się pobrać dziennika TV.",ts=2e3,ns=15e3,as=15e3,ss=3e4,os=Te({__name:"PresentationRemoteView",props:{slug:{}},setup(n){const y=n,t=vn(),o=g("pending"),s=g(null),i=g("");let d=0,v=0,k=null,z="",$=0,P=0,w=0,b=!1,S=0,D=Je();const N=g(null),G=g(0),ae=g(Date.now()),A=g(!1),B=g(!1),Y=g("connecting"),Z=g(!1),O=g(!1),h=g(!1),x=p(()=>B.value?"live":h.value?"unavailable":A.value?"live":Y.value==="connected"&&O.value?"waiting":Z.value?"reconnecting":"connecting"),se=p(()=>s.value?.slides.length??0),T=p(()=>{const e=N.value;return!s.value||!e?0:et(s.value.slides,e.number)}),Me=p(()=>{const e=N.value;return A.value&&e?`${e.number} / ${e.total}`:`— / ${se.value}`}),zt=p(()=>{const e=N.value,a=s.value?.slides[T.value];return!e||!a?"":e.special&&a.special?tt(a.special):tt(a)}),$t=p(()=>N.value?_n(N.value):[]),Nt=p(()=>{const e=N.value;return!s.value||!e?null:In(Sn(e,s.value.slides.map(a=>a.seconds),s.value.target_seconds,T.value,G.value,ae.value))}),V=g(null),oe=g(1);he(N,e=>{e&&!e.bye&&e.number>0&&(oe.value=e.number)});function jt(e){se.value!==0&&(V.value=e)}function At(){V.value=null}function Dt(e){oe.value=e}function xt(e){if(f){re(),f.mode.goto(e)&&F(),V.value=null;return}if(A.value){re(),Pe("goto",e),V.value=null;return}oe.value=e,V.value="say"}function Q(){ae.value=Date.now(),A.value=B.value||D.live(ae.value)}function Rt(e){if(f)return;const a=En(e);!a||a.event!==zn||D.observe(a.payload,Date.now())&&(N.value=D.current(),G.value=D.receivedAt(),Q(),a.payload.bye&&le())}function Se(){d&&window.clearTimeout(d),d=0}const j=g("");let H=0;function q(e,a=4e3){j.value=e,H&&window.clearTimeout(H),H=0,a>0&&(H=window.setTimeout(()=>{j.value="",H=0},a))}function W(){H&&window.clearTimeout(H),H=0,j.value=""}const ie=g({});function ot(e,a){const l=Math.max(0,(ie.value[e]??0)+a);ie.value={...ie.value,[e]:l}}async function Pe(e,a){const l={action:e,tab:D.actionTab()};a!==void 0&&(l.number=a),ot(e,1);try{await R.remote(y.slug,l),j.value&&j.value!==te&&W()}catch(m){q(ht(m instanceof be?m.status:-1))}finally{ot(e,-1)}}function le(){f||!O.value||R.remote(y.slug,{action:"sync",tab:""}).catch(()=>{})}function It(){O.value=!0,h.value=!1,j.value===te&&W(),D.release(),le()}function Lt(e){Y.value=e,e==="connected"?Z.value=!0:O.value=!1}function Mt(e){if(O.value=!1,h.value=!0,e!==403||b){j.value===te&&W();return}b=!0,q(te,0),S=window.setTimeout(()=>{S=0,k?.resubscribe()},Cn)}function re(){typeof navigator.vibrate=="function"&&navigator.vibrate(15)}function it(e){if(f){re(),f.mode.press(e)&&F();return}A.value&&(re(),Pe(e))}const ce=g(null),lt=g(null);function Pt(){if(!A.value)return;re();const e=ce.value;e&&(e.open||e.showModal(),Et(()=>lt.value?.focus()))}function Ce(){ce.value?.open&&ce.value.close()}function Bt(){if(Ce(),f){f.mode.press("clock-reset")&&F();return}A.value&&Pe("clock-reset")}function Ot(e){e.target===ce.value&&Ce()}let ue=null,Ee=!1;const ze=g(!1);async function rt(){const e=navigator.wakeLock;if(!e||typeof e.request!="function"){ze.value=!0;return}if(!(ue&&!ue.released))try{const a=await e.request("screen");if(!Ee){a.release().catch(()=>{});return}ue=a,ze.value=!1}catch{ze.value=!0}}function Vt(){const e=ue;ue=null,e&&!e.released&&e.release().catch(()=>{})}function ct(){if(document.visibilityState!=="visible"){De();return}if(rt(),f){J&&Ke(),Ae.flush();return}le()}function Be(){$+=1,k?.close(),k=null,z="",O.value=!1,Y.value="connecting",Z.value=!1,h.value=!1,b=!1,S&&window.clearTimeout(S),S=0,j.value===te&&W(),D=Je(),N.value=null,G.value=0,Q()}async function qt(e){Be();const a=$;z=e;try{const l=()=>a===$,m=await fn(e,{onPublication:C=>{l()&&Rt(C)},onSubscribed:()=>{l()&&It()},onConnection:C=>{l()&&Lt(C)},onDenied:C=>{l()&&Mt(C)},onUnavailable:()=>{l()&&(h.value=!0)}});if(a!==$){m.close();return}k=m}catch{a===$&&(h.value=!0)}}function Ht(){const e=o.value==="ready"?s.value?.remote_channel??"":"";if(e!==z){if(!e){Be();return}qt(e)}}const Oe=g("off"),$e=g(""),Ne=g(null);let M=null,Ve="",je=0,f=null,de=0,ve=0,ut=Promise.resolve();const Ae=hn(()=>{Kt()},gn);function F(){f&&Ae.call()}function De(){ve&&window.clearTimeout(ve),ve=0}function Wt(){De(),!(!f||document.visibilityState!=="visible")&&(ve=window.setTimeout(()=>{ve=0;const e=f;e&&((J||Tt(e.expiresAt,Date.now()))&&Ke(),F())},Tn))}async function Kt(){const e=f;if(!e)return;const a=e.mode.state();Wt();const l=R.remoteState(e.slug,a);ut=l.catch(()=>{});try{if(await l,f!==e)return;N.value=a,G.value=Date.now(),Q(),j.value&&j.value!==te&&j.value!==we&&W()}catch(m){f===e&&q(ht(m instanceof be?m.status:-1))}}const xe=new Map;function dt(e,a){const l=window.setTimeout(()=>{xe.delete(l),R.castRevoke(e,a).catch(()=>{})},ns);xe.set(l,{slug:e,ticket:a})}function Gt(){for(const[e,a]of xe)window.clearTimeout(e),R.castRevoke(a.slug,a.ticket).catch(()=>{});xe.clear()}function qe(){try{return window.sessionStorage}catch{return null}}function vt(e){Ha(qe(),e.slug,{tab:e.tab,ticket:e.ticket,expires_at:e.expiresAt})}let He=null;function ee(e){const a=He;a&&(He=null,window.clearTimeout(a.timer),a.resolve(e))}function Zt(e){return ee(null),new Promise(a=>{const l=window.setTimeout(()=>ee(null),ts);He={resolve:a,timer:l},e.send({type:"where"}).catch(()=>ee(null))})}async function Ft(e){const a=s.value,l=M;if(!a||!l)return;const m=++de,C=y.slug,U=qa(qe(),C,Date.now()),X=e?U:null,Ze=X?.tab??$n();let bt=X?.ticket??"",Fe=X?.expires_at??"",Re="";if(!X||Tt(Fe,Date.now())){let Le;try{Le=await R.castMint(C)}catch{if(m!==de)return;q(es),l.stop();return}if(m!==de||M!==l){R.castRevoke(C,Le.ticket).catch(()=>{});return}U&&(Re=U.ticket),bt=Le.ticket,Fe=Le.expires_at}const kt=Oa({slides:a.slides,targetSeconds:a.target_seconds,tab:Ze}),ye=N.value;!X&&A.value&&ye&&!ye.bye&&ye.number>0&&kt.seed(ye.number,ye.special);const K={slug:C,tab:Ze,ticket:bt,expiresAt:Fe,mode:kt};f=K,B.value=!0,J=!1,Ne.value=null,vt(K),Q(),X||F();try{await l.send({type:"hello",ticket:K.ticket,tab:Ze})}catch{f===K&&q(we,0)}if(Re&&Re!==K.ticket&&dt(C,Re),!X||f!==K)return;const Ie=await Zt(l);f===K&&(Ie&&Ie.number>0&&K.mode.seed(Ie.number,Ie.special),F())}let J=!1,We=!1;async function Ke(){const e=f,a=M;if(!(!e||!a||We)){if(document.visibilityState!=="visible"){J=!0;return}We=!0,J=!1;try{let l;try{l=await R.castMint(e.slug)}catch{f===e&&(J=!0,q(_t));return}if(f!==e||M!==a){R.castRevoke(e.slug,l.ticket).catch(()=>{});return}const m=e.ticket;e.ticket=l.ticket,e.expiresAt=l.expires_at,vt(e);try{await a.send({type:"hello",ticket:e.ticket,tab:e.tab})}catch{f===e&&q(we,0)}m!==e.ticket&&dt(e.slug,m)}finally{We=!1}}}function Ge(){de+=1,Ne.value=null,ee(null),pe();const e=f;if(!e)return;f=null,B.value=!1,J=!1,Ae.cancel(),De();const a=e.mode.state({bye:!0});ut.then(()=>R.remoteState(e.slug,a)).catch(()=>{}),R.castRevoke(e.slug,e.ticket).catch(()=>{}),Gt(),Wa(qe(),e.slug),(j.value===we||j.value===_t)&&W(),D=Je(),N.value=null,G.value=0,Q(),le()}function Jt(){de+=1,ee(null),pe(),f=null,B.value=!1,Ae.cancel(),De()}function Ut(e){if($e.value=M?.deviceName()??"",e==="ended"){Ge();return}e==="resumed"&&f||(f&&Ge(),Ft(e==="resumed"))}let fe=[],me=0;function pe(){me&&window.clearTimeout(me),me=0,fe=[]}function ft(){pe(),q(St)}function Xt(){const e=M;if(!e||!e.connected()){q(St);return}pe(),me=window.setTimeout(ft,as),e.send({type:"log"}).catch(ft)}function Yt(e){if(!me)return;const a=Date.now();fe=fe.filter(U=>a-U.ata===je;M=Ma({appId:e,onAvailability:C=>{m()&&(Oe.value=C,$e.value=M?.deviceName()??"")},onSession:C=>{m()&&Ut(C)},onMessage:C=>{m()&&Qt(C)}})}function nn(){const e=s.value,a=o.value==="ready"&&e&&e.slides.length>0?e.cast_app_id??"":"",l=a?`${a}|${y.slug}`:"";l!==Ve&&(mt(),l&&(Ve=l,tn(a)))}async function pt(e){const a=++v;Se(),o.value="pending",s.value=null,i.value="",d=window.setTimeout(()=>{a===v&&o.value==="pending"&&(o.value="loading")},200);try{const l=await R.speaker(e);if(a!==v)return;Se();const m=l.slides??[];s.value={...l,slides:m},un(e),oe.value=m[0]?.number??1,V.value=null,document.title=l.title?`Pilot · ${l.title}`:"Pilot · BM II°",o.value=m.length===0?"empty":"ready"}catch(l){if(a!==v)return;if(Se(),l instanceof be&&l.status===404){dn(e),await t.replace({name:"my-presentations",query:{denied:"1"}});return}if(l instanceof be&&l.status===401)return;i.value=l instanceof be&&l.status===429?Qa:Ya,o.value="error"}}function an(){pt(y.slug)}function yt(e,a,l){if(document.querySelector(`meta[data-deck-remote="${l}"]`))return;const m=document.createElement("meta");m.name=e,m.content=a,m.dataset.deckRemote=l,document.head.appendChild(m)}return he(()=>y.slug,e=>{f&&Ge(),pt(e)},{immediate:!0}),he([s,o],()=>{Ht(),nn()}),rn(()=>{Ee=!0,document.documentElement.classList.add("deck-remote"),yt("robots","noindex","robots"),yt("theme-color","#141a18","theme"),document.addEventListener("visibilitychange",ct),P=window.setInterval(()=>{document.visibilityState==="visible"&&le()},wn),w=window.setInterval(Q,1e3),rt()}),cn(()=>{Ee=!1,v+=1,Se(),W(),Be(),Jt(),mt(),Ce(),Vt(),window.clearInterval(P),window.clearInterval(w),document.removeEventListener("visibilitychange",ct),document.documentElement.classList.remove("deck-remote"),document.querySelectorAll("meta[data-deck-remote]").forEach(e=>e.remove())}),(e,a)=>(r(),u("main",{class:I(["remote",{"remote-page":o.value==="ready"||o.value==="empty","remote-drawer-open":o.value==="ready"&&V.value}])},[o.value==="loading"?(r(),u("p",Ka,"Wczytywanie pilota…")):o.value==="error"?(r(),u("div",Ga,[c("p",null,_(i.value),1),c("button",{type:"button",class:"remote-retry",onClick:an},"Spróbuj ponownie")])):(o.value==="ready"||o.value==="empty")&&s.value?(r(),u(L,{key:2},[ne(xa,{class:"remote-top","deck-title":s.value.title,status:o.value==="empty"?"waiting":x.value,live:o.value==="ready"&&A.value,counter:Me.value,"slide-title":zt.value,chips:$t.value,clock:Nt.value},null,8,["deck-title","status","live","counter","slide-title","chips","clock"]),j.value?(r(),u("p",Za,_(j.value),1)):E("",!0),c("div",Fa,[o.value==="empty"?(r(),u("div",Ja,[...a[0]||(a[0]=[c("p",{class:"remote-notice-head"},"Ta prezentacja nie ma jeszcze slajdów.",-1),c("p",{class:"remote-muted"},"Dodaj slajdy w panelu administracyjnym i otwórz pilota ponownie.",-1)])])):V.value?(r(),Qe(gt,{key:1,compact:"",cast:B.value,state:N.value,live:A.value,busy:ie.value,onPress:it},null,8,["cast","state","live","busy"])):(r(),u(L,{key:2},[ne(qn,{availability:Oe.value,"device-name":$e.value,tv:Ne.value,onRequest:en,onLog:Xt},null,8,["availability","device-name","tv"]),A.value?E("",!0):(r(),u("div",Ua,[...a[1]||(a[1]=[c("p",{class:"remote-notice-head"},"Otwórz wersję mówcy na komputerze",-1),c("p",{class:"remote-muted"}," Klawisze zadziałają, gdy wersja mówcy tej prezentacji będzie otwarta na komputerze. Powiedz i notatki możesz czytać już teraz. ",-1)])])),ne(gt,{cast:B.value,state:N.value,live:A.value,busy:ie.value,onPress:it,onReset:Pt},null,8,["cast","state","live","busy"])],64))]),ne(da,{deck:s.value,state:N.value,live:o.value==="ready"&&A.value,cursor:oe.value,open:V.value,disabled:se.value===0,"wake-lock-missing":ze.value,onOpen:jt,onClose:At,onCursor:Dt,onGoto:xt},null,8,["deck","state","live","cursor","open","disabled","wake-lock-missing"])],64)):E("",!0),c("dialog",{ref_key:"resetDialog",ref:ce,class:"remote-dialog","aria-labelledby":"remote-reset-title","aria-describedby":"remote-reset-body",onClick:Ot},[c("div",Xa,[a[2]||(a[2]=c("p",{id:"remote-reset-title",class:"remote-dialog-title"},"Wyzerować zegar?",-1)),a[3]||(a[3]=c("p",{id:"remote-reset-body",class:"remote-muted"}," Czas całości i wszystkich slajdów wróci do zera, a zegar ruszy przy następnej zmianie slajdu. ",-1)),c("button",{type:"button",class:"remote-dialog-btn remote-dialog-danger",onClick:Bt},"Zeruj zegar"),c("button",{ref_key:"resetCancel",ref:lt,type:"button",class:"remote-dialog-btn",autofocus:"",onClick:Ce},"Anuluj",512)])],512)],2))}}),fs=_e(os,[["__scopeId","data-v-85090917"]]);export{fs as default}; +import{c as sn}from"./engine-DDeQk6Ow.js";import{d as Te,c as u,b as c,C as I,i as ne,_ as Ye,t as _,f as E,x as p,n as r,U as he,F as L,E as ge,j as on,r as g,l as ln,p as Ct,Z as Et,s as Qe,o as rn,b1 as cn,A as be,b2 as un,b3 as dn,m as vn,b4 as fn}from"./index-BhVKyY57.js";import{p as R}from"./presentations-CsatGkk7.js";import{_ as _e}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{s as et,e as wt,f as tt,g as mn,h as pn,i as yn,d as bn,r as kn,j as wn,k as Je,a as hn,l as ht,S as gn,H as Tn,m as _n,o as Sn,D as Cn,b as En,R as zn,n as $n}from"./remote-aOKX75Mt.js";import{f as Nn,C as Ue,p as jn,i as An,j as Dn,d as xn}from"./log-Xlt5jeld.js";import{c as Rn,a as In}from"./clock-4r1aA6KU.js";const Ln={key:0,class:"cast"},Mn=["aria-busy"],Pn={class:"cast-label"},Bn={key:0,class:"cast-tv"},On={key:0,"aria-live":"polite"},Vn=Te({__name:"CastButton",props:{availability:{},deviceName:{},tv:{}},emits:["request","log"],setup(n,{emit:y}){const t=n,o=y,s=p(()=>t.availability!=="off"&&t.availability!=="no-devices"),i=p(()=>t.availability==="connected"),d=p(()=>t.availability==="connecting"?"Łączę z TV…":t.availability==="connected"?t.deviceName?`Na TV: ${t.deviceName}`:"Na TV":"Wyświetl na TV"),v=p(()=>{const k=t.tv;return k?k.phase==="waiting"?"TV: czekam na bilet":k.phase==="loading"?"TV: przygotowuję slajdy…":k.phase==="error"?"TV: błąd, połącz ponownie":`TV: slajd ${k.number}${k.special?" · specjalny":""}`:""});return(k,z)=>s.value?(r(),u("div",Ln,[c("button",{type:"button",class:I(["cast-row",{on:i.value}]),"aria-busy":n.availability==="connecting"?"true":void 0,onClick:z[0]||(z[0]=$=>o("request"))},[ne(Ye,{class:"cast-icon",name:"cast"}),c("span",Pn,_(d.value),1)],10,Mn),i.value?(r(),u("p",Bn,[v.value?(r(),u("span",On,_(v.value),1)):E("",!0),c("button",{type:"button",class:"cast-log",onClick:z[1]||(z[1]=$=>o("log"))},"Dziennik TV")])):E("",!0)])):E("",!0)}}),qn=_e(Vn,[["__scopeId","data-v-ff9a5014"]]),Hn={class:"drawer"},Wn=["id","aria-label"],Kn={class:"sheet-head"},Gn=["disabled"],Zn={class:"sheet-title"},Fn={class:"title"},Jn={key:0,class:"subtitle"},Un=["disabled"],Xn=["innerHTML"],Yn={key:1,class:"empty"},Qn=["innerHTML"],ea={key:1,class:"empty"},ta=["data-current","aria-current","onClick"],na={class:"num"},aa={class:"row-title"},sa={key:0,class:"tag"},oa={key:1,class:"now"},ia={class:"list-foot"},la={key:0,class:"hint"},ra={class:"bar","aria-label":"Szuflady na telefonie"},ca=["disabled","aria-expanded","aria-controls","onClick"],ua=Te({__name:"RemoteDrawer",props:{deck:{},state:{},live:{type:Boolean},cursor:{},open:{},disabled:{type:Boolean},wakeLockMissing:{type:Boolean}},emits:["goto","cursor","open","close"],setup(n,{emit:y}){const t=n,o=y,s=[{kind:"say",label:"Powiedz"},{kind:"notes",label:"Notatki"},{kind:"slides",label:"Slajdy"}],i=p(()=>t.deck.slides.length),d=p(()=>mn(t.deck,t.state,t.live,t.cursor)),v=p(()=>t.live&&t.state?t.state.number:t.deck.slides[et(t.deck.slides,t.cursor)]?.number??0),k=p(()=>et(t.deck.slides,t.cursor)),z=p(()=>t.live&&t.state?t.state.number:t.deck.slides[k.value]?.number??t.cursor),$=p(()=>{const h=t.live&&t.state?.special?"s":"";return`${z.value}${h}`});function P(h){return h?/]*>/g,"").replace(/ | /g," ").trim()!=="":!1}const w=p(()=>P(d.value?.say_html)?wt(d.value?.say_html??""):""),b=p(()=>P(d.value?.notes_html)?wt(d.value?.notes_html??""):""),S=p(()=>t.open==="say"?`Powiedz · slajd ${z.value}`:t.open==="notes"?`Notatki · slajd ${z.value}`:"Slajdy"),D=p(()=>t.open==="slides"?"":t.live?"Widzisz tylko Ty":`Przeglądasz na telefonie · slajd ${k.value+1} z ${i.value}`),N=p(()=>!t.live&&(t.open==="say"||t.open==="notes")),G=p(()=>k.value>0),ae=p(()=>k.valuet.deck.slides.map(h=>({number:h.number,title:tt(h),special:!!h.special})));function B(h){t.disabled||(t.open===h?o("close"):o("open",h))}function Y(h){const x=t.deck.slides[k.value+h];x&&o("cursor",x.number)}const Z=g(null),O=g(null);return he([$,()=>t.open],()=>{Z.value&&(Z.value.scrollTop=0)}),he(()=>t.open,async h=>{if(h!=="slides")return;await Et(),O.value?.querySelector('[data-current="true"]')?.scrollIntoView({block:"center"})}),(h,x)=>{const se=ln("router-link");return r(),u("div",Hn,[n.open?(r(),u("section",{key:0,id:`remote-drawer-${n.open}`,class:"sheet","aria-label":S.value},[c("header",Kn,[N.value?(r(),u("button",{key:0,type:"button",class:"icon-btn","aria-label":"Poprzedni slajd na telefonie",disabled:!G.value,onClick:x[0]||(x[0]=T=>Y(-1))}," ‹ ",8,Gn)):E("",!0),c("div",Zn,[c("p",Fn,_(S.value),1),D.value?(r(),u("p",Jn,_(D.value),1)):E("",!0)]),N.value?(r(),u("button",{key:1,type:"button",class:"icon-btn","aria-label":"Następny slajd na telefonie",disabled:!ae.value,onClick:x[1]||(x[1]=T=>Y(1))}," › ",8,Un)):E("",!0),c("button",{type:"button",class:"close-btn",onClick:x[2]||(x[2]=T=>o("close"))},"Zamknij")]),c("div",{ref_key:"body",ref:Z,class:I(["sheet-body",{reading:n.open!=="slides"}])},[n.open==="say"?(r(),u(L,{key:0},[w.value?(r(),u("div",{key:0,class:"text",innerHTML:w.value},null,8,Xn)):(r(),u("p",Yn,"Brak tekstu do powiedzenia na tym slajdzie."))],64)):n.open==="notes"?(r(),u(L,{key:1},[b.value?(r(),u("div",{key:0,class:"text",innerHTML:b.value},null,8,Qn)):(r(),u("p",ea,"Brak notatek do tego slajdu."))],64)):(r(),u(L,{key:2},[c("ol",{ref_key:"list",ref:O,class:"list"},[(r(!0),u(L,null,ge(A.value,T=>(r(),u("li",{key:T.number},[c("button",{type:"button",class:"row","data-current":T.number===v.value?"true":void 0,"aria-current":T.number===v.value?"true":void 0,onClick:Me=>o("goto",T.number)},[c("span",na,_(T.number),1),c("span",aa,_(T.title),1),T.special?(r(),u("span",sa,"+ specjalny")):E("",!0),T.number===v.value?(r(),u("span",oa,"teraz")):E("",!0)],8,ta)]))),128))],512),c("footer",ia,[ne(se,{class:"back-link",to:{name:"my-presentations"}},{default:on(()=>[...x[3]||(x[3]=[Ct("Wróć do moich prezentacji",-1)])]),_:1}),n.wakeLockMissing?(r(),u("p",la,"Ta przeglądarka nie pozwala zablokować wygaszania ekranu.")):E("",!0)])],64))],2)],8,Wn)):E("",!0),c("nav",ra,[(r(),u(L,null,ge(s,T=>c("button",{key:T.kind,type:"button",class:I(["tab",{open:n.open===T.kind}]),disabled:n.disabled,"aria-expanded":n.open===T.kind?"true":"false","aria-controls":`remote-drawer-${T.kind}`,onClick:Me=>B(T.kind)},_(T.label),11,ca)),64))])])}}}),da=_e(ua,[["__scopeId","data-v-9f920f42"]]),va=["aria-label"],fa={key:0,class:"eyebrow"},ma={class:"grid nav"},pa=["disabled","aria-busy","onClick"],ya={key:1,class:"grid fn"},ba=["disabled","aria-pressed","aria-busy","onClick"],ka={class:"label"},wa=Te({__name:"RemoteKeys",props:{state:{},live:{type:Boolean},busy:{},compact:{type:Boolean},cast:{type:Boolean}},emits:["press","reset"],setup(n,{emit:y}){const t=n,o=y,s=p(()=>pn(t.state,t.live,t.cast?"cast":"deck")),i=p(()=>t.cast?"Klawisze na TV":"Klawisze na komputerze"),d=p(()=>s.value.slice(0,2)),v=p(()=>s.value.slice(2));function k($){return(t.busy[$.action]??0)>0}function z($){$.enabled&&($.action==="clock-reset"?o("reset"):o("press",$.action))}return($,P)=>(r(),u("section",{class:I(["keys",{compact:n.compact}]),"aria-label":i.value},[n.compact?E("",!0):(r(),u("p",fa,_(i.value),1)),c("div",ma,[(r(!0),u(L,null,ge(d.value,w=>(r(),u("button",{key:w.action,type:"button",class:I(["key nav-key",w.action]),disabled:!w.enabled,"aria-busy":k(w)?"true":void 0,onClick:b=>z(w)},[w.action==="prev"?(r(),Qe(Ye,{key:0,class:"arrow",name:"arrow-left"})):E("",!0),c("span",null,_(w.label),1),w.action==="next"?(r(),Qe(Ye,{key:1,class:"arrow",name:"arrow-right"})):E("",!0)],10,pa))),128))]),n.compact?E("",!0):(r(),u("div",ya,[(r(!0),u(L,null,ge(v.value,w=>(r(),u("button",{key:w.action,type:"button",class:"key fn-key",disabled:!w.enabled,"aria-pressed":w.pressed===null?void 0:w.pressed?"true":"false","aria-busy":k(w)?"true":void 0,onClick:b=>z(w)},[c("span",ka,_(w.label),1),c("kbd",null,_(w.kbd),1)],8,ba))),128))]))],10,va))}}),gt=_e(wa,[["__scopeId","data-v-25e061a7"]]),ha={class:"top"},ga={class:"row row-title"},Ta={class:"deck-title"},_a={class:"row row-slide","aria-live":"polite"},Sa={class:"counter"},Ca={key:0,class:"slide-title"},Ea={key:1,class:"slide-title waiting"},za={class:"row row-chips","aria-label":"Na komputerze"},$a={class:"row row-clock"},Na={key:0,class:"idle"},ja={key:0,class:"chip"},Aa={key:2,class:"clock"},Da=Te({__name:"RemoteTopBar",props:{deckTitle:{},status:{},live:{type:Boolean},counter:{},slideTitle:{},chips:{},clock:{}},setup(n){const y=n,t=p(()=>yn(y.status));return(o,s)=>(r(),u("header",ha,[c("div",ga,[c("p",Ta,_(n.deckTitle),1),c("p",{class:I(["conn",{on:n.status==="live"}])},[s[0]||(s[0]=c("span",{class:"dot","aria-hidden":"true"},null,-1)),Ct(_(t.value),1)],2)]),c("div",_a,[c("p",Sa,_(n.counter),1),n.live?(r(),u("p",Ca,_(n.slideTitle),1)):(r(),u("p",Ea,"Czekam na wersję mówcy"))]),c("ul",za,[n.live?(r(!0),u(L,{key:0},ge(n.chips,i=>(r(),u("li",{key:i,class:I(["chip",{khaki:i==="Specjalny"}])},_(i),3))),128)):E("",!0)]),c("div",$a,[n.live&&n.clock&&n.clock.idle?(r(),u("p",Na,"Zegar ruszy przy pierwszej zmianie slajdu")):n.live&&n.clock?(r(),u(L,{key:1},[c("p",{class:I(["clock",{paused:n.clock.paused}])},[s[2]||(s[2]=c("span",{class:"lbl"},"Slajd",-1)),c("b",{class:I({over:n.clock.slideOver})},_(n.clock.slide),3),s[3]||(s[3]=c("span",{class:"sep","aria-hidden":"true"},"·",-1)),s[4]||(s[4]=c("span",{class:"lbl"},"Całość",-1)),c("b",{class:I({over:n.clock.totalOver})},_(n.clock.total),3),n.clock.pace?(r(),u(L,{key:0},[s[1]||(s[1]=c("span",{class:"sep","aria-hidden":"true"},"·",-1)),c("span",{class:I(["pace",{late:n.clock.late}])},_(n.clock.pace),3)],64)):E("",!0)],2),n.clock.paused?(r(),u("span",ja,"Pauza")):E("",!0)],64)):(r(),u("p",Aa,[...s[5]||(s[5]=[c("b",null,"—",-1)])]))])]))}}),xa=_e(Da,[["__scopeId","data-v-382e11de"]]),Ra="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",Xe="bm-cast-sender";function at(){return globalThis}function nt(){const n=at().cast?.framework;return n&&n.CastContext&&n.CastContextEventType?n:null}let ke=null;function Ia(n=1e4){return nt()?Promise.resolve(!0):ke||(typeof document>"u"?Promise.resolve(!1):(ke=new Promise(t=>{let o=!1,s=null;const i=d=>{o||(o=!0,s!==null&&clearTimeout(s),t(d&&nt()!==null))};try{at().__onGCastApiAvailable=v=>i(!!v);let d=document.getElementById(Xe);d||(d=document.createElement("script"),d.id=Xe,d.src=Ra,d.async=!0,d.addEventListener("error",()=>i(!1)),document.head.appendChild(d)),s=setTimeout(()=>i(!1),n)}catch{i(!1)}}).then(t=>(t||(ke=null,document.getElementById(Xe)?.remove()),t)),ke))}function La(n){switch(n){case"NOT_CONNECTED":return"available";case"CONNECTING":return"connecting";case"CONNECTED":return"connected";default:return"no-devices"}}function Ma(n){const y=nt();if(!y)return null;let t;try{t=y.CastContext.getInstance()}catch{return null}const o=y.CastContextEventType;let s=!1,i=null;const d=(b,S)=>{if(s)return;const D=jn(S);D&&n.onMessage(D)};function v(){const b=i;if(i=null,!!b)try{b.removeMessageListener(Ue,d)}catch{}}function k(){v();let b=null;try{b=t.getCurrentSession(),b?.addMessageListener(Ue,d)}catch{b=null}return i=b,b!==null}function z(b){s||n.onAvailability(La(b??""))}const $=b=>z(b.castState),P=b=>{if(s)return;const S=b.sessionState;S==="SESSION_STARTED"||S==="SESSION_RESUMED"?k()&&n.onSession(S==="SESSION_STARTED"?"started":"resumed"):S==="SESSION_ENDED"&&(v(),n.onSession("ended"))};try{t.addEventListener(o.CAST_STATE_CHANGED,$),t.addEventListener(o.SESSION_STATE_CHANGED,P)}catch{return null}try{const b=at().chrome?.cast?.AutoJoinPolicy?.ORIGIN_SCOPED??"origin_scoped";t.setOptions({receiverApplicationId:n.appId,autoJoinPolicy:b})}catch{}try{z(t.getCastState())}catch{z("")}let w=!1;try{w=t.getCurrentSession()!==null}catch{w=!1}return w&&queueMicrotask(()=>{!s&&i===null&&k()&&n.onSession("resumed")}),{async request(){if(!s)try{await t.requestSession()}catch{}},stop(){try{t.endCurrentSession(!0)}catch{}},async send(b){if(!Nn(b))throw new Error("cast message too large");let S=null;try{S=t.getCurrentSession()}catch{S=null}if(!S)throw new Error("no cast session");await S.sendMessage(Ue,b)},deviceName(){try{return t.getCurrentSession()?.getCastDevice()?.friendlyName??""}catch{return""}},connected(){try{return t.getCurrentSession()!==null}catch{return!1}},close(){if(!s){s=!0,v();try{t.removeEventListener(o.CAST_STATE_CHANGED,$),t.removeEventListener(o.SESSION_STATE_CHANGED,P)}catch{}}}}}const Pa=["speak","scheme","toolbar"],Ba=new Set(Pa);function Oa(n){const y=n.now??(()=>Date.now()),t=n.slides.map(i=>({number:i.number,hasSpecial:i.special!=null})),o=Rn({budgets:n.slides.map(i=>i.seconds),targetSeconds:n.targetSeconds,now:y}),s=sn({slides:t,history:{state:null,replaceState(){}},mode:"speaker",onNavigate:i=>{o.tick(),o.go(i)}});return{press(i){if(i==="sync"||i==="goto"||Ba.has(i))return!1;const d=kn(i);if(!d)return!1;const v=s.applyKey({key:d});return v==="pause"?o.pause():v==="clock"?o.toggleHidden():v==="reset"&&o.reset(),!0},goto(i){const d=t.findIndex(v=>v.number===i);return d<0?!1:(s.go(d),!0)},seed(i,d){t.some(v=>v.number===i)&&(o.tick(),s.showId(d?`${i}s`:String(i)),o.seek(s.snapshot().index))},state(i={}){return o.tick(),bn(s.snapshot(),o.view(),n.tab,{claim:!0,bye:i.bye,light:!1})},position(){const i=s.snapshot();return{number:i.number,special:i.special}}}}const Va=/^[A-Za-z0-9_-]{8,64}$/;function st(n){return"bm.cast."+n}function qa(n,y,t){if(!n)return null;let o;try{o=n.getItem(st(y))}catch{return null}if(!o)return null;let s;try{s=JSON.parse(o)}catch{return null}if(typeof s!="object"||s===null||Array.isArray(s))return null;const{tab:i,ticket:d,expires_at:v}=s;if(typeof i!="string"||!Va.test(i)||!An(d)||typeof v!="string")return null;const k=Date.parse(v);return!Number.isFinite(k)||k<=t?null:{tab:i,ticket:d,expires_at:v}}function Ha(n,y,t){if(n)try{n.setItem(st(y),JSON.stringify({tab:t.tab,ticket:t.ticket,expires_at:t.expires_at}))}catch{}}function Wa(n,y){if(n)try{n.removeItem(st(y))}catch{}}function Tt(n,y,t=10*6e4){const o=Date.parse(n);return Number.isFinite(o)?y>=o-t:!0}const Ka={key:0,class:"remote-status remote-label"},Ga={key:1,class:"remote-status"},Za={key:0,class:"remote-alert",role:"alert"},Fa={class:"remote-middle"},Ja={key:0,class:"remote-notice"},Ua={key:0,class:"remote-notice"},Xa={class:"remote-dialog-body"},Ya="Nie udało się wczytać prezentacji. Sprawdź połączenie z internetem i spróbuj ponownie.",Qa="Za dużo żądań w krótkim czasie. Odczekaj minutę i spróbuj ponownie.",te="Pilot niedostępny. Spróbuję połączyć się ponownie za 10 s.",es="Nie udało się połączyć z TV. Spróbuj ponownie.",we="TV nie odpowiada. Dotknij „Na TV”, aby zakończyć i połączyć ponownie.",_t="Nie udało się odnowić biletu TV. Spróbuję ponownie.",St="Nie udało się pobrać dziennika TV.",ts=2e3,ns=15e3,as=15e3,ss=3e4,os=Te({__name:"PresentationRemoteView",props:{slug:{}},setup(n){const y=n,t=vn(),o=g("pending"),s=g(null),i=g("");let d=0,v=0,k=null,z="",$=0,P=0,w=0,b=!1,S=0,D=Je();const N=g(null),G=g(0),ae=g(Date.now()),A=g(!1),B=g(!1),Y=g("connecting"),Z=g(!1),O=g(!1),h=g(!1),x=p(()=>B.value?"live":h.value?"unavailable":A.value?"live":Y.value==="connected"&&O.value?"waiting":Z.value?"reconnecting":"connecting"),se=p(()=>s.value?.slides.length??0),T=p(()=>{const e=N.value;return!s.value||!e?0:et(s.value.slides,e.number)}),Me=p(()=>{const e=N.value;return A.value&&e?`${e.number} / ${e.total}`:`— / ${se.value}`}),zt=p(()=>{const e=N.value,a=s.value?.slides[T.value];return!e||!a?"":e.special&&a.special?tt(a.special):tt(a)}),$t=p(()=>N.value?_n(N.value):[]),Nt=p(()=>{const e=N.value;return!s.value||!e?null:In(Sn(e,s.value.slides.map(a=>a.seconds),s.value.target_seconds,T.value,G.value,ae.value))}),V=g(null),oe=g(1);he(N,e=>{e&&!e.bye&&e.number>0&&(oe.value=e.number)});function jt(e){se.value!==0&&(V.value=e)}function At(){V.value=null}function Dt(e){oe.value=e}function xt(e){if(f){re(),f.mode.goto(e)&&F(),V.value=null;return}if(A.value){re(),Pe("goto",e),V.value=null;return}oe.value=e,V.value="say"}function Q(){ae.value=Date.now(),A.value=B.value||D.live(ae.value)}function Rt(e){if(f)return;const a=En(e);!a||a.event!==zn||D.observe(a.payload,Date.now())&&(N.value=D.current(),G.value=D.receivedAt(),Q(),a.payload.bye&&le())}function Se(){d&&window.clearTimeout(d),d=0}const j=g("");let H=0;function q(e,a=4e3){j.value=e,H&&window.clearTimeout(H),H=0,a>0&&(H=window.setTimeout(()=>{j.value="",H=0},a))}function W(){H&&window.clearTimeout(H),H=0,j.value=""}const ie=g({});function ot(e,a){const l=Math.max(0,(ie.value[e]??0)+a);ie.value={...ie.value,[e]:l}}async function Pe(e,a){const l={action:e,tab:D.actionTab()};a!==void 0&&(l.number=a),ot(e,1);try{await R.remote(y.slug,l),j.value&&j.value!==te&&W()}catch(m){q(ht(m instanceof be?m.status:-1))}finally{ot(e,-1)}}function le(){f||!O.value||R.remote(y.slug,{action:"sync",tab:""}).catch(()=>{})}function It(){O.value=!0,h.value=!1,j.value===te&&W(),D.release(),le()}function Lt(e){Y.value=e,e==="connected"?Z.value=!0:O.value=!1}function Mt(e){if(O.value=!1,h.value=!0,e!==403||b){j.value===te&&W();return}b=!0,q(te,0),S=window.setTimeout(()=>{S=0,k?.resubscribe()},Cn)}function re(){typeof navigator.vibrate=="function"&&navigator.vibrate(15)}function it(e){if(f){re(),f.mode.press(e)&&F();return}A.value&&(re(),Pe(e))}const ce=g(null),lt=g(null);function Pt(){if(!A.value)return;re();const e=ce.value;e&&(e.open||e.showModal(),Et(()=>lt.value?.focus()))}function Ce(){ce.value?.open&&ce.value.close()}function Bt(){if(Ce(),f){f.mode.press("clock-reset")&&F();return}A.value&&Pe("clock-reset")}function Ot(e){e.target===ce.value&&Ce()}let ue=null,Ee=!1;const ze=g(!1);async function rt(){const e=navigator.wakeLock;if(!e||typeof e.request!="function"){ze.value=!0;return}if(!(ue&&!ue.released))try{const a=await e.request("screen");if(!Ee){a.release().catch(()=>{});return}ue=a,ze.value=!1}catch{ze.value=!0}}function Vt(){const e=ue;ue=null,e&&!e.released&&e.release().catch(()=>{})}function ct(){if(document.visibilityState!=="visible"){De();return}if(rt(),f){J&&Ke(),Ae.flush();return}le()}function Be(){$+=1,k?.close(),k=null,z="",O.value=!1,Y.value="connecting",Z.value=!1,h.value=!1,b=!1,S&&window.clearTimeout(S),S=0,j.value===te&&W(),D=Je(),N.value=null,G.value=0,Q()}async function qt(e){Be();const a=$;z=e;try{const l=()=>a===$,m=await fn(e,{onPublication:C=>{l()&&Rt(C)},onSubscribed:()=>{l()&&It()},onConnection:C=>{l()&&Lt(C)},onDenied:C=>{l()&&Mt(C)},onUnavailable:()=>{l()&&(h.value=!0)}});if(a!==$){m.close();return}k=m}catch{a===$&&(h.value=!0)}}function Ht(){const e=o.value==="ready"?s.value?.remote_channel??"":"";if(e!==z){if(!e){Be();return}qt(e)}}const Oe=g("off"),$e=g(""),Ne=g(null);let M=null,Ve="",je=0,f=null,de=0,ve=0,ut=Promise.resolve();const Ae=hn(()=>{Kt()},gn);function F(){f&&Ae.call()}function De(){ve&&window.clearTimeout(ve),ve=0}function Wt(){De(),!(!f||document.visibilityState!=="visible")&&(ve=window.setTimeout(()=>{ve=0;const e=f;e&&((J||Tt(e.expiresAt,Date.now()))&&Ke(),F())},Tn))}async function Kt(){const e=f;if(!e)return;const a=e.mode.state();Wt();const l=R.remoteState(e.slug,a);ut=l.catch(()=>{});try{if(await l,f!==e)return;N.value=a,G.value=Date.now(),Q(),j.value&&j.value!==te&&j.value!==we&&W()}catch(m){f===e&&q(ht(m instanceof be?m.status:-1))}}const xe=new Map;function dt(e,a){const l=window.setTimeout(()=>{xe.delete(l),R.castRevoke(e,a).catch(()=>{})},ns);xe.set(l,{slug:e,ticket:a})}function Gt(){for(const[e,a]of xe)window.clearTimeout(e),R.castRevoke(a.slug,a.ticket).catch(()=>{});xe.clear()}function qe(){try{return window.sessionStorage}catch{return null}}function vt(e){Ha(qe(),e.slug,{tab:e.tab,ticket:e.ticket,expires_at:e.expiresAt})}let He=null;function ee(e){const a=He;a&&(He=null,window.clearTimeout(a.timer),a.resolve(e))}function Zt(e){return ee(null),new Promise(a=>{const l=window.setTimeout(()=>ee(null),ts);He={resolve:a,timer:l},e.send({type:"where"}).catch(()=>ee(null))})}async function Ft(e){const a=s.value,l=M;if(!a||!l)return;const m=++de,C=y.slug,U=qa(qe(),C,Date.now()),X=e?U:null,Ze=X?.tab??$n();let bt=X?.ticket??"",Fe=X?.expires_at??"",Re="";if(!X||Tt(Fe,Date.now())){let Le;try{Le=await R.castMint(C)}catch{if(m!==de)return;q(es),l.stop();return}if(m!==de||M!==l){R.castRevoke(C,Le.ticket).catch(()=>{});return}U&&(Re=U.ticket),bt=Le.ticket,Fe=Le.expires_at}const kt=Oa({slides:a.slides,targetSeconds:a.target_seconds,tab:Ze}),ye=N.value;!X&&A.value&&ye&&!ye.bye&&ye.number>0&&kt.seed(ye.number,ye.special);const K={slug:C,tab:Ze,ticket:bt,expiresAt:Fe,mode:kt};f=K,B.value=!0,J=!1,Ne.value=null,vt(K),Q(),X||F();try{await l.send({type:"hello",ticket:K.ticket,tab:Ze})}catch{f===K&&q(we,0)}if(Re&&Re!==K.ticket&&dt(C,Re),!X||f!==K)return;const Ie=await Zt(l);f===K&&(Ie&&Ie.number>0&&K.mode.seed(Ie.number,Ie.special),F())}let J=!1,We=!1;async function Ke(){const e=f,a=M;if(!(!e||!a||We)){if(document.visibilityState!=="visible"){J=!0;return}We=!0,J=!1;try{let l;try{l=await R.castMint(e.slug)}catch{f===e&&(J=!0,q(_t));return}if(f!==e||M!==a){R.castRevoke(e.slug,l.ticket).catch(()=>{});return}const m=e.ticket;e.ticket=l.ticket,e.expiresAt=l.expires_at,vt(e);try{await a.send({type:"hello",ticket:e.ticket,tab:e.tab})}catch{f===e&&q(we,0)}m!==e.ticket&&dt(e.slug,m)}finally{We=!1}}}function Ge(){de+=1,Ne.value=null,ee(null),pe();const e=f;if(!e)return;f=null,B.value=!1,J=!1,Ae.cancel(),De();const a=e.mode.state({bye:!0});ut.then(()=>R.remoteState(e.slug,a)).catch(()=>{}),R.castRevoke(e.slug,e.ticket).catch(()=>{}),Gt(),Wa(qe(),e.slug),(j.value===we||j.value===_t)&&W(),D=Je(),N.value=null,G.value=0,Q(),le()}function Jt(){de+=1,ee(null),pe(),f=null,B.value=!1,Ae.cancel(),De()}function Ut(e){if($e.value=M?.deviceName()??"",e==="ended"){Ge();return}e==="resumed"&&f||(f&&Ge(),Ft(e==="resumed"))}let fe=[],me=0;function pe(){me&&window.clearTimeout(me),me=0,fe=[]}function ft(){pe(),q(St)}function Xt(){const e=M;if(!e||!e.connected()){q(St);return}pe(),me=window.setTimeout(ft,as),e.send({type:"log"}).catch(ft)}function Yt(e){if(!me)return;const a=Date.now();fe=fe.filter(U=>a-U.ata===je;M=Ma({appId:e,onAvailability:C=>{m()&&(Oe.value=C,$e.value=M?.deviceName()??"")},onSession:C=>{m()&&Ut(C)},onMessage:C=>{m()&&Qt(C)}})}function nn(){const e=s.value,a=o.value==="ready"&&e&&e.slides.length>0?e.cast_app_id??"":"",l=a?`${a}|${y.slug}`:"";l!==Ve&&(mt(),l&&(Ve=l,tn(a)))}async function pt(e){const a=++v;Se(),o.value="pending",s.value=null,i.value="",d=window.setTimeout(()=>{a===v&&o.value==="pending"&&(o.value="loading")},200);try{const l=await R.speaker(e);if(a!==v)return;Se();const m=l.slides??[];s.value={...l,slides:m},un(e),oe.value=m[0]?.number??1,V.value=null,document.title=l.title?`Pilot · ${l.title}`:"Pilot · BM II°",o.value=m.length===0?"empty":"ready"}catch(l){if(a!==v)return;if(Se(),l instanceof be&&l.status===404){dn(e),await t.replace({name:"my-presentations",query:{denied:"1"}});return}if(l instanceof be&&l.status===401)return;i.value=l instanceof be&&l.status===429?Qa:Ya,o.value="error"}}function an(){pt(y.slug)}function yt(e,a,l){if(document.querySelector(`meta[data-deck-remote="${l}"]`))return;const m=document.createElement("meta");m.name=e,m.content=a,m.dataset.deckRemote=l,document.head.appendChild(m)}return he(()=>y.slug,e=>{f&&Ge(),pt(e)},{immediate:!0}),he([s,o],()=>{Ht(),nn()}),rn(()=>{Ee=!0,document.documentElement.classList.add("deck-remote"),yt("robots","noindex","robots"),yt("theme-color","#141a18","theme"),document.addEventListener("visibilitychange",ct),P=window.setInterval(()=>{document.visibilityState==="visible"&&le()},wn),w=window.setInterval(Q,1e3),rt()}),cn(()=>{Ee=!1,v+=1,Se(),W(),Be(),Jt(),mt(),Ce(),Vt(),window.clearInterval(P),window.clearInterval(w),document.removeEventListener("visibilitychange",ct),document.documentElement.classList.remove("deck-remote"),document.querySelectorAll("meta[data-deck-remote]").forEach(e=>e.remove())}),(e,a)=>(r(),u("main",{class:I(["remote",{"remote-page":o.value==="ready"||o.value==="empty","remote-drawer-open":o.value==="ready"&&V.value}])},[o.value==="loading"?(r(),u("p",Ka,"Wczytywanie pilota…")):o.value==="error"?(r(),u("div",Ga,[c("p",null,_(i.value),1),c("button",{type:"button",class:"remote-retry",onClick:an},"Spróbuj ponownie")])):(o.value==="ready"||o.value==="empty")&&s.value?(r(),u(L,{key:2},[ne(xa,{class:"remote-top","deck-title":s.value.title,status:o.value==="empty"?"waiting":x.value,live:o.value==="ready"&&A.value,counter:Me.value,"slide-title":zt.value,chips:$t.value,clock:Nt.value},null,8,["deck-title","status","live","counter","slide-title","chips","clock"]),j.value?(r(),u("p",Za,_(j.value),1)):E("",!0),c("div",Fa,[o.value==="empty"?(r(),u("div",Ja,[...a[0]||(a[0]=[c("p",{class:"remote-notice-head"},"Ta prezentacja nie ma jeszcze slajdów.",-1),c("p",{class:"remote-muted"},"Dodaj slajdy w panelu administracyjnym i otwórz pilota ponownie.",-1)])])):V.value?(r(),Qe(gt,{key:1,compact:"",cast:B.value,state:N.value,live:A.value,busy:ie.value,onPress:it},null,8,["cast","state","live","busy"])):(r(),u(L,{key:2},[ne(qn,{availability:Oe.value,"device-name":$e.value,tv:Ne.value,onRequest:en,onLog:Xt},null,8,["availability","device-name","tv"]),A.value?E("",!0):(r(),u("div",Ua,[...a[1]||(a[1]=[c("p",{class:"remote-notice-head"},"Otwórz wersję mówcy na komputerze",-1),c("p",{class:"remote-muted"}," Klawisze zadziałają, gdy wersja mówcy tej prezentacji będzie otwarta na komputerze. Powiedz i notatki możesz czytać już teraz. ",-1)])])),ne(gt,{cast:B.value,state:N.value,live:A.value,busy:ie.value,onPress:it,onReset:Pt},null,8,["cast","state","live","busy"])],64))]),ne(da,{deck:s.value,state:N.value,live:o.value==="ready"&&A.value,cursor:oe.value,open:V.value,disabled:se.value===0,"wake-lock-missing":ze.value,onOpen:jt,onClose:At,onCursor:Dt,onGoto:xt},null,8,["deck","state","live","cursor","open","disabled","wake-lock-missing"])],64)):E("",!0),c("dialog",{ref_key:"resetDialog",ref:ce,class:"remote-dialog","aria-labelledby":"remote-reset-title","aria-describedby":"remote-reset-body",onClick:Ot},[c("div",Xa,[a[2]||(a[2]=c("p",{id:"remote-reset-title",class:"remote-dialog-title"},"Wyzerować zegar?",-1)),a[3]||(a[3]=c("p",{id:"remote-reset-body",class:"remote-muted"}," Czas całości i wszystkich slajdów wróci do zera, a zegar ruszy przy następnej zmianie slajdu. ",-1)),c("button",{type:"button",class:"remote-dialog-btn remote-dialog-danger",onClick:Bt},"Zeruj zegar"),c("button",{ref_key:"resetCancel",ref:lt,type:"button",class:"remote-dialog-btn",autofocus:"",onClick:Ce},"Anuluj",512)])],512)],2))}}),fs=_e(os,[["__scopeId","data-v-85090917"]]);export{fs as default}; diff --git a/public/assets/PresentationSpeakerView-tPXpHlzH.js b/public/assets/PresentationSpeakerView-Bs2NSw6o.js similarity index 78% rename from public/assets/PresentationSpeakerView-tPXpHlzH.js rename to public/assets/PresentationSpeakerView-Bs2NSw6o.js index 3e8a241..cfb395a 100644 --- a/public/assets/PresentationSpeakerView-tPXpHlzH.js +++ b/public/assets/PresentationSpeakerView-Bs2NSw6o.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SpeakerTools-CXKjSgrG.js","assets/index-CtNAsql9.js","assets/index-D22Gy7R4.css"])))=>i.map(i=>d[i]); -import{d as Be,U as ce,o as Pe,aK as Ue,s as de,j as ue,r as p,x as Ie,aL as Oe,A as M,aM as He,n as pe,b as fe,e as Ve,f as qe,aN as Ze,m as Ke,aO as Ye,aP as Fe}from"./index-CtNAsql9.js";import{p as _}from"./presentations-G0Dt4vNe.js";import{_ as Ge,r as Je}from"./DeckViewer.vue_vue_type_style_index_0_lang-VLaT-7ba.js";import{c as Qe}from"./clock-4r1aA6KU.js";import{n as We,C as Xe,c as Q,a as et,p as W,S as tt,D as nt,H as me,b as ot,R as at,t as it,r as rt,d as st}from"./remote-aOKX75Mt.js";import"./engine-DDeQk6Ow.js";const lt='.speak{display:none}.deck.speak-on .speak{display:block;position:absolute;left:0;right:0;bottom:0;max-height:46%;overflow:auto;background:var(--deck-ink);color:var(--deck-paper);padding:18px 88px;font-size:22px;line-height:1.45}.notes:before{content:"Notatki · N"}.speak:before,.srcs:before{display:block;font-family:var(--deck-mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:6px;opacity:.7}.speak:before{content:"Powiedz · P"}.srcs:before{content:"Źródła · Z"}.deck.speak-on #nav{bottom:50%}.deck.notes-on .notes.is-empty:after{content:"Brak notatek do tego slajdu.";opacity:.7}.deck.speak-on .speak.is-empty:after{content:"Brak tekstu do powiedzenia na tym slajdzie.";opacity:.7}.deck.srcs-on .srcs.is-empty:after{content:"Brak źródeł do tego slajdu.";opacity:.7}#speaker-clock{position:static;display:inline-flex;gap:8px;align-items:center;font-family:var(--deck-mono);font-size:12px;line-height:1;color:var(--deck-ink-2);letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;background:var(--deck-paper-2);border:1px solid var(--deck-rule);padding:4px 12px;cursor:pointer;user-select:none}.tools #speaker-clock{min-height:40px;padding:0 14px;background:var(--deck-paper);border-color:var(--deck-ink-2)}.tools-pilot{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 8px;color:var(--deck-ink);white-space:nowrap}.tools-pilot.elsewhere{color:var(--deck-ink-2)}.tools-pilot-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--deck-khaki)}#speaker-clock.floating{position:fixed;top:8px;left:14px;z-index:5}#speaker-clock b{display:inline-block;font-weight:700;font-size:20px;color:var(--deck-ink);font-variant-numeric:tabular-nums;letter-spacing:0;margin-right:6px;text-align:right}#speaker-clock .clk-slide,#speaker-clock .clk-total{min-width:6ch}#speaker-clock b.over{color:var(--deck-empire)}#speaker-clock .clk-pace{display:inline-block;min-width:18ch;text-transform:none;letter-spacing:0}#speaker-clock .clk-pace.late{color:var(--deck-empire)}#speaker-clock.paused b{opacity:.5}@media(hover:hover){.tools-show{opacity:0}.tools-show:hover,.tools-show:focus,.tools-show:focus-visible{opacity:1}}@media(hover:none){.tools-show{opacity:.55}}@media screen and (max-width:900px)and (orientation:portrait){.speak{display:block;margin-top:10px;padding:12px 14px;background:var(--deck-paper-2);font-size:15px;color:var(--deck-ink-2);border-left:3px solid var(--deck-empire);position:static;max-height:none}.speak.is-empty{display:none}.slide.title .speak,.slide.sec .speak{background:var(--deck-paper)}#speaker-clock{display:none}}.reading-close{display:none}@media screen and (max-width:900px)and (orientation:portrait){.reading-close{display:flex;justify-content:flex-end;padding:16px 0}.reading-close button{font:14px/1 var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink);background:var(--deck-paper);border:1px solid var(--deck-ink-2);min-height:44px;padding:0 16px;cursor:pointer}}@media print{#speaker-clock,.speak,.reading-close{display:none!important}}',ct="Sprawdź połączenie z internetem i spróbuj ponownie.",dt="Za dużo żądań w krótkim czasie. Odczekaj minutę i spróbuj ponownie.",vt=Be({__name:"PresentationSpeakerView",props:{slug:{}},setup(ke){const ge=Ze(()=>Ye(()=>import("./SpeakerTools-CXKjSgrG.js"),__vite__mapDeps([0,1,2]))),f=ke,X=Ke(),l=p("pending"),c=p(null),b=p(""),ee=p(null);let j=0,m=0;const ve=Ie(()=>[c.value?.css??"",lt]),be={notes:"Notatki",say:"Powiedz",sources:"Źródła",specialLink:"Slajd specjalny (S)"},E=p(null),R=p({});let s=null,te=0,L=0;const B=[];function h(){E.value=s?.view()??null}function he(e,n){if(!e||!n){s=null,E.value=null;return}s=Qe({budgets:e.slides.map(t=>t.seconds),targetSeconds:e.target_seconds,now:()=>Date.now()}),h()}function we(e){s?.seek(e),h()}function ye(e){s?.go(e),h()}function A(e){s&&(e==="pause"?s.pause():e==="clock"?s.toggleHidden():s.reset(),h(),Z())}const w=We(),P=p(null);let C=null,U="",I=0,i=Q(w),r=!1,O=!1,z=!1,ne=0,y=0,H=!1,x=0,T=0,k=0,S=!1,V=null,oe=!1;const u=et(xe,tt);function g(){return Je(e=>window.matchMedia(e))}function q(e){return V?st(V,s?.view()??null,w,{...e,light:oe}):null}function ae(e){_.remoteState(f.slug,e).catch(()=>{})}function xe(){if(!r||!i.isActive()||g())return;const e=q();e&&ae(e)}function Z(){r&&i.isActive()&&u.call()}function D(){if(!r||g())return;const e=q({claim:!0});if(!e){z=!0;return}z=!1,ne=Date.now(),u.cancel(),ae(e)}function d(){const e=r?i.activeTab():null;let n=null;e===w?n=W(y,Date.now())?"active":null:e&&(n="elsewhere"),P.value!==n&&(P.value=n)}function K(){k&&window.clearTimeout(k),k=0}function Te(){k||!r||i.activeTab()!==null||g()||(k=window.setTimeout(()=>{k=0,!(!r||i.activeTab()!==null||g())&&D()},it(Math.random(),S)))}function Se(e){V=e,z?D():Z()}function _e(e){oe=e,Z()}function je(e){const n=ee.value;if(!n)return;if(e.action==="goto"){e.number!=null&&n.goToNumber(e.number);return}const t=rt(e.action);t&&n.runKey(t)}function Ee(e){const n=ot(e);if(n){if(n.event===at){i.observe(n.payload)&&u.flush(),i.activeTab()!==null&&(K(),S=!1),d();return}if(y=Date.now(),d(),n.payload.action==="sync"&&i.activeTab()===null){Te();return}if(!(g()||!i.shouldApply(n.payload))){if(n.payload.action==="sync"){u.flush();return}je(n.payload)}}}function Re(){r=!0,O?S&&W(y,Date.now())&&_.remote(f.slug,{action:"sync",tab:""}).catch(()=>{}):(O=!0,D()),d()}function Le(){r=!1,i.isActive()&&(S=!0),i=Q(w),K(),u.cancel(),d()}function N(){!r||i.isActive()||g()||Date.now()-nen===I;try{const a=await Fe(e,{onPublication:o=>{t()&&Ee(o)},onSubscribed:()=>{t()&&Re()},onConnection:o=>{!t()||o==="connected"||Le()},onDenied:o=>{t()&&(r=!1,d(),!(o!==403||H)&&(H=!0,x=window.setTimeout(()=>{x=0,t()&&C?.resubscribe()},nt)))},onUnavailable:()=>{t()&&(r=!1,d())}});if(!t()){a.close();return}C=a,T=window.setTimeout(ie,me)}catch{}}function Ce(){const e=l.value==="ready"?c.value?.remote_channel??"":"";if(e!==U){if(!e){F();return}Ae(e)}}function re(){window.close(),X.replace("/moje-prezentacje")}function $(){j&&window.clearTimeout(j),j=0}function se(){for(const e of B)URL.revokeObjectURL(e);B.length=0,R.value={}}function ze(e){const n=new Set,t=o=>{const v=/data-deck-image="([^"]+)"/g;for(let J=v.exec(o);J;J=v.exec(o))n.add(J[1])},a=o=>{t(o.body_html),t(o.say_html),t(o.notes_html),t(o.sources_html),o.special&&a(o.special)};for(const o of e.slides)a(o);return[...n]}async function De(e,n,t){await Promise.all(ze(e).map(async a=>{try{const o=await _.speakerImage(n,a);if(t!==L)return;const v=URL.createObjectURL(o);if(t!==L){URL.revokeObjectURL(v);return}B.push(v),R.value={...R.value,[a]:v}}catch{}}))}function Ne(e,n){const t=e;return`${n?'':""}${t.body_html}`}function $e(e){return e.special?`Slajd specjalny do slajdu ${e.number}`:`Slajd ${e.number} z ${e.total}`}async function G(e){const n=++m;L=n,se(),$(),l.value="pending",c.value=null,b.value="",j=window.setTimeout(()=>{n===m&&l.value==="pending"&&(l.value="loading")},200);try{const t=await _.speaker(e);if(n!==m)return;$();const a=t.slides??[],o={...t,slides:a};c.value=o,Oe(e),document.title=t.title?`${t.title} · wersja prelegenta`:"Prezentacja · BM II°",l.value=a.length===0?"empty":"ready",a.length>0&&De(o,e,n)}catch(t){if(n!==m)return;if($(),t instanceof M&&t.status===404){He(e),await X.replace({name:"my-presentations",query:{denied:"1"}});return}if(t instanceof M&&t.status===401)return;t instanceof M&&t.status===429?b.value=dt:t instanceof M&&t.message?b.value=t.message:b.value=ct,l.value="error"}}function Me(){G(f.slug)}function le(e){e.persisted&&G(f.slug)}return ce(()=>f.slug,e=>{G(e)},{immediate:!0}),ce([c,l],()=>{he(c.value,l.value==="ready"),Ce()}),Pe(()=>{if(document.documentElement.classList.add("deck-speaker"),!document.querySelector('meta[data-deck-speaker="1"]')){const e=document.createElement("meta");e.name="robots",e.content="noindex",e.dataset.deckSpeaker="1",document.head.appendChild(e)}window.addEventListener("pageshow",le),window.addEventListener("pagehide",Y),window.addEventListener("keydown",N,!0),window.addEventListener("pointerdown",N,!0),te=window.setInterval(()=>{s?.tick(),h(),d()},250)}),Ue(()=>{m+=1,L=m,se(),$(),Y(),F(),window.clearInterval(te),window.removeEventListener("pageshow",le),window.removeEventListener("pagehide",Y),window.removeEventListener("keydown",N,!0),window.removeEventListener("pointerdown",N,!0),document.documentElement.classList.remove("deck-speaker"),document.querySelector('meta[data-deck-speaker="1"]')?.remove()}),(e,n)=>(pe(),de(Ge,{ref_key:"viewer",ref:ee,mode:"speaker",phase:l.value,deck:c.value,error:b.value,compose:Ne,labels:be,announce:$e,"extra-css":ve.value,theme:c.value?.theme,images:R.value,onRetry:Me,onPosition:we,onNavigate:ye,onClock:A,onSnapshot:Se,onScheme:_e},{tools:ue(t=>[E.value?(pe(),de(Ve(ge),{key:0,clock:E.value,panel:t.panel,special:t.special,"has-special":t.hasSpecial,"fullscreen-enabled":t.fullscreenEnabled,"fullscreen-on":t.fullscreenOn,"toolbar-hidden":t.toolbarHidden,"toggle-panel":t.togglePanel,"toggle-special":t.toggleSpecial,"toggle-toolbar":t.toggleToolbar,"toggle-fullscreen":t.toggleFullscreen,light:t.light,"toggle-scheme":t.toggleScheme,"export-pptx":t.exportPptx,exporting:t.exporting,pilot:P.value,onPause:n[0]||(n[0]=a=>A("pause")),onReset:n[1]||(n[1]=a=>A("reset")),onToggleHidden:n[2]||(n[2]=a=>A("clock")),onClose:re},null,8,["clock","panel","special","has-special","fullscreen-enabled","fullscreen-on","toolbar-hidden","toggle-panel","toggle-special","toggle-toolbar","toggle-fullscreen","light","toggle-scheme","export-pptx","exporting","pilot"])):qe("",!0)]),"reading-close":ue(()=>[fe("div",{class:"reading-close"},[fe("button",{type:"button",onClick:re},"Zamknij")])]),_:1},8,["phase","deck","error","extra-css","theme","images"]))}});export{vt as default}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SpeakerTools-Cyk_e6w-.js","assets/index-BhVKyY57.js","assets/index-CrQqZK_d.css"])))=>i.map(i=>d[i]); +import{d as Ie,U as ce,o as Me,b1 as Ue,s as de,j as ue,r as p,x as Pe,b2 as Oe,A as B,b3 as He,n as pe,b as fe,e as Ve,f as qe,aI as Ze,m as Ke,aL as Ye,b4 as Fe}from"./index-BhVKyY57.js";import{p as _}from"./presentations-CsatGkk7.js";import{_ as Ge,r as Je}from"./DeckViewer.vue_vue_type_style_index_0_lang-CR_mIh7U.js";import{c as Qe}from"./clock-4r1aA6KU.js";import{n as We,C as Xe,c as Q,a as et,p as W,S as tt,D as nt,H as me,b as ot,R as at,t as it,r as rt,d as st}from"./remote-aOKX75Mt.js";import"./engine-DDeQk6Ow.js";const lt='.speak{display:none}.deck.speak-on .speak{display:block;position:absolute;left:0;right:0;bottom:0;max-height:46%;overflow:auto;background:var(--deck-ink);color:var(--deck-paper);padding:18px 88px;font-size:22px;line-height:1.45}.notes:before{content:"Notatki · N"}.speak:before,.srcs:before{display:block;font-family:var(--deck-mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:6px;opacity:.7}.speak:before{content:"Powiedz · P"}.srcs:before{content:"Źródła · Z"}.deck.speak-on #nav{bottom:50%}.deck.notes-on .notes.is-empty:after{content:"Brak notatek do tego slajdu.";opacity:.7}.deck.speak-on .speak.is-empty:after{content:"Brak tekstu do powiedzenia na tym slajdzie.";opacity:.7}.deck.srcs-on .srcs.is-empty:after{content:"Brak źródeł do tego slajdu.";opacity:.7}#speaker-clock{position:static;display:inline-flex;gap:8px;align-items:center;font-family:var(--deck-mono);font-size:12px;line-height:1;color:var(--deck-ink-2);letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;background:var(--deck-paper-2);border:1px solid var(--deck-rule);padding:4px 12px;cursor:pointer;user-select:none}.tools #speaker-clock{min-height:40px;padding:0 14px;background:var(--deck-paper);border-color:var(--deck-ink-2)}.tools-pilot{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 8px;color:var(--deck-ink);white-space:nowrap}.tools-pilot.elsewhere{color:var(--deck-ink-2)}.tools-pilot-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--deck-khaki)}#speaker-clock.floating{position:fixed;top:8px;left:14px;z-index:5}#speaker-clock b{display:inline-block;font-weight:700;font-size:20px;color:var(--deck-ink);font-variant-numeric:tabular-nums;letter-spacing:0;margin-right:6px;text-align:right}#speaker-clock .clk-slide,#speaker-clock .clk-total{min-width:6ch}#speaker-clock b.over{color:var(--deck-empire)}#speaker-clock .clk-pace{display:inline-block;min-width:18ch;text-transform:none;letter-spacing:0}#speaker-clock .clk-pace.late{color:var(--deck-empire)}#speaker-clock.paused b{opacity:.5}@media(hover:hover){.tools-show{opacity:0}.tools-show:hover,.tools-show:focus,.tools-show:focus-visible{opacity:1}}@media(hover:none){.tools-show{opacity:.55}}@media screen and (max-width:900px)and (orientation:portrait){.speak{display:block;margin-top:10px;padding:12px 14px;background:var(--deck-paper-2);font-size:15px;color:var(--deck-ink-2);border-left:3px solid var(--deck-empire);position:static;max-height:none}.speak.is-empty{display:none}.slide.title .speak,.slide.sec .speak{background:var(--deck-paper)}#speaker-clock{display:none}}.reading-close{display:none}@media screen and (max-width:900px)and (orientation:portrait){.reading-close{display:flex;justify-content:flex-end;padding:16px 0}.reading-close button{font:14px/1 var(--deck-mono);letter-spacing:.04em;color:var(--deck-ink);background:var(--deck-paper);border:1px solid var(--deck-ink-2);min-height:44px;padding:0 16px;cursor:pointer}}@media print{#speaker-clock,.speak,.reading-close{display:none!important}}',ct="Sprawdź połączenie z internetem i spróbuj ponownie.",dt="Za dużo żądań w krótkim czasie. Odczekaj minutę i spróbuj ponownie.",vt=Ie({__name:"PresentationSpeakerView",props:{slug:{}},setup(ke){const ge=Ze(()=>Ye(()=>import("./SpeakerTools-Cyk_e6w-.js"),__vite__mapDeps([0,1,2]))),f=ke,X=Ke(),l=p("pending"),c=p(null),b=p(""),ee=p(null);let j=0,m=0;const ve=Pe(()=>[c.value?.css??"",lt]),be={notes:"Notatki",say:"Powiedz",sources:"Źródła",specialLink:"Slajd specjalny (S)"},E=p(null),R=p({});let s=null,te=0,L=0;const I=[];function h(){E.value=s?.view()??null}function he(e,n){if(!e||!n){s=null,E.value=null;return}s=Qe({budgets:e.slides.map(t=>t.seconds),targetSeconds:e.target_seconds,now:()=>Date.now()}),h()}function we(e){s?.seek(e),h()}function ye(e){s?.go(e),h()}function A(e){s&&(e==="pause"?s.pause():e==="clock"?s.toggleHidden():s.reset(),h(),Z())}const w=We(),M=p(null);let C=null,U="",P=0,i=Q(w),r=!1,O=!1,z=!1,ne=0,y=0,H=!1,x=0,T=0,k=0,S=!1,V=null,oe=!1;const u=et(xe,tt);function g(){return Je(e=>window.matchMedia(e))}function q(e){return V?st(V,s?.view()??null,w,{...e,light:oe}):null}function ae(e){_.remoteState(f.slug,e).catch(()=>{})}function xe(){if(!r||!i.isActive()||g())return;const e=q();e&&ae(e)}function Z(){r&&i.isActive()&&u.call()}function D(){if(!r||g())return;const e=q({claim:!0});if(!e){z=!0;return}z=!1,ne=Date.now(),u.cancel(),ae(e)}function d(){const e=r?i.activeTab():null;let n=null;e===w?n=W(y,Date.now())?"active":null:e&&(n="elsewhere"),M.value!==n&&(M.value=n)}function K(){k&&window.clearTimeout(k),k=0}function Te(){k||!r||i.activeTab()!==null||g()||(k=window.setTimeout(()=>{k=0,!(!r||i.activeTab()!==null||g())&&D()},it(Math.random(),S)))}function Se(e){V=e,z?D():Z()}function _e(e){oe=e,Z()}function je(e){const n=ee.value;if(!n)return;if(e.action==="goto"){e.number!=null&&n.goToNumber(e.number);return}const t=rt(e.action);t&&n.runKey(t)}function Ee(e){const n=ot(e);if(n){if(n.event===at){i.observe(n.payload)&&u.flush(),i.activeTab()!==null&&(K(),S=!1),d();return}if(y=Date.now(),d(),n.payload.action==="sync"&&i.activeTab()===null){Te();return}if(!(g()||!i.shouldApply(n.payload))){if(n.payload.action==="sync"){u.flush();return}je(n.payload)}}}function Re(){r=!0,O?S&&W(y,Date.now())&&_.remote(f.slug,{action:"sync",tab:""}).catch(()=>{}):(O=!0,D()),d()}function Le(){r=!1,i.isActive()&&(S=!0),i=Q(w),K(),u.cancel(),d()}function $(){!r||i.isActive()||g()||Date.now()-nen===P;try{const a=await Fe(e,{onPublication:o=>{t()&&Ee(o)},onSubscribed:()=>{t()&&Re()},onConnection:o=>{!t()||o==="connected"||Le()},onDenied:o=>{t()&&(r=!1,d(),!(o!==403||H)&&(H=!0,x=window.setTimeout(()=>{x=0,t()&&C?.resubscribe()},nt)))},onUnavailable:()=>{t()&&(r=!1,d())}});if(!t()){a.close();return}C=a,T=window.setTimeout(ie,me)}catch{}}function Ce(){const e=l.value==="ready"?c.value?.remote_channel??"":"";if(e!==U){if(!e){F();return}Ae(e)}}function re(){window.close(),X.replace("/moje-prezentacje")}function N(){j&&window.clearTimeout(j),j=0}function se(){for(const e of I)URL.revokeObjectURL(e);I.length=0,R.value={}}function ze(e){const n=new Set,t=o=>{const v=/data-deck-image="([^"]+)"/g;for(let J=v.exec(o);J;J=v.exec(o))n.add(J[1])},a=o=>{t(o.body_html),t(o.say_html),t(o.notes_html),t(o.sources_html),o.special&&a(o.special)};for(const o of e.slides)a(o);return[...n]}async function De(e,n,t){await Promise.all(ze(e).map(async a=>{try{const o=await _.speakerImage(n,a);if(t!==L)return;const v=URL.createObjectURL(o);if(t!==L){URL.revokeObjectURL(v);return}I.push(v),R.value={...R.value,[a]:v}}catch{}}))}function $e(e,n){const t=e;return`${n?'':""}${t.body_html}`}function Ne(e){return e.special?`Slajd specjalny do slajdu ${e.number}`:`Slajd ${e.number} z ${e.total}`}async function G(e){const n=++m;L=n,se(),N(),l.value="pending",c.value=null,b.value="",j=window.setTimeout(()=>{n===m&&l.value==="pending"&&(l.value="loading")},200);try{const t=await _.speaker(e);if(n!==m)return;N();const a=t.slides??[],o={...t,slides:a};c.value=o,Oe(e),document.title=t.title?`${t.title} · wersja prelegenta`:"Prezentacja · BM II°",l.value=a.length===0?"empty":"ready",a.length>0&&De(o,e,n)}catch(t){if(n!==m)return;if(N(),t instanceof B&&t.status===404){He(e),await X.replace({name:"my-presentations",query:{denied:"1"}});return}if(t instanceof B&&t.status===401)return;t instanceof B&&t.status===429?b.value=dt:t instanceof B&&t.message?b.value=t.message:b.value=ct,l.value="error"}}function Be(){G(f.slug)}function le(e){e.persisted&&G(f.slug)}return ce(()=>f.slug,e=>{G(e)},{immediate:!0}),ce([c,l],()=>{he(c.value,l.value==="ready"),Ce()}),Me(()=>{if(document.documentElement.classList.add("deck-speaker"),!document.querySelector('meta[data-deck-speaker="1"]')){const e=document.createElement("meta");e.name="robots",e.content="noindex",e.dataset.deckSpeaker="1",document.head.appendChild(e)}window.addEventListener("pageshow",le),window.addEventListener("pagehide",Y),window.addEventListener("keydown",$,!0),window.addEventListener("pointerdown",$,!0),te=window.setInterval(()=>{s?.tick(),h(),d()},250)}),Ue(()=>{m+=1,L=m,se(),N(),Y(),F(),window.clearInterval(te),window.removeEventListener("pageshow",le),window.removeEventListener("pagehide",Y),window.removeEventListener("keydown",$,!0),window.removeEventListener("pointerdown",$,!0),document.documentElement.classList.remove("deck-speaker"),document.querySelector('meta[data-deck-speaker="1"]')?.remove()}),(e,n)=>(pe(),de(Ge,{ref_key:"viewer",ref:ee,mode:"speaker",phase:l.value,deck:c.value,error:b.value,compose:$e,labels:be,announce:Ne,"extra-css":ve.value,theme:c.value?.theme,images:R.value,onRetry:Be,onPosition:we,onNavigate:ye,onClock:A,onSnapshot:Se,onScheme:_e},{tools:ue(t=>[E.value?(pe(),de(Ve(ge),{key:0,clock:E.value,panel:t.panel,special:t.special,"has-special":t.hasSpecial,"fullscreen-enabled":t.fullscreenEnabled,"fullscreen-on":t.fullscreenOn,"toolbar-hidden":t.toolbarHidden,"toggle-panel":t.togglePanel,"toggle-special":t.toggleSpecial,"toggle-toolbar":t.toggleToolbar,"toggle-fullscreen":t.toggleFullscreen,light:t.light,"toggle-scheme":t.toggleScheme,"export-pptx":t.exportPptx,exporting:t.exporting,pilot:M.value,onPause:n[0]||(n[0]=a=>A("pause")),onReset:n[1]||(n[1]=a=>A("reset")),onToggleHidden:n[2]||(n[2]=a=>A("clock")),onClose:re},null,8,["clock","panel","special","has-special","fullscreen-enabled","fullscreen-on","toolbar-hidden","toggle-panel","toggle-special","toggle-toolbar","toggle-fullscreen","light","toggle-scheme","export-pptx","exporting","pilot"])):qe("",!0)]),"reading-close":ue(()=>[fe("div",{class:"reading-close"},[fe("button",{type:"button",onClick:re},"Zamknij")])]),_:1},8,["phase","deck","error","extra-css","theme","images"]))}});export{vt as default}; diff --git a/public/assets/ProfileView-B-qG3bDd.js b/public/assets/ProfileView-B-qG3bDd.js deleted file mode 100644 index 314bb4c..0000000 --- a/public/assets/ProfileView-B-qG3bDd.js +++ /dev/null @@ -1 +0,0 @@ -import{d as $,u as O,ae as W,an as A,aF as H,q as J,o as q,a as U,aG as Z,c as l,i as R,b as o,h as D,t as r,f as d,w as k,v as w,e as s,F as T,E as F,p as K,r as c,aH as Q,n,aI as X}from"./index-CtNAsql9.js";import{_ as Y}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{f as V}from"./forms-CHet_2fA.js";import{o as ee}from"./oauth-zzthF4BZ.js";const oe={class:"card","aria-labelledby":"dane-h"},se={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"12px"}},te={key:1,class:"notice",role:"status",style:{"margin-bottom":"12px"}},ae={class:"grid-2"},le={class:"field"},ne={key:0,class:"error-text"},ie={class:"field"},re={key:0,class:"error-text"},de={class:"field"},ue={key:0,class:"error-text"},pe=["disabled"],me={id:"wybor",class:"card section","aria-labelledby":"wybor-h"},ce={key:0,class:"skeleton"},ye={key:1,class:"muted"},be={class:"eyebrow",style:{padding:"0","margin-bottom":"6px"}},ke=["name","value","checked","onChange"],we={key:0,class:"muted small",style:{margin:"4px 0 0"}},fe=["onClick"],ze={id:"kalendarz",class:"card section","aria-labelledby":"kalendarz-h"},ve={key:0,class:"notice error",role:"alert",style:{margin:"12px 0"}},ge={key:1,class:"skeleton",style:{"margin-top":"12px"}},_e={key:2,style:{"margin-top":"12px"}},he=["disabled"],xe={class:"field",style:{"margin-top":"12px"}},je={style:{display:"flex",gap:"8px"}},Pe=["value"],Ce={key:0,class:"muted small",style:{margin:"0"}},Ue={class:"check"},Te=["checked","disabled"],Ve={class:"check"},Ne=["checked","disabled"],Ze={class:"btn-row",style:{"margin-top":"12px"}},De=["disabled"],Fe=["disabled"],Ke={key:0,class:"card section","aria-labelledby":"microsoft-h"},Me=["disabled"],Ge={class:"card section","aria-labelledby":"haslo-h"},Be={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"12px"}},Le={key:1,class:"notice",role:"status",style:{"margin-bottom":"12px"}},Se={class:"field"},Ee={key:0,class:"error-text"},Ie={class:"field"},$e={key:0,class:"error-text"},Oe={class:"field"},We=["disabled"],Ae={class:"section"},Ye=$({__name:"ProfileView",setup(He){const f=O(),z=W(),v=A(),a=H(),x=J(),j=c(!1),g=c(!1);q(()=>{z.loadCourses(),a.load(),U.oauthProviders().then(i=>j.value=i.providers.some(e=>e.name==="microsoft")).catch(()=>j.value=!1)});async function M(){g.value=!0;try{const{link_ticket:i}=await U.oauthLinkTicket();window.location.assign(ee("microsoft",{action:"link",linkTicket:i,returnTo:"/profil"}))}catch(i){x.show(V(i).message||"Nie udało się połączyć konta Microsoft."),g.value=!1}}const N=c(null);async function G(){const i=a.feed?.url;i&&(await Q(i)?x.show("Skopiowano link do schowka."):(N.value?.select(),x.show("Nie udało się skopiować. Link jest zaznaczony: skopiuj go ręcznie.")))}function B(){window.confirm("Wygenerować nowy link? Stary przestanie działać i kalendarze, które go subskrybują, trzeba będzie dodać od nowa.")&&a.rotate()}function L(){window.confirm("Usunąć link do kalendarza? Kalendarze, które go subskrybują, przestaną się aktualizować.")&&a.remove()}function S(i){return new Date(i).toLocaleString("pl-PL",{day:"numeric",month:"long",hour:"2-digit",minute:"2-digit"})}const m=Z({name:f.user?.name??"",surname:f.user?.surname??"",email:f.user?.email??""}),_=c(!1),u=c(null),P=c(!1);async function E(){_.value=!0,u.value=null,P.value=!1;try{await f.updateProfile({name:m.name.trim(),surname:m.surname.trim(),email:m.email.trim()}),P.value=!0}catch(i){u.value=V(i)}finally{_.value=!1}}const p=Z({current_password:"",password:"",password_confirmation:""}),h=c(!1),y=c(null),C=c(!1);async function I(){h.value=!0,y.value=null,C.value=!1;try{await U.changePassword({...p}),C.value=!0,Object.assign(p,{current_password:"",password:"",password_confirmation:""})}catch(i){y.value=V(i)}finally{h.value=!1}}return(i,e)=>(n(),l("div",null,[R(Y,{eyebrow:"Konto",title:"Profil"}),o("section",oe,[e[14]||(e[14]=o("h2",{id:"dane-h",style:{"margin-bottom":"12px"}},"Dane",-1)),o("form",{onSubmit:D(E,["prevent"]),novalidate:""},[u.value?.message?(n(),l("p",se,r(u.value.message),1)):d("",!0),P.value?(n(),l("p",te,"Zapisano.")):d("",!0),o("div",ae,[o("div",le,[e[11]||(e[11]=o("label",{for:"p-name"},"Imię",-1)),k(o("input",{id:"p-name","onUpdate:modelValue":e[0]||(e[0]=t=>m.name=t),type:"text",autocomplete:"given-name"},null,512),[[w,m.name]]),u.value?.fields.name?(n(),l("p",ne,r(u.value.fields.name),1)):d("",!0)]),o("div",ie,[e[12]||(e[12]=o("label",{for:"p-surname"},"Nazwisko",-1)),k(o("input",{id:"p-surname","onUpdate:modelValue":e[1]||(e[1]=t=>m.surname=t),type:"text",autocomplete:"family-name"},null,512),[[w,m.surname]]),u.value?.fields.surname?(n(),l("p",re,r(u.value.fields.surname),1)):d("",!0)])]),o("div",de,[e[13]||(e[13]=o("label",{for:"p-email"},"Adres e-mail",-1)),k(o("input",{id:"p-email","onUpdate:modelValue":e[2]||(e[2]=t=>m.email=t),type:"email",autocomplete:"email",inputmode:"email"},null,512),[[w,m.email]]),u.value?.fields.email?(n(),l("p",ue,r(u.value.fields.email),1)):d("",!0)]),o("button",{class:"btn primary",type:"submit",disabled:_.value},r(_.value?"Zapisywanie…":"Zapisz dane"),9,pe)],32)]),o("section",me,[e[15]||(e[15]=o("h2",{id:"wybor-h",style:{"margin-bottom":"6px"}},"Przedmioty do wyboru",-1)),e[16]||(e[16]=o("p",{class:"muted small"},"Z każdej grupy wybierasz jeden przedmiot. Pozostałe znikną z planu, pulpitu i list (można je pokazać przełącznikiem „Pokaż wszystkie”). Wybór zapamiętuje to urządzenie.",-1)),s(z).loaded.courses?s(z).electiveGroups.length?d("",!0):(n(),l("p",ye,"Nie ma teraz przedmiotów do wyboru.")):(n(),l("div",ce)),(n(!0),l(T,null,F(s(z).electiveGroups,t=>(n(),l("fieldset",{key:t.code,style:{border:"0",padding:"0",margin:"14px 0 0"}},[o("legend",be,r(s(X)(t.code)),1),(n(!0),l(T,null,F(t.options,b=>(n(),l("label",{key:b,class:"check"},[o("input",{type:"radio",name:`g-${t.code}`,value:b,checked:s(v).choices[t.code]===b,onChange:Je=>s(v).choose(t.code,b)},null,40,ke),o("span",null,r(b),1)]))),128)),s(v).choices[t.code]?(n(),l("button",{key:1,class:"linkish small",type:"button",onClick:b=>s(v).choose(t.code,null)},"Wyczyść wybór",8,fe)):(n(),l("p",we,"Jeszcze nie wybrano. Do tego czasu widać wszystkie alternatywy."))]))),128))]),o("section",ze,[e[23]||(e[23]=o("h2",{id:"kalendarz-h",style:{"margin-bottom":"6px"}},"Kalendarz Google / telefon",-1)),e[24]||(e[24]=o("p",{class:"muted small"}," Prywatny link do planu zajęć w formacie iCalendar. Dodaj go w Kalendarzu Google albo w telefonie, a zajęcia pojawią się obok Twoich wydarzeń. Plan uwzględnia przedmioty do wyboru wybrane wyżej. ",-1)),s(a).error?(n(),l("p",ve,r(s(a).error),1)):d("",!0),s(a).feed===void 0&&(s(a).loading||!s(a).error)?(n(),l("div",ge)):s(a).feed?(n(),l(T,{key:3},[o("div",xe,[e[17]||(e[17]=o("label",{for:"cal-url"},"Twój link (nie udostępniaj go)",-1)),o("div",je,[o("input",{id:"cal-url",ref_key:"urlInput",ref:N,class:"mono",type:"text",readonly:"",value:s(a).feed.url,style:{"font-size":"14px","min-width":"0"},onFocus:e[4]||(e[4]=t=>t.target.select())},null,40,Pe),o("button",{class:"btn",type:"button",onClick:G},"Kopiuj")]),s(a).feed.last_fetched_at?(n(),l("p",Ce,"Ostatnio pobrany przez kalendarz: "+r(S(s(a).feed.last_fetched_at))+".",1)):d("",!0)]),o("label",Ue,[o("input",{type:"checkbox",checked:s(a).feed.include_meetings,disabled:s(a).busy,onChange:e[5]||(e[5]=t=>s(a).save({include_meetings:t.target.checked}))},null,40,Te),e[18]||(e[18]=o("span",null,"Zjazdy jako wydarzenia całodniowe",-1))]),o("label",Ve,[o("input",{type:"checkbox",checked:s(a).feed.include_deadlines,disabled:s(a).busy,onChange:e[6]||(e[6]=t=>s(a).save({include_deadlines:t.target.checked}))},null,40,Ne),e[19]||(e[19]=o("span",null,"Terminy z terminarza",-1))]),o("div",Ze,[o("button",{class:"btn small ghost",type:"button",disabled:s(a).busy,onClick:B},"Wygeneruj nowy link",8,De),o("button",{class:"btn small miss",type:"button",disabled:s(a).busy,onClick:L},"Usuń link",8,Fe)]),e[20]||(e[20]=o("h3",{class:"eyebrow",style:{margin:"18px 0 6px"}},"Jak dodać",-1)),e[21]||(e[21]=o("ol",{class:"small",style:{margin:"0","padding-left":"20px",display:"grid",gap:"6px"}},[o("li",null,[o("b",null,"Kalendarz Google"),K(" (na komputerze, calendar.google.com): po lewej przy „Inne kalendarze” kliknij „+”, wybierz „Z adresu URL”, wklej link i kliknij „Dodaj kalendarz”. Na telefonie z Androidem kalendarz pojawi się sam po synchronizacji konta Google. ")]),o("li",null,[o("b",null,"iPhone / iPad"),K(": Ustawienia → Kalendarz → Konta → Dodaj konto → Inne → Dodaj subskrybowany kalendarz, wklej link i zapisz. ")])],-1)),e[22]||(e[22]=o("p",{class:"muted small",style:{margin:"10px 0 0"}}," Google odświeża subskrybowane kalendarze co kilka godzin, nie od razu: zmiana planu albo wyboru przedmiotów pojawi się w kalendarzu z opóźnieniem. ",-1))],64)):(n(),l("div",_e,[o("button",{class:"btn primary",type:"button",disabled:s(a).busy,onClick:e[3]||(e[3]=t=>s(a).create())},r(s(a).busy?"Tworzenie…":"Utwórz link do kalendarza"),9,he)]))]),j.value?(n(),l("section",Ke,[e[25]||(e[25]=o("h2",{id:"microsoft-h",style:{"margin-bottom":"6px"}},"Konto Microsoft 365",-1)),e[26]||(e[26]=o("p",{class:"muted small"}," Połącz konto uczelniane Microsoft 365, aby logować się przyciskiem „Zaloguj przez Microsoft 365”. ",-1)),o("button",{class:"btn",type:"button",style:{"margin-top":"12px"},disabled:g.value,onClick:M},r(g.value?"Przekierowanie…":"Połącz konto Microsoft"),9,Me)])):d("",!0),o("section",Ge,[e[30]||(e[30]=o("h2",{id:"haslo-h",style:{"margin-bottom":"12px"}},"Zmiana hasła",-1)),o("form",{onSubmit:D(I,["prevent"]),novalidate:""},[y.value?.message?(n(),l("p",Be,r(y.value.message),1)):d("",!0),C.value?(n(),l("p",Le,"Hasło zostało zmienione.")):d("",!0),o("div",Se,[e[27]||(e[27]=o("label",{for:"pw-current"},"Obecne hasło",-1)),k(o("input",{id:"pw-current","onUpdate:modelValue":e[7]||(e[7]=t=>p.current_password=t),type:"password",autocomplete:"current-password"},null,512),[[w,p.current_password]]),y.value?.fields.current_password?(n(),l("p",Ee,r(y.value.fields.current_password),1)):d("",!0)]),o("div",Ie,[e[28]||(e[28]=o("label",{for:"pw-new"},"Nowe hasło (min. 8 znaków)",-1)),k(o("input",{id:"pw-new","onUpdate:modelValue":e[8]||(e[8]=t=>p.password=t),type:"password",autocomplete:"new-password"},null,512),[[w,p.password]]),y.value?.fields.password?(n(),l("p",$e,r(y.value.fields.password),1)):d("",!0)]),o("div",Oe,[e[29]||(e[29]=o("label",{for:"pw-confirm"},"Powtórz nowe hasło",-1)),k(o("input",{id:"pw-confirm","onUpdate:modelValue":e[9]||(e[9]=t=>p.password_confirmation=t),type:"password",autocomplete:"new-password"},null,512),[[w,p.password_confirmation]])]),o("button",{class:"btn primary",type:"submit",disabled:h.value||!p.current_password||!p.password},r(h.value?"Zapisywanie…":"Zmień hasło"),9,We)],32)]),o("section",Ae,[o("button",{class:"btn miss",type:"button",onClick:e[10]||(e[10]=t=>s(f).logout())},"Wyloguj się")])]))}});export{Ye as default}; diff --git a/public/assets/ProfileView-NWDFwDRZ.js b/public/assets/ProfileView-NWDFwDRZ.js new file mode 100644 index 0000000..332531e --- /dev/null +++ b/public/assets/ProfileView-NWDFwDRZ.js @@ -0,0 +1 @@ +import{d as I,u as O,ae as W,an as A,aZ as J,q,o as H,a as U,a_ as N,c as l,i as R,b as o,h as D,t as r,f as d,w as k,v as w,e as s,F as T,E as K,p as M,r as c,a$ as Q,n,b0 as X}from"./index-BhVKyY57.js";import{_ as Y}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{f as V}from"./forms-CbFOvcno.js";import{o as ee}from"./oauth-zzthF4BZ.js";const oe={class:"card","aria-labelledby":"dane-h"},se={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"12px"}},te={key:1,class:"notice",role:"status",style:{"margin-bottom":"12px"}},ae={class:"grid-2"},le={class:"field"},ne={key:0,class:"error-text"},ie={class:"field"},re={key:0,class:"error-text"},de={class:"field"},ue={key:0,class:"error-text"},pe=["disabled"],me={id:"wybor",class:"card section","aria-labelledby":"wybor-h"},ce={key:0,class:"skeleton"},ye={key:1,class:"muted"},be={class:"eyebrow",style:{padding:"0","margin-bottom":"6px"}},ke=["name","value","checked","onChange"],we={key:0,class:"muted small",style:{margin:"4px 0 0"}},fe=["onClick"],ze={id:"kalendarz",class:"card section","aria-labelledby":"kalendarz-h"},ve={key:0,class:"notice error",role:"alert",style:{margin:"12px 0"}},ge={key:1,class:"skeleton",style:{"margin-top":"12px"}},_e={key:2,style:{"margin-top":"12px"}},he=["disabled"],xe={class:"field",style:{"margin-top":"12px"}},je={style:{display:"flex",gap:"8px"}},Pe=["value"],Ce={key:0,class:"muted small",style:{margin:"0"}},Ue={class:"check"},Te=["checked","disabled"],Ve={class:"check"},Ze=["checked","disabled"],Ne={class:"btn-row",style:{"margin-top":"12px"}},De=["disabled"],Ke=["disabled"],Me={key:0,class:"card section","aria-labelledby":"microsoft-h"},Fe=["disabled"],Be={class:"card section","aria-labelledby":"haslo-h"},Ge={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"12px"}},Le={key:1,class:"notice",role:"status",style:{"margin-bottom":"12px"}},Se={class:"field"},$e={key:0,class:"error-text"},Ee={class:"field"},Ie={key:0,class:"error-text"},Oe={class:"field"},We=["disabled"],Ae={class:"section"},Ye=I({__name:"ProfileView",setup(Je){const f=O(),z=W(),v=A(),a=J(),x=q(),j=c(!1),g=c(!1);H(()=>{z.loadCourses(),a.load(),U.oauthProviders().then(i=>j.value=i.providers.some(e=>e.name==="microsoft")).catch(()=>j.value=!1)});async function F(){g.value=!0;try{const{link_ticket:i}=await U.oauthLinkTicket();window.location.assign(ee("microsoft",{action:"link",linkTicket:i,returnTo:"/profil"}))}catch(i){x.show(V(i).message||"Nie udało się połączyć konta Microsoft."),g.value=!1}}const Z=c(null);async function B(){const i=a.feed?.url;i&&(await Q(i)?x.show("Skopiowano link do schowka."):(Z.value?.select(),x.show("Nie udało się skopiować. Link jest zaznaczony: skopiuj go ręcznie.")))}function G(){window.confirm("Wygenerować nowy link? Stary przestanie działać i kalendarze, które go subskrybują, trzeba będzie dodać od nowa.")&&a.rotate()}function L(){window.confirm("Usunąć link do kalendarza? Kalendarze, które go subskrybują, przestaną się aktualizować.")&&a.remove()}function S(i){return new Date(i).toLocaleString("pl-PL",{day:"numeric",month:"long",hour:"2-digit",minute:"2-digit"})}const m=N({name:f.user?.name??"",surname:f.user?.surname??"",email:f.user?.email??""}),_=c(!1),u=c(null),P=c(!1);async function $(){_.value=!0,u.value=null,P.value=!1;try{await f.updateProfile({name:m.name.trim(),surname:m.surname.trim(),email:m.email.trim()}),P.value=!0}catch(i){u.value=V(i)}finally{_.value=!1}}const p=N({current_password:"",password:"",password_confirmation:""}),h=c(!1),y=c(null),C=c(!1);async function E(){h.value=!0,y.value=null,C.value=!1;try{await U.changePassword({...p}),C.value=!0,Object.assign(p,{current_password:"",password:"",password_confirmation:""})}catch(i){y.value=V(i)}finally{h.value=!1}}return(i,e)=>(n(),l("div",null,[R(Y,{eyebrow:"Konto",title:"Profil"}),o("section",oe,[e[14]||(e[14]=o("h2",{id:"dane-h",style:{"margin-bottom":"12px"}},"Dane",-1)),o("form",{onSubmit:D($,["prevent"]),novalidate:""},[u.value?.message?(n(),l("p",se,r(u.value.message),1)):d("",!0),P.value?(n(),l("p",te,"Zapisano.")):d("",!0),o("div",ae,[o("div",le,[e[11]||(e[11]=o("label",{for:"p-name"},"Imię",-1)),k(o("input",{id:"p-name","onUpdate:modelValue":e[0]||(e[0]=t=>m.name=t),type:"text",autocomplete:"given-name"},null,512),[[w,m.name]]),u.value?.fields.name?(n(),l("p",ne,r(u.value.fields.name),1)):d("",!0)]),o("div",ie,[e[12]||(e[12]=o("label",{for:"p-surname"},"Nazwisko",-1)),k(o("input",{id:"p-surname","onUpdate:modelValue":e[1]||(e[1]=t=>m.surname=t),type:"text",autocomplete:"family-name"},null,512),[[w,m.surname]]),u.value?.fields.surname?(n(),l("p",re,r(u.value.fields.surname),1)):d("",!0)])]),o("div",de,[e[13]||(e[13]=o("label",{for:"p-email"},"Adres e-mail",-1)),k(o("input",{id:"p-email","onUpdate:modelValue":e[2]||(e[2]=t=>m.email=t),type:"email",autocomplete:"email",inputmode:"email"},null,512),[[w,m.email]]),u.value?.fields.email?(n(),l("p",ue,r(u.value.fields.email),1)):d("",!0)]),o("button",{class:"btn primary",type:"submit",disabled:_.value},r(_.value?"Zapisywanie…":"Zapisz dane"),9,pe)],32)]),o("section",me,[e[15]||(e[15]=o("h2",{id:"wybor-h",style:{"margin-bottom":"6px"}},"Przedmioty do wyboru",-1)),e[16]||(e[16]=o("p",{class:"muted small"},"Z każdej grupy wybierasz jeden przedmiot. Pozostałe znikną z planu, pulpitu i list (można je pokazać przełącznikiem „Pokaż wszystkie”). Wybór zapamiętuje to urządzenie.",-1)),s(z).loaded.courses?s(z).electiveGroups.length?d("",!0):(n(),l("p",ye,"Nie ma teraz przedmiotów do wyboru.")):(n(),l("div",ce)),(n(!0),l(T,null,K(s(z).electiveGroups,t=>(n(),l("fieldset",{key:t.code,style:{border:"0",padding:"0",margin:"14px 0 0"}},[o("legend",be,r(s(X)(t.code)),1),(n(!0),l(T,null,K(t.options,b=>(n(),l("label",{key:b,class:"check"},[o("input",{type:"radio",name:`g-${t.code}`,value:b,checked:s(v).choices[t.code]===b,onChange:qe=>s(v).choose(t.code,b)},null,40,ke),o("span",null,r(b),1)]))),128)),s(v).choices[t.code]?(n(),l("button",{key:1,class:"linkish small",type:"button",onClick:b=>s(v).choose(t.code,null)},"Wyczyść wybór",8,fe)):(n(),l("p",we,"Jeszcze nie wybrano. Do tego czasu widać wszystkie alternatywy."))]))),128))]),o("section",ze,[e[23]||(e[23]=o("h2",{id:"kalendarz-h",style:{"margin-bottom":"6px"}},"Kalendarz Google / telefon",-1)),e[24]||(e[24]=o("p",{class:"muted small"}," Prywatny link do planu zajęć w formacie iCalendar. Dodaj go w Kalendarzu Google albo w telefonie, a zajęcia pojawią się obok Twoich wydarzeń. Plan uwzględnia przedmioty do wyboru wybrane wyżej. ",-1)),s(a).error?(n(),l("p",ve,r(s(a).error),1)):d("",!0),s(a).feed===void 0&&(s(a).loading||!s(a).error)?(n(),l("div",ge)):s(a).feed?(n(),l(T,{key:3},[o("div",xe,[e[17]||(e[17]=o("label",{for:"cal-url"},"Twój link (nie udostępniaj go)",-1)),o("div",je,[o("input",{id:"cal-url",ref_key:"urlInput",ref:Z,class:"mono",type:"text",readonly:"",value:s(a).feed.url,style:{"font-size":"14px","min-width":"0"},onFocus:e[4]||(e[4]=t=>t.target.select())},null,40,Pe),o("button",{class:"btn",type:"button",onClick:B},"Kopiuj")]),s(a).feed.last_fetched_at?(n(),l("p",Ce,"Ostatnio pobrany przez kalendarz: "+r(S(s(a).feed.last_fetched_at))+".",1)):d("",!0)]),o("label",Ue,[o("input",{type:"checkbox",checked:s(a).feed.include_meetings,disabled:s(a).busy,onChange:e[5]||(e[5]=t=>s(a).save({include_meetings:t.target.checked}))},null,40,Te),e[18]||(e[18]=o("span",null,"Zjazdy jako wydarzenia całodniowe",-1))]),o("label",Ve,[o("input",{type:"checkbox",checked:s(a).feed.include_deadlines,disabled:s(a).busy,onChange:e[6]||(e[6]=t=>s(a).save({include_deadlines:t.target.checked}))},null,40,Ze),e[19]||(e[19]=o("span",null,"Terminy z terminarza",-1))]),o("div",Ne,[o("button",{class:"btn small ghost",type:"button",disabled:s(a).busy,onClick:G},"Wygeneruj nowy link",8,De),o("button",{class:"btn small miss",type:"button",disabled:s(a).busy,onClick:L},"Usuń link",8,Ke)]),e[20]||(e[20]=o("h3",{class:"eyebrow",style:{margin:"18px 0 6px"}},"Jak dodać",-1)),e[21]||(e[21]=o("ol",{class:"small",style:{margin:"0","padding-left":"20px",display:"grid",gap:"6px"}},[o("li",null,[o("b",null,"Kalendarz Google"),M(" (na komputerze, calendar.google.com): po lewej przy „Inne kalendarze” kliknij „+”, wybierz „Z adresu URL”, wklej link i kliknij „Dodaj kalendarz”. Na telefonie z Androidem kalendarz pojawi się sam po synchronizacji konta Google. ")]),o("li",null,[o("b",null,"iPhone / iPad"),M(": Ustawienia → Kalendarz → Konta → Dodaj konto → Inne → Dodaj subskrybowany kalendarz, wklej link i zapisz. ")])],-1)),e[22]||(e[22]=o("p",{class:"muted small",style:{margin:"10px 0 0"}}," Google odświeża subskrybowane kalendarze co kilka godzin, nie od razu: zmiana planu albo wyboru przedmiotów pojawi się w kalendarzu z opóźnieniem. ",-1))],64)):(n(),l("div",_e,[o("button",{class:"btn primary",type:"button",disabled:s(a).busy,onClick:e[3]||(e[3]=t=>s(a).create())},r(s(a).busy?"Tworzenie…":"Utwórz link do kalendarza"),9,he)]))]),j.value?(n(),l("section",Me,[e[25]||(e[25]=o("h2",{id:"microsoft-h",style:{"margin-bottom":"6px"}},"Konto Microsoft 365",-1)),e[26]||(e[26]=o("p",{class:"muted small"}," Połącz konto uczelniane Microsoft 365, aby logować się przyciskiem „Zaloguj przez Microsoft 365”. ",-1)),o("button",{class:"btn",type:"button",style:{"margin-top":"12px"},disabled:g.value,onClick:F},r(g.value?"Przekierowanie…":"Połącz konto Microsoft"),9,Fe)])):d("",!0),o("section",Be,[e[30]||(e[30]=o("h2",{id:"haslo-h",style:{"margin-bottom":"12px"}},"Zmiana hasła",-1)),o("form",{onSubmit:D(E,["prevent"]),novalidate:""},[y.value?.message?(n(),l("p",Ge,r(y.value.message),1)):d("",!0),C.value?(n(),l("p",Le,"Hasło zostało zmienione.")):d("",!0),o("div",Se,[e[27]||(e[27]=o("label",{for:"pw-current"},"Obecne hasło",-1)),k(o("input",{id:"pw-current","onUpdate:modelValue":e[7]||(e[7]=t=>p.current_password=t),type:"password",autocomplete:"current-password"},null,512),[[w,p.current_password]]),y.value?.fields.current_password?(n(),l("p",$e,r(y.value.fields.current_password),1)):d("",!0)]),o("div",Ee,[e[28]||(e[28]=o("label",{for:"pw-new"},"Nowe hasło (min. 8 znaków)",-1)),k(o("input",{id:"pw-new","onUpdate:modelValue":e[8]||(e[8]=t=>p.password=t),type:"password",autocomplete:"new-password"},null,512),[[w,p.password]]),y.value?.fields.password?(n(),l("p",Ie,r(y.value.fields.password),1)):d("",!0)]),o("div",Oe,[e[29]||(e[29]=o("label",{for:"pw-confirm"},"Powtórz nowe hasło",-1)),k(o("input",{id:"pw-confirm","onUpdate:modelValue":e[9]||(e[9]=t=>p.password_confirmation=t),type:"password",autocomplete:"new-password"},null,512),[[w,p.password_confirmation]])]),o("button",{class:"btn primary",type:"submit",disabled:h.value||!p.current_password||!p.password},r(h.value?"Zapisywanie…":"Zmień hasło"),9,We)],32)]),o("section",Ae,[o("button",{class:"btn miss",type:"button",onClick:e[10]||(e[10]=t=>s(f).logout())},"Wyloguj się")])]))}});export{Ye as default}; diff --git a/public/assets/QuizView-CmJ9gzI_.js b/public/assets/QuizView-BNSrrYen.js similarity index 97% rename from public/assets/QuizView-CmJ9gzI_.js rename to public/assets/QuizView-BNSrrYen.js index 6ab86e8..9218fbc 100644 --- a/public/assets/QuizView-CmJ9gzI_.js +++ b/public/assets/QuizView-BNSrrYen.js @@ -1 +1 @@ -var ne=Object.defineProperty;var le=(m,o,n)=>o in m?ne(m,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):m[o]=n;var c=(m,o,n)=>le(m,typeof o!="symbol"?o+"":o,n);import{_ as oe}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as ie}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{q,_ as re}from"./quizzes-DX8b_-1b.js";import{d as ue,o as de,V as ce,c as i,i as S,j as B,r as v,ap as I,n as r,F as k,p as _,t as l,f as h,b as e,E as R,H as ve,C as P,x,Z as he,ag as pe,l as ye}from"./index-CtNAsql9.js";function me(m,o=Math.random){const n=m.slice();for(let p=n.length-1;p>0;p--){const f=Math.floor(o()*(p+1));[n[p],n[f]]=[n[f],n[p]]}return n}class fe{constructor(o,n=5,p=Math.random){c(this,"cards");c(this,"roundSize");c(this,"rng");c(this,"pool",[]);c(this,"round",[]);c(this,"cur",0);c(this,"roundMarks",[]);c(this,"marks",{});c(this,"order",[]);c(this,"review",!1);c(this,"phase","card");this.cards=new Map(o.map(f=>[f.id,f])),this.roundSize=Math.max(1,n),this.rng=p,this.reset()}reset(){this.marks={},this.order=[],this.pool=[...this.cards.keys()],this.draw()}draw(){if(this.review=!1,this.pool.length===0){this.round=[],this.roundMarks=[],this.cur=0,this.phase="final";return}const o=[];for(;o.lengthnull),this.cur=0,this.phase="card"}get current(){const o=this.round[this.cur];return o===void 0?null:this.cards.get(o)??null}get isLastInRound(){return this.cur===this.round.length-1}get answeredCount(){return this.order.length}get remaining(){return this.pool.length}get total(){return this.cards.size}mark(o){const n=this.round[this.cur];n===void 0||this.phase!=="card"||(this.roundMarks[this.cur]=o,n in this.marks||this.order.push(n),this.marks[n]=o)}next(){this.phase==="card"&&(this.cur++,this.cur>=this.round.length&&(this.phase=this.review||this.pool.length===0?"final":"round"))}finish(){this.phase="final"}ids(o){return this.order.filter(n=>this.marks[n]===o)}get missed(){return this.ids("n")}get known(){return this.ids("y")}get tally(){return{y:this.known.length,n:this.missed.length}}startReview(){const o=this.missed;o.length!==0&&(this.review=!0,this.startRound(me(o,this.rng)))}}const ge={key:0,class:"muted"},ke={class:"card accent","aria-labelledby":"start-h"},_e={class:"small muted"},we={key:0,class:"chips wrap",role:"group","aria-label":"Kategoria"},be=["aria-pressed"],ze=["aria-pressed","onClick"],xe={class:"btn-row",style:{"margin-top":"12px"}},Ce=["disabled"],Me={key:1,class:"section","aria-labelledby":"hist-h"},je={class:"card"},qe={class:"quiz-bar"},Ne={class:"score"},$e={class:"y"},We={class:"n"},Re={class:"count"},Se={class:"btn-row"},Le=["disabled"],Ze=["disabled"],Be={class:"step","aria-live":"polite"},Pe={key:0},Ve={key:1,class:"qcard"},Te={class:"q"},De={key:1,class:"answer","aria-live":"polite"},Ee={class:"qactions"},Ke=["aria-pressed","disabled"],Qe=["aria-pressed","disabled"],He=["disabled"],Ae={key:2,class:"error-text",role:"alert"},Fe={key:2,class:"qcard sum"},Ie={class:"tag"},Oe={class:"qactions"},Ue={key:3,class:"qcard sum"},Ge={class:"qactions",style:{margin:"0 0 18px"}},Je={key:0,class:"grp miss"},Xe={class:"tag"},Ye={key:1,class:"grp ok"},et={class:"tag"},tt={key:2,class:"muted small mono",style:{margin:"14px 0 0"}},rt=ue({__name:"QuizView",props:{slug:{}},setup(m){const o=m,n=v(null),p=v(""),f=v([]),y=v(null),d=v(null),g=v(null),w=v(!1),N=v({}),C=v(!1),$=v(""),b=v(null),V=v(null);async function T(){p.value="";try{n.value=await q.quiz(o.slug),D()}catch(t){p.value=I(t)}}async function D(){try{f.value=(await q.attempts(o.slug)).data}catch{}}de(T),ce(()=>{g.value&&!w.value&&d.value?.answeredCount&&q.finish(g.value.id).catch(()=>{})});const E=x(()=>{const t=new Map;for(const a of n.value?.questions??[])a.category&&t.set(a.category,(t.get(a.category)??0)+1);return[...t].sort(([a],[M])=>a.localeCompare(M,"pl"))}),K=x(()=>(n.value?.questions??[]).filter(t=>!y.value||t.category===y.value).length);function O(){const t=(n.value?.questions??[]).filter(a=>a.type==="self_check"&&(!y.value||a.category===y.value)).map(a=>({id:a.id,text:a.text,category:a.category,answer:a.answer_text??""}));d.value=new fe(t,n.value?.round_size??5),g.value=null,w.value=!1,N.value={},$.value="",b.value=null}async function U(){return g.value||(g.value=await q.start(o.slug,y.value),w.value=!1),g.value}async function Q(t){const a=d.value,M=a?.current;if(!(!a||!M||C.value)){C.value=!0,$.value="";try{const u=await U();await q.answer(u.id,{question_id:M.id,known:t==="y"}),a.mark(t),await he(),V.value?.focus()}catch(u){$.value=`Nie udało się zapisać odpowiedzi. ${I(u)}`}finally{C.value=!1}}}function G(){const t=d.value?.current?.id;t!==void 0&&(N.value={...N.value,[t]:!0})}function J(){const t=d.value;t&&(t.next(),t.phase==="final"&&W())}function H(){d.value?.draw(),d.value?.phase==="final"&&W()}function A(){d.value?.finish(),W()}async function W(){const t=g.value;if(!(!t||w.value)){w.value=!0;try{b.value=await q.finish(t.id)}catch{}D()}}function X(){const t=d.value;t&&(t.startReview(),g.value=null,w.value=!1,b.value=null)}function Y(){d.value?.reset(),g.value=null,w.value=!1,N.value={},b.value=null,d.value?.phase==="final"&&W()}function ee(){W(),d.value=null}const s=x(()=>d.value),z=x(()=>s.value?.current??null),L=x(()=>z.value?s.value?.roundMarks[s.value.cur]??null:null),F=t=>s.value?.cards.get(t)?.answer??"",te=t=>s.value?.roundMarks[t]??(t===s.value?.cur?"cur":""),se=x(()=>{const t=s.value;return t?t.isLastInRound?t.review?"Wynik powtórki":t.remaining?"Koniec rundy":"Podsumowanie":"Dalej":""}),Z=t=>pe(t,"pytanie","pytania","pytań"),ae=x(()=>{const t=s.value;return t?t.phase==="round"?"Koniec rundy":t.phase==="final"?t.review?"Wynik po powtórce":t.remaining?"Podsumowanie sesji":"Cała pula za Tobą":`${t.review?"Powtórka · ":""}Pytanie ${t.cur+1} z ${t.round.length}`:""});return(t,a)=>{const M=ye("router-link");return r(),i("div",null,[S(ie,{ready:!!n.value,error:p.value,onRetry:a[3]||(a[3]=u=>T())},{default:B(()=>[n.value?(r(),i(k,{key:0},[S(oe,{eyebrow:"Quiz",title:n.value.title},{default:B(()=>[S(M,{class:"btn small ghost",to:"/quizy"},{default:B(()=>[...a[4]||(a[4]=[_("← Quizy",-1)])]),_:1})]),_:1},8,["title"]),s.value?(r(),i(k,{key:1},[e("div",qe,[e("div",null,[e("div",Ne,[e("span",$e,[a[7]||(a[7]=_("Wiem ",-1)),e("b",null,l(s.value.tally.y),1)]),e("span",We,[a[8]||(a[8]=_("Nie wiem ",-1)),e("b",null,l(s.value.tally.n),1)])]),e("span",Re,[_(l(Z(s.value.total))+" w puli · "+l(s.value.remaining)+" jeszcze nie padło",1),y.value?(r(),i(k,{key:0},[_(" · "+l(y.value),1)],64)):h("",!0)])]),e("div",Se,[e("button",{class:"btn small",type:"button",disabled:s.value.phase==="final",onClick:H},"Losuj "+l(n.value.round_size??5)+" nowych",9,Le),e("button",{class:"btn small primary",type:"button",disabled:s.value.answeredCount===0||s.value.phase==="final",onClick:A},"Zakończ",8,Ze)])]),s.value.phase!=="final"?(r(),i("div",{key:0,class:"round-progress",style:ve({gridTemplateColumns:`repeat(${s.value.round.length}, 1fr)`}),"aria-hidden":"true"},[(r(!0),i(k,null,R(s.value.round,(u,j)=>(r(),i("span",{key:j,class:P(te(j))},null,2))),128))],4)):h("",!0),e("div",Be,[e("span",null,l(ae.value),1),s.value.phase==="card"&&z.value?.category?(r(),i("span",Pe,l(z.value.category),1)):h("",!0)]),s.value.phase==="card"&&z.value?(r(),i("div",Ve,[e("p",Te,l(z.value.text),1),N.value[z.value.id]?(r(),i("div",De,[a[9]||(a[9]=e("span",{class:"tag"},"Odpowiedź",-1)),_(" "+l(z.value.answer),1)])):(r(),i("button",{key:0,class:"reveal",type:"button",onClick:G},"odpowiedź")),e("div",Ee,[e("button",{class:"btn yes",type:"button","aria-pressed":L.value==="y",disabled:C.value,onClick:a[1]||(a[1]=u=>Q("y"))},"Wiem!",8,Ke),e("button",{class:"btn no",type:"button","aria-pressed":L.value==="n",disabled:C.value,onClick:a[2]||(a[2]=u=>Q("n"))},"Nie wiem",8,Qe),e("button",{ref_key:"nextBtn",ref:V,class:"btn primary next",type:"button",disabled:!L.value||C.value,onClick:J},l(se.value),9,He)]),$.value?(r(),i("p",Ae,l($.value),1)):h("",!0)])):s.value.phase==="round"?(r(),i("div",Fe,[e("h2",null,"Wiem "+l(s.value.roundMarks.filter(u=>u==="y").length)+" z "+l(s.value.round.length),1),a[10]||(a[10]=e("p",null,"Pytania „Nie wiem” trafiają do powtórki. Zbierzesz je przyciskiem „Zakończ”.",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.round,(u,j)=>(r(),i("li",{key:u,class:P(s.value.roundMarks[j])},[e("span",Ie,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text)+" ",1),e("small",null,l(F(u)),1)],2))),128))]),e("div",Oe,[e("button",{class:"btn primary",type:"button",onClick:H},"Losuj "+l(n.value.round_size??5)+" nowych",1),e("button",{class:"btn",type:"button",onClick:A},"Zakończ")])])):(r(),i("div",Ue,[e("h2",null,"Wiem "+l(s.value.known.length)+" z "+l(s.value.answeredCount),1),e("p",null,l(s.value.missed.length?`Do powtórki: ${s.value.missed.length}.`:s.value.answeredCount?"Wszystko umiesz. Nie ma nic do powtórki.":"Nie udzielono żadnej odpowiedzi."),1),e("div",Ge,[s.value.missed.length?(r(),i("button",{key:0,class:"btn primary",type:"button",onClick:X},"Powtórz "+l(Z(s.value.missed.length)),1)):h("",!0),e("button",{class:P(["btn",{primary:!s.value.missed.length}]),type:"button",onClick:Y},"Nowa sesja",2),e("button",{class:"btn ghost",type:"button",onClick:ee},"Wróć do quizu")]),s.value.missed.length?(r(),i("div",Je,[a[11]||(a[11]=e("h3",null,"Nie wiem",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.missed,u=>(r(),i("li",{key:u,class:"n"},[e("span",Xe,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text)+" ",1),e("small",null,l(F(u)),1)]))),128))])])):h("",!0),s.value.known.length?(r(),i("div",Ye,[a[12]||(a[12]=e("h3",null,"Wiem",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.known,u=>(r(),i("li",{key:u,class:"y"},[e("span",et,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text),1)]))),128))])])):h("",!0),b.value?(r(),i("p",tt,"Zapisano w historii: "+l(Math.round(b.value.score_points))+"/"+l(Math.round(b.value.max_points)),1)):h("",!0)]))],64)):(r(),i(k,{key:0},[n.value.description?(r(),i("p",ge,l(n.value.description),1)):h("",!0),e("section",ke,[a[5]||(a[5]=e("h2",{id:"start-h",style:{"margin-bottom":"8px"}},"Nowa sesja",-1)),e("p",_e,"Rundy po "+l(n.value.round_size??5)+" losowych pytań, które jeszcze nie padły. Każdą odpowiedź zapisujemy na koncie.",1),E.value.length?(r(),i("div",we,[e("button",{class:"chip",type:"button","aria-pressed":y.value===null,onClick:a[0]||(a[0]=u=>y.value=null)},"Wszystkie",8,be),(r(!0),i(k,null,R(E.value,([u,j])=>(r(),i("button",{key:u,class:"chip",type:"button","aria-pressed":y.value===u,onClick:st=>y.value=u},l(u)+" · "+l(j),9,ze))),128))])):h("",!0),e("div",xe,[e("button",{class:"btn primary",type:"button",disabled:K.value===0,onClick:O},"Zacznij · "+l(Z(K.value)),9,Ce)])]),f.value.length?(r(),i("section",Me,[a[6]||(a[6]=e("div",{class:"section-head"},[e("h2",{id:"hist-h"},"Historia podejść")],-1)),e("div",je,[S(re,{attempts:f.value},null,8,["attempts"])])])):h("",!0)],64))],64)):h("",!0)]),_:1},8,["ready","error"])])}}});export{rt as default}; +var ne=Object.defineProperty;var le=(m,o,n)=>o in m?ne(m,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):m[o]=n;var c=(m,o,n)=>le(m,typeof o!="symbol"?o+"":o,n);import{_ as oe}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as ie}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{q,_ as re}from"./quizzes-DYhavCsn.js";import{d as ue,o as de,V as ce,c as i,i as S,j as B,r as v,ap as I,n as r,F as k,p as _,t as l,f as h,b as e,E as R,H as ve,C as P,x,Z as he,ag as pe,l as ye}from"./index-BhVKyY57.js";function me(m,o=Math.random){const n=m.slice();for(let p=n.length-1;p>0;p--){const f=Math.floor(o()*(p+1));[n[p],n[f]]=[n[f],n[p]]}return n}class fe{constructor(o,n=5,p=Math.random){c(this,"cards");c(this,"roundSize");c(this,"rng");c(this,"pool",[]);c(this,"round",[]);c(this,"cur",0);c(this,"roundMarks",[]);c(this,"marks",{});c(this,"order",[]);c(this,"review",!1);c(this,"phase","card");this.cards=new Map(o.map(f=>[f.id,f])),this.roundSize=Math.max(1,n),this.rng=p,this.reset()}reset(){this.marks={},this.order=[],this.pool=[...this.cards.keys()],this.draw()}draw(){if(this.review=!1,this.pool.length===0){this.round=[],this.roundMarks=[],this.cur=0,this.phase="final";return}const o=[];for(;o.lengthnull),this.cur=0,this.phase="card"}get current(){const o=this.round[this.cur];return o===void 0?null:this.cards.get(o)??null}get isLastInRound(){return this.cur===this.round.length-1}get answeredCount(){return this.order.length}get remaining(){return this.pool.length}get total(){return this.cards.size}mark(o){const n=this.round[this.cur];n===void 0||this.phase!=="card"||(this.roundMarks[this.cur]=o,n in this.marks||this.order.push(n),this.marks[n]=o)}next(){this.phase==="card"&&(this.cur++,this.cur>=this.round.length&&(this.phase=this.review||this.pool.length===0?"final":"round"))}finish(){this.phase="final"}ids(o){return this.order.filter(n=>this.marks[n]===o)}get missed(){return this.ids("n")}get known(){return this.ids("y")}get tally(){return{y:this.known.length,n:this.missed.length}}startReview(){const o=this.missed;o.length!==0&&(this.review=!0,this.startRound(me(o,this.rng)))}}const ge={key:0,class:"muted"},ke={class:"card accent","aria-labelledby":"start-h"},_e={class:"small muted"},we={key:0,class:"chips wrap",role:"group","aria-label":"Kategoria"},be=["aria-pressed"],ze=["aria-pressed","onClick"],xe={class:"btn-row",style:{"margin-top":"12px"}},Ce=["disabled"],Me={key:1,class:"section","aria-labelledby":"hist-h"},je={class:"card"},qe={class:"quiz-bar"},Ne={class:"score"},$e={class:"y"},We={class:"n"},Re={class:"count"},Se={class:"btn-row"},Le=["disabled"],Ze=["disabled"],Be={class:"step","aria-live":"polite"},Pe={key:0},Ve={key:1,class:"qcard"},Te={class:"q"},De={key:1,class:"answer","aria-live":"polite"},Ee={class:"qactions"},Ke=["aria-pressed","disabled"],Qe=["aria-pressed","disabled"],He=["disabled"],Ae={key:2,class:"error-text",role:"alert"},Fe={key:2,class:"qcard sum"},Ie={class:"tag"},Oe={class:"qactions"},Ue={key:3,class:"qcard sum"},Ge={class:"qactions",style:{margin:"0 0 18px"}},Je={key:0,class:"grp miss"},Xe={class:"tag"},Ye={key:1,class:"grp ok"},et={class:"tag"},tt={key:2,class:"muted small mono",style:{margin:"14px 0 0"}},rt=ue({__name:"QuizView",props:{slug:{}},setup(m){const o=m,n=v(null),p=v(""),f=v([]),y=v(null),d=v(null),g=v(null),w=v(!1),N=v({}),C=v(!1),$=v(""),b=v(null),V=v(null);async function T(){p.value="";try{n.value=await q.quiz(o.slug),D()}catch(t){p.value=I(t)}}async function D(){try{f.value=(await q.attempts(o.slug)).data}catch{}}de(T),ce(()=>{g.value&&!w.value&&d.value?.answeredCount&&q.finish(g.value.id).catch(()=>{})});const E=x(()=>{const t=new Map;for(const a of n.value?.questions??[])a.category&&t.set(a.category,(t.get(a.category)??0)+1);return[...t].sort(([a],[M])=>a.localeCompare(M,"pl"))}),K=x(()=>(n.value?.questions??[]).filter(t=>!y.value||t.category===y.value).length);function O(){const t=(n.value?.questions??[]).filter(a=>a.type==="self_check"&&(!y.value||a.category===y.value)).map(a=>({id:a.id,text:a.text,category:a.category,answer:a.answer_text??""}));d.value=new fe(t,n.value?.round_size??5),g.value=null,w.value=!1,N.value={},$.value="",b.value=null}async function U(){return g.value||(g.value=await q.start(o.slug,y.value),w.value=!1),g.value}async function Q(t){const a=d.value,M=a?.current;if(!(!a||!M||C.value)){C.value=!0,$.value="";try{const u=await U();await q.answer(u.id,{question_id:M.id,known:t==="y"}),a.mark(t),await he(),V.value?.focus()}catch(u){$.value=`Nie udało się zapisać odpowiedzi. ${I(u)}`}finally{C.value=!1}}}function G(){const t=d.value?.current?.id;t!==void 0&&(N.value={...N.value,[t]:!0})}function J(){const t=d.value;t&&(t.next(),t.phase==="final"&&W())}function H(){d.value?.draw(),d.value?.phase==="final"&&W()}function A(){d.value?.finish(),W()}async function W(){const t=g.value;if(!(!t||w.value)){w.value=!0;try{b.value=await q.finish(t.id)}catch{}D()}}function X(){const t=d.value;t&&(t.startReview(),g.value=null,w.value=!1,b.value=null)}function Y(){d.value?.reset(),g.value=null,w.value=!1,N.value={},b.value=null,d.value?.phase==="final"&&W()}function ee(){W(),d.value=null}const s=x(()=>d.value),z=x(()=>s.value?.current??null),L=x(()=>z.value?s.value?.roundMarks[s.value.cur]??null:null),F=t=>s.value?.cards.get(t)?.answer??"",te=t=>s.value?.roundMarks[t]??(t===s.value?.cur?"cur":""),se=x(()=>{const t=s.value;return t?t.isLastInRound?t.review?"Wynik powtórki":t.remaining?"Koniec rundy":"Podsumowanie":"Dalej":""}),Z=t=>pe(t,"pytanie","pytania","pytań"),ae=x(()=>{const t=s.value;return t?t.phase==="round"?"Koniec rundy":t.phase==="final"?t.review?"Wynik po powtórce":t.remaining?"Podsumowanie sesji":"Cała pula za Tobą":`${t.review?"Powtórka · ":""}Pytanie ${t.cur+1} z ${t.round.length}`:""});return(t,a)=>{const M=ye("router-link");return r(),i("div",null,[S(ie,{ready:!!n.value,error:p.value,onRetry:a[3]||(a[3]=u=>T())},{default:B(()=>[n.value?(r(),i(k,{key:0},[S(oe,{eyebrow:"Quiz",title:n.value.title},{default:B(()=>[S(M,{class:"btn small ghost",to:"/quizy"},{default:B(()=>[...a[4]||(a[4]=[_("← Quizy",-1)])]),_:1})]),_:1},8,["title"]),s.value?(r(),i(k,{key:1},[e("div",qe,[e("div",null,[e("div",Ne,[e("span",$e,[a[7]||(a[7]=_("Wiem ",-1)),e("b",null,l(s.value.tally.y),1)]),e("span",We,[a[8]||(a[8]=_("Nie wiem ",-1)),e("b",null,l(s.value.tally.n),1)])]),e("span",Re,[_(l(Z(s.value.total))+" w puli · "+l(s.value.remaining)+" jeszcze nie padło",1),y.value?(r(),i(k,{key:0},[_(" · "+l(y.value),1)],64)):h("",!0)])]),e("div",Se,[e("button",{class:"btn small",type:"button",disabled:s.value.phase==="final",onClick:H},"Losuj "+l(n.value.round_size??5)+" nowych",9,Le),e("button",{class:"btn small primary",type:"button",disabled:s.value.answeredCount===0||s.value.phase==="final",onClick:A},"Zakończ",8,Ze)])]),s.value.phase!=="final"?(r(),i("div",{key:0,class:"round-progress",style:ve({gridTemplateColumns:`repeat(${s.value.round.length}, 1fr)`}),"aria-hidden":"true"},[(r(!0),i(k,null,R(s.value.round,(u,j)=>(r(),i("span",{key:j,class:P(te(j))},null,2))),128))],4)):h("",!0),e("div",Be,[e("span",null,l(ae.value),1),s.value.phase==="card"&&z.value?.category?(r(),i("span",Pe,l(z.value.category),1)):h("",!0)]),s.value.phase==="card"&&z.value?(r(),i("div",Ve,[e("p",Te,l(z.value.text),1),N.value[z.value.id]?(r(),i("div",De,[a[9]||(a[9]=e("span",{class:"tag"},"Odpowiedź",-1)),_(" "+l(z.value.answer),1)])):(r(),i("button",{key:0,class:"reveal",type:"button",onClick:G},"odpowiedź")),e("div",Ee,[e("button",{class:"btn yes",type:"button","aria-pressed":L.value==="y",disabled:C.value,onClick:a[1]||(a[1]=u=>Q("y"))},"Wiem!",8,Ke),e("button",{class:"btn no",type:"button","aria-pressed":L.value==="n",disabled:C.value,onClick:a[2]||(a[2]=u=>Q("n"))},"Nie wiem",8,Qe),e("button",{ref_key:"nextBtn",ref:V,class:"btn primary next",type:"button",disabled:!L.value||C.value,onClick:J},l(se.value),9,He)]),$.value?(r(),i("p",Ae,l($.value),1)):h("",!0)])):s.value.phase==="round"?(r(),i("div",Fe,[e("h2",null,"Wiem "+l(s.value.roundMarks.filter(u=>u==="y").length)+" z "+l(s.value.round.length),1),a[10]||(a[10]=e("p",null,"Pytania „Nie wiem” trafiają do powtórki. Zbierzesz je przyciskiem „Zakończ”.",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.round,(u,j)=>(r(),i("li",{key:u,class:P(s.value.roundMarks[j])},[e("span",Ie,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text)+" ",1),e("small",null,l(F(u)),1)],2))),128))]),e("div",Oe,[e("button",{class:"btn primary",type:"button",onClick:H},"Losuj "+l(n.value.round_size??5)+" nowych",1),e("button",{class:"btn",type:"button",onClick:A},"Zakończ")])])):(r(),i("div",Ue,[e("h2",null,"Wiem "+l(s.value.known.length)+" z "+l(s.value.answeredCount),1),e("p",null,l(s.value.missed.length?`Do powtórki: ${s.value.missed.length}.`:s.value.answeredCount?"Wszystko umiesz. Nie ma nic do powtórki.":"Nie udzielono żadnej odpowiedzi."),1),e("div",Ge,[s.value.missed.length?(r(),i("button",{key:0,class:"btn primary",type:"button",onClick:X},"Powtórz "+l(Z(s.value.missed.length)),1)):h("",!0),e("button",{class:P(["btn",{primary:!s.value.missed.length}]),type:"button",onClick:Y},"Nowa sesja",2),e("button",{class:"btn ghost",type:"button",onClick:ee},"Wróć do quizu")]),s.value.missed.length?(r(),i("div",Je,[a[11]||(a[11]=e("h3",null,"Nie wiem",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.missed,u=>(r(),i("li",{key:u,class:"n"},[e("span",Xe,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text)+" ",1),e("small",null,l(F(u)),1)]))),128))])])):h("",!0),s.value.known.length?(r(),i("div",Ye,[a[12]||(a[12]=e("h3",null,"Wiem",-1)),e("ol",null,[(r(!0),i(k,null,R(s.value.known,u=>(r(),i("li",{key:u,class:"y"},[e("span",et,l(s.value.cards.get(u)?.category),1),_(" "+l(s.value.cards.get(u)?.text),1)]))),128))])])):h("",!0),b.value?(r(),i("p",tt,"Zapisano w historii: "+l(Math.round(b.value.score_points))+"/"+l(Math.round(b.value.max_points)),1)):h("",!0)]))],64)):(r(),i(k,{key:0},[n.value.description?(r(),i("p",ge,l(n.value.description),1)):h("",!0),e("section",ke,[a[5]||(a[5]=e("h2",{id:"start-h",style:{"margin-bottom":"8px"}},"Nowa sesja",-1)),e("p",_e,"Rundy po "+l(n.value.round_size??5)+" losowych pytań, które jeszcze nie padły. Każdą odpowiedź zapisujemy na koncie.",1),E.value.length?(r(),i("div",we,[e("button",{class:"chip",type:"button","aria-pressed":y.value===null,onClick:a[0]||(a[0]=u=>y.value=null)},"Wszystkie",8,be),(r(!0),i(k,null,R(E.value,([u,j])=>(r(),i("button",{key:u,class:"chip",type:"button","aria-pressed":y.value===u,onClick:st=>y.value=u},l(u)+" · "+l(j),9,ze))),128))])):h("",!0),e("div",xe,[e("button",{class:"btn primary",type:"button",disabled:K.value===0,onClick:O},"Zacznij · "+l(Z(K.value)),9,Ce)])]),f.value.length?(r(),i("section",Me,[a[6]||(a[6]=e("div",{class:"section-head"},[e("h2",{id:"hist-h"},"Historia podejść")],-1)),e("div",je,[S(re,{attempts:f.value},null,8,["attempts"])])])):h("",!0)],64))],64)):h("",!0)]),_:1},8,["ready","error"])])}}});export{rt as default}; diff --git a/public/assets/QuizzesView-BqshUAZI.js b/public/assets/QuizzesView-BKkd8cXT.js similarity index 86% rename from public/assets/QuizzesView-BqshUAZI.js rename to public/assets/QuizzesView-BKkd8cXT.js index 5559280..fe4fc28 100644 --- a/public/assets/QuizzesView-BqshUAZI.js +++ b/public/assets/QuizzesView-BKkd8cXT.js @@ -1 +1 @@ -import{_ as g}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as j}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{q as z,_ as w}from"./quizzes-DX8b_-1b.js";import{d as x,o as N,c as s,i as d,j as k,r as p,ap as V,n as t,F as _,E as $,s as b,b as o,t as n,f as l,p as m,e as h,ag as f,l as B}from"./index-CtNAsql9.js";const C={key:0,class:"stack"},F={key:0,class:"muted small",style:{margin:"0 0 8px"}},E={class:"small",style:{margin:"0"}},Q={key:1,class:"empty"},T={key:2,class:"section","aria-labelledby":"hist-h"},A={class:"card"},R=x({__name:"QuizzesView",setup(D){const i=p(null),c=p([]),u=p("");async function y(){u.value="";try{const[r,a]=await Promise.all([z.list(),z.attempts()]);i.value=r,c.value=a.data}catch(r){u.value=V(r)}}return N(y),(r,a)=>{const v=B("router-link");return t(),s("div",null,[d(g,{eyebrow:"Fiszki i testy",title:"Quizy"}),d(j,{ready:i.value!==null,error:u.value,onRetry:a[0]||(a[0]=e=>y())},{default:k(()=>[i.value?.length?(t(),s("div",C,[(t(!0),s(_,null,$(i.value,e=>(t(),b(v,{key:e.id,to:`/quizy/${e.slug}`,class:"card link accent"},{default:k(()=>[o("h3",null,n(e.title),1),e.description?(t(),s("p",F,n(e.description),1)):l("",!0),o("p",E,[m(n(h(f)(e.question_count,"pytanie","pytania","pytań")),1),e.round_size?(t(),s(_,{key:0},[m(" · rundy po "+n(e.round_size),1)],64)):l("",!0),e.attempts_count?(t(),s(_,{key:1},[m(" · "+n(h(f)(e.attempts_count,"zakończone podejście","zakończone podejścia","zakończonych podejść")),1)],64)):l("",!0)])]),_:2},1032,["to"]))),128))])):(t(),s("p",Q,"Nie ma jeszcze żadnych quizów.")),c.value.length?(t(),s("section",T,[a[1]||(a[1]=o("div",{class:"section-head"},[o("h2",{id:"hist-h"},"Historia podejść")],-1)),o("div",A,[d(w,{attempts:c.value,"show-quiz":""},null,8,["attempts"])])])):l("",!0)]),_:1},8,["ready","error"])])}}});export{R as default}; +import{_ as g}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as j}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{q as z,_ as w}from"./quizzes-DYhavCsn.js";import{d as x,o as N,c as s,i as d,j as k,r as p,ap as V,n as t,F as _,E as $,s as b,b as o,t as n,f as l,p as m,e as h,ag as f,l as B}from"./index-BhVKyY57.js";const C={key:0,class:"stack"},F={key:0,class:"muted small",style:{margin:"0 0 8px"}},E={class:"small",style:{margin:"0"}},Q={key:1,class:"empty"},T={key:2,class:"section","aria-labelledby":"hist-h"},A={class:"card"},R=x({__name:"QuizzesView",setup(D){const i=p(null),c=p([]),u=p("");async function y(){u.value="";try{const[r,a]=await Promise.all([z.list(),z.attempts()]);i.value=r,c.value=a.data}catch(r){u.value=V(r)}}return N(y),(r,a)=>{const v=B("router-link");return t(),s("div",null,[d(g,{eyebrow:"Fiszki i testy",title:"Quizy"}),d(j,{ready:i.value!==null,error:u.value,onRetry:a[0]||(a[0]=e=>y())},{default:k(()=>[i.value?.length?(t(),s("div",C,[(t(!0),s(_,null,$(i.value,e=>(t(),b(v,{key:e.id,to:`/quizy/${e.slug}`,class:"card link accent"},{default:k(()=>[o("h3",null,n(e.title),1),e.description?(t(),s("p",F,n(e.description),1)):l("",!0),o("p",E,[m(n(h(f)(e.question_count,"pytanie","pytania","pytań")),1),e.round_size?(t(),s(_,{key:0},[m(" · rundy po "+n(e.round_size),1)],64)):l("",!0),e.attempts_count?(t(),s(_,{key:1},[m(" · "+n(h(f)(e.attempts_count,"zakończone podejście","zakończone podejścia","zakończonych podejść")),1)],64)):l("",!0)])]),_:2},1032,["to"]))),128))])):(t(),s("p",Q,"Nie ma jeszcze żadnych quizów.")),c.value.length?(t(),s("section",T,[a[1]||(a[1]=o("div",{class:"section-head"},[o("h2",{id:"hist-h"},"Historia podejść")],-1)),o("div",A,[d(w,{attempts:c.value,"show-quiz":""},null,8,["attempts"])])])):l("",!0)]),_:1},8,["ready","error"])])}}});export{R as default}; diff --git a/public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-CyMMq5Kb.js b/public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-BLPuAInn.js similarity index 94% rename from public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-CyMMq5Kb.js rename to public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-BLPuAInn.js index 67cc5b3..35a4331 100644 --- a/public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-CyMMq5Kb.js +++ b/public/assets/ReadingItem.vue_vue_type_script_setup_true_lang-BLPuAInn.js @@ -1 +1 @@ -import{d as s,n,c as l,b as t,p as c,t as r,f as d,e as g,ar as m}from"./index-CtNAsql9.js";const u=["id"],h=["checked"],k={class:"text"},b={key:0,class:"muted"},f={key:1,class:"muted mono"},y={class:"owned"},w=["checked","aria-label"],$=["href","aria-label"],B=s({__name:"ReadingItem",props:{reading:{}},emits:["toggle","own"],setup(e){return(o,a)=>(n(),l("li",{id:`lektura-${e.reading.id}`,class:"reading"},[t("label",null,[t("input",{type:"checkbox",checked:!!e.reading.read_at,onChange:a[0]||(a[0]=i=>o.$emit("toggle",i.target.checked))},null,40,h),t("span",k,[c(r(e.reading.title)+" ",1),e.reading.author||e.reading.source?(n(),l("small",b," · "+r([e.reading.author,e.reading.source].filter(Boolean).join(", ")),1)):d("",!0),e.reading.read_at?(n(),l("small",f," · przeczytano "+r(g(m)(e.reading.read_at)),1)):d("",!0)])]),t("label",y,[t("input",{type:"checkbox",checked:!!e.reading.owned_at,"aria-label":`Mam: ${e.reading.title}`,onChange:a[1]||(a[1]=i=>o.$emit("own",i.target.checked))},null,40,w),a[2]||(a[2]=t("span",null,"mam",-1))]),e.reading.url?(n(),l("a",{key:0,href:e.reading.url,target:"_blank",rel:"noopener noreferrer",class:"small","aria-label":`Otwórz: ${e.reading.title}`},"link",8,$)):d("",!0)],8,u))}});export{B as _}; +import{d as s,n,c as l,b as t,p as c,t as r,f as d,e as g,ar as m}from"./index-BhVKyY57.js";const u=["id"],h=["checked"],k={class:"text"},b={key:0,class:"muted"},f={key:1,class:"muted mono"},y={class:"owned"},w=["checked","aria-label"],$=["href","aria-label"],B=s({__name:"ReadingItem",props:{reading:{}},emits:["toggle","own"],setup(e){return(o,a)=>(n(),l("li",{id:`lektura-${e.reading.id}`,class:"reading"},[t("label",null,[t("input",{type:"checkbox",checked:!!e.reading.read_at,onChange:a[0]||(a[0]=i=>o.$emit("toggle",i.target.checked))},null,40,h),t("span",k,[c(r(e.reading.title)+" ",1),e.reading.author||e.reading.source?(n(),l("small",b," · "+r([e.reading.author,e.reading.source].filter(Boolean).join(", ")),1)):d("",!0),e.reading.read_at?(n(),l("small",f," · przeczytano "+r(g(m)(e.reading.read_at)),1)):d("",!0)])]),t("label",y,[t("input",{type:"checkbox",checked:!!e.reading.owned_at,"aria-label":`Mam: ${e.reading.title}`,onChange:a[1]||(a[1]=i=>o.$emit("own",i.target.checked))},null,40,w),a[2]||(a[2]=t("span",null,"mam",-1))]),e.reading.url?(n(),l("a",{key:0,href:e.reading.url,target:"_blank",rel:"noopener noreferrer",class:"small","aria-label":`Otwórz: ${e.reading.title}`},"link",8,$)):d("",!0)],8,u))}});export{B as _}; diff --git a/public/assets/ReadingsView-DiOpyKU1.js b/public/assets/ReadingsView-Ddb9B2Jf.js similarity index 90% rename from public/assets/ReadingsView-DiOpyKU1.js rename to public/assets/ReadingsView-Ddb9B2Jf.js index 9a2ed69..33a08ab 100644 --- a/public/assets/ReadingsView-DiOpyKU1.js +++ b/public/assets/ReadingsView-Ddb9B2Jf.js @@ -1 +1 @@ -import{_ as $}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as O}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{_ as C}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-DxZMSXIh.js";import{_ as b}from"./ReadingItem.vue_vue_type_script_setup_true_lang-CyMMq5Kb.js";import{d as R,ae as B,o as N,c as i,i as h,j as q,e as d,x as g,n,b as o,t as r,H as S,F as m,E as v,p as V,ah as j,s as x,f,ag as L,r as T,l as M}from"./index-CtNAsql9.js";import{u as D}from"./scrollToHash-B7Lws5_Z.js";const E={class:"card","aria-label":"Postęp czytania"},F={style:{margin:"0 0 8px"}},P={class:"big-num nums"},H={class:"muted"},W={class:"muted small"},A=["aria-valuenow"],G={class:"chips wrap",style:{"margin-top":"12px"}},I=["aria-pressed"],U=["aria-pressed"],J=["aria-labelledby"],K={class:"section-head"},Q=["id"],X={class:"badge",style:{"margin-left":"8px"}},Y={class:"muted small nums"},Z={class:"subhead"},ee={class:"rows"},ae={class:"subhead"},oe={class:"rows"},te={key:0,class:"empty",style:{"margin-top":"16px"}},ce=R({__name:"ReadingsView",setup(se){const s=B(),_=T(!1),p=T(!1);N(()=>{Promise.all([s.loadReadings(),s.loadCourses()])});const k=g(()=>{const y=new Map;for(const t of s.readings)y.set(t.course_id,[...y.get(t.course_id)??[],t]);const l=t=>s.courseById.get(t)?.sort_order??0;return[...y].sort(([t],[e])=>l(t)-l(e)).map(([,t])=>{const e=t.filter(a=>(!_.value||!a.read_at)&&(!p.value||a.owned_at));return{course:t[0].course,required:e.filter(a=>a.is_required),optional:e.filter(a=>!a.is_required),read:t.filter(a=>a.read_at).length,total:t.length}}).filter(t=>t.required.length+t.optional.length>0)}),w=g(()=>s.loaded.readings&&s.loaded.courses);D(w);const u=g(()=>s.readingStats),z=g(()=>u.value.requiredTotal?Math.round(u.value.requiredRead/u.value.requiredTotal*100):0);return(y,l)=>{const t=M("router-link");return n(),i("div",null,[h($,{eyebrow:"Do przeczytania",title:"Lektury"}),h(O,{ready:w.value,error:d(s).error,onRetry:l[2]||(l[2]=e=>d(s).retry())},{default:q(()=>[h(C),o("section",E,[o("p",F,[o("span",P,r(u.value.requiredRead),1),o("span",H," z "+r(u.value.requiredTotal)+" obowiązkowych",1),o("span",W," · łącznie "+r(u.value.read)+" z "+r(u.value.total),1)]),o("div",{class:"progress-bar",role:"progressbar","aria-valuenow":z.value,"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Przeczytane lektury obowiązkowe"},[o("span",{style:S({width:z.value+"%"})},null,4)],8,A)]),o("div",G,[o("button",{class:"chip",type:"button","aria-pressed":_.value,onClick:l[0]||(l[0]=e=>_.value=!_.value)},"Tylko nieprzeczytane",8,I),o("button",{class:"chip",type:"button","aria-pressed":p.value,onClick:l[1]||(l[1]=e=>p.value=!p.value)},"Tylko posiadane",8,U)]),(n(!0),i(m,null,v(k.value,e=>(n(),i("section",{key:e.course.id,class:"section","aria-labelledby":`c${e.course.id}`},[o("div",K,[o("h2",{id:`c${e.course.id}`},[h(t,{to:`/przedmioty/${e.course.id}`,style:{color:"inherit","text-decoration":"none"}},{default:q(()=>[V(r(e.course.name),1)]),_:2},1032,["to"]),o("span",X,r(d(j)[e.course.form]),1)],8,Q),o("span",Y,r(e.read)+"/"+r(e.total),1)]),e.required.length?(n(),i(m,{key:0},[o("h3",Z,"Obowiązkowe · "+r(e.required.length),1),o("ul",ee,[(n(!0),i(m,null,v(e.required,a=>(n(),x(b,{key:a.id,reading:a,onToggle:c=>d(s).toggleReading(a.id,c),onOwn:c=>d(s).toggleOwned(a.id,c)},null,8,["reading","onToggle","onOwn"]))),128))])],64)):f("",!0),e.optional.length?(n(),i(m,{key:1},[o("h3",ae,"Dodatkowe · "+r(e.optional.length),1),o("ul",oe,[(n(!0),i(m,null,v(e.optional,a=>(n(),x(b,{key:a.id,reading:a,onToggle:c=>d(s).toggleReading(a.id,c),onOwn:c=>d(s).toggleOwned(a.id,c)},null,8,["reading","onToggle","onOwn"]))),128))])],64)):f("",!0)],8,J))),128)),k.value.length?f("",!0):(n(),i("p",te,r(p.value?_.value?"Wszystkie posiadane lektury przeczytane.":"Nie masz jeszcze żadnej lektury.":_.value?"Wszystko przeczytane. Gratulacje!":d(L)(0,"lektura","lektury","lektur")+" do wyświetlenia."),1))]),_:1},8,["ready","error"])])}}});export{ce as default}; +import{_ as $}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as O}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{_ as C}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-05LZv84e.js";import{_ as b}from"./ReadingItem.vue_vue_type_script_setup_true_lang-BLPuAInn.js";import{d as R,ae as B,o as N,c as i,i as h,j as q,e as d,x as g,n,b as o,t as r,H as S,F as m,E as v,p as V,ah as j,s as x,f,ag as L,r as T,l as M}from"./index-BhVKyY57.js";import{u as D}from"./scrollToHash-DSRl5dJ4.js";const E={class:"card","aria-label":"Postęp czytania"},F={style:{margin:"0 0 8px"}},P={class:"big-num nums"},H={class:"muted"},W={class:"muted small"},A=["aria-valuenow"],G={class:"chips wrap",style:{"margin-top":"12px"}},I=["aria-pressed"],U=["aria-pressed"],J=["aria-labelledby"],K={class:"section-head"},Q=["id"],X={class:"badge",style:{"margin-left":"8px"}},Y={class:"muted small nums"},Z={class:"subhead"},ee={class:"rows"},ae={class:"subhead"},oe={class:"rows"},te={key:0,class:"empty",style:{"margin-top":"16px"}},ce=R({__name:"ReadingsView",setup(se){const s=B(),_=T(!1),p=T(!1);N(()=>{Promise.all([s.loadReadings(),s.loadCourses()])});const k=g(()=>{const y=new Map;for(const t of s.readings)y.set(t.course_id,[...y.get(t.course_id)??[],t]);const l=t=>s.courseById.get(t)?.sort_order??0;return[...y].sort(([t],[e])=>l(t)-l(e)).map(([,t])=>{const e=t.filter(a=>(!_.value||!a.read_at)&&(!p.value||a.owned_at));return{course:t[0].course,required:e.filter(a=>a.is_required),optional:e.filter(a=>!a.is_required),read:t.filter(a=>a.read_at).length,total:t.length}}).filter(t=>t.required.length+t.optional.length>0)}),w=g(()=>s.loaded.readings&&s.loaded.courses);D(w);const u=g(()=>s.readingStats),z=g(()=>u.value.requiredTotal?Math.round(u.value.requiredRead/u.value.requiredTotal*100):0);return(y,l)=>{const t=M("router-link");return n(),i("div",null,[h($,{eyebrow:"Do przeczytania",title:"Lektury"}),h(O,{ready:w.value,error:d(s).error,onRetry:l[2]||(l[2]=e=>d(s).retry())},{default:q(()=>[h(C),o("section",E,[o("p",F,[o("span",P,r(u.value.requiredRead),1),o("span",H," z "+r(u.value.requiredTotal)+" obowiązkowych",1),o("span",W," · łącznie "+r(u.value.read)+" z "+r(u.value.total),1)]),o("div",{class:"progress-bar",role:"progressbar","aria-valuenow":z.value,"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Przeczytane lektury obowiązkowe"},[o("span",{style:S({width:z.value+"%"})},null,4)],8,A)]),o("div",G,[o("button",{class:"chip",type:"button","aria-pressed":_.value,onClick:l[0]||(l[0]=e=>_.value=!_.value)},"Tylko nieprzeczytane",8,I),o("button",{class:"chip",type:"button","aria-pressed":p.value,onClick:l[1]||(l[1]=e=>p.value=!p.value)},"Tylko posiadane",8,U)]),(n(!0),i(m,null,v(k.value,e=>(n(),i("section",{key:e.course.id,class:"section","aria-labelledby":`c${e.course.id}`},[o("div",K,[o("h2",{id:`c${e.course.id}`},[h(t,{to:`/przedmioty/${e.course.id}`,style:{color:"inherit","text-decoration":"none"}},{default:q(()=>[V(r(e.course.name),1)]),_:2},1032,["to"]),o("span",X,r(d(j)[e.course.form]),1)],8,Q),o("span",Y,r(e.read)+"/"+r(e.total),1)]),e.required.length?(n(),i(m,{key:0},[o("h3",Z,"Obowiązkowe · "+r(e.required.length),1),o("ul",ee,[(n(!0),i(m,null,v(e.required,a=>(n(),x(b,{key:a.id,reading:a,onToggle:c=>d(s).toggleReading(a.id,c),onOwn:c=>d(s).toggleOwned(a.id,c)},null,8,["reading","onToggle","onOwn"]))),128))])],64)):f("",!0),e.optional.length?(n(),i(m,{key:1},[o("h3",ae,"Dodatkowe · "+r(e.optional.length),1),o("ul",oe,[(n(!0),i(m,null,v(e.optional,a=>(n(),x(b,{key:a.id,reading:a,onToggle:c=>d(s).toggleReading(a.id,c),onOwn:c=>d(s).toggleOwned(a.id,c)},null,8,["reading","onToggle","onOwn"]))),128))])],64)):f("",!0)],8,J))),128)),k.value.length?f("",!0):(n(),i("p",te,r(p.value?_.value?"Wszystkie posiadane lektury przeczytane.":"Nie masz jeszcze żadnej lektury.":_.value?"Wszystko przeczytane. Gratulacje!":d(L)(0,"lektura","lektury","lektur")+" do wyświetlenia."),1))]),_:1},8,["ready","error"])])}}});export{ce as default}; diff --git a/public/assets/RegisterView-CtHxA-vZ.js b/public/assets/RegisterView-DbsIjB9v.js similarity index 98% rename from public/assets/RegisterView-CtHxA-vZ.js rename to public/assets/RegisterView-DbsIjB9v.js index 7fa9586..b16fa91 100644 --- a/public/assets/RegisterView-CtHxA-vZ.js +++ b/public/assets/RegisterView-DbsIjB9v.js @@ -1 +1 @@ -import{d as q,u as N,c as o,b as s,t as n,i as _,j as g,h as j,f as u,w as d,v as m,r as l,l as B,n as i,p as x,m as C}from"./index-CtNAsql9.js";import{f as I}from"./forms-CHet_2fA.js";const M={class:"auth"},h={key:0,class:"stack"},S={class:"notice",role:"status"},Z={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},A={class:"field"},D={key:0,class:"error-text"},E={class:"field"},P={key:0,class:"error-text"},R={class:"field"},T={key:0,class:"error-text"},H={class:"field"},K={key:0,class:"error-text"},W={class:"field"},F=["disabled"],G={class:"auth-links"},Q=q({__name:"RegisterView",setup(J){const V=N(),z=C(),v=l(""),f=l(""),w=l(""),c=l(""),y=l(""),p=l(!1),t=l(null),k=l("");async function U(){p.value=!0,t.value=null;try{const r=await V.register({name:v.value.trim(),surname:f.value.trim(),email:w.value.trim(),password:c.value,password_confirmation:y.value},!0);r.signedIn?await z.replace("/"):k.value=r.message||"Konto zostało utworzone. Sprawdź pocztę, aby je aktywować."}catch(r){t.value=I(r)}finally{p.value=!1}}return(r,e)=>{const b=B("router-link");return i(),o("div",M,[e[12]||(e[12]=s("header",{class:"page-head"},[s("span",{class:"eyebrow"},"BM II° · UWr"),s("h1",null,"Załóż konto")],-1)),k.value?(i(),o("div",h,[s("p",S,n(k.value),1),_(b,{class:"btn",to:"/logowanie"},{default:g(()=>[...e[5]||(e[5]=[x("Przejdź do logowania",-1)])]),_:1})])):(i(),o("form",{key:1,onSubmit:j(U,["prevent"]),novalidate:""},[t.value?.message?(i(),o("div",Z,n(t.value.message),1)):u("",!0),s("div",A,[e[6]||(e[6]=s("label",{for:"name"},"Imię",-1)),d(s("input",{id:"name","onUpdate:modelValue":e[0]||(e[0]=a=>v.value=a),type:"text",autocomplete:"given-name",required:""},null,512),[[m,v.value]]),t.value?.fields.name?(i(),o("p",D,n(t.value.fields.name),1)):u("",!0)]),s("div",E,[e[7]||(e[7]=s("label",{for:"surname"},"Nazwisko",-1)),d(s("input",{id:"surname","onUpdate:modelValue":e[1]||(e[1]=a=>f.value=a),type:"text",autocomplete:"family-name",required:""},null,512),[[m,f.value]]),t.value?.fields.surname?(i(),o("p",P,n(t.value.fields.surname),1)):u("",!0)]),s("div",R,[e[8]||(e[8]=s("label",{for:"email"},"Adres e-mail",-1)),d(s("input",{id:"email","onUpdate:modelValue":e[2]||(e[2]=a=>w.value=a),type:"email",autocomplete:"email",inputmode:"email",required:""},null,512),[[m,w.value]]),t.value?.fields.email?(i(),o("p",T,n(t.value.fields.email),1)):u("",!0)]),s("div",H,[e[9]||(e[9]=s("label",{for:"password"},"Hasło (min. 8 znaków)",-1)),d(s("input",{id:"password","onUpdate:modelValue":e[3]||(e[3]=a=>c.value=a),type:"password",autocomplete:"new-password",required:""},null,512),[[m,c.value]]),t.value?.fields.password?(i(),o("p",K,n(t.value.fields.password),1)):u("",!0)]),s("div",W,[e[10]||(e[10]=s("label",{for:"confirmation"},"Powtórz hasło",-1)),d(s("input",{id:"confirmation","onUpdate:modelValue":e[4]||(e[4]=a=>y.value=a),type:"password",autocomplete:"new-password",required:""},null,512),[[m,y.value]])]),s("button",{class:"btn primary block",type:"submit",disabled:p.value},n(p.value?"Zakładanie…":"Załóż konto"),9,F)],32)),s("div",G,[_(b,{to:"/logowanie"},{default:g(()=>[...e[11]||(e[11]=[x("Mam już konto",-1)])]),_:1})])])}}});export{Q as default}; +import{d as q,u as N,c as o,b as s,t as n,i as _,j as g,h as j,f as u,w as d,v as m,r as l,l as B,n as i,p as x,m as C}from"./index-BhVKyY57.js";import{f as I}from"./forms-CbFOvcno.js";const M={class:"auth"},h={key:0,class:"stack"},S={class:"notice",role:"status"},Z={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},A={class:"field"},D={key:0,class:"error-text"},E={class:"field"},P={key:0,class:"error-text"},R={class:"field"},T={key:0,class:"error-text"},H={class:"field"},K={key:0,class:"error-text"},W={class:"field"},F=["disabled"],G={class:"auth-links"},Q=q({__name:"RegisterView",setup(J){const V=N(),z=C(),v=l(""),f=l(""),w=l(""),c=l(""),y=l(""),p=l(!1),t=l(null),k=l("");async function U(){p.value=!0,t.value=null;try{const r=await V.register({name:v.value.trim(),surname:f.value.trim(),email:w.value.trim(),password:c.value,password_confirmation:y.value},!0);r.signedIn?await z.replace("/"):k.value=r.message||"Konto zostało utworzone. Sprawdź pocztę, aby je aktywować."}catch(r){t.value=I(r)}finally{p.value=!1}}return(r,e)=>{const b=B("router-link");return i(),o("div",M,[e[12]||(e[12]=s("header",{class:"page-head"},[s("span",{class:"eyebrow"},"BM II° · UWr"),s("h1",null,"Załóż konto")],-1)),k.value?(i(),o("div",h,[s("p",S,n(k.value),1),_(b,{class:"btn",to:"/logowanie"},{default:g(()=>[...e[5]||(e[5]=[x("Przejdź do logowania",-1)])]),_:1})])):(i(),o("form",{key:1,onSubmit:j(U,["prevent"]),novalidate:""},[t.value?.message?(i(),o("div",Z,n(t.value.message),1)):u("",!0),s("div",A,[e[6]||(e[6]=s("label",{for:"name"},"Imię",-1)),d(s("input",{id:"name","onUpdate:modelValue":e[0]||(e[0]=a=>v.value=a),type:"text",autocomplete:"given-name",required:""},null,512),[[m,v.value]]),t.value?.fields.name?(i(),o("p",D,n(t.value.fields.name),1)):u("",!0)]),s("div",E,[e[7]||(e[7]=s("label",{for:"surname"},"Nazwisko",-1)),d(s("input",{id:"surname","onUpdate:modelValue":e[1]||(e[1]=a=>f.value=a),type:"text",autocomplete:"family-name",required:""},null,512),[[m,f.value]]),t.value?.fields.surname?(i(),o("p",P,n(t.value.fields.surname),1)):u("",!0)]),s("div",R,[e[8]||(e[8]=s("label",{for:"email"},"Adres e-mail",-1)),d(s("input",{id:"email","onUpdate:modelValue":e[2]||(e[2]=a=>w.value=a),type:"email",autocomplete:"email",inputmode:"email",required:""},null,512),[[m,w.value]]),t.value?.fields.email?(i(),o("p",T,n(t.value.fields.email),1)):u("",!0)]),s("div",H,[e[9]||(e[9]=s("label",{for:"password"},"Hasło (min. 8 znaków)",-1)),d(s("input",{id:"password","onUpdate:modelValue":e[3]||(e[3]=a=>c.value=a),type:"password",autocomplete:"new-password",required:""},null,512),[[m,c.value]]),t.value?.fields.password?(i(),o("p",K,n(t.value.fields.password),1)):u("",!0)]),s("div",W,[e[10]||(e[10]=s("label",{for:"confirmation"},"Powtórz hasło",-1)),d(s("input",{id:"confirmation","onUpdate:modelValue":e[4]||(e[4]=a=>y.value=a),type:"password",autocomplete:"new-password",required:""},null,512),[[m,y.value]])]),s("button",{class:"btn primary block",type:"submit",disabled:p.value},n(p.value?"Zakładanie…":"Załóż konto"),9,F)],32)),s("div",G,[_(b,{to:"/logowanie"},{default:g(()=>[...e[11]||(e[11]=[x("Mam już konto",-1)])]),_:1})])])}}});export{Q as default}; diff --git a/public/assets/ResetView--PDlpYxp.js b/public/assets/ResetView-CoTvMDNZ.js similarity index 97% rename from public/assets/ResetView--PDlpYxp.js rename to public/assets/ResetView-CoTvMDNZ.js index 656ac83..666f788 100644 --- a/public/assets/ResetView--PDlpYxp.js +++ b/public/assets/ResetView-CoTvMDNZ.js @@ -1 +1 @@ -import{d as _,r as t,c as a,b as o,i as g,j as x,h as V,t as m,f as v,e as q,w as c,v as f,k as z,l as N,n as l,p as h,a as B}from"./index-CtNAsql9.js";import{f as C}from"./forms-CHet_2fA.js";const U={class:"auth"},M={key:0,class:"stack"},Z={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},j={key:1,class:"field"},D={class:"field"},E={key:0,class:"error-text"},I={class:"field"},P=["disabled"],A=_({__name:"ResetView",setup(R){const u=z(),i=t(typeof u.query.code=="string"?u.query.code:""),n=t(""),p=t(""),d=t(!1),w=t(!1),s=t(null);async function b(){d.value=!0,s.value=null;try{await B.resetPassword({code:i.value.trim(),password:n.value,password_confirmation:p.value}),w.value=!0}catch(y){s.value=C(y)}finally{d.value=!1}}return(y,e)=>{const k=N("router-link");return l(),a("div",U,[e[8]||(e[8]=o("header",{class:"page-head"},[o("span",{class:"eyebrow"},"BM II° · UWr"),o("h1",null,"Nowe hasło")],-1)),w.value?(l(),a("div",M,[e[4]||(e[4]=o("p",{class:"notice",role:"status"},"Hasło zostało zmienione.",-1)),g(k,{class:"btn primary",to:"/logowanie"},{default:x(()=>[...e[3]||(e[3]=[h("Zaloguj się",-1)])]),_:1})])):(l(),a("form",{key:1,onSubmit:V(b,["prevent"]),novalidate:""},[s.value?.message?(l(),a("div",Z,m(s.value.message),1)):v("",!0),q(u).query.code?v("",!0):(l(),a("div",j,[e[5]||(e[5]=o("label",{for:"code"},"Kod z wiadomości",-1)),c(o("input",{id:"code","onUpdate:modelValue":e[0]||(e[0]=r=>i.value=r),type:"text",autocomplete:"one-time-code",required:""},null,512),[[f,i.value]])])),o("div",D,[e[6]||(e[6]=o("label",{for:"password"},"Nowe hasło (min. 8 znaków)",-1)),c(o("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=r=>n.value=r),type:"password",autocomplete:"new-password",required:""},null,512),[[f,n.value]]),s.value?.fields.password?(l(),a("p",E,m(s.value.fields.password),1)):v("",!0)]),o("div",I,[e[7]||(e[7]=o("label",{for:"confirmation"},"Powtórz hasło",-1)),c(o("input",{id:"confirmation","onUpdate:modelValue":e[2]||(e[2]=r=>p.value=r),type:"password",autocomplete:"new-password",required:""},null,512),[[f,p.value]])]),o("button",{class:"btn primary block",type:"submit",disabled:d.value||!i.value||!n.value},m(d.value?"Zapisywanie…":"Zapisz hasło"),9,P)],32))])}}});export{A as default}; +import{d as _,r as t,c as a,b as o,i as g,j as x,h as V,t as m,f as v,e as q,w as c,v as f,k as z,l as N,n as l,p as h,a as B}from"./index-BhVKyY57.js";import{f as C}from"./forms-CbFOvcno.js";const U={class:"auth"},M={key:0,class:"stack"},Z={key:0,class:"notice error",role:"alert",style:{"margin-bottom":"14px"}},j={key:1,class:"field"},D={class:"field"},E={key:0,class:"error-text"},I={class:"field"},P=["disabled"],A=_({__name:"ResetView",setup(R){const u=z(),i=t(typeof u.query.code=="string"?u.query.code:""),n=t(""),p=t(""),d=t(!1),w=t(!1),s=t(null);async function b(){d.value=!0,s.value=null;try{await B.resetPassword({code:i.value.trim(),password:n.value,password_confirmation:p.value}),w.value=!0}catch(y){s.value=C(y)}finally{d.value=!1}}return(y,e)=>{const k=N("router-link");return l(),a("div",U,[e[8]||(e[8]=o("header",{class:"page-head"},[o("span",{class:"eyebrow"},"BM II° · UWr"),o("h1",null,"Nowe hasło")],-1)),w.value?(l(),a("div",M,[e[4]||(e[4]=o("p",{class:"notice",role:"status"},"Hasło zostało zmienione.",-1)),g(k,{class:"btn primary",to:"/logowanie"},{default:x(()=>[...e[3]||(e[3]=[h("Zaloguj się",-1)])]),_:1})])):(l(),a("form",{key:1,onSubmit:V(b,["prevent"]),novalidate:""},[s.value?.message?(l(),a("div",Z,m(s.value.message),1)):v("",!0),q(u).query.code?v("",!0):(l(),a("div",j,[e[5]||(e[5]=o("label",{for:"code"},"Kod z wiadomości",-1)),c(o("input",{id:"code","onUpdate:modelValue":e[0]||(e[0]=r=>i.value=r),type:"text",autocomplete:"one-time-code",required:""},null,512),[[f,i.value]])])),o("div",D,[e[6]||(e[6]=o("label",{for:"password"},"Nowe hasło (min. 8 znaków)",-1)),c(o("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=r=>n.value=r),type:"password",autocomplete:"new-password",required:""},null,512),[[f,n.value]]),s.value?.fields.password?(l(),a("p",E,m(s.value.fields.password),1)):v("",!0)]),o("div",I,[e[7]||(e[7]=o("label",{for:"confirmation"},"Powtórz hasło",-1)),c(o("input",{id:"confirmation","onUpdate:modelValue":e[2]||(e[2]=r=>p.value=r),type:"password",autocomplete:"new-password",required:""},null,512),[[f,p.value]])]),o("button",{class:"btn primary block",type:"submit",disabled:d.value||!i.value||!n.value},m(d.value?"Zapisywanie…":"Zapisz hasło"),9,P)],32))])}}});export{A as default}; diff --git a/public/assets/ScheduleView-CKanhHpE.js b/public/assets/ScheduleView-DVY5GWjq.js similarity index 93% rename from public/assets/ScheduleView-CKanhHpE.js rename to public/assets/ScheduleView-DVY5GWjq.js index a17bada..84df1b3 100644 --- a/public/assets/ScheduleView-CKanhHpE.js +++ b/public/assets/ScheduleView-DVY5GWjq.js @@ -1 +1 @@ -import{d as F,n as s,c as t,C as B,b as o,p as N,t as l,e as r,a6 as R,i as z,j as K,ah as L,f as y,l as P,ae as T,o as I,am as Z,r as A,U as H,k as J,x as v,F as f,E as C,D as V,J as q,K as E,ag as O,s as U,m as W,y as G,I as Q}from"./index-CtNAsql9.js";import{_ as X}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{_ as Y}from"./LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js";import{_ as ee}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-DxZMSXIh.js";import{u as se}from"./scrollToHash-B7Lws5_Z.js";const te=["id"],ne={class:"time"},ae={class:"name"},oe={class:"meta"},le={key:0},ie={key:1,class:"lecturer"},re={key:2,class:"badge online"},ue={key:3,class:"badge onsite"},ce={key:4,class:"mono"},de={key:0,class:"note"},me=F({__name:"SessionCard",props:{session:{},showDay:{}},setup(n){return(u,h)=>{const g=P("router-link");return s(),t("article",{id:`zajecia-${n.session.id}`,class:B(["session",{online:n.session.is_online}])},[o("div",ne,[N(l(r(R)(n.session.starts_at))+" ",1),o("span",null,l(r(R)(n.session.ends_at)),1)]),o("div",null,[o("div",ae,[z(g,{to:`/przedmioty/${n.session.course_id}`,style:{color:"inherit","text-decoration":"none"}},{default:K(()=>[N(l(n.session.course.name),1)]),_:1},8,["to"])]),o("div",oe,[o("span",null,l(r(L)[n.session.course.form]),1),n.session.kind?(s(),t("span",le,"· "+l(n.session.kind),1)):y("",!0),n.session.lecturer||n.session.course.lecturer?(s(),t("span",ie,"· "+l(n.session.lecturer||n.session.course.lecturer),1)):y("",!0),n.session.is_online?(s(),t("span",re,"online")):n.session.room?(s(),t("span",ue,"sala "+l(n.session.room),1)):y("",!0),n.showDay?(s(),t("span",ce,l(n.showDay),1)):y("",!0)]),n.session.notes?(s(),t("div",de,l(n.session.notes),1)):y("",!0)])],10,te)}}}),ve={"aria-label":"Wybór zjazdu"},ye={class:"chips"},be=["aria-pressed","aria-current","title","onClick"],_e=["aria-label"],he={class:"meeting-bar","aria-live":"polite"},ke={key:1,class:"badge solid"},fe={key:2,class:"badge alert"},ze={key:0,class:"notice",style:{"margin-bottom":"16px"}},ge=["aria-label"],pe={class:"day-head"},je={key:2,class:"empty"},$e={class:"btn-row",style:{"margin-top":"18px","justify-content":"space-between"}},we=["disabled"],xe=["disabled"],Ce={key:1,class:"empty"},Re=F({__name:"ScheduleView",setup(n){const u=T(),h=J(),g=W();I(()=>{Promise.all([u.loadMeetings(),u.loadSchedule(),u.loadCourses()])});const m=v(()=>u.meetings??[]),p=Z(),S=v(()=>m.value.find(a=>a.starts_on<=p&&p<=a.ends_on)??null),D=v(()=>m.value.find(a=>a.starts_on>p)??null),k=A(Number(h.query.zjazd)||null),j=v(()=>k.value??S.value?.number??D.value?.number??m.value.at(-1)?.number??null),c=v(()=>m.value.find(a=>a.number===j.value)??null),b=v(()=>m.value.findIndex(a=>a.number===j.value));function $(a){k.value=a,g.replace({query:{...h.query,zjazd:String(a)}})}H(()=>h.query.zjazd,a=>{const i=Number(a);i&&i!==k.value&&(k.value=i)});const w=v(()=>{const a=c.value;if(!a)return[];const i=new Map;for(const e of u.schedule){if(e.meeting_id!==a.id)continue;const d=G(e.starts_at);i.set(d,[...i.get(d)??[],e])}return[...i].sort(([e],[d])=>e.localeCompare(d)).map(([e,d])=>({key:e,sessions:d}))}),x=v(()=>Q(c.value?.notes)),_=a=>S.value?.number===a?"current":D.value?.number===a?"next":"",M=v(()=>u.loaded.meetings&&u.loaded.schedule&&u.loaded.courses);return se(M),(a,i)=>(s(),t("div",null,[z(X,{eyebrow:"Zjazdy",title:"Plan zajęć"}),z(Y,{ready:M.value,error:r(u).error,onRetry:i[2]||(i[2]=e=>r(u).retry())},{default:K(()=>[z(ee),o("nav",ve,[o("div",ye,[(s(!0),t(f,null,C(m.value,e=>(s(),t("button",{key:e.id,class:"chip",type:"button","aria-pressed":e.number===j.value,"aria-current":_(e.number)==="current"?"date":void 0,title:r(V)(e.starts_on,e.ends_on),onClick:d=>$(e.number)},[N(l(e.number),1),_(e.number)?(s(),t("span",{key:0,class:"dot","aria-label":_(e.number)==="current"?"trwa":"najbliższy"},null,8,_e)):y("",!0)],8,be))),128))])]),c.value?(s(),t(f,{key:0},[o("section",he,[o("h2",null,"Zjazd "+l(c.value.number),1),o("span",null,l(r(V)(c.value.starts_on,c.value.ends_on)),1),x.value?(s(),t("span",{key:0,class:B(["badge",x.value==="online"?"online":"onsite"])},l(x.value),3)):y("",!0),_(c.value.number)==="current"?(s(),t("span",ke,"trwa teraz")):_(c.value.number)==="next"?(s(),t("span",fe,"najbliższy")):y("",!0)]),r(q)(c.value.notes)?(s(),t("p",ze,l(r(q)(c.value.notes)),1)):y("",!0),w.value.length?(s(),t("div",{key:1,class:B(["days",{two:w.value.length===2}])},[(s(!0),t(f,null,C(w.value,e=>(s(),t("section",{key:e.key,"aria-label":r(E)(e.sessions[0].starts_at)},[o("div",pe,[o("span",null,l(r(E)(e.sessions[0].starts_at)),1),o("span",null,l(r(O)(e.sessions.length,"zajęcia","zajęcia","zajęć")),1)]),(s(!0),t(f,null,C(e.sessions,d=>(s(),U(me,{key:d.id,session:d},null,8,["session"]))),128))],8,ge))),128))],2)):(s(),t("p",je,"Brak zajęć w tym zjeździe (może należą do ukrytych alternatyw).")),o("div",$e,[o("button",{class:"btn small",type:"button",disabled:b.value<=0,onClick:i[0]||(i[0]=e=>$(m.value[b.value-1].number))},"← Poprzedni zjazd",8,we),o("button",{class:"btn small",type:"button",disabled:b.value<0||b.value>=m.value.length-1,onClick:i[1]||(i[1]=e=>$(m.value[b.value+1].number))},"Następny zjazd →",8,xe)])],64)):(s(),t("p",Ce,"Brak zjazdów."))]),_:1},8,["ready","error"])]))}});export{Re as default}; +import{d as F,n as s,c as t,C as B,b as o,p as N,t as l,e as r,a6 as R,i as z,j as K,ah as L,f as y,l as P,ae as T,o as I,am as Z,r as A,U as H,k as J,x as v,F as f,E as C,D as V,J as q,K as E,ag as O,s as U,m as W,y as G,I as Q}from"./index-BhVKyY57.js";import{_ as X}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{_ as Y}from"./LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js";import{_ as ee}from"./ElectiveBar.vue_vue_type_script_setup_true_lang-05LZv84e.js";import{u as se}from"./scrollToHash-DSRl5dJ4.js";const te=["id"],ne={class:"time"},ae={class:"name"},oe={class:"meta"},le={key:0},ie={key:1,class:"lecturer"},re={key:2,class:"badge online"},ue={key:3,class:"badge onsite"},ce={key:4,class:"mono"},de={key:0,class:"note"},me=F({__name:"SessionCard",props:{session:{},showDay:{}},setup(n){return(u,h)=>{const g=P("router-link");return s(),t("article",{id:`zajecia-${n.session.id}`,class:B(["session",{online:n.session.is_online}])},[o("div",ne,[N(l(r(R)(n.session.starts_at))+" ",1),o("span",null,l(r(R)(n.session.ends_at)),1)]),o("div",null,[o("div",ae,[z(g,{to:`/przedmioty/${n.session.course_id}`,style:{color:"inherit","text-decoration":"none"}},{default:K(()=>[N(l(n.session.course.name),1)]),_:1},8,["to"])]),o("div",oe,[o("span",null,l(r(L)[n.session.course.form]),1),n.session.kind?(s(),t("span",le,"· "+l(n.session.kind),1)):y("",!0),n.session.lecturer||n.session.course.lecturer?(s(),t("span",ie,"· "+l(n.session.lecturer||n.session.course.lecturer),1)):y("",!0),n.session.is_online?(s(),t("span",re,"online")):n.session.room?(s(),t("span",ue,"sala "+l(n.session.room),1)):y("",!0),n.showDay?(s(),t("span",ce,l(n.showDay),1)):y("",!0)]),n.session.notes?(s(),t("div",de,l(n.session.notes),1)):y("",!0)])],10,te)}}}),ve={"aria-label":"Wybór zjazdu"},ye={class:"chips"},be=["aria-pressed","aria-current","title","onClick"],_e=["aria-label"],he={class:"meeting-bar","aria-live":"polite"},ke={key:1,class:"badge solid"},fe={key:2,class:"badge alert"},ze={key:0,class:"notice",style:{"margin-bottom":"16px"}},ge=["aria-label"],pe={class:"day-head"},je={key:2,class:"empty"},$e={class:"btn-row",style:{"margin-top":"18px","justify-content":"space-between"}},we=["disabled"],xe=["disabled"],Ce={key:1,class:"empty"},Re=F({__name:"ScheduleView",setup(n){const u=T(),h=J(),g=W();I(()=>{Promise.all([u.loadMeetings(),u.loadSchedule(),u.loadCourses()])});const m=v(()=>u.meetings??[]),p=Z(),S=v(()=>m.value.find(a=>a.starts_on<=p&&p<=a.ends_on)??null),D=v(()=>m.value.find(a=>a.starts_on>p)??null),k=A(Number(h.query.zjazd)||null),j=v(()=>k.value??S.value?.number??D.value?.number??m.value.at(-1)?.number??null),c=v(()=>m.value.find(a=>a.number===j.value)??null),b=v(()=>m.value.findIndex(a=>a.number===j.value));function $(a){k.value=a,g.replace({query:{...h.query,zjazd:String(a)}})}H(()=>h.query.zjazd,a=>{const i=Number(a);i&&i!==k.value&&(k.value=i)});const w=v(()=>{const a=c.value;if(!a)return[];const i=new Map;for(const e of u.schedule){if(e.meeting_id!==a.id)continue;const d=G(e.starts_at);i.set(d,[...i.get(d)??[],e])}return[...i].sort(([e],[d])=>e.localeCompare(d)).map(([e,d])=>({key:e,sessions:d}))}),x=v(()=>Q(c.value?.notes)),_=a=>S.value?.number===a?"current":D.value?.number===a?"next":"",M=v(()=>u.loaded.meetings&&u.loaded.schedule&&u.loaded.courses);return se(M),(a,i)=>(s(),t("div",null,[z(X,{eyebrow:"Zjazdy",title:"Plan zajęć"}),z(Y,{ready:M.value,error:r(u).error,onRetry:i[2]||(i[2]=e=>r(u).retry())},{default:K(()=>[z(ee),o("nav",ve,[o("div",ye,[(s(!0),t(f,null,C(m.value,e=>(s(),t("button",{key:e.id,class:"chip",type:"button","aria-pressed":e.number===j.value,"aria-current":_(e.number)==="current"?"date":void 0,title:r(V)(e.starts_on,e.ends_on),onClick:d=>$(e.number)},[N(l(e.number),1),_(e.number)?(s(),t("span",{key:0,class:"dot","aria-label":_(e.number)==="current"?"trwa":"najbliższy"},null,8,_e)):y("",!0)],8,be))),128))])]),c.value?(s(),t(f,{key:0},[o("section",he,[o("h2",null,"Zjazd "+l(c.value.number),1),o("span",null,l(r(V)(c.value.starts_on,c.value.ends_on)),1),x.value?(s(),t("span",{key:0,class:B(["badge",x.value==="online"?"online":"onsite"])},l(x.value),3)):y("",!0),_(c.value.number)==="current"?(s(),t("span",ke,"trwa teraz")):_(c.value.number)==="next"?(s(),t("span",fe,"najbliższy")):y("",!0)]),r(q)(c.value.notes)?(s(),t("p",ze,l(r(q)(c.value.notes)),1)):y("",!0),w.value.length?(s(),t("div",{key:1,class:B(["days",{two:w.value.length===2}])},[(s(!0),t(f,null,C(w.value,e=>(s(),t("section",{key:e.key,"aria-label":r(E)(e.sessions[0].starts_at)},[o("div",pe,[o("span",null,l(r(E)(e.sessions[0].starts_at)),1),o("span",null,l(r(O)(e.sessions.length,"zajęcia","zajęcia","zajęć")),1)]),(s(!0),t(f,null,C(e.sessions,d=>(s(),U(me,{key:d.id,session:d},null,8,["session"]))),128))],8,ge))),128))],2)):(s(),t("p",je,"Brak zajęć w tym zjeździe (może należą do ukrytych alternatyw).")),o("div",$e,[o("button",{class:"btn small",type:"button",disabled:b.value<=0,onClick:i[0]||(i[0]=e=>$(m.value[b.value-1].number))},"← Poprzedni zjazd",8,we),o("button",{class:"btn small",type:"button",disabled:b.value<0||b.value>=m.value.length-1,onClick:i[1]||(i[1]=e=>$(m.value[b.value+1].number))},"Następny zjazd →",8,xe)])],64)):(s(),t("p",Ce,"Brak zjazdów."))]),_:1},8,["ready","error"])]))}});export{Re as default}; diff --git a/public/assets/SpeakerTools-CXKjSgrG.js b/public/assets/SpeakerTools-Cyk_e6w-.js similarity index 98% rename from public/assets/SpeakerTools-CXKjSgrG.js rename to public/assets/SpeakerTools-Cyk_e6w-.js index 5c9a4ab..168654e 100644 --- a/public/assets/SpeakerTools-CXKjSgrG.js +++ b/public/assets/SpeakerTools-Cyk_e6w-.js @@ -1 +1 @@ -import{d as y,n as i,c as d,b as l,w as g,av as c,C as s,t as a,p as n,f as r,F as v}from"./index-CtNAsql9.js";const p={key:0,class:"tools",role:"group","aria-label":"Sterowanie prezentacją"},C={class:"tools-group"},j=["disabled","title"],P={class:"tools-group"},z=["aria-pressed"],m=["aria-pressed"],w=["aria-pressed"],$=["aria-pressed"],S={class:"tools-group tools-end"},F={key:0,class:"tools-pilot",role:"status",title:"Telefon steruje tą kartą"},T={key:1,class:"tools-pilot elsewhere",role:"status",title:"Kliknij tę kartę albo naciśnij klawisz, aby przejąć pilota"},f=["aria-pressed"],B=["aria-pressed"],H=["disabled"],x="Zegar ruszy przy pierwszej zmianie slajdu",k="Klik lub T: pauza · R: zeruj · C: schowaj",O=y({__name:"SpeakerTools",props:{clock:{},panel:{},special:{type:Boolean},hasSpecial:{type:Boolean},fullscreenEnabled:{type:Boolean},fullscreenOn:{type:Boolean},toolbarHidden:{type:Boolean},togglePanel:{type:Function},toggleSpecial:{type:Function},toggleToolbar:{type:Function},toggleFullscreen:{type:Function},light:{type:Boolean},toggleScheme:{type:Function},exportPptx:{type:Function},exporting:{type:Boolean},pilot:{}},emits:["pause","reset","toggleHidden","close"],setup(e,{emit:b}){const u=b;return(Z,t)=>(i(),d(v,null,[e.toolbarHidden?r("",!0):(i(),d("div",p,[l("div",C,[g(l("button",{id:"speaker-clock",type:"button",class:s(["docked",{paused:e.clock.paused}]),title:k,"aria-label":"Zegar prelegenta",onClick:t[0]||(t[0]=o=>u("pause"))},[t[15]||(t[15]=l("span",null,"slajd",-1)),l("b",{class:s(["clk-slide",{over:e.clock.slideOver}])},a(e.clock.slide),3),t[16]||(t[16]=l("span",null,"całość",-1)),l("b",{class:s(["clk-total",{over:e.clock.totalOver}])},a(e.clock.total),3),l("span",{class:s(["clk-pace",{late:e.clock.late}])},a(e.clock.pace),3)],2),[[c,!e.clock.hidden]]),l("button",{type:"button","aria-keyshortcuts":"T",disabled:e.clock.idle,title:e.clock.idle?x:void 0,onClick:t[1]||(t[1]=o=>u("pause"))},[n(a(e.clock.paused?"Wznów":"Pauza")+" ",1),t[17]||(t[17]=l("kbd",null,"T",-1))],8,j),l("button",{type:"button","aria-keyshortcuts":"R",onClick:t[2]||(t[2]=o=>u("reset"))},[...t[18]||(t[18]=[n(" Zeruj ",-1),l("kbd",null,"R",-1)])]),l("button",{type:"button","aria-keyshortcuts":"C",onClick:t[3]||(t[3]=o=>u("toggleHidden"))},[n(a(e.clock.hidden?"Pokaż zegar":"Ukryj zegar")+" ",1),t[19]||(t[19]=l("kbd",null,"C",-1))])]),l("div",P,[l("button",{type:"button","aria-pressed":e.panel==="say","aria-keyshortcuts":"P",onClick:t[4]||(t[4]=o=>e.togglePanel("say"))},[...t[20]||(t[20]=[n(" Powiedz ",-1),l("kbd",null,"P",-1)])],8,z),l("button",{type:"button","aria-pressed":e.panel==="notes","aria-keyshortcuts":"N",onClick:t[5]||(t[5]=o=>e.togglePanel("notes"))},[...t[21]||(t[21]=[n(" Notatki ",-1),l("kbd",null,"N",-1)])],8,m),l("button",{type:"button","aria-pressed":e.panel==="srcs","aria-keyshortcuts":"Z",onClick:t[6]||(t[6]=o=>e.togglePanel("srcs"))},[...t[22]||(t[22]=[n(" Źródła ",-1),l("kbd",null,"Z",-1)])],8,w),l("button",{type:"button",class:s(["tool-s",{unavailable:!e.hasSpecial}]),"aria-pressed":e.special,"aria-keyshortcuts":"S",onClick:t[7]||(t[7]=o=>e.toggleSpecial())},[...t[23]||(t[23]=[n(" Slajd specjalny ",-1),l("kbd",null,"S",-1)])],10,$)]),l("div",S,[e.pilot==="active"?(i(),d("span",F,[...t[24]||(t[24]=[l("i",{class:"tools-pilot-dot","aria-hidden":"true"},null,-1),n("Pilot",-1)])])):e.pilot==="elsewhere"?(i(),d("span",T,"Pilot steruje inną kartą")):r("",!0),l("button",{type:"button","aria-pressed":e.light,"aria-keyshortcuts":"J",onClick:t[8]||(t[8]=o=>e.toggleScheme())},[...t[25]||(t[25]=[n(" Jasny ",-1),l("kbd",null,"J",-1)])],8,f),e.fullscreenEnabled?(i(),d("button",{key:2,type:"button","aria-pressed":e.fullscreenOn,"aria-keyshortcuts":"F",onClick:t[9]||(t[9]=o=>e.toggleFullscreen())},[...t[26]||(t[26]=[n(" Pełny ekran ",-1),l("kbd",null,"F",-1)])],8,B)):r("",!0),l("button",{type:"button",disabled:e.exporting,title:"Pobierz jako PowerPoint: slajd jako obraz, Powiedz i notatki w notatkach prelegenta",onClick:t[10]||(t[10]=o=>e.exportPptx())}," PPTX ",8,H),l("button",{type:"button","aria-keyshortcuts":"H",onClick:t[11]||(t[11]=o=>e.toggleToolbar())},[...t[27]||(t[27]=[n(" Ukryj pasek ",-1),l("kbd",null,"H",-1)])]),l("button",{type:"button",onClick:t[12]||(t[12]=o=>u("close"))},"Zamknij")])])),e.toolbarHidden&&!e.clock.hidden?(i(),d("button",{key:1,id:"speaker-clock",type:"button",class:s(["floating",{paused:e.clock.paused}]),title:k,"aria-label":"Zegar prelegenta",onClick:t[13]||(t[13]=o=>u("pause"))},[t[28]||(t[28]=l("span",null,"slajd",-1)),l("b",{class:s(["clk-slide",{over:e.clock.slideOver}])},a(e.clock.slide),3),t[29]||(t[29]=l("span",null,"całość",-1)),l("b",{class:s(["clk-total",{over:e.clock.totalOver}])},a(e.clock.total),3),l("span",{class:s(["clk-pace",{late:e.clock.late}])},a(e.clock.pace),3)],2)):r("",!0),e.toolbarHidden?(i(),d("button",{key:2,type:"button",class:"tools-show","aria-keyshortcuts":"H",onClick:t[14]||(t[14]=o=>e.toggleToolbar())},[...t[30]||(t[30]=[n(" Pokaż pasek ",-1),l("kbd",null,"H",-1)])])):r("",!0)],64))}});export{O as default}; +import{d as y,n as i,c as d,b as l,w as g,av as c,C as s,t as a,p as n,f as r,F as v}from"./index-BhVKyY57.js";const p={key:0,class:"tools",role:"group","aria-label":"Sterowanie prezentacją"},C={class:"tools-group"},j=["disabled","title"],P={class:"tools-group"},z=["aria-pressed"],m=["aria-pressed"],w=["aria-pressed"],$=["aria-pressed"],S={class:"tools-group tools-end"},F={key:0,class:"tools-pilot",role:"status",title:"Telefon steruje tą kartą"},T={key:1,class:"tools-pilot elsewhere",role:"status",title:"Kliknij tę kartę albo naciśnij klawisz, aby przejąć pilota"},f=["aria-pressed"],B=["aria-pressed"],H=["disabled"],x="Zegar ruszy przy pierwszej zmianie slajdu",k="Klik lub T: pauza · R: zeruj · C: schowaj",O=y({__name:"SpeakerTools",props:{clock:{},panel:{},special:{type:Boolean},hasSpecial:{type:Boolean},fullscreenEnabled:{type:Boolean},fullscreenOn:{type:Boolean},toolbarHidden:{type:Boolean},togglePanel:{type:Function},toggleSpecial:{type:Function},toggleToolbar:{type:Function},toggleFullscreen:{type:Function},light:{type:Boolean},toggleScheme:{type:Function},exportPptx:{type:Function},exporting:{type:Boolean},pilot:{}},emits:["pause","reset","toggleHidden","close"],setup(e,{emit:b}){const u=b;return(Z,t)=>(i(),d(v,null,[e.toolbarHidden?r("",!0):(i(),d("div",p,[l("div",C,[g(l("button",{id:"speaker-clock",type:"button",class:s(["docked",{paused:e.clock.paused}]),title:k,"aria-label":"Zegar prelegenta",onClick:t[0]||(t[0]=o=>u("pause"))},[t[15]||(t[15]=l("span",null,"slajd",-1)),l("b",{class:s(["clk-slide",{over:e.clock.slideOver}])},a(e.clock.slide),3),t[16]||(t[16]=l("span",null,"całość",-1)),l("b",{class:s(["clk-total",{over:e.clock.totalOver}])},a(e.clock.total),3),l("span",{class:s(["clk-pace",{late:e.clock.late}])},a(e.clock.pace),3)],2),[[c,!e.clock.hidden]]),l("button",{type:"button","aria-keyshortcuts":"T",disabled:e.clock.idle,title:e.clock.idle?x:void 0,onClick:t[1]||(t[1]=o=>u("pause"))},[n(a(e.clock.paused?"Wznów":"Pauza")+" ",1),t[17]||(t[17]=l("kbd",null,"T",-1))],8,j),l("button",{type:"button","aria-keyshortcuts":"R",onClick:t[2]||(t[2]=o=>u("reset"))},[...t[18]||(t[18]=[n(" Zeruj ",-1),l("kbd",null,"R",-1)])]),l("button",{type:"button","aria-keyshortcuts":"C",onClick:t[3]||(t[3]=o=>u("toggleHidden"))},[n(a(e.clock.hidden?"Pokaż zegar":"Ukryj zegar")+" ",1),t[19]||(t[19]=l("kbd",null,"C",-1))])]),l("div",P,[l("button",{type:"button","aria-pressed":e.panel==="say","aria-keyshortcuts":"P",onClick:t[4]||(t[4]=o=>e.togglePanel("say"))},[...t[20]||(t[20]=[n(" Powiedz ",-1),l("kbd",null,"P",-1)])],8,z),l("button",{type:"button","aria-pressed":e.panel==="notes","aria-keyshortcuts":"N",onClick:t[5]||(t[5]=o=>e.togglePanel("notes"))},[...t[21]||(t[21]=[n(" Notatki ",-1),l("kbd",null,"N",-1)])],8,m),l("button",{type:"button","aria-pressed":e.panel==="srcs","aria-keyshortcuts":"Z",onClick:t[6]||(t[6]=o=>e.togglePanel("srcs"))},[...t[22]||(t[22]=[n(" Źródła ",-1),l("kbd",null,"Z",-1)])],8,w),l("button",{type:"button",class:s(["tool-s",{unavailable:!e.hasSpecial}]),"aria-pressed":e.special,"aria-keyshortcuts":"S",onClick:t[7]||(t[7]=o=>e.toggleSpecial())},[...t[23]||(t[23]=[n(" Slajd specjalny ",-1),l("kbd",null,"S",-1)])],10,$)]),l("div",S,[e.pilot==="active"?(i(),d("span",F,[...t[24]||(t[24]=[l("i",{class:"tools-pilot-dot","aria-hidden":"true"},null,-1),n("Pilot",-1)])])):e.pilot==="elsewhere"?(i(),d("span",T,"Pilot steruje inną kartą")):r("",!0),l("button",{type:"button","aria-pressed":e.light,"aria-keyshortcuts":"J",onClick:t[8]||(t[8]=o=>e.toggleScheme())},[...t[25]||(t[25]=[n(" Jasny ",-1),l("kbd",null,"J",-1)])],8,f),e.fullscreenEnabled?(i(),d("button",{key:2,type:"button","aria-pressed":e.fullscreenOn,"aria-keyshortcuts":"F",onClick:t[9]||(t[9]=o=>e.toggleFullscreen())},[...t[26]||(t[26]=[n(" Pełny ekran ",-1),l("kbd",null,"F",-1)])],8,B)):r("",!0),l("button",{type:"button",disabled:e.exporting,title:"Pobierz jako PowerPoint: slajd jako obraz, Powiedz i notatki w notatkach prelegenta",onClick:t[10]||(t[10]=o=>e.exportPptx())}," PPTX ",8,H),l("button",{type:"button","aria-keyshortcuts":"H",onClick:t[11]||(t[11]=o=>e.toggleToolbar())},[...t[27]||(t[27]=[n(" Ukryj pasek ",-1),l("kbd",null,"H",-1)])]),l("button",{type:"button",onClick:t[12]||(t[12]=o=>u("close"))},"Zamknij")])])),e.toolbarHidden&&!e.clock.hidden?(i(),d("button",{key:1,id:"speaker-clock",type:"button",class:s(["floating",{paused:e.clock.paused}]),title:k,"aria-label":"Zegar prelegenta",onClick:t[13]||(t[13]=o=>u("pause"))},[t[28]||(t[28]=l("span",null,"slajd",-1)),l("b",{class:s(["clk-slide",{over:e.clock.slideOver}])},a(e.clock.slide),3),t[29]||(t[29]=l("span",null,"całość",-1)),l("b",{class:s(["clk-total",{over:e.clock.totalOver}])},a(e.clock.total),3),l("span",{class:s(["clk-pace",{late:e.clock.late}])},a(e.clock.pace),3)],2)):r("",!0),e.toolbarHidden?(i(),d("button",{key:2,type:"button",class:"tools-show","aria-keyshortcuts":"H",onClick:t[14]||(t[14]=o=>e.toggleToolbar())},[...t[30]||(t[30]=[n(" Pokaż pasek ",-1),l("kbd",null,"H",-1)])])):r("",!0)],64))}});export{O as default}; diff --git a/public/assets/SyllabiView-ar5JWjDo.js b/public/assets/SyllabiView-CyTHbJ1N.js similarity index 94% rename from public/assets/SyllabiView-ar5JWjDo.js rename to public/assets/SyllabiView-CyTHbJ1N.js index 734d164..c5e438a 100644 --- a/public/assets/SyllabiView-ar5JWjDo.js +++ b/public/assets/SyllabiView-CyTHbJ1N.js @@ -1 +1 @@ -import{_ as c}from"./PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js";import{d as y,ae as p,o as f,c as a,i as b,F as m,E as Z,x as M,n as l,b as t,t as i,f as n}from"./index-CtNAsql9.js";const B=[{file:"sylabus_2026_27-Z_26-BM-Z2-E01-AW-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-AW-PL.pdf",size:50255},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-GR-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-GR-PL.pdf",size:57715},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-KWP-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-KWP-PL.pdf",size:51902},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-PHT-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-PHT-PL.pdf",size:58646},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-TMNB-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-TMNB-PL.pdf",size:75386},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-WBM-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-WBM-PL.pdf",size:64288},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-WKM-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-WKM-PL.pdf",size:55064}],P={key:0,class:"stack"},E=["href","download"],L={class:"row-main"},h={class:"muted small",style:{margin:"0"}},z={key:0},k={key:1},w={key:1,class:"empty"},v=y({__name:"SyllabiView",setup(W){const u=p();f(()=>{u.loadCourses()});const r=/^sylabus_(\d{4})_(\d{2})-([ZL])_(.+?)-([A-Z]{2})\.pdf$/i,d=M(()=>{const o=new Map;for(const e of u.courses??[])e.code&&!o.has(e.code)&&o.set(e.code,e.name);return B.map(e=>{const s=r.exec(e.file),_=s?.[4]??null;return{...e,code:_,title:_&&o.get(_)||_||e.file,term:s?`${s[1]}/${s[2]} · ${s[3].toUpperCase()==="Z"?"zima":"lato"}`:"",kb:Math.max(1,Math.round(e.size/1024))}}).sort((e,s)=>e.title.localeCompare(s.title,"pl"))});return(o,e)=>(l(),a("div",null,[b(c,{eyebrow:"Karty przedmiotów z USOS",title:"Sylabusy"}),d.value.length?(l(),a("div",P,[(l(!0),a(m,null,Z(d.value,s=>(l(),a("a",{key:s.file,href:s.url,download:s.file,class:"card link"},[t("div",L,[t("h3",null,i(s.title),1),e[0]||(e[0]=t("span",{class:"badge"},"PDF",-1))]),t("p",h,[s.code?(l(),a("span",z,i(s.code),1)):n("",!0),s.term?(l(),a("span",k," · "+i(s.term),1)):n("",!0),t("span",null," · "+i(s.kb)+" KB",1)])],8,E))),128))])):(l(),a("p",w,"Nie ma jeszcze żadnych sylabusów."))]))}});export{v as default}; +import{_ as c}from"./PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js";import{d as y,ae as p,o as f,c as a,i as b,F as m,E as Z,x as M,n as l,b as t,t as i,f as n}from"./index-BhVKyY57.js";const B=[{file:"sylabus_2026_27-Z_26-BM-Z2-E01-AW-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-AW-PL.pdf",size:50255},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-GR-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-GR-PL.pdf",size:57715},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-KWP-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-KWP-PL.pdf",size:51902},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-PHT-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-PHT-PL.pdf",size:58646},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-TMNB-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-TMNB-PL.pdf",size:75386},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-WBM-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-WBM-PL.pdf",size:64288},{file:"sylabus_2026_27-Z_26-BM-Z2-E01-WKM-PL.pdf",url:"/sylabusy/sylabus_2026_27-Z_26-BM-Z2-E01-WKM-PL.pdf",size:55064}],P={key:0,class:"stack"},E=["href","download"],L={class:"row-main"},h={class:"muted small",style:{margin:"0"}},z={key:0},k={key:1},w={key:1,class:"empty"},v=y({__name:"SyllabiView",setup(W){const u=p();f(()=>{u.loadCourses()});const r=/^sylabus_(\d{4})_(\d{2})-([ZL])_(.+?)-([A-Z]{2})\.pdf$/i,d=M(()=>{const o=new Map;for(const e of u.courses??[])e.code&&!o.has(e.code)&&o.set(e.code,e.name);return B.map(e=>{const s=r.exec(e.file),_=s?.[4]??null;return{...e,code:_,title:_&&o.get(_)||_||e.file,term:s?`${s[1]}/${s[2]} · ${s[3].toUpperCase()==="Z"?"zima":"lato"}`:"",kb:Math.max(1,Math.round(e.size/1024))}}).sort((e,s)=>e.title.localeCompare(s.title,"pl"))});return(o,e)=>(l(),a("div",null,[b(c,{eyebrow:"Karty przedmiotów z USOS",title:"Sylabusy"}),d.value.length?(l(),a("div",P,[(l(!0),a(m,null,Z(d.value,s=>(l(),a("a",{key:s.file,href:s.url,download:s.file,class:"card link"},[t("div",L,[t("h3",null,i(s.title),1),e[0]||(e[0]=t("span",{class:"badge"},"PDF",-1))]),t("p",h,[s.code?(l(),a("span",z,i(s.code),1)):n("",!0),s.term?(l(),a("span",k," · "+i(s.term),1)):n("",!0),t("span",null," · "+i(s.kb)+" KB",1)])],8,E))),128))])):(l(),a("p",w,"Nie ma jeszcze żadnych sylabusów."))]))}});export{v as default}; diff --git a/public/assets/forms-CHet_2fA.js b/public/assets/forms-CbFOvcno.js similarity index 85% rename from public/assets/forms-CHet_2fA.js rename to public/assets/forms-CbFOvcno.js index 0a0548b..d06fa38 100644 --- a/public/assets/forms-CHet_2fA.js +++ b/public/assets/forms-CbFOvcno.js @@ -1 +1 @@ -import{A as o}from"./index-CtNAsql9.js";function a(s){if(s instanceof o){const e={};for(const[r,t]of Object.entries(s.errors))t.length&&(e[r]=t[0]);return{message:Object.keys(e).length&&Object.values(e).includes(s.message)?"":s.message,fields:e}}return{message:"Coś poszło nie tak. Spróbuj ponownie.",fields:{}}}function f(s){return typeof s=="string"&&s.startsWith("/")&&!s.startsWith("//")&&!s.startsWith("/\\")?s:"/"}export{a as f,f as s}; +import{A as o}from"./index-BhVKyY57.js";function a(s){if(s instanceof o){const e={};for(const[r,t]of Object.entries(s.errors))t.length&&(e[r]=t[0]);return{message:Object.keys(e).length&&Object.values(e).includes(s.message)?"":s.message,fields:e}}return{message:"Coś poszło nie tak. Spróbuj ponownie.",fields:{}}}function f(s){return typeof s=="string"&&s.startsWith("/")&&!s.startsWith("//")&&!s.startsWith("/\\")?s:"/"}export{a as f,f as s}; diff --git a/public/assets/index-BhVKyY57.js b/public/assets/index-BhVKyY57.js new file mode 100644 index 0000000..2221e67 --- /dev/null +++ b/public/assets/index-BhVKyY57.js @@ -0,0 +1,7 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-Ded3G-tr.js","assets/forms-CbFOvcno.js","assets/oauth-zzthF4BZ.js","assets/RegisterView-DbsIjB9v.js","assets/ForgotView-BTYOeeYh.js","assets/OAuthCallbackView-OjmWS0Rg.js","assets/OAuthRegisterView-Caz16iGt.js","assets/ResetView-CoTvMDNZ.js","assets/DashboardView-Dg7omPI2.js","assets/PageHead.vue_vue_type_script_setup_true_lang-DaSt0RSc.js","assets/LoadState.vue_vue_type_script_setup_true_lang-Dht3xUQt.js","assets/ElectiveBar.vue_vue_type_script_setup_true_lang-05LZv84e.js","assets/safeText-O-oWGdGq.js","assets/tabs-nNm7HGNT.js","assets/ScheduleView-DVY5GWjq.js","assets/scrollToHash-DSRl5dJ4.js","assets/DeadlinesView-BGDvcTFu.js","assets/CoursesView-CTFWnUtE.js","assets/CourseView-B4u4d13U.js","assets/ReadingItem.vue_vue_type_script_setup_true_lang-BLPuAInn.js","assets/ReadingsView-Ddb9B2Jf.js","assets/MaterialsView-B7ioBi_c.js","assets/materialListCache-DwqU8sxL.js","assets/MaterialView-Ccuh3g_S.js","assets/markdown-DEWb_HMw.js","assets/MaterialEditView-D5T_uu3M.js","assets/ChecklistsView-P9tat5HV.js","assets/ChecklistView-CRar4YSq.js","assets/presentations-CsatGkk7.js","assets/SyllabiView-CyTHbJ1N.js","assets/QuizzesView-BKkd8cXT.js","assets/quizzes-DYhavCsn.js","assets/QuizView-BNSrrYen.js","assets/MoreView-dMwsCkkj.js","assets/ProfileView-NWDFwDRZ.js","assets/MyPresentationsView-CqFZqvMF.js","assets/PresentationSpeakerView-Bs2NSw6o.js","assets/DeckViewer.vue_vue_type_style_index_0_lang-CR_mIh7U.js","assets/engine-DDeQk6Ow.js","assets/engine-D54I7Duj.css","assets/DeckViewer-44NpA3H-.css","assets/clock-4r1aA6KU.js","assets/remote-aOKX75Mt.js","assets/PresentationSpeakerView-B_k_BZvQ.css","assets/PresentationRemoteView-DV7C-xR6.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/log-Xlt5jeld.js","assets/PresentationRemoteView-DupVcsnc.css","assets/PresentationPublicView-CkLUkVMd.js","assets/PresentationPublicView-BA_OfOyJ.css","assets/CastReceiverView-6i1cNs5y.js","assets/CastReceiverView-guIBZout.css","assets/NotFoundView-BpgWb5cH.js"])))=>i.map(i=>d[i]); +var fu=Object.defineProperty;var du=(e,t,n)=>t in e?fu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var cn=(e,t,n)=>du(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function xo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const we={},gn=[],Ct=()=>{},xl=()=>!1,nr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),sr=e=>e.startsWith("onUpdate:"),Be=Object.assign,Co=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hu=Object.prototype.hasOwnProperty,_e=(e,t)=>hu.call(e,t),Z=Array.isArray,sn=e=>vs(e)==="[object Map]",Bt=e=>vs(e)==="[object Set]",ui=e=>vs(e)==="[object Date]",se=e=>typeof e=="function",Pe=e=>typeof e=="string",ct=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",Cl=e=>(be(e)||se(e))&&se(e.then)&&se(e.catch),Ol=Object.prototype.toString,vs=e=>Ol.call(e),pu=e=>vs(e).slice(8,-1),Pl=e=>vs(e)==="[object Object]",rr=e=>Pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,es=xo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),or=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},mu=/-\w/g,nt=or(e=>e.replace(mu,t=>t.slice(1).toUpperCase())),gu=/\B([A-Z])/g,ln=or(e=>e.replace(gu,"-$1").toLowerCase()),ir=or(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ir=or(e=>e?`on${ir(e)}`:""),At=(e,t)=>!Object.is(e,t),zs=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},lr=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let fi;const ar=()=>fi||(fi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Oo(e){if(Z(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(yu).forEach(n=>{if(n){const s=n.split(vu);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ln(e){let t="";if(Pe(e))t=e;else if(Z(e))for(let n=0;nqt(n,t))}const Dl=e=>!!(e&&e.__v_isRef===!0),Jt=e=>Pe(e)?e:e==null?"":Z(e)||be(e)&&(e.toString===Ol||!se(e.toString))?Dl(e)?Jt(e.value):JSON.stringify(e,Ll,2):String(e),Ll=(e,t)=>Dl(t)?Ll(e,t.value):sn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Dr(s,o)+" =>"]=r,n),{})}:Bt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Dr(n))}:ct(t)?Dr(t):be(t)&&!Z(t)&&!Pl(t)?String(t):t,Dr=(e,t="")=>{var n;return ct(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Ve;class Nl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ve&&(Ve.active?(this.parent=Ve,this.index=(Ve.scopes||(Ve.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(Ve===this)Ve=this.prevScope;else{let t=Ve;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(ns){let t=ns;for(ns=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ts;){let t=ts;for(ts=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Bl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ql(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Do(s),Au(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function to(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ul(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ul(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===as)||(e.globalVersion=as,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!to(e))))return;e.flags|=2;const t=e.dep,n=Re,s=pt;Re=e,pt=!0;try{Bl(e);const r=e.fn(e._value);(t.version===0||At(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Re=n,pt=s,ql(e),e.flags&=-3}}function Do(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Do(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Au(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let pt=!0;const Hl=[];function Ut(){Hl.push(pt),pt=!1}function Ht(){const e=Hl.pop();pt=e===void 0?!0:e}function pi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Re;Re=void 0;try{t()}finally{Re=n}}}let as=0;class Mu{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Lo{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Re||!pt||Re===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Re)n=this.activeLink=new Mu(Re,this),Re.deps?(n.prevDep=Re.depsTail,Re.depsTail.nextDep=n,Re.depsTail=n):Re.deps=Re.depsTail=n,Kl(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Re.depsTail,n.nextDep=void 0,Re.depsTail.nextDep=n,Re.depsTail=n,Re.deps===n&&(Re.deps=s)}return n}trigger(t){this.version++,as++,this.notify(t)}notify(t){ko();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Io()}}}function Kl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Kl(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Us=new WeakMap,_n=Symbol(""),no=Symbol(""),cs=Symbol("");function We(e,t,n){if(pt&&Re){let s=Us.get(e);s||Us.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Lo),r.map=s,r.key=n),r.track()}}function jt(e,t,n,s,r,o){const i=Us.get(e);if(!i){as++;return}const l=a=>{a&&a.trigger()};if(ko(),t==="clear")i.forEach(l);else{const a=Z(e),c=a&&rr(n);if(a&&n==="length"){const u=Number(s);i.forEach((f,p)=>{(p==="length"||p===cs||!ct(p)&&p>=u)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),c&&l(i.get(cs)),t){case"add":a?c&&l(i.get("length")):(l(i.get(_n)),sn(e)&&l(i.get(no)));break;case"delete":a||(l(i.get(_n)),sn(e)&&l(i.get(no)));break;case"set":sn(e)&&l(i.get(_n));break}}Io()}function xu(e,t){const n=Us.get(e);return n&&n.get(t)}function Mn(e){const t=he(e);return t===e||(We(t,"iterate",cs),lt(e))?t:Pt(e)?Ot(e)?t.map(n=>on(ht(n))):t.map(on):t.map(ht)}function cr(e){return We(e=he(e),"iterate",cs),e}function Tt(e,t){return Pt(e)?on(Ot(e)?ht(t):t):ht(t)}const Cu={__proto__:null,[Symbol.iterator](){return Nr(this,Symbol.iterator,e=>Tt(this,e))},concat(...e){return Mn(this).concat(...e.map(t=>Z(t)?Mn(t):t))},entries(){return Nr(this,"entries",e=>(e[1]=Tt(this,e[1]),e))},every(e,t){return It(this,"every",e,t,void 0,arguments)},filter(e,t){return It(this,"filter",e,t,n=>n.map(s=>Tt(this,s)),arguments)},find(e,t){return It(this,"find",e,t,n=>Tt(this,n),arguments)},findIndex(e,t){return It(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return It(this,"findLast",e,t,n=>Tt(this,n),arguments)},findLastIndex(e,t){return It(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return It(this,"forEach",e,t,void 0,arguments)},includes(...e){return $r(this,"includes",e)},indexOf(...e){return $r(this,"indexOf",e)},join(e){return Mn(this).join(e)},lastIndexOf(...e){return $r(this,"lastIndexOf",e)},map(e,t){return It(this,"map",e,t,void 0,arguments)},pop(){return Kn(this,"pop")},push(...e){return Kn(this,"push",e)},reduce(e,...t){return mi(this,"reduce",e,t)},reduceRight(e,...t){return mi(this,"reduceRight",e,t)},shift(){return Kn(this,"shift")},some(e,t){return It(this,"some",e,t,void 0,arguments)},splice(...e){return Kn(this,"splice",e)},toReversed(){return Mn(this).toReversed()},toSorted(e){return Mn(this).toSorted(e)},toSpliced(...e){return Mn(this).toSpliced(...e)},unshift(...e){return Kn(this,"unshift",e)},values(){return Nr(this,"values",e=>Tt(this,e))}};function Nr(e,t,n){const s=cr(e),r=s[t]();return s!==e&&!lt(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Ou=Array.prototype;function It(e,t,n,s,r,o){const i=cr(e),l=i!==e&&!lt(e),a=i[t];if(a!==Ou[t]){const f=a.apply(e,o);return l?ht(f):f}let c=n;i!==e&&(l?c=function(f,p){return n.call(this,Tt(e,f),p,e)}:n.length>2&&(c=function(f,p){return n.call(this,f,p,e)}));const u=a.call(i,c,s);return l&&r?r(u):u}function mi(e,t,n,s){const r=cr(e),o=r!==e&&!lt(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(c,u,f){return l&&(l=!1,c=Tt(e,c)),n.call(this,c,Tt(e,u),f,e)}):n.length>3&&(i=function(c,u,f){return n.call(this,c,u,f,e)}));const a=r[t](i,...s);return l?Tt(e,a):a}function $r(e,t,n){const s=he(e);We(s,"iterate",cs);const r=s[t](...n);return(r===-1||r===!1)&&ur(n[0])?(n[0]=he(n[0]),s[t](...n)):r}function Kn(e,t,n=[]){Ut(),ko();const s=he(e)[t].apply(e,n);return Io(),Ht(),s}const Pu=xo("__proto__,__v_isRef,__isVue"),Gl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ct));function ku(e){ct(e)||(e=String(e));const t=he(this);return We(t,"has",e),t.hasOwnProperty(e)}class Wl{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?Bu:Ql:o?Zl:Yl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=Z(t);if(!r){let a;if(i&&(a=Cu[n]))return a;if(n==="hasOwnProperty")return ku}const l=Reflect.get(t,n,Le(t)?t:s);if((ct(n)?Gl.has(n):Pu(n))||(r||We(t,"get",n),o))return l;if(Le(l)){const a=i&&rr(n)?l:l.value;return r&&be(a)?ro(a):a}return be(l)?r?ro(l):_s(l):l}}class Jl extends Wl{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=Z(t)&&rr(n);if(!this._isShallow){const c=Pt(o);if(!lt(s)&&!Pt(s)&&(o=he(o),s=he(s)),!i&&Le(o)&&!Le(s))return c||(o.value=s),!0}const l=i?Number(n)e,Cs=e=>Reflect.getPrototypeOf(e);function $u(e,t,n){return function(...s){const r=this.__v_raw,o=he(r),i=sn(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=r[e](...s),u=n?so:t?on:ht;return!t&&We(o,"iterate",a?no:_n),Be(Object.create(c),{next(){const{value:f,done:p}=c.next();return p?{value:f,done:p}:{value:l?[u(f[0]),u(f[1])]:u(f),done:p}}})}}function Os(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ju(e,t){const n={get(r){const o=this.__v_raw,i=he(o),l=he(r);e||(At(r,l)&&We(i,"get",r),We(i,"get",l));const{has:a}=Cs(i),c=t?so:e?on:ht;if(a.call(i,r))return c(o.get(r));if(a.call(i,l))return c(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&We(he(r),"iterate",_n),r.size},has(r){const o=this.__v_raw,i=he(o),l=he(r);return e||(At(r,l)&&We(i,"has",r),We(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,a=he(l),c=t?so:e?on:ht;return!e&&We(a,"iterate",_n),l.forEach((u,f)=>r.call(o,c(u),c(f),i))}};return Be(n,e?{add:Os("add"),set:Os("set"),delete:Os("delete"),clear:Os("clear")}:{add(r){const o=he(this),i=Cs(o),l=he(r),a=!t&&!lt(r)&&!Pt(r)?l:r;return i.has.call(o,a)||At(r,a)&&i.has.call(o,r)||At(l,a)&&i.has.call(o,l)||(o.add(a),jt(o,"add",a,a)),this},set(r,o){!t&&!lt(o)&&!Pt(o)&&(o=he(o));const i=he(this),{has:l,get:a}=Cs(i);let c=l.call(i,r);c||(r=he(r),c=l.call(i,r));const u=a.call(i,r);return i.set(r,o),c?At(o,u)&&jt(i,"set",r,o):jt(i,"add",r,o),this},delete(r){const o=he(this),{has:i,get:l}=Cs(o);let a=i.call(o,r);a||(r=he(r),a=i.call(o,r)),l&&l.call(o,r);const c=o.delete(r);return a&&jt(o,"delete",r,void 0),c},clear(){const r=he(this),o=r.size!==0,i=r.clear();return o&&jt(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=$u(r,e,t)}),n}function No(e,t){const n=ju(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(_e(n,r)&&r in s?n:s,r,o)}const zu={get:No(!1,!1)},Vu={get:No(!1,!0)},Fu={get:No(!0,!1)};const Yl=new WeakMap,Zl=new WeakMap,Ql=new WeakMap,Bu=new WeakMap;function qu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function _s(e){return Pt(e)?e:$o(e,!1,Du,zu,Yl)}function Xl(e){return $o(e,!1,Nu,Vu,Zl)}function ro(e){return $o(e,!0,Lu,Fu,Ql)}function $o(e,t,n,s,r){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=r.get(e);if(o)return o;const i=qu(pu(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function Ot(e){return Pt(e)?Ot(e.__v_raw):!!(e&&e.__v_isReactive)}function Pt(e){return!!(e&&e.__v_isReadonly)}function lt(e){return!!(e&&e.__v_isShallow)}function ur(e){return e?!!e.__v_raw:!1}function he(e){const t=e&&e.__v_raw;return t?he(t):e}function jo(e){return!_e(e,"__v_skip")&&Object.isExtensible(e)&&kl(e,"__v_skip",!0),e}const ht=e=>be(e)?_s(e):e,on=e=>be(e)?ro(e):e;function Le(e){return e?e.__v_isRef===!0:!1}function X(e){return ea(e,!1)}function jn(e){return ea(e,!0)}function ea(e,t){return Le(e)?e:new Uu(e,t)}class Uu{constructor(t,n){this.dep=new Lo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:he(t),this._value=n?t:ht(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||lt(t)||Pt(t);t=s?t:he(t),At(t,n)&&(this._rawValue=t,this._value=s?t:ht(t),this.dep.trigger())}}function Oe(e){return Le(e)?e.value:e}function dg(e){return se(e)?e():Oe(e)}const Hu={get:(e,t,n)=>t==="__v_raw"?e:Oe(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Le(r)&&!Le(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function ta(e){return Ot(e)?e:new Proxy(e,Hu)}function Ku(e){const t=Z(e)?new Array(e.length):{};for(const n in e)t[n]=Wu(e,n);return t}class Gu{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=ct(n)?n:String(n),this._raw=he(t);let r=!0,o=t;if(!Z(t)||ct(this._key)||!rr(this._key))do r=!ur(o)||lt(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Oe(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Le(this._raw[this._key])){const n=this._object[this._key];if(Le(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return xu(this._raw,this._key)}}function Wu(e,t,n){return new Gu(e,t,n)}class Ju{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Lo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=as-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Re!==this)return Fl(this,!0),!0}get value(){const t=this.dep.track();return Ul(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Yu(e,t,n=!1){let s,r;return se(e)?s=e:(s=e.get,r=e.set),new Ju(s,r,n)}const Ps={},Hs=new WeakMap;let hn;function Zu(e,t=!1,n=hn){if(n){let s=Hs.get(n);s||Hs.set(n,s=[]),s.push(e)}}function Qu(e,t,n=we){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=n,c=O=>r?O:lt(O)||r===!1||r===0?zt(O,1):zt(O);let u,f,p,g,v=!1,w=!1;if(Le(e)?(f=()=>e.value,v=lt(e)):Ot(e)?(f=()=>c(e),v=!0):Z(e)?(w=!0,v=e.some(O=>Ot(O)||lt(O)),f=()=>e.map(O=>{if(Le(O))return O.value;if(Ot(O))return c(O);if(se(O))return a?a(O,2):O()})):se(e)?t?f=a?()=>a(e,2):e:f=()=>{if(p){Ut();try{p()}finally{Ht()}}const O=hn;hn=u;try{return a?a(e,3,[g]):e(g)}finally{hn=O}}:f=Ct,t&&r){const O=f,N=r===!0?1/0:r;f=()=>zt(O(),N)}const S=jl(),E=()=>{u.stop(),S&&S.active&&Co(S.effects,u)};if(o&&t){const O=t;t=(...N)=>{const Q=O(...N);return E(),Q}}let y=w?new Array(e.length).fill(Ps):Ps;const x=O=>{if(!(!(u.flags&1)||!u.dirty&&!O))if(t){const N=u.run();if(O||r||v||(w?N.some((Q,$)=>At(Q,y[$])):At(N,y))){p&&p();const Q=hn;hn=u;try{const $=[N,y===Ps?void 0:w&&y[0]===Ps?[]:y,g];y=N,a?a(t,3,$):t(...$)}finally{hn=Q}}}else u.run()};return l&&l(x),u=new zl(f),u.scheduler=i?()=>i(x,!1):x,g=O=>Zu(O,!1,u),p=u.onStop=()=>{const O=Hs.get(u);if(O){if(a)a(O,4);else for(const N of O)N();Hs.delete(u)}},t?s?x(!0):y=u.run():i?i(x.bind(null,!0),!0):u.run(),E.pause=u.pause.bind(u),E.resume=u.resume.bind(u),E.stop=E,E}function zt(e,t=1/0,n){if(t<=0||!be(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Le(e))zt(e.value,t,n);else if(Z(e))for(let s=0;s{zt(s,t,n)});else if(Pl(e)){for(const s in e)zt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&zt(e[s],t,n)}return e}function bs(e,t,n,s){try{return s?e(...s):e()}catch(r){ws(r,t,n)}}function mt(e,t,n,s){if(se(e)){const r=bs(e,t,n,s);return r&&Cl(r)&&r.catch(o=>{ws(o,t,n)}),r}if(Z(e)){const r=[];for(let o=0;o>>1,r=tt[s],o=us(r);o=us(n)?tt.push(e):tt.splice(ef(t),0,e),e.flags|=1,sa()}}function sa(){Ks||(Ks=na.then(oa))}function tf(e){if(!Z(e))Xt&&e.id===-1?Xt.splice(Pn+1,0,e):e.flags&1||(Nn.push(e),e.flags|=1);else for(let t=0;tus(n)-us(s));if(Nn.length=0,Xt){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function oa(e){try{for(Et=0;Et{s._d&&Ys(-1);const o=Gs(t),i=Ft.length;let l;try{l=e(...r)}finally{for(let a=Ft.length;a>i;a--)Ho();Gs(o),s._d&&Ys(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function nf(e,t){if(Ue===null)return e;const n=vr(Ue),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&se(t)?t.call(s&&s.proxy):t}}function sf(){return!!(Ko()||wn)}const rf=Symbol.for("v-scx"),of=()=>at(rf);function bn(e,t,n){return la(e,t,n)}function la(e,t,n=we){const{immediate:s,deep:r,flush:o,once:i}=n,l=Be({},n),a=t&&s||!t&&o!=="post";let c;if(Vn){if(o==="sync"){const g=of();c=g.__watcherHandles||(g.__watcherHandles=[])}else if(!a){const g=()=>{};return g.stop=Ct,g.resume=Ct,g.pause=Ct,g}}const u=qe;l.call=(g,v,w)=>mt(g,u,v,w);let f=!1;o==="post"?l.scheduler=g=>{Ze(g,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(g,v)=>{v?g():zo(g)}),l.augmentJob=g=>{t&&(g.flags|=4),f&&(g.flags|=2,u&&(g.id=u.uid,g.i=u))};const p=Qu(e,t,l);return Vn&&(c?c.push(p):a&&p()),p}function lf(e,t,n){const s=this.proxy,r=Pe(e)?e.includes(".")?aa(s,e):()=>s[e]:e.bind(s,s);let o;se(t)?o=t:(o=t.handler,n=t);const i=Es(this),l=la(r,o.bind(s),n);return i(),l}function aa(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,mn=e=>e&&(e.disabled||e.disabled===""),af=e=>e&&(e.defer||e.defer===""),yi=e=>typeof SVGElement<"u"&&e instanceof SVGElement,vi=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,oo=(e,t)=>{const n=e&&e.to;return Pe(n)?t?t(n):null:n},cf={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,a,c){const{mc:u,pc:f,pbc:p,o:{insert:g,querySelector:v,createText:w,createComment:S,parentNode:E}}=c,y=mn(t.props);let{dynamicChildren:x}=t;const O=($,F,B)=>{$.shapeFlag&16&&u($.children,F,B,r,o,i,l,a)},N=($=t)=>{const F=mn($.props),B=$.target=oo($.props,v),ie=io(B,$,w,g);B&&(i!=="svg"&&yi(B)?i="svg":i!=="mathml"&&vi(B)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(B),F||(O($,B,ie),Zn($,!1)))},Q=$=>{const F=()=>{if(Yt.get($)===F){if(Yt.delete($),mn($.props)){const B=E($.el)||n;O($,B,$.anchor),Zn($,!0)}N($)}};Yt.set($,F),Ze(F,o)};if(e==null){const $=t.el=w(""),F=t.anchor=w("");if(g($,n,s),g(F,n,s),af(t.props)||o&&o.pendingBranch){Q(t);return}y&&(O(t,n,F),Zn(t,!0)),N()}else{t.el=e.el;const $=t.anchor=e.anchor,F=Yt.get(e);if(F){F.flags|=8,Yt.delete(e),Q(t);return}t.targetStart=e.targetStart;const B=t.target=e.target,ie=t.targetAnchor=e.targetAnchor,D=mn(e.props),Me=D?n:B,xe=D?$:ie;if(i==="svg"||yi(B)?i="svg":(i==="mathml"||vi(B))&&(i="mathml"),x?(p(e.dynamicChildren,x,Me,r,o,i,l),Uo(e,t,!0)):a||f(e,t,Me,xe,r,o,i,l,!1),y)D?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ks(t,n,$,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const H=oo(t.props,v);H&&(t.target=H,ks(t,H,null,c,0))}else D&&ks(t,B,ie,c,1);Zn(t,y)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:a,targetStart:c,targetAnchor:u,target:f,props:p}=e,g=mn(p),v=o||!g,w=Yt.get(e);if(w&&(w.flags|=8,Yt.delete(e)),f&&(r(c),r(u)),o&&r(a),!w&&(g||f)&&i&16)for(let S=0;S1){for(const n of e)if(n.type!==kt){t=n;break}}return t}function ua(e){if(!hr(e))return dr(e.type)&&e.children?ff(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&se(n.default))return n.default()}}function Vo(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;Vo(dr(n.type)&&ua(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Tn(e,t){return se(e)?Be({name:e.name},t,{setup:e}):e}function pg(){const e=Ko();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Fo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function _i(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Ws=new WeakMap;function ss(e,t,n,s,r=!1){if(Z(e)){e.forEach((w,S)=>ss(w,t&&(Z(t)?t[S]:t),n,s,r));return}if($n(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ss(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?vr(s.component):s.el,i=r?null:o,{i:l,r:a}=e,c=t&&t.r,u=l.refs===we?l.refs={}:l.refs,f=l.setupState,p=he(f),g=f===we?xl:w=>_i(u,w)?!1:_e(p,w),v=(w,S)=>!(S&&_i(u,S));if(c!=null&&c!==a){if(bi(t),Pe(c))u[c]=null,g(c)&&(f[c]=null);else if(Le(c)){const w=t;v(c,w.k)&&(c.value=null),w.k&&(u[w.k]=null)}}if(se(a))bs(a,l,12,[i,u]);else{const w=Pe(a),S=Le(a);if(w||S){const E=()=>{if(e.f){const y=w?g(a)?f[a]:u[a]:v()||!e.k?a.value:u[e.k];if(r)Z(y)&&Co(y,o);else if(Z(y))y.includes(o)||y.push(o);else if(w)u[a]=[o],g(a)&&(f[a]=u[a]);else{const x=[o];v(a,e.k)&&(a.value=x),e.k&&(u[e.k]=x)}}else w?(u[a]=i,g(a)&&(f[a]=i)):S&&(v(a,e.k)&&(a.value=i),e.k&&(u[e.k]=i))};if(i){const y=()=>{E(),Ws.delete(e)};y.id=-1,Ws.set(e,y),Ze(y,n)}else bi(e),E()}}}function bi(e){const t=Ws.get(e);t&&(t.flags|=8,Ws.delete(e))}const wi=e=>e.nodeType===8;ar().requestIdleCallback;ar().cancelIdleCallback;function df(e,t){if(wi(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(wi(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const $n=e=>!!e.type.__asyncLoader;function mg(e){se(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:o,timeout:i,suspensible:l=!0,onError:a}=e;let c=null,u,f=0;const p=()=>(f++,c=null,g()),g=()=>{let v;return c||(v=c=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),a)return new Promise((S,E)=>{a(w,()=>S(p()),()=>E(w),f+1)});throw w}).then(w=>v!==c&&c?c:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),u=w,w)))};return Tn({name:"AsyncComponentWrapper",__asyncLoader:g,__asyncHydrate(v,w,S){const E=v.isConnected;let y=!1;(w.bu||(w.bu=[])).push(()=>y=!0);const x=()=>{y||!v.parentNode||E&&!v.isConnected||S()},O=o?()=>{const N=o(x,Q=>df(v,Q));N&&(w.bum||(w.bum=[])).push(N)}:x;u?O():g().then(()=>!w.isUnmounted&&O())},get __asyncResolved(){return u},setup(){const v=qe;if(Fo(v),u)return()=>Is(u,v);const w=N=>{c=null,ws(N,v,13,!s)};if(l&&v.suspense||Vn)return g().then(N=>()=>Is(N,v)).catch(N=>(w(N),()=>s?Ee(s,{error:N}):null));const S=X(!1),E=X(),y=X(!!r);let x,O;return mr(()=>{x!=null&&clearTimeout(x),O!=null&&clearTimeout(O)}),r&&(O=setTimeout(()=>{v.isUnmounted||(y.value=!1)},r)),i!=null&&(x=setTimeout(()=>{if(!v.isUnmounted&&!S.value&&!E.value){const N=new Error(`Async component timed out after ${i}ms.`);w(N),E.value=N}},i)),g().then(()=>{v.isUnmounted||(S.value=!0,v.parent&&hr(v.parent.vnode)&&v.parent.update())}).catch(N=>{if(v.isUnmounted){c=null;return}w(N),E.value=N}),()=>{if(S.value&&u)return Is(u,v);if(E.value&&s)return Ee(s,{error:E.value});if(n&&!y.value)return Is(n,v)}}})}function Is(e,t){const{ref:n,props:s,children:r,ce:o}=t.vnode,i=Ee(e,s,r);return i.ref=n,i.ce=o,delete t.vnode.ce,i}const hr=e=>e.type.__isKeepAlive;function fa(e,t){ha(e,"a",t)}function da(e,t){ha(e,"da",t)}function ha(e,t,n=qe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(pr(t,s,n),n){let r=n.parent;for(;r&&r.parent;)hr(r.parent.vnode)&&hf(s,t,n,r),r=r.parent}}function hf(e,t,n,s){const r=pr(t,e,s,!0);mr(()=>{Co(s[t],r)},n)}function pr(e,t,n=qe,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{Ut();const l=Es(n),a=mt(t,n,e,i);return l(),Ht(),a});return s?r.unshift(o):r.push(o),o}}const Kt=e=>(t,n=qe)=>{(!Vn||e==="sp")&&pr(e,(...s)=>t(...s),n)},pf=Kt("bm"),mf=Kt("m"),gf=Kt("bu"),yf=Kt("u"),vf=Kt("bum"),mr=Kt("um"),_f=Kt("sp"),bf=Kt("rtg"),wf=Kt("rtc");function Ef(e,t=qe){pr("ec",e,t)}const Sf="components";function pa(e,t){return Rf(Sf,e,!0,t)||e}const Tf=Symbol.for("v-ndc");function Rf(e,t,n=!0,s=!1){const r=Ue||qe;if(r){const o=r.type;{const l=cd(o,!1);if(l&&(l===t||l===nt(t)||l===ir(nt(t))))return o}const i=Ei(r[e]||o[e],t)||Ei(r.appContext[e],t);return!i&&s?o:i}}function Ei(e,t){return e&&(e[t]||e[nt(t)]||e[ir(nt(t))])}function Si(e,t,n,s){let r;const o=n,i=Z(e);if(i||Pe(e)){const l=i&&Ot(e);let a=!1,c=!1;l&&(a=!lt(e),c=Pt(e),e=cr(e)),r=new Array(e.length);for(let u=0,f=e.length;ut(l,a,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,c=l.length;a0;return t!=="default"&&(c.name=t),Xe(),ds(st,null,[Ee("slot",c,s&&s())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=Ft.length;Xe();let a;try{const c=i&&ma(i(n)),u=n.key||o||c&&c.key;a=ds(st,{key:(u&&!ct(u)?u:`_${t}`)+(!c&&s?"_fb":"")},c||(s?s():[]),c&&e._===1?64:-2)}catch(c){for(let u=Ft.length;u>l;u--)Ho();throw c}finally{i&&i._c&&(i._d=!0)}return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),a}function ma(e){return e.some(t=>hs(t)?!(t.type===kt||t.type===st&&!ma(t.children)):!0)?e:null}const lo=e=>e?Da(e)?vr(e):lo(e.parent):null,rs=Be(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>lo(e.parent),$root:e=>lo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ya(e),$forceUpdate:e=>e.f||(e.f=()=>{zo(e.update)}),$nextTick:e=>e.n||(e.n=fr.bind(e.proxy)),$watch:e=>lf.bind(e)}),zr=(e,t)=>e!==we&&!e.__isScriptSetup&&_e(e,t),Mf={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(zr(s,t))return i[t]=1,s[t];if(r!==we&&_e(r,t))return i[t]=2,r[t];if(_e(o,t))return i[t]=3,o[t];if(n!==we&&_e(n,t))return i[t]=4,n[t];ao&&(i[t]=0)}}const c=rs[t];let u,f;if(c)return t==="$attrs"&&We(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==we&&_e(n,t))return i[t]=4,n[t];if(f=a.config.globalProperties,_e(f,t))return f[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return zr(r,t)?(r[t]=n,!0):s!==we&&_e(s,t)?(s[t]=n,!0):_e(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let a;return!!(n[l]||e!==we&&l[0]!=="$"&&_e(e,l)||zr(t,l)||_e(o,l)||_e(s,l)||_e(rs,l)||_e(r.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_e(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ti(e){return Z(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ao=!0;function xf(e){const t=ya(e),n=e.proxy,s=e.ctx;ao=!1,t.beforeCreate&&Ri(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:c,created:u,beforeMount:f,mounted:p,beforeUpdate:g,updated:v,activated:w,deactivated:S,beforeDestroy:E,beforeUnmount:y,destroyed:x,unmounted:O,render:N,renderTracked:Q,renderTriggered:$,errorCaptured:F,serverPrefetch:B,expose:ie,inheritAttrs:D,components:Me,directives:xe,filters:H}=t;if(c&&Cf(c,s,null),i)for(const G in i){const re=i[G];se(re)&&(s[G]=re.bind(n))}if(r){const G=r.call(n,n);be(G)&&(e.data=_s(G))}if(ao=!0,o)for(const G in o){const re=o[G],$e=se(re)?re.bind(n,n):se(re.get)?re.get.bind(n,n):Ct,me=!se(re)&&se(re.set)?re.set.bind(n):Ct,Te=ne({get:$e,set:me});Object.defineProperty(s,G,{enumerable:!0,configurable:!0,get:()=>Te.value,set:ke=>Te.value=ke})}if(l)for(const G in l)ga(l[G],s,n,G);if(a){const G=se(a)?a.call(n):a;Reflect.ownKeys(G).forEach(re=>{Vs(re,G[re])})}u&&Ri(u,e,"c");function ee(G,re){Z(re)?re.forEach($e=>G($e.bind(n))):re&&G(re.bind(n))}if(ee(pf,f),ee(mf,p),ee(gf,g),ee(yf,v),ee(fa,w),ee(da,S),ee(Ef,F),ee(wf,Q),ee(bf,$),ee(vf,y),ee(mr,O),ee(_f,B),Z(ie))if(ie.length){const G=e.exposed||(e.exposed={});ie.forEach(re=>{Object.defineProperty(G,re,{get:()=>n[re],set:$e=>n[re]=$e,enumerable:!0})})}else e.exposed||(e.exposed={});N&&e.render===Ct&&(e.render=N),D!=null&&(e.inheritAttrs=D),Me&&(e.components=Me),xe&&(e.directives=xe),B&&Fo(e)}function Cf(e,t,n=Ct){Z(e)&&(e=co(e));for(const s in e){const r=e[s];let o;be(r)?"default"in r?o=at(r.from||s,r.default,!0):o=at(r.from||s):o=at(r),Le(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function Ri(e,t,n){mt(Z(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function ga(e,t,n,s){let r=s.includes(".")?aa(n,s):()=>n[s];if(Pe(e)){const o=t[e];se(o)&&bn(r,o)}else if(se(e))bn(r,e.bind(n));else if(be(e))if(Z(e))e.forEach(o=>ga(o,t,n,s));else{const o=se(e.handler)?e.handler.bind(n):t[e.handler];se(o)&&bn(r,o,e)}}function ya(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let a;return l?a=l:!r.length&&!n&&!s?a=t:(a={},r.length&&r.forEach(c=>Js(a,c,i,!0)),Js(a,t,i)),be(t)&&o.set(t,a),a}function Js(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Js(e,o,n,!0),r&&r.forEach(i=>Js(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Of[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Of={data:Ai,props:Mi,emits:Mi,methods:Qn,computed:Qn,beforeCreate:Ye,created:Ye,beforeMount:Ye,mounted:Ye,beforeUpdate:Ye,updated:Ye,beforeDestroy:Ye,beforeUnmount:Ye,destroyed:Ye,unmounted:Ye,activated:Ye,deactivated:Ye,errorCaptured:Ye,serverPrefetch:Ye,components:Qn,directives:Qn,watch:kf,provide:Ai,inject:Pf};function Ai(e,t){return t?e?function(){return Be(se(e)?e.call(this,this):e,se(t)?t.call(this,this):t)}:t:e}function Pf(e,t){return Qn(co(e),co(t))}function co(e){if(Z(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${nt(t)}Modifiers`]||e[`${ln(t)}Modifiers`];function Nf(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||we;let r=n;const o=t.startsWith("update:"),i=o&&Lf(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>Pe(u)?u.trim():u)),i.number&&(r=r.map(lr)));let l,a=s[l=Ir(t)]||s[l=Ir(nt(t))];!a&&o&&(a=s[l=Ir(ln(t))]),a&&mt(a,e,6,r);const c=s[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,mt(c,e,6,r)}}const $f=new WeakMap;function _a(e,t,n=!1){const s=n?$f:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!se(e)){const a=c=>{const u=_a(c,t,!0);u&&(l=!0,Be(i,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(be(e)&&s.set(e,null),null):(Z(o)?o.forEach(a=>i[a]=null):Be(i,o),be(e)&&s.set(e,i),i)}function gr(e,t){return!e||!nr(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),_e(e,t[0].toLowerCase()+t.slice(1))||_e(e,ln(t))||_e(e,t))}function xi(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:a,render:c,renderCache:u,props:f,data:p,setupState:g,ctx:v,inheritAttrs:w}=e,S=Gs(e);let E,y;try{if(n.shapeFlag&4){const O=r||s,N=O;E=Rt(c.call(N,O,u,f,g,p,v)),y=l}else{const O=t;E=Rt(O.length>1?O(f,{attrs:l,slots:i,emit:a}):O(f,null)),y=t.props?l:jf(l)}}catch(O){Ft.length=0,ws(O,e,1),E=Ee(kt)}let x=E;if(y&&w!==!1){const O=Object.keys(y),{shapeFlag:N}=x;O.length&&N&7&&(o&&O.some(sr)&&(y=zf(y,o)),x=zn(x,y,!1,!0))}if(n.dirs&&(x=zn(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition){const O=dr(x.type)&&ua(x)||x;Vo(O,n.transition)}return E=x,Gs(S),E}const jf=e=>{let t;for(const n in e)(n==="class"||n==="style"||nr(n))&&((t||(t={}))[n]=e[n]);return t},zf=(e,t)=>{const n={};for(const s in e)(!sr(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Vf(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:a}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?Ci(s,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let f=0;fObject.create(wa),Sa=e=>Object.getPrototypeOf(e)===wa;function Bf(e,t,n,s=!1){const r={},o=Ea();e.propsDefaults=Object.create(null),Ta(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:Xl(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function qf(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=he(r),[a]=e.propsOptions;let c=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{a=!0;const[p,g]=Ra(f,t,!0);Be(i,p),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!a)return be(e)&&s.set(e,gn),gn;if(Z(o))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",qo=e=>Z(e)?e.map(Rt):[Rt(e)],Hf=(e,t,n)=>{if(t._n)return t;const s=Dn((...r)=>qo(t(...r)),n);return s._c=!1,s},Aa=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Bo(r))continue;const o=e[r];if(se(o))t[r]=Hf(r,o,s);else if(o!=null){const i=qo(o);t[r]=()=>i}}},Ma=(e,t)=>{const n=qo(t);e.slots.default=()=>n},xa=(e,t,n)=>{for(const s in t)(n||!Bo(s))&&(e[s]=t[s])},Kf=(e,t,n)=>{const s=e.slots=Ea();if(e.vnode.shapeFlag&32){const r=t._;r?(xa(s,t,n),n&&kl(s,"_",r,!0)):Aa(t,s)}else t&&Ma(e,t)},Gf=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=we;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:xa(r,t,n):(o=!t.$stable,Aa(t,r)),i=t}else t&&(Ma(e,t),i={default:1});if(o)for(const l in r)!Bo(l)&&i[l]==null&&delete r[l]},Ze=Qf;function Wf(e){return Jf(e)}function Jf(e,t){const n=ar();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:a,setText:c,setElementText:u,parentNode:f,nextSibling:p,setScopeId:g=Ct,insertStaticContent:v}=e,w=(h,m,_,A=null,M=null,T=null,j=void 0,I=null,L=!!m.dynamicChildren)=>{if(h===m)return;h&&!Gn(h,m)&&(A=C(h),ke(h,M,T,!0),h=null),m.patchFlag===-2&&(L=!1,m.dynamicChildren=null),m.dynamicChildren&&h&&h.dynamicChildren&&h.dynamicChildren.hasOnce&&(m.dynamicChildren===gn&&(m.dynamicChildren=[]),m.dynamicChildren.hasOnce=!0);const{type:P,ref:Y,shapeFlag:V}=m;switch(P){case yr:S(h,m,_,A);break;case kt:E(h,m,_,A);break;case Fr:h==null&&y(m,_,A,j);break;case st:Me(h,m,_,A,M,T,j,I,L);break;default:V&1?N(h,m,_,A,M,T,j,I,L):V&6?xe(h,m,_,A,M,T,j,I,L):(V&64||V&128)&&P.process(h,m,_,A,M,T,j,I,L,K)}Y!=null&&M?ss(Y,h&&h.ref,T,m||h,!m):Y==null&&h&&h.ref!=null&&ss(h.ref,null,T,h,!0)},S=(h,m,_,A)=>{if(h==null)s(m.el=l(m.children),_,A);else{const M=m.el=h.el;m.children!==h.children&&c(M,m.children)}},E=(h,m,_,A)=>{h==null?s(m.el=a(m.children||""),_,A):m.el=h.el},y=(h,m,_,A)=>{[h.el,h.anchor]=v(h.children,m,_,A,h.el,h.anchor)},x=({el:h,anchor:m},_,A)=>{let M;for(;h&&h!==m;)M=p(h),s(h,_,A),h=M;s(m,_,A)},O=({el:h,anchor:m})=>{let _;for(;h&&h!==m;)_=p(h),r(h),h=_;r(m)},N=(h,m,_,A,M,T,j,I,L)=>{if(m.type==="svg"?j="svg":m.type==="math"&&(j="mathml"),h==null)Q(m,_,A,M,T,j,I,L);else{const P=h.el&&h.el._isVueCE?h.el:null;try{P&&P._beginPatch(),B(h,m,M,T,j,I,L)}finally{P&&P._endPatch()}}},Q=(h,m,_,A,M,T,j,I)=>{let L,P;const{props:Y,shapeFlag:V,transition:W,dirs:te}=h;if(L=h.el=i(h.type,T,Y&&Y.is,Y),V&8?u(L,h.children):V&16&&F(h.children,L,null,A,M,Vr(h,T),j,I),te&&un(h,null,A,"created"),$(L,h,h.scopeId,j,A),Y){for(const pe in Y)pe!=="value"&&!es(pe)&&o(L,pe,null,Y[pe],T,A);"value"in Y&&o(L,"value",null,Y.value,T),(P=Y.onVnodeBeforeMount)&&wt(P,A,h)}te&&un(h,null,A,"beforeMount");const ae=Yf(M,W);ae&&W.beforeEnter(L),s(L,m,_),((P=Y&&Y.onVnodeMounted)||ae||te)&&Ze(()=>{P&&wt(P,A,h),ae&&W.enter(L),te&&un(h,null,A,"mounted")},M)},$=(h,m,_,A,M)=>{if(_&&g(h,_),A)for(let T=0;T{for(let P=L;P{const I=m.el=h.el;let{patchFlag:L,dynamicChildren:P,dirs:Y}=m;L|=h.patchFlag&16;const V=h.props||we,W=m.props||we;let te;if(_&&fn(_,!1),(te=W.onVnodeBeforeUpdate)&&wt(te,_,m,h),Y&&un(m,h,_,"beforeUpdate"),_&&fn(_,!0),P&&(!h.dynamicChildren||h.dynamicChildren.length!==P.length)&&(L=0,j=!1,P=null),(V.innerHTML&&W.innerHTML==null||V.textContent&&W.textContent==null)&&u(I,""),P?ie(h.dynamicChildren,P,I,_,A,Vr(m,M),T):j||re(h,m,I,null,_,A,Vr(m,M),T,!1),L>0){if(L&16)D(I,V,W,_,M);else if(L&2&&V.class!==W.class&&o(I,"class",null,W.class,M),L&4&&o(I,"style",V.style,W.style,M),L&8){const ae=m.dynamicProps;for(let pe=0;pe{te&&wt(te,_,m,h),Y&&un(m,h,_,"updated")},A)},ie=(h,m,_,A,M,T,j)=>{for(let I=0;I{if(m!==_){if(m!==we)for(const T in m)!es(T)&&!(T in _)&&o(h,T,m[T],null,M,A);for(const T in _){if(es(T))continue;const j=_[T],I=m[T];j!==I&&T!=="value"&&o(h,T,I,j,M,A)}"value"in _&&o(h,"value",m.value,_.value,M)}},Me=(h,m,_,A,M,T,j,I,L)=>{const P=m.el=h?h.el:l(""),Y=m.anchor=h?h.anchor:l("");let{patchFlag:V,dynamicChildren:W,slotScopeIds:te}=m;te&&(I=I?I.concat(te):te),h==null?(s(P,_,A),s(Y,_,A),F(m.children||[],_,Y,M,T,j,I,L)):V>0&&V&64&&W&&h.dynamicChildren&&h.dynamicChildren.length===W.length?(ie(h.dynamicChildren,W,_,M,T,j,I),(m.key!=null||M&&m===M.subTree)&&Uo(h,m,!0)):re(h,m,_,Y,M,T,j,I,L)},xe=(h,m,_,A,M,T,j,I,L)=>{m.slotScopeIds=I,h==null?m.shapeFlag&512?M.ctx.activate(m,_,A,j,L):H(m,_,A,M,T,j,L):Se(h,m,L)},H=(h,m,_,A,M,T,j)=>{const I=h.component=rd(h,A,M);if(hr(h)&&(I.ctx.renderer=K),od(I,!1,j),I.asyncDep){if(M&&M.registerDep(I,ee,j),!h.el){const L=I.subTree=Ee(kt);E(null,L,m,_),h.placeholder=L.el}}else ee(I,h,m,_,M,T,j)},Se=(h,m,_)=>{const A=m.component=h.component;if(Vf(h,m,_))if(A.asyncDep&&!A.asyncResolved){m.el=h.el,G(A,m,_);return}else A.next=m,A.update();else m.el=h.el,A.vnode=m},ee=(h,m,_,A,M,T,j)=>{const I=()=>{if(h.isMounted){let{next:V,bu:W,u:te,parent:ae,vnode:pe}=h;{const ft=Ca(h);if(ft){V&&(V.el=pe.el,G(h,V,j)),ft.asyncDep.then(()=>{Ze(()=>{h.isUnmounted||P()},M)});return}}let ge=V,Ie;fn(h,!1),V?(V.el=pe.el,G(h,V,j)):V=pe,W&&zs(W),(Ie=V.props&&V.props.onVnodeBeforeUpdate)&&wt(Ie,ae,V,pe),fn(h,!0);const je=xi(h),ut=h.subTree;h.subTree=je,w(ut,je,f(ut.el),C(ut),h,M,T),V.el=je.el,ge===null&&Ff(h,je.el),te&&Ze(te,M),(Ie=V.props&&V.props.onVnodeUpdated)&&Ze(()=>wt(Ie,ae,V,pe),M)}else{let V;const{el:W,props:te}=m,{bm:ae,m:pe,parent:ge,root:Ie,type:je}=h,ut=$n(m);fn(h,!1),ae&&zs(ae),!ut&&(V=te&&te.onVnodeBeforeMount)&&wt(V,ge,m),fn(h,!0);{Ie.ce&&Ie.ce._hasShadowRoot()&&Ie.ce._injectChildStyle(je,h.parent?h.parent.type:void 0);const ft=h.subTree=xi(h);w(null,ft,_,A,h,M,T),m.el=ft.el}if(pe&&Ze(pe,M),!ut&&(V=te&&te.onVnodeMounted)){const ft=m;Ze(()=>wt(V,ge,ft),M)}(m.shapeFlag&256||ge&&$n(ge.vnode)&&ge.vnode.shapeFlag&256)&&h.a&&Ze(h.a,M),h.isMounted=!0,m=_=A=null}};h.scope.on();const L=h.effect=new zl(I);h.scope.off();const P=h.update=L.run.bind(L),Y=h.job=L.runIfDirty.bind(L);Y.i=h,Y.id=h.uid,L.scheduler=()=>zo(Y),fn(h,!0),P()},G=(h,m,_)=>{m.component=h;const A=h.vnode.props;h.vnode=m,h.next=null,qf(h,m.props,A,_),Gf(h,m.children,_),Ut(),gi(h),Ht()},re=(h,m,_,A,M,T,j,I,L=!1)=>{const P=h&&h.children,Y=h?h.shapeFlag:0,V=m.children,{patchFlag:W,shapeFlag:te}=m;if(W>0){if(W&128){me(P,V,_,A,M,T,j,I,L);return}else if(W&256){$e(P,V,_,A,M,T,j,I,L);return}}te&8?(Y&16&&He(P,M,T),V!==P&&u(_,V)):Y&16?te&16?me(P,V,_,A,M,T,j,I,L):He(P,M,T,!0):(Y&8&&u(_,""),te&16&&F(V,_,A,M,T,j,I,L))},$e=(h,m,_,A,M,T,j,I,L)=>{h=h||gn,m=m||gn;const P=h.length,Y=m.length,V=Math.min(P,Y);let W;for(W=0;WY?He(h,M,T,!0,!1,V):F(m,_,A,M,T,j,I,L,V)},me=(h,m,_,A,M,T,j,I,L)=>{let P=0;const Y=m.length;let V=h.length-1,W=Y-1;for(;P<=V&&P<=W;){const te=h[P],ae=m[P]=L?$t(m[P]):Rt(m[P]);if(Gn(te,ae))w(te,ae,_,null,M,T,j,I,L);else break;P++}for(;P<=V&&P<=W;){const te=h[V],ae=m[W]=L?$t(m[W]):Rt(m[W]);if(Gn(te,ae))w(te,ae,_,null,M,T,j,I,L);else break;V--,W--}if(P>V){if(P<=W){const te=W+1,ae=teW)for(;P<=V;)ke(h[P],M,T,!0),P++;else{const te=P,ae=P,pe=new Map;for(P=ae;P<=W;P++){const Ke=m[P]=L?$t(m[P]):Rt(m[P]);Ke.key!=null&&pe.set(Ke.key,P)}let ge,Ie=0;const je=W-ae+1;let ut=!1,ft=0;const _t=new Array(je);for(P=0;P=je){ke(Ke,M,T,!0);continue}let Je;if(Ke.key!=null)Je=pe.get(Ke.key);else for(ge=ae;ge<=W;ge++)if(_t[ge-ae]===0&&Gn(Ke,m[ge])){Je=ge;break}Je===void 0?ke(Ke,M,T,!0):(_t[Je-ae]=P+1,Je>=ft?ft=Je:ut=!0,w(Ke,m[Je],_,null,M,T,j,I,L),Ie++)}const Ts=ut?Zf(_t):gn;for(ge=Ts.length-1,P=je-1;P>=0;P--){const Ke=ae+P,Je=m[Ke],Rn=m[Ke+1],Rs=Ke+1{const{el:T,type:j,transition:I,children:L,shapeFlag:P}=h;if(P&6){Te(h.component.subTree,m,_,A);return}if(P&128){h.suspense.move(m,_,A);return}if(P&64){j.move(h,m,_,K);return}if(j===st){s(T,m,_);for(let V=0;VI.enter(T),M));else{const{leave:V,delayLeave:W,afterLeave:te}=I,ae=()=>{h.ctx.isUnmounted?r(T):s(T,m,_)},pe=()=>{const ge=T._isLeaving||!!T[jr];T._isLeaving&&T[jr](!0),I.persisted&&!ge?ae():V(T,()=>{ae(),te&&te()})};W?W(T,ae,pe):pe()}else s(T,m,_)},ke=(h,m,_,A=!1,M=!1)=>{const{type:T,props:j,ref:I,children:L,dynamicChildren:P,shapeFlag:Y,patchFlag:V,dirs:W,cacheIndex:te,memo:ae}=h;if((V===-2||P&&P.hasOnce)&&(M=!1),I!=null&&(Ut(),ss(I,null,_,h,!0),Ht()),te!=null&&(!h.ctx||h.ctx===m)&&(m.renderCache[te]=void 0),Y&256){m.ctx.deactivate(h);return}const pe=Y&1&&W,ge=!$n(h);let Ie;if(ge&&(Ie=j&&j.onVnodeBeforeUnmount)&&wt(Ie,m,h),Y&6)rt(h.component,_,A);else{if(Y&128){h.suspense.unmount(_,A);return}pe&&un(h,null,m,"beforeUnmount"),Y&64?h.type.remove(h,m,_,K,A):P&&!P.hasOnce&&(T!==st||V>0&&V&64)?He(P,m,_,!1,!0):(T===st&&V&384||!M&&Y&16)&&He(L,m,_),A&&yt(h)}const je=ae!=null&&te==null;(ge&&(Ie=j&&j.onVnodeUnmounted)||pe||je)&&Ze(()=>{Ie&&wt(Ie,m,h),pe&&un(h,null,m,"unmounted"),je&&(h.el=null)},_)},yt=h=>{const{type:m,el:_,anchor:A,transition:M}=h;if(m===st){vt(_,A);return}if(m===Fr){O(h),M&&!M.persisted&&M.afterLeave&&M.afterLeave();return}const T=()=>{r(_),M&&!M.persisted&&M.afterLeave&&M.afterLeave()};if(h.shapeFlag&1&&M&&!M.persisted){const{leave:j,delayLeave:I}=M,L=()=>j(_,T);I?I(h.el,T,L):L()}else T()},vt=(h,m)=>{let _;for(;h!==m;)_=p(h),r(h),h=_;r(m)},rt=(h,m,_)=>{const{bum:A,scope:M,job:T,subTree:j,um:I,m:L,a:P}=h;Pi(L),Pi(P),A&&zs(A),M.stop(),T?(T.flags|=8,ke(j,h,m,_)):h.vnode.el&&j&&(j.transition=h.vnode.transition,ke(j,h,m,_)),I&&Ze(I,m),Ze(()=>{h.isUnmounted=!0},m)},He=(h,m,_,A=!1,M=!1,T=0)=>{for(let j=T;j{if(h.shapeFlag&6)return C(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const m=p(h.anchor||h.el),_=m&&m[ca];return _?p(_):m};let q=!1;const z=(h,m,_)=>{let A;h==null?m._vnode&&(ke(m._vnode,null,null,!0),A=m._vnode.component):w(m._vnode||null,h,m,null,null,null,_),m._vnode=h,q||(q=!0,gi(A),ra(),q=!1)},K={p:w,um:ke,m:Te,r:yt,mt:H,mc:F,pc:re,pbc:ie,n:C,o:e};return{render:z,hydrate:void 0,createApp:Df(z)}}function Vr({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function fn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Yf(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Uo(e,t,n=!1){const s=e.children,r=t.children;if(Z(s)&&Z(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Ca(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ca(t)}function Pi(e){if(e)for(let t=0;te.__isSuspense;function Qf(e,t){t&&t.pendingBranch?Z(e)?t.effects.push(...e):t.effects.push(e):tf(e)}const st=Symbol.for("v-fgt"),yr=Symbol.for("v-txt"),kt=Symbol.for("v-cmt"),Fr=Symbol.for("v-stc"),Ft=[];let it=null;function Xe(e=!1){Ft.push(it=e?null:[])}function Ho(){Ft.pop(),it=Ft[Ft.length-1]||null}let fs=1;function Ys(e,t=!1){fs+=e,e<0&&it&&t&&(it.hasOnce=!0)}function ka(e){return e.dynamicChildren=fs>0?it||gn:null,Ho(),fs>0&&it&&it.push(e),e}function St(e,t,n,s,r,o){return ka(Ce(e,t,n,s,r,o,!0))}function ds(e,t,n,s,r){return ka(Ee(e,t,n,s,r,!0))}function hs(e){return e?e.__v_isVNode===!0:!1}function Gn(e,t){return e.type===t.type&&e.key===t.key}const Ia=({key:e})=>e??null,Fs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Pe(e)||Le(e)||se(e)?{i:Ue,r:e,k:t,f:!!n}:e:null);function Ce(e,t=null,n=null,s=0,r=null,o=e===st?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ia(t),ref:t&&Fs(t),scopeId:ia,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ue};return l?(Zs(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=Pe(n)?8:16),fs>0&&!i&&it&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&it.push(a),a}const Ee=Xf;function Xf(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Tf)&&(e=kt),hs(e)){const l=zn(e,t,!0);return n&&Zs(l,n),fs>0&&!o&&it&&(l.shapeFlag&6?it[it.indexOf(e)]=l:it.push(l)),l.patchFlag=-2,l}if(ud(e)&&(e=e.__vccOpts),t){t=ed(t);let{class:l,style:a}=t;l&&!Pe(l)&&(t.class=Ln(l)),be(a)&&(ur(a)&&!Z(a)&&(a=Be({},a)),t.style=Oo(a))}const i=Pe(e)?1:Pa(e)?128:dr(e)?64:be(e)?4:se(e)?2:0;return Ce(e,t,n,s,r,i,o,!0)}function ed(e){return e?ur(e)||Sa(e)?Be({},e):e:null}function zn(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,c=t?td(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Ia(c),ref:t&&t.ref?n&&o?Z(o)?o.concat(Fs(t)):[o,Fs(t)]:Fs(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==st?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&zn(e.ssContent),ssFallback:e.ssFallback&&zn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return a&&s&&Vo(u,a.clone(u)),u}function fo(e=" ",t=0){return Ee(yr,null,e,t)}function Wn(e="",t=!1){return t?(Xe(),ds(kt,null,e)):Ee(kt,null,e)}function Rt(e){return e==null||typeof e=="boolean"?Ee(kt):Z(e)?Ee(st,null,e.slice()):hs(e)?$t(e):Ee(yr,null,String(e))}function $t(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:zn(e)}function Zs(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Z(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Zs(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Sa(t)?t._ctx=Ue:r===3&&Ue&&(Ue.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(se(t)){if(s&65){Zs(e,{default:t});return}t={default:t,_ctx:Ue},n=32}else t=String(t),s&64?(n=16,t=[fo(t)]):n=8;e.children=t,e.shapeFlag|=n}function td(...e){const t={};for(let n=0;nqe||Ue;let Qs,ps;{const e=ar(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};Qs=t("__VUE_INSTANCE_SETTERS__",n=>qe=n),ps=t("__VUE_SSR_SETTERS__",n=>Vn=n)}const Es=e=>{const t=qe;return Qs(e),e.scope.on(),()=>{e.scope.off(),Qs(t)}},ki=()=>{qe&&qe.scope.off(),Qs(null)};function Da(e){return e.vnode.shapeFlag&4}let Vn=!1;function od(e,t=!1,n=!1){t&&ps(t);const{props:s,children:r}=e.vnode,o=Da(e);Bf(e,s,o,t),Kf(e,r,n||t);const i=o?id(e,t):void 0;return t&&ps(!1),i}function id(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Mf);const{setup:s}=n;if(s){Ut();const r=e.setupContext=s.length>1?ad(e):null,o=Es(e),i=bs(s,e,0,[e.props,r]),l=Cl(i);if(Ht(),o(),(l||e.sp)&&!$n(e)&&Fo(e),l){if(i.then(ki,ki),t)return i.then(a=>{ps(!0);try{Ii(e,a,t)}finally{ps(!1)}}).catch(a=>{ws(a,e,0)});e.asyncDep=i}else Ii(e,i)}else La(e)}function Ii(e,t,n){se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=ta(t)),La(e)}function La(e,t,n){const s=e.type;e.render||(e.render=s.render||Ct);{const r=Es(e);Ut();try{xf(e)}finally{Ht(),r()}}}const ld={get(e,t){return We(e,"get",""),e[t]}};function ad(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ld),slots:e.slots,emit:e.emit,expose:t}}function vr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ta(jo(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in rs)return rs[n](e)},has(t,n){return n in t||n in rs}})):e.proxy}function cd(e,t=!0){return se(e)?e.displayName||e.name:e.name||t&&e.__name}function ud(e){return se(e)&&"__vccOpts"in e}const ne=(e,t)=>Yu(e,t,Vn);function Na(e,t,n){try{Ys(-1);const s=arguments.length;return s===2?be(t)&&!Z(t)?hs(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&hs(n)&&(n=[n]),Ee(e,t,n))}finally{Ys(1)}}const fd="3.5.43";let ho;const Di=typeof window<"u"&&window.trustedTypes;if(Di)try{ho=Di.createPolicy("vue",{createHTML:e=>e})}catch{}const $a=ho?e=>ho.createHTML(e):e=>e,dd="http://www.w3.org/2000/svg",hd="http://www.w3.org/1998/Math/MathML",Nt=typeof document<"u"?document:null,Li=Nt&&Nt.createElement("template"),pd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Nt.createElementNS(dd,e):t==="mathml"?Nt.createElementNS(hd,e):n?Nt.createElement(e,{is:n}):Nt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Nt.createTextNode(e),createComment:e=>Nt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{Li.innerHTML=$a(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Li.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},md=Symbol("_vtc");function gd(e,t,n){const s=e[md];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Xs=Symbol("_vod"),ja=Symbol("_vsh"),yd={name:"show",beforeMount(e,{value:t},{transition:n}){e[Xs]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Jn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Jn(e,!0),s.enter(e)):s.leave(e,()=>{Jn(e,!1)}):Jn(e,t))},beforeUnmount(e,{value:t}){Jn(e,t)}};function Jn(e,t){e.style.display=t?e[Xs]:"none",e[ja]=!t}const vd=Symbol(""),_d=/(?:^|;)\s*display\s*:/;function bd(e,t,n){const s=e.style,r=Pe(n);let o=!1;if(n&&!r){if(t)if(Pe(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Xn(s,l,"")}else for(const i in t)n[i]==null&&Xn(s,i,"");for(const i in n){i==="display"&&(o=!0);const l=n[i];l!=null?Ed(e,i,!Pe(t)&&t?t[i]:void 0,l)||Xn(s,i,l):Xn(s,i,"")}}else if(r){if(t!==n){const i=s[vd];i&&(n+=";"+i),s.cssText=n,o=_d.test(n)}}else t&&e.removeAttribute("style");Xs in e&&(e[Xs]=o?s.display:"",e[ja]&&(s.display="none"))}const Ds=/\s*!important$/;function Xn(e,t,n){if(Z(n))n.forEach(s=>Xn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Ds.test(n)?e.setProperty(t,n.replace(Ds,""),"important"):e.setProperty(t,n);else{const s=wd(e,t);Ds.test(n)?e.setProperty(ln(s),n.replace(Ds,""),"important"):e[s]=n}}const Ni=["Webkit","Moz","ms"],Br={};function wd(e,t){const n=Br[t];if(n)return n;let s=nt(t);if(s!=="filter"&&s in e)return Br[t]=s;s=ir(s);for(let r=0;rqr||(xd.then(()=>qr=0),qr=Date.now());function Od(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(Z(r)){const o=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{o.call(s),s._stopped=!0};const i=r.slice(),l=[s];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Pd=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?gd(e,s,i):t==="style"?bd(e,n,s):nr(t)?sr(t)||Td(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):kd(e,t,s,i))?(zi(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ji(e,t,s,i,o,t!=="value")):e._isVueCE&&(Id(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Pe(s)))?zi(e,nt(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),ji(e,t,s,i))};function kd(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Fi(t)&&se(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Fi(t)&&Pe(n)?!1:t in e}function Id(e,t){const n=e._def.props;if(!n)return!1;const s=nt(t);return Array.isArray(n)?n.some(r=>nt(r)===s):Object.keys(n).some(r=>nt(r)===s)}const Fn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Z(t)?n=>zs(t,n):t};function Dd(e){e.target.composing=!0}function Bi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Mt=Symbol("_assign"),Ls=Symbol("_initialValue");function Ur(e,t,n){return t&&(e=e.trim()),n&&(e=lr(e)),e}const gg={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e.parentNode&&(e.type==="text"?e[Ls]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Ls]=e.defaultValue.replace(/\r\n?/g,` +`))),e[Mt]=Fn(r);const o=s||r.props&&r.props.type==="number";nn(e,t?"change":"input",i=>{i.target.composing||e[Mt](Ur(e.value,n,o))}),(n||o)&&nn(e,"change",()=>{e.value=Ur(e.value,n,o)}),t||(nn(e,"compositionstart",Dd),nn(e,"compositionend",Bi),nn(e,"change",Bi))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const r=t??"",o=e[Ls];delete e[Ls],o!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==o?e[Mt](Ur(e.value,n,s)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[Mt]=Fn(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?lr(e.value):e.value,a=t??"";if(l===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===a)||(e.value=a)}},yg={deep:!0,created(e,t,n){e[Mt]=Fn(n),nn(e,"change",()=>{const s=e._modelValue,r=ms(e),o=e.checked,i=e[Mt];if(Z(s)){const l=Po(s,r),a=l!==-1;if(o&&!a)i(s.concat(r));else if(!o&&a){const c=[...s];c.splice(l,1),i(c)}}else if(Bt(s)){const l=new Set(s);o?l.add(r):l.delete(r),i(l)}else i(za(e,o))})},mounted:qi,beforeUpdate(e,t,n){e[Mt]=Fn(n),qi(e,t,n)}};function qi(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(Z(t))r=Po(t,s.props.value)>-1;else if(Bt(t))r=t.has(s.props.value);else{if(t===n)return;r=qt(t,za(e,!0))}e.checked!==r&&(e.checked=r)}const vg={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,nn(e,"change",()=>{const r=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?lr(ms(a)):ms(a)),o=e.multiple,i=o?Bt(e._modelValue)?new Set(r):r:r[0],l=e._pendingValue=[o,o?Z(i)?r.slice():r:i];try{e[Mt](i)}finally{fr(()=>{e._pendingValue===l&&(e._pendingValue=void 0)})}}),e[Mt]=Fn(s)},mounted(e,{value:t}){Ui(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Mt]=Fn(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Ld(t,n[1],n[0]))&&Ui(e,t)}};function Ld(e,t,n){if(!n||Z(e))return qt(e,t);if(Bt(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function Ui(e,t){const n=e.multiple,s=Z(t);if(!(n&&!s&&!Bt(t))){for(let r=0,o=e.options.length;rString(c)===String(l)):i.selected=Po(t,l)>-1}else i.selected=t.has(l);else if(qt(ms(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ms(e){return"_value"in e?e._value:e.value}function za(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Nd=["ctrl","shift","alt","meta"],$d={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Nd.some(n=>e[`${n}Key`]&&!t.includes(n))},_g=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...o)=>{for(let i=0;i{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(r=>{if(!("key"in r))return;const o=ln(r.key);if(t.some(i=>i===o||jd[i]===o))return e(r)}))},zd=Be({patchProp:Pd},pd);let Hi;function Vd(){return Hi||(Hi=Wf(zd))}const Fd=((...e)=>{const t=Vd().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=qd(s);if(!r)return;const o=t._component;!se(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,Bd(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function Bd(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function qd(e){return Pe(e)?document.querySelector(e):e}let Va;const _r=e=>Va=e,Fa=Symbol();function po(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var os;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(os||(os={}));function Ud(){const e=$l(!0),t=e.run(()=>X({}));let n=[],s=[];const r=jo({install(o){_r(r),r._a=o,o.provide(Fa,r),o.config.globalProperties.$pinia=r,s.forEach(i=>n.push(i)),s=[]},use(o){return this._a?n.push(o):s.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const Ba=()=>{};function Ki(e,t,n,s=Ba){e.add(t);const r=()=>{e.delete(t)&&s()};return!n&&jl()&&Ru(r),r}function xn(e,...t){e.forEach(n=>{n(...t)})}const Hd=e=>e(),Gi=Symbol(),Hr=Symbol();function mo(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];po(r)&&po(s)&&e.hasOwnProperty(n)&&!Le(s)&&!Ot(s)?e[n]=mo(r,s):e[n]=s}return e}const Kd=Symbol();function Gd(e){return!po(e)||!Object.prototype.hasOwnProperty.call(e,Kd)}const{assign:Zt}=Object;function Wd(e){return!!(Le(e)&&e.effect)}function Jd(e,t,n,s){const{state:r,actions:o,getters:i}=t,l=n.state.value[e];let a;function c(){l||(n.state.value[e]=r?r():{});const u=Ku(n.state.value[e]);return Zt(u,o,Object.keys(i||{}).reduce((f,p)=>(f[p]=jo(ne(()=>{_r(n);const g=n._s.get(e);return i[p].call(g,g)})),f),{}))}return a=qa(e,c,t,n,s,!0),a}function qa(e,t,n={},s,r,o){let i;const l=Zt({actions:{}},n),a={deep:!0};let c,u,f=new Set,p=new Set,g;const v=s.state.value[e];!o&&!v&&(s.state.value[e]={});let w;function S(F){let B;c=u=!1,typeof F=="function"?(F(s.state.value[e]),B={type:os.patchFunction,storeId:e,events:g}):(mo(s.state.value[e],F),B={type:os.patchObject,payload:F,storeId:e,events:g});const ie=w=Symbol();fr().then(()=>{w===ie&&(c=!0)}),u=!0,xn(f,B,s.state.value[e])}const E=o?function(){const{state:B}=n,ie=B?B():{};this.$patch(D=>{Zt(D,ie)})}:Ba;function y(){i.stop(),f.clear(),p.clear(),s._s.delete(e)}const x=(F,B="")=>{if(Gi in F)return F[Hr]=B,F;const ie=function(){_r(s);const D=Array.from(arguments),Me=new Set,xe=new Set;function H(G){Me.add(G)}function Se(G){xe.add(G)}xn(p,{args:D,name:ie[Hr],store:N,after:H,onError:Se});let ee;try{ee=F.apply(this&&this.$id===e?this:N,D)}catch(G){throw xn(xe,G),G}return ee instanceof Promise?ee.then(G=>(xn(Me,G),G)).catch(G=>(xn(xe,G),Promise.reject(G))):(xn(Me,ee),ee)};return ie[Gi]=!0,ie[Hr]=B,ie},O={_p:s,$id:e,$onAction:Ki.bind(null,p),$patch:S,$reset:E,$subscribe(F,B={}){const ie=Ki(f,F,B.detached,()=>D()),D=i.run(()=>bn(()=>s.state.value[e],Me=>{(B.flush==="sync"?u:c)&&F({storeId:e,type:os.direct,events:g},Me)},Zt({},a,B)));return ie},$dispose:y},N=_s(O);s._s.set(e,N);const $=(s._a&&s._a.runWithContext||Hd)(()=>s._e.run(()=>(i=$l()).run(()=>t({action:x}))));for(const F in $){const B=$[F];if(Le(B)&&!Wd(B)||Ot(B))o||(v&&Gd(B)&&(Le(B)?B.value=v[F]:mo(B,v[F])),s.state.value[e][F]=B);else if(typeof B=="function"){const ie=x(B,F);$[F]=ie,l.actions[F]=B}}return Zt(N,$),Zt(he(N),$),Object.defineProperty(N,"$state",{get:()=>s.state.value[e],set:F=>{S(B=>{Zt(B,F)})}}),s._p.forEach(F=>{Zt(N,i.run(()=>F({store:N,app:s._a,pinia:s,options:l})))}),v&&o&&n.hydrate&&n.hydrate(N.$state,v),c=!0,u=!0,N}function Gt(e,t,n){let s;const r=typeof t=="function";s=r?n:t;function o(i,l){const a=sf();return i=i||(a?at(Fa,null):null),i&&_r(i),i=Va,i._s.has(e)||(r?qa(e,t,s,i):Jd(e,s,i)),i._s.get(e)}return o.$id=e,o}const wg=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Eg=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Sg=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Tg=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Rg=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Ag=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));const kn=typeof document<"u";function Ua(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Yd(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Ua(e.default)}const ve=Object.assign;function Kr(e,t){const n={};for(const s in t){const r=t[s];n[s]=gt(r)?r.map(e):e(r)}return n}const is=()=>{},gt=Array.isArray;function Wi(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Ha=/#/g,Zd=/&/g,Qd=/\//g,Xd=/=/g,eh=/\?/g,Ka=/\+/g,th=/%5B/g,nh=/%5D/g,Ga=/%5E/g,sh=/%60/g,Wa=/%7B/g,rh=/%7C/g,Ja=/%7D/g,oh=/%20/g;function Go(e){return e==null?"":encodeURI(""+e).replace(rh,"|").replace(th,"[").replace(nh,"]")}function ih(e){return Go(e).replace(Wa,"{").replace(Ja,"}").replace(Ga,"^")}function go(e){return Go(e).replace(Ka,"%2B").replace(oh,"+").replace(Ha,"%23").replace(Zd,"%26").replace(sh,"`").replace(Wa,"{").replace(Ja,"}").replace(Ga,"^")}function lh(e){return go(e).replace(Xd,"%3D")}function ah(e){return Go(e).replace(Ha,"%23").replace(eh,"%3F")}function ch(e){return ah(e).replace(Qd,"%2F")}function gs(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const uh=/\/$/,fh=e=>e.replace(uh,"");function Gr(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let a=t.indexOf("?");return a=l>=0&&a>l?-1:a,a>=0&&(s=t.slice(0,a),o=t.slice(a,l>0?l:t.length),r=e(o.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=mh(s??t,n),{fullPath:s+o+i,path:s,query:r,hash:gs(i)}}function dh(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Ji(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function hh(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Bn(t.matched[s],n.matched[r])&&Ya(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Bn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ya(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!ph(e[n],t[n]))return!1;return!0}function ph(e,t){return gt(e)?Yi(e,t):gt(t)?Yi(t,e):e?.valueOf()===t?.valueOf()}function Yi(e,t){return gt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function mh(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i).join("/")}const Wt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let yo=(function(e){return e.pop="pop",e.push="push",e})({}),Wr=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function gh(e){if(!e)if(kn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),fh(e)}const yh=/^[^#]+#/;function vh(e,t){return e.replace(yh,"#")+t}function _h(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const br=()=>({left:window.scrollX,top:window.scrollY});function bh(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=_h(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Zi(e,t){return(history.state?history.state.position-t:-1)+e}const vo=new Map;function wh(e,t){vo.set(e,t)}function Eh(e){const t=vo.get(e);return vo.delete(e),t}function Sh(e){return typeof e=="string"||e&&typeof e=="object"}function Za(e){return typeof e=="string"||typeof e=="symbol"}let De=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const Qa=Symbol("");De.MATCHER_NOT_FOUND+"",De.NAVIGATION_GUARD_REDIRECT+"",De.NAVIGATION_ABORTED+"",De.NAVIGATION_CANCELLED+"",De.NAVIGATION_DUPLICATED+"";function qn(e,t){return ve(new Error,{type:e,[Qa]:!0},t)}function Dt(e,t){return e instanceof Error&&Qa in e&&(t==null||!!(e.type&t))}const Th=["params","query","hash"];function Rh(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Th)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Ah(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&go(r)):[s&&go(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Mh(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=gt(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Xa=Symbol(""),Xi=Symbol(""),wr=Symbol(""),Wo=Symbol(""),_o=Symbol("");function Yn(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function xh(e,t,n){const s=()=>{e[t].delete(n)};mr(s),da(s),fa(()=>{e[t].add(n)}),e[t].add(n)}function Mg(e){const t=at(Xa,{}).value;t&&xh(t,"leaveGuards",e)}function en(e,t,n,s,r,o=i=>i()){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,a)=>{const c=p=>{p===!1?a(qn(De.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?a(p):Sh(p)?a(qn(De.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(i&&s.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),l())},u=o(()=>e.call(s&&s.instances[r],t,n,c));let f=Promise.resolve(u);e.length<3&&(f=f.then(c)),f.catch(p=>a(p))})}function Jr(e,t,n,s,r=o=>o()){const o=[];for(const i of e)for(const l in i.components){let a=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(Ua(a)){const c=(a.__vccOpts||a)[t];c&&o.push(en(c,n,s,i,l,r))}else{let c=a();o.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const f=Yd(u)?u.default:u;i.mods[l]=u,i.components[l]=f;const p=(f.__vccOpts||f)[t];return p&&en(p,n,s,i,l,r)()}))}}return o}function Ch(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iBn(c,l))?s.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(c=>Bn(c,a))||r.push(a))}return[n,s,r]}let Oh=()=>location.protocol+"//"+location.host;function ec(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let i=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(i);return l[0]!=="/"&&(l="/"+l),Ji(l,"")}return Ji(n,e)+s+r}function Ph(e,t,n,s){let r=[],o=[],i=null;const l=({state:p})=>{const g=ec(e,location),v=n.value,w=t.value;let S=0;if(p){if(n.value=g,t.value=p,i&&i===v){i=null;return}S=w?p.position-w.position:0}else s(g);r.forEach(E=>{E(n.value,v,{delta:S,type:yo.pop,direction:S?S>0?Wr.forward:Wr.back:Wr.unknown})})};function a(){i=n.value}function c(p){r.push(p);const g=()=>{const v=r.indexOf(p);v>-1&&r.splice(v,1)};return o.push(g),g}function u(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(ve({},p.state,{scroll:br()}),"")}}function f(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:a,listen:c,destroy:f}}function el(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?br():null}}function kh(e){const{history:t,location:n}=window,s={value:ec(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(a,c,u){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+a:Oh()+e+a;try{t[u?"replaceState":"pushState"](c,"",p),r.value=c}catch(g){console.error(g),n[u?"replace":"assign"](p)}}function i(a,c){o(a,ve({},t.state,el(r.value.back,a,r.value.forward,!0),c,{position:r.value.position}),!0),s.value=a}function l(a,c){const u=ve({},r.value,t.state,{forward:a,scroll:br()});o(u.current,u,!0),o(a,ve({},el(s.value,a,null),{position:u.position+1},c),!1),s.value=a}return{location:s,state:r,push:l,replace:i}}function Ih(e){e=gh(e);const t=kh(e),n=Ph(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=ve({location:"",base:e,go:s,createHref:vh.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let yn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var ze=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(ze||{});const Dh={type:yn.Static,value:""},Lh=/[a-zA-Z0-9_]/;function Nh(e){if(!e)return[[]];if(e==="/")return[[Dh]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}let n=ze.Static,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,a,c="",u="";function f(){c&&(n===ze.Static?o.push({type:yn.Static,value:c}):n===ze.Param||n===ze.ParamRegExp||n===ze.ParamRegExpEnd?(o.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:yn.Param,value:c,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=a}for(;lt.length?t.length===1&&t[0]===Qe.Static+Qe.Segment?1:-1:0}function tc(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Fh={strict:!1,end:!0,sensitive:!1};function Bh(e,t,n){const s=zh(Nh(e.path),n),r=ve(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function qh(e,t){const n=[],s=new Map;t=Wi(Fh,t);function r(f){return s.get(f)}function o(f,p,g){const v=!g,w=rl(f);w.aliasOf=g&&g.record;const S=Wi(t,f),E=[w];if("alias"in f){const O=typeof f.alias=="string"?[f.alias]:f.alias;for(const N of O)E.push(rl(ve({},w,{components:g?g.record.components:w.components,path:N,aliasOf:g?g.record:w})))}let y,x;for(const O of E){const{path:N}=O;if(p&&N[0]!=="/"){const Q=p.record.path,$=Q[Q.length-1]==="/"?"":"/";O.path=p.record.path+(N&&$+N)}if(y=Bh(O,p,S),g?g.alias.push(y):(x=x||y,x!==y&&x.alias.push(y),v&&f.name&&!ol(y)&&i(f.name)),nc(y)&&a(y),w.children){const Q=w.children;for(let $=0;${i(x)}:is}function i(f){if(Za(f)){const p=s.get(f);p&&(s.delete(f),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(f);p>-1&&(n.splice(p,1),f.record.name&&s.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return n}function a(f){const p=Kh(f,n);n.splice(p,0,f),f.record.name&&!ol(f)&&s.set(f.record.name,f)}function c(f,p){let g,v={},w,S;if("name"in f&&f.name){if(g=s.get(f.name),!g)throw qn(De.MATCHER_NOT_FOUND,{location:f});S=g.record.name,v=ve(sl(p.params,g.keys.filter(x=>!x.optional).concat(g.parent?g.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),f.params&&sl(f.params,g.keys.map(x=>x.name))),w=g.stringify(v)}else if(f.path!=null)w=f.path,g=n.find(x=>x.re.test(w)),g&&(v=g.parse(w),S=g.record.name);else{if(g=p.name?s.get(p.name):n.find(x=>x.re.test(p.path)),!g)throw qn(De.MATCHER_NOT_FOUND,{location:f,currentLocation:p});S=g.record.name,v=ve({},p.params,f.params),w=g.stringify(v)}const E=[];let y=g;for(;y;)E.unshift(y.record),y=y.parent;return{name:S,path:w,params:v,matched:E,meta:Hh(E)}}e.forEach(f=>o(f));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:c,removeRoute:i,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function sl(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function rl(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Uh(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Uh(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function ol(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Hh(e){return e.reduce((t,n)=>ve(t,n.meta),{})}function Kh(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;tc(e,t[o])<0?s=o:n=o+1}const r=Gh(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function Gh(e){let t=e;for(;t=t.parent;)if(nc(t)&&tc(e,t)===0)return t}function nc({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function il(e){const t=at(wr),n=at(Wo),s=ne(()=>{const a=Oe(e.to);return t.resolve(a)}),r=ne(()=>{const{matched:a}=s.value,{length:c}=a,u=a[c-1],f=n.matched;if(!u||!f.length)return-1;const p=f.findIndex(Bn.bind(null,u));if(p>-1)return p;const g=ll(a[c-2]);return c>1&&ll(u)===g&&f[f.length-1].path!==g?f.findIndex(Bn.bind(null,a[c-2])):p}),o=ne(()=>r.value>-1&&Qh(n.params,s.value.params)),i=ne(()=>r.value>-1&&r.value===n.matched.length-1&&Ya(n.params,s.value.params));function l(a={}){if(Zh(a)){const c=t[Oe(e.replace)?"replace":"push"](Oe(e.to)).catch(is);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:s,href:ne(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function Wh(e){return e.length===1?e[0]:e}const Jh=Tn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:il,setup(e,{slots:t}){const n=_s(il(e)),{options:s}=at(wr),r=ne(()=>({[al(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[al(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Wh(t.default(n));return e.custom?o:Na("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),Yh=Jh;function Zh(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Qh(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!gt(r)||r.length!==s.length||s.some((o,i)=>o.valueOf()!==r[i].valueOf()))return!1}return!0}function ll(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const al=(e,t,n)=>e??t??n,Xh=Tn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=at(_o),r=ne(()=>e.route||s.value),o=at(Xi,0),i=ne(()=>{let c=Oe(o);const{matched:u}=r.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),l=ne(()=>r.value.matched[i.value]);Vs(Xi,ne(()=>i.value+1)),Vs(Xa,l),Vs(_o,r);const a=X();return bn(()=>[a.value,l.value,e.name],([c,u,f],[p,g,v])=>{u&&(u.instances[f]=c,g&&g!==u&&c&&c===p&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),c&&u&&(!g||!Bn(u,g)||!p)&&(u.enterCallbacks[f]||[]).forEach(w=>w(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,f=l.value,p=f&&f.components[u];if(!p)return cl(n.default,{Component:p,route:c});const g=f.props[u],v=g?g===!0?c.params:typeof g=="function"?g(c):g:null,S=Na(p,ve({},v,t,{onVnodeUnmounted:E=>{E.component.isUnmounted&&(f.instances[u]=null)},ref:a}));return cl(n.default,{Component:S,route:c})||S}}});function cl(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const ep=Xh;function tp(e){const t=qh(e.routes,e),n=e.parseQuery||Ah,s=e.stringifyQuery||Qi,r=e.history,o=Yn(),i=Yn(),l=Yn(),a=jn(Wt);let c=Wt;kn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Kr.bind(null,C=>""+C),f=Kr.bind(null,ch),p=Kr.bind(null,gs);function g(C,q){let z,K;return Za(C)?(z=t.getRecordMatcher(C),K=q):K=C,t.addRoute(K,z)}function v(C){const q=t.getRecordMatcher(C);q&&t.removeRoute(q)}function w(){return t.getRoutes().map(C=>C.record)}function S(C){return!!t.getRecordMatcher(C)}function E(C,q){if(q=ve({},q||a.value),typeof C=="string"){const _=Gr(n,C,q.path),A=t.resolve({path:_.path},q),M=r.createHref(_.fullPath);return ve(_,A,{params:p(A.params),hash:gs(_.hash),redirectedFrom:void 0,href:M})}let z;if(C.path!=null)z=ve({},C,{path:Gr(n,C.path,q.path).path});else{const _=ve({},C.params);for(const A in _)_[A]==null&&delete _[A];z=ve({},C,{params:f(_)}),q.params=f(q.params)}const K=t.resolve(z,q),oe=C.hash||"";K.params=u(p(K.params));const h=dh(s,ve({},C,{hash:ih(oe),path:K.path})),m=r.createHref(h);return ve({fullPath:h,hash:oe,query:s===Qi?Mh(C.query):C.query||{}},K,{redirectedFrom:void 0,href:m})}function y(C){return typeof C=="string"?Gr(n,C,a.value.path):ve({},C)}function x(C,q){if(c!==C)return qn(De.NAVIGATION_CANCELLED,{from:q,to:C})}function O(C){return $(C)}function N(C){return O(ve(y(C),{replace:!0}))}function Q(C,q){const z=C.matched[C.matched.length-1];if(z&&z.redirect){const{redirect:K}=z;let oe=typeof K=="function"?K(C,q):K;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=y(oe):{path:oe},oe.params={}),ve({query:C.query,hash:C.hash,params:oe.path!=null?{}:C.params},oe)}}function $(C,q){const z=c=E(C),K=a.value,oe=C.state,h=C.force,m=C.replace===!0,_=Q(z,K);if(_)return $(ve(y(_),{state:typeof _=="object"?ve({},oe,_.state):oe,force:h,replace:m}),q||z);const A=z;A.redirectedFrom=q;let M;return!h&&hh(s,K,z)&&(M=qn(De.NAVIGATION_DUPLICATED,{to:A,from:K}),Te(K,K,!0,!1)),(M?Promise.resolve(M):ie(A,K)).catch(T=>Dt(T)?Dt(T,De.NAVIGATION_GUARD_REDIRECT)?T:me(T):re(T,A,K)).then(T=>{if(T){if(Dt(T,De.NAVIGATION_GUARD_REDIRECT))return $(ve({replace:m},y(T.to),{state:typeof T.to=="object"?ve({},oe,T.to.state):oe,force:h}),q||A)}else T=Me(A,K,!0,m,oe);return D(A,K,T),T})}function F(C,q){const z=x(C,q);return z?Promise.reject(z):Promise.resolve()}function B(C){const q=vt.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(C):C()}function ie(C,q){let z;const[K,oe,h]=Ch(C,q);z=Jr(K.reverse(),"beforeRouteLeave",C,q);for(const _ of K)_.leaveGuards.forEach(A=>{z.push(en(A,C,q))});const m=F.bind(null,C,q);return z.push(m),He(z).then(()=>{z=[];for(const _ of o.list())z.push(en(_,C,q));return z.push(m),He(z)}).then(()=>{z=Jr(oe,"beforeRouteUpdate",C,q);for(const _ of oe)_.updateGuards.forEach(A=>{z.push(en(A,C,q))});return z.push(m),He(z)}).then(()=>{z=[];for(const _ of h)if(_.beforeEnter)if(gt(_.beforeEnter))for(const A of _.beforeEnter)z.push(en(A,C,q));else z.push(en(_.beforeEnter,C,q));return z.push(m),He(z)}).then(()=>(C.matched.forEach(_=>_.enterCallbacks={}),z=Jr(h,"beforeRouteEnter",C,q,B),z.push(m),He(z))).then(()=>{z=[];for(const _ of i.list())z.push(en(_,C,q));return z.push(m),He(z)}).catch(_=>Dt(_,De.NAVIGATION_CANCELLED)?_:Promise.reject(_))}function D(C,q,z){l.list().forEach(K=>B(()=>K(C,q,z)))}function Me(C,q,z,K,oe){const h=x(C,q);if(h)return h;const m=q===Wt,_=kn?history.state:{};z&&(K||m?r.replace(C.fullPath,ve({scroll:m&&_&&_.scroll},oe)):r.push(C.fullPath,oe)),a.value=C,Te(C,q,z,m),me()}let xe;function H(){xe||(xe=r.listen((C,q,z)=>{if(!rt.listening)return;const K=E(C),oe=Q(K,rt.currentRoute.value);if(oe){$(ve(oe,{replace:!0,force:!0}),K).catch(is);return}c=K;const h=a.value;kn&&wh(Zi(h.fullPath,z.delta),br()),ie(K,h).catch(m=>Dt(m,De.NAVIGATION_ABORTED|De.NAVIGATION_CANCELLED)?m:Dt(m,De.NAVIGATION_GUARD_REDIRECT)?($(ve(y(m.to),{force:!0}),K).then(_=>{Dt(_,De.NAVIGATION_ABORTED|De.NAVIGATION_DUPLICATED)&&!z.delta&&z.type===yo.pop&&r.go(-1,!1)}).catch(is),Promise.reject()):(z.delta&&r.go(-z.delta,!1),re(m,K,h))).then(m=>{m=m||Me(K,h,!1),m&&(z.delta&&!Dt(m,De.NAVIGATION_CANCELLED)?r.go(-z.delta,!1):z.type===yo.pop&&Dt(m,De.NAVIGATION_ABORTED|De.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),D(K,h,m)}).catch(is)}))}let Se=Yn(),ee=Yn(),G;function re(C,q,z){me(C);const K=ee.list();return K.length?K.forEach(oe=>oe(C,q,z)):console.error(C),Promise.reject(C)}function $e(){return G&&a.value!==Wt?Promise.resolve():new Promise((C,q)=>{Se.add([C,q])})}function me(C){return G||(G=!C,H(),Se.list().forEach(([q,z])=>C?z(C):q()),Se.reset()),C}function Te(C,q,z,K){const{scrollBehavior:oe}=e;if(!kn||!oe)return Promise.resolve();const h=!z&&Eh(Zi(C.fullPath,0))||(K||!z)&&history.state&&history.state.scroll||null;return fr().then(()=>oe(C,q,h)).then(m=>m&&bh(m)).catch(m=>re(m,C,q))}const ke=C=>r.go(C);let yt;const vt=new Set,rt={currentRoute:a,listening:!0,addRoute:g,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:S,getRoutes:w,resolve:E,options:e,push:O,replace:N,go:ke,back:()=>ke(-1),forward:()=>ke(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:ee.add,isReady:$e,install(C){C.component("RouterLink",Yh),C.component("RouterView",ep),C.config.globalProperties.$router=rt,Object.defineProperty(C.config.globalProperties,"$route",{enumerable:!0,get:()=>Oe(a)}),kn&&!yt&&a.value===Wt&&(yt=!0,O(r.location).catch(K=>{}));const q={};for(const K in Wt)Object.defineProperty(q,K,{get:()=>a.value[K],enumerable:!0});C.provide(wr,rt),C.provide(Wo,Xl(q)),C.provide(_o,a);const z=C.unmount;vt.add(C),C.unmount=function(){vt.delete(C),vt.size<1&&(c=Wt,xe&&xe(),xe=null,a.value=Wt,yt=!1,G=!1),z()}}};function He(C){return C.reduce((q,z)=>q.then(()=>B(z)),Promise.resolve())}return rt}function xg(){return at(wr)}function sc(e){return at(Wo)}const np={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},sp=["d"],bo=Tn({__name:"Icon",props:{name:{}},setup(e){const t=e,n={home:"M3 11l9-8 9 8M5 10v10h5v-6h4v6h5V10",calendar:"M4 6h16v14H4zM4 10h16M8 3v5M16 3v5",book:"M5 4h10a3 3 0 013 3v13H8a3 3 0 01-3-3zM5 17a3 3 0 013-3h10",quiz:"M12 21a9 9 0 100-18 9 9 0 000 18zM9.5 9.5a2.5 2.5 0 114 2c-.9.6-1.5 1-1.5 2M12 17h.01",more:"M5 12h.01M12 12h.01M19 12h.01",flag:"M5 21V4M5 4h11l-2 4 2 4H5",grad:"M2 9l10-5 10 5-10 5zM6 11.5V16c0 1.5 3 3 6 3s6-1.5 6-3v-4.5",file:"M7 3h7l5 5v13H7zM14 3v5h5M10 13h6M10 17h6",slides:"M3 4h18v12H3zM12 16v4M8 20h8",user:"M12 12a4 4 0 100-8 4 4 0 000 8zM4 21c0-4 4-6 8-6s8 2 8 6",out:"M10 4H5v16h5M15 8l4 4-4 4M19 12H9",chevron:"M9 6l6 6-6 6","arrow-left":"M19 12H5M11 6l-6 6 6 6","arrow-right":"M5 12h14M13 6l6 6-6 6",paperclip:"M20 11.5l-8.5 8.5a5 5 0 01-7-7L13 4.5a3.5 3.5 0 015 5L9.5 18a2 2 0 01-3-3L14 7.5",at:"M12 16a4 4 0 100-8 4 4 0 000 8zM16 12v1.5a2.5 2.5 0 005 0V12a9 9 0 10-3.5 7.1","arrow-up":"M12 19V5M5 12l7-7 7 7","arrow-down":"M12 5v14M5 12l7 7 7-7",smile:"M12 21a9 9 0 100-18 9 9 0 000 18zM8.5 14.5c1 1.2 2.2 1.8 3.5 1.8s2.5-.6 3.5-1.8M9 9.5h.01M15 9.5h.01",pencil:"M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4",trash:"M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3",close:"M6 6l12 12M18 6L6 18",plus:"M12 5v14M5 12h14",checklist:"M4 6l2 2 3-3M4 13l2 2 3-3M12 7h8M12 14h8M4 19h.01M12 19h8",cast:"M2 16.1A5 5 0 015.9 20M2 12.05A9 9 0 019.95 20M2 8V6a2 2 0 012-2h16a2 2 0 012 2v12a2 2 0 01-2 2h-6M2 20h.01",sun:"M12 16a4 4 0 100-8 4 4 0 000 8zM12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4",moon:"M21 12.8A9 9 0 1111.2 3a7 7 0 009.8 9.8z",bold:"M7 5h6a3.5 3.5 0 010 7H7zM7 12h7a3.5 3.5 0 010 7H7z",italic:"M10 5h8M6 19h8M14 5l-4 14",heading:"M6 4v16M18 4v16M6 12h12",list:"M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01",quote:"M5 7h5v5c0 3-2 5-5 6M14 7h5v5c0 3-2 5-5 6",link:"M10 14a4 4 0 005.7 0l3-3a4 4 0 00-5.7-5.7l-1 1M14 10a4 4 0 00-5.7 0l-3 3a4 4 0 005.7 5.7l1-1",image:"M4 5h16v14H4zM4 16l5-5 4 4 3-3 4 4M15 9h.01",table:"M4 5h16v14H4zM4 10h16M4 15h16M10 5v14"};return(s,r)=>(Xe(),St("svg",np,[Ce("path",{d:n[t.name]??""},null,8,sp)]))}}),rp="bm.theme",op="dark",ip={light:"#f3f4f1",dark:"#141917"},lp=/(?:^|;\s*)bm\.theme=(light|dark)(?:;|$)/;function ap(e){const t=lp.exec(e);return t?t[1]:op}function cp(e,t){return`${rp}=${e}; Path=/; Max-Age=31536000; SameSite=Lax${t?"; Secure":""}`}function up(){return ap(document.cookie)}function fp(e){document.cookie=cp(e,location.protocol==="https:")}function dp(e){document.documentElement.dataset.theme=e;const t=document.getElementById("bm-theme-color");t&&t.setAttribute("content",ip[e])}const hp=Gt("theme",()=>{const e=X(up()),t=ne(()=>e.value==="dark");function n(r){e.value=r,fp(r),dp(r)}function s(){n(e.value==="dark"?"light":"dark")}return{theme:e,dark:t,set:n,toggle:s}}),pp=["aria-label","title"],ul=Tn({__name:"ThemeToggle",setup(e){const t=hp(),n=ne(()=>t.dark?"Tryb jasny":"Tryb ciemny");return(s,r)=>(Xe(),St("button",{type:"button",class:"icon-btn theme-toggle","aria-label":n.value,title:n.value,onClick:r[0]||(r[0]=o=>Oe(t).toggle())},[Ee(bo,{name:Oe(t).dark?"sun":"moon"},null,8,["name"])],8,pp))}});class Ne extends Error{constructor(n,s,r={},o){super(s);cn(this,"status");cn(this,"errors");cn(this,"body");this.name="ApiError",this.status=n,this.errors=r,this.body=o}}const Yr="bm.token";class mp{constructor(t,n){cn(this,"local");cn(this,"session");cn(this,"memory",null);this.local=t,this.session=n}read(t){try{return t?.getItem(Yr)??null}catch{return null}}get(){return this.read(this.local)??this.read(this.session)??this.memory}get remembered(){return this.read(this.local)!==null}set(t,n){this.clear();try{(n?this.local:this.session)?.setItem(Yr,t)}catch{}this.get()===null&&(this.memory=t)}replace(t){this.set(t,this.remembered)}clear(){this.memory=null;for(const t of[this.local,this.session])try{t?.removeItem(Yr)}catch{}}}function gp(e){const t=e.fetch??((...g)=>fetch(...g)),{tokens:n}=e;let s=null;function r(g,v){if(!v)return g;const w=new URLSearchParams;for(const[E,y]of Object.entries(v))y!=null&&y!==""&&w.set(E,String(y));const S=w.toString();return S?`${g}?${S}`:g}async function o(g,v){const w={Accept:"application/json"};if(v.headers)for(const[y,x]of Object.entries(v.headers))y.toLowerCase()!=="authorization"&&(w[y]=x);const S=n.get();v.auth!==!1&&S&&(w.Authorization=`Bearer ${S}`);let E;return v.body!==void 0&&(w["Content-Type"]="application/json",E=JSON.stringify(v.body)),t(r(g,v.query),{method:v.method??"GET",headers:w,body:E})}function i(){return s||(s=(async()=>{try{const g=await o("/_user/api/v1/refresh",{method:"POST"});if(!g.ok)return!1;const v=await g.json(),w=v.token??v.data?.token;return w?(n.replace(w),!0):!1}catch{return!1}finally{queueMicrotask(()=>{s=null})}})()),s}async function l(g){const v=await g.text();if(!v)return null;try{return JSON.parse(v)}catch{return null}}function a(g,v){const w=v??{},S=typeof w.error=="string"&&w.error||typeof w.message=="string"&&w.message||(g.status>=500?"Błąd serwera. Spróbuj ponownie za chwilę.":`Błąd ${g.status}`);return new Ne(g.status,S,w.errors??{},v??void 0)}async function c(g,v){let w;const S=n.get();try{w=await o(g,v)}catch{throw new Ne(0,"Brak połączenia z serwerem.")}if(w.status===401&&v.auth!==!1&&S){const E=n.get();if(E!==null&&E!==S?!0:await i())try{w=await o(g,v)}catch{throw new Ne(0,"Brak połączenia z serwerem.")}w.status===401&&(n.clear(),e.onUnauthorized?.())}return w}async function u(g,v={}){const w=await c(g,v),S=await l(w);if(!w.ok)throw a(w,S);return S}async function f(g,v={}){const w=await c(g,v);if(!w.ok){const S=await l(w);throw a(w,S)}return w.blob()}async function p(g,v={}){const w=await u(g,v);return w&&typeof w=="object"&&"data"in w?w.data:w}return{request:p,raw:u,blob:f}}function fl(e){try{return e()}catch{return null}}const et=new mp(fl(()=>window.localStorage),fl(()=>window.sessionStorage));let rc=()=>{};function yp(e){rc=e}const U=gp({tokens:et,onUnauthorized:()=>rc()}),dt="/_user/api/v1",dn={login:e=>U.request(`${dt}/login`,{method:"POST",body:e,auth:!1}),register:e=>U.request(`${dt}/register`,{method:"POST",body:e,auth:!1}),fetch:()=>U.request(`${dt}/fetch`),logout:()=>U.request(`${dt}/logout`,{method:"POST"}),forgotPassword:e=>U.request(`${dt}/forgot-password`,{method:"POST",body:{email:e},auth:!1}),resetPassword:e=>U.request(`${dt}/reset-password`,{method:"POST",body:e,auth:!1}),update:e=>U.request(`${dt}/update`,{method:"POST",body:e}),changePassword:e=>U.request(`${dt}/change-password`,{method:"POST",body:e}),oauthProviders:()=>U.request(`${dt}/oauth-providers`,{auth:!1}),oauthComplete:e=>U.request(`${dt}/oauth-complete?code=${encodeURIComponent(e)}`,{auth:!1}),oauthRegisterComplete:e=>U.request(`${dt}/oauth-register-complete`,{method:"POST",body:e,auth:!1}),oauthLinkTicket:()=>U.request(`${dt}/oauth-link-ticket`,{method:"POST"})},oc="Europe/Warsaw",vp="pl-PL";function ic(e,t,n,s){const r=Math.abs(e);if(r===1)return t;const o=r%10,i=r%100;return o>=2&&o<=4&&!(i>=12&&i<=14)?n:s}function wo(e,t,n,s){return`${e} ${ic(e,t,n,s)}`}const Un=(e,t=oc)=>new Intl.DateTimeFormat(vp,{timeZone:t,...e}),_p=Un({hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),bp=Un({weekday:"long",day:"numeric",month:"long"}),wp=Un({day:"numeric",month:"long",year:"numeric"}),Ep=Un({day:"numeric",month:"short"});Un({weekday:"long"});const Sp=new Intl.DateTimeFormat("sv-SE",{timeZone:oc,year:"numeric",month:"2-digit",day:"2-digit"});function Ns(e){return new Date(`${e}T12:00:00Z`)}const $s=e=>Un(e,"UTC"),Eo=e=>_p.format(new Date(e)),Tp=e=>bp.format(new Date(e)),Rp=e=>wp.format(new Date(e)),Cg=e=>Ep.format(new Date(e)),Ap=e=>`${Rp(e)}, ${Eo(e)}`,lc=e=>Sp.format(typeof e=="string"?new Date(e):e),ac=(e=new Date)=>lc(e);function cc(e,t=new Date){const n=Date.parse(`${ac(t)}T00:00:00Z`),s=Date.parse(`${lc(e)}T00:00:00Z`);return Math.round((s-n)/864e5)}function Mp(e,t=new Date){const n=cc(e,t);return n===0?"dzisiaj":n===1?"jutro":n===-1?"wczoraj":n>1?`za ${wo(n,"dzień","dni","dni")}`:`${wo(-n,"dzień","dni","dni")} temu`}function Og(e,t){if(e===t)return $s({day:"numeric",month:"long",year:"numeric"}).format(Ns(e));const[n,s]=e.split("-"),[r,o]=t.split("-"),i=c=>$s({day:"numeric"}).format(Ns(c)),l=c=>$s({day:"numeric",month:"long"}).format(Ns(c)),a=c=>$s({year:"numeric"}).format(Ns(c));return n===r&&s===o?`${i(e)}–${l(t)} ${a(t)}`:n===r?`${l(e)} – ${l(t)} ${a(t)}`:`${l(e)} ${a(e)} – ${l(t)} ${a(t)}`}function xp(e,t){const n=o=>{const[,i,l]=o.split("-");return{d:parseInt(l,10),m:parseInt(i,10)}},s=n(e),r=n(t);return e===t?`${s.d}.${s.m}`:s.m===r.m?`${s.d}–${r.d}.${r.m}`:`${s.d}.${s.m}–${r.d}.${r.m}`}function Pg(e){return`Zjazd ${e.number} (${xp(e.starts_on,e.ends_on)})`}function kg(e,t=ac()){const n=[...e].sort((r,o)=>o.starts_on.localeCompare(r.starts_on)),s=e.find(r=>r.starts_on<=t&&t<=r.ends_on)??e.filter(r=>r.starts_on>t).sort((r,o)=>r.starts_on.localeCompare(o.starts_on))[0];return s?[s,...n.filter(r=>r!==s)]:n}function Ig(e){return e?/online/i.test(e)?"online":/stacjonarn/i.test(e)?"stacjonarny":null:null}function Dg(e){return e?e.trim().toLowerCase()==="online"?"":e.trim():""}const Cp={wyklad:"wykład",cwiczenia:"ćwiczenia",konwersatorium:"konwersatorium",seminarium:"seminarium",inne:"zajęcia"},Op={zaliczenie:"zaliczenie",egzamin:"egzamin",praca:"praca",organizacyjne:"organizacyjne",inne:"inne"},Pp={pdf:"PDF",notatka:"notatka",link:"link",inne:"inne"};function Lg(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1).replace(".",",")} MB`}const kp=4;function Ng(e){return{title:e.title,type:e.type,meeting_id:e.meeting_id,source:e.source??"",url:e.url??"",tags:e.tags.map(t=>t.name),body:e.body??""}}function So(e){const t=e.replace(/\r\n?/g,` +`).trim();return t?`${t} +`:""}function Ip(e,t){const n=new Set(e),s=new Set(t);if(n.size!==s.size)return!1;for(const r of n)if(!s.has(r))return!1;return!0}function Dp(e,t){return e.title.trim()===t.title.trim()&&e.type===t.type&&e.meeting_id===t.meeting_id&&e.source.trim()===t.source.trim()&&e.url.trim()===t.url.trim()&&Ip(e.tags,t.tags)&&So(e.body)===So(t.body)}const dl=e=>{const t=e.trim();return t||null};function $g(e,t){const n=So(e.body);return{revision:t,title:e.title.trim(),type:e.type,body:n||null,source:dl(e.source),url:dl(e.url),meeting_id:e.meeting_id,tags:[...e.tags]}}function jg(e,t){return e.includes(t)?e.filter(n=>n!==t):e.length>=kp?e:[...e,t]}function zg(e){return e.trim().replace(/\.+$/,"")}const uc="bm.materialDraft.";function Jo(e){return`${uc}${e}`}function Er(){try{return typeof window<"u"?window.localStorage:null}catch{return null}}const pn=e=>typeof e=="string";function Lp(e){if(!e||typeof e!="object")return null;const t=e;if(!pn(t.title)||!pn(t.source)||!pn(t.url)||!pn(t.body)||!pn(t.type)||!Object.prototype.hasOwnProperty.call(Pp,t.type))return null;const n=t.meeting_id;return n!==null&&!(typeof n=="number"&&Number.isInteger(n)&&n>0)||!Array.isArray(t.tags)||!t.tags.every(pn)?null:{title:t.title,type:t.type,meeting_id:n,source:t.source,url:t.url,tags:[...t.tags],body:t.body}}function Vg(e,t=Er()){let n=null;try{n=t?.getItem(Jo(e))??null}catch{return null}if(!n)return null;let s;try{s=JSON.parse(n)}catch{return null}if(!s||typeof s!="object")return null;const r=s,o=r.base_revision;if(typeof o!="number"||!Number.isInteger(o)||o<0||!pn(r.saved_at)||Number.isNaN(Date.parse(r.saved_at)))return null;const i=Lp(r.fields);return i?{base_revision:o,saved_at:r.saved_at,fields:i}:null}function Fg(e,t,n=Er()){try{n?.setItem(Jo(e),JSON.stringify(t))}catch{}}function Bg(e,t=Er()){try{t?.removeItem(Jo(e))}catch{}}function Np(e=Er()){if(e)try{const t=[];for(let n=0;n0){let a=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=i?.nonce||i?.getAttribute("nonce");r=a(n.map(c=>{if(c=zp(c),c in hl)return;hl[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const p=document.createElement("link");if(p.rel=u?"stylesheet":jp,u||(p.as="script"),p.crossOrigin="",p.href=c,l&&p.setAttribute("nonce",l),document.head.appendChild(p),u)return new Promise((g,v)=>{p.addEventListener("load",g),p.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},er="bm.lastPilot";function Sr(){try{return window.localStorage}catch{return null}}function fc(e){return typeof e=="string"&&e.trim()!==""&&e.length<=255&&!e.includes("/")}function Hg(e,t=Sr()){if(!(!t||!fc(e)))try{t.setItem(er,e)}catch{}}function Vp(e=Sr()){if(!e)return null;try{const t=e.getItem(er);return fc(t)?t:null}catch{return null}}function Kg(e,t=Sr()){if(t)try{t.getItem(er)===e&&t.removeItem(er)}catch{}}function Fp(e=Sr()){const t=Vp(e);return t?{name:"presentation-remote",params:{slug:t}}:{name:"my-presentations"}}const vn=tp({history:Ih("/"),scrollBehavior:(e,t,n)=>e.meta.bare?!1:n??(e.hash?{el:e.hash,top:12}:e.path===t.path?void 0:{top:0}),routes:[{path:"/logowanie",name:"login",component:()=>ye(()=>import("./LoginView-Ded3G-tr.js"),__vite__mapDeps([0,1,2])),meta:{public:!0,guest:!0,title:"Logowanie"}},{path:"/rejestracja",name:"register",component:()=>ye(()=>import("./RegisterView-DbsIjB9v.js"),__vite__mapDeps([3,1])),meta:{public:!0,guest:!0,title:"Rejestracja"}},{path:"/przypomnij-haslo",name:"forgot",component:()=>ye(()=>import("./ForgotView-BTYOeeYh.js"),__vite__mapDeps([4,1])),meta:{public:!0,title:"Przypomnienie hasła"}},{path:"/auth/oauth/callback",name:"oauth-callback",component:()=>ye(()=>import("./OAuthCallbackView-OjmWS0Rg.js"),__vite__mapDeps([5,1,2])),meta:{public:!0,title:"Logowanie"}},{path:"/auth/oauth/rejestracja",name:"oauth-register",component:()=>ye(()=>import("./OAuthRegisterView-Caz16iGt.js"),__vite__mapDeps([6,1])),meta:{public:!0,title:"Rejestracja"}},{path:"/reset-password",alias:"/reset-hasla",name:"reset",component:()=>ye(()=>import("./ResetView-CoTvMDNZ.js"),__vite__mapDeps([7,1])),meta:{public:!0,title:"Nowe hasło"}},{path:"/",name:"dashboard",component:()=>ye(()=>import("./DashboardView-Dg7omPI2.js"),__vite__mapDeps([8,9,10,11,12,13])),meta:{title:"Pulpit",wide:!0}},{path:"/plan",name:"schedule",component:()=>ye(()=>import("./ScheduleView-DVY5GWjq.js"),__vite__mapDeps([14,9,10,11,15])),meta:{title:"Plan zajęć"}},{path:"/terminarz",name:"deadlines",component:()=>ye(()=>import("./DeadlinesView-BGDvcTFu.js"),__vite__mapDeps([16,9,10,11,15])),meta:{title:"Terminarz"}},{path:"/przedmioty",name:"courses",component:()=>ye(()=>import("./CoursesView-CTFWnUtE.js"),__vite__mapDeps([17,9,10,11])),meta:{title:"Przedmioty"}},{path:"/przedmioty/:id(\\d+)",name:"course",component:()=>ye(()=>import("./CourseView-B4u4d13U.js"),__vite__mapDeps([18,9,10,19])),props:!0,meta:{title:"Przedmiot"}},{path:"/lektury",name:"readings",component:()=>ye(()=>import("./ReadingsView-Ddb9B2Jf.js"),__vite__mapDeps([20,9,10,11,19,15])),meta:{title:"Lektury"}},{path:"/materialy",name:"materials",component:()=>ye(()=>import("./MaterialsView-B7ioBi_c.js"),__vite__mapDeps([21,9,22])),meta:{title:"Materiały"}},{path:"/materialy/:id(\\d+)",name:"material",component:()=>ye(()=>import("./MaterialView-Ccuh3g_S.js"),__vite__mapDeps([23,9,10,24,12,22])),props:!0,meta:{title:"Materiał"}},{path:"/materialy/:id(\\d+)/edytuj",name:"material-edit",component:()=>ye(()=>import("./MaterialEditView-D5T_uu3M.js"),__vite__mapDeps([25,9,10,13,24,12,22])),props:!0,meta:{title:"Edycja materiału"}},{path:"/checklisty",name:"checklists",component:()=>ye(()=>import("./ChecklistsView-P9tat5HV.js"),__vite__mapDeps([26,9,10,1])),meta:{title:"Checklisty"}},{path:"/checklisty/:id(\\d+)",name:"checklist",component:()=>ye(()=>import("./ChecklistView-CRar4YSq.js"),__vite__mapDeps([27,9,10,28,1])),props:!0,meta:{title:"Checklista"}},{path:"/sylabusy",name:"syllabi",component:()=>ye(()=>import("./SyllabiView-CyTHbJ1N.js"),__vite__mapDeps([29,9])),meta:{title:"Sylabusy"}},{path:"/quiz",redirect:"/quizy/powtorka-1-zjazd"},{path:"/quizy",name:"quizzes",component:()=>ye(()=>import("./QuizzesView-BKkd8cXT.js"),__vite__mapDeps([30,9,10,31])),meta:{title:"Quizy"}},{path:"/quizy/:slug",name:"quiz",component:()=>ye(()=>import("./QuizView-BNSrrYen.js"),__vite__mapDeps([32,9,10,31])),props:!0,meta:{title:"Quiz"}},{path:"/wiecej",name:"more",component:()=>ye(()=>import("./MoreView-dMwsCkkj.js"),__vite__mapDeps([33,9])),meta:{title:"Więcej"}},{path:"/profil",name:"profile",component:()=>ye(()=>import("./ProfileView-NWDFwDRZ.js"),__vite__mapDeps([34,9,1,2])),meta:{title:"Profil"}},{path:"/moje-prezentacje",name:"my-presentations",component:()=>ye(()=>import("./MyPresentationsView-CqFZqvMF.js"),__vite__mapDeps([35,9,10,28])),meta:{title:"Moje prezentacje"}},{path:"/moje-prezentacje/:slug",name:"presentation-speaker",component:()=>ye(()=>import("./PresentationSpeakerView-Bs2NSw6o.js"),__vite__mapDeps([36,28,37,38,39,40,41,42,43])),props:!0,meta:{bare:!0,title:"Prezentacja"}},{path:"/moje-prezentacje/:slug/pilot",name:"presentation-remote",component:()=>ye(()=>import("./PresentationRemoteView-DV7C-xR6.js"),__vite__mapDeps([44,38,39,28,45,42,46,41,47])),props:!0,meta:{bare:!0,title:"Pilot"}},{path:"/pilot",name:"pilot",redirect:()=>Fp()},{path:"/prezentacje/:slugHash",name:"presentation-public",component:()=>ye(()=>import("./PresentationPublicView-CkLUkVMd.js"),__vite__mapDeps([48,28,37,38,39,40,49])),props:!0,meta:{public:!0,bare:!0,title:"Prezentacja"}},{path:"/connect",name:"connect",component:()=>ye(()=>import("./ConnectView-d3rdvEsh.js"),[]),meta:{title:"Połącz aplikację"}},{path:"/cast",name:"cast",component:()=>ye(()=>import("./CastReceiverView-6i1cNs5y.js"),__vite__mapDeps([50,38,39,28,37,40,46,42,51])),meta:{public:!0,bare:!0,cast:!0,title:"BM · TV"}},{path:"/:rest(.*)*",name:"notfound",component:()=>ye(()=>import("./NotFoundView-BpgWb5cH.js"),__vite__mapDeps([52,45])),meta:{title:"Nie znaleziono"}}]});vn.beforeEach(async e=>{const t=Ac();return e.meta.cast===!0&&et.clear(),t.ready||await t.restore(e),!e.meta.public&&!t.loggedIn?{name:"login",query:e.fullPath==="/"?{}:{redirect:e.fullPath}}:e.meta.guest&&t.loggedIn?{name:"dashboard"}:!0});vn.afterEach(e=>{const t=e.meta.title;document.title=t?`${t} · BM II°`:"BM II°"});const fe="/_bm/api/v1";function pl(e,t,n,s){return new Promise((r,o)=>{const i=new XMLHttpRequest;i.open("POST",`${fe}/materials/${e}/images`),i.setRequestHeader("Accept","application/json");const l=et.get();if(l&&i.setRequestHeader("Authorization",`Bearer ${l}`),i.upload.onprogress=c=>{c.lengthComputable&&c.total>0&&n?.(Math.min(100,Math.round(c.loaded/c.total*100)))},i.onload=()=>{let c=null;try{c=i.responseText?JSON.parse(i.responseText):null}catch{c=null}const u=c&&typeof c=="object"&&"data"in c?c.data:c;if(i.status>=200&&i.status<300&&u&&typeof u.id=="number"&&typeof u.url=="string"){r({id:u.id,url:u.url,name:String(u.name??t.name),size:Number(u.size??t.size),mime:String(u.mime??t.type)});return}const f=c??{},p=typeof f.message=="string"?f.message:typeof f.error=="string"?f.error:`Błąd ${i.status}`;o(new Ne(i.status,p,f.errors??{},c))},i.onerror=()=>o(new Ne(0,"Brak połączenia z serwerem.")),i.onabort=()=>o(new Ne(0,"Przerwano wysyłanie.")),s){if(s.aborted){o(new Ne(0,"Przerwano wysyłanie."));return}s.addEventListener("abort",()=>i.abort(),{once:!0})}const a=new FormData;a.append("file",t,t.name),i.send(a)})}async function Bp(e,t,n,s){const r=et.get();try{return await pl(e,t,n,s)}catch(o){if(!(o instanceof Ne)||o.status!==401||!r||s?.aborted)throw o;await U.request("/_user/api/v1/fetch").catch(()=>null);const i=et.get();if(!i||i===r)throw o;return n?.(0),pl(e,t,n,s)}}const Ae={dashboard:()=>U.request(`${fe}/dashboard`),courses:e=>U.request(`${fe}/courses`,{query:{semester:e}}),course:e=>U.request(`${fe}/courses/${e}`),schedule:(e,t)=>U.request(`${fe}/schedule`,{query:{from:e,to:t}}),meetings:()=>U.request(`${fe}/meetings`),deadlines:(e,t)=>U.request(`${fe}/deadlines`,{query:{from:e,to:t}}),readings:e=>U.request(`${fe}/readings`,{query:{course:e}}),markRead:e=>U.request(`${fe}/readings/${e}/progress`,{method:"PUT"}),unmarkRead:e=>U.request(`${fe}/readings/${e}/progress`,{method:"DELETE"}),markOwned:e=>U.request(`${fe}/readings/${e}/owned`,{method:"PUT"}),unmarkOwned:e=>U.request(`${fe}/readings/${e}/owned`,{method:"DELETE"}),materials:(e={})=>U.raw(`${fe}/materials`,{query:{...e}}),material:e=>U.request(`${fe}/materials/${e}`),materialAccess:e=>U.request(`${fe}/materials/${e}/access`),saveMaterialAccess:(e,t)=>U.request(`${fe}/materials/${e}/access`,{method:"PUT",body:t}),tags:()=>U.request(`${fe}/tags`),editMaterial:(e,t)=>U.request(`${fe}/materials/${e}`,{method:"PUT",body:t}),unpublishMaterial:e=>U.request(`${fe}/materials/${e}/unpublish`,{method:"POST"}),uploadMaterialImage:Bp,calendarFeed:()=>U.request(`${fe}/calendar-feed`),saveCalendarFeed:e=>U.request(`${fe}/calendar-feed`,{method:"PUT",body:e}),rotateCalendarFeed:()=>U.request(`${fe}/calendar-feed/rotate`,{method:"POST"}),deleteCalendarFeed:()=>U.request(`${fe}/calendar-feed`,{method:"DELETE"}),checklists:e=>U.request(`${fe}/checklists`,{query:{meeting:e}}),checklist:e=>U.request(`${fe}/checklists/${e}`),createChecklist:e=>U.request(`${fe}/checklists`,{method:"POST",body:e}),updateChecklist:(e,t)=>U.request(`${fe}/checklists/${e}`,{method:"PATCH",body:t}),deleteChecklist:e=>U.request(`${fe}/checklists/${e}`,{method:"DELETE"}),addChecklistItem:(e,t)=>U.request(`${fe}/checklists/${e}/items`,{method:"POST",body:t}),updateChecklistItem:(e,t)=>U.request(`${fe}/checklist-items/${e}`,{method:"PATCH",body:t}),deleteChecklistItem:e=>U.request(`${fe}/checklist-items/${e}`,{method:"DELETE"}),markChecklistItem:e=>U.request(`${fe}/checklist-items/${e}/done`,{method:"PUT"}),unmarkChecklistItem:e=>U.request(`${fe}/checklist-items/${e}/done`,{method:"DELETE"})},qp={"historia-koncepcje":"Historia / koncepcje wojny i pokoju",specjalnosc:"Specjalność"};function Gg(e){return qp[e]??e}function Yo(e){const t=new Map;for(const n of e){if(!n.elective_group)continue;const s=t.get(n.elective_group)??[];s.includes(n.name)||s.push(n.name),t.set(n.elective_group,s)}return[...t].map(([n,s])=>({code:n,options:s}))}function Up(e,t){const n={};for(const s of Yo(e)){const r=t[s.code];r&&s.options.includes(r)&&(n[s.code]=r)}return n}function Hp(e,t){if(!e.elective_group)return!1;const n=t[e.elective_group];return n!==void 0&&n!==e.name}function dc(e,t,n=!1){const s=new Set;if(n)return s;for(const r of e)Hp(r,t)&&s.add(r.id);return s}function Zr(e,t){return t.size===0?e:e.filter(n=>n.course_id===null||!t.has(n.course_id))}function Kp(e,t){return Yo(e).filter(n=>n.options.length>1&&!t[n.code])}function Wg(e,t){return!!e.elective_group&&!t[e.elective_group]}const ml="bm.showAllElectives";function gl(e){try{return localStorage.getItem(e)}catch{return null}}function yl(e,t){try{localStorage.setItem(e,t)}catch{}}const ls=Gt("electives",()=>{const e=X({}),t=X(gl(ml)==="1"),n=X(null),s=()=>n.value===null?null:`bm.electives.${n.value}`,r=()=>{const f=s();f&&yl(f,JSON.stringify(e.value))};function o(f){n.value=f;try{const p=JSON.parse(gl(`bm.electives.${f}`)??"{}");e.value=p&&typeof p=="object"?p:{}}catch{e.value={}}}const i=ne(()=>Object.keys(e.value).length>0);function l(f,p){const g={...e.value};p===null?delete g[f]:g[f]=p,e.value=g,r()}function a(f){t.value=f,yl(ml,f?"1":"0")}function c(f){const p=Up(f,e.value);Object.keys(p).length!==Object.keys(e.value).length&&(e.value=p,r())}function u(){e.value={},n.value=null}return{choices:e,showAll:t,userId:n,hasChoices:i,load:o,choose:l,setShowAll:a,prune:c,reset:u}}),Sn=Gt("toast",()=>{const e=X("");let t;function n(r,o=4e3){e.value=r,clearTimeout(t),t=setTimeout(()=>e.value="",o)}function s(){e.value=""}return{message:e,show:n,clear:s}});function xt(e){return e instanceof Ne?e.message:"Nie udało się wczytać danych."}function Cn(e){const t=jn(null),n=X(!1),s=X("");let r=null;function o(l=!1){return r||(t.value!==null&&!l?Promise.resolve():(n.value=!0,s.value="",r=e().then(a=>{t.value=a}).catch(a=>{s.value=xt(a)}).finally(()=>{n.value=!1,r=null}),r))}function i(){t.value=null,s.value="",n.value=!1,r=null}return{data:t,loading:n,error:s,load:o,reset:i}}const vl="2000-01-01",Zo=Gt("bm",()=>{const e=Cn(()=>Ae.courses()),t=Cn(()=>Ae.meetings()),n=Cn(()=>Ae.schedule(vl)),s=Cn(()=>Ae.deadlines(vl)),r=Cn(()=>Ae.readings()),o=Cn(()=>Ae.dashboard()),i=ne(()=>e.data.value),l=ne(()=>t.data.value),a=ne(()=>o.data.value),c=ls(),u=ne(()=>Yo(i.value??[])),f=ne(()=>Kp(i.value??[],c.choices)),p=ne(()=>dc(i.value??[],c.choices,c.showAll)),g=ne(()=>Zr(n.data.value??[],p.value)),v=ne(()=>Zr(s.data.value??[],p.value)),w=ne(()=>Zr(r.data.value??[],p.value)),S=ne(()=>r.data.value??[]),E=ne(()=>(i.value??[]).filter(H=>!p.value.has(H.id))),y=ne(()=>{const H=w.value,Se=H.filter(ee=>ee.is_required);return{total:H.length,read:H.filter(ee=>ee.read_at).length,requiredTotal:Se.length,requiredRead:Se.filter(ee=>ee.read_at).length}}),x=ne(()=>new Map((i.value??[]).map(H=>[H.id,H])));async function O(H=!1){await e.load(H),e.data.value&&c.prune(e.data.value)}async function N(H,Se){const ee=r.data.value,G=ee?.find(me=>me.id===H);if(!ee||!G)return;const re=G.read_at,$e=me=>{r.data.value=ee.map(Te=>Te.id===H?{...Te,read_at:me}:Te)};$e(Se?new Date().toISOString():null);try{const me=Se?await Ae.markRead(H):await Ae.unmarkRead(H);$e(me.read_at)}catch(me){$e(re),Sn().show(`Nie udało się zapisać zmiany. ${xt(me)}`)}}function Q(H,Se){const ee=r.data.value;ee&&(r.data.value=ee.map(G=>G.id===H?{...G,read_at:Se}:G))}async function $(H,Se){const ee=r.data.value,G=ee?.find(me=>me.id===H);if(!ee||!G)return;const re=G.owned_at,$e=me=>{r.data.value=ee.map(Te=>Te.id===H?{...Te,owned_at:me}:Te)};$e(Se?new Date().toISOString():null);try{const me=Se?await Ae.markOwned(H):await Ae.unmarkOwned(H);$e(me.owned_at)}catch(me){$e(re),Sn().show(`Nie udało się zapisać zmiany. ${xt(me)}`)}}const F=[e,t,n,s,r,o],B=ne(()=>F.some(H=>H.loading.value)),ie=ne(()=>F.find(H=>H.error.value)?.error.value??""),D=ne(()=>({courses:e.data.value!==null,meetings:t.data.value!==null,schedule:n.data.value!==null,deadlines:s.data.value!==null,readings:r.data.value!==null,dashboard:o.data.value!==null}));function Me(){for(const H of F)H.error.value&&H.load(!0)}function xe(){for(const H of F)H.reset()}return{courses:i,electiveGroups:u,pendingElectives:f,hidden:p,meetings:l,dashboard:a,schedule:g,deadlines:v,readings:w,allReadings:S,visibleCourses:E,readingStats:y,courseById:x,loading:B,error:ie,loaded:D,retry:Me,loadCourses:O,loadMeetings:(H=!1)=>t.load(H),loadSchedule:(H=!1)=>n.load(H),loadDeadlines:(H=!1)=>s.load(H),loadReadings:(H=!1)=>r.load(H),loadDashboard:(H=!1)=>o.load(H),toggleReading:N,toggleOwned:$,setReadAt:Q,reset:xe}}),Gp={lektura:"Lektura",artykul:"Artykuł",ksiazka:"Książka",prezentacja:"Prezentacja",zadanie:"Zadanie",inne:"Inne"},Jg=Object.keys(Gp);function Wp(e){const t=Math.floor(e/60),n=e%60;return t?n?`${t} h ${n} min`:`${t} h`:`${n} min`}function Jp(e){const t={total:0,done:0,percent:0,minutes_total:0,minutes_done:0,minutes_left:0};for(const n of e){const s=n.estimate_minutes??0;t.total++,t.minutes_total+=s,n.done?(t.done++,t.minutes_done+=s):t.minutes_left+=s}return t.minutes_total?t.percent=Math.floor(t.minutes_done*100/t.minutes_total):t.percent=t.total?Math.floor(t.done*100/t.total):0,t}function Yg(e){const t=`${e.done} z ${e.total}`;return e.minutes_left?`${t} · zostało ${Wp(e.minutes_left)}`:t}function Zg(e){const t=new Map;for(const s of e){const r=s.course?`c${s.course.id}`:"none";let o=t.get(r);o||(o={key:r,label:s.course?.name??"Ogólne",items:[]},t.set(r,o)),o.items.push(s)}const n=t.get("none");return t.delete("none"),n?[...t.values(),n]:[...t.values()]}function Qg(e){if(!e)return"";const t=new Date(e),n=s=>String(s).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function Xg(e){return e?e.replace("T"," "):null}const Yp=Gt("checklists",()=>{const e=X(null),t=X(""),n=X({}),s=X("");async function r(){t.value="";try{e.value=await Ae.checklists()}catch(y){t.value=xt(y)}}async function o(y){s.value="";try{i(await Ae.checklist(y))}catch(x){s.value=xt(x)}}function i(y){y.items||(y={...y,items:n.value[y.id]?.items??[]}),n.value={...n.value,[y.id]:y};const x={...y,items:void 0};e.value&&(e.value=e.value.some(O=>O.id===y.id)?e.value.map(O=>O.id===y.id?x:O):[...e.value,x])}function l(y,x){const O=n.value[y];O&&i({...O,items:x,progress:Jp(x)})}async function a(y){const x=await Ae.createChecklist(y);return i(x),x}async function c(y,x){i(await Ae.updateChecklist(y,x))}async function u(y){await Ae.deleteChecklist(y);const{[y]:x,...O}=n.value;n.value=O,e.value&&(e.value=e.value.filter(N=>N.id!==y))}function f(y,x){for(const O of Object.values(n.value))O.items?.some(N=>N.reading_id===y)&&l(O.id,O.items.map(N=>N.reading_id===y?{...N,done:x!==null,done_at:x}:N))}async function p(y,x){const O=n.value[y.checklist_id];if(!O?.items)return;const N=O.items,Q=$=>{if(y.reading_id!==null)f(y.reading_id,$);else{const F=n.value[y.checklist_id]?.items??N;l(y.checklist_id,F.map(B=>B.id===y.id?{...B,done:$!==null,done_at:$}:B))}};Q(x?new Date().toISOString():null);try{const $=x?await Ae.markChecklistItem(y.id):await Ae.unmarkChecklistItem(y.id);Q($.done_at),y.reading_id!==null&&Zo().setReadAt(y.reading_id,$.done_at)}catch($){l(y.checklist_id,N),Sn().show(`Nie udało się zapisać zmiany. ${xt($)}`)}}async function g(y,x){const O=await Ae.addChecklistItem(y,x),N=n.value[y];return N?.items&&l(y,[...N.items,O]),O}async function v(y,x){const O=await Ae.updateChecklistItem(y.id,x);if(O.checklist_id!==y.checklist_id){const Q=n.value[y.checklist_id];return Q?.items&&l(y.checklist_id,Q.items.filter($=>$.id!==y.id)),o(O.checklist_id),r(),O}const N=n.value[y.checklist_id];if(N?.items){const Q=N.items.map($=>$.id===y.id?O:$);l(y.checklist_id,Q.sort(($,F)=>$.sort_order-F.sort_order||$.id-F.id))}return O}async function w(y){await Ae.deleteChecklistItem(y.id);const x=n.value[y.checklist_id];x?.items&&l(y.checklist_id,x.items.filter(O=>O.id!==y.id))}async function S(y,x){const O=n.value[y.checklist_id]?.items;if(!O)return;const N=O.findIndex(B=>B.id===y.id),Q=O[N+x];if(!Q)return;const $=Q.sort_order===y.sort_order?N+x:Q.sort_order,F=Q.sort_order===y.sort_order?N:y.sort_order;try{await Promise.all([v(y,{sort_order:$}),v(Q,{sort_order:F})])}catch(B){Sn().show(`Nie udało się zmienić kolejności. ${xt(B)}`),o(y.checklist_id)}}function E(){e.value=null,n.value={},t.value="",s.value=""}return{list:e,listError:t,details:n,detailError:s,loadList:r,loadOne:o,create:a,update:c,remove:u,toggle:p,syncReading:f,addItem:g,updateItem:v,removeItem:w,move:S,reset:E}});function Zp(e,t){return[...dc(e,t,!1)].sort((n,s)=>n-s)}function Qp(e,t){if(e.length!==t.length)return!1;const n=[...e].sort((r,o)=>r-o),s=[...t].sort((r,o)=>r-o);return n.every((r,o)=>r===s[o])}async function ey(e){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0}catch{}try{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-1000px",document.body.appendChild(t),t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n}catch{return!1}}const hc=Gt("calendarFeed",()=>{const e=X(void 0),t=X(!1),n=X(!1),s=X(""),r=Zo(),o=ls();let i=Promise.resolve();function l(E){const y=i.then(E,E);return i=y.catch(()=>{}),y}async function a(E=!1){if(!(e.value!==void 0&&!E)){t.value=!0,s.value="";try{e.value=await Ae.calendarFeed()}catch(y){s.value=xt(y)}finally{t.value=!1}}}async function c(){await r.loadCourses();const E=r.courses;return E?Zp(E,o.choices):null}async function u(E){n.value=!0,s.value="";try{await l(E)}catch(y){s.value=xt(y)}finally{n.value=!1}}function f(){return u(async()=>{const E=await c();e.value=await Ae.saveCalendarFeed(E?{excluded_course_ids:E}:{})})}function p(E){return u(async()=>{e.value=await Ae.saveCalendarFeed(E)})}function g(){return u(async()=>{e.value=await Ae.rotateCalendarFeed()})}function v(){return u(async()=>{await Ae.deleteCalendarFeed(),e.value=null})}function w(){return l(async()=>{e.value===void 0&&await a();const E=e.value;if(!E)return;const y=await c();if(!(!y||Qp(y,E.excluded_course_ids)))try{e.value=await Ae.saveCalendarFeed({excluded_course_ids:y})}catch(x){Sn().show(`Nie udało się zaktualizować kalendarza. ${xt(x)}`)}})}bn(()=>o.choices,()=>{o.userId!==null&&w()});function S(){e.value=void 0,s.value="",t.value=!1,n.value=!1}return{feed:e,loading:t,busy:n,error:s,load:a,create:f,save:p,rotate:g,remove:v,sync:w,reset:S}}),js="/_bm/api/v1",ot="/_chat/api/v1";function _l(e,t,n){return new Promise((s,r)=>{const o=new XMLHttpRequest;o.open("POST",`${ot}/attachments`),o.setRequestHeader("Accept","application/json");const i=et.get();if(i&&o.setRequestHeader("Authorization",`Bearer ${i}`),o.upload.onprogress=a=>{a.lengthComputable&&a.total>0&&t?.(Math.min(100,Math.round(a.loaded/a.total*100)))},o.onload=()=>{let a=null;try{a=o.responseText?JSON.parse(o.responseText):null}catch{a=null}const c=a&&typeof a=="object"&&"data"in a?a.data:a;if(o.status>=200&&o.status<300&&c&&typeof c.id=="number"){s({id:c.id,filename:String(c.filename??e.name),size:Number(c.size??e.size)});return}const u=a??{};r(new Ne(o.status,typeof u.error=="string"?u.error:`Błąd ${o.status}`,u.errors??{}))},o.onerror=()=>r(new Ne(0,"Brak połączenia z serwerem.")),o.onabort=()=>r(new Ne(0,"Przerwano wysyłanie.")),n){if(n.aborted){r(new Ne(0,"Przerwano wysyłanie."));return}n.addEventListener("abort",()=>o.abort(),{once:!0})}const l=new FormData;l.append("file",e,e.name),o.send(l)})}async function Xp(e,t,n){const s=et.get();try{return await _l(e,t,n)}catch(r){if(!(r instanceof Ne)||r.status!==401||!s||n?.aborted)throw r;await U.request("/_user/api/v1/fetch").catch(()=>null);const o=et.get();if(!o||o===s)throw r;return t?.(0),_l(e,t,n)}}async function em(e,t,n){const s=await U.blob(`${ot}/attachments/${e}/${t}`),r=URL.createObjectURL(new Blob([s],{type:"application/octet-stream"})),o=document.createElement("a");o.href=r,o.download=n||"plik",o.rel="noopener",o.style.display="none",document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(r),3e4)}const Fe={bootstrap:()=>U.request(`${js}/chat`),members:()=>U.request(`${js}/chat/members`),messages:(e,{limit:t=50,before:n}={})=>U.request(`${ot}/conversations/${e}/messages`,{query:{limit:t,before:n}}),send:(e,t)=>U.request(`${ot}/conversations/${e}/messages`,{method:"POST",body:t}),message:e=>U.request(`${ot}/messages/${e}`),markRead:e=>U.request(`${ot}/conversations/${e}/read`,{method:"POST"}),typing:e=>U.request(`${ot}/conversations/${e}/typing`,{method:"POST"}),edit:(e,t)=>U.request(`${ot}/messages/${e}`,{method:"PUT",body:{content:t}}),remove:e=>U.request(`${ot}/messages/${e}`,{method:"DELETE"}),reactions:()=>U.request(`${ot}/reactions`),addReaction:(e,t)=>U.request(`${ot}/messages/${e}/reactions`,{method:"POST",body:{key:t}}),removeReaction:(e,t)=>U.request(`${ot}/messages/${e}/reactions/${encodeURIComponent(t)}`,{method:"DELETE"}),embeds:(e,t="")=>U.request(`${js}/chat/embeds`,{query:{type:e,q:t.trim()}}),resolveEmbeds:e=>U.request(`${js}/chat/embeds/resolve`,{method:"POST",body:{refs:e}}),upload:Xp,download:em,startDm:e=>U.request(`${ot}/contexts/bm/1/dm`,{method:"POST",body:{user_id:e}})};function Lt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ge(e){return typeof e=="number"&&Number.isInteger(e)&&e>0?e:null}function tm(e){return Lt(e)?Ge(e.id)!==null&&Ge(e.conversation_id)!==null&&Ge(e.sender_id)!==null&&typeof e.created_at=="string"&&(e.content===null||typeof e.content=="string")&&Array.isArray(e.attachments):!1}function nm(e){if(!Lt(e)||typeof e.event!="string")return null;const t=e.payload;switch(e.event){case"created.chat.message":{if(!Lt(t))return null;const n=Ge(t.id),s=Ge(t.conversation_id),r=Ge(t.sender_id);return n===null||s===null||r===null?null:{kind:"created",id:n,conversationId:s,senderId:r}}case"chat:message":{if(!Lt(t)||!tm(t.message))return null;const n=Ge(t.conversation_id);return n===null||n!==t.message.conversation_id?null:{kind:"chatMessage",conversationId:n,message:t.message}}case"typing.chat.message":{if(!Lt(t)||t.action!=="typing-start")return null;const n=Ge(t.conversation_id),s=Ge(t.user_id);return n===null||s===null?null:{kind:"typing",conversationId:n,userId:s}}case"chat:read":{if(!Lt(t))return null;const n=Ge(t.conversation_id),s=Ge(t.user_id);return n===null||s===null?null:{kind:"read",conversationId:n,userId:s}}case"chat:unread":return!Lt(t)||typeof t.count!="number"||!Number.isInteger(t.count)||t.count<0?null:{kind:"unread",count:t.count};case"mentions.changed":return{kind:"mentions"};case"reacted.chat.message":{if(!Lt(t))return null;const n=Ge(t.id),s=Ge(t.conversation_id),r=Ge(t.user_id);return n===null||s===null||r===null||typeof t.key!="string"||t.key===""||t.action!=="added"&&t.action!=="removed"?null:{kind:"reacted",id:n,conversationId:s,userId:r,key:t.key,added:t.action==="added"}}case"updated.chat.message":case"deleted.chat.message":{if(!Lt(t))return null;const n=Ge(t.id),s=Ge(t.conversation_id);return n===null||s===null?null:{kind:e.event==="updated.chat.message"?"updated":"deleted",id:n,conversationId:s}}default:return null}}function sm(e,t){if(e.kind!=="created")return!1;const n=t[e.conversationId];return!!n&&!n.some(s=>s.id===e.id)}function rm(e,t,{seen:n}){const s={id:t.id,sender_id:t.sender_id,content:t.content??"",created_at:t.created_at},r=e.findIndex(a=>a.id===t.conversation_id);if(r===-1)return[{id:t.conversation_id,type:"dm",other_user_id:t.sender_id,unread:n?0:1,last_message:s},...e];const o=e[r];if(o.last_message&&o.last_message.id===t.id)return e;const i=!o.last_message||Date.parse(t.created_at)>=Date.parse(o.last_message.created_at),l={...o,unread:n?o.unread:o.unread+1,last_message:i?s:o.last_message};return e.map((a,c)=>c===r?l:a)}function Qr(e,t,n,s,r=[]){const o=e?[...e]:[],i=o.findIndex(c=>c.key===t),l=i>=0&&o[i].user_ids.includes(n);if(s===l)return e||o;if(s){if(i>=0)return o[i]={...o[i],count:o[i].count+1,user_ids:[...o[i].user_ids,n]},o;const c={key:t,count:1,user_ids:[n]},u=p=>{const g=r.indexOf(p);return g<0?r.length:g};let f=o.length;return r.includes(t)&&(f=o.findIndex(p=>u(p.key)>u(t)),f<0&&(f=o.length)),o.splice(f,0,c),o}const a=o[i].user_ids.filter(c=>c!==n);return a.length===0?o.splice(i,1):o[i]={...o[i],count:Math.max(0,o[i].count-1),user_ids:a},o}const om=["svg","svgz","html","htm","xhtml","xml"],im=["image/svg+xml","text/html","application/xhtml+xml","text/xml","application/xml"];function bl(e){const t=e/1048576;return Number.isInteger(t)?String(t):(Math.floor(t*10)/10).toFixed(1).replace(".",",")}function lm(e){const t=e.name.lastIndexOf("."),n=(t>=0?e.name.slice(t+1):e.name).toLowerCase();if(om.includes(n))return!0;const s=(e.type||"").split(";")[0].trim().toLowerCase();return im.includes(s)}function am(e,t,n,s=0){const r=[],o=[];let i=!1,l=!1,a=!1,c=s;for(const u of e){if(lm(u)){i=!0;continue}if(t.max_bytes>0&&u.size>t.max_bytes){o.push(`Plik „${u.name}” jest za duży. Limit to ${bl(t.max_bytes)} MB.`);continue}if(n+r.length>=t.max_files){l=!0;continue}if(t.max_bytes>0&&c+u.size>t.max_bytes){a=!0;continue}c+=u.size,r.push(u)}return a&&o.unshift(`Załączniki jednej wiadomości mogą mieć razem najwyżej ${bl(t.max_bytes)} MB.`),i&&o.unshift("Plików SVG, HTML i XML nie można wysyłać na czacie."),l&&o.unshift(`Możesz dołączyć najwyżej ${t.max_files} plików do jednej wiadomości.`),{accepted:r,errors:o}}const cm=["deadline","class","reading"],To=3,ty={deadline:"Termin",class:"Zajęcia",reading:"Lektura"};function tn(e){return`${e.type}:${e.id}`}function um(e){return typeof e=="string"&&cm.includes(e)}function pc(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>0}function fm(e){if(!e||typeof e!="object")return!1;const t=e;return um(t.type)&&pc(t.id)}function dm(e,t=To){const n=e?.metadata?.embeds;if(!Array.isArray(n))return[];const s=[],r=new Set;for(const o of n){if(s.length>=t)break;if(!fm(o))continue;const i={type:o.type,id:o.id},l=tn(i);r.has(l)||(r.add(l),s.push(i))}return s}function mc(e){switch(e.type){case"deadline":return`/terminarz#termin-${e.id}`;case"class":return`/plan#zajecia-${e.id}`;case"reading":return`/lektury#lektura-${e.id}`}}function hm(e,t=""){return e.map(n=>t+mc(n)).join(` +`)}function ny(e,t){if(!e||!t.length)return!1;const n=e.trim().split(` +`);return n.length!==t.length?!1:n.every((s,r)=>{const o=mc(t[r]);return s===o?!0:s.endsWith(o)?/^https?:\/\/[^/\s]+$/i.test(s.slice(0,s.length-o.length)):!1})}function sy(e){switch(e.type){case"deadline":return e.deadline.title;case"class":return e.session.course?.name??"";case"reading":return e.reading.title}}function ry(e){switch(e.type){case"deadline":return`/terminarz#termin-${e.id}`;case"class":{const t=e.session;return t.meeting_number?`/plan?zjazd=${t.meeting_number}#zajecia-${e.id}`:`/przedmioty/${t.course_id}`}case"reading":return`/lektury#lektura-${e.id}`}}function oy(e){switch(e.type){case"deadline":{const t=e.deadline,n=[Ap(t.due_at),Op[t.kind]??t.kind];return t.course?.name&&n.push(t.course.name),n.join(" · ")}case"class":{const t=e.session,n=[`${Tp(t.starts_at)}, ${Eo(t.starts_at)}–${Eo(t.ends_at)}`];return t.course?.form&&n.push(Cp[t.course.form]??t.course.form),t.is_online?n.push("online"):t.room&&n.push(`sala ${t.room}`),n.join(" · ")}case"reading":{const t=e.reading;return[t.author,t.course?.name].filter(n=>!!n).join(" · ")}}}function wl(e,t){const n=cc(e,t);return{text:Mp(e,t),warn:n>=0&&n<=14}}function iy(e,t=new Date){switch(e.type){case"deadline":return wl(e.deadline.due_at,t);case"class":return wl(e.session.starts_at,t);case"reading":return e.reading.is_required?{text:"obowiązkowa",warn:!1}:null}}const pm=[{path:"/terminarz",hash:/^#termin-([1-9]\d{0,15})$/,type:"deadline"},{path:"/plan",hash:/^#zajecia-([1-9]\d{0,15})$/,type:"class"},{path:"/lektury",hash:/^#lektura-([1-9]\d{0,15})$/,type:"reading"}];function gc(e,t){const n=e.trim();if(!n||!/^https?:\/\//i.test(n)&&(!n.startsWith("/")||n.startsWith("//")))return null;let r;try{r=new URL(n,t)}catch{return null}if(r.origin!==t)return null;for(const o of pm){if(r.pathname!==o.path)continue;const i=o.hash.exec(r.hash);if(!i)return null;const l=Number(i[1]);return pc(l)?{type:o.type,id:l}:null}return null}const mm=/https?:\/\/[^\s<>"'`]+|(?"'`]+/gi;function gm(e,t){const n=[],s=new Set;for(const r of e.matchAll(mm)){const o=r[0].replace(/[.,;:!?)\]}"'”»]+$/,""),i=gc(o,t);if(!i)continue;const l=tn(i);s.has(l)||(s.add(l),n.push(i))}return n}function ly(e,t){const n=gm(e,t);return n.length?{insertText:e.trim().split(/\s+/).every(o=>gc(o,t)!==null)?"":e,refs:n}:{insertText:e,refs:n}}const ym="/ws",vm="/api/realtime/token",_m=new Set([401,403,404]);function yc(e){return _m.has(e)}const bm=1;function wm(e=window.location){return`${e.protocol==="https:"?"wss":"ws"}://${e.host}${ym}`}function Em(e){const t=String(e);return t==="connected"||t==="connecting"?t:"disconnected"}function Ro(e){if(!e||typeof e.client!="string")return null;const t=Number(e.user);return!Number.isInteger(t)||t<=0?null:{client:e.client,user:t}}let Vt=null,In=null,ys="disconnected",Ss=!1,tr=null,Ao=null,En=0;const rn=new Map,Mo=new Set,Bs=new Set;function vc(e){ys=e;for(const t of[...Mo])t(e)}function Sm(){Ss=!0;for(const e of[...Bs])e()}function ay(e){tr=e}function Tm(e,t){return e instanceof Ne&&yc(e.status)&&Ao?new Ao(t):e}function cy(){return Ss}function _c(e){return Mo.add(e),()=>{Mo.delete(e)}}function bc(e){return Bs.add(e),Ss&&queueMicrotask(()=>Bs.has(e)&&e()),()=>{Bs.delete(e)}}function Rm(){if(Vt)return ys==="disconnected"&&!Ss&&Vt.connect(),Promise.resolve(Vt);if(In)return In;const e=En;return In=(async()=>{try{const{Centrifuge:t,UnauthorizedError:n}=await ye(async()=>{const{Centrifuge:r,UnauthorizedError:o}=await import("./index-B53bcf0x.js");return{Centrifuge:r,UnauthorizedError:o}},[]);if(e!==En)throw new Error("realtime: disconnected while loading");Ao=n;const s=new t(wm(),{minReconnectDelay:500,maxReconnectDelay:1e4,getToken:async()=>{try{const r=tr;let o;if(r?o=await r.connection():o=(await U.request(vm))?.token,typeof o!="string"||o==="")throw new Error("realtime: empty token");return o}catch(r){throw r instanceof Ne&&yc(r.status)?(Sm(),new n("realtime unavailable")):r}}});return s.on("state",r=>{Vt===s&&vc(Em(r.newState))}),Vt=s,s.connect(),s}finally{e===En&&(In=null)}})(),In}function On(e,t){for(const n of[...e.hooks])t(n)}function Am(e,t){return tr?.subscription?e.newSubscription(t,{getToken:async()=>{const n=tr;if(!n?.subscription)throw new Error("realtime: no subscription token source");try{const s=await n.subscription(t);if(typeof s!="string"||s==="")throw new Error("realtime: empty subscription token");return s}catch(s){throw Tm(s,"subscription refused")}}}):e.newSubscription(t)}function Mm(e,t,n){let s=rn.get(t);if(s)String(s.sub.state)==="subscribed"&&queueMicrotask(()=>s?.hooks.has(n)&&n.onSubscribed?.());else{const r=e.getSubscription(t)??Am(e,t),o={sub:r,hooks:new Set};r.on("publication",i=>On(o,l=>l.onPublication?.(i.data))),r.on("subscribed",()=>On(o,i=>i.onSubscribed?.())),r.on("unsubscribed",i=>{i.code>=400?On(o,l=>l.onDenied?.(i.code)):i.code===bm&&On(o,l=>l.onDenied?.(401))}),r.on("join",i=>{const l=Ro(i.info);l&&On(o,a=>a.onJoin?.(l))}),r.on("leave",i=>{const l=Ro(i.info);l&&On(o,a=>a.onLeave?.(l))}),rn.set(t,o),r.subscribe(),s=o}return s.hooks.add(n),s}function wc(e,t){t.sub.removeAllListeners(),t.sub.unsubscribe(),Vt?.removeSubscription(t.sub),rn.delete(e)}async function qs(e,t){const n=await Rm(),s={...t},r=En;Mm(n,e,s);let o=!1;return{close(){if(o)return;o=!0;const i=rn.get(e);r!==En||!i||!i.hooks.delete(s)||i.hooks.size>0||(wc(e,i),rn.size===0&&Vt===n&&n.disconnect())},resubscribe(){o||r!==En||rn.get(e)?.sub.subscribe()}}}async function xm(e){const t=rn.get(e);if(!t)return null;try{const n=await t.sub.presence();return Object.values(n.clients??{}).map(s=>Ro(s)).filter(s=>s!==null)}catch{return null}}function Cm(){En++,In=null;for(const[t,n]of[...rn])wc(t,n);const e=Vt;Vt=null,Ss=!1,e&&(e.disconnect(),e.removeAllListeners()),ys!=="disconnected"&&vc("disconnected")}async function uy(e,t){const n=_c(i=>t.onConnection?.(i)),s=bc(()=>t.onUnavailable?.());let r;try{r=await qs(e,{onPublication:i=>t.onPublication(i),onSubscribed:()=>t.onSubscribed?.(),onDenied:i=>t.onDenied?.(i)})}catch(i){throw n(),s(),i}ys==="connected"&&t.onConnection?.(ys);let o=!1;return{close(){o||(o=!0,n(),s(),r.close())},resubscribe(){o||r.resubscribe()}}}const Om={max_files:5,max_bytes:62914560};function Pm(e){return`Nie udało się wysłać pliku „${e}”.`}const km=Object.freeze({text:"",error:"",sending:!1,embeds:Object.freeze([]),files:Object.freeze([])}),El=50;function Im(){return typeof window<"u"&&window.location?window.location.origin:""}function Dm(e){const t=e instanceof Ne?e.status:-1;return t===0?"Nie wysłano: brak połączenia z internetem. Spróbuj ponownie.":t===429?"Za dużo wiadomości w krótkim czasie. Odczekaj chwilę i wyślij ponownie.":t===403||t===404?"Nie masz już dostępu do tej rozmowy.":t===400||t===422?"Tej wiadomości nie da się wysłać. Sprawdź treść i załączniki.":"Nie wysłano wiadomości. Spróbuj ponownie."}function Lm(e){return e instanceof Ne&&e.status===429?"Za dużo nowych rozmów w krótkim czasie. Odczekaj minutę i spróbuj ponownie.":e instanceof Ne&&e.status===0?"Brak połączenia z internetem. Spróbuj ponownie.":"Nie udało się rozpocząć rozmowy. Spróbuj ponownie."}const Nm=15e3,$m=6e4,jm=500,Qt=50,zm="Nie udało się wczytać starszych wiadomości.",Vm=3e3,Fm=6e3,Sl={add:"Nie udało się dodać reakcji.",remove:"Nie udało się cofnąć reakcji."},Tl="Nie udało się zapisać zmian. Spróbuj ponownie.",Bm="Nie udało się usunąć wiadomości. Spróbuj ponownie.";function Ec(e){e.deleted_at=e.deleted_at??new Date().toISOString(),e.content=null,e.reactions=[],e.attachments=[],e.metadata=void 0}function qm(e,t,n){const s=new Set(t.map(o=>o.id)),r=t.lengthn||Ec(o)}const Rl=e=>`chat:conversation:${e}`;function Um(){return typeof document>"u"||typeof document.hasFocus!="function"||document.hasFocus()}function Al(e,t){if(e.some(s=>s.id===t.id))return!1;let n=e.length;for(;n>0&&e[n-1].id>t.id;)n--;return e.splice(n,0,t),!0}const Sc=e=>`bm.chat.member.${e}`;function Tc(){try{return globalThis.localStorage??null}catch{return null}}function Hm(e){try{const t=Tc()?.getItem(Sc(e));return t==="1"?!0:t==="0"?!1:void 0}catch{return}}function Km(e,t){try{Tc()?.setItem(Sc(e),t?"1":"0")}catch{}}const Rc=Gt("chat",()=>{const e=X(null),t=X(void 0),n=X(!1),s=X(null),r=X([]),o=X(null),i=X(null),l=X("general"),a=X(""),c=X({}),u=X({}),f=X({}),p=X({}),g=X({}),v=jn(new Map),w=X("idle"),S=X("idle"),E=X("idle"),y=X(!1),x=X({}),O=X({}),N=X({}),Q=jn(new Map),$=X(!1),F=X({}),B=X(null),ie=X({});let D=0,Me=null,xe=null,H=null;const Se=new Map,ee=new Map,G=new Set;let re=null,$e=0;const me=new Map,Te=new Map;let ke=!1,yt=null,vt=null,rt=null,He=null,C=0,q=[],z=null,K=null;const oe=new Set,h=new Map,m=new Map,_=new Map,A=new Set;let M=null;const T=new Map,j=new Map,I=ne(()=>s.value?.conversation_id??null);function L(d){return d===I.value?s.value?.unread??0:r.value.find(b=>b.id===d)?.unread??0}function P(d){return d===I.value?s.value?.mentions??0:0}const Y=ne(()=>r.value.reduce((d,b)=>d+(b.unread>0?b.unread:0),0)),V=ne(()=>t.value?Math.max(0,s.value?.unread??0)+Y.value:0),W=ne(()=>t.value?Math.max(0,s.value?.mentions??0):0),te=ne(()=>{const d=new Map;for(const b of v.value.values())b.handle&&d.set(b.handle,b);return d}),ae=ne(()=>e.value!==null?v.value.get(e.value)?.handle??null:null),pe=ne(()=>[...new Set(Q.value.values())].filter(d=>d!==e.value).sort((d,b)=>d-b)),ge=ne(()=>pe.value.length+1);function Ie(d){return $.value&&pe.value.includes(d)}function je(d){return E.value==="unavailable"?[]:F.value[d]??[]}const ut=ne(()=>[...r.value].sort((d,b)=>{const R=d.last_message?Date.parse(d.last_message.created_at):-1/0;return(b.last_message?Date.parse(b.last_message.created_at):-1/0)-R||b.id-d.id}));function ft(d){if(!d.member){ai(),t.value=!1,n.value=!1,s.value=null,r.value=[],o.value=null,i.value=null,l.value="general",c.value={};return}t.value=!0,n.value=d.moderator,s.value=d.general,r.value=(d.conversations??[]).map(R=>({...R})),o.value=d.limits;for(const R of[..._.keys(),...A])Qo(R);i.value!==null&&(i.value===d.general.conversation_id||r.value.some(R=>R.id===i.value))||(i.value=d.general.conversation_id,l.value==="dm"&&(l.value="general"))}function _t(){if(Me)return Me;const d=D,b=S.value==="ready";return b||(S.value="loading"),Me=(async()=>{try{const R=await Fe.bootstrap();if(d!==D)return;ft(R),e.value!==null&&Km(e.value,R.member),S.value="ready"}catch{d===D&&!b&&(S.value="error")}finally{d===D&&(Me=null)}})(),Me}async function Ts(d){e.value!==d&&(ci(),e.value=d),t.value===void 0&&(t.value=Hm(d));const b=D;await _t(),!(b!==D||!t.value)&&(si(),ri(),Pc(),uu(),i.value!==null&&l.value!=="dms"&&await Je(i.value))}async function Ke(d){const b=D;u.value[d]=!0,f.value[d]="";try{const R=await Fe.messages(d,{limit:Qt});if(b!==D)return;c.value[d]=R,x.value[d]=R.length{try{const J=c.value[d]?.at(-1)?.id??0,ce=await Fe.messages(d,{limit:Qt});if(R!==D)return;const de=c.value[d],le=de?.at(-1)?.id??0;if(!de||ce.length>=Qt&&ce[0].id>le){c.value[d]=ce,f.value[d]="",x.value[d]=ce.length[bt.id,bt]));for(const bt of ce)ue.set(bt.id,bt);c.value[d]=[...ue.values()].sort((bt,an)=>bt.id-an.id)}catch{}finally{R===D&&h.delete(d)}})();return h.set(d,k),k}async function Rs(d){const b=c.value[d];if(!b?.length||O.value[d]||x.value[d])return;const R=D;O.value[d]=!0,N.value[d]="";try{const k=await Fe.messages(d,{limit:Qt,before:b[0].id});if(R!==D)return;const J=c.value[d]??[],ce=new Set(J.map(de=>de.id));c.value[d]=[...k.filter(de=>!ce.has(de.id)),...J],x.value[d]=k.lengthR.id===d);b&&(b.unread=0)}function Oc(d){const b=c.value[d]?.at(-1)?.id??0;if(!(L(d)>0||P(d)>0||b>(m.get(d)??0))||(Qo(d),m.set(d,b),_.has(d)))return;const k=D;_.set(d,setTimeout(()=>{_.delete(d),k===D&&(A.add(d),Fe.markRead(d).catch(()=>{}).finally(()=>{k===D&&A.delete(d)}))},jm))}function Pc(){M||typeof document>"u"||(M=()=>{document.visibilityState==="visible"&&t.value&&Hn()},document.addEventListener("visibilitychange",M))}function Xo(){return l.value==="dms"?null:i.value}function kc(d){return i.value===d&&l.value!=="dms"&&y.value&&Um()}function ei(d){const b=c.value[d.conversation_id];b&&Al(b,d);const R=r.value.find(k=>k.id===d.conversation_id);R&&(!R.last_message||Date.parse(d.created_at)>=Date.parse(R.last_message.created_at))&&(R.last_message={id:d.id,sender_id:d.sender_id,content:d.content??"",created_at:d.created_at})}async function Ic(){l.value="general",I.value!==null&&await Je(I.value)}function Dc(){l.value="dms",a.value="",kr()}async function Tr(d){l.value="dm",await Je(d)}function ti(d){return r.value.find(b=>b.other_user_id===d)}async function Lc(d){a.value="";const b=ti(d);if(b)return await Tr(b.id),b.id;const R=D;try{const k=await Fe.startDm(d);return R!==D?null:(r.value.some(J=>J.id===k.id)||r.value.unshift({id:k.id,type:k.type||"dm",other_user_id:d,unread:0,last_message:null}),await Tr(k.id),k.id)}catch(k){return R===D&&(a.value=Lm(k)),null}}function Rr(d){return d!==null&&p.value[d]||km}function As(d){return p.value[d]||(p.value[d]={text:"",error:"",sending:!1,embeds:[],files:[]}),p.value[d]}function Ar(d){return Rr(d).files.some(b=>b.state==="uploading")}function Nc(d){const b=Rr(d);return b.sending||Ar(d)?!1:b.text.trim()!==""||b.embeds.length>0||b.files.some(R=>R.state==="done")}function ni(d,b){const R=me.get(b),k=p.value[d]?.files.find(le=>le.localId===b);if(!R||!k)return;k.state="uploading",k.progress=0,k.id=null;const J=new AbortController;Te.set(b,J);const ce=D,de=()=>p.value[d]?.files.find(le=>le.localId===b);Fe.upload(R,le=>{const ue=de();ce===D&&ue&&ue.state==="uploading"&&(ue.progress=le)},J.signal).then(le=>{const ue=de();ce!==D||!ue||J.signal.aborted||(ue.state="done",ue.progress=100,ue.id=le.id)}).catch(()=>{const le=de();if(ce!==D||!le||J.signal.aborted)return;le.state="failed";const ue=p.value[d];ue&&(ue.error=Pm(le.name))}).finally(()=>{Te.get(b)===J&&Te.delete(b)})}function $c(d,b){const R=As(d),k=R.files.reduce((de,le)=>de+le.size,0),{accepted:J,errors:ce}=am(b,o.value??Om,R.files.length,k);R.error=ce.join(" ");for(const de of J){const le=++$e;me.set(le,de),R.files.push({localId:le,name:de.name,size:de.size,progress:0,state:"uploading",id:null}),ni(d,le)}return ce}function jc(d,b){const R=p.value[d]?.files.find(J=>J.localId===b);if(!R||R.state!=="failed")return;const k=p.value[d];k&&(k.error=""),ni(d,b)}function zc(d,b){Te.get(b)?.abort(),Te.delete(b),me.delete(b);const R=p.value[d];R&&(R.files=R.files.filter(k=>k.localId!==b))}const Ms=ne(()=>Math.min(o.value?.max_embeds||To,To));function Vc(d,b,R){const k=As(d),J=tn(b);return k.embeds.some(ce=>tn(ce)===J)||k.embeds.length>=Ms.value?!1:(k.embeds.push({type:b.type,id:b.id}),k.error="",R?ie.value[J]=R:Mr([b]),!0)}function Fc(d,b){const R=p.value[d];if(!R)return;const k=tn(b);R.embeds=R.embeds.filter(J=>tn(J)!==k)}function Bc(d){return ie.value[tn(d)]}function Mr(d,b=!1){for(const R of d){const k=tn(R);G.has(k)||ee.has(k)||!b&&k in ie.value||ee.set(k,{type:R.type,id:R.id})}if(!ee.size)return re??Promise.resolve();if(!re){const R=D;re=Promise.resolve().then(async()=>{const k=[...ee.entries()];ee.clear(),re=null;for(const[J]of k)G.add(J);for(let J=0;Jle));if(R!==D)return;for(const[le]of ce){const ue=de&&typeof de=="object"?de[le]:void 0;ie.value[le]=ue??null}}catch{}finally{if(R===D)for(const[de]of ce)G.delete(de)}}})}return re}function qc(d,b=!1){const R=[];for(const k of d??[])k.deleted_at||R.push(...dm(k,Ms.value));return Mr(R,b)}function Uc(d,b){const R=As(d);R.text=b,R.error=""}async function Hc(d=i.value){if(d===null)return!1;const b=As(d),R=b.embeds.slice(0,Ms.value),k=b.files.filter(ue=>ue.state==="done"&&ue.id!==null),J=k.map(ue=>ue.id);let ce=b.text.trim();if(!ce&&!R.length&&!J.length||b.sending||Ar(d))return!1;!ce&&!J.length&&(ce=hm(R,Im()));const de={content:ce};J.length&&(de.attachment_ids=J),R.length&&(de.metadata={embeds:R.map(ue=>({type:ue.type,id:ue.id}))}),b.sending=!0,b.error="";const le=D;try{const ue=await Fe.send(d,de);if(le!==D)return!1;ei(ue),b.text="",b.embeds=[];const bt=new Set(k.map(an=>an.localId));for(const an of bt)me.delete(an);return b.files=b.files.filter(an=>!bt.has(an.localId)),!0}catch(ue){return le!==D||(b.error=Dm(ue),ue instanceof Ne&&(ue.status===403||ue.status===404)&&_t()),!1}finally{b.sending=!1}}function Kc(d,b){g.value[d]={...b}}function Gc(d){return g.value[d]??null}function si(d=!1){if(xe)return xe;if(w.value==="ready"&&!d)return Promise.resolve();const b=D;return w.value="loading",xe=(async()=>{try{const R=await Fe.members();if(b!==D)return;v.value=new Map(R.map(k=>[k.id,k])),w.value="ready"}catch{b===D&&(w.value="error")}finally{b===D&&(xe=null)}})(),xe}function ri(){if(B.value!==null)return Promise.resolve();if(H)return H;const d=D;return H=(async()=>{try{const b=await Fe.reactions();d===D&&(B.value=Array.isArray(b)?b.filter(R=>typeof R=="string"&&R!==""):[])}catch{}finally{d===D&&(H=null)}})(),H}function An(d,b){return c.value[d]?.find(R=>R.id===b)}async function Wc(d,b){const R=e.value,k=An(d.conversation_id,d.id);if(R===null||!k||k.deleted_at)return;const J=!(k.reactions??[]).some(le=>le.key===b&&le.user_ids.includes(R));k.reactions=Qr(k.reactions,b,R,J,B.value??[]);const ce=(Se.get(k.id)??0)+1;Se.set(k.id,ce);const de=D;try{const le=J?await Fe.addReaction(k.id,b):await Fe.removeReaction(k.id,b);if(de!==D||Se.get(k.id)!==ce)return;const ue=An(d.conversation_id,d.id);ue&&!ue.deleted_at&&(ue.reactions=le.reactions??[])}catch{if(de!==D)return;const le=An(d.conversation_id,d.id);le&&(le.reactions=Qr(le.reactions,b,R,!J,B.value??[])),Sn().show(J?Sl.add:Sl.remove)}finally{de===D&&Se.get(k.id)===ce&&Se.delete(k.id)}}function Jc(d){return e.value!==null&&d.sender_id===e.value&&!d.deleted_at&&d.type==="text"}function Yc(d){return e.value===null||d.deleted_at?!1:d.sender_id===e.value?!0:n.value&&I.value!==null&&d.conversation_id===I.value}function oi(d){const b=c.value[d.conversation_id],R=b?b.findIndex(J=>J.id===d.id):-1;b&&R>=0&&(b[R]=d);const k=r.value.find(J=>J.id===d.conversation_id);k?.last_message?.id===d.id&&(k.last_message={...k.last_message,content:d.content??""})}function xs(d,b){const R=An(d,b);R&&Ec(R);const k=r.value.find(J=>J.id===d);k?.last_message?.id===b&&(k.last_message={...k.last_message,content:""})}async function Zc(d,b){const R=b.trim();if(R===(d.content??"").trim())return null;if(!R)return Tl;const k=D;try{const J=await Fe.edit(d.id,R);return k===D&&oi(J),null}catch{return Tl}}async function Qc(d){const b=D;try{return await Fe.remove(d.id),b===D&&xs(d.conversation_id,d.id),null}catch(R){return R instanceof Ne&&R.status===404?(b===D&&xs(d.conversation_id,d.id),null):Bm}}async function Xc(d,b){if(!An(d,b))return;const R=D;try{const k=await Fe.message(b);if(R!==D)return;k.deleted_at?xs(d,b):oi(k)}catch{}}function Hn(){return _t()}async function eu(d){if(oe.has(d))return;oe.add(d);const b=D;try{const R=await Fe.message(d);b===D&&ei(R)}catch{}finally{b===D&&oe.delete(d)}}function tu(d){const b=d.conversation_id;Or(b,d.sender_id);const R=kc(b),k=c.value[b];if(k&&Al(k,d),b===I.value){s.value&&!R&&(s.value.unread+=1);return}r.value=rm(r.value,d,{seen:R})}function nu(d){switch(d.kind){case"created":Or(d.conversationId,d.senderId),sm(d,c.value)&&eu(d.id);return;case"typing":ou(d.conversationId,d.userId);return;case"chatMessage":tu(d.message);return;case"mentions":Hn();return;case"updated":Xc(d.conversationId,d.id);return;case"deleted":xs(d.conversationId,d.id);return;case"reacted":{const b=An(d.conversationId,d.id);b&&!b.deleted_at&&(b.reactions=Qr(b.reactions,d.key,d.userId,d.added,B.value??[]));return}default:return}}function xr(d){const b=nm(d);b&&nu(b)}function Cr(){const d=Xo();d!==null&&c.value[d]!==void 0&&Rn(d),Hn()}function su(d){if(!(E.value==="idle"||E.value==="unavailable")){if(d==="connected"){E.value="connected";return}$.value=!1,Pr(),E.value=E.value==="connected"||E.value==="reconnecting"?"reconnecting":"connecting"}}function ru(){ii(),z=setInterval(()=>{const d=Xo();d!==null&&Rn(d)},Nm),K=setInterval(()=>{Hn()},$m)}function ii(){z&&clearInterval(z),K&&clearInterval(K),z=null,K=null}function li(){!ke||E.value==="unavailable"||(E.value="unavailable",$.value=!1,Pr(),ru())}function ou(d,b){if(b===e.value||E.value==="unavailable")return;const R=F.value[d]??[];R.includes(b)||(F.value[d]=[...R,b]);const k=`${d}:${b}`,J=T.get(k);J&&clearTimeout(J),T.set(k,setTimeout(()=>Or(d,b),Fm))}function Or(d,b){const R=`${d}:${b}`,k=T.get(R);k&&clearTimeout(k),T.delete(R);const J=F.value[d];J?.includes(b)&&(F.value[d]=J.filter(ce=>ce!==b))}function Pr(){for(const d of T.values())clearTimeout(d);T.clear(),F.value={}}function iu(d,b){if(!b.trim()||E.value==="idle"||E.value==="unavailable")return;const R=Date.now(),k=j.get(d);k!==void 0&&R-k{}))}async function lu(d){const b=D,R=await xm(d);if(!(b!==D||E.value==="unavailable")){if(R===null){$.value=!1;return}Q.value=new Map(R.map(k=>[k.client,k.user])),$.value=!0}}function au(d){const b=new Map(Q.value);b.set(d.client,d.user),Q.value=b}function cu(d){if(!Q.value.has(d.client))return;const b=new Map(Q.value);b.delete(d.client),Q.value=b}async function uu(){if(ke||e.value===null||I.value===null)return;ke=!0;const d=D,b=e.value,R=I.value;E.value="connecting",q.push(_c(su),bc(li));try{const k=await qs(`user:${b}`,{onPublication:xr,onSubscribed:Cr});if(d!==D)return k.close();yt=k;const J=Rl(R),ce=await qs(J,{onPublication:xr,onSubscribed:()=>{Cr(),lu(J)},onJoin:au,onLeave:cu});if(d!==D)return ce.close();vt=ce,await kr()}catch{d===D&&li()}}async function kr(){if(!ke)return;const d=l.value==="dm"?i.value:null;if(d===He)return;const b=++C;if(rt?.close(),rt=null,He=d,d===null)return;const R=D;try{const k=await qs(Rl(d),{onPublication:xr,onSubscribed:Cr});if(R!==D||b!==C)return k.close();rt=k}catch{}}function ai(){for(const b of q)b();q=[],yt?.close(),vt?.close(),rt?.close(),yt=vt=rt=null,He=null,C++,ii();const d=ke;return ke=!1,E.value="idle",$.value=!1,Q.value=new Map,Pr(),j.clear(),d}function ci(){(ai()||e.value!==null)&&Cm(),oe.clear(),h.clear();for(const d of _.values())clearTimeout(d);_.clear(),A.clear(),m.clear(),M&&typeof document<"u"&&document.removeEventListener("visibilitychange",M),M=null,D++,Me=null,xe=null,H=null,Se.clear(),B.value=null;for(const d of Te.values())d.abort();Te.clear(),me.clear(),ee.clear(),G.clear(),re=null,ie.value={},e.value=null,t.value=void 0,n.value=!1,s.value=null,r.value=[],o.value=null,i.value=null,l.value="general",a.value="",c.value={},u.value={},f.value={},p.value={},g.value={},x.value={},O.value={},N.value={},v.value=new Map,w.value="idle",S.value="idle"}return{userId:e,member:t,moderator:n,general:s,generalId:I,conversations:r,limits:o,activeId:i,view:l,dmError:a,dmRows:ut,messages:c,loading:u,errors:f,drafts:p,anchors:g,members:v,membersByHandle:te,myHandle:ae,membersState:w,bootstrapState:S,connection:E,panelVisible:y,reachedStart:x,olderLoading:O,olderError:N,dmUnread:Y,totalUnread:V,totalMentions:W,unreadOf:L,mentionsOf:P,markRead:Oc,loadOlder:Rs,presenceAvailable:$,othersOnline:pe,onlineCount:ge,isOnline:Ie,typing:F,typingIn:je,emitTyping:iu,init:Ts,bootstrap:_t,open:Je,showGeneral:Ic,showDms:Dc,openDm:Tr,dmWith:ti,startDm:Lc,loadLatest:Ke,refreshLatest:Rn,refetchCounts:Hn,draft:Rr,setDraftText:Uc,send:Hc,maxEmbeds:Ms,uploading:Ar,canSend:Nc,uploadFiles:$c,retryUpload:jc,removeFile:zc,stageEmbed:Vc,unstageEmbed:Fc,embedItems:ie,embedItem:Bc,resolveRefs:Mr,resolveFor:qc,saveAnchor:Kc,anchorFor:Gc,loadMembers:si,allowedReactions:B,loadReactions:ri,toggleReaction:Wc,canEdit:Jc,canDelete:Yc,edit:Zc,remove:Qc,reset:ci}});let Xr=null;const Ac=Gt("auth",()=>{const e=X(null),t=X(et.get()),n=X(!1),s=ne(()=>t.value!==null),r=ne(()=>{const S=e.value;return S?[S.name,S.surname].filter(Boolean).join(" ")||S.email:""});function o(S,E,y){et.set(S,y),t.value=et.get(),E&&(e.value=E,ls().load(E.id))}function i(){et.clear(),t.value=null,e.value=null,Zo().reset(),Yp().reset(),ls().reset(),hc().reset(),Rc().reset(),Np()}async function l(S){S&&(Xr={public:S.meta.public===!0,fullPath:S.fullPath});try{if(et.get())try{const E=await dn.fetch();e.value=E.user,t.value=et.get(),ls().load(E.user.id)}catch{et.get()||i()}n.value=!0}finally{Xr=null}}async function a(S,E,y){const x=await dn.login({email:S,password:E});o(x.token,x.user,y)}async function c(S,E){const y=await dn.register(S);return y.token?(o(y.token,y.user,E),{signedIn:!0,message:""}):{signedIn:!1,message:y.message??""}}function u(S){return o(S.token,S.user,!0),{action:S.action,returnTo:S.return_to}}async function f(S){return u(await dn.oauthComplete(S))}async function p(S){return u(await dn.oauthRegisterComplete(S))}async function g(){try{await dn.logout()}catch{}i(),await vn.push({name:"login"})}async function v(S){const E=await dn.update(S);e.value=E.user}function w(){const S=Xr??{public:vn.currentRoute.value.meta.public===!0,fullPath:vn.currentRoute.value.fullPath},E=s.value||e.value!==null;i(),E&&!S.public&&vn.push({name:"login",query:{redirect:S.fullPath,expired:"1"}})}return yp(w),{user:e,token:t,ready:n,loggedIn:s,displayName:r,restore:l,login:a,register:c,completeOAuth:f,completeOAuthRegistration:p,logout:g,updateProfile:v}});function fy({active:e,visible:t,focused:n,atBottom:s}){return e&&t&&n&&s}function Gm(e){return e>0?e>99?"99+":String(e):""}function Ml(e){return wo(e,"nieprzeczytana wiadomość","nieprzeczytane wiadomości","nieprzeczytanych wiadomości")}function dy(e){return e===1?"wzmianka o Tobie":`${e} ${ic(e,"wzmianka","wzmianki","wzmianek")} o Tobie`}function hy(e,t,n){if(!(t>0))return null;let s=t,r=null;for(let o=e.length-1;o>=0&&s>0;o--){const i=e[o];i.sender_id!==n&&(r=i.id,s--)}return r}function py(e){return e.length===0?"":e.length===1?`${e[0]} pisze…`:e.length===2?`${e[0]} i ${e[1]} piszą…`:"Kilka osób pisze…"}let eo=!1;const Mc=Gt("pwa",()=>{const e=X(!1),t=jn(null),n=jn(null);let s=!1;const r=ne(()=>!e.value&&t.value!==null),o=ne(()=>n.value!==null);function i(){s||typeof window>"u"||(s=!0,e.value=window.matchMedia?.("(display-mode: standalone)").matches===!0||navigator.standalone===!0,window.addEventListener("beforeinstallprompt",f=>{f.preventDefault(),t.value=f}),window.addEventListener("appinstalled",()=>{e.value=!0,t.value=null}),"serviceWorker"in navigator&&(document.readyState==="complete"?l():window.addEventListener("load",l,{once:!0})))}async function l(){const f=navigator.serviceWorker;f.addEventListener("controllerchange",()=>{eo&&(eo=!1,window.location.reload())});try{const p=await f.register("/sw.js",{scope:"/",updateViaCache:"none"});p.waiting&&f.controller&&(n.value=p.waiting),p.addEventListener("updatefound",()=>{const g=p.installing;g&&g.addEventListener("statechange",()=>{g.state==="installed"&&f.controller&&(n.value=g)})}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&p.update().catch(()=>{})})}catch{}}async function a(){const f=t.value;if(f){t.value=null;try{await f.prompt(),(await f.userChoice).outcome==="accepted"&&(e.value=!0)}catch{}}}function c(){const f=n.value;f&&(eo=!0,f.postMessage({type:"SKIP_WAITING"}))}function u(){n.value=null}return{installed:e,deferred:t,waiting:n,canInstall:r,updateReady:o,start:i,install:a,applyUpdate:c,dismissUpdate:u}}),Wm={class:"shell"},Jm={class:"sidebar"},Ym={class:"side-head"},Zm={"aria-label":"Główna nawigacja"},Qm={key:0,class:"unread-badge nav-badge"},Xm={"aria-hidden":"true"},eg={class:"sr-only"},tg={class:"who"},ng={class:"muted"},sg={class:"topbar"},rg={class:"tabbar","aria-label":"Nawigacja"},og={class:"nav-icon"},ig={key:0,class:"nav-dot","aria-hidden":"true"},lg={key:0,class:"sr-only"},ag={key:0,class:"update-bar",role:"status","aria-live":"polite"},cg=Tn({__name:"AppShell",setup(e){const t=Ac(),n=Sn(),s=Mc(),r=sc();hc();const o=Rc();bn(()=>t.user?.id,f=>{f?o.init(f):o.reset()},{immediate:!0});const i=[{to:"/",label:"Pulpit",icon:"home",match:["dashboard"]},{to:"/plan",label:"Plan zajęć",icon:"calendar",match:["schedule"]},{to:"/terminarz",label:"Terminarz",icon:"flag",match:["deadlines"]},{to:"/przedmioty",label:"Przedmioty",icon:"grad",match:["courses","course"]},{to:"/lektury",label:"Lektury",icon:"book",match:["readings"]},{to:"/materialy",label:"Materiały",icon:"file",match:["materials","material"]},{to:"/checklisty",label:"Checklisty",icon:"checklist",match:["checklists","checklist"]},{to:"/sylabusy",label:"Sylabusy",icon:"file",match:["syllabi"]},{to:"/quizy",label:"Quizy",icon:"quiz",match:["quizzes","quiz"]},{to:"/moje-prezentacje",label:"Moje prezentacje",icon:"slides",match:["my-presentations"]},{to:"/profil",label:"Profil",icon:"user",match:["profile"]}],l=[{to:"/",label:"Pulpit",icon:"home",match:["dashboard"]},{to:"/plan",label:"Plan zajęć",icon:"calendar",match:["schedule"]},{to:"/materialy",label:"Materiały",icon:"file",match:["materials","material"]},{to:"/checklisty",label:"Checklisty",icon:"checklist",match:["checklists","checklist"]},{to:"/wiecej",label:"Więcej",icon:"more",match:["more","deadlines","courses","course","readings","quizzes","quiz","syllabi","my-presentations","profile"]}],a=ne(()=>String(r.name??"")),c=ne(()=>a.value!=="dashboard"&&o.totalUnread>0?o.totalUnread:0),u=f=>f.includes(a.value);return(f,p)=>{const g=pa("router-link");return Xe(),St("div",Wm,[Ce("aside",Jm,[Ce("div",Ym,[Ee(g,{to:"/",class:"brand"},{default:Dn(()=>[...p[4]||(p[4]=[Ce("span",{class:"eyebrow"},"UWr · ISMiB",-1),Ce("b",null,"BM II°",-1)])]),_:1}),Ee(ul)]),Ce("nav",Zm,[(Xe(),St(st,null,Si(i,v=>Ee(g,{key:v.to,to:v.to,class:Ln({active:u(v.match)}),"aria-current":u(v.match)?"page":void 0},{default:Dn(()=>[Ee(bo,{name:v.icon},null,8,["name"]),fo(Jt(v.label)+" ",1),v.to==="/"&&c.value?(Xe(),St("span",Qm,[Ce("span",Xm,Jt(Oe(Gm)(c.value)),1),Ce("span",eg,", "+Jt(Oe(Ml)(c.value)),1)])):Wn("",!0)]),_:2},1032,["to","class","aria-current"])),64))]),Ce("div",tg,[Ce("span",ng,Jt(Oe(t).displayName),1),Oe(s).canInstall?(Xe(),St("button",{key:0,class:"btn small",type:"button",onClick:p[0]||(p[0]=v=>Oe(s).install())},"Zainstaluj aplikację")):Wn("",!0),Ce("button",{class:"btn small ghost",type:"button",onClick:p[1]||(p[1]=v=>Oe(t).logout())},"Wyloguj")])]),Ce("header",sg,[Ee(g,{to:"/",class:"topbar-brand"},{default:Dn(()=>[...p[5]||(p[5]=[Ce("span",{class:"eyebrow"},"UWr · ISMiB",-1),Ce("b",null,"BM II°",-1)])]),_:1}),Ee(ul)]),Ce("main",{class:Ln(["main",{wide:Oe(r).meta.wide===!0}]),id:"main"},[Af(f.$slots,"default")],2),Ce("nav",rg,[(Xe(),St(st,null,Si(l,v=>Ee(g,{key:v.to,to:v.to,class:Ln({active:u(v.match)}),"aria-current":u(v.match)?"page":void 0},{default:Dn(()=>[Ce("span",og,[Ee(bo,{name:v.icon},null,8,["name"]),v.to==="/"&&c.value?(Xe(),St("span",ig)):Wn("",!0)]),fo(Jt(v.label)+" ",1),v.to==="/"&&c.value?(Xe(),St("span",lg,", "+Jt(Oe(Ml)(c.value)),1)):Wn("",!0)]),_:2},1032,["to","class","aria-current"])),64))]),nf(Ce("div",{class:"toast",role:"status","aria-live":"polite"},Jt(Oe(n).message),513),[[yd,Oe(n).message]]),Oe(s).updateReady?(Xe(),St("div",ag,[p[6]||(p[6]=Ce("span",null,"Dostępna jest nowa wersja aplikacji.",-1)),Ce("button",{class:"btn small",type:"button",onClick:p[2]||(p[2]=v=>Oe(s).applyUpdate())},"Odśwież"),Ce("button",{class:"btn small ghost",type:"button",onClick:p[3]||(p[3]=v=>Oe(s).dismissUpdate())},"Później")])):Wn("",!0)])}}});function xc(e){return e==="/cast"||e==="/cast/"}const ug=Tn({__name:"App",setup(e){const t=sc(),n=xc(window.location.pathname),s=ne(()=>t.meta.public===!0||t.meta.bare===!0||n&&t.matched.length===0);return(r,o)=>{const i=pa("router-view");return s.value?(Xe(),ds(i,{key:0})):(Xe(),ds(cg,{key:1},{default:Dn(()=>[Ee(i)]),_:1}))}}}),Cc=Ud();Fd(ug).use(Cc).use(vn).mount("#app");xc(window.location.pathname)||Mc(Cc).start();export{tn as $,Ne as A,ic as B,Ln as C,Og as D,Si as E,st as F,Yg as G,Oo as H,Ig as I,Dg as J,Tp as K,jl as L,Ru as M,ty as N,sy as O,oy as P,iy as Q,Yh as R,ry as S,Pp as T,bn as U,vf as V,bg as W,pg as X,Fe as Y,fr as Z,bo as _,dn as a,ey as a$,Rc as a0,Lg as a1,ly as a2,dy as a3,Gm as a4,Ml as a5,Eo as a6,Cg as a7,Ap as a8,dm as a9,Ng as aA,qs as aB,Dp as aC,Vg as aD,qg as aE,Bg as aF,Fg as aG,kp as aH,mg as aI,jg as aJ,$g as aK,ye as aL,cy as aM,Na as aN,Ug as aO,Af as aP,Qg as aQ,Gp as aR,Jg as aS,Xg as aT,Wp as aU,Zg as aV,U as aW,Mc as aX,Vp as aY,hc as aZ,_s as a_,ny as aa,hy as ab,fy as ac,py as ad,Zo as ae,Yp as af,wo as ag,Cp as ah,Mp as ai,Op as aj,Zr as ak,Ae as al,ac as am,ls as an,Wg as ao,xt as ap,dg as aq,Rp as ar,vg as as,Pg as at,kg as au,yd as av,zg as aw,So as ax,lm as ay,Mg as az,Ce as b,Gg as b0,mr as b1,Hg as b2,Kg as b3,uy as b4,Cm as b5,jn as b6,ay as b7,dp as b8,up as b9,hg as ba,et as bb,wg as bc,Eg as bd,Sg as be,Tg as bf,Rg as bg,Ag as bh,St as c,Tn as d,Oe as e,Wn as f,yg as g,_g as h,Ee as i,Dn as j,sc as k,pa as l,xg as m,Xe as n,mf as o,fo as p,Sn as q,X as r,ds as s,Jt as t,Ac as u,gg as v,nf as w,ne as x,lc as y,cc as z}; diff --git a/public/assets/index-CrQqZK_d.css b/public/assets/index-CrQqZK_d.css new file mode 100644 index 0000000..329df68 --- /dev/null +++ b/public/assets/index-CrQqZK_d.css @@ -0,0 +1 @@ +@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/archivo-narrow-vietnamese-500-normal-CbuGBAYj.woff2) format("woff2"),url(/assets/archivo-narrow-vietnamese-500-normal-DBsYfoQF.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/archivo-narrow-latin-ext-500-normal-CEqYmuFE.woff2) format("woff2"),url(/assets/archivo-narrow-latin-ext-500-normal-DESKgx4f.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/archivo-narrow-latin-500-normal-BH-FPhCi.woff2) format("woff2"),url(/assets/archivo-narrow-latin-500-normal-Oafwxh5s.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:600;src:url(/assets/archivo-narrow-vietnamese-600-normal-B3iMS2rD.woff2) format("woff2"),url(/assets/archivo-narrow-vietnamese-600-normal-BOVNaV0C.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:600;src:url(/assets/archivo-narrow-latin-ext-600-normal-DNmONYTo.woff2) format("woff2"),url(/assets/archivo-narrow-latin-ext-600-normal-CFDqFZjW.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:600;src:url(/assets/archivo-narrow-latin-600-normal-l2jiltzb.woff2) format("woff2"),url(/assets/archivo-narrow-latin-600-normal-DZkbuzR9.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:700;src:url(/assets/archivo-narrow-vietnamese-700-normal-VsvP8OcS.woff2) format("woff2"),url(/assets/archivo-narrow-vietnamese-700-normal-CB0yIOvF.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:700;src:url(/assets/archivo-narrow-latin-ext-700-normal-DCLoHMFv.woff2) format("woff2"),url(/assets/archivo-narrow-latin-ext-700-normal-C4q0W15T.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:700;src:url(/assets/archivo-narrow-latin-700-normal-DtADLsoy.woff2) format("woff2"),url(/assets/archivo-narrow-latin-700-normal-DxmyBkwC.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-ext-opsz-normal-DIwfbPUE.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-opsz-normal-C0olyEE-.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-greek-opsz-normal-DrHU7SY7.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-vietnamese-opsz-normal-BOyYyU_V.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-ext-opsz-normal-HoL-AExg.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-opsz-normal-BpEBLj1O.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-ext-opsz-italic-Bl6DJqma.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-opsz-italic-Dibx14aP.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-greek-opsz-italic-CMW9dfKg.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-vietnamese-opsz-italic-C-k5pZlm.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-ext-opsz-italic-BhUEwDRF.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-opsz-italic-BOLXpvkj.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2) format("woff2"),url(/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2) format("woff2"),url(/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2) format("woff2"),url(/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2) format("woff2"),url(/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2) format("woff2"),url(/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2) format("woff2"),url(/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2) format("woff2"),url(/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2) format("woff2"),url(/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2) format("woff2"),url(/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2) format("woff2"),url(/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{color-scheme:dark;--paper: #141917;--panel: #1b211e;--ink: #e4e8e3;--muted: #9aa69f;--rule: #2e3833;--accent: #8cc3aa;--accent-soft: #1f3129;--on-accent: #141917;--miss: #e39a7c;--miss-soft: #35221b;--warn: #f0c27a;--warn-rule: #6b5631;--display: "Archivo Narrow", "Arial Narrow", system-ui, sans-serif;--body: "Source Serif 4 Variable", "Source Serif 4", Georgia, "Times New Roman", serif;--mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;--gutter: 16px;--tabbar-h: 64px;--topbar-h: 52px;--sidebar-w: 236px;--safe-bottom: env(safe-area-inset-bottom, 0px);--av-ink: #f3f4f1;--av-1: #3b4f6b;--av-2: #6b4a3b;--av-3: #4a3b6b;--av-4: #3b6b5e;--av-5: #6b3b4f;--av-6: #5e6b3b;--av-7: #3b5e6b;--av-8: #6b5a3b}:root[data-theme=light]{color-scheme:light;--paper: #f3f4f1;--panel: #fafbf8;--ink: #1c2320;--muted: #5a6560;--rule: #d5dad4;--accent: #2f5a4b;--accent-soft: #e2ebe5;--on-accent: #f3f4f1;--miss: #9a4a2e;--miss-soft: #f3e3dc;--warn: #7a5200;--warn-rule: #d9b56a}*,*:before,*:after{box-sizing:border-box}[hidden]{display:none!important}html{-webkit-text-size-adjust:100%}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--body);font-size:17px;line-height:1.55;overflow-x:hidden}a{color:var(--accent);text-underline-offset:2px}h1,h2,h3{font-family:var(--display);font-weight:700;margin:0;line-height:1.1;text-wrap:balance}h1{font-size:clamp(32px,6vw,44px);letter-spacing:-.01em}h2{font-size:24px}h3{font-size:19px;font-weight:600}p{margin:0 0 .8em}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.eyebrow{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.muted{color:var(--muted)}.mono{font-family:var(--mono)}.small{font-size:14.5px}.nums{font-variant-numeric:tabular-nums}.shell{min-height:100vh}.main{padding:16px var(--gutter) calc(var(--tabbar-h) + var(--safe-bottom) + 28px);min-width:0}.sidebar{display:none}.tabbar{position:fixed;inset:auto 0 0;z-index:20;display:grid;grid-template-columns:repeat(5,1fr);background:var(--panel);border-top:1px solid var(--rule);padding-bottom:var(--safe-bottom)}.tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:var(--tabbar-h);padding:6px 2px;color:var(--muted);text-decoration:none;font-family:var(--mono);font-size:11px;letter-spacing:.02em}.tabbar a svg{width:22px;height:22px}.tabbar a.active{color:var(--accent);box-shadow:inset 0 2px 0 var(--accent)}.topbar{display:flex;align-items:center;justify-content:space-between;min-height:var(--topbar-h);padding:0 calc(var(--gutter) - 8px) 0 var(--gutter);background:var(--panel);border-bottom:1px solid var(--rule)}.topbar-brand{display:inline-flex;align-items:baseline;gap:8px;color:var(--ink);text-decoration:none}.topbar-brand b{font-family:var(--display);font-size:20px;line-height:1}@media(min-width:900px){.shell{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr)}.tabbar,.topbar{display:none}.main{padding:32px 32px 64px;width:100%}.sidebar{display:flex;flex-direction:column;gap:22px;position:sticky;top:0;height:100vh;padding:28px 16px 20px 20px;border-right:1px solid var(--rule);background:var(--panel)}.side-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:14px;border-bottom:2px solid var(--ink)}.side-head .icon-btn{width:36px;height:36px}.brand{display:grid;gap:2px;padding:0 8px;text-decoration:none;color:var(--ink)}.brand b{font-family:var(--display);font-size:30px;line-height:1}.sidebar nav{display:grid;gap:2px}.sidebar nav a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:3px;border-left:3px solid transparent;color:var(--ink);text-decoration:none;font-family:var(--display);font-weight:600;font-size:18px}.sidebar nav a svg{width:20px;height:20px;color:var(--muted)}.sidebar nav a:hover{background:var(--accent-soft)}.sidebar nav a.active{border-left-color:var(--accent);background:var(--accent-soft);color:var(--accent)}.sidebar nav a.active svg{color:var(--accent)}.sidebar .who{margin-top:auto;display:grid;gap:6px;padding:12px 8px 0;border-top:1px solid var(--rule);font-size:14.5px}}.page-head{display:grid;gap:8px;padding-bottom:16px;border-bottom:2px solid var(--ink);margin-bottom:20px}.page-head .row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:10px 16px}.stack{display:grid;gap:16px}.section{margin-top:28px}.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-bottom:6px;margin-bottom:10px;border-bottom:1px solid var(--rule)}.section-head h2{font-size:22px}.grid-2{display:grid;gap:16px}@media(min-width:720px){.grid-2{grid-template-columns:1fr 1fr}}.grid-3{display:grid;gap:16px}@media(min-width:720px){.grid-3{grid-template-columns:repeat(3,1fr)}}.badges{display:inline-flex;flex-wrap:wrap;justify-content:flex-end;gap:4px}.stack[aria-busy=true]>.card{opacity:.6}@media(prefers-reduced-motion:no-preference){.stack[aria-busy]>.card{transition:opacity .15s ease}}.snippet{margin:8px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.snippet mark{background:var(--accent-soft);color:var(--ink);border-bottom:1px solid var(--accent);padding:0;font-weight:inherit}.snippet-file{font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase}.card{padding:16px 18px;background:var(--panel);border:1px solid var(--rule);border-radius:4px;min-width:0}.card.accent{border-left:4px solid var(--accent)}.card.hl{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.card h3{margin-bottom:4px}.card.link{display:block;color:inherit;text-decoration:none}.card.link:hover{border-color:var(--accent)}button.card{width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer}.notice{padding:10px 14px;border-radius:3px;background:var(--accent-soft);font-size:15.5px}.notice.error,.error-text{background:var(--miss-soft);color:var(--miss)}.error-text{background:none;font-size:14.5px;margin:4px 0 0}.notice.error{border-left:3px solid var(--miss)}.empty{padding:22px 16px;text-align:center;color:var(--muted);border:1px dashed var(--rule);border-radius:4px}.skeleton{height:72px;border-radius:4px;background:linear-gradient(90deg,var(--rule),var(--panel),var(--rule));background-size:200% 100%;animation:shimmer 1.4s linear infinite;opacity:.6}@keyframes shimmer{to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.skeleton{animation:none}}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-family:var(--display);font-weight:600;font-size:16px;line-height:1.2;cursor:pointer;border-radius:3px;padding:9px 16px;min-height:40px;border:1px solid var(--accent);background:transparent;color:var(--accent);text-decoration:none}.btn:hover:not(:disabled){background:var(--accent-soft)}.btn:disabled{opacity:.4;cursor:default}.btn.primary{background:var(--accent);color:var(--on-accent)}.btn.primary:hover:not(:disabled){filter:brightness(1.08);background:var(--accent)}.btn.miss{border-color:var(--miss);color:var(--miss)}.btn.miss:hover:not(:disabled){background:var(--miss-soft)}.btn.ghost{border-color:var(--rule);color:var(--muted)}.btn.small{min-height:32px;padding:4px 12px;font-size:15px}.btn.block{width:100%}.btn-row{display:flex;flex-wrap:wrap;gap:8px}.linkish{background:none;border:0;padding:0;font:inherit;color:var(--accent);text-decoration:underline;text-underline-offset:2px;cursor:pointer}.field{display:grid;gap:4px;margin-bottom:14px}.field>label,.field>.label{font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}input[type=text],input[type=email],input[type=password],input[type=search],input[type=url],select{width:100%;font:inherit;font-size:17px;color:var(--ink);background:var(--panel);border:1px solid var(--rule);border-radius:3px;padding:9px 12px;min-height:44px}input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:0;border-color:var(--accent)}.check{display:flex;align-items:center;gap:10px;min-height:32px}input[type=checkbox],input[type=radio]{width:20px;height:20px;accent-color:var(--accent);margin:0;flex:none}.auth{max-width:420px;margin:0 auto;padding:40px var(--gutter) 64px}.auth .page-head{margin-bottom:22px}.auth-links{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 16px;margin-top:18px;font-size:15.5px}.badge{display:inline-block;font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;padding:1px 7px;border-radius:3px;border:1px solid var(--rule);color:var(--muted);vertical-align:middle;white-space:nowrap}.badge.online{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}.badge.onsite{border-color:var(--ink);color:var(--ink)}.badge.alert{border-color:var(--miss);color:var(--miss);background:var(--miss-soft)}.badge.warn{color:var(--warn);border-color:var(--warn-rule)}.badge.solid{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.chips{display:flex;gap:6px;overflow-x:auto;padding:2px 0 6px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}.chips.wrap{flex-wrap:wrap;overflow:visible}.chip{flex:none;font-family:var(--display);font-weight:600;font-size:16px;padding:6px 13px;min-height:36px;border:1px solid var(--rule);border-radius:999px;background:var(--panel);color:var(--ink);cursor:pointer;position:relative}.chip[aria-pressed=true],.chip.on{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.chip:disabled{opacity:.4;cursor:default}.chip .dot{position:absolute;top:3px;right:3px;width:7px;height:7px;border-radius:50%;background:var(--miss)}.rows{list-style:none;margin:0;padding:0}.rows>li{padding:10px 0;border-top:1px solid var(--rule)}.rows>li:first-child{border-top:0}.rows.card{padding:6px 18px}.row-main{display:flex;justify-content:space-between;gap:12px;align-items:baseline}.when{font-family:var(--mono);font-size:13px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}.title{font-weight:600}.past{opacity:.55}.progress-bar{height:6px;border-radius:3px;background:var(--rule);overflow:hidden}.progress-bar>span{display:block;height:100%;background:var(--accent);border-radius:3px}.big-num{font-family:var(--display);font-weight:700;font-size:34px;line-height:1;font-variant-numeric:tabular-nums}.days{display:grid;gap:18px}@media(min-width:720px){.days.two{grid-template-columns:1fr 1fr;align-items:start}}.day-head{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding-bottom:6px;border-bottom:2px solid var(--ink);margin-bottom:10px;display:flex;justify-content:space-between;gap:8px}.session{display:grid;grid-template-columns:58px 1fr;gap:12px;padding:12px 14px;margin-bottom:8px;background:var(--panel);border:1px solid var(--rule);border-left:3px solid var(--accent);border-radius:4px}.session.online{border-left-color:var(--rule)}.session .time{font-family:var(--mono);font-size:13px;line-height:1.35;font-variant-numeric:tabular-nums}.session .time span{display:block;color:var(--muted)}.session .name{font-weight:600;line-height:1.3}.session .meta{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center;margin-top:4px;font-size:14.5px;color:var(--muted)}.session .note{margin-top:6px;font-size:14.5px;padding:6px 10px;background:var(--accent-soft);border-radius:3px}.meeting-bar{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin:14px 0 18px}.reading{display:flex;gap:12px;align-items:flex-start;padding:10px 0;border-top:1px solid var(--rule)}.reading:first-child{border-top:0}.reading label{display:flex;gap:12px;align-items:flex-start;cursor:pointer;flex:1;min-width:0;min-height:32px}.reading input{margin-top:3px}.reading .text{min-width:0;overflow-wrap:anywhere}.reading input:checked+.text{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--rule)}.reading .owned{flex:none;align-items:center;gap:6px;cursor:pointer;min-height:32px;font-family:var(--mono);font-size:12px;color:var(--muted)}.reading .owned input{margin-top:0}.subhead{font-family:var(--mono);font-weight:500;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:12px 0 2px}.checklist-card .progress-bar{margin:10px 0 6px}.checklist-item{flex-wrap:wrap;align-items:center}.checklist-item label{flex:1 1 260px}.checklist-item .badge{font-size:11px;margin-right:4px}.checklist-item .item-notes{display:block;margin-top:2px;white-space:pre-line;text-decoration:none}.checklist-item .item-links{display:flex;gap:10px}.checklist-item .item-actions{display:flex;margin-left:auto}.checklist-item .item-actions .icon-btn{width:36px;height:36px;color:var(--muted)}.checklist-item .item-actions .icon-btn svg{width:18px;height:18px}.checklist-item .grow{flex:1 1 100%}.chip-icon{width:14px;height:14px;vertical-align:-2px}.item-form textarea,.item-form input[type=number],.item-form input[type=datetime-local]{width:100%;font:inherit;font-size:17px;color:var(--ink);background:var(--panel);border:1px solid var(--rule);border-radius:3px;padding:9px 12px;min-height:44px}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0 14px}.hero-prep{display:flex;flex-direction:column;gap:6px;width:100%;max-width:360px;color:inherit;text-decoration:none}.hero-prep:hover .hero-cap{color:var(--accent)}.prose{overflow-wrap:anywhere}.prose h2,.prose h3,.prose h4{margin:1.2em 0 .4em}.prose ul,.prose ol{padding-left:1.3em;margin:0 0 .8em}.prose blockquote{margin:0 0 .8em;padding:2px 14px;border-left:3px solid var(--accent);color:var(--muted)}.prose code{font-family:var(--mono);font-size:.9em;background:var(--accent-soft);padding:1px 5px;border-radius:3px}.prose pre{overflow-x:auto;background:var(--accent-soft);padding:12px 14px;border-radius:4px;margin:0 0 .8em}.prose pre code{background:none;padding:0}.prose hr{border:0;border-top:1px solid var(--rule);margin:1.2em 0}.prose img{display:block;max-width:100%;height:auto;margin:16px 0;color:var(--muted);font-size:14.5px}.table-scroll{overflow-x:auto;margin:0 0 .8em}.table-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.prose table{border-collapse:collapse;min-width:50%}.prose th,.prose td{border:1px solid var(--rule);padding:8px 16px;text-align:left;vertical-align:top;font-size:14.5px;line-height:1.5}.prose th{font-family:var(--display);font-weight:600;background:var(--paper)}.prose .task-list-item{list-style:none}.prose .task-list-item input{margin:0 8px 0 -1.3em;accent-color:var(--accent)}.quiz-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding-block:14px;border-bottom:1px solid var(--rule)}.score{display:flex;align-items:baseline;gap:14px;font-family:var(--mono);font-size:12.5px;color:var(--muted)}.score b{font-family:var(--display);font-size:22px;font-variant-numeric:tabular-nums}.score .y b{color:var(--accent)}.score .n b{color:var(--miss)}.count{display:block;font-family:var(--mono);font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}.round-progress{display:grid;gap:6px;margin-top:22px}.round-progress span{height:6px;border-radius:3px;background:var(--rule)}.round-progress span.cur{background:var(--ink)}.round-progress span.y{background:var(--accent)}.round-progress span.n{background:var(--miss)}.step{font-family:var(--mono);font-size:12px;color:var(--muted);margin-top:8px;display:flex;justify-content:space-between;gap:8px}.qcard{margin-top:14px;padding:20px 22px;background:var(--panel);border:1px solid var(--rule);border-radius:4px}.q{margin:0;font-size:20px;line-height:1.45}.answer{margin:14px 0 0;padding:10px 14px;background:var(--accent-soft);border-radius:3px;font-size:16px}.answer .tag{margin-bottom:2px}.reveal{margin-top:12px;font-family:var(--mono);font-size:12.5px;color:var(--accent);background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.qactions{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.qactions .next{margin-left:auto}.btn.yes[aria-pressed=true]{background:var(--accent);color:var(--on-accent)}.btn.no{border-color:var(--miss);color:var(--miss)}.btn.no[aria-pressed=true]{background:var(--miss);color:var(--paper)}.sum h2{font-size:26px;margin:0 0 4px}.sum>p{margin:0 0 12px;color:var(--muted)}.sum ol{list-style:none;margin:0 0 18px;padding:0}.sum li{padding:10px 0 10px 14px;border-top:1px solid var(--rule);border-left:3px solid var(--accent);font-size:16px}.sum li.n{border-left-color:var(--miss)}.sum li small{display:block;color:var(--muted);font-size:14.5px;margin-top:2px}.tag{font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);display:block;margin-bottom:4px}.grp h3{font-family:var(--mono);font-weight:500;font-size:12px;letter-spacing:.08em;text-transform:uppercase;margin:0 0 6px;color:var(--miss)}.grp.ok h3{color:var(--accent)}.grp.ok li{padding-block:6px;font-size:15px}@media(max-width:480px){.qactions .next{margin-left:0;flex:1 1 100%}.qcard{padding:16px}}.toast{position:fixed;left:50%;transform:translate(-50%);bottom:calc(var(--tabbar-h) + var(--safe-bottom) + 12px);z-index:40;max-width:min(520px,calc(100vw - 32px));padding:10px 16px;background:var(--ink);color:var(--paper);border-radius:4px;font-size:15px}@media(min-width:900px){.toast{bottom:24px}}.update-bar{position:fixed;left:50%;transform:translate(-50%);top:calc(env(safe-area-inset-top,0px) + 12px);z-index:45;display:flex;flex-wrap:wrap;align-items:center;gap:10px;width:max-content;max-width:min(520px,calc(100vw - 32px));padding:10px 12px;background:var(--panel);color:var(--ink);border:1px solid var(--rule);border-left:3px solid var(--accent);border-radius:4px;font-size:15px;box-shadow:0 4px 16px #0000001f}.pulpit-head{margin-bottom:32px}.pulpit.with-chat>.pulpit-head{margin-bottom:16px}.pulpit-head h1{font-size:34px;line-height:1.1}.pulpit-head .btn-row{align-items:center}.profile-link{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:50%;background:var(--panel);border:1px solid var(--rule);color:var(--ink);font-family:var(--display);font-weight:700;font-size:16px;text-decoration:none}.pulpit-tabs{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--rule);margin-bottom:24px}.pulpit-tab{min-height:48px;padding:0 16px;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;background:none;color:var(--muted);font-family:var(--display);font-weight:700;font-size:16px;cursor:pointer}.pulpit-tab[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent)}.pulpit-main{display:grid;gap:32px;min-width:0}.pulpit-main>.notice{margin:0}.pulpit-lists{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));gap:48px}.pulpit-lists .section-head h2{text-wrap:pretty}.pulpit-lists .when,.pulpit-lists .badge{white-space:nowrap}.pulpit-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));gap:24px}.hero{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:32px;padding:24px 32px;font-size:16px;line-height:1.5}.hero .badge{font-size:12px}.hero .btn{font-size:16px}.hero-main{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}.hero-main p{margin:0}.hero-eyebrow{color:var(--accent)}.hero-title{font-size:34px;line-height:1.1}.hero-empty-h{font-size:22px;line-height:1.2}.hero-dates .badge{margin-left:8px}.hero-stats{display:flex;flex-wrap:wrap;gap:24px;list-style:none;margin:8px 0;padding:0}.hero-stats li{display:flex;flex-direction:column}.hero-num{font-family:var(--display);font-weight:700;font-size:34px;line-height:1.1;font-variant-numeric:tabular-nums}.hero-cap{font-family:var(--mono);font-size:12px;line-height:1.4;color:var(--muted)}.hero-timeline{display:flex;flex-direction:column;gap:8px;min-width:0}.hero-rows{list-style:none;margin:0;padding:0;border-left:1px solid var(--rule)}.hero-rows li{display:flex;flex-direction:column;padding:4px 0 4px 16px}.hero-read-title{overflow-wrap:anywhere}.hero-read-meta{font-family:var(--mono);font-size:12px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}.hero-timeline p{margin:0}.hero-rows .hero-more{display:block}@media(min-width:900px){.pulpit-head h1{font-size:44px}.profile-link{display:none}}@media(max-width:1099.98px){.pulpit.with-chat:not(.czat)>.chat{display:none}.pulpit.czat{display:flex;flex-direction:column;height:calc(100dvh - 32px)}.pulpit.czat>.pulpit-head,.pulpit.czat>.pulpit-tabs{flex:none}.pulpit.czat>.pulpit-tabs{margin-bottom:0}.pulpit.czat>.pulpit-main{display:none}.pulpit.czat>.chat{flex:1 1 auto;min-height:0}.main.wide:has(>.pulpit.czat){padding-bottom:0}}@media(max-width:899.98px){.pulpit.czat{height:calc(100dvh - 16px - var(--topbar-h) - var(--tabbar-h) - var(--safe-bottom))}.main.wide:has(>.pulpit.czat){padding-bottom:calc(var(--tabbar-h) + var(--safe-bottom))}}@media(min-width:1100px){.main.wide{padding:0}.pulpit-tabs{display:none}.pulpit>.pulpit-head,.pulpit.with-chat>.pulpit-head{margin:32px 48px 0}.pulpit-main{padding:32px 48px 64px}.pulpit.with-chat{display:grid;grid-template-columns:minmax(0,1fr) clamp(340px,26vw,420px);grid-template-rows:auto 1fr}.pulpit.with-chat>.pulpit-head{grid-column:1;grid-row:1}.pulpit.with-chat>.pulpit-main{grid-column:1;grid-row:2;align-self:start}.pulpit.with-chat>.chat{--chat-bg: var(--panel);--chat-surface: var(--paper);grid-column:2;grid-row:1 / span 2;position:sticky;top:0;height:100vh;height:100dvh;align-self:start;border-left:1px solid var(--rule)}}.chat{--chat-bg: var(--paper);--chat-surface: var(--panel);display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--chat-bg);font-size:16px;line-height:1.5}.chat .notice,.chat .error-text,.chat .empty,.chat .btn,.chat .btn.small,.chat textarea,.chat input[type=text]{font-size:16px}.chat .badge{font-size:12px}.chat-head{flex:none;display:grid;gap:12px;padding:24px 16px 0;border-bottom:1px solid var(--rule);min-width:0}.chat-head-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.chat-head-name{display:grid;flex:1 1 auto;min-width:0}.chat-presence{flex:none;display:flex;align-items:center;gap:8px}.chat-presence:empty{display:none}.icon-btn{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:1px solid transparent;border-radius:6px;background:none;color:var(--ink);cursor:pointer}.icon-btn:hover{background:var(--accent-soft)}.icon-btn svg{width:22px;height:22px}.chat-back{margin-left:-12px}.chat-tabs{display:flex;gap:8px;overflow-x:auto;padding-bottom:12px;scrollbar-width:none;-webkit-overflow-scrolling:touch}.chat-tab{flex:none;min-height:44px;padding:0 16px;border:1px solid var(--rule);border-radius:999px;background:var(--chat-surface);color:var(--muted);font-family:var(--display);font-weight:700;font-size:16px;white-space:nowrap;cursor:pointer}.chat-tab[aria-selected=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}@media(min-width:1100px)and (pointer:fine){.chat-tabs{gap:4px;padding-bottom:0}.chat-tab{min-height:36px;padding:0 8px;border:0;border-bottom:2px solid transparent;border-radius:0;margin-bottom:-1px;background:none}.chat-tab[aria-selected=true]{background:none;border-bottom-color:var(--accent)}}.chat-strip{flex:none;display:flex;align-items:center;height:28px;margin:0;padding:0 16px;font-family:var(--mono);font-size:12px;line-height:1.4;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.chat-start{margin:0;font-family:var(--mono);font-size:12px;color:var(--muted);text-align:center}.chat-title{font-size:22px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-list{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px;display:flex;flex-direction:column;gap:16px}.chat-list>.msg.follow{margin-top:-12px}.chat-skeletons{display:grid;gap:8px}.chat-skeletons .skeleton{height:48px}.chat-empty{margin:auto 0}.chat-empty p{margin:0}.chat-empty .chat-empty-h{margin:0 0 8px;font-family:var(--display);font-weight:700;font-size:22px;line-height:1.2;color:var(--ink)}.chat-day{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:12px;letter-spacing:.08em;color:var(--muted)}.chat-day:before,.chat-day:after{content:"";flex:1;height:1px;background:var(--rule)}.chat-typing{flex:none;height:24px;padding:0 16px;font-style:italic;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.avatar{display:inline-grid;place-items:center;flex:none;border-radius:50%;color:var(--av-ink);font-family:var(--display);font-weight:700;line-height:1;user-select:none}.avatar.s24{width:24px;height:24px;font-size:12px}.avatar.s32{width:32px;height:32px;font-size:16px}.avatar.s44{width:44px;height:44px;font-size:16px}.avatar.me{background:var(--accent-soft);color:var(--accent)}.msg{position:relative;display:grid;grid-template-columns:32px minmax(0,1fr);column-gap:12px}.msg-gutter{display:flex;justify-content:center}.msg-content{min-width:0}.msg-head{display:flex;align-items:baseline;gap:4px;min-width:0}.msg-name{font-weight:700;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.msg-tag{flex:none;font-family:var(--mono);font-size:12px;line-height:1.4;letter-spacing:.06em;text-transform:uppercase;padding:0 4px;border:1px solid var(--rule);border-radius:3px;color:var(--muted)}.msg-tag.me{border-color:var(--accent);color:var(--accent)}.msg-time,.msg-edited{flex:none;font-family:var(--mono);font-size:12px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}.msg-gutter .msg-time{line-height:24px;visibility:hidden}.msg.follow:hover .msg-gutter .msg-time,.msg.follow:focus-within .msg-gutter .msg-time{visibility:visible}.msg-body{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.composer{flex:none;display:grid;gap:8px;padding:16px;border-top:1px solid var(--rule);background:var(--chat-bg)}.composer-label{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.composer .error-text{margin:0}.composer-field{background:var(--chat-surface);border:1px solid var(--rule);border-radius:8px}.composer-field:focus-within{border-color:var(--accent);outline:2px solid var(--accent);outline-offset:2px}.composer-field textarea{display:block;width:100%;resize:none;border:0;background:transparent;color:inherit;font:inherit;line-height:1.5;padding:12px;overflow-y:hidden}.composer-field textarea:focus-visible{outline:none}.composer-tools{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:0 8px 8px}.composer-send svg{width:18px;height:18px}.composer-send[aria-busy=true]{opacity:.7}.unread-badge,.mention-badge{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:20px;height:20px;padding:0 4px;border-radius:999px;font-family:var(--mono);font-size:12px;font-weight:400;line-height:1;letter-spacing:0;vertical-align:middle}.unread-badge{background:var(--accent);color:var(--on-accent)}.mention-badge{background:var(--accent-soft);color:var(--accent)}.chat-tab .mention-badge,.chat-tab .unread-badge,.pulpit-tab .unread-badge{margin-left:8px}.chat-tab .mention-badge+.unread-badge{margin-left:4px}.sidebar nav a .nav-badge{margin-left:auto}.nav-icon{position:relative;display:inline-flex}.nav-dot{position:absolute;top:-2px;right:-2px;width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--panel)}.chat-list-wrap{position:relative;flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.chat-older{flex:none;min-height:1px;text-align:center}.chat-older p{margin:0}.chat-new{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent)}.chat-new:before{content:"";flex:1;height:1px;background:var(--accent)}.chat-jump{position:absolute;bottom:16px;left:50%;z-index:1;transform:translate(-50%);gap:4px;background:var(--chat-surface);white-space:nowrap}.chat-jump svg{width:18px;height:18px}@media(prefers-reduced-motion:reduce){.chat-list{scroll-behavior:auto}}.presence-stack{display:inline-flex;align-items:center}.presence-stack .avatar{box-shadow:0 0 0 2px var(--chat-bg)}.presence-stack .avatar+.avatar{margin-left:-8px}.presence-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--accent)}.presence-text{font-family:var(--mono);font-size:12px;line-height:1.4;color:var(--muted);white-space:nowrap}.dm-list{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}.dm-new{padding:16px}.dm-new .btn svg{width:18px;height:18px}.dm-skeletons{padding:0 16px}.dm-skeletons .skeleton{height:64px}.dm-notice,.dm-empty{margin:0 16px}.dm-rows{list-style:none;margin:0;padding:0;border-top:1px solid var(--rule)}.dm-rows li{border-bottom:1px solid var(--rule)}.dm-row{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:8px 16px;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.dm-row:hover{background:var(--chat-surface)}.dm-text{display:grid;flex:1 1 auto;min-width:0}.dm-name,.dm-preview{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dm-row.unread .dm-name{font-weight:700}.dm-preview{color:var(--muted)}.dm-meta{flex:none;display:grid;justify-items:end;gap:4px;font-family:var(--mono);font-size:12px;color:var(--muted)}.chat-dialog{width:min(520px,calc(100vw - 32px));max-height:70vh;padding:24px;border:1px solid var(--rule);border-radius:8px;background:var(--panel);color:var(--ink);font-size:16px;line-height:1.5}.chat-dialog::backdrop{background:#0006}.chat-dialog[open]{display:flex;flex-direction:column}.chat-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px}.chat-dialog-title{font-size:22px;line-height:1.2}.chat-dialog input[type=text]{font-size:16px;background:var(--paper)}.chat-dialog .error-text,.chat-dialog .notice,.chat-dialog .empty{font-size:16px}.chat-dialog .error-text{margin:0 0 8px}.picker-results{flex:1 1 auto;min-height:0;overflow-y:auto}.picker-skeletons .skeleton{height:48px}.picker-rows{list-style:none;margin:0;padding:0}.picker-row{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:4px 8px;border:0;border-radius:6px;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.picker-row:hover:not(:disabled){background:var(--accent-soft)}.picker-row:disabled{opacity:.7;cursor:default}.picker-name{min-width:0;overflow-wrap:anywhere}@media(max-width:899.98px){.chat-dialog{width:100dvw;max-width:none;height:100dvh;max-height:none;margin:0;border-radius:0}}.composer-row{display:flex;align-items:flex-end;gap:8px}.composer-row>.composer-field{flex:1 1 auto;min-width:0}.composer.compact .composer-field{border-radius:22px}.composer.compact .composer-field:focus-within{outline-offset:0}.composer.compact .composer-field textarea{min-height:42px;padding:9px 16px}.composer-send.round{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:var(--accent);color:var(--on-accent);cursor:pointer}.composer-send.round:disabled{opacity:.4;cursor:default}.composer-send.round[aria-busy=true]{opacity:.7}.composer-send.round svg{width:22px;height:22px}@media(hover:none){.chat .btn.small,.dm-new .btn{min-height:44px}}.reactions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}.reaction-chip,.reaction-add{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 8px;border:1px solid var(--rule);border-radius:999px;background:var(--chat-surface);color:var(--ink);font:inherit;cursor:pointer}.reaction-emoji{font-size:16px;line-height:1}.reaction-count{font-family:var(--mono);font-size:12px;line-height:1.4;color:var(--muted);font-variant-numeric:tabular-nums}.reaction-chip[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent)}.reaction-chip[aria-pressed=true] .reaction-count{color:var(--accent)}.reaction-chip:hover{border-color:var(--accent)}.reaction-add{justify-content:center;width:28px;padding:0;border-style:dashed;color:var(--muted)}.reaction-add:disabled{opacity:.4;cursor:default}.reaction-add svg{width:16px;height:16px}.reaction-add-wrap{position:relative;display:inline-flex}.reaction-pop{position:absolute;z-index:5;bottom:calc(100% + 4px);left:0;display:grid;grid-template-columns:repeat(6,36px);gap:4px;padding:8px;border:1px solid var(--rule);border-radius:6px;background:var(--panel);box-shadow:0 4px 16px #0000001f}.reaction-pop.below{top:calc(100% + 4px);bottom:auto}.reaction-pick{display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:6px;background:none;font-size:20px;line-height:1;cursor:pointer}.reaction-pick:hover,.reaction-pick:focus-visible{background:var(--accent-soft)}.msg-actions{position:absolute;z-index:4;top:-16px;right:0;display:flex;gap:2px;padding:2px;border:1px solid var(--rule);border-radius:6px;background:var(--chat-surface);opacity:0;pointer-events:none}.msg:focus-within>.msg-actions,.msg.actions-open>.msg-actions{opacity:1;pointer-events:auto}@media(hover:hover){.msg:hover>.msg-actions{opacity:1;pointer-events:auto}}.msg-action{display:inline-grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:4px;background:none;color:var(--ink);cursor:pointer}.msg-action:hover:not(:disabled){background:var(--accent-soft)}.msg-action:disabled{opacity:.4;cursor:default}.msg-action svg{width:18px;height:18px}.msg-action.miss{color:var(--miss)}@media(hover:none){.reaction-chip,.reaction-add{min-height:44px}.reaction-add{min-width:44px}.msg-action{width:44px;height:44px}.msg-actions{top:-24px}}.msg-body.prose a{overflow-wrap:anywhere}.msg-body.prose code{font-size:.9em}.mention{padding:0 4px;border-radius:3px;background:var(--accent-soft);color:var(--accent);white-space:nowrap}.msg.mentions-me{box-shadow:inset 3px 0 0 var(--accent);margin-left:-16px;padding-left:16px}.composer-field{position:relative}.composer-tools-gap{flex:1 1 auto}.composer-tool{display:inline-grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:6px;background:none;color:var(--muted);cursor:pointer}.composer-tool:hover:not(:disabled){background:var(--accent-soft);color:var(--ink)}.composer-tool:disabled{opacity:.4;cursor:default}.composer-tool svg{width:20px;height:20px}.mention-pop{position:absolute;z-index:6;bottom:calc(100% + 4px);left:0;width:100%;max-width:360px;margin:0;padding:4px;list-style:none;border:1px solid var(--rule);border-radius:6px;background:var(--panel);box-shadow:0 4px 16px #0000001f}.mention-option,.mention-empty{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 8px;border-radius:4px}.mention-option{cursor:pointer}.mention-option.active{background:var(--accent-soft)}.mention-empty{color:var(--muted)}.mention-name{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mention-handle{flex:none;margin-left:auto;font-family:var(--mono);font-size:12px;color:var(--muted)}.share-field{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-height:44px;padding:4px 8px;border:1px solid var(--rule);border-radius:3px;background:var(--panel);cursor:text}.share-field:focus-within{outline:2px solid var(--accent);outline-offset:0;border-color:var(--accent)}.share-chips{display:flex;flex-wrap:wrap;gap:4px;min-width:0;max-width:100%;margin:0;padding:0;list-style:none}.share-chip{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%;min-height:32px;padding:0 4px 0 8px;border:1px solid var(--rule);border-radius:999px;background:var(--panel);color:var(--ink);font-family:var(--display);font-size:14.5px;font-weight:600;cursor:default}.share-chip-label{max-width:240px;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.share-chip-remove{display:inline-flex;flex:none;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:999px;background:none;color:var(--muted);cursor:pointer}.share-chip-remove:hover{color:var(--ink)}.share-chip-remove:focus-visible{outline:2px solid var(--accent);outline-offset:0}.share-chip-remove svg{width:16px;height:16px}.share-field .share-input{flex:1 1 160px;width:auto;min-width:120px;min-height:32px;padding:0;border:0;background:none}.share-field .share-input:focus-visible{outline:none}.share-pop{position:absolute;z-index:6;top:calc(100% + 4px);left:0;width:100%;max-width:420px;margin:0;padding:4px;list-style:none;border:1px solid var(--rule);border-radius:6px;background:var(--panel);box-shadow:0 4px 16px #0000001f}.share-option{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 8px;border-radius:4px;cursor:pointer}.share-option.active{background:var(--accent-soft)}.share-option.share-empty{color:var(--muted);cursor:default}.share-option-name{min-width:0;overflow:hidden;font-family:var(--body);font-size:17px;white-space:nowrap;text-overflow:ellipsis}.share-option-email{min-width:0;margin-left:auto;overflow:hidden;font-family:var(--mono);font-size:14.5px;color:var(--muted);white-space:nowrap;text-overflow:ellipsis}.share-none{margin:0}.msg-edit{display:grid;gap:8px;margin-top:4px}.msg-edit .error-text{margin:0}.msg-edit .btn[aria-busy=true]{opacity:.7}.msg-deleted{margin:0;font-style:italic;color:var(--muted)}.chat-dialog.chat-confirm{width:auto;max-width:min(420px,calc(100vw - 32px));height:auto;max-height:none;margin:auto;border-radius:8px}.chat-confirm-body{margin:12px 0 16px}.chat-confirm .error-text{margin:0 0 16px}.chat-confirm-buttons .btn{min-height:44px}.btn.danger{border-color:var(--miss);background:var(--miss);color:var(--paper)}.btn.danger:hover:not(:disabled){filter:brightness(1.08);background:var(--miss)}.btn.danger[aria-busy=true]{opacity:.7}.msg-embeds{display:grid;gap:8px;margin-top:8px}.embed-card{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:8px 12px;border:1px solid var(--rule);border-radius:6px;background:var(--chat-surface, var(--panel));color:var(--ink);text-decoration:none}a.embed-card:hover{border-color:var(--accent)}.embed-card.unavailable{border-style:dashed}.embed-main{display:grid;flex:1 1 auto;min-width:0}.embed-type{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.embed-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;font-weight:700;line-height:1.5;overflow-wrap:anywhere}.embed-card.unavailable .embed-title{font-weight:400;color:var(--muted)}.embed-meta{overflow:hidden;font-family:var(--mono);font-size:12px;line-height:1.5;color:var(--muted);white-space:nowrap;text-overflow:ellipsis}.embed-card .badge{flex:none;font-size:12px}.embed-skeleton{display:block;width:60%;height:16px;margin:4px 0}.embed-tabs{display:flex;gap:4px;margin-bottom:16px;border-bottom:1px solid var(--rule)}.embed-tab{min-height:44px;padding:0 12px;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;background:none;color:var(--muted);font-family:var(--display);font-weight:700;font-size:16px;cursor:pointer}.embed-tab[aria-selected=true]{border-bottom-color:var(--accent);color:var(--accent)}.embed-panel{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}.embed-searching{margin:0 0 8px;font-family:var(--mono);font-size:12px;color:var(--muted)}.picker-rows li+li{margin-top:8px}.picker-row.embed-pick{display:grid;gap:4px;padding:0}.picker-row.embed-pick:hover:not([aria-disabled=true]){background:none}.picker-row.embed-pick:hover:not([aria-disabled=true]) .embed-card{border-color:var(--accent)}.picker-row.embed-pick[aria-disabled=true]{cursor:default;opacity:.7}.embed-staged{font-family:var(--mono);font-size:12px;color:var(--accent)}.staging{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:8px 8px 0;list-style:none}.composer.compact>.staging{padding:0}.staging-chip{position:relative;display:inline-flex;align-items:center;gap:8px;max-width:100%;height:32px;padding-left:8px;border-radius:6px;background:var(--chat-bg, var(--paper));font-size:16px}.composer.compact>.staging .staging-chip{background:var(--chat-surface, var(--panel))}.staging-type,.staging-size{flex:none;font-family:var(--mono);font-size:12px;color:var(--muted)}.staging-type{text-transform:uppercase;letter-spacing:.06em}.staging-name{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.staging-name.embed-name{max-width:240px}.staging-remove{display:inline-grid;place-items:center;flex:none;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:none;color:var(--muted);cursor:pointer}.staging-remove:hover:not(:disabled){color:var(--ink);background:var(--accent-soft)}.staging-remove svg{width:16px;height:16px}:target,.hash-target{scroll-margin-top:12px;animation:target-fade 2s ease-out}@keyframes target-fade{0%{background-color:var(--accent-soft)}to{background-color:transparent}}@media(prefers-reduced-motion:reduce){:target,.hash-target{animation:none}.hash-target{background-color:var(--accent-soft)}}.msg-files{display:grid;gap:8px;margin:8px 0 0;padding:0;list-style:none}.msg-file{display:flex;align-items:center;gap:8px;width:100%;max-width:480px;min-height:44px;padding:0 12px;border:1px solid var(--rule);border-radius:6px;background:var(--chat-surface, var(--panel));color:var(--ink);font:inherit;text-align:left;cursor:pointer}.msg-file:hover{border-color:var(--accent)}.msg-file[aria-busy=true]{opacity:.7;cursor:progress}.msg-file svg{flex:none;width:20px;height:20px;color:var(--muted)}.msg-file-name{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.msg-file-size{flex:none;font-family:var(--mono);font-size:12px;color:var(--muted)}.staging-name.file-name{max-width:200px}.staging-failed{flex:none;font-size:12px;font-family:var(--mono);color:var(--miss)}.staging-chip .linkish{flex:none;font-size:12px}.staging-progress{position:absolute;left:0;bottom:0;height:2px;border-radius:0 0 0 6px;background:var(--accent);transition:width .2s linear}@media(prefers-reduced-motion:reduce){.staging-progress{transition:none}}.composer-add{position:relative;flex:none}.composer-plus{display:inline-grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid var(--rule);border-radius:50%;background:var(--chat-surface, var(--panel));color:var(--ink);cursor:pointer}.composer-plus[aria-expanded=true]{border-color:var(--accent);color:var(--accent)}.composer-plus:disabled{opacity:.4;cursor:default}.composer-plus svg{width:22px;height:22px}.composer-menu{position:absolute;left:0;bottom:calc(100% + 8px);z-index:5;display:grid;min-width:280px;max-width:calc(100vw - 32px);padding:4px;border:1px solid var(--rule);border-radius:6px;background:var(--panel);box-shadow:0 4px 16px #0000001f}.composer-menu-item{display:flex;align-items:center;gap:12px;min-height:44px;padding:0 12px;border:0;border-radius:6px;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer}.composer-menu-item:hover:not(:disabled),.composer-menu-item:focus-visible{background:var(--accent-soft)}.composer-menu-item:disabled{opacity:.5;cursor:default}.composer-menu-item svg{flex:none;width:20px;height:20px}@page{margin:16mm 14mm}@page app{size:auto;margin:16mm 14mm}@media print{:root:not(.deck-public):not(.deck-speaker){color-scheme:light;--paper: #fff;--panel: #fff;--ink: #000;--muted: #444;--rule: #bbb;--accent: #1f4a3b;--accent-soft: #fff;--on-accent: #fff;--miss: #7a3218;--miss-soft: #fff;--warn: #5c3d00;--warn-rule: #bbb}.shell{display:block;min-height:0;page:app}.main,.main.wide{padding:0!important;width:auto}.pulpit.czat{height:auto}.shell .sidebar,.shell .topbar,.shell .tabbar,.theme-toggle,.shell .toast,.shell .update-bar,.shell .btn,.shell .icon-btn,.pulpit-tabs,.pulpit>.chat{display:none!important}.shell a.btn[href^=http]{display:inline!important;min-height:0;padding:0;border:0;background:none;color:var(--ink);font:inherit;text-decoration:underline}.shell a.btn[href^=http]:after{content:" (" attr(href) ")"}.shell a{color:var(--ink);text-decoration:underline}.prose a[href^=http]:after{content:" (" attr(href) ")";color:var(--muted);font-size:.85em;overflow-wrap:anywhere}.shell *{box-shadow:none!important;text-shadow:none!important}.shell .card:not(.prose),.shell .rows>li,.prose pre,.prose blockquote,.prose figure,.prose img{break-inside:avoid}.table-scroll{overflow:visible}.prose thead{display:table-header-group}.prose tr{break-inside:avoid}.prose img{max-height:200mm;width:auto;break-inside:avoid}.shell h1,.shell h2,.shell h3{break-after:avoid}.prose p,.prose li{orphans:3;widows:3}.prose.card{padding:0;border:0;background:none}}.material-actions{align-items:center;margin:0 0 .8em}.author-actions{margin-left:auto}.confirm-dialog code{font-family:var(--mono);font-size:14.5px}@media(max-width:479.98px){.confirm-dialog .chat-confirm-buttons{flex-direction:column}.confirm-dialog .chat-confirm-buttons .btn{width:100%;justify-content:center}}.edit-details{margin-bottom:0}.edit-details>summary{min-height:44px;display:flex;align-items:center;flex-wrap:wrap;gap:8px;cursor:pointer;font-family:var(--display);font-weight:600;font-size:17px;margin-bottom:8px}.edit-details-values{font-family:var(--display);font-weight:600;font-size:14.5px;color:var(--muted)}.edit-course{min-height:44px;display:flex;align-items:center;color:var(--ink)}.edit-tags-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.edit-tags-head .label{font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.edit-tags .chips{align-items:center}.edit-block{margin-top:24px}.edit-tabs{margin-bottom:8px}.edit-toolbar-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}.edit-preview-toggle{margin-left:auto}.md-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:0}.md-tool{width:40px;height:40px;border-radius:6px;color:var(--ink)}.md-tool svg{width:20px;height:20px}.md-tool:focus-visible{outline:2px solid var(--accent);outline-offset:0}.md-toolbar-sep{display:none}@media(min-width:480px){.md-toolbar-sep{display:block;width:1px;height:24px;margin:0 4px;background:var(--rule)}}.edit-panes{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}.edit-panes.split{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.edit-pane{background:var(--panel);border:1px solid var(--rule);border-radius:4px;min-width:0}.edit-editor .md-editor,.edit-editor .cm-editor{min-height:320px}.edit-pane-skeleton{height:320px}.edit-preview{padding:16px}.edit-preview-caption{display:block;margin-bottom:8px;font-family:var(--mono);font-size:12px;line-height:1.4;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.edit-status-strip{margin:0;padding:8px 16px;font-size:14.5px;line-height:1.5;color:var(--muted)}.edit-save-error{margin-top:16px}.edit-actions{position:sticky;bottom:0;z-index:5;min-height:56px;display:flex;align-items:center;margin-top:16px;padding:8px 0;background:var(--paper);border-top:1px solid var(--rule)}.edit-actions .btn-row{align-items:center}@media(min-width:900px){.edit-pane{height:max(480px,calc(100dvh - 176px));overflow:auto}.edit-editor{overflow:hidden}.edit-editor .md-editor,.edit-editor .cm-editor,.edit-pane-skeleton{height:100%}}@media(max-width:899.98px){.edit-actions{bottom:calc(var(--tabbar-h) + var(--safe-bottom))}}@media print{.no-print{display:none!important}}.notice.conflict{margin-bottom:16px;background:var(--panel);border:1px solid var(--rule);border-left:3px solid var(--warn);color:var(--ink)}.notice.conflict:focus{outline:none}.notice.conflict:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.conflict-title{margin:0;font-family:var(--display);font-size:17px;font-weight:600;line-height:1.55;color:var(--warn)}.conflict-line{margin:2px 0 0;font-size:14.5px;line-height:1.5;color:var(--muted)}.notice.conflict .btn-row,.notice.conflict .error-text{margin-top:8px}.md-editor{position:relative}.md-editor-host{height:100%}.md-editor.dragging{outline:2px dashed var(--accent);outline-offset:-2px}.md-drop-overlay{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;padding:16px;text-align:center;background:var(--accent-soft);color:var(--ink);font-size:17px;pointer-events:none}.edit-status-strip{position:relative}.edit-upload-bar{position:absolute;left:0;top:0;height:2px;background:var(--accent);transition:width .2s linear}@media(prefers-reduced-motion:reduce){.edit-upload-bar{transition:none}}.edit-upload-errors{margin-top:8px}.edit-upload-error{margin:0 0 4px}.notice.draft-offer{margin-bottom:16px;color:var(--ink)}.draft-offer-title{margin:0;font-family:var(--display);font-size:17px;font-weight:600;line-height:1.55}.notice.draft-offer .btn-row{margin-top:8px}@media(min-width:900px){.chat-dialog.diff-dialog{width:min(1100px,calc(100vw - 32px));height:85vh;max-height:none}}.diff-scroll{flex:1 1 auto;min-height:0;overflow:auto}.diff-fields{width:100%;margin-bottom:16px;border-collapse:collapse;font-size:14.5px;line-height:1.5}.diff-fields th,.diff-fields td{padding:6px 8px;border:1px solid var(--rule);text-align:left;vertical-align:top;color:var(--ink);overflow-wrap:anywhere}.diff-fields th{font-family:var(--display);font-weight:600}.diff-fields thead th{background:var(--paper)}.diff-body{border:1px solid var(--rule);border-radius:4px}.diff-head{display:flex;flex-wrap:wrap;gap:4px 16px;padding:6px 8px;border-bottom:1px solid var(--rule);background:var(--paper);font-family:var(--mono);font-size:12px;line-height:1.4;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.diff-body.split .diff-head,.diff-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.diff-row>.diff-line+.diff-line{border-left:1px solid var(--rule)}.diff-line{display:flex;gap:4px;min-height:21.75px;padding:0 8px;font-family:var(--mono);font-size:14.5px;line-height:1.5;color:var(--ink)}.diff-line.server{background:var(--miss-soft)}.diff-line.mine{background:var(--accent-soft)}.diff-line.empty{background:var(--paper)}.diff-no{flex:0 0 auto;min-width:4ch;padding-top:.2em;font-size:12px;line-height:1.4;text-align:right;color:var(--muted)}.diff-glyph{flex:0 0 1ch}.diff-line.server .diff-glyph{color:var(--miss)}.diff-line.mine .diff-glyph{color:var(--accent)}.diff-text{flex:1 1 auto;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}.diff-gap{display:block;width:100%;padding:4px 8px;border-block:1px dashed var(--rule);font-size:14.5px;text-align:left}.diff-foot{position:sticky;bottom:0;margin-top:16px;padding-top:12px;border-top:1px solid var(--rule);background:var(--panel)} diff --git a/public/assets/index-CtNAsql9.js b/public/assets/index-CtNAsql9.js deleted file mode 100644 index 4367088..0000000 --- a/public/assets/index-CtNAsql9.js +++ /dev/null @@ -1,5 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-B3MVwe0A.js","assets/forms-CHet_2fA.js","assets/oauth-zzthF4BZ.js","assets/RegisterView-CtHxA-vZ.js","assets/ForgotView-DuTJzz4K.js","assets/OAuthCallbackView-B9h39K0z.js","assets/OAuthRegisterView-BE24PEnT.js","assets/ResetView--PDlpYxp.js","assets/DashboardView-BzEXGil-.js","assets/PageHead.vue_vue_type_script_setup_true_lang-Bu51AEui.js","assets/LoadState.vue_vue_type_script_setup_true_lang-D66QQkfK.js","assets/ElectiveBar.vue_vue_type_script_setup_true_lang-DxZMSXIh.js","assets/markdown-CbtkjRI4.js","assets/ScheduleView-CKanhHpE.js","assets/scrollToHash-B7Lws5_Z.js","assets/DeadlinesView-CaD0eVv6.js","assets/CoursesView-Dq4MIMnp.js","assets/CourseView-DanUZy74.js","assets/ReadingItem.vue_vue_type_script_setup_true_lang-CyMMq5Kb.js","assets/ReadingsView-DiOpyKU1.js","assets/MaterialsView-YleScEIL.js","assets/materialQuery-Co-XzH2C.js","assets/MaterialView-BQucFIf3.js","assets/ChecklistsView-BFTAa0Tm.js","assets/ChecklistView-BDzS2ISd.js","assets/presentations-G0Dt4vNe.js","assets/SyllabiView-ar5JWjDo.js","assets/QuizzesView-BqshUAZI.js","assets/quizzes-DX8b_-1b.js","assets/QuizView-CmJ9gzI_.js","assets/MoreView-BWCniPfN.js","assets/ProfileView-B-qG3bDd.js","assets/MyPresentationsView-Dsu-fTaU.js","assets/PresentationSpeakerView-tPXpHlzH.js","assets/DeckViewer.vue_vue_type_style_index_0_lang-VLaT-7ba.js","assets/engine-DDeQk6Ow.js","assets/engine-D54I7Duj.css","assets/DeckViewer-44NpA3H-.css","assets/clock-4r1aA6KU.js","assets/remote-aOKX75Mt.js","assets/PresentationSpeakerView-B_k_BZvQ.css","assets/PresentationRemoteView-kS7sCJIb.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/log-Xlt5jeld.js","assets/PresentationRemoteView-DupVcsnc.css","assets/PresentationPublicView-BvCmAAgB.js","assets/PresentationPublicView-BA_OfOyJ.css","assets/CastReceiverView-1vQ3DTnH.js","assets/CastReceiverView-guIBZout.css","assets/NotFoundView-C3HgwQgy.js"])))=>i.map(i=>d[i]); -var tu=Object.defineProperty;var nu=(e,t,n)=>t in e?tu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Rn=(e,t,n)=>nu(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function To(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const we={},pn=[],Ot=()=>{},El=()=>!1,er=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),tr=e=>e.startsWith("onUpdate:"),Fe=Object.assign,Ro=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},su=Object.prototype.hasOwnProperty,ye=(e,t)=>su.call(e,t),Z=Array.isArray,sn=e=>ys(e)==="[object Map]",Bt=e=>ys(e)==="[object Set]",ii=e=>ys(e)==="[object Date]",se=e=>typeof e=="function",Me=e=>typeof e=="string",lt=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",Sl=e=>(be(e)||se(e))&&se(e.then)&&se(e.catch),Tl=Object.prototype.toString,ys=e=>Tl.call(e),ru=e=>ys(e).slice(8,-1),Rl=e=>ys(e)==="[object Object]",nr=e=>Me(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Xn=To(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),sr=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ou=/-\w/g,tt=sr(e=>e.replace(ou,t=>t.slice(1).toUpperCase())),iu=/\B([A-Z])/g,ln=sr(e=>e.replace(iu,"-$1").toLowerCase()),rr=sr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Pr=sr(e=>e?`on${rr(e)}`:""),At=(e,t)=>!Object.is(e,t),js=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},or=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let li;const ir=()=>li||(li=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ao(e){if(Z(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(lu).forEach(n=>{if(n){const s=n.split(au);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ln(e){let t="";if(Me(e))t=e;else if(Z(e))for(let n=0;nUt(n,t))}const xl=e=>!!(e&&e.__v_isRef===!0),Jt=e=>Me(e)?e:e==null?"":Z(e)||be(e)&&(e.toString===Tl||!se(e.toString))?xl(e)?Jt(e.value):JSON.stringify(e,Ol,2):String(e),Ol=(e,t)=>xl(t)?Ol(e,t.value):sn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Mr(s,o)+" =>"]=r,n),{})}:Bt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Mr(n))}:lt(t)?Mr(t):be(t)&&!Z(t)&&!Rl(t)?String(t):t,Mr=(e,t="")=>{var n;return lt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let ze;class Pl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&ze&&(ze.active?(this.parent=ze,this.index=(ze.scopes||(ze.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(ze===this)ze=this.prevScope;else{let t=ze;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(ts){let t=ts;for(ts=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;es;){let t=es;for(es=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Nl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function jl(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Po(s),gu(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Qr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&($l(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function $l(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ls)||(e.globalVersion=ls,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Qr(e))))return;e.flags|=2;const t=e.dep,n=Re,s=pt;Re=e,pt=!0;try{Nl(e);const r=e.fn(e._value);(t.version===0||At(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Re=n,pt=s,jl(e),e.flags&=-3}}function Po(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Po(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function gu(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let pt=!0;const zl=[];function qt(){zl.push(pt),pt=!1}function Ht(){const e=zl.pop();pt=e===void 0?!0:e}function ui(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Re;Re=void 0;try{t()}finally{Re=n}}}let ls=0;class yu{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Mo{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Re||!pt||Re===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Re)n=this.activeLink=new yu(Re,this),Re.deps?(n.prevDep=Re.depsTail,Re.depsTail.nextDep=n,Re.depsTail=n):Re.deps=Re.depsTail=n,Vl(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Re.depsTail,n.nextDep=void 0,Re.depsTail.nextDep=n,Re.depsTail=n,Re.deps===n&&(Re.deps=s)}return n}trigger(t){this.version++,ls++,this.notify(t)}notify(t){xo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Oo()}}}function Vl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Vl(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Bs=new WeakMap,yn=Symbol(""),Xr=Symbol(""),as=Symbol("");function Ge(e,t,n){if(pt&&Re){let s=Bs.get(e);s||Bs.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Mo),r.map=s,r.key=n),r.track()}}function $t(e,t,n,s,r,o){const i=Bs.get(e);if(!i){ls++;return}const l=a=>{a&&a.trigger()};if(xo(),t==="clear")i.forEach(l);else{const a=Z(e),c=a&&nr(n);if(a&&n==="length"){const u=Number(s);i.forEach((f,p)=>{(p==="length"||p===as||!lt(p)&&p>=u)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),c&&l(i.get(as)),t){case"add":a?c&&l(i.get("length")):(l(i.get(yn)),sn(e)&&l(i.get(Xr)));break;case"delete":a||(l(i.get(yn)),sn(e)&&l(i.get(Xr)));break;case"set":sn(e)&&l(i.get(yn));break}}Oo()}function _u(e,t){const n=Bs.get(e);return n&&n.get(t)}function An(e){const t=de(e);return t===e||(Ge(t,"iterate",as),it(e))?t:Mt(e)?Pt(e)?t.map(n=>on(ht(n))):t.map(on):t.map(ht)}function lr(e){return Ge(e=de(e),"iterate",as),e}function Tt(e,t){return Mt(e)?on(Pt(e)?ht(t):t):ht(t)}const vu={__proto__:null,[Symbol.iterator](){return Ir(this,Symbol.iterator,e=>Tt(this,e))},concat(...e){return An(this).concat(...e.map(t=>Z(t)?An(t):t))},entries(){return Ir(this,"entries",e=>(e[1]=Tt(this,e[1]),e))},every(e,t){return It(this,"every",e,t,void 0,arguments)},filter(e,t){return It(this,"filter",e,t,n=>n.map(s=>Tt(this,s)),arguments)},find(e,t){return It(this,"find",e,t,n=>Tt(this,n),arguments)},findIndex(e,t){return It(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return It(this,"findLast",e,t,n=>Tt(this,n),arguments)},findLastIndex(e,t){return It(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return It(this,"forEach",e,t,void 0,arguments)},includes(...e){return Lr(this,"includes",e)},indexOf(...e){return Lr(this,"indexOf",e)},join(e){return An(this).join(e)},lastIndexOf(...e){return Lr(this,"lastIndexOf",e)},map(e,t){return It(this,"map",e,t,void 0,arguments)},pop(){return Hn(this,"pop")},push(...e){return Hn(this,"push",e)},reduce(e,...t){return fi(this,"reduce",e,t)},reduceRight(e,...t){return fi(this,"reduceRight",e,t)},shift(){return Hn(this,"shift")},some(e,t){return It(this,"some",e,t,void 0,arguments)},splice(...e){return Hn(this,"splice",e)},toReversed(){return An(this).toReversed()},toSorted(e){return An(this).toSorted(e)},toSpliced(...e){return An(this).toSpliced(...e)},unshift(...e){return Hn(this,"unshift",e)},values(){return Ir(this,"values",e=>Tt(this,e))}};function Ir(e,t,n){const s=lr(e),r=s[t]();return s!==e&&!it(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const bu=Array.prototype;function It(e,t,n,s,r,o){const i=lr(e),l=i!==e&&!it(e),a=i[t];if(a!==bu[t]){const f=a.apply(e,o);return l?ht(f):f}let c=n;i!==e&&(l?c=function(f,p){return n.call(this,Tt(e,f),p,e)}:n.length>2&&(c=function(f,p){return n.call(this,f,p,e)}));const u=a.call(i,c,s);return l&&r?r(u):u}function fi(e,t,n,s){const r=lr(e),o=r!==e&&!it(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(c,u,f){return l&&(l=!1,c=Tt(e,c)),n.call(this,c,Tt(e,u),f,e)}):n.length>3&&(i=function(c,u,f){return n.call(this,c,u,f,e)}));const a=r[t](i,...s);return l?Tt(e,a):a}function Lr(e,t,n){const s=de(e);Ge(s,"iterate",as);const r=s[t](...n);return(r===-1||r===!1)&&ar(n[0])?(n[0]=de(n[0]),s[t](...n)):r}function Hn(e,t,n=[]){qt(),xo();const s=de(e)[t].apply(e,n);return Oo(),Ht(),s}const wu=To("__proto__,__v_isRef,__isVue"),Fl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(lt));function Eu(e){lt(e)||(e=String(e));const t=de(this);return Ge(t,"has",e),t.hasOwnProperty(e)}class Bl{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?ku:Kl:o?Hl:ql).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=Z(t);if(!r){let a;if(i&&(a=vu[n]))return a;if(n==="hasOwnProperty")return Eu}const l=Reflect.get(t,n,De(t)?t:s);if((lt(n)?Fl.has(n):wu(n))||(r||Ge(t,"get",n),o))return l;if(De(l)){const a=i&&nr(n)?l:l.value;return r&&be(a)?to(a):a}return be(l)?r?to(l):_s(l):l}}class Ul extends Bl{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=Z(t)&&nr(n);if(!this._isShallow){const c=Mt(o);if(!it(s)&&!Mt(s)&&(o=de(o),s=de(s)),!i&&De(o)&&!De(s))return c||(o.value=s),!0}const l=i?Number(n)e,Cs=e=>Reflect.getPrototypeOf(e);function Cu(e,t,n){return function(...s){const r=this.__v_raw,o=de(r),i=sn(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=r[e](...s),u=n?eo:t?on:ht;return!t&&Ge(o,"iterate",a?Xr:yn),Fe(Object.create(c),{next(){const{value:f,done:p}=c.next();return p?{value:f,done:p}:{value:l?[u(f[0]),u(f[1])]:u(f),done:p}}})}}function xs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function xu(e,t){const n={get(r){const o=this.__v_raw,i=de(o),l=de(r);e||(At(r,l)&&Ge(i,"get",r),Ge(i,"get",l));const{has:a}=Cs(i),c=t?eo:e?on:ht;if(a.call(i,r))return c(o.get(r));if(a.call(i,l))return c(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&Ge(de(r),"iterate",yn),r.size},has(r){const o=this.__v_raw,i=de(o),l=de(r);return e||(At(r,l)&&Ge(i,"has",r),Ge(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,a=de(l),c=t?eo:e?on:ht;return!e&&Ge(a,"iterate",yn),l.forEach((u,f)=>r.call(o,c(u),c(f),i))}};return Fe(n,e?{add:xs("add"),set:xs("set"),delete:xs("delete"),clear:xs("clear")}:{add(r){const o=de(this),i=Cs(o),l=de(r),a=!t&&!it(r)&&!Mt(r)?l:r;return i.has.call(o,a)||At(r,a)&&i.has.call(o,r)||At(l,a)&&i.has.call(o,l)||(o.add(a),$t(o,"add",a,a)),this},set(r,o){!t&&!it(o)&&!Mt(o)&&(o=de(o));const i=de(this),{has:l,get:a}=Cs(i);let c=l.call(i,r);c||(r=de(r),c=l.call(i,r));const u=a.call(i,r);return i.set(r,o),c?At(o,u)&&$t(i,"set",r,o):$t(i,"add",r,o),this},delete(r){const o=de(this),{has:i,get:l}=Cs(o);let a=i.call(o,r);a||(r=de(r),a=i.call(o,r)),l&&l.call(o,r);const c=o.delete(r);return a&&$t(o,"delete",r,void 0),c},clear(){const r=de(this),o=r.size!==0,i=r.clear();return o&&$t(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Cu(r,e,t)}),n}function ko(e,t){const n=xu(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(ye(n,r)&&r in s?n:s,r,o)}const Ou={get:ko(!1,!1)},Pu={get:ko(!1,!0)},Mu={get:ko(!0,!1)};const ql=new WeakMap,Hl=new WeakMap,Kl=new WeakMap,ku=new WeakMap;function Iu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function _s(e){return Mt(e)?e:Io(e,!1,Tu,Ou,ql)}function Gl(e){return Io(e,!1,Au,Pu,Hl)}function to(e){return Io(e,!0,Ru,Mu,Kl)}function Io(e,t,n,s,r){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=r.get(e);if(o)return o;const i=Iu(ru(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function Pt(e){return Mt(e)?Pt(e.__v_raw):!!(e&&e.__v_isReactive)}function Mt(e){return!!(e&&e.__v_isReadonly)}function it(e){return!!(e&&e.__v_isShallow)}function ar(e){return e?!!e.__v_raw:!1}function de(e){const t=e&&e.__v_raw;return t?de(t):e}function Lo(e){return!ye(e,"__v_skip")&&Object.isExtensible(e)&&Al(e,"__v_skip",!0),e}const ht=e=>be(e)?_s(e):e,on=e=>be(e)?to(e):e;function De(e){return e?e.__v_isRef===!0:!1}function X(e){return Wl(e,!1)}function jn(e){return Wl(e,!0)}function Wl(e,t){return De(e)?e:new Lu(e,t)}class Lu{constructor(t,n){this.dep=new Mo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:de(t),this._value=n?t:ht(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||it(t)||Mt(t);t=s?t:de(t),At(t,n)&&(this._rawValue=t,this._value=s?t:ht(t),this.dep.trigger())}}function Pe(e){return De(e)?e.value:e}function Ym(e){return se(e)?e():Pe(e)}const Du={get:(e,t,n)=>t==="__v_raw"?e:Pe(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return De(r)&&!De(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Jl(e){return Pt(e)?e:new Proxy(e,Du)}function Nu(e){const t=Z(e)?new Array(e.length):{};for(const n in e)t[n]=$u(e,n);return t}class ju{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=lt(n)?n:String(n),this._raw=de(t);let r=!0,o=t;if(!Z(t)||lt(this._key)||!nr(this._key))do r=!ar(o)||it(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Pe(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&De(this._raw[this._key])){const n=this._object[this._key];if(De(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return _u(this._raw,this._key)}}function $u(e,t,n){return new ju(e,t,n)}class zu{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Mo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ls-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Re!==this)return Dl(this,!0),!0}get value(){const t=this.dep.track();return $l(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Vu(e,t,n=!1){let s,r;return se(e)?s=e:(s=e.get,r=e.set),new zu(s,r,n)}const Os={},Us=new WeakMap;let dn;function Fu(e,t=!1,n=dn){if(n){let s=Us.get(n);s||Us.set(n,s=[]),s.push(e)}}function Bu(e,t,n=we){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=n,c=P=>r?P:it(P)||r===!1||r===0?zt(P,1):zt(P);let u,f,p,g,v=!1,w=!1;if(De(e)?(f=()=>e.value,v=it(e)):Pt(e)?(f=()=>c(e),v=!0):Z(e)?(w=!0,v=e.some(P=>Pt(P)||it(P)),f=()=>e.map(P=>{if(De(P))return P.value;if(Pt(P))return c(P);if(se(P))return a?a(P,2):P()})):se(e)?t?f=a?()=>a(e,2):e:f=()=>{if(p){qt();try{p()}finally{Ht()}}const P=dn;dn=u;try{return a?a(e,3,[g]):e(g)}finally{dn=P}}:f=Ot,t&&r){const P=f,N=r===!0?1/0:r;f=()=>zt(P(),N)}const S=kl(),E=()=>{u.stop(),S&&S.active&&Ro(S.effects,u)};if(o&&t){const P=t;t=(...N)=>{const Q=P(...N);return E(),Q}}let y=w?new Array(e.length).fill(Os):Os;const x=P=>{if(!(!(u.flags&1)||!u.dirty&&!P))if(t){const N=u.run();if(P||r||v||(w?N.some((Q,j)=>At(Q,y[j])):At(N,y))){p&&p();const Q=dn;dn=u;try{const j=[N,y===Os?void 0:w&&y[0]===Os?[]:y,g];y=N,a?a(t,3,j):t(...j)}finally{dn=Q}}}else u.run()};return l&&l(x),u=new Il(f),u.scheduler=i?()=>i(x,!1):x,g=P=>Fu(P,!1,u),p=u.onStop=()=>{const P=Us.get(u);if(P){if(a)a(P,4);else for(const N of P)N();Us.delete(u)}},t?s?x(!0):y=u.run():i?i(x.bind(null,!0),!0):u.run(),E.pause=u.pause.bind(u),E.resume=u.resume.bind(u),E.stop=E,E}function zt(e,t=1/0,n){if(t<=0||!be(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,De(e))zt(e.value,t,n);else if(Z(e))for(let s=0;s{zt(s,t,n)});else if(Rl(e)){for(const s in e)zt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&zt(e[s],t,n)}return e}function vs(e,t,n,s){try{return s?e(...s):e()}catch(r){bs(r,t,n)}}function mt(e,t,n,s){if(se(e)){const r=vs(e,t,n,s);return r&&Sl(r)&&r.catch(o=>{bs(o,t,n)}),r}if(Z(e)){const r=[];for(let o=0;o>>1,r=et[s],o=cs(r);o=cs(n)?et.push(e):et.splice(qu(t),0,e),e.flags|=1,Zl()}}function Zl(){qs||(qs=Yl.then(Xl))}function Hu(e){if(!Z(e))Xt&&e.id===-1?Xt.splice(Pn+1,0,e):e.flags&1||(Dn.push(e),e.flags|=1);else for(let t=0;tcs(n)-cs(s));if(Dn.length=0,Xt){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function Xl(e){try{for(Et=0;Et{s._d&&Ws(-1);const o=Hs(t),i=Ft.length;let l;try{l=e(...r)}finally{for(let a=Ft.length;a>i;a--)Bo();Hs(o),s._d&&Ws(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function Ku(e,t){if(Ue===null)return e;const n=mr(Ue),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&se(t)?t.call(s&&s.proxy):t}}function Gu(){return!!(Uo()||vn)}const Wu=Symbol.for("v-scx"),Ju=()=>dt(Wu);function _n(e,t,n){return ta(e,t,n)}function ta(e,t,n=we){const{immediate:s,deep:r,flush:o,once:i}=n,l=Fe({},n),a=t&&s||!t&&o!=="post";let c;if(zn){if(o==="sync"){const g=Ju();c=g.__watcherHandles||(g.__watcherHandles=[])}else if(!a){const g=()=>{};return g.stop=Ot,g.resume=Ot,g.pause=Ot,g}}const u=Be;l.call=(g,v,w)=>mt(g,u,v,w);let f=!1;o==="post"?l.scheduler=g=>{Ze(g,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(g,v)=>{v?g():Do(g)}),l.augmentJob=g=>{t&&(g.flags|=4),f&&(g.flags|=2,u&&(g.id=u.uid,g.i=u))};const p=Bu(e,t,l);return zn&&(c?c.push(p):a&&p()),p}function Yu(e,t,n){const s=this.proxy,r=Me(e)?e.includes(".")?na(s,e):()=>s[e]:e.bind(s,s);let o;se(t)?o=t:(o=t.handler,n=t);const i=ws(this),l=ta(r,o.bind(s),n);return i(),l}function na(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,hn=e=>e&&(e.disabled||e.disabled===""),Zu=e=>e&&(e.defer||e.defer===""),hi=e=>typeof SVGElement<"u"&&e instanceof SVGElement,pi=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,no=(e,t)=>{const n=e&&e.to;return Me(n)?t?t(n):null:n},Qu={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,a,c){const{mc:u,pc:f,pbc:p,o:{insert:g,querySelector:v,createText:w,createComment:S,parentNode:E}}=c,y=hn(t.props);let{dynamicChildren:x}=t;const P=(j,F,B)=>{j.shapeFlag&16&&u(j.children,F,B,r,o,i,l,a)},N=(j=t)=>{const F=hn(j.props),B=j.target=no(j.props,v),ie=so(B,j,w,g);B&&(i!=="svg"&&hi(B)?i="svg":i!=="mathml"&&pi(B)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(B),F||(P(j,B,ie),Yn(j,!1)))},Q=j=>{const F=()=>{if(Yt.get(j)===F){if(Yt.delete(j),hn(j.props)){const B=E(j.el)||n;P(j,B,j.anchor),Yn(j,!0)}N(j)}};Yt.set(j,F),Ze(F,o)};if(e==null){const j=t.el=w(""),F=t.anchor=w("");if(g(j,n,s),g(F,n,s),Zu(t.props)||o&&o.pendingBranch){Q(t);return}y&&(P(t,n,F),Yn(t,!0)),N()}else{t.el=e.el;const j=t.anchor=e.anchor,F=Yt.get(e);if(F){F.flags|=8,Yt.delete(e),Q(t);return}t.targetStart=e.targetStart;const B=t.target=e.target,ie=t.targetAnchor=e.targetAnchor,L=hn(e.props),Ce=L?n:B,xe=L?j:ie;if(i==="svg"||hi(B)?i="svg":(i==="mathml"||pi(B))&&(i="mathml"),x?(p(e.dynamicChildren,x,Ce,r,o,i,l),Fo(e,t,!0)):a||f(e,t,Ce,xe,r,o,i,l,!1),y)L?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ps(t,n,j,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const q=no(t.props,v);q&&(t.target=q,Ps(t,q,null,c,0))}else L&&Ps(t,B,ie,c,1);Yn(t,y)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:a,targetStart:c,targetAnchor:u,target:f,props:p}=e,g=hn(p),v=o||!g,w=Yt.get(e);if(w&&(w.flags|=8,Yt.delete(e)),f&&(r(c),r(u)),o&&r(a),!w&&(g||f)&&i&16)for(let S=0;S1){for(const n of e)if(n.type!==kt){t=n;break}}return t}function ra(e){if(!fr(e))return ur(e.type)&&e.children?ef(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&se(n.default))return n.default()}}function No(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;No(ur(n.type)&&ra(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function En(e,t){return se(e)?Fe({name:e.name},t,{setup:e}):e}function Qm(){const e=Uo();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function jo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function mi(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Ks=new WeakMap;function ns(e,t,n,s,r=!1){if(Z(e)){e.forEach((w,S)=>ns(w,t&&(Z(t)?t[S]:t),n,s,r));return}if(Nn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ns(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?mr(s.component):s.el,i=r?null:o,{i:l,r:a}=e,c=t&&t.r,u=l.refs===we?l.refs={}:l.refs,f=l.setupState,p=de(f),g=f===we?El:w=>mi(u,w)?!1:ye(p,w),v=(w,S)=>!(S&&mi(u,S));if(c!=null&&c!==a){if(gi(t),Me(c))u[c]=null,g(c)&&(f[c]=null);else if(De(c)){const w=t;v(c,w.k)&&(c.value=null),w.k&&(u[w.k]=null)}}if(se(a))vs(a,l,12,[i,u]);else{const w=Me(a),S=De(a);if(w||S){const E=()=>{if(e.f){const y=w?g(a)?f[a]:u[a]:v()||!e.k?a.value:u[e.k];if(r)Z(y)&&Ro(y,o);else if(Z(y))y.includes(o)||y.push(o);else if(w)u[a]=[o],g(a)&&(f[a]=u[a]);else{const x=[o];v(a,e.k)&&(a.value=x),e.k&&(u[e.k]=x)}}else w?(u[a]=i,g(a)&&(f[a]=i)):S&&(v(a,e.k)&&(a.value=i),e.k&&(u[e.k]=i))};if(i){const y=()=>{E(),Ks.delete(e)};y.id=-1,Ks.set(e,y),Ze(y,n)}else gi(e),E()}}}function gi(e){const t=Ks.get(e);t&&(t.flags|=8,Ks.delete(e))}const yi=e=>e.nodeType===8;ir().requestIdleCallback;ir().cancelIdleCallback;function tf(e,t){if(yi(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(yi(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const Nn=e=>!!e.type.__asyncLoader;function Xm(e){se(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:o,timeout:i,suspensible:l=!0,onError:a}=e;let c=null,u,f=0;const p=()=>(f++,c=null,g()),g=()=>{let v;return c||(v=c=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),a)return new Promise((S,E)=>{a(w,()=>S(p()),()=>E(w),f+1)});throw w}).then(w=>v!==c&&c?c:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),u=w,w)))};return En({name:"AsyncComponentWrapper",__asyncLoader:g,__asyncHydrate(v,w,S){const E=v.isConnected;let y=!1;(w.bu||(w.bu=[])).push(()=>y=!0);const x=()=>{y||!v.parentNode||E&&!v.isConnected||S()},P=o?()=>{const N=o(x,Q=>tf(v,Q));N&&(w.bum||(w.bum=[])).push(N)}:x;u?P():g().then(()=>!w.isUnmounted&&P())},get __asyncResolved(){return u},setup(){const v=Be;if(jo(v),u)return()=>Ms(u,v);const w=N=>{c=null,bs(N,v,13,!s)};if(l&&v.suspense||zn)return g().then(N=>()=>Ms(N,v)).catch(N=>(w(N),()=>s?Ee(s,{error:N}):null));const S=X(!1),E=X(),y=X(!!r);let x,P;return $o(()=>{x!=null&&clearTimeout(x),P!=null&&clearTimeout(P)}),r&&(P=setTimeout(()=>{v.isUnmounted||(y.value=!1)},r)),i!=null&&(x=setTimeout(()=>{if(!v.isUnmounted&&!S.value&&!E.value){const N=new Error(`Async component timed out after ${i}ms.`);w(N),E.value=N}},i)),g().then(()=>{v.isUnmounted||(S.value=!0,v.parent&&fr(v.parent.vnode)&&v.parent.update())}).catch(N=>{if(v.isUnmounted){c=null;return}w(N),E.value=N}),()=>{if(S.value&&u)return Ms(u,v);if(E.value&&s)return Ee(s,{error:E.value});if(n&&!y.value)return Ms(n,v)}}})}function Ms(e,t){const{ref:n,props:s,children:r,ce:o}=t.vnode,i=Ee(e,s,r);return i.ref=n,i.ce=o,delete t.vnode.ce,i}const fr=e=>e.type.__isKeepAlive;function nf(e,t){oa(e,"a",t)}function sf(e,t){oa(e,"da",t)}function oa(e,t,n=Be){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(dr(t,s,n),n){let r=n.parent;for(;r&&r.parent;)fr(r.parent.vnode)&&rf(s,t,n,r),r=r.parent}}function rf(e,t,n,s){const r=dr(t,e,s,!0);$o(()=>{Ro(s[t],r)},n)}function dr(e,t,n=Be,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{qt();const l=ws(n),a=mt(t,n,e,i);return l(),Ht(),a});return s?r.unshift(o):r.push(o),o}}const Kt=e=>(t,n=Be)=>{(!zn||e==="sp")&&dr(e,(...s)=>t(...s),n)},of=Kt("bm"),lf=Kt("m"),af=Kt("bu"),cf=Kt("u"),uf=Kt("bum"),$o=Kt("um"),ff=Kt("sp"),df=Kt("rtg"),hf=Kt("rtc");function pf(e,t=Be){dr("ec",e,t)}const mf="components";function ia(e,t){return yf(mf,e,!0,t)||e}const gf=Symbol.for("v-ndc");function yf(e,t,n=!0,s=!1){const r=Ue||Be;if(r){const o=r.type;{const l=td(o,!1);if(l&&(l===t||l===tt(t)||l===rr(tt(t))))return o}const i=_i(r[e]||o[e],t)||_i(r.appContext[e],t);return!i&&s?o:i}}function _i(e,t){return e&&(e[t]||e[tt(t)]||e[rr(tt(t))])}function vi(e,t,n,s){let r;const o=n,i=Z(e);if(i||Me(e)){const l=i&&Pt(e);let a=!1,c=!1;l&&(a=!it(e),c=Mt(e),e=lr(e)),r=new Array(e.length);for(let u=0,f=e.length;ut(l,a,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,c=l.length;a0;return t!=="default"&&(c.name=t),Xe(),fs(nt,null,[Ee("slot",c,s)],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=Ft.length;Xe();let a;try{const c=i&&la(i(n)),u=n.key||o||c&&c.key;a=fs(nt,{key:(u&&!lt(u)?u:`_${t}`)+(!c&&s?"_fb":"")},c||(s?s():[]),c&&e._===1?64:-2)}catch(c){for(let u=Ft.length;u>l;u--)Bo();throw c}finally{i&&i._c&&(i._d=!0)}return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),a}function la(e){return e.some(t=>ds(t)?!(t.type===kt||t.type===nt&&!la(t.children)):!0)?e:null}const ro=e=>e?Aa(e)?mr(e):ro(e.parent):null,ss=Fe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ro(e.parent),$root:e=>ro(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ca(e),$forceUpdate:e=>e.f||(e.f=()=>{Do(e.update)}),$nextTick:e=>e.n||(e.n=cr.bind(e.proxy)),$watch:e=>Yu.bind(e)}),Nr=(e,t)=>e!==we&&!e.__isScriptSetup&&ye(e,t),vf={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Nr(s,t))return i[t]=1,s[t];if(r!==we&&ye(r,t))return i[t]=2,r[t];if(ye(o,t))return i[t]=3,o[t];if(n!==we&&ye(n,t))return i[t]=4,n[t];oo&&(i[t]=0)}}const c=ss[t];let u,f;if(c)return t==="$attrs"&&Ge(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==we&&ye(n,t))return i[t]=4,n[t];if(f=a.config.globalProperties,ye(f,t))return f[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Nr(r,t)?(r[t]=n,!0):s!==we&&ye(s,t)?(s[t]=n,!0):ye(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let a;return!!(n[l]||e!==we&&l[0]!=="$"&&ye(e,l)||Nr(t,l)||ye(o,l)||ye(s,l)||ye(ss,l)||ye(r.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ye(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function bi(e){return Z(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let oo=!0;function bf(e){const t=ca(e),n=e.proxy,s=e.ctx;oo=!1,t.beforeCreate&&wi(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:c,created:u,beforeMount:f,mounted:p,beforeUpdate:g,updated:v,activated:w,deactivated:S,beforeDestroy:E,beforeUnmount:y,destroyed:x,unmounted:P,render:N,renderTracked:Q,renderTriggered:j,errorCaptured:F,serverPrefetch:B,expose:ie,inheritAttrs:L,components:Ce,directives:xe,filters:q}=t;if(c&&wf(c,s,null),i)for(const G in i){const re=i[G];se(re)&&(s[G]=re.bind(n))}if(r){const G=r.call(n,n);be(G)&&(e.data=_s(G))}if(oo=!0,o)for(const G in o){const re=o[G],Ne=se(re)?re.bind(n,n):se(re.get)?re.get.bind(n,n):Ot,pe=!se(re)&&se(re.set)?re.set.bind(n):Ot,Te=ne({get:Ne,set:pe});Object.defineProperty(s,G,{enumerable:!0,configurable:!0,get:()=>Te.value,set:ke=>Te.value=ke})}if(l)for(const G in l)aa(l[G],s,n,G);if(a){const G=se(a)?a.call(n):a;Reflect.ownKeys(G).forEach(re=>{$s(re,G[re])})}u&&wi(u,e,"c");function ee(G,re){Z(re)?re.forEach(Ne=>G(Ne.bind(n))):re&&G(re.bind(n))}if(ee(of,f),ee(lf,p),ee(af,g),ee(cf,v),ee(nf,w),ee(sf,S),ee(pf,F),ee(hf,Q),ee(df,j),ee(uf,y),ee($o,P),ee(ff,B),Z(ie))if(ie.length){const G=e.exposed||(e.exposed={});ie.forEach(re=>{Object.defineProperty(G,re,{get:()=>n[re],set:Ne=>n[re]=Ne,enumerable:!0})})}else e.exposed||(e.exposed={});N&&e.render===Ot&&(e.render=N),L!=null&&(e.inheritAttrs=L),Ce&&(e.components=Ce),xe&&(e.directives=xe),B&&jo(e)}function wf(e,t,n=Ot){Z(e)&&(e=io(e));for(const s in e){const r=e[s];let o;be(r)?"default"in r?o=dt(r.from||s,r.default,!0):o=dt(r.from||s):o=dt(r),De(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function wi(e,t,n){mt(Z(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function aa(e,t,n,s){let r=s.includes(".")?na(n,s):()=>n[s];if(Me(e)){const o=t[e];se(o)&&_n(r,o)}else if(se(e))_n(r,e.bind(n));else if(be(e))if(Z(e))e.forEach(o=>aa(o,t,n,s));else{const o=se(e.handler)?e.handler.bind(n):t[e.handler];se(o)&&_n(r,o,e)}}function ca(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let a;return l?a=l:!r.length&&!n&&!s?a=t:(a={},r.length&&r.forEach(c=>Gs(a,c,i,!0)),Gs(a,t,i)),be(t)&&o.set(t,a),a}function Gs(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Gs(e,o,n,!0),r&&r.forEach(i=>Gs(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Ef[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Ef={data:Ei,props:Si,emits:Si,methods:Zn,computed:Zn,beforeCreate:Ye,created:Ye,beforeMount:Ye,mounted:Ye,beforeUpdate:Ye,updated:Ye,beforeDestroy:Ye,beforeUnmount:Ye,destroyed:Ye,unmounted:Ye,activated:Ye,deactivated:Ye,errorCaptured:Ye,serverPrefetch:Ye,components:Zn,directives:Zn,watch:Tf,provide:Ei,inject:Sf};function Ei(e,t){return t?e?function(){return Fe(se(e)?e.call(this,this):e,se(t)?t.call(this,this):t)}:t:e}function Sf(e,t){return Zn(io(e),io(t))}function io(e){if(Z(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${tt(t)}Modifiers`]||e[`${ln(t)}Modifiers`];function xf(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||we;let r=n;const o=t.startsWith("update:"),i=o&&Cf(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>Me(u)?u.trim():u)),i.number&&(r=r.map(or)));let l,a=s[l=Pr(t)]||s[l=Pr(tt(t))];!a&&o&&(a=s[l=Pr(ln(t))]),a&&mt(a,e,6,r);const c=s[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,mt(c,e,6,r)}}const Of=new WeakMap;function fa(e,t,n=!1){const s=n?Of:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!se(e)){const a=c=>{const u=fa(c,t,!0);u&&(l=!0,Fe(i,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(be(e)&&s.set(e,null),null):(Z(o)?o.forEach(a=>i[a]=null):Fe(i,o),be(e)&&s.set(e,i),i)}function hr(e,t){return!e||!er(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ye(e,t[0].toLowerCase()+t.slice(1))||ye(e,ln(t))||ye(e,t))}function Ti(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:a,render:c,renderCache:u,props:f,data:p,setupState:g,ctx:v,inheritAttrs:w}=e,S=Hs(e);let E,y;try{if(n.shapeFlag&4){const P=r||s,N=P;E=Rt(c.call(N,P,u,f,g,p,v)),y=l}else{const P=t;E=Rt(P.length>1?P(f,{attrs:l,slots:i,emit:a}):P(f,null)),y=t.props?l:Pf(l)}}catch(P){Ft.length=0,bs(P,e,1),E=Ee(kt)}let x=E;if(y&&w!==!1){const P=Object.keys(y),{shapeFlag:N}=x;P.length&&N&7&&(o&&P.some(tr)&&(y=Mf(y,o)),x=$n(x,y,!1,!0))}if(n.dirs&&(x=$n(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition){const P=ur(x.type)&&ra(x)||x;No(P,n.transition)}return E=x,Hs(S),E}const Pf=e=>{let t;for(const n in e)(n==="class"||n==="style"||er(n))&&((t||(t={}))[n]=e[n]);return t},Mf=(e,t)=>{const n={};for(const s in e)(!tr(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function kf(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:a}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?Ri(s,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let f=0;fObject.create(ha),ma=e=>Object.getPrototypeOf(e)===ha;function Lf(e,t,n,s=!1){const r={},o=pa();e.propsDefaults=Object.create(null),ga(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:Gl(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Df(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=de(r),[a]=e.propsOptions;let c=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{a=!0;const[p,g]=ya(f,t,!0);Fe(i,p),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!a)return be(e)&&s.set(e,pn),pn;if(Z(o))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",Vo=e=>Z(e)?e.map(Rt):[Rt(e)],jf=(e,t,n)=>{if(t._n)return t;const s=In((...r)=>Vo(t(...r)),n);return s._c=!1,s},_a=(e,t,n)=>{const s=e._ctx;for(const r in e){if(zo(r))continue;const o=e[r];if(se(o))t[r]=jf(r,o,s);else if(o!=null){const i=Vo(o);t[r]=()=>i}}},va=(e,t)=>{const n=Vo(t);e.slots.default=()=>n},ba=(e,t,n)=>{for(const s in t)(n||!zo(s))&&(e[s]=t[s])},$f=(e,t,n)=>{const s=e.slots=pa();if(e.vnode.shapeFlag&32){const r=t._;r?(ba(s,t,n),n&&Al(s,"_",r,!0)):_a(t,s)}else t&&va(e,t)},zf=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=we;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:ba(r,t,n):(o=!t.$stable,_a(t,r)),i=t}else t&&(va(e,t),i={default:1});if(o)for(const l in r)!zo(l)&&i[l]==null&&delete r[l]},Ze=qf;function Vf(e){return Ff(e)}function Ff(e,t){const n=ir();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:a,setText:c,setElementText:u,parentNode:f,nextSibling:p,setScopeId:g=Ot,insertStaticContent:v}=e,w=(h,m,_,A=null,C=null,T=null,$=void 0,I=null,D=!!m.dynamicChildren)=>{if(h===m)return;h&&!Kn(h,m)&&(A=O(h),ke(h,C,T,!0),h=null),m.patchFlag===-2&&(D=!1,m.dynamicChildren=null),m.dynamicChildren&&h&&h.dynamicChildren&&h.dynamicChildren.hasOnce&&(m.dynamicChildren===pn&&(m.dynamicChildren=[]),m.dynamicChildren.hasOnce=!0);const{type:M,ref:Y,shapeFlag:V}=m;switch(M){case pr:S(h,m,_,A);break;case kt:E(h,m,_,A);break;case $r:h==null&&y(m,_,A,$);break;case nt:Ce(h,m,_,A,C,T,$,I,D);break;default:V&1?N(h,m,_,A,C,T,$,I,D):V&6?xe(h,m,_,A,C,T,$,I,D):(V&64||V&128)&&M.process(h,m,_,A,C,T,$,I,D,K)}Y!=null&&C?ns(Y,h&&h.ref,T,m||h,!m):Y==null&&h&&h.ref!=null&&ns(h.ref,null,T,h,!0)},S=(h,m,_,A)=>{if(h==null)s(m.el=l(m.children),_,A);else{const C=m.el=h.el;m.children!==h.children&&c(C,m.children)}},E=(h,m,_,A)=>{h==null?s(m.el=a(m.children||""),_,A):m.el=h.el},y=(h,m,_,A)=>{[h.el,h.anchor]=v(h.children,m,_,A,h.el,h.anchor)},x=({el:h,anchor:m},_,A)=>{let C;for(;h&&h!==m;)C=p(h),s(h,_,A),h=C;s(m,_,A)},P=({el:h,anchor:m})=>{let _;for(;h&&h!==m;)_=p(h),r(h),h=_;r(m)},N=(h,m,_,A,C,T,$,I,D)=>{if(m.type==="svg"?$="svg":m.type==="math"&&($="mathml"),h==null)Q(m,_,A,C,T,$,I,D);else{const M=h.el&&h.el._isVueCE?h.el:null;try{M&&M._beginPatch(),B(h,m,C,T,$,I,D)}finally{M&&M._endPatch()}}},Q=(h,m,_,A,C,T,$,I)=>{let D,M;const{props:Y,shapeFlag:V,transition:W,dirs:te}=h;if(D=h.el=i(h.type,T,Y&&Y.is,Y),V&8?u(D,h.children):V&16&&F(h.children,D,null,A,C,jr(h,T),$,I),te&&cn(h,null,A,"created"),j(D,h,h.scopeId,$,A),Y){for(const he in Y)he!=="value"&&!Xn(he)&&o(D,he,null,Y[he],T,A);"value"in Y&&o(D,"value",null,Y.value,T),(M=Y.onVnodeBeforeMount)&&wt(M,A,h)}te&&cn(h,null,A,"beforeMount");const ae=Bf(C,W);ae&&W.beforeEnter(D),s(D,m,_),((M=Y&&Y.onVnodeMounted)||ae||te)&&Ze(()=>{M&&wt(M,A,h),ae&&W.enter(D),te&&cn(h,null,A,"mounted")},C)},j=(h,m,_,A,C)=>{if(_&&g(h,_),A)for(let T=0;T{for(let M=D;M{const I=m.el=h.el;let{patchFlag:D,dynamicChildren:M,dirs:Y}=m;D|=h.patchFlag&16;const V=h.props||we,W=m.props||we;let te;if(_&&un(_,!1),(te=W.onVnodeBeforeUpdate)&&wt(te,_,m,h),Y&&cn(m,h,_,"beforeUpdate"),_&&un(_,!0),M&&(!h.dynamicChildren||h.dynamicChildren.length!==M.length)&&(D=0,$=!1,M=null),(V.innerHTML&&W.innerHTML==null||V.textContent&&W.textContent==null)&&u(I,""),M?ie(h.dynamicChildren,M,I,_,A,jr(m,C),T):$||re(h,m,I,null,_,A,jr(m,C),T,!1),D>0){if(D&16)L(I,V,W,_,C);else if(D&2&&V.class!==W.class&&o(I,"class",null,W.class,C),D&4&&o(I,"style",V.style,W.style,C),D&8){const ae=m.dynamicProps;for(let he=0;he{te&&wt(te,_,m,h),Y&&cn(m,h,_,"updated")},A)},ie=(h,m,_,A,C,T,$)=>{for(let I=0;I{if(m!==_){if(m!==we)for(const T in m)!Xn(T)&&!(T in _)&&o(h,T,m[T],null,C,A);for(const T in _){if(Xn(T))continue;const $=_[T],I=m[T];$!==I&&T!=="value"&&o(h,T,I,$,C,A)}"value"in _&&o(h,"value",m.value,_.value,C)}},Ce=(h,m,_,A,C,T,$,I,D)=>{const M=m.el=h?h.el:l(""),Y=m.anchor=h?h.anchor:l("");let{patchFlag:V,dynamicChildren:W,slotScopeIds:te}=m;te&&(I=I?I.concat(te):te),h==null?(s(M,_,A),s(Y,_,A),F(m.children||[],_,Y,C,T,$,I,D)):V>0&&V&64&&W&&h.dynamicChildren&&h.dynamicChildren.length===W.length?(ie(h.dynamicChildren,W,_,C,T,$,I),(m.key!=null||C&&m===C.subTree)&&Fo(h,m,!0)):re(h,m,_,Y,C,T,$,I,D)},xe=(h,m,_,A,C,T,$,I,D)=>{m.slotScopeIds=I,h==null?m.shapeFlag&512?C.ctx.activate(m,_,A,$,D):q(m,_,A,C,T,$,D):Se(h,m,D)},q=(h,m,_,A,C,T,$)=>{const I=h.component=Yf(h,A,C);if(fr(h)&&(I.ctx.renderer=K),Zf(I,!1,$),I.asyncDep){if(C&&C.registerDep(I,ee,$),!h.el){const D=I.subTree=Ee(kt);E(null,D,m,_),h.placeholder=D.el}}else ee(I,h,m,_,C,T,$)},Se=(h,m,_)=>{const A=m.component=h.component;if(kf(h,m,_))if(A.asyncDep&&!A.asyncResolved){m.el=h.el,G(A,m,_);return}else A.next=m,A.update();else m.el=h.el,A.vnode=m},ee=(h,m,_,A,C,T,$)=>{const I=()=>{if(h.isMounted){let{next:V,bu:W,u:te,parent:ae,vnode:he}=h;{const ct=wa(h);if(ct){V&&(V.el=he.el,G(h,V,$)),ct.asyncDep.then(()=>{Ze(()=>{h.isUnmounted||M()},C)});return}}let me=V,Ie;un(h,!1),V?(V.el=he.el,G(h,V,$)):V=he,W&&js(W),(Ie=V.props&&V.props.onVnodeBeforeUpdate)&&wt(Ie,ae,V,he),un(h,!0);const je=Ti(h),at=h.subTree;h.subTree=je,w(at,je,f(at.el),O(at),h,C,T),V.el=je.el,me===null&&If(h,je.el),te&&Ze(te,C),(Ie=V.props&&V.props.onVnodeUpdated)&&Ze(()=>wt(Ie,ae,V,he),C)}else{let V;const{el:W,props:te}=m,{bm:ae,m:he,parent:me,root:Ie,type:je}=h,at=Nn(m);un(h,!1),ae&&js(ae),!at&&(V=te&&te.onVnodeBeforeMount)&&wt(V,me,m),un(h,!0);{Ie.ce&&Ie.ce._hasShadowRoot()&&Ie.ce._injectChildStyle(je,h.parent?h.parent.type:void 0);const ct=h.subTree=Ti(h);w(null,ct,_,A,h,C,T),m.el=ct.el}if(he&&Ze(he,C),!at&&(V=te&&te.onVnodeMounted)){const ct=m;Ze(()=>wt(V,me,ct),C)}(m.shapeFlag&256||me&&Nn(me.vnode)&&me.vnode.shapeFlag&256)&&h.a&&Ze(h.a,C),h.isMounted=!0,m=_=A=null}};h.scope.on();const D=h.effect=new Il(I);h.scope.off();const M=h.update=D.run.bind(D),Y=h.job=D.runIfDirty.bind(D);Y.i=h,Y.id=h.uid,D.scheduler=()=>Do(Y),un(h,!0),M()},G=(h,m,_)=>{m.component=h;const A=h.vnode.props;h.vnode=m,h.next=null,Df(h,m.props,A,_),zf(h,m.children,_),qt(),di(h),Ht()},re=(h,m,_,A,C,T,$,I,D=!1)=>{const M=h&&h.children,Y=h?h.shapeFlag:0,V=m.children,{patchFlag:W,shapeFlag:te}=m;if(W>0){if(W&128){pe(M,V,_,A,C,T,$,I,D);return}else if(W&256){Ne(M,V,_,A,C,T,$,I,D);return}}te&8?(Y&16&&qe(M,C,T),V!==M&&u(_,V)):Y&16?te&16?pe(M,V,_,A,C,T,$,I,D):qe(M,C,T,!0):(Y&8&&u(_,""),te&16&&F(V,_,A,C,T,$,I,D))},Ne=(h,m,_,A,C,T,$,I,D)=>{h=h||pn,m=m||pn;const M=h.length,Y=m.length,V=Math.min(M,Y);let W;for(W=0;WY?qe(h,C,T,!0,!1,V):F(m,_,A,C,T,$,I,D,V)},pe=(h,m,_,A,C,T,$,I,D)=>{let M=0;const Y=m.length;let V=h.length-1,W=Y-1;for(;M<=V&&M<=W;){const te=h[M],ae=m[M]=D?jt(m[M]):Rt(m[M]);if(Kn(te,ae))w(te,ae,_,null,C,T,$,I,D);else break;M++}for(;M<=V&&M<=W;){const te=h[V],ae=m[W]=D?jt(m[W]):Rt(m[W]);if(Kn(te,ae))w(te,ae,_,null,C,T,$,I,D);else break;V--,W--}if(M>V){if(M<=W){const te=W+1,ae=teW)for(;M<=V;)ke(h[M],C,T,!0),M++;else{const te=M,ae=M,he=new Map;for(M=ae;M<=W;M++){const He=m[M]=D?jt(m[M]):Rt(m[M]);He.key!=null&&he.set(He.key,M)}let me,Ie=0;const je=W-ae+1;let at=!1,ct=0;const vt=new Array(je);for(M=0;M=je){ke(He,C,T,!0);continue}let Je;if(He.key!=null)Je=he.get(He.key);else for(me=ae;me<=W;me++)if(vt[me-ae]===0&&Kn(He,m[me])){Je=me;break}Je===void 0?ke(He,C,T,!0):(vt[Je-ae]=M+1,Je>=ct?ct=Je:at=!0,w(He,m[Je],_,null,C,T,$,I,D),Ie++)}const Es=at?Uf(vt):pn;for(me=Es.length-1,M=je-1;M>=0;M--){const He=ae+M,Je=m[He],Sn=m[He+1],Ss=He+1{const{el:T,type:$,transition:I,children:D,shapeFlag:M}=h;if(M&6){Te(h.component.subTree,m,_,A);return}if(M&128){h.suspense.move(m,_,A);return}if(M&64){$.move(h,m,_,K);return}if($===nt){s(T,m,_);for(let V=0;VI.enter(T),C));else{const{leave:V,delayLeave:W,afterLeave:te}=I,ae=()=>{h.ctx.isUnmounted?r(T):s(T,m,_)},he=()=>{const me=T._isLeaving||!!T[Dr];T._isLeaving&&T[Dr](!0),I.persisted&&!me?ae():V(T,()=>{ae(),te&&te()})};W?W(T,ae,he):he()}else s(T,m,_)},ke=(h,m,_,A=!1,C=!1)=>{const{type:T,props:$,ref:I,children:D,dynamicChildren:M,shapeFlag:Y,patchFlag:V,dirs:W,cacheIndex:te,memo:ae}=h;if((V===-2||M&&M.hasOnce)&&(C=!1),I!=null&&(qt(),ns(I,null,_,h,!0),Ht()),te!=null&&(!h.ctx||h.ctx===m)&&(m.renderCache[te]=void 0),Y&256){m.ctx.deactivate(h);return}const he=Y&1&&W,me=!Nn(h);let Ie;if(me&&(Ie=$&&$.onVnodeBeforeUnmount)&&wt(Ie,m,h),Y&6)st(h.component,_,A);else{if(Y&128){h.suspense.unmount(_,A);return}he&&cn(h,null,m,"beforeUnmount"),Y&64?h.type.remove(h,m,_,K,A):M&&!M.hasOnce&&(T!==nt||V>0&&V&64)?qe(M,m,_,!1,!0):(T===nt&&V&384||!C&&Y&16)&&qe(D,m,_),A&&yt(h)}const je=ae!=null&&te==null;(me&&(Ie=$&&$.onVnodeUnmounted)||he||je)&&Ze(()=>{Ie&&wt(Ie,m,h),he&&cn(h,null,m,"unmounted"),je&&(h.el=null)},_)},yt=h=>{const{type:m,el:_,anchor:A,transition:C}=h;if(m===nt){_t(_,A);return}if(m===$r){P(h),C&&!C.persisted&&C.afterLeave&&C.afterLeave();return}const T=()=>{r(_),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(h.shapeFlag&1&&C&&!C.persisted){const{leave:$,delayLeave:I}=C,D=()=>$(_,T);I?I(h.el,T,D):D()}else T()},_t=(h,m)=>{let _;for(;h!==m;)_=p(h),r(h),h=_;r(m)},st=(h,m,_)=>{const{bum:A,scope:C,job:T,subTree:$,um:I,m:D,a:M}=h;Ci(D),Ci(M),A&&js(A),C.stop(),T?(T.flags|=8,ke($,h,m,_)):h.vnode.el&&$&&($.transition=h.vnode.transition,ke($,h,m,_)),I&&Ze(I,m),Ze(()=>{h.isUnmounted=!0},m)},qe=(h,m,_,A=!1,C=!1,T=0)=>{for(let $=T;${if(h.shapeFlag&6)return O(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const m=p(h.anchor||h.el),_=m&&m[sa];return _?p(_):m};let U=!1;const z=(h,m,_)=>{let A;h==null?m._vnode&&(ke(m._vnode,null,null,!0),A=m._vnode.component):w(m._vnode||null,h,m,null,null,null,_),m._vnode=h,U||(U=!0,di(A),Ql(),U=!1)},K={p:w,um:ke,m:Te,r:yt,mt:q,mc:F,pc:re,pbc:ie,n:O,o:e};return{render:z,hydrate:void 0,createApp:Af(z)}}function jr({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function un({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Bf(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Fo(e,t,n=!1){const s=e.children,r=t.children;if(Z(s)&&Z(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function wa(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:wa(t)}function Ci(e){if(e)for(let t=0;te.__isSuspense;function qf(e,t){t&&t.pendingBranch?Z(e)?t.effects.push(...e):t.effects.push(e):Hu(e)}const nt=Symbol.for("v-fgt"),pr=Symbol.for("v-txt"),kt=Symbol.for("v-cmt"),$r=Symbol.for("v-stc"),Ft=[];let ot=null;function Xe(e=!1){Ft.push(ot=e?null:[])}function Bo(){Ft.pop(),ot=Ft[Ft.length-1]||null}let us=1;function Ws(e,t=!1){us+=e,e<0&&ot&&t&&(ot.hasOnce=!0)}function Ta(e){return e.dynamicChildren=us>0?ot||pn:null,Bo(),us>0&&ot&&ot.push(e),e}function St(e,t,n,s,r,o){return Ta(Oe(e,t,n,s,r,o,!0))}function fs(e,t,n,s,r){return Ta(Ee(e,t,n,s,r,!0))}function ds(e){return e?e.__v_isVNode===!0:!1}function Kn(e,t){return e.type===t.type&&e.key===t.key}const Ra=({key:e})=>e??null,zs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Me(e)||De(e)||se(e)?{i:Ue,r:e,k:t,f:!!n}:e:null);function Oe(e,t=null,n=null,s=0,r=null,o=e===nt?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ra(t),ref:t&&zs(t),scopeId:ea,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ue};return l?(Js(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=Me(n)?8:16),us>0&&!i&&ot&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&ot.push(a),a}const Ee=Hf;function Hf(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===gf)&&(e=kt),ds(e)){const l=$n(e,t,!0);return n&&Js(l,n),us>0&&!o&&ot&&(l.shapeFlag&6?ot[ot.indexOf(e)]=l:ot.push(l)),l.patchFlag=-2,l}if(nd(e)&&(e=e.__vccOpts),t){t=Kf(t);let{class:l,style:a}=t;l&&!Me(l)&&(t.class=Ln(l)),be(a)&&(ar(a)&&!Z(a)&&(a=Fe({},a)),t.style=Ao(a))}const i=Me(e)?1:Sa(e)?128:ur(e)?64:be(e)?4:se(e)?2:0;return Oe(e,t,n,s,r,i,o,!0)}function Kf(e){return e?ar(e)||ma(e)?Fe({},e):e:null}function $n(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,c=t?Gf(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Ra(c),ref:t&&t.ref?n&&o?Z(o)?o.concat(zs(t)):[o,zs(t)]:zs(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==nt?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&$n(e.ssContent),ssFallback:e.ssFallback&&$n(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return a&&s&&No(u,a.clone(u)),u}function ao(e=" ",t=0){return Ee(pr,null,e,t)}function Gn(e="",t=!1){return t?(Xe(),fs(kt,null,e)):Ee(kt,null,e)}function Rt(e){return e==null||typeof e=="boolean"?Ee(kt):Z(e)?Ee(nt,null,e.slice()):ds(e)?jt(e):Ee(pr,null,String(e))}function jt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:$n(e)}function Js(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Z(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Js(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!ma(t)?t._ctx=Ue:r===3&&Ue&&(Ue.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(se(t)){if(s&65){Js(e,{default:t});return}t={default:t,_ctx:Ue},n=32}else t=String(t),s&64?(n=16,t=[ao(t)]):n=8;e.children=t,e.shapeFlag|=n}function Gf(...e){const t={};for(let n=0;nBe||Ue;let Ys,hs;{const e=ir(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};Ys=t("__VUE_INSTANCE_SETTERS__",n=>Be=n),hs=t("__VUE_SSR_SETTERS__",n=>zn=n)}const ws=e=>{const t=Be;return Ys(e),e.scope.on(),()=>{e.scope.off(),Ys(t)}},xi=()=>{Be&&Be.scope.off(),Ys(null)};function Aa(e){return e.vnode.shapeFlag&4}let zn=!1;function Zf(e,t=!1,n=!1){t&&hs(t);const{props:s,children:r}=e.vnode,o=Aa(e);Lf(e,s,o,t),$f(e,r,n||t);const i=o?Qf(e,t):void 0;return t&&hs(!1),i}function Qf(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,vf);const{setup:s}=n;if(s){qt();const r=e.setupContext=s.length>1?ed(e):null,o=ws(e),i=vs(s,e,0,[e.props,r]),l=Sl(i);if(Ht(),o(),(l||e.sp)&&!Nn(e)&&jo(e),l){if(i.then(xi,xi),t)return i.then(a=>{hs(!0);try{Oi(e,a,t)}finally{hs(!1)}}).catch(a=>{bs(a,e,0)});e.asyncDep=i}else Oi(e,i)}else Ca(e)}function Oi(e,t,n){se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=Jl(t)),Ca(e)}function Ca(e,t,n){const s=e.type;e.render||(e.render=s.render||Ot);{const r=ws(e);qt();try{bf(e)}finally{Ht(),r()}}}const Xf={get(e,t){return Ge(e,"get",""),e[t]}};function ed(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Xf),slots:e.slots,emit:e.emit,expose:t}}function mr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Jl(Lo(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ss)return ss[n](e)},has(t,n){return n in t||n in ss}})):e.proxy}function td(e,t=!0){return se(e)?e.displayName||e.name:e.name||t&&e.__name}function nd(e){return se(e)&&"__vccOpts"in e}const ne=(e,t)=>Vu(e,t,zn);function xa(e,t,n){try{Ws(-1);const s=arguments.length;return s===2?be(t)&&!Z(t)?ds(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&ds(n)&&(n=[n]),Ee(e,t,n))}finally{Ws(1)}}const sd="3.5.43";let co;const Pi=typeof window<"u"&&window.trustedTypes;if(Pi)try{co=Pi.createPolicy("vue",{createHTML:e=>e})}catch{}const Oa=co?e=>co.createHTML(e):e=>e,rd="http://www.w3.org/2000/svg",od="http://www.w3.org/1998/Math/MathML",Nt=typeof document<"u"?document:null,Mi=Nt&&Nt.createElement("template"),id={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Nt.createElementNS(rd,e):t==="mathml"?Nt.createElementNS(od,e):n?Nt.createElement(e,{is:n}):Nt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Nt.createTextNode(e),createComment:e=>Nt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{Mi.innerHTML=Oa(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Mi.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ld=Symbol("_vtc");function ad(e,t,n){const s=e[ld];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Zs=Symbol("_vod"),Pa=Symbol("_vsh"),cd={name:"show",beforeMount(e,{value:t},{transition:n}){e[Zs]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Wn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Wn(e,!0),s.enter(e)):s.leave(e,()=>{Wn(e,!1)}):Wn(e,t))},beforeUnmount(e,{value:t}){Wn(e,t)}};function Wn(e,t){e.style.display=t?e[Zs]:"none",e[Pa]=!t}const ud=Symbol(""),fd=/(?:^|;)\s*display\s*:/;function dd(e,t,n){const s=e.style,r=Me(n);let o=!1;if(n&&!r){if(t)if(Me(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Qn(s,l,"")}else for(const i in t)n[i]==null&&Qn(s,i,"");for(const i in n){i==="display"&&(o=!0);const l=n[i];l!=null?pd(e,i,!Me(t)&&t?t[i]:void 0,l)||Qn(s,i,l):Qn(s,i,"")}}else if(r){if(t!==n){const i=s[ud];i&&(n+=";"+i),s.cssText=n,o=fd.test(n)}}else t&&e.removeAttribute("style");Zs in e&&(e[Zs]=o?s.display:"",e[Pa]&&(s.display="none"))}const ks=/\s*!important$/;function Qn(e,t,n){if(Z(n))n.forEach(s=>Qn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))ks.test(n)?e.setProperty(t,n.replace(ks,""),"important"):e.setProperty(t,n);else{const s=hd(e,t);ks.test(n)?e.setProperty(ln(s),n.replace(ks,""),"important"):e[s]=n}}const ki=["Webkit","Moz","ms"],zr={};function hd(e,t){const n=zr[t];if(n)return n;let s=tt(t);if(s!=="filter"&&s in e)return zr[t]=s;s=rr(s);for(let r=0;rVr||(bd.then(()=>Vr=0),Vr=Date.now());function Ed(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(Z(r)){const o=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{o.call(s),s._stopped=!0};const i=r.slice(),l=[s];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Sd=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?ad(e,s,i):t==="style"?dd(e,n,s):er(t)?tr(t)||gd(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Td(e,t,s,i))?(Di(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Li(e,t,s,i,o,t!=="value")):e._isVueCE&&(Rd(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Me(s)))?Di(e,tt(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Li(e,t,s,i))};function Td(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&ji(t)&&se(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return ji(t)&&Me(n)?!1:t in e}function Rd(e,t){const n=e._def.props;if(!n)return!1;const s=tt(t);return Array.isArray(n)?n.some(r=>tt(r)===s):Object.keys(n).some(r=>tt(r)===s)}const Vn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Z(t)?n=>js(t,n):t};function Ad(e){e.target.composing=!0}function $i(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ct=Symbol("_assign"),Is=Symbol("_initialValue");function Fr(e,t,n){return t&&(e=e.trim()),n&&(e=or(e)),e}const eg={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e.parentNode&&(e.type==="text"?e[Is]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Is]=e.defaultValue.replace(/\r\n?/g,` -`))),e[Ct]=Vn(r);const o=s||r.props&&r.props.type==="number";nn(e,t?"change":"input",i=>{i.target.composing||e[Ct](Fr(e.value,n,o))}),(n||o)&&nn(e,"change",()=>{e.value=Fr(e.value,n,o)}),t||(nn(e,"compositionstart",Ad),nn(e,"compositionend",$i),nn(e,"change",$i))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const r=t??"",o=e[Is];delete e[Is],o!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==o?e[Ct](Fr(e.value,n,s)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[Ct]=Vn(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?or(e.value):e.value,a=t??"";if(l===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===a)||(e.value=a)}},tg={deep:!0,created(e,t,n){e[Ct]=Vn(n),nn(e,"change",()=>{const s=e._modelValue,r=ps(e),o=e.checked,i=e[Ct];if(Z(s)){const l=Co(s,r),a=l!==-1;if(o&&!a)i(s.concat(r));else if(!o&&a){const c=[...s];c.splice(l,1),i(c)}}else if(Bt(s)){const l=new Set(s);o?l.add(r):l.delete(r),i(l)}else i(Ma(e,o))})},mounted:zi,beforeUpdate(e,t,n){e[Ct]=Vn(n),zi(e,t,n)}};function zi(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(Z(t))r=Co(t,s.props.value)>-1;else if(Bt(t))r=t.has(s.props.value);else{if(t===n)return;r=Ut(t,Ma(e,!0))}e.checked!==r&&(e.checked=r)}const ng={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,nn(e,"change",()=>{const r=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?or(ps(a)):ps(a)),o=e.multiple,i=o?Bt(e._modelValue)?new Set(r):r:r[0],l=e._pendingValue=[o,o?Z(i)?r.slice():r:i];try{e[Ct](i)}finally{cr(()=>{e._pendingValue===l&&(e._pendingValue=void 0)})}}),e[Ct]=Vn(s)},mounted(e,{value:t}){Vi(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Ct]=Vn(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Cd(t,n[1],n[0]))&&Vi(e,t)}};function Cd(e,t,n){if(!n||Z(e))return Ut(e,t);if(Bt(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function Vi(e,t){const n=e.multiple,s=Z(t);if(!(n&&!s&&!Bt(t))){for(let r=0,o=e.options.length;rString(c)===String(l)):i.selected=Co(t,l)>-1}else i.selected=t.has(l);else if(Ut(ps(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ps(e){return"_value"in e?e._value:e.value}function Ma(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const xd=["ctrl","shift","alt","meta"],Od={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>xd.some(n=>e[`${n}Key`]&&!t.includes(n))},sg=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...o)=>{for(let i=0;i{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(r=>{if(!("key"in r))return;const o=ln(r.key);if(t.some(i=>i===o||Pd[i]===o))return e(r)}))},Md=Fe({patchProp:Sd},id);let Fi;function kd(){return Fi||(Fi=Vf(Md))}const Id=((...e)=>{const t=kd().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Dd(s);if(!r)return;const o=t._component;!se(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,Ld(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function Ld(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Dd(e){return Me(e)?document.querySelector(e):e}let ka;const gr=e=>ka=e,Ia=Symbol();function uo(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var rs;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(rs||(rs={}));function Nd(){const e=Ml(!0),t=e.run(()=>X({}));let n=[],s=[];const r=Lo({install(o){gr(r),r._a=o,o.provide(Ia,r),o.config.globalProperties.$pinia=r,s.forEach(i=>n.push(i)),s=[]},use(o){return this._a?n.push(o):s.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const La=()=>{};function Bi(e,t,n,s=La){e.add(t);const r=()=>{e.delete(t)&&s()};return!n&&kl()&&mu(r),r}function Cn(e,...t){e.forEach(n=>{n(...t)})}const jd=e=>e(),Ui=Symbol(),Br=Symbol();function fo(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];uo(r)&&uo(s)&&e.hasOwnProperty(n)&&!De(s)&&!Pt(s)?e[n]=fo(r,s):e[n]=s}return e}const $d=Symbol();function zd(e){return!uo(e)||!Object.prototype.hasOwnProperty.call(e,$d)}const{assign:Zt}=Object;function Vd(e){return!!(De(e)&&e.effect)}function Fd(e,t,n,s){const{state:r,actions:o,getters:i}=t,l=n.state.value[e];let a;function c(){l||(n.state.value[e]=r?r():{});const u=Nu(n.state.value[e]);return Zt(u,o,Object.keys(i||{}).reduce((f,p)=>(f[p]=Lo(ne(()=>{gr(n);const g=n._s.get(e);return i[p].call(g,g)})),f),{}))}return a=Da(e,c,t,n,s,!0),a}function Da(e,t,n={},s,r,o){let i;const l=Zt({actions:{}},n),a={deep:!0};let c,u,f=new Set,p=new Set,g;const v=s.state.value[e];!o&&!v&&(s.state.value[e]={});let w;function S(F){let B;c=u=!1,typeof F=="function"?(F(s.state.value[e]),B={type:rs.patchFunction,storeId:e,events:g}):(fo(s.state.value[e],F),B={type:rs.patchObject,payload:F,storeId:e,events:g});const ie=w=Symbol();cr().then(()=>{w===ie&&(c=!0)}),u=!0,Cn(f,B,s.state.value[e])}const E=o?function(){const{state:B}=n,ie=B?B():{};this.$patch(L=>{Zt(L,ie)})}:La;function y(){i.stop(),f.clear(),p.clear(),s._s.delete(e)}const x=(F,B="")=>{if(Ui in F)return F[Br]=B,F;const ie=function(){gr(s);const L=Array.from(arguments),Ce=new Set,xe=new Set;function q(G){Ce.add(G)}function Se(G){xe.add(G)}Cn(p,{args:L,name:ie[Br],store:N,after:q,onError:Se});let ee;try{ee=F.apply(this&&this.$id===e?this:N,L)}catch(G){throw Cn(xe,G),G}return ee instanceof Promise?ee.then(G=>(Cn(Ce,G),G)).catch(G=>(Cn(xe,G),Promise.reject(G))):(Cn(Ce,ee),ee)};return ie[Ui]=!0,ie[Br]=B,ie},P={_p:s,$id:e,$onAction:Bi.bind(null,p),$patch:S,$reset:E,$subscribe(F,B={}){const ie=Bi(f,F,B.detached,()=>L()),L=i.run(()=>_n(()=>s.state.value[e],Ce=>{(B.flush==="sync"?u:c)&&F({storeId:e,type:rs.direct,events:g},Ce)},Zt({},a,B)));return ie},$dispose:y},N=_s(P);s._s.set(e,N);const j=(s._a&&s._a.runWithContext||jd)(()=>s._e.run(()=>(i=Ml()).run(()=>t({action:x}))));for(const F in j){const B=j[F];if(De(B)&&!Vd(B)||Pt(B))o||(v&&zd(B)&&(De(B)?B.value=v[F]:fo(B,v[F])),s.state.value[e][F]=B);else if(typeof B=="function"){const ie=x(B,F);j[F]=ie,l.actions[F]=B}}return Zt(N,j),Zt(de(N),j),Object.defineProperty(N,"$state",{get:()=>s.state.value[e],set:F=>{S(B=>{Zt(B,F)})}}),s._p.forEach(F=>{Zt(N,i.run(()=>F({store:N,app:s._a,pinia:s,options:l})))}),v&&o&&n.hydrate&&n.hydrate(N.$state,v),c=!0,u=!0,N}function Gt(e,t,n){let s;const r=typeof t=="function";s=r?n:t;function o(i,l){const a=Gu();return i=i||(a?dt(Ia,null):null),i&&gr(i),i=ka,i._s.has(e)||(r?Da(e,t,s,i):Fd(e,s,i)),i._s.get(e)}return o.$id=e,o}const og=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),ig=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),lg=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),ag=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),cg=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),ug=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));const Mn=typeof document<"u";function Na(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Bd(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Na(e.default)}const ge=Object.assign;function Ur(e,t){const n={};for(const s in t){const r=t[s];n[s]=gt(r)?r.map(e):e(r)}return n}const os=()=>{},gt=Array.isArray;function qi(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const ja=/#/g,Ud=/&/g,qd=/\//g,Hd=/=/g,Kd=/\?/g,$a=/\+/g,Gd=/%5B/g,Wd=/%5D/g,za=/%5E/g,Jd=/%60/g,Va=/%7B/g,Yd=/%7C/g,Fa=/%7D/g,Zd=/%20/g;function qo(e){return e==null?"":encodeURI(""+e).replace(Yd,"|").replace(Gd,"[").replace(Wd,"]")}function Qd(e){return qo(e).replace(Va,"{").replace(Fa,"}").replace(za,"^")}function ho(e){return qo(e).replace($a,"%2B").replace(Zd,"+").replace(ja,"%23").replace(Ud,"%26").replace(Jd,"`").replace(Va,"{").replace(Fa,"}").replace(za,"^")}function Xd(e){return ho(e).replace(Hd,"%3D")}function eh(e){return qo(e).replace(ja,"%23").replace(Kd,"%3F")}function th(e){return eh(e).replace(qd,"%2F")}function ms(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const nh=/\/$/,sh=e=>e.replace(nh,"");function qr(e,t,n="/"){let s,r={},o="",i="";const l=t.indexOf("#");let a=t.indexOf("?");return a=l>=0&&a>l?-1:a,a>=0&&(s=t.slice(0,a),o=t.slice(a,l>0?l:t.length),r=e(o.slice(1))),l>=0&&(s=s||t.slice(0,l),i=t.slice(l,t.length)),s=lh(s??t,n),{fullPath:s+o+i,path:s,query:r,hash:ms(i)}}function rh(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Hi(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function oh(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Fn(t.matched[s],n.matched[r])&&Ba(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Fn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ba(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!ih(e[n],t[n]))return!1;return!0}function ih(e,t){return gt(e)?Ki(e,t):gt(t)?Ki(t,e):e?.valueOf()===t?.valueOf()}function Ki(e,t){return gt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function lh(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,l;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i).join("/")}const Wt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let po=(function(e){return e.pop="pop",e.push="push",e})({}),Hr=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function ah(e){if(!e)if(Mn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),sh(e)}const ch=/^[^#]+#/;function uh(e,t){return e.replace(ch,"#")+t}function fh(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const yr=()=>({left:window.scrollX,top:window.scrollY});function dh(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=fh(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Gi(e,t){return(history.state?history.state.position-t:-1)+e}const mo=new Map;function hh(e,t){mo.set(e,t)}function ph(e){const t=mo.get(e);return mo.delete(e),t}function mh(e){return typeof e=="string"||e&&typeof e=="object"}function Ua(e){return typeof e=="string"||typeof e=="symbol"}let Le=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const qa=Symbol("");Le.MATCHER_NOT_FOUND+"",Le.NAVIGATION_GUARD_REDIRECT+"",Le.NAVIGATION_ABORTED+"",Le.NAVIGATION_CANCELLED+"",Le.NAVIGATION_DUPLICATED+"";function Bn(e,t){return ge(new Error,{type:e,[qa]:!0},t)}function Lt(e,t){return e instanceof Error&&qa in e&&(t==null||!!(e.type&t))}const gh=["params","query","hash"];function yh(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of gh)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function _h(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&ho(r)):[s&&ho(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function vh(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=gt(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const bh=Symbol(""),Ji=Symbol(""),_r=Symbol(""),Ho=Symbol(""),go=Symbol("");function Jn(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function en(e,t,n,s,r,o=i=>i()){const i=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,a)=>{const c=p=>{p===!1?a(Bn(Le.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?a(p):mh(p)?a(Bn(Le.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(i&&s.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),l())},u=o(()=>e.call(s&&s.instances[r],t,n,c));let f=Promise.resolve(u);e.length<3&&(f=f.then(c)),f.catch(p=>a(p))})}function Kr(e,t,n,s,r=o=>o()){const o=[];for(const i of e)for(const l in i.components){let a=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(Na(a)){const c=(a.__vccOpts||a)[t];c&&o.push(en(c,n,s,i,l,r))}else{let c=a();o.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const f=Bd(u)?u.default:u;i.mods[l]=u,i.components[l]=f;const p=(f.__vccOpts||f)[t];return p&&en(p,n,s,i,l,r)()}))}}return o}function wh(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iFn(c,l))?s.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(c=>Fn(c,a))||r.push(a))}return[n,s,r]}let Eh=()=>location.protocol+"//"+location.host;function Ha(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let i=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(i);return l[0]!=="/"&&(l="/"+l),Hi(l,"")}return Hi(n,e)+s+r}function Sh(e,t,n,s){let r=[],o=[],i=null;const l=({state:p})=>{const g=Ha(e,location),v=n.value,w=t.value;let S=0;if(p){if(n.value=g,t.value=p,i&&i===v){i=null;return}S=w?p.position-w.position:0}else s(g);r.forEach(E=>{E(n.value,v,{delta:S,type:po.pop,direction:S?S>0?Hr.forward:Hr.back:Hr.unknown})})};function a(){i=n.value}function c(p){r.push(p);const g=()=>{const v=r.indexOf(p);v>-1&&r.splice(v,1)};return o.push(g),g}function u(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(ge({},p.state,{scroll:yr()}),"")}}function f(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:a,listen:c,destroy:f}}function Yi(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?yr():null}}function Th(e){const{history:t,location:n}=window,s={value:Ha(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(a,c,u){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+a:Eh()+e+a;try{t[u?"replaceState":"pushState"](c,"",p),r.value=c}catch(g){console.error(g),n[u?"replace":"assign"](p)}}function i(a,c){o(a,ge({},t.state,Yi(r.value.back,a,r.value.forward,!0),c,{position:r.value.position}),!0),s.value=a}function l(a,c){const u=ge({},r.value,t.state,{forward:a,scroll:yr()});o(u.current,u,!0),o(a,ge({},Yi(s.value,a,null),{position:u.position+1},c),!1),s.value=a}return{location:s,state:r,push:l,replace:i}}function Rh(e){e=ah(e);const t=Th(e),n=Sh(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=ge({location:"",base:e,go:s,createHref:uh.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let mn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var $e=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})($e||{});const Ah={type:mn.Static,value:""},Ch=/[a-zA-Z0-9_]/;function xh(e){if(!e)return[[]];if(e==="/")return[[Ah]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}let n=$e.Static,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let l=0,a,c="",u="";function f(){c&&(n===$e.Static?o.push({type:mn.Static,value:c}):n===$e.Param||n===$e.ParamRegExp||n===$e.ParamRegExpEnd?(o.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:mn.Param,value:c,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=a}for(;lt.length?t.length===1&&t[0]===Qe.Static+Qe.Segment?1:-1:0}function Ka(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Ih={strict:!1,end:!0,sensitive:!1};function Lh(e,t,n){const s=Mh(xh(e.path),n),r=ge(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Dh(e,t){const n=[],s=new Map;t=qi(Ih,t);function r(f){return s.get(f)}function o(f,p,g){const v=!g,w=el(f);w.aliasOf=g&&g.record;const S=qi(t,f),E=[w];if("alias"in f){const P=typeof f.alias=="string"?[f.alias]:f.alias;for(const N of P)E.push(el(ge({},w,{components:g?g.record.components:w.components,path:N,aliasOf:g?g.record:w})))}let y,x;for(const P of E){const{path:N}=P;if(p&&N[0]!=="/"){const Q=p.record.path,j=Q[Q.length-1]==="/"?"":"/";P.path=p.record.path+(N&&j+N)}if(y=Lh(P,p,S),g?g.alias.push(y):(x=x||y,x!==y&&x.alias.push(y),v&&f.name&&!tl(y)&&i(f.name)),Ga(y)&&a(y),w.children){const Q=w.children;for(let j=0;j{i(x)}:os}function i(f){if(Ua(f)){const p=s.get(f);p&&(s.delete(f),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(f);p>-1&&(n.splice(p,1),f.record.name&&s.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return n}function a(f){const p=$h(f,n);n.splice(p,0,f),f.record.name&&!tl(f)&&s.set(f.record.name,f)}function c(f,p){let g,v={},w,S;if("name"in f&&f.name){if(g=s.get(f.name),!g)throw Bn(Le.MATCHER_NOT_FOUND,{location:f});S=g.record.name,v=ge(Xi(p.params,g.keys.filter(x=>!x.optional).concat(g.parent?g.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),f.params&&Xi(f.params,g.keys.map(x=>x.name))),w=g.stringify(v)}else if(f.path!=null)w=f.path,g=n.find(x=>x.re.test(w)),g&&(v=g.parse(w),S=g.record.name);else{if(g=p.name?s.get(p.name):n.find(x=>x.re.test(p.path)),!g)throw Bn(Le.MATCHER_NOT_FOUND,{location:f,currentLocation:p});S=g.record.name,v=ge({},p.params,f.params),w=g.stringify(v)}const E=[];let y=g;for(;y;)E.unshift(y.record),y=y.parent;return{name:S,path:w,params:v,matched:E,meta:jh(E)}}e.forEach(f=>o(f));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:c,removeRoute:i,clearRoutes:u,getRoutes:l,getRecordMatcher:r}}function Xi(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function el(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Nh(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Nh(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function tl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function jh(e){return e.reduce((t,n)=>ge(t,n.meta),{})}function $h(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;Ka(e,t[o])<0?s=o:n=o+1}const r=zh(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function zh(e){let t=e;for(;t=t.parent;)if(Ga(t)&&Ka(e,t)===0)return t}function Ga({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function nl(e){const t=dt(_r),n=dt(Ho),s=ne(()=>{const a=Pe(e.to);return t.resolve(a)}),r=ne(()=>{const{matched:a}=s.value,{length:c}=a,u=a[c-1],f=n.matched;if(!u||!f.length)return-1;const p=f.findIndex(Fn.bind(null,u));if(p>-1)return p;const g=sl(a[c-2]);return c>1&&sl(u)===g&&f[f.length-1].path!==g?f.findIndex(Fn.bind(null,a[c-2])):p}),o=ne(()=>r.value>-1&&qh(n.params,s.value.params)),i=ne(()=>r.value>-1&&r.value===n.matched.length-1&&Ba(n.params,s.value.params));function l(a={}){if(Uh(a)){const c=t[Pe(e.replace)?"replace":"push"](Pe(e.to)).catch(os);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:s,href:ne(()=>s.value.href),isActive:o,isExactActive:i,navigate:l}}function Vh(e){return e.length===1?e[0]:e}const Fh=En({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:nl,setup(e,{slots:t}){const n=_s(nl(e)),{options:s}=dt(_r),r=ne(()=>({[rl(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[rl(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&Vh(t.default(n));return e.custom?o:xa("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),Bh=Fh;function Uh(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function qh(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!gt(r)||r.length!==s.length||s.some((o,i)=>o.valueOf()!==r[i].valueOf()))return!1}return!0}function sl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const rl=(e,t,n)=>e??t??n,Hh=En({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=dt(go),r=ne(()=>e.route||s.value),o=dt(Ji,0),i=ne(()=>{let c=Pe(o);const{matched:u}=r.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),l=ne(()=>r.value.matched[i.value]);$s(Ji,ne(()=>i.value+1)),$s(bh,l),$s(go,r);const a=X();return _n(()=>[a.value,l.value,e.name],([c,u,f],[p,g,v])=>{u&&(u.instances[f]=c,g&&g!==u&&c&&c===p&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),c&&u&&(!g||!Fn(u,g)||!p)&&(u.enterCallbacks[f]||[]).forEach(w=>w(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,f=l.value,p=f&&f.components[u];if(!p)return ol(n.default,{Component:p,route:c});const g=f.props[u],v=g?g===!0?c.params:typeof g=="function"?g(c):g:null,S=xa(p,ge({},v,t,{onVnodeUnmounted:E=>{E.component.isUnmounted&&(f.instances[u]=null)},ref:a}));return ol(n.default,{Component:S,route:c})||S}}});function ol(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Kh=Hh;function Gh(e){const t=Dh(e.routes,e),n=e.parseQuery||_h,s=e.stringifyQuery||Wi,r=e.history,o=Jn(),i=Jn(),l=Jn(),a=jn(Wt);let c=Wt;Mn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ur.bind(null,O=>""+O),f=Ur.bind(null,th),p=Ur.bind(null,ms);function g(O,U){let z,K;return Ua(O)?(z=t.getRecordMatcher(O),K=U):K=O,t.addRoute(K,z)}function v(O){const U=t.getRecordMatcher(O);U&&t.removeRoute(U)}function w(){return t.getRoutes().map(O=>O.record)}function S(O){return!!t.getRecordMatcher(O)}function E(O,U){if(U=ge({},U||a.value),typeof O=="string"){const _=qr(n,O,U.path),A=t.resolve({path:_.path},U),C=r.createHref(_.fullPath);return ge(_,A,{params:p(A.params),hash:ms(_.hash),redirectedFrom:void 0,href:C})}let z;if(O.path!=null)z=ge({},O,{path:qr(n,O.path,U.path).path});else{const _=ge({},O.params);for(const A in _)_[A]==null&&delete _[A];z=ge({},O,{params:f(_)}),U.params=f(U.params)}const K=t.resolve(z,U),oe=O.hash||"";K.params=u(p(K.params));const h=rh(s,ge({},O,{hash:Qd(oe),path:K.path})),m=r.createHref(h);return ge({fullPath:h,hash:oe,query:s===Wi?vh(O.query):O.query||{}},K,{redirectedFrom:void 0,href:m})}function y(O){return typeof O=="string"?qr(n,O,a.value.path):ge({},O)}function x(O,U){if(c!==O)return Bn(Le.NAVIGATION_CANCELLED,{from:U,to:O})}function P(O){return j(O)}function N(O){return P(ge(y(O),{replace:!0}))}function Q(O,U){const z=O.matched[O.matched.length-1];if(z&&z.redirect){const{redirect:K}=z;let oe=typeof K=="function"?K(O,U):K;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=y(oe):{path:oe},oe.params={}),ge({query:O.query,hash:O.hash,params:oe.path!=null?{}:O.params},oe)}}function j(O,U){const z=c=E(O),K=a.value,oe=O.state,h=O.force,m=O.replace===!0,_=Q(z,K);if(_)return j(ge(y(_),{state:typeof _=="object"?ge({},oe,_.state):oe,force:h,replace:m}),U||z);const A=z;A.redirectedFrom=U;let C;return!h&&oh(s,K,z)&&(C=Bn(Le.NAVIGATION_DUPLICATED,{to:A,from:K}),Te(K,K,!0,!1)),(C?Promise.resolve(C):ie(A,K)).catch(T=>Lt(T)?Lt(T,Le.NAVIGATION_GUARD_REDIRECT)?T:pe(T):re(T,A,K)).then(T=>{if(T){if(Lt(T,Le.NAVIGATION_GUARD_REDIRECT))return j(ge({replace:m},y(T.to),{state:typeof T.to=="object"?ge({},oe,T.to.state):oe,force:h}),U||A)}else T=Ce(A,K,!0,m,oe);return L(A,K,T),T})}function F(O,U){const z=x(O,U);return z?Promise.reject(z):Promise.resolve()}function B(O){const U=_t.values().next().value;return U&&typeof U.runWithContext=="function"?U.runWithContext(O):O()}function ie(O,U){let z;const[K,oe,h]=wh(O,U);z=Kr(K.reverse(),"beforeRouteLeave",O,U);for(const _ of K)_.leaveGuards.forEach(A=>{z.push(en(A,O,U))});const m=F.bind(null,O,U);return z.push(m),qe(z).then(()=>{z=[];for(const _ of o.list())z.push(en(_,O,U));return z.push(m),qe(z)}).then(()=>{z=Kr(oe,"beforeRouteUpdate",O,U);for(const _ of oe)_.updateGuards.forEach(A=>{z.push(en(A,O,U))});return z.push(m),qe(z)}).then(()=>{z=[];for(const _ of h)if(_.beforeEnter)if(gt(_.beforeEnter))for(const A of _.beforeEnter)z.push(en(A,O,U));else z.push(en(_.beforeEnter,O,U));return z.push(m),qe(z)}).then(()=>(O.matched.forEach(_=>_.enterCallbacks={}),z=Kr(h,"beforeRouteEnter",O,U,B),z.push(m),qe(z))).then(()=>{z=[];for(const _ of i.list())z.push(en(_,O,U));return z.push(m),qe(z)}).catch(_=>Lt(_,Le.NAVIGATION_CANCELLED)?_:Promise.reject(_))}function L(O,U,z){l.list().forEach(K=>B(()=>K(O,U,z)))}function Ce(O,U,z,K,oe){const h=x(O,U);if(h)return h;const m=U===Wt,_=Mn?history.state:{};z&&(K||m?r.replace(O.fullPath,ge({scroll:m&&_&&_.scroll},oe)):r.push(O.fullPath,oe)),a.value=O,Te(O,U,z,m),pe()}let xe;function q(){xe||(xe=r.listen((O,U,z)=>{if(!st.listening)return;const K=E(O),oe=Q(K,st.currentRoute.value);if(oe){j(ge(oe,{replace:!0,force:!0}),K).catch(os);return}c=K;const h=a.value;Mn&&hh(Gi(h.fullPath,z.delta),yr()),ie(K,h).catch(m=>Lt(m,Le.NAVIGATION_ABORTED|Le.NAVIGATION_CANCELLED)?m:Lt(m,Le.NAVIGATION_GUARD_REDIRECT)?(j(ge(y(m.to),{force:!0}),K).then(_=>{Lt(_,Le.NAVIGATION_ABORTED|Le.NAVIGATION_DUPLICATED)&&!z.delta&&z.type===po.pop&&r.go(-1,!1)}).catch(os),Promise.reject()):(z.delta&&r.go(-z.delta,!1),re(m,K,h))).then(m=>{m=m||Ce(K,h,!1),m&&(z.delta&&!Lt(m,Le.NAVIGATION_CANCELLED)?r.go(-z.delta,!1):z.type===po.pop&&Lt(m,Le.NAVIGATION_ABORTED|Le.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),L(K,h,m)}).catch(os)}))}let Se=Jn(),ee=Jn(),G;function re(O,U,z){pe(O);const K=ee.list();return K.length?K.forEach(oe=>oe(O,U,z)):console.error(O),Promise.reject(O)}function Ne(){return G&&a.value!==Wt?Promise.resolve():new Promise((O,U)=>{Se.add([O,U])})}function pe(O){return G||(G=!O,q(),Se.list().forEach(([U,z])=>O?z(O):U()),Se.reset()),O}function Te(O,U,z,K){const{scrollBehavior:oe}=e;if(!Mn||!oe)return Promise.resolve();const h=!z&&ph(Gi(O.fullPath,0))||(K||!z)&&history.state&&history.state.scroll||null;return cr().then(()=>oe(O,U,h)).then(m=>m&&dh(m)).catch(m=>re(m,O,U))}const ke=O=>r.go(O);let yt;const _t=new Set,st={currentRoute:a,listening:!0,addRoute:g,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:S,getRoutes:w,resolve:E,options:e,push:P,replace:N,go:ke,back:()=>ke(-1),forward:()=>ke(1),beforeEach:o.add,beforeResolve:i.add,afterEach:l.add,onError:ee.add,isReady:Ne,install(O){O.component("RouterLink",Bh),O.component("RouterView",Kh),O.config.globalProperties.$router=st,Object.defineProperty(O.config.globalProperties,"$route",{enumerable:!0,get:()=>Pe(a)}),Mn&&!yt&&a.value===Wt&&(yt=!0,P(r.location).catch(K=>{}));const U={};for(const K in Wt)Object.defineProperty(U,K,{get:()=>a.value[K],enumerable:!0});O.provide(_r,st),O.provide(Ho,Gl(U)),O.provide(go,a);const z=O.unmount;_t.add(O),O.unmount=function(){_t.delete(O),_t.size<1&&(c=Wt,xe&&xe(),xe=null,a.value=Wt,yt=!1,G=!1),z()}}};function qe(O){return O.reduce((U,z)=>U.then(()=>B(z)),Promise.resolve())}return st}function fg(){return dt(_r)}function Wa(e){return dt(Ho)}const Wh={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},Jh=["d"],yo=En({__name:"Icon",props:{name:{}},setup(e){const t=e,n={home:"M3 11l9-8 9 8M5 10v10h5v-6h4v6h5V10",calendar:"M4 6h16v14H4zM4 10h16M8 3v5M16 3v5",book:"M5 4h10a3 3 0 013 3v13H8a3 3 0 01-3-3zM5 17a3 3 0 013-3h10",quiz:"M12 21a9 9 0 100-18 9 9 0 000 18zM9.5 9.5a2.5 2.5 0 114 2c-.9.6-1.5 1-1.5 2M12 17h.01",more:"M5 12h.01M12 12h.01M19 12h.01",flag:"M5 21V4M5 4h11l-2 4 2 4H5",grad:"M2 9l10-5 10 5-10 5zM6 11.5V16c0 1.5 3 3 6 3s6-1.5 6-3v-4.5",file:"M7 3h7l5 5v13H7zM14 3v5h5M10 13h6M10 17h6",slides:"M3 4h18v12H3zM12 16v4M8 20h8",user:"M12 12a4 4 0 100-8 4 4 0 000 8zM4 21c0-4 4-6 8-6s8 2 8 6",out:"M10 4H5v16h5M15 8l4 4-4 4M19 12H9",chevron:"M9 6l6 6-6 6","arrow-left":"M19 12H5M11 6l-6 6 6 6","arrow-right":"M5 12h14M13 6l6 6-6 6",paperclip:"M20 11.5l-8.5 8.5a5 5 0 01-7-7L13 4.5a3.5 3.5 0 015 5L9.5 18a2 2 0 01-3-3L14 7.5",at:"M12 16a4 4 0 100-8 4 4 0 000 8zM16 12v1.5a2.5 2.5 0 005 0V12a9 9 0 10-3.5 7.1","arrow-up":"M12 19V5M5 12l7-7 7 7","arrow-down":"M12 5v14M5 12l7 7 7-7",smile:"M12 21a9 9 0 100-18 9 9 0 000 18zM8.5 14.5c1 1.2 2.2 1.8 3.5 1.8s2.5-.6 3.5-1.8M9 9.5h.01M15 9.5h.01",pencil:"M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4",trash:"M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3",close:"M6 6l12 12M18 6L6 18",plus:"M12 5v14M5 12h14",checklist:"M4 6l2 2 3-3M4 13l2 2 3-3M12 7h8M12 14h8M4 19h.01M12 19h8",cast:"M2 16.1A5 5 0 015.9 20M2 12.05A9 9 0 019.95 20M2 8V6a2 2 0 012-2h16a2 2 0 012 2v12a2 2 0 01-2 2h-6M2 20h.01",sun:"M12 16a4 4 0 100-8 4 4 0 000 8zM12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4",moon:"M21 12.8A9 9 0 1111.2 3a7 7 0 009.8 9.8z"};return(s,r)=>(Xe(),St("svg",Wh,[Oe("path",{d:n[t.name]??""},null,8,Jh)]))}}),Yh="bm.theme",Zh="dark",Qh={light:"#f3f4f1",dark:"#141917"},Xh=/(?:^|;\s*)bm\.theme=(light|dark)(?:;|$)/;function ep(e){const t=Xh.exec(e);return t?t[1]:Zh}function tp(e,t){return`${Yh}=${e}; Path=/; Max-Age=31536000; SameSite=Lax${t?"; Secure":""}`}function np(){return ep(document.cookie)}function sp(e){document.cookie=tp(e,location.protocol==="https:")}function rp(e){document.documentElement.dataset.theme=e;const t=document.getElementById("bm-theme-color");t&&t.setAttribute("content",Qh[e])}const op=Gt("theme",()=>{const e=X(np()),t=ne(()=>e.value==="dark");function n(r){e.value=r,sp(r),rp(r)}function s(){n(e.value==="dark"?"light":"dark")}return{theme:e,dark:t,set:n,toggle:s}}),ip=["aria-label","title"],il=En({__name:"ThemeToggle",setup(e){const t=op(),n=ne(()=>t.dark?"Tryb jasny":"Tryb ciemny");return(s,r)=>(Xe(),St("button",{type:"button",class:"icon-btn theme-toggle","aria-label":n.value,title:n.value,onClick:r[0]||(r[0]=o=>Pe(t).toggle())},[Ee(yo,{name:Pe(t).dark?"sun":"moon"},null,8,["name"])],8,ip))}});class We extends Error{constructor(n,s,r={}){super(s);Rn(this,"status");Rn(this,"errors");this.name="ApiError",this.status=n,this.errors=r}}const Gr="bm.token";class lp{constructor(t,n){Rn(this,"local");Rn(this,"session");Rn(this,"memory",null);this.local=t,this.session=n}read(t){try{return t?.getItem(Gr)??null}catch{return null}}get(){return this.read(this.local)??this.read(this.session)??this.memory}get remembered(){return this.read(this.local)!==null}set(t,n){this.clear();try{(n?this.local:this.session)?.setItem(Gr,t)}catch{}this.get()===null&&(this.memory=t)}replace(t){this.set(t,this.remembered)}clear(){this.memory=null;for(const t of[this.local,this.session])try{t?.removeItem(Gr)}catch{}}}function ap(e){const t=e.fetch??((...g)=>fetch(...g)),{tokens:n}=e;let s=null;function r(g,v){if(!v)return g;const w=new URLSearchParams;for(const[E,y]of Object.entries(v))y!=null&&y!==""&&w.set(E,String(y));const S=w.toString();return S?`${g}?${S}`:g}async function o(g,v){const w={Accept:"application/json"};if(v.headers)for(const[y,x]of Object.entries(v.headers))y.toLowerCase()!=="authorization"&&(w[y]=x);const S=n.get();v.auth!==!1&&S&&(w.Authorization=`Bearer ${S}`);let E;return v.body!==void 0&&(w["Content-Type"]="application/json",E=JSON.stringify(v.body)),t(r(g,v.query),{method:v.method??"GET",headers:w,body:E})}function i(){return s||(s=(async()=>{try{const g=await o("/_user/api/v1/refresh",{method:"POST"});if(!g.ok)return!1;const v=await g.json(),w=v.token??v.data?.token;return w?(n.replace(w),!0):!1}catch{return!1}finally{queueMicrotask(()=>{s=null})}})()),s}async function l(g){const v=await g.text();if(!v)return null;try{return JSON.parse(v)}catch{return null}}function a(g,v){const w=v??{},S=typeof w.error=="string"&&w.error||typeof w.message=="string"&&w.message||(g.status>=500?"Błąd serwera. Spróbuj ponownie za chwilę.":`Błąd ${g.status}`);return new We(g.status,S,w.errors??{})}async function c(g,v){let w;const S=n.get();try{w=await o(g,v)}catch{throw new We(0,"Brak połączenia z serwerem.")}if(w.status===401&&v.auth!==!1&&S){const E=n.get();if(E!==null&&E!==S?!0:await i())try{w=await o(g,v)}catch{throw new We(0,"Brak połączenia z serwerem.")}w.status===401&&(n.clear(),e.onUnauthorized?.())}return w}async function u(g,v={}){const w=await c(g,v),S=await l(w);if(!w.ok)throw a(w,S);return S}async function f(g,v={}){const w=await c(g,v);if(!w.ok){const S=await l(w);throw a(w,S)}return w.blob()}async function p(g,v={}){const w=await u(g,v);return w&&typeof w=="object"&&"data"in w?w.data:w}return{request:p,raw:u,blob:f}}function ll(e){try{return e()}catch{return null}}const ft=new lp(ll(()=>window.localStorage),ll(()=>window.sessionStorage));let Ja=()=>{};function cp(e){Ja=e}const H=ap({tokens:ft,onUnauthorized:()=>Ja()}),ut="/_user/api/v1",fn={login:e=>H.request(`${ut}/login`,{method:"POST",body:e,auth:!1}),register:e=>H.request(`${ut}/register`,{method:"POST",body:e,auth:!1}),fetch:()=>H.request(`${ut}/fetch`),logout:()=>H.request(`${ut}/logout`,{method:"POST"}),forgotPassword:e=>H.request(`${ut}/forgot-password`,{method:"POST",body:{email:e},auth:!1}),resetPassword:e=>H.request(`${ut}/reset-password`,{method:"POST",body:e,auth:!1}),update:e=>H.request(`${ut}/update`,{method:"POST",body:e}),changePassword:e=>H.request(`${ut}/change-password`,{method:"POST",body:e}),oauthProviders:()=>H.request(`${ut}/oauth-providers`,{auth:!1}),oauthComplete:e=>H.request(`${ut}/oauth-complete?code=${encodeURIComponent(e)}`,{auth:!1}),oauthRegisterComplete:e=>H.request(`${ut}/oauth-register-complete`,{method:"POST",body:e,auth:!1}),oauthLinkTicket:()=>H.request(`${ut}/oauth-link-ticket`,{method:"POST"})},up="modulepreload",fp=function(e){return"/"+e},al={},ve=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let a=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=i?.nonce||i?.getAttribute("nonce");r=a(n.map(c=>{if(c=fp(c),c in al)return;al[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const p=document.createElement("link");if(p.rel=u?"stylesheet":up,u||(p.as="script"),p.crossOrigin="",p.href=c,l&&p.setAttribute("nonce",l),document.head.appendChild(p),u)return new Promise((g,v)=>{p.addEventListener("load",g),p.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Qs="bm.lastPilot";function vr(){try{return window.localStorage}catch{return null}}function Ya(e){return typeof e=="string"&&e.trim()!==""&&e.length<=255&&!e.includes("/")}function dg(e,t=vr()){if(!(!t||!Ya(e)))try{t.setItem(Qs,e)}catch{}}function dp(e=vr()){if(!e)return null;try{const t=e.getItem(Qs);return Ya(t)?t:null}catch{return null}}function hg(e,t=vr()){if(t)try{t.getItem(Qs)===e&&t.removeItem(Qs)}catch{}}function hp(e=vr()){const t=dp(e);return t?{name:"presentation-remote",params:{slug:t}}:{name:"my-presentations"}}const gn=Gh({history:Rh("/"),scrollBehavior:(e,t,n)=>e.meta.bare?!1:n??(e.hash?{el:e.hash,top:12}:e.path===t.path?void 0:{top:0}),routes:[{path:"/logowanie",name:"login",component:()=>ve(()=>import("./LoginView-B3MVwe0A.js"),__vite__mapDeps([0,1,2])),meta:{public:!0,guest:!0,title:"Logowanie"}},{path:"/rejestracja",name:"register",component:()=>ve(()=>import("./RegisterView-CtHxA-vZ.js"),__vite__mapDeps([3,1])),meta:{public:!0,guest:!0,title:"Rejestracja"}},{path:"/przypomnij-haslo",name:"forgot",component:()=>ve(()=>import("./ForgotView-DuTJzz4K.js"),__vite__mapDeps([4,1])),meta:{public:!0,title:"Przypomnienie hasła"}},{path:"/auth/oauth/callback",name:"oauth-callback",component:()=>ve(()=>import("./OAuthCallbackView-B9h39K0z.js"),__vite__mapDeps([5,1,2])),meta:{public:!0,title:"Logowanie"}},{path:"/auth/oauth/rejestracja",name:"oauth-register",component:()=>ve(()=>import("./OAuthRegisterView-BE24PEnT.js"),__vite__mapDeps([6,1])),meta:{public:!0,title:"Rejestracja"}},{path:"/reset-password",alias:"/reset-hasla",name:"reset",component:()=>ve(()=>import("./ResetView--PDlpYxp.js"),__vite__mapDeps([7,1])),meta:{public:!0,title:"Nowe hasło"}},{path:"/",name:"dashboard",component:()=>ve(()=>import("./DashboardView-BzEXGil-.js"),__vite__mapDeps([8,9,10,11,12])),meta:{title:"Pulpit",wide:!0}},{path:"/plan",name:"schedule",component:()=>ve(()=>import("./ScheduleView-CKanhHpE.js"),__vite__mapDeps([13,9,10,11,14])),meta:{title:"Plan zajęć"}},{path:"/terminarz",name:"deadlines",component:()=>ve(()=>import("./DeadlinesView-CaD0eVv6.js"),__vite__mapDeps([15,9,10,11,14])),meta:{title:"Terminarz"}},{path:"/przedmioty",name:"courses",component:()=>ve(()=>import("./CoursesView-Dq4MIMnp.js"),__vite__mapDeps([16,9,10,11])),meta:{title:"Przedmioty"}},{path:"/przedmioty/:id(\\d+)",name:"course",component:()=>ve(()=>import("./CourseView-DanUZy74.js"),__vite__mapDeps([17,9,10,18])),props:!0,meta:{title:"Przedmiot"}},{path:"/lektury",name:"readings",component:()=>ve(()=>import("./ReadingsView-DiOpyKU1.js"),__vite__mapDeps([19,9,10,11,18,14])),meta:{title:"Lektury"}},{path:"/materialy",name:"materials",component:()=>ve(()=>import("./MaterialsView-YleScEIL.js"),__vite__mapDeps([20,9,21])),meta:{title:"Materiały"}},{path:"/materialy/:id(\\d+)",name:"material",component:()=>ve(()=>import("./MaterialView-BQucFIf3.js"),__vite__mapDeps([22,9,10,21,12])),props:!0,meta:{title:"Materiał"}},{path:"/checklisty",name:"checklists",component:()=>ve(()=>import("./ChecklistsView-BFTAa0Tm.js"),__vite__mapDeps([23,9,10,1])),meta:{title:"Checklisty"}},{path:"/checklisty/:id(\\d+)",name:"checklist",component:()=>ve(()=>import("./ChecklistView-BDzS2ISd.js"),__vite__mapDeps([24,9,10,25,1])),props:!0,meta:{title:"Checklista"}},{path:"/sylabusy",name:"syllabi",component:()=>ve(()=>import("./SyllabiView-ar5JWjDo.js"),__vite__mapDeps([26,9])),meta:{title:"Sylabusy"}},{path:"/quiz",redirect:"/quizy/powtorka-1-zjazd"},{path:"/quizy",name:"quizzes",component:()=>ve(()=>import("./QuizzesView-BqshUAZI.js"),__vite__mapDeps([27,9,10,28])),meta:{title:"Quizy"}},{path:"/quizy/:slug",name:"quiz",component:()=>ve(()=>import("./QuizView-CmJ9gzI_.js"),__vite__mapDeps([29,9,10,28])),props:!0,meta:{title:"Quiz"}},{path:"/wiecej",name:"more",component:()=>ve(()=>import("./MoreView-BWCniPfN.js"),__vite__mapDeps([30,9])),meta:{title:"Więcej"}},{path:"/profil",name:"profile",component:()=>ve(()=>import("./ProfileView-B-qG3bDd.js"),__vite__mapDeps([31,9,1,2])),meta:{title:"Profil"}},{path:"/moje-prezentacje",name:"my-presentations",component:()=>ve(()=>import("./MyPresentationsView-Dsu-fTaU.js"),__vite__mapDeps([32,9,10,25])),meta:{title:"Moje prezentacje"}},{path:"/moje-prezentacje/:slug",name:"presentation-speaker",component:()=>ve(()=>import("./PresentationSpeakerView-tPXpHlzH.js"),__vite__mapDeps([33,25,34,35,36,37,38,39,40])),props:!0,meta:{bare:!0,title:"Prezentacja"}},{path:"/moje-prezentacje/:slug/pilot",name:"presentation-remote",component:()=>ve(()=>import("./PresentationRemoteView-kS7sCJIb.js"),__vite__mapDeps([41,35,36,25,42,39,43,38,44])),props:!0,meta:{bare:!0,title:"Pilot"}},{path:"/pilot",name:"pilot",redirect:()=>hp()},{path:"/prezentacje/:slugHash",name:"presentation-public",component:()=>ve(()=>import("./PresentationPublicView-BvCmAAgB.js"),__vite__mapDeps([45,25,34,35,36,37,46])),props:!0,meta:{public:!0,bare:!0,title:"Prezentacja"}},{path:"/connect",name:"connect",component:()=>ve(()=>import("./ConnectView-BAbH9RG9.js"),[]),meta:{title:"Połącz aplikację"}},{path:"/cast",name:"cast",component:()=>ve(()=>import("./CastReceiverView-1vQ3DTnH.js"),__vite__mapDeps([47,35,36,25,34,37,43,39,48])),meta:{public:!0,bare:!0,cast:!0,title:"BM · TV"}},{path:"/:rest(.*)*",name:"notfound",component:()=>ve(()=>import("./NotFoundView-C3HgwQgy.js"),__vite__mapDeps([49,42])),meta:{title:"Nie znaleziono"}}]});gn.beforeEach(async e=>{const t=gc();return e.meta.cast===!0&&ft.clear(),t.ready||await t.restore(e),!e.meta.public&&!t.loggedIn?{name:"login",query:e.fullPath==="/"?{}:{redirect:e.fullPath}}:e.meta.guest&&t.loggedIn?{name:"dashboard"}:!0});gn.afterEach(e=>{const t=e.meta.title;document.title=t?`${t} · BM II°`:"BM II°"});const _e="/_bm/api/v1",Ae={dashboard:()=>H.request(`${_e}/dashboard`),courses:e=>H.request(`${_e}/courses`,{query:{semester:e}}),course:e=>H.request(`${_e}/courses/${e}`),schedule:(e,t)=>H.request(`${_e}/schedule`,{query:{from:e,to:t}}),meetings:()=>H.request(`${_e}/meetings`),deadlines:(e,t)=>H.request(`${_e}/deadlines`,{query:{from:e,to:t}}),readings:e=>H.request(`${_e}/readings`,{query:{course:e}}),markRead:e=>H.request(`${_e}/readings/${e}/progress`,{method:"PUT"}),unmarkRead:e=>H.request(`${_e}/readings/${e}/progress`,{method:"DELETE"}),markOwned:e=>H.request(`${_e}/readings/${e}/owned`,{method:"PUT"}),unmarkOwned:e=>H.request(`${_e}/readings/${e}/owned`,{method:"DELETE"}),materials:(e={})=>H.raw(`${_e}/materials`,{query:{...e}}),material:e=>H.request(`${_e}/materials/${e}`),materialAccess:e=>H.request(`${_e}/materials/${e}/access`),saveMaterialAccess:(e,t)=>H.request(`${_e}/materials/${e}/access`,{method:"PUT",body:t}),calendarFeed:()=>H.request(`${_e}/calendar-feed`),saveCalendarFeed:e=>H.request(`${_e}/calendar-feed`,{method:"PUT",body:e}),rotateCalendarFeed:()=>H.request(`${_e}/calendar-feed/rotate`,{method:"POST"}),deleteCalendarFeed:()=>H.request(`${_e}/calendar-feed`,{method:"DELETE"}),checklists:e=>H.request(`${_e}/checklists`,{query:{meeting:e}}),checklist:e=>H.request(`${_e}/checklists/${e}`),createChecklist:e=>H.request(`${_e}/checklists`,{method:"POST",body:e}),updateChecklist:(e,t)=>H.request(`${_e}/checklists/${e}`,{method:"PATCH",body:t}),deleteChecklist:e=>H.request(`${_e}/checklists/${e}`,{method:"DELETE"}),addChecklistItem:(e,t)=>H.request(`${_e}/checklists/${e}/items`,{method:"POST",body:t}),updateChecklistItem:(e,t)=>H.request(`${_e}/checklist-items/${e}`,{method:"PATCH",body:t}),deleteChecklistItem:e=>H.request(`${_e}/checklist-items/${e}`,{method:"DELETE"}),markChecklistItem:e=>H.request(`${_e}/checklist-items/${e}/done`,{method:"PUT"}),unmarkChecklistItem:e=>H.request(`${_e}/checklist-items/${e}/done`,{method:"DELETE"})},pp={"historia-koncepcje":"Historia / koncepcje wojny i pokoju",specjalnosc:"Specjalność"};function pg(e){return pp[e]??e}function Ko(e){const t=new Map;for(const n of e){if(!n.elective_group)continue;const s=t.get(n.elective_group)??[];s.includes(n.name)||s.push(n.name),t.set(n.elective_group,s)}return[...t].map(([n,s])=>({code:n,options:s}))}function mp(e,t){const n={};for(const s of Ko(e)){const r=t[s.code];r&&s.options.includes(r)&&(n[s.code]=r)}return n}function gp(e,t){if(!e.elective_group)return!1;const n=t[e.elective_group];return n!==void 0&&n!==e.name}function Za(e,t,n=!1){const s=new Set;if(n)return s;for(const r of e)gp(r,t)&&s.add(r.id);return s}function Wr(e,t){return t.size===0?e:e.filter(n=>n.course_id===null||!t.has(n.course_id))}function yp(e,t){return Ko(e).filter(n=>n.options.length>1&&!t[n.code])}function mg(e,t){return!!e.elective_group&&!t[e.elective_group]}const cl="bm.showAllElectives";function ul(e){try{return localStorage.getItem(e)}catch{return null}}function fl(e,t){try{localStorage.setItem(e,t)}catch{}}const is=Gt("electives",()=>{const e=X({}),t=X(ul(cl)==="1"),n=X(null),s=()=>n.value===null?null:`bm.electives.${n.value}`,r=()=>{const f=s();f&&fl(f,JSON.stringify(e.value))};function o(f){n.value=f;try{const p=JSON.parse(ul(`bm.electives.${f}`)??"{}");e.value=p&&typeof p=="object"?p:{}}catch{e.value={}}}const i=ne(()=>Object.keys(e.value).length>0);function l(f,p){const g={...e.value};p===null?delete g[f]:g[f]=p,e.value=g,r()}function a(f){t.value=f,fl(cl,f?"1":"0")}function c(f){const p=mp(f,e.value);Object.keys(p).length!==Object.keys(e.value).length&&(e.value=p,r())}function u(){e.value={},n.value=null}return{choices:e,showAll:t,userId:n,hasChoices:i,load:o,choose:l,setShowAll:a,prune:c,reset:u}}),wn=Gt("toast",()=>{const e=X("");let t;function n(r,o=4e3){e.value=r,clearTimeout(t),t=setTimeout(()=>e.value="",o)}function s(){e.value=""}return{message:e,show:n,clear:s}});function xt(e){return e instanceof We?e.message:"Nie udało się wczytać danych."}function xn(e){const t=jn(null),n=X(!1),s=X("");let r=null;function o(l=!1){return r||(t.value!==null&&!l?Promise.resolve():(n.value=!0,s.value="",r=e().then(a=>{t.value=a}).catch(a=>{s.value=xt(a)}).finally(()=>{n.value=!1,r=null}),r))}function i(){t.value=null,s.value="",n.value=!1,r=null}return{data:t,loading:n,error:s,load:o,reset:i}}const dl="2000-01-01",Go=Gt("bm",()=>{const e=xn(()=>Ae.courses()),t=xn(()=>Ae.meetings()),n=xn(()=>Ae.schedule(dl)),s=xn(()=>Ae.deadlines(dl)),r=xn(()=>Ae.readings()),o=xn(()=>Ae.dashboard()),i=ne(()=>e.data.value),l=ne(()=>t.data.value),a=ne(()=>o.data.value),c=is(),u=ne(()=>Ko(i.value??[])),f=ne(()=>yp(i.value??[],c.choices)),p=ne(()=>Za(i.value??[],c.choices,c.showAll)),g=ne(()=>Wr(n.data.value??[],p.value)),v=ne(()=>Wr(s.data.value??[],p.value)),w=ne(()=>Wr(r.data.value??[],p.value)),S=ne(()=>r.data.value??[]),E=ne(()=>(i.value??[]).filter(q=>!p.value.has(q.id))),y=ne(()=>{const q=w.value,Se=q.filter(ee=>ee.is_required);return{total:q.length,read:q.filter(ee=>ee.read_at).length,requiredTotal:Se.length,requiredRead:Se.filter(ee=>ee.read_at).length}}),x=ne(()=>new Map((i.value??[]).map(q=>[q.id,q])));async function P(q=!1){await e.load(q),e.data.value&&c.prune(e.data.value)}async function N(q,Se){const ee=r.data.value,G=ee?.find(pe=>pe.id===q);if(!ee||!G)return;const re=G.read_at,Ne=pe=>{r.data.value=ee.map(Te=>Te.id===q?{...Te,read_at:pe}:Te)};Ne(Se?new Date().toISOString():null);try{const pe=Se?await Ae.markRead(q):await Ae.unmarkRead(q);Ne(pe.read_at)}catch(pe){Ne(re),wn().show(`Nie udało się zapisać zmiany. ${xt(pe)}`)}}function Q(q,Se){const ee=r.data.value;ee&&(r.data.value=ee.map(G=>G.id===q?{...G,read_at:Se}:G))}async function j(q,Se){const ee=r.data.value,G=ee?.find(pe=>pe.id===q);if(!ee||!G)return;const re=G.owned_at,Ne=pe=>{r.data.value=ee.map(Te=>Te.id===q?{...Te,owned_at:pe}:Te)};Ne(Se?new Date().toISOString():null);try{const pe=Se?await Ae.markOwned(q):await Ae.unmarkOwned(q);Ne(pe.owned_at)}catch(pe){Ne(re),wn().show(`Nie udało się zapisać zmiany. ${xt(pe)}`)}}const F=[e,t,n,s,r,o],B=ne(()=>F.some(q=>q.loading.value)),ie=ne(()=>F.find(q=>q.error.value)?.error.value??""),L=ne(()=>({courses:e.data.value!==null,meetings:t.data.value!==null,schedule:n.data.value!==null,deadlines:s.data.value!==null,readings:r.data.value!==null,dashboard:o.data.value!==null}));function Ce(){for(const q of F)q.error.value&&q.load(!0)}function xe(){for(const q of F)q.reset()}return{courses:i,electiveGroups:u,pendingElectives:f,hidden:p,meetings:l,dashboard:a,schedule:g,deadlines:v,readings:w,allReadings:S,visibleCourses:E,readingStats:y,courseById:x,loading:B,error:ie,loaded:L,retry:Ce,loadCourses:P,loadMeetings:(q=!1)=>t.load(q),loadSchedule:(q=!1)=>n.load(q),loadDeadlines:(q=!1)=>s.load(q),loadReadings:(q=!1)=>r.load(q),loadDashboard:(q=!1)=>o.load(q),toggleReading:N,toggleOwned:j,setReadAt:Q,reset:xe}}),_p={lektura:"Lektura",artykul:"Artykuł",ksiazka:"Książka",prezentacja:"Prezentacja",zadanie:"Zadanie",inne:"Inne"},gg=Object.keys(_p);function vp(e){const t=Math.floor(e/60),n=e%60;return t?n?`${t} h ${n} min`:`${t} h`:`${n} min`}function bp(e){const t={total:0,done:0,percent:0,minutes_total:0,minutes_done:0,minutes_left:0};for(const n of e){const s=n.estimate_minutes??0;t.total++,t.minutes_total+=s,n.done?(t.done++,t.minutes_done+=s):t.minutes_left+=s}return t.minutes_total?t.percent=Math.floor(t.minutes_done*100/t.minutes_total):t.percent=t.total?Math.floor(t.done*100/t.total):0,t}function yg(e){const t=`${e.done} z ${e.total}`;return e.minutes_left?`${t} · zostało ${vp(e.minutes_left)}`:t}function _g(e){const t=new Map;for(const s of e){const r=s.course?`c${s.course.id}`:"none";let o=t.get(r);o||(o={key:r,label:s.course?.name??"Ogólne",items:[]},t.set(r,o)),o.items.push(s)}const n=t.get("none");return t.delete("none"),n?[...t.values(),n]:[...t.values()]}function vg(e){if(!e)return"";const t=new Date(e),n=s=>String(s).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function bg(e){return e?e.replace("T"," "):null}const wp=Gt("checklists",()=>{const e=X(null),t=X(""),n=X({}),s=X("");async function r(){t.value="";try{e.value=await Ae.checklists()}catch(y){t.value=xt(y)}}async function o(y){s.value="";try{i(await Ae.checklist(y))}catch(x){s.value=xt(x)}}function i(y){y.items||(y={...y,items:n.value[y.id]?.items??[]}),n.value={...n.value,[y.id]:y};const x={...y,items:void 0};e.value&&(e.value=e.value.some(P=>P.id===y.id)?e.value.map(P=>P.id===y.id?x:P):[...e.value,x])}function l(y,x){const P=n.value[y];P&&i({...P,items:x,progress:bp(x)})}async function a(y){const x=await Ae.createChecklist(y);return i(x),x}async function c(y,x){i(await Ae.updateChecklist(y,x))}async function u(y){await Ae.deleteChecklist(y);const{[y]:x,...P}=n.value;n.value=P,e.value&&(e.value=e.value.filter(N=>N.id!==y))}function f(y,x){for(const P of Object.values(n.value))P.items?.some(N=>N.reading_id===y)&&l(P.id,P.items.map(N=>N.reading_id===y?{...N,done:x!==null,done_at:x}:N))}async function p(y,x){const P=n.value[y.checklist_id];if(!P?.items)return;const N=P.items,Q=j=>{if(y.reading_id!==null)f(y.reading_id,j);else{const F=n.value[y.checklist_id]?.items??N;l(y.checklist_id,F.map(B=>B.id===y.id?{...B,done:j!==null,done_at:j}:B))}};Q(x?new Date().toISOString():null);try{const j=x?await Ae.markChecklistItem(y.id):await Ae.unmarkChecklistItem(y.id);Q(j.done_at),y.reading_id!==null&&Go().setReadAt(y.reading_id,j.done_at)}catch(j){l(y.checklist_id,N),wn().show(`Nie udało się zapisać zmiany. ${xt(j)}`)}}async function g(y,x){const P=await Ae.addChecklistItem(y,x),N=n.value[y];return N?.items&&l(y,[...N.items,P]),P}async function v(y,x){const P=await Ae.updateChecklistItem(y.id,x);if(P.checklist_id!==y.checklist_id){const Q=n.value[y.checklist_id];return Q?.items&&l(y.checklist_id,Q.items.filter(j=>j.id!==y.id)),o(P.checklist_id),r(),P}const N=n.value[y.checklist_id];if(N?.items){const Q=N.items.map(j=>j.id===y.id?P:j);l(y.checklist_id,Q.sort((j,F)=>j.sort_order-F.sort_order||j.id-F.id))}return P}async function w(y){await Ae.deleteChecklistItem(y.id);const x=n.value[y.checklist_id];x?.items&&l(y.checklist_id,x.items.filter(P=>P.id!==y.id))}async function S(y,x){const P=n.value[y.checklist_id]?.items;if(!P)return;const N=P.findIndex(B=>B.id===y.id),Q=P[N+x];if(!Q)return;const j=Q.sort_order===y.sort_order?N+x:Q.sort_order,F=Q.sort_order===y.sort_order?N:y.sort_order;try{await Promise.all([v(y,{sort_order:j}),v(Q,{sort_order:F})])}catch(B){wn().show(`Nie udało się zmienić kolejności. ${xt(B)}`),o(y.checklist_id)}}function E(){e.value=null,n.value={},t.value="",s.value=""}return{list:e,listError:t,details:n,detailError:s,loadList:r,loadOne:o,create:a,update:c,remove:u,toggle:p,syncReading:f,addItem:g,updateItem:v,removeItem:w,move:S,reset:E}});function Ep(e,t){return[...Za(e,t,!1)].sort((n,s)=>n-s)}function Sp(e,t){if(e.length!==t.length)return!1;const n=[...e].sort((r,o)=>r-o),s=[...t].sort((r,o)=>r-o);return n.every((r,o)=>r===s[o])}async function wg(e){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0}catch{}try{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-1000px",document.body.appendChild(t),t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n}catch{return!1}}const Qa=Gt("calendarFeed",()=>{const e=X(void 0),t=X(!1),n=X(!1),s=X(""),r=Go(),o=is();let i=Promise.resolve();function l(E){const y=i.then(E,E);return i=y.catch(()=>{}),y}async function a(E=!1){if(!(e.value!==void 0&&!E)){t.value=!0,s.value="";try{e.value=await Ae.calendarFeed()}catch(y){s.value=xt(y)}finally{t.value=!1}}}async function c(){await r.loadCourses();const E=r.courses;return E?Ep(E,o.choices):null}async function u(E){n.value=!0,s.value="";try{await l(E)}catch(y){s.value=xt(y)}finally{n.value=!1}}function f(){return u(async()=>{const E=await c();e.value=await Ae.saveCalendarFeed(E?{excluded_course_ids:E}:{})})}function p(E){return u(async()=>{e.value=await Ae.saveCalendarFeed(E)})}function g(){return u(async()=>{e.value=await Ae.rotateCalendarFeed()})}function v(){return u(async()=>{await Ae.deleteCalendarFeed(),e.value=null})}function w(){return l(async()=>{e.value===void 0&&await a();const E=e.value;if(!E)return;const y=await c();if(!(!y||Sp(y,E.excluded_course_ids)))try{e.value=await Ae.saveCalendarFeed({excluded_course_ids:y})}catch(x){wn().show(`Nie udało się zaktualizować kalendarza. ${xt(x)}`)}})}_n(()=>o.choices,()=>{o.userId!==null&&w()});function S(){e.value=void 0,s.value="",t.value=!1,n.value=!1}return{feed:e,loading:t,busy:n,error:s,load:a,create:f,save:p,rotate:g,remove:v,sync:w,reset:S}}),Ls="/_bm/api/v1",rt="/_chat/api/v1";function hl(e,t,n){return new Promise((s,r)=>{const o=new XMLHttpRequest;o.open("POST",`${rt}/attachments`),o.setRequestHeader("Accept","application/json");const i=ft.get();if(i&&o.setRequestHeader("Authorization",`Bearer ${i}`),o.upload.onprogress=a=>{a.lengthComputable&&a.total>0&&t?.(Math.min(100,Math.round(a.loaded/a.total*100)))},o.onload=()=>{let a=null;try{a=o.responseText?JSON.parse(o.responseText):null}catch{a=null}const c=a&&typeof a=="object"&&"data"in a?a.data:a;if(o.status>=200&&o.status<300&&c&&typeof c.id=="number"){s({id:c.id,filename:String(c.filename??e.name),size:Number(c.size??e.size)});return}const u=a??{};r(new We(o.status,typeof u.error=="string"?u.error:`Błąd ${o.status}`,u.errors??{}))},o.onerror=()=>r(new We(0,"Brak połączenia z serwerem.")),o.onabort=()=>r(new We(0,"Przerwano wysyłanie.")),n){if(n.aborted){r(new We(0,"Przerwano wysyłanie."));return}n.addEventListener("abort",()=>o.abort(),{once:!0})}const l=new FormData;l.append("file",e,e.name),o.send(l)})}async function Tp(e,t,n){const s=ft.get();try{return await hl(e,t,n)}catch(r){if(!(r instanceof We)||r.status!==401||!s||n?.aborted)throw r;await H.request("/_user/api/v1/fetch").catch(()=>null);const o=ft.get();if(!o||o===s)throw r;return t?.(0),hl(e,t,n)}}async function Rp(e,t,n){const s=await H.blob(`${rt}/attachments/${e}/${t}`),r=URL.createObjectURL(new Blob([s],{type:"application/octet-stream"})),o=document.createElement("a");o.href=r,o.download=n||"plik",o.rel="noopener",o.style.display="none",document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(r),3e4)}const Ve={bootstrap:()=>H.request(`${Ls}/chat`),members:()=>H.request(`${Ls}/chat/members`),messages:(e,{limit:t=50,before:n}={})=>H.request(`${rt}/conversations/${e}/messages`,{query:{limit:t,before:n}}),send:(e,t)=>H.request(`${rt}/conversations/${e}/messages`,{method:"POST",body:t}),message:e=>H.request(`${rt}/messages/${e}`),markRead:e=>H.request(`${rt}/conversations/${e}/read`,{method:"POST"}),typing:e=>H.request(`${rt}/conversations/${e}/typing`,{method:"POST"}),edit:(e,t)=>H.request(`${rt}/messages/${e}`,{method:"PUT",body:{content:t}}),remove:e=>H.request(`${rt}/messages/${e}`,{method:"DELETE"}),reactions:()=>H.request(`${rt}/reactions`),addReaction:(e,t)=>H.request(`${rt}/messages/${e}/reactions`,{method:"POST",body:{key:t}}),removeReaction:(e,t)=>H.request(`${rt}/messages/${e}/reactions/${encodeURIComponent(t)}`,{method:"DELETE"}),embeds:(e,t="")=>H.request(`${Ls}/chat/embeds`,{query:{type:e,q:t.trim()}}),resolveEmbeds:e=>H.request(`${Ls}/chat/embeds/resolve`,{method:"POST",body:{refs:e}}),upload:Tp,download:Rp,startDm:e=>H.request(`${rt}/contexts/bm/1/dm`,{method:"POST",body:{user_id:e}})};function Dt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ke(e){return typeof e=="number"&&Number.isInteger(e)&&e>0?e:null}function Ap(e){return Dt(e)?Ke(e.id)!==null&&Ke(e.conversation_id)!==null&&Ke(e.sender_id)!==null&&typeof e.created_at=="string"&&(e.content===null||typeof e.content=="string")&&Array.isArray(e.attachments):!1}function Cp(e){if(!Dt(e)||typeof e.event!="string")return null;const t=e.payload;switch(e.event){case"created.chat.message":{if(!Dt(t))return null;const n=Ke(t.id),s=Ke(t.conversation_id),r=Ke(t.sender_id);return n===null||s===null||r===null?null:{kind:"created",id:n,conversationId:s,senderId:r}}case"chat:message":{if(!Dt(t)||!Ap(t.message))return null;const n=Ke(t.conversation_id);return n===null||n!==t.message.conversation_id?null:{kind:"chatMessage",conversationId:n,message:t.message}}case"typing.chat.message":{if(!Dt(t)||t.action!=="typing-start")return null;const n=Ke(t.conversation_id),s=Ke(t.user_id);return n===null||s===null?null:{kind:"typing",conversationId:n,userId:s}}case"chat:read":{if(!Dt(t))return null;const n=Ke(t.conversation_id),s=Ke(t.user_id);return n===null||s===null?null:{kind:"read",conversationId:n,userId:s}}case"chat:unread":return!Dt(t)||typeof t.count!="number"||!Number.isInteger(t.count)||t.count<0?null:{kind:"unread",count:t.count};case"mentions.changed":return{kind:"mentions"};case"reacted.chat.message":{if(!Dt(t))return null;const n=Ke(t.id),s=Ke(t.conversation_id),r=Ke(t.user_id);return n===null||s===null||r===null||typeof t.key!="string"||t.key===""||t.action!=="added"&&t.action!=="removed"?null:{kind:"reacted",id:n,conversationId:s,userId:r,key:t.key,added:t.action==="added"}}case"updated.chat.message":case"deleted.chat.message":{if(!Dt(t))return null;const n=Ke(t.id),s=Ke(t.conversation_id);return n===null||s===null?null:{kind:e.event==="updated.chat.message"?"updated":"deleted",id:n,conversationId:s}}default:return null}}function xp(e,t){if(e.kind!=="created")return!1;const n=t[e.conversationId];return!!n&&!n.some(s=>s.id===e.id)}function Op(e,t,{seen:n}){const s={id:t.id,sender_id:t.sender_id,content:t.content??"",created_at:t.created_at},r=e.findIndex(a=>a.id===t.conversation_id);if(r===-1)return[{id:t.conversation_id,type:"dm",other_user_id:t.sender_id,unread:n?0:1,last_message:s},...e];const o=e[r];if(o.last_message&&o.last_message.id===t.id)return e;const i=!o.last_message||Date.parse(t.created_at)>=Date.parse(o.last_message.created_at),l={...o,unread:n?o.unread:o.unread+1,last_message:i?s:o.last_message};return e.map((a,c)=>c===r?l:a)}function Jr(e,t,n,s,r=[]){const o=e?[...e]:[],i=o.findIndex(c=>c.key===t),l=i>=0&&o[i].user_ids.includes(n);if(s===l)return e||o;if(s){if(i>=0)return o[i]={...o[i],count:o[i].count+1,user_ids:[...o[i].user_ids,n]},o;const c={key:t,count:1,user_ids:[n]},u=p=>{const g=r.indexOf(p);return g<0?r.length:g};let f=o.length;return r.includes(t)&&(f=o.findIndex(p=>u(p.key)>u(t)),f<0&&(f=o.length)),o.splice(f,0,c),o}const a=o[i].user_ids.filter(c=>c!==n);return a.length===0?o.splice(i,1):o[i]={...o[i],count:Math.max(0,o[i].count-1),user_ids:a},o}const Pp=["svg","svgz","html","htm","xhtml","xml"],Mp=["image/svg+xml","text/html","application/xhtml+xml","text/xml","application/xml"];function pl(e){const t=e/1048576;return Number.isInteger(t)?String(t):(Math.floor(t*10)/10).toFixed(1).replace(".",",")}function kp(e){const t=e.name.lastIndexOf("."),n=(t>=0?e.name.slice(t+1):e.name).toLowerCase();if(Pp.includes(n))return!0;const s=(e.type||"").split(";")[0].trim().toLowerCase();return Mp.includes(s)}function Ip(e,t,n,s=0){const r=[],o=[];let i=!1,l=!1,a=!1,c=s;for(const u of e){if(kp(u)){i=!0;continue}if(t.max_bytes>0&&u.size>t.max_bytes){o.push(`Plik „${u.name}” jest za duży. Limit to ${pl(t.max_bytes)} MB.`);continue}if(n+r.length>=t.max_files){l=!0;continue}if(t.max_bytes>0&&c+u.size>t.max_bytes){a=!0;continue}c+=u.size,r.push(u)}return a&&o.unshift(`Załączniki jednej wiadomości mogą mieć razem najwyżej ${pl(t.max_bytes)} MB.`),i&&o.unshift("Plików SVG, HTML i XML nie można wysyłać na czacie."),l&&o.unshift(`Możesz dołączyć najwyżej ${t.max_files} plików do jednej wiadomości.`),{accepted:r,errors:o}}const Xa="Europe/Warsaw",Lp="pl-PL";function ec(e,t,n,s){const r=Math.abs(e);if(r===1)return t;const o=r%10,i=r%100;return o>=2&&o<=4&&!(i>=12&&i<=14)?n:s}function _o(e,t,n,s){return`${e} ${ec(e,t,n,s)}`}const Un=(e,t=Xa)=>new Intl.DateTimeFormat(Lp,{timeZone:t,...e}),Dp=Un({hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),Np=Un({weekday:"long",day:"numeric",month:"long"}),jp=Un({day:"numeric",month:"long",year:"numeric"}),$p=Un({day:"numeric",month:"short"});Un({weekday:"long"});const zp=new Intl.DateTimeFormat("sv-SE",{timeZone:Xa,year:"numeric",month:"2-digit",day:"2-digit"});function Ds(e){return new Date(`${e}T12:00:00Z`)}const Ns=e=>Un(e,"UTC"),vo=e=>Dp.format(new Date(e)),Vp=e=>Np.format(new Date(e)),Fp=e=>jp.format(new Date(e)),Eg=e=>$p.format(new Date(e)),Bp=e=>`${Fp(e)}, ${vo(e)}`,tc=e=>zp.format(typeof e=="string"?new Date(e):e),nc=(e=new Date)=>tc(e);function sc(e,t=new Date){const n=Date.parse(`${nc(t)}T00:00:00Z`),s=Date.parse(`${tc(e)}T00:00:00Z`);return Math.round((s-n)/864e5)}function Up(e,t=new Date){const n=sc(e,t);return n===0?"dzisiaj":n===1?"jutro":n===-1?"wczoraj":n>1?`za ${_o(n,"dzień","dni","dni")}`:`${_o(-n,"dzień","dni","dni")} temu`}function Sg(e,t){if(e===t)return Ns({day:"numeric",month:"long",year:"numeric"}).format(Ds(e));const[n,s]=e.split("-"),[r,o]=t.split("-"),i=c=>Ns({day:"numeric"}).format(Ds(c)),l=c=>Ns({day:"numeric",month:"long"}).format(Ds(c)),a=c=>Ns({year:"numeric"}).format(Ds(c));return n===r&&s===o?`${i(e)}–${l(t)} ${a(t)}`:n===r?`${l(e)} – ${l(t)} ${a(t)}`:`${l(e)} ${a(e)} – ${l(t)} ${a(t)}`}function qp(e,t){const n=o=>{const[,i,l]=o.split("-");return{d:parseInt(l,10),m:parseInt(i,10)}},s=n(e),r=n(t);return e===t?`${s.d}.${s.m}`:s.m===r.m?`${s.d}–${r.d}.${r.m}`:`${s.d}.${s.m}–${r.d}.${r.m}`}function Tg(e){return`Zjazd ${e.number} (${qp(e.starts_on,e.ends_on)})`}function Rg(e,t=nc()){const n=[...e].sort((r,o)=>o.starts_on.localeCompare(r.starts_on)),s=e.find(r=>r.starts_on<=t&&t<=r.ends_on)??e.filter(r=>r.starts_on>t).sort((r,o)=>r.starts_on.localeCompare(o.starts_on))[0];return s?[s,...n.filter(r=>r!==s)]:n}function Ag(e){return e?/online/i.test(e)?"online":/stacjonarn/i.test(e)?"stacjonarny":null:null}function Cg(e){return e?e.trim().toLowerCase()==="online"?"":e.trim():""}const Hp={wyklad:"wykład",cwiczenia:"ćwiczenia",konwersatorium:"konwersatorium",seminarium:"seminarium",inne:"zajęcia"},Kp={zaliczenie:"zaliczenie",egzamin:"egzamin",praca:"praca",organizacyjne:"organizacyjne",inne:"inne"},xg={pdf:"PDF",notatka:"notatka",link:"link",inne:"inne"};function Og(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1).replace(".",",")} MB`}const Gp=["deadline","class","reading"],bo=3,Pg={deadline:"Termin",class:"Zajęcia",reading:"Lektura"};function tn(e){return`${e.type}:${e.id}`}function Wp(e){return typeof e=="string"&&Gp.includes(e)}function rc(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>0}function Jp(e){if(!e||typeof e!="object")return!1;const t=e;return Wp(t.type)&&rc(t.id)}function Yp(e,t=bo){const n=e?.metadata?.embeds;if(!Array.isArray(n))return[];const s=[],r=new Set;for(const o of n){if(s.length>=t)break;if(!Jp(o))continue;const i={type:o.type,id:o.id},l=tn(i);r.has(l)||(r.add(l),s.push(i))}return s}function oc(e){switch(e.type){case"deadline":return`/terminarz#termin-${e.id}`;case"class":return`/plan#zajecia-${e.id}`;case"reading":return`/lektury#lektura-${e.id}`}}function Zp(e,t=""){return e.map(n=>t+oc(n)).join(` -`)}function Mg(e,t){if(!e||!t.length)return!1;const n=e.trim().split(` -`);return n.length!==t.length?!1:n.every((s,r)=>{const o=oc(t[r]);return s===o?!0:s.endsWith(o)?/^https?:\/\/[^/\s]+$/i.test(s.slice(0,s.length-o.length)):!1})}function kg(e){switch(e.type){case"deadline":return e.deadline.title;case"class":return e.session.course?.name??"";case"reading":return e.reading.title}}function Ig(e){switch(e.type){case"deadline":return`/terminarz#termin-${e.id}`;case"class":{const t=e.session;return t.meeting_number?`/plan?zjazd=${t.meeting_number}#zajecia-${e.id}`:`/przedmioty/${t.course_id}`}case"reading":return`/lektury#lektura-${e.id}`}}function Lg(e){switch(e.type){case"deadline":{const t=e.deadline,n=[Bp(t.due_at),Kp[t.kind]??t.kind];return t.course?.name&&n.push(t.course.name),n.join(" · ")}case"class":{const t=e.session,n=[`${Vp(t.starts_at)}, ${vo(t.starts_at)}–${vo(t.ends_at)}`];return t.course?.form&&n.push(Hp[t.course.form]??t.course.form),t.is_online?n.push("online"):t.room&&n.push(`sala ${t.room}`),n.join(" · ")}case"reading":{const t=e.reading;return[t.author,t.course?.name].filter(n=>!!n).join(" · ")}}}function ml(e,t){const n=sc(e,t);return{text:Up(e,t),warn:n>=0&&n<=14}}function Dg(e,t=new Date){switch(e.type){case"deadline":return ml(e.deadline.due_at,t);case"class":return ml(e.session.starts_at,t);case"reading":return e.reading.is_required?{text:"obowiązkowa",warn:!1}:null}}const Qp=[{path:"/terminarz",hash:/^#termin-([1-9]\d{0,15})$/,type:"deadline"},{path:"/plan",hash:/^#zajecia-([1-9]\d{0,15})$/,type:"class"},{path:"/lektury",hash:/^#lektura-([1-9]\d{0,15})$/,type:"reading"}];function ic(e,t){const n=e.trim();if(!n||!/^https?:\/\//i.test(n)&&(!n.startsWith("/")||n.startsWith("//")))return null;let r;try{r=new URL(n,t)}catch{return null}if(r.origin!==t)return null;for(const o of Qp){if(r.pathname!==o.path)continue;const i=o.hash.exec(r.hash);if(!i)return null;const l=Number(i[1]);return rc(l)?{type:o.type,id:l}:null}return null}const Xp=/https?:\/\/[^\s<>"'`]+|(?"'`]+/gi;function em(e,t){const n=[],s=new Set;for(const r of e.matchAll(Xp)){const o=r[0].replace(/[.,;:!?)\]}"'”»]+$/,""),i=ic(o,t);if(!i)continue;const l=tn(i);s.has(l)||(s.add(l),n.push(i))}return n}function Ng(e,t){const n=em(e,t);return n.length?{insertText:e.trim().split(/\s+/).every(o=>ic(o,t)!==null)?"":e,refs:n}:{insertText:e,refs:n}}const tm="/ws",nm="/api/realtime/token",sm=new Set([401,403,404]);function lc(e){return sm.has(e)}const rm=1;function om(e=window.location){return`${e.protocol==="https:"?"wss":"ws"}://${e.host}${tm}`}function im(e){const t=String(e);return t==="connected"||t==="connecting"?t:"disconnected"}function wo(e){if(!e||typeof e.client!="string")return null;const t=Number(e.user);return!Number.isInteger(t)||t<=0?null:{client:e.client,user:t}}let Vt=null,kn=null,gs="disconnected",br=!1,Xs=null,Eo=null,bn=0;const rn=new Map,So=new Set,Vs=new Set;function ac(e){gs=e;for(const t of[...So])t(e)}function lm(){br=!0;for(const e of[...Vs])e()}function jg(e){Xs=e}function am(e,t){return e instanceof We&&lc(e.status)&&Eo?new Eo(t):e}function cc(e){return So.add(e),()=>{So.delete(e)}}function uc(e){return Vs.add(e),br&&queueMicrotask(()=>Vs.has(e)&&e()),()=>{Vs.delete(e)}}function cm(){if(Vt)return gs==="disconnected"&&!br&&Vt.connect(),Promise.resolve(Vt);if(kn)return kn;const e=bn;return kn=(async()=>{try{const{Centrifuge:t,UnauthorizedError:n}=await ve(async()=>{const{Centrifuge:r,UnauthorizedError:o}=await import("./index-B53bcf0x.js");return{Centrifuge:r,UnauthorizedError:o}},[]);if(e!==bn)throw new Error("realtime: disconnected while loading");Eo=n;const s=new t(om(),{minReconnectDelay:500,maxReconnectDelay:1e4,getToken:async()=>{try{const r=Xs;let o;if(r?o=await r.connection():o=(await H.request(nm))?.token,typeof o!="string"||o==="")throw new Error("realtime: empty token");return o}catch(r){throw r instanceof We&&lc(r.status)?(lm(),new n("realtime unavailable")):r}}});return s.on("state",r=>{Vt===s&&ac(im(r.newState))}),Vt=s,s.connect(),s}finally{e===bn&&(kn=null)}})(),kn}function On(e,t){for(const n of[...e.hooks])t(n)}function um(e,t){return Xs?.subscription?e.newSubscription(t,{getToken:async()=>{const n=Xs;if(!n?.subscription)throw new Error("realtime: no subscription token source");try{const s=await n.subscription(t);if(typeof s!="string"||s==="")throw new Error("realtime: empty subscription token");return s}catch(s){throw am(s,"subscription refused")}}}):e.newSubscription(t)}function fm(e,t,n){let s=rn.get(t);if(s)String(s.sub.state)==="subscribed"&&queueMicrotask(()=>s?.hooks.has(n)&&n.onSubscribed?.());else{const r=e.getSubscription(t)??um(e,t),o={sub:r,hooks:new Set};r.on("publication",i=>On(o,l=>l.onPublication?.(i.data))),r.on("subscribed",()=>On(o,i=>i.onSubscribed?.())),r.on("unsubscribed",i=>{i.code>=400?On(o,l=>l.onDenied?.(i.code)):i.code===rm&&On(o,l=>l.onDenied?.(401))}),r.on("join",i=>{const l=wo(i.info);l&&On(o,a=>a.onJoin?.(l))}),r.on("leave",i=>{const l=wo(i.info);l&&On(o,a=>a.onLeave?.(l))}),rn.set(t,o),r.subscribe(),s=o}return s.hooks.add(n),s}function fc(e,t){t.sub.removeAllListeners(),t.sub.unsubscribe(),Vt?.removeSubscription(t.sub),rn.delete(e)}async function Fs(e,t){const n=await cm(),s={...t},r=bn;fm(n,e,s);let o=!1;return{close(){if(o)return;o=!0;const i=rn.get(e);r!==bn||!i||!i.hooks.delete(s)||i.hooks.size>0||(fc(e,i),rn.size===0&&Vt===n&&n.disconnect())},resubscribe(){o||r!==bn||rn.get(e)?.sub.subscribe()}}}async function dm(e){const t=rn.get(e);if(!t)return null;try{const n=await t.sub.presence();return Object.values(n.clients??{}).map(s=>wo(s)).filter(s=>s!==null)}catch{return null}}function hm(){bn++,kn=null;for(const[t,n]of[...rn])fc(t,n);const e=Vt;Vt=null,br=!1,e&&(e.disconnect(),e.removeAllListeners()),gs!=="disconnected"&&ac("disconnected")}async function $g(e,t){const n=cc(i=>t.onConnection?.(i)),s=uc(()=>t.onUnavailable?.());let r;try{r=await Fs(e,{onPublication:i=>t.onPublication(i),onSubscribed:()=>t.onSubscribed?.(),onDenied:i=>t.onDenied?.(i)})}catch(i){throw n(),s(),i}gs==="connected"&&t.onConnection?.(gs);let o=!1;return{close(){o||(o=!0,n(),s(),r.close())},resubscribe(){o||r.resubscribe()}}}const pm={max_files:5,max_bytes:62914560};function mm(e){return`Nie udało się wysłać pliku „${e}”.`}const gm=Object.freeze({text:"",error:"",sending:!1,embeds:Object.freeze([]),files:Object.freeze([])}),gl=50;function ym(){return typeof window<"u"&&window.location?window.location.origin:""}function _m(e){const t=e instanceof We?e.status:-1;return t===0?"Nie wysłano: brak połączenia z internetem. Spróbuj ponownie.":t===429?"Za dużo wiadomości w krótkim czasie. Odczekaj chwilę i wyślij ponownie.":t===403||t===404?"Nie masz już dostępu do tej rozmowy.":t===400||t===422?"Tej wiadomości nie da się wysłać. Sprawdź treść i załączniki.":"Nie wysłano wiadomości. Spróbuj ponownie."}function vm(e){return e instanceof We&&e.status===429?"Za dużo nowych rozmów w krótkim czasie. Odczekaj minutę i spróbuj ponownie.":e instanceof We&&e.status===0?"Brak połączenia z internetem. Spróbuj ponownie.":"Nie udało się rozpocząć rozmowy. Spróbuj ponownie."}const bm=15e3,wm=6e4,Em=500,Qt=50,Sm="Nie udało się wczytać starszych wiadomości.",Tm=3e3,Rm=6e3,yl={add:"Nie udało się dodać reakcji.",remove:"Nie udało się cofnąć reakcji."},_l="Nie udało się zapisać zmian. Spróbuj ponownie.",Am="Nie udało się usunąć wiadomości. Spróbuj ponownie.";function dc(e){e.deleted_at=e.deleted_at??new Date().toISOString(),e.content=null,e.reactions=[],e.attachments=[],e.metadata=void 0}function Cm(e,t,n){const s=new Set(t.map(o=>o.id)),r=t.lengthn||dc(o)}const vl=e=>`chat:conversation:${e}`;function xm(){return typeof document>"u"||typeof document.hasFocus!="function"||document.hasFocus()}function bl(e,t){if(e.some(s=>s.id===t.id))return!1;let n=e.length;for(;n>0&&e[n-1].id>t.id;)n--;return e.splice(n,0,t),!0}const hc=e=>`bm.chat.member.${e}`;function pc(){try{return globalThis.localStorage??null}catch{return null}}function Om(e){try{const t=pc()?.getItem(hc(e));return t==="1"?!0:t==="0"?!1:void 0}catch{return}}function Pm(e,t){try{pc()?.setItem(hc(e),t?"1":"0")}catch{}}const mc=Gt("chat",()=>{const e=X(null),t=X(void 0),n=X(!1),s=X(null),r=X([]),o=X(null),i=X(null),l=X("general"),a=X(""),c=X({}),u=X({}),f=X({}),p=X({}),g=X({}),v=jn(new Map),w=X("idle"),S=X("idle"),E=X("idle"),y=X(!1),x=X({}),P=X({}),N=X({}),Q=jn(new Map),j=X(!1),F=X({}),B=X(null),ie=X({});let L=0,Ce=null,xe=null,q=null;const Se=new Map,ee=new Map,G=new Set;let re=null,Ne=0;const pe=new Map,Te=new Map;let ke=!1,yt=null,_t=null,st=null,qe=null,O=0,U=[],z=null,K=null;const oe=new Set,h=new Map,m=new Map,_=new Map,A=new Set;let C=null;const T=new Map,$=new Map,I=ne(()=>s.value?.conversation_id??null);function D(d){return d===I.value?s.value?.unread??0:r.value.find(b=>b.id===d)?.unread??0}function M(d){return d===I.value?s.value?.mentions??0:0}const Y=ne(()=>r.value.reduce((d,b)=>d+(b.unread>0?b.unread:0),0)),V=ne(()=>t.value?Math.max(0,s.value?.unread??0)+Y.value:0),W=ne(()=>t.value?Math.max(0,s.value?.mentions??0):0),te=ne(()=>{const d=new Map;for(const b of v.value.values())b.handle&&d.set(b.handle,b);return d}),ae=ne(()=>e.value!==null?v.value.get(e.value)?.handle??null:null),he=ne(()=>[...new Set(Q.value.values())].filter(d=>d!==e.value).sort((d,b)=>d-b)),me=ne(()=>he.value.length+1);function Ie(d){return j.value&&he.value.includes(d)}function je(d){return E.value==="unavailable"?[]:F.value[d]??[]}const at=ne(()=>[...r.value].sort((d,b)=>{const R=d.last_message?Date.parse(d.last_message.created_at):-1/0;return(b.last_message?Date.parse(b.last_message.created_at):-1/0)-R||b.id-d.id}));function ct(d){if(!d.member){ri(),t.value=!1,n.value=!1,s.value=null,r.value=[],o.value=null,i.value=null,l.value="general",c.value={};return}t.value=!0,n.value=d.moderator,s.value=d.general,r.value=(d.conversations??[]).map(R=>({...R})),o.value=d.limits;for(const R of[..._.keys(),...A])Wo(R);i.value!==null&&(i.value===d.general.conversation_id||r.value.some(R=>R.id===i.value))||(i.value=d.general.conversation_id,l.value==="dm"&&(l.value="general"))}function vt(){if(Ce)return Ce;const d=L,b=S.value==="ready";return b||(S.value="loading"),Ce=(async()=>{try{const R=await Ve.bootstrap();if(d!==L)return;ct(R),e.value!==null&&Pm(e.value,R.member),S.value="ready"}catch{d===L&&!b&&(S.value="error")}finally{d===L&&(Ce=null)}})(),Ce}async function Es(d){e.value!==d&&(oi(),e.value=d),t.value===void 0&&(t.value=Om(d));const b=L;await vt(),!(b!==L||!t.value)&&(Xo(),ei(),wc(),eu(),i.value!==null&&l.value!=="dms"&&await Je(i.value))}async function He(d){const b=L;u.value[d]=!0,f.value[d]="";try{const R=await Ve.messages(d,{limit:Qt});if(b!==L)return;c.value[d]=R,x.value[d]=R.length{try{const J=c.value[d]?.at(-1)?.id??0,ce=await Ve.messages(d,{limit:Qt});if(R!==L)return;const fe=c.value[d],le=fe?.at(-1)?.id??0;if(!fe||ce.length>=Qt&&ce[0].id>le){c.value[d]=ce,f.value[d]="",x.value[d]=ce.length[bt.id,bt]));for(const bt of ce)ue.set(bt.id,bt);c.value[d]=[...ue.values()].sort((bt,an)=>bt.id-an.id)}catch{}finally{R===L&&h.delete(d)}})();return h.set(d,k),k}async function Ss(d){const b=c.value[d];if(!b?.length||P.value[d]||x.value[d])return;const R=L;P.value[d]=!0,N.value[d]="";try{const k=await Ve.messages(d,{limit:Qt,before:b[0].id});if(R!==L)return;const J=c.value[d]??[],ce=new Set(J.map(fe=>fe.id));c.value[d]=[...k.filter(fe=>!ce.has(fe.id)),...J],x.value[d]=k.lengthR.id===d);b&&(b.unread=0)}function bc(d){const b=c.value[d]?.at(-1)?.id??0;if(!(D(d)>0||M(d)>0||b>(m.get(d)??0))||(Wo(d),m.set(d,b),_.has(d)))return;const k=L;_.set(d,setTimeout(()=>{_.delete(d),k===L&&(A.add(d),Ve.markRead(d).catch(()=>{}).finally(()=>{k===L&&A.delete(d)}))},Em))}function wc(){C||typeof document>"u"||(C=()=>{document.visibilityState==="visible"&&t.value&&qn()},document.addEventListener("visibilitychange",C))}function Jo(){return l.value==="dms"?null:i.value}function Ec(d){return i.value===d&&l.value!=="dms"&&y.value&&xm()}function Yo(d){const b=c.value[d.conversation_id];b&&bl(b,d);const R=r.value.find(k=>k.id===d.conversation_id);R&&(!R.last_message||Date.parse(d.created_at)>=Date.parse(R.last_message.created_at))&&(R.last_message={id:d.id,sender_id:d.sender_id,content:d.content??"",created_at:d.created_at})}async function Sc(){l.value="general",I.value!==null&&await Je(I.value)}function Tc(){l.value="dms",a.value="",Or()}async function wr(d){l.value="dm",await Je(d)}function Zo(d){return r.value.find(b=>b.other_user_id===d)}async function Rc(d){a.value="";const b=Zo(d);if(b)return await wr(b.id),b.id;const R=L;try{const k=await Ve.startDm(d);return R!==L?null:(r.value.some(J=>J.id===k.id)||r.value.unshift({id:k.id,type:k.type||"dm",other_user_id:d,unread:0,last_message:null}),await wr(k.id),k.id)}catch(k){return R===L&&(a.value=vm(k)),null}}function Er(d){return d!==null&&p.value[d]||gm}function Ts(d){return p.value[d]||(p.value[d]={text:"",error:"",sending:!1,embeds:[],files:[]}),p.value[d]}function Sr(d){return Er(d).files.some(b=>b.state==="uploading")}function Ac(d){const b=Er(d);return b.sending||Sr(d)?!1:b.text.trim()!==""||b.embeds.length>0||b.files.some(R=>R.state==="done")}function Qo(d,b){const R=pe.get(b),k=p.value[d]?.files.find(le=>le.localId===b);if(!R||!k)return;k.state="uploading",k.progress=0,k.id=null;const J=new AbortController;Te.set(b,J);const ce=L,fe=()=>p.value[d]?.files.find(le=>le.localId===b);Ve.upload(R,le=>{const ue=fe();ce===L&&ue&&ue.state==="uploading"&&(ue.progress=le)},J.signal).then(le=>{const ue=fe();ce!==L||!ue||J.signal.aborted||(ue.state="done",ue.progress=100,ue.id=le.id)}).catch(()=>{const le=fe();if(ce!==L||!le||J.signal.aborted)return;le.state="failed";const ue=p.value[d];ue&&(ue.error=mm(le.name))}).finally(()=>{Te.get(b)===J&&Te.delete(b)})}function Cc(d,b){const R=Ts(d),k=R.files.reduce((fe,le)=>fe+le.size,0),{accepted:J,errors:ce}=Ip(b,o.value??pm,R.files.length,k);R.error=ce.join(" ");for(const fe of J){const le=++Ne;pe.set(le,fe),R.files.push({localId:le,name:fe.name,size:fe.size,progress:0,state:"uploading",id:null}),Qo(d,le)}return ce}function xc(d,b){const R=p.value[d]?.files.find(J=>J.localId===b);if(!R||R.state!=="failed")return;const k=p.value[d];k&&(k.error=""),Qo(d,b)}function Oc(d,b){Te.get(b)?.abort(),Te.delete(b),pe.delete(b);const R=p.value[d];R&&(R.files=R.files.filter(k=>k.localId!==b))}const Rs=ne(()=>Math.min(o.value?.max_embeds||bo,bo));function Pc(d,b,R){const k=Ts(d),J=tn(b);return k.embeds.some(ce=>tn(ce)===J)||k.embeds.length>=Rs.value?!1:(k.embeds.push({type:b.type,id:b.id}),k.error="",R?ie.value[J]=R:Tr([b]),!0)}function Mc(d,b){const R=p.value[d];if(!R)return;const k=tn(b);R.embeds=R.embeds.filter(J=>tn(J)!==k)}function kc(d){return ie.value[tn(d)]}function Tr(d,b=!1){for(const R of d){const k=tn(R);G.has(k)||ee.has(k)||!b&&k in ie.value||ee.set(k,{type:R.type,id:R.id})}if(!ee.size)return re??Promise.resolve();if(!re){const R=L;re=Promise.resolve().then(async()=>{const k=[...ee.entries()];ee.clear(),re=null;for(const[J]of k)G.add(J);for(let J=0;Jle));if(R!==L)return;for(const[le]of ce){const ue=fe&&typeof fe=="object"?fe[le]:void 0;ie.value[le]=ue??null}}catch{}finally{if(R===L)for(const[fe]of ce)G.delete(fe)}}})}return re}function Ic(d,b=!1){const R=[];for(const k of d??[])k.deleted_at||R.push(...Yp(k,Rs.value));return Tr(R,b)}function Lc(d,b){const R=Ts(d);R.text=b,R.error=""}async function Dc(d=i.value){if(d===null)return!1;const b=Ts(d),R=b.embeds.slice(0,Rs.value),k=b.files.filter(ue=>ue.state==="done"&&ue.id!==null),J=k.map(ue=>ue.id);let ce=b.text.trim();if(!ce&&!R.length&&!J.length||b.sending||Sr(d))return!1;!ce&&!J.length&&(ce=Zp(R,ym()));const fe={content:ce};J.length&&(fe.attachment_ids=J),R.length&&(fe.metadata={embeds:R.map(ue=>({type:ue.type,id:ue.id}))}),b.sending=!0,b.error="";const le=L;try{const ue=await Ve.send(d,fe);if(le!==L)return!1;Yo(ue),b.text="",b.embeds=[];const bt=new Set(k.map(an=>an.localId));for(const an of bt)pe.delete(an);return b.files=b.files.filter(an=>!bt.has(an.localId)),!0}catch(ue){return le!==L||(b.error=_m(ue),ue instanceof We&&(ue.status===403||ue.status===404)&&vt()),!1}finally{b.sending=!1}}function Nc(d,b){g.value[d]={...b}}function jc(d){return g.value[d]??null}function Xo(d=!1){if(xe)return xe;if(w.value==="ready"&&!d)return Promise.resolve();const b=L;return w.value="loading",xe=(async()=>{try{const R=await Ve.members();if(b!==L)return;v.value=new Map(R.map(k=>[k.id,k])),w.value="ready"}catch{b===L&&(w.value="error")}finally{b===L&&(xe=null)}})(),xe}function ei(){if(B.value!==null)return Promise.resolve();if(q)return q;const d=L;return q=(async()=>{try{const b=await Ve.reactions();d===L&&(B.value=Array.isArray(b)?b.filter(R=>typeof R=="string"&&R!==""):[])}catch{}finally{d===L&&(q=null)}})(),q}function Tn(d,b){return c.value[d]?.find(R=>R.id===b)}async function $c(d,b){const R=e.value,k=Tn(d.conversation_id,d.id);if(R===null||!k||k.deleted_at)return;const J=!(k.reactions??[]).some(le=>le.key===b&&le.user_ids.includes(R));k.reactions=Jr(k.reactions,b,R,J,B.value??[]);const ce=(Se.get(k.id)??0)+1;Se.set(k.id,ce);const fe=L;try{const le=J?await Ve.addReaction(k.id,b):await Ve.removeReaction(k.id,b);if(fe!==L||Se.get(k.id)!==ce)return;const ue=Tn(d.conversation_id,d.id);ue&&!ue.deleted_at&&(ue.reactions=le.reactions??[])}catch{if(fe!==L)return;const le=Tn(d.conversation_id,d.id);le&&(le.reactions=Jr(le.reactions,b,R,!J,B.value??[])),wn().show(J?yl.add:yl.remove)}finally{fe===L&&Se.get(k.id)===ce&&Se.delete(k.id)}}function zc(d){return e.value!==null&&d.sender_id===e.value&&!d.deleted_at&&d.type==="text"}function Vc(d){return e.value===null||d.deleted_at?!1:d.sender_id===e.value?!0:n.value&&I.value!==null&&d.conversation_id===I.value}function ti(d){const b=c.value[d.conversation_id],R=b?b.findIndex(J=>J.id===d.id):-1;b&&R>=0&&(b[R]=d);const k=r.value.find(J=>J.id===d.conversation_id);k?.last_message?.id===d.id&&(k.last_message={...k.last_message,content:d.content??""})}function As(d,b){const R=Tn(d,b);R&&dc(R);const k=r.value.find(J=>J.id===d);k?.last_message?.id===b&&(k.last_message={...k.last_message,content:""})}async function Fc(d,b){const R=b.trim();if(R===(d.content??"").trim())return null;if(!R)return _l;const k=L;try{const J=await Ve.edit(d.id,R);return k===L&&ti(J),null}catch{return _l}}async function Bc(d){const b=L;try{return await Ve.remove(d.id),b===L&&As(d.conversation_id,d.id),null}catch(R){return R instanceof We&&R.status===404?(b===L&&As(d.conversation_id,d.id),null):Am}}async function Uc(d,b){if(!Tn(d,b))return;const R=L;try{const k=await Ve.message(b);if(R!==L)return;k.deleted_at?As(d,b):ti(k)}catch{}}function qn(){return vt()}async function qc(d){if(oe.has(d))return;oe.add(d);const b=L;try{const R=await Ve.message(d);b===L&&Yo(R)}catch{}finally{b===L&&oe.delete(d)}}function Hc(d){const b=d.conversation_id;Cr(b,d.sender_id);const R=Ec(b),k=c.value[b];if(k&&bl(k,d),b===I.value){s.value&&!R&&(s.value.unread+=1);return}r.value=Op(r.value,d,{seen:R})}function Kc(d){switch(d.kind){case"created":Cr(d.conversationId,d.senderId),xp(d,c.value)&&qc(d.id);return;case"typing":Jc(d.conversationId,d.userId);return;case"chatMessage":Hc(d.message);return;case"mentions":qn();return;case"updated":Uc(d.conversationId,d.id);return;case"deleted":As(d.conversationId,d.id);return;case"reacted":{const b=Tn(d.conversationId,d.id);b&&!b.deleted_at&&(b.reactions=Jr(b.reactions,d.key,d.userId,d.added,B.value??[]));return}default:return}}function Rr(d){const b=Cp(d);b&&Kc(b)}function Ar(){const d=Jo();d!==null&&c.value[d]!==void 0&&Sn(d),qn()}function Gc(d){if(!(E.value==="idle"||E.value==="unavailable")){if(d==="connected"){E.value="connected";return}j.value=!1,xr(),E.value=E.value==="connected"||E.value==="reconnecting"?"reconnecting":"connecting"}}function Wc(){ni(),z=setInterval(()=>{const d=Jo();d!==null&&Sn(d)},bm),K=setInterval(()=>{qn()},wm)}function ni(){z&&clearInterval(z),K&&clearInterval(K),z=null,K=null}function si(){!ke||E.value==="unavailable"||(E.value="unavailable",j.value=!1,xr(),Wc())}function Jc(d,b){if(b===e.value||E.value==="unavailable")return;const R=F.value[d]??[];R.includes(b)||(F.value[d]=[...R,b]);const k=`${d}:${b}`,J=T.get(k);J&&clearTimeout(J),T.set(k,setTimeout(()=>Cr(d,b),Rm))}function Cr(d,b){const R=`${d}:${b}`,k=T.get(R);k&&clearTimeout(k),T.delete(R);const J=F.value[d];J?.includes(b)&&(F.value[d]=J.filter(ce=>ce!==b))}function xr(){for(const d of T.values())clearTimeout(d);T.clear(),F.value={}}function Yc(d,b){if(!b.trim()||E.value==="idle"||E.value==="unavailable")return;const R=Date.now(),k=$.get(d);k!==void 0&&R-k{}))}async function Zc(d){const b=L,R=await dm(d);if(!(b!==L||E.value==="unavailable")){if(R===null){j.value=!1;return}Q.value=new Map(R.map(k=>[k.client,k.user])),j.value=!0}}function Qc(d){const b=new Map(Q.value);b.set(d.client,d.user),Q.value=b}function Xc(d){if(!Q.value.has(d.client))return;const b=new Map(Q.value);b.delete(d.client),Q.value=b}async function eu(){if(ke||e.value===null||I.value===null)return;ke=!0;const d=L,b=e.value,R=I.value;E.value="connecting",U.push(cc(Gc),uc(si));try{const k=await Fs(`user:${b}`,{onPublication:Rr,onSubscribed:Ar});if(d!==L)return k.close();yt=k;const J=vl(R),ce=await Fs(J,{onPublication:Rr,onSubscribed:()=>{Ar(),Zc(J)},onJoin:Qc,onLeave:Xc});if(d!==L)return ce.close();_t=ce,await Or()}catch{d===L&&si()}}async function Or(){if(!ke)return;const d=l.value==="dm"?i.value:null;if(d===qe)return;const b=++O;if(st?.close(),st=null,qe=d,d===null)return;const R=L;try{const k=await Fs(vl(d),{onPublication:Rr,onSubscribed:Ar});if(R!==L||b!==O)return k.close();st=k}catch{}}function ri(){for(const b of U)b();U=[],yt?.close(),_t?.close(),st?.close(),yt=_t=st=null,qe=null,O++,ni();const d=ke;return ke=!1,E.value="idle",j.value=!1,Q.value=new Map,xr(),$.clear(),d}function oi(){(ri()||e.value!==null)&&hm(),oe.clear(),h.clear();for(const d of _.values())clearTimeout(d);_.clear(),A.clear(),m.clear(),C&&typeof document<"u"&&document.removeEventListener("visibilitychange",C),C=null,L++,Ce=null,xe=null,q=null,Se.clear(),B.value=null;for(const d of Te.values())d.abort();Te.clear(),pe.clear(),ee.clear(),G.clear(),re=null,ie.value={},e.value=null,t.value=void 0,n.value=!1,s.value=null,r.value=[],o.value=null,i.value=null,l.value="general",a.value="",c.value={},u.value={},f.value={},p.value={},g.value={},x.value={},P.value={},N.value={},v.value=new Map,w.value="idle",S.value="idle"}return{userId:e,member:t,moderator:n,general:s,generalId:I,conversations:r,limits:o,activeId:i,view:l,dmError:a,dmRows:at,messages:c,loading:u,errors:f,drafts:p,anchors:g,members:v,membersByHandle:te,myHandle:ae,membersState:w,bootstrapState:S,connection:E,panelVisible:y,reachedStart:x,olderLoading:P,olderError:N,dmUnread:Y,totalUnread:V,totalMentions:W,unreadOf:D,mentionsOf:M,markRead:bc,loadOlder:Ss,presenceAvailable:j,othersOnline:he,onlineCount:me,isOnline:Ie,typing:F,typingIn:je,emitTyping:Yc,init:Es,bootstrap:vt,open:Je,showGeneral:Sc,showDms:Tc,openDm:wr,dmWith:Zo,startDm:Rc,loadLatest:He,refreshLatest:Sn,refetchCounts:qn,draft:Er,setDraftText:Lc,send:Dc,maxEmbeds:Rs,uploading:Sr,canSend:Ac,uploadFiles:Cc,retryUpload:xc,removeFile:Oc,stageEmbed:Pc,unstageEmbed:Mc,embedItems:ie,embedItem:kc,resolveRefs:Tr,resolveFor:Ic,saveAnchor:Nc,anchorFor:jc,loadMembers:Xo,allowedReactions:B,loadReactions:ei,toggleReaction:$c,canEdit:zc,canDelete:Vc,edit:Fc,remove:Bc,reset:oi}});let Yr=null;const gc=Gt("auth",()=>{const e=X(null),t=X(ft.get()),n=X(!1),s=ne(()=>t.value!==null),r=ne(()=>{const S=e.value;return S?[S.name,S.surname].filter(Boolean).join(" ")||S.email:""});function o(S,E,y){ft.set(S,y),t.value=ft.get(),E&&(e.value=E,is().load(E.id))}function i(){ft.clear(),t.value=null,e.value=null,Go().reset(),wp().reset(),is().reset(),Qa().reset(),mc().reset()}async function l(S){S&&(Yr={public:S.meta.public===!0,fullPath:S.fullPath});try{if(ft.get())try{const E=await fn.fetch();e.value=E.user,t.value=ft.get(),is().load(E.user.id)}catch{ft.get()||i()}n.value=!0}finally{Yr=null}}async function a(S,E,y){const x=await fn.login({email:S,password:E});o(x.token,x.user,y)}async function c(S,E){const y=await fn.register(S);return y.token?(o(y.token,y.user,E),{signedIn:!0,message:""}):{signedIn:!1,message:y.message??""}}function u(S){return o(S.token,S.user,!0),{action:S.action,returnTo:S.return_to}}async function f(S){return u(await fn.oauthComplete(S))}async function p(S){return u(await fn.oauthRegisterComplete(S))}async function g(){try{await fn.logout()}catch{}i(),await gn.push({name:"login"})}async function v(S){const E=await fn.update(S);e.value=E.user}function w(){const S=Yr??{public:gn.currentRoute.value.meta.public===!0,fullPath:gn.currentRoute.value.fullPath},E=s.value||e.value!==null;i(),E&&!S.public&&gn.push({name:"login",query:{redirect:S.fullPath,expired:"1"}})}return cp(w),{user:e,token:t,ready:n,loggedIn:s,displayName:r,restore:l,login:a,register:c,completeOAuth:f,completeOAuthRegistration:p,logout:g,updateProfile:v}});function zg({active:e,visible:t,focused:n,atBottom:s}){return e&&t&&n&&s}function Mm(e){return e>0?e>99?"99+":String(e):""}function wl(e){return _o(e,"nieprzeczytana wiadomość","nieprzeczytane wiadomości","nieprzeczytanych wiadomości")}function Vg(e){return e===1?"wzmianka o Tobie":`${e} ${ec(e,"wzmianka","wzmianki","wzmianek")} o Tobie`}function Fg(e,t,n){if(!(t>0))return null;let s=t,r=null;for(let o=e.length-1;o>=0&&s>0;o--){const i=e[o];i.sender_id!==n&&(r=i.id,s--)}return r}function Bg(e){return e.length===0?"":e.length===1?`${e[0]} pisze…`:e.length===2?`${e[0]} i ${e[1]} piszą…`:"Kilka osób pisze…"}let Zr=!1;const yc=Gt("pwa",()=>{const e=X(!1),t=jn(null),n=jn(null);let s=!1;const r=ne(()=>!e.value&&t.value!==null),o=ne(()=>n.value!==null);function i(){s||typeof window>"u"||(s=!0,e.value=window.matchMedia?.("(display-mode: standalone)").matches===!0||navigator.standalone===!0,window.addEventListener("beforeinstallprompt",f=>{f.preventDefault(),t.value=f}),window.addEventListener("appinstalled",()=>{e.value=!0,t.value=null}),"serviceWorker"in navigator&&(document.readyState==="complete"?l():window.addEventListener("load",l,{once:!0})))}async function l(){const f=navigator.serviceWorker;f.addEventListener("controllerchange",()=>{Zr&&(Zr=!1,window.location.reload())});try{const p=await f.register("/sw.js",{scope:"/",updateViaCache:"none"});p.waiting&&f.controller&&(n.value=p.waiting),p.addEventListener("updatefound",()=>{const g=p.installing;g&&g.addEventListener("statechange",()=>{g.state==="installed"&&f.controller&&(n.value=g)})}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&p.update().catch(()=>{})})}catch{}}async function a(){const f=t.value;if(f){t.value=null;try{await f.prompt(),(await f.userChoice).outcome==="accepted"&&(e.value=!0)}catch{}}}function c(){const f=n.value;f&&(Zr=!0,f.postMessage({type:"SKIP_WAITING"}))}function u(){n.value=null}return{installed:e,deferred:t,waiting:n,canInstall:r,updateReady:o,start:i,install:a,applyUpdate:c,dismissUpdate:u}}),km={class:"shell"},Im={class:"sidebar"},Lm={class:"side-head"},Dm={"aria-label":"Główna nawigacja"},Nm={key:0,class:"unread-badge nav-badge"},jm={"aria-hidden":"true"},$m={class:"sr-only"},zm={class:"who"},Vm={class:"muted"},Fm={class:"topbar"},Bm={class:"tabbar","aria-label":"Nawigacja"},Um={class:"nav-icon"},qm={key:0,class:"nav-dot","aria-hidden":"true"},Hm={key:0,class:"sr-only"},Km={key:0,class:"update-bar",role:"status","aria-live":"polite"},Gm=En({__name:"AppShell",setup(e){const t=gc(),n=wn(),s=yc(),r=Wa();Qa();const o=mc();_n(()=>t.user?.id,f=>{f?o.init(f):o.reset()},{immediate:!0});const i=[{to:"/",label:"Pulpit",icon:"home",match:["dashboard"]},{to:"/plan",label:"Plan zajęć",icon:"calendar",match:["schedule"]},{to:"/terminarz",label:"Terminarz",icon:"flag",match:["deadlines"]},{to:"/przedmioty",label:"Przedmioty",icon:"grad",match:["courses","course"]},{to:"/lektury",label:"Lektury",icon:"book",match:["readings"]},{to:"/materialy",label:"Materiały",icon:"file",match:["materials","material"]},{to:"/checklisty",label:"Checklisty",icon:"checklist",match:["checklists","checklist"]},{to:"/sylabusy",label:"Sylabusy",icon:"file",match:["syllabi"]},{to:"/quizy",label:"Quizy",icon:"quiz",match:["quizzes","quiz"]},{to:"/moje-prezentacje",label:"Moje prezentacje",icon:"slides",match:["my-presentations"]},{to:"/profil",label:"Profil",icon:"user",match:["profile"]}],l=[{to:"/",label:"Pulpit",icon:"home",match:["dashboard"]},{to:"/plan",label:"Plan zajęć",icon:"calendar",match:["schedule"]},{to:"/materialy",label:"Materiały",icon:"file",match:["materials","material"]},{to:"/checklisty",label:"Checklisty",icon:"checklist",match:["checklists","checklist"]},{to:"/wiecej",label:"Więcej",icon:"more",match:["more","deadlines","courses","course","readings","quizzes","quiz","syllabi","my-presentations","profile"]}],a=ne(()=>String(r.name??"")),c=ne(()=>a.value!=="dashboard"&&o.totalUnread>0?o.totalUnread:0),u=f=>f.includes(a.value);return(f,p)=>{const g=ia("router-link");return Xe(),St("div",km,[Oe("aside",Im,[Oe("div",Lm,[Ee(g,{to:"/",class:"brand"},{default:In(()=>[...p[4]||(p[4]=[Oe("span",{class:"eyebrow"},"UWr · ISMiB",-1),Oe("b",null,"BM II°",-1)])]),_:1}),Ee(il)]),Oe("nav",Dm,[(Xe(),St(nt,null,vi(i,v=>Ee(g,{key:v.to,to:v.to,class:Ln({active:u(v.match)}),"aria-current":u(v.match)?"page":void 0},{default:In(()=>[Ee(yo,{name:v.icon},null,8,["name"]),ao(Jt(v.label)+" ",1),v.to==="/"&&c.value?(Xe(),St("span",Nm,[Oe("span",jm,Jt(Pe(Mm)(c.value)),1),Oe("span",$m,", "+Jt(Pe(wl)(c.value)),1)])):Gn("",!0)]),_:2},1032,["to","class","aria-current"])),64))]),Oe("div",zm,[Oe("span",Vm,Jt(Pe(t).displayName),1),Pe(s).canInstall?(Xe(),St("button",{key:0,class:"btn small",type:"button",onClick:p[0]||(p[0]=v=>Pe(s).install())},"Zainstaluj aplikację")):Gn("",!0),Oe("button",{class:"btn small ghost",type:"button",onClick:p[1]||(p[1]=v=>Pe(t).logout())},"Wyloguj")])]),Oe("header",Fm,[Ee(g,{to:"/",class:"topbar-brand"},{default:In(()=>[...p[5]||(p[5]=[Oe("span",{class:"eyebrow"},"UWr · ISMiB",-1),Oe("b",null,"BM II°",-1)])]),_:1}),Ee(il)]),Oe("main",{class:Ln(["main",{wide:Pe(r).meta.wide===!0}]),id:"main"},[_f(f.$slots,"default")],2),Oe("nav",Bm,[(Xe(),St(nt,null,vi(l,v=>Ee(g,{key:v.to,to:v.to,class:Ln({active:u(v.match)}),"aria-current":u(v.match)?"page":void 0},{default:In(()=>[Oe("span",Um,[Ee(yo,{name:v.icon},null,8,["name"]),v.to==="/"&&c.value?(Xe(),St("span",qm)):Gn("",!0)]),ao(Jt(v.label)+" ",1),v.to==="/"&&c.value?(Xe(),St("span",Hm,", "+Jt(Pe(wl)(c.value)),1)):Gn("",!0)]),_:2},1032,["to","class","aria-current"])),64))]),Ku(Oe("div",{class:"toast",role:"status","aria-live":"polite"},Jt(Pe(n).message),513),[[cd,Pe(n).message]]),Pe(s).updateReady?(Xe(),St("div",Km,[p[6]||(p[6]=Oe("span",null,"Dostępna jest nowa wersja aplikacji.",-1)),Oe("button",{class:"btn small",type:"button",onClick:p[2]||(p[2]=v=>Pe(s).applyUpdate())},"Odśwież"),Oe("button",{class:"btn small ghost",type:"button",onClick:p[3]||(p[3]=v=>Pe(s).dismissUpdate())},"Później")])):Gn("",!0)])}}});function _c(e){return e==="/cast"||e==="/cast/"}const Wm=En({__name:"App",setup(e){const t=Wa(),n=_c(window.location.pathname),s=ne(()=>t.meta.public===!0||t.meta.bare===!0||n&&t.matched.length===0);return(r,o)=>{const i=ia("router-view");return s.value?(Xe(),fs(i,{key:0})):(Xe(),fs(Gm,{key:1},{default:In(()=>[Ee(i)]),_:1}))}}}),vc=Nd();Id(Wm).use(vc).use(gn).mount("#app");_c(window.location.pathname)||yc(vc).start();export{tn as $,We as A,ec as B,Ln as C,Sg as D,vi as E,nt as F,yg as G,Ao as H,Ag as I,Cg as J,Vp as K,kl as L,mu as M,Pg as N,kg as O,Lg as P,Dg as Q,Bh as R,Ig as S,xg as T,_n as U,uf as V,rg as W,Qm as X,Ve as Y,cr as Z,yo as _,fn as a,cg as a$,mc as a0,Og as a1,Ng as a2,Vg as a3,Mm as a4,wl as a5,vo as a6,Eg as a7,Bp as a8,Yp as a9,vp as aA,_g as aB,H as aC,yc as aD,dp as aE,Qa as aF,_s as aG,wg as aH,pg as aI,_f as aJ,$o as aK,dg as aL,hg as aM,Xm as aN,ve as aO,$g as aP,hm as aQ,jn as aR,jg as aS,rp as aT,np as aU,Zm as aV,ft as aW,og as aX,ig as aY,lg as aZ,ag as a_,Mg as aa,Fg as ab,zg as ac,Bg as ad,Go as ae,wp as af,_o as ag,Hp as ah,Up as ai,Kp as aj,Wr as ak,Ae as al,nc as am,is as an,mg as ao,xt as ap,Ym as aq,Fp as ar,ng as as,Tg as at,Rg as au,cd as av,vg as aw,_p as ax,gg as ay,bg as az,Oe as b,ug as b0,St as c,En as d,Pe as e,Gn as f,tg as g,sg as h,Ee as i,In as j,Wa as k,ia as l,fg as m,Xe as n,lf as o,ao as p,wn as q,X as r,fs as s,Jt as t,gc as u,eg as v,Ku as w,ne as x,tc as y,sc as z}; diff --git a/public/assets/index-D22Gy7R4.css b/public/assets/index-D22Gy7R4.css deleted file mode 100644 index 33f094c..0000000 --- a/public/assets/index-D22Gy7R4.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/archivo-narrow-vietnamese-500-normal-CbuGBAYj.woff2) format("woff2"),url(/assets/archivo-narrow-vietnamese-500-normal-DBsYfoQF.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/archivo-narrow-latin-ext-500-normal-CEqYmuFE.woff2) format("woff2"),url(/assets/archivo-narrow-latin-ext-500-normal-DESKgx4f.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/archivo-narrow-latin-500-normal-BH-FPhCi.woff2) format("woff2"),url(/assets/archivo-narrow-latin-500-normal-Oafwxh5s.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:600;src:url(/assets/archivo-narrow-vietnamese-600-normal-B3iMS2rD.woff2) format("woff2"),url(/assets/archivo-narrow-vietnamese-600-normal-BOVNaV0C.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:600;src:url(/assets/archivo-narrow-latin-ext-600-normal-DNmONYTo.woff2) format("woff2"),url(/assets/archivo-narrow-latin-ext-600-normal-CFDqFZjW.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:600;src:url(/assets/archivo-narrow-latin-600-normal-l2jiltzb.woff2) format("woff2"),url(/assets/archivo-narrow-latin-600-normal-DZkbuzR9.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:700;src:url(/assets/archivo-narrow-vietnamese-700-normal-VsvP8OcS.woff2) format("woff2"),url(/assets/archivo-narrow-vietnamese-700-normal-CB0yIOvF.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:700;src:url(/assets/archivo-narrow-latin-ext-700-normal-DCLoHMFv.woff2) format("woff2"),url(/assets/archivo-narrow-latin-ext-700-normal-C4q0W15T.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Archivo Narrow;font-style:normal;font-display:swap;font-weight:700;src:url(/assets/archivo-narrow-latin-700-normal-DtADLsoy.woff2) format("woff2"),url(/assets/archivo-narrow-latin-700-normal-DxmyBkwC.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-ext-opsz-normal-DIwfbPUE.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-opsz-normal-C0olyEE-.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-greek-opsz-normal-DrHU7SY7.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-vietnamese-opsz-normal-BOyYyU_V.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-ext-opsz-normal-HoL-AExg.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Serif 4 Variable";font-style:normal;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-opsz-normal-BpEBLj1O.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-ext-opsz-italic-Bl6DJqma.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-cyrillic-opsz-italic-Dibx14aP.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-greek-opsz-italic-CMW9dfKg.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-vietnamese-opsz-italic-C-k5pZlm.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-ext-opsz-italic-BhUEwDRF.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Serif 4 Variable";font-style:italic;font-display:swap;font-weight:200 900;src:url(/assets/source-serif-4-latin-opsz-italic-BOLXpvkj.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2) format("woff2"),url(/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2) format("woff2"),url(/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2) format("woff2"),url(/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2) format("woff2"),url(/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2) format("woff2"),url(/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2) format("woff2"),url(/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2) format("woff2"),url(/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2) format("woff2"),url(/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2) format("woff2"),url(/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2) format("woff2"),url(/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{color-scheme:dark;--paper: #141917;--panel: #1b211e;--ink: #e4e8e3;--muted: #9aa69f;--rule: #2e3833;--accent: #8cc3aa;--accent-soft: #1f3129;--on-accent: #141917;--miss: #e39a7c;--miss-soft: #35221b;--warn: #f0c27a;--warn-rule: #6b5631;--display: "Archivo Narrow", "Arial Narrow", system-ui, sans-serif;--body: "Source Serif 4 Variable", "Source Serif 4", Georgia, "Times New Roman", serif;--mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;--gutter: 16px;--tabbar-h: 64px;--topbar-h: 52px;--sidebar-w: 236px;--safe-bottom: env(safe-area-inset-bottom, 0px);--av-ink: #f3f4f1;--av-1: #3b4f6b;--av-2: #6b4a3b;--av-3: #4a3b6b;--av-4: #3b6b5e;--av-5: #6b3b4f;--av-6: #5e6b3b;--av-7: #3b5e6b;--av-8: #6b5a3b}:root[data-theme=light]{color-scheme:light;--paper: #f3f4f1;--panel: #fafbf8;--ink: #1c2320;--muted: #5a6560;--rule: #d5dad4;--accent: #2f5a4b;--accent-soft: #e2ebe5;--on-accent: #f3f4f1;--miss: #9a4a2e;--miss-soft: #f3e3dc;--warn: #7a5200;--warn-rule: #d9b56a}*,*:before,*:after{box-sizing:border-box}[hidden]{display:none!important}html{-webkit-text-size-adjust:100%}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--body);font-size:17px;line-height:1.55;overflow-x:hidden}a{color:var(--accent);text-underline-offset:2px}h1,h2,h3{font-family:var(--display);font-weight:700;margin:0;line-height:1.1;text-wrap:balance}h1{font-size:clamp(32px,6vw,44px);letter-spacing:-.01em}h2{font-size:24px}h3{font-size:19px;font-weight:600}p{margin:0 0 .8em}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.eyebrow{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.muted{color:var(--muted)}.mono{font-family:var(--mono)}.small{font-size:14.5px}.nums{font-variant-numeric:tabular-nums}.shell{min-height:100vh}.main{padding:16px var(--gutter) calc(var(--tabbar-h) + var(--safe-bottom) + 28px);min-width:0}.sidebar{display:none}.tabbar{position:fixed;inset:auto 0 0;z-index:20;display:grid;grid-template-columns:repeat(5,1fr);background:var(--panel);border-top:1px solid var(--rule);padding-bottom:var(--safe-bottom)}.tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:var(--tabbar-h);padding:6px 2px;color:var(--muted);text-decoration:none;font-family:var(--mono);font-size:11px;letter-spacing:.02em}.tabbar a svg{width:22px;height:22px}.tabbar a.active{color:var(--accent);box-shadow:inset 0 2px 0 var(--accent)}.topbar{display:flex;align-items:center;justify-content:space-between;min-height:var(--topbar-h);padding:0 calc(var(--gutter) - 8px) 0 var(--gutter);background:var(--panel);border-bottom:1px solid var(--rule)}.topbar-brand{display:inline-flex;align-items:baseline;gap:8px;color:var(--ink);text-decoration:none}.topbar-brand b{font-family:var(--display);font-size:20px;line-height:1}@media(min-width:900px){.shell{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr)}.tabbar,.topbar{display:none}.main{padding:32px 32px 64px;width:100%}.sidebar{display:flex;flex-direction:column;gap:22px;position:sticky;top:0;height:100vh;padding:28px 16px 20px 20px;border-right:1px solid var(--rule);background:var(--panel)}.side-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:14px;border-bottom:2px solid var(--ink)}.side-head .icon-btn{width:36px;height:36px}.brand{display:grid;gap:2px;padding:0 8px;text-decoration:none;color:var(--ink)}.brand b{font-family:var(--display);font-size:30px;line-height:1}.sidebar nav{display:grid;gap:2px}.sidebar nav a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:3px;border-left:3px solid transparent;color:var(--ink);text-decoration:none;font-family:var(--display);font-weight:600;font-size:18px}.sidebar nav a svg{width:20px;height:20px;color:var(--muted)}.sidebar nav a:hover{background:var(--accent-soft)}.sidebar nav a.active{border-left-color:var(--accent);background:var(--accent-soft);color:var(--accent)}.sidebar nav a.active svg{color:var(--accent)}.sidebar .who{margin-top:auto;display:grid;gap:6px;padding:12px 8px 0;border-top:1px solid var(--rule);font-size:14.5px}}.page-head{display:grid;gap:8px;padding-bottom:16px;border-bottom:2px solid var(--ink);margin-bottom:20px}.page-head .row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:10px 16px}.stack{display:grid;gap:16px}.section{margin-top:28px}.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-bottom:6px;margin-bottom:10px;border-bottom:1px solid var(--rule)}.section-head h2{font-size:22px}.grid-2{display:grid;gap:16px}@media(min-width:720px){.grid-2{grid-template-columns:1fr 1fr}}.grid-3{display:grid;gap:16px}@media(min-width:720px){.grid-3{grid-template-columns:repeat(3,1fr)}}.badges{display:inline-flex;flex-wrap:wrap;justify-content:flex-end;gap:4px}.stack[aria-busy=true]>.card{opacity:.6}@media(prefers-reduced-motion:no-preference){.stack[aria-busy]>.card{transition:opacity .15s ease}}.snippet{margin:8px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.snippet mark{background:var(--accent-soft);color:var(--ink);border-bottom:1px solid var(--accent);padding:0;font-weight:inherit}.snippet-file{font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase}.card{padding:16px 18px;background:var(--panel);border:1px solid var(--rule);border-radius:4px;min-width:0}.card.accent{border-left:4px solid var(--accent)}.card.hl{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.card h3{margin-bottom:4px}.card.link{display:block;color:inherit;text-decoration:none}.card.link:hover{border-color:var(--accent)}button.card{width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer}.notice{padding:10px 14px;border-radius:3px;background:var(--accent-soft);font-size:15.5px}.notice.error,.error-text{background:var(--miss-soft);color:var(--miss)}.error-text{background:none;font-size:14.5px;margin:4px 0 0}.notice.error{border-left:3px solid var(--miss)}.empty{padding:22px 16px;text-align:center;color:var(--muted);border:1px dashed var(--rule);border-radius:4px}.skeleton{height:72px;border-radius:4px;background:linear-gradient(90deg,var(--rule),var(--panel),var(--rule));background-size:200% 100%;animation:shimmer 1.4s linear infinite;opacity:.6}@keyframes shimmer{to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.skeleton{animation:none}}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-family:var(--display);font-weight:600;font-size:16px;line-height:1.2;cursor:pointer;border-radius:3px;padding:9px 16px;min-height:40px;border:1px solid var(--accent);background:transparent;color:var(--accent);text-decoration:none}.btn:hover:not(:disabled){background:var(--accent-soft)}.btn:disabled{opacity:.4;cursor:default}.btn.primary{background:var(--accent);color:var(--on-accent)}.btn.primary:hover:not(:disabled){filter:brightness(1.08);background:var(--accent)}.btn.miss{border-color:var(--miss);color:var(--miss)}.btn.miss:hover:not(:disabled){background:var(--miss-soft)}.btn.ghost{border-color:var(--rule);color:var(--muted)}.btn.small{min-height:32px;padding:4px 12px;font-size:15px}.btn.block{width:100%}.btn-row{display:flex;flex-wrap:wrap;gap:8px}.linkish{background:none;border:0;padding:0;font:inherit;color:var(--accent);text-decoration:underline;text-underline-offset:2px;cursor:pointer}.field{display:grid;gap:4px;margin-bottom:14px}.field>label,.field>.label{font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}input[type=text],input[type=email],input[type=password],input[type=search],select{width:100%;font:inherit;font-size:17px;color:var(--ink);background:var(--panel);border:1px solid var(--rule);border-radius:3px;padding:9px 12px;min-height:44px}input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:0;border-color:var(--accent)}.check{display:flex;align-items:center;gap:10px;min-height:32px}input[type=checkbox],input[type=radio]{width:20px;height:20px;accent-color:var(--accent);margin:0;flex:none}.auth{max-width:420px;margin:0 auto;padding:40px var(--gutter) 64px}.auth .page-head{margin-bottom:22px}.auth-links{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 16px;margin-top:18px;font-size:15.5px}.badge{display:inline-block;font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;padding:1px 7px;border-radius:3px;border:1px solid var(--rule);color:var(--muted);vertical-align:middle;white-space:nowrap}.badge.online{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}.badge.onsite{border-color:var(--ink);color:var(--ink)}.badge.alert{border-color:var(--miss);color:var(--miss);background:var(--miss-soft)}.badge.warn{color:var(--warn);border-color:var(--warn-rule)}.badge.solid{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.chips{display:flex;gap:6px;overflow-x:auto;padding:2px 0 6px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}.chips.wrap{flex-wrap:wrap;overflow:visible}.chip{flex:none;font-family:var(--display);font-weight:600;font-size:16px;padding:6px 13px;min-height:36px;border:1px solid var(--rule);border-radius:999px;background:var(--panel);color:var(--ink);cursor:pointer;position:relative}.chip[aria-pressed=true],.chip.on{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.chip .dot{position:absolute;top:3px;right:3px;width:7px;height:7px;border-radius:50%;background:var(--miss)}.rows{list-style:none;margin:0;padding:0}.rows>li{padding:10px 0;border-top:1px solid var(--rule)}.rows>li:first-child{border-top:0}.rows.card{padding:6px 18px}.row-main{display:flex;justify-content:space-between;gap:12px;align-items:baseline}.when{font-family:var(--mono);font-size:13px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}.title{font-weight:600}.past{opacity:.55}.progress-bar{height:6px;border-radius:3px;background:var(--rule);overflow:hidden}.progress-bar>span{display:block;height:100%;background:var(--accent);border-radius:3px}.big-num{font-family:var(--display);font-weight:700;font-size:34px;line-height:1;font-variant-numeric:tabular-nums}.days{display:grid;gap:18px}@media(min-width:720px){.days.two{grid-template-columns:1fr 1fr;align-items:start}}.day-head{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding-bottom:6px;border-bottom:2px solid var(--ink);margin-bottom:10px;display:flex;justify-content:space-between;gap:8px}.session{display:grid;grid-template-columns:58px 1fr;gap:12px;padding:12px 14px;margin-bottom:8px;background:var(--panel);border:1px solid var(--rule);border-left:3px solid var(--accent);border-radius:4px}.session.online{border-left-color:var(--rule)}.session .time{font-family:var(--mono);font-size:13px;line-height:1.35;font-variant-numeric:tabular-nums}.session .time span{display:block;color:var(--muted)}.session .name{font-weight:600;line-height:1.3}.session .meta{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center;margin-top:4px;font-size:14.5px;color:var(--muted)}.session .note{margin-top:6px;font-size:14.5px;padding:6px 10px;background:var(--accent-soft);border-radius:3px}.meeting-bar{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin:14px 0 18px}.reading{display:flex;gap:12px;align-items:flex-start;padding:10px 0;border-top:1px solid var(--rule)}.reading:first-child{border-top:0}.reading label{display:flex;gap:12px;align-items:flex-start;cursor:pointer;flex:1;min-width:0;min-height:32px}.reading input{margin-top:3px}.reading .text{min-width:0;overflow-wrap:anywhere}.reading input:checked+.text{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--rule)}.reading .owned{flex:none;align-items:center;gap:6px;cursor:pointer;min-height:32px;font-family:var(--mono);font-size:12px;color:var(--muted)}.reading .owned input{margin-top:0}.subhead{font-family:var(--mono);font-weight:500;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:12px 0 2px}.checklist-card .progress-bar{margin:10px 0 6px}.checklist-item{flex-wrap:wrap;align-items:center}.checklist-item label{flex:1 1 260px}.checklist-item .badge{font-size:11px;margin-right:4px}.checklist-item .item-notes{display:block;margin-top:2px;white-space:pre-line;text-decoration:none}.checklist-item .item-links{display:flex;gap:10px}.checklist-item .item-actions{display:flex;margin-left:auto}.checklist-item .item-actions .icon-btn{width:36px;height:36px;color:var(--muted)}.checklist-item .item-actions .icon-btn svg{width:18px;height:18px}.checklist-item .grow{flex:1 1 100%}.chip-icon{width:14px;height:14px;vertical-align:-2px}.item-form textarea,.item-form input[type=number],.item-form input[type=datetime-local]{width:100%;font:inherit;font-size:17px;color:var(--ink);background:var(--panel);border:1px solid var(--rule);border-radius:3px;padding:9px 12px;min-height:44px}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0 14px}.hero-prep{display:flex;flex-direction:column;gap:6px;width:100%;max-width:360px;color:inherit;text-decoration:none}.hero-prep:hover .hero-cap{color:var(--accent)}.prose{overflow-wrap:anywhere}.prose h2,.prose h3,.prose h4{margin:1.2em 0 .4em}.prose ul,.prose ol{padding-left:1.3em;margin:0 0 .8em}.prose blockquote{margin:0 0 .8em;padding:2px 14px;border-left:3px solid var(--accent);color:var(--muted)}.prose code{font-family:var(--mono);font-size:.9em;background:var(--accent-soft);padding:1px 5px;border-radius:3px}.prose pre{overflow-x:auto;background:var(--accent-soft);padding:12px 14px;border-radius:4px;margin:0 0 .8em}.prose pre code{background:none;padding:0}.prose hr{border:0;border-top:1px solid var(--rule);margin:1.2em 0}.quiz-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding-block:14px;border-bottom:1px solid var(--rule)}.score{display:flex;align-items:baseline;gap:14px;font-family:var(--mono);font-size:12.5px;color:var(--muted)}.score b{font-family:var(--display);font-size:22px;font-variant-numeric:tabular-nums}.score .y b{color:var(--accent)}.score .n b{color:var(--miss)}.count{display:block;font-family:var(--mono);font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}.round-progress{display:grid;gap:6px;margin-top:22px}.round-progress span{height:6px;border-radius:3px;background:var(--rule)}.round-progress span.cur{background:var(--ink)}.round-progress span.y{background:var(--accent)}.round-progress span.n{background:var(--miss)}.step{font-family:var(--mono);font-size:12px;color:var(--muted);margin-top:8px;display:flex;justify-content:space-between;gap:8px}.qcard{margin-top:14px;padding:20px 22px;background:var(--panel);border:1px solid var(--rule);border-radius:4px}.q{margin:0;font-size:20px;line-height:1.45}.answer{margin:14px 0 0;padding:10px 14px;background:var(--accent-soft);border-radius:3px;font-size:16px}.answer .tag{margin-bottom:2px}.reveal{margin-top:12px;font-family:var(--mono);font-size:12.5px;color:var(--accent);background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.qactions{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.qactions .next{margin-left:auto}.btn.yes[aria-pressed=true]{background:var(--accent);color:var(--on-accent)}.btn.no{border-color:var(--miss);color:var(--miss)}.btn.no[aria-pressed=true]{background:var(--miss);color:var(--paper)}.sum h2{font-size:26px;margin:0 0 4px}.sum>p{margin:0 0 12px;color:var(--muted)}.sum ol{list-style:none;margin:0 0 18px;padding:0}.sum li{padding:10px 0 10px 14px;border-top:1px solid var(--rule);border-left:3px solid var(--accent);font-size:16px}.sum li.n{border-left-color:var(--miss)}.sum li small{display:block;color:var(--muted);font-size:14.5px;margin-top:2px}.tag{font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);display:block;margin-bottom:4px}.grp h3{font-family:var(--mono);font-weight:500;font-size:12px;letter-spacing:.08em;text-transform:uppercase;margin:0 0 6px;color:var(--miss)}.grp.ok h3{color:var(--accent)}.grp.ok li{padding-block:6px;font-size:15px}@media(max-width:480px){.qactions .next{margin-left:0;flex:1 1 100%}.qcard{padding:16px}}.toast{position:fixed;left:50%;transform:translate(-50%);bottom:calc(var(--tabbar-h) + var(--safe-bottom) + 12px);z-index:40;max-width:min(520px,calc(100vw - 32px));padding:10px 16px;background:var(--ink);color:var(--paper);border-radius:4px;font-size:15px}@media(min-width:900px){.toast{bottom:24px}}.update-bar{position:fixed;left:50%;transform:translate(-50%);top:calc(env(safe-area-inset-top,0px) + 12px);z-index:45;display:flex;flex-wrap:wrap;align-items:center;gap:10px;width:max-content;max-width:min(520px,calc(100vw - 32px));padding:10px 12px;background:var(--panel);color:var(--ink);border:1px solid var(--rule);border-left:3px solid var(--accent);border-radius:4px;font-size:15px;box-shadow:0 4px 16px #0000001f}.pulpit-head{margin-bottom:32px}.pulpit.with-chat>.pulpit-head{margin-bottom:16px}.pulpit-head h1{font-size:34px;line-height:1.1}.pulpit-head .btn-row{align-items:center}.profile-link{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:50%;background:var(--panel);border:1px solid var(--rule);color:var(--ink);font-family:var(--display);font-weight:700;font-size:16px;text-decoration:none}.pulpit-tabs{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--rule);margin-bottom:24px}.pulpit-tab{min-height:48px;padding:0 16px;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;background:none;color:var(--muted);font-family:var(--display);font-weight:700;font-size:16px;cursor:pointer}.pulpit-tab[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent)}.pulpit-main{display:grid;gap:32px;min-width:0}.pulpit-main>.notice{margin:0}.pulpit-lists{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));gap:48px}.pulpit-lists .section-head h2{text-wrap:pretty}.pulpit-lists .when,.pulpit-lists .badge{white-space:nowrap}.pulpit-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));gap:24px}.hero{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:32px;padding:24px 32px;font-size:16px;line-height:1.5}.hero .badge{font-size:12px}.hero .btn{font-size:16px}.hero-main{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}.hero-main p{margin:0}.hero-eyebrow{color:var(--accent)}.hero-title{font-size:34px;line-height:1.1}.hero-empty-h{font-size:22px;line-height:1.2}.hero-dates .badge{margin-left:8px}.hero-stats{display:flex;flex-wrap:wrap;gap:24px;list-style:none;margin:8px 0;padding:0}.hero-stats li{display:flex;flex-direction:column}.hero-num{font-family:var(--display);font-weight:700;font-size:34px;line-height:1.1;font-variant-numeric:tabular-nums}.hero-cap{font-family:var(--mono);font-size:12px;line-height:1.4;color:var(--muted)}.hero-timeline{display:flex;flex-direction:column;gap:8px;min-width:0}.hero-rows{list-style:none;margin:0;padding:0;border-left:1px solid var(--rule)}.hero-rows li{display:flex;flex-direction:column;padding:4px 0 4px 16px}.hero-read-title{overflow-wrap:anywhere}.hero-read-meta{font-family:var(--mono);font-size:12px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}.hero-timeline p{margin:0}.hero-rows .hero-more{display:block}@media(min-width:900px){.pulpit-head h1{font-size:44px}.profile-link{display:none}}@media(max-width:1099.98px){.pulpit.with-chat:not(.czat)>.chat{display:none}.pulpit.czat{display:flex;flex-direction:column;height:calc(100dvh - 32px)}.pulpit.czat>.pulpit-head,.pulpit.czat>.pulpit-tabs{flex:none}.pulpit.czat>.pulpit-tabs{margin-bottom:0}.pulpit.czat>.pulpit-main{display:none}.pulpit.czat>.chat{flex:1 1 auto;min-height:0}.main.wide:has(>.pulpit.czat){padding-bottom:0}}@media(max-width:899.98px){.pulpit.czat{height:calc(100dvh - 16px - var(--topbar-h) - var(--tabbar-h) - var(--safe-bottom))}.main.wide:has(>.pulpit.czat){padding-bottom:calc(var(--tabbar-h) + var(--safe-bottom))}}@media(min-width:1100px){.main.wide{padding:0}.pulpit-tabs{display:none}.pulpit>.pulpit-head,.pulpit.with-chat>.pulpit-head{margin:32px 48px 0}.pulpit-main{padding:32px 48px 64px}.pulpit.with-chat{display:grid;grid-template-columns:minmax(0,1fr) clamp(340px,26vw,420px);grid-template-rows:auto 1fr}.pulpit.with-chat>.pulpit-head{grid-column:1;grid-row:1}.pulpit.with-chat>.pulpit-main{grid-column:1;grid-row:2;align-self:start}.pulpit.with-chat>.chat{--chat-bg: var(--panel);--chat-surface: var(--paper);grid-column:2;grid-row:1 / span 2;position:sticky;top:0;height:100vh;height:100dvh;align-self:start;border-left:1px solid var(--rule)}}.chat{--chat-bg: var(--paper);--chat-surface: var(--panel);display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--chat-bg);font-size:16px;line-height:1.5}.chat .notice,.chat .error-text,.chat .empty,.chat .btn,.chat .btn.small,.chat textarea,.chat input[type=text]{font-size:16px}.chat .badge{font-size:12px}.chat-head{flex:none;display:grid;gap:12px;padding:24px 16px 0;border-bottom:1px solid var(--rule);min-width:0}.chat-head-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.chat-head-name{display:grid;flex:1 1 auto;min-width:0}.chat-presence{flex:none;display:flex;align-items:center;gap:8px}.chat-presence:empty{display:none}.icon-btn{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:1px solid transparent;border-radius:6px;background:none;color:var(--ink);cursor:pointer}.icon-btn:hover{background:var(--accent-soft)}.icon-btn svg{width:22px;height:22px}.chat-back{margin-left:-12px}.chat-tabs{display:flex;gap:8px;overflow-x:auto;padding-bottom:12px;scrollbar-width:none;-webkit-overflow-scrolling:touch}.chat-tab{flex:none;min-height:44px;padding:0 16px;border:1px solid var(--rule);border-radius:999px;background:var(--chat-surface);color:var(--muted);font-family:var(--display);font-weight:700;font-size:16px;white-space:nowrap;cursor:pointer}.chat-tab[aria-selected=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}@media(min-width:1100px)and (pointer:fine){.chat-tabs{gap:4px;padding-bottom:0}.chat-tab{min-height:36px;padding:0 8px;border:0;border-bottom:2px solid transparent;border-radius:0;margin-bottom:-1px;background:none}.chat-tab[aria-selected=true]{background:none;border-bottom-color:var(--accent)}}.chat-strip{flex:none;display:flex;align-items:center;height:28px;margin:0;padding:0 16px;font-family:var(--mono);font-size:12px;line-height:1.4;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.chat-start{margin:0;font-family:var(--mono);font-size:12px;color:var(--muted);text-align:center}.chat-title{font-size:22px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-list{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px;display:flex;flex-direction:column;gap:16px}.chat-list>.msg.follow{margin-top:-12px}.chat-skeletons{display:grid;gap:8px}.chat-skeletons .skeleton{height:48px}.chat-empty{margin:auto 0}.chat-empty p{margin:0}.chat-empty .chat-empty-h{margin:0 0 8px;font-family:var(--display);font-weight:700;font-size:22px;line-height:1.2;color:var(--ink)}.chat-day{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:12px;letter-spacing:.08em;color:var(--muted)}.chat-day:before,.chat-day:after{content:"";flex:1;height:1px;background:var(--rule)}.chat-typing{flex:none;height:24px;padding:0 16px;font-style:italic;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.avatar{display:inline-grid;place-items:center;flex:none;border-radius:50%;color:var(--av-ink);font-family:var(--display);font-weight:700;line-height:1;user-select:none}.avatar.s24{width:24px;height:24px;font-size:12px}.avatar.s32{width:32px;height:32px;font-size:16px}.avatar.s44{width:44px;height:44px;font-size:16px}.avatar.me{background:var(--accent-soft);color:var(--accent)}.msg{position:relative;display:grid;grid-template-columns:32px minmax(0,1fr);column-gap:12px}.msg-gutter{display:flex;justify-content:center}.msg-content{min-width:0}.msg-head{display:flex;align-items:baseline;gap:4px;min-width:0}.msg-name{font-weight:700;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.msg-tag{flex:none;font-family:var(--mono);font-size:12px;line-height:1.4;letter-spacing:.06em;text-transform:uppercase;padding:0 4px;border:1px solid var(--rule);border-radius:3px;color:var(--muted)}.msg-tag.me{border-color:var(--accent);color:var(--accent)}.msg-time,.msg-edited{flex:none;font-family:var(--mono);font-size:12px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}.msg-gutter .msg-time{line-height:24px;visibility:hidden}.msg.follow:hover .msg-gutter .msg-time,.msg.follow:focus-within .msg-gutter .msg-time{visibility:visible}.msg-body{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.composer{flex:none;display:grid;gap:8px;padding:16px;border-top:1px solid var(--rule);background:var(--chat-bg)}.composer-label{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.composer .error-text{margin:0}.composer-field{background:var(--chat-surface);border:1px solid var(--rule);border-radius:8px}.composer-field:focus-within{border-color:var(--accent);outline:2px solid var(--accent);outline-offset:2px}.composer-field textarea{display:block;width:100%;resize:none;border:0;background:transparent;color:inherit;font:inherit;line-height:1.5;padding:12px;overflow-y:hidden}.composer-field textarea:focus-visible{outline:none}.composer-tools{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:0 8px 8px}.composer-send svg{width:18px;height:18px}.composer-send[aria-busy=true]{opacity:.7}.unread-badge,.mention-badge{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:20px;height:20px;padding:0 4px;border-radius:999px;font-family:var(--mono);font-size:12px;font-weight:400;line-height:1;letter-spacing:0;vertical-align:middle}.unread-badge{background:var(--accent);color:var(--on-accent)}.mention-badge{background:var(--accent-soft);color:var(--accent)}.chat-tab .mention-badge,.chat-tab .unread-badge,.pulpit-tab .unread-badge{margin-left:8px}.chat-tab .mention-badge+.unread-badge{margin-left:4px}.sidebar nav a .nav-badge{margin-left:auto}.nav-icon{position:relative;display:inline-flex}.nav-dot{position:absolute;top:-2px;right:-2px;width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--panel)}.chat-list-wrap{position:relative;flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.chat-older{flex:none;min-height:1px;text-align:center}.chat-older p{margin:0}.chat-new{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent)}.chat-new:before{content:"";flex:1;height:1px;background:var(--accent)}.chat-jump{position:absolute;bottom:16px;left:50%;z-index:1;transform:translate(-50%);gap:4px;background:var(--chat-surface);white-space:nowrap}.chat-jump svg{width:18px;height:18px}@media(prefers-reduced-motion:reduce){.chat-list{scroll-behavior:auto}}.presence-stack{display:inline-flex;align-items:center}.presence-stack .avatar{box-shadow:0 0 0 2px var(--chat-bg)}.presence-stack .avatar+.avatar{margin-left:-8px}.presence-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--accent)}.presence-text{font-family:var(--mono);font-size:12px;line-height:1.4;color:var(--muted);white-space:nowrap}.dm-list{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}.dm-new{padding:16px}.dm-new .btn svg{width:18px;height:18px}.dm-skeletons{padding:0 16px}.dm-skeletons .skeleton{height:64px}.dm-notice,.dm-empty{margin:0 16px}.dm-rows{list-style:none;margin:0;padding:0;border-top:1px solid var(--rule)}.dm-rows li{border-bottom:1px solid var(--rule)}.dm-row{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:8px 16px;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.dm-row:hover{background:var(--chat-surface)}.dm-text{display:grid;flex:1 1 auto;min-width:0}.dm-name,.dm-preview{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dm-row.unread .dm-name{font-weight:700}.dm-preview{color:var(--muted)}.dm-meta{flex:none;display:grid;justify-items:end;gap:4px;font-family:var(--mono);font-size:12px;color:var(--muted)}.chat-dialog{width:min(520px,calc(100vw - 32px));max-height:70vh;padding:24px;border:1px solid var(--rule);border-radius:8px;background:var(--panel);color:var(--ink);font-size:16px;line-height:1.5}.chat-dialog::backdrop{background:#0006}.chat-dialog[open]{display:flex;flex-direction:column}.chat-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px}.chat-dialog-title{font-size:22px;line-height:1.2}.chat-dialog input[type=text]{font-size:16px;background:var(--paper)}.chat-dialog .error-text,.chat-dialog .notice,.chat-dialog .empty{font-size:16px}.chat-dialog .error-text{margin:0 0 8px}.picker-results{flex:1 1 auto;min-height:0;overflow-y:auto}.picker-skeletons .skeleton{height:48px}.picker-rows{list-style:none;margin:0;padding:0}.picker-row{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:4px 8px;border:0;border-radius:6px;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.picker-row:hover:not(:disabled){background:var(--accent-soft)}.picker-row:disabled{opacity:.7;cursor:default}.picker-name{min-width:0;overflow-wrap:anywhere}@media(max-width:899.98px){.chat-dialog{width:100dvw;max-width:none;height:100dvh;max-height:none;margin:0;border-radius:0}}.composer-row{display:flex;align-items:flex-end;gap:8px}.composer-row>.composer-field{flex:1 1 auto;min-width:0}.composer.compact .composer-field{border-radius:22px}.composer.compact .composer-field:focus-within{outline-offset:0}.composer.compact .composer-field textarea{min-height:42px;padding:9px 16px}.composer-send.round{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:var(--accent);color:var(--on-accent);cursor:pointer}.composer-send.round:disabled{opacity:.4;cursor:default}.composer-send.round[aria-busy=true]{opacity:.7}.composer-send.round svg{width:22px;height:22px}@media(hover:none){.chat .btn.small,.dm-new .btn{min-height:44px}}.reactions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}.reaction-chip,.reaction-add{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 8px;border:1px solid var(--rule);border-radius:999px;background:var(--chat-surface);color:var(--ink);font:inherit;cursor:pointer}.reaction-emoji{font-size:16px;line-height:1}.reaction-count{font-family:var(--mono);font-size:12px;line-height:1.4;color:var(--muted);font-variant-numeric:tabular-nums}.reaction-chip[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent)}.reaction-chip[aria-pressed=true] .reaction-count{color:var(--accent)}.reaction-chip:hover{border-color:var(--accent)}.reaction-add{justify-content:center;width:28px;padding:0;border-style:dashed;color:var(--muted)}.reaction-add:disabled{opacity:.4;cursor:default}.reaction-add svg{width:16px;height:16px}.reaction-add-wrap{position:relative;display:inline-flex}.reaction-pop{position:absolute;z-index:5;bottom:calc(100% + 4px);left:0;display:grid;grid-template-columns:repeat(6,36px);gap:4px;padding:8px;border:1px solid var(--rule);border-radius:6px;background:var(--panel);box-shadow:0 4px 16px #0000001f}.reaction-pop.below{top:calc(100% + 4px);bottom:auto}.reaction-pick{display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:6px;background:none;font-size:20px;line-height:1;cursor:pointer}.reaction-pick:hover,.reaction-pick:focus-visible{background:var(--accent-soft)}.msg-actions{position:absolute;z-index:4;top:-16px;right:0;display:flex;gap:2px;padding:2px;border:1px solid var(--rule);border-radius:6px;background:var(--chat-surface);opacity:0;pointer-events:none}.msg:focus-within>.msg-actions,.msg.actions-open>.msg-actions{opacity:1;pointer-events:auto}@media(hover:hover){.msg:hover>.msg-actions{opacity:1;pointer-events:auto}}.msg-action{display:inline-grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:4px;background:none;color:var(--ink);cursor:pointer}.msg-action:hover:not(:disabled){background:var(--accent-soft)}.msg-action:disabled{opacity:.4;cursor:default}.msg-action svg{width:18px;height:18px}.msg-action.miss{color:var(--miss)}@media(hover:none){.reaction-chip,.reaction-add{min-height:44px}.reaction-add{min-width:44px}.msg-action{width:44px;height:44px}.msg-actions{top:-24px}}.msg-body.prose a{overflow-wrap:anywhere}.msg-body.prose code{font-size:.9em}.mention{padding:0 4px;border-radius:3px;background:var(--accent-soft);color:var(--accent);white-space:nowrap}.msg.mentions-me{box-shadow:inset 3px 0 0 var(--accent);margin-left:-16px;padding-left:16px}.composer-field{position:relative}.composer-tools-gap{flex:1 1 auto}.composer-tool{display:inline-grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:6px;background:none;color:var(--muted);cursor:pointer}.composer-tool:hover:not(:disabled){background:var(--accent-soft);color:var(--ink)}.composer-tool:disabled{opacity:.4;cursor:default}.composer-tool svg{width:20px;height:20px}.mention-pop{position:absolute;z-index:6;bottom:calc(100% + 4px);left:0;width:100%;max-width:360px;margin:0;padding:4px;list-style:none;border:1px solid var(--rule);border-radius:6px;background:var(--panel);box-shadow:0 4px 16px #0000001f}.mention-option,.mention-empty{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 8px;border-radius:4px}.mention-option{cursor:pointer}.mention-option.active{background:var(--accent-soft)}.mention-empty{color:var(--muted)}.mention-name{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mention-handle{flex:none;margin-left:auto;font-family:var(--mono);font-size:12px;color:var(--muted)}.share-field{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-height:44px;padding:4px 8px;border:1px solid var(--rule);border-radius:3px;background:var(--panel);cursor:text}.share-field:focus-within{outline:2px solid var(--accent);outline-offset:0;border-color:var(--accent)}.share-chips{display:flex;flex-wrap:wrap;gap:4px;min-width:0;max-width:100%;margin:0;padding:0;list-style:none}.share-chip{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%;min-height:32px;padding:0 4px 0 8px;border:1px solid var(--rule);border-radius:999px;background:var(--panel);color:var(--ink);font-family:var(--display);font-size:14.5px;font-weight:600;cursor:default}.share-chip-label{max-width:240px;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.share-chip-remove{display:inline-flex;flex:none;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:999px;background:none;color:var(--muted);cursor:pointer}.share-chip-remove:hover{color:var(--ink)}.share-chip-remove:focus-visible{outline:2px solid var(--accent);outline-offset:0}.share-chip-remove svg{width:16px;height:16px}.share-field .share-input{flex:1 1 160px;width:auto;min-width:120px;min-height:32px;padding:0;border:0;background:none}.share-field .share-input:focus-visible{outline:none}.share-pop{position:absolute;z-index:6;top:calc(100% + 4px);left:0;width:100%;max-width:420px;margin:0;padding:4px;list-style:none;border:1px solid var(--rule);border-radius:6px;background:var(--panel);box-shadow:0 4px 16px #0000001f}.share-option{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 8px;border-radius:4px;cursor:pointer}.share-option.active{background:var(--accent-soft)}.share-option.share-empty{color:var(--muted);cursor:default}.share-option-name{min-width:0;overflow:hidden;font-family:var(--body);font-size:17px;white-space:nowrap;text-overflow:ellipsis}.share-option-email{min-width:0;margin-left:auto;overflow:hidden;font-family:var(--mono);font-size:14.5px;color:var(--muted);white-space:nowrap;text-overflow:ellipsis}.share-none{margin:0}.msg-edit{display:grid;gap:8px;margin-top:4px}.msg-edit .error-text{margin:0}.msg-edit .btn[aria-busy=true]{opacity:.7}.msg-deleted{margin:0;font-style:italic;color:var(--muted)}.chat-dialog.chat-confirm{width:auto;max-width:min(420px,calc(100vw - 32px));height:auto;max-height:none;margin:auto;border-radius:8px}.chat-confirm-body{margin:12px 0 16px}.chat-confirm .error-text{margin:0 0 16px}.chat-confirm-buttons .btn{min-height:44px}.btn.danger{border-color:var(--miss);background:var(--miss);color:var(--paper)}.btn.danger:hover:not(:disabled){filter:brightness(1.08);background:var(--miss)}.btn.danger[aria-busy=true]{opacity:.7}.msg-embeds{display:grid;gap:8px;margin-top:8px}.embed-card{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:8px 12px;border:1px solid var(--rule);border-radius:6px;background:var(--chat-surface, var(--panel));color:var(--ink);text-decoration:none}a.embed-card:hover{border-color:var(--accent)}.embed-card.unavailable{border-style:dashed}.embed-main{display:grid;flex:1 1 auto;min-width:0}.embed-type{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.embed-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:16px;font-weight:700;line-height:1.5;overflow-wrap:anywhere}.embed-card.unavailable .embed-title{font-weight:400;color:var(--muted)}.embed-meta{overflow:hidden;font-family:var(--mono);font-size:12px;line-height:1.5;color:var(--muted);white-space:nowrap;text-overflow:ellipsis}.embed-card .badge{flex:none;font-size:12px}.embed-skeleton{display:block;width:60%;height:16px;margin:4px 0}.embed-tabs{display:flex;gap:4px;margin-bottom:16px;border-bottom:1px solid var(--rule)}.embed-tab{min-height:44px;padding:0 12px;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;background:none;color:var(--muted);font-family:var(--display);font-weight:700;font-size:16px;cursor:pointer}.embed-tab[aria-selected=true]{border-bottom-color:var(--accent);color:var(--accent)}.embed-panel{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}.embed-searching{margin:0 0 8px;font-family:var(--mono);font-size:12px;color:var(--muted)}.picker-rows li+li{margin-top:8px}.picker-row.embed-pick{display:grid;gap:4px;padding:0}.picker-row.embed-pick:hover:not([aria-disabled=true]){background:none}.picker-row.embed-pick:hover:not([aria-disabled=true]) .embed-card{border-color:var(--accent)}.picker-row.embed-pick[aria-disabled=true]{cursor:default;opacity:.7}.embed-staged{font-family:var(--mono);font-size:12px;color:var(--accent)}.staging{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:8px 8px 0;list-style:none}.composer.compact>.staging{padding:0}.staging-chip{position:relative;display:inline-flex;align-items:center;gap:8px;max-width:100%;height:32px;padding-left:8px;border-radius:6px;background:var(--chat-bg, var(--paper));font-size:16px}.composer.compact>.staging .staging-chip{background:var(--chat-surface, var(--panel))}.staging-type,.staging-size{flex:none;font-family:var(--mono);font-size:12px;color:var(--muted)}.staging-type{text-transform:uppercase;letter-spacing:.06em}.staging-name{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.staging-name.embed-name{max-width:240px}.staging-remove{display:inline-grid;place-items:center;flex:none;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:none;color:var(--muted);cursor:pointer}.staging-remove:hover:not(:disabled){color:var(--ink);background:var(--accent-soft)}.staging-remove svg{width:16px;height:16px}:target,.hash-target{scroll-margin-top:12px;animation:target-fade 2s ease-out}@keyframes target-fade{0%{background-color:var(--accent-soft)}to{background-color:transparent}}@media(prefers-reduced-motion:reduce){:target,.hash-target{animation:none}.hash-target{background-color:var(--accent-soft)}}.msg-files{display:grid;gap:8px;margin:8px 0 0;padding:0;list-style:none}.msg-file{display:flex;align-items:center;gap:8px;width:100%;max-width:480px;min-height:44px;padding:0 12px;border:1px solid var(--rule);border-radius:6px;background:var(--chat-surface, var(--panel));color:var(--ink);font:inherit;text-align:left;cursor:pointer}.msg-file:hover{border-color:var(--accent)}.msg-file[aria-busy=true]{opacity:.7;cursor:progress}.msg-file svg{flex:none;width:20px;height:20px;color:var(--muted)}.msg-file-name{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.msg-file-size{flex:none;font-family:var(--mono);font-size:12px;color:var(--muted)}.staging-name.file-name{max-width:200px}.staging-failed{flex:none;font-size:12px;font-family:var(--mono);color:var(--miss)}.staging-chip .linkish{flex:none;font-size:12px}.staging-progress{position:absolute;left:0;bottom:0;height:2px;border-radius:0 0 0 6px;background:var(--accent);transition:width .2s linear}@media(prefers-reduced-motion:reduce){.staging-progress{transition:none}}.composer-add{position:relative;flex:none}.composer-plus{display:inline-grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid var(--rule);border-radius:50%;background:var(--chat-surface, var(--panel));color:var(--ink);cursor:pointer}.composer-plus[aria-expanded=true]{border-color:var(--accent);color:var(--accent)}.composer-plus:disabled{opacity:.4;cursor:default}.composer-plus svg{width:22px;height:22px}.composer-menu{position:absolute;left:0;bottom:calc(100% + 8px);z-index:5;display:grid;min-width:280px;max-width:calc(100vw - 32px);padding:4px;border:1px solid var(--rule);border-radius:6px;background:var(--panel);box-shadow:0 4px 16px #0000001f}.composer-menu-item{display:flex;align-items:center;gap:12px;min-height:44px;padding:0 12px;border:0;border-radius:6px;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer}.composer-menu-item:hover:not(:disabled),.composer-menu-item:focus-visible{background:var(--accent-soft)}.composer-menu-item:disabled{opacity:.5;cursor:default}.composer-menu-item svg{flex:none;width:20px;height:20px}@page{margin:16mm 14mm}@page app{size:auto;margin:16mm 14mm}@media print{:root:not(.deck-public):not(.deck-speaker){color-scheme:light;--paper: #fff;--panel: #fff;--ink: #000;--muted: #444;--rule: #bbb;--accent: #1f4a3b;--accent-soft: #fff;--on-accent: #fff;--miss: #7a3218;--miss-soft: #fff;--warn: #5c3d00;--warn-rule: #bbb}.shell{display:block;min-height:0;page:app}.main,.main.wide{padding:0!important;width:auto}.pulpit.czat{height:auto}.shell .sidebar,.shell .topbar,.shell .tabbar,.theme-toggle,.shell .toast,.shell .update-bar,.shell .btn,.shell .icon-btn,.pulpit-tabs,.pulpit>.chat{display:none!important}.shell a.btn[href^=http]{display:inline!important;min-height:0;padding:0;border:0;background:none;color:var(--ink);font:inherit;text-decoration:underline}.shell a.btn[href^=http]:after{content:" (" attr(href) ")"}.shell a{color:var(--ink);text-decoration:underline}.prose a[href^=http]:after{content:" (" attr(href) ")";color:var(--muted);font-size:.85em;overflow-wrap:anywhere}.shell *{box-shadow:none!important;text-shadow:none!important}.shell .card:not(.prose),.shell .rows>li,.prose pre,.prose blockquote,.prose table,.prose figure,.prose img{break-inside:avoid}.shell h1,.shell h2,.shell h3{break-after:avoid}.prose p,.prose li{orphans:3;widows:3}.prose.card{padding:0;border:0;background:none}}@media print{.no-print{display:none!important}} diff --git a/public/assets/markdown-CbtkjRI4.js b/public/assets/markdown-CbtkjRI4.js deleted file mode 100644 index ab109fc..0000000 --- a/public/assets/markdown-CbtkjRI4.js +++ /dev/null @@ -1,6 +0,0 @@ -const m={"&":"&","<":"<",">":">",'"':""","'":"'"};function h(o){return o.replace(/[&<>"']/g,t=>m[t])}function x(o){const t=o.trim().replace(/[\u0000-\u001f\u007f\s]+/g,"");return/^https?:\/\/[^/]/i.test(t)||/^mailto:[^\s]+$/i.test(t)||/^\/(?![/\\])/.test(t)||t.startsWith("#")?t:null}function f(o){const t=[],r=i=>i.replace(/\u0000(\d+)\u0000/g,(s,l)=>t[Number(l)]??""),e=i=>`\0${t.push(r(i))-1}\0`;let c=o.replace(/\u0000/g,"");return c=c.replace(/`([^`\n]+)`/g,(i,s)=>e(`${h(s)}`)),c=c.replace(/\[([^\]\n]+)\]\(([^()\s]*(?:\([^()\s]*\)[^()\s]*)*)\)/g,(i,s,l)=>{if(l.includes("\0"))return i;const u=x(l),a=d(h(s));if(!u)return e(a);const p=/^https?:/i.test(u)?' target="_blank" rel="noopener noreferrer nofollow"':"";return e(`${a}`)}),c=d(h(c)),r(c)}function d(o){return o.replace(/\*\*([^*\n]+)\*\*/g,"$1").replace(/(^|[\s(])\*([^*\n]+)\*(?=$|[\s).,;:!?])/g,"$1$2").replace(/(^|[\s(])_([^_\n]+)_(?=$|[\s).,;:!?])/g,"$1$2")}function w(o){if(!o)return"";const t=o.replace(/\r\n?/g,` -`).split(` -`),r=[];let e=0;const c=s=>s.trim()==="",i=s=>/^(#{1,6})\s/.test(s)||/^```/.test(s)||/^>\s?/.test(s)||/^\s*([-*+]|\d+[.)])\s+/.test(s)||/^(-{3,}|\*{3,}|_{3,})\s*$/.test(s);for(;e${h(n.join(` -`))}`);continue}const l=/^(#{1,6})\s+(.*?)\s*#*\s*$/.exec(s);if(l){const n=Math.min(l[1].length+1,6);r.push(`${f(l[2])}`),e++;continue}if(/^(-{3,}|\*{3,}|_{3,})\s*$/.test(s)){r.push("
"),e++;continue}if(/^>\s?/.test(s)){const n=[];for(;e\s?/.test(t[e]);)n.push(t[e++].replace(/^>\s?/,""));r.push(`
${w(n.join(` -`))}
`);continue}const u=/^\s*([-*+]|\d+[.)])\s+(.*)$/.exec(s);if(u){const n=/\d/.test(u[1]),p=[];for(;e${f(g)}`)}r.push(n?`
    ${p.join("")}
`:`
    ${p.join("")}
`);continue}const a=[s];for(e++;e${a.map(n=>f(n.trim())).join(" ")}

`)}return r.join(` -`)}export{h as e,d as f,w as r,x as s}; diff --git a/public/assets/markdown-DEWb_HMw.js b/public/assets/markdown-DEWb_HMw.js new file mode 100644 index 0000000..5214905 --- /dev/null +++ b/public/assets/markdown-DEWb_HMw.js @@ -0,0 +1,20 @@ +var po=Object.defineProperty;var mo=(e,t,n)=>t in e?po(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>mo(e,typeof t!="symbol"?t+"":t,n);import{d as _o,n as nn,c as rn,e as xt,b as Ke,t as Je,aP as go,p as bo,f as cr,C as on,X as ko,r as Dt,Z as Ro}from"./index-BhVKyY57.js";import{s as Ao}from"./safeText-O-oWGdGq.js";const Co=["aria-labelledby","aria-describedby"],xo=["id"],Do=["id"],Eo={key:0,class:"error-text",role:"alert"},vo={class:"btn-row chat-confirm-buttons"},wo=["aria-busy","disabled"],yo=["disabled"],To=["disabled"],Wl=_o({__name:"ConfirmDialog",props:{title:{},body:{default:""},confirmLabel:{},cancelLabel:{},extraLabel:{default:""},tone:{default:"neutral"},cancelClass:{default:"btn ghost"},extraClass:{default:"btn ghost"}},setup(e,{expose:t}){const n=e,i=ko(),r=Dt(null),o=Dt(null),s=Dt(!1),u=Dt("");let a=null,c,d="cancel",p=null;function k(x={}){return p?.("cancel"),c=x.action,d="cancel",u.value="",s.value=!1,a=x.from??(document.activeElement instanceof HTMLElement?document.activeElement:null),r.value?.open||r.value?.showModal(),Ro(()=>o.value?.focus()),new Promise(C=>{p=C})}function m(x){d=x,r.value?.close()}function h(x){s.value&&x.preventDefault()}function T(){a?.isConnected&&a.focus(),a=null,c=void 0,s.value=!1;const x=p;p=null,x?.(d)}function A(x){x.target===r.value&&!s.value&&m("cancel")}async function D(){if(!s.value){if(!c){m("confirm");return}s.value=!0,u.value="";try{await c()}catch(x){s.value=!1,u.value=x instanceof Error?x.message:String(x);return}s.value=!1,m("confirm")}}return t({open:k}),(x,C)=>(nn(),rn("dialog",{ref_key:"dialog",ref:r,class:"chat-dialog chat-confirm confirm-dialog","aria-labelledby":`confirm-h-${xt(i)}`,"aria-describedby":`confirm-b-${xt(i)}`,onCancel:h,onClose:T,onClick:A},[Ke("h2",{id:`confirm-h-${xt(i)}`,class:"chat-dialog-title"},Je(n.title),9,xo),Ke("p",{id:`confirm-b-${xt(i)}`,class:"chat-confirm-body"},[go(x.$slots,"default",{},()=>[bo(Je(n.body),1)])],8,Do),u.value?(nn(),rn("p",Eo,Je(u.value),1)):cr("",!0),Ke("div",vo,[Ke("button",{class:on(["btn",{danger:n.tone==="danger"}]),type:"button","aria-busy":s.value?"true":void 0,disabled:s.value,onClick:D},Je(n.confirmLabel),11,wo),n.extraLabel?(nn(),rn("button",{key:0,class:on(n.extraClass),type:"button",disabled:s.value,onClick:C[0]||(C[0]=R=>m("extra"))},Je(n.extraLabel),11,yo)):cr("",!0),Ke("button",{ref_key:"cancelBtn",ref:o,class:on(n.cancelClass),type:"button",disabled:s.value,onClick:C[1]||(C[1]=R=>m("cancel"))},Je(n.cancelLabel),11,To)])],40,Co))}}),fr={};function Fo(e){let t=fr[e];if(t)return t;t=fr[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);t.push(i)}for(let n=0;n=55296&&d<=57343?r+="���":r+=String.fromCharCode(d),o+=6;continue}}if((u&248)===240&&o+91114111?r+="����":(p-=65536,r+=String.fromCharCode(55296+(p>>10),56320+(p&1023))),o+=9;continue}}r+="�"}return r})}He.defaultChars=";/?:@&=+$,#";He.componentChars="";const hr={};function So(e){let t=hr[e];if(t)return t;t=hr[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const i=So(t);let r="";for(let o=0,s=e.length;o=55296&&u<=57343){if(u>=55296&&u<=56319&&o+1=56320&&a<=57343){r+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}r+="%EF%BF%BD";continue}r+=encodeURIComponent(e[o])}return r}Re.defaultChars=";/?:@&=+$,-_.!~*'()#";Re.componentChars="-_.!~*'()";function Dn(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Tt(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const Io=/^([a-z0-9.+-]+:)/i,Bo=/:[0-9]*$/,Lo=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Oo=["<",">",'"',"`"," ","\r",` +`," "],zo=["{","}","|","\\","^","`"].concat(Oo),Mo=["'"].concat(zo),pr=["%","/","?",";","#"].concat(Mo),dr=["/","?","#"],No=255,mr=/^[+a-z0-9A-Z_-]{0,63}$/,Po=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_r={javascript:!0,"javascript:":!0},gr={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function En(e,t){if(e&&e instanceof Tt)return e;const n=new Tt;return n.parse(e,t),n}Tt.prototype.parse=function(e,t){let n,i,r,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const c=Lo.exec(o);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=Io.exec(o);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,o=o.substr(s.length)),(t||s||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(r=o.substr(0,2)==="//",r&&!(s&&_r[s])&&(o=o.substr(2),this.slashes=!0)),!_r[s]&&(r||s&&!gr[s])){let c=-1;for(let h=0;h127?x+="x":x+=D[C];if(!x.match(mr)){const C=h.slice(0,T),R=h.slice(T+1),E=D.match(Po);E&&(C.push(E[1]),R.unshift(E[2])),R.length&&(o=R.join(".")+o),this.hostname=C.join(".");break}}}}this.hostname.length>No&&(this.hostname=""),m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const u=o.indexOf("#");u!==-1&&(this.hash=o.substr(u),o=o.slice(0,u));const a=o.indexOf("?");return a!==-1&&(this.search=o.substr(a),o=o.slice(0,a)),o&&(this.pathname=o),gr[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Tt.prototype.parseHost=function(e){let t=Bo.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const jo=Object.freeze(Object.defineProperty({__proto__:null,decode:He,encode:Re,format:Dn,parse:En},Symbol.toStringTag,{value:"Module"})),Vr=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Kr=/[\0-\x1F\x7F-\x9F]/,Uo=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Fn=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,Qr=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/,ei=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Jo=Object.freeze(Object.defineProperty({__proto__:null,Any:Vr,Cc:Kr,Cf:Uo,P:Fn,S:Qr,Z:ei},Symbol.toStringTag,{value:"Module"})),Wo=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function $o(e){return e===0||e>=55296&&e<=57343||e>1114111}function qo(e){return $o(e)?65533:e>=128&&e<=159&&Wo[e-128]||e}function Ho(e){return e-1>>>0<127||e-160>>>0<55136?String.fromCharCode(e):String.fromCodePoint(qo(e))}const ae=(()=>{const e=new Uint8Array(127);let t=0;for(let n=33;n<=126;n++)n!==34&&n!==36&&n!==92&&(e[n]=t++);return e})();function Zo(e,t,n,i,r,o){const u=e.length,a=o*90;let c=0;const d=()=>{const L=ae[e.charCodeAt(c++)];return L=o&&(L=L*91-a+ae[e.charCodeAt(c++)]);const j=m[L];if(j<0){let I=h[L];const N=I+T[L];for(;I%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37w+vu9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a06Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:96Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2vyRgNj8w)v86Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|icQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf3Ds}KvGB)_6Vyk2sM=6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;RmRm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQRmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.>bU{0j9udv:Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_gg5u-rqJvy'!@9RkQcH(T#=>Ri~@Ri}@2@@=aybb}XjWv0Q~EfEj3vLv;5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=!|l=w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8waiL2b`{QJv*_Ouv2qgjZa&!*UaA=2Wls3cH#T(@Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@Ri{cNu+vlax-!(#a0qa9aY?C9:9au@9Cb]}9cl#U*5;5KqRlR=c>Z,k#u3vWs@u2]krvgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9Awwn;;Rn=c:Z'ARn<=Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(XaRn7Jw0!&>Rn5>Rn9Lunw?&a2!,5ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Shx'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUgA9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8uuq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{NaU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#cB{/T#=ayaL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[gJvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`aRfk=ayb^}4~Ad1#`*@@=aybb{w2@>==KqRlT=c>Z,k#u3vWs@u2]kqReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJRkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}wRn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']ox7gL#TzuwjirRipcon;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJRn1~?rOc:Z&Rn2=w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUgw*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!bRhG<7@C5vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2!a)-g>>ti;return t===vn?ni:t}function Vo(e){return e-oe.ZERO>>>0<=9}function Ko(e){return(e|Ft)-oe.LOWER_A>>>0<=5}function Qo(e){return(e|Ft)-oe.LOWER_A>>>0<=25}var br;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(br||(br={}));var kr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(kr||(kr={}));function es(e,t,n,i){const r=(t&X.BRANCH_LENGTH)>>7,o=t&X.JUMP_TABLE;if(o){if(r===0)return i===o?n:-1;const a=i-o;if(a>>>0>=r)return-1;const c=e[n+a];return c===0?-1:n+r+c-1&65535}if(r===0)return-1;const s=r+1>>1,u=n+s+r;for(let a=0;a>1)]>>((a&1)<<3)&255;if(d===i){const p=n+s+a;return u+e[p]&65535}if(d>i)return-1}return-1}function Rr(e,t,n){return n===1?String.fromCharCode(e[t]&X.VALUE_MASK):n===2?String.fromCharCode(e[t+1]):String.fromCharCode(e[t+1],e[t+2])}function ts(e,t,n){let i=t+1,r=0,o=i;if(i>>0>9)break;r=r*10+u,i+=1}if(i===o)return 0;i1114111&&(r=1114112);let s=i-t;return s>=vn&&(ni=s,s=vn),s<>7;do{const p=r+1,k=e.charCodeAt(p);let m,h;if(k===oe.NUM){const T=ts(e,p,o);m=Go(T),m>0&&e.charCodeAt(p+m-1)!==oe.SEMI&&(m=0),h=m===0?"":Ho(T&Xo)}else if(Qo(k)){m=0,h="";const T=k-c;let A;if(T>>>0>7;if(L===0){if(e.charCodeAt(R)!==z)break e;A+=1}else{const j=e.charCodeAt(R)-z;if(j>>>0>=L)break e;const I=i[A+1+j];if(I===0)break e;A=A+L+I&65535}if(C=i[A],R+=1,R>=o)break e}if((C&(X.VALUE_LENGTH|X.FLAG13))===X.FLAG13){const z=(C&X.BRANCH_LENGTH)>>7;if(e.charCodeAt(R)!==(C&X.JUMP_TABLE))break;R+=1;const L=z-1;let j=A+1,I=0;for(;I+1>8&255)))break e;R+=1,j+=1}if(I>1),C=i[A];continue}const E=C>>>14,w=e.charCodeAt(R);if(E!==0){if(w===oe.SEMI){m=R-p+1,h=E===1?String.fromCharCode(C&X.VALUE_MASK):Rr(i,A,E);break}if(E===1)break}const S=es(i,C,A+(E||1),w);if(S<0)break;A=S,C=i[A],R+=1}h===""&&m>0&&(h=Rr(i,D,x))}else m=0,h="";m===0||n?r=p:(s=0);return u+e.slice(s)}function ri(e){return ns(e,!0,!1)}var rs=class{constructor(e={}){Y(this,"src_Any",Vr.source);Y(this,"src_Cc",Kr.source);Y(this,"src_Z",ei.source);Y(this,"src_P",Fn.source);Y(this,"src_ZPCc",[this.src_Z,this.src_P,this.src_Cc].join("|"));Y(this,"src_ZCc",[this.src_Z,this.src_Cc].join("|"));Y(this,"cache",{});Y(this,"opts",{maxLength:1e4,urlAuth:!1,schema_names:[]});this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){const i=this.escapeRE(e),r=this.escapeRE(t),o=`(?:(?!${this.src_ZCc}|${i}|${r}).)`;let s=`${i}${o}{0,1000}${r}`;for(let u=2;u<=n;u++)s=`${i}(?:${o}|${s}){0,1000}${r}`;return s}get_text_separators(){var e;return(e=this.cache).text_separators??(e.text_separators=/[><\uff5c]/)}get_pseudo_letter(){var e;return(e=this.cache).src_pseudo_letter??(e.src_pseudo_letter=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`))}get_ipv4_addr(){var e;return(e=this.cache).src_ip4??(e.src_ip4=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])"))}get_ipv6_addr(){var n;const e="[0-9A-Fa-f]{1,4}",t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return(n=this.cache).src_ip6_addr??(n.src_ip6_addr=new RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`))}get_ipv6_url_host(){var e;return(e=this.cache).src_ip6_host??(e.src_ip6_host=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`))}get_ipv6_mail_host(){var e;return(e=this.cache).src_ipv6_mail_host??(e.src_ipv6_mail_host=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`))}get_auth(){var e;return(e=this.cache).src_auth??(e.src_auth=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`))}get_port(){var e;return(e=this.cache).src_port??(e.src_port=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?"))}get_host_terminator(){var e;return(e=this.cache).src_host_terminator??(e.src_host_terminator=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`))}get_path_terminator(){var e;return(e=this.cache).src_path_terminator??(e.src_path_terminator=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`))}get_path(){var e;return(e=this.cache).src_path??(e.src_path=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`))}get_mail_name(){var e;return(e=this.cache).src_mail_name??(e.src_mail_name=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}"))}get_xn(){var e;return(e=this.cache).src_xn??(e.src_xn=new RegExp("xn--[a-z0-9\\-]{1,59}"))}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){var e;return(e=this.cache).src_domain_root??(e.src_domain_root=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`))}get_domain(){var e;return(e=this.cache).src_domain??(e.src_domain=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`))}get_url_host_port(){var e;return(e=this.cache).url_host_port??(e.url_host_port=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source))}get_fuzzy_url_host_port(){var e;return(e=this.cache).fuzzy_url_host_port??(e.fuzzy_url_host_port=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source))}get_mail_host(){var e;return(e=this.cache).src_mail_host??(e.src_mail_host=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source))}get_fuzzy_mail_host(){var e;return(e=this.cache).src_fuzzy_mail_host??(e.src_fuzzy_mail_host=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source))}get_path_extra(){var e;return(e=this.cache).src_path_extra??(e.src_path_extra=new RegExp(""))}get_fuzzy_mail_host_search(){var e;return(e=this.cache).mail_fuzzy_host_search??(e.mail_fuzzy_host_search=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig"))}get_fuzzy_link_search(){var e;return(e=this.cache).link_fuzzy_search??(e.link_fuzzy_search=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig"))}get_http_validator(){var e;return(e=this.cache).http_validator??(e.http_validator=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy"))}get_relative_proto_validator(){var e;return(e=this.cache).relative_proto_validator??(e.relative_proto_validator=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy"))}get_mail_name_validator(){var e;return(e=this.cache).mail_name_validator??(e.mail_name_validator=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`))}get_mailto_validator(){var e;return(e=this.cache).mailto_validator??(e.mailto_validator=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy"))}get_schema_names(){var e;return(e=this.cache).schema_names??(e.schema_names=new RegExp((this.opts.schema_names||[]).map(t=>this.escapeRE(t)).join("|")))}get_schema_search(){var e;return(e=this.cache).schema_search??(e.schema_search=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig"))}get_schema_at_start(){var e;return(e=this.cache).schema_at_start??(e.schema_at_start=new RegExp(`^${this.get_schema_search().source}`,"i"))}},sn={validate:(e,t,n)=>{const i=n.re.get_http_validator();i.lastIndex=t;const r=i.exec(e);return r?r[0].length:0},normalize:(e,t)=>t.normalize(e)},is={"http:":sn,"https:":sn,"ftp:":sn,"//":{validate:function(e,t,n){const i=n.re.get_relative_proto_validator();i.lastIndex=t;const r=i.exec(e);return r?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){const i=n.re.get_mailto_validator();i.lastIndex=t;const r=i.exec(e);return r?r[0].length:0},normalize:(e,t)=>t.normalize(e)}},os="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",ss="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function us(){const e=ss.split("|");return os.split("|").forEach(t=>{const n=t.indexOf(":"),i=t.slice(0,n);for(const r of t.slice(n+1))e.push(i+r)}),e}var ls={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:us(),urlAuth:!1,maxLength:1e4},Ar=class{constructor(e,t,n,i){Y(this,"schema");Y(this,"index");Y(this,"lastIndex");Y(this,"raw");Y(this,"text");Y(this,"url");const r=e.slice(n,i);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=i,this.raw=r,this.text=r,this.url=r}},as=class{constructor(e={}){Y(this,"__opts__");Y(this,"__schemas__");Y(this,"re");const{rebuilder:t,...n}=e;this.__opts__={...ls,...n},this.__schemas__={...is},this.re=t||new rs,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{const n={normalize:(i,r)=>r.normalize(i),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;for(n=this.re.get_schema_search(),n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const i=this.re.get_fuzzy_mail_host_search(),r=this.re.get_mail_name_validator();for(i.lastIndex=0;(t=i.exec(e))!==null;){const o=e.slice(Math.max(0,t.index-65),t.index);if(r.test(o))return!0}}return!1}testSchemaAt(e,t,n){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this):0}match(e){const t=[],n=this.re.get_schema_search();let i,r,o,s,u,a,c=!1,d=!1,p=!1,k=0;if(!e.length)return null;for(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(r=this.re.get_fuzzy_mail_host_search(),r.lastIndex=0,o=this.re.get_mail_name_validator());;){const m=Math.max(k-1,0);if(r&&o&&!p&&(!u||u.index=k)break;r.lastIndex=k)break;i.lastIndexh.lastIndex))&&(h=s);let T;if(!c)for(;;){if(!a){n.lastIndexh.index)break;const x=a;a=void 0;const C=this.testSchemaAt(e,x.schema,x.lastIndex);if(C){T={schema:x.schema,index:x.index,lastIndex:x.lastIndex+C};break}}let A=T;if((!A||u&&(u.indexA.lastIndex))&&(A=u),(!A||s&&(s.indexA.lastIndex))&&(A=s),!A)break;A===u?u=void 0:A===s&&(s=void 0);const D=new Ar(e,A.schema,A.index,A.lastIndex);D.schema?this.__schemas__[D.schema].normalize(D,this):this.normalize(D),t.push(D),k=A.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;const t=this.re.get_schema_at_start().exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;const i=new Ar(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[i.schema].normalize(i,this),i}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}};const $e=2147483647,pe=36,Sn=1,it=26,cs=38,fs=700,ii=72,oi=128,si="-",hs=/^xn--/,ps=/[^\0-\x7F]/,ds=/[\x2E\u3002\uFF0E\uFF61]/g,ms={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},un=pe-Sn,de=Math.floor,ln=String.fromCharCode;function Ee(e){throw new RangeError(ms[e])}function _s(e,t){const n=[];let i=e.length;for(;i--;)n[i]=t(e[i]);return n}function ui(e,t){const n=e.split("@");let i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(ds,".");const r=e.split("."),o=_s(r,t).join(".");return i+o}function li(e){const t=[];let n=0;const i=e.length;for(;n=55296&&r<=56319&&nString.fromCodePoint(...e),bs=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:pe},Cr=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ai=function(e,t,n){let i=0;for(e=n?de(e/fs):e>>1,e+=de(e/t);e>un*it>>1;i+=pe)e=de(e/un);return de(i+(un+1)*e/(e+cs))},ci=function(e){const t=[],n=e.length;let i=0,r=oi,o=ii,s=e.lastIndexOf(si);s<0&&(s=0);for(let u=0;u=128&&Ee("not-basic"),t.push(e.charCodeAt(u));for(let u=s>0?s+1:0;u=n&&Ee("invalid-input");const k=bs(e.charCodeAt(u++));k>=pe&&Ee("invalid-input"),k>de(($e-i)/d)&&Ee("overflow"),i+=k*d;const m=p<=o?Sn:p>=o+it?it:p-o;if(kde($e/h)&&Ee("overflow"),d*=h}const c=t.length+1;o=ai(i-a,c,a==0),de(i/c)>$e-r&&Ee("overflow"),r+=de(i/c),i%=c,t.splice(i++,0,r)}return String.fromCodePoint(...t)},fi=function(e){const t=[];e=li(e);const n=e.length;let i=oi,r=0,o=ii;for(const a of e)a<128&&t.push(ln(a));const s=t.length;let u=s;for(s&&t.push(si);u=i&&dde(($e-r)/c)&&Ee("overflow"),r+=(a-i)*c,i=a;for(const d of e)if(d$e&&Ee("overflow"),d===i){let p=r;for(let k=pe;;k+=pe){const m=k<=o?Sn:k>=o+it?it:k-o;if(p{let n={};for(var i in e)Dr(n,i,{get:e[i],enumerable:!0});return Dr(n,Symbol.toStringTag,{value:"Module"}),n},As=hi({arrayReplaceAt:()=>Cs,asciiTrim:()=>It,callable:()=>pi,escapeHtml:()=>ve,escapeRE:()=>Is,fromCodePoint:()=>ot,isMdAsciiPunct:()=>lt,isPunctChar:()=>mi,isPunctCharCode:()=>ut,isSpace:()=>M,isValidEntityCode:()=>In,isWhiteSpace:()=>st,lib:()=>Bs,normalizeReference:()=>St,unescapeAll:()=>Ze,unescapeMd:()=>vs});function pi(e){const t=function(...n){return Reflect.construct(e,n,new.target&&new.target!==t?new.target:e)};return Object.defineProperty(t,"name",{value:e.name}),Object.setPrototypeOf(t,e),t.prototype=e.prototype,t}function Cs(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function In(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function ot(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var di=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,xs=new RegExp(`${di.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),Ds=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Es(e,t){if(t.charCodeAt(0)===35&&Ds.test(t)){const i=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return In(i)?ot(i):e}const n=ri(e);return n!==e?n:e}function vs(e){return e.indexOf("\\")<0?e:e.replace(di,"$1")}function Ze(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(xs,function(t,n,i){return n||Es(t,i)})}var ws=/[&<>"]/,ys=/[&<>"]/g,Ts={"&":"&","<":"<",">":">",'"':"""};function Fs(e){return Ts[e]}function ve(e){return ws.test(e)?e.replace(ys,Fs):e}var Ss=/[.?*+^$[\]\\(){}|-]/g;function Is(e){return e.replace(Ss,"\\$&")}function M(e){switch(e){case 9:case 32:return!0}return!1}function st(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function mi(e){return Fn.test(e)||Qr.test(e)}function ut(e){return mi(ot(e))}function lt(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function St(e){return e=e.trim().replace(/\s+/g," "),e.toLowerCase().toUpperCase()}function Er(e){return e===32||e===9||e===10||e===13}function It(e){let t=0;for(;t=t&&Er(e.charCodeAt(n));n--);return e.slice(t,n+1)}var Bs={mdurl:jo,ucmicro:Jo};function Ls(e,t,n){let i,r,o,s;const u=e.posMax,a=e.pos;for(e.pos=t+1,i=1;e.pos32))return o;if(i===41){if(s===0)break;s--}r++}return t===r||s!==0||(o.str=Ze(e.slice(t,r)),o.pos=r,o.ok=!0),o}function zs(e,t,n,i){let r,o=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)s.str=i.str,s.marker=i.marker;else{if(o>=n)return s;let u=e.charCodeAt(o);if(u!==34&&u!==39&&u!==40)return s;t++,o++,u===40&&(u=41),s.marker=u}for(;oOs,parseLinkLabel:()=>Ls,parseLinkTitle:()=>zs});function at(e){"@babel/helpers - typeof";return at=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},at(e)}function Ns(e,t){if(at(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(at(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ps(e){var t=Ns(e,"string");return at(t)=="symbol"?t:t+""}function v(e,t,n){return(t=Ps(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Be=class{constructor(e,t,n){v(this,"map",null),v(this,"level",0),v(this,"children",null),v(this,"content",""),v(this,"markup",""),v(this,"info",""),v(this,"block",!1),v(this,"hidden",!1),this.type=e,this.tag=t,this.attrs=null,this.nesting=n,this.meta=null}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,i=t.length;n=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},ct=class{constructor(){v(this,"__rules__",[]),v(this,"__cache__",null)}__find__(e){for(let t=0;t{t.enabled&&t.alt.forEach(n=>{n&&e.add(n)})}),this.__cache__=Object.create(null),this.__cache__[""]=[],this.__rules__.forEach(t=>{t.enabled&&this.__cache__[""].push(t.fn)}),e.forEach(t=>{this.__cache__[t]=[],this.__rules__.forEach(n=>{n.enabled&&n.alt.indexOf(t)>=0&&this.__cache__[t].push(n.fn)})})}at(e,t,n={}){const i=this.__find__(e);if(i===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__[i].fn=t,this.__rules__[i].alt=n.alt||[],this.__cache__=null}before(e,t,n,i={}){const r=this.__find__(e);if(r===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null}after(e,t,n,i={}){const r=this.__find__(e);if(r===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null}push(e,t,n={}){this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null}enable(e,t=!1){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(i=>{const r=this.__find__(i);if(r<0){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}this.__rules__[r].enabled=!0,n.push(i)}),this.__cache__=null,n}enableOnly(e,t=!1){Array.isArray(e)||(e=[e]),this.__rules__.forEach(n=>{n.enabled=!1}),this.enable(e,t)}disable(e,t=!1){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(i=>{const r=this.__find__(i);if(r<0){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}this.__rules__[r].enabled=!1,n.push(i)}),this.__cache__=null,n}getRules(e){return this.__cache__||this.__compile__(),this.__cache__[e]||[]}},me={};me.code_inline=function(e,t,n,i,r){const o=e[t];return`${ve(o.content)}`};me.code_block=function(e,t,n,i,r){const o=e[t];return`${ve(e[t].content)} +`};me.fence=function(e,t,n,i,r){const o=e[t],s=o.info?Ze(o.info).trim():"";let u="",a="";if(s){const d=s.split(/(\s+)/g);u=d[0],a=d.slice(2).join("")}let c;if(n.highlight?c=n.highlight(o.content,u,a)||ve(o.content):c=ve(o.content),c.indexOf("${c} +`}return`
${c}
+`};me.image=function(e,t,n,i,r){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=r.renderInlineAsText(o.children,n,i),r.renderToken(e,t,n)};me.hardbreak=function(e,t,n){return n.xhtmlOut?`
+`:`
+`};me.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`
+`:`
+`:` +`};me.text=function(e,t){return ve(e[t].content)};me.html_block=function(e,t){return e[t].content};me.html_inline=function(e,t){return e[t].content};var _i=class{constructor(){v(this,"rules",Object.assign({},me))}renderAttrs(e){let t,n,i;if(!e.attrs)return"";for(i="",t=0,n=e.attrs.length;t=0&&e[o].hidden&&e[o].nesting===0;)o--;i.block&&i.nesting!==-1&&o>=0&&e[o].hidden&&e[o].nesting===-1&&(r+=` +`),r+=(i.nesting===-1?" +`:">",r}renderInline(e,t,n){let i="";const r=this.rules;for(let o=0,s=e.length;o\s]/i.test(e)}function Zs(e){return/^<\/a\s*>/i.test(e)}function Ys(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,i=t.length;n=0;u--){const a=r[u];if(a.type==="link_close"){for(u--;r[u].level!==a.level&&r[u].type!=="link_open";)u--;continue}if(a.type==="html_inline"&&(Hs(a.content)&&s>0&&s--,Zs(a.content)&&s++),!(s>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const c=a.content;let d=e.md.linkify.match(c);const p=[];let k=a.level,m=0;d.length>0&&d[0].index===0&&u>0&&r[u-1].type==="text_special"&&(d=d.slice(1));for(let h=0;hm){const w=new e.Token("text","",0);w.content=c.slice(m,x),w.level=k,p.push(w)}const C=new e.Token("link_open","a",1);C.attrs=[["href",A]],C.level=k++,C.markup="linkify",C.info="auto",p.push(C);const R=new e.Token("text","",0);R.content=D,R.level=k,p.push(R);const E=new e.Token("link_close","a",-1);E.level=--k,E.markup="linkify",E.info="auto",p.push(E),m=d[h].lastIndex}if(m0){let u=r.length;for(const p of o)u+=p.nodes.length-1;const a=new Array(u);let c=0,d=0;o.reverse();for(let p=0;p=0;n--){const i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(Gs,Ks)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function eu(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&bi.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function tu(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(Xs.test(e.tokens[t].content)&&Qs(e.tokens[t].children),bi.test(e.tokens[t].content)&&eu(e.tokens[t].children))}var nu=/['"]/,vr=/['"]/g,wr="’",ru=1e3;function yr(e,t,n){for(;e.length>n;){const i=e.pop();i.isSingleQuote?t.single=i.prevSameQuoteIdx:t.double=i.prevSameQuoteIdx}}function Et(e,t,n,i){e[t]||(e[t]=[]),e[t].push({pos:n,ch:i})}function iu(e,t){let n="",i=0;t.sort((r,o)=>r.pos-o.pos);for(let r=0;r=0&&!(i[n].level<=a);n--);if(yr(i,r,n+1),u.type!=="text")continue;const c=u.content;let d=0;const p=c.length;e:for(;d=0)A=c.charCodeAt(k.index-1);else for(n=s-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){A=e[n].content.charCodeAt(e[n].content.length-1);break}let D=32;if(d=48&&A<=57&&(h=m=!1),m&&h&&(m=x,h=C),!m&&!h){T&&Et(o,s,k.index,wr);continue}if(h&&(n=T?r.single:r.double,n>=0&&i[n].level===a)){const w=i[n];let S,z;T?(S=t.md.options.quotes[2],z=t.md.options.quotes[3]):(S=t.md.options.quotes[0],z=t.md.options.quotes[1]),Et(o,s,k.index,z),Et(o,w.tokenIdx,w.contentPos,S),yr(i,r,n);continue e}if(m){if(i.length>=ru)return;i.push({tokenIdx:s,contentPos:k.index,isSingleQuote:T,level:a,prevSameQuoteIdx:T?r.single:r.double}),T?r.single=i.length-1:r.double=i.length-1}else h&&T&&Et(o,s,k.index,wr)}}Object.keys(o).forEach(function(s){const u=Number(s);e[u].content=iu(e[u].content,o[s])})}function su(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!nu.test(e.tokens[t].content)||ou(e.tokens[t].children,e)}function uu(e){let t,n;const i=e.length;for(t=0;t0&&this.level++,this.tokens.push(i),i}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;et;)if(!M(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,n,i){if(e>=t)return"";const r=new Array(t-e);for(let o=0,s=e;sn?r[o]=new Array(u-n+1).join(" ")+this.src.slice(c,d):r[o]=this.src.slice(c,d)}return r.join("")}},au=65536;function cn(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function Tr(e){const t=[],n=e.length;let i=0,r=e.charCodeAt(i),o=!1,s=0,u="";for(;in)return!1;let r=t+1;if(e.sCount[r]=4)return!1;let o=e.bMarks[r]+e.tShift[r];if(o>=e.eMarks[r])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58||o>=e.eMarks[r])return!1;const u=e.src.charCodeAt(o++);if(u!==124&&u!==45&&u!==58&&!M(u)||s===45&&M(u))return!1;for(;o=4)return!1;c=Tr(a),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const p=c.length;if(p===0||p!==d.length)return!1;if(i)return!0;const k=e.parentType;e.parentType="table";const m=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),T=[t,0];h.map=T;const A=e.push("thead_open","thead",1);A.map=[t,t+1];const D=e.push("tr_open","tr",1);D.map=[t,t+1];for(let R=0;R=4||(c=Tr(a),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),C+=p-c.length,C>au))break;if(r===t+2){const w=e.push("tbody_open","tbody",1);w.map=x=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[r,r+1];for(let w=0;w=4){i++,r=i;continue}break}e.line=r;const o=e.push("code_block","code",0);return o.content=e.getLines(t,r,4+e.blkIndent,!1)+` +`,o.map=[t,e.line],!0}function hu(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>o)return!1;const s=e.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let u=r;r=e.skipChars(r,s);let a=r-u;if(a<3)return!1;const c=e.src.slice(u,r),d=e.src.slice(r,o);if(s===96&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(i)return!0;let p=t,k=!1;for(;p++,!(p>=n||(r=u=e.bMarks[p]+e.tShift[p],o=e.eMarks[p],r=4)&&(r=e.skipChars(r,s),!(r-u=4||e.src.charCodeAt(r)!==62)return!1;if(i)return!0;const u=[],a=[],c=[],d=[],p=e.md.block.ruler.getRules("blockquote"),k=e.parentType;e.parentType="blockquote";let m=!1,h;for(h=t;h=o)break;if(e.src.charCodeAt(r++)===62&&!C){let E=e.sCount[h]+1,w,S;e.src.charCodeAt(r)===32?(r++,E++,S=!1,w=!0):e.src.charCodeAt(r)===9?(w=!0,(e.bsCount[h]+E)%4===3?(r++,E++,S=!1):S=!0):w=!1;let z=E;for(u.push(e.bMarks[h]),e.bMarks[h]=r;r=o,a.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(w?1:0),c.push(e.sCount[h]),e.sCount[h]=z-E,d.push(e.tShift[h]),e.tShift[h]=r-e.bMarks[h];continue}if(m)break;let R=!1;for(let E=0,w=p.length;E";const D=[t,0];A.map=D,e.md.block.tokenize(e,t,h);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=s,e.parentType=k,D[1]=e.line;for(let C=0;C=4)return!1;let o=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let u=1;for(;o=i)return-1;let o=e.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=e.src.charCodeAt(r++),o>=48&&o<=57){if(r-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return r=4||e.listIndent>=0&&e.sCount[a]-e.listIndent>=4&&e.sCount[a]=e.blkIndent&&(d=!0);let p,k,m;if((m=Sr(e,a))>=0){if(p=!0,s=e.bMarks[a]+e.tShift[a],k=Number(e.src.slice(s,m-1)),d&&k!==1)return!1}else if((m=Fr(e,a))>=0)p=!1;else return!1;if(d&&e.skipSpaces(m)>=e.eMarks[a])return!1;if(i)return!0;const h=e.src.charCodeAt(m-1),T=e.tokens.length;p?(u=e.push("ordered_list_open","ol",1),k!==1&&(u.attrs=[["start",k]])):u=e.push("bullet_list_open","ul",1);const A=[a,0];u.map=A,u.markup=String.fromCharCode(h);let D=!1;const x=e.md.block.ruler.getRules("list"),C=e.parentType;for(e.parentType="list";a=r?S=1:S=E-R,S>4&&(S=1);const z=R+S;u=e.push("list_item_open","li",1),u.markup=String.fromCharCode(h);const L=[a,0];u.map=L,p&&(u.info=e.src.slice(s,m-1));const j=e.tight,I=e.tShift[a],N=e.sCount[a],Q=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=z,e.tight=!0,e.tShift[a]=w-e.bMarks[a],e.sCount[a]=E,w>=r&&e.isEmpty(a+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,a,n),(!e.tight||D)&&(c=!1),D=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=Q,e.tShift[a]=I,e.sCount[a]=N,e.tight=j,u=e.push("list_item_close","li",-1),u.markup=String.fromCharCode(h),a=e.line,L[1]=a,a>=n||e.sCount[a]=4)break;let ee=!1;for(let q=0,ht=x.length;q56319)continue;const r=e.charCodeAt(n+1);r>=56320&&r<=57343&&(t--,n++)}return t}function Qe(e,t){return Math.min(e.eMarks[t]+1,e.src.length)}function vt(e,t){const n=e.lineMax;if(t>=n||e.isEmpty(t))return-1;let i=!1;if(e.sCount[t]-e.blkIndent>3&&(i=!0),e.sCount[t]<0&&(i=!0),!i){const r=e.md.block.ruler.getRules("reference"),o=e.parentType;e.parentType="reference";let s=!1;for(let u=0,a=r.length;u=4||r.charCodeAt(o)!==91)return!1;let u=Qe(e,t),a="",c=-1,d=++o;for(;ofn*2)return!1;let w=r.charCodeAt(o);if(w===91)return!1;if(w===93){c=o;break}if(w===92&&(w=r.charCodeAt(++o)),w===10&&ofn&&gu(a)>fn))return!1;for(o=c+2;o"u"&&(e.env.references={}),typeof e.env.references[C]>"u"&&(e.env.references[C]={title:x,href:k});const R=e.push("reference_definition","",0);R.map=[t,s],R.hidden=!0;const E=Object.create(null);return E.label=C,R.meta=E,e.line=s,!0}var ku=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ru=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,Au="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ai=new RegExp(`^(?:${Ru}|${Au})`),Se=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp(`^|$))`,"i"),/^$/,!0],[new RegExp(`${Ai.source}\\s*$`),/^$/,!1]];function Cu(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(r)!==60)return!1;let s=e.src.slice(r,o),u=0;for(;u=4)return!1;let s=e.src.charCodeAt(r);if(s!==35||r>=o)return!1;let u=1;for(s=e.src.charCodeAt(++r);s===35&&r6||rr&&M(e.src.charCodeAt(a-1))&&(o=a),e.line=t+1;const c=e.push("heading_open",`h${u}`,1);c.markup="########".slice(0,u),c.map=[t,e.line];const d=e.push("inline","",0);d.content=It(e.src.slice(r,o)),d.map=[t,e.line],d.children=[];const p=e.push("heading_close",`h${u}`,-1);return p.markup="########".slice(0,u),!0}function Du(e,t,n){const i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const r=e.parentType;e.parentType="paragraph";let o=0,s,u=t+1;for(;u3)continue;if(e.sCount[u]>=e.blkIndent){let m=e.bMarks[u]+e.tShift[u];const h=e.eMarks[u];if(m=h))){o=s===61?1:2;break}}if(e.sCount[u]<0)continue;let k=!1;for(let m=0,h=i.length;m3||e.sCount[o]<0)continue;let c=!1;for(let d=0,p=i.length;d=n||e.sCount[s]=o){e.line=n;break}const a=e.line;let c=!1;for(let d=0;d=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),s=e.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i}scanDelims(e,t){const n=this.posMax,i=this.src.charCodeAt(e);let r;if(e===0)r=32;else if(e===1)r=this.src.charCodeAt(0),(r&63488)===55296&&(r=65533);else if(r=this.src.charCodeAt(e-1),(r&64512)===56320){const h=this.src.charCodeAt(e-2);r=(h&64512)===55296?65536+(h-55296<<10)+(r-56320):65533}else(r&64512)===55296&&(r=65533);let o=e;for(;o=65&&e<=90||e>=97&&e<=122}function Tu(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===45||e===46}function Fu(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const r=n-Math.min(10,e.pending.length,n);let o=n;for(;o>r&&Tu(e.src.charCodeAt(o-1));)o--;if(o===n||!yu(e.src.charCodeAt(o)))return!1;const s=n-o,u=e.md.linkify.matchAtStart(e.src.slice(o));if(!u)return!1;let a=u.url;if(a.length<=s)return!1;let c=a.length;for(;c>0&&a.charCodeAt(c-1)===42;)c--;c!==a.length&&(a=a.slice(0,c));const d=e.md.normalizeLink(a);if(!e.md.validateLink(d))return!1;if(!t){e.pending=e.pending.slice(0,-s);const p=e.push("link_open","a",1);p.attrs=[["href",d]],p.markup="linkify",p.info="auto";const k=e.push("text","",0);k.content=e.md.normalizeLinkText(a);const m=e.push("link_close","a",-1);m.markup="linkify",m.info="auto"}return e.pos+=a.length-s,!0}function Su(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,r=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){Bn[e.charCodeAt(0)]=1});function Iu(e,t){let n=e.pos;const i=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=i))return!1;let r=e.src.charCodeAt(n);if(r===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&r<=56319&&n+1=56320&&u<=57343&&(o+=e.src[n+1],n++)}const s="\\"+o;if(!t){const u=e.push("text_special","",0);r<256&&Bn[r]!==0?u.content=o:u.content=s,u.markup=s,u.info="escape"}return e.pos=n+1,!0}function Bu(e){const t={};let n=0;for(;(n=e.indexOf("`",n))!==-1;){const i=n;for(;e.charCodeAt(++n)===96;);t[n-i]=i}return t}function Lu(e,t){var n;const i=e.pos;if(e.src.charCodeAt(i)!==96)return!1;const r=e.posMax;let o=i+1;for(;o=o){let a=o,c;for(;(c=e.src.indexOf("`",a))!==-1&&cr)break;if(a-c===u){if(!t){const d=e.push("code_inline","code",0);d.markup=s;let p=e.src.slice(o,c).replace(/\n/g," ");p.startsWith(" ")&&p.endsWith(" ")&&/[^ ]/.test(p)&&(p=p.slice(1,-1)),d.content=p}return e.pos=a,!0}}}return t||(e.pending+=s),e.pos=o,!0}function Ou(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;const r=e.scanDelims(e.pos,!0);let o=r.length;const s=String.fromCharCode(i);if(o<2)return!1;let u;o%2&&(u=e.push("text","",0),u.content=s,o--);for(let a=0;a=0;i--){const r=t[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=t[r.end],s=i>0&&t[i-1].end===r.end+1&&t[i-1].marker===r.marker&&t[i-1].token===r.token-1&&t[r.end+1].token===o.token+1,u=String.fromCharCode(r.marker),a=e.tokens[r.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?u+u:u,a.content="";const c=e.tokens[o.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?u+u:u,c.content="",s&&(e.tokens[t[i-1].token].content="",e.tokens[t[r.end+1].token].content="",i--)}}function Nu(e){const t=e.tokens_meta,n=e.tokens_meta.length;Br(e,e.delimiters);for(let r=0;r=p)return!1;if(a=h,r=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),r.ok){for(s=e.md.normalizeLink(r.str),e.md.validateLink(s)?h=r.pos:s="",a=h;h=p||e.src.charCodeAt(h)!==41)&&(c=!0),h++}if(c){if(typeof e.env.references>"u")return!1;if(h=0?i=e.src.slice(a,h++):h=m+1):h=m+1,i||(i=e.src.slice(k,m)),i=St(i),o=e.env.references[i],!o)return e.pos=d,!1;s=o.href,u=o.title}if(!t){e.pos=k,e.posMax=m;const T=e.push("link_open","a",1),A=[["href",s]];if(T.attrs=A,u&&A.push(["title",u]),i){const D=Object.create(null);D.label=i,T.meta=D}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=p,!0}function ju(e,t){let n,i,r,o,s,u,a,c,d="";const p=e.pos,k=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const m=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(o=h+1,o=k)return!1;for(c=o,u=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),u.ok&&(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?o=u.pos:d=""),c=o;o=k||e.src.charCodeAt(o)!==41)return e.pos=p,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?r=e.src.slice(c,o++):o=h+1):o=h+1,r||(r=e.src.slice(m,h)),r=St(r),s=e.env.references[r],!s)return e.pos=p,!1;d=s.href,a=s.title}if(!t){i=e.src.slice(m,h);const T=[];e.md.inline.parse(i,e.md,e.env,T);const A=e.push("image","img",0),D=[["src",d],["alt",""]];if(A.attrs=D,A.children=T,A.content=i,a&&D.push(["title",a]),r){const x=Object.create(null);x.label=r,A.meta=x}}return e.pos=o,e.posMax=k,!0}var Uu=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Ju=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Wu(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const i=e.pos,r=e.posMax;for(;;){if(++n>=r)return!1;const s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const o=e.src.slice(i+1,n);if(Ju.test(o)){const s=e.md.normalizeLink(o);if(!e.md.validateLink(s))return!1;if(!t){const u=e.push("link_open","a",1);u.attrs=[["href",s]],u.markup="autolink",u.info="auto";const a=e.push("text","",0);a.content=e.md.normalizeLinkText(o);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=o.length+2,!0}if(Uu.test(o)){const s=e.md.normalizeLink(`mailto:${o}`);if(!e.md.validateLink(s))return!1;if(!t){const u=e.push("link_open","a",1);u.attrs=[["href",s]],u.markup="autolink",u.info="auto";const a=e.push("text","",0);a.content=e.md.normalizeLinkText(o);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=o.length+2,!0}return!1}function $u(e){return/^\s]/i.test(e)}function qu(e){return/^<\/a\s*>/i.test(e)}function vi(e){const t=e|32;return t>=97&&t<=122}function Hu(e,t){const n=e.src;let i,r;if(n.startsWith(""}else if(n.startsWith("";else if(n.charCodeAt(t+1)===63)i=t+2,r="?>";else if(vi(n.charCodeAt(t+2)))i=t+3,r=">";else return-1;if(e.skipHtmlSpecial)return-1;const o=n.indexOf(r,i);return o<0?(e.skipHtmlSpecial=!0,-1):o+r.length}function Zu(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==60||i+2>=n)return!1;let r;const o=e.src.charCodeAt(i+1);if(o===33||o===63)r=Hu(e,i);else if(o===47||vi(o)){const s=e.src.slice(i).match(Ai);r=s?i+s[0].length:-1}else return!1;if(r<0)return!1;if(!t){const s=e.push("html_inline","",0);s.content=e.src.slice(i,r),$u(s.content)&&e.linkLevel++,qu(s.content)&&e.linkLevel--}return e.pos=r,!0}var Yu=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Xu=/^&([a-z][a-z0-9]{1,31});/i;function Gu(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const r=e.src.slice(n).match(Yu);if(r){if(!t){const o=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),s=e.push("text_special","",0);s.content=In(o)?ot(o):ot(65533),s.markup=r[0],s.info="entity"}return e.pos+=r[0].length,!0}}else{const r=e.src.slice(n).match(Xu);if(r){const o=ri(r[0]);if(o!==r[0]){if(!t){const s=e.push("text_special","",0);s.content=o,s.markup=r[0],s.info="entity"}return e.pos+=r[0].length,!0}}}return!1}function Lr(e){const t={},n=e.length;if(!n)return;let i=0,r=-2;const o=[];for(let s=0;sa;c-=o[c]+1){const p=e[c];if(p.marker===u.marker&&p.open&&p.end<0){let k=!1;if((p.close||u.open)&&(p.length+u.length)%3===0&&(p.length%3!==0||u.length%3!==0)&&(k=!0),!k){const m=c>0&&!e[c-1].open?o[c-1]+1:0;o[s]=s-c+m,o[c]=m,u.open=!1,p.end=s,p.close=!1,d=-1,r=-2;break}}}d!==-1&&(t[u.marker][(u.open?3:0)+(u.length||0)%3]=d)}}function Vu(e){const t=e.tokens_meta,n=e.tokens_meta.length;Lr(e.delimiters);for(let r=0;r0&&i++,r[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,o[t]=e.pos}tokenize(e){const t=this.ruler.getRules(""),n=t.length,i=e.posMax,r=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()}parse(e,t,n,i){const r=new this.State(e,t,n,i);this.tokenize(r);const o=this.ruler2.getRules(""),s=o.length;for(let u=0;u=0))try{t.hostname=xr.toASCII(t.hostname)}catch{}return t.auth&&(t.auth=Re(t.auth)),t.hostname&&(t.hostname=Re(t.hostname)),t.pathname&&(t.pathname=Re(t.pathname)),t.search&&(t.search=Re(t.search)),t.hash&&(t.hash=Re(t.hash)),Dn(t)}normalizeLinkText(e){const t=En(e,!0);if(t.hostname&&(!t.protocol||Or.indexOf(t.protocol)>=0))try{t.hostname=xr.toUnicode(t.hostname)}catch{}return He(Dn(t),He.defaultChars+"%")}constructor(...e){v(this,"inline",new wi),v(this,"block",new Ci),v(this,"core",new ki),v(this,"renderer",new _i),v(this,"linkify",new as),v(this,"utils",As),v(this,"helpers",Object.assign({},Ms));const[t,n]=e;typeof t=="string"?(this.configure(t),n&&this.set(n)):(this.configure("default"),this.set(t||{}))}set(e){return Object.assign(this.options,e),this}configure(e){let t;if(typeof e=="string"){const r=e;if(t=Qu[r],!t)throw new Error(`Wrong 'markdown-it' preset "${r}", check name`)}else t=e;if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");t.options&&(this.options={...t.options});const n=t.components;if(n){var i;["core","block","inline"].forEach(o=>{var s;const u=(s=n[o])===null||s===void 0?void 0:s.rules;u&&this[o].ruler.enableOnly(u)});const r=(i=n.inline)===null||i===void 0?void 0:i.rules2;r&&this.inline.ruler2.enableOnly(r)}return this}enable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(r=>{n=n.concat(this[r].ruler.enable(e,!0))}),n=n.concat(this.inline.ruler2.enable(e,!0));const i=e.filter(r=>n.indexOf(r)<0);if(i.length&&!t)throw new Error(`MarkdownIt. Failed to enable unknown rule(s): ${i}`);return this}disable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(r=>{n=n.concat(this[r].ruler.disable(e,!0))}),n=n.concat(this.inline.ruler2.disable(e,!0));const i=e.filter(r=>n.indexOf(r)<0);if(i.length&&!t)throw new Error(`MarkdownIt. Failed to disable unknown rule(s): ${i}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}};v(_e,"Token",Be);v(_e,"Ruler",ct);v(_e,"Renderer",_i);v(_e,"ParserCore",ki);v(_e,"StateCore",gi);v(_e,"ParserBlock",Ci);v(_e,"StateBlock",Ri);v(_e,"ParserInline",wi);v(_e,"StateInline",xi);var nl=pi(_e);function zr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n2?i-2:0),o=2;o1?n-1:0),r=1;r"u"?null:W(BigInt.prototype.toString),Jr=typeof Symbol>"u"?null:W(Symbol.prototype.toString),ie=W(Object.prototype.hasOwnProperty),rt=W(Object.prototype.toString),V=W(RegExp.prototype.test),ke=Ii(TypeError);function W(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:Ie;if(Mr&&Mr(e,null),!qe(t))return e;let i=t.length;for(;i--;){let r=t[i];if(typeof r=="string"){const o=n(r);o!==r&&(ll(t)||(t[i]=o),r=o)}e[r]=!0}return e}function ml(e){for(let t=0;t/g),xl=K(/\${[\w\W]*/g),Dl=K(/^data-[\-\w.\u00B7-\uFFFF]+$/),El=K(/^aria-[\-\w]+$/),Zr=K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vl=K(/^(?:\w+script|data):/i),wl=K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yl=K(/^html$/i),Tl=K(/^[a-z][.\w]*(-[.\w]+)+$/i),An=K(/<[/\w!]/g),Yr=K(/<[/\w]/g),Fl=K(/<\/no(script|embed|frames)/i),Xr=K(/\/>/i),H={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Sl=G(O({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),Il=function(){return typeof window>"u"?null:window},Bl=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(i=n.getAttribute(r));const o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Gr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},De=function(t,n,i,r){return ie(t,n)&&qe(t[n])?O(r.base?se(r.base):{},t[n],r.transform):i},Cn=function(t,n,i){const r=ie(t,n)?t[n]:void 0;return r&&typeof r=="object"?se(r):i()};function Bi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Il();const t=b=>Bi(b);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==H.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const i=n,r=i.currentScript;e.DocumentFragment;const o=e.HTMLTemplateElement,s=e.Node,u=e.Element,a=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,p=u.prototype,k=ue(p,"cloneNode"),m=ue(p,"remove"),h=ue(p,"removeAttributeNode"),T=ue(p,"nextSibling"),A=ue(p,"childNodes"),D=ue(p,"parentNode"),x=ue(p,"shadowRoot"),C=ue(p,"attributes"),R=s&&s.prototype?ue(s.prototype,"nodeType"):null,E=s&&s.prototype?ue(s.prototype,"nodeName"):null,w=s&&s.prototype?ue(s.prototype,"ownerDocument"):null,S=function(l){return R?R(l):l.nodeType},z=function(l){return E?E(l):l.nodeName},L=gl(p,"namespaceURI"),j=function(l){return L?L(l):l.namespaceURI};if(typeof o=="function"){const b=n.createElement("template");b.content&&b.content.ownerDocument&&(n=b.content.ownerDocument)}let I,N="",Q,ee=!1,q=0;const ht=function(){if(q>0)throw ke('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Le=function(l){ht(),q++;try{return I.createHTML(l)}finally{q--}},Oi=function(l){ht(),q++;try{return I.createScriptURL(l)}finally{q--}},zi=function(){return ee||(Q=Bl(d,r),ee=!0),Q},pt=n,Bt=pt.implementation,Ln=pt.createNodeIterator,Mi=pt.createDocumentFragment,Ni=pt.getElementsByTagName,Pi=i.importNode;let P=Gr();t.isSupported=typeof yi=="function"&&typeof D=="function"&&Bt&&Bt.createHTMLDocument!==void 0;const ji=Al,Ui=Cl,Ji=xl,Wi=Dl,$i=El,qi=vl,On=wl,Hi=Tl;let zn=Zr,U=null;const Lt=O({},[...Wr,...gn,...bn,...kn,...$r]);let J=null;const Ot=O({},[...qr,...Rn,...Hr,...yt]);let ce=Object.seal(We(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ye=null,Mn=null;const Ae=Object.seal(We(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Nn=!0,zt=!0,Pn=!1,Mt=!0,ge=!1,we=!0,ye=!1,Nt=!1,dt=null,mt=null,Pt=!1,Oe=!1,_t=!1,gt=!1,jn=!0,Un=!1;const Jn="user-content-";let jt=!0,Ut=!1,Te=null,ze={},Fe=null;const Wn=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let $n=null;const qn=O({},["audio","video","img","source","image","track"]);let Hn=null;const Zn=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bt="http://www.w3.org/1998/Math/MathML",kt="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml";let Me=fe,Jt=!1,Wt=null;const Zi=O({},[bt,kt,fe],_n),Yn=G(["mi","mo","mn","ms","mtext"]);let $t=O({},Yn);const Xn=G(["annotation-xml"]);let qt=O({},Xn);const Yi=O({},["title","style","font","a","script"]);let Xe=null;const Xi=["application/xhtml+xml","text/html"],Gi="text/html";let $=null,Ne=null;const Vi=n.createElement("form"),Gn=function(l){return l instanceof RegExp||l instanceof Function},Ht=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ne&&Ne===l)return;(!l||typeof l!="object")&&(l={}),l=se(l),Xe=Xi.indexOf(l.PARSER_MEDIA_TYPE)===-1?Gi:l.PARSER_MEDIA_TYPE,$=Xe==="application/xhtml+xml"?_n:Ie,U=De(l,"ALLOWED_TAGS",Lt,{transform:$}),J=De(l,"ALLOWED_ATTR",Ot,{transform:$}),Wt=De(l,"ALLOWED_NAMESPACES",Zi,{transform:_n}),Hn=De(l,"ADD_URI_SAFE_ATTR",Zn,{transform:$,base:Zn}),$n=De(l,"ADD_DATA_URI_TAGS",qn,{transform:$,base:qn}),Fe=De(l,"FORBID_CONTENTS",Wn,{transform:$}),Ye=De(l,"FORBID_TAGS",se({}),{transform:$}),Mn=De(l,"FORBID_ATTR",se({}),{transform:$}),ze=ie(l,"USE_PROFILES")?l.USE_PROFILES&&typeof l.USE_PROFILES=="object"?se(l.USE_PROFILES):l.USE_PROFILES:!1,Nn=l.ALLOW_ARIA_ATTR!==!1,zt=l.ALLOW_DATA_ATTR!==!1,Pn=l.ALLOW_UNKNOWN_PROTOCOLS||!1,Mt=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ge=l.SAFE_FOR_TEMPLATES||!1,we=l.SAFE_FOR_XML!==!1,ye=l.WHOLE_DOCUMENT||!1,Oe=l.RETURN_DOM||!1,_t=l.RETURN_DOM_FRAGMENT||!1,gt=l.RETURN_TRUSTED_TYPE||!1,Pt=l.FORCE_BODY||!1,jn=l.SANITIZE_DOM!==!1,Un=l.SANITIZE_NAMED_PROPS||!1,jt=l.KEEP_CONTENT!==!1,Ut=l.IN_PLACE||!1,zn=bl(l.ALLOWED_URI_REGEXP)?l.ALLOWED_URI_REGEXP:Zr,Me=typeof l.NAMESPACE=="string"?l.NAMESPACE:fe,$t=Cn(l,"MATHML_TEXT_INTEGRATION_POINTS",()=>O({},Yn)),qt=Cn(l,"HTML_INTEGRATION_POINTS",()=>O({},Xn));const f=Cn(l,"CUSTOM_ELEMENT_HANDLING",()=>We(null));if(ce=We(null),ie(f,"tagNameCheck")&&Gn(f.tagNameCheck)&&(ce.tagNameCheck=f.tagNameCheck),ie(f,"attributeNameCheck")&&Gn(f.attributeNameCheck)&&(ce.attributeNameCheck=f.attributeNameCheck),ie(f,"allowCustomizedBuiltInElements")&&typeof f.allowCustomizedBuiltInElements=="boolean"&&(ce.allowCustomizedBuiltInElements=f.allowCustomizedBuiltInElements),K(ce),ge&&(zt=!1),_t&&(Oe=!0),ze&&(U=O({},$r),J=We(null),ze.html===!0&&(O(U,Wr),O(J,qr)),ze.svg===!0&&(O(U,gn),O(J,Rn),O(J,yt)),ze.svgFilters===!0&&(O(U,bn),O(J,Rn),O(J,yt)),ze.mathMl===!0&&(O(U,kn),O(J,Hr),O(J,yt))),Ae.tagCheck=null,Ae.attributeCheck=null,ie(l,"ADD_TAGS")&&(typeof l.ADD_TAGS=="function"?Ae.tagCheck=l.ADD_TAGS:qe(l.ADD_TAGS)&&(U===Lt&&(U=se(U)),O(U,l.ADD_TAGS,$))),ie(l,"ADD_ATTR")&&(typeof l.ADD_ATTR=="function"?Ae.attributeCheck=l.ADD_ATTR:qe(l.ADD_ATTR)&&(J===Ot&&(J=se(J)),O(J,l.ADD_ATTR,$))),ie(l,"ADD_FORBID_CONTENTS")&&qe(l.ADD_FORBID_CONTENTS)&&(Fe===Wn&&(Fe=se(Fe)),O(Fe,l.ADD_FORBID_CONTENTS,$)),jt&&(U["#text"]=!0),ye&&O(U,["html","head","body"]),U.table&&(O(U,["tbody"]),delete Ye.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw ke('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ke('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const _=I;I=l.TRUSTED_TYPES_POLICY;try{N=Le("")}catch(g){throw I=_,g}}else l.TRUSTED_TYPES_POLICY===null?(I=void 0,N=""):(I===void 0&&(I=zi()),I&&typeof N=="string"&&(N=Le("")));G&&G(l),Ne=l},Vn=O({},[...gn,...bn,...kl]),Kn=O({},[...kn,...Rl]),Ki=function(l,f,_){return f.namespaceURI===fe?l==="svg":f.namespaceURI===bt?l==="svg"&&(_==="annotation-xml"||$t[_]):!!Vn[l]},Qi=function(l,f,_){return f.namespaceURI===fe?l==="math":f.namespaceURI===kt?l==="math"&&qt[_]:!!Kn[l]},eo=function(l,f,_){return f.namespaceURI===kt&&!qt[_]||f.namespaceURI===bt&&!$t[_]?!1:!Kn[l]&&(Yi[l]||!Vn[l])},to=function(l){const f=j(l),_=Ie(z(l)),g=D(l);let y,F;return g&&S(g)===H.element?(y={namespaceURI:j(g)},F=Ie(z(g))):(y={namespaceURI:Me},F="template"),Wt[f]?f===kt?Ki(_,y,F):f===bt?Qi(_,y,F):f===fe?eo(_,y,F):!!(Xe==="application/xhtml+xml"&&Wt[f]):!1},Ce=function(l){et(t.removed,{element:l});try{D(l).removeChild(l)}catch{if(m(l),!D(l))throw ke("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Qn=function(l,f,_){try{h(l,f)}catch{try{l.removeAttribute(_)}catch{}}},Zt=function(l){Xt(l);const f=A(l);f&&be(cl(f),g=>{try{m(g)}catch{}});const _=S(l)===H.element?C(l):null;if(_)for(let g=_.length-1;g>=0;--g){const y=_[g],F=y&&y.name;typeof F=="string"&&Qn(l,y,F)}},Pe=function(l,f,_){if(!_)try{_=f.getAttributeNode(l)}catch{_=null}et(t.removed,{attribute:_||null,from:f});try{_?h(f,_):f.removeAttribute(l)}catch{try{f.removeAttribute(l)}catch{}}if(l==="is")if(Oe||_t)try{Ce(f)}catch{}else try{f.setAttribute(l,"")}catch{}},er=function(l){const f=C(l);if(f)for(let _=f.length-1;_>=0;--_){const g=f[_],y=g&&g.name;typeof y!="string"||J[$(y)]||Qn(l,g,y)}},Yt=function(l,f){let _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const g=[l];for(;g.length>0;){const y=g.pop();if(f(y)===!1)continue;if(_&&S(y)===H.element){const B=x(y);xe(B)&&g.push(B)}const F=A(y);if(F)for(let B=F.length-1;B>=0;--B)g.push(F[B])}},Xt=function(l){Yt(l,f=>{S(f)===H.element&&er(f)})},Gt=function(l){const f=[];return Yt(l,_=>{f.push(_)},!0),f},no=function(l,f){const _=dn();be(Gt(l),g=>{S(g)===H.element&&mn(_,g)}),be(f,g=>{S(g)===H.element&&!tt(_,g)&&er(g)})},tr=function(l,f){let _=!1;return be(t.removed,g=>{g.element&&(_=_||g.element===l,Xt(g.element))}),no(l,f),_},ro=8,io=function(l,f){const _=Te;let g=null;const y=()=>(g||(g=dn(),be(f,F=>{mn(g,F)})),g);for(let F=0;;F++){const B=Gt(l),Z=[l];let he=!1;if(be(B,te=>{S(te)===H.documentFragment?et(Z,te):!he&&!tt(_,te)&&(he=tt(y(),te))}),!he)return;if(F>=ro)throw ke("the tree kept changing during in-place sanitization; refusing to return it");be(Z,(te,ne)=>{oo(te,ne>0,l,y())})}},oo=function(l,f,_,g){const y=Vt(l);let F;for(;F=y.nextNode();)!tt(g,F)||tt(Te,F)||(f&&le(P.uponSanitizeShadowNode,F,null),Qt(F,_),en(F,_),xe(F.content)&&Ve(F.content))},so=function(l){Te&&mn(Te,l)},nr=function(l,f){return we?l==="patchsrc"?!0:l==="for"&&f!=="label"&&f!=="output":!1},uo=function(l){we&&Yt(l,f=>{const _=S(f);if(_===H.processingInstruction||_===H.comment&&V(Yr,f.data)){try{m(f)}catch{}return!1}if(_===H.element){const g=f,y=$(z(f));try{g.hasAttribute&&g.hasAttribute("patchsrc")&&g.removeAttribute("patchsrc"),g.hasAttribute&&g.hasAttribute("for")&&nr("for",y)&&g.removeAttribute("for")}catch{}}return!0})},rr=function(l){let f=null,_=null;if(Pt)l=""+l;else{const F=Pr(l,/^[\r\n\t ]+/);_=F&&F[0]}Xe==="application/xhtml+xml"&&Me===fe&&(l=''+l+"");const g=I?Le(l):l;if(Me===fe)try{f=new c().parseFromString(g,Xe)}catch{}if(!f||!f.documentElement){f=Bt.createDocument(Me,"template",null);try{f.documentElement.innerHTML=Jt?N:g}catch{}}const y=f.body||f.documentElement;return l&&_&&y.insertBefore(n.createTextNode(_),y.childNodes[0]||null),Me===fe?Ni.call(f,ye?"html":"body")[0]:ye?f.documentElement:y},Vt=function(l){const f=w?w(l):l.ownerDocument;return Ln.call(f||l,l,a.SHOW_ELEMENT|a.SHOW_COMMENT|a.SHOW_TEXT|a.SHOW_PROCESSING_INSTRUCTION|a.SHOW_CDATA_SECTION,null)},Rt=function(l){return l=nt(l,ji," "),l=nt(l,Ui," "),l=nt(l,Ji," "),l},Kt=function(l){var f;ir(l);const _=(f=l.querySelectorAll)===null||f===void 0?void 0:f.call(l,"template");_&&be(_,g=>{xe(g.content)&&Kt(g.content)})},ir=function(l){l.normalize();const f=w?w(l):l.ownerDocument,_=Ln.call(f||l,l,a.SHOW_TEXT|a.SHOW_COMMENT|a.SHOW_CDATA_SECTION|a.SHOW_PROCESSING_INSTRUCTION,null);let g=_.nextNode();for(;g;)g.data=Rt(g.data),g=_.nextNode()},At=function(l){const f=E?E(l):null;return typeof f!="string"||$(f)!=="form"?!1:typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||l.attributes!==C(l)||typeof l.removeAttribute!="function"||typeof l.removeAttributeNode!="function"||typeof l.getAttributeNode!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function"||l.nodeType!==R(l)||l.childNodes!==A(l)},xe=function(l){if(!R||typeof l!="object"||l===null)return!1;try{return R(l)===H.documentFragment}catch{return!1}},Ge=function(l){if(!R||typeof l!="object"||l===null)return!1;try{return typeof R(l)=="number"}catch{return!1}};function le(b,l,f){b.length!==0&&be(b,_=>{_.call(t,l,f,Ne)})}const lo=function(l,f){return!!(we&&l.hasChildNodes()&&!Ge(l.firstElementChild)&&V(An,l.textContent)&&V(An,l.innerHTML)||we&&Sl[f]&&S(l)===H.element&&j(l)===fe&&(Ge(l.firstElementChild)||typeof l.textContent=="string"&&V(An,l.textContent))||l.nodeType===H.processingInstruction||we&&l.nodeType===H.comment&&V(Yr,l.data))},Ct=function(l,f){if(l instanceof RegExp)return V(l,f);if(l instanceof Function){for(var _=arguments.length,g=new Array(_>2?_-2:0),y=2;y<_;y++)g[y-2]=arguments[y];return!!l(f,...g)}return!1},ao=function(l,f,_){if(!Ye[f]&&ur(f)&&Ct(ce.tagNameCheck,f))return!1;if(jt&&!Fe[f]&&!Fe[Ie(f)]){const g=D(l),y=A(l);if(y&&g){const F=y.length;for(let B=F-1;B>=0;--B){const Z=l===_?k(y[B],!0):y[B];g.insertBefore(Z,T(l))}}}return Ce(l),!0},or=function(l,f,_,g){return l.length===0?f:f===_||f===g?se(f):f},je=function(l,f){return l===f||D(l)!==null?!1:(Ut&&Xt(l),!0)},Qt=function(l,f){if(so(l),le(P.beforeSanitizeElements,l,null),je(l,f))return!0;if(At(l))return Ce(l),!0;const _=$(z(l));if(U=or(P.uponSanitizeElement,U,Lt,dt),le(P.uponSanitizeElement,l,{tagName:_,allowedTags:U}),je(l,f))return!0;if(lo(l,_))return Ce(l),!0;if(Ye[_]||!(Ae.tagCheck instanceof Function&&Ae.tagCheck(_))&&!U[_]){const g=ao(l,_,f);return g===!1&&(le(P.afterSanitizeElements,l,null),je(l,f))?!0:g}if(S(l)===H.element&&!to(l)||(_==="noscript"||_==="noembed"||_==="noframes")&&V(Fl,l.innerHTML))return Ce(l),!0;if(ge&&l.nodeType===H.text){const g=Rt(l.textContent);l.textContent!==g&&(et(t.removed,{element:l.cloneNode()}),l.textContent=g)}return le(P.afterSanitizeElements,l,null),je(l,f)},sr=function(l,f,_){if(Mn[f]||nr(f,l)||jn&&(f==="id"||f==="name")&&(_ in n||_ in Vi))return!1;const g=J[f]||Ae.attributeCheck instanceof Function&&Ae.attributeCheck(f,l);return zt&&V(Wi,f)||Nn&&V($i,f)?!0:g?Hn[f]||V(zn,nt(_,On,""))||(f==="src"||f==="xlink:href"||f==="href")&&l!=="script"&&jr(_,"data:")===0&&$n[l]||Pn&&!V(qi,nt(_,On,""))?!0:!_:ur(l)&&Ct(ce.tagNameCheck,l)&&Ct(ce.attributeNameCheck,f,l)||f==="is"&&ce.allowCustomizedBuiltInElements&&Ct(ce.tagNameCheck,_)},co=O({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ur=function(l){return!co[Ie(l)]&&V(Hi,l)},fo=function(l,f,_,g){if(I&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!_)switch(d.getAttributeType(l,f)){case"TrustedHTML":return Le(g);case"TrustedScriptURL":return Oi(g)}return g},ho=function(l,f,_,g){try{return _?l.setAttributeNS(_,f,g):l.setAttribute(f,g),At(l)?(Ce(l),!1):!0}catch{return Pe(f,l),!1}},lr=function(l,f){return we&&V(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)?!0:Ie(l)==="attributename"&&Pr(f,"href")!==null},en=function(l,f){if(le(P.beforeSanitizeAttributes,l,null),je(l,f))return;const _=l.attributes;if(!_||At(l))return;J=or(P.uponSanitizeAttribute,J,Ot,mt);const g={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:J,forceKeepAttr:void 0};let y=_.length;const F=$(l.nodeName);for(;y--;){const B=_[y],Z=B.name,he=B.namespaceURI,te=B.value,ne=$(Z),Ue=te;let re=Z==="value"?Ue:hl(Ue),ar=!1;if(g.attrName=ne,g.attrValue=re,g.keepAttr=!0,g.forceKeepAttr=void 0,le(P.uponSanitizeAttribute,l,g),re=g.attrValue,Un&&(ne==="id"||ne==="name")&&jr(re,Jn)!==0&&(Pe(Z,l,B),re=Jn+re,ar=!0),lr(Z,re)){Pe(Z,l,B);continue}if(!g.forceKeepAttr){if(!g.keepAttr){Pe(Z,l,B);continue}if(!Mt&&V(Xr,re)){Pe(Z,l,B);continue}if(ge&&(re=Rt(re)),!sr(F,ne,re)){Pe(Z,l,B);continue}re=fo(F,ne,he,re),re!==Ue&&ho(l,Z,he,re)&&ar&&Nr(t.removed)}}le(P.afterSanitizeAttributes,l,null),je(l,f)},Ve=function(l){let f=null;const _=Vt(l);for(le(P.beforeSanitizeShadowDOM,l,null);f=_.nextNode();)if(le(P.uponSanitizeShadowNode,f,null),Qt(f,l),en(f,l),xe(f.content)&&Ve(f.content),S(f)===H.element){const g=x(f);xe(g)&&(tn(g),Ve(g))}ge&&ir(l),le(P.afterSanitizeShadowDOM,l,null)},tn=function(l){const f=[{node:l,shadow:null}];for(;f.length>0;){const _=f.pop();if(_.shadow){Ve(_.shadow);continue}const g=_.node,y=S(g)===H.element,F=A(g);if(F)for(let B=F.length-1;B>=0;--B)f.push({node:F[B],shadow:null});if(y){const B=E?E(g):null;if(typeof B=="string"&&$(B)==="template"){const Z=g.content;xe(Z)&&f.push({node:Z,shadow:null})}}if(y){const B=x(g);xe(B)&&f.push({node:null,shadow:B},{node:B,shadow:null})}}};return t.sanitize=function(b){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,_=null,g=null,y=null;if(Jt=!b,Jt&&(b=""),typeof b!="string"&&!Ge(b)&&(b=_l(b),typeof b!="string"))throw ke("dirty is not a string, aborting");if(!t.isSupported)return b;Nt?(U=dt,J=mt):Ht(l),(P.uponSanitizeElement.length>0||P.uponSanitizeAttribute.length>0)&&(U=se(U)),P.uponSanitizeAttribute.length>0&&(J=se(J)),t.removed=[];const F=Ut&&typeof b!="string"&&Ge(b);let B=[];const Z=Te;if(F){uo(b);const ne=z(b);if(typeof ne=="string"){const Ue=$(ne);if(!U[Ue]||Ye[Ue])throw Zt(b),ke("root node is forbidden and cannot be sanitized in-place")}if(At(b))throw Zt(b),ke("root node is clobbered and cannot be sanitized in-place");B=Gt(b),Te=dn()}else if(Ge(b))f=rr(""),_=f.ownerDocument.importNode(b,!0),_.nodeType===H.element&&_.nodeName==="BODY"||_.nodeName==="HTML"?f=_:f.appendChild(_),tn(f);else{if(!Oe&&!ge&&!ye&&b.indexOf("<")===-1)return I&>?Le(b):b;if(f=rr(b),!f)return Oe?null:gt?N:""}f&&Pt&&Ce(f.firstChild);const he=F?b:f;try{F&&tn(b);const ne=Vt(he);for(;g=ne.nextNode();)Qt(g,he),en(g,he),xe(g.content)&&Ve(g.content);F&&io(b,B)}catch(ne){throw F&&(Zt(b),tr(b,B)),ne}finally{Te=Z}if(F){if(tr(b,B))throw ke("a node selected for removal could not be safely returned; refusing to sanitize in place");return ge&&Kt(b),b}if(Oe){if(ge&&Kt(f),_t)for(y=Mi.call(f.ownerDocument);f.firstChild;)y.appendChild(f.firstChild);else y=f;return(J.shadowroot||J.shadowrootmode)&&(y=Pi.call(i,y,!0)),y}let te=ye?f.outerHTML:f.innerHTML;return ye&&U["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&V(yl,f.ownerDocument.doctype.name)&&(te=" +`+te),ge&&(te=Rt(te)),I&>?Le(te):te},t.setConfig=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ht(b),Nt=!0,dt=U,mt=J},t.clearConfig=function(){Ne=null,Nt=!1,dt=null,mt=null,I=Q,N=""},t.isValidAttribute=function(b,l,f){Ne||Ht({});const _=$(b),g=$(l);return typeof f=="string"&&(lr(l,f)||!Mt&&V(Xr,f))?!1:sr(_,g,f)},t.addHook=function(b,l){typeof l=="function"&&ie(P,b)&&et(P[b],l)},t.removeHook=function(b,l){if(ie(P,b)){if(l!==void 0){const f=al(P[b],l);return f===-1?void 0:fl(P[b],f,1)[0]}return Nr(P[b])}},t.removeHooks=function(b){ie(P,b)&&(P[b]=[])},t.removeAllHooks=function(){P=Gr()},t}var Ll=Bi();const Tn="noopener noreferrer nofollow",Ol=/^\[([ xX])\] /;function Li(e){const t=e.trim().replace(/[\u0000-\u001f\u007f\s]+/g,"");return/^https:\/\/[^/\\]/i.test(t)||/^\/(?![/\\])/.test(t)?t:null}const ft=new nl({html:!1,linkify:!1,typographer:!1});ft.validateLink=()=>!0;function zl(e,t,n){const i=e[t+2];if(e[t+1]?.type!=="paragraph_open"||i?.type!=="inline"||!i.children)return;const r=Ol.exec(i.content),o=i.children[0];if(!r||o?.type!=="text"||!o.content.startsWith(r[0]))return;o.content=o.content.slice(r[0].length),i.content=i.content.slice(r[0].length),e[t].attrJoin("class","task-list-item");const s=new n.Token("html_inline","",0);s.content=r[1]===" "?'':'',i.children.unshift(s)}function Ml(e,t){const n=[],i=[];for(const r of e){if(r.type==="link_open"){const o=Ao(String(r.attrGet("href")??""));if(i.push(!o),!o)continue;(/^https?:/i.test(o)||t.env?.newTabLinks&&o.startsWith("/"))&&(r.attrSet("target","_blank"),r.attrSet("rel",Tn))}else if(r.type==="link_close"){if(i.pop())continue}else if(r.type==="image"){const o=Li(String(r.attrGet("src")??""));if(!o){const s=new t.Token("text","",0);s.content=t.md.renderer.renderInlineAsText(r.children??[],t.md.options,t.env),n.push(s);continue}r.attrSet("loading","lazy"),r.attrSet("decoding","async"),/^https:/i.test(o)&&r.attrSet("referrerpolicy","no-referrer")}n.push(r)}return n}ft.core.ruler.push("bm_safe",e=>{const t=e.tokens;for(let n=0;n`
${r.renderToken(e,t,n)}`;ft.renderer.rules.table_close=(e,t,n,i,r)=>`${r.renderToken(e,t,n)}
+`;const Nl={ALLOWED_TAGS:["p","h2","h3","h4","h5","h6","ul","ol","li","blockquote","pre","code","hr","strong","em","s","a","img","table","thead","tbody","tr","th","td","div","input","br"],ALLOWED_ATTR:["href","target","rel","src","alt","title","loading","decoding","referrerpolicy","class","style","type","checked","disabled","role","aria-label","tabindex"],ADD_URI_SAFE_ATTR:["target","rel","loading","decoding","referrerpolicy","type","checked","disabled","aria-label","tabindex"],ALLOWED_URI_REGEXP:/^(?:https?:|mailto:|#|\/(?![/\\]))/i,ALLOW_DATA_ATTR:!1,ALLOW_ARIA_ATTR:!1};let xn=null;function Pl(){if(xn)return xn;const e=Ll(window);return e.setConfig(Nl),e.addHook("uponSanitizeAttribute",(t,n)=>{const i=t.nodeName.toLowerCase(),r=n.attrValue.trim();let o=!0;n.attrName==="style"?o=(i==="th"||i==="td")&&/^text-align:\s*(left|center|right);?$/i.test(r):n.attrName==="class"?o=i==="li"&&r==="task-list-item"||i==="div"&&r==="table-scroll":n.attrName==="type"&&(o=i==="input"&&r==="checkbox"),o||(n.keepAttr=!1)}),e.addHook("afterSanitizeAttributes",t=>{t.nodeName==="IMG"?Li(t.getAttribute("src")??"")||t.replaceWith(t.ownerDocument.createTextNode(t.getAttribute("alt")??"")):t.nodeName==="A"?t.hasAttribute("target")&&(t.getAttribute("target")!=="_blank"&&t.setAttribute("target","_blank"),t.getAttribute("rel")!==Tn&&t.setAttribute("rel",Tn)):t.nodeName==="INPUT"&&(t.getAttribute("type")!=="checkbox"?t.remove():t.hasAttribute("disabled")||t.setAttribute("disabled",""))}),xn=e,e}function $l(e,t={}){if(!e)return"";const n=e.replace(/\r\n?/g,` +`).replace(/\u0000/g,""),i=ft.render(n,{newTabLinks:!!t.newTabLinks});return String(Pl().sanitize(i)).trim()}export{Wl as _,$l as r}; diff --git a/public/assets/materialListCache-DwqU8sxL.js b/public/assets/materialListCache-DwqU8sxL.js new file mode 100644 index 0000000..5206377 --- /dev/null +++ b/public/assets/materialListCache-DwqU8sxL.js @@ -0,0 +1 @@ +import{T as o}from"./index-BhVKyY57.js";const u=/^[a-z0-9-]{1,100}$/,g=/^[1-9]\d*$/,l=/^\d+$/;function p(e){const t=e.trim(),n=[...t].length;return n>=2&&n<=100?t:""}function a(e){const t=Array.isArray(e)?e[0]:e;return typeof t=="string"?t:""}function i(e){if(!g.test(e))return null;const t=Number(e);return Number.isSafeInteger(t)?t:null}function h(e){const t=a(e.type),n=a(e.tag),r=a(e.page),s=l.test(r)?Number(r):0;return{q:p(a(e.q)),course:i(a(e.course)),type:Object.hasOwn(o,t)?t:"",meeting:i(a(e.meeting)),tag:u.test(n)?n:"",page:Number.isSafeInteger(s)&&s>=1?s:1}}function c(e){const t={};return e.q&&(t.q=e.q),e.course!==null&&(t.course=String(e.course)),e.type&&(t.type=e.type),e.meeting!==null&&(t.meeting=String(e.meeting)),e.tag&&(t.tag=e.tag),e.page>1&&(t.page=String(e.page)),t}function S(e,t){return e.q===t.q&&e.course===t.course&&e.type===t.type&&e.meeting===t.meeting&&e.tag===t.tag&&e.page===t.page}function d(e){const t=c(e);return new URLSearchParams(Object.keys(t).sort().map(n=>[n,t[n]])).toString()}function w(e,t){const n=c(t),r=Object.keys(e);return r.length!==Object.keys(n).length?!1:r.every(s=>typeof e[s]=="string"&&e[s]===n[s])}function M(e,t){if(typeof e!="string"||!e)return!1;try{return t(e)==="materials"}catch{return!1}}function m(e){const t=new Map;return{get:n=>t.get(n),set(n,r){for(t.delete(n),t.set(n,r);t.size>e;)t.delete(t.keys().next().value)},clear(){t.clear()},get size(){return t.size}}}const f=m(20);function z(){f.clear()}export{d as a,M as b,z as c,w as i,f as m,p as n,h as r,S as s,c as w}; diff --git a/public/assets/materialQuery-Co-XzH2C.js b/public/assets/materialQuery-Co-XzH2C.js deleted file mode 100644 index 8ceff2c..0000000 --- a/public/assets/materialQuery-Co-XzH2C.js +++ /dev/null @@ -1 +0,0 @@ -import{T as c}from"./index-CtNAsql9.js";const u=/^[a-z0-9-]{1,100}$/,g=/^[1-9]\d*$/,l=/^\d+$/;function p(e){const t=e.trim(),n=[...t].length;return n>=2&&n<=100?t:""}function a(e){const t=Array.isArray(e)?e[0]:e;return typeof t=="string"?t:""}function i(e){if(!g.test(e))return null;const t=Number(e);return Number.isSafeInteger(t)?t:null}function f(e){const t=a(e.type),n=a(e.tag),r=a(e.page),s=l.test(r)?Number(r):0;return{q:p(a(e.q)),course:i(a(e.course)),type:Object.hasOwn(c,t)?t:"",meeting:i(a(e.meeting)),tag:u.test(n)?n:"",page:Number.isSafeInteger(s)&&s>=1?s:1}}function o(e){const t={};return e.q&&(t.q=e.q),e.course!==null&&(t.course=String(e.course)),e.type&&(t.type=e.type),e.meeting!==null&&(t.meeting=String(e.meeting)),e.tag&&(t.tag=e.tag),e.page>1&&(t.page=String(e.page)),t}function y(e,t){return e.q===t.q&&e.course===t.course&&e.type===t.type&&e.meeting===t.meeting&&e.tag===t.tag&&e.page===t.page}function h(e){const t=o(e);return new URLSearchParams(Object.keys(t).sort().map(n=>[n,t[n]])).toString()}function S(e,t){const n=o(t),r=Object.keys(e);return r.length!==Object.keys(n).length?!1:r.every(s=>typeof e[s]=="string"&&e[s]===n[s])}function d(e,t){if(typeof e!="string"||!e)return!1;try{return t(e)==="materials"}catch{return!1}}function w(e){const t=new Map;return{get:n=>t.get(n),set(n,r){for(t.delete(n),t.set(n,r);t.size>e;)t.delete(t.keys().next().value)},get size(){return t.size}}}export{d as a,w as b,S as i,h as m,p as n,f as r,y as s,o as w}; diff --git a/public/assets/pptx-i3lkIKMN.js b/public/assets/pptx-B3Fp3Q3v.js similarity index 99% rename from public/assets/pptx-i3lkIKMN.js rename to public/assets/pptx-B3Fp3Q3v.js index a97aee7..cb1170a 100644 --- a/public/assets/pptx-i3lkIKMN.js +++ b/public/assets/pptx-B3Fp3Q3v.js @@ -1,4 +1,4 @@ -import{aO as lt}from"./index-CtNAsql9.js";var rt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ea(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ut={exports:{}};var Mt;function ta(){return Mt||(Mt=1,(function(e,o){(function(t){e.exports=t()})(function(){return(function t(i,r,s){function l(a,n){if(!r[a]){if(!i[a]){var u=typeof nt=="function"&&nt;if(!n&&u)return u(a,!0);if(c)return c(a,!0);var g=new Error("Cannot find module '"+a+"'");throw g.code="MODULE_NOT_FOUND",g}var d=r[a]={exports:{}};i[a][0].call(d.exports,function(m){var h=i[a][1][m];return l(h||m)},d,d.exports,t,i,r,s)}return r[a].exports}for(var c=typeof nt=="function"&&nt,A=0;A>2,d=(3&a)<<4|n>>4,m=1>6:64,h=2>4,n=(15&g)<<4|(d=c.indexOf(A.charAt(h++)))>>2,u=(3&d)<<6|(m=c.indexOf(A.charAt(h++))),b[y++]=a,d!==64&&(b[y++]=n),m!==64&&(b[y++]=u);return b}},{"./support":30,"./utils":32}],2:[function(t,i,r){var s=t("./external"),l=t("./stream/DataWorker"),c=t("./stream/Crc32Probe"),A=t("./stream/DataLengthProbe");function a(n,u,g,d,m){this.compressedSize=n,this.uncompressedSize=u,this.crc32=g,this.compression=d,this.compressedContent=m}a.prototype={getContentWorker:function(){var n=new l(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new A("data_length")),u=this;return n.on("end",function(){if(this.streamInfo.data_length!==u.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),n},getCompressedWorker:function(){return new l(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(n,u,g){return n.pipe(new c).pipe(new A("uncompressedSize")).pipe(u.compressWorker(g)).pipe(new A("compressedSize")).withStreamInfo("compression",u)},i.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,i,r){var s=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,i,r){var s=t("./utils"),l=(function(){for(var c,A=[],a=0;a<256;a++){c=a;for(var n=0;n<8;n++)c=1&c?3988292384^c>>>1:c>>>1;A[a]=c}return A})();i.exports=function(c,A){return c!==void 0&&c.length?s.getTypeOf(c)!=="string"?(function(a,n,u,g){var d=l,m=g+u;a^=-1;for(var h=g;h>>8^d[255&(a^n[h])];return-1^a})(0|A,c,c.length,0):(function(a,n,u,g){var d=l,m=g+u;a^=-1;for(var h=g;h>>8^d[255&(a^n.charCodeAt(h))];return-1^a})(0|A,c,c.length,0):0}},{"./utils":32}],5:[function(t,i,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,i,r){var s=null;s=typeof Promise<"u"?Promise:t("lie"),i.exports={Promise:s}},{lie:37}],7:[function(t,i,r){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",l=t("pako"),c=t("./utils"),A=t("./stream/GenericWorker"),a=s?"uint8array":"array";function n(u,g){A.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=g,this.meta={}}r.magic="\b\0",c.inherits(n,A),n.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(c.transformTo(a,u.data),!1)},n.prototype.flush=function(){A.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},n.prototype.cleanUp=function(){A.prototype.cleanUp.call(this),this._pako=null},n.prototype._createPako=function(){this._pako=new l[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(g){u.push({data:g,meta:u.meta})}},r.compressWorker=function(u){return new n("Deflate",u)},r.uncompressWorker=function(){return new n("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,i,r){function s(d,m){var h,y="";for(h=0;h>>=8;return y}function l(d,m,h,y,v,b){var C,D,B=d.file,M=d.compression,_=b!==a.utf8encode,X=c.transformTo("string",b(B.name)),P=c.transformTo("string",a.utf8encode(B.name)),E=B.comment,J=c.transformTo("string",b(E)),L=c.transformTo("string",a.utf8encode(E)),S=P.length!==B.name.length,p=L.length!==E.length,T="",Z="",U="",ae=B.dir,Q=B.date,$={crc32:0,compressedSize:0,uncompressedSize:0};m&&!h||($.crc32=d.crc32,$.compressedSize=d.compressedSize,$.uncompressedSize=d.uncompressedSize);var F=0;m&&(F|=8),_||!S&&!p||(F|=2048);var R=0,K=0;ae&&(R|=16),v==="UNIX"?(K=798,R|=(function(q,Ae){var ye=q;return q||(ye=Ae?16893:33204),(65535&ye)<<16})(B.unixPermissions,ae)):(K=20,R|=(function(q){return 63&(q||0)})(B.dosPermissions)),C=Q.getUTCHours(),C<<=6,C|=Q.getUTCMinutes(),C<<=5,C|=Q.getUTCSeconds()/2,D=Q.getUTCFullYear()-1980,D<<=4,D|=Q.getUTCMonth()+1,D<<=5,D|=Q.getUTCDate(),S&&(Z=s(1,1)+s(n(X),4)+P,T+="up"+s(Z.length,2)+Z),p&&(U=s(1,1)+s(n(J),4)+L,T+="uc"+s(U.length,2)+U);var H="";return H+=` +import{aL as lt}from"./index-BhVKyY57.js";var rt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ea(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ut={exports:{}};var Mt;function ta(){return Mt||(Mt=1,(function(e,o){(function(t){e.exports=t()})(function(){return(function t(i,r,s){function l(a,n){if(!r[a]){if(!i[a]){var u=typeof nt=="function"&&nt;if(!n&&u)return u(a,!0);if(c)return c(a,!0);var g=new Error("Cannot find module '"+a+"'");throw g.code="MODULE_NOT_FOUND",g}var d=r[a]={exports:{}};i[a][0].call(d.exports,function(m){var h=i[a][1][m];return l(h||m)},d,d.exports,t,i,r,s)}return r[a].exports}for(var c=typeof nt=="function"&&nt,A=0;A>2,d=(3&a)<<4|n>>4,m=1>6:64,h=2>4,n=(15&g)<<4|(d=c.indexOf(A.charAt(h++)))>>2,u=(3&d)<<6|(m=c.indexOf(A.charAt(h++))),b[y++]=a,d!==64&&(b[y++]=n),m!==64&&(b[y++]=u);return b}},{"./support":30,"./utils":32}],2:[function(t,i,r){var s=t("./external"),l=t("./stream/DataWorker"),c=t("./stream/Crc32Probe"),A=t("./stream/DataLengthProbe");function a(n,u,g,d,m){this.compressedSize=n,this.uncompressedSize=u,this.crc32=g,this.compression=d,this.compressedContent=m}a.prototype={getContentWorker:function(){var n=new l(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new A("data_length")),u=this;return n.on("end",function(){if(this.streamInfo.data_length!==u.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),n},getCompressedWorker:function(){return new l(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(n,u,g){return n.pipe(new c).pipe(new A("uncompressedSize")).pipe(u.compressWorker(g)).pipe(new A("compressedSize")).withStreamInfo("compression",u)},i.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,i,r){var s=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,i,r){var s=t("./utils"),l=(function(){for(var c,A=[],a=0;a<256;a++){c=a;for(var n=0;n<8;n++)c=1&c?3988292384^c>>>1:c>>>1;A[a]=c}return A})();i.exports=function(c,A){return c!==void 0&&c.length?s.getTypeOf(c)!=="string"?(function(a,n,u,g){var d=l,m=g+u;a^=-1;for(var h=g;h>>8^d[255&(a^n[h])];return-1^a})(0|A,c,c.length,0):(function(a,n,u,g){var d=l,m=g+u;a^=-1;for(var h=g;h>>8^d[255&(a^n.charCodeAt(h))];return-1^a})(0|A,c,c.length,0):0}},{"./utils":32}],5:[function(t,i,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,i,r){var s=null;s=typeof Promise<"u"?Promise:t("lie"),i.exports={Promise:s}},{lie:37}],7:[function(t,i,r){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",l=t("pako"),c=t("./utils"),A=t("./stream/GenericWorker"),a=s?"uint8array":"array";function n(u,g){A.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=g,this.meta={}}r.magic="\b\0",c.inherits(n,A),n.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(c.transformTo(a,u.data),!1)},n.prototype.flush=function(){A.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},n.prototype.cleanUp=function(){A.prototype.cleanUp.call(this),this._pako=null},n.prototype._createPako=function(){this._pako=new l[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(g){u.push({data:g,meta:u.meta})}},r.compressWorker=function(u){return new n("Deflate",u)},r.uncompressWorker=function(){return new n("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,i,r){function s(d,m){var h,y="";for(h=0;h>>=8;return y}function l(d,m,h,y,v,b){var C,D,B=d.file,M=d.compression,_=b!==a.utf8encode,X=c.transformTo("string",b(B.name)),P=c.transformTo("string",a.utf8encode(B.name)),E=B.comment,J=c.transformTo("string",b(E)),L=c.transformTo("string",a.utf8encode(E)),S=P.length!==B.name.length,p=L.length!==E.length,T="",Z="",U="",ae=B.dir,Q=B.date,$={crc32:0,compressedSize:0,uncompressedSize:0};m&&!h||($.crc32=d.crc32,$.compressedSize=d.compressedSize,$.uncompressedSize=d.uncompressedSize);var F=0;m&&(F|=8),_||!S&&!p||(F|=2048);var R=0,K=0;ae&&(R|=16),v==="UNIX"?(K=798,R|=(function(q,Ae){var ye=q;return q||(ye=Ae?16893:33204),(65535&ye)<<16})(B.unixPermissions,ae)):(K=20,R|=(function(q){return 63&(q||0)})(B.dosPermissions)),C=Q.getUTCHours(),C<<=6,C|=Q.getUTCMinutes(),C<<=5,C|=Q.getUTCSeconds()/2,D=Q.getUTCFullYear()-1980,D<<=4,D|=Q.getUTCMonth()+1,D<<=5,D|=Q.getUTCDate(),S&&(Z=s(1,1)+s(n(X),4)+P,T+="up"+s(Z.length,2)+Z),p&&(U=s(1,1)+s(n(J),4)+L,T+="uc"+s(U.length,2)+U);var H="";return H+=` \0`,H+=s(F,2),H+=M.magic,H+=s(C,2),H+=s(D,2),H+=s($.crc32,4),H+=s($.compressedSize,4),H+=s($.uncompressedSize,4),H+=s(X.length,2),H+=s(T.length,2),{fileRecord:u.LOCAL_FILE_HEADER+H+X+T,dirRecord:u.CENTRAL_FILE_HEADER+s(K,2)+H+s(J.length,2)+"\0\0\0\0"+s(R,4)+s(y,4)+X+T+J}}var c=t("../utils"),A=t("../stream/GenericWorker"),a=t("../utf8"),n=t("../crc32"),u=t("../signature");function g(d,m,h,y){A.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=h,this.encodeFileName=y,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}c.inherits(g,A),g.prototype.push=function(d){var m=d.meta.percent||0,h=this.entriesCount,y=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,A.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:h?(m+100*(h-y-1))/h:100}}))},g.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var m=this.streamFiles&&!d.file.dir;if(m){var h=l(d,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:h.fileRecord,meta:{percent:0}})}else this.accumulate=!0},g.prototype.closedSource=function(d){this.accumulate=!1;var m=this.streamFiles&&!d.file.dir,h=l(d,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),m)this.push({data:(function(y){return u.DATA_DESCRIPTOR+s(y.crc32,4)+s(y.compressedSize,4)+s(y.uncompressedSize,4)})(d),meta:{percent:100}});else for(this.push({data:h.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},g.prototype.flush=function(){for(var d=this.bytesWritten,m=0;m=this.index;A--)a=(a<<8)+this.byteAt(A);return this.index+=c,a},readString:function(c){return s.transformTo("string",this.readData(c))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var c=this.readInt(4);return new Date(Date.UTC(1980+(c>>25&127),(c>>21&15)-1,c>>16&31,c>>11&31,c>>5&63,(31&c)<<1))}},i.exports=l},{"../utils":32}],19:[function(t,i,r){var s=t("./Uint8ArrayReader");function l(c){s.call(this,c)}t("../utils").inherits(l,s),l.prototype.readData=function(c){this.checkOffset(c);var A=this.data.slice(this.zero+this.index,this.zero+this.index+c);return this.index+=c,A},i.exports=l},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,i,r){var s=t("./DataReader");function l(c){s.call(this,c)}t("../utils").inherits(l,s),l.prototype.byteAt=function(c){return this.data.charCodeAt(this.zero+c)},l.prototype.lastIndexOfSignature=function(c){return this.data.lastIndexOf(c)-this.zero},l.prototype.readAndCheckSignature=function(c){return c===this.readData(4)},l.prototype.readData=function(c){this.checkOffset(c);var A=this.data.slice(this.zero+this.index,this.zero+this.index+c);return this.index+=c,A},i.exports=l},{"../utils":32,"./DataReader":18}],21:[function(t,i,r){var s=t("./ArrayReader");function l(c){s.call(this,c)}t("../utils").inherits(l,s),l.prototype.readData=function(c){if(this.checkOffset(c),c===0)return new Uint8Array(0);var A=this.data.subarray(this.zero+this.index,this.zero+this.index+c);return this.index+=c,A},i.exports=l},{"../utils":32,"./ArrayReader":17}],22:[function(t,i,r){var s=t("../utils"),l=t("../support"),c=t("./ArrayReader"),A=t("./StringReader"),a=t("./NodeBufferReader"),n=t("./Uint8ArrayReader");i.exports=function(u){var g=s.getTypeOf(u);return s.checkSupport(g),g!=="string"||l.uint8array?g==="nodebuffer"?new a(u):l.uint8array?new n(s.transformTo("uint8array",u)):new c(s.transformTo("array",u)):new A(u)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,i,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,i,r){var s=t("./GenericWorker"),l=t("../utils");function c(A){s.call(this,"ConvertWorker to "+A),this.destType=A}l.inherits(c,s),c.prototype.processChunk=function(A){this.push({data:l.transformTo(this.destType,A.data),meta:A.meta})},i.exports=c},{"../utils":32,"./GenericWorker":28}],25:[function(t,i,r){var s=t("./GenericWorker"),l=t("../crc32");function c(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(c,s),c.prototype.processChunk=function(A){this.streamInfo.crc32=l(A.data,this.streamInfo.crc32||0),this.push(A)},i.exports=c},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,i,r){var s=t("../utils"),l=t("./GenericWorker");function c(A){l.call(this,"DataLengthProbe for "+A),this.propName=A,this.withStreamInfo(A,0)}s.inherits(c,l),c.prototype.processChunk=function(A){if(A){var a=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=a+A.data.length}l.prototype.processChunk.call(this,A)},i.exports=c},{"../utils":32,"./GenericWorker":28}],27:[function(t,i,r){var s=t("../utils"),l=t("./GenericWorker");function c(A){l.call(this,"DataWorker");var a=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,A.then(function(n){a.dataIsReady=!0,a.data=n,a.max=n&&n.length||0,a.type=s.getTypeOf(n),a.isPaused||a._tickAndRepeat()},function(n){a.error(n)})}s.inherits(c,l),c.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this.data=null},c.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},c.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},c.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var A=null,a=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":A=this.data.substring(this.index,a);break;case"uint8array":A=this.data.subarray(this.index,a);break;case"array":case"nodebuffer":A=this.data.slice(this.index,a)}return this.index=a,this.push({data:A,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=c},{"../utils":32,"./GenericWorker":28}],28:[function(t,i,r){function s(l){this.name=l||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(l){this.emit("data",l)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(l){this.emit("error",l)}return!0},error:function(l){return!this.isFinished&&(this.isPaused?this.generatedError=l:(this.isFinished=!0,this.emit("error",l),this.previous&&this.previous.error(l),this.cleanUp()),!0)},on:function(l,c){return this._listeners[l].push(c),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(l,c){if(this._listeners[l])for(var A=0;A "+l:l}},i.exports=s},{}],29:[function(t,i,r){var s=t("../utils"),l=t("./ConvertWorker"),c=t("./GenericWorker"),A=t("../base64"),a=t("../support"),n=t("../external"),u=null;if(a.nodestream)try{u=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function g(m,h){return new n.Promise(function(y,v){var b=[],C=m._internalType,D=m._outputType,B=m._mimeType;m.on("data",function(M,_){b.push(M),h&&h(_)}).on("error",function(M){b=[],v(M)}).on("end",function(){try{var M=(function(_,X,P){switch(_){case"blob":return s.newBlob(s.transformTo("arraybuffer",X),P);case"base64":return A.encode(X);default:return s.transformTo(_,X)}})(D,(function(_,X){var P,E=0,J=null,L=0;for(P=0;P"u")r.blob=!1;else{var s=new ArrayBuffer(0);try{r.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var l=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);l.append(s),r.blob=l.getBlob("application/zip").size===0}catch{r.blob=!1}}}try{r.nodestream=!!t("readable-stream").Readable}catch{r.nodestream=!1}},{"readable-stream":16}],31:[function(t,i,r){for(var s=t("./utils"),l=t("./support"),c=t("./nodejsUtils"),A=t("./stream/GenericWorker"),a=new Array(256),n=0;n<256;n++)a[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;a[254]=a[254]=1;function u(){A.call(this,"utf-8 decode"),this.leftOver=null}function g(){A.call(this,"utf-8 encode")}r.utf8encode=function(d){return l.nodebuffer?c.newBufferFrom(d,"utf-8"):(function(m){var h,y,v,b,C,D=m.length,B=0;for(b=0;b>>6:(y<65536?h[C++]=224|y>>>12:(h[C++]=240|y>>>18,h[C++]=128|y>>>12&63),h[C++]=128|y>>>6&63),h[C++]=128|63&y);return h})(d)},r.utf8decode=function(d){return l.nodebuffer?s.transformTo("nodebuffer",d).toString("utf-8"):(function(m){var h,y,v,b,C=m.length,D=new Array(2*C);for(h=y=0;h>10&1023,D[y++]=56320|1023&v)}return D.length!==y&&(D.subarray?D=D.subarray(0,y):D.length=y),s.applyFromCharCode(D)})(d=s.transformTo(l.uint8array?"uint8array":"array",d))},s.inherits(u,A),u.prototype.processChunk=function(d){var m=s.transformTo(l.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(l.uint8array){var h=m;(m=new Uint8Array(h.length+this.leftOver.length)).set(this.leftOver,0),m.set(h,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var y=(function(b,C){var D;for((C=C||b.length)>b.length&&(C=b.length),D=C-1;0<=D&&(192&b[D])==128;)D--;return D<0||D===0?C:D+a[b[D]]>C?D:C})(m),v=m;y!==m.length&&(l.uint8array?(v=m.subarray(0,y),this.leftOver=m.subarray(y,m.length)):(v=m.slice(0,y),this.leftOver=m.slice(y,m.length))),this.push({data:r.utf8decode(v),meta:d.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=u,s.inherits(g,A),g.prototype.processChunk=function(d){this.push({data:r.utf8encode(d.data),meta:d.meta})},r.Utf8EncodeWorker=g},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,i,r){var s=t("./support"),l=t("./base64"),c=t("./nodejsUtils"),A=t("./external");function a(h){return h}function n(h,y){for(var v=0;v>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=s(this.extraFields[1].value);this.uncompressedSize===l.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===l.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===l.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===l.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var m,h,y,v=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4>>6:(d<65536?g[y++]=224|d>>>12:(g[y++]=240|d>>>18,g[y++]=128|d>>>12&63),g[y++]=128|d>>>6&63),g[y++]=128|63&d);return g},r.buf2binstring=function(u){return n(u,u.length)},r.binstring2buf=function(u){for(var g=new s.Buf8(u.length),d=0,m=g.length;d>10&1023,b[m++]=56320|1023&h)}return n(b,m)},r.utf8border=function(u,g){var d;for((g=g||u.length)>u.length&&(g=u.length),d=g-1;0<=d&&(192&u[d])==128;)d--;return d<0||d===0?g:d+A[u[d]]>g?d:g}},{"./common":41}],43:[function(t,i,r){i.exports=function(s,l,c,A){for(var a=65535&s|0,n=s>>>16&65535|0,u=0;c!==0;){for(c-=u=2e3>>1:l>>>1;c[A]=l}return c})();i.exports=function(l,c,A,a){var n=s,u=a+A;l^=-1;for(var g=a;g>>8^n[255&(l^c[g])];return-1^l}},{}],46:[function(t,i,r){var s,l=t("../utils/common"),c=t("./trees"),A=t("./adler32"),a=t("./crc32"),n=t("./messages"),u=0,g=4,d=0,m=-2,h=-1,y=4,v=2,b=8,C=9,D=286,B=30,M=19,_=2*D+1,X=15,P=3,E=258,J=E+P+1,L=42,S=113,p=1,T=2,Z=3,U=4;function ae(f,z){return f.msg=n[z],z}function Q(f){return(f<<1)-(4f.avail_out&&(I=f.avail_out),I!==0&&(l.arraySet(f.output,z.pending_buf,z.pending_out,I,f.next_out),f.next_out+=I,z.pending_out+=I,f.total_out+=I,f.avail_out-=I,z.pending-=I,z.pending===0&&(z.pending_out=0))}function R(f,z){c._tr_flush_block(f,0<=f.block_start?f.block_start:-1,f.strstart-f.block_start,z),f.block_start=f.strstart,F(f.strm)}function K(f,z){f.pending_buf[f.pending++]=z}function H(f,z){f.pending_buf[f.pending++]=z>>>8&255,f.pending_buf[f.pending++]=255&z}function q(f,z){var I,x,w=f.max_chain_length,k=f.strstart,G=f.prev_length,O=f.nice_match,N=f.strstart>f.w_size-J?f.strstart-(f.w_size-J):0,V=f.window,j=f.w_mask,Y=f.prev,ee=f.strstart+E,me=V[k+G-1],pe=V[k+G];f.prev_length>=f.good_match&&(w>>=2),O>f.lookahead&&(O=f.lookahead);do if(V[(I=z)+G]===pe&&V[I+G-1]===me&&V[I]===V[k]&&V[++I]===V[k+1]){k+=2,I++;do;while(V[++k]===V[++I]&&V[++k]===V[++I]&&V[++k]===V[++I]&&V[++k]===V[++I]&&V[++k]===V[++I]&&V[++k]===V[++I]&&V[++k]===V[++I]&&V[++k]===V[++I]&&kN&&--w!=0);return G<=f.lookahead?G:f.lookahead}function Ae(f){var z,I,x,w,k,G,O,N,V,j,Y=f.w_size;do{if(w=f.window_size-f.lookahead-f.strstart,f.strstart>=Y+(Y-J)){for(l.arraySet(f.window,f.window,Y,Y,0),f.match_start-=Y,f.strstart-=Y,f.block_start-=Y,z=I=f.hash_size;x=f.head[--z],f.head[z]=Y<=x?x-Y:0,--I;);for(z=I=Y;x=f.prev[--z],f.prev[z]=Y<=x?x-Y:0,--I;);w+=Y}if(f.strm.avail_in===0)break;if(G=f.strm,O=f.window,N=f.strstart+f.lookahead,V=w,j=void 0,j=G.avail_in,V=P)for(k=f.strstart-f.insert,f.ins_h=f.window[k],f.ins_h=(f.ins_h<=P&&(f.ins_h=(f.ins_h<=P)if(x=c._tr_tally(f,f.strstart-f.match_start,f.match_length-P),f.lookahead-=f.match_length,f.match_length<=f.max_lazy_match&&f.lookahead>=P){for(f.match_length--;f.strstart++,f.ins_h=(f.ins_h<=P&&(f.ins_h=(f.ins_h<=P&&f.match_length<=f.prev_length){for(w=f.strstart+f.lookahead-P,x=c._tr_tally(f,f.strstart-1-f.prev_match,f.prev_length-P),f.lookahead-=f.prev_length-1,f.prev_length-=2;++f.strstart<=w&&(f.ins_h=(f.ins_h<f.pending_buf_size-5&&(I=f.pending_buf_size-5);;){if(f.lookahead<=1){if(Ae(f),f.lookahead===0&&z===u)return p;if(f.lookahead===0)break}f.strstart+=f.lookahead,f.lookahead=0;var x=f.block_start+I;if((f.strstart===0||f.strstart>=x)&&(f.lookahead=f.strstart-x,f.strstart=x,R(f,!1),f.strm.avail_out===0)||f.strstart-f.block_start>=f.w_size-J&&(R(f,!1),f.strm.avail_out===0))return p}return f.insert=0,z===g?(R(f,!0),f.strm.avail_out===0?Z:U):(f.strstart>f.block_start&&(R(f,!1),f.strm.avail_out),p)}),new de(4,4,8,4,ye),new de(4,5,16,8,ye),new de(4,6,32,32,ye),new de(4,4,16,16,ce),new de(8,16,32,32,ce),new de(8,16,128,128,ce),new de(8,32,128,256,ce),new de(32,128,258,1024,ce),new de(32,258,258,4096,ce)],r.deflateInit=function(f,z){return ue(f,z,b,15,8,0)},r.deflateInit2=ue,r.deflateReset=we,r.deflateResetKeep=se,r.deflateSetHeader=function(f,z){return f&&f.state?f.state.wrap!==2?m:(f.state.gzhead=z,d):m},r.deflate=function(f,z){var I,x,w,k;if(!f||!f.state||5>8&255),K(x,x.gzhead.time>>16&255),K(x,x.gzhead.time>>24&255),K(x,x.level===9?2:2<=x.strategy||x.level<2?4:0),K(x,255&x.gzhead.os),x.gzhead.extra&&x.gzhead.extra.length&&(K(x,255&x.gzhead.extra.length),K(x,x.gzhead.extra.length>>8&255)),x.gzhead.hcrc&&(f.adler=a(f.adler,x.pending_buf,x.pending,0)),x.gzindex=0,x.status=69):(K(x,0),K(x,0),K(x,0),K(x,0),K(x,0),K(x,x.level===9?2:2<=x.strategy||x.level<2?4:0),K(x,3),x.status=S);else{var G=b+(x.w_bits-8<<4)<<8;G|=(2<=x.strategy||x.level<2?0:x.level<6?1:x.level===6?2:3)<<6,x.strstart!==0&&(G|=32),G+=31-G%31,x.status=S,H(x,G),x.strstart!==0&&(H(x,f.adler>>>16),H(x,65535&f.adler)),f.adler=1}if(x.status===69)if(x.gzhead.extra){for(w=x.pending;x.gzindex<(65535&x.gzhead.extra.length)&&(x.pending!==x.pending_buf_size||(x.gzhead.hcrc&&x.pending>w&&(f.adler=a(f.adler,x.pending_buf,x.pending-w,w)),F(f),w=x.pending,x.pending!==x.pending_buf_size));)K(x,255&x.gzhead.extra[x.gzindex]),x.gzindex++;x.gzhead.hcrc&&x.pending>w&&(f.adler=a(f.adler,x.pending_buf,x.pending-w,w)),x.gzindex===x.gzhead.extra.length&&(x.gzindex=0,x.status=73)}else x.status=73;if(x.status===73)if(x.gzhead.name){w=x.pending;do{if(x.pending===x.pending_buf_size&&(x.gzhead.hcrc&&x.pending>w&&(f.adler=a(f.adler,x.pending_buf,x.pending-w,w)),F(f),w=x.pending,x.pending===x.pending_buf_size)){k=1;break}k=x.gzindexw&&(f.adler=a(f.adler,x.pending_buf,x.pending-w,w)),k===0&&(x.gzindex=0,x.status=91)}else x.status=91;if(x.status===91)if(x.gzhead.comment){w=x.pending;do{if(x.pending===x.pending_buf_size&&(x.gzhead.hcrc&&x.pending>w&&(f.adler=a(f.adler,x.pending_buf,x.pending-w,w)),F(f),w=x.pending,x.pending===x.pending_buf_size)){k=1;break}k=x.gzindexw&&(f.adler=a(f.adler,x.pending_buf,x.pending-w,w)),k===0&&(x.status=103)}else x.status=103;if(x.status===103&&(x.gzhead.hcrc?(x.pending+2>x.pending_buf_size&&F(f),x.pending+2<=x.pending_buf_size&&(K(x,255&f.adler),K(x,f.adler>>8&255),f.adler=0,x.status=S)):x.status=S),x.pending!==0){if(F(f),f.avail_out===0)return x.last_flush=-1,d}else if(f.avail_in===0&&Q(z)<=Q(I)&&z!==g)return ae(f,-5);if(x.status===666&&f.avail_in!==0)return ae(f,-5);if(f.avail_in!==0||x.lookahead!==0||z!==u&&x.status!==666){var O=x.strategy===2?(function(N,V){for(var j;;){if(N.lookahead===0&&(Ae(N),N.lookahead===0)){if(V===u)return p;break}if(N.match_length=0,j=c._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++,j&&(R(N,!1),N.strm.avail_out===0))return p}return N.insert=0,V===g?(R(N,!0),N.strm.avail_out===0?Z:U):N.last_lit&&(R(N,!1),N.strm.avail_out===0)?p:T})(x,z):x.strategy===3?(function(N,V){for(var j,Y,ee,me,pe=N.window;;){if(N.lookahead<=E){if(Ae(N),N.lookahead<=E&&V===u)return p;if(N.lookahead===0)break}if(N.match_length=0,N.lookahead>=P&&0N.lookahead&&(N.match_length=N.lookahead)}if(N.match_length>=P?(j=c._tr_tally(N,1,N.match_length-P),N.lookahead-=N.match_length,N.strstart+=N.match_length,N.match_length=0):(j=c._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++),j&&(R(N,!1),N.strm.avail_out===0))return p}return N.insert=0,V===g?(R(N,!0),N.strm.avail_out===0?Z:U):N.last_lit&&(R(N,!1),N.strm.avail_out===0)?p:T})(x,z):s[x.level].func(x,z);if(O!==Z&&O!==U||(x.status=666),O===p||O===Z)return f.avail_out===0&&(x.last_flush=-1),d;if(O===T&&(z===1?c._tr_align(x):z!==5&&(c._tr_stored_block(x,0,0,!1),z===3&&($(x.head),x.lookahead===0&&(x.strstart=0,x.block_start=0,x.insert=0))),F(f),f.avail_out===0))return x.last_flush=-1,d}return z!==g?d:x.wrap<=0?1:(x.wrap===2?(K(x,255&f.adler),K(x,f.adler>>8&255),K(x,f.adler>>16&255),K(x,f.adler>>24&255),K(x,255&f.total_in),K(x,f.total_in>>8&255),K(x,f.total_in>>16&255),K(x,f.total_in>>24&255)):(H(x,f.adler>>>16),H(x,65535&f.adler)),F(f),0=I.w_size&&(k===0&&($(I.head),I.strstart=0,I.block_start=0,I.insert=0),V=new l.Buf8(I.w_size),l.arraySet(V,z,j-I.w_size,I.w_size,0),z=V,j=I.w_size),G=f.avail_in,O=f.next_in,N=f.input,f.avail_in=j,f.next_in=0,f.input=z,Ae(I);I.lookahead>=P;){for(x=I.strstart,w=I.lookahead-(P-1);I.ins_h=(I.ins_h<>>=P=X>>>24,C-=P,(P=X>>>16&255)===0)T[n++]=65535&X;else{if(!(16&P)){if((64&P)==0){X=D[(65535&X)+(b&(1<>>=P,C-=P),C<15&&(b+=p[A++]<>>=P=X>>>24,C-=P,!(16&(P=X>>>16&255))){if((64&P)==0){X=B[(65535&X)+(b&(1<>>=P,C-=P,(P=n-u)>3,b&=(1<<(C-=E<<3))-1,s.next_in=A,s.next_out=n,s.avail_in=A>>24&255)+(L>>>8&65280)+((65280&L)<<8)+((255&L)<<24)}function b(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function C(L){var S;return L&&L.state?(S=L.state,L.total_in=L.total_out=S.total=0,L.msg="",S.wrap&&(L.adler=1&S.wrap),S.mode=m,S.last=0,S.havedict=0,S.dmax=32768,S.head=null,S.hold=0,S.bits=0,S.lencode=S.lendyn=new s.Buf32(h),S.distcode=S.distdyn=new s.Buf32(y),S.sane=1,S.back=-1,g):d}function D(L){var S;return L&&L.state?((S=L.state).wsize=0,S.whave=0,S.wnext=0,C(L)):d}function B(L,S){var p,T;return L&&L.state?(T=L.state,S<0?(p=0,S=-S):(p=1+(S>>4),S<48&&(S&=15)),S&&(S<8||15=U.wsize?(s.arraySet(U.window,S,p-U.wsize,U.wsize,0),U.wnext=0,U.whave=U.wsize):(T<(Z=U.wsize-U.wnext)&&(Z=T),s.arraySet(U.window,S,p-T,Z,U.wnext),(T-=Z)?(s.arraySet(U.window,S,p-T,T,0),U.wnext=T,U.whave=U.wsize):(U.wnext+=Z,U.wnext===U.wsize&&(U.wnext=0),U.whave>>8&255,p.check=c(p.check,k,2,0),R=F=0,p.mode=2;break}if(p.flags=0,p.head&&(p.head.done=!1),!(1&p.wrap)||(((255&F)<<8)+(F>>8))%31){L.msg="incorrect header check",p.mode=30;break}if((15&F)!=8){L.msg="unknown compression method",p.mode=30;break}if(R-=4,f=8+(15&(F>>>=4)),p.wbits===0)p.wbits=f;else if(f>p.wbits){L.msg="invalid window size",p.mode=30;break}p.dmax=1<>8&1),512&p.flags&&(k[0]=255&F,k[1]=F>>>8&255,p.check=c(p.check,k,2,0)),R=F=0,p.mode=3;case 3:for(;R<32;){if(Q===0)break e;Q--,F+=T[U++]<>>8&255,k[2]=F>>>16&255,k[3]=F>>>24&255,p.check=c(p.check,k,4,0)),R=F=0,p.mode=4;case 4:for(;R<16;){if(Q===0)break e;Q--,F+=T[U++]<>8),512&p.flags&&(k[0]=255&F,k[1]=F>>>8&255,p.check=c(p.check,k,2,0)),R=F=0,p.mode=5;case 5:if(1024&p.flags){for(;R<16;){if(Q===0)break e;Q--,F+=T[U++]<>>8&255,p.check=c(p.check,k,2,0)),R=F=0}else p.head&&(p.head.extra=null);p.mode=6;case 6:if(1024&p.flags&&(Q<(q=p.length)&&(q=Q),q&&(p.head&&(f=p.head.extra_len-p.length,p.head.extra||(p.head.extra=new Array(p.head.extra_len)),s.arraySet(p.head.extra,T,U,q,f)),512&p.flags&&(p.check=c(p.check,T,q,U)),Q-=q,U+=q,p.length-=q),p.length))break e;p.length=0,p.mode=7;case 7:if(2048&p.flags){if(Q===0)break e;for(q=0;f=T[U+q++],p.head&&f&&p.length<65536&&(p.head.name+=String.fromCharCode(f)),f&&q>9&1,p.head.done=!0),L.adler=p.check=0,p.mode=12;break;case 10:for(;R<32;){if(Q===0)break e;Q--,F+=T[U++]<>>=7&R,R-=7&R,p.mode=27;break}for(;R<3;){if(Q===0)break e;Q--,F+=T[U++]<>>=1)){case 0:p.mode=14;break;case 1:if(E(p),p.mode=20,S!==6)break;F>>>=2,R-=2;break e;case 2:p.mode=17;break;case 3:L.msg="invalid block type",p.mode=30}F>>>=2,R-=2;break;case 14:for(F>>>=7&R,R-=7&R;R<32;){if(Q===0)break e;Q--,F+=T[U++]<>>16^65535)){L.msg="invalid stored block lengths",p.mode=30;break}if(p.length=65535&F,R=F=0,p.mode=15,S===6)break e;case 15:p.mode=16;case 16:if(q=p.length){if(Q>>=5,R-=5,p.ndist=1+(31&F),F>>>=5,R-=5,p.ncode=4+(15&F),F>>>=4,R-=4,286>>=3,R-=3}for(;p.have<19;)p.lens[G[p.have++]]=0;if(p.lencode=p.lendyn,p.lenbits=7,I={bits:p.lenbits},z=a(0,p.lens,0,19,p.lencode,0,p.work,I),p.lenbits=I.bits,z){L.msg="invalid code lengths set",p.mode=30;break}p.have=0,p.mode=19;case 19:for(;p.have>>16&255,ve=65535&w,!((ce=w>>>24)<=R);){if(Q===0)break e;Q--,F+=T[U++]<>>=ce,R-=ce,p.lens[p.have++]=ve;else{if(ve===16){for(x=ce+2;R>>=ce,R-=ce,p.have===0){L.msg="invalid bit length repeat",p.mode=30;break}f=p.lens[p.have-1],q=3+(3&F),F>>>=2,R-=2}else if(ve===17){for(x=ce+3;R>>=ce)),F>>>=3,R-=3}else{for(x=ce+7;R>>=ce)),F>>>=7,R-=7}if(p.have+q>p.nlen+p.ndist){L.msg="invalid bit length repeat",p.mode=30;break}for(;q--;)p.lens[p.have++]=f}}if(p.mode===30)break;if(p.lens[256]===0){L.msg="invalid code -- missing end-of-block",p.mode=30;break}if(p.lenbits=9,I={bits:p.lenbits},z=a(n,p.lens,0,p.nlen,p.lencode,0,p.work,I),p.lenbits=I.bits,z){L.msg="invalid literal/lengths set",p.mode=30;break}if(p.distbits=6,p.distcode=p.distdyn,I={bits:p.distbits},z=a(u,p.lens,p.nlen,p.ndist,p.distcode,0,p.work,I),p.distbits=I.bits,z){L.msg="invalid distances set",p.mode=30;break}if(p.mode=20,S===6)break e;case 20:p.mode=21;case 21:if(6<=Q&&258<=$){L.next_out=ae,L.avail_out=$,L.next_in=U,L.avail_in=Q,p.hold=F,p.bits=R,A(L,H),ae=L.next_out,Z=L.output,$=L.avail_out,U=L.next_in,T=L.input,Q=L.avail_in,F=p.hold,R=p.bits,p.mode===12&&(p.back=-1);break}for(p.back=0;de=(w=p.lencode[F&(1<>>16&255,ve=65535&w,!((ce=w>>>24)<=R);){if(Q===0)break e;Q--,F+=T[U++]<>se)])>>>16&255,ve=65535&w,!(se+(ce=w>>>24)<=R);){if(Q===0)break e;Q--,F+=T[U++]<>>=se,R-=se,p.back+=se}if(F>>>=ce,R-=ce,p.back+=ce,p.length=ve,de===0){p.mode=26;break}if(32&de){p.back=-1,p.mode=12;break}if(64&de){L.msg="invalid literal/length code",p.mode=30;break}p.extra=15&de,p.mode=22;case 22:if(p.extra){for(x=p.extra;R>>=p.extra,R-=p.extra,p.back+=p.extra}p.was=p.length,p.mode=23;case 23:for(;de=(w=p.distcode[F&(1<>>16&255,ve=65535&w,!((ce=w>>>24)<=R);){if(Q===0)break e;Q--,F+=T[U++]<>se)])>>>16&255,ve=65535&w,!(se+(ce=w>>>24)<=R);){if(Q===0)break e;Q--,F+=T[U++]<>>=se,R-=se,p.back+=se}if(F>>>=ce,R-=ce,p.back+=ce,64&de){L.msg="invalid distance code",p.mode=30;break}p.offset=ve,p.extra=15&de,p.mode=24;case 24:if(p.extra){for(x=p.extra;R>>=p.extra,R-=p.extra,p.back+=p.extra}if(p.offset>p.dmax){L.msg="invalid distance too far back",p.mode=30;break}p.mode=25;case 25:if($===0)break e;if(q=H-$,p.offset>q){if((q=p.offset-q)>p.whave&&p.sane){L.msg="invalid distance too far back",p.mode=30;break}Ae=q>p.wnext?(q-=p.wnext,p.wsize-q):p.wnext-q,q>p.length&&(q=p.length),ye=p.window}else ye=Z,Ae=ae-p.offset,q=p.length;for($_?(P=Ae[ye+y[S]],R[K+y[S]]):(P=96,0),b=1<>ae)+(C-=b)]=X<<24|P<<16|E|0,C!==0;);for(b=1<>=1;if(b!==0?(F&=b-1,F+=b):F=0,S++,--H[L]==0){if(L===T)break;L=u[g+y[S]]}if(Z>>7)]}function K(w,k){w.pending_buf[w.pending++]=255&k,w.pending_buf[w.pending++]=k>>>8&255}function H(w,k,G){w.bi_valid>v-G?(w.bi_buf|=k<>v-w.bi_valid,w.bi_valid+=G-v):(w.bi_buf|=k<>>=1,G<<=1,0<--k;);return G>>>1}function ye(w,k,G){var O,N,V=new Array(y+1),j=0;for(O=1;O<=y;O++)V[O]=j=j+G[O-1]<<1;for(N=0;N<=k;N++){var Y=w[2*N+1];Y!==0&&(w[2*N]=Ae(V[Y]++,Y))}}function ce(w){var k;for(k=0;k>1;1<=G;G--)se(w,V,G);for(N=ee;G=w.heap[1],w.heap[1]=w.heap[w.heap_len--],se(w,V,1),O=w.heap[1],w.heap[--w.heap_max]=G,w.heap[--w.heap_max]=O,V[2*N]=V[2*G]+V[2*O],w.depth[N]=(w.depth[G]>=w.depth[O]?w.depth[G]:w.depth[O])+1,V[2*G+1]=V[2*O+1]=N,w.heap[1]=N++,se(w,V,1),2<=w.heap_len;);w.heap[--w.heap_max]=w.heap[1],(function(pe,De){var qe,Pe,Ye,ge,tt,pt,Ne=De.dyn_tree,St=De.max_code,Zt=De.stat_desc.static_tree,jt=De.stat_desc.has_stree,$t=De.stat_desc.extra_bits,It=De.stat_desc.extra_base,Je=De.stat_desc.max_length,at=0;for(ge=0;ge<=y;ge++)pe.bl_count[ge]=0;for(Ne[2*pe.heap[pe.heap_max]+1]=0,qe=pe.heap_max+1;qe>=7;N>>=1)if(1&me&&Y.dyn_ltree[2*ee]!==0)return l;if(Y.dyn_ltree[18]!==0||Y.dyn_ltree[20]!==0||Y.dyn_ltree[26]!==0)return c;for(ee=32;ee>>3,(V=w.static_len+3+7>>>3)<=N&&(N=V)):N=V=G+5,G+4<=N&&k!==-1?x(w,k,G,O):w.strategy===4||V===N?(H(w,2+(O?1:0),3),we(w,J,L)):(H(w,4+(O?1:0),3),(function(Y,ee,me,pe){var De;for(H(Y,ee-257,5),H(Y,me-1,5),H(Y,pe-4,4),De=0;De>>8&255,w.pending_buf[w.d_buf+2*w.last_lit+1]=255&k,w.pending_buf[w.l_buf+w.last_lit]=255&G,w.last_lit++,k===0?w.dyn_ltree[2*G]++:(w.matches++,k--,w.dyn_ltree[2*(p[G]+u+1)]++,w.dyn_dtree[2*R(k)]++),w.last_lit===w.lit_bufsize-1},r._tr_align=function(w){H(w,2,3),q(w,C,J),(function(k){k.bi_valid===16?(K(k,k.bi_buf),k.bi_buf=0,k.bi_valid=0):8<=k.bi_valid&&(k.pending_buf[k.pending++]=255&k.bi_buf,k.bi_buf>>=8,k.bi_valid-=8)})(w)}},{"../utils/common":41}],53:[function(t,i,r){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,i,r){(function(s){(function(l,c){if(!l.setImmediate){var A,a,n,u,g=1,d={},m=!1,h=l.document,y=Object.getPrototypeOf&&Object.getPrototypeOf(l);y=y&&y.setTimeout?y:l,A={}.toString.call(l.process)==="[object process]"?function(D){process.nextTick(function(){b(D)})}:(function(){if(l.postMessage&&!l.importScripts){var D=!0,B=l.onmessage;return l.onmessage=function(){D=!1},l.postMessage("","*"),l.onmessage=B,D}})()?(u="setImmediate$"+Math.random()+"$",l.addEventListener?l.addEventListener("message",C,!1):l.attachEvent("onmessage",C),function(D){l.postMessage(u+D,"*")}):l.MessageChannel?((n=new MessageChannel).port1.onmessage=function(D){b(D.data)},function(D){n.port2.postMessage(D)}):h&&"onreadystatechange"in h.createElement("script")?(a=h.documentElement,function(D){var B=h.createElement("script");B.onreadystatechange=function(){b(D),B.onreadystatechange=null,a.removeChild(B),B=null},a.appendChild(B)}):function(D){setTimeout(b,0,D)},y.setImmediate=function(D){typeof D!="function"&&(D=new Function(""+D));for(var B=new Array(arguments.length-1),M=0;M"u"?s===void 0?this:s:self)}).call(this,typeof rt<"u"?rt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ut)),ut.exports}var aa=ta();const Nt=ea(aa);function Le(e,o,t,i){function r(s){return s instanceof t?s:new t(function(l){l(s)})}return new(t||(t=Promise))(function(s,l){function c(n){try{a(i.next(n))}catch(u){l(u)}}function A(n){try{a(i.throw(n))}catch(u){l(u)}}function a(n){n.done?s(n.value):r(n.value).then(c,A)}a((i=i.apply(e,[])).next())})}const oe=914400,et=12700,be=`\r `,ra=2147483649,ht=/^[0-9a-fA-F]{6}$/,na=1.67,oa=27,ze={type:"solid",color:"666666",pt:1},Qt=[.05,.1,.05,.1],Ue={color:"363636",pt:1},Me={color:"888888",style:"solid",size:1,cap:"flat"},xe="000000",ke=12,ia=18,Xe="LAYOUT_16x9",wt="DEFAULT",Ot="333333",Se={type:"outer",blur:3,offset:23e3/12700,angle:90,color:"000000",opacity:.35,rotateWithShape:!0},$e=[.5,.5,.5,.5],Et={color:"000000"},Aa={size:8,color:"FFFFFF",opacity:.75},Re="2094734552",it="2094734553",Ke="2094734554",xt="2094734555",Wt="2094734556",He="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),Ze=["C0504D","4F81BD","9BBB59","8064A2","4BACC6","F79646","628FC6","C86360","C0504D","4F81BD","9BBB59","8064A2","4BACC6","F79646","628FC6","C86360"],sa=["5DA5DA","FAA43A","60BD68","F17CB0","B2912F","B276B2","DECF3F","F15854","A7A7A7","5DA5DA","FAA43A","60BD68","F17CB0","B2912F","B276B2","DECF3F","F15854","A7A7A7"];var Ge;(function(e){e.left="left",e.center="center",e.right="right",e.justify="justify"})(Ge||(Ge={}));var Qe;(function(e){e.b="b",e.ctr="ctr",e.t="t"})(Qe||(Qe={}));const Vt="{F7021451-1387-4CA6-816F-3879F97B5CBC}";var Ct;(function(e){e.arraybuffer="arraybuffer",e.base64="base64",e.binarystring="binarystring",e.blob="blob",e.nodebuffer="nodebuffer",e.uint8array="uint8array"})(Ct||(Ct={}));var Lt;(function(e){e.area="area",e.bar="bar",e.bar3d="bar3D",e.bubble="bubble",e.bubble3d="bubble3D",e.doughnut="doughnut",e.line="line",e.pie="pie",e.radar="radar",e.scatter="scatter"})(Lt||(Lt={}));var Bt;(function(e){e.accentBorderCallout1="accentBorderCallout1",e.accentBorderCallout2="accentBorderCallout2",e.accentBorderCallout3="accentBorderCallout3",e.accentCallout1="accentCallout1",e.accentCallout2="accentCallout2",e.accentCallout3="accentCallout3",e.actionButtonBackPrevious="actionButtonBackPrevious",e.actionButtonBeginning="actionButtonBeginning",e.actionButtonBlank="actionButtonBlank",e.actionButtonDocument="actionButtonDocument",e.actionButtonEnd="actionButtonEnd",e.actionButtonForwardNext="actionButtonForwardNext",e.actionButtonHelp="actionButtonHelp",e.actionButtonHome="actionButtonHome",e.actionButtonInformation="actionButtonInformation",e.actionButtonMovie="actionButtonMovie",e.actionButtonReturn="actionButtonReturn",e.actionButtonSound="actionButtonSound",e.arc="arc",e.bentArrow="bentArrow",e.bentUpArrow="bentUpArrow",e.bevel="bevel",e.blockArc="blockArc",e.borderCallout1="borderCallout1",e.borderCallout2="borderCallout2",e.borderCallout3="borderCallout3",e.bracePair="bracePair",e.bracketPair="bracketPair",e.callout1="callout1",e.callout2="callout2",e.callout3="callout3",e.can="can",e.chartPlus="chartPlus",e.chartStar="chartStar",e.chartX="chartX",e.chevron="chevron",e.chord="chord",e.circularArrow="circularArrow",e.cloud="cloud",e.cloudCallout="cloudCallout",e.corner="corner",e.cornerTabs="cornerTabs",e.cube="cube",e.curvedDownArrow="curvedDownArrow",e.curvedLeftArrow="curvedLeftArrow",e.curvedRightArrow="curvedRightArrow",e.curvedUpArrow="curvedUpArrow",e.custGeom="custGeom",e.decagon="decagon",e.diagStripe="diagStripe",e.diamond="diamond",e.dodecagon="dodecagon",e.donut="donut",e.doubleWave="doubleWave",e.downArrow="downArrow",e.downArrowCallout="downArrowCallout",e.ellipse="ellipse",e.ellipseRibbon="ellipseRibbon",e.ellipseRibbon2="ellipseRibbon2",e.flowChartAlternateProcess="flowChartAlternateProcess",e.flowChartCollate="flowChartCollate",e.flowChartConnector="flowChartConnector",e.flowChartDecision="flowChartDecision",e.flowChartDelay="flowChartDelay",e.flowChartDisplay="flowChartDisplay",e.flowChartDocument="flowChartDocument",e.flowChartExtract="flowChartExtract",e.flowChartInputOutput="flowChartInputOutput",e.flowChartInternalStorage="flowChartInternalStorage",e.flowChartMagneticDisk="flowChartMagneticDisk",e.flowChartMagneticDrum="flowChartMagneticDrum",e.flowChartMagneticTape="flowChartMagneticTape",e.flowChartManualInput="flowChartManualInput",e.flowChartManualOperation="flowChartManualOperation",e.flowChartMerge="flowChartMerge",e.flowChartMultidocument="flowChartMultidocument",e.flowChartOfflineStorage="flowChartOfflineStorage",e.flowChartOffpageConnector="flowChartOffpageConnector",e.flowChartOnlineStorage="flowChartOnlineStorage",e.flowChartOr="flowChartOr",e.flowChartPredefinedProcess="flowChartPredefinedProcess",e.flowChartPreparation="flowChartPreparation",e.flowChartProcess="flowChartProcess",e.flowChartPunchedCard="flowChartPunchedCard",e.flowChartPunchedTape="flowChartPunchedTape",e.flowChartSort="flowChartSort",e.flowChartSummingJunction="flowChartSummingJunction",e.flowChartTerminator="flowChartTerminator",e.folderCorner="folderCorner",e.frame="frame",e.funnel="funnel",e.gear6="gear6",e.gear9="gear9",e.halfFrame="halfFrame",e.heart="heart",e.heptagon="heptagon",e.hexagon="hexagon",e.homePlate="homePlate",e.horizontalScroll="horizontalScroll",e.irregularSeal1="irregularSeal1",e.irregularSeal2="irregularSeal2",e.leftArrow="leftArrow",e.leftArrowCallout="leftArrowCallout",e.leftBrace="leftBrace",e.leftBracket="leftBracket",e.leftCircularArrow="leftCircularArrow",e.leftRightArrow="leftRightArrow",e.leftRightArrowCallout="leftRightArrowCallout",e.leftRightCircularArrow="leftRightCircularArrow",e.leftRightRibbon="leftRightRibbon",e.leftRightUpArrow="leftRightUpArrow",e.leftUpArrow="leftUpArrow",e.lightningBolt="lightningBolt",e.line="line",e.lineInv="lineInv",e.mathDivide="mathDivide",e.mathEqual="mathEqual",e.mathMinus="mathMinus",e.mathMultiply="mathMultiply",e.mathNotEqual="mathNotEqual",e.mathPlus="mathPlus",e.moon="moon",e.noSmoking="noSmoking",e.nonIsoscelesTrapezoid="nonIsoscelesTrapezoid",e.notchedRightArrow="notchedRightArrow",e.octagon="octagon",e.parallelogram="parallelogram",e.pentagon="pentagon",e.pie="pie",e.pieWedge="pieWedge",e.plaque="plaque",e.plaqueTabs="plaqueTabs",e.plus="plus",e.quadArrow="quadArrow",e.quadArrowCallout="quadArrowCallout",e.rect="rect",e.ribbon="ribbon",e.ribbon2="ribbon2",e.rightArrow="rightArrow",e.rightArrowCallout="rightArrowCallout",e.rightBrace="rightBrace",e.rightBracket="rightBracket",e.round1Rect="round1Rect",e.round2DiagRect="round2DiagRect",e.round2SameRect="round2SameRect",e.roundRect="roundRect",e.rtTriangle="rtTriangle",e.smileyFace="smileyFace",e.snip1Rect="snip1Rect",e.snip2DiagRect="snip2DiagRect",e.snip2SameRect="snip2SameRect",e.snipRoundRect="snipRoundRect",e.squareTabs="squareTabs",e.star10="star10",e.star12="star12",e.star16="star16",e.star24="star24",e.star32="star32",e.star4="star4",e.star5="star5",e.star6="star6",e.star7="star7",e.star8="star8",e.stripedRightArrow="stripedRightArrow",e.sun="sun",e.swooshArrow="swooshArrow",e.teardrop="teardrop",e.trapezoid="trapezoid",e.triangle="triangle",e.upArrow="upArrow",e.upArrowCallout="upArrowCallout",e.upDownArrow="upDownArrow",e.upDownArrowCallout="upDownArrowCallout",e.uturnArrow="uturnArrow",e.verticalScroll="verticalScroll",e.wave="wave",e.wedgeEllipseCallout="wedgeEllipseCallout",e.wedgeRectCallout="wedgeRectCallout",e.wedgeRoundRectCallout="wedgeRoundRectCallout"})(Bt||(Bt={}));var Ce;(function(e){e.text1="tx1",e.text2="tx2",e.background1="bg1",e.background2="bg2",e.accent1="accent1",e.accent2="accent2",e.accent3="accent3",e.accent4="accent4",e.accent5="accent5",e.accent6="accent6"})(Ce||(Ce={}));var Dt;(function(e){e.left="left",e.center="center",e.right="right",e.justify="justify"})(Dt||(Dt={}));var kt;(function(e){e.top="top",e.middle="middle",e.bottom="bottom"})(kt||(kt={}));var _e;(function(e){e.ACTION_BUTTON_BACK_OR_PREVIOUS="actionButtonBackPrevious",e.ACTION_BUTTON_BEGINNING="actionButtonBeginning",e.ACTION_BUTTON_CUSTOM="actionButtonBlank",e.ACTION_BUTTON_DOCUMENT="actionButtonDocument",e.ACTION_BUTTON_END="actionButtonEnd",e.ACTION_BUTTON_FORWARD_OR_NEXT="actionButtonForwardNext",e.ACTION_BUTTON_HELP="actionButtonHelp",e.ACTION_BUTTON_HOME="actionButtonHome",e.ACTION_BUTTON_INFORMATION="actionButtonInformation",e.ACTION_BUTTON_MOVIE="actionButtonMovie",e.ACTION_BUTTON_RETURN="actionButtonReturn",e.ACTION_BUTTON_SOUND="actionButtonSound",e.ARC="arc",e.BALLOON="wedgeRoundRectCallout",e.BENT_ARROW="bentArrow",e.BENT_UP_ARROW="bentUpArrow",e.BEVEL="bevel",e.BLOCK_ARC="blockArc",e.CAN="can",e.CHART_PLUS="chartPlus",e.CHART_STAR="chartStar",e.CHART_X="chartX",e.CHEVRON="chevron",e.CHORD="chord",e.CIRCULAR_ARROW="circularArrow",e.CLOUD="cloud",e.CLOUD_CALLOUT="cloudCallout",e.CORNER="corner",e.CORNER_TABS="cornerTabs",e.CROSS="plus",e.CUBE="cube",e.CURVED_DOWN_ARROW="curvedDownArrow",e.CURVED_DOWN_RIBBON="ellipseRibbon",e.CURVED_LEFT_ARROW="curvedLeftArrow",e.CURVED_RIGHT_ARROW="curvedRightArrow",e.CURVED_UP_ARROW="curvedUpArrow",e.CURVED_UP_RIBBON="ellipseRibbon2",e.CUSTOM_GEOMETRY="custGeom",e.DECAGON="decagon",e.DIAGONAL_STRIPE="diagStripe",e.DIAMOND="diamond",e.DODECAGON="dodecagon",e.DONUT="donut",e.DOUBLE_BRACE="bracePair",e.DOUBLE_BRACKET="bracketPair",e.DOUBLE_WAVE="doubleWave",e.DOWN_ARROW="downArrow",e.DOWN_ARROW_CALLOUT="downArrowCallout",e.DOWN_RIBBON="ribbon",e.EXPLOSION1="irregularSeal1",e.EXPLOSION2="irregularSeal2",e.FLOWCHART_ALTERNATE_PROCESS="flowChartAlternateProcess",e.FLOWCHART_CARD="flowChartPunchedCard",e.FLOWCHART_COLLATE="flowChartCollate",e.FLOWCHART_CONNECTOR="flowChartConnector",e.FLOWCHART_DATA="flowChartInputOutput",e.FLOWCHART_DECISION="flowChartDecision",e.FLOWCHART_DELAY="flowChartDelay",e.FLOWCHART_DIRECT_ACCESS_STORAGE="flowChartMagneticDrum",e.FLOWCHART_DISPLAY="flowChartDisplay",e.FLOWCHART_DOCUMENT="flowChartDocument",e.FLOWCHART_EXTRACT="flowChartExtract",e.FLOWCHART_INTERNAL_STORAGE="flowChartInternalStorage",e.FLOWCHART_MAGNETIC_DISK="flowChartMagneticDisk",e.FLOWCHART_MANUAL_INPUT="flowChartManualInput",e.FLOWCHART_MANUAL_OPERATION="flowChartManualOperation",e.FLOWCHART_MERGE="flowChartMerge",e.FLOWCHART_MULTIDOCUMENT="flowChartMultidocument",e.FLOWCHART_OFFLINE_STORAGE="flowChartOfflineStorage",e.FLOWCHART_OFFPAGE_CONNECTOR="flowChartOffpageConnector",e.FLOWCHART_OR="flowChartOr",e.FLOWCHART_PREDEFINED_PROCESS="flowChartPredefinedProcess",e.FLOWCHART_PREPARATION="flowChartPreparation",e.FLOWCHART_PROCESS="flowChartProcess",e.FLOWCHART_PUNCHED_TAPE="flowChartPunchedTape",e.FLOWCHART_SEQUENTIAL_ACCESS_STORAGE="flowChartMagneticTape",e.FLOWCHART_SORT="flowChartSort",e.FLOWCHART_STORED_DATA="flowChartOnlineStorage",e.FLOWCHART_SUMMING_JUNCTION="flowChartSummingJunction",e.FLOWCHART_TERMINATOR="flowChartTerminator",e.FOLDED_CORNER="folderCorner",e.FRAME="frame",e.FUNNEL="funnel",e.GEAR_6="gear6",e.GEAR_9="gear9",e.HALF_FRAME="halfFrame",e.HEART="heart",e.HEPTAGON="heptagon",e.HEXAGON="hexagon",e.HORIZONTAL_SCROLL="horizontalScroll",e.ISOSCELES_TRIANGLE="triangle",e.LEFT_ARROW="leftArrow",e.LEFT_ARROW_CALLOUT="leftArrowCallout",e.LEFT_BRACE="leftBrace",e.LEFT_BRACKET="leftBracket",e.LEFT_CIRCULAR_ARROW="leftCircularArrow",e.LEFT_RIGHT_ARROW="leftRightArrow",e.LEFT_RIGHT_ARROW_CALLOUT="leftRightArrowCallout",e.LEFT_RIGHT_CIRCULAR_ARROW="leftRightCircularArrow",e.LEFT_RIGHT_RIBBON="leftRightRibbon",e.LEFT_RIGHT_UP_ARROW="leftRightUpArrow",e.LEFT_UP_ARROW="leftUpArrow",e.LIGHTNING_BOLT="lightningBolt",e.LINE_CALLOUT_1="borderCallout1",e.LINE_CALLOUT_1_ACCENT_BAR="accentCallout1",e.LINE_CALLOUT_1_BORDER_AND_ACCENT_BAR="accentBorderCallout1",e.LINE_CALLOUT_1_NO_BORDER="callout1",e.LINE_CALLOUT_2="borderCallout2",e.LINE_CALLOUT_2_ACCENT_BAR="accentCallout2",e.LINE_CALLOUT_2_BORDER_AND_ACCENT_BAR="accentBorderCallout2",e.LINE_CALLOUT_2_NO_BORDER="callout2",e.LINE_CALLOUT_3="borderCallout3",e.LINE_CALLOUT_3_ACCENT_BAR="accentCallout3",e.LINE_CALLOUT_3_BORDER_AND_ACCENT_BAR="accentBorderCallout3",e.LINE_CALLOUT_3_NO_BORDER="callout3",e.LINE_CALLOUT_4="borderCallout4",e.LINE_CALLOUT_4_ACCENT_BAR="accentCallout3=4",e.LINE_CALLOUT_4_BORDER_AND_ACCENT_BAR="accentBorderCallout4",e.LINE_CALLOUT_4_NO_BORDER="callout4",e.LINE="line",e.LINE_INVERSE="lineInv",e.MATH_DIVIDE="mathDivide",e.MATH_EQUAL="mathEqual",e.MATH_MINUS="mathMinus",e.MATH_MULTIPLY="mathMultiply",e.MATH_NOT_EQUAL="mathNotEqual",e.MATH_PLUS="mathPlus",e.MOON="moon",e.NON_ISOSCELES_TRAPEZOID="nonIsoscelesTrapezoid",e.NOTCHED_RIGHT_ARROW="notchedRightArrow",e.NO_SYMBOL="noSmoking",e.OCTAGON="octagon",e.OVAL="ellipse",e.OVAL_CALLOUT="wedgeEllipseCallout",e.PARALLELOGRAM="parallelogram",e.PENTAGON="homePlate",e.PIE="pie",e.PIE_WEDGE="pieWedge",e.PLAQUE="plaque",e.PLAQUE_TABS="plaqueTabs",e.QUAD_ARROW="quadArrow",e.QUAD_ARROW_CALLOUT="quadArrowCallout",e.RECTANGLE="rect",e.RECTANGULAR_CALLOUT="wedgeRectCallout",e.REGULAR_PENTAGON="pentagon",e.RIGHT_ARROW="rightArrow",e.RIGHT_ARROW_CALLOUT="rightArrowCallout",e.RIGHT_BRACE="rightBrace",e.RIGHT_BRACKET="rightBracket",e.RIGHT_TRIANGLE="rtTriangle",e.ROUNDED_RECTANGLE="roundRect",e.ROUNDED_RECTANGULAR_CALLOUT="wedgeRoundRectCallout",e.ROUND_1_RECTANGLE="round1Rect",e.ROUND_2_DIAG_RECTANGLE="round2DiagRect",e.ROUND_2_SAME_RECTANGLE="round2SameRect",e.SMILEY_FACE="smileyFace",e.SNIP_1_RECTANGLE="snip1Rect",e.SNIP_2_DIAG_RECTANGLE="snip2DiagRect",e.SNIP_2_SAME_RECTANGLE="snip2SameRect",e.SNIP_ROUND_RECTANGLE="snipRoundRect",e.SQUARE_TABS="squareTabs",e.STAR_10_POINT="star10",e.STAR_12_POINT="star12",e.STAR_16_POINT="star16",e.STAR_24_POINT="star24",e.STAR_32_POINT="star32",e.STAR_4_POINT="star4",e.STAR_5_POINT="star5",e.STAR_6_POINT="star6",e.STAR_7_POINT="star7",e.STAR_8_POINT="star8",e.STRIPED_RIGHT_ARROW="stripedRightArrow",e.SUN="sun",e.SWOOSH_ARROW="swooshArrow",e.TEAR="teardrop",e.TRAPEZOID="trapezoid",e.UP_ARROW="upArrow",e.UP_ARROW_CALLOUT="upArrowCallout",e.UP_DOWN_ARROW="upDownArrow",e.UP_DOWN_ARROW_CALLOUT="upDownArrowCallout",e.UP_RIBBON="ribbon2",e.U_TURN_ARROW="uturnArrow",e.VERTICAL_SCROLL="verticalScroll",e.WAVE="wave"})(_e||(_e={}));var W;(function(e){e.AREA="area",e.BAR="bar",e.BAR3D="bar3D",e.BUBBLE="bubble",e.BUBBLE3D="bubble3D",e.DOUGHNUT="doughnut",e.LINE="line",e.PIE="pie",e.RADAR="radar",e.SCATTER="scatter"})(W||(W={}));var ct;(function(e){e.TEXT1="tx1",e.TEXT2="tx2",e.BACKGROUND1="bg1",e.BACKGROUND2="bg2",e.ACCENT1="accent1",e.ACCENT2="accent2",e.ACCENT3="accent3",e.ACCENT4="accent4",e.ACCENT5="accent5",e.ACCENT6="accent6"})(ct||(ct={}));var Te;(function(e){e.chart="chart",e.image="image",e.line="line",e.rect="rect",e.text="text",e.placeholder="placeholder"})(Te||(Te={}));var ne;(function(e){e.chart="chart",e.hyperlink="hyperlink",e.image="image",e.media="media",e.online="online",e.placeholder="placeholder",e.table="table",e.tablecell="tablecell",e.text="text",e.notes="notes"})(ne||(ne={}));var je;(function(e){e.title="title",e.body="body",e.image="pic",e.chart="chart",e.table="tbl",e.media="media"})(je||(je={}));var Oe;(function(e){e.DEFAULT="•",e.CHECK="✓",e.STAR="★",e.TRIANGLE="▶"})(Oe||(Oe={}));const We="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAB3CAYAAAD1oOVhAAAGAUlEQVR4Xu2dT0xcRRzHf7tAYSsc0EBSIq2xEg8mtTGebVzEqOVIolz0siRE4gGTStqKwdpWsXoyGhMuyAVJOHBgqyvLNgonDkabeCBYW/8kTUr0wsJC+Wfm0bfuvn37Znbem9mR9303mJnf/Pb7ed95M7PDI5JIJPYJV5EC7e3t1N/fT62trdqViQCIu+bVgpIHEo/Hqbe3V/sdYVKHyWSSZmZm8ilVA0oeyNjYmEnaVC2Xvr6+qg5fAOJAz4DU1dURGzFSqZRVqtMpAFIGyMjICC0vL9PExIRWKADiAYTNshYWFrRCARAOEFZcCKWtrY0GBgaUTYkBRACIE4rKZwqACALR5RQAqQCIDqcASIVAVDsFQCSAqHQKgEgCUeUUAPEBRIVTAMQnEBvK5OQkbW9vk991CoAEAMQJxc86BUACAhKUUwAkQCBBOAVAAgbi1ykAogCIH6cAiCIgsk4BEIVAZJwCIIqBVLqiBxANQFgXS0tLND4+zl08AogmIG5OSSQS1gGKwgtANAIRcQqAaAbCe6YASBWA2E6xDyeyDUl7+AKQMkDYYevm5mZHabA/Li4uUiaTsYLau8QA4gLE/hU7wajyYtv1hReDAiAOxQcHBymbzark4BkbQKom/X8dp9Npmpqasn4BIAYAYSnYp+4BBEAMUcCwNOCQsAKZnp62NtQOw8WmwT09PUo+ijaHsOMx7GppaaH6+nolH0Z10K2tLVpdXbW6UfV3mNqBdHd3U1NTk2rtlMRfW1uj2dlZAFGirkRQAJEQTWUTAFGprkRsAJEQTWUTAFGprkRsAJEQTWUTAFGprkRsAJEQTWUTAFGprkRsAJEQTWUTAFGprkRsAJEQTWUTAGHqrm8caPzQ0WC1logbeiC7X3xJm0PvUmRzh45cuki1588FAmVn9BO6P3yF9utrqGH0MtW82S8UN9RA9v/4k7InjhcJFTs/TLVXLwmJV67S7vD7tHF5pKi46fYdosdOcOOGG8j1OcqefbFEJD9Q3GCwDhqT31HklS4A8VRgfYM2Op6k3bt/BQJl58J7lPvwg5JYNccepaMry0LPqFA7hCm39+NNyp2J0172b19QysGINj5CsRtpij57musOViH0QPJQXn6J9u7dlYJSFkbrMYolrwvDAJAC+WWdEpQz7FTgECeUCpzi6YxvvqXoM6eEhqnCSgDikEzUKUE7Aw7xuHctKB5OYU3dZlNR9syQdAaAcAYTC0pXF+39c09o2Ik+3EqxVKqiB7hbYAxZkk4pbBaEM+AQofv+wTrFwylBOQNABIGwavdfe4O2pg5elO+86l99nY58/VUF0byrYsjiSFluNlXYrOHcBar7+EogUADEQ0YRGHbzoKAASBkg2+9cpM1rV0tK2QOcXW7bLEFAARAXIF4w2DrDWoeUWaf4hQIgDiA8GPZ2iNfi0Q8UACkAIgrDbrJ385eDxaPLLrEsFAB5oG6lMPJQPLZZZKAACBGVhcG2Q+bmuLu2nk55e4jqPv1IeEoceiBeX7s2zCa5MAqdstl91vfXwaEGsv/rb5TtOFk6tWXOuJGh6KmnhO9sayrMninPx103JBtXblHkice58cINZP4Hyr5wpkgkdiChEmc4FWazLzenNKa/p0jncwDiqcD6BuWePk07t1asatZGoYQzSqA4nFJ7soNiP/+EUyfc25GI2GG53dHPrKo1g/1Cw4pIXLrzO+1c+/wg7tBbFDle/EbQcjFCPWQJCau5EoBoFpzXHYDwFNJcDiCaBed1ByA8hTSXA4hmwXndAQhPIc3lAKJZcF53AMJTSHM5gGgWnNcdgPAU0lwOIJoF53UHIDyFNJcfSiCdnZ0Ui8U0SxlMd7lcjubn561gh+Y1scFIU/0o/3sgeLO12E2k7UXKYumgFoAYdg8ACIAYpoBh6cAhAGKYAoalA4cAiGEKGJYOHAIghilgWDpwCIAYpoBh6cAhAGKYAoalA4cAiGEKGJYOHAIghilgWDpwCIAYpoBh6ZQ4JB6PKzviYthnNy4d9h+1M5mMlVckkUjsG5dhiBMCEMPg/wuOfrZZ/RSywQAAAABJRU5ErkJggg==",la="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAVnCAYAAACzfHDVAAAAYHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjaVcjJDYAwDEXBu6ughBfH+YnLQSwSHVA+Yrkwx7HtPHabHuEWrQ+lBBAZ6TMweBWoCwUH8quZH6VWFXVT696zxp12ARkVFEqn8wB8AAAACXBIWXMAAC4jAAAuIwF4pT92AADZLklEQVR42uzdd5hV9Z0/8M+dmcsUZmDovYOhKCiKYhR7JJuoSTCWGFI0WUxijBoTTXazVlyza4maYm9rTRSJigVsqCDNQhHBAogKCEgRMjMMU+7vj93sL8kqClLmnPt6PY+PeXZM9vP9vO8jZ+Y955xMfJLjorBrRMuSgmiViyjN1Ee2oSCyucbIBAAAAAAAAADbXaYgcoWNUZcrirpMbdRsysa69wbF+rggGrf439vSF7seF12aFUTnxvoosGIAAAAAAACAXacgoqEgF++/VRgr4r5o+Kh/pvD//F8uiII+LaPrum/EXzqui2b1ddHGKgEAAAAAAAB2rVxEQWMmWrQtjHZlA6N2w2tR84//zP8pgHu3ib6NBdG+zdqorK6KVUXZaB85j3sGAAAAAAAAaAoaG6OwIBdtyneP2PBabPzbr/1dAdx3VHRtyESHiIhcYzQrLo7WmVzkcjmPgAYAAAAAAABoSgpy0eIfS+D/LYD7fy3abC6Inn/7X2hsjELlLwAAAAAAAEDT9D8lcM1fHwddFBFxyAVR9M686PVp/gfqayKiJiLqLBMAAAAAAABgh8hGRGlEUekn/6PFEb3ikNgQk6O+KCJi6dzoksv83/cB/1X9xoiaJdmoWxlRV1dk2QAAAAAAAAA7QTZbH9muERX96v7n9t7/q6Exinq3i86LI94pjOOisHUu+uYykfmof7h+Y8Sa6aVRt74gGhs9DRoAAAAAAABgZ2lsLIi69QWxeUUmSjs0/vedwR8hk4uydSfE+wVd6qOyMfMx7/mtj9jwUtbjngEAAAAAAAB2obrqolg7IxtR/9Ffb4wo7P5GtCwobRaVH/c/UvNmNuqqPfIZAAAAAAAAYFerqy6KmjezH/v1ktpoVZBr/PgCeMN7yl8AAAAAAACApmJLHW5jUVQWNDSP+Q3ZeLco4i9/+8X6teHRzwAAAAAAAABNSd3/dLn/oLAoqqIuVhXFxhhSGB/xqGjlLwAAAAAAAECTU1eTjaK/KXSLIv7SWB+bc5ko9YxnAAAAAAAAgATJFv393bz1EeV//c8F1gMAAAAAAACQDgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKSEAhgAAAAAAAAgJRTAAAAAAAAAACmhAAYAAAAAAABICQUwAAAAAAAAQEoogAEAAAAAAABSQgEMAAAAAAAAkBIKYAAAAAAAAICUUAADAAAAAAAApIQCGAAAAAAAACAlFMAAAAAAAAAAKaEABgAAAAAAAEgJBTAAAAAAAABASiiAAQAAAAAAAFJCAQwAAAAAAACQEgpgAAAAAAAAgJRQAAMAAAAAAACkhAIYAAAAAAAAICUUwAAAAAAAAAApoQAGAAAAAAAASAkFMAAAAAAAAEBKKIABAAAAAAAAUkIBDAAAAAAAAJASCmAAAAAAAACAlFAAAwAAAAAAAKREkRUAAACwrUpLSwuGDRvWfMCAAS26du3avKysrLiioqKkZcuWzZs1a1bcvHnz0tLS0rJsNtusuLi4ebNmzUoLCgo+8/eijY2N9Zs3b66pra2tqqur21xTU1NdVVVVs2nTptqNGzdWbdiwoeYvf/nL5hUrVlQtWLBgw6xZs6pqamoaJQYAAEDaKYABAACIiIghQ4aUHnTQQW379u3bql27dq3at2/fpkWLFq2bN29eWVpa2qpZs2bNCwsLm2ez2fLCwsLyoqKi8sLCwtKknK+hoaG6vr6+qqGh4S91dXV/aWhoqNq8eXNVTU3NuqqqqvUbNmxYu2rVqjWrV69e99Zbb6177rnnPpgzZ06NTwYAAABJogAGAADIA8OGDWt+xBFHdBwwYECnLl26dGjdunXHFi1adCgtLe1YUlLSvlmzZq0KCgqK07yDwsLCssLCwrKIaPdp/zuNjY21mzdvXrdp06ZVNTU172/YsGHl2rVr31+2bNnKBQsWrHjyySffnzVrVpVPGAAAAE1Fpuexsd9HfaF+ZcSal0ptCAAAIAE6deqUPf744zvtueeeXbp3796lbdu2XSorKzuXlpZ2KS0t7VBYWFhhSztGQ0PDxpqampU1NTXL169fv+yDDz5Y9s477yybPXv2sj/96U8rVqxYUWdLAAAAbE9t9q6Jog4f/TUFMAAAQEJks9nMt7/97Y4jRozo1bdv397t2rXrXl5e3rWsrKxzcXFx+4gosKUmp7G2tnZVTU3Nso0bNy5btWrV0tdff/2tJ598cvG999672noAAADYFgpgAACAhPne977X6a9Fb/v27Xu1bNmyV1lZWa8kvXOXLauvr9/wl7/8ZdG6desWL1u2bNHChQsX/fGPf1w8derUjbYDAADAliiAAQAAmqhsNps59dRTuxx66KH9+/Tp87n27dv3Ly8v719UVOSRzXlq06ZNKzZu3Pj6+++//8abb775xqOPPvrG3XffvcpmAAAA+CsFMAAAQBNx6qmndvniF784qHfv3v3btWv3uYqKis8VFhaW2wxbUl9fv37Dhg1vfPDBB68vXrz4jccee2z+jTfeuNxmAAAA8pMCGAAAYBc45phjWn/rW9/aq3///kPatGnTv6Kiop9HOLO9NDQ0VG/cuPGtNWvWLFy4cOGcO+6445WHHnporc0AAACknwIYAABgJzjjjDO6f+lLX9qrV69eg1u3bj2orKysR0RkbIadJFddXb103bp18xcvXjz30UcffeXqq69+x1oAAADSRwEMAACwnZWWlhb86le/2u3QQw8d1r17931btmw5qLCwsMxmaEoaGhqqP/zww/nvvPPOzGeeeWbW2LFj36ipqWm0GQAAgGRTAAMAAGwHP/7xj7t+9atf3bdXr15D27Ztu1c2m21jKyRJXV3dmg8++OCVRYsWvfznP/95xh/+8IdltgIAAJA8CmAAAIBtcOKJJ7Y75ZRTDujXr9+w1q1bD81ms61shTSpq6tbt3bt2pfffPPNWbfccsvUe++9d7WtAAAANH0KYAAAgE+hoqKi4IILLhg0YsSI/bp27bpfy5YtB2YymUKbIR/kcrmGDz/8cP6777474/nnn59x4YUXvrZx40aPiwYAAGiCFMAAAAAf4/jjj2/7/e9//8D+/fsf2Lp1630KCgpKbAUiGhsbN61fv37eW2+9NeWGG2545u67715lKwAAAE2DAhgAAOB/ZLPZzAUXXPC5I4888sDu3bsfWFFRsVtEFNgMbFl1dfWSd999d8qsWbNmnnvuuS+vW7euwVYAAAB2DQUwAACQ10pLSwsuvfTSQYcccsjBXbt2HVFWVtbDVmDb1dbWrnr//fdfmDp16uRf/vKXL65evbreVgAAAHYeBTAAAJB3Bg0aVHrBBRd8fs899zywQ4cOBxQVFbWwFdj+Ghsba9euXTtrzpw5T59//vmTX3755WpbAQAA2LEUwAAAQF4YNmxY8/POO+/gIUOGHOZ9vrDz/W0ZfNFFFz07a9asKlsBAADY/hTAAABAarVq1arwyiuv3HfEiBEjO3TocFBhYWGZrcCu19DQUP3+++8/O2XKlIk/+clPZm7cuLHRVgAAALYPBTAAAJAqrVq1Kvztb3+7/3777Xd4x44dRxQWFpbbCjRdDQ0NG99///0pM2bMeOqHP/zhC8pgAACAz0YBDAAApMJZZ53V45vf/OaRvXr1GllaWtrVRiB5ampq3l28ePHEO++8c9LVV1/9jo0AAABsPQUwAACQWMOHDy+/6KKLvjB48OCjW7RoMdBGID0+/PDDV+fNmzfhvPPOe3L69Ol/sREAAIBPRwEMAAAkSqtWrQpvuOGGQ/bbb79/atOmzX6ZTCZrK5BeuVyubs2aNTNmzJjx2JgxYyavW7euwVYAAAA+ngIYAABIhB//+Mddv/e9732lZ8+e/1RcXNzWRiD/1NbWfvD2228/dssttzz029/+9l0bAQAA+L8UwAAAQJNVUVFRcO21137+4IMPPrZ169b7ZTKZAlsBIqJxzZo1M59//vnxp5122hR3BQMAAPx/CmAAAKDJOeWUUzqefvrpx/bu3ftL2Wy2jY0AH6e+vn7j0qVLH/vd7373x+uvv36ZjQAAAPlOAQwAADQJ2Ww2c+uttx5wyCGHnNC6deu9I8LdvsDWaFy7du1L06ZN+/OPfvSjZ1evXl1vJQAAQD5SAAMAALtU//79S6655pp/2nPPPY8tLy/vayPAZ1VTU7NswYIF488999wHp06dutFGAACAfKIABgAAdomf//znPU855ZQTu3btemRhYWGZjQDbW2NjY92KFSuevOWWW+689NJLF9kIAACQDxTAAADATuMxz8Cusn79+rlPP/30f5188slT6+rqcjYCAACklQIYAADY4fr27Vv8hz/84a+Pee5nI8CuUlNT8+68efPu/8EPfvDgwoULN9kIAACQNgpgAABghxkyZEjpNddc89XBgwefWFxc3MFGgKaitrZ21dy5c+/5yU9+8uc5c+bU2AgAAJAWWyqAPYoNAADYJqNHj+4wb968n06ZMuXRYcOGnaH8BZqa4uLi9sOGDTtjypQpj86bN++nJ510UntbAQAA0s4dwAAAwFY599xze33/+9//dufOnY/IZDJZGwGSIpfL1S1fvvzJG2644fbLLrvsbRsBAACSyiOgAQCAz+y8887r+53vfOfbHTt2PDyTyRTaCJBUuVyuYcWKFU/cdNNN//XrX/96sY0AAABJowAGAAC22WWXXTboG9/4xg9at249zDaAtFm7du2su++++9pzzjnnNdsAAACSQgEMAABsNcUvkE8UwQAAQJIogAEAgE9N8Qvks7Vr18665557rvv5z38+3zYAAICmaksFcGHlwOj6UV9orIqoWZG1PQAAyBO/+MUvet9xxx3nHHrooT8pLS3tYiNAPiotLe2y7777HvP973+/X1lZ2ZIpU6assxUAAKCpKetcHwXlH/01BTAAAOS5M844o/u99957zpe//OWflZeX94qIjK0AeS5TXl7e8+CDDx71/e9/v3dEvDVjxowPrQUAAGgqFMAAAMD/ceKJJ7a77777fjJq1Kh/KS8v7xOKX4B/lCkvL+99+OGHj/rWt77VfvXq1Qvnz59fbS0AAMCutqUC2DuAAQAgzwwdOrTs+uuvP6l///4nFRYWltkI20NjY2Ns2rQpqquro6amJurr62PTpk2xefPmqK+vj+rq6qivr4/NmzfHpk2boqGhYZv/fxUWFkZJSUk0a9YsioqKoqysLIqKiqJZs2ZRUlISRUVFUVpa+r9/FRQUCIjtoqGhoeq11167a8yYMffMmTOnxkYAAIBdZUvvAFYAAwBAnujUqVP2nnvuGbXXXnudnM1mK22Ej9PQ0BAbN26MDRs2/J+/Nm7cGBs3boyamprYtGlTbNq0KWpqaqK2trbJnqe4uDhKSkqitLT0f/9eUVERFRUV0aJFi//zV0VFRRQWFvog8LHq6urWvvjii7eceOKJf169enW9jQAAADubAhgAAPLcXXfdddAXv/jF00tLS7vZRn7L5XKxYcOGWLt2baxbty7Wrl37d3+tW7cuNmzYkPd7atGiRbRu3TpatWoVrVu3jjZt2vzvf27dunW0aNHCh4morq5e+sgjj1zzne98Z6ptAAAAO5MCGAAA8tTVV189+MQTTzyzoqJioG3kj8bGxli5cmUsX748Pvjgg1i9evX//n3t2rXR2NhoSZ9RYWFhtGrVKtq1axdt27b937937tw5OnTo4LHTeWbDhg3z77333qvOPPPMebYBAADsDApgAADIM1/72tfaXHrppad27979qIjQRKVUQ0NDrFq1KlasWBHvv//+//595cqVTfqRzGlXXFwcHTp0iI4dO0bnzp2jY8eO0alTp2jXrp1HS6dYLpdrfOeddx76+c9/fv2ECRPW2QgAALAjKYABACBP9OrVq9ldd931jT322OM7hYWFZTaSHh9++GG88847sXTp0njvvfdixYoVsXr16mhoaLCchCgsLIz27dtHp06dolu3btG9e/fo3r27x0mnTENDQ9W8efNu++Y3v/nHJUuWbLYRAABgR1AAAwBAHrjrrrtG/NM//dOZJSUlXWwj2davXx9Lly6Nd955539L3w8//NBiUqqysvJ/y+C//tWqVSuLSbiamppljz322G9Gjx49xTYAAIDtTQEMAAAp9qtf/arPD3/4w5+1atVqL9tIno0bN8aSJUvirbfeikWLFsV7770XmzZtspg8V1JSEl27do0+ffpE3759o3fv3lFeXm4xCbRu3bqXr7322ivGjh27yDYAAIDtRQEMAAApNGjQoNI77rjju7vttttJBQUFWRtJhtWrV8ebb74ZixcvjiVLlsTy5cujsbHRYtiigoKC6Ny5c/Tu3Tt69+4d/fr1i7Zt21pMQjQ2Nta98cYbd33rW9+6ff78+TU2AgAAfFYKYAAASJHS0tKCBx988Jj99tvvn7PZbBsbaboaGhri7bffjrfeeisWLFgQS5YscXcv201FRUX06tUr+vbtG3379o2ePXtGYWGhxTRhdXV1a2bMmHHjV77ylYdqamr85gcAALDNFMAAAJASp59+erdf/vKX51ZWVu5jG03T6tWr47XXXouFCxfGm2++GRs3brQUdooWLVpE3759Y8CAATFw4EB3CDdh69evf/E//uM//vPqq69+xzYAAIBtoQAGAICEGzRoUOm99977w969ex+byWTc4teErF+/PubNmxcLFiyIN954Q+FLk9GiRYvo169fDBgwIPbYY4+orKy0lCYkl8s1LF68eNyJJ554rcdCAwAAW0sBDAAACXbNNdcMOemkk35RVlbWyzZ2vVwuF++++27MnTs3XnvttViyZIl3+NLkFRQURK9evWLQoEExePDg6Natm6U0EdXV1UvuvvvuX//kJz+ZYxsAAMCnpQAGAIAEOuqoo1r99re//VmHDh0Ot41da9OmTTF79uyYO3duLFy4MKqqqiyFRGvevHn0798/Bg8eHHvuuWeUlJRYyi62cuXKp04//fTLJ0yYsM42AACAT6IABgCAhBk3btwRRxxxxFnZbLaNbewaVVVVMXfu3Jg7d27Mnz8/amtrLYVUKi4ujoEDB8bgwYNj8ODBUV5ebim7SF1d3ZqnnnrqqlGjRj1hGwAAwJYogAEAICFOOeWUjhdddNEvW7duvZ9t7HwrV66MWbNmxdy5c+Odd96JXC5nKeSdzp07x9577x3Dhg2LDh06WMgusHbt2hnnnXfepbfccsv7tgEAAHwUBTAAADRxpaWlBU899dQ3Bw8e/L2CggLPYt2JVqxYES+99FK89NJLsXz5cguBv/HXMnjvvfeOTp06WchO1NjYuGnu3Lk3H3744XfV1NR40TgAAPB3FMAAANCEjR49usOll176yzZt2gy3jZ1j/fr18eKLL8bMmTNj6dKlFgKfQs+ePWPfffeNYcOGRYsWLSxkJ1mzZs0L55577q/vvvvuVbYBAAD8lQIYAACaoIqKioKJEyd+c/Dgwd8vKCgotpEda8OGDfHiiy/G9OnTlb7wGfXo0SOGDx8ew4YNi4qKCgvZwdwNDAAA/CMFMAAANDGnnHJKx7Fjx/5rZWXlMNvYcerr6+PVV1+NGTNmxLx586Kurs5SYDvKZrMxZMiQ2HfffWP33XePwsJCS9mB1q5dO+MXv/jFv995550rbQMAAPKbAhgAAJqIbDabeeKJJ47fZ599fuSu3x0jl8vFwoULY/r06TF79uzYtGmTpcBOUFpaGkOGDInhw4fHgAEDLGQHaWhoqJ42bdo1Rx555J9tAwAA8pcCGAAAmoDjjz++7ZVXXvmr1q1be9fvDrBmzZqYNm1azJw5M1audHMc7EodO3aMz3/+87H//vt7X/CO+3fetDPPPPOScePGfWAbAACQfxTAAACwi9100037HXvssf9WXFzc1ja2n1wuF6+99lo8//zzMW/evKivr7cUaEKKiopizz33jBEjRsTnPve5yGQylrId1dbWrvrjH/948Q9+8INZtgEAAPlFAQwAALvIkCFDSu+///5zunTp8k+2sf2sXbs2Jk+eHNOnT48PP/zQQiABKisrY8SIEXHIIYdEeXm5hWxHy5Yte+zrX//6f86ZM6fGNgAAID9sqQAurBwYXT/qC41VETUrsrYHAADb6IILLtjt97///VVt2rQZZhvbx+LFi2P8+PFx9913xxtvvBG1tbWWAgmxadOmeOONN+LZZ5+NtWvXRps2bTweejtp0aJFv5NOOumg0tLSuc8+++xaGwEAgPQr61wfBR/zu7XuAAYAgO0sm81mJk2a9PVhw4b9pKCgwG9VfkZ1dXUxY8aMeOaZZ+K9996zEEiRfv36xSGHHBJDhw6NgoICC/mMGhsbN8+YMeOaL37xi+Pq6upyNgIAAOnlEdAAALCTHH/88W2vuuqqCyorK/exjc9mzZo18dRTT8XUqVNj06ZNFgIpVlFREZ///OfjsMMOi8rKSgv5jNavXz/r9NNPv3DcuHEf2AYAAKSTAhgAAHaC22677fNf+9rXzstms5W2se0WLVoUjz/+eMybNy9yOTewQT4pKiqKIUOGxBFHHBG9e/e2kM+grq5u3QMPPHDRySefPM02AAAgfRTAAACwA1VUVBQ8/fTTpwwcOPCUTCbjGabbIJfLxauvvhpPPvlkLFy40EIgz2UymRgwYEAcccQRMWjQIAvZ9n+3Ns6fP/+Www8//JaNGzc22ggAAKTHlgrgwsqB0fWjvtBYFVGzwuvKAABgS0488cR2EyZMuLx79+5fzmQyGRvZOo2NjTFr1qy49dZb48knn4wPPvC0UuC/rV69OmbMmBFz5syJ0tLS6NSpU/jX7NbJZDKZ9u3bD/3+978/dPny5TNfffXValsBAIB0KOtcHwXlH/O9gDuAAQBg29x66637H3vssRcWFRW1sI2tU1NTE0899VQ8++yzsWHDBgsBPlGLFi3i4IMPjsMPPzxKS/28YmvV19d/OG7cuPNPPvnk6bYBAADJ5xHQAACwHWWz2cyzzz77rSFDhvzAI5+3zqZNm2Ly5Mnx1FNPKX6BbdKiRYs47LDD4pBDDlEEb6VcLtfwyiuvXHfooYfeWVdX5yXrAACQYApgAADYTo455pjW11133cWVlZV728ant2HDhnj88cdjypQpUVtbayHAZ1ZcXBwHHnhgfPGLX4wWLTyIYWusWbNm2re//e3zn3nmGb+JAwAACeUdwAAAsB1cfvnlu1900UW/LS8v72cbn05VVVVMmDAhbrnllnjzzTejoaHBUoDtoqGhIZYsWRLPPfdc1NTURI8ePSKb9XOMT6OsrKzb17/+9SPbtm0774knnlhtIwAAkMDreu8ABgCAz+bhhx/+8qGHHnpOQUFBsW18sk2bNsUzzzwTTzzxRFRVVVkIsMOVl5fHkUceGYccckgUF/tX9afR2Ni46emnn/71Mccc87htAABAsngENAAAbKN27doVTZ48+YxevXodZxufrK6uLp5++umYOHGi4hfYJSoqKuKLX/xiHHzwwe4I/pQWLVr0x4MOOuiadevWeUwDAAAkhEdAAwDANjj22GPbPvzww7/p2LHjobaxZXV1dfHkk0/GddddF3Pnzo26ujpLAXaJzZs3x2uvvRbPPfdcRET06NEjCgsLLWYLWrduvfv3vve9fd9+++1pCxYsqLYRAABo+rb0CGgFMAAAfITLL7989wsuuOB3zZs372UbH6+xsTGmTJkS119/fbzyyiuKX6DJ2Lx5cyxYsCCmT58excXF0a1bt8hkMhbzMUpKSjp8+ctfPrJt27ZzvBcYAACaPu8ABgCArTB+/Pgjv/CFL/xLQUFBiW18vAULFsT48eNj6dKllgE0eT169IivfOUrMWjQIMvYgsbGxpqJEydecuyxxz5pGwAA0HR5BzAAAHwK7dq1K3ruued+1qNHj6/axsdbtGhR3H///bF48WLLABKnV69ecdxxx0WfPn0sYwuWLl3654MOOujy1atX19sGAAA0Pd4BDAAAn2DYsGHNn3766V936tTpC7bx0TZs2BD33Xdf/PGPf4y1a9daCJBI69evj2nTpsW6deuiZ8+eUVLiYQ8fpbKysv+3v/3t/lOmTJmyfPlyz/cHAIAmxjuAAQBgC372s5/1uP76669t0aKF54J+hJqamhg/fnzcfPPN8fbbb0cul7MUINFyuVy888478cwzz0RVVVX07t07slk/A/lHZWVl3U488cTD6+rqZkyfPv1DGwEAgCZ0va4ABgCAj3bFFVfscdZZZ11dXFzcwTb+Xi6XixkzZsR1110XCxYsiMbGRksBUqWxsTGWLFkSM2bMiPLy8ujSpUtkMhmL+RvZbLbFQQcddHibNm1mP/HEE6ttBAAAmoYtFcDeAQwAQN6aNGnSqAMOOODsTCZTaBt/b9GiRXHPPffEu+++axlA3ujWrVucdNJJ0bt3b8v4B7lcrm7y5Mm//vKXv/yIbQAAwK63pXcAK4ABAMg7paWlBTNnzjyzT58+x9vG39uwYUOMGzcuZsyY4VHPQF7KZDKx3377xde//vWoqKiwkH+waNGiP+27775X1dTUeCwEAADsQgpgAAD4H926dctOnjz5V506dRppG/9fLpeLqVOnxp///OfYuHGjhQB5r6KiIkaNGhX777+/x0L/g+XLlz9+6KGHXvLuu+/W2QYAAOwaWyqAvQMYAIC8MXz48PInnnjiynbt2o2wjf/vnXfeiWuvvTaee+652Lx5s4UARMTmzZtjzpw58dprr0XPnj2jRYsWlvI/Kioq+n7rW98aMnXq1Ofee+89f3AAAMAusKV3ACuAAQDIC9/+9rc73n777X9o0aLFANv4b1VVVXHXXXfFvffeG+vXr7cQgI+wbt26eP7552P9+vWx2267RVFRkaVERElJSefjjjvuoA8++GDKK6+88hcbAQCAnUsBDABAXjv//PP7XXzxxX8oKSnpbBv/bfr06XHttdfGokWLLAPgU3jnnXdi2rRp0bp16+jc2R8nERHZbLbyC1/4whElJSUvTp48eY2NAADAzqMABgAgb/3ud7/b60c/+tFVRUVFrWwjYs2aNXHzzTfHpEmTora21kIAtkJtbW289NJL8c4770Tfvn2jtLQ073dSWFhYNnz48C/26dNn4UMPPbTMpwQAAHYOBTAAAHnp1ltv3f+b3/zmfxYWFjbP913kcrl4/vnn4/rrr4/ly5f7cAB8BitXroxp06ZFRUVFdOvWLTKZTF7vo6CgIDto0KBDBw0atOiBBx54xycEAAB2vC0VwJmex8Z+H/WF+pURa17ym6wAACTTww8//KXDDjvsXzKZTN6/rPGDDz6I22+/Pd544w0fDIDtbMCAAfGtb30r2rRpk/e7yOVyjVOmTPn1yJEjH/LJAACAHavN3jVR1OGjv6YABgAgdV555ZXTPve5z30r3/fQ0NAQjz32WDz++ONRV1fngwGwg2Sz2Tj66KPjC1/4QhQUFOT9Pl5//fU79tprr9/7ZAAAwI6jAAYAIC9ks9nMyy+/fFafPn2Oz/ddvPvuu3HbbbfFe++954MBsJN069YtvvOd70S3bt3yfhdLliy5f5999rmypqam0ScDAAC2PwUwAACpV1paWjBr1qyzevfufVw+7yGXy8WTTz4ZDz74oLt+AXaBbDYbxxxzTBxxxBF5fzfw0qVLHxg6dOjlSmAAANj+FMAAAKRar169mk2ePHlsu3btDsrnPaxcuTJuueWWePvtt30oAHaxnj17ximnnBIdOnTI6z2sXr16yiGHHPIvS5Ys2exTAQAA28+WCuDCyoHR9aO+0FgVUbMia3sAADRpQ4cOLXvqqacub9Omzf75uoNcLhfPPPNMXH/99bF27VofCoAmYP369TFlypQoKSmJnj17RiaTycs9NG/evPtJJ500ZPLkyc+sWLHCoykAAGA7KetcHwXlH/01BTAAAIk1ZMiQ0kceeeSKVq1a7Z2vO6iuro7bb789nnjiiWhs9IRNgKaksbEx5s+fH++//34MGDAgstn8/DlLaWlpp6997WuDn3rqqadXrlxZ75MBAACfnQIYAIDUOfTQQ1s8+OCDv2/ZsuUe+bqDOXPmxNVXX+2RzwBN3PLly+OFF16Ijh075u0joUtLSzudcMIJ+7/00ktPv/3227U+FQAA8NkogAEASJVhw4Y1v++++37TsmXLQfl4/vr6+hg/fnz88Y9/jNpaP0MHSILNmzfHiy++GJs3b47ddtstCgoK8m4HxcXFbY866qg9n3vuuaeXL1/ucdAAAPAZKIABAEiNI488snLcuHG/b9GixcB8PP97770XV111VcyZM8eHASCBFi1aFC+//HL069cvWrRokXfnLykp6XDcccftP2fOnGcWLVq0yScCAAC2jQIYAIBUOPLIIyvvvPPO35aXl++Wj+d/+umn48Ybb4wPP/zQhwEgwf7yl7/ECy+8ECUlJdGrV6+8O3+zZs3aHHXUUfspgQEAYNspgAEASLxjjz227W233faH5s2b98m3s1dVVcXNN98cTz31VDQ2NvowAKRAY2NjzJ8/P5YtWxYDBgyIZs2a5dX5mzVr1uaYY4458M0333xm4cKFNT4RAACwdRTAAAAk2qGHHtritttuuzofy9+33347rrnmmli8eLEPAkAKvf/++/HKK69Enz59orKyMq/Ons1mK4888sh9Zs6c+dTSpUs3+zQAAMCnpwAGACCxjjjiiJb33nvvteXl5f3y6dy5XC4mTZoUN998c1RVVfkgAKRYVVVVTJ06NbLZbPTp0ycymUzenL24uLjtV7/61c+/8sorTy1evLjWpwEAAD4dBTAAAIl06KGHtrj33nt/l2/lb3V1ddx0000xefLkyOVyPggAeSCXy8WCBQvi3Xffjd133z2y2fz5mUyzZs1aH3300fvNmDHjSXcCAwDAp6MABgAgcYYOHVo2fvz4qysqKgbk07mXLVsWV111lUc+A+SplStXxiuvvBKf+9znoqKiIm/O3axZszZHH3300GeeeebJFStW1PkkAADAlimAAQBIlCFDhpQ++uij17Rs2XL3fDr31KlT49prr42NGzf6EADksaqqqpg+fXq0bds2unTpkjfnLikpaT9q1KihTz755JMrV66s90kAAICPt6UCuMB6AABoSjp16pSdMGHCv1dWVu6RL2dubGyMcePGxR133BF1dW56AiCitrY2br755hg/fnw0NjbmzbkrKyv3mDBhwr9369bNXQkAALCNFMAAADQZrVq1Kpw+ffolbdq02T9fzlxdXR2/+93vYtKkSd73C8DfyeVy8fjjj8fvf//7qK6uzptzt2nTZv8pU6Zc0qpVq0KfAgAA2HoKYAAAmoSKioqC2bNnX9KuXbuD8uXMS5cujYsuuijmz5/vAwDAx3r11VfjoosuiqVLl+bNmdu1a3fQ7Nmz/72iosLPrgAAYCu5iAYAoEmYOXPmz9q1a3dIvpz35ZdfjiuuuCLWrVsnfAA+0bp16+KKK66Il19+OW/O3K5du4Nnzpz5M+kDAMDWUQADALDLvfjii2N69OgxKh/Omsvl4oEHHogbbrghamtrhQ/Ap1ZbWxs33HBDPPDAA3nz2oAePXqMevHFF8dIHwAAPj0FMAAAu9SkSZO+NnDgwFPy4ax1dXVx8803x8SJE73vF4BtksvlYuLEiXHLLbdEXV1dXpx54MCBJ0+aNOlr0gcAgE9HAQwAwC7z6KOPHnXggQeekw9nXbduXfz617+OWbNmCR6Az2zmzJnx61//Ol9eJZA58MADz3n00UePkjwAAHyywsqB0fWjvtBYFVGzImtDAADsEDfeeOO+Rx999EWZTKYw7Wddvnx5XHXVVbFy5UrBA7DdbNiwIWbPnh0DBw6MioqKtB8307179/179uz56sMPP7xc+gAA5LuyzvVRUP7RX1MAAwCw011xxRV7fPe7372qoKCgWdrPOmfOnPjtb38bGzduFDwA2111dXVMmzYtOnfuHB07dkz1WTOZTOHuu+9+eJs2bV6aNGnSKukDAJDPFMAAADQZZ5xxRvef/exnvy0sLCxP+1knTJgQd999d9TX1wsegB2moaEhXnrppchms9G3b99UnzWTyRTttddeB/3lL395dubMmRukDwBAvlIAAwDQJBx00EEVf/jDH64pLi7ulOZz5nK5eOCBB+Kxxx4TOgA77c+eBQsWRF1dXfTv3z8ymUxqz1pQUFBywAEHDJs+ffqkpUuXbpY+AAD5aEsFcIH1AACwMwwaNKj0vvvuu7qsrKxXms9ZV1cX1113XUyaNEnoAOx0EydOjOuvvz7q6upSfc6ysrJef/rTn67u379/idQBAODvKYABANjhKioqCh577LGLKyoqBqb5nNXV1XHNNdfE7NmzhQ7ALvPKK6/ElVdeGVVVVak+Z4sWLQZOnDhxbEVFhZ9vAQDA33CBDADADjdz5syftW3b9sA0n3HdunVx2WWXxRtvvCFwAHa5xYsXx2WXXRZr165N9TnbtWt34MyZM38mcQAA+P8UwAAA7FBPPvnkqB49eoxK8xlXrVoVV1xxRSxfvlzgADQZK1asiCuuuCJWrlyZ6nP26NFj1KRJk0ZJHAAA/lth5cDo+lFfaKyKqFmRtSEAALbZjTfeuO+XvvSlCzOZTGp/8fDdd9+NK6+8MtatWydwAJqc6urqmDVrVvTv3z8qKytTe85u3boN79mz57yHH37Yb2MBAJAXyjrXR0H5R39NAQwAwA5x3nnn9T311FOvLigoKE7rGV977bW45pprorq6WuAANFmbN2+OGTNmRI8ePaJ9+/apPGMmkykYNGjQIYWFhVOee+45v5UFAEDqKYABANipjjrqqFb/8R//8YdmzZq1SusZX3755bj++uujrq5O4AA0eQ0NDfHSSy9Fp06dolOnTqk8Y0FBQXbYsGGfnz9//qQ33nhjk9QBAEizLRXA3gEMAMB21a1bt+wNN9zwnyUlJR3TesYpU6bEjTfeGPX19QIHIDHq6+vjxhtvjKlTp6b2jCUlJZ1uuOGG/+jWrZu7GgAAyFsKYAAAtqunn376XyorK/dI6/kmTZoUd955ZzQ2NgobgMRpbGyMO+64I5588snUnrGysnLw008//UtpAwCQrxTAAABsN88///w3unTp8k9pPd/EiRNj3LhxkcvlhA1AYuVyubj//vtTXQJ36dLlS88+++yJ0gYAIB95BzAAANvFTTfdNPzII488L5PJZNJ4vsceeyzGjx8vaABS47XXXotmzZpF3759U3m+zp0779urV695Dz/88DJpAwCQNlt6B7ACGACAz+wXv/hF7x/+8IdXFxQUNEvj+R544IF45JFHBA1A6ixYsCDq6upiwIABqTtbJpPJDBo06ODGxsbnpk6dul7aAACkiQIYAIAd5oADDqj43e9+99tmzZq1TeP5xo0bF5MmTRI0AKm1aNGi2Lx5cwwcODB1ZysoKMjut99+w5577rnH33vvvc3SBgAgLbZUAHsHMAAA2yybzWbuvPPOfyktLe2exvNNmDBB+QtAXpg0aVI89NBDqTxbaWlpj3vuuedfstlsRtIAAOQDBTAAANvs+eef/06HDh0OTePZHn744Xj44YeFDEDeeOSRR+LPf/5zKs/WoUOHw5599tlvSxkAgHygAAYAYJvcd999hw8ePPjUNJ7t/vvvjwkTJggZgLzz2GOPxX333ZfKs+25554/+NOf/nSYlAEASDvvAAYAYKudccYZ3ceMGXN5QUFBcdrONnHixHjkkUeEDEDeWrx4cWSz2ejbt2/ajpbp06fPvn/5y18mz5w5c4OkAQBIsi29A1gBDADAVhk2bFjzG2+88Q/NmjVrl7azPfroo6l99CUAbI2FCxdGUVFR9OvXL1XnKigoKD7wwAP3e/LJJx9dsWJFnaQBAEiqLRXAHgENAMBWuffee39ZWlraPW3nevzxx+PBBx8UMAD8jz//+c8xceLE1J2rtLS0x3333fdLCQMAkFYKYAAAPrVJkyaN6tSp0xEpPFeMHz9ewADwD8aPHx+TJ09O3bk6der0hUmTJn1VwgAApJFHQAMA8Kmcd955fU888cR/z2QyRWk618yZM+Puu+8WMAB8jNdeey06duwYnTt3TtW5unbtuk9BQcHzzz333DopAwCQNN4BDADAZ3LEEUe0vOKKK67NZrOVaTrXyy+/HDfffHPkcjkhA8DHyOVyMXv27OjSpUt06tQpNefKZDJF++yzz/CpU6c+9u67726WNAAASeIdwAAAbLNsNpu55ZZb/q2kpKRjms61YMGCuPnmm6OxsVHIAPAJGhsb4+abb44333wzVecqLS3tcvfdd5+fzWYzUgYAIC0UwAAAbNGkSZO+3rZt2wPTdKZly5bFDTfcEPX19QIGgE+prq4urr322li+fHmqztWuXbsDH3/88VESBgAgLTwCGgCAj3XZZZcN+upXvzo2k8mk5hcH33///bjyyiujqqpKwACwlerq6uLll1+OIUOGRHl5eWrO1aVLl31LS0unPvPMM2ukDABAEngENAAAW61///4lJ5988q8ymUxRWs60YcOG+P3vfx8bN24UMABso40bN8bvfve7VP15WlBQkP3hD394ft++fYslDABA4q9vrQAAgI/y4IMPnl1WVtYrLeeprq6O3/zmN7Fq1SrhAsBntGrVqrjyyiujuro6NWcqKyvr8/DDD58lXQAAkk4BDADA/zF+/Pgju3XrdnRazlNfX5/KdxYCwK60fPnyuO6666K+vj41Z+rRo8dXx40bd4R0AQBIMgUwAAB/53vf+16nI4444py0nCeXy8Vtt90Wb7zxhnABYDt7/fXX47bbbotcLpeaMx155JHnfvvb3+4oXQAAkkoBDADA/6qoqCi4+OKLLywsLCxPy5nGjx8fs2bNEi4A7CCzZs2Khx56KDXnKSwsrPj1r399QUVFhZ+bAQCQSC5kAQD4XxMnThxdWVk5OC3nef7552PixImCBYAd7LHHHosXXnghNeeprKzc89FHHz1RsgAAJFFh5cDo+lFfaKyKqFmRtSEAgDxxwQUX7DZq1KgLM5lMYRrO8+qrr8Ytt9ySqkdSAkBT/7O3d+/e0a5du1Scp2PHjkNzudxzU6ZMWSddAACamrLO9VHwMc/wcwcwAADRt2/f4h//+McXZzKZVPwG4HvvvRc33HBDNDY2ChcAdpKGhoa47rrrYtmyZak4T0FBQfbss88e27dv32LpAgCQqGtZKwAAYPz48T8qKyvrkYazbNiwIX7/+99HbW2tYAFgJ9u0aVP8/ve/j40bN6biPGVlZb3GjRs3RrIAACSJAhgAIM/ddNNNw/v06XN8Gs5SX18f1157baxdu1awALCLrFmzJq699tqor69PxXn69ev3jd///vdDJQsAQFIogAEA8thBBx1Uceyxx/5rRGTScJ477rgjFi9eLFgA2MUWLVoUd955Z1qOU/CNb3zj34YNG9ZcsgAAJOIC1goAAPLXzTfffFZxcXG7NJxl4sSJMX36dKECQBMxbdq0mDRpUirOUlJS0unOO+88Q6oAACSBAhgAIE/913/914FdunT5UhrO8tprr8Wf//xnoQJAEzN+/PhYsGBBKs7SrVu3o2+66abhUgUAoKlTAAMA5KEvfelLlV/5yld+lYazrFixIq6//vpobGwULAA0MY2NjXHdddfFihUr0nCczHHHHfergw46qEKyAAA0ZQpgAIA8dPXVV5+ezWYrk36OmpqauPbaa2PTpk1CBYAmatOmTXHttddGTU1N4s+SzWbb3njjjT+RKgAATZkCGAAgz9x6663Du3Tp8uWknyOXy8Utt9wSK1euFCoANHErV66MW2+9NXK5XOLP4lHQAAA0dQpgAIA8MnTo0LKvfvWrv0jDWSZMmBBz584VKgAkxJw5c+Kxxx5LxVlGjRr1i6FDh5ZJFQCApkgBDACQR+64444fFRcXd0z6OV5++eV45JFHBAoACfPQQw+l4he4SkpKOt5xxx0/lCgAAE2RAhgAIE9cfvnlu/fs2XNU0s/xwQcfxB133JGKR0gCQL7J5XJx2223xZo1axJ/lp49ex57+eWX7y5VAACaGgUwAEAe6NatW/a73/3uv2YymURf/9XX18cNN9wQ1dXVQgWAhKqqqoobb7wx6uvrE32OTCZT8N3vfvdX3bp1y0oVAICmRAEMAJAHxo8ff0pZWVmvpJ/jnnvuiaVLlwoUABJuyZIlcd999yX+HGVlZT3Hjx9/ikQBAGhKFMAAACn385//vOeAAQNGJ/0c06dPjylTpggUAFJi8uTJMWPGjMSfY8CAAaN//vOf95QoAABNhQIYACDFstls5qyzzjo3k8kk+tGEK1asiLvvvlugAJAyd911V6xYsSLRZ8hkMtmzzjrr3Gw2m5EoAABNgQIYACDFxo0b98XKysq9knyG2trauOGGG6K2tlagAJAyf/1zfvPmzYk+R2Vl5V7jxo0bKVEAAJoCBTAAQEoNHz68/OCDDz4t6ee4//77Y/ny5QIFgJRavnx5jBs3LvHnGDFixI+HDRvWXKIAAOxqCmAAgJS69dZbT8tms22TfIYZM2bEc889J0wASLnJkyfHzJkzE32G4uLitrfffvtp0gQAYFdTAAMApNBVV121R48ePb6S5DOsXLky7rrrLmECQJ64++6744MPPkj0GXr27PnVK664Yg9pAgCwKymAAQBSprS0tOAb3/jGT5N8rdfY2Bi333679/4CQB6pqamJ2267LRobG5N8jIJvfvObZ5aWlvqZGwAAu+6i1AoAANJlwoQJX6uoqBiQ5DOMHz8+Fi1aJEwAyDNvvvlmPPjgg4k+Q4sWLQY9+OCDx0gTAIBdRQEMAJAiRx55ZOWwYcN+kOQzzJ07N5544glhAkCemjhxYixYsCDRZxg+fPiPjjjiiJbSBABgV1AAAwCkyBVXXHFyUVFRRVLnr6qqijvvvDNyuZwwASBP5XK5uP3226O6ujqxZygqKmrxm9/85mRpAgCwKyiAAQBS4vzzz+/Xu3fv45J8httvvz0+/PBDYQJAnlu3bl3cfvvtiT5D7969jz///PP7SRMAgJ1NAQwAkALZbDZz6qmn/jyTyST2+m769OkxZ84cYQIAERExe/bsmDFjRmLnz2QyBaeeeurPs9lsRpoAAOxMCmAAgBT44x//eERlZeXgpM6/du3auPfeewUJAPyde+65J9atW5fY+SsrKwf/6U9/+oIkAQDYmRTAAAAJ17dv3+JDDjnkR0k+w9133x01NTXCBAD+Tk1NTdx9992JPsPBBx/8o759+xZLEwCAnUUBDACQcHfdddc3S0pKOiV1/smTJ8e8efMECQB8pLlz58azzz6b2PlLSko63nPPPd+SJAAAO4sCGAAgwb70pS9VDhw48KSkzr9mzZoYP368IAGALXrggQdizZo1iZ2/f//+Jx111FGtJAkAwM6gAAYASLArrrji1MLCwvIkzp7L5eK2226LTZs2CRIA2KJNmzbFbbfdFrlcLpHzFxYWll1++eU/kCQAADuDAhgAIKF+8Ytf9O7evftXkjr/s88+G2+88YYgAYBP5Y033ojnn38+sfN369bt6F/96ld9JAkAwI6mAAYASKgf/vCHP8pkMom8nvvggw/igQceECIAsFXGjRsX69atS+TsmUym4NRTT/2xFAEA2NEUwAAACXTdddcNa9eu3YFJnD2Xy8Udd9wRtbW1ggQAtsqmTZvizjvvTOz8bdq02f+mm27aT5IAAOxICmAAgIQpLS0t+NrXvnZ6Uud/4YUXYuHChYIEALbJq6++GjNmzEjs/Mccc8zpFRUVfiYHAMAO42ITACBhbr/99oMrKip2S+LsGzZsiHHjxgkRAPhM7r///qiqqkrk7OXl5X3/67/+6wgpAgCwoyiAAQASpKKiouCwww47Nanz33vvvYn9YS0A0HRs2LAh7r///sTOf9BBB/1zq1atCiUJAMCOoAAGAEiQ+++//+iysrKeSZx9zpw58dJLLwkRANguXnjhhViwYEEiZy8tLe32xz/+8StSBABgR1AAAwAkRN++fYv33Xfff07i7LW1tXHvvfcKEQDYru6+++6oq6tL5Oz77bffKf379y+RIgAA25sCGAAgIW6++eZRxcXFbZM4+yOPPBJr164VIgCwXa1atSoee+yxRM6ezWbb3njjjV+TIgAA25sCGAAgAYYOHVq21157fSeJs7/33nvxxBNPCBEA2CEmTpwYK1asSOTsQ4YM+c7QoUPLpAgAwPakAAYASIBrr732xKKiosqkzZ3L5eKee+6JxsZGIQIAO0R9fX3cddddkcvlEjd7UVFR5bXXXnuCFAEA2J4UwAAATdwBBxxQMWDAgG8kcfYZM2bEW2+9JUQAYId6880348UXX0zk7AMGDPjG8OHDy6UIAMD2ogAGAGjirrrqqhOKiooqkjb3pk2b4oEHHhAgALBT3H///VFbW5u4uYuKilpcffXV7gIGAGC7UQADADRhBx10UEX//v0Teffvww8/HB9++KEQAYCdYv369TFhwoREzj5w4MBvHHDAARVSBABge1AAAwA0Yf/5n/95bGFhYfOkzb1q1aqYPHmyAAGAnerpp5+O1atXJ27uwsLC8ssuu2yUBAEA2B4UwAAATdQBBxxQMWjQoNFJnP3uu++O+vp6IQIAO1V9fX3cddddiZx99913/+bQoUPLpAgAwGelAAYAaKIuv/zyYwsLC8uTNvfcuXNjwYIFAgQAdokFCxbE3LlzEzd3UVFRi9/97ndflyAAAJ+VAhgAoAkaOnRo2aBBgxL37t+6urr405/+JEAAYJf605/+FHV1dYmbe/fdd//mkCFDSiUIAMBnoQAGAGiCfvOb33ylqKioZdLmfu655xL53j0AIF1Wr14dzz33XOLmLioqann11VcfLUEAAD4LBTAAQBPTq1evZoMHD/5m0uaurq6ORx55RIAAQJPwyCOPRHV1deLmHjJkyLe6deuWlSAAANtKAQwA0MTcdNNNxxQXF7dN2twTJkyIqqoqAQIATUJVVVUifzmtuLi43a233uouYAAAtpkCGACgCWnVqlXhXnvtdVLS5l61alU8++yzAgQAmpTJkyfHqlWrEjf30KFDR7dq1apQggAAbAsFMABAE3LLLbccXlJS0jlpcz/44INRX18vQACgSamvr48HH3wwcXOXlJR0vummmw6VIAAA20IBDADQRGSz2cwBBxzw7aTNvWjRonjppZcECAA0SS+99FIsXrw4cXOPGDHiO9lsNiNBAAC2lgIYAKCJuOaaa/YuLy/vm7S5H3roocjlcgIEAJqkXC6XyLuAy8vL+1111VV7SRAAgK2lAAYAaCK+8pWvfDdpM8+bNy8WLlwoPACgSVu4cGG8+uqrrg8BAMgLCmAAgCbgsssuG1RZWblPkmbO5XIxfvx44QEAifDAAw8k7qklrVu33veSSy7pLz0AALaGAhgAoAkYNWrUCUmbefbs2bFs2TLhAQCJsGzZsnjllVcSN/cJJ5xwovQAANgaCmAAgF3sn//5nzt37NjxiCTN3NjYGA888IDwAIBEGT9+fDQ0NCRq5k6dOn1h9OjRHaQHAMCnpQAGANjFfvSjH30tk8kk6rps2rRpsWrVKuEBAImyatWqeOGFFxI1cyaTKfzpT386SnoAAHxaCmAAgF1o0KBBpX369Plqkmaur6+PCRMmCA8ASKQJEyZEXV1dombu27fvV/r27VssPQAAPg0FMADALnTZZZcdXlRUVJGkmadOnRpr164VHgCQSOvXr48pU6YkauaioqLK3/zmN0dIDwCAT0MBDACwi2Sz2cy+++57UpJmrqurc/cvAJB4jz76aOLuAt5///1PymazGekBAPBJFMAAALvI1VdfPbSsrKx3kmaeMmVKbNiwQXgAQKJt2LAhnn/++UTNXFZW1ueqq67aS3oAAHwSBTAAwC7y5S9/+bgkzVtfXx8TJ04UHACQCo8//nji7gL+0pe+dLzkAAD4JApgAIBdYPTo0R3atm07IkkzT5s2LdatWyc8ACAVPvzww5g+fXqiZm7fvv2I0aNHd5AeAABbogAGANgFfvrTn47KZDKFSZm3vr4+HnnkEcEBAKnyyCOPRH19fWLmzWQyhT/96U+/JjkAALZEAQwAsJN16tQp26dPn6OTNLO7fwGANFq3bl1MmzYtUTP36dPnmE6dOmWlBwDAx1EAAwDsZFddddUB2Wy2dVLmbWxsjEmTJgmOVOvYsWN06OCJmgD5aNKkSdHY2JiYebPZbOurrrrqAMkBAPBxFMAAADvZiBEjvp6keV988cVYtWqV4Ei1Ll26xIUXXhinnXZadO3a1UIA8siqVavipZdecj0JAEBqKIABAHaiM844o3tlZeXeSZk3l8vFxIkTBUdeyGQyMXjw4PjVr34VY8aMcUcwQB55/PHHI5fLJWbeysrKvc8444zukgMA4KMogAEAdqJTTjnlqxGRScq8CxYsiPfee09w5JVMJhN77713XHjhhTFmzJho3769pQCk3HvvvRcLFy5M1B9X/3NdCQAA/4cCGABgJ+nVq1ezXr16fTlJM3v3L/nsr0XwBRdcECeffHK0bdvWUgBSLGnXPb169fpyr169mkkOAIB/pAAGANhJrrjiioOLiopaJmXeBN4JAztEYWFhDB8+PC688MIYPXp0VFZWWgpACi1YsCCWLVuWmHmLiopaXnnllYdIDgCAf6QABgDYSYYPH/6VJM2btHfhwY5WVFQUI0aMiEsuuSRGjx4dLVu2tBSAFMnlcvH4448naub99tvvK5IDAOAfKYABAHaC0aNHd6isrByalHnXrl0bL7/8suDgI/y1CL744ovjhBNOiBYtWlgKQEq89NJLsW7dusTMW1lZudfo0aM7SA4AgL+lAAYA2AlOP/30o5J07fXMM89EQ0OD4GALiouL47DDDouxY8fGqFGjoqyszFIAEq6hoSGeeeaZJI1c8D/XmQAA8P8vEq0AAGDHymazmX79+n05KfPW1tbGlClTBAefUnFxcYwcOTIuvfTSGDVqVJSWlloKQII9//zzUVtbm5h5+/Xr9+VsNpuRHAAAf6UABgDYwX7zm9/sWVJS0jkp886YMSOqq6sFB1uppKQkRo4cGZdcckkcffTRUVJSYikACVRdXR0zZ85M0p8/na+44orBkgMA4K8UwAAAO9gXvvCFLyVl1lwuF08//bTQ4DNo3rx5HHXUUXHJJZfEyJEjI5vNWgpAwjz11FORy+USM++RRx75ZakBAPBXCmAAgB1oyJAhpZ07dz4iKfO+/vrrsWLFCsHBdlBeXh6jRo2KSy+9VBEMkDArVqyI119/PTHzdunS5fD+/ft79AQAABGhAAYA2KHGjh17aGFhYWJeCOruX9j+KioqYtSoUXHxxRfH4YcfHkVFRZYC4LpouyosLGz+H//xHwdLDQCACAUwAMAOteeeex6ZlFnXrl0b8+bNExrsIK1atYrjjz8+LrroohgxYkQUFPh2DKApmzdvXqxZsyYx8+61115HSg0AgAgFMADADnPMMce0bt269b5Jmfe5556LxsZGwcEO1qZNmxg9enRcfPHFimCAJqyxsTGee+65JP35MvyYY45pLTkAAPykAQBgBznzzDMPz2Qyibjeqq+vj6lTpwoNdqK2bdvG6NGj47zzzovhw4crggGaoBdeeCHq6+sTMWsmkyk844wzDpUaAAB+wgAAsIP079//C0mZdc6cObFhwwahwS7QqVOnOPnkk+Pf/u3fYu+9945MJmMpAE3Ehg0bYvbs2YmZd8CAAR4DDQCAAhgAYEf43ve+16mysnKPpMybpMcbQlp17tw5xowZE7/61a8UwQBNyPPPP5+YWSsrKwd/73vf6yQ1AID8pgAGANgBTj755CMiIhHtzcqVK+P1118XGjQRXbt2jTFjxsQ555wTgwcPthCAXez111+PlStXJmXczMknn3y41AAA8psCGABgB+jXr19iHv88ZcqUyOVyQoMmpnfv3nHaaafFOeecE/3797cQgF0kl8vFlClTknQd6jHQAAB5TgEMALCdnX766d0qKip2S8Ks9fX1MW3aNKFBE9anT58466yz4pxzzonddtvNQgB2gWnTpkV9fX0iZq2oqNjt9NNP7yY1AID8pQAGANjORo8efURSZp03b15s3LhRaJAAffr0ibPPPjvOPPPM6Nmzp4UA7EQbN26MefPmuR4FACARFMAAANtZr169EvPetSQ9zhD4bwMGDIhf/vKXceaZZ0b37t0tBGAnmTp1apKuRw+TGABA/lIAAwBsR2eccUb38vLyvkmYdf369fHaa68JDRJqwIAB8S//8i9x2mmnRbdunvQJsKPNnz8/Pvzww0TMWl5e3u9HP/pRF6kBAOQnBTAAwHZ03HHHHZSUWWfMmBGNjY1CgwTLZDIxePDg+Nd//dcYM2ZMdOjQwVIAdpDGxsaYMWNGYub9xje+cYjUAADykwIYAGA76tOnz8FJmDOXyyXqMYbAlmUymdh7773jwgsvjDFjxkT79u0tBWAHeOGFF5J0XXqIxAAA8pMCGABgOznppJPat2zZcvckzLpkyZJYuXKl0CBl/loEX3DBBXHyySdH27ZtLQVgO1qxYkW8/fbbiZi1srJy0PHHH+8PAgCAPKQABgDYTr773e8eGBGZJMyapMcXAluvsLAwhg8fHhdeeGGMHj06KisrLQVgO5k+fXpSRi34/ve/f6DEAADyjwIYAGA72X333Q9Nwpz19fUxc+ZMgUEeKCoqihEjRsQll1wSo0ePjpYtW1oKwGc0c+bMqK+vT8SsAwcOPFRiAAD5RwEMALAdHHTQQRUtW7bcKwmzLly4MKqrq4UGeeSvRfDFF18cJ5xwQrRo0cJSALZRVVVVvP7664mYtVWrVkOHDx9eLjUAgPyiAAYA2A7OPvvsz2cymaIkzOrxz5C/iouL47DDDouxY8fGqFGjoqyszFIAtkFSnqaSyWSy55577uclBgCQXxTAAADbwe67735AEuasra2NOXPmCAzyXHFxcYwcOTIuvfRSRTDANpg9e3bU1dUlYtY99tjjAIkBAOQXBTAAwGfUqlWrwnbt2u2fhFnnzZsXtbW1QgMiIqKkpCRGjhwZY8eOjaOPPjpKSkosBeBT2LRpU8ybNy8Rs7Zv337/iooKPwMEAMgjLv4AAD6jCy+8cPeioqKKJMz64osvCgz4P5o3bx5HHXVUXHLJJTFy5MjIZrOWAvAJZs2alYg5i4qKWlx88cWDJAYAkD8UwAAAn9GBBx6YiMfqVVdXJ+ZOFWDXKC8vj1GjRsWll16qCAb4BPPmzYuamppEzHrQQQd5DDQAQB5RAAMAfEZdu3YdnoQ5582bF/X19QIDPlFFRUWMGjUqLr744jj88MOjqKjIUgD+QV1dXbz66quJmLVLly77SwwAIH8ogAEAPoNTTjmlY3l5+W5JmPXll18WGLBVWrVqFccff3xcdNFFMWLEiCgo8C0kwN966aWXEjFnRUXFbieddFJ7iQEA5AffvQMAfAYnnnji55MwZ21tbcyfP19gwDZp06ZNjB49OsaOHasIBvgb8+fPj9ra2iSMmvnud7/7eYkBAOQH37UDAHwGn/vc5/ZLwpwLFy6Muro6gQGfyV+L4PPOOy+GDx+uCAby3ubNm2PhwoWJmLVfv37DJQYAkB98tw4AsI1atWpV2Lp1672TMKvHPwPbU6dOneLkk0+Oc889NwYNGmQhQF6bPXt2IuZs06bN3hUVFX4WCACQB1z0AQBso/PPP39gYWFheVOfs76+PubMmSMwYLvr2bNn/OQnP4nzzjsv9t5778hkMpYC5J3Zs2dHfX19k5+zqKio4vzzzx8oMQCA9FMAAwBso/3333/fJMz5+uuvR01NjcCAHaZLly4xZsyYOOecc2Lw4MEWAuSV6urqeOONNxIx64EHHriPxAAA0k8BDACwjbp27ZqIxz/PnTtXWMBO0bt37zjttNPinHPOif79+1sIkDeScr3VvXv3vaUFAJB+CmAAgG0wZMiQ0srKyj2a+py5XM7jn4Gdrk+fPnHWWWfFOeecE7vttpuFAKk3e/bsyOVyTX7Oli1b7jlo0KBSiQEApJsCGABgG5x55pl7ZjKZbFOfc9myZbFu3TqBAbtEnz594uyzz44zzzwzevbsaSFAaq1bty6WL1/e5OfMZDLZs846a4jEAADSrcgKAAC23tChQ4clYc558+YJC9jlBgwYEAMGDIgFCxbE+PHjY+nSpZYCpM68efOiS5cuTX7OffbZZ5+ImC4xAID0cgcwAMA26Nix4z5JmHP+/PnCApqMAQMGxC9/+cs47bTTolu3bhYCpEpSrrs6deq0j7QAANJNAQwAsJWOOOKIlhUVFf2a+pxVVVWxaNEigQFNSiaTicGDB8e//uu/xpgxY6JDhw6WAqTCW2+9FVVVVU1+zoqKis8deuihLSQGAJBeCmAAgK108sknD46ITFOfc/78+dHY2CgwoEnKZDKx9957x4UXXhhjxoyJ9u3bWwqQaI2NjbFgwYJE/Cv4u9/97h4SAwBILwUwAMBW2n333fdMwpze/wskwV+L4AsuuCBOPvnkaNu2raUAiZWU66/BgwfvKS0AgPQqsgIAgK3Trl27wU19xlwul5Q7UAAiIqKwsDCGDx8e++yzT0ybNi0mTJgQ69evtxggURYsWBC5XC4ymab9sJgOHToMlhYAQHq5AxgAYCsMGjSotGXLlgOa+pzvvfdebNy4UWBA4hQVFcWIESPikksuidGjR0fLli0tBUiMDz/8MJYtW9bk52zZsuXA/v37l0gMACCdFMAAAFvhxz/+8aBMJtPkn6Li7l8g6f5aBI8dOzZOOOGEaNGihaUAibBw4cImP2Mmk8n+5Cc/GSAtAIB0UgADAGyFvffee88kzJmEHzwCfBrNmjWLww47LMaOHRujRo2KsrIySwGatKT8Il5SrmsBANh63gEMALAVunbtOqSpz1hfXx9vvvmmsIBUKS4ujpEjR8bBBx8czz77bDz++ONRXV1tMUCT8+abb0Z9fX0UFTXtH7t16dJlT2kBAKSTO4ABAD6lioqKgoqKikFNfc4lS5bE5s2bBQakUklJSYwcOTLGjh0bRx99dJSUeIUl0LTU1tbG0qVLm/ycLVu2HFRaWupngwAAKeQiDwDgUzr77LP7FhYWNvlnj7722mvCAlKvefPmcdRRR8Ull1wSI0eOjGbNmlkK4HpsKxQWFpafffbZvaQFAJA+CmAAgE9p//3375+EOV9//XVhAXmjvLw8Ro0aFf/+7/8eI0eOjGw2aymA67FP6fOf//xAaQEApI8CGADgU+rRo8fuTX3G2traePvtt4UF5J2KiooYNWpUXHzxxXH44Yc3+XdvAum2ePHiRLySo1evXoOkBQCQPgpgAIBPqXXr1k3+DoklS5ZEQ0ODsIC81apVqzj++OPj4osvjhEjRkRBgW97gZ2voaEhlixZ0uTnbNOmjQIYACCFfCcMAPApDBkypLR58+a9m/qcb775prAAIqJ169YxevToGDt2rCIYcF32MZo3b95n0KBBpdICAEgX3wEDAHwKp556av9MJtPkr53eeustYQH8jTZt2sTo0aPjvPPOi+HDhyuCAddlfyOTyRT84Ac/+Jy0AADSxXe+AACfwuDBg5v84/Hq6+tj0aJFwgL4CJ06dYqTTz45/u3f/i323nvvyGQylgLsUIsXL07Eqzn23HPPgdICAEgXBTAAwKfQpUuXAU19xnfeeSfq6uqEBbAFnTt3jjFjxiiCgR2utrY23n333SRc53oPMABAyiiAAQA+hZYtW/Zv6jN6/DPAp9elS5cYM2ZMnHvuuTF48GALAfL2+iwJ17kAAGwdBTAAwCcYPnx4eUlJSeemPqfHPwNsvV69esVpp50W55xzTvTvrwMB8u/6rLS0tPPw4cPLpQUAkB4KYACAT/Ctb31rt4ho8s8IXbx4sbAAtlGfPn3irLPOinPOOSd22203CwG2i4T8gl7m29/+dj9pAQCkhwIYAOAT7L777k2+CVi7dm1s2LBBWACfUZ8+feLss8+OM888M3r27GkhwGfy4Ycfxrp165r8nAMHDlQAAwCkSJEVAABsWadOnZr8D8TefvttQQFsRwMGDIgBAwbEggULYvz48bF06VJLAbb5Oq1Vq1audwEA2GkUwAAAn6CyslIBDJCnBgwYEP3794958+bFQw89FO+++66lAFtlyZIlsddeezX1613PvgcASBEFMADAFnTq1CnbvHnzXk19ziVLlggLYAfJZDIxePDg2GOPPeLll1+OBx98MFauXGkxQGqu05o3b967Xbt2RatXr66XGABA8nkHMADAFowZM6ZnJpPJNuUZGxsbPZoUYCfIZDKx9957x4UXXhhjxoyJ9u3bWwrwiZYuXRqNjY1NesaCgoLsqaee2kNaAADp4A5gAIAt2Hvvvfs29RlXrlwZtbW1wgLYSf5aBO+5554xa9asmDBhQqxevdpigI9UW1sb77//fnTu3LlJzzls2LC+EbFIYgAAyecOYACALejRo0eTL4DfeecdQQHsAoWFhTF8+PC48MILY/To0VFZWWkpQGKv15Jw3QsAwKejAAYA2ILWrVs3+ff/vvvuu4IC2IUKCwtjxIgRcckll8To0aOjZcuWlgIk7notCde9AAB8Oh4BDQCwBc2bN+/Z1GdUAAM0kW+wi4pixIgRsd9++8WUKVPiscceiw0bNlgMEO+9914SrnsVwAAAKeEOYACAj9G/f/+SkpKSjk19TgUwQNPSrFmzOOyww2Ls2LExatSoKCsrsxTIc0m4XistLe3Ut2/fYmkBACSfAhgA4GOccMIJ3Zr69dK6deuiqqpKWABNUHFxcYwcOTJ+/etfK4Ihz1VVVcX69eub+pgF3/zmN7tLCwAg+RTAAAAfY8iQIT2b+oxJeJwgQL77axE8duzYOProo6OkpMRSIA8l4botCde/AAB8MgUwAMDH6N69e8+mPqPHPwMkR/PmzeOoo46KSy65JEaOHBnNmjWzFMgjSbhuS8L1LwAAn0wBDADwMVq1atWjqc+4bNkyQQEkTHl5eYwaNSr+/d//PUaOHBnZbNZSIA8k4botCde/AAB8MgUwAMDHqKio6NXUZ1y+fLmgAJL750yMGjUqLr744jj88MOjqKjIUiDFknDd1rJly16SAgBIPgUwAMBHyGazmbKysq5NecbGxsZYtWqVsAASrlWrVnH88cfHxRdfHCNGjIiCAt+qQxqtWrUqGhsbm/SMJSUlXbPZbEZaAADJ5rtKAICPcNxxx7UrKCgobsozrl69Ourr64UFkBKtW7eO0aNHx9ixYxXBkEJ1dXXxwQcfNOkZCwoKio877rh20gIASDbfTQIAfITPf/7zXZr6jO+//76gAFKoTZs2MXr06Dj//PNj+PDhimBIkRUrVrgOBgBgh/NdJP+PvTuPr7I888d/nSwEkhD2HUQEUVRAoIiouCtq64Jabd1arVorbqO2tlXbaavTOu38Rqffdmpbu9rWpYogsqgFRXCttAIKArJDgAAJBLKQ5JzfH8WO4+DOcp6T9/v18jWvTv657ut6hNvnk/t+AICd2G+//bL+xVcSXiAC8PF17do1Lr300rj99ttj2LBhkUq5lRWSLgn7tyTsgwEAeH8FWgAA8H917txZAAxAVujevXtceeWVsXr16njiiSdi9uzZkclkNAYSKAn7tyTsgwEAeH8CYACAnWjXrp0roAHIKj169Igrr7wyli5dGpMmTYo5c+ZoCiRMEvZvSdgHAwDw/gTAAAA7UVxc3D3baxQAAzRPffr0ibFjx8aSJUti/PjxsWDBAk2BhEjC/i0J+2AAAN6fbwADAOxESUlJz2yur7q6Ourq6gwKoBnbb7/94l/+5V/ia1/7WhxwwAEaAglQV1cX1dXV9sEAAOxWAmAAgHc5/PDDSwsKCtpmc40VFRUGBUBERPTt2zduvPHGuOGGG2LffffVEMhy2b6PKygoaDt8+PASkwIASC4BMADAu5x44oldsr3GDRs2GBQA/8uAAQPiG9/4Rtxwww3Ru3dvDQH7uE+yH+5qUgAAyeUbwAAA79KvX7+sD4DXr19vUADs1IABA+LAAw+MuXPnxoQJE2LlypWaAlkkCTe5HHDAAV0i4i3TAgBIJgEwAMC7dO/evXO21+gEMADvJ5VKxaBBg2LgwIExe/bsGD9+fKxbt05jwD4uZ/bDAAC8NwEwAMC7tG/fvlO21ygABuDDSKVSMWzYsBg6dGjMnj07HnvsMbdIwF6WhBPASdgPAwDw3gTAAADv0rp166w/8ZCEF4cAZI+3g+BDDz00XnnllZg4caK/S8A+LtH7YQAA3psAGADgXUpKSrL6xENjY2Ns3rzZoAD4yPLz8+Pwww+P4cOHx/PPPx8TJ06MqqoqjYE9aPPmzdHY2BgFBdn7Wi7b98MAALw/ATAAwLu0bNmySzbXV1lZGZlMxqAA+Njy8/Nj1KhRMXLkyHjhhRcEwbAHZTKZqKqqio4dO9oPAwCwWwiAAQDepaioKKuvvKusrDQkAHaJgoKCGDVqVIwYMSJmzpwZkydPji1btmgM7IH9XDYHwNm+HwYA4P3laQEAwP8YPnx4SX5+fkk21ygABmBXa9GiRRx//PFxxx13xNlnnx0lJSWaAs14P5efn18yfPhwfxAAACSUABgA4B2OOOKIDtleo+//ArC7FBUVxejRo+P73/9+nH322VFcXKwpsBsk4cr1JOyLAQDYOQEwAMA79O3bt1221+gEMAC729tB8B133BGnn356tGrVSlOgme3n9ttvv7YmBQCQTAJgAIB36NSpkwAYAHYoKSmJz3zmM3HnnXfG6NGjo0WLFpoCzWQ/l4R9MQAAOycABgB4hw4dOrTN9hqTcGUgALmlpKQkzj777PjOd74To0aNivz8fE2BHN/PJWFfDADAzgmAAQDeoaysrG221ygABmBvad++fVx00UVx5513xgknnBCFhYWaAjm6nysrK3MCGAAgoQTAAADvUFJS0j6b68tkMlFdXW1QAOxV7dq1i/POOy+++93vxqhRoyIvz+sF+CiSsJ8rLS0VAAMAJJT/QgMAeIfi4uK22VxfXV1dNDY2GhQAWeHtE8F33HGHIBg+gsbGxqirq7MvBgBgt/BfZgAA79CqVausPung9C8A2ahDhw5x0UUXxbe//e04/PDDBcGQA/u6oqIiJ4ABABLKf5EBALxDQUGBABgAPqauXbvGpZdeGt/61rdi2LBhkUqlNAUSuq9r0aJFW1MCAEimAi0AAPgfhYWFZdlc39atWw0JgKzXrVu3uPLKK2P16tXxxBNPxOzZsyOTyWgMJGhfl+37YgAA3psAGADgnZujgoLW2VyfE8AAJEmPHj3iyiuvjKVLl8akSZNizpw5mgIJ2ddl+74YAID35gpoAIAdWrdunZefn98ym2sUAAOQRH369ImxY8fGLbfcEgMGDNAQSMC+Lj8/v1WrVq28OwQASCCbOACAHQYNGlQSEVn9scJt27YZFACJtd9++8UNN9wQX/va1+KAAw7QEJq1BOzr8gYPHlxsUgAAySMABgDY4YADDijJ9hpramoMCoDE69u3b9x4441xww03xL777qshNEu1tbVZX2P//v1LTQoAIHl8AxgAYIeePXtm/QuuJLwoBIAPa8CAATFgwICYP39+jBs3LpYvX64pNBtJ2Nf16NGjxKQAAJJHAAwAsEOnTp0EwACwFwwYMCAOPPDAmDt3bkyYMCFWrlypKeS8JOzrunbtKgAGAEggATAAwA5lZWVZ/4Krrq7OoADISalUKgYNGhQDBw6M2bNnx4QJE2Lt2rUaQ85KQgDcpk0bV0ADACSQABgAYIeysjIngAFgL0ulUjFs2LAYOnRozJ49O8aPHx/r1q3TGHKOABgAgN1FAAwAsENJSUlxttfoBDAAzcXbQfCQIUPi5ZdfjokTJ0ZFRYXGkDOSEAAnYX8MAMD/JQAGANihqKioKNtrrKmpMSgAmpW8vLw4/PDDY/jw4fH888/HE088EZWVlRpD4iUhAG7RokWRSQEAJI8AGABgh8LCwhbZXF86nY7t27cbFADNUn5+fowaNSpGjhwZL7zwQkycODGqqqo0hsTavn17ZDKZSKVSWVtjixYtWpgUAEDyCIABAHbI9gC4oaHBkABo9goKCmLUqFExYsSImDlzZkyePDm2bNmiMSROJpOJhoaGyOaMtbCw0AlgAIAk/neTFgAA7NgYFRRk9QuuxsZGQwKAHVq0aBHHH398HHnkkfHMM8/E1KlTY9u2bRpDomR7AJzt+2MAAN5jH6cFAAA7NkZZ/oLL9c8A8H8VFRXF6NGj49hjj41nnnkmpkyZEjU1NRpDImT7DS8FBQWugAYASCABMADA2xujLH/B5QpoAHhvbwfBRx11VEyfPj2efvrpqK2t1RiymgAYAIDdIU8LAAD+QQAMAMlXUlISn/nMZ+LOO++M0aNHZ/X1uiAABgBgdxAAAwDskO1XQAuAAeDDKykpibPPPjv+7d/+LUaPHh2FhYWagv3dR5Sfn9/SlAAAkkcADADw9sYoL88JYADIMa1bt46zzz47vve978UJJ5wgCMb+7iPIz8/3LwwAQAIJgAEAdkilUlm9N2psbDQkAPiY2rVrF+edd15897vfjRNOOCEKCgo0Bfu7D94f55sSAEDyCIABAHbI9gA4nU4bEgB8Qu3bt/9nEDxq1KjIy/NqBPu799kfp0wJACB5/FcOAMAOXnABQPPRoUOHuOiii+J73/ueIJi9JpPJZHuJ/sUAAEggmzgAgP+R1QFwAl4QAkDidOzYMS666KL41re+FYcffnj4fTDs796xOc7yG3IAANg5mzgAgITsjQTAALD7dOvWLS699NL41re+FcOGDRMEs0dk+xXQeXl5/kUAAEigAi0AAPiHbH/BJQAGgN2ve/fuceWVV8ayZcviiSeeiDlz5mgKzXl/5/AIAEACCYABAHbIZDJOAAMAERGx7777xtixY2PJkiUxYcKEmD9/vqZgfwwAQCIIgAEA/ocr7gCA/2W//faLG264Id56660YP358vPnmm5rCLpPtV0Cn3IUOAJBIAmAAgB2y/QVXtr8gBIBc1rdv37jxxhvjrbfeinHjxsWiRYs0hU/MFdAAANjEAQDsXln9Bs4BDADY+/r27Rs333xz3HDDDdG7d28NIdf3d75BAgCQQE4AAwDskO0nMATAAJA9BgwYEAMGDIj58+fHI488EitXrtQUcnF/5woaAIAEcgIYAGCHVCqVzvL6DAkAssyAAQPi1ltvjbFjx0bPnj01hJza32UScEc1AAD/lxPAAAD/QwAMAHysv6MHDRoUBx98cDz//PMxadKk2LRpk8aQ+P1dtv+CJAAAO+cEMADADul0dr/fEgADQHarr6+PioqK2LZtm2aQE/u7dDrtBDAAQAI5AQwA8D+cAAYAPrK6urp4+umnY9q0acJfcm1/5wQwAEACCYABAP6HEw4AwIfW0NAQ06ZNiyeffDK2bt2qIXxkCfgGsAAYACCBBMAAADtkMpmsDoDz8ny9AwCywdvB71NPPRXV1dUaQs7u7wTAAADJJAAGANgh219wCYABYO9qbGyMGTNmxJNPPhmVlZUawieWn5+f9VtkUwIASB4BMADADplMpiGb6yssLDQkANgL0ul0zJo1KyZPnhwbN27UEHaZgoLsfjXX1NTUaEoAAAncZ2oBAMA/NDY2bs/m+gTAALBnpdPpePnll2Py5Mmxdu1aDWGXa9GiRbb/O1BvSgAAySMABgDYoampSQAMAEQmk4nZs2fH448/HuXl5RpCs93fNTY2CoABABJIAAwAsENDQ0NWv+ASAAPA7vV28PvEE0/E6tWrNYTdLtuvgM72G3IAAHiPfaYWAAD8gyugAaD5mjNnTkyaNCmWLl2qGewx2X4FtAAYACCZBMAAADs0NTU5AQwAzcyCBQtiwoQJ8dZbb2kG9nfv0tDQIAAGAEggATAAwA7Z/oJLAAwAu87ChQtj/PjxsXjxYs1gr8n2K6Cz/RckAQB4j32mFgAA/EO2B8AFBQWRl5cX6XTasADgY1q+fHmMGzcu5s+frxnsVXl5eVkfAG/fvt0JYACABBIAAwDs0NDQkPUnHFq1ahXbtm0zLAD4iFauXBmPPPKI4Jes2tclYH8sAAYASCABMADADrW1tXXZXqMAGAA+mnXr1sX48eNj9uzZkclkNISs2tdlu7q6ulqTAgBIHgEwAMAOW7du3ZrtNSbhRSEAZIP169fHY489JvjFvu4TqK6u3mpSAADJIwAGANihqqpKAAwACbdhw4Z4/PHH45VXXommpiYNwb7uE6isrHT1DABAAgmAAQB22LRpU9a/4GrZsqVBAcBOVFVVxcSJE+OFF16IxsZGDSHrJSEA3rRpkxPAAAAJJAAGANhh3bp1WR8AOwEMAP/bli1bYsKECYJfEicJ+7ry8nIBMABAAgmAAQB2WLZsmSugASAhqqurY/LkyTFz5syor6/XEBInCfu6pUuXCoABABJIAAwAsMP8+fOz/gRwcXGxQQHQrNXU1MSUKVPimWeeEfySaEnY173++uu+AQwAkEACYACAHRYsWFCXyWQaUqlUYbbW2Lp1a4MCoFmqq6uLp59+OqZNmxbbtsmkSL5s39el0+mGpUuXbjcpAIDkEQADALxDU1PTtoKCgrbZWp8AGIDmZvv27TF9+vR48sknY+tWt9GSO7J9X9fU1ORfOACAhBIAAwC8Q0NDw9ZsDoBLS0sNCYDm8ndyTJs2LZ566qmorq7WEHJOtu/rGhsb/YsHAJBQAmAAgHeor6+vbNWqVc9src8JYAByXWNjY8yYMSOefPLJqKys1BByVrbv6+rr66tMCQAgmQTAAADv0NDQkNVvmgXAAOSqdDods2bNismTJ8fGjRs1hJyX7fu6bN8XAwDw3gTAAADvUFdXV5XN9ZWWlkYqlYpMJmNYAOSETCYTr732Wjz++OOxatUqDaFZSKVSUVJSktU11tbWVpkUAEAyCYABAN5h27Ztm7K5vvz8/GjVqlXU1NQYFgCJlslkYvbs2fH4449HeXm5htCstGrVKvLz87O6xq1btzoBDACQUAJgAIB3qK6u3pztNZaVlQmAAUist4PfiRMnxpo1azSEZqmsrCzra9y2bVuVSQEAJJMAGADgHaqqqjZle43t2rWLtWvXGhYAiTNnzpyYNGlSLF26VDNo1tq1a5f1NW7atMkJYACALNbQWBgFjQ0REZFKRSavMJre/pkAGADgHSoqKqqyvcYkvDAEgHdasGBBTJgwId566y3NgITs5zZs2CAABgDIYoUFDf9MejMRqab0/+S+AmAAgHdYtWpV1r/oatu2rUEBkAgLFy6M8ePHx+LFizUD3iEJAfDq1aurTAoAIJkEwAAA77BgwYKsD4CdAAYg2y1fvjzGjRsX8+fP1wzYiST8Ql8S9sUAAOycABgA4B2eeOKJjZlMpimVSuVna41OAAOQrVauXBmPPPKI4Bc+QLb/Ql8mk2l64oknNpoUAEAyCYABAN6huro6vX379g1FRUVdsrVGJ4AByDZr166NCRMmxOzZsyOTyWgIJHw/t3379g3V1dVpkwIASCYBMADAu9TV1a0XAAPAB1u/fn089thjgl/Isf1cXV3delMCAEguATAAwLvU1dVVtGnTJmvrKykpiRYtWsT27dsNC4C9oqKiIiZOnBivvPJKNDU1aQh8BEVFRVFcXJz1+2GTAgBILgEwAMC7bN26dV2XLll7ADhSqVR07Ngx1qxZY1gA7FFVVVUxceLEeP755wW/8DF17NgxUqlU1u+HTQoAILkEwAAA71JVVZX1Jx46deokAAZgj9m8eXM8/vjj8cILL0RjY6OGwCfcx9kPAwCwOwmAAQDeZf369Vn/zbMkvDgEIPm2bNkSU6ZMiZkzZ0Z9fb2GwC7QsWNH+2EAAHYrATAAwLusXr066088JOHFIQDJVVNTE1OmTIlnnnlG8Au7WBJ+kW/VqlUCYACABBMAAwC8y9///ves/+aZABiA3aG2tjYmT54czz77bNTV1WkINNN93KuvvioABgBIMAEwAMC7PPzww+t//OMfN6RSqcJsrbFz584GBcAus3379pg+fXpMnTo1tm3bpiGwG2X7CeB0Ot3w8MMPC4ABABJMAAwA8C7V1dXpurq68latWu2TrTV26NAh8vLyIp1OGxgAH1tDQ0NMmzYtnnrqqaiurtYQ2M3y8vKiQ4cOWV1jfX39mtraWptMAIAEEwADAOxEbW3tmmwOgAsKCqJdu3axceNGwwLgI2tsbIwZM2bEk08+GZWVlRoCe0j79u2joCC7X8fV1NSUmxQAQLIJgAEAdmLz5s2r2rdvn9U1duvWTQAMwEeSTqdj1qxZMXnyZH+HwF7av2W7LVu2rDQpAIBkEwADAOzEpk2bVvfp0yera+zWrVvMmzfPsAD4QG8Hv1OmTIkNGzZoCOzF/Vu227BhwxqTAgBINgEwAMBOrFixYvWwYcOyusYkvEAEYO/KZDLx0ksvxZQpU6K83K2usLd17do162tctWrVKpMCAEg2ATAAwE7Mnz9/9ZgxY7K6xiS8QARg78hkMjF79uyYOHFirFnjMB9kiyT8At+8efP8oQEAkHACYACAnRg3btyab37zm5mISGVrjU4AA7Azc+bMiSeeeCKWLVumGZBlEvALfJlx48atNikAgGQTAAMA7MTrr79e29DQsKmwsLBDttZYXFwcZWVlsWXLFgMDIBYsWBDjx4+PJUuWaAZkobKysiguLs7qGhsaGjYuWLCgzrQAAJJNAAwA8B62bt26vF27dh2yucauXbsKgAGauYULF8b48eNj8eLFmgFZLAm3t2zbtm25SQEAJJ8AGADgPVRVVS1t167d0GyusWfPnrFw4ULDAmiGli1bFo899ljMnz9fMyABevbsmfU1VlZWLjUpAIDkEwADALyHdevWLevTp09W15iEF4kA7ForVqyIRx99VPALCZOEfdvatWuXmRQAQPIJgAEA3sPChQuXHX744VldY69evQwKoJlYtWpVjB8/PubOnRuZTEZDIGGSsG9buHDhMpMCAEg+ATAAwHuYNm3a0ksuuSSra+zevXvk5+dHU1OTgQHkqHXr1sX48eNj9uzZgl9IqIKCgkR8A/jpp59eZloAADmw/9QCAICde+ihhzbcd999W/Pz80uzdjNXUBBdunSJNWvWGBhAjqmoqIiJEyfGyy+/HOl0WkMgwbp27RoFBdn9Gq6xsbH6kUce2WBaAADJJwAGAHgf27ZtW15WVnZwNtfYq1cvATBADqmqqoqJEyfG888/74YHyBFJ+P7vtm3blpsUAEBuEAADALyPLVu2LMv2ALhnz57x0ksvGRZAwm3evDkef/zxeOGFF6KxsVFDIIck4fu/W7ZsWWpSAAC5QQAMAPA+1q9fvyzbT2z06NHDoAASbMuWLTFlypSYOXNm1NfXawjkoCTs19avX7/MpAAAcoMAGADgfSxYsGDh0KFDs7rGfffdN1KpVGQyGQMDSJCampqYMmVKPPPMM4JfyGGpVCr23XffrK9z/vz5C00LACA3CIABAN7Ho48++uYFF1yQ1TWWlJRE586dY926dQYGkAC1tbUxefLkePbZZ6Ourk5DIMd17do1WrVqlfV1/vnPf15kWgAAuUEADADwPiZNmlRVX1+/oaioqGM217nvvvsKgAGy3Pbt22P69OkxderU2LZtm4ZAM9GnT5+sr7G+vr7iySefrDItAIDcIAAGAPgAW7duXZTtAXCfPn3ipZdeMiyALNTQ0BDTpk2Lp556KqqrqzUEmpkkXP+8detWp38BAHKIABgA4ANUVFQs7NChw8hsrjEJLxYBmpvGxsaYMWNGPPnkk1FZWakh0EwlYZ9WUVHh+78AADlEAAwA8AGWLl266MADD8zqGnv16hUFBQXR2NhoYAB7WTqdjlmzZsWkSZNi06ZNGgLNWGFhYfTs2TMR+13TAgDIHQJgAIAPMHPmzEWnnnpqdm/qCgqiZ8+esWzZMgMD2EveDn4nT54cGzdu1BAg9tlnn8jPz0/CfnexaQEA5I48LQAAeH+//OUvV6bT6bpsr7NPnz6GBbAXZDKZePHFF+O73/1u3H///cJf4J+ScP1zOp2u++Uvf7nStAAAcocTwAAAH6C6ujpdXV29uE2bNodkc539+vWL6dOnGxjAHpLJZGL27NkxceLEWLNmjYYAO92fJWCvu7i6ujptWgAAuUMADADwIWzYsGFetgfA/fv3NyiAPeTVV1+NSZMmxapVqzQD2KlUKpWI/dmGDRvmmhYAQG4RAAMAfAiLFy9+o2/fvlldY1lZWXTu3DnWr19vYAC7yYIFC2L8+PGxZMkSzQDeV5cuXaK0tDQJ+9z5pgUAkFsEwAAAH8JTTz31+ujRo7O+zv33318ADLAbLFy4MMaPHx+LFy/WDOBD78uSYMqUKa+bFgBAbsnTAgCAD/aLX/xiTWNjY1W215mUF40ASbFs2bK4++674z/+4z+Ev8BHkoTv/zY0NFTee++9q00LACC3OAEMAPAhNDQ0ZDZv3jy/Q4cOI7O5TgEwwK6xYsWKePTRR2P+fDejArm7L9uyZYs/5AAAcpAAGADgQ1q3bl3WB8AdO3aMNm3axObNmw0M4GNYtWpVjB8/PubOnRuZTEZDgI+lbdu20aFDh0Tsb00LACD3CIABAD6kefPmzTvooIOyvs4DDzwwXnrpJQMD+AjWrVsX48ePj9mzZwt+gV2yH0uCuXPnzjMtAIDcIwAGAPiQ/vznP88/77zzsr7OAw44QAAM8CFVVFTEuHHjBL/ALt+PJcHDDz/sBDAAQA4SAAMAfEgTJ06srK2tXdGqVat9srnOgw8+2LAAPkBVVVVMnDgxnn/++WhqatIQYJdKwq0xNTU1yydNmlRlWgAAuUcADADwEWzYsOHvvXr1yuoAuG3bttG1a9dYu3atgQG8y+bNm+Pxxx+PF154IRobGzUE2OW6desWbdu2TcS+1rQAAHKTABgA4CNYuHDha7169Toj2+scMGCAABjgHbZs2RJTpkyJ5557LrZv364hwG6TlO//Lly48O+mBQCQmwTAAAAfwcSJE/9+wgknZH2dBx54YEyfPt3AgGavpqYmpkyZEs8880zU19drCLDbDRgwIBF1jh8//u+mBQCQmwTAAAAfwb333rv6Bz/4wfqioqLO2VznAQccEHl5eZFOpw0NaJZqa2tj8uTJ8eyzz0ZdXZ2GAHtEXl5e9O/fP+vrrK+vX3ffffeVmxgAQG4SAAMAfESVlZVzu3btmtXHgFu1ahX77LNPLFu2zMCAZqWuri6efvrpmDZtWmzbtk1DgD1qn332iVatWmV9nZs2bZpjWgAAuUsADADwES1dunR2tgfAERGDBg0SAAPNRkNDQ0ybNi2eeuqpqK6u1hBgr+2/kuCtt976m2kBAOQuATAAwEc0ffr0v48cOTLr6xw4cGBMmDDBwICc1tDQEM8991w8+eSTUVlZqSHAXt9/JcG0adP+bloAALlLAAwA8BH9x3/8x9JbbrmlOj8/v3U219mrV68oKyuLLVu2GBqQc9LpdMyaNSsmTZoUmzZt0hBgrysrK4tevXplfZ2NjY1b7rnnnmUmBgCQuwTAAAAfUW1tbXrDhg1/7dKly3HZXGcqlYqBAwfGrFmzDA3IGW8Hv5MnT46NGzdqCJA1Bg4cGKlUKuvr3Lhx4yu1tbVpEwMAyF0CYACAj+Gtt956JdsD4IgQAAM5I51Ox8svvxxTpkyJ8vJyDQGyct+VBIsWLXrFtAAAcpsAGADgYxg/fvwrRxxxRNbXedBBB0VBQUE0NjYaGpBImUwmZs+eHRMnTow1a9ZoCJCVCgoK4qCDDkpErY888ogAGAAgx+VpAQDAR/fjH/94ZX19/fpsr7OoqCj69etnYEAivfrqq3HHHXfEz3/+c+EvkNX69esXRUVFWV9nXV1d+b333rvaxAAAcpsTwAAAH9OGDRte6dGjx6ezvc5BgwbFggULDAxIjCVLlsSECRNi/vz5mgEkwuDBgxNR5/r1653+BQBoBgTAAAAf07x5815OQgA8bNiwePjhhyOTyRgakNXefPPNmDBhQixevFgzgMRIpVIxdOjQRNQ6d+7cl0wMACD3CYABAD6m++677+XRo0dnIiKVzXW2bds2evfuHcuWLTM0ICstW7YsHnvsMSd+gUTq06dPtG3bNgmlpu+9996/mhgAQO4TAAMAfEwTJ06s3Lp165LS0tK+2V7rkCFDBMBA1lmxYkU8+uijgl8g0YYMGZKIOqurqxc+/fTTm00MACD3CYABAD6B8vLyl/fff/+sD4AHDx4c48aNMzAgK6xcuTImTJgQc+fOdT09kHhJ+f7vmjVrfP8XAKCZEAADAHwCM2fOfG7//ff/fLbX2a1bt+jWrVuUl5cbGrDXrFu3LsaPHx+zZ88W/AI5oWfPntGlS5dE1DpjxoznTAwAoHkQAAMAfAK33Xbba5dcckl1fn5+62yvdciQIQJgYK9Yv359PPbYY4JfIOck5frnxsbGzbfddts8EwMAaB4EwAAAn0BlZWXThg0b/tqlS5fjsr3WQw89NCZNmmRowJ78MzKeeOKJeP7556OpqUlDgJxz6KGHJqLOioqKV6qrq9MmBgDQPAiAAQA+oXnz5s1MQgDcu3dv10ADe0RVVVVMnDgxXnjhhWhsbNQQICd17949evbsmZT9quufAQCakTwtAAD4ZP77v/97VkQk4kTFpz71KQMDdpstW7bEQw89FLfffns899xzwl8gpw0fPjwRdWYymfTdd9/9gokBADQfTgADAHxCkyZNqtqyZcuCsrKyg7K91uHDh8fjjz9uaMAuVVNTE1OmTIlnnnkm6uvrNQTIealUKg477LBE1Lply5bXp0+fvsXUAACaDwEwAMAusHz58lkDBw7M+gC4S5cu0atXr1i5cqWhAZ9YbW1tTJ48OZ599tmoq6vTEKDZ6N27d3Ts2DEx+1QTAwBoXgTAAAC7wLPPPvvCwIEDr0hCrcOGDRMAA59IXV1dPP300zFt2rTYtm2bhgDNzrBhwxJT61/+8pcXTQwAoHnxDWAAgF3g1ltvnV9fX782CbUefvjhkUqlDA34yBoaGmLq1Klx6623xuOPPy78BZqlJF3/XFdXt/rWW29dYGoAAM2LE8AAALtAQ0NDZs2aNc/16dPns9lea7t27aJPnz6xZMkSgwM+7J9xMW3atHjqqaeiurpaQ4Bmbb/99ou2bdsmotbVq1fPNDEAgOZHAAwAsIs8++yz05IQAEdEHHHEEQJg4AOl0+mYNWtWTJo0KTZt2qQhABFx5JFHJqbW6dOnTzMxAIDmxxXQAAC7yC233PJaQ0NDZRJqHT58eLRo0cLQgJ1Kp9Px3HPPxW233Rb333+/8Bdgh6KiovjUpz6ViFobGho23HLLLXNNDQCg+XECGABgF6murk6Xl5c/t88++5yR7bW2bNkyDj300Hj55ZcNDvindDodL7/8ckyZMiXKy8s1BOBdhgwZEkVFRYmodc2aNc/V1tamTQ0AoPkRAAMA7EIvvvjiM0kIgCMiRo4cKQAGIiIik8nE7NmzY+LEibFmzRoNAXif/VNSzJo161kTAwBongTAAAC70O233/7KOeecszU/P78022sdMGBAtG/f3tWu0My9+uqrMWnSpFi1apVmALyPjh07xgEHHJCIWhsbG6u/8Y1v/NXUAACaJwEwAMAutHLlyob169fP6tat2+hsrzWVSsXhhx8ekyZNMjhohubMmROTJ0+OJUuWaAbAh3D44YdHKpVKRK3r16+fVVFR0WhqAADNU54WAADsWq+++mpirts77LDDDAyamTfffDP+/d//PX7yk58IfwE+pFQqFSNGjEhMva+88sozpgYA0Hw5AQwAsIvddNNNz5166qnV+fn5rbO91m7dukX//v1j4cKFBgc5btmyZfHYY4/F/PnzNQPgIzrggAOic+fOiai1sbFxy4033jjL1AAAmi8BMADALrZy5cqG8vLyGT179vx0Euo9+uijBcCQw5YvXx7jxo0T/AJ8wv1SUpSXlz9TXl7eYGoAAM2XABgAYDeYMWPGUxdccEEiAuAhQ4ZE69ato7q62uAgh6xcuTImTJgQc+fOjUwmoyEAH1ObNm3i0EMPTUy9zz777FOmBgDQvPkGMADAbvDVr371lYaGhk1JqLWgoCCOOOIIQ4McsW7duvj5z38ed955Z8yZM0f4C/AJjRw5MvLz8xNRa0NDw8abbrrpVVMDAGjenAAGANgNKisrm1atWjW9T58+5ySh3qOPPjqefPJJQREk2Pr16+Oxxx6L2bNn+3cZYBdJpVIxatSoxNS7cuXKadXV1WmTAwBo3pwABgDYTaZNm5aY6/c6duwYAwYMMDRIoA0bNsSvf/3r+Nd//dd49dVXhb8Au9CAAQOiY8eOian36aefftLUAAAQAAMA7CZf+9rX5tTX11ckpd6jjjrK0CBBqqqq4v77749vf/vb8eKLL0ZTU5OmAOxiRx55ZGJqra+vX/eNb3zjdVMDAMAV0AAAu0ltbW16xYoVT++///6fT0K9hx56aLRt2zaqqqoMD7LYli1bYsqUKfHcc8/F9u3bNQRgN2nbtm0MGTIkMfUuX778qdraWtc/AwDgBDAAwO70xz/+cUJSas3Pz4/jjjvO0CBL1dTUxKOPPhq33XZb/OUvfxH+Auxmxx57bOTn5yel3Myvf/3rCaYGAECEABgAYLe66667llZXV89PSr1HH310tGjRwuAgi7wd/H7jG9+IqVOnRn19vaYA7GYtWrSIo48+OjH1btmy5Y177rlnhckBABDhCmgAgN3u9ddfn3T44YcPSEKtxcXFcdhhh8XMmTMNDvayurq6ePrpp2PatGmxbds2DQHYgw477LAoKSlJTL3z5s17wtQAAHibE8AAALvZ9773vanpdLohKfWecMIJkUqlDA72koaGhpg6dWrceuut8fjjjwt/AfawVCoVJ5xwQmLqTafT27/73e8+ZXIAALzNCWAAgN1s+vTpWyoqKmZ26dIlER/Y7d69e/Tv3z/efPNNw4M9qKGhIaZNmxZPPfVUVFdXawjAXnLAAQdE9+7dE1NvRUXFczNmzPAXBwAA/+QEMADAHjBr1qxEXcuXpFMvkHTpdDqee+65uP322+PRRx8V/gLsZccff3yi6p0xY8YkUwMA4J2cAAYA2AO++tWvvnT66adXFRYWtk1CvQMHDoyOHTvGhg0bDA92k3Q6HbNmzYrJkyfHxo0bNQQgC3Ts2DEGDhyYmHobGhoqb7755pdMDgCAd3ICGABgDygvL29YsWLF1MRsEvPy4sQTTzQ42A3S6XS8+OKL8Z3vfCfuv/9+4S9AFjnppJMiLy85r8tWrFgxpaKiotHkAAB4JwEwAMAe8qtf/erRiMgkpd6jjjoqysrKDA52kUwmE6+++mp873vfi1//+texdu1aTQHIImVlZXHUUUcl6q+W//7v//6zyQEA8G4CYACAPeQ///M/l1dWVv4tKfUWFhbGMcccY3CwC7wd/P785z+PNWvWaAhAFjruuOOioCA5X0urqqqa/dOf/nS1yQEA8G4CYACAPeill14al6R6jzvuuCgqKjI4+JjmzJkTd911V/z85z+P1au9owfIVkVFRYn7xbcXXnhhnMkBALAzBVoAALDnjB079pkFCxZUFhYWtktCvSUlJXHEEUfE9OnTDQ8+gjfffDPGjx8fb731lmYAJMCRRx4ZJSUliam3oaFh0zXXXPOsyQEAsDMCYACAPai8vLxh6dKlE/v3739xUmo+8cQT49lnn410Om2A8AEWLVoUjz32WCxevFgzABIiLy8vTjzxxETVvGTJkifKy8sbTA8AgJ3ucbUAAGDP+u1vfzsxIjJJqbdjx44xdOhQg4P3sXz58rj77rvjRz/6kfAXIGGGDRsWHTp0SFLJmd/85jePmxwAAO9FAAwAsIf953/+5/JNmza9kqSaTz/99EilUoYH77Jy5cr4yU9+Et///vdj/vz5GgKQMHl5eXHGGWckquZNmza9fM8996wwPQAA3osroAEA9oKXXnpp/KmnnnpYUurt2rVrDBkyJGbPnm14EBHr1q2L8ePHx+zZsyOTyWgIQEINHTo0OnfunKiaX3jhhQkmBwDA+xEAAwDsBZdffvkzS5YsWVdUVNQlKTWfccYZ8be//U3YRbO2fv36eOyxxwS/ADkglUrF6aefnqia6+rq1lx22WXTTQ8AgPcjAAYA2AsqKyub5s+f/8ihhx56dVJq7tatm1PANFsbNmyIxx9/PF555ZVoamrSEIAc8KlPfSq6du2aqJrfeOONcdXV1WnTAwDg/fgGMADAXvL1r399XDqdrktSzb4FTHNTVVUV999/f3z729+OF198UfgLkCNSqVR8+tOfTlTN6XS69pvf/OZjpgcAwAdxAhgAYC+ZMWNG9Zo1a/7Ss2fPxLx97N69ewwcODDmzJljgOS0LVu2xIQJE+KFF16IxsZGDQHIMYceemh069YtUTWvXr36qRkzZlSbHgAAH8QJYACAvejXv/71HyMiUR8SPeuss5wCJmdt27YtHn300bjtttviueeeE/4C5KC8vLwYM2ZM0srO/OpXv/qT6QEA8KH2vFoAALD3fP/733+rqqoqUR/V7dGjR3zqU58yPHJKfX19TJ06Nb71rW/F1KlTo76+XlMActSIESOiS5cuiap506ZNf73rrruWmh4AAB+GABgAYC975plnHkpazWeccUbk5dlKkjvmzZsXjz76aGzdulUzAHJYQUFBnH766Ymre9q0aQ+aHgAAH5a3dgAAe9nYsWNn1tfXr01SzZ07d47DDjvM8ACARBk5cmR06NAhUTXX1dWtHjt27POmBwDAhyUABgDYyyorK5tee+21Pyat7jPPPDMKCgoMEABIhBYtWiTy9O/s2bP/UF1dnTZBAAA+LAEwAEAWuOqqqyY0NjZWJanm9u3bx9FHH214AEAiHHfccdGmTZtE1dzQ0LDxiiuumGh6AAB8FAJgAIAssGDBgrqFCxc+lrS6R48eHYWFhQYIAGS1li1bxsknn5y4uhcuXDhu6dKl200QAICPQgAMAJAlvv71r/8pnU7XJqnmtm3bximnnGJ4AEBWO+2006K0tDRRNTc1NdV+7Wtfe8j0AAD4qATAAABZ4umnn968fPnyxF3xN3r06GjXrp0BAgBZqUOHDnH88ccnru5ly5ZNmD59+hYTBADgoxIAAwBkkbvvvvtPmUymKUk1FxYWxumnn254AEBWOvPMMxP3yYpMJtN41113/dH0AAD4OATAAABZ5Be/+MWatWvXTkta3UcccUT06tXLAAGArNK7d+847LDDEld3eXn5X+6///51JggAwMchAAYAyDIPP/zwn5JWcyqVijPPPNPwAICsMmbMmEilUomr+8EHH/yT6QEA8HEJgAEAsszXv/71NzZs2DAraXUPHDgwDj74YAMEALLCoEGDYsCAAYmru6KiYuatt966wAQBAPi4BMAAAFlo3Lhxv01i3WPGjIm8PFtMAGDvysvLizFjxiSy9j//+c+/NUEAAD7RflgLAACyz/XXXz+nqqrqr0mru1evXnHUUUcZIACwVx1zzDHRvXv3xNW9adOmV2666aa5JggAwCchAAYAyFJ/+tOf7k1i3WPGjInS0lIDBAD2ijZt2sRZZ52VyNofeOCBe00QAIBPSgAMAJClbrrpprlJPAVcXFwcZ555pgECAHvFWWedFS1btkxc3Zs2bXrl5ptvnmeCAAB8UgJgAIAsNm7cuF8lse5Ro0ZF7969DRAA2KP69OkTI0eOTGTtjz322K9MEACAXUEADACQxcaOHTu7qqrqb0mrO5VKxfnnnx+pVMoQAYA9tv/4/Oc/n8j9R2Vl5d+uueaav5kiAAC7ggAYACDLTZ069bdJrLtv374xZMgQAwQA9ojDDjsssTeQTJ48+TcmCADAriIABgDIcpdeeumLVVVVryax9s9//vNRXFxsiADAblVaWhrnn39+Imuvqqr66+WXX/6SKQIAsKsIgAEAEuChhx76WRLrLisri9NPP90AAYDd6qyzzoqSkpIklp753e9+91MTBABgVxIAAwAkwA033DB3w4YNs5JY+3HHHRd9+vQxRABgt+jbt28cddRRiay9oqJi1te//vU3TBEAgF1JAAwAkBA///nPfxoR6aTVnUql4vOf/3zk5dl6AgC7Vn5+flx00UWRSqWSWH76F7/4xX+bIgAAu5q3cAAACXHHHXe8tW7duulJrL13795xzDHHGCIAsEudcMIJ0b1790TWXl5e/pc77rjjLVMEAGBXEwADACTI3XfffW8mk2lKYu1nnXVWtG3b1hABgF2iQ4cOcfrppyey9kwm03T33Xf/3BQBANgdBMAAAAlyzz33rCgvL386ibW3bNkyzj33XEMEAHaJc889N1q0aJHI2tesWTP1xz/+8UpTBABgdxAAAwAkzA9/+MOfZzKZhiTWPnz48Bg0aJAhAgCfyKGHHhpDhw5NZO3pdLrhBz/4wS9MEQCA3UUADACQMPfee+/qRYsWPZDU+i+++OIoKSkxSADgY2ndunVcfPHFia1/4cKFf7jvvvvKTRIAgN1FAAwAkECXXXbZrxsaGjYlsfaysjJXQQMAH9u5554bpaWliay9oaFh4+WXX/47UwQAYHcSAAMAJNDs2bNrXn311V8ntf4jjjgiDj74YIMEAD6SwYMHx+GHH57Y+l955ZX7Zs+eXWOSAADsTgJgAICEOueccx6tqalZmtT6L7roomjZsqVBAgAfSsuWLeNzn/tcYuuvqalZMmbMmMdMEgCA3U0ADACQUJWVlU3Tpk37RVLrb9++fZx++ukGCQB8KGeccUa0b98+sfU/+eST91ZXV6dNEgCA3U0ADACQYOedd960qqqqV5Ja/wknnOAqaADgAx188MFx/PHHJ7b+TZs2vXzBBRc8a5IAAOwJAmAAgIT74x//eG9EZJJYeyqVigsuuMBV0ADAe2rZsmVccMEFkUqlkrqEzP333/8zkwQAYE8RAAMAJNzNN988b9WqVU8ktf6OHTsm+nt+AMDudcEFF0THjh0TW/+KFSse//rXv/6GSQIAsKcIgAEAcsCNN974k6ampq1JrX/kyJExdOhQgwQA/pdPfepTMWLEiMTW39TUVH3zzTf/t0kCALAnCYABAHLAxIkTK//+97//KslruPDCC6OsrMwwAYCIiGjTpk18/vOfT/QaZs+efd/EiRMrTRMAgD1JAAwAkCPOPvvsh2pqapYntf7S0tK46KKLDBIAiFQqFV/84hejtLQ0sWuoqal566yzznrYNAEA2NMEwAAAOaKioqJx0qRJP07yGgYPHhwjR440TABo5o444og46KCDEr2GJ5544qeVlZVNpgkAwJ4mAAYAyCGXXHLJzIqKihlJXsMFF1wQ3bp1M0wAaKZ69uyZ+KufKyoqZnzhC1+YZZoAAOwNAmAAgBzzb//2b/ek0+ntSa2/RYsWceWVV0ZhYaFhAkAzU1hYGF/60pcSvQ9Ip9Pb/+3f/u0e0wQAYG8RAAMA5Jh777139aJFix5M8hq6d+8eZ555pmECQDNzxhlnRPfu3RO9hsWLFz947733rjZNAAD2FgEwAEAO+uxnP/vL2traRL94PPHEE2Pw4MGGCQDNxKBBg+Kkk05K9Bpqa2tXn3vuub80TQAA9iYBMABADlq8eHH9uHHj/j3Ja0ilUnHJJZdE27ZtDRQAclybNm3ikksuiVQqleh1jBs37t8XL15cb6IAAOxNAmAAgBx1+eWXv1RRUTEjyWsoLS2NL3zhC4l/GQwAvLe3f+mrdevWiV5HRUXFM5dffvlLJgoAwN4mAAYAyGE33HDDXU1NTVuTvIaDDjrI94ABIId95jOfiUMOOSTRa2hqaqq+4YYbfmiaAABkAwEwAEAOGzdu3MbZs2cn/jt0p5xyiu8BA0AOOuSQQ+LTn/504tfx17/+9efjxo3baKIAAGQDATAAQI77zGc+81B1dfXCJK8hlUrFF7/4xejQoYOBAkCO6NixY3zpS19K/KceNm/ePO+00057xEQBAMgWAmAAgBxXXV2dfuCBB34UEekkr6O4uDguvfTSyMuzhQWApMvPz4/LLrssiouLk76U9P333/+ftbW1aVMFACBbeHsGANAMXH/99XMWLVr0YNLXsf/++8e5555roACQcOedd1707ds38etYuHDhH7/61a++bqIAAGQTATAAQDNxySWX/Lyurq486es4/vjjfQ8YABJs2LBhccwxxyR+HXV1dWsuvPDC+0wUAIBsIwAGAGgmXnvttdoHHnjguxGRSfI6UqlUfOlLX4oePXoYKgAkTO/evePSSy9N/Hd/IyLzwAMPfO/111+vNVUAALKNABgAoBm5+uqr/7Z06dJHk76OoqKiGDt2bJSWlhoqACRE69at46qrrorCwsLEr2X58uXjrr766r+ZKgAA2UgADADQzJx33nn/r66ubnXS19GhQ4e4/PLLIy/PlhYAsl1eXl5cfvnl0b59+8Svpb6+ft0ll1zyE1MFACBr999aAADQvLz++uu1Dz744Pcj4VdBR0QMGDAgzjrrLEMFgCw3ZsyYOPDAA3NiLY899tgPXnnllW2mCgBAthIAAwA0Q1/5ylf+umbNmqm5sJaTTz45Dj30UEMFgCw1ZMiQOOmkk3JiLWvXrv3LpZde+oKpAgCQzQTAAADN1GWXXfYf9fX1FUlfRyqViksvvTS6d+9uqACQZXr06BFf/OIXI5VKJX4tDQ0Nm6655pofmioAANlOAAwA0EzNmDGj+oEHHvhO5MBV0C1btozrr78+2rZta7AAkCXatWsX1113XbRs2TIXlpN56KGH/nXSpElVJgsAQLYTAAMANGNf+cpX/rpkyZI/58Ja2rZtG1dffXW0aNHCYAFgL2vRokVcffXVOfPLWUuXLn30iiuueNlkAQBIAgEwAEAzd+655/6ktrZ2eS6spXfv3jlzzSQAJNXbn2fYZ599cmI9tbW1y88555wfmywAAEkhAAYAaOYWLFhQ97Of/ezbmUymMRfWM2zYsDjllFMMFgD2kk9/+tMxdOjQnFhLJpNp/NnPfvbtBQsW1JksAABJIQAGACBuvfXWBfPnz78/V9Zz5plnxuDBgw0WAPaw4cOHx2c+85mcWc/8+fN/d+utty4wWQAAkkQADABARESMGTPmvpqamrdyYS2pVCouu+yy6Nmzp8ECwB7Su3fvuPjii3PmUwxbt25ddPrpp//aZAEASBoBMAAAERGxcuXKhh/+8Ie3pdPpnLjisGXLlvEv//Iv0aVLF8MFgN2sS5cucf3110dRUVFOrKepqanmu9/97jfKy8sbTBcAgKQRAAMA8E933XXX0ueff/6eXFlPaWlpXHvttVFWVma4ALCblJWVxXXXXRclJSU5s6aZM2fe/f/+3/9bZboAACSRABgAgP/l5JNPHldeXv50rqynU6dOMXbs2Jw5kQQA2aSoqCiuueaa6NixY86sqby8/MlTTz11gukCAJBUAmAAAP6PSy655K66urq1ubKefffdN6644orIy7P9BYBdJS8vL6688sro3bt3zqyprq6u/JJLLvmh6QIAkOi9uhYAAPBus2bNqn7ooYfujIh0rqxp4MCBcd555xkuAOwi559/fhxyyCG5tKT0gw8+eOesWbOqTRcAgCTLb3tQ9NzpjndbRG15oQ4BADRTEydOXDNmzJi8Tp06Dc2VNfXp0yfy8/PjzTffNGAA+ATOOuusOOmkk3JqTa+//vp9Z5555kTTBQAgCYq7N0Ze6c5/5gQwAADv6dRTT/31li1bXs+lNZ122mlx9NFHGy4AfEzHHntsnHrqqTm1pi1btrxx2mmn/cZ0AQDIBQJgAADeU0VFReONN974jcbGxqpcWtcFF1wQRx55pAEDwEd05JFHxuc+97mcWlNjY2PVzTff/I2KiopGEwYAIBcIgAEAeF9//OMf1z/yyCPfiRz6HnAqlYqLLroohgwZYsAA8CENHTo0LrrookilUrm0rPQjjzzynfvvv3+dCQMAkCsEwAAAfKBLL730hQULFvwupzbCeXnxpS99Kfbff38DBoAPcNBBB8WXvvSlyMvLrVdJCxYs+N2ll176ggkDAJBLBMAAAHwoo0eP/mVVVdXcXFpTYWFhfOUrX4kePXoYMAC8h169esUVV1wRBQUFObWuqqqqOaNHj/6lCQMAkGsEwAAAfCgVFRWNV1111S0NDQ0bcmldJSUlcfPNN8c+++xjyADwLr17946bbropiouLc2pdDQ0NG6666qqv++4vAAC5SAAMAMCHNmHChE3333//tzKZTDqX1lVcXBzXXXdddO/e3ZABYIfu3bvHtddeG61atcqpdWUymfT999//rQkTJmwyZQAAcpEAGACAj2Ts2LGz58+f/9tcW1fr1q3juuuuiw4dOhgyAM1ehw4d4rrrrovWrVvn3Nrmz5//m7Fjx842ZQAAcpUAGACAj+y44477xaZNm17MtXW1a9cubrzxxmjXrp0hA9BstW3bNmf/Pty4ceOLxx13nO/+AgCQ0wTAAAB8ZNXV1emLL774W3V1datzbW0dO3aMG2+8Mdq0aWPQADQ7ZWVlceONN0bHjh1zbm21tbWrL7zwwturq6vTJg0AQC7Lb3tQ9NzZD9LbImrLC3UIAICdWrZsWf327dtfOvbYY0/Ny8trkUtrKykpiaFDh8Zrr70WNTU1hg1As9ChQ4f42te+Fp06dcq5tTU1NW39zne+M/bBBx9cb9IAAOSC4u6NkVe6858JgAEA+NhefPHFzYcccsiyAQMGnBgRqZzaRBcXx5AhQ4TAADQLHTt2jJtuuik6dOiQi8tLjx8//ravfvWrc0waAIBc8X4BsCugAQD4RC688MIZb7zxxm9ycW3t27ePm266KSdPQgHA2zp16pTL4W+88cYbv77wwgufM2kAAJoLATAAAJ/YqFGjfrFhw4aZubi2t0Pgzp07GzQAOadz585x0003Rfv27XNyfRs2bJg5atSo+0waAIDmRAAMAMAnVltbm77sssu+V1dXtzoX19euXbu44YYbomPHjoYNQM7o0KFDXH/99dGuXbtc3Z+s/sIXvvDd2tratGkDANCc+AYwAAC7xJIlS+oj4pVRo0admpeX1yLX1ldcXBxDhw6NuXPnxrZt2wwcgETr0qVL3HjjjTl77XNTU1P1nXfeec0f/vCHdaYNAEAuer9vAAuAAQDYZWbNmlXVo0ePuYceeujoVCqVn2vra9WqVYwYMSIWLVoUlZWVBg5AIu23335x0003RVlZWU6uL51ON/z617++4fbbb3/TtAEAyFUCYAAA9phJkyatPeqoozbsu+++R+fi+goLC2P48OGxbNmy2LBhg4EDkCgDBgyIa6+9Nlq1apWza5w2bdq/XXLJJc+ZNgAAuez9AmDfAAYAYJc77bTTHn/rrbcezNX1FRUVxTXXXBNDhgwxbAASY8iQIXHNNddEUVFRzq5xwYIFvzv99NOfMG0AAJozATAAALvFEUcccc+GDRtm5ur6CgoK4sorr4wjjjjCsAFIwt/LceWVV0ZBQUHOrrG8vPypESNG/LdpAwDQ3AmAAQDYLaqrq9MXXXTRd2pra1fk7GY6Ly8uvvjiOPLIIw0cgKw1atSouPjiiyMvL3dfA23dunXxZz/72e83NDRkTBwAgObON4ABANhtli9fvr2mpuaFY4899uT8/PyWubjGVCoVgwYNikwmE4sWLTJ0ALLK6aefHueee26kUqmcXWN9fX3FDTfccM3UqVOrTBwAgObi/b4BLAAGAGC3evnll7cUFBS8cMQRR4zOy8trkYtrTKVSccABB0SnTp1i7ty5kck4fATA3lVYWBhXXHFFHHPMMTm9zsbGxuo777zzKz/72c9WmzoAAM2JABgAgL1qxowZlb169Xp98ODBJ6dSqfxcXWfPnj2jb9++8fe//z0aGxsNHoC9olWrVnH11VfHwIEDc3qd6XS64be//e2Nt9122wJTBwCguREAAwCw1z3xxBPlw4cPX9OvX79jIyJn76Hs2LFjDBw4MObMmRN1dXUGD8Ae1a5du7jxxhujT58+ub7U9JQpU779xS9+8XlTBwCgOXq/ADhPewAA2FPGjBkz9Y033vh1rq+zZ8+eceONN0bHjh0NHYA9pkuXLnHTTTdF9+7dc36tc+fO/eU555zzF1MHAID/SwAMAMAe9alPfernS5cufTjX19mlS5e49dZb48ADDzR0AHa7gQMHxje/+c3o1KlTzq/1rbfeemjEiBG/MnUAANg5ATAAAHvcsccee8/GjRtfyPV1FhcXx7XXXhsjRowwdAB2m8MPPzyuuuqqaNmyZc6vdePGjc8fffTR95g6AAC8NwEwAAB7XEVFReNxxx339crKyr/l+loLCgrisssui/PPPz9SqZThA7DLpFKpOP/88+PSSy+NgoKCnF/vpk2bXj7ssMNuqaysbDJ9AAB4bwJgAAD2isWLF9efddZZN1dXV7/ZHNZ7/PHHx5e//OUoKioyfAA+sRYtWsSXv/zlOP7445vFequrq98cM2bMN8rLyxtMHwAA3l9+24Oi585+kN4WUVteqEMAAOw2a9asaVi1atWs0aNHH1dQUNA619fbrVu3OOCAA2LevHlRX1/vAQDgYykrK4trrrkmDjrooGax3rq6uvKxY8de89RTT202fQAA+Ifi7o2RV7rznwmAAQDYq+bNm1ezevXqZ04++eTjCwoKSnN9ve3atYuRI0fG8uXLY+PGjR4AAD6S/v37x0033RRdu3ZtFuutr69fd9111335T3/6U4XpAwDA/xAAAwCQ1ebMmbMtlUq9fOSRR56Ul5eX83ckt2jRIkaMGBG1tbWxdOlSDwAAH8rxxx8fX/rSl5rN5wQaGxu33HXXXdf99Kc/XWn6AADwvwmAAQDIejNnzqzs2bPn64MHDz4plUrl5/p6U6lUHHLIIdGqVatYsGBBZDIZDwEAO5WXlxef/exn4/TTT49UKtUs1pxOp7f//ve//+o3vvGN1z0BAADwfwmAAQBIhEmTJpXvs88+8wYOHHhCKpUqaA5r3m+//WLAgAExd+5c3wUG4P8oKyuL6667LoYNG9Zs1pxOp7f/8Y9/vOmqq676qycAAAB2TgAMAEBiTJw4cc3BBx+85MADDzwulUrlNYc1t2/fPoYOHRqLFi2KLVu2eAgAiIiIffbZJ66//vro2bNns1lzJpNpnDBhwm1f/OIXn/cEAADAexMAAwCQKI8++ujy/fff/42DDjrohOZwHXRERHFxcRx11FHR2NgYb731locAoJkbPXp0XHHFFVFSUtJs1pxOpxsefvjhr15yySWzPAEAAPD+BMAAACTO+PHjVw0cOHDpAQcccGxzOQmcSqViwIAB0aVLl3jjjTeiqanJgwDQzBQVFcWll14aJ554YrP53m/EP07+Pv7447dffPHFMz0FAADwwQTAAAAk0iOPPLLs0EMPXbb//vs3mxA4IqJHjx4xZMiQePPNN2Pr1q0eBIBmonv37vEv//IvccABBzSrdWcymaYnnnji9s997nPPeAoAAODDEQADAJBYDz/88NJjjjlmY+/evY+KiGZzFKq0tDSGDx8eq1evjvXr13sQAHLcwIED45prrol27do1t6VnZsyY8YOzzjprqqcAAAA+PAEwAACJdv/99795zDHHVO6zzz5HRDMKgVu0aBGHHXZYtGzZMhYuXBjpdNrDAJBjCgoK4pxzzonzzz8/WrRo0dyWn37uuefuOuWUUyZ4EgAA4KMRAAMAkHi///3v5w8bNmxF3759j2lO10GnUqno27dvDB06NBYvXhxbtmzxMADkiJ49e8YNN9wQgwcPblbf+434x7XPU6ZM+fbpp58+2ZMAAAAfnQAYAICc8OCDDy4ZNmzYin79+jWrEDgionXr1nHEEUdEfX19LF261MMAkGCpVCpOOOGEuOKKK6JNmzbNbv07wt9vnXPOOX/xNAAAwMcjAAYAIGc89NBDS4YNG7a8X79+xza3EDg/Pz8OPvjg6NWrV8yfPz8aGho8EAAJU1JSEpdffnmccMIJkZ+f3+zWn8lkGp944olvffazn53maQAAgI9PAAwAQE556KGHlo4cOXJdnz59RqWa252ZEdG1a9cYNmxYLFu2LCorKz0QAAnRt2/fuO6662K//fZrluvPZDLpp59++rvnnHPO054GAAD4ZATAAADknD/96U+LDj300KX7779/s7sOOiKiuLg4jjzyyCgpKYk333wz0um0hwIgSxUUFMRnP/vZuPDCC6OkpKRZ9iCdTjc88sgjt5x//vnTPREAAPDJCYABAMhJDz/88NId3wQelUqlmt09mqlUKvr06RMHH3xwLFy4MLZt2+ahAMgynTt3jrFjx8bQoUOjGV5aERH/CH+feOKJ2y+88MLnPBEAALBrCIABAMhZDz300JIePXq8NmjQoGPz8vJaNMcetG3bNkaNGhVNTU2xZMkSDwVAFkilUjF69Oi48soro0OHDs22D01NTdt++9vf/stll132oqcCAAB2HQEwAAA5bdKkSeXdu3efM3jw4GYbAufn58eAAQOiV69esWDBgti+fbsHA2Avad26dVx66aVx/PHHR35+frPtQ2NjY/WvfvWrf7nuuute81QAAMCuJQAGACDnTZ48eW1jY+OMI4444uiCgoKS5tqHrl27xqhRo2Lbtm2xcuVKDwbAHpRKpWLUqFExduzY6NWrV7PuRX19/fo77rjjK9/61rcWejIAAGDXEwADANAsPP/881UbNmx45rjjjjuqsLCwrLn2obCwMAYNGhT77bdfLF68OGpraz0cALtZ+/bt44orrogTTzwxCgub9/uU2tralTfffPPVP/nJT1Z7MgAAYPcQAAMA0Gz87W9/27p27doZJ5xwwsjCwsK2zbkXnTp1ipEjR0Z1dbXTwAC70ciRI+Pqq6+OHj16NPte1NTULL/hhhuu/e1vf7vOkwEAALuPABgAgGbltdde2zpv3rynTznllKFFRUWdmnMvCgsL49BDD4399tsvFi1a5DQwwC709qnfk08+udmf+o2I2Lx587yLL774unHjxm30dAAAwO71fgFwat9zYsTOftC4LmLjq610DwCAxOrVq1fhs88++69du3Y9QTciGhoaYurUqTF58uRobGzUEICPqaCgIE499dQYPXq04HeH8vLyp4499tjvrly5skE3AABg9+swrDYKuuz8ZwJgAAByWuvWrfNeeumlm/fdd9+zdeMfVq9eHffff38sWbJEMwA+ov322y8uuugi1z2/w8KFC38/fPjwnzY0NGR0AwAA9gwBMAAAzd7zzz9/8aGHHnp1RKR0IyKTycTMmTPjz3/+c9TV1WkIwAcoKSmJ8847L0aMGBGplL9Kdki//PLL9xx77LEPagUAAOxZ7xcA+wYwAADNwn333Tfn+OOP39yrV6/DQwgcqVQqevfuHcOHD49169ZFRUWFhwTgPRxyyCExduzY6N+/v/B3h0wm0/jMM8/828knnzxONwAAYM97v28AC4ABAGg2fve7370xePDgJf369Ts6lUrl60hEcXFxjBgxInr06BFLly6N2tpaTQHYoUOHDvGFL3whzjzzzCguLtaQHZqammoeeOCBWz73uc9N1w0AANg7BMAAALDDww8/vKygoOC54cOHH1FQUFCqI//QrVu3OO6446K0tDQWL14cTU1NmgI0Wy1btoxzzjknLr300ujevbuGvENtbe2K22677arbbrvtDd0AAIC9RwAMAADv8Oyzz25avHjx0yeddNKQoqKiTjryD3l5edGnT58YOXJkbN26NVatWqUpQLNz+OGHx1e+8pUYMGBA5OXlacg7VFVV/e3CCy+8/oEHHvDdAAAA2MsEwAAA8C7z58+vefbZZ58+44wz+hcXF/fSkf/RsmXLGDJkSOyzzz6xdOnSqKmp0RQg53Xs2DG++MUvximnnBItW7bUkHdZt27dMyeffPI3Xn755W26AQAAe9/7BcCpfc+JETv7QeO6iI2vttI9AAByWmFhYer555//0sEHH3y5bvxfTU1N8fzzz8f48eOjurpaQ4Cc07p16zjzzDPjyCOPdOJ35zJ///vff3rMMcfc39DQkNEOAADIDh2G1UZBl53/TAAMAAARMWnSpM8cc8wxt6RSKdfg7ERNTU1MmTIlpk2bFg0NDRoCJF5hYWGccsopcdJJJ0VRUZGG7EQ6na6fOnXqd88555y/6AYAAGSX9wuAXQENAAAR8Yc//GHhfvvt98aAAQOOysvLkwS8S2FhYQwYMCCGDh0amzZtinXr1mkKkFiDBw+Oq666KoYOHRoFBQUashONjY1Vv//972/5whe+MEs3AAAg+/gGMAAAfAgTJkxYXV1dPf3II4/8VGFhYTsd+b9KS0vjsMMOi/79+8eaNWti8+bNmgIkRu/evePyyy+PU045JUpLSzXkPWzdunXxLbfccs33vve9hboBAADZyTeAAQDgI+jTp0+LJ5988us9evQ4TTfe3/z58+ORRx6JlStXagaQtXr16hXnnHNODBgwQDM+wKpVq5444YQTfrBy5Ur3/QMAQBbzDWAAAPgYnnnmmfOHDx9+fSqVytON95bJZGL27Nkxbty4qKio0BAga3Tu3DnOOuusGDp0aKRSKQ15/z/Lm2bNmvXDk08++THdAACA7OcbwAAA8DH85je/eX3//fd//cADDzzSd4HfWyqViu7du8cxxxwT7dq1i2XLlkV9fb3GAHtN27Zt49xzz42LL744evToIfz9AI2NjdUPPvjgLZ/97Gf/ohsAAJAMvgEMAAAf0/jx41dFxPOHHXbYiMLCwjIdeW95eXnRu3fvOOqoo6KgoCBWrlwZjY2NGgPsMcXFxXHKKafEl770pejbt2/k5bnA4YPU1tau+MEPfnD9LbfcMk83AAAgQf/94xvAAADwyQwePLjVo48++s1u3bqdpBsfTn19fTzzzDMxderU2LZtm4YAu01ZWVmceuqpceSRR0ZRkQsbPqyVK1c+/ulPf/pHixcvdm0DAAAkjG8AAwDALvLkk0+edeSRR96USqVcl/MhCYKB3eXtE7/HHnus4PcjyGQyDbNmzfoP3/sFAIDk8g1gAADYRX7/+98v6NGjx2uHHHLIyPz8fL8x+SEUFBREv3794qijjoq8vLxYtWqVq6GBT6Rly5ZxwgknxBVXXBEHHXRQFBQUaMqH1NDQsOG3v/3t1z7/+c8/oxsAAJBcroAGAIBd7Lzzzut4991339m2bdvBuvHR1NTUxLPPPhvTpk2LLVu2aAjwoZWVlcXxxx8fxxxzTBQXF2vIR1RVVfW3a6+99vZHHnlkg24AAECyuQIaAAB2g06dOhVMmzZtbN++fT8XESkd+WgaGhri+eefjyeffDI2bJBFAO/7522cdNJJccQRR0RhodvKPobMokWL/nTsscf+pLKyskk7AAAg+QTAAACwG/3hD38Ydfrpp99WUFDQRjc+unQ6Ha+++mpMnTo1Vq5cqSHAP/Xq1StOOeWUGDp0aOTl5WnIx9DY2Fg1YcKEOy666KKZugEAALlDAAwAALvZaaed1vbee+/9docOHUbqxse3fPnymDZtWrz88suRTqc1BJqhvLy8OOyww+L444+P3r17a8gnsHHjxue//OUvf3fSpElVugEAALlFAAwAAHtAYWFh6qmnnjpv+PDh16RSKXeUfgIbNmyIGTNmxHPPPRc1NTUaAs1AcXFxjBo1Ko4++ujo2LGjhnwCmUym4ZVXXvl/J5100kMNDQ0ZHQEAgNzzfgFwftuDoufOfpDeFlFb7p0VAAB8WOl0On7zm9+8Xlpa+uLgwYM/VVhYWKYrH09xcXEMGDAgjj322GjTpk2sXbs2amtrNQZyUIcOHeKMM86ISy+9NAYOHBjFxcWa8gnU1tau+slPfnLjxRdf/IybFAAAIHcVd2+MvNKd/8wJYAAA2A1OPPHENvfdd9+tnTp1Olo3PrnGxsb429/+Fs8++2wsWrRIQyAH9OvXL44++ugYNmxYFBQUaMguUFFR8cwXv/jFf5s+ffoW3QAAgNzmCmgAANhLHn744RNGjx799YKCgta6sWusX78+Zs6cGc8//3xUV1drCCRIaWlpHHnkkXHUUUdF586dNWQXaWxs3DJ16tS7PvvZz/5FNwAAoHkQAAMAwF50ySWXdP3+97//rXbt2g3VjV2nsbExXnvttXjuuedi/vz5GgJZbMCAATFq1KgYPHiw0767WFVV1atf//rXv/e73/1urW4AAEDzIQAGAIC9rF27dvlTp0699OCDD740lUrl68iutXz58nj++efj5ZdfjpqaGg2BLFBSUhLDhw+PI444Inr37q0hu1gmk2mcN2/efSeeeOJvq6urfewXAACaGQEwAABkia9//ev73Xjjjf9aWlraXzd2vXQ6HW+++WY899xz8dprr0VjY6OmwB5UUFAQgwcPjlGjRsUBBxwQeXl5mrIbVFdXL/zP//zPf/3BD36wRDcAAKB5EgADAEAWOfjgg1v9+c9/vrZ3795jIiKlI7tHZWVlvPjii/HCCy/EunXrNAR2o65du8bIkSPj8MMPj7Zt22rI7pNZunTpn88888z/t3jx4nrtAACA5ksADAAAWejuu+8eePHFF9/WqlUrd6PuZuXl5fHqq6/GSy+9FOvXr9cQ2AU6d+4cI0aMiGHDhkW3bt00ZDerqalZ9tvf/vbOm266aa5uAAAAAmAAAMhS/fr1K3r44Ycv79+//4WpVMpdqXvA8uXL46WXXoqXX345qqurNQQ+grKyshg+fHiMGDHCd333kEwmk164cOEfzj777F8sXbp0u44AAAARAmAAAMh6P/3pT4d97nOf+2bLli176Mae0dDQEHPnzo2//vWvMXfu3Ni+Xa4CO9OyZcsYNGhQDBs2LA455JAoKCjQlD2ktrZ21R//+Mc7rr322r/rBgAA8E4CYAAASIA+ffq0ePTRR69wGnjPS6fTsXTp0nj11VedDIaIaNu2bQwbNiyGDRsWffr0ibw8fyTtSZlMpuG11177+ZlnnvmnioqKRh0BAADeTQAMAAAJ8uMf//jQCy644JutWrXaRzf2vLdPBs+ePTvmzp0bdXV1mkKzUFZWFoMHD45hw4ZF//79Iz8/X1P2gpqammX333//nTfccINv/QIAAO9JAAwAAAnTrl27/HHjxp37qU996qq8vDwb870kk8nEihUrYu7cuTFnzpxYsWJFZDIZjSEnpFKp6Nu3bwwbNiwGDRoUHTt21JS9qKmpqfbVV1/92ZgxY/5cWVnZpCMAAMD7EQADAEBCffnLX+5x++23f7V9+/aH68bet2XLlnjjjTdizpw5MW/evKivr9cUEqVly5Zx8MEHx6BBg+KQQw6J0tJSTckCGzdufPG73/3uv//iF79YoxsAAMCHIQAGAIAEKywsTE2cOPGMkSNHXlNQUNBaR7JDXV1dvPnmm/HGG2/EG2+8EevXr9cUslKXLl3ioIMOioMOOigOOOCAKCoq0pQs0djYuGXmzJk/PvPMMyc2NDS4XgAAAPjQBMAAAJADjjzyyNY/+9nPrujbt++5EZGnI9mluro6Fi5cGPPnz4958+ZFZWWlprBXtGvXLg455JAYMGBA9O/fP1q39nsjWSj91ltv/fmqq676xaxZs6q1AwAA+KgEwAAAkEN++ctfjhgzZsyNrVq16q0b2SmdTsfKlStj0aJFsXDhwli8eHFs27ZNY9gtSkpKol+/ftG/f//Yf//9o1evXpGX53dEslVNTc3yRx999EdXXnnlK7oBAAB8XAJgAADIMd26dSt8+OGHPzd48ODL8vPzbdyzXCaTiTVr1sTChQtj0aJFsWjRotiyZYvG8LGUlZVF//79/xn6du/ePVKplMZkuaampprXXnvtV2PGjHmgoqKiUUcAAIBPQgAMAAA56rjjjiv7r//6r8tdC508mzdvjuXLl8eKFSti+fLlsXjx4qipqdEY/pfi4uLo169f9O7dO/bZZ5/Yd999o6ysTGMSJJPJpJcsWfLn66677pfTp0/3mx8AAMAuIQAGAIAc99Of/nTIueeee3NpaWlf3UimxsbGWLlyZSxdujSWLVsWy5cvj3Xr1kUmk9GcZiKVSkWXLl1in332iT59+kSfPn2iV69eUVBQoDkJtXXr1sUPPvjgj6699tq/6wYAALArCYABAKAZaNeuXf64cePOGTp06BUFBQWtdST56uvrY+XKlf88KbxixYpYu3ZtpNNpzUm4vLy86Nq1a+yzzz7//KdXr17RsmVLzckBjY2NW/7617/+4pxzznm0srKySUcAAIBdTQAMAADNyIknntjmnnvuuXzfffcdk0qlHB3MMdu3b481a9bEmjVrYu3atbF27dooLy+PDRs2CIazUF5eXnTs2DG6desWXbt2jW7dukW3bt2iR48eUVhYqEE5JpPJNC5ZsuRR1z0DAAC7mwAYAACaoa9+9av7Xnfdddd16NDhCN3IfY2Njf8MhNetWxfr1q2LioqKWLduXWzbtk2DdrPS0tLo3LnzP//p0qVLdO3aNbp27eoK52Ziw4YNM//rv/7rxz/60Y+W6wYAALC7CYABAKAZ++UvfznirLPOuq64uNj3gZupmpqaWL9+/T//qaioiMrKyqisrIxNmzZFY2OjJn2AgoKCaN++fbRr1y7at28fHTt2jC5dukSnTp2ic+fOUVxcrEnN1NatW98aP378PVdcccXLugEAAOwpAmAAAGjm2rVrl//ggw+eOWLEiCsLCwvb6gjvtHnz5n+GwZs2bYrKysqorq6OLVu2xJYtW6K6ujqqq6sjk8nk3NpTqVS0bt06WrduHWVlZdGmTZsoLS39X2Fvu3btok2bNh4U/peGhobKl1566efnnHPO+OrqavevAwAAe5QAGAAAiIiIoUOHFt97770XHHjggRfk5+c7ssiHlk6n/xkEV1dXR01Nzfv+k8lkora2NtLpdNTX10dTU1PU1dXt0u8U5+XlRcuWLSM/Pz+KiooiLy8vWrVqFalUKoqLi3f6T0lJSbRq1eqfgW9paWnk5eUZMB9aU1NTzYIFC/745S9/+Y+zZ8+u0REAAGBvEAADAAD/y2mnndb2rrvuurRPnz5n5+XlFeoIe9LbgfDbtm/f/r7XUBcUFESLFi3++b/fDnxhT8pkMg1LliwZd8stt/xq0qRJVToCAADsTQJgAABgp0477bS2d95554X777//5wTBAP9XJpNpWLhw4QO33nrrHwS/AABAtni/ADi/7UHRc2c/SG+LqC33/gcAAHLZokWL6u69995X0un0swcddFCnkpKS3roC8A8VFRUz/7//7/+77aKLLpq6aNGiOh0BAACyRXH3xsgr3fnPBMAAAEDMnDmz8u67736qqalpWr9+/Ypbt27dN5VKpXQGaG4ymUx6zZo1U+65555/Peeccx6cOXNmpa4AAADZRgAMAAB8KDNnzqz88Y9//Gw6nZ4uCAaak7eD37vvvvtfzz///McEvwAAQDYTAAMAAB+JIBhoLgS/AABAEgmAAQCAj+XtILisrOyFvn37diwuLu4VEYJgIBdkKioqnrv33nu/PWbMmEcEvwAAQJK8XwCc2vecGLGzHzSui9j4aivdAwAA/unqq6/u8ZWvfOX8Pn36nJWXl9dCR4CkSafT9UuXLh3/X//1Xw/84he/WKMjAABAEnUYVhsFXXb+MwEwAADwkZ1xxhntb7/99rMPPPDA8/Pz81vrCJDtmpqaqhcsWPDgd77znUcmTpzotC8AAJBoAmAAAGC3GD58eMkPf/jDzwwePPjioqKijjoCZJv6+voNr7322u9vvPHGx2fPnl2jIwAAQC4QAAMAALvV0KFDi++5556zDjnkkPOKioq66giwt9XV1a19/fXXH7z++uvHC34BAIBcIwAGAAD2iFatWuXdc889w0455ZTzO3bseJSOAHtYZsOGDbOmTJny4PXXX/9qbW1tWksAAIBcJAAGAAD2uH/913/tf/7555/dq1ev0/Ly8lroCLC7pNPp+pUrV05+4IEHHvnOd76zSEcAAIBcJwAGAAD2mjPOOKP97bfffvYBBxzw2YKCgjY6AuwqjY2NVW+++eafv/e97z06YcKETToCAAA0FwJgAABgrxs+fHjJ97///dGDBg0aU1paur+OAB9XdXX1wtdee+3Rr371q1Nfe+21Wh0BAACaGwEwAACQVb761a/ue8EFF3y6b9++ZxUUFLTWEeCDNDY2bnnrrbfG/+EPf5j4ox/9aLmOAAAAzZkAGAAAyEpDhw4t/sEPfnDy4MGDz27dunV/HQHerbq6+s2XX375weuuu+7ppUuXbtcRAAAAATAAAJDlCgsLU3ffffeQ0aNHn9G1a9fj8vLyinQFmq90Ol1XXl4+bcqUKROuvfbav+sIAADA/yYABgAAEqNPnz4t/v3f/33UyJEjz2rfvv2nIiKlK9AsZDZt2vTXF1544bGvfe1rzzntCwAA8N4EwAAAQCJddNFFXa6++uqTDzzwwLNbtmzZTUcg99TV1a1ZsGDBuJ/+9KdP3n///et0BAAA4IMJgAEAgETr1q1b4d13333k4YcffmqHDh2OyMvLK9QVSK50Ot2wcePGWbNmzZp8/fXXz6qoqGjUFQAAgA9PAAwAAOSMo48+uvWtt956/CGHHHJKu3btBkdEnq5AIqQrKytfmzdv3uQ777xz+owZM6q1BAAA4OMRAAMAADnpuOOOK/vGN75x/CGHHHJa27ZtB4bvBUO2yVRVVc2dN2/epO9///vTpk+fvkVLAAAAPjkBMAAAkPNuu+22vmedddZJffr0Oa5Vq1a9dQT2ntra2uXLly+f/uijjz51xx13vKUjAAAAu5YAGAAAaFa+9KUvdbv44ouP7t+//wlOBsMekamqqpq7cOHCv/z+97+fcd9995VrCQAAwO4jAAYAAJqtSy65pOtll112jDAYdrl0VVXVvIULF/7lV7/61bO/+93v1moJAADAniEABgAAiIirr766x/nnnz9q//33P7JNmzZDUqlUga7Ah5fJZBoqKyv/vnjx4uf+9Kc/zbr33ntX6woAAMCeJwAGAAB4l379+hV97WtfGzRy5MhRPXv2PLaoqKizrsD/VV9fv37VqlXPvPDCC8/9+7//+5zFixfX6woAAMDeJQAGAAB4H61bt8678847Bx599NFHde/efURpaen+4apomq/M1q1bF69Zs+bF5557btY3v/nNOdXV1WltAQAAyB4CYAAAgI9g8ODBrcaOHXvI8OHDD+vevfvw1q1bHxACYXJXprq6+s01a9a88sorr7z8k5/8ZN5rr71Wqy0AAADZSwAMAADwCVx//fX7nHHGGYf169dvePv27Yfm5+e31hWSrLGxsXrjxo2vvvXWWy+PHz/+lR//+McrdQUAACA5BMAAAAC70Je//OUe55xzzvA+ffoM7tix45CioqKuukI2q6+vX7t27doXFy9ePGfixImv3Xvvvat1BQAAILkEwAAAALvRl7/85R6f+cxnBvfr129Qly5dDm/ZsqVAmL2qrq5u7bp16wS+AAAAOUoADAAAsIe0atUq75prrtnn2GOPPXi//fY7uH379oeUlpb2TaVS+brDbpKuqalZtnHjxnlvvfXW3GeffXbef/3Xfy2vra1Naw0AAEBuEgADAADsRQceeGDLq6+++oAhQ4Yc3LNnz4Pbtm17sGuj+biampqqq6qqXi8vL583Z86ceb/85S/nvfjii1t1BgAAoPkQAAMAAGSZoUOHFn/xi1/cf9CgQQf26NHjwHbt2h3YqlWr3qlUKk932CFdU1OzvLKycsHq1asXzJkzZ8Gf//znJTNmzKjWGgAAgOZNAAwAAJAAxx13XNkFF1xw4MEHH3xA165dDywtLd23pKRkn1QqVag7uS2TyTRs27ZtRXV19dJ169YtfOONNxZOmDBh4YQJEzbpDgAAAO8mAAYAAEiw8847r+OJJ57Yp3///vt16dKlT5s2bfZr3bp1v/z8/GLdSZampqaa6urqxZs3b16ybt26pQsXLlzy9NNPL33ooYc26A4AAAAflgAYAAAgx7Rr1y7/kksu6TFkyJCe++67b89OnTr1Kisr61VcXNyzZcuW3VKpVL4u7R2ZTKaprq6uvKamZtWWLVtWVlRUrFy6dOnK2bNnr7r//vvXVFZWNukSAAAAn4QAGAAAoBnp1KlTwec+97luQ4cO7bnPPvv0aNeuXafWrVt3Li4u7tqyZcvORUVFnfLy8lro1MeTTqe319fXr6+rq6uoqalZW11dvb6ysnL9ihUrVr/66qurHnzwwbUVFRWNOgUAAMDuIgAGAADgfznjjDPaH3bYYZ369OnTuUuXLp3Kysral5SUtC0uLu5YVFTUrqioqG2LFi065OfnlzaXnjQ1NW3dvn37xvr6+qr6+vrKmpqaDdu2bavasmXLpnXr1lUsXbp0/Ysvvrh+4sSJlZ4gAAAA9iYBMAAAAB9Lr169CkeNGtXuoIMOatexY8ey9u3bl7Zp06Z1SUlJWXFxcetWrVq1btGiRVlRUVHrwsLC1hGRX1hYWBoR+QUFBSV5eXkFeXl5u/0/LtPpdG06nW5sbGzcFhFNDQ0NW3f83+r6+vrq7du3b6mtra2uqamp3rZtW/XmzZurN23aVL1hw4YtCxYsqJo1a1bl0qVLt5s4AAAASSAABgAAYK/q169fUffu3Vvss88+xSUlJQVv//8LCwtT3bp1+8BTxuXl5VsbGhoyb//vbdu2Na5YsaJmzZo12xcvXlyvwwAAADQn7xcAF2gPAAAAu9vixYvrdwS11boBAAAAu0+eFgAAAAAAAADkBgEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4QAAMAAAAAAADkCAEwAAAAAAAAQI4o0AIAAAAAAACA5GhoLIyCxoaIiEilIpNXGE1v/0wADAAAAAAAAJAghQUN/0x6MxGppvT/5L6ugAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAAYAAAAAAADIEQJgAAAAAAAAgBwhAIb/v5272ZHiusM4/FZ1NUkz9sQwOF4EyZJtpJCwysa5jSy4n1xPEqRIuQFvvfGSgIwBOzGRQAQERnx0d1UW0cgWGvKxsMGvnmfVdc7/1OJsf+oCAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoIQADAAAAAAAAlBCAAQAAAAAAAEoIwAAAAAAAAAAlBGAAAAAAAACAEgIwAAAAAAAAQAkBGAAAAAAAAKCEAAwAAAAAAABQQgAGAAAAAAAAKCEAAwAAAAAAAJQQgAEAAAAAAABKCMAAAAAAAAAAJQRgAAAAAAAAgBICMAAAAAAAAEAJARgAAAAAAACghAAMAAAAAAAAUEIABgAAAAAAACghAAMAAAAAAACUEIABAAAAAAAASgjAAAAAAAAAACUEYAAAAAAAAIASAjAAAAAAAABACQEYAAAAAAAAoIQADAAAAAAAAFBCAAYAAAAAAAAoMY3JP//9K8My551lzpAk293a7QAAAAAAAAD8iIw3r+SL7TpPxuSt4/ibJJuz20QDBgAAAAAAAHhzrJPp6NvHYcyyjLl7dJTPbl/Jp6sPLufSsM+5ec7q5YOrF0OeP/SVaAAAAAAAAIA3weH7u6zfm79dWDIMSw6225w785vsx3XyzasOby5ssz69c4sAAAAAAAAAr9n69C6bC9sT93a7rKdnORin5Otxynzi1JQcfiwCAwAAAAAAALxO69O7HH68TaaT98cp85R8vbp3Nfszv8q0LHn7xMF1sjk/ZzUPmZ/MmWefhAYAAAAAAAD4oayPdjn7223Gn7x6ZrXPnetX8mBKkpv3cufDd/Pufn5FL56SzcVtNheT3dNt8tQlAwAAAAAAAHyv1sm0ySv/9XtsNWZ3I/lHkgzHi7/4XY7WYz5yiwAAAAAAAAA/Ivtcv/3nPEyS1fHa42t5+vNLyX7JoRsCAAAAAAAAePPt1/nbV3/KvePn1Xc371/NYxEYAAAAAAAA4M0yTHk2rvNo2WdzvHZqzN9v/SF3vju3evng/at5fPDLPDu1yuGyZHSVAAAAAAAAAK/XOGe4ueSvZ4e8M8xZbVe5ceuPufvy3Oqkw4+v5emDX+fuuTlLhhwsEYIBAAAAAAAAXpclGR8OuXP0TR4cPM/9z/+SRyfNDf/1TZezOp/87KdjzizJZkhO7edMy/w/nAUAAAAAAADg/zaMWcZkP8/ZLsmLacr2/MV8+cnvs/tP5/4FmLjAq1ifcioAAAAASUVORK5CYII=";function ie(e,o,t){return typeof e=="string"&&!isNaN(Number(e))&&(e=Number(e)),typeof e=="number"&&e<100?le(e):typeof e=="number"&&e>=100?e:typeof e=="string"&&e.includes("%")?Math.round(o&&o==="X"?parseFloat(e)/100*t.width:o&&o==="Y"?parseFloat(e)/100*t.height:parseFloat(e)/100*t.width):0}function At(e){return e.replace(/[xy]/g,function(o){const t=Math.random()*16|0;return(o==="x"?t:t&3|8).toString(16)})}function re(e){return typeof e>"u"||e==null?"":e.toString().replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function le(e){return typeof e=="number"&&e>100?e:(typeof e=="string"&&(e=Number(e.replace(/in*/gi,""))),Math.round(oe*e))}function te(e){const o=Number(e)||0;return isNaN(o)?0:Math.round(o*et)}function Ee(e){return e=e||0,Math.round((e>360?e-360:e)*6e4)}function mt(e){const o=e.toString(16);return o.length===1?"0"+o:o}function gt(e,o,t){return(mt(e)+mt(o)+mt(t)).toUpperCase()}function fe(e,o){let t=(e||"").replace("#","");!ht.test(t)&&t!==Ce.background1&&t!==Ce.background2&&t!==Ce.text1&&t!==Ce.text2&&t!==Ce.accent1&&t!==Ce.accent2&&t!==Ce.accent3&&t!==Ce.accent4&&t!==Ce.accent5&&t!==Ce.accent6&&(console.warn(`"${t}" is not a valid scheme color or hex RGB! "${xe}" used instead. Only provide 6-digit RGB or 'pptx.SchemeColor' values!`),t=xe);const i=ht.test(t)?"srgbClr":"schemeClr",r='val="'+(ht.test(t)?t.toUpperCase():t)+'"';return o?`${o}`:``}function ca(e,o){let t="";const i=Object.assign(Object.assign({},o),e),r=Math.round(i.size*et),s=i.color,l=Math.round(i.opacity*1e5);return t+=``,t+=fe(s,``),t+="",t}function Be(e){let o="solid",t="",i="",r="";return e&&(typeof e=="string"?t=e:(e.type&&(o=e.type),e.color&&(t=e.color),e.alpha&&(i+=``),e.transparency&&(i+=``)),o==="solid"?r+=`${fe(t,i)}`:r+=""),r}function Fe(e){return e._rels.length+e._relsChart.length+e._relsMedia.length+1}function Rt(e){if(!(!e||typeof e!="object"))return e.type!=="outer"&&e.type!=="inner"&&e.type!=="none"&&(console.warn("Warning: shadow.type options are `outer`, `inner` or `none`."),e.type="outer"),e.angle&&((isNaN(Number(e.angle))||e.angle<0||e.angle>359)&&(console.warn("Warning: shadow.angle can only be 0-359"),e.angle=270),e.angle=Math.round(Number(e.angle))),e.opacity&&((isNaN(Number(e.opacity))||e.opacity<0||e.opacity>1)&&(console.warn("Warning: shadow.opacity can only be 0-1"),e.opacity=.75),e.opacity=Number(e.opacity)),e.color&&e.color.startsWith("#")&&(console.warn('Warning: shadow.color should not include hash (#) character, , e.g. "FF0000"'),e.color=e.color.replace("#","")),e}function da(e,o,t){var i,r;const s=2.3+(!((i=e.options)===null||i===void 0)&&i.autoPageCharWeight?e.options.autoPageCharWeight:0),l=Math.floor(o/et*oe)/((!((r=e.options)===null||r===void 0)&&r.fontSize?e.options.fontSize:ke)/s),c=[];let A=[];const a=[],n=[];e.text&&e.text.toString().trim().length===0?A.push({_type:ne.tablecell,text:" "}):typeof e.text=="number"||typeof e.text=="string"?A.push({_type:ne.tablecell,text:(e.text||"").toString().trim()}):Array.isArray(e.text)&&(A=e.text);let u=[];return A.forEach(g=>{var d;typeof g.text=="string"&&(g.text.split(` `).length>1?g.text.split(` diff --git a/public/assets/presentations-G0Dt4vNe.js b/public/assets/presentations-CsatGkk7.js similarity index 61% rename from public/assets/presentations-G0Dt4vNe.js rename to public/assets/presentations-CsatGkk7.js index ee1efc3..3b68727 100644 --- a/public/assets/presentations-G0Dt4vNe.js +++ b/public/assets/presentations-CsatGkk7.js @@ -1 +1 @@ -import{aW as i,aC as o}from"./index-CtNAsql9.js";const m="X-Cast-Ticket",t="/_presentations/api/v1",p={publicDeck:e=>o.request(`${t}/public/${encodeURIComponent(e)}`,{auth:!1}),mine:()=>o.request(`${t}/mine`),speaker:e=>o.request(`${t}/mine/${encodeURIComponent(e)}`),deleteMine:e=>o.request(`${t}/mine/${encodeURIComponent(e)}`,{method:"DELETE"}),speakerImage:(e,n)=>o.blob(`${t}/mine/${encodeURIComponent(e)}/images/${encodeURIComponent(n)}`),remote:(e,n)=>o.request(`${t}/mine/${encodeURIComponent(e)}/remote`,{method:"POST",body:n}),castMint:e=>o.request(`${t}/mine/${encodeURIComponent(e)}/cast`,{method:"POST"}),castRevoke:(e,n)=>o.request(`${t}/mine/${encodeURIComponent(e)}/cast`,{method:"DELETE",headers:{[m]:n}}),remoteState:(e,n)=>o.request(`${t}/mine/${encodeURIComponent(e)}/remote/state`,{method:"POST",body:n}),remoteStateBeacon(e,n){const s={Accept:"application/json","Content-Type":"application/json"},c=i.get();c&&(s.Authorization=`Bearer ${c}`);try{fetch(`${t}/mine/${encodeURIComponent(e)}/remote/state`,{method:"POST",headers:s,body:JSON.stringify(n),keepalive:!0}).catch(()=>{})}catch{}}};function a(e){return{auth:!1,headers:{[m]:e}}}const d={deck:e=>o.request(`${t}/cast/deck`,a(e)),image:(e,n)=>o.blob(`${t}/cast/images/${encodeURIComponent(n)}`,a(e)),realtime:e=>o.request(`${t}/cast/realtime`,a(e))};export{d as c,p}; +import{bb as i,aW as o}from"./index-BhVKyY57.js";const m="X-Cast-Ticket",t="/_presentations/api/v1",p={publicDeck:e=>o.request(`${t}/public/${encodeURIComponent(e)}`,{auth:!1}),mine:()=>o.request(`${t}/mine`),speaker:e=>o.request(`${t}/mine/${encodeURIComponent(e)}`),deleteMine:e=>o.request(`${t}/mine/${encodeURIComponent(e)}`,{method:"DELETE"}),speakerImage:(e,n)=>o.blob(`${t}/mine/${encodeURIComponent(e)}/images/${encodeURIComponent(n)}`),remote:(e,n)=>o.request(`${t}/mine/${encodeURIComponent(e)}/remote`,{method:"POST",body:n}),castMint:e=>o.request(`${t}/mine/${encodeURIComponent(e)}/cast`,{method:"POST"}),castRevoke:(e,n)=>o.request(`${t}/mine/${encodeURIComponent(e)}/cast`,{method:"DELETE",headers:{[m]:n}}),remoteState:(e,n)=>o.request(`${t}/mine/${encodeURIComponent(e)}/remote/state`,{method:"POST",body:n}),remoteStateBeacon(e,n){const a={Accept:"application/json","Content-Type":"application/json"},c=i.get();c&&(a.Authorization=`Bearer ${c}`);try{fetch(`${t}/mine/${encodeURIComponent(e)}/remote/state`,{method:"POST",headers:a,body:JSON.stringify(n),keepalive:!0}).catch(()=>{})}catch{}}};function s(e){return{auth:!1,headers:{[m]:e}}}const d={deck:e=>o.request(`${t}/cast/deck`,s(e)),image:(e,n)=>o.blob(`${t}/cast/images/${encodeURIComponent(n)}`,s(e)),realtime:e=>o.request(`${t}/cast/realtime`,s(e))};export{d as c,p}; diff --git a/public/assets/quizzes-DX8b_-1b.js b/public/assets/quizzes-DYhavCsn.js similarity index 92% rename from public/assets/quizzes-DX8b_-1b.js rename to public/assets/quizzes-DYhavCsn.js index 610d06e..f35369d 100644 --- a/public/assets/quizzes-DX8b_-1b.js +++ b/public/assets/quizzes-DYhavCsn.js @@ -1 +1 @@ -import{d as z,n as a,c as o,F as c,E as h,b as l,p as u,t as n,e as p,a8 as _,C as q,f as m,aC as r}from"./index-CtNAsql9.js";const y={class:"rows"},$={class:"row-main"},k={class:"title"},w=["aria-label"],f={key:1,class:"badge"},b={class:"muted small"},S=z({__name:"AttemptList",props:{attempts:{},showQuiz:{type:Boolean}},setup(e){const s=d=>`${Math.round(d.score_points)}/${Math.round(d.max_points)}`;return(d,C)=>(a(),o("ul",y,[(a(!0),o(c,null,h(e.attempts,t=>(a(),o("li",{key:t.id},[l("div",$,[l("span",k,[e.showQuiz?(a(),o(c,{key:0},[u(n(t.quiz_title),1)],64)):(a(),o(c,{key:1},[u(n(p(_)(t.started_at)),1)],64))]),t.completed_at?(a(),o("span",{key:0,class:q(["badge",t.passed?"online":""]),"aria-label":`Wynik ${s(t)}`},n(s(t)),11,w)):(a(),o("span",f,"niezakończona"))]),l("div",b,[e.showQuiz?(a(),o(c,{key:0},[u(n(p(_)(t.started_at))+" · ",1)],64)):m("",!0),t.category?(a(),o(c,{key:1},[u(n(t.category)+" · ",1)],64)):m("",!0),u(" odpowiedzi: "+n(t.answered_count),1),t.completed_at&&t.score_percent!==null?(a(),o(c,{key:2},[u(" · "+n(String(t.score_percent).replace(".",","))+"% puli",1)],64)):m("",!0)])]))),128))]))}}),i="/_quizzes/api/v1",T={list:e=>r.request(`${i}/quizzes`,{query:{context:e}}),quiz:(e,s)=>r.request(`${i}/quizzes/${encodeURIComponent(e)}`,{query:{category:s}}),start:(e,s)=>r.request(`${i}/quizzes/${encodeURIComponent(e)}/attempts`,{method:"POST",body:s?{category:s}:{}}),answer:(e,s)=>r.request(`${i}/attempts/${e}/answers`,{method:"POST",body:s}),finish:e=>r.request(`${i}/attempts/${e}/finish`,{method:"POST"}),attempt:e=>r.request(`${i}/attempts/${e}`),attempts:(e,s)=>r.raw(`${i}/attempts`,{query:{quiz:e,page:s}})};export{S as _,T as q}; +import{d as z,n as a,c as o,F as c,E as h,b as l,p as u,t as n,e as p,a8 as _,C as q,f as m,aW as r}from"./index-BhVKyY57.js";const y={class:"rows"},$={class:"row-main"},k={class:"title"},w=["aria-label"],f={key:1,class:"badge"},b={class:"muted small"},S=z({__name:"AttemptList",props:{attempts:{},showQuiz:{type:Boolean}},setup(e){const s=d=>`${Math.round(d.score_points)}/${Math.round(d.max_points)}`;return(d,g)=>(a(),o("ul",y,[(a(!0),o(c,null,h(e.attempts,t=>(a(),o("li",{key:t.id},[l("div",$,[l("span",k,[e.showQuiz?(a(),o(c,{key:0},[u(n(t.quiz_title),1)],64)):(a(),o(c,{key:1},[u(n(p(_)(t.started_at)),1)],64))]),t.completed_at?(a(),o("span",{key:0,class:q(["badge",t.passed?"online":""]),"aria-label":`Wynik ${s(t)}`},n(s(t)),11,w)):(a(),o("span",f,"niezakończona"))]),l("div",b,[e.showQuiz?(a(),o(c,{key:0},[u(n(p(_)(t.started_at))+" · ",1)],64)):m("",!0),t.category?(a(),o(c,{key:1},[u(n(t.category)+" · ",1)],64)):m("",!0),u(" odpowiedzi: "+n(t.answered_count),1),t.completed_at&&t.score_percent!==null?(a(),o(c,{key:2},[u(" · "+n(String(t.score_percent).replace(".",","))+"% puli",1)],64)):m("",!0)])]))),128))]))}}),i="/_quizzes/api/v1",T={list:e=>r.request(`${i}/quizzes`,{query:{context:e}}),quiz:(e,s)=>r.request(`${i}/quizzes/${encodeURIComponent(e)}`,{query:{category:s}}),start:(e,s)=>r.request(`${i}/quizzes/${encodeURIComponent(e)}/attempts`,{method:"POST",body:s?{category:s}:{}}),answer:(e,s)=>r.request(`${i}/attempts/${e}/answers`,{method:"POST",body:s}),finish:e=>r.request(`${i}/attempts/${e}/finish`,{method:"POST"}),attempt:e=>r.request(`${i}/attempts/${e}`),attempts:(e,s)=>r.raw(`${i}/attempts`,{query:{quiz:e,page:s}})};export{S as _,T as q}; diff --git a/public/assets/safeText-O-oWGdGq.js b/public/assets/safeText-O-oWGdGq.js new file mode 100644 index 0000000..afcf548 --- /dev/null +++ b/public/assets/safeText-O-oWGdGq.js @@ -0,0 +1 @@ +const r={"&":"&","<":"<",">":">",'"':""","'":"'"};function s(e){return e.replace(/[&<>"']/g,t=>r[t])}function n(e){const t=e.trim().replace(/[\u0000-\u001f\u007f\s]+/g,"");return/^https?:\/\/[^/]/i.test(t)||/^mailto:[^\s]+$/i.test(t)||/^\/(?![/\\])/.test(t)||t.startsWith("#")?t:null}function a(e){return e.replace(/\*\*([^*\n]+)\*\*/g,"$1").replace(/(^|[\s(])\*([^*\n]+)\*(?=$|[\s).,;:!?])/g,"$1$2").replace(/(^|[\s(])_([^_\n]+)_(?=$|[\s).,;:!?])/g,"$1$2")}export{s as e,a as f,n as s}; diff --git a/public/assets/scrollToHash-B7Lws5_Z.js b/public/assets/scrollToHash-DSRl5dJ4.js similarity index 89% rename from public/assets/scrollToHash-B7Lws5_Z.js rename to public/assets/scrollToHash-DSRl5dJ4.js index 82e2878..d72a416 100644 --- a/public/assets/scrollToHash-B7Lws5_Z.js +++ b/public/assets/scrollToHash-DSRl5dJ4.js @@ -1 +1 @@ -import{U as i,k as d,Z as u,aq as m}from"./index-CtNAsql9.js";const l=2500;function h(s){const a=d();let c="";i([()=>m(s),()=>a.hash],([n,e])=>{!n||!e||e===c||(c=e,u(()=>{if(typeof document>"u")return;let o=e.slice(1);try{o=decodeURIComponent(o)}catch{}const t=document.getElementById(o);if(!t)return;const r=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;t.scrollIntoView({behavior:r?"auto":"smooth",block:"start"}),t.classList.add("hash-target"),setTimeout(()=>t.classList.remove("hash-target"),l)}))},{immediate:!0})}export{h as u}; +import{U as i,k as d,Z as u,aq as m}from"./index-BhVKyY57.js";const l=2500;function h(s){const a=d();let c="";i([()=>m(s),()=>a.hash],([n,e])=>{!n||!e||e===c||(c=e,u(()=>{if(typeof document>"u")return;let o=e.slice(1);try{o=decodeURIComponent(o)}catch{}const t=document.getElementById(o);if(!t)return;const r=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;t.scrollIntoView({behavior:r?"auto":"smooth",block:"start"}),t.classList.add("hash-target"),setTimeout(()=>t.classList.remove("hash-target"),l)}))},{immediate:!0})}export{h as u}; diff --git a/public/assets/tabs-nNm7HGNT.js b/public/assets/tabs-nNm7HGNT.js new file mode 100644 index 0000000..5c8d5a3 --- /dev/null +++ b/public/assets/tabs-nNm7HGNT.js @@ -0,0 +1 @@ +function t(n,e,r){if(r<=0)return null;switch(n){case"ArrowRight":return(e+1)%r;case"ArrowLeft":return(e-1+r)%r;case"Home":return 0;case"End":return r-1;default:return null}}export{t as n}; diff --git a/public/index.html b/public/index.html index d47fc6b..42a7f26 100644 --- a/public/index.html +++ b/public/index.html @@ -35,8 +35,8 @@ document.write(' - - + +
diff --git a/public/sw.js b/public/sw.js index a07924a..01c5020 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,4 +1,4 @@ -const BUILD = 'bc9f0800b7a8' +const BUILD = 'f4e403c7d0fb' // The service worker of the BM student app. The Vite plugin bm-service-worker // (vite.config.ts) emits this file as /sw.js and replaces the build id above, // so every build that changes an asset gets a fresh cache and an update prompt.