@sevn/elections-components 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +297 -0
  3. package/dist/index.cjs +603 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +351 -0
  6. package/dist/index.d.ts +351 -0
  7. package/dist/index.js +15609 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/styles.css +38 -0
  10. package/dist/umd/candidate-by-state.js +98 -0
  11. package/dist/umd/candidate-carrousel-state-results-viewer.js +108 -0
  12. package/dist/umd/candidate-counting-progress.js +77 -0
  13. package/dist/umd/candidate-duel-state-result-viewer.js +91 -0
  14. package/dist/umd/candidate-map-by-state.js +104 -0
  15. package/dist/umd/candidate-multi-ring-chart-performance-by-municipality.js +105 -0
  16. package/dist/umd/candidate-performance-by-municipality.js +105 -0
  17. package/dist/umd/candidate-ranking.js +59 -0
  18. package/dist/umd/candidate-results-by-municipality.js +103 -0
  19. package/dist/umd/counting-progress.js +125 -0
  20. package/dist/umd/current-leader.js +43 -0
  21. package/dist/umd/election-round-analysis.js +100 -0
  22. package/dist/umd/election-status.js +135 -0
  23. package/dist/umd/final-results.js +141 -0
  24. package/dist/umd/live-summary.js +36 -0
  25. package/dist/umd/municipality-perfomance-map.js +82 -0
  26. package/dist/umd/party-performance.js +99 -0
  27. package/dist/umd/results-by-office.js +94 -0
  28. package/dist/umd/round-results-analysis.js +99 -0
  29. package/dist/umd/state-leaders.js +118 -0
  30. package/dist/umd/state-winners.js +129 -0
  31. package/dist/umd/top-dispute.js +43 -0
  32. package/dist/umd/vote-comparison-by-round.js +76 -0
  33. package/dist/umd/vote-counting-progress.js +23 -0
  34. package/dist/umd/voting-map.js +112 -0
  35. package/package.json +96 -0
@@ -0,0 +1,43 @@
1
+ (function(H,V){typeof exports=="object"&&typeof module<"u"?module.exports=V():typeof define=="function"&&define.amd?define(V):(H=typeof globalThis<"u"?globalThis:H||self,H.TopDispute=V())})(this,(function(){"use strict";var tl=Object.defineProperty;var Ka=H=>{throw TypeError(H)};var nl=(H,V,G)=>V in H?tl(H,V,{enumerable:!0,configurable:!0,writable:!0,value:G}):H[V]=G;var lt=(H,V,G)=>nl(H,typeof V!="symbol"?V+"":V,G),Cr=(H,V,G)=>V.has(H)||Ka("Cannot "+G);var d=(H,V,G)=>(Cr(H,V,"read from private field"),G?G.call(H):V.get(H)),D=(H,V,G)=>V.has(H)?Ka("Cannot add the same private member more than once"):V instanceof WeakSet?V.add(H):V.set(H,G),k=(H,V,G,Wt)=>(Cr(H,V,"write to private field"),Wt?Wt.call(H,G):V.set(H,G),G),re=(H,V,G)=>(Cr(H,V,"access private method"),G);var an,sn,Vt,on,bn,Sn,jt,pt,ln,Ce,Ar,Tr,kr,Wa,Ke,yr,_t,qt,$e,et,Ae,tt,gt,Bt,kt,cn,fn,dn,mt,Vn,ee,rl,al,zr,Kn,Wn,Mr,We,nt,Te,Kt,En,Cn,jn,Ba;class H extends Error{constructor(){super('Chave de acesso não configurada. Chame Core.applyKey("sua-chave") antes de montar o componente, ou carregue o script com ?cid=sua-chave.'),this.name="SevnKeyMissingError"}}class V extends Error{constructor(e,n){super(`Não foi possível contatar a API para ${e}.`),this.name="SevnNetworkError",this.cause=n}}const G="__sevnElectionsState_v1__",Wt=globalThis;function Dr(t){return Wt[G]||(Wt[G]={config:t(),transport:{activeIndex:0,pinnedAt:0}}),Wt[G]}const Ya="https://failover-api.sevntech.com",Za=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Nr(){return{key:null,apiHosts:[],assetsBase:"https://cdn.sevnelections.com/static",assetsVersion:"v1",cache:{storageKey:"election_cache",maxEntries:200},request:{timeoutMs:8e3,retriesPerHost:3,retryDelayMs:300,stickyWindowMs:12e4},theme:null}}const Ga=Nr;function Yt(){return Dr(Nr)}function Ja(t){return[`https://${t}-api1.sevnelections.com`,`https://${t}-api2.sevnelections.com`,Ya]}function Yn(t){if(typeof t!="string"||!Za.test(t))throw new Error(`[sevn] Chave inválida: ${JSON.stringify(t)}. Use apenas letras, números e hífen (a chave vira subdomínio da API).`);const e=Yt();e.config.key=t,e.config.apiHosts=Ja(t)}function Rr(t){const{cache:e,request:n,key:r,...a}=t,s=Yt();s.config={...s.config,...a,cache:{...s.config.cache,...e},request:{...s.config.request,...n}},r&&(Yn(r),a.apiHosts&&(s.config.apiHosts=a.apiHosts))}function vn(){return Yt().config}function Ir(){return Yt().config.apiHosts.length>0}function Or(){if(!Ir())throw new H;return Yt().config.apiHosts}function Qa(t){const{assetsBase:e,assetsVersion:n}=Yt().config,r=e.replace(/\/+$/,""),a=String(t).replace(/^\/+/,"");return`${r}/${n}/${a}`}const Xa=':root{--sevn-color-primary: #0a3e27;--sevn-color-secondary: #c38214;--sevn-color-tertiary: #1c1c1c;--sevn-color-red: #da0000;--sevn-color-yellow: #e4a615;--sevn-color-green: #1e6704;--sevn-color-blue: #0e2a41;--sevn-color-neutral: #f2f2f7;--sevn-color-text-secondary: #6b7280}[class^=sevn_],[class*=" sevn_"],[class^=sevn_] *,[class^=sevn_] *:before,[class^=sevn_] *:after,[class*=" sevn_"] *,[class*=" sevn_"] *:before,[class*=" sevn_"] *:after{box-sizing:border-box}[class^=sevn_] *,[class*=" sevn_"] *{margin:0;padding:0}',ct=typeof window<"u"&&typeof document<"u",Fr="data-sevn-tokens",Pr="data-sevn-theme",Lr={primary:"--sevn-color-primary",secondary:"--sevn-color-secondary",tertiary:"--sevn-color-tertiary",neutral:"--sevn-color-neutral",red:"--sevn-color-red",green:"--sevn-color-green",blue:"--sevn-color-blue",yellow:"--sevn-color-yellow",textSecondary:"--sevn-color-text-secondary"};function $a(){if(!ct||document.querySelector(`style[${Fr}]`))return;const t=document.createElement("style");t.setAttribute(Fr,""),t.textContent=Xa,document.head.prepend(t);const e=vn().theme;e&&Zn(e)}function Zn(t){if(!ct)return;const e=Object.keys(Lr).filter(r=>t[r]).map(r=>` ${Lr[r]}: ${t[r]};`);if(e.length===0)return;let n=document.querySelector(`style[${Pr}]`);n||(n=document.createElement("style"),n.setAttribute(Pr,""),document.head.appendChild(n)),n.textContent=`:root {
2
+ ${e.join(`
3
+ `)}
4
+ }`}function Hr(){return Dr(Ga).transport}function Ur(t){return new Promise(e=>setTimeout(e,t))}function es(t,e){const n=AbortSignal.timeout(t);return e&&typeof AbortSignal.any=="function"?AbortSignal.any([e,n]):n}function ts(t,e){const n=new URL(t),r=new URL(e);return n.protocol=r.protocol,n.host=r.host,n.toString()}function ns(t,e){return Array.from({length:e},(n,r)=>(t+r)%e)}const rs=async(t,e)=>{const n=typeof t=="string"?t:t instanceof URL?t.toString():t.url,r=Or(),{timeoutMs:a,retriesPerHost:s,retryDelayMs:i,stickyWindowMs:o}=vn().request,l=Hr();l.activeIndex!==0&&Date.now()-l.pinnedAt>=o&&(l.activeIndex=0);let c=null;for(const h of ns(l.activeIndex,r.length)){const p=ts(n,r[h]);for(let v=0;v<s;v++)try{const g=await fetch(p,{...e,signal:es(a,e?.signal)});if(g.status>=500){c=new Error(`HTTP ${g.status} em ${r[h]}`),v<s-1&&await Ur(i);continue}return l.activeIndex=h,l.pinnedAt=Date.now(),g}catch(g){c=g,v<s-1&&await Ur(i)}}throw new V(n,c)};function as(){return vn().apiHosts[Hr().activeIndex]??null}const ss={applyKey:Yn,configure(t){Rr(t),t.theme&&Zn(t.theme)},getConfig:vn,isReady:Ir,assetUrl:Qa,setTheme(t){Rr({theme:t}),Zn(t)},activeHost:as},Gn=!1;var Vr=Array.isArray,is=Array.prototype.indexOf,Zt=Array.prototype.includes,Tn=Array.from,os=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,ls=Object.getOwnPropertyDescriptors,cs=Object.prototype,fs=Array.prototype,jr=Object.getPrototypeOf,qr=Object.isExtensible;const ds=()=>{};function vs(t){for(var e=0;e<t.length;e++)t[e]()}function Br(){var t,e,n=new Promise((r,a)=>{t=r,e=a});return{promise:n,resolve:t,reject:e}}const ae=2,un=4,kn=8,Kr=1<<24,ft=16,He=32,zt=64,Jn=128,ke=512,X=1024,se=2048,Ue=4096,Se=8192,dt=16384,Mt=32768,Jt=65536,Wr=1<<17,Yr=1<<18,Qt=1<<19,us=1<<20,xt=1<<25,Dt=65536,Qn=1<<21,Xn=1<<22,bt=1<<23,zn=Symbol("$state"),hs=Symbol("legacy props"),ps=Symbol(""),Nt=new class extends Error{constructor(){super(...arguments);lt(this,"name","StaleReactionError");lt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function _s(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function gs(t,e,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function ms(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ws(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ys(t){throw new Error("https://svelte.dev/e/effect_orphan")}function xs(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function bs(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ss(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Es(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Cs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function As(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Ts=1,ks=2,zs=16,Ms=1,Ds=4,Ns=8,Rs=16,Is=1,Os=2,ie=Symbol(),Zr="http://www.w3.org/1999/xhtml";function Fs(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Gr(t){return t===this.v}function Ps(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Jr(t){return!Ps(t,this.v)}let Ls=!1,ze=null;function Xt(t){ze=t}function Mn(t,e=!1,n){ze={p:ze,i:!1,c:null,e:null,s:t,x:null,l:null}}function Dn(t){var e=ze,n=e.e;if(n!==null){e.e=null;for(var r of n)ga(r)}return e.i=!0,ze=e.p,{}}function Qr(){return!0}let $t=[];function Hs(){var t=$t;$t=[],vs(t)}function Rt(t){if($t.length===0){var e=$t;queueMicrotask(()=>{e===$t&&Hs()})}$t.push(t)}function Xr(t){var e=F;if(e===null)return M.f|=bt,t;if((e.f&Mt)===0&&(e.f&un)===0)throw t;en(t,e)}function en(t,e){for(;e!==null;){if((e.f&Jn)!==0){if((e.f&Mt)===0)throw t;try{e.b.error(t);return}catch(n){t=n}}e=e.parent}throw t}const Us=-7169;function J(t,e){t.f=t.f&Us|e}function $n(t){(t.f&ke)!==0||t.deps===null?J(t,X):J(t,Ue)}function $r(t){if(t!==null)for(const e of t)(e.f&ae)===0||(e.f&Dt)===0||(e.f^=Dt,$r(e.deps))}function ea(t,e,n){(t.f&se)!==0?e.add(t):(t.f&Ue)!==0&&n.add(t),$r(t.deps),J(t,X)}const Nn=new Set;let Y=null,Ve=null,Me=[],er=null,tr=!1;const wr=class wr{constructor(){D(this,Ce);lt(this,"committed",!1);lt(this,"current",new Map);lt(this,"previous",new Map);D(this,an,new Set);D(this,sn,new Set);D(this,Vt,0);D(this,on,0);D(this,bn,null);D(this,Sn,new Set);D(this,jt,new Set);D(this,pt,new Map);lt(this,"is_fork",!1);D(this,ln,!1)}skip_effect(e){d(this,pt).has(e)||d(this,pt).set(e,{d:[],m:[]})}unskip_effect(e){var n=d(this,pt).get(e);if(n){d(this,pt).delete(e);for(var r of n.d)J(r,se),je(r);for(r of n.m)J(r,Ue),je(r)}}process(e){Me=[],this.apply();var n=[],r=[];for(const a of e)re(this,Ce,Tr).call(this,a,n,r);if(re(this,Ce,Ar).call(this)){re(this,Ce,kr).call(this,r),re(this,Ce,kr).call(this,n);for(const[a,s]of d(this,pt))aa(a,s)}else{for(const a of d(this,an))a();d(this,an).clear(),d(this,Vt)===0&&re(this,Ce,Wa).call(this),Y=null,ta(r),ta(n),d(this,bn)?.resolve()}Ve=null}capture(e,n){n!==ie&&!this.previous.has(e)&&this.previous.set(e,n),(e.f&bt)===0&&(this.current.set(e,e.v),Ve?.set(e,e.v))}activate(){Y=this,this.apply()}deactivate(){Y===this&&(Y=null,Ve=null)}flush(){if(this.activate(),Me.length>0){if(Vs(),Y!==null&&Y!==this)return}else d(this,Vt)===0&&this.process([]);this.deactivate()}discard(){for(const e of d(this,sn))e(this);d(this,sn).clear()}increment(e){k(this,Vt,d(this,Vt)+1),e&&k(this,on,d(this,on)+1)}decrement(e){k(this,Vt,d(this,Vt)-1),e&&k(this,on,d(this,on)-1),!d(this,ln)&&(k(this,ln,!0),Rt(()=>{k(this,ln,!1),re(this,Ce,Ar).call(this)?Me.length>0&&this.flush():this.revive()}))}revive(){for(const e of d(this,Sn))d(this,jt).delete(e),J(e,se),je(e);for(const e of d(this,jt))J(e,Ue),je(e);this.flush()}oncommit(e){d(this,an).add(e)}ondiscard(e){d(this,sn).add(e)}settled(){return(d(this,bn)??k(this,bn,Br())).promise}static ensure(){if(Y===null){const e=Y=new wr;Nn.add(Y),Rt(()=>{Y===e&&e.flush()})}return Y}apply(){}};an=new WeakMap,sn=new WeakMap,Vt=new WeakMap,on=new WeakMap,bn=new WeakMap,Sn=new WeakMap,jt=new WeakMap,pt=new WeakMap,ln=new WeakMap,Ce=new WeakSet,Ar=function(){return this.is_fork||d(this,on)>0},Tr=function(e,n,r){e.f^=X;for(var a=e.first;a!==null;){var s=a.f,i=(s&(He|zt))!==0,o=i&&(s&X)!==0,l=o||(s&Se)!==0||d(this,pt).has(a);if(!l&&a.fn!==null){i?a.f^=X:(s&un)!==0?n.push(a):gn(a)&&((s&ft)!==0&&d(this,jt).add(a),nn(a));var c=a.first;if(c!==null){a=c;continue}}for(;a!==null;){var h=a.next;if(h!==null){a=h;break}a=a.parent}}},kr=function(e){for(var n=0;n<e.length;n+=1)ea(e[n],d(this,Sn),d(this,jt))},Wa=function(){var a;if(Nn.size>1){this.previous.clear();var e=Ve,n=!0;for(const s of Nn){if(s===this){n=!1;continue}const i=[];for(const[l,c]of this.current){if(s.current.has(l))if(n&&c!==s.current.get(l))s.current.set(l,c);else continue;i.push(l)}if(i.length===0)continue;const o=[...s.current.keys()].filter(l=>!this.current.has(l));if(o.length>0){var r=Me;Me=[];const l=new Set,c=new Map;for(const h of i)na(h,o,l,c);if(Me.length>0){Y=s,s.apply();for(const h of Me)re(a=s,Ce,Tr).call(a,h,[],[]);s.deactivate()}Me=r}}Y=null,Ve=e}this.committed=!0,Nn.delete(this)};let St=wr;function Vs(){tr=!0;var t=null;try{for(var e=0;Me.length>0;){var n=St.ensure();if(e++>1e3){var r,a;js()}n.process(Me),Et.clear()}}finally{Me=[],tr=!1,er=null}}function js(){try{xs()}catch(t){en(t,er)}}let vt=null;function ta(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&(dt|Se))===0&&gn(r)&&(vt=new Set,nn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&wa(r),vt?.size>0)){Et.clear();for(const a of vt){if((a.f&(dt|Se))!==0)continue;const s=[a];let i=a.parent;for(;i!==null;)vt.has(i)&&(vt.delete(i),s.push(i)),i=i.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];(l.f&(dt|Se))===0&&nn(l)}}vt.clear()}}vt=null}}function na(t,e,n,r){if(!n.has(t)&&(n.add(t),t.reactions!==null))for(const a of t.reactions){const s=a.f;(s&ae)!==0?na(a,e,n,r):(s&(Xn|ft))!==0&&(s&se)===0&&ra(a,e,r)&&(J(a,se),je(a))}}function ra(t,e,n){const r=n.get(t);if(r!==void 0)return r;if(t.deps!==null)for(const a of t.deps){if(Zt.call(e,a))return!0;if((a.f&ae)!==0&&ra(a,e,n))return n.set(a,!0),!0}return n.set(t,!1),!1}function je(t){var e=er=t,n=e.b;if(n?.is_pending&&(t.f&(un|kn|Kr))!==0&&(t.f&Mt)===0){n.defer_effect(t);return}for(;e.parent!==null;){e=e.parent;var r=e.f;if(tr&&e===F&&(r&ft)!==0&&(r&Yr)===0&&(r&Mt)!==0)return;if((r&(zt|He))!==0){if((r&X)===0)return;e.f^=X}}Me.push(e)}function aa(t,e){if(!((t.f&He)!==0&&(t.f&X)!==0)){(t.f&se)!==0?e.d.push(t):(t.f&Ue)!==0&&e.m.push(t),J(t,X);for(var n=t.first;n!==null;)aa(n,e),n=n.next}}function qs(t){let e=0,n=It(0),r;return()=>{ir()&&(f(n),ci(()=>(e===0&&(r=Na(()=>t(()=>hn(n)))),e+=1,()=>{Rt(()=>{e-=1,e===0&&(r?.(),r=void 0,hn(n))})})))}}var Bs=Jt|Qt;function Ks(t,e,n){new Ws(t,e,n)}class Ws{constructor(e,n,r){D(this,ee);lt(this,"parent");lt(this,"is_pending",!1);D(this,Ke);D(this,yr,null);D(this,_t);D(this,qt);D(this,$e);D(this,et,null);D(this,Ae,null);D(this,tt,null);D(this,gt,null);D(this,Bt,0);D(this,kt,0);D(this,cn,!1);D(this,fn,new Set);D(this,dn,new Set);D(this,mt,null);D(this,Vn,qs(()=>(k(this,mt,It(d(this,Bt))),()=>{k(this,mt,null)})));k(this,Ke,e),k(this,_t,n),k(this,qt,a=>{var s=F;s.b=this,s.f|=Jn,r(a)}),this.parent=F.b,k(this,$e,lr(()=>{re(this,ee,zr).call(this)},Bs))}defer_effect(e){ea(e,d(this,fn),d(this,dn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!d(this,_t).pending}update_pending_count(e){re(this,ee,Mr).call(this,e),k(this,Bt,d(this,Bt)+e),!(!d(this,mt)||d(this,cn))&&(k(this,cn,!0),Rt(()=>{k(this,cn,!1),d(this,mt)&&tn(d(this,mt),d(this,Bt))}))}get_effect_pending(){return d(this,Vn).call(this),f(d(this,mt))}error(e){var n=d(this,_t).onerror;let r=d(this,_t).failed;if(!n&&!r)throw e;d(this,et)&&(ge(d(this,et)),k(this,et,null)),d(this,Ae)&&(ge(d(this,Ae)),k(this,Ae,null)),d(this,tt)&&(ge(d(this,tt)),k(this,tt,null));var a=!1,s=!1;const i=()=>{if(a){Fs();return}a=!0,s&&As(),d(this,tt)!==null&&Ot(d(this,tt),()=>{k(this,tt,null)}),re(this,ee,Wn).call(this,()=>{St.ensure(),re(this,ee,zr).call(this)})};Rt(()=>{try{s=!0,n?.(e,i),s=!1}catch(o){en(o,d(this,$e)&&d(this,$e).parent)}r&&k(this,tt,re(this,ee,Wn).call(this,()=>{St.ensure();try{return qe(()=>{var o=F;o.b=this,o.f|=Jn,r(d(this,Ke),()=>e,()=>i)})}catch(o){return en(o,d(this,$e).parent),null}}))})}}Ke=new WeakMap,yr=new WeakMap,_t=new WeakMap,qt=new WeakMap,$e=new WeakMap,et=new WeakMap,Ae=new WeakMap,tt=new WeakMap,gt=new WeakMap,Bt=new WeakMap,kt=new WeakMap,cn=new WeakMap,fn=new WeakMap,dn=new WeakMap,mt=new WeakMap,Vn=new WeakMap,ee=new WeakSet,rl=function(){try{k(this,et,qe(()=>d(this,qt).call(this,d(this,Ke))))}catch(e){this.error(e)}},al=function(){const e=d(this,_t).pending;e&&(this.is_pending=!0,k(this,Ae,qe(()=>e(d(this,Ke)))),Rt(()=>{var n=k(this,gt,document.createDocumentFragment()),r=ut();n.append(r),k(this,et,re(this,ee,Wn).call(this,()=>(St.ensure(),qe(()=>d(this,qt).call(this,r))))),d(this,kt)===0&&(d(this,Ke).before(n),k(this,gt,null),Ot(d(this,Ae),()=>{k(this,Ae,null)}),re(this,ee,Kn).call(this))}))},zr=function(){try{if(this.is_pending=this.has_pending_snippet(),k(this,kt,0),k(this,Bt,0),k(this,et,qe(()=>{d(this,qt).call(this,d(this,Ke))})),d(this,kt)>0){var e=k(this,gt,document.createDocumentFragment());ba(d(this,et),e);const n=d(this,_t).pending;k(this,Ae,qe(()=>n(d(this,Ke))))}else re(this,ee,Kn).call(this)}catch(n){this.error(n)}},Kn=function(){this.is_pending=!1;for(const e of d(this,fn))J(e,se),je(e);for(const e of d(this,dn))J(e,Ue),je(e);d(this,fn).clear(),d(this,dn).clear()},Wn=function(e){var n=F,r=M,a=ze;Xe(d(this,$e)),De(d(this,$e)),Xt(d(this,$e).ctx);try{return e()}catch(s){return Xr(s),null}finally{Xe(n),De(r),Xt(a)}},Mr=function(e){var n;if(!this.has_pending_snippet()){this.parent&&re(n=this.parent,ee,Mr).call(n,e);return}k(this,kt,d(this,kt)+e),d(this,kt)===0&&(re(this,ee,Kn).call(this),d(this,Ae)&&Ot(d(this,Ae),()=>{k(this,Ae,null)}),d(this,gt)&&(d(this,Ke).before(d(this,gt)),k(this,gt,null)))};function Ys(t,e,n,r){const a=Rn;var s=t.filter(v=>!v.settled);if(n.length===0&&s.length===0){r(e.map(a));return}var i=Y,o=F,l=Zs(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(v=>v.promise)):null;function h(v){l();try{r(v)}catch(g){(o.f&dt)===0&&en(g,o)}i?.deactivate(),nr()}if(n.length===0){c.then(()=>h(e.map(a)));return}function p(){l(),Promise.all(n.map(v=>Js(v))).then(v=>h([...e.map(a),...v])).catch(v=>en(v,o))}c?c.then(p):p()}function Zs(){var t=F,e=M,n=ze,r=Y;return function(s=!0){Xe(t),De(e),Xt(n),s&&r?.activate()}}function nr(){Xe(null),De(null),Xt(null)}function Gs(){var t=F.b,e=Y,n=t.is_rendered();return t.update_pending_count(1),e.increment(n),()=>{t.update_pending_count(-1),e.decrement(n)}}function Rn(t){var e=ae|se,n=M!==null&&(M.f&ae)!==0?M:null;return F!==null&&(F.f|=Qt),{ctx:ze,deps:null,effects:null,equals:Gr,f:e,fn:t,reactions:null,rv:0,v:ie,wv:0,parent:n??F,ac:null}}function Js(t,e,n){F===null&&_s();var a=void 0,s=It(ie),i=!M,o=new Map;return li(()=>{var l=Br();a=l.promise;try{Promise.resolve(t()).then(l.resolve,l.reject).then(()=>{c===Y&&c.committed&&c.deactivate(),nr()})}catch(v){l.reject(v),nr()}var c=Y;if(i){var h=Gs();o.get(c)?.reject(Nt),o.delete(c),o.set(c,l)}const p=(v,g=void 0)=>{if(c.activate(),g)g!==Nt&&(s.f|=bt,tn(s,g));else{(s.f&bt)!==0&&(s.f^=bt),tn(s,v);for(const[u,E]of o){if(o.delete(u),u===c)break;E.reject(Nt)}}h&&h()};l.promise.then(p,v=>p(null,v||"unknown"))}),_a(()=>{for(const l of o.values())l.reject(Nt)}),new Promise(l=>{function c(h){function p(){h===a?l(s):c(a)}h.then(p,p)}c(a)})}function N(t){const e=Rn(t);return Ea(e),e}function sa(t){const e=Rn(t);return e.equals=Jr,e}function Qs(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)ge(e[n])}}function Xs(t){for(var e=t.parent;e!==null;){if((e.f&ae)===0)return(e.f&dt)===0?e:null;e=e.parent}return null}function rr(t){var e,n=F;Xe(Xs(t));try{t.f&=~Dt,Qs(t),e=za(t)}finally{Xe(n)}return e}function ia(t){var e=rr(t);if(!t.equals(e)&&(t.wv=Ta(),(!Y?.is_fork||t.deps===null)&&(t.v=e,t.deps===null))){J(t,X);return}At||(Ve!==null?(ir()||Y?.is_fork)&&Ve.set(t,e):$n(t))}function $s(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac?.abort(Nt),e.teardown=ds,e.ac=null,mn(e,0),cr(e))}function oa(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&nn(e)}let ar=new Set;const Et=new Map;let la=!1;function It(t,e){var n={f:0,v:t,reactions:null,equals:Gr,rv:0,wv:0};return n}function _e(t,e){const n=It(t);return Ea(n),n}function ei(t,e=!1,n=!0){const r=It(t);return e||(r.equals=Jr),r}function Q(t,e,n=!1){M!==null&&(!Be||(M.f&Wr)!==0)&&Qr()&&(M.f&(ae|ft|Xn|Wr))!==0&&(Ne===null||!Zt.call(Ne,t))&&Cs();let r=n?Ct(e):e;return tn(t,r)}function tn(t,e){if(!t.equals(e)){var n=t.v;At?Et.set(t,e):Et.set(t,n),t.v=e;var r=St.ensure();if(r.capture(t,n),(t.f&ae)!==0){const a=t;(t.f&se)!==0&&rr(a),$n(a)}t.wv=Ta(),ca(t,se),F!==null&&(F.f&X)!==0&&(F.f&(He|zt))===0&&(Re===null?vi([t]):Re.push(t)),!r.is_fork&&ar.size>0&&!la&&ti()}return e}function ti(){la=!1;for(const t of ar)(t.f&X)!==0&&J(t,Ue),gn(t)&&nn(t);ar.clear()}function hn(t){Q(t,t.v+1)}function ca(t,e){var n=t.reactions;if(n!==null)for(var r=n.length,a=0;a<r;a++){var s=n[a],i=s.f,o=(i&se)===0;if(o&&J(s,e),(i&ae)!==0){var l=s;Ve?.delete(l),(i&Dt)===0&&(i&ke&&(s.f|=Dt),ca(l,Ue))}else o&&((i&ft)!==0&&vt!==null&&vt.add(s),je(s))}}function Ct(t){if(typeof t!="object"||t===null||zn in t)return t;const e=jr(t);if(e!==cs&&e!==fs)return t;var n=new Map,r=Vr(t),a=_e(0),s=Pt,i=o=>{if(Pt===s)return o();var l=M,c=Pt;De(null),Aa(s);var h=o();return De(l),Aa(c),h};return r&&n.set("length",_e(t.length)),new Proxy(t,{defineProperty(o,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Ss();var h=n.get(l);return h===void 0?i(()=>{var p=_e(c.value);return n.set(l,p),p}):Q(h,c.value,!0),!0},deleteProperty(o,l){var c=n.get(l);if(c===void 0){if(l in o){const h=i(()=>_e(ie));n.set(l,h),hn(a)}}else Q(c,ie),hn(a);return!0},get(o,l,c){if(l===zn)return t;var h=n.get(l),p=l in o;if(h===void 0&&(!p||Gt(o,l)?.writable)&&(h=i(()=>{var g=Ct(p?o[l]:ie),u=_e(g);return u}),n.set(l,h)),h!==void 0){var v=f(h);return v===ie?void 0:v}return Reflect.get(o,l,c)},getOwnPropertyDescriptor(o,l){var c=Reflect.getOwnPropertyDescriptor(o,l);if(c&&"value"in c){var h=n.get(l);h&&(c.value=f(h))}else if(c===void 0){var p=n.get(l),v=p?.v;if(p!==void 0&&v!==ie)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return c},has(o,l){if(l===zn)return!0;var c=n.get(l),h=c!==void 0&&c.v!==ie||Reflect.has(o,l);if(c!==void 0||F!==null&&(!h||Gt(o,l)?.writable)){c===void 0&&(c=i(()=>{var v=h?Ct(o[l]):ie,g=_e(v);return g}),n.set(l,c));var p=f(c);if(p===ie)return!1}return h},set(o,l,c,h){var p=n.get(l),v=l in o;if(r&&l==="length")for(var g=c;g<p.v;g+=1){var u=n.get(g+"");u!==void 0?Q(u,ie):g in o&&(u=i(()=>_e(ie)),n.set(g+"",u))}if(p===void 0)(!v||Gt(o,l)?.writable)&&(p=i(()=>_e(void 0)),Q(p,Ct(c)),n.set(l,p));else{v=p.v!==ie;var E=i(()=>Ct(c));Q(p,E)}var y=Reflect.getOwnPropertyDescriptor(o,l);if(y?.set&&y.set.call(h,c),!v){if(r&&typeof l=="string"){var U=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=U.v&&Q(U,w+1)}hn(a)}return!0},ownKeys(o){f(a);var l=Reflect.ownKeys(o).filter(p=>{var v=n.get(p);return v===void 0||v.v!==ie});for(var[c,h]of n)h.v!==ie&&!(c in o)&&l.push(c);return l},setPrototypeOf(){Es()}})}var fa,da,va,ua;function ni(){if(fa===void 0){fa=window,da=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;va=Gt(e,"firstChild").get,ua=Gt(e,"nextSibling").get,qr(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),qr(n)&&(n.__t=void 0)}}function ut(t=""){return document.createTextNode(t)}function In(t){return va.call(t)}function pn(t){return ua.call(t)}function _(t,e){return In(t)}function _n(t,e=!1){{var n=In(t);return n instanceof Comment&&n.data===""?pn(n):n}}function m(t,e=1,n=!1){let r=t;for(;e--;)r=pn(r);return r}function ri(t){t.textContent=""}function ha(){return!1}function pa(t,e,n){return document.createElementNS(Zr,t,void 0)}function sr(t){var e=M,n=F;De(null),Xe(null);try{return t()}finally{De(e),Xe(n)}}function ai(t){F===null&&(M===null&&ys(),ws()),At&&ms()}function si(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function ht(t,e,n){var r=F;r!==null&&(r.f&Se)!==0&&(t|=Se);var a={ctx:ze,deps:null,nodes:null,f:t|se|ke,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{nn(a)}catch(o){throw ge(a),o}else e!==null&&je(a);var s=a;if(n&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&Qt)===0&&(s=s.first,(t&ft)!==0&&(t&Jt)!==0&&s!==null&&(s.f|=Jt)),s!==null&&(s.parent=r,r!==null&&si(s,r),M!==null&&(M.f&ae)!==0&&(t&zt)===0)){var i=M;(i.effects??(i.effects=[])).push(s)}return a}function ir(){return M!==null&&!Be}function _a(t){const e=ht(kn,null,!1);return J(e,X),e.teardown=t,e}function or(t){ai();var e=F.f,n=!M&&(e&He)!==0&&(e&Mt)===0;if(n){var r=ze;(r.e??(r.e=[])).push(t)}else return ga(t)}function ga(t){return ht(un|us,t,!1)}function ii(t){St.ensure();const e=ht(zt|Qt,t,!0);return(n={})=>new Promise(r=>{n.outro?Ot(e,()=>{ge(e),r(void 0)}):(ge(e),r(void 0))})}function oi(t){return ht(un,t,!1)}function li(t){return ht(Xn|Qt,t,!0)}function ci(t,e=0){return ht(kn|e,t,!0)}function I(t,e=[],n=[],r=[]){Ys(r,e,n,a=>{ht(kn,()=>t(...a.map(f)),!0)})}function lr(t,e=0){var n=ht(ft|e,t,!0);return n}function qe(t){return ht(He|Qt,t,!0)}function ma(t){var e=t.teardown;if(e!==null){const n=At,r=M;Sa(!0),De(null);try{e.call(null)}finally{Sa(n),De(r)}}}function cr(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const a=n.ac;a!==null&&sr(()=>{a.abort(Nt)});var r=n.next;(n.f&zt)!==0?n.parent=null:ge(n,e),n=r}}function fi(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&He)===0&&ge(e),e=n}}function ge(t,e=!0){var n=!1;(e||(t.f&Yr)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(di(t.nodes.start,t.nodes.end),n=!0),cr(t,e&&!n),mn(t,0),J(t,dt);var r=t.nodes&&t.nodes.t;if(r!==null)for(const s of r)s.stop();ma(t);var a=t.parent;a!==null&&a.first!==null&&wa(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=null}function di(t,e){for(;t!==null;){var n=t===e?null:pn(t);t.remove(),t=n}}function wa(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function Ot(t,e,n=!0){var r=[];ya(t,r,!0);var a=()=>{n&&ge(t),e&&e()},s=r.length;if(s>0){var i=()=>--s||a();for(var o of r)o.out(i)}else a()}function ya(t,e,n){if((t.f&Se)===0){t.f^=Se;var r=t.nodes&&t.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&e.push(o);for(var a=t.first;a!==null;){var s=a.next,i=(a.f&Jt)!==0||(a.f&He)!==0&&(t.f&ft)!==0;ya(a,e,i?n:!1),a=s}}}function fr(t){xa(t,!0)}function xa(t,e){if((t.f&Se)!==0){t.f^=Se,(t.f&X)===0&&(J(t,se),je(t));for(var n=t.first;n!==null;){var r=n.next,a=(n.f&Jt)!==0||(n.f&He)!==0;xa(n,a?e:!1),n=r}var s=t.nodes&&t.nodes.t;if(s!==null)for(const i of s)(i.is_global||e)&&i.in()}}function ba(t,e){if(t.nodes)for(var n=t.nodes.start,r=t.nodes.end;n!==null;){var a=n===r?null:pn(n);e.append(n),n=a}}let On=!1,At=!1;function Sa(t){At=t}let M=null,Be=!1;function De(t){M=t}let F=null;function Xe(t){F=t}let Ne=null;function Ea(t){M!==null&&(Ne===null?Ne=[t]:Ne.push(t))}let me=null,Ee=0,Re=null;function vi(t){Re=t}let Ca=1,Ft=0,Pt=Ft;function Aa(t){Pt=t}function Ta(){return++Ca}function gn(t){var e=t.f;if((e&se)!==0)return!0;if(e&ae&&(t.f&=~Dt),(e&Ue)!==0){for(var n=t.deps,r=n.length,a=0;a<r;a++){var s=n[a];if(gn(s)&&ia(s),s.wv>t.wv)return!0}(e&ke)!==0&&Ve===null&&J(t,X)}return!1}function ka(t,e,n=!0){var r=t.reactions;if(r!==null&&!(Ne!==null&&Zt.call(Ne,t)))for(var a=0;a<r.length;a++){var s=r[a];(s.f&ae)!==0?ka(s,e,!1):e===s&&(n?J(s,se):(s.f&X)!==0&&J(s,Ue),je(s))}}function za(t){var E;var e=me,n=Ee,r=Re,a=M,s=Ne,i=ze,o=Be,l=Pt,c=t.f;me=null,Ee=0,Re=null,M=(c&(He|zt))===0?t:null,Ne=null,Xt(t.ctx),Be=!1,Pt=++Ft,t.ac!==null&&(sr(()=>{t.ac.abort(Nt)}),t.ac=null);try{t.f|=Qn;var h=t.fn,p=h();t.f|=Mt;var v=t.deps,g=Y?.is_fork;if(me!==null){var u;if(g||mn(t,Ee),v!==null&&Ee>0)for(v.length=Ee+me.length,u=0;u<me.length;u++)v[Ee+u]=me[u];else t.deps=v=me;if(ir()&&(t.f&ke)!==0)for(u=Ee;u<v.length;u++)((E=v[u]).reactions??(E.reactions=[])).push(t)}else!g&&v!==null&&Ee<v.length&&(mn(t,Ee),v.length=Ee);if(Qr()&&Re!==null&&!Be&&v!==null&&(t.f&(ae|Ue|se))===0)for(u=0;u<Re.length;u++)ka(Re[u],t);if(a!==null&&a!==t){if(Ft++,a.deps!==null)for(let y=0;y<n;y+=1)a.deps[y].rv=Ft;if(e!==null)for(const y of e)y.rv=Ft;Re!==null&&(r===null?r=Re:r.push(...Re))}return(t.f&bt)!==0&&(t.f^=bt),p}catch(y){return Xr(y)}finally{t.f^=Qn,me=e,Ee=n,Re=r,M=a,Ne=s,Xt(i),Be=o,Pt=l}}function ui(t,e){let n=e.reactions;if(n!==null){var r=is.call(n,t);if(r!==-1){var a=n.length-1;a===0?n=e.reactions=null:(n[r]=n[a],n.pop())}}if(n===null&&(e.f&ae)!==0&&(me===null||!Zt.call(me,e))){var s=e;(s.f&ke)!==0&&(s.f^=ke,s.f&=~Dt),$n(s),$s(s),mn(s,0)}}function mn(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)ui(t,n[r])}function nn(t){var e=t.f;if((e&dt)===0){J(t,X);var n=F,r=On;F=t,On=!0;try{(e&(ft|Kr))!==0?fi(t):cr(t),ma(t);var a=za(t);t.teardown=typeof a=="function"?a:null,t.wv=Ca;var s;Gn&&Ls&&(t.f&se)!==0&&t.deps}finally{On=r,F=n}}}function f(t){var e=t.f,n=(e&ae)!==0;if(M!==null&&!Be){var r=F!==null&&(F.f&dt)!==0;if(!r&&(Ne===null||!Zt.call(Ne,t))){var a=M.deps;if((M.f&Qn)!==0)t.rv<Ft&&(t.rv=Ft,me===null&&a!==null&&a[Ee]===t?Ee++:me===null?me=[t]:me.push(t));else{(M.deps??(M.deps=[])).push(t);var s=t.reactions;s===null?t.reactions=[M]:Zt.call(s,M)||s.push(M)}}}if(At&&Et.has(t))return Et.get(t);if(n){var i=t;if(At){var o=i.v;return((i.f&X)===0&&i.reactions!==null||Da(i))&&(o=rr(i)),Et.set(i,o),o}var l=(i.f&ke)===0&&!Be&&M!==null&&(On||(M.f&ke)!==0),c=(i.f&Mt)===0;gn(i)&&(l&&(i.f|=ke),ia(i)),l&&!c&&(oa(i),Ma(i))}if(Ve?.has(t))return Ve.get(t);if((t.f&bt)!==0)throw t.v;return t.v}function Ma(t){if(t.f|=ke,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),(e.f&ae)!==0&&(e.f&ke)===0&&(oa(e),Ma(e))}function Da(t){if(t.v===ie)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Et.has(e)||(e.f&ae)!==0&&Da(e))return!0;return!1}function Na(t){var e=Be;try{return Be=!0,t()}finally{Be=e}}const hi=["touchstart","touchmove"];function pi(t){return hi.includes(t)}const Fn=Symbol("events"),_i=new Set,Ra=new Set;function gi(t,e,n,r={}){function a(s){if(r.capture||dr.call(e,s),!s.cancelBubble)return sr(()=>n?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Rt(()=>{e.addEventListener(t,a,r)}):e.addEventListener(t,a,r),a}function mi(t,e,n,r,a){var s={capture:r,passive:a},i=gi(t,e,n,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&_a(()=>{e.removeEventListener(t,i,s)})}let Ia=null;function dr(t){var e=this,n=e.ownerDocument,r=t.type,a=t.composedPath?.()||[],s=a[0]||t.target;Ia=t;var i=0,o=Ia===t&&t[Fn];if(o){var l=a.indexOf(o);if(l!==-1&&(e===document||e===window)){t[Fn]=e;return}var c=a.indexOf(e);if(c===-1)return;l<=c&&(i=l)}if(s=a[i]||t.target,s!==e){os(t,"currentTarget",{configurable:!0,get(){return s||n}});var h=M,p=F;De(null),Xe(null);try{for(var v,g=[];s!==null;){var u=s.assignedSlot||s.parentNode||s.host||null;try{var E=s[Fn]?.[r];E!=null&&(!s.disabled||t.target===s)&&E.call(s,t)}catch(y){v?g.push(y):v=y}if(t.cancelBubble||u===e||u===null)break;s=u}if(v){for(let y of g)queueMicrotask(()=>{throw y});throw v}}finally{t[Fn]=e,delete t.currentTarget,De(h),Xe(p)}}}const wi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function yi(t){return wi?.createHTML(t)??t}function xi(t,e=!1){var n=pa("template");return t=t.replaceAll("<!>","<!---->"),n.innerHTML=e?yi(t):t,n.content}function Pn(t,e){var n=F;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function A(t,e){var n=(e&Is)!==0,r=(e&Os)!==0,a,s=!t.startsWith("<!>");return()=>{a===void 0&&(a=xi(s?t:"<!>"+t,!0),n||(a=In(a)));var i=r||da?document.importNode(a,!0):a.cloneNode(!0);if(n){var o=In(i),l=i.lastChild;Pn(o,l)}else Pn(i,i);return i}}function Ln(t=""){{var e=ut(t+"");return Pn(e,e),e}}function bi(){var t=document.createDocumentFragment(),e=document.createComment(""),n=ut();return t.append(e,n),Pn(e,n),t}function b(t,e){t!==null&&t.before(e)}function x(t,e){var n=e==null?"":typeof e=="object"?e+"":e;n!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=n,t.nodeValue=n+"")}function Si(t,e){return Ei(t,e)}const Hn=new Map;function Ei(t,{target:e,anchor:n,props:r={},events:a,context:s,intro:i=!0}){ni();var o=void 0,l=ii(()=>{var c=n??e.appendChild(ut());Ks(c,{pending:()=>{}},v=>{Mn({});var g=ze;s&&(g.c=s),a&&(r.$$events=a),o=t(v,r)||{},Dn()});var h=new Set,p=v=>{for(var g=0;g<v.length;g++){var u=v[g];if(!h.has(u)){h.add(u);var E=pi(u);for(const w of[e,document]){var y=Hn.get(w);y===void 0&&(y=new Map,Hn.set(w,y));var U=y.get(u);U===void 0?(w.addEventListener(u,dr,{passive:E}),y.set(u,1)):y.set(u,U+1)}}}};return p(Tn(_i)),Ra.add(p),()=>{for(var v of h)for(const E of[e,document]){var g=Hn.get(E),u=g.get(v);--u==0?(E.removeEventListener(v,dr),g.delete(v),g.size===0&&Hn.delete(E)):g.set(v,u)}Ra.delete(p),c!==n&&c.parentNode?.removeChild(c)}});return vr.set(o,l),o}let vr=new WeakMap;function Ci(t,e){const n=vr.get(t);return n?(vr.delete(t),n(e)):Promise.resolve()}class Ai{constructor(e,n=!0){lt(this,"anchor");D(this,We,new Map);D(this,nt,new Map);D(this,Te,new Map);D(this,Kt,new Set);D(this,En,!0);D(this,Cn,()=>{var e=Y;if(d(this,We).has(e)){var n=d(this,We).get(e),r=d(this,nt).get(n);if(r)fr(r),d(this,Kt).delete(n);else{var a=d(this,Te).get(n);a&&(d(this,nt).set(n,a.effect),d(this,Te).delete(n),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),r=a.effect)}for(const[s,i]of d(this,We)){if(d(this,We).delete(s),s===e)break;const o=d(this,Te).get(i);o&&(ge(o.effect),d(this,Te).delete(i))}for(const[s,i]of d(this,nt)){if(s===n||d(this,Kt).has(s))continue;const o=()=>{if(Array.from(d(this,We).values()).includes(s)){var c=document.createDocumentFragment();ba(i,c),c.append(ut()),d(this,Te).set(s,{effect:i,fragment:c})}else ge(i);d(this,Kt).delete(s),d(this,nt).delete(s)};d(this,En)||!r?(d(this,Kt).add(s),Ot(i,o,!1)):o()}}});D(this,jn,e=>{d(this,We).delete(e);const n=Array.from(d(this,We).values());for(const[r,a]of d(this,Te))n.includes(r)||(ge(a.effect),d(this,Te).delete(r))});this.anchor=e,k(this,En,n)}ensure(e,n){var r=Y,a=ha();if(n&&!d(this,nt).has(e)&&!d(this,Te).has(e))if(a){var s=document.createDocumentFragment(),i=ut();s.append(i),d(this,Te).set(e,{effect:qe(()=>n(i)),fragment:s})}else d(this,nt).set(e,qe(()=>n(this.anchor)));if(d(this,We).set(r,e),a){for(const[o,l]of d(this,nt))o===e?r.unskip_effect(l):r.skip_effect(l);for(const[o,l]of d(this,Te))o===e?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(d(this,Cn)),r.ondiscard(d(this,jn))}else d(this,Cn).call(this)}}We=new WeakMap,nt=new WeakMap,Te=new WeakMap,Kt=new WeakMap,En=new WeakMap,Cn=new WeakMap,jn=new WeakMap;function O(t,e,n=!1){var r=new Ai(t),a=n?Jt:0;function s(i,o){r.ensure(i,o)}lr(()=>{var i=!1;e((o,l=0)=>{i=!0,s(l,o)}),i||s(!1,null)},a)}function Lt(t,e){return e}function Ti(t,e,n){for(var r=[],a=e.length,s,i=e.length,o=0;o<a;o++){let p=e[o];Ot(p,()=>{if(s){if(s.pending.delete(p),s.done.add(p),s.pending.size===0){var v=t.outrogroups;ur(Tn(s.done)),v.delete(s),v.size===0&&(t.outrogroups=null)}}else i-=1},!1)}if(i===0){var l=r.length===0&&n!==null;if(l){var c=n,h=c.parentNode;ri(h),h.append(c),t.items.clear()}ur(e,!l)}else s={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(s)}function ur(t,e=!0){for(var n=0;n<t.length;n++)ge(t[n],e)}var Oa;function Ht(t,e,n,r,a,s=null){var i=t,o=new Map;{var l=t;i=l.appendChild(ut())}var c=null,h=sa(()=>{var y=n();return Vr(y)?y:y==null?[]:Tn(y)}),p,v=!0;function g(){E.fallback=c,ki(E,p,i,e,r),c!==null&&(p.length===0?(c.f&xt)===0?fr(c):(c.f^=xt,yn(c,null,i)):Ot(c,()=>{c=null}))}var u=lr(()=>{p=f(h);for(var y=p.length,U=new Set,w=Y,R=ha(),j=0;j<y;j+=1){var de=p[j],rt=r(de,j),ve=v?null:o.get(rt);ve?(ve.v&&tn(ve.v,de),ve.i&&tn(ve.i,j),R&&w.unskip_effect(ve.e)):(ve=zi(o,v?i:Oa??(Oa=ut()),de,rt,j,a,e,n),v||(ve.e.f|=xt),o.set(rt,ve)),U.add(rt)}if(y===0&&s&&!c&&(v?c=qe(()=>s(i)):(c=qe(()=>s(Oa??(Oa=ut()))),c.f|=xt)),y>U.size&&gs(),!v)if(R){for(const[Ie,An]of o)U.has(Ie)||w.skip_effect(An.e);w.oncommit(g),w.ondiscard(()=>{})}else g();f(h)}),E={effect:u,items:o,outrogroups:null,fallback:c};v=!1}function wn(t){for(;t!==null&&(t.f&He)===0;)t=t.next;return t}function ki(t,e,n,r,a){var s=e.length,i=t.items,o=wn(t.effect.first),l,c=null,h=[],p=[],v,g,u,E;for(E=0;E<s;E+=1){if(v=e[E],g=a(v,E),u=i.get(g).e,t.outrogroups!==null)for(const Ie of t.outrogroups)Ie.pending.delete(u),Ie.done.delete(u);if((u.f&xt)!==0)if(u.f^=xt,u===o)yn(u,null,n);else{var y=c?c.next:o;u===t.effect.last&&(t.effect.last=u.prev),u.prev&&(u.prev.next=u.next),u.next&&(u.next.prev=u.prev),Tt(t,c,u),Tt(t,u,y),yn(u,y,n),c=u,h=[],p=[],o=wn(c.next);continue}if((u.f&Se)!==0&&fr(u),u!==o){if(l!==void 0&&l.has(u)){if(h.length<p.length){var U=p[0],w;c=U.prev;var R=h[0],j=h[h.length-1];for(w=0;w<h.length;w+=1)yn(h[w],U,n);for(w=0;w<p.length;w+=1)l.delete(p[w]);Tt(t,R.prev,j.next),Tt(t,c,R),Tt(t,j,U),o=U,c=j,E-=1,h=[],p=[]}else l.delete(u),yn(u,o,n),Tt(t,u.prev,u.next),Tt(t,u,c===null?t.effect.first:c.next),Tt(t,c,u),c=u;continue}for(h=[],p=[];o!==null&&o!==u;)(l??(l=new Set)).add(o),p.push(o),o=wn(o.next);if(o===null)continue}(u.f&xt)===0&&h.push(u),c=u,o=wn(u.next)}if(t.outrogroups!==null){for(const Ie of t.outrogroups)Ie.pending.size===0&&(ur(Tn(Ie.done)),t.outrogroups?.delete(Ie));t.outrogroups.size===0&&(t.outrogroups=null)}if(o!==null||l!==void 0){var de=[];if(l!==void 0)for(u of l)(u.f&Se)===0&&de.push(u);for(;o!==null;)(o.f&Se)===0&&o!==t.fallback&&de.push(o),o=wn(o.next);var rt=de.length;if(rt>0){var ve=s===0?n:null;Ti(t,de,ve)}}}function zi(t,e,n,r,a,s,i,o){var l=(i&Ts)!==0?(i&zs)===0?ei(n,!1,!1):It(n):null,c=(i&ks)!==0?It(a):null;return{v:l,i:c,e:qe(()=>(s(e,l??n,c??a,o),()=>{t.delete(r)}))}}function yn(t,e,n){if(t.nodes)for(var r=t.nodes.start,a=t.nodes.end,s=e&&(e.f&xt)===0?e.nodes.start:n;r!==null;){var i=pn(r);if(s.before(r),r===a)return;r=i}}function Tt(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function rn(t,e){oi(()=>{var n=t.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+e.hash)){const a=pa("style");a.id=e.hash,a.textContent=e.code,r.appendChild(a)}})}const Fa=[...`
5
+ \r\f \v\uFEFF`];function Mi(t,e,n){var r=t==null?"":""+t;if(e&&(r=r?r+" "+e:e),n){for(var a in n)if(n[a])r=r?r+" "+a:a;else if(r.length)for(var s=a.length,i=0;(i=r.indexOf(a,i))>=0;){var o=i+s;(i===0||Fa.includes(r[i-1]))&&(o===r.length||Fa.includes(r[o]))?r=(i===0?"":r.substring(0,i))+r.substring(o+1):i=o}}return r===""?null:r}function Di(t,e){return t==null?null:String(t)}function hr(t,e,n,r,a,s){var i=t.__className;if(i!==n||i===void 0){var o=Mi(n,r,s);o==null?t.removeAttribute("class"):t.className=o,t.__className=n}else if(s&&a!==s)for(var l in s){var c=!!s[l];(a==null||c!==!!a[l])&&t.classList.toggle(l,c)}return s}function $(t,e,n,r){var a=t.__style;if(a!==e){var s=Di(e);s==null?t.removeAttribute("style"):t.style.cssText=s,t.__style=e}return r}const Ni=Symbol("is custom element"),Ri=Symbol("is html");function Pa(t,e,n,r){var a=Ii(t);a[e]!==(a[e]=n)&&(e==="loading"&&(t[ps]=n),n==null?t.removeAttribute(e):typeof n!="string"&&Oi(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function Ii(t){return t.__attributes??(t.__attributes={[Ni]:t.nodeName.includes("-"),[Ri]:t.namespaceURI===Zr})}var La=new Map;function Oi(t){var e=t.getAttribute("is")||t.nodeName,n=La.get(e);if(n)return n;La.set(e,n=[]);for(var r,a=t,s=Element.prototype;s!==a;){r=ls(a);for(var i in r)r[i].set&&n.push(i);a=jr(a)}return n}let Un=!1;function Fi(t){var e=Un;try{return Un=!1,[t(),Un]}finally{Un=e}}function oe(t,e,n,r){var a=(n&Ns)!==0,s=(n&Rs)!==0,i=r,o=!0,l=()=>(o&&(o=!1,i=s?Na(r):r),i),c;if(a){var h=zn in t||hs in t;c=Gt(t,e)?.set??(h&&e in t?w=>t[e]=w:void 0)}var p,v=!1;a?[p,v]=Fi(()=>t[e]):p=t[e],p===void 0&&r!==void 0&&(p=l(),c&&(bs(),c(p)));var g;if(g=()=>{var w=t[e];return w===void 0?l():(o=!0,w)},(n&Ds)===0)return g;if(c){var u=t.$$legacy;return(function(w,R){return arguments.length>0?((!R||u||v)&&c(R?g():w),w):g()})}var E=!1,y=((n&Ms)!==0?Rn:sa)(()=>(E=!1,g()));a&&f(y);var U=F;return(function(w,R){if(arguments.length>0){const j=R?f(y):a?Ct(w):w;return Q(y,j),E=!0,i!==void 0&&(i=j),w}return At&&E||(U.f&dt)!==0?y.v:f(y)})}function Pi(t,e){var n,r;return r=class{constructor(s){D(this,n,null);if(!ct)throw new Error(`[sevn] ${e} só pode ser instanciado no navegador. Em SSR, monte o componente dentro de um efeito de cliente.`);const{target:i,...o}=s??{},l=typeof i=="string"?document.querySelector(i):i;if(!l)throw new Error(`[sevn] ${e}: alvo não encontrado`+(typeof i=="string"?` para o seletor "${i}".`:"."));$a(),k(this,n,Si(t,{target:l,props:o}))}destroy(){if(!d(this,n))return Promise.resolve();const s=d(this,n);return k(this,n,null),Ci(s)}},n=new WeakMap,r}function Ha(t){try{return new URL(t,document.baseURI).searchParams.get("cid")}catch{return null}}function Li(){const t=document.currentScript;if(t?.src){const n=Ha(t.src);if(n)return n}const e=document.querySelectorAll('script[src*="cid="]');for(const n of e){const r=Ha(n.src);if(r)return r}return null}function Hi(){if(!ct)return;const t=Li();if(t)try{Yn(t)}catch(e){console.error("[sevn] Chave inválida na tag <script>:",e)}}const Ui="5";typeof window<"u"&&((Ba=window.__svelte??(window.__svelte={})).v??(Ba.v=new Set)).add(Ui);const Vi="data:image/svg+xml,%3csvg%20width='37'%20height='45'%20viewBox='0%200%2037%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20d='M11.3846%2028.125H25.6154C30.34%2028.125%2034.1538%2031.8937%2034.1538%2036.5625V42.1875H2.84615V36.5625C2.84615%2031.8937%206.66%2028.125%2011.3846%2028.125ZM11.3846%2011.25H25.6154V18.2812C25.6154%2020.1461%2024.8657%2021.9345%2023.5313%2023.2531C22.1969%2024.5717%2020.3871%2025.3125%2018.5%2025.3125C16.6129%2025.3125%2014.8031%2024.5717%2013.4687%2023.2531C12.1343%2021.9345%2011.3846%2020.1461%2011.3846%2018.2812V11.25ZM25.6154%2011.25C27.1808%2011.25%2028.4615%2012.5156%2028.4615%2014.0625C28.4615%2015.6094%2027.1808%2016.875%2025.6154%2016.875V11.25ZM11.3846%2016.875C9.81923%2016.875%208.53846%2015.6094%208.53846%2014.0625C8.53846%2012.5156%209.81923%2011.25%2011.3846%2011.25V16.875Z'%20fill='%231C1C1C'/%3e%3cpath%20d='M11.7262%2011.5875H10.3031C8.16847%209.84374%208.53847%207.17186%208.53847%204.92186C8.53847%202.67186%209.96154%204.19061%2011.3846%204.19061C12.8077%204.19061%2014.2308%205.59686%2014.2308%205.59686C11.7262%205.59686%2011.3846%202.78436%2011.3846%202.78436H19.9231C23.0539%202.78436%2025.6154%205.31561%2025.6154%208.40936H27.0385C27.0385%208.40936%2027.75%2010.5187%2026.6969%2011.925L11.7546%2011.5875H11.7262Z'%20fill='%231C1C1C'/%3e%3c/g%3e%3c/svg%3e",ji="data:image/svg+xml,%3csvg%20width='37'%20height='45'%20viewBox='0%200%2037%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20d='M11.3846%2028.125H25.6154C30.34%2028.125%2034.1539%2031.8937%2034.1539%2036.5625V42.1875H2.84616V36.5625C2.84616%2031.8937%206.66001%2028.125%2011.3846%2028.125ZM11.3846%2011.25H25.6154V18.2812C25.6154%2020.1461%2024.8657%2021.9345%2023.5313%2023.2531C22.197%2024.5717%2020.3871%2025.3125%2018.5%2025.3125C16.6129%2025.3125%2014.8031%2024.5717%2013.4687%2023.2531C12.1343%2021.9345%2011.3846%2020.1461%2011.3846%2018.2812V11.25Z'%20fill='black'/%3e%3cpath%20d='M27.0385%2011.0531V9.84375C27.0385%206.75%2024.4769%204.21875%2021.3461%204.21875L19.9231%202.8125H15.6538C12.5231%202.8125%209.96153%205.34375%209.96153%208.4375V11.0531C9.96153%2014.7938%208.45307%2018.3656%205.80615%2021.0094L4.26923%2022.5281L6.37538%2023.5688C8.53846%2024.6375%2011.1285%2024.2156%2012.8077%2022.5281H24.1923C25.9%2024.2156%2028.49%2024.6375%2030.6246%2023.5688L32.7308%2022.5281L31.1938%2021.0094C29.8732%2019.701%2028.8264%2018.1483%2028.1134%2016.4399C27.4004%2014.7316%2027.0351%2012.9011%2027.0385%2011.0531Z'%20fill='black'/%3e%3cpath%20d='M19.9231%202.8125C19.9231%202.8125%2021.3462%202.8125%2021.3462%204.21875H19.9231V2.8125Z'%20fill='black'/%3e%3c/g%3e%3c/svg%3e";var qi=A('<span class="avatar-tag svelte-ga6vh2"> </span>'),Bi=A('<div class="avatar-container svelte-ga6vh2"><div class="avatar svelte-ga6vh2"><img width="1" height="1"/></div> <!></div>');const Ki={hash:"svelte-ga6vh2",code:".avatar-container.svelte-ga6vh2 {position:relative;display:inline-flex;flex-direction:column;align-items:center;flex-shrink:0;}.avatar.svelte-ga6vh2 {border-radius:50%;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;}.avatar-image.svelte-ga6vh2 {width:75%;height:auto;display:block;margin-bottom:-6%;}.avatar-image--photo.svelte-ga6vh2 {width:100%;height:100%;margin-bottom:0;object-fit:cover;object-position:center top;}.avatar-tag.svelte-ga6vh2 {position:absolute;bottom:-5px;color:#fff;font-weight:700;letter-spacing:0.05em;border-radius:4px;border:1px solid #fff;white-space:nowrap;}"};function Ut(t,e){rn(t,Ki);let n=oe(e,"avatar",3,"man"),r=oe(e,"size",3,"md"),a=oe(e,"tagColor",3,"var(--sevn-color-green)"),s=_e(!1);const i=N(()=>n()==="woman"?ji:Vi),o=N(()=>!!e.photoUrl&&!f(s)),l=N(()=>f(o)?e.photoUrl:f(i)),c={sm:"40px",md:"56px",lg:"72px"},h={sm:{fontSize:"9px",padding:"1px 5px"},md:{fontSize:"12px",padding:"2px 8px"},lg:{fontSize:"14px",padding:"3px 10px"}},p=N(()=>c[r()]??r()),v=N(()=>h[r()]??h.md);var g=Bi(),u=_(g),E=_(u);let y;var U=m(u,2);{var w=R=>{var j=qi(),de=_(j);I(()=>{$(j,`background-color: ${a()??""}; font-size: ${f(v).fontSize??""}; padding: ${f(v).padding??""};`),x(de,e.tag)}),b(R,j)};O(U,R=>{e.tag&&R(w)})}I(()=>{$(u,`background-color: ${e.avatarColor??"var(--sevn-color-secondary)"??""}; width: ${f(p)??""}; height: ${f(p)??""};`),y=hr(E,1,"avatar-image svelte-ga6vh2",null,y,{"avatar-image--photo":f(o)}),Pa(E,"src",f(l)),Pa(E,"alt",e.name)}),mi("error",E,()=>Q(s,!0)),b(t,g)}var Wi=A("<span> </span>");const Yi={hash:"svelte-pamnib",code:".tag.svelte-pamnib {display:inline-flex;align-items:center;padding:4px 8px;border-radius:5px;font-family:inherit;font-weight:700;color:#ffffff;white-space:nowrap;letter-spacing:0.03em;width:fit-content;}"};function xn(t,e){rn(t,Yi);let n=oe(e,"color",3,"#1C1C1C"),r=oe(e,"fontSize",3,"0.6875rem"),a=oe(e,"class",3,"");var s=Wi(),i=_(s);I(()=>{hr(s,1,`tag ${a()??""}`,"svelte-pamnib"),$(s,`background-color: ${n()??""}; font-size: ${r()??""}`),x(i,e.label)}),b(t,s)}var Zi=A("<span> </span>"),Gi=A('<div class="vote-overview-stats svelte-1m9ufac"></div>'),Ji=A("<span> </span>"),Qi=A('<span class="vote-overview-sep svelte-1m9ufac">|</span>'),Xi=A("<span> </span>"),$i=A('<div class="vote-overview-meta svelte-1m9ufac"><!> <!> <!></div>'),eo=A('<div class="vote-overview svelte-1m9ufac"><!> <!></div>');const to={hash:"svelte-1m9ufac",code:".vote-overview.svelte-1m9ufac {display:flex;align-items:center;padding:0.5rem 1rem;font-size:0.8rem;color:#1c1c1c;gap:1rem;flex-wrap:wrap;opacity:50%;}.vote-overview-stats.svelte-1m9ufac {display:flex;align-items:center;gap:1.5rem;font-weight:600;}.vote-overview-meta.svelte-1m9ufac {display:flex;align-items:center;gap:0.4rem;font-weight:400;white-space:nowrap;}.vote-overview-sep.svelte-1m9ufac {opacity:0.4;}"};function Ua(t,e){Mn(e,!0),rn(t,to);let n=oe(e,"data",19,()=>[]),r=oe(e,"borderTop",3,!1),a=oe(e,"align",3,"start");var s=eo(),i=_(s);{var o=h=>{var p=Gi();Ht(p,21,n,Lt,(v,g)=>{var u=Zi(),E=_(u);I(()=>x(E,`${f(g).text??""} ${f(g).value??""}`)),b(v,u)}),b(h,p)};O(i,h=>{n().length&&h(o)})}var l=m(i,2);{var c=h=>{var p=$i(),v=_(p);{var g=w=>{var R=Ji(),j=_(R);I(()=>x(j,`Atualizado em ${e.date??""}`)),b(w,R)};O(v,w=>{e.date&&w(g)})}var u=m(v,2);{var E=w=>{var R=Qi();b(w,R)};O(u,w=>{e.date&&e.font&&w(E)})}var y=m(u,2);{var U=w=>{var R=Xi(),j=_(R);I(()=>x(j,`Fonte ${e.font??""}`)),b(w,R)};O(y,w=>{e.font&&w(U)})}b(h,p)};O(l,h=>{(e.date||e.font)&&h(c)})}I(()=>$(s,`justify-content:${a()==="end"?"flex-end":"flex-start"};${r()?"border-top:1px solid var(--sevn-color-neutral)":""}`)),b(t,s),Dn()}function no(t,e){return`${typeof t=="number"&&Number.isFinite(t)&&t>0?t:e+1}º lugar`}var ro=A('<div class="bar-seg svelte-10dw06o"></div>'),ao=A('<div class="candidate-percentage-layout duel svelte-10dw06o"><div class="duel-candidates svelte-10dw06o"><!> <div class="duel-center svelte-10dw06o"><div class="duel-infos-row svelte-10dw06o"><div class="duel-info svelte-10dw06o"><span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div> <div class="duel-info right svelte-10dw06o"><span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div></div> <div class="bar-dual svelte-10dw06o"></div> <!></div> <!></div></div>'),so=A('<span class="divisor svelte-10dw06o" style="margin-left: 5px;">|</span>'),io=A('<span class="name svelte-10dw06o"><span class="acronym svelte-10dw06o"> </span> </span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span>',1),oo=A('<span class="votes svelte-10dw06o"> </span> <span class="percent svelte-10dw06o"> </span> <span class="name svelte-10dw06o"><span class="divisor svelte-10dw06o" style="margin-right: 5px;">|</span> <span class="acronym svelte-10dw06o"> </span> </span>',1),lo=A('<div class="bar-seg svelte-10dw06o"></div>'),co=A('<div class="bar-dual svelte-10dw06o"></div>'),fo=A('<div class="bar-seg svelte-10dw06o"></div>'),vo=A('<div class="bar-dual svelte-10dw06o"></div>'),uo=A('<div class="candidate-percentage-layout duel-compact svelte-10dw06o"><div class="duel-compact-candidates svelte-10dw06o"><!> <div class="duel-compact-info-wrapper svelte-10dw06o"><div class="duel-compact-info-row svelte-10dw06o"><div class="duel-compact-info svelte-10dw06o"><!> <span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span> <!></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div> <div class="duel-compact-info right svelte-10dw06o"><!> <!></div></div> <!></div> <!></div> <!> <!></div>'),ho=A('<p class="meta svelte-10dw06o"><!><!></p>'),po=A('<div class="stack-item svelte-10dw06o"><div class="stack-header svelte-10dw06o"><!> <div class="stack-info svelte-10dw06o"><!> <span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> <span class="percent-label svelte-10dw06o">dos votos válidos</span></span> <div class="bar-track svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <span class="votes stack-votes svelte-10dw06o"> </span> <!></div></div></div>'),_o=A('<div class="candidate-percentage-layout stack svelte-10dw06o"></div>'),go=A('<span class="compact-stat svelte-10dw06o"><span class="compact-stat-text svelte-10dw06o"> </span> <span class="compact-stat-text svelte-10dw06o"> </span></span>'),mo=A('<div class="compact-bottom svelte-10dw06o"><div class="bar-track compact-bar svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <div class="compact-stats svelte-10dw06o"></div></div>'),wo=A('<span class="compact-stat svelte-10dw06o"><span class="compact-stat-text svelte-10dw06o"> </span> <span class="compact-stat-text svelte-10dw06o"> </span></span>'),yo=A('<div class="compact-bottom svelte-10dw06o"><div class="bar-track compact-bar svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <div class="compact-stats svelte-10dw06o"></div></div>'),xo=A("<span> </span>"),bo=A('<span class="compact-sep svelte-10dw06o">|</span>'),So=A("<span> </span>"),Eo=A('<div class="compact-meta svelte-10dw06o"><!> <!> <!></div>'),Co=A('<div class="compact-row svelte-10dw06o"><!> <div class="compact-content svelte-10dw06o"><div class="compact-top svelte-10dw06o"><span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span> <span class="divisor svelte-10dw06o">|</span></span> <span class="percent compact-percent svelte-10dw06o"> </span> <span class="votes compact-votes svelte-10dw06o"> </span></div> <!></div></div> <!> <!>',1),Ao=A('<p class="meta svelte-10dw06o"><!><!></p>'),To=A('<div class="compact-row svelte-10dw06o"><div class="compact-left svelte-10dw06o"><!> <span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div></div> <div class="bar-track svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <!>',1),ko=A('<div class="candidate-percentage-layout compact svelte-10dw06o"><!></div>');const zo={hash:"svelte-10dw06o",code:`.candidate-percentage-layout.svelte-10dw06o {display:flex;flex-direction:column;gap:10px;}
6
+
7
+ /* ─── DUEL ──────────────────────────────── */.duel-candidates.svelte-10dw06o {display:flex;align-items:flex-start;gap:14px;}.duel-center.svelte-10dw06o {flex:1;display:flex;flex-direction:column;gap:10px;min-width:0;}.duel-center.svelte-10dw06o .vote-overview {padding:10px 0;}.duel-infos-row.svelte-10dw06o {display:flex;justify-content:space-between;align-items:flex-start;gap:16px;}.duel-info.svelte-10dw06o {display:flex;flex-direction:column;gap:2px;}.duel-info.right.svelte-10dw06o {text-align:right;}
8
+
9
+ /* ─── STACK ─────────────────────────────── */.stack.svelte-10dw06o {gap:24px;}.stack-item.svelte-10dw06o {display:flex;flex-direction:column;gap:8px;}.stack-header.svelte-10dw06o {display:flex;align-items:center;gap:14px;padding-bottom:12px; /* espaço para a tag do avatar */}.stack-info.svelte-10dw06o {display:flex;flex-direction:column;align-items:flex-start;gap:2px;}.stack-info.svelte-10dw06o .position-tag {margin-bottom:6px;}.stack-votes.svelte-10dw06o {margin-top:5px;margin-bottom:5px;}.percent-label.svelte-10dw06o {font-size:0.75em;font-weight:400;opacity:0.65;}
10
+
11
+ /* ─── DUEL-COMPACT ─────────────────────── */.duel-compact-candidates.svelte-10dw06o {display:flex;align-items:center;gap:10px;}.duel-compact-info-wrapper.svelte-10dw06o {flex:1;display:flex;flex-direction:column;gap:8px;min-width:0;}.duel-compact-info-row.svelte-10dw06o {display:flex;justify-content:space-between;align-items:center;gap:8px;}.duel-compact-info.svelte-10dw06o {display:flex;min-width:0;}.duel-compact-info.right.svelte-10dw06o {text-align:right;}.duel-compact-info.svelte-10dw06o .position-tag {align-self:flex-start;margin-bottom:4px;}.duel-compact-info.right.svelte-10dw06o .position-tag {align-self:flex-end;}.duel-compact.svelte-10dw06o .vote-overview {padding:10px 0;}
12
+
13
+ /* ─── COMPACT WITH OVERVIEW ────────────── */.compact-row.svelte-10dw06o {display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--sevn-color-neutral);padding-bottom:15px;}.compact-content.svelte-10dw06o {flex:1;display:flex;flex-direction:column;min-width:0;}.compact-top.svelte-10dw06o {display:flex;align-items:baseline;gap:8px;}.compact-bottom.svelte-10dw06o {display:flex;align-items:center;gap:12px;}.compact-bar.svelte-10dw06o {flex:1;min-width:60px;width:auto;}.compact-stats.svelte-10dw06o {display:flex;align-items:center;gap:14px;flex-shrink:0;}.compact-stat.svelte-10dw06o {display:flex;align-items:center;gap:4px;font-size:0.75rem;color:var(--sevn-color-tertiary);}.compact-stat-text.svelte-10dw06o {opacity:50%;font-weight:600;}.compact-meta.svelte-10dw06o {display:none;}
14
+
15
+ /* ─── COMPACT ───────────────────────────── */.compact-row.svelte-10dw06o {display:flex;align-items:center;justify-content:space-between;gap:8px;}.compact-left.svelte-10dw06o {display:flex;align-items:center;gap:8px;min-width:0;}
16
+
17
+ /* ─── BARRAS ────────────────────────────── */.bar-dual.svelte-10dw06o {position:relative;height:var(--bar-height);border-radius:999px;overflow:hidden;background-color:#e0e0e0;}.bar-seg.svelte-10dw06o {position:absolute;top:0;left:0;height:100%;border-radius:999px;}.bar-track.svelte-10dw06o {width:100%;height:var(--bar-height);background-color:#e0e0e0;border-radius:999px;overflow:hidden;margin-top:5px;}.bar-fill.svelte-10dw06o {height:100%;border-radius:999px;}
18
+
19
+ /* ─── TIPOGRAFIA ────────────────────────── */.name.svelte-10dw06o {font-size:var(--name-size);color:var(--sevn-color-tertiary);line-height:1.3;white-space:nowrap;}.acronym.svelte-10dw06o {font-size:var(--name-size);font-weight:400;opacity:0.55;margin-left:4px;}.divisor.svelte-10dw06o {opacity:0.2;}.percent.svelte-10dw06o {font-size:var(--percent-size);font-weight:700;color:var(--sevn-color-tertiary);line-height:1.1;white-space:nowrap;}.votes.svelte-10dw06o {font-size:var(--votes-size);color:var(--sevn-color-tertiary);font-weight:600;opacity:0.65;white-space:nowrap;opacity:50%;}
20
+
21
+ /* ─── META ──────────────────────────────── */.meta.svelte-10dw06o {font-size:0.72rem;color:var(--sevn-color-tertiary);opacity:0.55;}
22
+
23
+ /* ─── RESPONSIVO MOBILE ─────────────────── */
24
+ @media (max-width: 480px) {
25
+ /* ── duel ── */.duel-candidates.svelte-10dw06o {gap:8px;}.duel-info.svelte-10dw06o {min-width:0;}.name.svelte-10dw06o {white-space:normal;word-break:break-word;}.percent.svelte-10dw06o {font-size:calc(var(--percent-size) * 0.8);}.votes.svelte-10dw06o {white-space:normal;}
26
+
27
+ /* ── duel-compact ── */.duel-compact-candidates.svelte-10dw06o {gap:6px;}.duel-compact-info-wrapper.svelte-10dw06o {gap:6px;}.duel-compact-info.svelte-10dw06o .name:where(.svelte-10dw06o),
28
+ .duel-compact-info.svelte-10dw06o .percent:where(.svelte-10dw06o),
29
+ .duel-compact-info.svelte-10dw06o .votes:where(.svelte-10dw06o) {white-space:normal;word-break:break-word;}.duel-compact.svelte-10dw06o .vote-overview {padding:3px;font-size:0.7rem;gap:8px;}.duel-compact.svelte-10dw06o .vote-overview .vote-overview-stats {gap:8px;}
30
+
31
+ /* ── compact with overview ── */.compact-row.svelte-10dw06o {align-items:flex-start;}.compact-top.svelte-10dw06o {flex-direction:column;align-items:flex-start;gap:2px;}.compact-percent.svelte-10dw06o {font-size:1.15rem;font-weight:800 !important;color:var(--sevn-color-tertiary);line-height:1;}.compact-votes.svelte-10dw06o {font-size:0.675rem;margin-top:2px;}.compact-bottom.svelte-10dw06o {flex-direction:column;align-items:stretch;gap:6px;}.compact-bar.svelte-10dw06o {flex:none;width:100%;height:8px;}.compact-stats.svelte-10dw06o {flex-wrap:wrap;gap:6px 10px;}.compact-meta.svelte-10dw06o {display:flex;align-items:center;gap:0.4rem;font-size:0.75rem;color:var(--sevn-color-tertiary);opacity:0.6;flex-wrap:wrap;opacity:50%;}.compact-sep.svelte-10dw06o {opacity:0.4;}
32
+ }`};function Mo(t,e){Mn(e,!0),rn(t,zo);let n=oe(e,"layout",3,"duel"),r=oe(e,"duelCompactInfoDirection",3,"column"),a=oe(e,"overviewAlign",3,"start"),s=oe(e,"showPosition",3,!1);const i=(B,S)=>no(B.position,S),o=B=>e.positionTagColor??B.color,l={duel:{percentSize:"1.75rem",nameSize:"0.875rem",votesSize:"0.75rem",avatarSize:"lg",barHeight:"10px"},"duel-compact":{percentSize:"1rem",nameSize:"0.8rem",votesSize:"0.75rem",avatarSize:"sm",barHeight:"12px"},stack:{percentSize:"1.5rem",nameSize:"0.875rem",votesSize:"0.75rem",avatarSize:"lg",barHeight:"10px"},compact:{percentSize:"0.875rem",nameSize:"0.8rem",votesSize:"0.75rem",avatarSize:"sm",barHeight:"8px"}},c=N(()=>l[n()]??l.duel),h=N(()=>e.percentSize??f(c).percentSize),p=N(()=>e.nameSize??f(c).nameSize),v=N(()=>e.votesSize??f(c).votesSize),g=N(()=>e.avatarSize??f(c).avatarSize),u=N(()=>e.barHeight??f(c).barHeight),E=N(()=>!!e.overviewData?.length),y=N(()=>!!e.date||!!e.font);let U=_e(Ct(ct?window.innerWidth<=480:!1));or(()=>{if(!ct)return;const B=window.matchMedia("(max-width: 480px)");Q(U,B.matches,!0);const S=P=>{Q(U,P.matches,!0)};return B.addEventListener("change",S),()=>B.removeEventListener("change",S)});function w(B){return B.toLocaleString("pt-BR")}function R(B){return B.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})+"%"}var j=bi(),de=_n(j);{var rt=B=>{var S=ao(),P=_(S),T=_(P);{let L=N(()=>e.candidates[0].avatar??"man");Ut(T,{get name(){return e.candidates[0].name},get photoUrl(){return e.candidates[0].photoUrl},get avatar(){return f(L)},get avatarColor(){return e.candidates[0].color},get size(){return f(g)},get tag(){return e.candidates[0].avatarTag},get tagColor(){return e.candidates[0].avatarTagColor}})}var ue=m(T,2),he=_(ue),we=_(he),ye=_(we),Ye=_(ye),Oe=m(Ye),Fe=_(Oe),xe=m(ye,2),Ze=_(xe),wt=m(xe,2),at=_(wt),Pe=m(we,2),st=_(Pe),Ge=_(st),it=m(Ge),Je=_(it),Qe=m(st,2),ot=_(Qe),pe=m(Qe,2),Z=_(pe),ce=m(he,2);Ht(ce,21,()=>e.candidates,Lt,(L,q,le)=>{var be=ro();I(()=>$(be,`width:calc(${f(q).percent??""}% - 2px);${le===0?"left:0;":"left:auto;right:0;"}background-color:${f(q).color??""};`)),b(L,be)});var K=m(ce,2);{var te=L=>{Ua(L,{get data(){return e.overviewData},get date(){return e.date},get font(){return e.font},get align(){return a()}})};O(K,L=>{(f(E)||f(y))&&L(te)})}var fe=m(ue,2);{let L=N(()=>e.candidates[1].avatar??"man");Ut(fe,{get name(){return e.candidates[1].name},get photoUrl(){return e.candidates[1].photoUrl},get avatar(){return f(L)},get avatarColor(){return e.candidates[1].color},get size(){return f(g)},get tag(){return e.candidates[1].avatarTag},get tagColor(){return e.candidates[1].avatarTagColor}})}I((L,q,le,be)=>{$(S,`--percent-size:${f(h)??""};--name-size:${f(p)??""};--votes-size:${f(v)??""};--bar-height:${f(u)??""};`),x(Ye,`${e.candidates[0].name??""} `),x(Fe,e.candidates[0].acronym),x(Ze,L),x(at,`${q??""} votos`),x(Ge,`${e.candidates[1].name??""} `),x(Je,e.candidates[1].acronym),x(ot,le),x(Z,`${be??""} votos`)},[()=>R(e.candidates[0].percent),()=>w(e.candidates[0].votes),()=>R(e.candidates[1].percent),()=>w(e.candidates[1].votes)]),b(B,S)},ve=B=>{var S=uo(),P=_(S),T=_(P);{let C=N(()=>e.candidates[0].avatar??"man");Ut(T,{get name(){return e.candidates[0].name},get photoUrl(){return e.candidates[0].photoUrl},get avatar(){return f(C)},get avatarColor(){return e.candidates[0].color},get size(){return f(g)},get tag(){return e.candidates[0].avatarTag},get tagColor(){return e.candidates[0].avatarTagColor}})}var ue=m(T,2),he=_(ue),we=_(he),ye=_(we);{var Ye=C=>{{let z=N(()=>i(e.candidates[0],0)),W=N(()=>o(e.candidates[0]));xn(C,{get label(){return f(z)},get color(){return f(W)},class:"position-tag"})}};O(ye,C=>{s()&&C(Ye)})}var Oe=m(ye,2),Fe=_(Oe),xe=m(Fe),Ze=_(xe),wt=m(xe,2);{var at=C=>{var z=so();b(C,z)};O(wt,C=>{f(U)||C(at)})}var Pe=m(Oe,2),st=_(Pe),Ge=m(Pe,2),it=_(Ge),Je=m(we,2),Qe=_(Je);{var ot=C=>{{let z=N(()=>i(e.candidates[1],1)),W=N(()=>o(e.candidates[1]));xn(C,{get label(){return f(z)},get color(){return f(W)},class:"position-tag"})}};O(Qe,C=>{s()&&C(ot)})}var pe=m(Qe,2);{var Z=C=>{var z=io(),W=_n(z),ne=_(W),Le=_(ne),yt=m(ne),qn=m(W,2),Bn=_(qn),xr=m(qn,2),br=_(xr);I((Sr,Er)=>{x(Le,e.candidates[1].acronym),x(yt,` ${e.candidates[1].name??""}`),x(Bn,Sr),x(br,`${Er??""} votos`)},[()=>R(e.candidates[1].percent),()=>w(e.candidates[1].votes)]),b(C,z)},ce=C=>{var z=oo(),W=_n(z),ne=_(W),Le=m(W,2),yt=_(Le),qn=m(Le,2),Bn=m(_(qn),2),xr=_(Bn),br=m(Bn);I((Sr,Er)=>{x(ne,`${Sr??""} votos`),x(yt,Er),x(xr,e.candidates[1].acronym),x(br,` ${e.candidates[1].name??""}`)},[()=>w(e.candidates[1].votes),()=>R(e.candidates[1].percent)]),b(C,z)};O(pe,C=>{f(U)?C(Z):C(ce,!1)})}var K=m(he,2);{var te=C=>{var z=co();Ht(z,21,()=>e.candidates,Lt,(W,ne,Le)=>{var yt=lo();I(()=>$(yt,`width:calc(${f(ne).percent??""}% - 2px);${Le===0?"left:0;":"left:auto;right:0;"}background-color:${f(ne).color??""};`)),b(W,yt)}),b(C,z)};O(K,C=>{r()==="row"&&C(te)})}var fe=m(ue,2);{let C=N(()=>e.candidates[1].avatar??"man");Ut(fe,{get name(){return e.candidates[1].name},get photoUrl(){return e.candidates[1].photoUrl},get avatar(){return f(C)},get avatarColor(){return e.candidates[1].color},get size(){return f(g)},get tag(){return e.candidates[1].avatarTag},get tagColor(){return e.candidates[1].avatarTagColor}})}var L=m(P,2);{var q=C=>{var z=vo();Ht(z,21,()=>e.candidates,Lt,(W,ne,Le)=>{var yt=fo();I(()=>$(yt,`width:calc(${f(ne).percent??""}% - 2px);${Le===0?"left:0;":"left:auto;right:0;"}background-color:${f(ne).color??""};`)),b(W,yt)}),b(C,z)};O(L,C=>{r()==="column"&&C(q)})}var le=m(L,2);{var be=C=>{Ua(C,{get data(){return e.overviewData},get date(){return e.date},get font(){return e.font},borderTop:!0,get align(){return a()}})};O(le,C=>{(f(E)||f(y))&&C(be)})}I((C,z)=>{$(S,`--percent-size:${f(h)??""};--name-size:${f(p)??""};--votes-size:${f(v)??""};--bar-height:${f(u)??""};`),$(we,`flex-direction:${r()??""}; gap: ${r()==="row"?"10px":"2px"}`),x(Fe,`${e.candidates[0].name??""} `),x(Ze,e.candidates[0].acronym),x(st,C),x(it,`${z??""} votos`),$(Je,`flex-direction:${r()??""}; gap: ${r()==="row"?"10px":"2px"}`)},[()=>R(e.candidates[0].percent),()=>w(e.candidates[0].votes)]),b(B,S)},Ie=B=>{var S=_o();Ht(S,21,()=>e.candidates,Lt,(P,T,ue)=>{var he=po(),we=_(he),ye=_(we);{let Z=N(()=>f(T).avatar??"man");Ut(ye,{get name(){return f(T).name},get photoUrl(){return f(T).photoUrl},get avatar(){return f(Z)},get avatarColor(){return f(T).color},get size(){return f(g)},get tag(){return f(T).avatarTag},get tagColor(){return f(T).avatarTagColor}})}var Ye=m(ye,2),Oe=_(Ye);{var Fe=Z=>{{let ce=N(()=>i(f(T),ue)),K=N(()=>o(f(T)));xn(Z,{get label(){return f(ce)},get color(){return f(K)},class:"position-tag"})}};O(Oe,Z=>{s()&&Z(Fe)})}var xe=m(Oe,2),Ze=_(xe),wt=m(Ze),at=_(wt),Pe=m(xe,2),st=_(Pe),Ge=m(Pe,2),it=_(Ge),Je=m(Ge,2),Qe=_(Je),ot=m(Je,2);{var pe=Z=>{var ce=ho(),K=_(ce);{var te=q=>{var le=Ln();I(()=>x(le,`Atualizado em ${e.date??""} `)),b(q,le)};O(K,q=>{e.date&&q(te)})}var fe=m(K);{var L=q=>{var le=Ln();I(()=>x(le,`| Fonte ${e.font??""}`)),b(q,le)};O(fe,q=>{e.font&&q(L)})}b(Z,ce)};O(ot,Z=>{ue===e.candidates.length-1&&f(y)&&Z(pe)})}I((Z,ce)=>{x(Ze,`${f(T).name??""} `),x(at,f(T).acronym),x(st,`${Z??""} `),$(it,`width:${f(T).percent??""}%;background-color:${f(T).color??""};`),x(Qe,`${ce??""} votos`)},[()=>R(f(T).percent),()=>w(f(T).votes)]),b(P,he)}),I(()=>$(S,`--percent-size:${f(h)??""};--name-size:${f(p)??""};--votes-size:${f(v)??""};--bar-height:${f(u)??""};`)),b(B,S)},An=B=>{var S=ko(),P=_(S);{var T=he=>{var we=Co(),ye=_n(we),Ye=_(ye);{let K=N(()=>e.candidates[0].avatar??"man");Ut(Ye,{get name(){return e.candidates[0].name},get photoUrl(){return e.candidates[0].photoUrl},get avatar(){return f(K)},get avatarColor(){return e.candidates[0].color},get size(){return f(g)},get tag(){return e.candidates[0].avatarTag},get tagColor(){return e.candidates[0].avatarTagColor}})}var Oe=m(Ye,2),Fe=_(Oe),xe=_(Fe),Ze=_(xe),wt=m(Ze),at=_(wt),Pe=m(xe,2),st=_(Pe),Ge=m(Pe,2),it=_(Ge),Je=m(Fe,2);{var Qe=K=>{var te=mo(),fe=_(te),L=_(fe),q=m(fe,2);Ht(q,21,()=>e.overviewData,Lt,(le,be)=>{var C=go(),z=_(C),W=_(z),ne=m(z,2),Le=_(ne);I(()=>{x(W,f(be).text),x(Le,f(be).value)}),b(le,C)}),I(()=>$(L,`width:${e.candidates[0].percent??""}%;background-color:${e.candidates[0].color??""};`)),b(K,te)};O(Je,K=>{f(U)||K(Qe)})}var ot=m(ye,2);{var pe=K=>{var te=yo(),fe=_(te),L=_(fe),q=m(fe,2);Ht(q,21,()=>e.overviewData,Lt,(le,be)=>{var C=wo(),z=_(C),W=_(z),ne=m(z,2),Le=_(ne);I(()=>{x(W,f(be).text),x(Le,f(be).value)}),b(le,C)}),I(()=>$(L,`width:${e.candidates[0].percent??""}%;background-color:${e.candidates[0].color??""};`)),b(K,te)};O(ot,K=>{f(U)&&K(pe)})}var Z=m(ot,2);{var ce=K=>{var te=Eo(),fe=_(te);{var L=z=>{var W=xo(),ne=_(W);I(()=>x(ne,`Atualizado em ${e.date??""}`)),b(z,W)};O(fe,z=>{e.date&&z(L)})}var q=m(fe,2);{var le=z=>{var W=bo();b(z,W)};O(q,z=>{e.date&&e.font&&z(le)})}var be=m(q,2);{var C=z=>{var W=So(),ne=_(W);I(()=>x(ne,`Fonte ${e.font??""}`)),b(z,W)};O(be,z=>{e.font&&z(C)})}b(K,te)};O(Z,K=>{f(y)&&K(ce)})}I((K,te)=>{x(Ze,`${e.candidates[0].name??""} `),x(at,e.candidates[0].acronym),x(st,K),x(it,`${te??""} votos`)},[()=>R(e.candidates[0].percent),()=>w(e.candidates[0].votes)]),b(he,we)},ue=he=>{var we=To(),ye=_n(we),Ye=_(ye),Oe=_(Ye);{let pe=N(()=>e.candidates[0].avatar??"man");Ut(Oe,{get name(){return e.candidates[0].name},get photoUrl(){return e.candidates[0].photoUrl},get avatar(){return f(pe)},get avatarColor(){return e.candidates[0].color},get size(){return f(g)},get tag(){return e.candidates[0].avatarTag},get tagColor(){return e.candidates[0].avatarTagColor}})}var Fe=m(Oe,2),xe=_(Fe),Ze=m(xe),wt=_(Ze),at=m(Fe,2),Pe=_(at),st=m(at,2),Ge=_(st),it=m(ye,2),Je=_(it),Qe=m(it,2);{var ot=pe=>{var Z=Ao(),ce=_(Z);{var K=L=>{var q=Ln();I(()=>x(q,`Atualizado em ${e.date??""}`)),b(L,q)};O(ce,L=>{e.date&&L(K)})}var te=m(ce);{var fe=L=>{var q=Ln();I(()=>x(q,`| Fonte ${e.font??""}`)),b(L,q)};O(te,L=>{e.font&&L(fe)})}b(pe,Z)};O(Qe,pe=>{f(y)&&pe(ot)})}I((pe,Z)=>{x(xe,`${e.candidates[0].name??""} `),x(wt,e.candidates[0].acronym),x(Pe,pe),x(Ge,`${Z??""} votos`),$(Je,`width:${e.candidates[0].percent??""}%;background-color:${e.candidates[0].color??""};`)},[()=>R(e.candidates[0].percent),()=>w(e.candidates[0].votes)]),b(he,we)};O(P,he=>{f(E)?he(T):he(ue,!1)})}I(()=>$(S,`--percent-size:${f(h)??""};--name-size:${f(p)??""};--votes-size:${f(v)??""};--bar-height:${f(u)??""};--bar-color:${e.candidates[0].color??""};`)),b(B,S)};O(de,B=>{n()==="duel"?B(rt):n()==="duel-compact"?B(ve,1):n()==="stack"?B(Ie,2):n()==="compact"&&B(An,3)})}b(t,j),Dn()}var Do=A('<span class="header-tag-above svelte-1xm1ks6"><!></span>'),No=A('<span class="header-tag-inline svelte-1xm1ks6"><!></span>'),Ro=A('<p class="header-description svelte-1xm1ks6"> </p>'),Io=A('<header class="header svelte-1xm1ks6"><!> <div class="header-title-row svelte-1xm1ks6"><h1 class="header-title svelte-1xm1ks6"> </h1> <!></div> <!></header>');const Oo={hash:"svelte-1xm1ks6",code:`.header.svelte-1xm1ks6 {display:flex;flex-direction:column;gap:4px;}.header-tag-inline.svelte-1xm1ks6 {display:none;}.header-title-row.svelte-1xm1ks6 {display:flex;align-items:center;gap:10px;}.header-title.svelte-1xm1ks6 {font-size:var(--header-title-font-size);font-weight:var(--header-title-font-weight);color:var(--sevn-color-tertiary);line-height:1.15;}.header-description.svelte-1xm1ks6 {font-size:var(--header-description-font-size);color:var(--sevn-color-tertiary);}
33
+
34
+ @media (max-width: 767px) {.header-title.svelte-1xm1ks6 {font-size:calc(var(--header-title-font-size) * 0.75);max-width:60%;}.header-description.svelte-1xm1ks6 {font-size:calc(var(--header-description-font-size) * 0.9);}
35
+ }
36
+
37
+ @media (min-width: 768px) {.header-tag-above.svelte-1xm1ks6 {display:none;}.header-tag-inline.svelte-1xm1ks6 {display:inline-flex;}
38
+ }`};function Fo(t,e){rn(t,Oo);var n=Io(),r=_(n);{var a=v=>{var g=Do(),u=_(g);xn(u,{get label(){return e.tag},get color(){return e.tagColor}}),b(v,g)};O(r,v=>{e.tag&&v(a)})}var s=m(r,2),i=_(s),o=_(i),l=m(i,2);{var c=v=>{var g=No(),u=_(g);xn(u,{get label(){return e.tag},get color(){return e.tagColor}}),b(v,g)};O(l,v=>{e.tag&&v(c)})}var h=m(s,2);{var p=v=>{var g=Ro(),u=_(g);I(()=>x(u,e.description)),b(v,g)};O(h,v=>{e.description&&v(p)})}I(()=>{$(n,`
39
+ --header-title-font-size: ${e.titleFontSize??"1.75rem"??""};
40
+ --header-title-font-weight: ${e.titleFontWeight??700??""};
41
+ --header-description-font-size: ${e.descriptionFontSize??"0.875rem"??""};
42
+ `),x(o,e.title)}),b(t,n)}class Va{constructor(e={}){var n,r,a;this.inflight=new Map,this.tick=0,this.storageKey=(n=e.storageKey)!==null&&n!==void 0?n:"reqcache",this.maxEntries=(r=e.maxEntries)!==null&&r!==void 0?r:100,this.storage=(a=e.storage)!==null&&a!==void 0?a:Lo()}async getFetch(e,n,r={}){const a=Date.now(),s=this.readAll(),i=s.find(c=>c.rota===e);if(i&&a<i.expiresAt)return i.lastAccess=this.nextAccess(),this.writeAll(s),i.data;const o=this.inflight.get(e);if(o)return o;const l=this.revalidate(e,n,r,i??null).finally(()=>this.inflight.delete(e));return this.inflight.set(e,l),l}invalidate(e){const n=this.readAll().filter(r=>r.rota!==e);this.writeAll(n)}cleanup(e=3600){const n=Date.now()-e*1e3,r=this.readAll(),a=r.filter(s=>s.expiresAt>n);return this.writeAll(a),r.length-a.length}clear(){if(this.storage)try{this.storage.removeItem(this.storageKey)}catch{}}nextAccess(){return this.tick=Math.max(Date.now(),this.tick+1),this.tick}async revalidate(e,n,r,a){var s,i;const o=(s=r.fetcher)!==null&&s!==void 0?s:fetch;let l;try{const h=await o(e,r.fetchOptions);if(!h.ok)throw new Error(`HTTP ${h.status} ao buscar ${e}`);l=await h.json()}catch(h){if(a&&(!((i=r.staleOnError)!==null&&i!==void 0)||i))return this.upsert({...a,expiresAt:Date.now()+n,lastAccess:this.nextAccess()}),a.data;throw h}if(a&&r.monotonicKey){const h=ja(a.data,r.monotonicKey),p=ja(l,r.monotonicKey);if(typeof h=="number"&&typeof p=="number"&&p<=h)return this.upsert({...a,expiresAt:Date.now()+n,lastAccess:this.nextAccess()}),a.data}const c=Date.now();return this.upsert({rota:e,data:l,createdAt:c,expiresAt:c+n,lastAccess:this.nextAccess()}),l}upsert(e){const n=this.readAll().filter(r=>r.rota!==e.rota);n.push(e),this.evictIfNeeded(n),this.writeAll(n)}evictIfNeeded(e){for(;e.length>this.maxEntries;){let n=0;for(let r=1;r<e.length;r++)e[r].lastAccess<e[n].lastAccess&&(n=r);e.splice(n,1)}}readAll(){if(!this.storage)return[];try{const e=this.storage.getItem(this.storageKey);if(!e)return[];const n=JSON.parse(e);return Array.isArray(n)?n:[]}catch{return[]}}writeAll(e){if(this.storage)try{this.storage.setItem(this.storageKey,JSON.stringify(e))}catch(n){if(Po(n)&&e.length>0){const r=[...e].sort((a,s)=>a.lastAccess-s.lastAccess);r.splice(0,Math.ceil(r.length/2));try{this.storage.setItem(this.storageKey,JSON.stringify(r))}catch{}}}}}function ja(t,e){return e.split(".").reduce((n,r)=>{if(n&&typeof n=="object"&&r in n)return n[r]},t)}function Po(t){return t instanceof Error&&(t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")}function Lo(){try{if(typeof localStorage<"u"){const t="__reqcache_probe__";return localStorage.setItem(t,"1"),localStorage.removeItem(t),localStorage}}catch{}return null}new Va;const Ho=300,pr=new Map;function _r(){try{return typeof window<"u"&&typeof localStorage<"u"}catch{return!1}}const Uo={getItem(t){return _r()?localStorage.getItem(t):pr.get(t)??null},setItem(t,e){if(_r())try{localStorage.setItem(t,e)}catch{console.warn("[api] Cota do localStorage excedida, ignorando escrita")}else pr.set(t,e)},removeItem(t){_r()?localStorage.removeItem(t):pr.delete(t)}};let gr=null;function Vo(){if(!gr){const{storageKey:t,maxEntries:e}=vn().cache;gr=new Va({storage:Uo,storageKey:t,maxEntries:e})}return gr}async function jo(t,e,n=Ho,r){const[a]=Or(),s=t.replace(/^\/+/,""),i=new URL(s,`${a.replace(/\/+$/,"")}/`);let o;try{o=await Vo().getFetch(i.toString(),n*1e3,{monotonicKey:r,fetcher:rs})}catch(l){throw l instanceof Error&&/^HTTP 404 /.test(l.message)?new Error("Dados ainda não publicados"):l}if(o&&typeof o=="object"&&o.published===!1)throw new Error(o.reason??"Dados ainda não publicados");return o}function qo(t,e,n,r){return jo(`v1/elections/${t}/r${n}/${e}/br/timeline.json`)}const Bo=new Set(["da","de","do","das","dos","e"]);function Ko(t){return t.toLowerCase().split(" ").map((e,n)=>n>0&&Bo.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Wo(t){if(typeof t=="string"){const n=t.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?/);if(n)return new Date(Date.UTC(Number(n[1]),Number(n[2])-1,Number(n[3]),Number(n[4]),Number(n[5]),Number(n[6]??0)))}const e=new Date(t);return Number.isNaN(e.getTime())?null:e}function mr(t){if(t==null||t==="")return"";const e=Wo(t);if(!e)return"";const n=String(e.getUTCDate()).padStart(2,"0"),r=String(e.getUTCMonth()+1).padStart(2,"0"),a=e.getUTCFullYear(),s=String(e.getUTCHours()).padStart(2,"0"),i=String(e.getUTCMinutes()).padStart(2,"0");return`${n}/${r}/${a} às ${s}h${i}`}function Yo(t,e="TSE"){const n=mr(t);return n?`Atualizado em ${n} | Fonte ${e}`:`Fonte ${e}`}const Zo=mr("2022-10-31T00:18:00Z");Yo("2022-10-31T00:18:00Z");var Go=A('<p class="sevn_top_dispute__status svelte-1bdyfkj">Carregando...</p>'),Jo=A('<p class="sevn_top_dispute__status sevn_top_dispute__status--error svelte-1bdyfkj"> </p>'),Qo=A('<p class="sevn_top_dispute__status svelte-1bdyfkj">Resultado ainda não publicado para este recorte.</p>'),Xo=A("<div><!> <!></div>");const $o={hash:"svelte-1bdyfkj",code:`.sevn_top_dispute.svelte-1bdyfkj {display:flex;flex-direction:column;gap:24px;}.sevn_top_dispute--raw.svelte-1bdyfkj,
43
+ .sevn_top_dispute--raw.svelte-1bdyfkj :where(.svelte-1bdyfkj) {all:revert;}.sevn_top_dispute__status.svelte-1bdyfkj {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_top_dispute__status--error.svelte-1bdyfkj {color:#e11d48;}`};function el(t,e){Mn(e,!0),rn(t,$o);let n=oe(e,"mock",3,!1),r=oe(e,"rawStyle",3,!1),a=oe(e,"year",3,2026),s=oe(e,"header",19,()=>({title:"Disputa no topo",tag:"PRESIDENTE",tagColor:"var(--sevn-color-tertiary, #1a1a2e)"})),i=_e(null),o=_e(!1),l=_e(null);or(()=>{!ct||n()||(Q(o,!0),Q(l,null),Q(i,null),qo(a(),"president",1).then(S=>{Q(i,S,!0),Q(o,!1)}).catch(S=>{console.error("Failed to fetch timeline:",S),Q(l,S instanceof Error?S.message:"Não foi possível carregar os resultados.",!0),Q(o,!1)}))});const c=[{name:"Candidato A",acronym:"ABC",percent:50.9,votes:59276176,color:"var(--sevn-color-primary)",avatar:"man"},{name:"Candidato B",acronym:"DEF",percent:49.1,votes:59276176,color:"var(--sevn-color-secondary)",avatar:"man"}],h=[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}],p=N(()=>!n()&&f(i)?.snapshots&&Array.isArray(f(i).snapshots)?f(i).snapshots[f(i).snapshots.length-1]:null),v=N(()=>n()?c:!f(p)?.results?.length||!f(i)?.candidates_meta||!Array.isArray(f(i).candidates_meta)?[]:[...f(p).results].sort((P,T)=>T.valid_votes_pct-P.valid_votes_pct).slice(0,2).map(P=>{const T=f(i).candidates_meta.find(ue=>ue.candidate_id===P.candidate_id);return{name:T?.name?Ko(T.name):"Unknown",acronym:T?.party_abbr||"",percent:P.valid_votes_pct,votes:P.votes,color:T?.party_color||"var(--sevn-color-primary)",photoUrl:T?.photo_url,avatar:"man"}})),g=N(()=>f(p)?.ballots_counted_pct||0),u=N(()=>n()?"X% das urnas apuradas":f(g)?`${f(g)}% das urnas apuradas`:""),E=N(()=>s().description??f(u)),y=N(()=>{if(n())return h;if(!f(p)?.overview)return[];const{valid_votes:S,null_votes:P,blank_votes:T}=f(p).overview,ue=S+P+T;return[{text:"Nulos",value:`${(P/ue*100).toFixed(2)}%`},{text:"Brancos",value:`${(T/ue*100).toFixed(2)}%`},{text:"Válidos",value:`${S.toLocaleString("pt-BR")} votos`}]}),U=N(()=>n()?Zo:mr(f(p)?.timestamp));let w=_e(Ct(ct?window.innerWidth<=480:!1));or(()=>{if(!ct)return;const S=window.matchMedia("(max-width: 480px)");Q(w,S.matches,!0);const P=T=>{Q(w,T.matches,!0)};return S.addEventListener("change",P),()=>S.removeEventListener("change",P)});var R=Xo();let j;var de=_(R);Fo(de,{get title(){return s().title},get description(){return f(E)},get tag(){return s().tag},get tagColor(){return s().tagColor}});var rt=m(de,2);{var ve=S=>{var P=Go();b(S,P)},Ie=S=>{var P=Jo(),T=_(P);I(()=>x(T,f(l))),b(S,P)},An=S=>{var P=Qo();b(S,P)},B=S=>{{let P=N(()=>f(w)?"column":"row"),T=N(()=>f(w)?"start":"end");Mo(S,{layout:"duel-compact",get duelCompactInfoDirection(){return f(P)},get overviewAlign(){return f(T)},get candidates(){return f(v)},get overviewData(){return f(y)},get date(){return f(U)},font:"TSE"})}};O(rt,S=>{f(o)?S(ve):f(l)?S(Ie,1):!n()&&f(v).length<2?S(An,2):S(B,!1)})}I(()=>j=hr(R,1,"sevn_top_dispute svelte-1bdyfkj",null,j,{"sevn_top_dispute--raw":r()})),b(t,R),Dn()}const qa=Pi(el,"TopDispute");return typeof window<"u"&&(window.SevnElections=Object.assign(window.SevnElections||{},{Core:ss,TopDispute:qa}),Hi()),qa}));
@@ -0,0 +1,76 @@
1
+ (function(U,V){typeof exports=="object"&&typeof module<"u"?module.exports=V():typeof define=="function"&&define.amd?define(V):(U=typeof globalThis<"u"?globalThis:U||self,U.VoteComparisonByRound=V())})(this,(function(){"use strict";var ol=Object.defineProperty;var Ya=U=>{throw TypeError(U)};var il=(U,V,W)=>V in U?ol(U,V,{enumerable:!0,configurable:!0,writable:!0,value:W}):U[V]=W;var qe=(U,V,W)=>il(U,typeof V!="symbol"?V+"":V,W),gr=(U,V,W)=>V.has(U)||Ya("Cannot "+W);var v=(U,V,W)=>(gr(U,V,"read from private field"),W?W.call(U):V.get(U)),L=(U,V,W)=>V.has(U)?Ya("Cannot add the same private member more than once"):V instanceof WeakSet?V.add(U):V.set(U,W),T=(U,V,W,Mt)=>(gr(U,V,"write to private field"),Mt?Mt.call(U,W):V.set(U,W),W),re=(U,V,W)=>(gr(U,V,"access private method"),W);var Ht,Vt,Ct,Bt,dn,fn,kt,Xe,qt,me,mr,br,wr,Wa,Oe,hr,$e,St,je,Ue,be,He,et,zt,lt,Kt,Gt,Zt,tt,Ln,ee,sl,ll,yr,Dn,In,xr,De,Ve,we,At,un,vn,Pn,Za;class U extends Error{constructor(){super('Chave de acesso não configurada. Chame Core.applyKey("sua-chave") antes de montar o componente, ou carregue o script com ?cid=sua-chave.'),this.name="SevnKeyMissingError"}}class V extends Error{constructor(t,n){super(`Não foi possível contatar a API para ${t}.`),this.name="SevnNetworkError",this.cause=n}}const W="__sevnElectionsState_v1__",Mt=globalThis;function Er(e){return Mt[W]||(Mt[W]={config:e(),transport:{activeIndex:0,pinnedAt:0}}),Mt[W]}const Ja="https://failover-api.sevntech.com",Qa=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Cr(){return{key:null,apiHosts:[],assetsBase:"https://cdn.sevnelections.com/static",assetsVersion:"v1",cache:{storageKey:"election_cache",maxEntries:200},request:{timeoutMs:8e3,retriesPerHost:3,retryDelayMs:300,stickyWindowMs:12e4},theme:null}}const Xa=Cr;function Rt(){return Er(Cr)}function $a(e){return[`https://${e}-api1.sevnelections.com`,`https://${e}-api2.sevnelections.com`,Ja]}function Fn(e){if(typeof e!="string"||!Qa.test(e))throw new Error(`[sevn] Chave inválida: ${JSON.stringify(e)}. Use apenas letras, números e hífen (a chave vira subdomínio da API).`);const t=Rt();t.config.key=e,t.config.apiHosts=$a(e)}function kr(e){const{cache:t,request:n,key:r,...a}=e,o=Rt();o.config={...o.config,...a,cache:{...o.config.cache,...t},request:{...o.config.request,...n}},r&&(Fn(r),a.apiHosts&&(o.config.apiHosts=a.apiHosts))}function Qt(){return Rt().config}function Sr(){return Rt().config.apiHosts.length>0}function zr(){if(!Sr())throw new U;return Rt().config.apiHosts}function eo(e){const{assetsBase:t,assetsVersion:n}=Rt().config,r=t.replace(/\/+$/,""),a=String(e).replace(/^\/+/,"");return`${r}/${n}/${a}`}const to=':root{--sevn-color-primary: #0a3e27;--sevn-color-secondary: #c38214;--sevn-color-tertiary: #1c1c1c;--sevn-color-red: #da0000;--sevn-color-yellow: #e4a615;--sevn-color-green: #1e6704;--sevn-color-blue: #0e2a41;--sevn-color-neutral: #f2f2f7;--sevn-color-text-secondary: #6b7280}[class^=sevn_],[class*=" sevn_"],[class^=sevn_] *,[class^=sevn_] *:before,[class^=sevn_] *:after,[class*=" sevn_"] *,[class*=" sevn_"] *:before,[class*=" sevn_"] *:after{box-sizing:border-box}[class^=sevn_] *,[class*=" sevn_"] *{margin:0;padding:0}',mn=typeof window<"u"&&typeof document<"u",Ar="data-sevn-tokens",Tr="data-sevn-theme",Mr={primary:"--sevn-color-primary",secondary:"--sevn-color-secondary",tertiary:"--sevn-color-tertiary",neutral:"--sevn-color-neutral",red:"--sevn-color-red",green:"--sevn-color-green",blue:"--sevn-color-blue",yellow:"--sevn-color-yellow",textSecondary:"--sevn-color-text-secondary"};function no(){if(!mn||document.querySelector(`style[${Ar}]`))return;const e=document.createElement("style");e.setAttribute(Ar,""),e.textContent=to,document.head.prepend(e);const t=Qt().theme;t&&jn(t)}function jn(e){if(!mn)return;const t=Object.keys(Mr).filter(r=>e[r]).map(r=>` ${Mr[r]}: ${e[r]};`);if(t.length===0)return;let n=document.querySelector(`style[${Tr}]`);n||(n=document.createElement("style"),n.setAttribute(Tr,""),document.head.appendChild(n)),n.textContent=`:root {
2
+ ${t.join(`
3
+ `)}
4
+ }`}function Rr(){return Er(Xa).transport}function Lr(e){return new Promise(t=>setTimeout(t,e))}function ro(e,t){const n=AbortSignal.timeout(e);return t&&typeof AbortSignal.any=="function"?AbortSignal.any([t,n]):n}function ao(e,t){const n=new URL(e),r=new URL(t);return n.protocol=r.protocol,n.host=r.host,n.toString()}function oo(e,t){return Array.from({length:t},(n,r)=>(e+r)%t)}const io=async(e,t)=>{const n=typeof e=="string"?e:e instanceof URL?e.toString():e.url,r=zr(),{timeoutMs:a,retriesPerHost:o,retryDelayMs:i,stickyWindowMs:c}=Qt().request,s=Rr();s.activeIndex!==0&&Date.now()-s.pinnedAt>=c&&(s.activeIndex=0);let f=null;for(const u of oo(s.activeIndex,r.length)){const _=ao(n,r[u]);for(let l=0;l<o;l++)try{const p=await fetch(_,{...t,signal:ro(a,t?.signal)});if(p.status>=500){f=new Error(`HTTP ${p.status} em ${r[u]}`),l<o-1&&await Lr(i);continue}return s.activeIndex=u,s.pinnedAt=Date.now(),p}catch(p){f=p,l<o-1&&await Lr(i)}}throw new V(n,f)};function so(){return Qt().apiHosts[Rr().activeIndex]??null}const lo={applyKey:Fn,configure(e){kr(e),e.theme&&jn(e.theme)},getConfig:Qt,isReady:Sr,assetUrl:eo,setTheme(e){kr({theme:e}),jn(e)},activeHost:so},Un=!1;var Pr=Array.isArray,co=Array.prototype.indexOf,Lt=Array.prototype.includes,bn=Array.from,fo=Object.defineProperty,Pt=Object.getOwnPropertyDescriptor,uo=Object.getOwnPropertyDescriptors,vo=Object.prototype,ho=Array.prototype,Nr=Object.getPrototypeOf,Or=Object.isExtensible;const po=()=>{};function _o(e){for(var t=0;t<e.length;t++)e[t]()}function Dr(){var e,t,n=new Promise((r,a)=>{e=r,t=a});return{promise:n,resolve:e,reject:t}}const ae=2,Xt=4,wn=8,Ir=1<<24,Ke=16,Ae=32,ft=64,Hn=128,Ce=512,X=1024,oe=2048,Te=4096,pe=8192,Ge=16384,ut=32768,Nt=65536,Fr=1<<17,jr=1<<18,Ot=1<<19,go=1<<20,Ze=1<<25,vt=65536,Vn=1<<21,Bn=1<<22,nt=1<<23,$t=Symbol("$state"),mo=Symbol("legacy props"),bo=Symbol(""),ht=new class extends Error{constructor(){super(...arguments);qe(this,"name","StaleReactionError");qe(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function wo(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function yo(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function xo(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Eo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Co(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ko(e){throw new Error("https://svelte.dev/e/effect_orphan")}function So(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function zo(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ao(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function To(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Mo(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ro(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Lo=1,Po=2,Ur=4,No=8,Oo=16,Do=1,Io=4,Fo=8,jo=16,Uo=1,Ho=2,ie=Symbol(),Hr="http://www.w3.org/1999/xhtml";function Vo(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Vr(e){return e===this.v}function Bo(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Br(e){return!Bo(e,this.v)}let qo=!1,_e=null;function Dt(e){_e=e}function en(e,t=!1,n){_e={p:_e,i:!1,c:null,e:null,s:e,x:null,l:null}}function tn(e){var t=_e,n=t.e;if(n!==null){t.e=null;for(var r of n)va(r)}return t.i=!0,_e=t.p,{}}function qr(){return!0}let pt=[];function Kr(){var e=pt;pt=[],_o(e)}function Ye(e){if(pt.length===0&&!nn){var t=pt;queueMicrotask(()=>{t===pt&&Kr()})}pt.push(e)}function Ko(){for(;pt.length>0;)Kr()}function Gr(e){var t=O;if(t===null)return R.f|=nt,e;if((t.f&ut)===0&&(t.f&Xt)===0)throw e;It(e,t)}function It(e,t){for(;t!==null;){if((t.f&Hn)!==0){if((t.f&ut)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Go=-7169;function J(e,t){e.f=e.f&Go|t}function qn(e){(e.f&Ce)!==0||e.deps===null?J(e,X):J(e,Te)}function Zr(e){if(e!==null)for(const t of e)(t.f&ae)===0||(t.f&vt)===0||(t.f^=vt,Zr(t.deps))}function Yr(e,t,n){(e.f&oe)!==0?t.add(e):(e.f&Te)!==0&&n.add(e),Zr(e.deps),J(e,X)}const yn=new Set;let D=null,Kn=null,Me=null,de=[],xn=null,Gn=!1,nn=!1;const vr=class vr{constructor(){L(this,me);qe(this,"committed",!1);qe(this,"current",new Map);qe(this,"previous",new Map);L(this,Ht,new Set);L(this,Vt,new Set);L(this,Ct,0);L(this,Bt,0);L(this,dn,null);L(this,fn,new Set);L(this,kt,new Set);L(this,Xe,new Map);qe(this,"is_fork",!1);L(this,qt,!1)}skip_effect(t){v(this,Xe).has(t)||v(this,Xe).set(t,{d:[],m:[]})}unskip_effect(t){var n=v(this,Xe).get(t);if(n){v(this,Xe).delete(t);for(var r of n.d)J(r,oe),Re(r);for(r of n.m)J(r,Te),Re(r)}}process(t){de=[],this.apply();var n=[],r=[];for(const a of t)re(this,me,br).call(this,a,n,r);if(re(this,me,mr).call(this)){re(this,me,wr).call(this,r),re(this,me,wr).call(this,n);for(const[a,o]of v(this,Xe))$r(a,o)}else{for(const a of v(this,Ht))a();v(this,Ht).clear(),v(this,Ct)===0&&re(this,me,Wa).call(this),Kn=this,D=null,Jr(r),Jr(n),Kn=null,v(this,dn)?.resolve()}Me=null}capture(t,n){n!==ie&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&nt)===0&&(this.current.set(t,t.v),Me?.set(t,t.v))}activate(){D=this,this.apply()}deactivate(){D===this&&(D=null,Me=null)}flush(){if(this.activate(),de.length>0){if(Wr(),D!==null&&D!==this)return}else v(this,Ct)===0&&this.process([]);this.deactivate()}discard(){for(const t of v(this,Vt))t(this);v(this,Vt).clear()}increment(t){T(this,Ct,v(this,Ct)+1),t&&T(this,Bt,v(this,Bt)+1)}decrement(t){T(this,Ct,v(this,Ct)-1),t&&T(this,Bt,v(this,Bt)-1),!v(this,qt)&&(T(this,qt,!0),Ye(()=>{T(this,qt,!1),re(this,me,mr).call(this)?de.length>0&&this.flush():this.revive()}))}revive(){for(const t of v(this,fn))v(this,kt).delete(t),J(t,oe),Re(t);for(const t of v(this,kt))J(t,Te),Re(t);this.flush()}oncommit(t){v(this,Ht).add(t)}ondiscard(t){v(this,Vt).add(t)}settled(){return(v(this,dn)??T(this,dn,Dr())).promise}static ensure(){if(D===null){const t=D=new vr;yn.add(D),nn||Ye(()=>{D===t&&t.flush()})}return D}apply(){}};Ht=new WeakMap,Vt=new WeakMap,Ct=new WeakMap,Bt=new WeakMap,dn=new WeakMap,fn=new WeakMap,kt=new WeakMap,Xe=new WeakMap,qt=new WeakMap,me=new WeakSet,mr=function(){return this.is_fork||v(this,Bt)>0},br=function(t,n,r){t.f^=X;for(var a=t.first;a!==null;){var o=a.f,i=(o&(Ae|ft))!==0,c=i&&(o&X)!==0,s=c||(o&pe)!==0||v(this,Xe).has(a);if(!s&&a.fn!==null){i?a.f^=X:(o&Xt)!==0?n.push(a):on(a)&&((o&Ke)!==0&&v(this,kt).add(a),jt(a));var f=a.first;if(f!==null){a=f;continue}}for(;a!==null;){var u=a.next;if(u!==null){a=u;break}a=a.parent}}},wr=function(t){for(var n=0;n<t.length;n+=1)Yr(t[n],v(this,fn),v(this,kt))},Wa=function(){var a;if(yn.size>1){this.previous.clear();var t=Me,n=!0;for(const o of yn){if(o===this){n=!1;continue}const i=[];for(const[s,f]of this.current){if(o.current.has(s))if(n&&f!==o.current.get(s))o.current.set(s,f);else continue;i.push(s)}if(i.length===0)continue;const c=[...o.current.keys()].filter(s=>!this.current.has(s));if(c.length>0){var r=de;de=[];const s=new Set,f=new Map;for(const u of i)Qr(u,c,s,f);if(de.length>0){D=o,o.apply();for(const u of de)re(a=o,me,br).call(a,u,[],[]);o.deactivate()}de=r}}D=null,Me=t}this.committed=!0,yn.delete(this)};let rt=vr;function Zo(e){var t=nn;nn=!0;try{for(var n;;){if(Ko(),de.length===0&&(D?.flush(),de.length===0))return xn=null,n;Wr()}}finally{nn=t}}function Wr(){Gn=!0;var e=null;try{for(var t=0;de.length>0;){var n=rt.ensure();if(t++>1e3){var r,a;Yo()}n.process(de),at.clear()}}finally{de=[],Gn=!1,xn=null}}function Yo(){try{So()}catch(e){It(e,xn)}}let We=null;function Jr(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(Ge|pe))===0&&on(r)&&(We=new Set,jt(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&_a(r),We?.size>0)){at.clear();for(const a of We){if((a.f&(Ge|pe))!==0)continue;const o=[a];let i=a.parent;for(;i!==null;)We.has(i)&&(We.delete(i),o.push(i)),i=i.parent;for(let c=o.length-1;c>=0;c--){const s=o[c];(s.f&(Ge|pe))===0&&jt(s)}}We.clear()}}We=null}}function Qr(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const a of e.reactions){const o=a.f;(o&ae)!==0?Qr(a,t,n,r):(o&(Bn|Ke))!==0&&(o&oe)===0&&Xr(a,t,r)&&(J(a,oe),Re(a))}}function Xr(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const a of e.deps){if(Lt.call(t,a))return!0;if((a.f&ae)!==0&&Xr(a,t,n))return n.set(a,!0),!0}return n.set(e,!1),!1}function Re(e){var t=xn=e,n=t.b;if(n?.is_pending&&(e.f&(Xt|wn|Ir))!==0&&(e.f&ut)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(Gn&&t===O&&(r&Ke)!==0&&(r&jr)===0&&(r&ut)!==0)return;if((r&(ft|Ae))!==0){if((r&X)===0)return;t.f^=X}}de.push(t)}function $r(e,t){if(!((e.f&Ae)!==0&&(e.f&X)!==0)){(e.f&oe)!==0?t.d.push(e):(e.f&Te)!==0&&t.m.push(e),J(e,X);for(var n=e.first;n!==null;)$r(n,t),n=n.next}}function Wo(e){let t=0,n=_t(0),r;return()=>{Jn()&&(d(n),Qn(()=>(t===0&&(r=Ut(()=>e(()=>rn(n)))),t+=1,()=>{Ye(()=>{t-=1,t===0&&(r?.(),r=void 0,rn(n))})})))}}var Jo=Nt|Ot;function Qo(e,t,n){new Xo(e,t,n)}class Xo{constructor(t,n,r){L(this,ee);qe(this,"parent");qe(this,"is_pending",!1);L(this,Oe);L(this,hr,null);L(this,$e);L(this,St);L(this,je);L(this,Ue,null);L(this,be,null);L(this,He,null);L(this,et,null);L(this,zt,0);L(this,lt,0);L(this,Kt,!1);L(this,Gt,new Set);L(this,Zt,new Set);L(this,tt,null);L(this,Ln,Wo(()=>(T(this,tt,_t(v(this,zt))),()=>{T(this,tt,null)})));T(this,Oe,t),T(this,$e,n),T(this,St,a=>{var o=O;o.b=this,o.f|=Hn,r(a)}),this.parent=O.b,T(this,je,Xn(()=>{re(this,ee,yr).call(this)},Jo))}defer_effect(t){Yr(t,v(this,Gt),v(this,Zt))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!v(this,$e).pending}update_pending_count(t){re(this,ee,xr).call(this,t),T(this,zt,v(this,zt)+t),!(!v(this,tt)||v(this,Kt))&&(T(this,Kt,!0),Ye(()=>{T(this,Kt,!1),v(this,tt)&&Ft(v(this,tt),v(this,zt))}))}get_effect_pending(){return v(this,Ln).call(this),d(v(this,tt))}error(t){var n=v(this,$e).onerror;let r=v(this,$e).failed;if(!n&&!r)throw t;v(this,Ue)&&(fe(v(this,Ue)),T(this,Ue,null)),v(this,be)&&(fe(v(this,be)),T(this,be,null)),v(this,He)&&(fe(v(this,He)),T(this,He,null));var a=!1,o=!1;const i=()=>{if(a){Vo();return}a=!0,o&&Ro(),v(this,He)!==null&&mt(v(this,He),()=>{T(this,He,null)}),re(this,ee,In).call(this,()=>{rt.ensure(),re(this,ee,yr).call(this)})};Ye(()=>{try{o=!0,n?.(t,i),o=!1}catch(c){It(c,v(this,je)&&v(this,je).parent)}r&&T(this,He,re(this,ee,In).call(this,()=>{rt.ensure();try{return Le(()=>{var c=O;c.b=this,c.f|=Hn,r(v(this,Oe),()=>t,()=>i)})}catch(c){return It(c,v(this,je).parent),null}}))})}}Oe=new WeakMap,hr=new WeakMap,$e=new WeakMap,St=new WeakMap,je=new WeakMap,Ue=new WeakMap,be=new WeakMap,He=new WeakMap,et=new WeakMap,zt=new WeakMap,lt=new WeakMap,Kt=new WeakMap,Gt=new WeakMap,Zt=new WeakMap,tt=new WeakMap,Ln=new WeakMap,ee=new WeakSet,sl=function(){try{T(this,Ue,Le(()=>v(this,St).call(this,v(this,Oe))))}catch(t){this.error(t)}},ll=function(){const t=v(this,$e).pending;t&&(this.is_pending=!0,T(this,be,Le(()=>t(v(this,Oe)))),Ye(()=>{var n=T(this,et,document.createDocumentFragment()),r=ot();n.append(r),T(this,Ue,re(this,ee,In).call(this,()=>(rt.ensure(),Le(()=>v(this,St).call(this,r))))),v(this,lt)===0&&(v(this,Oe).before(n),T(this,et,null),mt(v(this,be),()=>{T(this,be,null)}),re(this,ee,Dn).call(this))}))},yr=function(){try{if(this.is_pending=this.has_pending_snippet(),T(this,lt,0),T(this,zt,0),T(this,Ue,Le(()=>{v(this,St).call(this,v(this,Oe))})),v(this,lt)>0){var t=T(this,et,document.createDocumentFragment());ba(v(this,Ue),t);const n=v(this,$e).pending;T(this,be,Le(()=>n(v(this,Oe))))}else re(this,ee,Dn).call(this)}catch(n){this.error(n)}},Dn=function(){this.is_pending=!1;for(const t of v(this,Gt))J(t,oe),Re(t);for(const t of v(this,Zt))J(t,Te),Re(t);v(this,Gt).clear(),v(this,Zt).clear()},In=function(t){var n=O,r=R,a=_e;Fe(v(this,je)),ke(v(this,je)),Dt(v(this,je).ctx);try{return t()}catch(o){return Gr(o),null}finally{Fe(n),ke(r),Dt(a)}},xr=function(t){var n;if(!this.has_pending_snippet()){this.parent&&re(n=this.parent,ee,xr).call(n,t);return}T(this,lt,v(this,lt)+t),v(this,lt)===0&&(re(this,ee,Dn).call(this),v(this,be)&&mt(v(this,be),()=>{T(this,be,null)}),v(this,et)&&(v(this,Oe).before(v(this,et)),T(this,et,null)))};function $o(e,t,n,r){const a=En;var o=e.filter(l=>!l.settled);if(n.length===0&&o.length===0){r(t.map(a));return}var i=D,c=O,s=ei(),f=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(l=>l.promise)):null;function u(l){s();try{r(l)}catch(p){(c.f&Ge)===0&&It(p,c)}i?.deactivate(),Zn()}if(n.length===0){f.then(()=>u(t.map(a)));return}function _(){s(),Promise.all(n.map(l=>ni(l))).then(l=>u([...t.map(a),...l])).catch(l=>It(l,c))}f?f.then(_):_()}function ei(){var e=O,t=R,n=_e,r=D;return function(o=!0){Fe(e),ke(t),Dt(n),o&&r?.activate()}}function Zn(){Fe(null),ke(null),Dt(null)}function ti(){var e=O.b,t=D,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function En(e){var t=ae|oe,n=R!==null&&(R.f&ae)!==0?R:null;return O!==null&&(O.f|=Ot),{ctx:_e,deps:null,effects:null,equals:Vr,f:t,fn:e,reactions:null,rv:0,v:ie,wv:0,parent:n??O,ac:null}}function ni(e,t,n){O===null&&yo();var a=void 0,o=_t(ie),i=!R,c=new Map;return pi(()=>{var s=Dr();a=s.promise;try{Promise.resolve(e()).then(s.resolve,s.reject).then(()=>{f===D&&f.committed&&f.deactivate(),Zn()})}catch(l){s.reject(l),Zn()}var f=D;if(i){var u=ti();c.get(f)?.reject(ht),c.delete(f),c.set(f,s)}const _=(l,p=void 0)=>{if(f.activate(),p)p!==ht&&(o.f|=nt,Ft(o,p));else{(o.f&nt)!==0&&(o.f^=nt),Ft(o,l);for(const[g,E]of c){if(c.delete(g),g===f)break;E.reject(ht)}}u&&u()};s.promise.then(_,l=>_(null,l||"unknown"))}),ua(()=>{for(const s of c.values())s.reject(ht)}),new Promise(s=>{function f(u){function _(){u===a?s(o):f(a)}u.then(_,_)}f(a)})}function se(e){const t=En(e);return ya(t),t}function ea(e){const t=En(e);return t.equals=Br,t}function ri(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)fe(t[n])}}function ai(e){for(var t=e.parent;t!==null;){if((t.f&ae)===0)return(t.f&Ge)===0?t:null;t=t.parent}return null}function Yn(e){var t,n=O;Fe(ai(e));try{e.f&=~vt,ri(e),t=Sa(e)}finally{Fe(n)}return t}function ta(e){var t=Yn(e);if(!e.equals(t)&&(e.wv=Ca(),(!D?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){J(e,X);return}it||(Me!==null?(Jn()||D?.is_fork)&&Me.set(e,t):qn(e))}function oi(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ht),t.teardown=po,t.ac=null,sn(t,0),$n(t))}function na(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&jt(t)}let Wn=new Set;const at=new Map;let ra=!1;function _t(e,t){var n={f:0,v:e,reactions:null,equals:Vr,rv:0,wv:0};return n}function $(e,t){const n=_t(e);return ya(n),n}function ii(e,t=!1,n=!0){const r=_t(e);return t||(r.equals=Br),r}function P(e,t,n=!1){R!==null&&(!Pe||(R.f&Fr)!==0)&&qr()&&(R.f&(ae|Ke|Bn|Fr))!==0&&(Se===null||!Lt.call(Se,e))&&Mo();let r=n?gt(t):t;return Ft(e,r)}function Ft(e,t){if(!e.equals(t)){var n=e.v;it?at.set(e,t):at.set(e,n),e.v=t;var r=rt.ensure();if(r.capture(e,n),(e.f&ae)!==0){const a=e;(e.f&oe)!==0&&Yn(a),qn(a)}e.wv=Ca(),aa(e,oe),O!==null&&(O.f&X)!==0&&(O.f&(Ae|ft))===0&&(ze===null?mi([e]):ze.push(e)),!r.is_fork&&Wn.size>0&&!ra&&si()}return t}function si(){ra=!1;for(const e of Wn)(e.f&X)!==0&&J(e,Te),on(e)&&jt(e);Wn.clear()}function rn(e){P(e,e.v+1)}function aa(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,a=0;a<r;a++){var o=n[a],i=o.f,c=(i&oe)===0;if(c&&J(o,t),(i&ae)!==0){var s=o;Me?.delete(s),(i&vt)===0&&(i&Ce&&(o.f|=vt),aa(s,Te))}else c&&((i&Ke)!==0&&We!==null&&We.add(o),Re(o))}}function gt(e){if(typeof e!="object"||e===null||$t in e)return e;const t=Nr(e);if(t!==vo&&t!==ho)return e;var n=new Map,r=Pr(e),a=$(0),o=wt,i=c=>{if(wt===o)return c();var s=R,f=wt;ke(null),Ea(o);var u=c();return ke(s),Ea(f),u};return r&&n.set("length",$(e.length)),new Proxy(e,{defineProperty(c,s,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Ao();var u=n.get(s);return u===void 0?i(()=>{var _=$(f.value);return n.set(s,_),_}):P(u,f.value,!0),!0},deleteProperty(c,s){var f=n.get(s);if(f===void 0){if(s in c){const u=i(()=>$(ie));n.set(s,u),rn(a)}}else P(f,ie),rn(a);return!0},get(c,s,f){if(s===$t)return e;var u=n.get(s),_=s in c;if(u===void 0&&(!_||Pt(c,s)?.writable)&&(u=i(()=>{var p=gt(_?c[s]:ie),g=$(p);return g}),n.set(s,u)),u!==void 0){var l=d(u);return l===ie?void 0:l}return Reflect.get(c,s,f)},getOwnPropertyDescriptor(c,s){var f=Reflect.getOwnPropertyDescriptor(c,s);if(f&&"value"in f){var u=n.get(s);u&&(f.value=d(u))}else if(f===void 0){var _=n.get(s),l=_?.v;if(_!==void 0&&l!==ie)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return f},has(c,s){if(s===$t)return!0;var f=n.get(s),u=f!==void 0&&f.v!==ie||Reflect.has(c,s);if(f!==void 0||O!==null&&(!u||Pt(c,s)?.writable)){f===void 0&&(f=i(()=>{var l=u?gt(c[s]):ie,p=$(l);return p}),n.set(s,f));var _=d(f);if(_===ie)return!1}return u},set(c,s,f,u){var _=n.get(s),l=s in c;if(r&&s==="length")for(var p=f;p<_.v;p+=1){var g=n.get(p+"");g!==void 0?P(g,ie):p in c&&(g=i(()=>$(ie)),n.set(p+"",g))}if(_===void 0)(!l||Pt(c,s)?.writable)&&(_=i(()=>$(void 0)),P(_,gt(f)),n.set(s,_));else{l=_.v!==ie;var E=i(()=>gt(f));P(_,E)}var h=Reflect.getOwnPropertyDescriptor(c,s);if(h?.set&&h.set.call(u,f),!l){if(r&&typeof s=="string"){var x=n.get("length"),b=Number(s);Number.isInteger(b)&&b>=x.v&&P(x,b+1)}rn(a)}return!0},ownKeys(c){d(a);var s=Reflect.ownKeys(c).filter(_=>{var l=n.get(_);return l===void 0||l.v!==ie});for(var[f,u]of n)u.v!==ie&&!(f in c)&&s.push(f);return s},setPrototypeOf(){To()}})}var oa,ia,sa,la;function li(){if(oa===void 0){oa=window,ia=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;sa=Pt(t,"firstChild").get,la=Pt(t,"nextSibling").get,Or(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Or(n)&&(n.__t=void 0)}}function ot(e=""){return document.createTextNode(e)}function Cn(e){return sa.call(e)}function an(e){return la.call(e)}function m(e,t){return Cn(e)}function kn(e,t=!1){{var n=Cn(e);return n instanceof Comment&&n.data===""?an(n):n}}function k(e,t=1,n=!1){let r=e;for(;t--;)r=an(r);return r}function ci(e){e.textContent=""}function ca(){return!1}function da(e,t,n){return document.createElementNS(Hr,e,void 0)}let fa=!1;function di(){fa||(fa=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Sn(e){var t=R,n=O;ke(null),Fe(null);try{return e()}finally{ke(t),Fe(n)}}function fi(e,t,n,r=n){e.addEventListener(t,()=>Sn(n));const a=e.__on_r;a?e.__on_r=()=>{a(),r(!0)}:e.__on_r=()=>r(!0),di()}function ui(e){O===null&&(R===null&&ko(),Co()),it&&Eo()}function vi(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Je(e,t,n){var r=O;r!==null&&(r.f&pe)!==0&&(e|=pe);var a={ctx:_e,deps:null,nodes:null,f:e|oe|Ce,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{jt(a)}catch(c){throw fe(a),c}else t!==null&&Re(a);var o=a;if(n&&o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&Ot)===0&&(o=o.first,(e&Ke)!==0&&(e&Nt)!==0&&o!==null&&(o.f|=Nt)),o!==null&&(o.parent=r,r!==null&&vi(o,r),R!==null&&(R.f&ae)!==0&&(e&ft)===0)){var i=R;(i.effects??(i.effects=[])).push(o)}return a}function Jn(){return R!==null&&!Pe}function ua(e){const t=Je(wn,null,!1);return J(t,X),t.teardown=e,t}function zn(e){ui();var t=O.f,n=!R&&(t&Ae)!==0&&(t&ut)===0;if(n){var r=_e;(r.e??(r.e=[])).push(e)}else return va(e)}function va(e){return Je(Xt|go,e,!1)}function hi(e){rt.ensure();const t=Je(ft|Ot,e,!0);return(n={})=>new Promise(r=>{n.outro?mt(t,()=>{fe(t),r(void 0)}):(fe(t),r(void 0))})}function ha(e){return Je(Xt,e,!1)}function pi(e){return Je(Bn|Ot,e,!0)}function Qn(e,t=0){return Je(wn|t,e,!0)}function q(e,t=[],n=[],r=[]){$o(r,t,n,a=>{Je(wn,()=>e(...a.map(d)),!0)})}function Xn(e,t=0){var n=Je(Ke|t,e,!0);return n}function Le(e){return Je(Ae|Ot,e,!0)}function pa(e){var t=e.teardown;if(t!==null){const n=it,r=R;wa(!0),ke(null);try{t.call(null)}finally{wa(n),ke(r)}}}function $n(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const a=n.ac;a!==null&&Sn(()=>{a.abort(ht)});var r=n.next;(n.f&ft)!==0?n.parent=null:fe(n,t),n=r}}function _i(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Ae)===0&&fe(t),t=n}}function fe(e,t=!0){var n=!1;(t||(e.f&jr)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(gi(e.nodes.start,e.nodes.end),n=!0),$n(e,t&&!n),sn(e,0),J(e,Ge);var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)o.stop();pa(e);var a=e.parent;a!==null&&a.first!==null&&_a(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function gi(e,t){for(;e!==null;){var n=e===t?null:an(e);e.remove(),e=n}}function _a(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function mt(e,t,n=!0){var r=[];ga(e,r,!0);var a=()=>{n&&fe(e),t&&t()},o=r.length;if(o>0){var i=()=>--o||a();for(var c of r)c.out(i)}else a()}function ga(e,t,n){if((e.f&pe)===0){e.f^=pe;var r=e.nodes&&e.nodes.t;if(r!==null)for(const c of r)(c.is_global||n)&&t.push(c);for(var a=e.first;a!==null;){var o=a.next,i=(a.f&Nt)!==0||(a.f&Ae)!==0&&(e.f&Ke)!==0;ga(a,t,i?n:!1),a=o}}}function er(e){ma(e,!0)}function ma(e,t){if((e.f&pe)!==0){e.f^=pe,(e.f&X)===0&&(J(e,oe),Re(e));for(var n=e.first;n!==null;){var r=n.next,a=(n.f&Nt)!==0||(n.f&Ae)!==0;ma(n,a?t:!1),n=r}var o=e.nodes&&e.nodes.t;if(o!==null)for(const i of o)(i.is_global||t)&&i.in()}}function ba(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var a=n===r?null:an(n);t.append(n),n=a}}let An=!1,it=!1;function wa(e){it=e}let R=null,Pe=!1;function ke(e){R=e}let O=null;function Fe(e){O=e}let Se=null;function ya(e){R!==null&&(Se===null?Se=[e]:Se.push(e))}let ue=null,ge=0,ze=null;function mi(e){ze=e}let xa=1,bt=0,wt=bt;function Ea(e){wt=e}function Ca(){return++xa}function on(e){var t=e.f;if((t&oe)!==0)return!0;if(t&ae&&(e.f&=~vt),(t&Te)!==0){for(var n=e.deps,r=n.length,a=0;a<r;a++){var o=n[a];if(on(o)&&ta(o),o.wv>e.wv)return!0}(t&Ce)!==0&&Me===null&&J(e,X)}return!1}function ka(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Se!==null&&Lt.call(Se,e)))for(var a=0;a<r.length;a++){var o=r[a];(o.f&ae)!==0?ka(o,t,!1):t===o&&(n?J(o,oe):(o.f&X)!==0&&J(o,Te),Re(o))}}function Sa(e){var E;var t=ue,n=ge,r=ze,a=R,o=Se,i=_e,c=Pe,s=wt,f=e.f;ue=null,ge=0,ze=null,R=(f&(Ae|ft))===0?e:null,Se=null,Dt(e.ctx),Pe=!1,wt=++bt,e.ac!==null&&(Sn(()=>{e.ac.abort(ht)}),e.ac=null);try{e.f|=Vn;var u=e.fn,_=u();e.f|=ut;var l=e.deps,p=D?.is_fork;if(ue!==null){var g;if(p||sn(e,ge),l!==null&&ge>0)for(l.length=ge+ue.length,g=0;g<ue.length;g++)l[ge+g]=ue[g];else e.deps=l=ue;if(Jn()&&(e.f&Ce)!==0)for(g=ge;g<l.length;g++)((E=l[g]).reactions??(E.reactions=[])).push(e)}else!p&&l!==null&&ge<l.length&&(sn(e,ge),l.length=ge);if(qr()&&ze!==null&&!Pe&&l!==null&&(e.f&(ae|Te|oe))===0)for(g=0;g<ze.length;g++)ka(ze[g],e);if(a!==null&&a!==e){if(bt++,a.deps!==null)for(let h=0;h<n;h+=1)a.deps[h].rv=bt;if(t!==null)for(const h of t)h.rv=bt;ze!==null&&(r===null?r=ze:r.push(...ze))}return(e.f&nt)!==0&&(e.f^=nt),_}catch(h){return Gr(h)}finally{e.f^=Vn,ue=t,ge=n,ze=r,R=a,Se=o,Dt(i),Pe=c,wt=s}}function bi(e,t){let n=t.reactions;if(n!==null){var r=co.call(n,e);if(r!==-1){var a=n.length-1;a===0?n=t.reactions=null:(n[r]=n[a],n.pop())}}if(n===null&&(t.f&ae)!==0&&(ue===null||!Lt.call(ue,t))){var o=t;(o.f&Ce)!==0&&(o.f^=Ce,o.f&=~vt),qn(o),oi(o),sn(o,0)}}function sn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)bi(e,n[r])}function jt(e){var t=e.f;if((t&Ge)===0){J(e,X);var n=O,r=An;O=e,An=!0;try{(t&(Ke|Ir))!==0?_i(e):$n(e),pa(e);var a=Sa(e);e.teardown=typeof a=="function"?a:null,e.wv=xa;var o;Un&&qo&&(e.f&oe)!==0&&e.deps}finally{An=r,O=n}}}async function wi(){await Promise.resolve(),Zo()}function d(e){var t=e.f,n=(t&ae)!==0;if(R!==null&&!Pe){var r=O!==null&&(O.f&Ge)!==0;if(!r&&(Se===null||!Lt.call(Se,e))){var a=R.deps;if((R.f&Vn)!==0)e.rv<bt&&(e.rv=bt,ue===null&&a!==null&&a[ge]===e?ge++:ue===null?ue=[e]:ue.push(e));else{(R.deps??(R.deps=[])).push(e);var o=e.reactions;o===null?e.reactions=[R]:Lt.call(o,R)||o.push(R)}}}if(it&&at.has(e))return at.get(e);if(n){var i=e;if(it){var c=i.v;return((i.f&X)===0&&i.reactions!==null||Aa(i))&&(c=Yn(i)),at.set(i,c),c}var s=(i.f&Ce)===0&&!Pe&&R!==null&&(An||(R.f&Ce)!==0),f=(i.f&ut)===0;on(i)&&(s&&(i.f|=Ce),ta(i)),s&&!f&&(na(i),za(i))}if(Me?.has(e))return Me.get(e);if((e.f&nt)!==0)throw e.v;return e.v}function za(e){if(e.f|=Ce,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&ae)!==0&&(t.f&Ce)===0&&(na(t),za(t))}function Aa(e){if(e.v===ie)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(at.has(t)||(t.f&ae)!==0&&Aa(t))return!0;return!1}function Ut(e){var t=Pe;try{return Pe=!0,e()}finally{Pe=t}}const yi=["touchstart","touchmove"];function xi(e){return yi.includes(e)}const yt=Symbol("events"),Ta=new Set,tr=new Set;function Ei(e,t,n,r={}){function a(o){if(r.capture||nr.call(t,o),!o.cancelBubble)return Sn(()=>n?.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ye(()=>{t.addEventListener(e,a,r)}):t.addEventListener(e,a,r),a}function Ci(e,t,n,r,a){var o={capture:r,passive:a},i=Ei(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ua(()=>{t.removeEventListener(e,i,o)})}function Qe(e,t,n){(t[yt]??(t[yt]={}))[e]=n}function Ma(e){for(var t=0;t<e.length;t++)Ta.add(e[t]);for(var n of tr)n(e)}let Ra=null;function nr(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;Ra=e;var i=0,c=Ra===e&&e[yt];if(c){var s=a.indexOf(c);if(s!==-1&&(t===document||t===window)){e[yt]=t;return}var f=a.indexOf(t);if(f===-1)return;s<=f&&(i=s)}if(o=a[i]||e.target,o!==t){fo(e,"currentTarget",{configurable:!0,get(){return o||n}});var u=R,_=O;ke(null),Fe(null);try{for(var l,p=[];o!==null;){var g=o.assignedSlot||o.parentNode||o.host||null;try{var E=o[yt]?.[r];E!=null&&(!o.disabled||e.target===o)&&E.call(o,e)}catch(h){l?p.push(h):l=h}if(e.cancelBubble||g===t||g===null)break;o=g}if(l){for(let h of p)queueMicrotask(()=>{throw h});throw l}}finally{e[yt]=t,delete e.currentTarget,ke(u),Fe(_)}}}const ki=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Si(e){return ki?.createHTML(e)??e}function zi(e,t=!1){var n=da("template");return e=e.replaceAll("<!>","<!---->"),n.innerHTML=t?Si(e):e,n.content}function rr(e,t){var n=O;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function M(e,t){var n=(t&Uo)!==0,r=(t&Ho)!==0,a,o=!e.startsWith("<!>");return()=>{a===void 0&&(a=zi(o?e:"<!>"+e,!0),n||(a=Cn(a)));var i=r||ia?document.importNode(a,!0):a.cloneNode(!0);if(n){var c=Cn(i),s=i.lastChild;rr(c,s)}else rr(i,i);return i}}function Ai(){var e=document.createDocumentFragment(),t=document.createComment(""),n=ot();return e.append(t,n),rr(t,n),e}function S(e,t){e!==null&&e.before(t)}function H(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n+"")}function Ti(e,t){return Mi(e,t)}const Tn=new Map;function Mi(e,{target:t,anchor:n,props:r={},events:a,context:o,intro:i=!0}){li();var c=void 0,s=hi(()=>{var f=n??t.appendChild(ot());Qo(f,{pending:()=>{}},l=>{en({});var p=_e;o&&(p.c=o),a&&(r.$$events=a),c=e(l,r)||{},tn()});var u=new Set,_=l=>{for(var p=0;p<l.length;p++){var g=l[p];if(!u.has(g)){u.add(g);var E=xi(g);for(const b of[t,document]){var h=Tn.get(b);h===void 0&&(h=new Map,Tn.set(b,h));var x=h.get(g);x===void 0?(b.addEventListener(g,nr,{passive:E}),h.set(g,1)):h.set(g,x+1)}}}};return _(bn(Ta)),tr.add(_),()=>{for(var l of u)for(const E of[t,document]){var p=Tn.get(E),g=p.get(l);--g==0?(E.removeEventListener(l,nr),p.delete(l),p.size===0&&Tn.delete(E)):p.set(l,g)}tr.delete(_),f!==n&&f.parentNode?.removeChild(f)}});return ar.set(c,s),c}let ar=new WeakMap;function Ri(e,t){const n=ar.get(e);return n?(ar.delete(e),n(t)):Promise.resolve()}class Li{constructor(t,n=!0){qe(this,"anchor");L(this,De,new Map);L(this,Ve,new Map);L(this,we,new Map);L(this,At,new Set);L(this,un,!0);L(this,vn,()=>{var t=D;if(v(this,De).has(t)){var n=v(this,De).get(t),r=v(this,Ve).get(n);if(r)er(r),v(this,At).delete(n);else{var a=v(this,we).get(n);a&&(v(this,Ve).set(n,a.effect),v(this,we).delete(n),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),r=a.effect)}for(const[o,i]of v(this,De)){if(v(this,De).delete(o),o===t)break;const c=v(this,we).get(i);c&&(fe(c.effect),v(this,we).delete(i))}for(const[o,i]of v(this,Ve)){if(o===n||v(this,At).has(o))continue;const c=()=>{if(Array.from(v(this,De).values()).includes(o)){var f=document.createDocumentFragment();ba(i,f),f.append(ot()),v(this,we).set(o,{effect:i,fragment:f})}else fe(i);v(this,At).delete(o),v(this,Ve).delete(o)};v(this,un)||!r?(v(this,At).add(o),mt(i,c,!1)):c()}}});L(this,Pn,t=>{v(this,De).delete(t);const n=Array.from(v(this,De).values());for(const[r,a]of v(this,we))n.includes(r)||(fe(a.effect),v(this,we).delete(r))});this.anchor=t,T(this,un,n)}ensure(t,n){var r=D,a=ca();if(n&&!v(this,Ve).has(t)&&!v(this,we).has(t))if(a){var o=document.createDocumentFragment(),i=ot();o.append(i),v(this,we).set(t,{effect:Le(()=>n(i)),fragment:o})}else v(this,Ve).set(t,Le(()=>n(this.anchor)));if(v(this,De).set(r,t),a){for(const[c,s]of v(this,Ve))c===t?r.unskip_effect(s):r.skip_effect(s);for(const[c,s]of v(this,we))c===t?r.unskip_effect(s.effect):r.skip_effect(s.effect);r.oncommit(v(this,vn)),r.ondiscard(v(this,Pn))}else v(this,vn).call(this)}}De=new WeakMap,Ve=new WeakMap,we=new WeakMap,At=new WeakMap,un=new WeakMap,vn=new WeakMap,Pn=new WeakMap;function Z(e,t,n=!1){var r=new Li(e),a=n?Nt:0;function o(i,c){r.ensure(i,c)}Xn(()=>{var i=!1;t((c,s=0)=>{i=!0,o(s,c)}),i||o(!1,null)},a)}function Pi(e,t){return t}function Ni(e,t,n){for(var r=[],a=t.length,o,i=t.length,c=0;c<a;c++){let _=t[c];mt(_,()=>{if(o){if(o.pending.delete(_),o.done.add(_),o.pending.size===0){var l=e.outrogroups;or(bn(o.done)),l.delete(o),l.size===0&&(e.outrogroups=null)}}else i-=1},!1)}if(i===0){var s=r.length===0&&n!==null;if(s){var f=n,u=f.parentNode;ci(u),u.append(f),e.items.clear()}or(t,!s)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function or(e,t=!0){for(var n=0;n<e.length;n++)fe(e[n],t)}var La;function ir(e,t,n,r,a,o=null){var i=e,c=new Map,s=(t&Ur)!==0;if(s){var f=e;i=f.appendChild(ot())}var u=null,_=ea(()=>{var x=n();return Pr(x)?x:x==null?[]:bn(x)}),l,p=!0;function g(){h.fallback=u,Oi(h,l,i,t,r),u!==null&&(l.length===0?(u.f&Ze)===0?er(u):(u.f^=Ze,cn(u,null,i)):mt(u,()=>{u=null}))}var E=Xn(()=>{l=d(_);for(var x=l.length,b=new Set,z=D,N=ca(),B=0;B<x;B+=1){var te=l[B],K=r(te,B),G=p?null:c.get(K);G?(G.v&&Ft(G.v,te),G.i&&Ft(G.i,B),N&&z.unskip_effect(G.e)):(G=Di(c,p?i:La??(La=ot()),te,K,B,a,t,n),p||(G.e.f|=Ze),c.set(K,G)),b.add(K)}if(x===0&&o&&!u&&(p?u=Le(()=>o(i)):(u=Le(()=>o(La??(La=ot()))),u.f|=Ze)),x>b.size&&xo(),!p)if(N){for(const[y,C]of c)b.has(y)||z.skip_effect(C.e);z.oncommit(g),z.ondiscard(()=>{})}else g();d(_)}),h={effect:E,items:c,outrogroups:null,fallback:u};p=!1}function ln(e){for(;e!==null&&(e.f&Ae)===0;)e=e.next;return e}function Oi(e,t,n,r,a){var o=(r&No)!==0,i=t.length,c=e.items,s=ln(e.effect.first),f,u=null,_,l=[],p=[],g,E,h,x;if(o)for(x=0;x<i;x+=1)g=t[x],E=a(g,x),h=c.get(E).e,(h.f&Ze)===0&&(h.nodes?.a?.measure(),(_??(_=new Set)).add(h));for(x=0;x<i;x+=1){if(g=t[x],E=a(g,x),h=c.get(E).e,e.outrogroups!==null)for(const C of e.outrogroups)C.pending.delete(h),C.done.delete(h);if((h.f&Ze)!==0)if(h.f^=Ze,h===s)cn(h,null,n);else{var b=u?u.next:s;h===e.effect.last&&(e.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),st(e,u,h),st(e,h,b),cn(h,b,n),u=h,l=[],p=[],s=ln(u.next);continue}if((h.f&pe)!==0&&(er(h),o&&(h.nodes?.a?.unfix(),(_??(_=new Set)).delete(h))),h!==s){if(f!==void 0&&f.has(h)){if(l.length<p.length){var z=p[0],N;u=z.prev;var B=l[0],te=l[l.length-1];for(N=0;N<l.length;N+=1)cn(l[N],z,n);for(N=0;N<p.length;N+=1)f.delete(p[N]);st(e,B.prev,te.next),st(e,u,B),st(e,te,z),s=z,u=te,x-=1,l=[],p=[]}else f.delete(h),cn(h,s,n),st(e,h.prev,h.next),st(e,h,u===null?e.effect.first:u.next),st(e,u,h),u=h;continue}for(l=[],p=[];s!==null&&s!==h;)(f??(f=new Set)).add(s),p.push(s),s=ln(s.next);if(s===null)continue}(h.f&Ze)===0&&l.push(h),u=h,s=ln(h.next)}if(e.outrogroups!==null){for(const C of e.outrogroups)C.pending.size===0&&(or(bn(C.done)),e.outrogroups?.delete(C));e.outrogroups.size===0&&(e.outrogroups=null)}if(s!==null||f!==void 0){var K=[];if(f!==void 0)for(h of f)(h.f&pe)===0&&K.push(h);for(;s!==null;)(s.f&pe)===0&&s!==e.fallback&&K.push(s),s=ln(s.next);var G=K.length;if(G>0){var y=(r&Ur)!==0&&i===0?n:null;if(o){for(x=0;x<G;x+=1)K[x].nodes?.a?.measure();for(x=0;x<G;x+=1)K[x].nodes?.a?.fix()}Ni(e,K,y)}}o&&Ye(()=>{if(_!==void 0)for(h of _)h.nodes?.a?.apply()})}function Di(e,t,n,r,a,o,i,c){var s=(i&Lo)!==0?(i&Oo)===0?ii(n,!1,!1):_t(n):null,f=(i&Po)!==0?_t(a):null;return{v:s,i:f,e:Le(()=>(o(t,s??n,f??a,c),()=>{e.delete(r)}))}}function cn(e,t,n){if(e.nodes)for(var r=e.nodes.start,a=e.nodes.end,o=t&&(t.f&Ze)===0?t.nodes.start:n;r!==null;){var i=an(r);if(o.before(r),r===a)return;r=i}}function st(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function xt(e,t){ha(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const a=da("style");a.id=t.hash,a.textContent=t.code,r.appendChild(a)}})}const Pa=[...`
5
+ \r\f \v\uFEFF`];function Ii(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var a in n)if(n[a])r=r?r+" "+a:a;else if(r.length)for(var o=a.length,i=0;(i=r.indexOf(a,i))>=0;){var c=i+o;(i===0||Pa.includes(r[i-1]))&&(c===r.length||Pa.includes(r[c]))?r=(i===0?"":r.substring(0,i))+r.substring(c+1):i=c}}return r===""?null:r}function Fi(e,t){return e==null?null:String(e)}function Ne(e,t,n,r,a,o){var i=e.__className;if(i!==n||i===void 0){var c=Ii(n,r,o);c==null?e.removeAttribute("class"):e.className=c,e.__className=n}else if(o&&a!==o)for(var s in o){var f=!!o[s];(a==null||f!==!!a[s])&&e.classList.toggle(s,f)}return o}function Et(e,t,n,r){var a=e.__style;if(a!==t){var o=Fi(t);o==null?e.removeAttribute("style"):e.style.cssText=o,e.__style=t}return r}const ji=Symbol("is custom element"),Ui=Symbol("is html");function Y(e,t,n,r){var a=Hi(e);a[t]!==(a[t]=n)&&(t==="loading"&&(e[bo]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Vi(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Hi(e){return e.__attributes??(e.__attributes={[ji]:e.nodeName.includes("-"),[Ui]:e.namespaceURI===Hr})}var Na=new Map;function Vi(e){var t=e.getAttribute("is")||e.nodeName,n=Na.get(t);if(n)return n;Na.set(t,n=[]);for(var r,a=e,o=Element.prototype;o!==a;){r=uo(a);for(var i in r)r[i].set&&n.push(i);a=Nr(a)}return n}function Bi(e,t,n=t){var r=new WeakSet;fi(e,"input",async a=>{var o=a?e.defaultValue:e.value;if(o=sr(e)?lr(o):o,n(o),D!==null&&r.add(D),await wi(),o!==(o=t())){var i=e.selectionStart,c=e.selectionEnd,s=e.value.length;if(e.value=o??"",c!==null){var f=e.value.length;i===c&&c===s&&f>s?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=i,e.selectionEnd=Math.min(c,f))}}}),Ut(t)==null&&e.value&&(n(sr(e)?lr(e.value):e.value),D!==null&&r.add(D)),Qn(()=>{var a=t();if(e===document.activeElement){var o=Kn??D;if(r.has(o))return}sr(e)&&a===lr(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function sr(e){var t=e.type;return t==="number"||t==="range"}function lr(e){return e===""?null:+e}function Oa(e,t){return e===t||e?.[$t]===t}function cr(e={},t,n,r){return ha(()=>{var a,o;return Qn(()=>{a=o,o=[],Ut(()=>{e!==n(...o)&&(t(e,...o),a&&Oa(n(...a),e)&&t(null,...a))})}),()=>{Ye(()=>{o&&Oa(n(...o),e)&&t(null,...o)})}}),e}let Mn=!1;function qi(e){var t=Mn;try{return Mn=!1,[e(),Mn]}finally{Mn=t}}function I(e,t,n,r){var a=(n&Fo)!==0,o=(n&jo)!==0,i=r,c=!0,s=()=>(c&&(c=!1,i=o?Ut(r):r),i),f;if(a){var u=$t in e||mo in e;f=Pt(e,t)?.set??(u&&t in e?b=>e[t]=b:void 0)}var _,l=!1;a?[_,l]=qi(()=>e[t]):_=e[t],_===void 0&&r!==void 0&&(_=s(),f&&(zo(),f(_)));var p;if(p=()=>{var b=e[t];return b===void 0?s():(c=!0,b)},(n&Io)===0)return p;if(f){var g=e.$$legacy;return(function(b,z){return arguments.length>0?((!z||g||l)&&f(z?p():b),b):p()})}var E=!1,h=((n&Do)!==0?En:ea)(()=>(E=!1,p()));a&&d(h);var x=O;return(function(b,z){if(arguments.length>0){const N=z?d(h):a?gt(b):b;return P(h,N),E=!0,i!==void 0&&(i=N),b}return it&&E||(x.f&Ge)!==0?h.v:d(h)})}function Da(e){_e===null&&wo(),zn(()=>{const t=Ut(e);if(typeof t=="function")return t})}function Ki(e,t){var n,r;return r=class{constructor(o){L(this,n,null);if(!mn)throw new Error(`[sevn] ${t} só pode ser instanciado no navegador. Em SSR, monte o componente dentro de um efeito de cliente.`);const{target:i,...c}=o??{},s=typeof i=="string"?document.querySelector(i):i;if(!s)throw new Error(`[sevn] ${t}: alvo não encontrado`+(typeof i=="string"?` para o seletor "${i}".`:"."));no(),T(this,n,Ti(e,{target:s,props:c}))}destroy(){if(!v(this,n))return Promise.resolve();const o=v(this,n);return T(this,n,null),Ri(o)}},n=new WeakMap,r}function Ia(e){try{return new URL(e,document.baseURI).searchParams.get("cid")}catch{return null}}function Gi(){const e=document.currentScript;if(e?.src){const n=Ia(e.src);if(n)return n}const t=document.querySelectorAll('script[src*="cid="]');for(const n of t){const r=Ia(n.src);if(r)return r}return null}function Zi(){if(!mn)return;const e=Gi();if(e)try{Fn(e)}catch(t){console.error("[sevn] Chave inválida na tag <script>:",t)}}const Yi="5";typeof window<"u"&&((Za=window.__svelte??(window.__svelte={})).v??(Za.v=new Set)).add(Yi);const Wi="data:image/svg+xml,%3csvg%20width='37'%20height='45'%20viewBox='0%200%2037%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20d='M11.3846%2028.125H25.6154C30.34%2028.125%2034.1538%2031.8937%2034.1538%2036.5625V42.1875H2.84615V36.5625C2.84615%2031.8937%206.66%2028.125%2011.3846%2028.125ZM11.3846%2011.25H25.6154V18.2812C25.6154%2020.1461%2024.8657%2021.9345%2023.5313%2023.2531C22.1969%2024.5717%2020.3871%2025.3125%2018.5%2025.3125C16.6129%2025.3125%2014.8031%2024.5717%2013.4687%2023.2531C12.1343%2021.9345%2011.3846%2020.1461%2011.3846%2018.2812V11.25ZM25.6154%2011.25C27.1808%2011.25%2028.4615%2012.5156%2028.4615%2014.0625C28.4615%2015.6094%2027.1808%2016.875%2025.6154%2016.875V11.25ZM11.3846%2016.875C9.81923%2016.875%208.53846%2015.6094%208.53846%2014.0625C8.53846%2012.5156%209.81923%2011.25%2011.3846%2011.25V16.875Z'%20fill='%231C1C1C'/%3e%3cpath%20d='M11.7262%2011.5875H10.3031C8.16847%209.84374%208.53847%207.17186%208.53847%204.92186C8.53847%202.67186%209.96154%204.19061%2011.3846%204.19061C12.8077%204.19061%2014.2308%205.59686%2014.2308%205.59686C11.7262%205.59686%2011.3846%202.78436%2011.3846%202.78436H19.9231C23.0539%202.78436%2025.6154%205.31561%2025.6154%208.40936H27.0385C27.0385%208.40936%2027.75%2010.5187%2026.6969%2011.925L11.7546%2011.5875H11.7262Z'%20fill='%231C1C1C'/%3e%3c/g%3e%3c/svg%3e",Ji="data:image/svg+xml,%3csvg%20width='37'%20height='45'%20viewBox='0%200%2037%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20d='M11.3846%2028.125H25.6154C30.34%2028.125%2034.1539%2031.8937%2034.1539%2036.5625V42.1875H2.84616V36.5625C2.84616%2031.8937%206.66001%2028.125%2011.3846%2028.125ZM11.3846%2011.25H25.6154V18.2812C25.6154%2020.1461%2024.8657%2021.9345%2023.5313%2023.2531C22.197%2024.5717%2020.3871%2025.3125%2018.5%2025.3125C16.6129%2025.3125%2014.8031%2024.5717%2013.4687%2023.2531C12.1343%2021.9345%2011.3846%2020.1461%2011.3846%2018.2812V11.25Z'%20fill='black'/%3e%3cpath%20d='M27.0385%2011.0531V9.84375C27.0385%206.75%2024.4769%204.21875%2021.3461%204.21875L19.9231%202.8125H15.6538C12.5231%202.8125%209.96153%205.34375%209.96153%208.4375V11.0531C9.96153%2014.7938%208.45307%2018.3656%205.80615%2021.0094L4.26923%2022.5281L6.37538%2023.5688C8.53846%2024.6375%2011.1285%2024.2156%2012.8077%2022.5281H24.1923C25.9%2024.2156%2028.49%2024.6375%2030.6246%2023.5688L32.7308%2022.5281L31.1938%2021.0094C29.8732%2019.701%2028.8264%2018.1483%2028.1134%2016.4399C27.4004%2014.7316%2027.0351%2012.9011%2027.0385%2011.0531Z'%20fill='black'/%3e%3cpath%20d='M19.9231%202.8125C19.9231%202.8125%2021.3462%202.8125%2021.3462%204.21875H19.9231V2.8125Z'%20fill='black'/%3e%3c/g%3e%3c/svg%3e";var Qi=M('<span class="avatar-tag svelte-ga6vh2"> </span>'),Xi=M('<div class="avatar-container svelte-ga6vh2"><div class="avatar svelte-ga6vh2"><img width="1" height="1"/></div> <!></div>');const $i={hash:"svelte-ga6vh2",code:".avatar-container.svelte-ga6vh2 {position:relative;display:inline-flex;flex-direction:column;align-items:center;flex-shrink:0;}.avatar.svelte-ga6vh2 {border-radius:50%;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;}.avatar-image.svelte-ga6vh2 {width:75%;height:auto;display:block;margin-bottom:-6%;}.avatar-image--photo.svelte-ga6vh2 {width:100%;height:100%;margin-bottom:0;object-fit:cover;object-position:center top;}.avatar-tag.svelte-ga6vh2 {position:absolute;bottom:-5px;color:#fff;font-weight:700;letter-spacing:0.05em;border-radius:4px;border:1px solid #fff;white-space:nowrap;}"};function Rn(e,t){xt(e,$i);let n=I(t,"avatar",3,"man"),r=I(t,"size",3,"md"),a=I(t,"tagColor",3,"var(--sevn-color-green)"),o=$(!1);const i=se(()=>n()==="woman"?Ji:Wi),c=se(()=>!!t.photoUrl&&!d(o)),s=se(()=>d(c)?t.photoUrl:d(i)),f={sm:"40px",md:"56px",lg:"72px"},u={sm:{fontSize:"9px",padding:"1px 5px"},md:{fontSize:"12px",padding:"2px 8px"},lg:{fontSize:"14px",padding:"3px 10px"}},_=se(()=>f[r()]??r()),l=se(()=>u[r()]??u.md);var p=Xi(),g=m(p),E=m(g);let h;var x=k(g,2);{var b=z=>{var N=Qi(),B=m(N);q(()=>{Et(N,`background-color: ${a()??""}; font-size: ${d(l).fontSize??""}; padding: ${d(l).padding??""};`),H(B,t.tag)}),S(z,N)};Z(x,z=>{t.tag&&z(b)})}q(()=>{Et(g,`background-color: ${t.avatarColor??"var(--sevn-color-secondary)"??""}; width: ${d(_)??""}; height: ${d(_)??""};`),h=Ne(E,1,"avatar-image svelte-ga6vh2",null,h,{"avatar-image--photo":d(c)}),Y(E,"src",d(s)),Y(E,"alt",t.name)}),Ci("error",E,()=>P(o,!0)),S(e,p)}const es="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M25.9798%2026.872L17.6305%2018.5227C16.9638%2019.0907%2016.1971%2019.5302%2015.3305%2019.8413C14.4638%2020.1524%2013.5927%2020.308%2012.7171%2020.308C10.582%2020.308%208.77493%2019.5689%207.29582%2018.0907C5.8167%2016.6124%205.07715%2014.8058%205.07715%2012.6707C5.07715%2010.5356%205.81581%208.728%207.29315%207.248C8.77048%205.768%2010.5767%205.02711%2012.7118%205.02533C14.8469%205.02356%2016.6549%205.76311%2018.1358%207.244C19.6167%208.72489%2020.3571%2010.5324%2020.3571%2012.6667C20.3571%2013.5929%2020.1931%2014.4893%2019.8651%2015.356C19.5371%2016.2227%2019.106%2016.964%2018.5718%2017.58L26.9211%2025.928L25.9798%2026.872ZM12.7185%2018.9733C14.4874%2018.9733%2015.9807%2018.3644%2017.1985%2017.1467C18.4163%2015.9289%2019.0251%2014.4351%2019.0251%2012.6653C19.0251%2010.8956%2018.4163%209.40222%2017.1985%208.18533C15.9807%206.96844%2014.4874%206.35956%2012.7185%206.35867C10.9496%206.35778%209.45581%206.96667%208.23715%208.18533C7.01848%209.404%206.40959%2010.8973%206.41048%2012.6653C6.41137%2014.4333%207.02026%2015.9267%208.23715%2017.1453C9.45404%2018.364%2010.9474%2018.9729%2012.7171%2018.972'%20fill='%231C1C1C'/%3e%3c/svg%3e",Fa="data:image/svg+xml,%3csvg%20width='13'%20height='8'%20viewBox='0%200%2013%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.91%20-0.00016065L12.97%201.06084L7.193%206.83984C7.10043%206.93299%206.99036%207.00692%206.86911%207.05737C6.74786%207.10782%206.61783%207.13379%206.4865%207.13379C6.35517%207.13379%206.22514%207.10782%206.10389%207.05737C5.98264%207.00692%205.87257%206.93299%205.78%206.83984L2.65457e-07%201.06084L1.06%200.000838803L6.485%205.42484L11.91%20-0.00016065Z'%20fill='black'/%3e%3c/svg%3e",ja="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.5%201.5L1.5%2010.5M1.5%201.5L10.5%2010.5'%20stroke='black'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3c/svg%3e";var ts=M('<span class="mobile-label svelte-1dw55dz"> </span>'),ns=M('<input class="search-input svelte-1dw55dz" type="text"/>'),rs=M('<span class="field-label-prefix svelte-1dw55dz"> </span>'),as=M('<span class="field-text svelte-1dw55dz"><!> </span>'),os=M("<span> </span>"),is=M('<button class="icon-clear svelte-1dw55dz" type="button" aria-label="Limpar seleção"><img alt="" aria-hidden="true"/></button>'),ss=M('<img alt="" aria-hidden="true"/>'),ls=M('<img class="icon-search svelte-1dw55dz" alt="" aria-hidden="true"/>'),cs=M('<span class="meta svelte-1dw55dz"> </span>'),ds=M('<div class="web-info svelte-1dw55dz"><span class="selected-label svelte-1dw55dz"><strong class="svelte-1dw55dz">Você selecionou:</strong> </span> <!></div>'),fs=M('<button type="button" role="option"> </button>'),us=M('<div class="no-results svelte-1dw55dz">Nenhum resultado encontrado</div>'),vs=M('<div class="dropdown svelte-1dw55dz" role="listbox"></div>'),hs=M('<div><!> <div role="combobox" aria-haspopup="listbox"><!> <!></div> <!> <!></div>');const ps={hash:"svelte-1dw55dz",code:`.autocomplete.svelte-1dw55dz {position:relative;width:var(--field-width);font-family:inherit;}
6
+
7
+ /* ── Label (mobile only) ─────────────────────────────── */.mobile-label.svelte-1dw55dz {display:none;font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin-bottom:6px;}
8
+
9
+ @media (max-width: 768px) {.mobile-label.svelte-1dw55dz {display:block;}
10
+ }
11
+
12
+ /* ── Campo principal ─────────────────────────────────── */.field.svelte-1dw55dz {display:flex;align-items:center;width:100%;height:var(--field-height);padding:0 14px;background:var(--sevn-color-neutral);border:1px solid transparent;border-radius:8px;cursor:pointer;gap:8px;transition:border-color 0.15s, box-shadow 0.15s;color:var(--sevn-color-tertiary);}.field.svelte-1dw55dz:hover {border-color:#d1d1d6;}.field.disabled.svelte-1dw55dz {cursor:not-allowed;opacity:0.55;}.field.disabled.svelte-1dw55dz:hover {border-color:transparent;}.field.open.svelte-1dw55dz {border-color:var(--sevn-color-primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--sevn-color-primary) 15%, transparent);background:#fff;}
13
+
14
+ /* ── Texto do campo ──────────────────────────────────── */.field-text.svelte-1dw55dz {flex:1;text-align:left;font-size:0.9375rem;color:var(--sevn-color-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.field-text.is-placeholder.svelte-1dw55dz {color:#9a9aaa;}.field-label-prefix.svelte-1dw55dz {font-weight:600;margin-right:4px;}
15
+
16
+ /* ── Input de busca ──────────────────────────────────── */.search-input.svelte-1dw55dz {flex:1;border:none;outline:none;font-size:0.9375rem;font-family:inherit;color:var(--sevn-color-tertiary);background:transparent;min-width:0;}.search-input.svelte-1dw55dz::placeholder {color:#9a9aaa;}
17
+
18
+ /* ── Ícone de lupa ───────────────────────────────────── */.icon-search.svelte-1dw55dz {flex-shrink:0;}.field.open.svelte-1dw55dz .icon-search:where(.svelte-1dw55dz) {opacity:1;}
19
+
20
+ /* ── Botão de limpar ─────────────────────────────────── */.icon-clear.svelte-1dw55dz {display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;background:none;border:none;border-radius:50%;cursor:pointer;transition:background 0.15s;}.icon-clear.svelte-1dw55dz:hover,
21
+ .icon-clear.svelte-1dw55dz:focus-visible {background:rgba(0, 0, 0, 0.08);}
22
+
23
+ /* ── Ícone de chevron ────────────────────────────────── */.icon-chevron.svelte-1dw55dz {flex-shrink:0;transition:transform 0.2s ease;}.icon-chevron.open.svelte-1dw55dz {transform:rotate(180deg);}
24
+
25
+ /* ── "Você selecionou" (web only) ────────────────────── */.web-info.svelte-1dw55dz {display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:20px;font-size:0.8125rem;color:var(--sevn-color-tertiary);}.selected-label.svelte-1dw55dz strong:where(.svelte-1dw55dz) {font-weight:600;}.meta.svelte-1dw55dz {font-size:0.7rem;opacity:50%;}
26
+
27
+ @media (max-width: 768px) {.web-info.svelte-1dw55dz {display:none;}.field-text.svelte-1dw55dz {font-weight:600;}.field-text.is-placeholder.svelte-1dw55dz:not(.force-placeholder) {display:none;}.search-input.svelte-1dw55dz::placeholder {color:transparent;}.show-placeholder-mobile.svelte-1dw55dz .search-input:where(.svelte-1dw55dz)::placeholder {color:#9a9aaa;}.icon-search.svelte-1dw55dz {margin-left:auto;}
28
+ }
29
+
30
+ /* ── Dropdown ────────────────────────────────────────── */.dropdown.svelte-1dw55dz {position:absolute;top:calc(var(--field-height) + 6px);left:0;right:0;background:#fff;border:1px solid #d1d1d6;border-radius:8px;max-height:240px;overflow-y:auto;z-index:200;box-shadow:0 6px 16px rgba(0, 0, 0, 0.1);scrollbar-width:thin;scrollbar-color:#d1d1d6 transparent;}.dropdown.svelte-1dw55dz::-webkit-scrollbar {width:4px;}.dropdown.svelte-1dw55dz::-webkit-scrollbar-track {background:transparent;}.dropdown.svelte-1dw55dz::-webkit-scrollbar-thumb {background-color:#d1d1d6;border-radius:4px;}
31
+
32
+ /* ── Opção ───────────────────────────────────────────── */.option.svelte-1dw55dz {display:block;width:100%;padding:11px 14px;text-align:left;background:none;border:none;border-bottom:1px solid #f0f0f5;cursor:pointer;font-size:0.9375rem;font-family:inherit;color:var(--sevn-color-tertiary);transition:background 0.1s;line-height:1.4;}.option.svelte-1dw55dz:last-child {border-bottom:none;}.option.svelte-1dw55dz:hover {background:var(--sevn-color-neutral);}.option.selected.svelte-1dw55dz {background:color-mix(in srgb, var(--sevn-color-primary) 8%, transparent);color:var(--sevn-color-primary);font-weight:600;}.no-results.svelte-1dw55dz {padding:14px;color:#9a9aaa;font-size:0.875rem;text-align:center;}`};function Ua(e,t){en(t,!0),xt(e,ps);let n=I(t,"label",3,""),r=I(t,"showLabel",3,!0),a=I(t,"options",19,()=>[]),o=I(t,"value",15,null),i=I(t,"meta",3,""),c=I(t,"width",3,"100%"),s=I(t,"height",3,"48px"),f=I(t,"icon",3,es),u=I(t,"iconSize",3,13),_=I(t,"showLabelInField",3,!1),l=I(t,"showDescriptionSelection",3,!0),p=I(t,"labelAsPlaceholder",3,!0),g=I(t,"showPlaceholderOnMobile",3,!1),E=I(t,"disabled",3,!1),h=I(t,"clearable",3,!0);const x=`autocomplete-listbox-${Math.random().toString(36).slice(2,9)}`;let b=$(!1),z=$(""),N=$(null),B=$(null),te=se(()=>d(z).trim()?a().filter(w=>w.label.toLowerCase().includes(d(z).trim().toLowerCase())):a()),K=se(()=>o()!=null?a().find(w=>w.value===o())??null:null);function G(w){o(w.value),P(z,""),P(b,!1)}function y(){E()||(P(b,!d(b)),d(b)||P(z,""))}function C(w){w.stopPropagation(),o(null),P(z,""),P(b,!1)}function F(w){w.target===w.currentTarget&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),y())}function Q(w){d(N)&&!d(N).contains(w.target)&&(P(b,!1),P(z,""))}function ye(w){w.key==="Escape"&&(P(b,!1),P(z,""))}zn(()=>{d(b)&&d(B)&&d(B).focus()}),zn(()=>{E()&&(P(b,!1),P(z,""))}),Da(()=>(document.addEventListener("mousedown",Q),()=>document.removeEventListener("mousedown",Q)));var ve=hs();let le;var Be=m(ve);{var Yt=w=>{var A=ts(),j=m(A);q(()=>H(j,n())),S(w,A)};Z(Be,w=>{r()&&n()&&w(Yt)})}var xe=k(Be,2);let Tt;var Ie=m(xe);{var ct=w=>{var A=ns();cr(A,j=>P(B,j),()=>d(B)),q(()=>Y(A,"placeholder",n())),Qe("keydown",A,ye),Qe("click",A,j=>j.stopPropagation()),Bi(A,()=>d(z),j=>P(z,j)),S(w,A)},Wt=w=>{var A=as(),j=m(A);{var ne=he=>{var Ee=rs(),Jt=m(Ee);q(()=>H(Jt,n())),S(he,Ee)};Z(j,he=>{_()&&he(ne)})}var ce=k(j,1,!0);q(()=>H(ce,d(K).label)),S(w,A)},hn=w=>{var A=Ai(),j=kn(A);{var ne=ce=>{var he=os();let Ee;var Jt=m(he);q(()=>{Ee=Ne(he,1,"field-text is-placeholder svelte-1dw55dz",null,Ee,{"force-placeholder":g()}),H(Jt,n())}),S(ce,he)};Z(j,ce=>{p()&&ce(ne)})}S(w,A)};Z(Ie,w=>{d(b)?w(ct):d(K)?w(Wt,1):w(hn,!1)})}var pn=k(Ie,2);{var dt=w=>{var A=is(),j=m(A);q(()=>{Y(j,"src",ja),Y(j,"width",u()?u():12),Y(j,"height",u()?u():12)}),Qe("click",A,C),S(w,A)},_n=w=>{var A=ss();let j;q(()=>{j=Ne(A,1,"icon-chevron svelte-1dw55dz",null,j,{open:d(b)}),Y(A,"src",Fa),Y(A,"width",u()?u():12),Y(A,"height",u()?u():12)}),S(w,A)},Nn=w=>{var A=ls();q(()=>{Y(A,"src",f()),Y(A,"width",u()),Y(A,"height",u())}),S(w,A)};Z(pn,w=>{d(K)&&h()&&!E()?w(dt):d(K)?w(_n,1):w(Nn,!1)})}var gn=k(xe,2);{var pr=w=>{var A=ds(),j=m(A),ne=k(m(j)),ce=k(j,2);{var he=Ee=>{var Jt=cs(),al=m(Jt);q(()=>H(al,i())),S(Ee,Jt)};Z(ce,Ee=>{i()&&Ee(he)})}q(()=>H(ne,` ${d(K).label??""}`)),S(w,A)};Z(gn,w=>{d(K)&&l()&&w(pr)})}var _r=k(gn,2);{var On=w=>{var A=vs();ir(A,21,()=>d(te),j=>j.value,(j,ne)=>{var ce=fs();let he;var Ee=m(ce);q(()=>{he=Ne(ce,1,"option svelte-1dw55dz",null,he,{selected:d(ne).value===o()}),Y(ce,"aria-selected",d(ne).value===o()),H(Ee,d(ne).label)}),Qe("click",ce,()=>G(d(ne))),S(j,ce)},j=>{var ne=us();S(j,ne)}),q(()=>Y(A,"id",x)),S(w,A)};Z(_r,w=>{d(b)&&w(On)})}cr(ve,w=>P(N,w),()=>d(N)),q(()=>{le=Ne(ve,1,"autocomplete svelte-1dw55dz",null,le,{"show-placeholder-mobile":g()}),Et(ve,`--field-width: ${c()??""}; --field-height: ${s()??""}`),Tt=Ne(xe,1,"field svelte-1dw55dz",null,Tt,{open:d(b),"has-value":d(K)&&!d(b),disabled:E()}),Y(xe,"tabindex",E()?-1:0),Y(xe,"aria-controls",x),Y(xe,"aria-expanded",d(b)),Y(xe,"aria-disabled",E())}),Qe("click",xe,y),Qe("keydown",xe,F),S(e,ve),tn()}Ma(["click","keydown"]);var _s=M("<span> </span>");const gs={hash:"svelte-pamnib",code:".tag.svelte-pamnib {display:inline-flex;align-items:center;padding:4px 8px;border-radius:5px;font-family:inherit;font-weight:700;color:#ffffff;white-space:nowrap;letter-spacing:0.03em;width:fit-content;}"};function Ha(e,t){xt(e,gs);let n=I(t,"color",3,"#1C1C1C"),r=I(t,"fontSize",3,"0.6875rem"),a=I(t,"class",3,"");var o=_s(),i=m(o);q(()=>{Ne(o,1,`tag ${a()??""}`,"svelte-pamnib"),Et(o,`background-color: ${n()??""}; font-size: ${r()??""}`),H(i,t.label)}),S(e,o)}var ms=M('<div class="candidate-vote-comparison-header svelte-h4mycb"><div class="candidate-vote-comparison-header-cand svelte-h4mycb"><!> <div class="candidate-vote-comparison-header-info svelte-h4mycb"><span class="candidate-vote-comparison-header-name svelte-h4mycb"> </span> <span class="candidate-vote-comparison-header-tag svelte-h4mycb"> </span></div></div> <div class="candidate-vote-comparison-header-cand candidate-vote-comparison-header-cand-right svelte-h4mycb"><div class="candidate-vote-comparison-header-info candidate-vote-comparison-header-info-right svelte-h4mycb"><span class="candidate-vote-comparison-header-name svelte-h4mycb"> </span> <span class="candidate-vote-comparison-header-tag svelte-h4mycb"> </span></div> <!></div></div>'),bs=M('<div class="candidate-vote-comparison-round svelte-h4mycb"><div class="candidate-vote-comparison-mobile-top svelte-h4mycb"><span class="candidate-vote-comparison-label-mobile svelte-h4mycb"> </span> <div class="candidate-vote-comparison-mobile-cands svelte-h4mycb"><div class="candidate-vote-comparison-mini-cand svelte-h4mycb"><div class="candidate-vote-comparison-mini-row svelte-h4mycb"><div><!></div> <div><span class="candidate-vote-comparison-mini-name svelte-h4mycb"> </span> <span class="candidate-vote-comparison-mini-tag svelte-h4mycb"> </span> <span class="candidate-vote-comparison-mini-percent svelte-h4mycb"> </span></div></div></div> <div class="candidate-vote-comparison-mini-cand candidate-vote-comparison-mini-cand-right svelte-h4mycb"><div class="candidate-vote-comparison-mini-row candidate-vote-comparison-mini-row-right svelte-h4mycb"><div><span class="candidate-vote-comparison-mini-tag svelte-h4mycb"> </span> <span class="candidate-vote-comparison-mini-name svelte-h4mycb"> </span> <span class="candidate-vote-comparison-mini-percent candidate-vote-comparison-mini-percent-right svelte-h4mycb"> </span></div> <div><!></div></div></div></div></div> <p class="candidate-vote-comparison-label-desktop svelte-h4mycb"> </p> <div class="candidate-vote-comparison-bar svelte-h4mycb"><div class="candidate-vote-comparison-bar-a svelte-h4mycb"></div> <div class="candidate-vote-comparison-bar-b svelte-h4mycb"></div></div> <div class="candidate-vote-comparison-desktop-percents svelte-h4mycb"><span class="candidate-vote-comparison-percent svelte-h4mycb"> </span> <span class="candidate-vote-comparison-percent svelte-h4mycb"> </span></div></div>'),ws=M('<p class="candidate-vote-comparison-footer svelte-h4mycb"> </p>'),ys=M('<div class="candidate-vote-comparison svelte-h4mycb"><!> <!> <!></div>');const xs={hash:"svelte-h4mycb",code:`.candidate-vote-comparison.svelte-h4mycb {display:flex;flex-direction:column;}
33
+
34
+ /* ── Desktop header ───────────────────── */.candidate-vote-comparison-header.svelte-h4mycb {display:none;}
35
+
36
+ /* ── Rounds ───────────────────────────── */.candidate-vote-comparison-round.svelte-h4mycb {display:flex;flex-direction:column;gap:15px;margin-bottom:20px;}
37
+
38
+ /* ── Mobile top ── */.candidate-vote-comparison-label-mobile.svelte-h4mycb {font-size:0.875rem;font-weight:700;color:var(--sevn-color-tertiary);}.candidate-vote-comparison-mobile-cands.svelte-h4mycb {display:flex;gap:12px;margin-top:15px;}.candidate-vote-comparison-mini-cand.svelte-h4mycb {flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;}.candidate-vote-comparison-mini-row.svelte-h4mycb {display:flex;align-items:center;gap:6px;}.candidate-vote-comparison-mini-row-right.svelte-h4mycb {justify-content:flex-end;text-align:right;}.candidate-vote-comparison-mini-name.svelte-h4mycb {font-size:0.75rem;font-weight:600;color:var(--sevn-color-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex-shrink:1;}.candidate-vote-comparison-mini-tag.svelte-h4mycb {display:inline-block;flex-shrink:0;font-size:0.75rem;font-weight:600;color:var(--sevn-color-tertiary);padding:2px 5px;border-radius:4px;letter-spacing:0.03em;opacity:50%;}.candidate-vote-comparison-mini-percent.svelte-h4mycb {font-size:1.25rem;font-weight:700;color:var(--sevn-color-tertiary);}.candidate-vote-comparison-mini-cand-right.svelte-h4mycb .candidate-vote-comparison-mini-percent:where(.svelte-h4mycb) {text-align:right;}
39
+
40
+ /* ── Desktop label + pcts (hidden on mobile) ── */.candidate-vote-comparison-label-desktop.svelte-h4mycb {display:none;}.candidate-vote-comparison-desktop-percents.svelte-h4mycb {display:none;}
41
+
42
+ /* ── Bar ─────────────────────────────── */.candidate-vote-comparison-bar.svelte-h4mycb {position:relative;height:12px;border-radius:50px;overflow:hidden;background-color:#f2f2f7;}.candidate-vote-comparison-bar-a.svelte-h4mycb,
43
+ .candidate-vote-comparison-bar-b.svelte-h4mycb {position:absolute;top:0;left:0;height:100%;border-radius:50px;}
44
+
45
+ /* ── Footer ──────────────────────────── */.candidate-vote-comparison-footer.svelte-h4mycb {font-size:0.75rem;color:var(--sevn-color-tertiary);opacity:0.5;margin-top:4px;}
46
+
47
+ /* ── Desktop ──────────────────────────── */
48
+ @media (min-width: 768px) {.candidate-vote-comparison-header.svelte-h4mycb {display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px;}.candidate-vote-comparison-header-cand.svelte-h4mycb {display:flex;align-items:center;gap:12px;}.candidate-vote-comparison-header-info.svelte-h4mycb {display:flex;flex-direction:column;gap:2px;}.candidate-vote-comparison-header-info-right.svelte-h4mycb {text-align:right;}.candidate-vote-comparison-header-name.svelte-h4mycb {font-size:1.125rem;font-weight:700;color:var(--sevn-color-tertiary);}.candidate-vote-comparison-header-tag.svelte-h4mycb {font-size:0.875rem;color:var(--sevn-color-tertiary);opacity:0.55;}.candidate-vote-comparison-mobile-top.svelte-h4mycb {display:none;}.candidate-vote-comparison-label-desktop.svelte-h4mycb {display:block;text-align:center;font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0;}.candidate-vote-comparison-desktop-percents.svelte-h4mycb {display:flex;justify-content:space-between;}.candidate-vote-comparison-percent.svelte-h4mycb {font-size:1.125rem;font-weight:700;color:var(--sevn-color-tertiary);}.candidate-vote-comparison-round.svelte-h4mycb {gap:15px;margin-bottom:16px;}.candidate-vote-comparison-bar.svelte-h4mycb {height:36px;}.candidate-vote-comparison-bar-a.svelte-h4mycb,
49
+ .candidate-vote-comparison-bar-b.svelte-h4mycb {border-radius:50px;}
50
+ }`};function Es(e,t){en(t,!0),xt(e,xs);let n=I(t,"updatedAt",3,"");const r=se(()=>t.data.rounds??[]),a=_=>_.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})+"%";var o=ys(),i=m(o);{var c=_=>{var l=ms(),p=m(l),g=m(p);{let F=se(()=>d(r)[0].candidatos[0].avatar??"man");Rn(g,{get name(){return d(r)[0].candidatos[0].name},get photoUrl(){return d(r)[0].candidatos[0].photoUrl},get avatar(){return d(F)},get avatarColor(){return d(r)[0].candidatos[0].avatarColor},size:"lg"})}var E=k(g,2),h=m(E),x=m(h),b=k(h,2),z=m(b),N=k(p,2),B=m(N),te=m(B),K=m(te),G=k(te,2),y=m(G),C=k(B,2);{let F=se(()=>d(r)[0].candidatos[1].avatar??"man");Rn(C,{get name(){return d(r)[0].candidatos[1].name},get photoUrl(){return d(r)[0].candidatos[1].photoUrl},get avatar(){return d(F)},get avatarColor(){return d(r)[0].candidatos[1].avatarColor},size:"lg"})}q(()=>{H(x,d(r)[0].candidatos[0].name),H(z,d(r)[0].candidatos[0].tag),H(K,d(r)[0].candidatos[1].name),H(y,d(r)[0].candidatos[1].tag)}),S(_,l)};Z(i,_=>{d(r)[0]&&_(c)})}var s=k(i,2);ir(s,17,()=>d(r),Pi,(_,l,p)=>{var g=bs(),E=m(g),h=m(E),x=m(h),b=k(h,2),z=m(b),N=m(z),B=m(N),te=m(B);{let ne=se(()=>d(l).candidatos[0].avatar??"man");Rn(te,{get name(){return d(l).candidatos[0].name},get photoUrl(){return d(l).candidatos[0].photoUrl},get avatar(){return d(ne)},get avatarColor(){return d(l).candidatos[0].avatarColor},size:"sm"})}var K=k(B,2),G=m(K),y=m(G),C=k(G,2),F=m(C),Q=k(C,2),ye=m(Q),ve=k(z,2),le=m(ve),Be=m(le),Yt=m(Be),xe=m(Yt),Tt=k(Yt,2),Ie=m(Tt),ct=k(Tt,2),Wt=m(ct),hn=k(Be,2),pn=m(hn);{let ne=se(()=>d(l).candidatos[1].avatar??"man");Rn(pn,{get name(){return d(l).candidatos[1].name},get photoUrl(){return d(l).candidatos[1].photoUrl},get avatar(){return d(ne)},get avatarColor(){return d(l).candidatos[1].avatarColor},size:"sm"})}var dt=k(E,2),_n=m(dt),Nn=k(dt,2),gn=m(Nn),pr=k(gn,2),_r=k(Nn,2),On=m(_r),w=m(On),A=k(On,2),j=m(A);q((ne,ce,he,Ee)=>{H(x,d(l).label),H(y,d(l).candidatos[0].name),H(F,d(l).candidatos[0].tag),H(ye,ne),H(xe,d(l).candidatos[1].tag),H(Ie,d(l).candidatos[1].name),H(Wt,ce),H(_n,d(l).label),Et(gn,`width: ${(p===0||d(l).candidatos[0].percent>d(l).candidatos[1].percent?d(l).candidatos[0].percent:100)??""}%; background: ${d(l).candidatos[0].color??""}; z-index: ${d(l).candidatos[0].percent>d(l).candidatos[1].percent?1:0};`),Et(pr,`width: ${(p===0||d(l).candidatos[1].percent>d(l).candidatos[0].percent?d(l).candidatos[1].percent:100)??""}%; background: ${d(l).candidatos[1].color??""}; z-index: ${d(l).candidatos[1].percent>d(l).candidatos[0].percent?1:0}; ${p===0?"right: 0; left: auto;":""}`),H(w,he),H(j,Ee)},[()=>a(d(l).candidatos[0].percent),()=>a(d(l).candidatos[1].percent),()=>a(d(l).candidatos[0].percent),()=>a(d(l).candidatos[1].percent)]),S(_,g)});var f=k(s,2);{var u=_=>{var l=ws(),p=m(l);q(()=>H(p,n())),S(_,l)};Z(f,_=>{n()&&_(u)})}S(e,o),tn()}var Cs=M('<span class="trigger-label svelte-hkzjiw"> </span>'),ks=M('<img alt="" aria-hidden="true" width="10" height="10"/>'),Ss=M('<button class="clear svelte-hkzjiw" type="button"><img alt="" aria-hidden="true" width="8" height="8"/></button>'),zs=M('<button type="button" role="option"> </button>'),As=M('<div class="dropdown svelte-hkzjiw" role="listbox"></div>'),Ts=M('<div class="filter-dropdown svelte-hkzjiw"><button type="button" aria-haspopup="listbox"><!> <span class="trigger-value svelte-hkzjiw"> </span> <!></button> <!> <!></div>');const Ms={hash:"svelte-hkzjiw",code:`.filter-dropdown.svelte-hkzjiw {position:relative;display:inline-flex;align-items:center;}
51
+
52
+ /* ── Trigger ─────────────────────────────── */.trigger.svelte-hkzjiw {display:inline-flex;align-items:center;gap:4px;padding:0;background:none;border:none;cursor:pointer;font-family:inherit;font-size:0.875rem;color:var(--sevn-color-tertiary);white-space:nowrap;}.trigger-label.svelte-hkzjiw {font-weight:700;}.trigger-value.svelte-hkzjiw {font-weight:400;}.trigger-chevron.svelte-hkzjiw {flex-shrink:0;transition:transform 0.2s ease;margin-left:2px;}.trigger-chevron.rotated.svelte-hkzjiw {transform:rotate(180deg);}
53
+
54
+ /* ── Botão de limpar ─────────────────────── */.clear.svelte-hkzjiw {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:16px;height:16px;margin-left:4px;padding:0;background:none;border:none;border-radius:50%;cursor:pointer;transition:background 0.15s;}.clear.svelte-hkzjiw:hover,
55
+ .clear.svelte-hkzjiw:focus-visible {background:rgba(0, 0, 0, 0.08);}
56
+
57
+ /* ── Dropdown ────────────────────────────── */.dropdown.svelte-hkzjiw {position:absolute;top:calc(100% + 6px);left:0;min-width:100%;background:#fff;border:1px solid #d1d1d6;border-radius:8px;box-shadow:0 6px 16px rgba(0, 0, 0, 0.1);z-index:200;overflow:hidden;}
58
+
59
+ /* ── Options ─────────────────────────────── */.option.svelte-hkzjiw {display:block;width:100%;padding:10px 14px;text-align:left;background:none;border:none;border-bottom:1px solid #f0f0f5;cursor:pointer;font-size:0.875rem;font-family:inherit;color:var(--sevn-color-tertiary);white-space:nowrap;transition:background 0.1s;}.option.svelte-hkzjiw:last-child {border-bottom:none;}.option.svelte-hkzjiw:hover {background:var(--sevn-color-neutral);}.option.selected.svelte-hkzjiw {background:color-mix(in srgb, var(--sevn-color-primary) 8%, transparent);color:var(--sevn-color-primary);font-weight:600;}`};function Rs(e,t){en(t,!0),xt(e,Ms);let n=I(t,"label",3,""),r=I(t,"options",19,()=>[]),a=I(t,"value",15,null),o=I(t,"clearable",3,!0),i=$(!1),c=$(null);const s=se(()=>a()!=null?r().find(y=>y.value===a())??null:null);function f(y){a(y.value),P(i,!1)}function u(){a(null),P(i,!1)}function _(y){d(c)&&!d(c).contains(y.target)&&P(i,!1)}Da(()=>(document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)));var l=Ts(),p=m(l);let g;var E=m(p);{var h=y=>{var C=Cs(),F=m(C);q(()=>H(F,`${n()??""}:`)),S(y,C)};Z(E,y=>{n()&&y(h)})}var x=k(E,2),b=m(x),z=k(x,2);{var N=y=>{var C=ks();let F;q(()=>{F=Ne(C,1,"trigger-chevron svelte-hkzjiw",null,F,{rotated:d(i)}),Y(C,"src",Fa)}),S(y,C)};Z(z,y=>{d(s)&&o()||y(N)})}var B=k(p,2);{var te=y=>{var C=Ss(),F=m(C);q(()=>{Y(C,"aria-label",`Limpar ${(n()||"filtro")??""}`),Y(F,"src",ja)}),Qe("click",C,u),S(y,C)};Z(B,y=>{d(s)&&o()&&y(te)})}var K=k(B,2);{var G=y=>{var C=As();ir(C,21,r,F=>F.value,(F,Q)=>{var ye=zs();let ve;var le=m(ye);q(()=>{ve=Ne(ye,1,"option svelte-hkzjiw",null,ve,{selected:d(Q).value===a()}),Y(ye,"aria-selected",d(Q).value===a()),H(le,d(Q).label)}),Qe("click",ye,()=>f(d(Q))),S(F,ye)}),S(y,C)};Z(K,y=>{d(i)&&y(G)})}cr(l,y=>P(c,y),()=>d(c)),q(()=>{g=Ne(p,1,"trigger svelte-hkzjiw",null,g,{open:d(i)}),Y(p,"aria-expanded",d(i)),H(b,d(s)?d(s).label:"")}),Qe("click",p,()=>P(i,!d(i))),S(e,l),tn()}Ma(["click"]);var Ls=M('<span class="header-tag-above svelte-1xm1ks6"><!></span>'),Ps=M('<span class="header-tag-inline svelte-1xm1ks6"><!></span>'),Ns=M('<p class="header-description svelte-1xm1ks6"> </p>'),Os=M('<header class="header svelte-1xm1ks6"><!> <div class="header-title-row svelte-1xm1ks6"><h1 class="header-title svelte-1xm1ks6"> </h1> <!></div> <!></header>');const Ds={hash:"svelte-1xm1ks6",code:`.header.svelte-1xm1ks6 {display:flex;flex-direction:column;gap:4px;}.header-tag-inline.svelte-1xm1ks6 {display:none;}.header-title-row.svelte-1xm1ks6 {display:flex;align-items:center;gap:10px;}.header-title.svelte-1xm1ks6 {font-size:var(--header-title-font-size);font-weight:var(--header-title-font-weight);color:var(--sevn-color-tertiary);line-height:1.15;}.header-description.svelte-1xm1ks6 {font-size:var(--header-description-font-size);color:var(--sevn-color-tertiary);}
60
+
61
+ @media (max-width: 767px) {.header-title.svelte-1xm1ks6 {font-size:calc(var(--header-title-font-size) * 0.75);max-width:60%;}.header-description.svelte-1xm1ks6 {font-size:calc(var(--header-description-font-size) * 0.9);}
62
+ }
63
+
64
+ @media (min-width: 768px) {.header-tag-above.svelte-1xm1ks6 {display:none;}.header-tag-inline.svelte-1xm1ks6 {display:inline-flex;}
65
+ }`};function Is(e,t){xt(e,Ds);var n=Os(),r=m(n);{var a=l=>{var p=Ls(),g=m(p);Ha(g,{get label(){return t.tag},get color(){return t.tagColor}}),S(l,p)};Z(r,l=>{t.tag&&l(a)})}var o=k(r,2),i=m(o),c=m(i),s=k(i,2);{var f=l=>{var p=Ps(),g=m(p);Ha(g,{get label(){return t.tag},get color(){return t.tagColor}}),S(l,p)};Z(s,l=>{t.tag&&l(f)})}var u=k(o,2);{var _=l=>{var p=Ns(),g=m(p);q(()=>H(g,t.description)),S(l,p)};Z(u,l=>{t.description&&l(_)})}q(()=>{Et(n,`
66
+ --header-title-font-size: ${t.titleFontSize??"1.75rem"??""};
67
+ --header-title-font-weight: ${t.titleFontWeight??700??""};
68
+ --header-description-font-size: ${t.descriptionFontSize??"0.875rem"??""};
69
+ `),H(c,t.title)}),S(e,n)}class Va{constructor(t={}){var n,r,a;this.inflight=new Map,this.tick=0,this.storageKey=(n=t.storageKey)!==null&&n!==void 0?n:"reqcache",this.maxEntries=(r=t.maxEntries)!==null&&r!==void 0?r:100,this.storage=(a=t.storage)!==null&&a!==void 0?a:js()}async getFetch(t,n,r={}){const a=Date.now(),o=this.readAll(),i=o.find(f=>f.rota===t);if(i&&a<i.expiresAt)return i.lastAccess=this.nextAccess(),this.writeAll(o),i.data;const c=this.inflight.get(t);if(c)return c;const s=this.revalidate(t,n,r,i??null).finally(()=>this.inflight.delete(t));return this.inflight.set(t,s),s}invalidate(t){const n=this.readAll().filter(r=>r.rota!==t);this.writeAll(n)}cleanup(t=3600){const n=Date.now()-t*1e3,r=this.readAll(),a=r.filter(o=>o.expiresAt>n);return this.writeAll(a),r.length-a.length}clear(){if(this.storage)try{this.storage.removeItem(this.storageKey)}catch{}}nextAccess(){return this.tick=Math.max(Date.now(),this.tick+1),this.tick}async revalidate(t,n,r,a){var o,i;const c=(o=r.fetcher)!==null&&o!==void 0?o:fetch;let s;try{const u=await c(t,r.fetchOptions);if(!u.ok)throw new Error(`HTTP ${u.status} ao buscar ${t}`);s=await u.json()}catch(u){if(a&&(!((i=r.staleOnError)!==null&&i!==void 0)||i))return this.upsert({...a,expiresAt:Date.now()+n,lastAccess:this.nextAccess()}),a.data;throw u}if(a&&r.monotonicKey){const u=Ba(a.data,r.monotonicKey),_=Ba(s,r.monotonicKey);if(typeof u=="number"&&typeof _=="number"&&_<=u)return this.upsert({...a,expiresAt:Date.now()+n,lastAccess:this.nextAccess()}),a.data}const f=Date.now();return this.upsert({rota:t,data:s,createdAt:f,expiresAt:f+n,lastAccess:this.nextAccess()}),s}upsert(t){const n=this.readAll().filter(r=>r.rota!==t.rota);n.push(t),this.evictIfNeeded(n),this.writeAll(n)}evictIfNeeded(t){for(;t.length>this.maxEntries;){let n=0;for(let r=1;r<t.length;r++)t[r].lastAccess<t[n].lastAccess&&(n=r);t.splice(n,1)}}readAll(){if(!this.storage)return[];try{const t=this.storage.getItem(this.storageKey);if(!t)return[];const n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}}writeAll(t){if(this.storage)try{this.storage.setItem(this.storageKey,JSON.stringify(t))}catch(n){if(Fs(n)&&t.length>0){const r=[...t].sort((a,o)=>a.lastAccess-o.lastAccess);r.splice(0,Math.ceil(r.length/2));try{this.storage.setItem(this.storageKey,JSON.stringify(r))}catch{}}}}}function Ba(e,t){return t.split(".").reduce((n,r)=>{if(n&&typeof n=="object"&&r in n)return n[r]},e)}function Fs(e){return e instanceof Error&&(e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")}function js(){try{if(typeof localStorage<"u"){const e="__reqcache_probe__";return localStorage.setItem(e,"1"),localStorage.removeItem(e),localStorage}}catch{}return null}new Va;const Us=300,dr=new Map;function fr(){try{return typeof window<"u"&&typeof localStorage<"u"}catch{return!1}}const Hs={getItem(e){return fr()?localStorage.getItem(e):dr.get(e)??null},setItem(e,t){if(fr())try{localStorage.setItem(e,t)}catch{console.warn("[api] Cota do localStorage excedida, ignorando escrita")}else dr.set(e,t)},removeItem(e){fr()?localStorage.removeItem(e):dr.delete(e)}};let ur=null;function Vs(){if(!ur){const{storageKey:e,maxEntries:t}=Qt().cache;ur=new Va({storage:Hs,storageKey:e,maxEntries:t})}return ur}async function Bs(e,t,n=Us,r){const[a]=zr(),o=e.replace(/^\/+/,""),i=new URL(o,`${a.replace(/\/+$/,"")}/`);let c;try{c=await Vs().getFetch(i.toString(),n*1e3,{monotonicKey:r,fetcher:io})}catch(s){throw s instanceof Error&&/^HTTP 404 /.test(s.message)?new Error("Dados ainda não publicados"):s}if(c&&typeof c=="object"&&c.published===!1)throw new Error(c.reason??"Dados ainda não publicados");return c}function qs(e,t,n){const r=n?.state?`uf/${n.state.toUpperCase()}`:"br";return Bs(`v1/elections/${e}/${t}/${r}/comparison.json`)}const Ks=new Set(["da","de","do","das","dos","e"]);function Gs(e){return e.toLowerCase().split(" ").map((t,n)=>n>0&&Ks.has(t)?t:t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Zs(e){if(typeof e=="string"){const n=e.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?/);if(n)return new Date(Date.UTC(Number(n[1]),Number(n[2])-1,Number(n[3]),Number(n[4]),Number(n[5]),Number(n[6]??0)))}const t=new Date(e);return Number.isNaN(t.getTime())?null:t}function qa(e){if(e==null||e==="")return"";const t=Zs(e);if(!t)return"";const n=String(t.getUTCDate()).padStart(2,"0"),r=String(t.getUTCMonth()+1).padStart(2,"0"),a=t.getUTCFullYear(),o=String(t.getUTCHours()).padStart(2,"0"),i=String(t.getUTCMinutes()).padStart(2,"0");return`${n}/${r}/${a} às ${o}h${i}`}function Ka(e,t="TSE"){const n=qa(e);return n?`Atualizado em ${n} | Fonte ${t}`:`Fonte ${t}`}qa("2022-10-31T00:18:00Z");const Ys=Ka("2022-10-31T00:18:00Z");var Ws=M('<div class="sevn_vote_comparison_by_round__filter-web svelte-gcb4wg"><!></div> <div class="sevn_vote_comparison_by_round__filter-mobile svelte-gcb4wg"><!></div>',1),Js=M('<p class="sevn_vote_comparison_by_round__status svelte-gcb4wg">2º turno ainda não apurado para este estado.</p>'),Qs=M("<!> <!>",1),Xs=M('<p class="sevn_vote_comparison_by_round__status svelte-gcb4wg">Resultado ainda não publicado para este estado.</p>'),$s=M('<div class="sevn_vote_comparison_by_round__vote_comparison svelte-gcb4wg"><!></div>'),el=M('<div class="sevn_vote_comparison_by_round__search svelte-gcb4wg"><!></div> <!>',1),tl=M("<div><!> <!> <!></div>");const nl={hash:"svelte-gcb4wg",code:`.sevn_vote_comparison_by_round.svelte-gcb4wg {display:flex;flex-direction:column;gap:24px;}.sevn_vote_comparison_by_round__filter-web.svelte-gcb4wg {display:none;}.sevn_vote_comparison_by_round__filter-mobile.svelte-gcb4wg {display:block;width:220px;}.sevn_vote_comparison_by_round__search.svelte-gcb4wg {width:100%;}
70
+
71
+ @media (min-width: 768px) {.sevn_vote_comparison_by_round__filter-web.svelte-gcb4wg {display:block;}.sevn_vote_comparison_by_round__filter-mobile.svelte-gcb4wg {display:none;}
72
+ }.sevn_vote_comparison_by_round__vote_comparison.svelte-gcb4wg {margin-top:10px;}.sevn_vote_comparison_by_round__status.svelte-gcb4wg {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);margin:0;}
73
+
74
+ @media (max-width: 767px) {.sevn_vote_comparison_by_round__search.svelte-gcb4wg .dropdown {position:static;margin-top:10px;}
75
+ }.sevn_vote_comparison_by_round--raw.svelte-gcb4wg,
76
+ .sevn_vote_comparison_by_round--raw.svelte-gcb4wg :where(.svelte-gcb4wg) {all:revert;}`};function rl(e,t){en(t,!0),xt(e,nl);let n=I(t,"mock",3,!1),r=I(t,"rawStyle",3,!1),a=I(t,"defaultOffice",3,"president"),o=I(t,"header",19,()=>({title:"Comparação de votos entre 1º e 2º turno",description:"Veja o resultado por estado",tag:"2º TURNO",tagColor:"var(--sevn-color-blue, #3b82f6)"}));const i=[{value:"presidente",label:"Presidente"},{value:"governador",label:"Governador"}],c={presidente:"president",governador:"governor"},s={president:"presidente",governor:"governador"};let f=$(gt(Ut(()=>s[a()]??"presidente"))),u=$(null);const _=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"am",label:"Amazonas AM"},{value:"ap",label:"Amapá AP"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}].sort((y,C)=>y.label.localeCompare(C.label));let l=$(null);const p={rounds:[{label:"1º Turno",candidatos:[{name:"Candidato A",tag:"ABC",avatar:"man",avatarColor:"var(--sevn-color-primary)",percent:26.54,color:"#8faa96"},{name:"Candidato B",tag:"DEF",avatar:"man",avatarColor:"var(--sevn-color-secondary)",percent:34.38,color:"#c8b97a"}]},{label:"2º Turno",candidatos:[{name:"Candidato A",tag:"ABC",avatar:"man",avatarColor:"var(--sevn-color-primary)",percent:53.73,color:"var(--sevn-color-primary)"},{name:"Candidato B",tag:"DEF",avatar:"man",avatarColor:"var(--sevn-color-secondary)",percent:46.27,color:"var(--sevn-color-secondary)"}]}]},g=se(()=>!!d(u)?.candidates&&d(u).candidates.some(y=>y.round_2?.votes>0)),E=se(()=>{if(n())return p;if(!d(l)||!d(u)?.candidates||!Array.isArray(d(u).candidates))return null;const y=F=>d(u).candidates.map(Q=>({name:Gs(Q.name),photoUrl:Q.photo_url,tag:Q.party_abbr,avatar:"man",avatarColor:Q.party_color,percent:Q[F]?.valid_votes_pct||0,color:Q.party_color})),C=[{label:"1º Turno",candidatos:y("round_1")}];return d(g)&&C.push({label:"2º Turno",candidatos:y("round_2")}),{rounds:C}}),h=se(()=>n()?Ys:Ka(d(u)?.last_updated));zn(()=>{d(l)&&d(f)&&!n()?x(d(l),c[d(f)]||"governor"):d(l)||P(u,null)});async function x(y,C){try{const F=await qs(2026,C,{state:y});P(u,F,!0)}catch(F){console.error("Erro ao buscar dados de comparação:",F)}}var b=tl();let z;var N=m(b);Is(N,{get title(){return o().title},get description(){return o().description},get tag(){return o().tag},get tagColor(){return o().tagColor}});var B=k(N,2);{var te=y=>{var C=Ws(),F=kn(C),Q=m(F);Rs(Q,{label:"Cargo",get options(){return i},get value(){return d(f)},set value(le){P(f,le,!0)}});var ye=k(F,2),ve=m(ye);Ua(ve,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return i},get value(){return d(f)},set value(le){P(f,le,!0)}}),S(y,C)};Z(B,y=>{n()||y(te)})}var K=k(B,2);{var G=y=>{var C=el(),F=kn(C),Q=m(F);{let le=se(()=>d(l)?"Você selecionou:":"Busque por estado");Ua(Q,{get label(){return d(le)},get options(){return _},get value(){return d(l)},set value(Be){P(l,Be,!0)}})}var ye=k(F,2);{var ve=le=>{var Be=$s(),Yt=m(Be);{var xe=Ie=>{var ct=Qs(),Wt=kn(ct);Es(Wt,{get data(){return d(E)},get updatedAt(){return d(h)}});var hn=k(Wt,2);{var pn=dt=>{var _n=Js();S(dt,_n)};Z(hn,dt=>{!n()&&!d(g)&&dt(pn)})}S(Ie,ct)},Tt=Ie=>{var ct=Xs();S(Ie,ct)};Z(Yt,Ie=>{d(E)?Ie(xe):Ie(Tt,!1)})}S(le,Be)};Z(ye,le=>{d(l)&&le(ve)})}S(y,C)};Z(K,y=>{(n()||d(f))&&y(G)})}q(()=>z=Ne(b,1,"sevn_vote_comparison_by_round svelte-gcb4wg",null,z,{"sevn_vote_comparison_by_round--raw":r()})),S(e,b),tn()}const Ga=Ki(rl,"VoteComparisonByRound");return typeof window<"u"&&(window.SevnElections=Object.assign(window.SevnElections||{},{Core:lo,VoteComparisonByRound:Ga}),Zi()),Ga}));