@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,125 @@
1
+ (function(re,ae){typeof exports=="object"&&typeof module<"u"?module.exports=ae():typeof define=="function"&&define.amd?define(ae):(re=typeof globalThis<"u"?globalThis:re||self,re.CountingProgress=ae())})(this,(function(){"use strict";var Ec=Object.defineProperty;var To=re=>{throw TypeError(re)};var Ac=(re,ae,ce)=>ae in re?Ec(re,ae,{enumerable:!0,configurable:!0,writable:!0,value:ce}):re[ae]=ce;var ct=(re,ae,ce)=>Ac(re,typeof ae!="symbol"?ae+"":ae,ce),Un=(re,ae,ce)=>ae.has(re)||To("Cannot "+ce);var h=(re,ae,ce)=>(Un(re,ae,"read from private field"),ce?ce.call(re):ae.get(re)),Z=(re,ae,ce)=>ae.has(re)?To("Cannot add the same private member more than once"):ae instanceof WeakSet?ae.add(re):ae.set(re,ce),K=(re,ae,ce,tr)=>(Un(re,ae,"write to private field"),tr?tr.call(re,ce):ae.set(re,ce),ce),me=(re,ae,ce)=>(Un(re,ae,"access private method"),ce);var pr,gr,Xt,mr,Or,Ir,Jt,_t,_r,Oe,Vn,Kn,Gn,Lo,Je,Dn,wt,Qt,rt,nt,Ie,at,bt,$t,Mt,wr,br,xr,xt,Xr,ge,Tc,Lc,Wn,tn,rn,Yn,Qe,ot,De,er,Dr,Nr,Jr,ko;class re 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 ae extends Error{constructor(e,r){super(`Não foi possível contatar a API para ${e}.`),this.name="SevnNetworkError",this.cause=r}}const ce="__sevnElectionsState_v1__",tr=globalThis;function Zn(t){return tr[ce]||(tr[ce]={config:t(),transport:{activeIndex:0,pinnedAt:0}}),tr[ce]}const Mo="https://failover-api.sevntech.com",Po=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Xn(){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 Ro=Xn;function rr(){return Zn(Xn)}function jo(t){return[`https://${t}-api1.sevnelections.com`,`https://${t}-api2.sevnelections.com`,Mo]}function nn(t){if(typeof t!="string"||!Po.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=rr();e.config.key=t,e.config.apiHosts=jo(t)}function Jn(t){const{cache:e,request:r,key:n,...o}=t,a=rr();a.config={...a.config,...o,cache:{...a.config.cache,...e},request:{...a.config.request,...r}},n&&(nn(n),o.apiHosts&&(a.config.apiHosts=o.apiHosts))}function zr(){return rr().config}function Qn(){return rr().config.apiHosts.length>0}function $n(){if(!Qn())throw new re;return rr().config.apiHosts}function an(t){const{assetsBase:e,assetsVersion:r}=rr().config,n=e.replace(/\/+$/,""),o=String(t).replace(/^\/+/,"");return`${n}/${r}/${o}`}const Oo=':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}',nr=typeof window<"u"&&typeof document<"u",ea="data-sevn-tokens",ta="data-sevn-theme",ra={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 Io(){if(!nr||document.querySelector(`style[${ea}]`))return;const t=document.createElement("style");t.setAttribute(ea,""),t.textContent=Oo,document.head.prepend(t);const e=zr().theme;e&&on(e)}function on(t){if(!nr)return;const e=Object.keys(ra).filter(n=>t[n]).map(n=>` ${ra[n]}: ${t[n]};`);if(e.length===0)return;let r=document.querySelector(`style[${ta}]`);r||(r=document.createElement("style"),r.setAttribute(ta,""),document.head.appendChild(r)),r.textContent=`:root {
2
+ ${e.join(`
3
+ `)}
4
+ }`}function na(){return Zn(Ro).transport}function aa(t){return new Promise(e=>setTimeout(e,t))}function Do(t,e){const r=AbortSignal.timeout(t);return e&&typeof AbortSignal.any=="function"?AbortSignal.any([e,r]):r}function No(t,e){const r=new URL(t),n=new URL(e);return r.protocol=n.protocol,r.host=n.host,r.toString()}function qo(t,e){return Array.from({length:e},(r,n)=>(t+n)%e)}const Fo=async(t,e)=>{const r=typeof t=="string"?t:t instanceof URL?t.toString():t.url,n=$n(),{timeoutMs:o,retriesPerHost:a,retryDelayMs:s,stickyWindowMs:c}=zr().request,l=na();l.activeIndex!==0&&Date.now()-l.pinnedAt>=c&&(l.activeIndex=0);let d=null;for(const v of qo(l.activeIndex,n.length)){const _=No(r,n[v]);for(let f=0;f<a;f++)try{const p=await fetch(_,{...e,signal:Do(o,e?.signal)});if(p.status>=500){d=new Error(`HTTP ${p.status} em ${n[v]}`),f<a-1&&await aa(s);continue}return l.activeIndex=v,l.pinnedAt=Date.now(),p}catch(p){d=p,f<a-1&&await aa(s)}}throw new ae(r,d)};function Ho(){return zr().apiHosts[na().activeIndex]??null}const Bo={applyKey:nn,configure(t){Jn(t),t.theme&&on(t.theme)},getConfig:zr,isReady:Qn,assetUrl:an,setTheme(t){Jn({theme:t}),on(t)},activeHost:Ho},sn=!1;var oa=Array.isArray,Uo=Array.prototype.indexOf,ar=Array.prototype.includes,qr=Array.from,Vo=Object.defineProperty,or=Object.getOwnPropertyDescriptor,Ko=Object.getOwnPropertyDescriptors,Go=Object.prototype,Wo=Array.prototype,ia=Object.getPrototypeOf,sa=Object.isExtensible;const Yo=()=>{};function Zo(t){for(var e=0;e<t.length;e++)t[e]()}function la(){var t,e,r=new Promise((n,o)=>{t=n,e=o});return{promise:r,resolve:t,reject:e}}const _e=2,Cr=4,Fr=8,ca=1<<24,dt=16,Ve=32,Ot=64,ln=128,qe=512,pe=1024,we=2048,Ke=4096,Me=8192,vt=16384,It=32768,ir=65536,da=1<<17,va=1<<18,sr=1<<19,Xo=1<<20,ft=1<<25,Dt=65536,cn=1<<21,dn=1<<22,Ct=1<<23,kr=Symbol("$state"),Jo=Symbol("legacy props"),Qo=Symbol(""),Nt=new class extends Error{constructor(){super(...arguments);ct(this,"name","StaleReactionError");ct(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function $o(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ei(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ti(t,e,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function ri(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ni(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ai(t){throw new Error("https://svelte.dev/e/effect_orphan")}function oi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ii(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function si(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function li(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ci(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function di(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const vi=1,fi=2,fa=4,ui=8,hi=16,pi=1,gi=4,mi=8,_i=16,wi=1,bi=2,be=Symbol(),ua="http://www.w3.org/1999/xhtml";function xi(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ha(t){return t===this.v}function yi(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function pa(t){return!yi(t,this.v)}let zi=!1,Pe=null;function lr(t){Pe=t}function qt(t,e=!1,r){Pe={p:Pe,i:!1,c:null,e:null,s:t,x:null,l:null}}function Ft(t){var e=Pe,r=e.e;if(r!==null){e.e=null;for(var n of r)qa(n)}return e.i=!0,Pe=e.p,{}}function ga(){return!0}let Ht=[];function ma(){var t=Ht;Ht=[],Zo(t)}function ut(t){if(Ht.length===0&&!Sr){var e=Ht;queueMicrotask(()=>{e===Ht&&ma()})}Ht.push(t)}function Ci(){for(;Ht.length>0;)ma()}function _a(t){var e=J;if(e===null)return Y.f|=Ct,t;if((e.f&It)===0&&(e.f&Cr)===0)throw t;cr(t,e)}function cr(t,e){for(;e!==null;){if((e.f&ln)!==0){if((e.f&It)===0)throw t;try{e.b.error(t);return}catch(r){t=r}}e=e.parent}throw t}const ki=-7169;function de(t,e){t.f=t.f&ki|e}function vn(t){(t.f&qe)!==0||t.deps===null?de(t,pe):de(t,Ke)}function wa(t){if(t!==null)for(const e of t)(e.f&_e)===0||(e.f&Dt)===0||(e.f^=Dt,wa(e.deps))}function ba(t,e,r){(t.f&we)!==0?e.add(t):(t.f&Ke)!==0&&r.add(t),wa(t.deps),de(t,pe)}const Hr=new Set;let $=null,fn=null,Ge=null,Ae=[],Br=null,un=!1,Sr=!1;const In=class In{constructor(){Z(this,Oe);ct(this,"committed",!1);ct(this,"current",new Map);ct(this,"previous",new Map);Z(this,pr,new Set);Z(this,gr,new Set);Z(this,Xt,0);Z(this,mr,0);Z(this,Or,null);Z(this,Ir,new Set);Z(this,Jt,new Set);Z(this,_t,new Map);ct(this,"is_fork",!1);Z(this,_r,!1)}skip_effect(e){h(this,_t).has(e)||h(this,_t).set(e,{d:[],m:[]})}unskip_effect(e){var r=h(this,_t).get(e);if(r){h(this,_t).delete(e);for(var n of r.d)de(n,we),We(n);for(n of r.m)de(n,Ke),We(n)}}process(e){Ae=[],this.apply();var r=[],n=[];for(const o of e)me(this,Oe,Kn).call(this,o,r,n);if(me(this,Oe,Vn).call(this)){me(this,Oe,Gn).call(this,n),me(this,Oe,Gn).call(this,r);for(const[o,a]of h(this,_t))ka(o,a)}else{for(const o of h(this,pr))o();h(this,pr).clear(),h(this,Xt)===0&&me(this,Oe,Lo).call(this),fn=this,$=null,ya(n),ya(r),fn=null,h(this,Or)?.resolve()}Ge=null}capture(e,r){r!==be&&!this.previous.has(e)&&this.previous.set(e,r),(e.f&Ct)===0&&(this.current.set(e,e.v),Ge?.set(e,e.v))}activate(){$=this,this.apply()}deactivate(){$===this&&($=null,Ge=null)}flush(){if(this.activate(),Ae.length>0){if(xa(),$!==null&&$!==this)return}else h(this,Xt)===0&&this.process([]);this.deactivate()}discard(){for(const e of h(this,gr))e(this);h(this,gr).clear()}increment(e){K(this,Xt,h(this,Xt)+1),e&&K(this,mr,h(this,mr)+1)}decrement(e){K(this,Xt,h(this,Xt)-1),e&&K(this,mr,h(this,mr)-1),!h(this,_r)&&(K(this,_r,!0),ut(()=>{K(this,_r,!1),me(this,Oe,Vn).call(this)?Ae.length>0&&this.flush():this.revive()}))}revive(){for(const e of h(this,Ir))h(this,Jt).delete(e),de(e,we),We(e);for(const e of h(this,Jt))de(e,Ke),We(e);this.flush()}oncommit(e){h(this,pr).add(e)}ondiscard(e){h(this,gr).add(e)}settled(){return(h(this,Or)??K(this,Or,la())).promise}static ensure(){if($===null){const e=$=new In;Hr.add($),Sr||ut(()=>{$===e&&e.flush()})}return $}apply(){}};pr=new WeakMap,gr=new WeakMap,Xt=new WeakMap,mr=new WeakMap,Or=new WeakMap,Ir=new WeakMap,Jt=new WeakMap,_t=new WeakMap,_r=new WeakMap,Oe=new WeakSet,Vn=function(){return this.is_fork||h(this,mr)>0},Kn=function(e,r,n){e.f^=pe;for(var o=e.first;o!==null;){var a=o.f,s=(a&(Ve|Ot))!==0,c=s&&(a&pe)!==0,l=c||(a&Me)!==0||h(this,_t).has(o);if(!l&&o.fn!==null){s?o.f^=pe:(a&Cr)!==0?r.push(o):Tr(o)&&((a&dt)!==0&&h(this,Jt).add(o),vr(o));var d=o.first;if(d!==null){o=d;continue}}for(;o!==null;){var v=o.next;if(v!==null){o=v;break}o=o.parent}}},Gn=function(e){for(var r=0;r<e.length;r+=1)ba(e[r],h(this,Ir),h(this,Jt))},Lo=function(){var o;if(Hr.size>1){this.previous.clear();var e=Ge,r=!0;for(const a of Hr){if(a===this){r=!1;continue}const s=[];for(const[l,d]of this.current){if(a.current.has(l))if(r&&d!==a.current.get(l))a.current.set(l,d);else continue;s.push(l)}if(s.length===0)continue;const c=[...a.current.keys()].filter(l=>!this.current.has(l));if(c.length>0){var n=Ae;Ae=[];const l=new Set,d=new Map;for(const v of s)za(v,c,l,d);if(Ae.length>0){$=a,a.apply();for(const v of Ae)me(o=a,Oe,Kn).call(o,v,[],[]);a.deactivate()}Ae=n}}$=null,Ge=e}this.committed=!0,Hr.delete(this)};let kt=In;function Si(t){var e=Sr;Sr=!0;try{for(var r;;){if(Ci(),Ae.length===0&&($?.flush(),Ae.length===0))return Br=null,r;xa()}}finally{Sr=e}}function xa(){un=!0;var t=null;try{for(var e=0;Ae.length>0;){var r=kt.ensure();if(e++>1e3){var n,o;Ei()}r.process(Ae),St.clear()}}finally{Ae=[],un=!1,Br=null}}function Ei(){try{oi()}catch(t){cr(t,Br)}}let ht=null;function ya(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(vt|Me))===0&&Tr(n)&&(ht=new Set,vr(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Ua(n),ht?.size>0)){St.clear();for(const o of ht){if((o.f&(vt|Me))!==0)continue;const a=[o];let s=o.parent;for(;s!==null;)ht.has(s)&&(ht.delete(s),a.push(s)),s=s.parent;for(let c=a.length-1;c>=0;c--){const l=a[c];(l.f&(vt|Me))===0&&vr(l)}}ht.clear()}}ht=null}}function za(t,e,r,n){if(!r.has(t)&&(r.add(t),t.reactions!==null))for(const o of t.reactions){const a=o.f;(a&_e)!==0?za(o,e,r,n):(a&(dn|dt))!==0&&(a&we)===0&&Ca(o,e,n)&&(de(o,we),We(o))}}function Ca(t,e,r){const n=r.get(t);if(n!==void 0)return n;if(t.deps!==null)for(const o of t.deps){if(ar.call(e,o))return!0;if((o.f&_e)!==0&&Ca(o,e,r))return r.set(o,!0),!0}return r.set(t,!1),!1}function We(t){var e=Br=t,r=e.b;if(r?.is_pending&&(t.f&(Cr|Fr|ca))!==0&&(t.f&It)===0){r.defer_effect(t);return}for(;e.parent!==null;){e=e.parent;var n=e.f;if(un&&e===J&&(n&dt)!==0&&(n&va)===0&&(n&It)!==0)return;if((n&(Ot|Ve))!==0){if((n&pe)===0)return;e.f^=pe}}Ae.push(e)}function ka(t,e){if(!((t.f&Ve)!==0&&(t.f&pe)!==0)){(t.f&we)!==0?e.d.push(t):(t.f&Ke)!==0&&e.m.push(t),de(t,pe);for(var r=t.first;r!==null;)ka(r,e),r=r.next}}function Ai(t){let e=0,r=Bt(0),n;return()=>{mn()&&(i(r),_n(()=>(e===0&&(n=fr(()=>t(()=>Er(r)))),e+=1,()=>{ut(()=>{e-=1,e===0&&(n?.(),n=void 0,Er(r))})})))}}var Ti=ir|sr;function Li(t,e,r){new Mi(t,e,r)}class Mi{constructor(e,r,n){Z(this,ge);ct(this,"parent");ct(this,"is_pending",!1);Z(this,Je);Z(this,Dn,null);Z(this,wt);Z(this,Qt);Z(this,rt);Z(this,nt,null);Z(this,Ie,null);Z(this,at,null);Z(this,bt,null);Z(this,$t,0);Z(this,Mt,0);Z(this,wr,!1);Z(this,br,new Set);Z(this,xr,new Set);Z(this,xt,null);Z(this,Xr,Ai(()=>(K(this,xt,Bt(h(this,$t))),()=>{K(this,xt,null)})));K(this,Je,e),K(this,wt,r),K(this,Qt,o=>{var a=J;a.b=this,a.f|=ln,n(o)}),this.parent=J.b,K(this,rt,wn(()=>{me(this,ge,Wn).call(this)},Ti))}defer_effect(e){ba(e,h(this,br),h(this,xr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!h(this,wt).pending}update_pending_count(e){me(this,ge,Yn).call(this,e),K(this,$t,h(this,$t)+e),!(!h(this,xt)||h(this,wr))&&(K(this,wr,!0),ut(()=>{K(this,wr,!1),h(this,xt)&&dr(h(this,xt),h(this,$t))}))}get_effect_pending(){return h(this,Xr).call(this),i(h(this,xt))}error(e){var r=h(this,wt).onerror;let n=h(this,wt).failed;if(!r&&!n)throw e;h(this,nt)&&(Te(h(this,nt)),K(this,nt,null)),h(this,Ie)&&(Te(h(this,Ie)),K(this,Ie,null)),h(this,at)&&(Te(h(this,at)),K(this,at,null));var o=!1,a=!1;const s=()=>{if(o){xi();return}o=!0,a&&di(),h(this,at)!==null&&Vt(h(this,at),()=>{K(this,at,null)}),me(this,ge,rn).call(this,()=>{kt.ensure(),me(this,ge,Wn).call(this)})};ut(()=>{try{a=!0,r?.(e,s),a=!1}catch(c){cr(c,h(this,rt)&&h(this,rt).parent)}n&&K(this,at,me(this,ge,rn).call(this,()=>{kt.ensure();try{return Ze(()=>{var c=J;c.b=this,c.f|=ln,n(h(this,Je),()=>e,()=>s)})}catch(c){return cr(c,h(this,rt).parent),null}}))})}}Je=new WeakMap,Dn=new WeakMap,wt=new WeakMap,Qt=new WeakMap,rt=new WeakMap,nt=new WeakMap,Ie=new WeakMap,at=new WeakMap,bt=new WeakMap,$t=new WeakMap,Mt=new WeakMap,wr=new WeakMap,br=new WeakMap,xr=new WeakMap,xt=new WeakMap,Xr=new WeakMap,ge=new WeakSet,Tc=function(){try{K(this,nt,Ze(()=>h(this,Qt).call(this,h(this,Je))))}catch(e){this.error(e)}},Lc=function(){const e=h(this,wt).pending;e&&(this.is_pending=!0,K(this,Ie,Ze(()=>e(h(this,Je)))),ut(()=>{var r=K(this,bt,document.createDocumentFragment()),n=pt();r.append(n),K(this,nt,me(this,ge,rn).call(this,()=>(kt.ensure(),Ze(()=>h(this,Qt).call(this,n))))),h(this,Mt)===0&&(h(this,Je).before(r),K(this,bt,null),Vt(h(this,Ie),()=>{K(this,Ie,null)}),me(this,ge,tn).call(this))}))},Wn=function(){try{if(this.is_pending=this.has_pending_snippet(),K(this,Mt,0),K(this,$t,0),K(this,nt,Ze(()=>{h(this,Qt).call(this,h(this,Je))})),h(this,Mt)>0){var e=K(this,bt,document.createDocumentFragment());Ga(h(this,nt),e);const r=h(this,wt).pending;K(this,Ie,Ze(()=>r(h(this,Je))))}else me(this,ge,tn).call(this)}catch(r){this.error(r)}},tn=function(){this.is_pending=!1;for(const e of h(this,br))de(e,we),We(e);for(const e of h(this,xr))de(e,Ke),We(e);h(this,br).clear(),h(this,xr).clear()},rn=function(e){var r=J,n=Y,o=Pe;et(h(this,rt)),Fe(h(this,rt)),lr(h(this,rt).ctx);try{return e()}catch(a){return _a(a),null}finally{et(r),Fe(n),lr(o)}},Yn=function(e){var r;if(!this.has_pending_snippet()){this.parent&&me(r=this.parent,ge,Yn).call(r,e);return}K(this,Mt,h(this,Mt)+e),h(this,Mt)===0&&(me(this,ge,tn).call(this),h(this,Ie)&&Vt(h(this,Ie),()=>{K(this,Ie,null)}),h(this,bt)&&(h(this,Je).before(h(this,bt)),K(this,bt,null)))};function Pi(t,e,r,n){const o=Ur;var a=t.filter(f=>!f.settled);if(r.length===0&&a.length===0){n(e.map(o));return}var s=$,c=J,l=Ri(),d=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(f=>f.promise)):null;function v(f){l();try{n(f)}catch(p){(c.f&vt)===0&&cr(p,c)}s?.deactivate(),hn()}if(r.length===0){d.then(()=>v(e.map(o)));return}function _(){l(),Promise.all(r.map(f=>Oi(f))).then(f=>v([...e.map(o),...f])).catch(f=>cr(f,c))}d?d.then(_):_()}function Ri(){var t=J,e=Y,r=Pe,n=$;return function(a=!0){et(t),Fe(e),lr(r),a&&n?.activate()}}function hn(){et(null),Fe(null),lr(null)}function ji(){var t=J.b,e=$,r=t.is_rendered();return t.update_pending_count(1),e.increment(r),()=>{t.update_pending_count(-1),e.decrement(r)}}function Ur(t){var e=_e|we,r=Y!==null&&(Y.f&_e)!==0?Y:null;return J!==null&&(J.f|=sr),{ctx:Pe,deps:null,effects:null,equals:ha,f:e,fn:t,reactions:null,rv:0,v:be,wv:0,parent:r??J,ac:null}}function Oi(t,e,r){J===null&&ei();var o=void 0,a=Bt(be),s=!Y,c=new Map;return Yi(()=>{var l=la();o=l.promise;try{Promise.resolve(t()).then(l.resolve,l.reject).then(()=>{d===$&&d.committed&&d.deactivate(),hn()})}catch(f){l.reject(f),hn()}var d=$;if(s){var v=ji();c.get(d)?.reject(Nt),c.delete(d),c.set(d,l)}const _=(f,p=void 0)=>{if(d.activate(),p)p!==Nt&&(a.f|=Ct,dr(a,p));else{(a.f&Ct)!==0&&(a.f^=Ct),dr(a,f);for(const[g,x]of c){if(c.delete(g),g===d)break;x.reject(Nt)}}v&&v()};l.promise.then(_,f=>_(null,f||"unknown"))}),Na(()=>{for(const l of c.values())l.reject(Nt)}),new Promise(l=>{function d(v){function _(){v===o?l(a):d(o)}v.then(_,_)}d(o)})}function B(t){const e=Ur(t);return Ya(e),e}function Sa(t){const e=Ur(t);return e.equals=pa,e}function Ii(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)Te(e[r])}}function Di(t){for(var e=t.parent;e!==null;){if((e.f&_e)===0)return(e.f&vt)===0?e:null;e=e.parent}return null}function pn(t){var e,r=J;et(Di(t));try{t.f&=~Dt,Ii(t),e=$a(t)}finally{et(r)}return e}function Ea(t){var e=pn(t);if(!t.equals(e)&&(t.wv=Ja(),(!$?.is_fork||t.deps===null)&&(t.v=e,t.deps===null))){de(t,pe);return}Tt||(Ge!==null?(mn()||$?.is_fork)&&Ge.set(t,e):vn(t))}function Ni(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac?.abort(Nt),e.teardown=Yo,e.ac=null,Lr(e,0),bn(e))}function Aa(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&vr(e)}let gn=new Set;const St=new Map;let Ta=!1;function Bt(t,e){var r={f:0,v:t,reactions:null,equals:ha,rv:0,wv:0};return r}function X(t,e){const r=Bt(t);return Ya(r),r}function qi(t,e=!1,r=!0){const n=Bt(t);return e||(n.equals=pa),n}function S(t,e,r=!1){Y!==null&&(!Xe||(Y.f&da)!==0)&&ga()&&(Y.f&(_e|dt|dn|da))!==0&&(He===null||!ar.call(He,t))&&ci();let n=r?Ut(e):e;return dr(t,n)}function dr(t,e){if(!t.equals(e)){var r=t.v;Tt?St.set(t,e):St.set(t,r),t.v=e;var n=kt.ensure();if(n.capture(t,r),(t.f&_e)!==0){const o=t;(t.f&we)!==0&&pn(o),vn(o)}t.wv=Ja(),La(t,we),J!==null&&(J.f&pe)!==0&&(J.f&(Ve|Ot))===0&&(Be===null?Xi([t]):Be.push(t)),!n.is_fork&&gn.size>0&&!Ta&&Fi()}return e}function Fi(){Ta=!1;for(const t of gn)(t.f&pe)!==0&&de(t,Ke),Tr(t)&&vr(t);gn.clear()}function Er(t){S(t,t.v+1)}function La(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,o=0;o<n;o++){var a=r[o],s=a.f,c=(s&we)===0;if(c&&de(a,e),(s&_e)!==0){var l=a;Ge?.delete(l),(s&Dt)===0&&(s&qe&&(a.f|=Dt),La(l,Ke))}else c&&((s&dt)!==0&&ht!==null&&ht.add(a),We(a))}}function Ut(t){if(typeof t!="object"||t===null||kr in t)return t;const e=ia(t);if(e!==Go&&e!==Wo)return t;var r=new Map,n=oa(t),o=X(0),a=Gt,s=c=>{if(Gt===a)return c();var l=Y,d=Gt;Fe(null),Xa(a);var v=c();return Fe(l),Xa(d),v};return n&&r.set("length",X(t.length)),new Proxy(t,{defineProperty(c,l,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&si();var v=r.get(l);return v===void 0?s(()=>{var _=X(d.value);return r.set(l,_),_}):S(v,d.value,!0),!0},deleteProperty(c,l){var d=r.get(l);if(d===void 0){if(l in c){const v=s(()=>X(be));r.set(l,v),Er(o)}}else S(d,be),Er(o);return!0},get(c,l,d){if(l===kr)return t;var v=r.get(l),_=l in c;if(v===void 0&&(!_||or(c,l)?.writable)&&(v=s(()=>{var p=Ut(_?c[l]:be),g=X(p);return g}),r.set(l,v)),v!==void 0){var f=i(v);return f===be?void 0:f}return Reflect.get(c,l,d)},getOwnPropertyDescriptor(c,l){var d=Reflect.getOwnPropertyDescriptor(c,l);if(d&&"value"in d){var v=r.get(l);v&&(d.value=i(v))}else if(d===void 0){var _=r.get(l),f=_?.v;if(_!==void 0&&f!==be)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return d},has(c,l){if(l===kr)return!0;var d=r.get(l),v=d!==void 0&&d.v!==be||Reflect.has(c,l);if(d!==void 0||J!==null&&(!v||or(c,l)?.writable)){d===void 0&&(d=s(()=>{var f=v?Ut(c[l]):be,p=X(f);return p}),r.set(l,d));var _=i(d);if(_===be)return!1}return v},set(c,l,d,v){var _=r.get(l),f=l in c;if(n&&l==="length")for(var p=d;p<_.v;p+=1){var g=r.get(p+"");g!==void 0?S(g,be):p in c&&(g=s(()=>X(be)),r.set(p+"",g))}if(_===void 0)(!f||or(c,l)?.writable)&&(_=s(()=>X(void 0)),S(_,Ut(d)),r.set(l,_));else{f=_.v!==be;var x=s(()=>Ut(d));S(_,x)}var u=Reflect.getOwnPropertyDescriptor(c,l);if(u?.set&&u.set.call(v,d),!f){if(n&&typeof l=="string"){var b=r.get("length"),E=Number(l);Number.isInteger(E)&&E>=b.v&&S(b,E+1)}Er(o)}return!0},ownKeys(c){i(o);var l=Reflect.ownKeys(c).filter(_=>{var f=r.get(_);return f===void 0||f.v!==be});for(var[d,v]of r)v.v!==be&&!(d in c)&&l.push(d);return l},setPrototypeOf(){li()}})}var Ma,Pa,Ra,ja;function Hi(){if(Ma===void 0){Ma=window,Pa=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;Ra=or(e,"firstChild").get,ja=or(e,"nextSibling").get,sa(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),sa(r)&&(r.__t=void 0)}}function pt(t=""){return document.createTextNode(t)}function Et(t){return Ra.call(t)}function Ar(t){return ja.call(t)}function z(t,e){return Et(t)}function Ye(t,e=!1){{var r=Et(t);return r instanceof Comment&&r.data===""?Ar(r):r}}function T(t,e=1,r=!1){let n=t;for(;e--;)n=Ar(n);return n}function Bi(t){t.textContent=""}function Oa(){return!1}function Ia(t,e,r){return document.createElementNS(ua,t,void 0)}let Da=!1;function Ui(){Da||(Da=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function Vr(t){var e=Y,r=J;Fe(null),et(null);try{return t()}finally{Fe(e),et(r)}}function Vi(t,e,r,n=r){t.addEventListener(e,()=>Vr(r));const o=t.__on_r;o?t.__on_r=()=>{o(),n(!0)}:t.__on_r=()=>n(!0),Ui()}function Ki(t){J===null&&(Y===null&&ai(),ni()),Tt&&ri()}function Gi(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function gt(t,e,r){var n=J;n!==null&&(n.f&Me)!==0&&(t|=Me);var o={ctx:Pe,deps:null,nodes:null,f:t|we|qe,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{vr(o)}catch(c){throw Te(o),c}else e!==null&&We(o);var a=o;if(r&&a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&(a.f&sr)===0&&(a=a.first,(t&dt)!==0&&(t&ir)!==0&&a!==null&&(a.f|=ir)),a!==null&&(a.parent=n,n!==null&&Gi(a,n),Y!==null&&(Y.f&_e)!==0&&(t&Ot)===0)){var s=Y;(s.effects??(s.effects=[])).push(a)}return o}function mn(){return Y!==null&&!Xe}function Na(t){const e=gt(Fr,null,!1);return de(e,pe),e.teardown=t,e}function At(t){Ki();var e=J.f,r=!Y&&(e&Ve)!==0&&(e&It)===0;if(r){var n=Pe;(n.e??(n.e=[])).push(t)}else return qa(t)}function qa(t){return gt(Cr|Xo,t,!1)}function Wi(t){kt.ensure();const e=gt(Ot|sr,t,!0);return(r={})=>new Promise(n=>{r.outro?Vt(e,()=>{Te(e),n(void 0)}):(Te(e),n(void 0))})}function Fa(t){return gt(Cr,t,!1)}function Yi(t){return gt(dn|sr,t,!0)}function _n(t,e=0){return gt(Fr|e,t,!0)}function R(t,e=[],r=[],n=[]){Pi(n,e,r,o=>{gt(Fr,()=>t(...o.map(i)),!0)})}function wn(t,e=0){var r=gt(dt|e,t,!0);return r}function Ze(t){return gt(Ve|sr,t,!0)}function Ha(t){var e=t.teardown;if(e!==null){const r=Tt,n=Y;Wa(!0),Fe(null);try{e.call(null)}finally{Wa(r),Fe(n)}}}function bn(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const o=r.ac;o!==null&&Vr(()=>{o.abort(Nt)});var n=r.next;(r.f&Ot)!==0?r.parent=null:Te(r,e),r=n}}function Zi(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&Ve)===0&&Te(e),e=r}}function Te(t,e=!0){var r=!1;(e||(t.f&va)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(Ba(t.nodes.start,t.nodes.end),r=!0),bn(t,e&&!r),Lr(t,0),de(t,vt);var n=t.nodes&&t.nodes.t;if(n!==null)for(const a of n)a.stop();Ha(t);var o=t.parent;o!==null&&o.first!==null&&Ua(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=null}function Ba(t,e){for(;t!==null;){var r=t===e?null:Ar(t);t.remove(),t=r}}function Ua(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Vt(t,e,r=!0){var n=[];Va(t,n,!0);var o=()=>{r&&Te(t),e&&e()},a=n.length;if(a>0){var s=()=>--a||o();for(var c of n)c.out(s)}else o()}function Va(t,e,r){if((t.f&Me)===0){t.f^=Me;var n=t.nodes&&t.nodes.t;if(n!==null)for(const c of n)(c.is_global||r)&&e.push(c);for(var o=t.first;o!==null;){var a=o.next,s=(o.f&ir)!==0||(o.f&Ve)!==0&&(t.f&dt)!==0;Va(o,e,s?r:!1),o=a}}}function xn(t){Ka(t,!0)}function Ka(t,e){if((t.f&Me)!==0){t.f^=Me,(t.f&pe)===0&&(de(t,we),We(t));for(var r=t.first;r!==null;){var n=r.next,o=(r.f&ir)!==0||(r.f&Ve)!==0;Ka(r,o?e:!1),r=n}var a=t.nodes&&t.nodes.t;if(a!==null)for(const s of a)(s.is_global||e)&&s.in()}}function Ga(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var o=r===n?null:Ar(r);e.append(r),r=o}}let Kr=!1,Tt=!1;function Wa(t){Tt=t}let Y=null,Xe=!1;function Fe(t){Y=t}let J=null;function et(t){J=t}let He=null;function Ya(t){Y!==null&&(He===null?He=[t]:He.push(t))}let Le=null,Re=0,Be=null;function Xi(t){Be=t}let Za=1,Kt=0,Gt=Kt;function Xa(t){Gt=t}function Ja(){return++Za}function Tr(t){var e=t.f;if((e&we)!==0)return!0;if(e&_e&&(t.f&=~Dt),(e&Ke)!==0){for(var r=t.deps,n=r.length,o=0;o<n;o++){var a=r[o];if(Tr(a)&&Ea(a),a.wv>t.wv)return!0}(e&qe)!==0&&Ge===null&&de(t,pe)}return!1}function Qa(t,e,r=!0){var n=t.reactions;if(n!==null&&!(He!==null&&ar.call(He,t)))for(var o=0;o<n.length;o++){var a=n[o];(a.f&_e)!==0?Qa(a,e,!1):e===a&&(r?de(a,we):(a.f&pe)!==0&&de(a,Ke),We(a))}}function $a(t){var x;var e=Le,r=Re,n=Be,o=Y,a=He,s=Pe,c=Xe,l=Gt,d=t.f;Le=null,Re=0,Be=null,Y=(d&(Ve|Ot))===0?t:null,He=null,lr(t.ctx),Xe=!1,Gt=++Kt,t.ac!==null&&(Vr(()=>{t.ac.abort(Nt)}),t.ac=null);try{t.f|=cn;var v=t.fn,_=v();t.f|=It;var f=t.deps,p=$?.is_fork;if(Le!==null){var g;if(p||Lr(t,Re),f!==null&&Re>0)for(f.length=Re+Le.length,g=0;g<Le.length;g++)f[Re+g]=Le[g];else t.deps=f=Le;if(mn()&&(t.f&qe)!==0)for(g=Re;g<f.length;g++)((x=f[g]).reactions??(x.reactions=[])).push(t)}else!p&&f!==null&&Re<f.length&&(Lr(t,Re),f.length=Re);if(ga()&&Be!==null&&!Xe&&f!==null&&(t.f&(_e|Ke|we))===0)for(g=0;g<Be.length;g++)Qa(Be[g],t);if(o!==null&&o!==t){if(Kt++,o.deps!==null)for(let u=0;u<r;u+=1)o.deps[u].rv=Kt;if(e!==null)for(const u of e)u.rv=Kt;Be!==null&&(n===null?n=Be:n.push(...Be))}return(t.f&Ct)!==0&&(t.f^=Ct),_}catch(u){return _a(u)}finally{t.f^=cn,Le=e,Re=r,Be=n,Y=o,He=a,lr(s),Xe=c,Gt=l}}function Ji(t,e){let r=e.reactions;if(r!==null){var n=Uo.call(r,t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}if(r===null&&(e.f&_e)!==0&&(Le===null||!ar.call(Le,e))){var a=e;(a.f&qe)!==0&&(a.f^=qe,a.f&=~Dt),vn(a),Ni(a),Lr(a,0)}}function Lr(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Ji(t,r[n])}function vr(t){var e=t.f;if((e&vt)===0){de(t,pe);var r=J,n=Kr;J=t,Kr=!0;try{(e&(dt|ca))!==0?Zi(t):bn(t),Ha(t);var o=$a(t);t.teardown=typeof o=="function"?o:null,t.wv=Za;var a;sn&&zi&&(t.f&we)!==0&&t.deps}finally{Kr=n,J=r}}}async function Qi(){await Promise.resolve(),Si()}function i(t){var e=t.f,r=(e&_e)!==0;if(Y!==null&&!Xe){var n=J!==null&&(J.f&vt)!==0;if(!n&&(He===null||!ar.call(He,t))){var o=Y.deps;if((Y.f&cn)!==0)t.rv<Kt&&(t.rv=Kt,Le===null&&o!==null&&o[Re]===t?Re++:Le===null?Le=[t]:Le.push(t));else{(Y.deps??(Y.deps=[])).push(t);var a=t.reactions;a===null?t.reactions=[Y]:ar.call(a,Y)||a.push(Y)}}}if(Tt&&St.has(t))return St.get(t);if(r){var s=t;if(Tt){var c=s.v;return((s.f&pe)===0&&s.reactions!==null||to(s))&&(c=pn(s)),St.set(s,c),c}var l=(s.f&qe)===0&&!Xe&&Y!==null&&(Kr||(Y.f&qe)!==0),d=(s.f&It)===0;Tr(s)&&(l&&(s.f|=qe),Ea(s)),l&&!d&&(Aa(s),eo(s))}if(Ge?.has(t))return Ge.get(t);if((t.f&Ct)!==0)throw t.v;return t.v}function eo(t){if(t.f|=qe,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),(e.f&_e)!==0&&(e.f&qe)===0&&(Aa(e),eo(e))}function to(t){if(t.v===be)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(St.has(e)||(e.f&_e)!==0&&to(e))return!0;return!1}function fr(t){var e=Xe;try{return Xe=!0,t()}finally{Xe=e}}const $i=["touchstart","touchmove"];function es(t){return $i.includes(t)}const Wt=Symbol("events"),ro=new Set,yn=new Set;function ts(t,e,r,n={}){function o(a){if(n.capture||kn.call(e,a),!a.cancelBubble)return Vr(()=>r?.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?ut(()=>{e.addEventListener(t,o,n)}):e.addEventListener(t,o,n),o}function zn(t,e,r,n,o){var a={capture:n,passive:o},s=ts(t,e,r,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Na(()=>{e.removeEventListener(t,s,a)})}function je(t,e,r){(e[Wt]??(e[Wt]={}))[t]=r}function Cn(t){for(var e=0;e<t.length;e++)ro.add(t[e]);for(var r of yn)r(t)}let no=null;function kn(t){var e=this,r=e.ownerDocument,n=t.type,o=t.composedPath?.()||[],a=o[0]||t.target;no=t;var s=0,c=no===t&&t[Wt];if(c){var l=o.indexOf(c);if(l!==-1&&(e===document||e===window)){t[Wt]=e;return}var d=o.indexOf(e);if(d===-1)return;l<=d&&(s=l)}if(a=o[s]||t.target,a!==e){Vo(t,"currentTarget",{configurable:!0,get(){return a||r}});var v=Y,_=J;Fe(null),et(null);try{for(var f,p=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var x=a[Wt]?.[n];x!=null&&(!a.disabled||t.target===a)&&x.call(a,t)}catch(u){f?p.push(u):f=u}if(t.cancelBubble||g===e||g===null)break;a=g}if(f){for(let u of p)queueMicrotask(()=>{throw u});throw f}}finally{t[Wt]=e,delete t.currentTarget,Fe(v),et(_)}}}const rs=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function ns(t){return rs?.createHTML(t)??t}function ao(t,e=!1){var r=Ia("template");return t=t.replaceAll("<!>","<!---->"),r.innerHTML=e?ns(t):t,r.content}function Mr(t,e){var r=J;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function k(t,e){var r=(e&wi)!==0,n=(e&bi)!==0,o,a=!t.startsWith("<!>");return()=>{o===void 0&&(o=ao(a?t:"<!>"+t,!0),r||(o=Et(o)));var s=n||Pa?document.importNode(o,!0):o.cloneNode(!0);if(r){var c=Et(s),l=s.lastChild;Mr(c,l)}else Mr(s,s);return s}}function Sn(t=""){{var e=pt(t+"");return Mr(e,e),e}}function ur(){var t=document.createDocumentFragment(),e=document.createComment(""),r=pt();return t.append(e,r),Mr(e,r),t}function y(t,e){t!==null&&t.before(e)}function G(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r+"")}function as(t,e){return os(t,e)}const Gr=new Map;function os(t,{target:e,anchor:r,props:n={},events:o,context:a,intro:s=!0}){Hi();var c=void 0,l=Wi(()=>{var d=r??e.appendChild(pt());Li(d,{pending:()=>{}},f=>{qt({});var p=Pe;a&&(p.c=a),o&&(n.$$events=o),c=t(f,n)||{},Ft()});var v=new Set,_=f=>{for(var p=0;p<f.length;p++){var g=f[p];if(!v.has(g)){v.add(g);var x=es(g);for(const E of[e,document]){var u=Gr.get(E);u===void 0&&(u=new Map,Gr.set(E,u));var b=u.get(g);b===void 0?(E.addEventListener(g,kn,{passive:x}),u.set(g,1)):u.set(g,b+1)}}}};return _(qr(ro)),yn.add(_),()=>{for(var f of v)for(const x of[e,document]){var p=Gr.get(x),g=p.get(f);--g==0?(x.removeEventListener(f,kn),p.delete(f),p.size===0&&Gr.delete(x)):p.set(f,g)}yn.delete(_),d!==r&&d.parentNode?.removeChild(d)}});return En.set(c,l),c}let En=new WeakMap;function is(t,e){const r=En.get(t);return r?(En.delete(t),r(e)):Promise.resolve()}class ss{constructor(e,r=!0){ct(this,"anchor");Z(this,Qe,new Map);Z(this,ot,new Map);Z(this,De,new Map);Z(this,er,new Set);Z(this,Dr,!0);Z(this,Nr,()=>{var e=$;if(h(this,Qe).has(e)){var r=h(this,Qe).get(e),n=h(this,ot).get(r);if(n)xn(n),h(this,er).delete(r);else{var o=h(this,De).get(r);o&&(h(this,ot).set(r,o.effect),h(this,De).delete(r),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),n=o.effect)}for(const[a,s]of h(this,Qe)){if(h(this,Qe).delete(a),a===e)break;const c=h(this,De).get(s);c&&(Te(c.effect),h(this,De).delete(s))}for(const[a,s]of h(this,ot)){if(a===r||h(this,er).has(a))continue;const c=()=>{if(Array.from(h(this,Qe).values()).includes(a)){var d=document.createDocumentFragment();Ga(s,d),d.append(pt()),h(this,De).set(a,{effect:s,fragment:d})}else Te(s);h(this,er).delete(a),h(this,ot).delete(a)};h(this,Dr)||!n?(h(this,er).add(a),Vt(s,c,!1)):c()}}});Z(this,Jr,e=>{h(this,Qe).delete(e);const r=Array.from(h(this,Qe).values());for(const[n,o]of h(this,De))r.includes(n)||(Te(o.effect),h(this,De).delete(n))});this.anchor=e,K(this,Dr,r)}ensure(e,r){var n=$,o=Oa();if(r&&!h(this,ot).has(e)&&!h(this,De).has(e))if(o){var a=document.createDocumentFragment(),s=pt();a.append(s),h(this,De).set(e,{effect:Ze(()=>r(s)),fragment:a})}else h(this,ot).set(e,Ze(()=>r(this.anchor)));if(h(this,Qe).set(n,e),o){for(const[c,l]of h(this,ot))c===e?n.unskip_effect(l):n.skip_effect(l);for(const[c,l]of h(this,De))c===e?n.unskip_effect(l.effect):n.skip_effect(l.effect);n.oncommit(h(this,Nr)),n.ondiscard(h(this,Jr))}else h(this,Nr).call(this)}}Qe=new WeakMap,ot=new WeakMap,De=new WeakMap,er=new WeakMap,Dr=new WeakMap,Nr=new WeakMap,Jr=new WeakMap;function j(t,e,r=!1){var n=new ss(t),o=r?ir:0;function a(s,c){n.ensure(s,c)}wn(()=>{var s=!1;e((c,l=0)=>{s=!0,a(l,c)}),s||a(!1,null)},o)}function Pr(t,e){return e}function ls(t,e,r){for(var n=[],o=e.length,a,s=e.length,c=0;c<o;c++){let _=e[c];Vt(_,()=>{if(a){if(a.pending.delete(_),a.done.add(_),a.pending.size===0){var f=t.outrogroups;An(qr(a.done)),f.delete(a),f.size===0&&(t.outrogroups=null)}}else s-=1},!1)}if(s===0){var l=n.length===0&&r!==null;if(l){var d=r,v=d.parentNode;Bi(v),v.append(d),t.items.clear()}An(e,!l)}else a={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(a)}function An(t,e=!0){for(var r=0;r<t.length;r++)Te(t[r],e)}var oo;function Yt(t,e,r,n,o,a=null){var s=t,c=new Map,l=(e&fa)!==0;if(l){var d=t;s=d.appendChild(pt())}var v=null,_=Sa(()=>{var b=r();return oa(b)?b:b==null?[]:qr(b)}),f,p=!0;function g(){u.fallback=v,cs(u,f,s,e,n),v!==null&&(f.length===0?(v.f&ft)===0?xn(v):(v.f^=ft,jr(v,null,s)):Vt(v,()=>{v=null}))}var x=wn(()=>{f=i(_);for(var b=f.length,E=new Set,O=$,L=Oa(),N=0;N<b;N+=1){var M=f[N],P=n(M,N),V=p?null:c.get(P);V?(V.v&&dr(V.v,M),V.i&&dr(V.i,N),L&&O.unskip_effect(V.e)):(V=ds(c,p?s:oo??(oo=pt()),M,P,N,o,e,r),p||(V.e.f|=ft),c.set(P,V)),E.add(P)}if(b===0&&a&&!v&&(p?v=Ze(()=>a(s)):(v=Ze(()=>a(oo??(oo=pt()))),v.f|=ft)),b>E.size&&ti(),!p)if(L){for(const[q,F]of c)E.has(q)||O.skip_effect(F.e);O.oncommit(g),O.ondiscard(()=>{})}else g();i(_)}),u={effect:x,items:c,outrogroups:null,fallback:v};p=!1}function Rr(t){for(;t!==null&&(t.f&Ve)===0;)t=t.next;return t}function cs(t,e,r,n,o){var a=(n&ui)!==0,s=e.length,c=t.items,l=Rr(t.effect.first),d,v=null,_,f=[],p=[],g,x,u,b;if(a)for(b=0;b<s;b+=1)g=e[b],x=o(g,b),u=c.get(x).e,(u.f&ft)===0&&(u.nodes?.a?.measure(),(_??(_=new Set)).add(u));for(b=0;b<s;b+=1){if(g=e[b],x=o(g,b),u=c.get(x).e,t.outrogroups!==null)for(const F of t.outrogroups)F.pending.delete(u),F.done.delete(u);if((u.f&ft)!==0)if(u.f^=ft,u===l)jr(u,null,r);else{var E=v?v.next:l;u===t.effect.last&&(t.effect.last=u.prev),u.prev&&(u.prev.next=u.next),u.next&&(u.next.prev=u.prev),Lt(t,v,u),Lt(t,u,E),jr(u,E,r),v=u,f=[],p=[],l=Rr(v.next);continue}if((u.f&Me)!==0&&(xn(u),a&&(u.nodes?.a?.unfix(),(_??(_=new Set)).delete(u))),u!==l){if(d!==void 0&&d.has(u)){if(f.length<p.length){var O=p[0],L;v=O.prev;var N=f[0],M=f[f.length-1];for(L=0;L<f.length;L+=1)jr(f[L],O,r);for(L=0;L<p.length;L+=1)d.delete(p[L]);Lt(t,N.prev,M.next),Lt(t,v,N),Lt(t,M,O),l=O,v=M,b-=1,f=[],p=[]}else d.delete(u),jr(u,l,r),Lt(t,u.prev,u.next),Lt(t,u,v===null?t.effect.first:v.next),Lt(t,v,u),v=u;continue}for(f=[],p=[];l!==null&&l!==u;)(d??(d=new Set)).add(l),p.push(l),l=Rr(l.next);if(l===null)continue}(u.f&ft)===0&&f.push(u),v=u,l=Rr(u.next)}if(t.outrogroups!==null){for(const F of t.outrogroups)F.pending.size===0&&(An(qr(F.done)),t.outrogroups?.delete(F));t.outrogroups.size===0&&(t.outrogroups=null)}if(l!==null||d!==void 0){var P=[];if(d!==void 0)for(u of d)(u.f&Me)===0&&P.push(u);for(;l!==null;)(l.f&Me)===0&&l!==t.fallback&&P.push(l),l=Rr(l.next);var V=P.length;if(V>0){var q=(n&fa)!==0&&s===0?r:null;if(a){for(b=0;b<V;b+=1)P[b].nodes?.a?.measure();for(b=0;b<V;b+=1)P[b].nodes?.a?.fix()}ls(t,P,q)}}a&&ut(()=>{if(_!==void 0)for(u of _)u.nodes?.a?.apply()})}function ds(t,e,r,n,o,a,s,c){var l=(s&vi)!==0?(s&hi)===0?qi(r,!1,!1):Bt(r):null,d=(s&fi)!==0?Bt(o):null;return{v:l,i:d,e:Ze(()=>(a(e,l??r,d??o,c),()=>{t.delete(n)}))}}function jr(t,e,r){if(t.nodes)for(var n=t.nodes.start,o=t.nodes.end,a=e&&(e.f&ft)===0?e.nodes.start:r;n!==null;){var s=Ar(n);if(a.before(n),n===o)return;n=s}}function Lt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function io(t,e,r=!1,n=!1,o=!1){var a=t,s="";R(()=>{var c=J;if(s!==(s=e()??"")&&(c.nodes!==null&&(Ba(c.nodes.start,c.nodes.end),c.nodes=null),s!=="")){var l=s+"";r?l=`<svg>${l}</svg>`:n&&(l=`<math>${l}</math>`);var d=ao(l);if((r||n)&&(d=Et(d)),Mr(Et(d),d.lastChild),r||n)for(;Et(d);)a.before(Et(d));else a.before(d)}})}function tt(t,e){Fa(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const o=Ia("style");o.id=e.hash,o.textContent=e.code,n.appendChild(o)}})}const so=[...`
5
+ \r\f \v\uFEFF`];function vs(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var o in r)if(r[o])n=n?n+" "+o:o;else if(n.length)for(var a=o.length,s=0;(s=n.indexOf(o,s))>=0;){var c=s+a;(s===0||so.includes(n[s-1]))&&(c===n.length||so.includes(n[c]))?n=(s===0?"":n.substring(0,s))+n.substring(c+1):s=c}}return n===""?null:n}function fs(t,e){return t==null?null:String(t)}function xe(t,e,r,n,o,a){var s=t.__className;if(s!==r||s===void 0){var c=vs(r,n,a);c==null?t.removeAttribute("class"):t.className=c,t.__className=r}else if(a&&o!==a)for(var l in a){var d=!!a[l];(o==null||d!==!!o[l])&&t.classList.toggle(l,d)}return a}function mt(t,e,r,n){var o=t.__style;if(o!==e){var a=fs(e);a==null?t.removeAttribute("style"):t.style.cssText=a,t.__style=e}return n}const us=Symbol("is custom element"),hs=Symbol("is html");function Q(t,e,r,n){var o=ps(t);o[e]!==(o[e]=r)&&(e==="loading"&&(t[Qo]=r),r==null?t.removeAttribute(e):typeof r!="string"&&gs(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function ps(t){return t.__attributes??(t.__attributes={[us]:t.nodeName.includes("-"),[hs]:t.namespaceURI===ua})}var lo=new Map;function gs(t){var e=t.getAttribute("is")||t.nodeName,r=lo.get(e);if(r)return r;lo.set(e,r=[]);for(var n,o=t,a=Element.prototype;a!==o;){n=Ko(o);for(var s in n)n[s].set&&r.push(s);o=ia(o)}return r}function ms(t,e,r=e){var n=new WeakSet;Vi(t,"input",async o=>{var a=o?t.defaultValue:t.value;if(a=Tn(t)?Ln(a):a,r(a),$!==null&&n.add($),await Qi(),a!==(a=e())){var s=t.selectionStart,c=t.selectionEnd,l=t.value.length;if(t.value=a??"",c!==null){var d=t.value.length;s===c&&c===l&&d>l?(t.selectionStart=d,t.selectionEnd=d):(t.selectionStart=s,t.selectionEnd=Math.min(c,d))}}}),fr(e)==null&&t.value&&(r(Tn(t)?Ln(t.value):t.value),$!==null&&n.add($)),_n(()=>{var o=e();if(t===document.activeElement){var a=fn??$;if(n.has(a))return}Tn(t)&&o===Ln(t.value)||t.type==="date"&&!o&&!t.value||o!==t.value&&(t.value=o??"")})}function Tn(t){var e=t.type;return e==="number"||e==="range"}function Ln(t){return t===""?null:+t}function co(t,e){return t===e||t?.[kr]===e}function Zt(t={},e,r,n){return Fa(()=>{var o,a;return _n(()=>{o=a,a=[],fr(()=>{t!==r(...a)&&(e(t,...a),o&&co(r(...o),t)&&e(null,...o))})}),()=>{ut(()=>{a&&co(r(...a),t)&&e(null,...a)})}}),t}let Wr=!1;function _s(t){var e=Wr;try{return Wr=!1,[t(),Wr]}finally{Wr=e}}function I(t,e,r,n){var o=(r&mi)!==0,a=(r&_i)!==0,s=n,c=!0,l=()=>(c&&(c=!1,s=a?fr(n):n),s),d;if(o){var v=kr in t||Jo in t;d=or(t,e)?.set??(v&&e in t?E=>t[e]=E:void 0)}var _,f=!1;o?[_,f]=_s(()=>t[e]):_=t[e],_===void 0&&n!==void 0&&(_=l(),d&&(ii(),d(_)));var p;if(p=()=>{var E=t[e];return E===void 0?l():(c=!0,E)},(r&gi)===0)return p;if(d){var g=t.$$legacy;return(function(E,O){return arguments.length>0?((!O||g||f)&&d(O?p():E),E):p()})}var x=!1,u=((r&pi)!==0?Ur:Sa)(()=>(x=!1,p()));o&&i(u);var b=J;return(function(E,O){if(arguments.length>0){const L=O?i(u):o?Ut(E):E;return S(u,L),x=!0,s!==void 0&&(s=L),E}return Tt&&x||(b.f&vt)!==0?u.v:i(u)})}function vo(t){Pe===null&&$o(),At(()=>{const e=fr(t);if(typeof e=="function")return e})}function ws(t,e){var r,n;return n=class{constructor(a){Z(this,r,null);if(!nr)throw new Error(`[sevn] ${e} só pode ser instanciado no navegador. Em SSR, monte o componente dentro de um efeito de cliente.`);const{target:s,...c}=a??{},l=typeof s=="string"?document.querySelector(s):s;if(!l)throw new Error(`[sevn] ${e}: alvo não encontrado`+(typeof s=="string"?` para o seletor "${s}".`:"."));Io(),K(this,r,as(t,{target:l,props:c}))}destroy(){if(!h(this,r))return Promise.resolve();const a=h(this,r);return K(this,r,null),is(a)}},r=new WeakMap,n}function fo(t){try{return new URL(t,document.baseURI).searchParams.get("cid")}catch{return null}}function bs(){const t=document.currentScript;if(t?.src){const r=fo(t.src);if(r)return r}const e=document.querySelectorAll('script[src*="cid="]');for(const r of e){const n=fo(r.src);if(n)return n}return null}function xs(){if(!nr)return;const t=bs();if(t)try{nn(t)}catch(e){console.error("[sevn] Chave inválida na tag <script>:",e)}}const ys="5";typeof window<"u"&&((ko=window.__svelte??(window.__svelte={})).v??(ko.v=new Set)).add(ys);const zs="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",Cs="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 ks=k('<span class="avatar-tag svelte-ga6vh2"> </span>'),Ss=k('<div class="avatar-container svelte-ga6vh2"><div class="avatar svelte-ga6vh2"><img width="1" height="1"/></div> <!></div>');const Es={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 uo(t,e){tt(t,Es);let r=I(e,"avatar",3,"man"),n=I(e,"size",3,"md"),o=I(e,"tagColor",3,"var(--sevn-color-green)"),a=X(!1);const s=B(()=>r()==="woman"?Cs:zs),c=B(()=>!!e.photoUrl&&!i(a)),l=B(()=>i(c)?e.photoUrl:i(s)),d={sm:"40px",md:"56px",lg:"72px"},v={sm:{fontSize:"9px",padding:"1px 5px"},md:{fontSize:"12px",padding:"2px 8px"},lg:{fontSize:"14px",padding:"3px 10px"}},_=B(()=>d[n()]??n()),f=B(()=>v[n()]??v.md);var p=Ss(),g=z(p),x=z(g);let u;var b=T(g,2);{var E=O=>{var L=ks(),N=z(L);R(()=>{mt(L,`background-color: ${o()??""}; font-size: ${i(f).fontSize??""}; padding: ${i(f).padding??""};`),G(N,e.tag)}),y(O,L)};j(b,O=>{e.tag&&O(E)})}R(()=>{mt(g,`background-color: ${e.avatarColor??"var(--sevn-color-secondary)"??""}; width: ${i(_)??""}; height: ${i(_)??""};`),u=xe(x,1,"avatar-image svelte-ga6vh2",null,u,{"avatar-image--photo":i(c)}),Q(x,"src",i(l)),Q(x,"alt",e.name)}),zn("error",x,()=>S(a,!0)),y(t,p)}const As="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",ho="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",po="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=k('<span class="mobile-label svelte-1dw55dz"> </span>'),Ls=k('<input class="search-input svelte-1dw55dz" type="text"/>'),Ms=k('<span class="field-label-prefix svelte-1dw55dz"> </span>'),Ps=k('<span class="field-text svelte-1dw55dz"><!> </span>'),Rs=k("<span> </span>"),js=k('<button class="icon-clear svelte-1dw55dz" type="button" aria-label="Limpar seleção"><img alt="" aria-hidden="true"/></button>'),Os=k('<img alt="" aria-hidden="true"/>'),Is=k('<img class="icon-search svelte-1dw55dz" alt="" aria-hidden="true"/>'),Ds=k('<span class="meta svelte-1dw55dz"> </span>'),Ns=k('<div class="web-info svelte-1dw55dz"><span class="selected-label svelte-1dw55dz"><strong class="svelte-1dw55dz">Você selecionou:</strong> </span> <!></div>'),qs=k('<button type="button" role="option"> </button>'),Fs=k('<div class="no-results svelte-1dw55dz">Nenhum resultado encontrado</div>'),Hs=k('<div class="dropdown svelte-1dw55dz" role="listbox"></div>'),Bs=k('<div><!> <div role="combobox" aria-haspopup="listbox"><!> <!></div> <!> <!></div>');const Us={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 Mn(t,e){qt(e,!0),tt(t,Us);let r=I(e,"label",3,""),n=I(e,"showLabel",3,!0),o=I(e,"options",19,()=>[]),a=I(e,"value",15,null),s=I(e,"meta",3,""),c=I(e,"width",3,"100%"),l=I(e,"height",3,"48px"),d=I(e,"icon",3,As),v=I(e,"iconSize",3,13),_=I(e,"showLabelInField",3,!1),f=I(e,"showDescriptionSelection",3,!0),p=I(e,"labelAsPlaceholder",3,!0),g=I(e,"showPlaceholderOnMobile",3,!1),x=I(e,"disabled",3,!1),u=I(e,"clearable",3,!0);const b=`autocomplete-listbox-${Math.random().toString(36).slice(2,9)}`;let E=X(!1),O=X(""),L=X(null),N=X(null),M=B(()=>i(O).trim()?o().filter(w=>w.label.toLowerCase().includes(i(O).trim().toLowerCase())):o()),P=B(()=>a()!=null?o().find(w=>w.value===a())??null:null);function V(w){a(w.value),S(O,""),S(E,!1)}function q(){x()||(S(E,!i(E)),i(E)||S(O,""))}function F(w){w.stopPropagation(),a(null),S(O,""),S(E,!1)}function oe(w){w.target===w.currentTarget&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),q())}function ve(w){i(L)&&!i(L).contains(w.target)&&(S(E,!1),S(O,""))}function se(w){w.key==="Escape"&&(S(E,!1),S(O,""))}At(()=>{i(E)&&i(N)&&i(N).focus()}),At(()=>{x()&&(S(E,!1),S(O,""))}),vo(()=>(document.addEventListener("mousedown",ve),()=>document.removeEventListener("mousedown",ve)));var ee=Bs();let Ce;var Ne=z(ee);{var it=w=>{var A=Ts(),D=z(A);R(()=>G(D,r())),y(w,A)};j(Ne,w=>{n()&&r()&&w(it)})}var ie=T(Ne,2);let W;var ne=z(ie);{var ue=w=>{var A=Ls();Zt(A,D=>S(N,D),()=>i(N)),R(()=>Q(A,"placeholder",r())),je("keydown",A,se),je("click",A,D=>D.stopPropagation()),ms(A,()=>i(O),D=>S(O,D)),y(w,A)},$e=w=>{var A=Ps(),D=z(A);{var U=fe=>{var Se=Ms(),Ue=z(Se);R(()=>G(Ue,r())),y(fe,Se)};j(D,fe=>{_()&&fe(U)})}var te=T(D,1,!0);R(()=>G(te,i(P).label)),y(w,A)},st=w=>{var A=ur(),D=Ye(A);{var U=te=>{var fe=Rs();let Se;var Ue=z(fe);R(()=>{Se=xe(fe,1,"field-text is-placeholder svelte-1dw55dz",null,Se,{"force-placeholder":g()}),G(Ue,r())}),y(te,fe)};j(D,te=>{p()&&te(U)})}y(w,A)};j(ne,w=>{i(E)?w(ue):i(P)?w($e,1):w(st,!1)})}var yt=T(ne,2);{var le=w=>{var A=js(),D=z(A);R(()=>{Q(D,"src",po),Q(D,"width",v()?v():12),Q(D,"height",v()?v():12)}),je("click",A,F),y(w,A)},ye=w=>{var A=Os();let D;R(()=>{D=xe(A,1,"icon-chevron svelte-1dw55dz",null,D,{open:i(E)}),Q(A,"src",ho),Q(A,"width",v()?v():12),Q(A,"height",v()?v():12)}),y(w,A)},ke=w=>{var A=Is();R(()=>{Q(A,"src",d()),Q(A,"width",v()),Q(A,"height",v())}),y(w,A)};j(yt,w=>{i(P)&&u()&&!x()?w(le):i(P)?w(ye,1):w(ke,!1)})}var lt=T(ie,2);{var m=w=>{var A=Ns(),D=z(A),U=T(z(D)),te=T(D,2);{var fe=Se=>{var Ue=Ds(),Pt=z(Ue);R(()=>G(Pt,s())),y(Se,Ue)};j(te,Se=>{s()&&Se(fe)})}R(()=>G(U,` ${i(P).label??""}`)),y(w,A)};j(lt,w=>{i(P)&&f()&&w(m)})}var C=T(lt,2);{var H=w=>{var A=Hs();Yt(A,21,()=>i(M),D=>D.value,(D,U)=>{var te=qs();let fe;var Se=z(te);R(()=>{fe=xe(te,1,"option svelte-1dw55dz",null,fe,{selected:i(U).value===a()}),Q(te,"aria-selected",i(U).value===a()),G(Se,i(U).label)}),je("click",te,()=>V(i(U))),y(D,te)},D=>{var U=Fs();y(D,U)}),R(()=>Q(A,"id",b)),y(w,A)};j(C,w=>{i(E)&&w(H)})}Zt(ee,w=>S(L,w),()=>i(L)),R(()=>{Ce=xe(ee,1,"autocomplete svelte-1dw55dz",null,Ce,{"show-placeholder-mobile":g()}),mt(ee,`--field-width: ${c()??""}; --field-height: ${l()??""}`),W=xe(ie,1,"field svelte-1dw55dz",null,W,{open:i(E),"has-value":i(P)&&!i(E),disabled:x()}),Q(ie,"tabindex",x()?-1:0),Q(ie,"aria-controls",b),Q(ie,"aria-expanded",i(E)),Q(ie,"aria-disabled",x())}),je("click",ie,q),je("keydown",ie,oe),y(t,ee),Ft()}Cn(["click","keydown"]);const go="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.5%206.5L19%2012L13.5%2017.5M17.75%2012L4.75%2012'%20stroke='%231C1C1C'%20stroke-width='2'%20stroke-linecap='square'/%3e%3c/svg%3e";var Vs=k("<span> </span>");const Ks={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 hr(t,e){tt(t,Ks);let r=I(e,"color",3,"#1C1C1C"),n=I(e,"fontSize",3,"0.6875rem"),o=I(e,"class",3,"");var a=Vs(),s=z(a);R(()=>{xe(a,1,`tag ${o()??""}`,"svelte-pamnib"),mt(a,`background-color: ${r()??""}; font-size: ${n()??""}`),G(s,e.label)}),y(t,a)}var Gs=k('<p class="candidate-description svelte-q1jzvs"> </p>'),Ws=k('<span class="candidate-stats-percent-suffix svelte-q1jzvs"> </span>'),Ys=k('<span class="candidate-stats-percent svelte-q1jzvs"> <!></span>'),Zs=k('<span class="candidate-stats-votes svelte-q1jzvs"> </span>'),Xs=k('<div class="candidate-stats svelte-q1jzvs"><!> <!></div>'),Js=k('<div class="candidate-wrapper svelte-q1jzvs"><!> <div><div class="candidate-name-row svelte-q1jzvs"><span class="candidate-name svelte-q1jzvs"> </span> <!> <!></div> <!></div></div>'),Qs=k('<p class="candidate-description svelte-q1jzvs"> </p>'),$s=k('<span class="candidate-stats-percent-suffix svelte-q1jzvs"> </span>'),el=k('<span class="candidate-stats-percent svelte-q1jzvs"> <!></span>'),tl=k('<span class="candidate-stats-votes svelte-q1jzvs"> </span>'),rl=k('<div class="candidate-stats svelte-q1jzvs"><!> <!></div>'),nl=k('<!> <div><div class="candidate-name-row svelte-q1jzvs"><span class="candidate-name svelte-q1jzvs"> </span> <!> <!></div> <!></div>',1),al=k("<span> </span>"),ol=k('<div class="candidate svelte-q1jzvs"><!> <!></div>');const il={hash:"svelte-q1jzvs",code:`.candidate.svelte-q1jzvs {display:flex;align-items:center;justify-content:space-between;}.candidate-wrapper.svelte-q1jzvs {display:flex;align-items:center;gap:15px;}.candidate-info.svelte-q1jzvs {display:flex;flex-direction:column;gap:2px;}
33
+
34
+ /* Desktop: description on the right inside the info block */.candidate-info.right.svelte-q1jzvs {flex:1;flex-direction:row;flex-wrap:wrap;align-items:center;}.candidate-info.right.svelte-q1jzvs .candidate-description:where(.svelte-q1jzvs) {margin-left:auto;flex-shrink:0;}.candidate-name-row.svelte-q1jzvs {display:flex;align-items:center;gap:8px;flex-wrap:wrap;}.candidate-name.svelte-q1jzvs {font-size:var(--font-name);font-weight:var(--weight-name);color:var(--sevn-color-tertiary);line-height:1.2;}.candidate-description.svelte-q1jzvs {font-size:var(--font-desc);font-weight:var(--weight-desc);color:var(--sevn-color-tertiary);opacity:0.7;}.candidate-position.svelte-q1jzvs {font-size:var(--font-position);font-weight:600;color:var(--sevn-color-tertiary);white-space:nowrap;flex-shrink:0;margin-left:auto;}.candidate-position.left.svelte-q1jzvs {order:-1;margin-left:0;}
35
+
36
+ /* ── Stats ─────────────────────────────── */.candidate-stats.svelte-q1jzvs {display:flex;flex-direction:column;gap:4px;align-items:baseline;flex-shrink:0;}.candidate-stats-percent.svelte-q1jzvs {font-size:1rem;font-weight:700;color:var(--sevn-color-tertiary);line-height:1.2;}.candidate-stats-votes.svelte-q1jzvs {font-size:var(--font-desc);font-weight:400;color:var(--sevn-color-tertiary);opacity:0.7;}.candidate-stats-percent-suffix.svelte-q1jzvs {display:inline;margin-left:4px;}
37
+
38
+ @media (min-width: 768px) {.candidate-stats.svelte-q1jzvs {flex-direction:row;gap:8px;}.candidate-stats-percent-suffix.svelte-q1jzvs {display:none;}
39
+ }
40
+
41
+ @media (max-width: 640px) {.candidate.svelte-q1jzvs {flex:1;flex-wrap:wrap;align-items:center;}.candidate-info.svelte-q1jzvs {flex:1;}
42
+
43
+ /* Mobile: description keeps right alignment */.candidate-info.right.svelte-q1jzvs {flex-direction:row;align-items:center;}.candidate-position.svelte-q1jzvs {order:3;margin-left:auto;}.candidate-position.left.svelte-q1jzvs {order:-1;margin-left:0;}
44
+ }`};function Yr(t,e){tt(t,il);let r=I(e,"avatar",3,"man"),n=I(e,"elected",3,!1),o=I(e,"electedLabel",3,"ELEITO"),a=I(e,"electedColor",3,"var(--sevn-color-green)"),s=I(e,"descriptionSide",3,"inline"),c=I(e,"positionSide",3,"right"),l=I(e,"size",3,"md"),d=I(e,"nameWeight",3,700),v=I(e,"descWeight",3,400),_=I(e,"wrapper",3,!1);const f={sm:{fontSize:"0.875rem",descSize:"0.75rem",tagSize:"0.625rem"},md:{fontSize:"1.125rem",descSize:"0.875rem",tagSize:"0.6875rem"},lg:{fontSize:"1.375rem",descSize:"1rem",tagSize:"0.75rem"}},p=B(()=>f[l()]??f.md);var g=ol(),x=z(g);{var u=L=>{var N=Js(),M=z(N);uo(M,{get name(){return e.name},get photoUrl(){return e.photoUrl},get avatar(){return r()},get avatarColor(){return e.avatarColor},get size(){return l()},get tag(){return e.avatarTag},get tagColor(){return e.avatarTagColor}});var P=T(M,2);let V;var q=z(P),F=z(q),oe=z(F),ve=T(F,2);{var se=W=>{{let ne=B(()=>e.tagColor??"var(--sevn-color-secondary)"),ue=B(()=>e.tagSize??i(p).tagSize);hr(W,{get label(){return e.tag},get color(){return i(ne)},get fontSize(){return i(ue)}})}};j(ve,W=>{e.tag&&W(se)})}var ee=T(ve,2);{var Ce=W=>{{let ne=B(()=>e.tagSize??i(p).tagSize);hr(W,{get label(){return o()},get color(){return a()},get fontSize(){return i(ne)}})}};j(ee,W=>{n()&&W(Ce)})}var Ne=T(q,2);{var it=W=>{var ne=Gs(),ue=z(ne);R(()=>G(ue,e.description)),y(W,ne)},ie=W=>{var ne=Xs(),ue=z(ne);{var $e=le=>{var ye=Ys(),ke=z(ye),lt=T(ke);{var m=C=>{var H=Ws(),w=z(H);R(()=>G(w,e.percentSuffix)),y(C,H)};j(lt,C=>{e.percentSuffix&&C(m)})}R(()=>G(ke,`${e.percent??""} `)),y(le,ye)};j(ue,le=>{e.percent&&le($e)})}var st=T(ue,2);{var yt=le=>{var ye=Zs(),ke=z(ye);R(()=>G(ke,e.votes)),y(le,ye)};j(st,le=>{e.votes&&le(yt)})}y(W,ne)};j(Ne,W=>{e.description?W(it):(e.percent||e.votes)&&W(ie,1)})}R(()=>{V=xe(P,1,"candidate-info svelte-q1jzvs",null,V,{right:s()==="right"&&!!e.description}),G(oe,e.name)}),y(L,N)},b=L=>{var N=nl(),M=Ye(N);uo(M,{get name(){return e.name},get photoUrl(){return e.photoUrl},get avatar(){return r()},get avatarColor(){return e.avatarColor},get size(){return l()},get tag(){return e.avatarTag},get tagColor(){return e.avatarTagColor}});var P=T(M,2);let V;var q=z(P),F=z(q),oe=z(F),ve=T(F,2);{var se=W=>{{let ne=B(()=>e.tagColor??"var(--sevn-color-secondary)"),ue=B(()=>e.tagSize??i(p).tagSize);hr(W,{get label(){return e.tag},get color(){return i(ne)},get fontSize(){return i(ue)}})}};j(ve,W=>{e.tag&&W(se)})}var ee=T(ve,2);{var Ce=W=>{{let ne=B(()=>e.tagSize??i(p).tagSize);hr(W,{get label(){return o()},get color(){return a()},get fontSize(){return i(ne)}})}};j(ee,W=>{n()&&W(Ce)})}var Ne=T(q,2);{var it=W=>{var ne=Qs(),ue=z(ne);R(()=>G(ue,e.description)),y(W,ne)},ie=W=>{var ne=rl(),ue=z(ne);{var $e=le=>{var ye=el(),ke=z(ye),lt=T(ke);{var m=C=>{var H=$s(),w=z(H);R(()=>G(w,e.percentSuffix)),y(C,H)};j(lt,C=>{e.percentSuffix&&C(m)})}R(()=>G(ke,`${e.percent??""} `)),y(le,ye)};j(ue,le=>{e.percent&&le($e)})}var st=T(ue,2);{var yt=le=>{var ye=tl(),ke=z(ye);R(()=>G(ke,e.votes)),y(le,ye)};j(st,le=>{e.votes&&le(yt)})}y(W,ne)};j(Ne,W=>{e.description?W(it):(e.percent||e.votes)&&W(ie,1)})}R(()=>{V=xe(P,1,"candidate-info svelte-q1jzvs",null,V,{right:s()==="right"&&!!e.description}),G(oe,e.name)}),y(L,N)};j(x,L=>{_()?L(u):L(b,!1)})}var E=T(x,2);{var O=L=>{var N=al();let M;var P=z(N);R(()=>{M=xe(N,1,"candidate-position svelte-q1jzvs",null,M,{left:c()==="left"}),G(P,e.position)}),y(L,N)};j(E,L=>{e.position&&L(O)})}R(()=>mt(g,`
45
+ --font-name: ${e.fontSize??i(p).fontSize??""};
46
+ --font-desc: ${e.descSize??i(p).descSize??""};
47
+ --font-tag: ${e.tagSize??i(p).tagSize??""};
48
+ --font-position: ${e.positionSize??i(p).fontSize??""};
49
+ --weight-name: ${d()??""};
50
+ --weight-desc: ${v()??""};
51
+ gap: ${_()?"10px":"18px"};
52
+ `)),y(t,g)}var sl=k('<span class="trigger-label svelte-hkzjiw"> </span>'),ll=k('<img alt="" aria-hidden="true" width="10" height="10"/>'),cl=k('<button class="clear svelte-hkzjiw" type="button"><img alt="" aria-hidden="true" width="8" height="8"/></button>'),dl=k('<button type="button" role="option"> </button>'),vl=k('<div class="dropdown svelte-hkzjiw" role="listbox"></div>'),fl=k('<div class="filter-dropdown svelte-hkzjiw"><button type="button" aria-haspopup="listbox"><!> <span class="trigger-value svelte-hkzjiw"> </span> <!></button> <!> <!></div>');const ul={hash:"svelte-hkzjiw",code:`.filter-dropdown.svelte-hkzjiw {position:relative;display:inline-flex;align-items:center;}
53
+
54
+ /* ── 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);}
55
+
56
+ /* ── 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,
57
+ .clear.svelte-hkzjiw:focus-visible {background:rgba(0, 0, 0, 0.08);}
58
+
59
+ /* ── 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;}
60
+
61
+ /* ── 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 hl(t,e){qt(e,!0),tt(t,ul);let r=I(e,"label",3,""),n=I(e,"options",19,()=>[]),o=I(e,"value",15,null),a=I(e,"clearable",3,!0),s=X(!1),c=X(null);const l=B(()=>o()!=null?n().find(q=>q.value===o())??null:null);function d(q){o(q.value),S(s,!1)}function v(){o(null),S(s,!1)}function _(q){i(c)&&!i(c).contains(q.target)&&S(s,!1)}vo(()=>(document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)));var f=fl(),p=z(f);let g;var x=z(p);{var u=q=>{var F=sl(),oe=z(F);R(()=>G(oe,`${r()??""}:`)),y(q,F)};j(x,q=>{r()&&q(u)})}var b=T(x,2),E=z(b),O=T(b,2);{var L=q=>{var F=ll();let oe;R(()=>{oe=xe(F,1,"trigger-chevron svelte-hkzjiw",null,oe,{rotated:i(s)}),Q(F,"src",ho)}),y(q,F)};j(O,q=>{i(l)&&a()||q(L)})}var N=T(p,2);{var M=q=>{var F=cl(),oe=z(F);R(()=>{Q(F,"aria-label",`Limpar ${(r()||"filtro")??""}`),Q(oe,"src",po)}),je("click",F,v),y(q,F)};j(N,q=>{i(l)&&a()&&q(M)})}var P=T(N,2);{var V=q=>{var F=vl();Yt(F,21,n,oe=>oe.value,(oe,ve)=>{var se=dl();let ee;var Ce=z(se);R(()=>{ee=xe(se,1,"option svelte-hkzjiw",null,ee,{selected:i(ve).value===o()}),Q(se,"aria-selected",i(ve).value===o()),G(Ce,i(ve).label)}),je("click",se,()=>d(i(ve))),y(oe,se)}),y(q,F)};j(P,q=>{i(s)&&q(V)})}Zt(f,q=>S(c,q),()=>i(c)),R(()=>{g=xe(p,1,"trigger svelte-hkzjiw",null,g,{open:i(s)}),Q(p,"aria-expanded",i(s)),G(E,i(l)?i(l).label:"")}),je("click",p,()=>S(s,!i(s))),y(t,f),Ft()}Cn(["click"]);var pl=k('<span class="header-tag-above svelte-1xm1ks6"><!></span>'),gl=k('<span class="header-tag-inline svelte-1xm1ks6"><!></span>'),ml=k('<p class="header-description svelte-1xm1ks6"> </p>'),_l=k('<header class="header svelte-1xm1ks6"><!> <div class="header-title-row svelte-1xm1ks6"><h1 class="header-title svelte-1xm1ks6"> </h1> <!></div> <!></header>');const wl={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);}
62
+
63
+ @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);}
64
+ }
65
+
66
+ @media (min-width: 768px) {.header-tag-above.svelte-1xm1ks6 {display:none;}.header-tag-inline.svelte-1xm1ks6 {display:inline-flex;}
67
+ }`};function bl(t,e){tt(t,wl);var r=_l(),n=z(r);{var o=f=>{var p=pl(),g=z(p);hr(g,{get label(){return e.tag},get color(){return e.tagColor}}),y(f,p)};j(n,f=>{e.tag&&f(o)})}var a=T(n,2),s=z(a),c=z(s),l=T(s,2);{var d=f=>{var p=gl(),g=z(p);hr(g,{get label(){return e.tag},get color(){return e.tagColor}}),y(f,p)};j(l,f=>{e.tag&&f(d)})}var v=T(a,2);{var _=f=>{var p=ml(),g=z(p);R(()=>G(g,e.description)),y(f,p)};j(v,f=>{e.description&&f(_)})}R(()=>{mt(r,`
68
+ --header-title-font-size: ${e.titleFontSize??"1.75rem"??""};
69
+ --header-title-font-weight: ${e.titleFontWeight??700??""};
70
+ --header-description-font-size: ${e.descriptionFontSize??"0.875rem"??""};
71
+ `),G(c,e.title)}),y(t,r)}var xl=k('<div class="leadership-moment-leader svelte-100kaho"><!></div> <hr class="leadership-moment-divider svelte-100kaho"/>',1),yl=k('<span class="leadership-moment-runner-position svelte-100kaho"> </span>'),zl=k('<div class="leadership-moment-runner svelte-100kaho"><!> <!></div>'),Cl=k('<div class="leadership-moment-runners svelte-100kaho"></div>'),kl=k('<hr class="leadership-moment-divider svelte-100kaho"/>'),Sl=k('<div class="leadership-moment-mobile-row svelte-100kaho"><!></div> <!>',1),El=k('<p class="leadership-moment-footer svelte-100kaho"><!><!><!></p>'),Al=k('<div class="leadership-moment svelte-100kaho"><h2 class="leadership-moment-title svelte-100kaho">Liderança do momento:</h2> <div class="leadership-moment-layout-desktop svelte-100kaho"><!> <!></div> <div class="leadership-moment-layout-mobile svelte-100kaho"></div> <!></div>');const Tl={hash:"svelte-100kaho",code:`.leadership-moment.svelte-100kaho {display:flex;flex-direction:column;gap:16px;}.leadership-moment-title.svelte-100kaho {font-size:1.375rem;font-weight:700;color:var(--sevn-color-tertiary);margin:0;}
72
+
73
+ /* ── Desktop ── */.leadership-moment-layout-desktop.svelte-100kaho {display:flex;flex-direction:column;gap:16px;}.leadership-moment-layout-mobile.svelte-100kaho {display:none;}.leadership-moment-leader.svelte-100kaho {padding-bottom:4px;}.leadership-moment-divider.svelte-100kaho {border:none;border-top:1px solid #e0e0e0;margin:0;}.leadership-moment-runners.svelte-100kaho {display:grid;grid-template-columns:1fr 1fr;gap:24px;}.leadership-moment-runner.svelte-100kaho {display:flex;flex-direction:column;gap:8px;}.leadership-moment-runner-position.svelte-100kaho {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);opacity:0.7;}
74
+
75
+ /* ── Mobile ── */
76
+ @media (max-width: 600px) {.leadership-moment-layout-desktop.svelte-100kaho {display:none;}.leadership-moment-title.svelte-100kaho {display:none;}.leadership-moment-layout-mobile.svelte-100kaho {display:flex;flex-direction:column;gap:16px;margin-top:10px;}.leadership-moment-mobile-row.svelte-100kaho {padding:4px 0;}
77
+ }.leadership-moment-footer.svelte-100kaho {font-size:0.75rem;color:var(--sevn-color-tertiary);opacity:0.6;margin:0;}`};function mo(t,e){qt(e,!0),tt(t,Tl);let r=I(e,"candidates",19,()=>[]);const n=B(()=>r()[0]),o=B(()=>r().slice(1,3));var a=Al(),s=T(z(a),2),c=z(s);{var l=g=>{var x=xl(),u=Ye(x),b=z(u);Yr(b,{get name(){return i(n).name},get photoUrl(){return i(n).photoUrl},get avatar(){return i(n).avatar},get avatarColor(){return i(n).avatarColor},get tag(){return i(n).tag},get tagColor(){return i(n).tagColor},get description(){return i(n).description},descSize:"0.875rem",size:"lg",wrapper:!0}),y(g,x)};j(c,g=>{i(n)&&g(l)})}var d=T(c,2);{var v=g=>{var x=Cl();Yt(x,21,()=>i(o),Pr,(u,b)=>{var E=zl(),O=z(E);{var L=M=>{var P=yl(),V=z(P);R(()=>G(V,i(b).position)),y(M,P)};j(O,M=>{i(b).position&&M(L)})}var N=T(O,2);Yr(N,{get name(){return i(b).name},get photoUrl(){return i(b).photoUrl},get avatar(){return i(b).avatar},get avatarColor(){return i(b).avatarColor},get tag(){return i(b).tag},get tagColor(){return i(b).tagColor},get description(){return i(b).description},size:"sm",wrapper:!0}),y(u,E)}),y(g,x)};j(d,g=>{i(o).length&&g(v)})}var _=T(s,2);Yt(_,21,()=>r().slice(0,3),Pr,(g,x,u)=>{var b=Sl(),E=Ye(b),O=z(E);Yr(O,{get name(){return i(x).name},get photoUrl(){return i(x).photoUrl},get avatar(){return i(x).avatar},get avatarColor(){return i(x).avatarColor},get tag(){return i(x).tag},get tagColor(){return i(x).tagColor},get description(){return i(x).description},get position(){return i(x).position},positionSide:"right",positionSize:"0.8rem",size:"sm"});var L=T(E,2);{var N=P=>{var V=kl();y(P,V)},M=B(()=>u<r().slice(0,3).length-1);j(L,P=>{i(M)&&P(N)})}y(g,b)});var f=T(_,2);{var p=g=>{var x=El(),u=z(x);{var b=M=>{var P=Sn();R(()=>G(P,`Atualizado em ${e.date??""}`)),y(M,P)};j(u,M=>{e.date&&M(b)})}var E=T(u);{var O=M=>{var P=Sn();P.nodeValue=" | ",y(M,P)};j(E,M=>{e.date&&e.font&&M(O)})}var L=T(E);{var N=M=>{var P=Sn();R(()=>G(P,`Fonte ${e.font??""}`)),y(M,P)};j(L,M=>{e.font&&M(N)})}y(g,x)};j(f,g=>{(e.date||e.font)&&g(p)})}y(t,a),Ft()}const _o=new Map,Zr=new Map;function Ll(t){const e=_o.get(t);if(e!==void 0)return Promise.resolve(e);const r=Zr.get(t);if(r)return r;const n=an(`maps/${t}.svg`),o=fetch(n).then(a=>{if(!a.ok)throw new Error(`Mapa indisponível (HTTP ${a.status}): ${t}`);return a.text()}).then(a=>(_o.set(t,a),Zr.delete(t),a)).catch(a=>{throw Zr.delete(t),a});return Zr.set(t,o),o}let Ml=0;var Pl=k('<img alt="Mapa do Brasil" decoding="async" class="svelte-1956iuh"/>'),Rl=k('<div class="map-placeholder svelte-1956iuh" aria-hidden="true"></div>'),jl=k('<div class="map-error svelte-1956iuh">Mapa não encontrado</div>'),Ol=k('<p class="map-modal-title svelte-1956iuh"> </p>'),Il=k('<div class="map-modal-item svelte-1956iuh"><!></div>'),Dl=k('<div class="map-modal-footer svelte-1956iuh"> </div>'),Nl=k('<div class="map-modal svelte-1956iuh" role="dialog" tabindex="-1"><div class="map-modal-card svelte-1956iuh"><!> <!> <!></div></div>'),ql=k("<div><!> <!> <!></div>");const Fl={hash:"svelte-1956iuh",code:`.map.svelte-1956iuh {display:block;width:100%;}.map.svelte-1956iuh img:where(.svelte-1956iuh),
78
+ .map.svelte-1956iuh svg {width:100%;height:100%;display:block;}
79
+
80
+ /* Default fill for uncolored paths */.map.svelte-1956iuh path {fill:var(--sevn-color-neutral);}
81
+
82
+ /* Pointer cursor and smooth hover on clickable regions */.map.interactive.svelte-1956iuh path[data-cid],
83
+ .map.interactive.svelte-1956iuh g[data-cid],
84
+ .map.interactive.svelte-1956iuh a[data-cid] {cursor:pointer;}.map.interactive.svelte-1956iuh path[data-cid],
85
+ .map.interactive.svelte-1956iuh a[data-cid] path {transition:filter 0.12s ease;}.map.interactive.svelte-1956iuh path[data-cid]:hover,
86
+ .map.interactive.svelte-1956iuh a[data-cid]:hover path {filter:brightness(1.15);}
87
+
88
+ /* State labels: font-size is set as SVG attr (0.8 user units) so it scales with the map.
89
+ stroke-width in em stays proportional to font-size. */.map.svelte-1956iuh .map-labels text {font-family:inherit;font-weight:600;fill:white;stroke:rgba(0, 0, 0, 0.35);stroke-width:0.06em;paint-order:stroke fill;letter-spacing:0.04em;}
90
+
91
+ /* Floating modal — positioned at the click point inside the map container.
92
+ transform centers it horizontally and places it above the cursor. */.map-modal.svelte-1956iuh {position:absolute;z-index:10;transform:translate(-50%, calc(-100% - 12px));pointer-events:auto;}.map-modal-card.svelte-1956iuh {background:white;border-radius:10px;box-shadow:0 4px 20px rgba(0, 0, 0, 0.15);padding:14px 16px;min-width:210px;font-family:inherit;}.map-modal-title.svelte-1956iuh {font-size:0.8125rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0 0 10px;}.map-modal-item.svelte-1956iuh {margin-bottom:10px;}.map-modal-footer.svelte-1956iuh {border-top:1px solid #f0f0f5;margin-top:10px;padding-top:8px;font-size:0.75rem;color:#9a9aaa;}.map-placeholder.svelte-1956iuh {position:absolute;inset:0;background:var(--sevn-color-neutral);border-radius:4px;
93
+ animation: svelte-1956iuh-pulse 1.4s ease-in-out infinite;}.map-error.svelte-1956iuh {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--sevn-color-red);font-size:0.85rem;}.map-modal-card.svelte-1956iuh .candidate {justify-content:flex-start;}
94
+
95
+ @keyframes svelte-1956iuh-pulse {
96
+ 0%, 100% { opacity: 1; }
97
+ 50% { opacity: 0.4; }
98
+ }`};function wo(t,e){qt(e,!0),tt(t,Fl);let r=I(e,"aspectRatio",3,"4/3"),n=I(e,"class",3,""),o=I(e,"priority",3,!1),a=I(e,"selectionStrokeWidth",3,3),s=I(e,"toggleSelection",3,!1),c=I(e,"modalTrigger",3,"click");const l=B(()=>c()==="click"||c()==="both"),d=B(()=>c()==="hover"||c()==="both"),v=++Ml,_=an("maps/brazil-municipalities.svg");let f=B(()=>e.type==="brazil"?`map--brazil-${v}`:e.type==="state"?`map--state-${e.uf??""}-${v}`:`map--muni-${e.uf??""}-${e.municipio??""}-${v}`),p=B(()=>!!e.interactive||!!e.onRegionClick||!!e.onRegionHover||!!e.selectionStroke||!!e.modalData),g=B(()=>e.type==="brazil-states"||e.type!=="brazil"||!!e.colors?.length||!!e.labels||!!e.onRegionClick||!!e.onRegionHover||!!e.selectionStroke||!!e.modalData),x=B(()=>i(g)?e.type==="brazil-states"?"br":e.type==="brazil"&&e.labels?"brazil-municipalities-labeled":e.type==="brazil"?"brazil-municipalities":e.type==="state"&&e.uf?`states/${e.uf}`:e.uf&&e.municipio?`municipalities/${e.uf}/${e.municipio}`:null:null),u=X(null);At(()=>{e.selected!==void 0&&S(u,e.selected,!0)});let b=X(null),E=X(0),O=X(0),L=X(""),N=X(!1),M=X(!1),P=B(()=>e.type==="brazil"||e.type==="state"?`.${i(f)} path{stroke:#8a8a92;stroke-width:0.5px;vector-effect:non-scaling-stroke}`:""),V=B(()=>e.colors?.length?e.colors.map(({id:m,color:C,match:H})=>{const w=H==="endsWith"?`[data-cid$="::${m}"]`:`[data-cid="${m}"]`;return`.${i(f)} path${w},.${i(f)} ${w} path{fill:${C}!important}`}).join(""):""),q=B(()=>i(u)&&e.selectionStroke?`.${i(f)} [data-cid="${i(u)}"] path{stroke:${e.selectionStroke}!important;stroke-width:${a()}px!important;vector-effect:non-scaling-stroke!important;paint-order:stroke fill!important}`:""),F=B(()=>nr?i(P)+i(V)+i(q):""),oe,ve=0;At(()=>{const m=i(x);if(!m){S(L,""),S(N,!1);return}const C=++ve;function H(){S(N,!0),S(M,!1),S(L,""),Ll(m).then(A=>{C===ve&&(S(L,A,!0),S(N,!1),queueMicrotask(()=>{const D=oe?.querySelector("svg");if(!D)return;const U=D.querySelector(".map-labels");if(U){D.appendChild(U);return}D.querySelectorAll("text").forEach(te=>D.appendChild(te))}))}).catch(()=>{C===ve&&(S(M,!0),S(N,!1))})}if(o()){H();return}if(!oe){H();return}const w=new IntersectionObserver(([A])=>{A.isIntersecting&&(w.disconnect(),H())},{rootMargin:"200px"});return w.observe(oe),()=>w.disconnect()}),At(()=>{if(!e.modalData)return;function m(C){C.key==="Escape"&&S(b,null)}return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)});let se=X(null);function ee(m,C){const H=C.getAttribute("data-cid")??"",w=H.split("::"),A=w.length>1?w[1]||void 0:w[0]||void 0,D=w.length>1&&w[0]||void 0;return{cid:H,uf:A,municipio:D,clientX:m.clientX,clientY:m.clientY,element:C}}function Ce(m){if(!i(p))return;const C=m.target.closest("[data-cid]");if(!C){c()==="click"&&S(b,null);return}const H=C.getAttribute("data-cid")??"";if(!H)return;S(u,s()&&i(u)===H?null:H,!0);const w=C.closest("svg"),A=C.parentNode;if(w&&A)if(A===w){const U=w.querySelector(":scope > .map-labels")??Array.from(w.children).find(te=>te.nodeName==="text");U?w.insertBefore(C,U):w.appendChild(C)}else A.appendChild(C);const D=ee(m,C);if(e.modalData&&i(l))if(i(b)?.cid===H)S(b,null);else{const U=m.currentTarget.getBoundingClientRect();S(E,m.clientX-U.left),S(O,m.clientY-U.top),S(b,D,!0)}e.onRegionClick?.(D)}function Ne(m){if(!i(p)||!e.onRegionHover&&!i(d))return;const C=m.target.closest("[data-cid]");if(!C)return;const H=C.getAttribute("data-cid")??"";if(!H||H===i(se))return;S(se,H,!0);const w=ee(m,C);if(e.modalData&&i(d)){const A=m.currentTarget.getBoundingClientRect();S(E,m.clientX-A.left),S(O,m.clientY-A.top),S(b,w,!0)}e.onRegionHover?.(w)}function it(){S(se,null),i(d)&&S(b,null)}var ie=ql();let W;var ne=z(ie);{var ue=m=>{var C=ur(),H=Ye(C);io(H,()=>`<style>${i(F)}</style>`),y(m,C)};j(ne,m=>{i(F)&&m(ue)})}var $e=T(ne,2);{var st=m=>{var C=Pl();R(()=>{Q(C,"src",_),Q(C,"fetchpriority",o()?"high":"auto"),Q(C,"loading",o()?"eager":"lazy")}),y(m,C)},yt=m=>{var C=Rl();y(m,C)},le=m=>{var C=jl();y(m,C)},ye=m=>{var C=ur(),H=Ye(C);io(H,()=>i(L)),y(m,C)};j($e,m=>{e.type==="brazil"&&!i(L)&&!i(N)?m(st):i(N)?m(yt,1):i(M)?m(le,2):i(L)&&m(ye,3)})}var ke=T($e,2);{var lt=m=>{const C=B(()=>e.modalData[i(b).cid]);var H=ur(),w=Ye(H);{var A=D=>{var U=Nl(),te=z(U),fe=z(te);{var Se=Ee=>{var ze=Ol(),Rt=z(ze);R(()=>G(Rt,`${i(C).title??""}:`)),y(Ee,ze)};j(fe,Ee=>{i(C).title&&Ee(Se)})}var Ue=T(fe,2);Yt(Ue,17,()=>i(C).items,Pr,(Ee,ze)=>{var Rt=Il(),Nn=z(Rt);Yr(Nn,{get name(){return i(ze).name},get tag(){return i(ze).tag},get tagColor(){return i(ze).tagColor},get photoUrl(){return i(ze).photoUrl},get avatar(){return i(ze).avatar},get avatarColor(){return i(ze).avatarColor},get description(){return i(ze).description},get descriptionSide(){return i(ze).descriptionSide},get position(){return i(ze).position},positionSide:"left",size:"sm",wrapper:!0}),y(Ee,Rt)});var Pt=T(Ue,2);{var Qr=Ee=>{var ze=Dl(),Rt=z(ze);R(()=>G(Rt,i(C).footer)),y(Ee,ze)};j(Pt,Ee=>{i(C).footer&&Ee(Qr)})}R(()=>mt(U,`left:${i(E)??""}px;top:${i(O)??""}px`)),je("click",U,Ee=>Ee.stopPropagation()),je("keydown",U,Ee=>Ee.stopPropagation()),y(D,U)};j(w,D=>{i(C)&&D(A)})}y(m,H)};j(ke,m=>{e.modalData&&i(b)&&m(lt)})}Zt(ie,m=>oe=m,()=>oe),R(()=>{W=xe(ie,1,`map ${i(f)??""} ${n()??""}`,"svelte-1956iuh",W,{loading:i(N),error:i(M),interactive:i(p)}),mt(ie,`aspect-ratio:${r()??""};contain:layout;position:relative`),Q(ie,"role",i(p)?"group":void 0)}),je("click",ie,Ce),je("mousemove",ie,Ne),zn("mouseleave",ie,it),y(t,ie),Ft()}Cn(["click","mousemove","keydown"]);var Hl=k('<p class="map-legend-title svelte-p7lxz6"> </p>'),Bl=k("<div></div>"),Ul=k('<span class="map-legend-label svelte-p7lxz6"> </span>'),Vl=k('<div class="map-legend-labels svelte-p7lxz6"></div>'),Kl=k('<span class="map-legend-extreme-label svelte-p7lxz6"><img alt="arrow-start" class="map-legend-arrow map-legend-arrow--start svelte-p7lxz6"/> </span>'),Gl=k("<span></span>"),Wl=k('<span class="map-legend-extreme-label svelte-p7lxz6"> <img alt="arrow-end" class="map-legend-arrow map-legend-arrow--end svelte-p7lxz6"/></span>'),Yl=k('<div class="map-legend-extremes svelte-p7lxz6"><!> <!></div>'),Zl=k('<div><!> <div class="map-legend-bar svelte-p7lxz6"></div> <!></div>');const Xl={hash:"svelte-p7lxz6",code:`.map-legend.svelte-p7lxz6 {width:100%;display:flex;flex-direction:column;gap:4px;font-family:inherit;box-sizing:border-box;}.map-legend-title.svelte-p7lxz6 {margin:0 0 4px;font-size:0.75rem;font-weight:600;color:var(--sevn-color-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.map-legend-bar.svelte-p7lxz6 {display:flex;height:14px;border-radius:3px;min-width:0;}.map-legend-segment.svelte-p7lxz6 {flex:1;min-width:0;}.map-legend-segment.svelte-p7lxz6:first-child {border-radius:3px 0 0 3px;}.map-legend-segment.svelte-p7lxz6:last-child {border-radius:0 3px 3px 0;}.map-legend-segment.svelte-p7lxz6:only-child {border-radius:3px;}.map-legend-segment--hoverable.svelte-p7lxz6 {position:relative;cursor:default;}.map-legend-segment--hoverable.svelte-p7lxz6:hover::after {content:attr(data-tooltip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);z-index:2;padding:4px 8px;border-radius:4px;background:var(--sevn-color-tertiary, #1a1a2e);color:#fff;font-size:0.7rem;font-weight:500;line-height:1.2;white-space:nowrap;pointer-events:none;}.map-legend-segment--hoverable.svelte-p7lxz6:hover::before {content:'';position:absolute;bottom:calc(100% + 2px);left:50%;transform:translateX(-50%);z-index:2;border:4px solid transparent;border-top-color:var(--sevn-color-tertiary, #1a1a2e);pointer-events:none;}.map-legend-labels.svelte-p7lxz6 {display:flex;min-width:0;}.map-legend-label.svelte-p7lxz6 {flex:1;font-size:0.65rem;color:var(--sevn-color-tertiary);text-align:left;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.map-legend-extremes.svelte-p7lxz6 {display:flex;justify-content:space-between;min-width:0;gap:4px;margin-top:10px;}.map-legend-extreme-label.svelte-p7lxz6 {display:inline-flex;align-items:center;gap:3px;font-size:0.70rem;color:var(--sevn-color-tertiary);white-space:nowrap;min-width:0;overflow:hidden;}.map-legend-arrow.svelte-p7lxz6 {width:12px;height:12px;flex-shrink:0;}.map-legend-arrow--start.svelte-p7lxz6 {transform:scaleX(-1);}
99
+
100
+ @media (max-width: 480px) {.map-legend-title.svelte-p7lxz6 {font-size:0.7rem;}.map-legend-bar.svelte-p7lxz6 {height:10px;}.map-legend-label.svelte-p7lxz6,
101
+ .map-legend-extreme-label.svelte-p7lxz6 {font-size:0.6rem;}.map-legend-arrow.svelte-p7lxz6 {width:10px;height:10px;}
102
+ }`};function bo(t,e){qt(e,!0),tt(t,Xl);let r=I(e,"sortSegments",3,!1),n=I(e,"class",3,"");const o=x=>x.label??x.tooltip??"";let a=B(()=>r()?[...e.segments].sort((x,u)=>o(x).localeCompare(o(u),"pt-BR")):e.segments),s=B(()=>i(a).some(x=>x.label)),c=B(()=>!!(e.startLabel||e.endLabel));var l=Zl(),d=z(l);{var v=x=>{var u=Hl(),b=z(u);R(()=>G(b,e.title)),y(x,u)};j(d,x=>{e.title&&x(v)})}var _=T(d,2);Yt(_,21,()=>i(a),Pr,(x,u)=>{var b=Bl();let E;R(()=>{E=xe(b,1,"map-legend-segment svelte-p7lxz6",null,E,{"map-legend-segment--hoverable":i(u).tooltip}),mt(b,`background:${i(u).color??""}`),Q(b,"data-tooltip",i(u).tooltip),Q(b,"role",i(u).tooltip?"img":void 0),Q(b,"aria-label",i(u).tooltip)}),y(x,b)});var f=T(_,2);{var p=x=>{var u=Vl();Yt(u,21,()=>i(a),Pr,(b,E)=>{var O=Ul(),L=z(O);R(()=>G(L,i(E).label??"")),y(b,O)}),y(x,u)},g=x=>{var u=Yl(),b=z(u);{var E=M=>{var P=Kl(),V=z(P),q=T(V);R(()=>{Q(V,"src",go),G(q,` ${e.startLabel??""}`)}),y(M,P)},O=M=>{var P=Gl();y(M,P)};j(b,M=>{e.startLabel?M(E):M(O,!1)})}var L=T(b,2);{var N=M=>{var P=Wl(),V=z(P),q=T(V);R(()=>{G(V,`${e.endLabel??""} `),Q(q,"src",go)}),y(M,P)};j(L,M=>{e.endLabel&&M(N)})}y(x,u)};j(f,x=>{i(s)?x(p):i(c)&&x(g,1)})}R(()=>xe(l,1,`map-legend ${n()??""}`,"svelte-p7lxz6")),y(t,l),Ft()}const Jl=new Set(["da","de","do","das","dos","e"]);function xo(t){return t.toLowerCase().split(" ").map((e,r)=>r>0&&Jl.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}class yo{constructor(e={}){var r,n,o;this.inflight=new Map,this.tick=0,this.storageKey=(r=e.storageKey)!==null&&r!==void 0?r:"reqcache",this.maxEntries=(n=e.maxEntries)!==null&&n!==void 0?n:100,this.storage=(o=e.storage)!==null&&o!==void 0?o:$l()}async getFetch(e,r,n={}){const o=Date.now(),a=this.readAll(),s=a.find(d=>d.rota===e);if(s&&o<s.expiresAt)return s.lastAccess=this.nextAccess(),this.writeAll(a),s.data;const c=this.inflight.get(e);if(c)return c;const l=this.revalidate(e,r,n,s??null).finally(()=>this.inflight.delete(e));return this.inflight.set(e,l),l}invalidate(e){const r=this.readAll().filter(n=>n.rota!==e);this.writeAll(r)}cleanup(e=3600){const r=Date.now()-e*1e3,n=this.readAll(),o=n.filter(a=>a.expiresAt>r);return this.writeAll(o),n.length-o.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,r,n,o){var a,s;const c=(a=n.fetcher)!==null&&a!==void 0?a:fetch;let l;try{const v=await c(e,n.fetchOptions);if(!v.ok)throw new Error(`HTTP ${v.status} ao buscar ${e}`);l=await v.json()}catch(v){if(o&&(!((s=n.staleOnError)!==null&&s!==void 0)||s))return this.upsert({...o,expiresAt:Date.now()+r,lastAccess:this.nextAccess()}),o.data;throw v}if(o&&n.monotonicKey){const v=zo(o.data,n.monotonicKey),_=zo(l,n.monotonicKey);if(typeof v=="number"&&typeof _=="number"&&_<=v)return this.upsert({...o,expiresAt:Date.now()+r,lastAccess:this.nextAccess()}),o.data}const d=Date.now();return this.upsert({rota:e,data:l,createdAt:d,expiresAt:d+r,lastAccess:this.nextAccess()}),l}upsert(e){const r=this.readAll().filter(n=>n.rota!==e.rota);r.push(e),this.evictIfNeeded(r),this.writeAll(r)}evictIfNeeded(e){for(;e.length>this.maxEntries;){let r=0;for(let n=1;n<e.length;n++)e[n].lastAccess<e[r].lastAccess&&(r=n);e.splice(r,1)}}readAll(){if(!this.storage)return[];try{const e=this.storage.getItem(this.storageKey);if(!e)return[];const r=JSON.parse(e);return Array.isArray(r)?r:[]}catch{return[]}}writeAll(e){if(this.storage)try{this.storage.setItem(this.storageKey,JSON.stringify(e))}catch(r){if(Ql(r)&&e.length>0){const n=[...e].sort((o,a)=>o.lastAccess-a.lastAccess);n.splice(0,Math.ceil(n.length/2));try{this.storage.setItem(this.storageKey,JSON.stringify(n))}catch{}}}}}function zo(t,e){return e.split(".").reduce((r,n)=>{if(r&&typeof r=="object"&&n in r)return r[n]},t)}function Ql(t){return t instanceof Error&&(t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")}function $l(){try{if(typeof localStorage<"u"){const t="__reqcache_probe__";return localStorage.setItem(t,"1"),localStorage.removeItem(t),localStorage}}catch{}return null}new yo;const ec=300,Pn=new Map;function Rn(){try{return typeof window<"u"&&typeof localStorage<"u"}catch{return!1}}const tc={getItem(t){return Rn()?localStorage.getItem(t):Pn.get(t)??null},setItem(t,e){if(Rn())try{localStorage.setItem(t,e)}catch{console.warn("[api] Cota do localStorage excedida, ignorando escrita")}else Pn.set(t,e)},removeItem(t){Rn()?localStorage.removeItem(t):Pn.delete(t)}};let jn=null;function rc(){if(!jn){const{storageKey:t,maxEntries:e}=zr().cache;jn=new yo({storage:tc,storageKey:t,maxEntries:e})}return jn}async function nc(t,e,r=ec,n){const[o]=$n(),a=t.replace(/^\/+/,""),s=new URL(a,`${o.replace(/\/+$/,"")}/`);let c;try{c=await rc().getFetch(s.toString(),r*1e3,{monotonicKey:n,fetcher:Fo})}catch(l){throw l instanceof Error&&/^HTTP 404 /.test(l.message)?new Error("Dados ainda não publicados"):l}if(c&&typeof c=="object"&&c.published===!1)throw new Error(c.reason??"Dados ainda não publicados");return c}function ac(t,e,r){return nc(`v1/elections/${t}/r${r}/${e}/by-state.json`)}function oc(t){if(typeof t=="string"){const r=t.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?/);if(r)return new Date(Date.UTC(Number(r[1]),Number(r[2])-1,Number(r[3]),Number(r[4]),Number(r[5]),Number(r[6]??0)))}const e=new Date(t);return Number.isNaN(e.getTime())?null:e}function On(t){if(t==null||t==="")return"";const e=oc(t);if(!e)return"";const r=String(e.getUTCDate()).padStart(2,"0"),n=String(e.getUTCMonth()+1).padStart(2,"0"),o=e.getUTCFullYear(),a=String(e.getUTCHours()).padStart(2,"0"),s=String(e.getUTCMinutes()).padStart(2,"0");return`${r}/${n}/${o} às ${a}h${s}`}function ic(t,e="TSE"){const r=On(t);return r?`Atualizado em ${r} | Fonte ${e}`:`Fonte ${e}`}const sc=On("2022-10-31T00:18:00Z");ic("2022-10-31T00:18:00Z");var lc=k('<p class="sevn_counting_progress__empty-label svelte-1ht2osm">Carregando...</p>'),cc=k('<p class="sevn_counting_progress__empty-label sevn_counting_progress__empty-label--error svelte-1ht2osm"> </p>'),dc=k('<p class="sevn_counting_progress__empty-label svelte-1ht2osm"> </p>'),vc=k('<p class="sevn_counting_progress__selected-label svelte-1ht2osm">Você selecionou: <strong class="svelte-1ht2osm"> </strong></p> <!>',1),fc=k('<p class="sevn_counting_progress__empty-label svelte-1ht2osm">Clique em um estado no mapa para ver a liderança</p>'),uc=k('<p class="sevn_counting_progress__empty-label svelte-1ht2osm"> </p>'),hc=k('<div class="sevn_counting_progress__search-web svelte-1ht2osm"><!></div> <div class="sevn_counting_progress__body-web svelte-1ht2osm"><div class="sevn_counting_progress__map-col svelte-1ht2osm" role="presentation"><!> <div class="sevn_counting_progress__legend svelte-1ht2osm"><!></div></div> <div class="sevn_counting_progress__info-col svelte-1ht2osm"><!></div></div> <div class="sevn_counting_progress__mobile-section svelte-1ht2osm"><p class="sevn_counting_progress__overview-label svelte-1ht2osm">Visão geral:</p> <div class="sevn_counting_progress__map-mobile svelte-1ht2osm"><!></div> <div class="sevn_counting_progress__legend svelte-1ht2osm"><!></div> <div class="sevn_counting_progress__search-mobile svelte-1ht2osm"><!></div> <!></div>',1),pc=k('<div><!> <div class="sevn_counting_progress__office-web svelte-1ht2osm"><!></div> <div class="sevn_counting_progress__office-mobile svelte-1ht2osm"><!></div> <!></div>');const gc={hash:"svelte-1ht2osm",code:`.sevn_counting_progress.svelte-1ht2osm {display:flex;flex-direction:column;gap:24px;}
103
+
104
+ /* ── Search ─────────────────────────────────────────── */.sevn_counting_progress__search-web.svelte-1ht2osm {display:none;}.sevn_counting_progress__search-mobile.svelte-1ht2osm {width:100%;margin-top:10px;}
105
+
106
+ /* ── Mobile section ─────────────────────────────────── */.sevn_counting_progress__mobile-section.svelte-1ht2osm {display:flex;flex-direction:column;gap:20px;}.sevn_counting_progress__overview-label.svelte-1ht2osm {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0;}.sevn_counting_progress__empty-label.svelte-1ht2osm {font-size:0.875rem;color:var(--sevn-color-tertiary);margin:0;opacity:0.5;}.sevn_counting_progress__empty-label--error.svelte-1ht2osm {color:#e11d48;opacity:1;}.sevn_counting_progress__office-web.svelte-1ht2osm {display:none;}.sevn_counting_progress__office-mobile.svelte-1ht2osm {display:block;width:220px;}
107
+
108
+ @media (min-width: 768px) {.sevn_counting_progress__office-web.svelte-1ht2osm {display:block;}.sevn_counting_progress__office-mobile.svelte-1ht2osm {display:none;}
109
+ }.sevn_counting_progress__map-mobile.svelte-1ht2osm {width:100%;}
110
+
111
+ /* ── Web body ───────────────────────────────────────── */.sevn_counting_progress__body-web.svelte-1ht2osm {display:none;}
112
+
113
+ /* ── Legend ─────────────────────────────────────────── */.sevn_counting_progress__legend.svelte-1ht2osm {margin-top:12px;}
114
+
115
+ /* ── Search mobile dropdown ─────────────────────────── */
116
+ @media (max-width: 767px) {.sevn_counting_progress__search-mobile.svelte-1ht2osm .dropdown,
117
+ .sevn_counting_progress__office-mobile.svelte-1ht2osm .dropdown {position:static;margin-top:10px;}
118
+ }
119
+
120
+ /* ── Desktop ────────────────────────────────────────── */
121
+ @media (min-width: 768px) {.sevn_counting_progress__search-web.svelte-1ht2osm {display:block;}.sevn_counting_progress__mobile-section.svelte-1ht2osm {display:none;}.sevn_counting_progress__body-web.svelte-1ht2osm {display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:start;}.sevn_counting_progress__map-col.svelte-1ht2osm {display:flex;flex-direction:column;}.sevn_counting_progress__info-col.svelte-1ht2osm {display:flex;flex-direction:column;gap:16px;padding-top:8px;}.sevn_counting_progress__selected-label.svelte-1ht2osm {font-size:0.875rem;color:var(--sevn-color-tertiary);margin:0;opacity:0.7;}
122
+ }
123
+
124
+ /* ── Raw ────────────────────────────────────────────── */.sevn_counting_progress--raw.svelte-1ht2osm,
125
+ .sevn_counting_progress--raw.svelte-1ht2osm :where(.svelte-1ht2osm) {all:revert;}`};function mc(t,e){qt(e,!0),tt(t,gc);let r=I(e,"mock",3,!1),n=I(e,"rawStyle",3,!1),o=I(e,"year",3,2026),a=I(e,"defaultOffice",3,"president"),s=I(e,"header",19,()=>({title:"Progresso da Apuração",description:"Explore o mapa e analise o status de contagem por região",tagColor:"var(--sevn-color-tertiary, #1a1a2e)"}));const c=[{value:"presidente",label:"Presidente"},{value:"governador",label:"Governador"}],l={presidente:"president",governador:"governor"},d={president:"presidente",governor:"governador"};let v=X(Ut(fr(()=>d[a()]??"presidente"))),_=X(null),f=X(!1),p=X(null);At(()=>{if(!nr||r())return;if(!i(v)){S(_,null),countingProgress=null;return}const m=l[i(v)]||"president";S(f,!0),S(p,null),S(_,null),ac(o(),m,1).then(C=>{S(_,C,!0),S(f,!1)}).catch(C=>{console.error("Failed to fetch results:",C),S(p,C instanceof Error?C.message:"Não foi possível carregar os resultados.",!0),S(f,!1)})});const g={full:"#1a1a2e",high:"#4a5568",mid:"#718096",low:"#cbd5e0"},x=[{label:"0 - 25%",color:g.low},{label:"26 - 60%",color:g.mid},{label:"61 - 99%",color:g.high},{label:"100%",color:g.full}],u={ac:"low",al:"low",am:"mid",ap:"low",ba:"high",ce:"high",df:"low",es:"high",go:"high",ma:"mid",mg:"full",ms:"high",mt:"mid",pa:"mid",pb:"mid",pe:"high",pi:"low",pr:"full",rj:"full",rn:"mid",ro:"low",rr:"low",rs:"full",sc:"full",se:"low",sp:"full",to:"low"};function b(m){return m===100?"full":m>=61?"high":m>=26?"mid":"low"}const E=B(()=>r()?u:Object.fromEntries((i(_)?.states??[]).map(m=>[m.state.toLowerCase(),b(m.ballots_counted_pct)]))),O=B(()=>Object.entries(i(E)).map(([m,C])=>({id:m,color:g[C]}))),L=[{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((m,C)=>m.label.localeCompare(C.label));function N(m){return L.find(C=>C.value===m)?.label?.replace(/\s+[A-Z]{2}$/,"")??m.toUpperCase()}const M={mg:[{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatar:"man",avatarColor:"var(--sevn-color-primary)",description:"41,8% dos votos válidos",position:"1º Lugar"},{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatar:"man",avatarColor:"var(--sevn-color-secondary)",description:"36,4% dos votos válidos",position:"2º Lugar"},{name:"Candidato C",tag:"GHI",tagColor:"#3b82f6",avatar:"man",avatarColor:"#3b82f6",description:"21,8% dos votos válidos",position:"3º Lugar"}],sp:[{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatar:"man",avatarColor:"var(--sevn-color-primary)",description:"54,1% dos votos válidos",position:"1º Lugar"},{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatar:"man",avatarColor:"var(--sevn-color-secondary)",description:"43,1% dos votos válidos",position:"2º Lugar"},{name:"Candidato C",tag:"GHI",tagColor:"#3b82f6",avatar:"man",avatarColor:"#3b82f6",description:"1,1% dos votos válidos",position:"3º Lugar"}],rj:[{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatar:"man",avatarColor:"var(--sevn-color-secondary)",description:"50,8% dos votos válidos",position:"1º Lugar"},{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatar:"man",avatarColor:"var(--sevn-color-primary)",description:"46,3% dos votos válidos",position:"2º Lugar"},{name:"Candidato C",tag:"GHI",tagColor:"#3b82f6",avatar:"man",avatarColor:"#3b82f6",description:"1,8% dos votos válidos",position:"3º Lugar"}],rs:[{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatar:"man",avatarColor:"var(--sevn-color-secondary)",description:"53,6% dos votos válidos",position:"1º Lugar"},{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatar:"man",avatarColor:"var(--sevn-color-primary)",description:"43,8% dos votos válidos",position:"2º Lugar"},{name:"Candidato C",tag:"GHI",tagColor:"#3b82f6",avatar:"man",avatarColor:"#3b82f6",description:"1,4% dos votos válidos",position:"3º Lugar"}]};function P(m){if(M[m])return M[m];const C=m.charCodeAt(0)*7+m.charCodeAt(1)*3,H=C%2===0,w=H?(42+C%14).toFixed(1):(33+C%10).toFixed(1),A=H?(35+C%8).toFixed(1):(44+C%12).toFixed(1),D=(100-parseFloat(w)-parseFloat(A)).toFixed(1),U=H?{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatarColor:"var(--sevn-color-primary)",pct:w}:{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatarColor:"var(--sevn-color-secondary)",pct:A},te=H?{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatarColor:"var(--sevn-color-secondary)",pct:A}:{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatarColor:"var(--sevn-color-primary)",pct:w};return[{...U,avatar:"man",description:`${U.pct}% dos votos válidos`,position:"1º Lugar"},{...te,avatar:"man",description:`${te.pct}% dos votos válidos`,position:"2º Lugar"},{name:"Candidato C",tag:"GHI",tagColor:"#3b82f6",avatar:"man",avatarColor:"#3b82f6",description:`${D}% dos votos válidos`,position:"3º Lugar"}]}let V=X(null),q=X(null),F=X(null),oe=X(null),ve=X(null);const se=B(()=>i(F)??i(V)),ee=B(()=>i(se)&&i(_)?.states&&Array.isArray(i(_).states)?i(_).states.find(m=>m.state.toLowerCase()===i(se)):null),Ce=B(()=>i(se)?N(i(se)):null),Ne=B(()=>i(se)?r()?P(i(se)):i(ee)?.leader&&i(ee)?.runner_up?[{name:xo(i(ee).leader.name),photoUrl:i(ee).leader.photo_url,tag:i(ee).leader.party_abbr,tagColor:i(ee).leader.party_color,avatar:"man",avatarColor:i(ee).leader.party_color,description:`${i(ee).leader.valid_votes_pct}% dos votos válidos`,position:"1º Lugar"},{name:xo(i(ee).runner_up.name),photoUrl:i(ee).runner_up.photo_url,tag:i(ee).runner_up.party_abbr,tagColor:i(ee).runner_up.party_color,avatar:"man",avatarColor:i(ee).runner_up.party_color,description:`${i(ee).runner_up.valid_votes_pct}% dos votos válidos`,position:"2º Lugar"}]:[]:[]),it=B(()=>r()?sc:On(i(_)?.last_updated));function ie(m){S(V,m.cid,!0)}function W(m){S(F,i(F)===m.cid?null:m.cid,!0)}At(()=>{if(!i(F))return;function m(H){const w=H.target,A=i(q)?.contains(w),D=i(oe)?.contains(w)||i(ve)?.contains(w);!A&&!D&&S(F,null)}const C=setTimeout(()=>{document.addEventListener("click",m)},0);return()=>{clearTimeout(C),document.removeEventListener("click",m)}});var ne=pc();let ue;var $e=z(ne);bl($e,{get title(){return s().title},get description(){return s().description},get tag(){return s().tag},get tagColor(){return s().tagColor}});var st=T($e,2),yt=z(st);hl(yt,{label:"Cargo",get options(){return c},get value(){return i(v)},set value(m){S(v,m,!0)}});var le=T(st,2),ye=z(le);Mn(ye,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return c},get value(){return i(v)},set value(m){S(v,m,!0)}});var ke=T(le,2);{var lt=m=>{var C=ur(),H=Ye(C);{var w=U=>{var te=lc();y(U,te)},A=U=>{var te=cc(),fe=z(te);R(()=>G(fe,i(p))),y(U,te)},D=U=>{var te=hc(),fe=Ye(te),Se=z(fe);Mn(Se,{label:"Busque por estado ou interaja com o mapa",get options(){return L},get value(){return i(F)},set value(he){S(F,he,!0)}}),Zt(fe,he=>S(oe,he),()=>i(oe));var Ue=T(fe,2),Pt=z(Ue),Qr=z(Pt);wo(Qr,{type:"brazil-states",get colors(){return i(O)},get selected(){return i(se)},selectionStroke:"#da00008c",selectionStrokeWidth:7,toggleSelection:!0,interactive:!0,onRegionHover:ie,onRegionClick:W});var Ee=T(Qr,2),ze=z(Ee);bo(ze,{title:"Porcentagem das urnas apuradas:",get segments(){return x}}),Zt(Pt,he=>S(q,he),()=>i(q));var Rt=T(Pt,2),Nn=z(Rt);{var _c=he=>{var zt=vc(),$r=Ye(zt),Fn=T(z($r)),Hn=z(Fn),jt=T($r,2);{var en=yr=>{mo(yr,{get candidates(){return i(Ne)},get date(){return i(it)},font:"TSE"})},Bn=yr=>{var Ao=dc(),Sc=z(Ao);R(()=>G(Sc,`Resultado ainda não publicado para ${i(Ce)??""}.`)),y(yr,Ao)};j(jt,yr=>{i(Ne).length>0?yr(en):yr(Bn,!1)})}R(()=>G(Hn,i(Ce))),y(he,zt)},wc=he=>{var zt=fc();y(he,zt)};j(Nn,he=>{i(se)&&i(Ce)?he(_c):he(wc,!1)})}var bc=T(Ue,2),So=T(z(bc),2),xc=z(So);wo(xc,{type:"brazil-states",get colors(){return i(O)}});var Eo=T(So,2),yc=z(Eo);bo(yc,{title:"Porcentagem das urnas apuradas:",get segments(){return x}});var qn=T(Eo,2),zc=z(qn);{let he=B(()=>i(F)?"Você selecionou:":"Busque por estado e veja a liderança atual:");Mn(zc,{get label(){return i(he)},get options(){return L},get value(){return i(F)},set value(zt){S(F,zt,!0)}})}Zt(qn,he=>S(ve,he),()=>i(ve));var Cc=T(qn,2);{var kc=he=>{var zt=ur(),$r=Ye(zt);{var Fn=jt=>{mo(jt,{get candidates(){return i(Ne)},get date(){return i(it)},font:"TSE"})},Hn=jt=>{var en=uc(),Bn=z(en);R(()=>G(Bn,`Resultado ainda não publicado para ${i(Ce)??""}.`)),y(jt,en)};j($r,jt=>{i(Ne).length>0?jt(Fn):jt(Hn,!1)})}y(he,zt)};j(Cc,he=>{i(F)&&he(kc)})}zn("mouseleave",Pt,()=>S(V,null)),y(U,te)};j(H,U=>{i(f)?U(w):i(p)?U(A,1):U(D,!1)})}y(m,C)};j(ke,m=>{(r()||i(v))&&m(lt)})}R(()=>ue=xe(ne,1,"sevn_counting_progress svelte-1ht2osm",null,ue,{"sevn_counting_progress--raw":n()})),y(t,ne),Ft()}const Co=ws(mc,"CountingProgress");return typeof window<"u"&&(window.SevnElections=Object.assign(window.SevnElections||{},{Core:Bo,CountingProgress:Co}),xs()),Co}));