ocean-brain 0.2.1 → 0.3.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 (100) hide show
  1. package/dist/index.js +73 -41
  2. package/dist/mcp.js +587 -26
  3. package/package.json +6 -1
  4. package/scripts/postinstall-prisma.mjs +41 -0
  5. package/server/client/dist/assets/Calendar-DRv2aEl8.js +28 -0
  6. package/server/client/dist/assets/Callout-B2kPcDrq.js +1 -0
  7. package/server/client/dist/assets/Graph-DotbTrZR.js +1 -0
  8. package/server/client/dist/assets/Image-B5R7gF2P.js +1 -0
  9. package/server/client/dist/assets/Image.es-Dld9r9MJ.js +1 -0
  10. package/server/client/dist/assets/ModalActionRow-CES9L_Gy.js +1 -0
  11. package/server/client/dist/assets/Note-SK4hDhEM.css +1 -0
  12. package/server/client/dist/assets/Note-cIbXJc1v.js +1 -0
  13. package/server/client/dist/assets/Reminders-4LunlZRb.js +1 -0
  14. package/server/client/dist/assets/Search-Cp17DGR6.js +1 -0
  15. package/server/client/dist/assets/SurfaceCard-yzVU4Qkx.js +1 -0
  16. package/server/client/dist/assets/Tag-CwmuMPmo.js +1 -0
  17. package/server/client/dist/assets/TagNotes-gGroWMtT.js +1 -0
  18. package/server/client/dist/assets/Trash.es-B3KWD8_C.js +1 -0
  19. package/server/client/dist/assets/color-wpu7wT_s.js +1 -0
  20. package/server/client/dist/assets/graph-vendor-CUxe67Lr.js +46 -0
  21. package/server/client/dist/assets/image.api-DJgOBt8S.js +17 -0
  22. package/server/client/dist/assets/index-40Y2UsVr.js +205 -0
  23. package/server/client/dist/assets/index-BnxpTwtL.css +1 -0
  24. package/server/client/dist/assets/index-DYUg2N-6.js +1 -0
  25. package/server/client/dist/assets/manage-image-ByY1mRZx.js +1 -0
  26. package/server/client/dist/assets/manage-image-detail-BVaDZHRu.js +1 -0
  27. package/server/client/dist/assets/mcp-Jj3061aI.js +1 -0
  28. package/server/client/dist/assets/{note-core-DTIu0anW.js → note-core-BCgMq5QA.js} +7 -7
  29. package/server/client/dist/assets/note-vendor-BofYbzmZ.js +54 -0
  30. package/server/client/dist/assets/placeholder-4P_GK7fV.js +34 -0
  31. package/server/client/dist/assets/trash-CPBwY07S.js +1 -0
  32. package/server/client/dist/assets/useReminderMutate-1YVndM2T.js +82 -0
  33. package/server/client/dist/index.html +5 -4
  34. package/server/dist/app.js +97 -9
  35. package/server/dist/app.js.map +1 -1
  36. package/server/dist/main.js +16 -2
  37. package/server/dist/main.js.map +1 -1
  38. package/server/dist/modules/auth-guard.js +73 -0
  39. package/server/dist/modules/auth-guard.js.map +1 -0
  40. package/server/dist/modules/auth-mode.js +51 -0
  41. package/server/dist/modules/auth-mode.js.map +1 -0
  42. package/server/dist/modules/auth.js +9 -0
  43. package/server/dist/modules/auth.js.map +1 -1
  44. package/server/dist/modules/blocknote.js +7 -1
  45. package/server/dist/modules/blocknote.js.map +1 -1
  46. package/server/dist/modules/error-handler.js +41 -0
  47. package/server/dist/modules/error-handler.js.map +1 -0
  48. package/server/dist/modules/image-upload.js +114 -0
  49. package/server/dist/modules/image-upload.js.map +1 -0
  50. package/server/dist/modules/mcp-admin.js +88 -0
  51. package/server/dist/modules/mcp-admin.js.map +1 -0
  52. package/server/dist/modules/mcp-auth.js +71 -0
  53. package/server/dist/modules/mcp-auth.js.map +1 -0
  54. package/server/dist/modules/mcp-token.js +28 -0
  55. package/server/dist/modules/mcp-token.js.map +1 -0
  56. package/server/dist/modules/note-authoring.js +140 -0
  57. package/server/dist/modules/note-authoring.js.map +1 -0
  58. package/server/dist/modules/note-cleanup.js +207 -0
  59. package/server/dist/modules/note-cleanup.js.map +1 -0
  60. package/server/dist/modules/note-snapshot.js +223 -0
  61. package/server/dist/modules/note-snapshot.js.map +1 -0
  62. package/server/dist/modules/note-trash.js +262 -0
  63. package/server/dist/modules/note-trash.js.map +1 -0
  64. package/server/dist/modules/prisma-runtime.js +46 -0
  65. package/server/dist/modules/prisma-runtime.js.map +1 -0
  66. package/server/dist/modules/recovery-retention.js +26 -0
  67. package/server/dist/modules/recovery-retention.js.map +1 -0
  68. package/server/dist/modules/remote-image.js +176 -0
  69. package/server/dist/modules/remote-image.js.map +1 -0
  70. package/server/dist/modules/tag-organization.js +66 -0
  71. package/server/dist/modules/tag-organization.js.map +1 -0
  72. package/server/dist/modules/use-async.js +2 -4
  73. package/server/dist/modules/use-async.js.map +1 -1
  74. package/server/dist/schema/note/index.js +150 -6
  75. package/server/dist/schema/note/index.js.map +1 -1
  76. package/server/dist/start.js +11 -0
  77. package/server/dist/start.js.map +1 -0
  78. package/server/dist/types/index.js.map +1 -1
  79. package/server/dist/urls.js +3 -2
  80. package/server/dist/urls.js.map +1 -1
  81. package/server/dist/views/auth.js +305 -0
  82. package/server/dist/views/auth.js.map +1 -0
  83. package/server/dist/views/image.js +24 -81
  84. package/server/dist/views/image.js.map +1 -1
  85. package/server/dist/views/index.js +4 -0
  86. package/server/dist/views/index.js.map +1 -1
  87. package/server/dist/views/mcp-admin.js +42 -0
  88. package/server/dist/views/mcp-admin.js.map +1 -0
  89. package/server/dist/views/note.js +124 -0
  90. package/server/dist/views/note.js.map +1 -0
  91. package/server/dist/views/tag.js +23 -0
  92. package/server/dist/views/tag.js.map +1 -0
  93. package/server/prisma/migrations/20260331183000_0010_note_snapshot/migration.sql +13 -0
  94. package/server/prisma/migrations/20260331195000_0011_note_trash_entities/migration.sql +35 -0
  95. package/server/prisma/migrations/20260331213000_0012_image_hash_unique/migration.sql +49 -0
  96. package/server/prisma/migrations/20260404000000_0013_mcp_admin_control/migration.sql +9 -0
  97. package/server/prisma/schema.prisma +66 -1
  98. package/server/client/dist/assets/index-BJgBFWwL.css +0 -1
  99. package/server/client/dist/assets/index-DvNRv9YC.js +0 -391
  100. package/server/client/dist/assets/note-vendor-CUVHa9LU.js +0 -54
@@ -1,391 +0,0 @@
1
- import{r as d,R as ns,a as On,j as p,c as Uy,b as Vy,d as Rc,e as he,u as Zy,o as By,s as qy,f as Wy,g as Gy,h as Ky,i as Yy,k as Qy,l as Xy,m as Jy,U as mh,y as ev,v as tv,n as Mc,p as nv,X as rv,F as av,q as ov}from"./note-vendor-CUVHa9LU.js";import{g as ra,Y as iv,a3 as sv,a4 as lv,A as cv}from"./note-core-DTIu0anW.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();const Tc={DARK:"(prefers-color-scheme: dark)",LIGHT:"(prefers-color-scheme: light)",RETINA:"(min-resolution: 2dppx)",RESPONSIVE:e=>`screen and (max-width: ${e})`},gh=e=>typeof window<"u"&&window.matchMedia?window.matchMedia(e):null,Pc=(e,n,r=!0)=>{const a=gh(e);r&&n(a?.matches||!1);const o=i=>{n?.(i.matches)};return a?.addEventListener("change",o),()=>{a?.removeEventListener("change",o)}},uv=(e,n=!0)=>Pc(Tc.DARK,e,n),dv=(e,n,r=!0)=>Pc(Tc.RESPONSIVE(e),n,r),fv={MEDIA_QUERY:Tc,listenThemeChange:uv,listenResponsiveChange:dv,createMediaQuery:gh,listenMediaQueryChange:Pc};var yh=e=>{throw TypeError(e)},hv=(e,n,r)=>n.has(e)||yh("Cannot "+r),$s=(e,n,r)=>(hv(e,n,"read from private field"),r?r.call(e):n.get(e)),pv=(e,n,r)=>n.has(e)?yh("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,r),cd="popstate";function ud(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function mv(e={}){function n(a,o){let i=o.state?.masked,{pathname:s,search:l,hash:c}=i||a.location;return Ya("",{pathname:s,search:l,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default",i?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,o){return typeof o=="string"?o:gn(o)}return yv(n,r,null,e)}function be(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Be(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function gv(){return Math.random().toString(36).substring(2,10)}function dd(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ya(e,n,r=null,a,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?Hn(n):n,state:r,key:n&&n.key||a||gv(),unstable_mask:o}}function gn({pathname:e="/",search:n="",hash:r=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Hn(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(n.search=e.substring(a),e=e.substring(0,a)),e&&(n.pathname=e)}return n}function yv(e,n,r,a={}){let{window:o=document.defaultView,v5Compat:i=!1}=a,s=o.history,l="POP",c=null,u=h();u==null&&(u=0,s.replaceState({...s.state,idx:u},""));function h(){return(s.state||{idx:null}).idx}function f(){l="POP";let x=h(),b=x==null?null:x-u;u=x,c&&c({action:l,location:v.location,delta:b})}function m(x,b){l="PUSH";let w=ud(x)?x:Ya(v.location,x,b);u=h()+1;let E=dd(w,u),C=v.createHref(w.unstable_mask||w);try{s.pushState(E,"",C)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;o.location.assign(C)}i&&c&&c({action:l,location:v.location,delta:1})}function g(x,b){l="REPLACE";let w=ud(x)?x:Ya(v.location,x,b);u=h();let E=dd(w,u),C=v.createHref(w.unstable_mask||w);s.replaceState(E,"",C),i&&c&&c({action:l,location:v.location,delta:0})}function y(x){return vh(x)}let v={get action(){return l},get location(){return e(o,s)},listen(x){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(cd,f),c=x,()=>{o.removeEventListener(cd,f),c=null}},createHref(x){return n(o,x)},createURL:y,encodeLocation(x){let b=y(x);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:m,replace:g,go(x){return s.go(x)}};return v}function vh(e,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),be(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:gn(e);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}var Oa,fd=class{constructor(e){if(pv(this,Oa,new Map),e)for(let[n,r]of e)this.set(n,r)}get(e){if($s(this,Oa).has(e))return $s(this,Oa).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,n){$s(this,Oa).set(e,n)}};Oa=new WeakMap;var vv=new Set(["lazy","caseSensitive","path","id","index","children"]);function xv(e){return vv.has(e)}var bv=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function wv(e){return bv.has(e)}function _v(e){return e.index===!0}function Qa(e,n,r=[],a={},o=!1){return e.map((i,s)=>{let l=[...r,String(s)],c=typeof i.id=="string"?i.id:l.join("-");if(be(i.index!==!0||!i.children,"Cannot specify children on an index route"),be(o||!a[c],`Found a route id collision on id "${c}". Route id's must be globally unique within Data Router usages`),_v(i)){let u={...i,id:c};return a[c]=hd(u,n(u)),u}else{let u={...i,id:c,children:void 0};return a[c]=hd(u,n(u)),i.children&&(u.children=Qa(i.children,n,l,a,o)),u}})}function hd(e,n){return Object.assign(e,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...e.lazy,...n.lazy}}:{}})}function Gn(e,n,r="/"){return ja(e,n,r,!1)}function ja(e,n,r,a){let o=typeof n=="string"?Hn(n):n,i=Ut(o.pathname||"/",r);if(i==null)return null;let s=xh(e);Cv(s);let l=null;for(let c=0;l==null&&c<s.length;++c){let u=kv(i);l=jv(s[c],u,a)}return l}function Ev(e,n){let{route:r,pathname:a,params:o}=e;return{id:r.id,pathname:a,params:o,data:n[r.id],loaderData:n[r.id],handle:r.handle}}function xh(e,n=[],r=[],a="",o=!1){let i=(s,l,c=o,u)=>{let h={relativePath:u===void 0?s.path||"":u,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(a)&&c)return;be(h.relativePath.startsWith(a),`Absolute route path "${h.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length)}let f=Jt([a,h.relativePath]),m=r.concat(h);s.children&&s.children.length>0&&(be(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),xh(s.children,n,m,f,c)),!(s.path==null&&!s.index)&&n.push({path:f,score:Nv(f,s.index),routesMeta:m})};return e.forEach((s,l)=>{if(s.path===""||!s.path?.includes("?"))i(s,l);else for(let c of bh(s.path))i(s,l,!0,c)}),n}function bh(e){let n=e.split("/");if(n.length===0)return[];let[r,...a]=n,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(a.length===0)return o?[i,""]:[i];let s=bh(a.join("/")),l=[];return l.push(...s.map(c=>c===""?i:[i,c].join("/"))),o&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function Cv(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:Ov(n.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Sv=/^:[\w-]+$/,Av=3,Rv=2,Mv=1,Tv=10,Pv=-2,pd=e=>e==="*";function Nv(e,n){let r=e.split("/"),a=r.length;return r.some(pd)&&(a+=Pv),n&&(a+=Rv),r.filter(o=>!pd(o)).reduce((o,i)=>o+(Sv.test(i)?Av:i===""?Mv:Tv),a)}function Ov(e,n){return e.length===n.length&&e.slice(0,-1).every((a,o)=>a===n[o])?e[e.length-1]-n[n.length-1]:0}function jv(e,n,r=!1){let{routesMeta:a}=e,o={},i="/",s=[];for(let l=0;l<a.length;++l){let c=a[l],u=l===a.length-1,h=i==="/"?n:n.slice(i.length)||"/",f=Mi({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},h),m=c.route;if(!f&&u&&r&&!a[a.length-1].route.index&&(f=Mi({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!f)return null;Object.assign(o,f.params),s.push({params:o,pathname:Jt([i,f.pathname]),pathnameBase:Fv(Jt([i,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(i=Jt([i,f.pathnameBase]))}return s}function Mi(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Dv(e.path,e.caseSensitive,e.end),o=n.match(r);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:a.reduce((u,{paramName:h,isOptional:f},m)=>{if(h==="*"){let y=l[m]||"";s=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const g=l[m];return f&&!g?u[h]=void 0:u[h]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function Dv(e,n=!1,r=!0){Be(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c,u,h)=>{if(a.push({paramName:l,isOptional:c!=null}),c){let f=h.charAt(u+s.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),a]}function kv(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Be(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Ut(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Iv({basename:e,pathname:n}){return n==="/"?e:Jt([e,n])}var wh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nc=e=>wh.test(e);function Lv(e,n="/"){let{pathname:r,search:a="",hash:o=""}=typeof e=="string"?Hn(e):e,i;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?i=md(r.substring(1),"/"):i=md(r,n)):i=n,{pathname:i,search:$v(a),hash:Hv(o)}}function md(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Hs(e,n,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function _h(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function Oc(e){let n=_h(e);return n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase)}function rs(e,n,r,a=!1){let o;typeof e=="string"?o=Hn(e):(o={...e},be(!o.pathname||!o.pathname.includes("?"),Hs("?","pathname","search",o)),be(!o.pathname||!o.pathname.includes("#"),Hs("#","pathname","hash",o)),be(!o.search||!o.search.includes("#"),Hs("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(s==null)l=r;else{let f=n.length-1;if(!a&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),f-=1;o.pathname=m.join("/")}l=f>=0?n[f]:"/"}let c=Lv(o,l),u=s&&s!=="/"&&s.endsWith("/"),h=(i||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||h)&&(c.pathname+="/"),c}var Jt=e=>e.join("/").replace(/\/\/+/g,"/"),Fv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$v=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Hv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,yo=class{constructor(e,n,r,a=!1){this.status=e,this.statusText=n||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Xa(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function vo(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Eh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ch(e,n){let r=e;if(typeof r!="string"||!wh.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,o=!1;if(Eh)try{let i=new URL(window.location.href),s=r.startsWith("//")?new URL(i.protocol+r):new URL(r),l=Ut(s.pathname,n);s.origin===i.origin&&l!=null?r=l+s.search+s.hash:o=!0}catch{Be(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:o,to:r}}var Yn=Symbol("Uninstrumented");function zv(e,n){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:n.id,index:n.index,path:n.path,instrument(i){let s=Object.keys(r);for(let l of s)i[l]&&r[l].push(i[l])}}));let a={};if(typeof n.lazy=="function"&&r.lazy.length>0){let o=Vr(r.lazy,n.lazy,()=>{});o&&(a.lazy=o)}if(typeof n.lazy=="object"){let o=n.lazy;["middleware","loader","action"].forEach(i=>{let s=o[i],l=r[`lazy.${i}`];if(typeof s=="function"&&l.length>0){let c=Vr(l,s,()=>{});c&&(a.lazy=Object.assign(a.lazy||{},{[i]:c}))}})}return["loader","action"].forEach(o=>{let i=n[o];if(typeof i=="function"&&r[o].length>0){let s=i[Yn]??i,l=Vr(r[o],s,(...c)=>gd(c[0]));l&&(o==="loader"&&s.hydrate===!0&&(l.hydrate=!0),l[Yn]=s,a[o]=l)}}),n.middleware&&n.middleware.length>0&&r.middleware.length>0&&(a.middleware=n.middleware.map(o=>{let i=o[Yn]??o,s=Vr(r.middleware,i,(...l)=>gd(l[0]));return s?(s[Yn]=i,s):o})),a}function Uv(e,n){let r={navigate:[],fetch:[]};if(n.forEach(a=>a({instrument(o){let i=Object.keys(o);for(let s of i)o[s]&&r[s].push(o[s])}})),r.navigate.length>0){let a=e.navigate[Yn]??e.navigate,o=Vr(r.navigate,a,(...i)=>{let[s,l]=i;return{to:typeof s=="number"||typeof s=="string"?s:s?gn(s):".",...yd(e,l??{})}});o&&(o[Yn]=a,e.navigate=o)}if(r.fetch.length>0){let a=e.fetch[Yn]??e.fetch,o=Vr(r.fetch,a,(...i)=>{let[s,,l,c]=i;return{href:l??".",fetcherKey:s,...yd(e,c??{})}});o&&(o[Yn]=a,e.fetch=o)}return e}function Vr(e,n,r){return e.length===0?null:async(...a)=>{let o=await Sh(e,r(...a),()=>n(...a),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function Sh(e,n,r,a){let o=e[a],i;if(o){let s,l=async()=>(s?console.error("You cannot call instrumented handlers more than once"):s=Sh(e,n,r,a-1),i=await s,be(i,"Expected a result"),i.type==="error"&&i.value instanceof Error?{status:"error",error:i.value}:{status:"success",error:void 0});try{await o(l,n)}catch(c){console.error("An instrumentation function threw an error:",c)}s||await l(),await s}else try{i={type:"success",value:await r()}}catch(s){i={type:"error",value:s}}return i||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function gd(e){let{request:n,context:r,params:a,unstable_pattern:o}=e;return{request:Vv(n),params:{...a},unstable_pattern:o,context:Zv(r)}}function yd(e,n){return{currentUrl:gn(e.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function Vv(e){return{method:e.method,url:e.url,headers:{get:(...n)=>e.headers.get(...n)}}}function Zv(e){if(qv(e)){let n={...e};return Object.freeze(n),n}else return{get:n=>e.get(n)}}var Bv=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qv(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===Bv}var Ah=["POST","PUT","PATCH","DELETE"],Wv=new Set(Ah),Gv=["GET",...Ah],Kv=new Set(Gv),Rh=new Set([301,302,303,307,308]),Yv=new Set([307,308]),zs={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Qv={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},va={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Xv=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Mh="remix-router-transitions",Th=Symbol("ResetLoaderData");function Jv(e){const n=e.window?e.window:typeof window<"u"?window:void 0,r=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";be(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],o=e.mapRouteProperties||Xv,i=o;if(e.unstable_instrumentations){let N=e.unstable_instrumentations;i=L=>({...o(L),...zv(N.map(z=>z.route).filter(Boolean),L)})}let s={},l=Qa(e.routes,i,void 0,s),c,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let h=e.dataStrategy||ax,f={...e.future},m=null,g=new Set,y=null,v=null,x=null,b=e.hydrationData!=null,w=Gn(l,e.history.location,u),E=!1,C=null,S,M;if(w==null&&!e.patchRoutesOnNavigation){let N=It(404,{pathname:e.history.location.pathname}),{matches:L,route:z}=Qo(l);S=!0,M=!S,w=L,C={[z.id]:N}}else if(w&&!e.hydrationData&&lt(w,l,e.history.location.pathname).active&&(w=null),w)if(w.some(N=>N.route.lazy))S=!1,M=!S;else if(!w.some(N=>jc(N.route)))S=!0,M=!S;else{let N=e.hydrationData?e.hydrationData.loaderData:null,L=e.hydrationData?e.hydrationData.errors:null,z=w;if(L){let W=w.findIndex(K=>L[K.route.id]!==void 0);z=z.slice(0,W+1)}M=!1,S=z.every(W=>{let K=Ph(W.route,N,L);return M=M||K.renderFallback,!K.shouldLoad})}else{S=!1,M=!S,w=[];let N=lt(null,l,e.history.location.pathname);N.active&&N.matches&&(E=!0,w=N.matches)}let R,_={historyAction:e.history.action,location:e.history.location,matches:w,initialized:S,renderFallback:M,navigation:zs,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},O="POP",P=null,j=!1,$,V=!1,A=new Map,D=null,T=!1,F=!1,H=new Set,I=new Map,Z=0,B=-1,q=new Map,X=new Set,Q=new Map,oe=new Map,le=new Set,G=new Map,ie,pe=null;function J(){if(m=e.history.listen(({action:N,location:L,delta:z})=>{if(ie){ie(),ie=void 0;return}Be(G.size===0||z!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let W=We({currentLocation:_.location,nextLocation:L,historyAction:N});if(W&&z!=null){let K=new Promise(re=>{ie=re});e.history.go(z*-1),kr(W,{state:"blocked",location:L,proceed(){kr(W,{state:"proceeding",proceed:void 0,reset:void 0,location:L}),K.then(()=>e.history.go(z))},reset(){let re=new Map(_.blockers);re.set(W,va),ye({blockers:re})}}),P?.resolve(),P=null;return}return mt(N,L)}),r){_x(n,A);let N=()=>Ex(n,A);n.addEventListener("pagehide",N),D=()=>n.removeEventListener("pagehide",N)}return _.initialized||mt("POP",_.location,{initialHydration:!0}),R}function ge(){m&&m(),D&&D(),g.clear(),$&&$.abort(),_.fetchers.forEach((N,L)=>ha(L)),_.blockers.forEach((N,L)=>Wo(L))}function ve(N){return g.add(N),()=>g.delete(N)}function ye(N,L={}){N.matches&&(N.matches=N.matches.map(K=>{let re=s[K.route.id],ee=K.route;return ee.element!==re.element||ee.errorElement!==re.errorElement||ee.hydrateFallbackElement!==re.hydrateFallbackElement?{...K,route:re}:K})),_={..._,...N};let z=[],W=[];_.fetchers.forEach((K,re)=>{K.state==="idle"&&(le.has(re)?z.push(re):W.push(re))}),le.forEach(K=>{!_.fetchers.has(K)&&!I.has(K)&&z.push(K)}),[...g].forEach(K=>K(_,{deletedFetchers:z,newErrors:N.errors??null,viewTransitionOpts:L.viewTransitionOpts,flushSync:L.flushSync===!0})),z.forEach(K=>ha(K)),W.forEach(K=>_.fetchers.delete(K))}function Ie(N,L,{flushSync:z}={}){let W=_.actionData!=null&&_.navigation.formMethod!=null&&rt(_.navigation.formMethod)&&_.navigation.state==="loading"&&N.state?._isRedirect!==!0,K;L.actionData?Object.keys(L.actionData).length>0?K=L.actionData:K=null:W?K=_.actionData:K=null;let re=L.loaderData?Rd(_.loaderData,L.loaderData,L.matches||[],L.errors):_.loaderData,ee=_.blockers;ee.size>0&&(ee=new Map(ee),ee.forEach((de,se)=>ee.set(se,va)));let ce=T?!1:et(N,L.matches||_.matches),ne=j===!0||_.navigation.formMethod!=null&&rt(_.navigation.formMethod)&&N.state?._isRedirect!==!0;c&&(l=c,c=void 0),T||O==="POP"||(O==="PUSH"?e.history.push(N,N.state):O==="REPLACE"&&e.history.replace(N,N.state));let ue;if(O==="POP"){let de=A.get(_.location.pathname);de&&de.has(N.pathname)?ue={currentLocation:_.location,nextLocation:N}:A.has(N.pathname)&&(ue={currentLocation:N,nextLocation:_.location})}else if(V){let de=A.get(_.location.pathname);de?de.add(N.pathname):(de=new Set([N.pathname]),A.set(_.location.pathname,de)),ue={currentLocation:_.location,nextLocation:N}}ye({...L,actionData:K,loaderData:re,historyAction:O,location:N,initialized:!0,renderFallback:!1,navigation:zs,revalidation:"idle",restoreScrollPosition:ce,preventScrollReset:ne,blockers:ee},{viewTransitionOpts:ue,flushSync:z===!0}),O="POP",j=!1,V=!1,T=!1,F=!1,P?.resolve(),P=null,pe?.resolve(),pe=null}async function Et(N,L){if(P?.resolve(),P=null,typeof N=="number"){P||(P=Nd());let He=P.promise;return e.history.go(N),He}let z=Cl(_.location,_.matches,u,N,L?.fromRouteId,L?.relative),{path:W,submission:K,error:re}=vd(!1,z,L),ee;L?.unstable_mask&&(ee={pathname:"",search:"",hash:"",...typeof L.unstable_mask=="string"?Hn(L.unstable_mask):{..._.location.unstable_mask,...L.unstable_mask}});let ce=_.location,ne=Ya(ce,W,L&&L.state,void 0,ee);ne={...ne,...e.history.encodeLocation(ne)};let ue=L&&L.replace!=null?L.replace:void 0,de="PUSH";ue===!0?de="REPLACE":ue===!1||K!=null&&rt(K.formMethod)&&K.formAction===_.location.pathname+_.location.search&&(de="REPLACE");let se=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,Re=(L&&L.flushSync)===!0,Se=We({currentLocation:ce,nextLocation:ne,historyAction:de});if(Se){kr(Se,{state:"blocked",location:ne,proceed(){kr(Se,{state:"proceeding",proceed:void 0,reset:void 0,location:ne}),Et(N,L)},reset(){let He=new Map(_.blockers);He.set(Se,va),ye({blockers:He})}});return}await mt(de,ne,{submission:K,pendingError:re,preventScrollReset:se,replace:L&&L.replace,enableViewTransition:L&&L.viewTransition,flushSync:Re,callSiteDefaultShouldRevalidate:L&&L.unstable_defaultShouldRevalidate})}function Tt(){pe||(pe=Nd()),sn(),ye({revalidation:"loading"});let N=pe.promise;return _.navigation.state==="submitting"?N:_.navigation.state==="idle"?(mt(_.historyAction,_.location,{startUninterruptedRevalidation:!0}),N):(mt(O||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:V===!0}),N)}async function mt(N,L,z){$&&$.abort(),$=null,O=N,T=(z&&z.startUninterruptedRevalidation)===!0,gt(_.location,_.matches),j=(z&&z.preventScrollReset)===!0,V=(z&&z.enableViewTransition)===!0;let W=c||l,K=z&&z.overrideNavigation,re=z?.initialHydration&&_.matches&&_.matches.length>0&&!E?_.matches:Gn(W,L,u),ee=(z&&z.flushSync)===!0;if(re&&_.initialized&&!F&&fx(_.location,L)&&!(z&&z.submission&&rt(z.submission.formMethod))){Ie(L,{matches:re},{flushSync:ee});return}let ce=lt(re,W,L.pathname);if(ce.active&&ce.matches&&(re=ce.matches),!re){let{error:Ye,notFoundMatches:ct,route:Pe}=Xe(L.pathname);Ie(L,{matches:ct,loaderData:{},errors:{[Pe.id]:Ye}},{flushSync:ee});return}$=new AbortController;let ne=zr(e.history,L,$.signal,z&&z.submission),ue=e.getContext?await e.getContext():new fd,de;if(z&&z.pendingError)de=[Kn(re).route.id,{type:"error",error:z.pendingError}];else if(z&&z.submission&&rt(z.submission.formMethod)){let Ye=await Uo(ne,L,z.submission,re,ue,ce.active,z&&z.initialHydration===!0,{replace:z.replace,flushSync:ee});if(Ye.shortCircuited)return;if(Ye.pendingActionResult){let[ct,Pe]=Ye.pendingActionResult;if(At(Pe)&&Xa(Pe.error)&&Pe.error.status===404){$=null,Ie(L,{matches:Ye.matches,loaderData:{},errors:{[ct]:Pe.error}});return}}re=Ye.matches||re,de=Ye.pendingActionResult,K=Us(L,z.submission),ee=!1,ce.active=!1,ne=zr(e.history,ne.url,ne.signal)}let{shortCircuited:se,matches:Re,loaderData:Se,errors:He}=await fa(ne,L,re,ue,ce.active,K,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,z&&z.initialHydration===!0,ee,de,z&&z.callSiteDefaultShouldRevalidate);se||($=null,Ie(L,{matches:Re||re,...Md(de),loaderData:Se,errors:He}))}async function Uo(N,L,z,W,K,re,ee,ce={}){sn();let ne=bx(L,z);if(ye({navigation:ne},{flushSync:ce.flushSync===!0}),re){let se=await Wt(W,L.pathname,N.signal);if(se.type==="aborted")return{shortCircuited:!0};if(se.type==="error"){if(se.partialMatches.length===0){let{matches:Se,route:He}=Qo(l);return{matches:Se,pendingActionResult:[He.id,{type:"error",error:se.error}]}}let Re=Kn(se.partialMatches).route.id;return{matches:se.partialMatches,pendingActionResult:[Re,{type:"error",error:se.error}]}}else if(se.matches)W=se.matches;else{let{notFoundMatches:Re,error:Se,route:He}=Xe(L.pathname);return{matches:Re,pendingActionResult:[He.id,{type:"error",error:Se}]}}}let ue,de=pi(W,L);if(!de.route.action&&!de.route.lazy)ue={type:"error",error:It(405,{method:N.method,pathname:L.pathname,routeId:de.route.id})};else{let se=Zr(i,s,N,W,de,ee?[]:a,K),Re=await sr(N,se,K,null);if(ue=Re[de.route.id],!ue){for(let Se of W)if(Re[Se.route.id]){ue=Re[Se.route.id];break}}if(N.signal.aborted)return{shortCircuited:!0}}if(hr(ue)){let se;return ce&&ce.replace!=null?se=ce.replace:se=Cd(ue.response.headers.get("Location"),new URL(N.url),u,e.history)===_.location.pathname+_.location.search,await _n(N,ue,!0,{submission:z,replace:se}),{shortCircuited:!0}}if(At(ue)){let se=Kn(W,de.route.id);return(ce&&ce.replace)!==!0&&(O="PUSH"),{matches:W,pendingActionResult:[se.route.id,ue,de.route.id]}}return{matches:W,pendingActionResult:[de.route.id,ue]}}async function fa(N,L,z,W,K,re,ee,ce,ne,ue,de,se,Re){let Se=re||Us(L,ee),He=ee||ce||Pd(Se),Ye=!T&&!ue;if(K){if(Ye){let tt=Zt(se);ye({navigation:Se,...tt!==void 0?{actionData:tt}:{}},{flushSync:de})}let Ce=await Wt(z,L.pathname,N.signal);if(Ce.type==="aborted")return{shortCircuited:!0};if(Ce.type==="error"){if(Ce.partialMatches.length===0){let{matches:Ir,route:ur}=Qo(l);return{matches:Ir,loaderData:{},errors:{[ur.id]:Ce.error}}}let tt=Kn(Ce.partialMatches).route.id;return{matches:Ce.partialMatches,loaderData:{},errors:{[tt]:Ce.error}}}else if(Ce.matches)z=Ce.matches;else{let{error:tt,notFoundMatches:Ir,route:ur}=Xe(L.pathname);return{matches:Ir,loaderData:{},errors:{[ur.id]:tt}}}}let ct=c||l,{dsMatches:Pe,revalidatingFetchers:Ot}=xd(N,W,i,s,e.history,_,z,He,L,ue?[]:a,ue===!0,F,H,le,Q,X,ct,u,e.patchRoutesOnNavigation!=null,se,Re);if(B=++Z,!e.dataStrategy&&!Pe.some(Ce=>Ce.shouldLoad)&&!Pe.some(Ce=>Ce.route.middleware&&Ce.route.middleware.length>0)&&Ot.length===0){let Ce=qo();return Ie(L,{matches:z,loaderData:{},errors:se&&At(se[1])?{[se[0]]:se[1].error}:null,...Md(se),...Ce?{fetchers:new Map(_.fetchers)}:{}},{flushSync:de}),{shortCircuited:!0}}if(Ye){let Ce={};if(!K){Ce.navigation=Se;let tt=Zt(se);tt!==void 0&&(Ce.actionData=tt)}Ot.length>0&&(Ce.fetchers=jr(Ot)),ye(Ce,{flushSync:de})}Ot.forEach(Ce=>{Ct(Ce.key),Ce.controller&&I.set(Ce.key,Ce.controller)});let lr=()=>Ot.forEach(Ce=>Ct(Ce.key));$&&$.signal.addEventListener("abort",lr);let{loaderResults:ga,fetcherResults:Un}=await En(Pe,Ot,N,W);if(N.signal.aborted)return{shortCircuited:!0};$&&$.signal.removeEventListener("abort",lr),Ot.forEach(Ce=>I.delete(Ce.key));let cn=Xo(ga);if(cn)return await _n(N,cn.result,!0,{replace:ne}),{shortCircuited:!0};if(cn=Xo(Un),cn)return X.add(cn.key),await _n(N,cn.result,!0,{replace:ne}),{shortCircuited:!0};let{loaderData:Fs,errors:ya}=Ad(_,z,ga,se,Ot,Un);ue&&_.errors&&(ya={..._.errors,...ya});let cr=qo(),Go=ma(B),Ko=cr||Go||Ot.length>0;return{matches:z,loaderData:Fs,errors:ya,...Ko?{fetchers:new Map(_.fetchers)}:{}}}function Zt(N){if(N&&!At(N[1]))return{[N[0]]:N[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function jr(N){return N.forEach(L=>{let z=_.fetchers.get(L.key),W=xa(void 0,z?z.data:void 0);_.fetchers.set(L.key,W)}),new Map(_.fetchers)}async function Dr(N,L,z,W){Ct(N);let K=(W&&W.flushSync)===!0,re=c||l,ee=Cl(_.location,_.matches,u,z,L,W?.relative),ce=Gn(re,ee,u),ne=lt(ce,re,ee);if(ne.active&&ne.matches&&(ce=ne.matches),!ce){Pt(N,L,It(404,{pathname:ee}),{flushSync:K});return}let{path:ue,submission:de,error:se}=vd(!0,ee,W);if(se){Pt(N,L,se,{flushSync:K});return}let Re=e.getContext?await e.getContext():new fd,Se=(W&&W.preventScrollReset)===!0;if(de&&rt(de.formMethod)){await Vo(N,L,ue,ce,Re,ne.active,K,Se,de,W&&W.unstable_defaultShouldRevalidate);return}Q.set(N,{routeId:L,path:ue}),await Zo(N,L,ue,ce,Re,ne.active,K,Se,de)}async function Vo(N,L,z,W,K,re,ee,ce,ne,ue){sn(),Q.delete(N);let de=_.fetchers.get(N);it(N,wx(ne,de),{flushSync:ee});let se=new AbortController,Re=zr(e.history,z,se.signal,ne);if(re){let ze=await Wt(W,new URL(Re.url).pathname,Re.signal,N);if(ze.type==="aborted")return;if(ze.type==="error"){Pt(N,L,ze.error,{flushSync:ee});return}else if(ze.matches)W=ze.matches;else{Pt(N,L,It(404,{pathname:z}),{flushSync:ee});return}}let Se=pi(W,z);if(!Se.route.action&&!Se.route.lazy){let ze=It(405,{method:ne.formMethod,pathname:z,routeId:L});Pt(N,L,ze,{flushSync:ee});return}I.set(N,se);let He=Z,Ye=Zr(i,s,Re,W,Se,a,K),ct=await sr(Re,Ye,K,N),Pe=ct[Se.route.id];if(!Pe){for(let ze of Ye)if(ct[ze.route.id]){Pe=ct[ze.route.id];break}}if(Re.signal.aborted){I.get(N)===se&&I.delete(N);return}if(le.has(N)){if(hr(Pe)||At(Pe)){it(N,Tn(void 0));return}}else{if(hr(Pe))if(I.delete(N),B>He){it(N,Tn(void 0));return}else return X.add(N),it(N,xa(ne)),_n(Re,Pe,!1,{fetcherSubmission:ne,preventScrollReset:ce});if(At(Pe)){Pt(N,L,Pe.error);return}}let Ot=_.navigation.location||_.location,lr=zr(e.history,Ot,se.signal),ga=c||l,Un=_.navigation.state!=="idle"?Gn(ga,_.navigation.location,u):_.matches;be(Un,"Didn't find any matches after fetcher action");let cn=++Z;q.set(N,cn);let Fs=xa(ne,Pe.data);_.fetchers.set(N,Fs);let{dsMatches:ya,revalidatingFetchers:cr}=xd(lr,K,i,s,e.history,_,Un,ne,Ot,a,!1,F,H,le,Q,X,ga,u,e.patchRoutesOnNavigation!=null,[Se.route.id,Pe],ue);cr.filter(ze=>ze.key!==N).forEach(ze=>{let Yo=ze.key,ld=_.fetchers.get(Yo),zy=xa(void 0,ld?ld.data:void 0);_.fetchers.set(Yo,zy),Ct(Yo),ze.controller&&I.set(Yo,ze.controller)}),ye({fetchers:new Map(_.fetchers)});let Go=()=>cr.forEach(ze=>Ct(ze.key));se.signal.addEventListener("abort",Go);let{loaderResults:Ko,fetcherResults:Ce}=await En(ya,cr,lr,K);if(se.signal.aborted)return;if(se.signal.removeEventListener("abort",Go),q.delete(N),I.delete(N),cr.forEach(ze=>I.delete(ze.key)),_.fetchers.has(N)){let ze=Tn(Pe.data);_.fetchers.set(N,ze)}let tt=Xo(Ko);if(tt)return _n(lr,tt.result,!1,{preventScrollReset:ce});if(tt=Xo(Ce),tt)return X.add(tt.key),_n(lr,tt.result,!1,{preventScrollReset:ce});let{loaderData:Ir,errors:ur}=Ad(_,Un,Ko,void 0,cr,Ce);ma(cn),_.navigation.state==="loading"&&cn>B?(be(O,"Expected pending action"),$&&$.abort(),Ie(_.navigation.location,{matches:Un,loaderData:Ir,errors:ur,fetchers:new Map(_.fetchers)})):(ye({errors:ur,loaderData:Rd(_.loaderData,Ir,Un,ur),fetchers:new Map(_.fetchers)}),F=!1)}async function Zo(N,L,z,W,K,re,ee,ce,ne){let ue=_.fetchers.get(N);it(N,xa(ne,ue?ue.data:void 0),{flushSync:ee});let de=new AbortController,se=zr(e.history,z,de.signal);if(re){let Pe=await Wt(W,new URL(se.url).pathname,se.signal,N);if(Pe.type==="aborted")return;if(Pe.type==="error"){Pt(N,L,Pe.error,{flushSync:ee});return}else if(Pe.matches)W=Pe.matches;else{Pt(N,L,It(404,{pathname:z}),{flushSync:ee});return}}let Re=pi(W,z);I.set(N,de);let Se=Z,He=Zr(i,s,se,W,Re,a,K),ct=(await sr(se,He,K,N))[Re.route.id];if(I.get(N)===de&&I.delete(N),!se.signal.aborted){if(le.has(N)){it(N,Tn(void 0));return}if(hr(ct))if(B>Se){it(N,Tn(void 0));return}else{X.add(N),await _n(se,ct,!1,{preventScrollReset:ce});return}if(At(ct)){Pt(N,L,ct.error);return}it(N,Tn(ct.data))}}async function _n(N,L,z,{submission:W,fetcherSubmission:K,preventScrollReset:re,replace:ee}={}){z||(P?.resolve(),P=null),L.response.headers.has("X-Remix-Revalidate")&&(F=!0);let ce=L.response.headers.get("Location");be(ce,"Expected a Location header on the redirect Response"),ce=Cd(ce,new URL(N.url),u,e.history);let ne=Ya(_.location,ce,{_isRedirect:!0});if(r){let He=!1;if(L.response.headers.has("X-Remix-Reload-Document"))He=!0;else if(Nc(ce)){const Ye=vh(ce,!0);He=Ye.origin!==n.location.origin||Ut(Ye.pathname,u)==null}if(He){ee?n.location.replace(ce):n.location.assign(ce);return}}$=null;let ue=ee===!0||L.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:de,formAction:se,formEncType:Re}=_.navigation;!W&&!K&&de&&se&&Re&&(W=Pd(_.navigation));let Se=W||K;if(Yv.has(L.response.status)&&Se&&rt(Se.formMethod))await mt(ue,ne,{submission:{...Se,formAction:ce},preventScrollReset:re||j,enableViewTransition:z?V:void 0});else{let He=Us(ne,W);await mt(ue,ne,{overrideNavigation:He,fetcherSubmission:K,preventScrollReset:re||j,enableViewTransition:z?V:void 0})}}async function sr(N,L,z,W){let K,re={};try{K=await ix(h,N,L,W,z,!1)}catch(ee){return L.filter(ce=>ce.shouldLoad).forEach(ce=>{re[ce.route.id]={type:"error",error:ee}}),re}if(N.signal.aborted)return re;if(!rt(N.method))for(let ee of L){if(K[ee.route.id]?.type==="error")break;!K.hasOwnProperty(ee.route.id)&&!_.loaderData.hasOwnProperty(ee.route.id)&&(!_.errors||!_.errors.hasOwnProperty(ee.route.id))&&ee.shouldCallHandler()&&(K[ee.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ee.route.id}`)})}for(let[ee,ce]of Object.entries(K))if(gx(ce)){let ne=ce.result;re[ee]={type:"redirect",response:ux(ne,N,ee,L,u)}}else re[ee]=await cx(ce);return re}async function En(N,L,z,W){let K=sr(z,N,W,null),re=Promise.all(L.map(async ne=>{if(ne.matches&&ne.match&&ne.request&&ne.controller){let de=(await sr(ne.request,ne.matches,W,ne.key))[ne.match.route.id];return{[ne.key]:de}}else return Promise.resolve({[ne.key]:{type:"error",error:It(404,{pathname:ne.path})}})})),ee=await K,ce=(await re).reduce((ne,ue)=>Object.assign(ne,ue),{});return{loaderResults:ee,fetcherResults:ce}}function sn(){F=!0,Q.forEach((N,L)=>{I.has(L)&&H.add(L),Ct(L)})}function it(N,L,z={}){_.fetchers.set(N,L),ye({fetchers:new Map(_.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function Pt(N,L,z,W={}){let K=Kn(_.matches,L);ha(N),ye({errors:{[K.route.id]:z},fetchers:new Map(_.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function Bt(N){return oe.set(N,(oe.get(N)||0)+1),le.has(N)&&le.delete(N),_.fetchers.get(N)||Qv}function Bo(N,L){Ct(N,L?.reason),it(N,Tn(null))}function ha(N){let L=_.fetchers.get(N);I.has(N)&&!(L&&L.state==="loading"&&q.has(N))&&Ct(N),Q.delete(N),q.delete(N),X.delete(N),le.delete(N),H.delete(N),_.fetchers.delete(N)}function Is(N){let L=(oe.get(N)||0)-1;L<=0?(oe.delete(N),le.add(N)):oe.set(N,L),ye({fetchers:new Map(_.fetchers)})}function Ct(N,L){let z=I.get(N);z&&(z.abort(L),I.delete(N))}function pa(N){for(let L of N){let z=Bt(L),W=Tn(z.data);_.fetchers.set(L,W)}}function qo(){let N=[],L=!1;for(let z of X){let W=_.fetchers.get(z);be(W,`Expected fetcher: ${z}`),W.state==="loading"&&(X.delete(z),N.push(z),L=!0)}return pa(N),L}function ma(N){let L=[];for(let[z,W]of q)if(W<N){let K=_.fetchers.get(z);be(K,`Expected fetcher: ${z}`),K.state==="loading"&&(Ct(z),q.delete(z),L.push(z))}return pa(L),L.length>0}function Ls(N,L){let z=_.blockers.get(N)||va;return G.get(N)!==L&&G.set(N,L),z}function Wo(N){_.blockers.delete(N),G.delete(N)}function kr(N,L){let z=_.blockers.get(N)||va;be(z.state==="unblocked"&&L.state==="blocked"||z.state==="blocked"&&L.state==="blocked"||z.state==="blocked"&&L.state==="proceeding"||z.state==="blocked"&&L.state==="unblocked"||z.state==="proceeding"&&L.state==="unblocked",`Invalid blocker state transition: ${z.state} -> ${L.state}`);let W=new Map(_.blockers);W.set(N,L),ye({blockers:W})}function We({currentLocation:N,nextLocation:L,historyAction:z}){if(G.size===0)return;G.size>1&&Be(!1,"A router only supports one blocker at a time");let W=Array.from(G.entries()),[K,re]=W[W.length-1],ee=_.blockers.get(K);if(!(ee&&ee.state==="proceeding")&&re({currentLocation:N,nextLocation:L,historyAction:z}))return K}function Xe(N){let L=It(404,{pathname:N}),z=c||l,{matches:W,route:K}=Qo(z);return{notFoundMatches:W,route:K,error:L}}function st(N,L,z){if(y=N,x=L,v=z||null,!b&&_.navigation===zs){b=!0;let W=et(_.location,_.matches);W!=null&&ye({restoreScrollPosition:W})}return()=>{y=null,x=null,v=null}}function qt(N,L){return v&&v(N,L.map(W=>Ev(W,_.loaderData)))||N.key}function gt(N,L){if(y&&x){let z=qt(N,L);y[z]=x()}}function et(N,L){if(y){let z=qt(N,L),W=y[z];if(typeof W=="number")return W}return null}function lt(N,L,z){if(e.patchRoutesOnNavigation)if(N){if(Object.keys(N[0].params).length>0)return{active:!0,matches:ja(L,z,u,!0)}}else return{active:!0,matches:ja(L,z,u,!0)||[]};return{active:!1,matches:null}}async function Wt(N,L,z,W){if(!e.patchRoutesOnNavigation)return{type:"success",matches:N};let K=N;for(;;){let re=c==null,ee=c||l,ce=s;try{await e.patchRoutesOnNavigation({signal:z,path:L,matches:K,fetcherKey:W,patch:(de,se)=>{z.aborted||bd(de,se,ee,ce,i,!1)}})}catch(de){return{type:"error",error:de,partialMatches:K}}finally{re&&!z.aborted&&(l=[...l])}if(z.aborted)return{type:"aborted"};let ne=Gn(ee,L,u),ue=null;if(ne){if(Object.keys(ne[0].params).length===0)return{type:"success",matches:ne};if(ue=ja(ee,L,u,!0),!(ue&&K.length<ue.length&&qe(K,ue.slice(0,K.length))))return{type:"success",matches:ne}}if(ue||(ue=ja(ee,L,u,!0)),!ue||qe(K,ue))return{type:"success",matches:null};K=ue}}function qe(N,L){return N.length===L.length&&N.every((z,W)=>z.route.id===L[W].route.id)}function ln(N){s={},c=Qa(N,i,void 0,s)}function Nt(N,L,z=!1){let W=c==null;bd(N,L,c||l,s,i,z),W&&(l=[...l],ye({}))}return R={get basename(){return u},get future(){return f},get state(){return _},get routes(){return l},get window(){return n},initialize:J,subscribe:ve,enableScrollRestoration:st,navigate:Et,fetch:Dr,revalidate:Tt,createHref:N=>e.history.createHref(N),encodeLocation:N=>e.history.encodeLocation(N),getFetcher:Bt,resetFetcher:Bo,deleteFetcher:Is,dispose:ge,getBlocker:Ls,deleteBlocker:Wo,patchRoutes:Nt,_internalFetchControllers:I,_internalSetRoutes:ln,_internalSetStateDoNotUseOrYouWillBreakYourApp(N){ye(N)}},e.unstable_instrumentations&&(R=Uv(R,e.unstable_instrumentations.map(N=>N.router).filter(Boolean))),R}function ex(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Cl(e,n,r,a,o,i){let s,l;if(o){s=[];for(let u of n)if(s.push(u),u.route.id===o){l=u;break}}else s=n,l=n[n.length-1];let c=rs(a||".",Oc(s),Ut(e.pathname,r)||e.pathname,i==="path");if(a==null&&(c.search=e.search,c.hash=e.hash),(a==null||a===""||a===".")&&l){let u=kc(c.search);if(l.route.index&&!u)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&u){let h=new URLSearchParams(c.search),f=h.getAll("index");h.delete("index"),f.filter(g=>g).forEach(g=>h.append("index",g));let m=h.toString();c.search=m?`?${m}`:""}}return r!=="/"&&(c.pathname=Iv({basename:r,pathname:c.pathname})),gn(c)}function vd(e,n,r){if(!r||!ex(r))return{path:n};if(r.formMethod&&!xx(r.formMethod))return{path:n,error:It(405,{method:r.formMethod})};let a=()=>({path:n,error:It(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),s=Ih(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!rt(i))return a();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,[g,y])=>`${m}${g}=${y}
2
- `,""):String(r.body);return{path:n,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!rt(i))return a();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return a()}}}be(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=Al(r.formData),c=r.formData;else if(r.body instanceof FormData)l=Al(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=Sd(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=Sd(l)}catch{return a()}let u={formMethod:i,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(rt(u.formMethod))return{path:n,submission:u};let h=Hn(n);return e&&h.search&&kc(h.search)&&l.append("index",""),h.search=`?${l}`,{path:gn(h),submission:u}}function xd(e,n,r,a,o,i,s,l,c,u,h,f,m,g,y,v,x,b,w,E,C){let S=E?At(E[1])?E[1].error:E[1].data:void 0,M=o.createURL(i.location),R=o.createURL(c),_;if(h&&i.errors){let D=Object.keys(i.errors)[0];_=s.findIndex(T=>T.route.id===D)}else if(E&&At(E[1])){let D=E[0];_=s.findIndex(T=>T.route.id===D)-1}let O=E?E[1].statusCode:void 0,P=O&&O>=400,j={currentUrl:M,currentParams:i.matches[0]?.params||{},nextUrl:R,nextParams:s[0].params,...l,actionResult:S,actionStatus:O},$=vo(s),V=s.map((D,T)=>{let{route:F}=D,H=null;if(_!=null&&T>_)H=!1;else if(F.lazy)H=!0;else if(!jc(F))H=!1;else if(h){let{shouldLoad:q}=Ph(F,i.loaderData,i.errors);H=q}else tx(i.loaderData,i.matches[T],D)&&(H=!0);if(H!==null)return Sl(r,a,e,$,D,u,n,H);let I=!1;typeof C=="boolean"?I=C:P?I=!1:(f||M.pathname+M.search===R.pathname+R.search||M.search!==R.search||nx(i.matches[T],D))&&(I=!0);let Z={...j,defaultShouldRevalidate:I},B=Ha(D,Z);return Sl(r,a,e,$,D,u,n,B,Z,C)}),A=[];return y.forEach((D,T)=>{if(h||!s.some(Q=>Q.route.id===D.routeId)||g.has(T))return;let F=i.fetchers.get(T),H=F&&F.state!=="idle"&&F.data===void 0,I=Gn(x,D.path,b);if(!I){if(w&&H)return;A.push({key:T,routeId:D.routeId,path:D.path,matches:null,match:null,request:null,controller:null});return}if(v.has(T))return;let Z=pi(I,D.path),B=new AbortController,q=zr(o,D.path,B.signal),X=null;if(m.has(T))m.delete(T),X=Zr(r,a,q,I,Z,u,n);else if(H)f&&(X=Zr(r,a,q,I,Z,u,n));else{let Q;typeof C=="boolean"?Q=C:P?Q=!1:Q=f;let oe={...j,defaultShouldRevalidate:Q};Ha(Z,oe)&&(X=Zr(r,a,q,I,Z,u,n,oe))}X&&A.push({key:T,routeId:D.routeId,path:D.path,matches:X,match:Z,request:q,controller:B})}),{dsMatches:V,revalidatingFetchers:A}}function jc(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Ph(e,n,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!jc(e))return{shouldLoad:!1,renderFallback:!1};let a=n!=null&&e.id in n,o=r!=null&&r[e.id]!==void 0;if(!a&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let i=!a&&!o;return{shouldLoad:i,renderFallback:i}}function tx(e,n,r){let a=!n||r.route.id!==n.route.id,o=!e.hasOwnProperty(r.route.id);return a||o}function nx(e,n){let r=e.route.path;return e.pathname!==n.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==n.params["*"]}function Ha(e,n){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(n);if(typeof r=="boolean")return r}return n.defaultShouldRevalidate}function bd(e,n,r,a,o,i){let s;if(e){let u=a[e];be(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),s=u.children}else s=r;let l=[],c=[];if(n.forEach(u=>{let h=s.find(f=>Nh(u,f));h?c.push({existingRoute:h,newRoute:u}):l.push(u)}),l.length>0){let u=Qa(l,o,[e||"_","patch",String(s?.length||"0")],a);s.push(...u)}if(i&&c.length>0)for(let u=0;u<c.length;u++){let{existingRoute:h,newRoute:f}=c[u],m=h,[g]=Qa([f],o,[],{},!0);Object.assign(m,{element:g.element?g.element:m.element,errorElement:g.errorElement?g.errorElement:m.errorElement,hydrateFallbackElement:g.hydrateFallbackElement?g.hydrateFallbackElement:m.hydrateFallbackElement})}}function Nh(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children?.every((r,a)=>n.children?.some(o=>Nh(r,o)))??!1:!1}var wd=new WeakMap,Oh=({key:e,route:n,manifest:r,mapRouteProperties:a})=>{let o=r[n.id];if(be(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let i=o.lazy[e];if(!i)return;let s=wd.get(o);s||(s={},wd.set(o,s));let l=s[e];if(l)return l;let c=(async()=>{let u=xv(e),f=o[e]!==void 0&&e!=="hasErrorBoundary";if(u)Be(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),s[e]=Promise.resolve();else if(f)Be(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let m=await i();m!=null&&(Object.assign(o,{[e]:m}),Object.assign(o,a(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(m=>m===void 0)&&(o.lazy=void 0))})();return s[e]=c,c},_d=new WeakMap;function rx(e,n,r,a,o){let i=r[e.id];if(be(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let h=_d.get(i);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let f=(async()=>{be(typeof e.lazy=="function","No lazy route function found");let m=await e.lazy(),g={};for(let y in m){let v=m[y];if(v===void 0)continue;let x=wv(y),w=i[y]!==void 0&&y!=="hasErrorBoundary";x?Be(!x,"Route property "+y+" is not a supported property to be returned from a lazy route function. This property will be ignored."):w?Be(!w,`Route "${i.id}" has a static property "${y}" defined but its lazy function is also returning a value for this property. The lazy route property "${y}" will be ignored.`):g[y]=v}Object.assign(i,g),Object.assign(i,{...a(i),lazy:void 0})})();return _d.set(i,f),f.catch(()=>{}),{lazyRoutePromise:f,lazyHandlerPromise:f}}let s=Object.keys(e.lazy),l=[],c;for(let h of s){if(o&&o.includes(h))continue;let f=Oh({key:h,route:e,manifest:r,mapRouteProperties:a});f&&(l.push(f),h===n&&(c=f))}let u=l.length>0?Promise.all(l).then(()=>{}):void 0;return u?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:c}}async function Ed(e){let n=e.matches.filter(o=>o.shouldLoad),r={};return(await Promise.all(n.map(o=>o.resolve()))).forEach((o,i)=>{r[n[i].route.id]=o}),r}async function ax(e){return e.matches.some(n=>n.route.middleware)?jh(e,()=>Ed(e)):Ed(e)}function jh(e,n){return ox(e,n,a=>{if(vx(a))throw a;return a},px,r);function r(a,o,i){if(i)return Promise.resolve(Object.assign(i.value,{[o]:{type:"error",result:a}}));{let{matches:s}=e,l=Math.min(Math.max(s.findIndex(u=>u.route.id===o),0),Math.max(s.findIndex(u=>u.shouldCallHandler()),0)),c=Kn(s,s[l].route.id).route.id;return Promise.resolve({[c]:{type:"error",result:a}})}}}async function ox(e,n,r,a,o){let{matches:i,request:s,params:l,context:c,unstable_pattern:u}=e,h=i.flatMap(m=>m.route.middleware?m.route.middleware.map(g=>[m.route.id,g]):[]);return await Dh({request:s,params:l,context:c,unstable_pattern:u},h,n,r,a,o)}async function Dh(e,n,r,a,o,i,s=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let c=n[s];if(!c)return await r();let[u,h]=c,f,m=async()=>{if(f)throw new Error("You may only call `next()` once per middleware");try{return f={value:await Dh(e,n,r,a,o,i,s+1)},f.value}catch(g){return f={value:await i(g,u,f)},f.value}};try{let g=await h(e,m),y=g!=null?a(g):void 0;return o(y)?y:f?y??f.value:(f={value:await m()},f.value)}catch(g){return await i(g,u,f)}}function kh(e,n,r,a,o){let i=Oh({key:"middleware",route:a.route,manifest:n,mapRouteProperties:e}),s=rx(a.route,rt(r.method)?"action":"loader",n,e,o);return{middleware:i,route:s.lazyRoutePromise,handler:s.lazyHandlerPromise}}function Sl(e,n,r,a,o,i,s,l,c=null,u){let h=!1,f=kh(e,n,r,o,i);return{...o,_lazyPromises:f,shouldLoad:l,shouldRevalidateArgs:c,shouldCallHandler(m){return h=!0,c?typeof u=="boolean"?Ha(o,{...c,defaultShouldRevalidate:u}):typeof m=="boolean"?Ha(o,{...c,defaultShouldRevalidate:m}):Ha(o,c):l},resolve(m){let{lazy:g,loader:y,middleware:v}=o.route,x=h||l||m&&!rt(r.method)&&(g||y),b=v&&v.length>0&&!y&&!g;return x&&(rt(r.method)||!b)?sx({request:r,unstable_pattern:a,match:o,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:m,scopedContext:s}):Promise.resolve({type:"data",result:void 0})}}}function Zr(e,n,r,a,o,i,s,l=null){return a.map(c=>c.route.id!==o.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:kh(e,n,r,c,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Sl(e,n,r,vo(a),c,i,s,!0,l))}async function ix(e,n,r,a,o,i){r.some(u=>u._lazyPromises?.middleware)&&await Promise.all(r.map(u=>u._lazyPromises?.middleware));let s={request:n,unstable_pattern:vo(r),params:r[0].params,context:o,matches:r},c=await e({...s,fetcherKey:a,runClientMiddleware:u=>{let h=s;return jh(h,()=>u({...h,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(u=>[u._lazyPromises?.handler,u._lazyPromises?.route]))}catch{}return c}async function sx({request:e,unstable_pattern:n,match:r,lazyHandlerPromise:a,lazyRoutePromise:o,handlerOverride:i,scopedContext:s}){let l,c,u=rt(e.method),h=u?"action":"loader",f=m=>{let g,y=new Promise((b,w)=>g=w);c=()=>g(),e.signal.addEventListener("abort",c);let v=b=>typeof m!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${r.route.id}]`)):m({request:e,unstable_pattern:n,params:r.params,context:s},...b!==void 0?[b]:[]),x=(async()=>{try{return{type:"data",result:await(i?i(w=>v(w)):v())}}catch(b){return{type:"error",result:b}}})();return Promise.race([x,y])};try{let m=u?r.route.action:r.route.loader;if(a||o)if(m){let g,[y]=await Promise.all([f(m).catch(v=>{g=v}),a,o]);if(g!==void 0)throw g;l=y}else{await a;let g=u?r.route.action:r.route.loader;if(g)[l]=await Promise.all([f(g),o]);else if(h==="action"){let y=new URL(e.url),v=y.pathname+y.search;throw It(405,{method:e.method,pathname:v,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(m)l=await f(m);else{let g=new URL(e.url),y=g.pathname+g.search;throw It(404,{pathname:y})}}catch(m){return{type:"error",result:m}}finally{c&&e.signal.removeEventListener("abort",c)}return l}async function lx(e){let n=e.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?e.body==null?null:e.json():e.text()}async function cx(e){let{result:n,type:r}=e;if(Dc(n)){let a;try{a=await lx(n)}catch(o){return{type:"error",error:o}}return r==="error"?{type:"error",error:new yo(n.status,n.statusText,a),statusCode:n.status,headers:n.headers}:{type:"data",data:a,statusCode:n.status,headers:n.headers}}return r==="error"?Td(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:hx(n),statusCode:Xa(n)?n.status:void 0,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:Xa(n)?n.status:void 0}:Td(n)?{type:"data",data:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function ux(e,n,r,a,o){let i=e.headers.get("Location");if(be(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Nc(i)){let s=a.slice(0,a.findIndex(l=>l.route.id===r)+1);i=Cl(new URL(n.url),s,o,i),e.headers.set("Location",i)}return e}function Cd(e,n,r,a){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Nc(e)){let i=e,s=i.startsWith("//")?new URL(n.protocol+i):new URL(i);if(o.includes(s.protocol))throw new Error("Invalid redirect location");let l=Ut(s.pathname,r)!=null;if(s.origin===n.origin&&l)return s.pathname+s.search+s.hash}try{let i=a.createURL(e);if(o.includes(i.protocol))throw new Error("Invalid redirect location")}catch{}return e}function zr(e,n,r,a){let o=e.createURL(Ih(n)).toString(),i={signal:r};if(a&&rt(a.formMethod)){let{formMethod:s,formEncType:l}=a;i.method=s.toUpperCase(),l==="application/json"?(i.headers=new Headers({"Content-Type":l}),i.body=JSON.stringify(a.json)):l==="text/plain"?i.body=a.text:l==="application/x-www-form-urlencoded"&&a.formData?i.body=Al(a.formData):i.body=a.formData}return new Request(o,i)}function Al(e){let n=new URLSearchParams;for(let[r,a]of e.entries())n.append(r,typeof a=="string"?a:a.name);return n}function Sd(e){let n=new FormData;for(let[r,a]of e.entries())n.append(r,a);return n}function dx(e,n,r,a=!1,o=!1){let i={},s=null,l,c=!1,u={},h=r&&At(r[1])?r[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in n))return;let m=f.route.id,g=n[m];if(be(!hr(g),"Cannot handle redirect results in processLoaderData"),At(g)){let y=g.error;if(h!==void 0&&(y=h,h=void 0),s=s||{},o)s[m]=y;else{let v=Kn(e,m);s[v.route.id]==null&&(s[v.route.id]=y)}a||(i[m]=Th),c||(c=!0,l=Xa(g.error)?g.error.status:500),g.headers&&(u[m]=g.headers)}else i[m]=g.data,g.statusCode&&g.statusCode!==200&&!c&&(l=g.statusCode),g.headers&&(u[m]=g.headers)}),h!==void 0&&r&&(s={[r[0]]:h},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:s,statusCode:l||200,loaderHeaders:u}}function Ad(e,n,r,a,o,i){let{loaderData:s,errors:l}=dx(n,r,a);return o.filter(c=>!c.matches||c.matches.some(u=>u.shouldLoad)).forEach(c=>{let{key:u,match:h,controller:f}=c;if(f&&f.signal.aborted)return;let m=i[u];if(be(m,"Did not find corresponding fetcher result"),At(m)){let g=Kn(e.matches,h?.route.id);l&&l[g.route.id]||(l={...l,[g.route.id]:m.error}),e.fetchers.delete(u)}else if(hr(m))be(!1,"Unhandled fetcher revalidation redirect");else{let g=Tn(m.data);e.fetchers.set(u,g)}}),{loaderData:s,errors:l}}function Rd(e,n,r,a){let o=Object.entries(n).filter(([,i])=>i!==Th).reduce((i,[s,l])=>(i[s]=l,i),{});for(let i of r){let s=i.route.id;if(!n.hasOwnProperty(s)&&e.hasOwnProperty(s)&&i.route.loader&&(o[s]=e[s]),a&&a.hasOwnProperty(s))break}return o}function Md(e){return e?At(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Kn(e,n){return(n?e.slice(0,e.findIndex(a=>a.route.id===n)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Qo(e){let n=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function It(e,{pathname:n,routeId:r,method:a,type:o,message:i}={}){let s="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(s="Bad Request",a&&n&&r?l=`You made a ${a} request to "${n}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(s="Forbidden",l=`Route "${r}" does not match URL "${n}"`):e===404?(s="Not Found",l=`No route matches URL "${n}"`):e===405&&(s="Method Not Allowed",a&&n&&r?l=`You made a ${a.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(l=`Invalid request method "${a.toUpperCase()}"`)),new yo(e||500,s,new Error(l),!0)}function Xo(e){let n=Object.entries(e);for(let r=n.length-1;r>=0;r--){let[a,o]=n[r];if(hr(o))return{key:a,result:o}}}function Ih(e){let n=typeof e=="string"?Hn(e):e;return gn({...n,hash:""})}function fx(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function hx(e){return new yo(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function px(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([n,r])=>typeof n=="string"&&mx(r))}function mx(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function gx(e){return Dc(e.result)&&Rh.has(e.result.status)}function At(e){return e.type==="error"}function hr(e){return(e&&e.type)==="redirect"}function Td(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Dc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function yx(e){return Rh.has(e)}function vx(e){return Dc(e)&&yx(e.status)&&e.headers.has("Location")}function xx(e){return Kv.has(e.toUpperCase())}function rt(e){return Wv.has(e.toUpperCase())}function kc(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function pi(e,n){let r=typeof n=="string"?Hn(n).search:n.search;if(e[e.length-1].route.index&&kc(r||""))return e[e.length-1];let a=_h(e);return a[a.length-1]}function Pd(e){let{formMethod:n,formAction:r,formEncType:a,text:o,formData:i,json:s}=e;if(!(!n||!r||!a)){if(o!=null)return{formMethod:n,formAction:r,formEncType:a,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:n,formAction:r,formEncType:a,formData:i,json:void 0,text:void 0};if(s!==void 0)return{formMethod:n,formAction:r,formEncType:a,formData:void 0,json:s,text:void 0}}}function Us(e,n){return n?{state:"loading",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function bx(e,n){return{state:"submitting",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function xa(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function wx(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function Tn(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function _x(e,n){try{let r=e.sessionStorage.getItem(Mh);if(r){let a=JSON.parse(r);for(let[o,i]of Object.entries(a||{}))i&&Array.isArray(i)&&n.set(o,new Set(i||[]))}}catch{}}function Ex(e,n){if(n.size>0){let r={};for(let[a,o]of n)r[a]=[...o];try{e.sessionStorage.setItem(Mh,JSON.stringify(r))}catch(a){Be(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function Nd(){let e,n,r=new Promise((a,o)=>{e=async i=>{a(i);try{await r}catch{}},n=async i=>{o(i);try{await r}catch{}}});return{promise:r,resolve:e,reject:n}}var Mr=d.createContext(null);Mr.displayName="DataRouter";var xo=d.createContext(null);xo.displayName="DataRouterState";var Lh=d.createContext(!1);function Cx(){return d.useContext(Lh)}var Ic=d.createContext({isTransitioning:!1});Ic.displayName="ViewTransition";var Fh=d.createContext(new Map);Fh.displayName="Fetchers";var Sx=d.createContext(null);Sx.displayName="Await";var Vt=d.createContext(null);Vt.displayName="Navigation";var as=d.createContext(null);as.displayName="Location";var tn=d.createContext({outlet:null,matches:[],isDataRoute:!1});tn.displayName="Route";var Lc=d.createContext(null);Lc.displayName="RouteError";var $h="REACT_ROUTER_ERROR",Ax="REDIRECT",Rx="ROUTE_ERROR_RESPONSE";function Mx(e){if(e.startsWith(`${$h}:${Ax}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function Tx(e){if(e.startsWith(`${$h}:${Rx}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new yo(n.status,n.statusText,n.data)}catch{}}function Px(e,{relative:n}={}){be(bo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=d.useContext(Vt),{hash:o,pathname:i,search:s}=wo(e,{relative:n}),l=i;return r!=="/"&&(l=i==="/"?r:Jt([r,i])),a.createHref({pathname:l,search:s,hash:o})}function bo(){return d.useContext(as)!=null}function nn(){return be(bo(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(as).location}var Hh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function zh(e){d.useContext(Vt).static||d.useLayoutEffect(e)}function Tr(){let{isDataRoute:e}=d.useContext(tn);return e?Bx():Nx()}function Nx(){be(bo(),"useNavigate() may be used only in the context of a <Router> component.");let e=d.useContext(Mr),{basename:n,navigator:r}=d.useContext(Vt),{matches:a}=d.useContext(tn),{pathname:o}=nn(),i=JSON.stringify(Oc(a)),s=d.useRef(!1);return zh(()=>{s.current=!0}),d.useCallback((c,u={})=>{if(Be(s.current,Hh),!s.current)return;if(typeof c=="number"){r.go(c);return}let h=rs(c,JSON.parse(i),o,u.relative==="path");e==null&&n!=="/"&&(h.pathname=h.pathname==="/"?n:Jt([n,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[n,r,i,o,e])}var Ox=d.createContext(null);function jx(e){let n=d.useContext(tn).outlet;return d.useMemo(()=>n&&d.createElement(Ox.Provider,{value:e},n),[n,e])}function Fc(){let{matches:e}=d.useContext(tn),n=e[e.length-1];return n?n.params:{}}function wo(e,{relative:n}={}){let{matches:r}=d.useContext(tn),{pathname:a}=nn(),o=JSON.stringify(Oc(r));return d.useMemo(()=>rs(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function Dx(e,n,r){be(bo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=d.useContext(Vt),{matches:o}=d.useContext(tn),i=o[o.length-1],s=i?i.params:{},l=i?i.pathname:"/",c=i?i.pathnameBase:"/",u=i&&i.route;{let x=u&&u.path||"";Vh(l,!u||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
3
-
4
- Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let h=nn(),f;f=h;let m=f.pathname||"/",g=m;if(c!=="/"){let x=c.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(x.length).join("/")}let y=Gn(e,{pathname:g});return Be(u||y!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Be(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),$x(y&&y.map(x=>Object.assign({},x,{params:Object.assign({},s,x.params),pathname:Jt([c,a.encodeLocation?a.encodeLocation(x.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:Jt([c,a.encodeLocation?a.encodeLocation(x.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathnameBase])})),o,r)}function kx(){let e=Zx(),n=Xa(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},i={padding:"2px 4px",backgroundColor:a},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=d.createElement(d.Fragment,null,d.createElement("p",null,"💿 Hey developer 👋"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:i},"ErrorBoundary")," or"," ",d.createElement("code",{style:i},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},n),r?d.createElement("pre",{style:o},r):null,s)}var Ix=d.createElement(kx,null),Uh=class extends d.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=Tx(e.digest);r&&(e=r)}let n=e!==void 0?d.createElement(tn.Provider,{value:this.props.routeContext},d.createElement(Lc.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?d.createElement(Lx,{error:e},n):n}};Uh.contextType=Lh;var Vs=new WeakMap;function Lx({children:e,error:n}){let{basename:r}=d.useContext(Vt);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let a=Mx(n.digest);if(a){let o=Vs.get(n);if(o)throw o;let i=Ch(a.location,r);if(Eh&&!Vs.get(n))if(i.isExternal||a.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:a.replace}));throw Vs.set(n,s),s}return d.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Fx({routeContext:e,match:n,children:r}){let a=d.useContext(Mr);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),d.createElement(tn.Provider,{value:e},r)}function $x(e,n=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(n.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let o=e,i=a?.errors;if(i!=null){let h=o.findIndex(f=>f.route.id&&i?.[f.route.id]!==void 0);be(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,h+1))}let s=!1,l=-1;if(r&&a){s=a.renderFallback;for(let h=0;h<o.length;h++){let f=o[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=h),f.route.id){let{loaderData:m,errors:g}=a,y=f.route.loader&&!m.hasOwnProperty(f.route.id)&&(!g||g[f.route.id]===void 0);if(f.route.lazy||y){r.isStatic&&(s=!0),l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}}let c=r?.onError,u=a&&c?(h,f)=>{c(h,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:vo(a.matches),errorInfo:f})}:void 0;return o.reduceRight((h,f,m)=>{let g,y=!1,v=null,x=null;a&&(g=i&&f.route.id?i[f.route.id]:void 0,v=f.route.errorElement||Ix,s&&(l<0&&m===0?(Vh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,x=null):l===m&&(y=!0,x=f.route.hydrateFallbackElement||null)));let b=n.concat(o.slice(0,m+1)),w=()=>{let E;return g?E=v:y?E=x:f.route.Component?E=d.createElement(f.route.Component,null):f.route.element?E=f.route.element:E=h,d.createElement(Fx,{match:f,routeContext:{outlet:h,matches:b,isDataRoute:a!=null},children:E})};return a&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?d.createElement(Uh,{location:a.location,revalidation:a.revalidation,component:v,error:g,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0},onError:u}):w()},null)}function $c(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hx(e){let n=d.useContext(Mr);return be(n,$c(e)),n}function zx(e){let n=d.useContext(xo);return be(n,$c(e)),n}function Ux(e){let n=d.useContext(tn);return be(n,$c(e)),n}function Hc(e){let n=Ux(e),r=n.matches[n.matches.length-1];return be(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Vx(){return Hc("useRouteId")}function Zx(){let e=d.useContext(Lc),n=zx("useRouteError"),r=Hc("useRouteError");return e!==void 0?e:n.errors?.[r]}function Bx(){let{router:e}=Hx("useNavigate"),n=Hc("useNavigate"),r=d.useRef(!1);return zh(()=>{r.current=!0}),d.useCallback(async(o,i={})=>{Be(r.current,Hh),r.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:n,...i}))},[e,n])}var Od={};function Vh(e,n,r){!n&&!Od[e]&&(Od[e]=!0,Be(!1,r))}var jd={};function Dd(e,n){!e&&!jd[n]&&(jd[n]=!0,console.warn(n))}var qx="useOptimistic",kd=ns[qx],Wx=()=>{};function Gx(e){return kd?kd(e):[e,Wx]}function Kx(e){let n={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Be(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:d.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Be(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:d.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Be(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:d.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),n}var Yx=["HydrateFallback","hydrateFallbackElement"],Qx=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}};function Xx({router:e,flushSync:n,onError:r,unstable_useTransitions:a}){a=Cx()||a;let[i,s]=d.useState(e.state),[l,c]=Gx(i),[u,h]=d.useState(),[f,m]=d.useState({isTransitioning:!1}),[g,y]=d.useState(),[v,x]=d.useState(),[b,w]=d.useState(),E=d.useRef(new Map),C=d.useCallback((_,{deletedFetchers:O,newErrors:P,flushSync:j,viewTransitionOpts:$})=>{P&&r&&Object.values(P).forEach(A=>r(A,{location:_.location,params:_.matches[0]?.params??{},unstable_pattern:vo(_.matches)})),_.fetchers.forEach((A,D)=>{A.data!==void 0&&E.current.set(D,A.data)}),O.forEach(A=>E.current.delete(A)),Dd(j===!1||n!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let V=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Dd($==null||V,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!$||!V){n&&j?n(()=>s(_)):a===!1?s(_):d.startTransition(()=>{a===!0&&c(A=>Id(A,_)),s(_)});return}if(n&&j){n(()=>{v&&(g?.resolve(),v.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:$.currentLocation,nextLocation:$.nextLocation})});let A=e.window.document.startViewTransition(()=>{n(()=>s(_))});A.finished.finally(()=>{n(()=>{y(void 0),x(void 0),h(void 0),m({isTransitioning:!1})})}),n(()=>x(A));return}v?(g?.resolve(),v.skipTransition(),w({state:_,currentLocation:$.currentLocation,nextLocation:$.nextLocation})):(h(_),m({isTransitioning:!0,flushSync:!1,currentLocation:$.currentLocation,nextLocation:$.nextLocation}))},[e.window,n,v,g,a,c,r]);d.useLayoutEffect(()=>e.subscribe(C),[e,C]),d.useEffect(()=>{f.isTransitioning&&!f.flushSync&&y(new Qx)},[f]),d.useEffect(()=>{if(g&&u&&e.window){let _=u,O=g.promise,P=e.window.document.startViewTransition(async()=>{a===!1?s(_):d.startTransition(()=>{a===!0&&c(j=>Id(j,_)),s(_)}),await O});P.finished.finally(()=>{y(void 0),x(void 0),h(void 0),m({isTransitioning:!1})}),x(P)}},[u,g,e.window,a,c]),d.useEffect(()=>{g&&u&&l.location.key===u.location.key&&g.resolve()},[g,v,l.location,u]),d.useEffect(()=>{!f.isTransitioning&&b&&(h(b.state),m({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),w(void 0))},[f.isTransitioning,b]);let S=d.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:_=>e.navigate(_),push:(_,O,P)=>e.navigate(_,{state:O,preventScrollReset:P?.preventScrollReset}),replace:(_,O,P)=>e.navigate(_,{replace:!0,state:O,preventScrollReset:P?.preventScrollReset})}),[e]),M=e.basename||"/",R=d.useMemo(()=>({router:e,navigator:S,static:!1,basename:M,onError:r}),[e,S,M,r]);return d.createElement(d.Fragment,null,d.createElement(Mr.Provider,{value:R},d.createElement(xo.Provider,{value:l},d.createElement(Fh.Provider,{value:E.current},d.createElement(Ic.Provider,{value:f},d.createElement(n8,{basename:M,location:l.location,navigationType:l.historyAction,navigator:S,unstable_useTransitions:a},d.createElement(Jx,{routes:e.routes,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function Id(e,n){return{...e,navigation:n.navigation.state!=="idle"?n.navigation:e.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:e.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:e.actionData,fetchers:n.fetchers}}var Jx=d.memo(e8);function e8({routes:e,future:n,state:r,isStatic:a,onError:o}){return Dx(e,void 0,{state:r,isStatic:a,onError:o})}function t8(e){return jx(e.context)}function n8({basename:e="/",children:n=null,location:r,navigationType:a="POP",navigator:o,static:i=!1,unstable_useTransitions:s}){be(!bo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=d.useMemo(()=>({basename:l,navigator:o,static:i,unstable_useTransitions:s,future:{}}),[l,o,i,s]);typeof r=="string"&&(r=Hn(r));let{pathname:u="/",search:h="",hash:f="",state:m=null,key:g="default",unstable_mask:y}=r,v=d.useMemo(()=>{let x=Ut(u,l);return x==null?null:{location:{pathname:x,search:h,hash:f,state:m,key:g,unstable_mask:y},navigationType:a}},[l,u,h,f,m,g,a,y]);return Be(v!=null,`<Router basename="${l}"> is not able to match the URL "${u}${h}${f}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:d.createElement(Vt.Provider,{value:c},d.createElement(as.Provider,{children:n,value:v}))}var mi="get",gi="application/x-www-form-urlencoded";function os(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function r8(e){return os(e)&&e.tagName.toLowerCase()==="button"}function a8(e){return os(e)&&e.tagName.toLowerCase()==="form"}function o8(e){return os(e)&&e.tagName.toLowerCase()==="input"}function i8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function s8(e,n){return e.button===0&&(!n||n==="_self")&&!i8(e)}function Rl(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,r)=>{let a=e[r];return n.concat(Array.isArray(a)?a.map(o=>[r,o]):[[r,a]])},[]))}function l8(e,n){let r=Rl(e);return n&&n.forEach((a,o)=>{r.has(o)||n.getAll(o).forEach(i=>{r.append(o,i)})}),r}var Jo=null;function c8(){if(Jo===null)try{new FormData(document.createElement("form"),0),Jo=!1}catch{Jo=!0}return Jo}var u8=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zs(e){return e!=null&&!u8.has(e)?(Be(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gi}"`),null):e}function d8(e,n){let r,a,o,i,s;if(a8(e)){let l=e.getAttribute("action");a=l?Ut(l,n):null,r=e.getAttribute("method")||mi,o=Zs(e.getAttribute("enctype"))||gi,i=new FormData(e)}else if(r8(e)||o8(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(a=c?Ut(c,n):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||mi,o=Zs(e.getAttribute("formenctype"))||Zs(l.getAttribute("enctype"))||gi,i=new FormData(l,e),!c8()){let{name:u,type:h,value:f}=e;if(h==="image"){let m=u?`${u}.`:"";i.append(`${m}x`,"0"),i.append(`${m}y`,"0")}else u&&i.append(u,f)}}else{if(os(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=mi,a=null,o=gi,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:a,method:r.toLowerCase(),encType:o,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function zc(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function f8(e,n,r,a){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${a}`:o.pathname=`${o.pathname}.${a}`:o.pathname==="/"?o.pathname=`_root.${a}`:n&&Ut(o.pathname,n)==="/"?o.pathname=`${n.replace(/\/$/,"")}/_root.${a}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${a}`,o}async function h8(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function p8(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function m8(e,n,r){let a=await Promise.all(e.map(async o=>{let i=n.routes[o.route.id];if(i){let s=await h8(i,r);return s.links?s.links():[]}return[]}));return x8(a.flat(1).filter(p8).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Ld(e,n,r,a,o,i){let s=(c,u)=>r[u]?c.route.id!==r[u].route.id:!0,l=(c,u)=>r[u].pathname!==c.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==c.params["*"];return i==="assets"?n.filter((c,u)=>s(c,u)||l(c,u)):i==="data"?n.filter((c,u)=>{let h=a.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(s(c,u)||l(c,u))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function g8(e,n,{includeHydrateFallback:r}={}){return y8(e.map(a=>{let o=n.routes[a.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function y8(e){return[...new Set(e)]}function v8(e){let n={},r=Object.keys(e).sort();for(let a of r)n[a]=e[a];return n}function x8(e,n){let r=new Set;return new Set(n),e.reduce((a,o)=>{let i=JSON.stringify(v8(o));return r.has(i)||(r.add(i),a.push({key:i,link:o})),a},[])}function Zh(){let e=d.useContext(Mr);return zc(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function b8(){let e=d.useContext(xo);return zc(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Uc=d.createContext(void 0);Uc.displayName="FrameworkContext";function Bh(){let e=d.useContext(Uc);return zc(e,"You must render this element inside a <HydratedRouter> element"),e}function w8(e,n){let r=d.useContext(Uc),[a,o]=d.useState(!1),[i,s]=d.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:h,onTouchStart:f}=n,m=d.useRef(null);d.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let v=b=>{b.forEach(w=>{s(w.isIntersecting)})},x=new IntersectionObserver(v,{threshold:.5});return m.current&&x.observe(m.current),()=>{x.disconnect()}}},[e]),d.useEffect(()=>{if(a){let v=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(v)}}},[a]);let g=()=>{o(!0)},y=()=>{o(!1),s(!1)};return r?e!=="intent"?[i,m,{}]:[i,m,{onFocus:ba(l,g),onBlur:ba(c,y),onMouseEnter:ba(u,g),onMouseLeave:ba(h,y),onTouchStart:ba(f,g)}]:[!1,m,{}]}function ba(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function _8({page:e,...n}){let{router:r}=Zh(),a=d.useMemo(()=>Gn(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?d.createElement(C8,{page:e,matches:a,...n}):null}function E8(e){let{manifest:n,routeModules:r}=Bh(),[a,o]=d.useState([]);return d.useEffect(()=>{let i=!1;return m8(e,n,r).then(s=>{i||o(s)}),()=>{i=!0}},[e,n,r]),a}function C8({page:e,matches:n,...r}){let a=nn(),{future:o,manifest:i,routeModules:s}=Bh(),{basename:l}=Zh(),{loaderData:c,matches:u}=b8(),h=d.useMemo(()=>Ld(e,n,u,i,a,"data"),[e,n,u,i,a]),f=d.useMemo(()=>Ld(e,n,u,i,a,"assets"),[e,n,u,i,a]),m=d.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let v=new Set,x=!1;if(n.forEach(w=>{let E=i.routes[w.route.id];!E||!E.hasLoader||(!h.some(C=>C.route.id===w.route.id)&&w.route.id in c&&s[w.route.id]?.shouldRevalidate||E.hasClientLoader?x=!0:v.add(w.route.id))}),v.size===0)return[];let b=f8(e,l,o.unstable_trailingSlashAwareDataRequests,"data");return x&&v.size>0&&b.searchParams.set("_routes",n.filter(w=>v.has(w.route.id)).map(w=>w.route.id).join(",")),[b.pathname+b.search]},[l,o.unstable_trailingSlashAwareDataRequests,c,a,i,h,n,e,s]),g=d.useMemo(()=>g8(f,i),[f,i]),y=E8(f);return d.createElement(d.Fragment,null,m.map(v=>d.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...r})),g.map(v=>d.createElement("link",{key:v,rel:"modulepreload",href:v,...r})),y.map(({key:v,link:x})=>d.createElement("link",{key:v,nonce:r.nonce,...x,crossOrigin:x.crossOrigin??r.crossOrigin})))}function S8(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var A8=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{A8&&(window.__reactRouterVersion="7.13.1")}catch{}function R8(e,n){return Jv({basename:n?.basename,getContext:n?.getContext,future:n?.future,history:mv({window:n?.window}),hydrationData:M8(),routes:e,mapRouteProperties:Kx,hydrationRouteProperties:Yx,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window,unstable_instrumentations:n?.unstable_instrumentations}).initialize()}function M8(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:T8(e.errors)}),e}function T8(e){if(!e)return null;let n=Object.entries(e),r={};for(let[a,o]of n)if(o&&o.__type==="RouteErrorResponse")r[a]=new yo(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let s=new i(o.message);s.stack="",r[a]=s}catch{}}if(r[a]==null){let i=new Error(o.message);i.stack="",r[a]=i}}else r[a]=o;return r}var qh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ve=d.forwardRef(function({onClick:n,discover:r="render",prefetch:a="none",relative:o,reloadDocument:i,replace:s,unstable_mask:l,state:c,target:u,to:h,preventScrollReset:f,viewTransition:m,unstable_defaultShouldRevalidate:g,...y},v){let{basename:x,navigator:b,unstable_useTransitions:w}=d.useContext(Vt),E=typeof h=="string"&&qh.test(h),C=Ch(h,x);h=C.to;let S=Px(h,{relative:o}),M=nn(),R=null;if(l){let D=rs(l,[],M.unstable_mask?M.unstable_mask.pathname:"/",!0);x!=="/"&&(D.pathname=D.pathname==="/"?x:Jt([x,D.pathname])),R=b.createHref(D)}let[_,O,P]=w8(a,y),j=j8(h,{replace:s,unstable_mask:l,state:c,target:u,preventScrollReset:f,relative:o,viewTransition:m,unstable_defaultShouldRevalidate:g,unstable_useTransitions:w});function $(D){n&&n(D),D.defaultPrevented||j(D)}let V=!(C.isExternal||i),A=d.createElement("a",{...y,...P,href:(V?R:void 0)||C.absoluteURL||S,onClick:V?$:n,ref:S8(v,O),target:u,"data-discover":!E&&r==="render"?"true":void 0});return _&&!E?d.createElement(d.Fragment,null,A,d.createElement(_8,{page:S})):A});Ve.displayName="Link";var P8=d.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:a="",end:o=!1,style:i,to:s,viewTransition:l,children:c,...u},h){let f=wo(s,{relative:u.relative}),m=nn(),g=d.useContext(xo),{navigator:y,basename:v}=d.useContext(Vt),x=g!=null&&F8(f)&&l===!0,b=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,w=m.pathname,E=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(w=w.toLowerCase(),E=E?E.toLowerCase():null,b=b.toLowerCase()),E&&v&&(E=Ut(E,v)||E);const C=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let S=w===b||!o&&w.startsWith(b)&&w.charAt(C)==="/",M=E!=null&&(E===b||!o&&E.startsWith(b)&&E.charAt(b.length)==="/"),R={isActive:S,isPending:M,isTransitioning:x},_=S?n:void 0,O;typeof a=="function"?O=a(R):O=[a,S?"active":null,M?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let P=typeof i=="function"?i(R):i;return d.createElement(Ve,{...u,"aria-current":_,className:O,ref:h,style:P,to:s,viewTransition:l},typeof c=="function"?c(R):c)});P8.displayName="NavLink";var N8=d.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:a,replace:o,state:i,method:s=mi,action:l,onSubmit:c,relative:u,preventScrollReset:h,viewTransition:f,unstable_defaultShouldRevalidate:m,...g},y)=>{let{unstable_useTransitions:v}=d.useContext(Vt),x=I8(),b=L8(l,{relative:u}),w=s.toLowerCase()==="get"?"get":"post",E=typeof l=="string"&&qh.test(l),C=S=>{if(c&&c(S),S.defaultPrevented)return;S.preventDefault();let M=S.nativeEvent.submitter,R=M?.getAttribute("formmethod")||s,_=()=>x(M||S.currentTarget,{fetcherKey:n,method:R,navigate:r,replace:o,state:i,relative:u,preventScrollReset:h,viewTransition:f,unstable_defaultShouldRevalidate:m});v&&r!==!1?d.startTransition(()=>_()):_()};return d.createElement("form",{ref:y,method:w,action:b,onSubmit:a?c:C,...g,"data-discover":!E&&e==="render"?"true":void 0})});N8.displayName="Form";function O8(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wh(e){let n=d.useContext(Mr);return be(n,O8(e)),n}function j8(e,{target:n,replace:r,unstable_mask:a,state:o,preventScrollReset:i,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c,unstable_useTransitions:u}={}){let h=Tr(),f=nn(),m=wo(e,{relative:s});return d.useCallback(g=>{if(s8(g,n)){g.preventDefault();let y=r!==void 0?r:gn(f)===gn(m),v=()=>h(e,{replace:y,unstable_mask:a,state:o,preventScrollReset:i,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c});u?d.startTransition(()=>v()):v()}},[f,h,m,r,a,o,n,e,i,s,l,c,u])}function Jn(e){Be(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=d.useRef(Rl(e)),r=d.useRef(!1),a=nn(),o=d.useMemo(()=>l8(a.search,r.current?null:n.current),[a.search]),i=Tr(),s=d.useCallback((l,c)=>{const u=Rl(typeof l=="function"?l(new URLSearchParams(o)):l);r.current=!0,i("?"+u,c)},[i,o]);return[o,s]}var D8=0,k8=()=>`__${String(++D8)}__`;function I8(){let{router:e}=Wh("useSubmit"),{basename:n}=d.useContext(Vt),r=Vx(),a=e.fetch,o=e.navigate;return d.useCallback(async(i,s={})=>{let{action:l,method:c,encType:u,formData:h,body:f}=d8(i,n);if(s.navigate===!1){let m=s.fetcherKey||k8();await a(m,r,s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:f,formMethod:s.method||c,formEncType:s.encType||u,flushSync:s.flushSync})}else await o(s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:f,formMethod:s.method||c,formEncType:s.encType||u,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[a,o,n,r])}function L8(e,{relative:n}={}){let{basename:r}=d.useContext(Vt),a=d.useContext(tn);be(a,"useFormAction must be used inside a RouteContext");let[o]=a.matches.slice(-1),i={...wo(e||".",{relative:n})},s=nn();if(e==null){i.search=s.search;let l=new URLSearchParams(i.search),c=l.getAll("index");if(c.some(h=>h==="")){l.delete("index"),c.filter(f=>f).forEach(f=>l.append("index",f));let h=l.toString();i.search=h?`?${h}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Jt([r,i.pathname])),gn(i)}function F8(e,{relative:n}={}){let r=d.useContext(Ic);be(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Wh("useViewTransitionState"),o=wo(e,{relative:n});if(!r.isTransitioning)return!1;let i=Ut(r.currentLocation.pathname,a)||r.currentLocation.pathname,s=Ut(r.nextLocation.pathname,a)||r.nextLocation.pathname;return Mi(o.pathname,s)!=null||Mi(o.pathname,i)!=null}function $8(e){return d.createElement(Xx,{flushSync:On.flushSync,...e})}var aa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},H8={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},z8=class{#e=H8;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}},pr=new z8;function U8(e){setTimeout(e,0)}var wr=typeof window>"u"||"Deno"in globalThis;function ut(){}function V8(e,n){return typeof e=="function"?e(n):e}function Ml(e){return typeof e=="number"&&e>=0&&e!==1/0}function Gh(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Qn(e,n){return typeof e=="function"?e(n):e}function Lt(e,n){return typeof e=="function"?e(n):e}function Fd(e,n){const{type:r="all",exact:a,fetchStatus:o,predicate:i,queryKey:s,stale:l}=e;if(s){if(a){if(n.queryHash!==Vc(s,n.options))return!1}else if(!Ja(n.queryKey,s))return!1}if(r!=="all"){const c=n.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&n.isStale()!==l||o&&o!==n.state.fetchStatus||i&&!i(n))}function $d(e,n){const{exact:r,status:a,predicate:o,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(r){if(_r(n.options.mutationKey)!==_r(i))return!1}else if(!Ja(n.options.mutationKey,i))return!1}return!(a&&n.state.status!==a||o&&!o(n))}function Vc(e,n){return(n?.queryKeyHashFn||_r)(e)}function _r(e){return JSON.stringify(e,(n,r)=>Tl(r)?Object.keys(r).sort().reduce((a,o)=>(a[o]=r[o],a),{}):r)}function Ja(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>Ja(e[r],n[r])):!1}var Z8=Object.prototype.hasOwnProperty;function Kh(e,n,r=0){if(e===n)return e;if(r>500)return n;const a=Hd(e)&&Hd(n);if(!a&&!(Tl(e)&&Tl(n)))return n;const i=(a?e:Object.keys(e)).length,s=a?n:Object.keys(n),l=s.length,c=a?new Array(l):{};let u=0;for(let h=0;h<l;h++){const f=a?h:s[h],m=e[f],g=n[f];if(m===g){c[f]=m,(a?h<i:Z8.call(e,f))&&u++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){c[f]=g;continue}const y=Kh(m,g,r+1);c[f]=y,y===m&&u++}return i===l&&u===i?e:c}function Ti(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}function Hd(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Tl(e){if(!zd(e))return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!zd(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function zd(e){return Object.prototype.toString.call(e)==="[object Object]"}function B8(e){return new Promise(n=>{pr.setTimeout(n,e)})}function Pl(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?Kh(e,n):n}function q8(e,n,r=0){const a=[...e,n];return r&&a.length>r?a.slice(1):a}function W8(e,n,r=0){const a=[n,...e];return r&&a.length>r?a.slice(0,-1):a}var Zc=Symbol();function Yh(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===Zc?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Bc(e,n){return typeof e=="function"?e(...n):!!e}function G8(e,n,r){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=n(),a||(a=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var K8=class extends aa{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!wr&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},qc=new K8;function Nl(){let e,n;const r=new Promise((o,i)=>{e=o,n=i});r.status="pending",r.catch(()=>{});function a(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},r.reject=o=>{a({status:"rejected",reason:o}),n(o)},r}var Y8=U8;function Q8(){let e=[],n=0,r=l=>{l()},a=l=>{l()},o=Y8;const i=l=>{n?e.push(l):o(()=>{r(l)})},s=()=>{const l=e;e=[],l.length&&o(()=>{a(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;n++;try{c=l()}finally{n--,n||s()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{a=l},setScheduler:l=>{o=l}}}var Ke=Q8(),X8=class extends aa{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!wr&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},Pi=new X8;function J8(e){return Math.min(1e3*2**e,3e4)}function Qh(e){return(e??"online")==="online"?Pi.isOnline():!0}var Ol=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Xh(e){let n=!1,r=0,a;const o=Nl(),i=()=>o.status!=="pending",s=v=>{if(!i()){const x=new Ol(v);m(x),e.onCancel?.(x)}},l=()=>{n=!0},c=()=>{n=!1},u=()=>qc.isFocused()&&(e.networkMode==="always"||Pi.isOnline())&&e.canRun(),h=()=>Qh(e.networkMode)&&e.canRun(),f=v=>{i()||(a?.(),o.resolve(v))},m=v=>{i()||(a?.(),o.reject(v))},g=()=>new Promise(v=>{a=x=>{(i()||u())&&v(x)},e.onPause?.()}).then(()=>{a=void 0,i()||e.onContinue?.()}),y=()=>{if(i())return;let v;const x=r===0?e.initialPromise:void 0;try{v=x??e.fn()}catch(b){v=Promise.reject(b)}Promise.resolve(v).then(f).catch(b=>{if(i())return;const w=e.retry??(wr?0:3),E=e.retryDelay??J8,C=typeof E=="function"?E(r,b):E,S=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,b);if(n||!S){m(b);return}r++,e.onFail?.(r,b),B8(C).then(()=>u()?void 0:g()).then(()=>{n?m(b):y()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(a?.(),o),cancelRetry:l,continueRetry:c,canStart:h,start:()=>(h()?y():g().then(y),o)}}var Jh=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ml(this.gcTime)&&(this.#e=pr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(wr?1/0:300*1e3))}clearGcTimeout(){this.#e&&(pr.clearTimeout(this.#e),this.#e=void 0)}},e6=class extends Jh{#e;#t;#n;#a;#r;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Vd(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Vd(this.options);n.data!==void 0&&(this.setState(Ud(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=Pl(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#o({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then(ut).catch(ut):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Lt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Zc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Qn(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Gh(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(c=>c.options.queryFn);l&&this.setOptions(l.options)}const r=new AbortController,a=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#s=!0,r.signal)})},o=()=>{const l=Yh(this.options,n),u=(()=>{const h={client:this.#a,queryKey:this.queryKey,meta:this.meta};return a(h),h})();return this.#s=!1,this.options.persister?this.options.persister(l,u,this):l(u)},s=(()=>{const l={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return a(l),l})();this.options.behavior?.onFetch(s,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#o({type:"fetch",meta:s.fetchOptions?.meta}),this.#r=Xh({initialPromise:n?.initialPromise,fn:s.fetchFn,onCancel:l=>{l instanceof Ol&&l.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(l,c)=>{this.#o({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const l=await this.#r.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#n.config.onSuccess?.(l,this),this.#n.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof Ol){if(l.silent)return this.#r.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#o({type:"error",error:l}),this.#n.config.onError?.(l,this),this.#n.config.onSettled?.(this.state.data,l,this),l}finally{this.scheduleGc()}}#o(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...e1(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...Ud(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const o=e.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Ke.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function e1(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Qh(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ud(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Vd(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var t1=class extends aa{constructor(e,n){super(),this.options=n,this.#e=e,this.#o=null,this.#s=Nl(),this.bindMethods(),this.setOptions(n)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#i;#s;#o;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Zd(this.#t,this.options)?this.#d():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jl(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jl(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Lt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!Ti(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&Bd(this.#t,r,this.options,n)&&this.#d(),this.updateResult(),a&&(this.#t!==r||Lt(this.options.enabled,this.#t)!==Lt(n.enabled,this.#t)||Qn(this.options.staleTime,this.#t)!==Qn(n.staleTime,this.#t))&&this.#g();const o=this.#y();a&&(this.#t!==r||Lt(this.options.enabled,this.#t)!==Lt(n.enabled,this.#t)||o!==this.#l)&&this.#v(o)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(n,e);return n6(this,r)&&(this.#a=r,this.#i=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#a}trackResult(e,n){return new Proxy(e,{get:(r,a)=>(this.trackProp(a),n?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#d(e){this.#_();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch(ut)),n}#g(){this.#b();const e=Qn(this.options.staleTime,this.#t);if(wr||this.#a.isStale||!Ml(e))return;const r=Gh(this.#a.dataUpdatedAt,e)+1;this.#c=pr.setTimeout(()=>{this.#a.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#l=e,!(wr||Lt(this.options.enabled,this.#t)===!1||!Ml(this.#l)||this.#l===0)&&(this.#u=pr.setInterval(()=>{(this.options.refetchIntervalInBackground||qc.isFocused())&&this.#d()},this.#l))}#x(){this.#g(),this.#v(this.#y())}#b(){this.#c&&(pr.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(pr.clearInterval(this.#u),this.#u=void 0)}createResult(e,n){const r=this.#t,a=this.options,o=this.#a,i=this.#r,s=this.#i,c=e!==r?e.state:this.#n,{state:u}=e;let h={...u},f=!1,m;if(n._optimisticResults){const _=this.hasListeners(),O=!_&&Zd(e,n),P=_&&Bd(e,r,n,a);(O||P)&&(h={...h,...e1(u.data,e.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:g,errorUpdatedAt:y,status:v}=h;m=h.data;let x=!1;if(n.placeholderData!==void 0&&m===void 0&&v==="pending"){let _;o?.isPlaceholderData&&n.placeholderData===s?.placeholderData?(_=o.data,x=!0):_=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,_!==void 0&&(v="success",m=Pl(o?.data,_,n),f=!0)}if(n.select&&m!==void 0&&!x)if(o&&m===i?.data&&n.select===this.#m)m=this.#f;else try{this.#m=n.select,m=n.select(m),m=Pl(o?.data,m,n),this.#f=m,this.#o=null}catch(_){this.#o=_}this.#o&&(g=this.#o,m=this.#f,y=Date.now(),v="error");const b=h.fetchStatus==="fetching",w=v==="pending",E=v==="error",C=w&&b,S=m!==void 0,R={status:v,fetchStatus:h.fetchStatus,isPending:w,isSuccess:v==="success",isError:E,isInitialLoading:C,isLoading:C,data:m,dataUpdatedAt:h.dataUpdatedAt,error:g,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:E&&!S,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:E&&S,isStale:Wc(e,n),refetch:this.refetch,promise:this.#s,isEnabled:Lt(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const _=R.data!==void 0,O=R.status==="error"&&!_,P=V=>{O?V.reject(R.error):_&&V.resolve(R.data)},j=()=>{const V=this.#s=R.promise=Nl();P(V)},$=this.#s;switch($.status){case"pending":e.queryHash===r.queryHash&&P($);break;case"fulfilled":(O||R.data!==$.value)&&j();break;case"rejected":(!O||R.error!==$.reason)&&j();break}}return R}updateResult(){const e=this.#a,n=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Ti(n,e))return;this.#a=n;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.#p.size)return!0;const i=new Set(o??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#a).some(s=>{const l=s;return this.#a[l]!==e[l]&&i.has(l)})};this.#E({listeners:r()})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#E(e){Ke.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function t6(e,n){return Lt(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function Zd(e,n){return t6(e,n)||e.state.data!==void 0&&jl(e,n,n.refetchOnMount)}function jl(e,n,r){if(Lt(n.enabled,e)!==!1&&Qn(n.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&Wc(e,n)}return!1}function Bd(e,n,r,a){return(e!==n||Lt(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Wc(e,r)}function Wc(e,n){return Lt(n.enabled,e)!==!1&&e.isStaleByTime(Qn(n.staleTime,e))}function n6(e,n){return!Ti(e.getCurrentResult(),n)}function qd(e){return{onFetch:(n,r)=>{const a=n.options,o=n.fetchOptions?.meta?.fetchMore?.direction,i=n.state.data?.pages||[],s=n.state.data?.pageParams||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const f=y=>{G8(y,()=>n.signal,()=>h=!0)},m=Yh(n.options,n.fetchOptions),g=async(y,v,x)=>{if(h)return Promise.reject();if(v==null&&y.pages.length)return Promise.resolve(y);const w=(()=>{const M={client:n.client,queryKey:n.queryKey,pageParam:v,direction:x?"backward":"forward",meta:n.options.meta};return f(M),M})(),E=await m(w),{maxPages:C}=n.options,S=x?W8:q8;return{pages:S(y.pages,E,C),pageParams:S(y.pageParams,v,C)}};if(o&&i.length){const y=o==="backward",v=y?r6:Wd,x={pages:i,pageParams:s},b=v(a,x);l=await g(x,b,y)}else{const y=e??i.length;do{const v=c===0?s[0]??a.initialPageParam:Wd(a,l);if(c>0&&v==null)break;l=await g(l,v),c++}while(c<y)}return l};n.options.persister?n.fetchFn=()=>n.options.persister?.(u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=u}}}function Wd(e,{pages:n,pageParams:r}){const a=n.length-1;return n.length>0?e.getNextPageParam(n[a],n,r[a],r):void 0}function r6(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}var a6=class extends Jh{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||n1(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(n=>n!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=Xh({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(i,s)=>{this.#r({type:"failed",failureCount:i,error:s})},onPause:()=>{this.#r({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",o=!this.#a.canStart();try{if(a)n();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const s=await this.options.onMutate?.(e,r);s!==this.state.context&&this.#r({type:"pending",context:s,variables:e,isPaused:o})}const i=await this.#a.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,r),await this.options.onSuccess?.(i,e,this.state.context,r),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(i,null,e,this.state.context,r),this.#r({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,e,this.state.context,this,r)}catch(s){Promise.reject(s)}try{await this.options.onError?.(i,e,this.state.context,r)}catch(s){Promise.reject(s)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,r)}catch(s){Promise.reject(s)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,r)}catch(s){Promise.reject(s)}throw this.#r({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#r(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ke.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function n1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var o6=class extends aa{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){const a=new a6({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(a),a}add(e){this.#e.add(e);const n=ei(e);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=ei(e);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=ei(e);if(typeof n=="string"){const a=this.#t.get(n)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const n=ei(e);return typeof n=="string"?this.#t.get(n)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ke.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(r=>$d(n,r))}findAll(e={}){return this.getAll().filter(n=>$d(e,n))}notify(e){Ke.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Ke.batch(()=>Promise.all(e.map(n=>n.continue().catch(ut))))}};function ei(e){return e.options.scope?.id}var i6=class extends aa{#e;#t=void 0;#n;#a;constructor(n,r){super(),this.#e=n,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const r=this.options;this.options=this.#e.defaultMutationOptions(n),Ti(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&_r(r.mutationKey)!==_r(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#r(),this.#i(n)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(n,r){return this.#a=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(n)}#r(){const n=this.#n?.state??n1();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#i(n){Ke.batch(()=>{if(this.#a&&this.hasListeners()){const r=this.#t.variables,a=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{this.#a.onSuccess?.(n.data,r,a,o)}catch(i){Promise.reject(i)}try{this.#a.onSettled?.(n.data,null,r,a,o)}catch(i){Promise.reject(i)}}else if(n?.type==="error"){try{this.#a.onError?.(n.error,r,a,o)}catch(i){Promise.reject(i)}try{this.#a.onSettled?.(void 0,n.error,r,a,o)}catch(i){Promise.reject(i)}}}this.listeners.forEach(r=>{r(this.#t)})})}},s6=class extends aa{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,r){const a=n.queryKey,o=n.queryHash??Vc(a,n);let i=this.get(o);return i||(i=new e6({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ke.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Fd(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>Fd(e,r)):n}notify(e){Ke.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},l6=class{#e;#t;#n;#a;#r;#i;#s;#o;constructor(e={}){this.#e=e.queryCache||new s6,this.#t=e.mutationCache||new o6,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=qc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Pi.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#e.build(this,n),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Qn(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:r})=>{const a=r.data;return[n,a]})}setQueryData(e,n,r){const a=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(a.queryHash)?.state.data,s=V8(n,i);if(s!==void 0)return this.#e.build(this,a).setData(s,{...r,manual:!0})}setQueriesData(e,n,r){return Ke.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;Ke.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#e;return Ke.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},a=Ke.batch(()=>this.#e.findAll(e).map(o=>o.cancel(r)));return Promise.all(a).then(ut).catch(ut)}invalidateQueries(e,n={}){return Ke.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},a=Ke.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(ut)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(a).then(ut)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(Qn(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ut).catch(ut)}fetchInfiniteQuery(e){return e.behavior=qd(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ut).catch(ut)}ensureInfiniteQueryData(e){return e.behavior=qd(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Pi.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#a.set(_r(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#a.values()],r={};return n.forEach(a=>{Ja(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,n){this.#r.set(_r(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(a=>{Ja(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Vc(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Zc&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},r1=d.createContext(void 0),er=e=>{const n=d.useContext(r1);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},c6=({client:e,children:n})=>(d.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(r1.Provider,{value:e,children:n})),a1=d.createContext(!1),u6=()=>d.useContext(a1);a1.Provider;function d6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var f6=d.createContext(d6()),h6=()=>d.useContext(f6),p6=(e,n,r)=>{const a=r?.state.error&&typeof e.throwOnError=="function"?Bc(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(n.isReset()||(e.retryOnMount=!1))},m6=e=>{d.useEffect(()=>{e.clearReset()},[e])},g6=({result:e,errorResetBoundary:n,throwOnError:r,query:a,suspense:o})=>e.isError&&!n.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||Bc(r,[e.error,a])),y6=(e,n)=>n.state.data===void 0,v6=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>r(a(...o)):r(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},x6=(e,n)=>e.isLoading&&e.isFetching&&!n,b6=(e,n)=>e?.suspense&&n.isPending,Gd=(e,n,r)=>n.fetchOptimistic(e).catch(()=>{r.clearReset()});function o1(e,n,r){const a=u6(),o=h6(),i=er(),s=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(s);const l=i.getQueryCache().get(s.queryHash);s._optimisticResults=a?"isRestoring":"optimistic",v6(s),p6(s,o,l),m6(o);const c=!i.getQueryCache().get(s.queryHash),[u]=d.useState(()=>new n(i,s)),h=u.getOptimisticResult(s),f=!a&&e.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(m=>{const g=f?u.subscribe(Ke.batchCalls(m)):ut;return u.updateResult(),g},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),d.useEffect(()=>{u.setOptions(s)},[s,u]),b6(s,h))throw Gd(s,u,o);if(g6({result:h,errorResetBoundary:o,throwOnError:s.throwOnError,query:l,suspense:s.suspense}))throw h.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(s,h),s.experimental_prefetchInRender&&!wr&&x6(h,a)&&(c?Gd(s,u,o):l?.promise)?.catch(ut).finally(()=>{u.updateResult()}),s.notifyOnChangeProps?h:u.trackResult(h)}function In(e,n){return o1(e,t1)}function oa(e,n){return o1({...e,enabled:!0,suspense:!0,throwOnError:y6,placeholderData:void 0},t1)}function Ni(e,n){const r=er(),[a]=d.useState(()=>new i6(r,e));d.useEffect(()=>{a.setOptions(e)},[a,e]);const o=d.useSyncExternalStore(d.useCallback(s=>a.subscribe(Ke.batchCalls(s)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),i=d.useCallback((s,l)=>{a.mutate(s,l).catch(ut)},[a]);if(o.error&&Bc(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function Kd(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function _o(...e){return n=>{let r=!1;const a=e.map(o=>{const i=Kd(o,n);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<a.length;o++){const i=a[o];typeof i=="function"?i():Kd(e[o],null)}}}}function Me(...e){return d.useCallback(_o(...e),e)}var w6=Symbol.for("react.lazy"),Oi=ns[" use ".trim().toString()];function _6(e){return typeof e=="object"&&e!==null&&"then"in e}function i1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===w6&&"_payload"in e&&_6(e._payload)}function E6(e){const n=S6(e),r=d.forwardRef((a,o)=>{let{children:i,...s}=a;i1(i)&&typeof Oi=="function"&&(i=Oi(i._payload));const l=d.Children.toArray(i),c=l.find(R6);if(c){const u=c.props.children,h=l.map(f=>f===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:f);return p.jsx(n,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,h):null})}return p.jsx(n,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var C6=E6("Slot");function S6(e){const n=d.forwardRef((r,a)=>{let{children:o,...i}=r;if(i1(o)&&typeof Oi=="function"&&(o=Oi(o._payload)),d.isValidElement(o)){const s=T6(o),l=M6(i,o.props);return o.type!==d.Fragment&&(l.ref=a?_o(a,s):s),d.cloneElement(o,l)}return d.Children.count(o)>1?d.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var A6=Symbol("radix.slottable");function R6(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===A6}function M6(e,n){const r={...n};for(const a in n){const o=e[a],i=n[a];/^on[A-Z]/.test(a)?o&&i?r[a]=(...l)=>{const c=i(...l);return o(...l),c}:o&&(r[a]=o):a==="style"?r[a]={...o,...i}:a==="className"&&(r[a]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function T6(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const P6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),d.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),N6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,28H188V24a12,12,0,0,0-24,0v4H92V24a12,12,0,0,0-24,0v4H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28ZM68,52a12,12,0,0,0,24,0h72a12,12,0,0,0,24,0h16V76H52V52ZM52,204V100H204V204Zm60-80v56a12,12,0,0,1-24,0V143.32a12,12,0,0,1-9.37-22l16-8A12,12,0,0,1,112,124Zm61.49,33.88L163.9,168H168a12,12,0,0,1,0,24H136a12,12,0,0,1-8.71-20.25L155.45,142a4,4,0,0,0,.55-2,4,4,0,0,0-7.47-2,12,12,0,0,1-20.78-12A28,28,0,0,1,180,140a27.77,27.77,0,0,1-5.64,16.86A10.63,10.63,0,0,1,173.49,157.88Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48V88H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),d.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM112,184a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm56-8a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136a23.76,23.76,0,0,1-4.84,14.45L152,176ZM48,80V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,34H182V24a6,6,0,0,0-12,0V34H86V24a6,6,0,0,0-12,0V34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H74V56a6,6,0,0,0,12,0V46h84V56a6,6,0,0,0,12,0V46h26a2,2,0,0,1,2,2V82H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V94H210V208A2,2,0,0,1,208,210Zm-98-90v64a6,6,0,0,1-12,0V129.71l-7.32,3.66a6,6,0,1,1-5.36-10.74l16-8A6,6,0,0,1,110,120Zm59.57,29.25L148,178h20a6,6,0,0,1,0,12H136a6,6,0,0,1-4.8-9.6L160,142a10,10,0,1,0-16.65-11A6,6,0,1,1,133,125a22,22,0,1,1,36.62,24.26Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,36H180V24a4,4,0,0,0-8,0V36H84V24a4,4,0,0,0-8,0V36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H76V56a4,4,0,0,0,8,0V44h88V56a4,4,0,0,0,8,0V44h28a4,4,0,0,1,4,4V84H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V92H212V208A4,4,0,0,1,208,212ZM108,120v64a4,4,0,0,1-8,0V126.47l-10.21,5.11a4,4,0,0,1-3.58-7.16l16-8A4,4,0,0,1,108,120Zm60,28-24,32h24a4,4,0,0,1,0,8H136a4,4,0,0,1-3.2-6.4l28.78-38.37A11.88,11.88,0,0,0,164,136a12,12,0,0,0-22.4-6,4,4,0,0,1-6.92-4A20,20,0,0,1,172,136,19.79,19.79,0,0,1,168,148Z"}))]]),O6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),d.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),j6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),d.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]),D6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),d.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),k6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),I6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),d.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),L6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M112,60a16,16,0,1,1,16,16A16,16,0,0,1,112,60Zm16,52a16,16,0,1,0,16,16A16,16,0,0,0,128,112Zm0,68a16,16,0,1,0,16,16A16,16,0,0,0,128,180Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M176,32V224a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16V32A16,16,0,0,1,96,16h64A16,16,0,0,1,176,32Z",opacity:"0.2"}),d.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM128,72a12,12,0,1,0-12-12A12,12,0,0,0,128,72Zm0,112a12,12,0,1,0,12,12A12,12,0,0,0,128,184Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M160,16H96A16,16,0,0,0,80,32V224a16,16,0,0,0,16,16h64a16,16,0,0,0,16-16V32A16,16,0,0,0,160,16ZM128,208a12,12,0,1,1,12-12A12,12,0,0,1,128,208Zm0-68a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm0-68a12,12,0,1,1,12-12A12,12,0,0,1,128,72Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M118,60a10,10,0,1,1,10,10A10,10,0,0,1,118,60Zm10,58a10,10,0,1,0,10,10A10,10,0,0,0,128,118Zm0,68a10,10,0,1,0,10,10A10,10,0,0,0,128,186Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM128,72a12,12,0,1,0-12-12A12,12,0,0,0,128,72Zm0,112a12,12,0,1,0,12,12A12,12,0,0,0,128,184Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,60a8,8,0,1,1,8,8A8,8,0,0,1,120,60Zm8,60a8,8,0,1,0,8,8A8,8,0,0,0,128,120Zm0,68a8,8,0,1,0,8,8A8,8,0,0,0,128,188Z"}))]]),F6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),d.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z"}))]]),$6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),d.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z"}))]]),H6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178,36c-20.09,0-37.92,7.93-50,21.56C115.92,43.93,98.09,36,78,36a66.08,66.08,0,0,0-66,66c0,72.34,105.81,130.14,110.31,132.57a12,12,0,0,0,11.38,0C138.19,232.14,244,174.34,244,102A66.08,66.08,0,0,0,178,36Zm-5.49,142.36A328.69,328.69,0,0,1,128,210.16a328.69,328.69,0,0,1-44.51-31.8C61.82,159.77,36,131.42,36,102A42,42,0,0,1,78,60c17.8,0,32.7,9.4,38.89,24.54a12,12,0,0,0,22.22,0C145.3,69.4,160.2,60,178,60a42,42,0,0,1,42,42C220,131.42,194.18,159.77,172.51,178.36Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,102c0,66-104,122-104,122S24,168,24,102A54,54,0,0,1,78,48c22.59,0,41.94,12.31,50,32,8.06-19.69,27.41-32,50-32A54,54,0,0,1,232,102Z",opacity:"0.2"}),d.createElement("path",{d:"M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,102c0,70-103.79,126.66-108.21,129a8,8,0,0,1-7.58,0C119.79,228.66,16,172,16,102A62.07,62.07,0,0,1,78,40c20.65,0,38.73,8.88,50,23.89C139.27,48.88,157.35,40,178,40A62.07,62.07,0,0,1,240,102Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178,42c-21,0-39.26,9.47-50,25.34C117.26,51.47,99,42,78,42a60.07,60.07,0,0,0-60,60c0,29.2,18.2,59.59,54.1,90.31a334.68,334.68,0,0,0,53.06,37,6,6,0,0,0,5.68,0,334.68,334.68,0,0,0,53.06-37C219.8,161.59,238,131.2,238,102A60.07,60.07,0,0,0,178,42ZM128,217.11C111.59,207.64,30,157.72,30,102A48.05,48.05,0,0,1,78,54c20.28,0,37.31,10.83,44.45,28.27a6,6,0,0,0,11.1,0C140.69,64.83,157.72,54,178,54a48.05,48.05,0,0,1,48,48C226,157.72,144.41,207.64,128,217.11Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178,44c-21.44,0-39.92,10.19-50,27.07C117.92,54.19,99.44,44,78,44a58.07,58.07,0,0,0-58,58c0,28.59,18,58.47,53.4,88.79a333.81,333.81,0,0,0,52.7,36.73,4,4,0,0,0,3.8,0,333.81,333.81,0,0,0,52.7-36.73C218,160.47,236,130.59,236,102A58.07,58.07,0,0,0,178,44ZM128,219.42c-14-8-100-59.35-100-117.42A50.06,50.06,0,0,1,78,52c21.11,0,38.85,11.31,46.3,29.51a4,4,0,0,0,7.4,0C139.15,63.31,156.89,52,178,52a50.06,50.06,0,0,1,50,50C228,160,142,211.46,128,219.42Z"}))]]),z6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M144,96a16,16,0,1,1,16,16A16,16,0,0,1,144,96Zm92-40V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56ZM44,60v79.72l33.86-33.86a20,20,0,0,1,28.28,0L147.31,147l17.18-17.17a20,20,0,0,1,28.28,0L212,149.09V60Zm0,136H162.34L92,125.66l-48,48Zm168,0V183l-33.37-33.37L164.28,164l32,32Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,56V178.06l-39.72-39.72a8,8,0,0,0-11.31,0L147.31,164,97.66,114.34a8,8,0,0,0-11.32,0L32,168.69V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V163.57L188.53,134.1a14,14,0,0,0-19.8,0l-21.42,21.42L101.9,110.1a14,14,0,0,0-19.8,0L38,154.2V56A2,2,0,0,1,40,54ZM38,200V171.17l52.58-52.58a2,2,0,0,1,2.84,0L176.83,202H40A2,2,0,0,1,38,200Zm178,2H193.8l-38-38,21.41-21.42a2,2,0,0,1,2.83,0l38,38V200A2,2,0,0,1,216,202ZM146,100a10,10,0,1,1,10,10A10,10,0,0,1,146,100Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V168.4l-32.89-32.89a12,12,0,0,0-17,0l-22.83,22.83-46.82-46.83a12,12,0,0,0-17,0L36,159V56A4,4,0,0,1,40,52ZM36,200V170.34l53.17-53.17a4,4,0,0,1,5.66,0L181.66,204H40A4,4,0,0,1,36,200Zm180,4H193l-40-40,22.83-22.83a4,4,0,0,1,5.66,0L220,179.71V200A4,4,0,0,1,216,204ZM148,100a8,8,0,1,1,8,8A8,8,0,0,1,148,100Z"}))]]),U6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),V6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M117.18,188.74a12,12,0,0,1,0,17l-5.12,5.12A58.26,58.26,0,0,1,70.6,228h0A58.62,58.62,0,0,1,29.14,127.92L63.89,93.17a58.64,58.64,0,0,1,98.56,28.11,12,12,0,1,1-23.37,5.44,34.65,34.65,0,0,0-58.22-16.58L46.11,144.89A34.62,34.62,0,0,0,70.57,204h0a34.41,34.41,0,0,0,24.49-10.14l5.11-5.12A12,12,0,0,1,117.18,188.74ZM226.83,45.17a58.65,58.65,0,0,0-82.93,0l-5.11,5.11a12,12,0,0,0,17,17l5.12-5.12a34.63,34.63,0,1,1,49,49L175.1,145.86A34.39,34.39,0,0,1,150.61,156h0a34.63,34.63,0,0,1-33.69-26.72,12,12,0,0,0-23.38,5.44A58.64,58.64,0,0,0,150.56,180h.05a58.28,58.28,0,0,0,41.47-17.17l34.75-34.75a58.62,58.62,0,0,0,0-82.91Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M218.34,119.6,183.6,154.34a46.58,46.58,0,0,1-44.31,12.26c-.31.34-.62.67-.95,1L103.6,202.34A46.63,46.63,0,1,1,37.66,136.4L72.4,101.66A46.6,46.6,0,0,1,116.71,89.4c.31-.34.62-.67,1-1L152.4,53.66a46.63,46.63,0,0,1,65.94,65.94Z",opacity:"0.2"}),d.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,7.78,8.22H152a8,8,0,0,0,8-7.78A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM115.7,192.49a43.31,43.31,0,0,1-55-66.43l25.37-25.37a43.35,43.35,0,0,1,61.25,0,42.9,42.9,0,0,1,9.95,15.43,8,8,0,1,1-15,5.6A27.33,27.33,0,0,0,97.37,112L72,137.37a27.32,27.32,0,0,0,34.68,41.91,8,8,0,1,1,9,13.21Zm79.61-62.55-25.37,25.37A43,43,0,0,1,139.32,168h0a43.35,43.35,0,0,1-40.53-28.12,8,8,0,1,1,15-5.6A27.35,27.35,0,0,0,139.28,152h0a27.14,27.14,0,0,0,19.32-8L184,118.63a27.32,27.32,0,0,0-34.68-41.91,8,8,0,1,1-9-13.21,43.32,43.32,0,0,1,55,66.43Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M238,88.18a52.42,52.42,0,0,1-15.4,35.66l-34.75,34.75A52.28,52.28,0,0,1,150.62,174h-.05A52.63,52.63,0,0,1,98,119.9a6,6,0,0,1,6-5.84h.17a6,6,0,0,1,5.83,6.16A40.62,40.62,0,0,0,150.58,162h0a40.4,40.4,0,0,0,28.73-11.9l34.75-34.74A40.63,40.63,0,0,0,156.63,57.9l-11,11a6,6,0,0,1-8.49-8.49l11-11a52.62,52.62,0,0,1,74.43,0A52.83,52.83,0,0,1,238,88.18Zm-127.62,98.9-11,11A40.36,40.36,0,0,1,70.6,210h0a40.63,40.63,0,0,1-28.7-69.36L76.62,105.9A40.63,40.63,0,0,1,146,135.77a6,6,0,0,0,5.83,6.16H152a6,6,0,0,0,6-5.84A52.63,52.63,0,0,0,68.14,97.42L33.38,132.16A52.63,52.63,0,0,0,70.56,222h0a52.26,52.26,0,0,0,37.22-15.42l11-11a6,6,0,1,0-8.49-8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,16,.45A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"}))]]),Z6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,64V192H40V64Z",opacity:"0.2"}),d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z"}))]]),B6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),d.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),q6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z",opacity:"0.2"}),d.createElement("path",{d:"M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z"}))]]),W6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),G6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),K6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M238.15,78.54,177.46,17.86a20,20,0,0,0-28.3,0L97.2,70c-12.43-3.33-36.68-5.72-61.74,14.5a20,20,0,0,0-1.6,29.73l45.46,45.47-39.8,39.8a12,12,0,0,0,17,17l39.8-39.81,45.47,45.46A20,20,0,0,0,155.91,228c.46,0,.93,0,1.4-.05A20,20,0,0,0,171.87,220c4.69-6.23,11-16.13,14.44-28s3.45-22.88.16-33.4l51.7-51.87A20,20,0,0,0,238.15,78.54Zm-74.26,68.79a12,12,0,0,0-2.23,13.84c3.43,6.86,6.9,21-6.28,40.65L54.08,100.53c21.09-14.59,39.53-6.64,41-6a11.67,11.67,0,0,0,13.81-2.29l54.43-54.61,55,55Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.66,98.34,172.39,155.8c11.46,22.93-1.72,45.86-10.11,57a8,8,0,0,1-12,.83L42.34,105.76A8,8,0,0,1,43,93.85c29.65-23.92,57.4-10,57.4-10l57.27-57.46a8,8,0,0,1,11.31,0L229.66,87A8,8,0,0,1,229.66,98.34Z",opacity:"0.2"}),d.createElement("path",{d:"M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M235.33,104l-53.47,53.65c4.56,12.67,6.45,33.89-13.19,60A15.93,15.93,0,0,1,157,224c-.38,0-.75,0-1.13,0a16,16,0,0,1-11.32-4.69L96.29,171,53.66,213.66a8,8,0,0,1-11.32-11.32L85,159.71l-48.3-48.3A16,16,0,0,1,38,87.63c25.42-20.51,49.75-16.48,60.4-13.14L152,20.7a16,16,0,0,1,22.63,0l60.69,60.68A16,16,0,0,1,235.33,104Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M233.91,82.79,173.22,22.1a14,14,0,0,0-19.81,0L98.93,76.77c-9.52-3.25-34-8.34-59.71,12.41A14,14,0,0,0,38.1,110l49.71,49.71-44.05,44a6,6,0,1,0,8.48,8.48l44.05-44.05L146,217.89a14,14,0,0,0,9.9,4.11q.49,0,1,0a14,14,0,0,0,10.19-5.54c19.72-26.21,17.15-47.23,12.46-59.3l54.37-54.55A14,14,0,0,0,233.91,82.79ZM225.42,94.1h0l-57.27,57.46a6,6,0,0,0-1.11,6.92c9.94,19.88-1.71,40.32-9.54,50.72a2,2,0,0,1-3,.2L46.58,101.51a2,2,0,0,1,.18-3c12.5-10.09,24.5-12.76,33.7-12.76a42.13,42.13,0,0,1,17.25,3.41A6,6,0,0,0,104.64,88L161.9,30.59a2,2,0,0,1,2.83,0l60.69,60.68A2,2,0,0,1,225.42,94.1Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.49,84.2,171.8,23.51a12,12,0,0,0-17,0L99.45,79.07c-8.08-3-32.79-9.45-59,11.67a12,12,0,0,0-1,17.84l51.13,51.13L45.17,205.17a4,4,0,0,0,5.66,5.66l45.46-45.47,51.12,51.12A12,12,0,0,0,155.9,220c.28,0,.57,0,.85,0a12,12,0,0,0,8.73-4.74c19.83-26.36,16.51-47.18,11.71-58.57l55.3-55.49A12,12,0,0,0,232.49,84.2Zm-5.66,11.31h0L169.56,153a4,4,0,0,0-.75,4.61c10.43,20.85-1.62,42-9.73,52.83a4,4,0,0,1-6,.4L45.17,102.93a4,4,0,0,1,.33-6C58.44,86.53,70.86,83.74,80.44,83.74A43.9,43.9,0,0,1,98.6,87.38a4,4,0,0,0,4.62-.75l57.27-57.46a4,4,0,0,1,5.66,0l60.68,60.69A4,4,0,0,1,226.83,95.51Z"}))]]),Y6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,128a12,12,0,0,1-12,12H48a12,12,0,0,1,0-24h68A12,12,0,0,1,128,128ZM48,76H180a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24Zm52,104H48a12,12,0,0,0,0,24h52a12,12,0,0,0,0-24Zm132.49-20.49a12,12,0,0,0-17,0L196,179V112a12,12,0,0,0-24,0v67l-19.51-19.52a12,12,0,0,0-17,17l40,40a12,12,0,0,0,17,0l40-40A12,12,0,0,0,232.49,159.51Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,80v88l-24,24H48V64H208A16,16,0,0,1,224,80Z",opacity:"0.2"}),d.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h96a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm40,112H72a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Zm8-48H72a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm77.66,29.66-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L160,164.69V120a8,8,0,0,1,16,0v44.69l10.34-10.35a8,8,0,0,1,11.32,11.32Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M126,128a6,6,0,0,1-6,6H48a6,6,0,0,1,0-12h72A6,6,0,0,1,126,128ZM48,70H184a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12Zm56,116H48a6,6,0,0,0,0,12h56a6,6,0,0,0,0-12Zm124.24-22.24a6,6,0,0,0-8.48,0L190,193.51V112a6,6,0,0,0-12,0v81.51l-29.76-29.75a6,6,0,0,0-8.48,8.48l40,40a6,6,0,0,0,8.48,0l40-40A6,6,0,0,0,228.24,163.76Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M124,128a4,4,0,0,1-4,4H48a4,4,0,0,1,0-8h72A4,4,0,0,1,124,128ZM48,68H184a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8Zm56,120H48a4,4,0,0,0,0,8h56a4,4,0,0,0,0-8Zm122.83-22.83a4,4,0,0,0-5.66,0L188,198.34V112a4,4,0,0,0-8,0v86.34l-33.17-33.17a4,4,0,0,0-5.66,5.66l40,40a4,4,0,0,0,5.66,0l40-40A4,4,0,0,0,226.83,165.17Z"}))]]),Q6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"}))]]),X6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z",opacity:"0.2"}),d.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z"}))]]),J6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M246.15,133.18,146.83,33.86A19.85,19.85,0,0,0,132.69,28H40A12,12,0,0,0,28,40v92.69a19.85,19.85,0,0,0,5.86,14.14l99.32,99.32a20,20,0,0,0,28.28,0l84.69-84.69A20,20,0,0,0,246.15,133.18Zm-98.83,93.17L52,131V52h79l95.32,95.32ZM104,88A16,16,0,1,1,88,72,16,16,0,0,1,104,88Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M237.66,153,153,237.66a8,8,0,0,1-11.31,0L42.34,138.34A8,8,0,0,1,40,132.69V40h92.69a8,8,0,0,1,5.65,2.34l99.32,99.32A8,8,0,0,1,237.66,153Z",opacity:"0.2"}),d.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63Zm-96,96L48,132.69V48h84.69L232,147.31ZM96,84A12,12,0,1,1,84,72,12,12,0,0,1,96,84Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63ZM84,96A12,12,0,1,1,96,84,12,12,0,0,1,84,96Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M241.91,137.42,142.59,38.1a13.94,13.94,0,0,0-9.9-4.1H40a6,6,0,0,0-6,6v92.69a13.94,13.94,0,0,0,4.1,9.9l99.32,99.32a14,14,0,0,0,19.8,0l84.69-84.69A14,14,0,0,0,241.91,137.42Zm-8.49,11.31-84.69,84.69a2,2,0,0,1-2.83,0L46.59,134.1a2,2,0,0,1-.59-1.41V46h86.69a2,2,0,0,1,1.41.59l99.32,99.31A2,2,0,0,1,233.42,148.73ZM94,84A10,10,0,1,1,84,74,10,10,0,0,1,94,84Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63Zm-96,96L48,132.69V48h84.69L232,147.31ZM96,84A12,12,0,1,1,84,72,12,12,0,0,1,96,84Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240.49,138.83,141.17,39.51A11.93,11.93,0,0,0,132.69,36H40a4,4,0,0,0-4,4v92.69a11.93,11.93,0,0,0,3.51,8.48l99.32,99.32a12,12,0,0,0,17,0l84.69-84.69a12,12,0,0,0,0-17Zm-5.66,11.31-84.69,84.69a4,4,0,0,1-5.65,0L45.17,135.51A4,4,0,0,1,44,132.69V44h88.69a4,4,0,0,1,2.82,1.17l99.32,99.32A4,4,0,0,1,234.83,150.14ZM92,84a8,8,0,1,1-8-8A8,8,0,0,1,92,84Z"}))]]),e4=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),t4=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),d.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),n4=d.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),je=d.forwardRef((e,n)=>{const{alt:r,color:a,size:o,weight:i,mirrored:s,children:l,weights:c,...u}=e,{color:h="currentColor",size:f,weight:m="regular",mirrored:g=!1,...y}=d.useContext(n4);return d.createElement("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:o??f,height:o??f,fill:a??h,viewBox:"0 0 256 256",transform:s||g?"scale(-1, 1)":void 0,...y,...u},!!r&&d.createElement("title",null,r),l,c.get(i??m))});je.displayName="IconBase";const s1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:P6}));s1.displayName="BellIcon";const l1=s1,c1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:N6}));c1.displayName="CalendarIcon";const r4=c1,u1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:O6}));u1.displayName="CaretDownIcon";const Gc=u1,d1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:j6}));d1.displayName="CaretLeftIcon";const Br=d1,f1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:D6}));f1.displayName="CaretRightIcon";const za=f1,h1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:k6}));h1.displayName="CaretUpIcon";const a4=h1,p1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:I6}));p1.displayName="CheckIcon";const o4=p1,m1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:L6}));m1.displayName="DotsThreeVerticalIcon";const Kc=m1,g1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:F6}));g1.displayName="GearIcon";const i4=g1,Yc=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:$6}));Yc.displayName="GridFourIcon";const s4=Yc,y1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:H6}));y1.displayName="HeartIcon";const l4=y1,v1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:z6}));v1.displayName="ImageIcon";const x1=v1,b1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:U6}));b1.displayName="InfoIcon";const c4=b1,w1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:V6}));w1.displayName="LinkIcon";const u4=w1,_1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:Z6}));_1.displayName="ListIcon";const eo=_1,E1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:B6}));E1.displayName="MagnifyingGlassIcon";const d4=E1,C1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:q6}));C1.displayName="MoonIcon";const f4=C1,S1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:W6}));S1.displayName="PencilSimpleIcon";const A1=S1,R1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:G6}));R1.displayName="PlusIcon";const M1=R1,Qc=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:K6}));Qc.displayName="PushPinIcon";const h4=Qc,T1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:Y6}));T1.displayName="SortAscendingIcon";const P1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:Q6}));P1.displayName="SpinnerIcon";const p4=P1,N1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:X6}));N1.displayName="SunIcon";const m4=N1,O1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:J6}));O1.displayName="TagIcon";const g4=O1,j1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:e4}));j1.displayName="TrashIcon";const D1=j1,k1=d.forwardRef((e,n)=>d.createElement(je,{ref:n,...e,weights:t4}));k1.displayName="XIcon";const Xc=k1;function y4(e){return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[p.jsx("circle",{cx:"6",cy:"6",r:"3"}),p.jsx("circle",{cx:"18",cy:"6",r:"3"}),p.jsx("circle",{cx:"6",cy:"18",r:"3"}),p.jsx("circle",{cx:"18",cy:"18",r:"3"}),p.jsx("circle",{cx:"12",cy:"12",r:"3"}),p.jsx("line",{x1:"8.5",y1:"7.5",x2:"10",y2:"10"}),p.jsx("line",{x1:"15.5",y1:"7.5",x2:"14",y2:"10"}),p.jsx("line",{x1:"8.5",y1:"16.5",x2:"10",y2:"14"}),p.jsx("line",{x1:"15.5",y1:"16.5",x2:"14",y2:"14"})]})}const Yd=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Qd=Uy,tr=(e,n)=>r=>{var a;if(n?.variants==null)return Qd(e,r?.class,r?.className);const{variants:o,defaultVariants:i}=n,s=Object.keys(o).map(u=>{const h=r?.[u],f=i?.[u];if(h===null)return null;const m=Yd(h)||Yd(f);return o[u][m]}),l=r&&Object.entries(r).reduce((u,h)=>{let[f,m]=h;return m===void 0||(u[f]=m),u},{}),c=n==null||(a=n.compoundVariants)===null||a===void 0?void 0:a.reduce((u,h)=>{let{class:f,className:m,...g}=h;return Object.entries(g).every(y=>{let[v,x]=y;return Array.isArray(x)?x.includes({...i,...l}[v]):{...i,...l}[v]===x})?[...u,f,m]:u},[]);return Qd(e,s,c,r?.class,r?.className)},v4=tr(["inline-flex","items-center","justify-center","gap-2","font-bold","transition-all","duration-200","border-2","border-border","disabled:pointer-events-none","disabled:opacity-50","hover:shadow-sketchy","active:translate-x-0.5","active:translate-y-0.5","active:shadow-none"],{variants:{variant:{primary:["bg-cta","text-fg-on-filled","hover:bg-cta-hover"],ghost:["border-transparent","hover:border-border","hover:bg-ghost"],danger:["bg-accent-danger","text-fg-on-filled","hover:bg-accent-danger-hover"],"soft-success":["bg-accent-soft-success","text-fg-default","hover:bg-accent-soft-success-hover"],"soft-danger":["bg-accent-soft-danger","text-fg-default","hover:bg-accent-soft-danger-hover"]},size:{sm:"h-8 px-3 text-sm rounded-[12px_4px_13px_3px/4px_10px_4px_12px]",md:"h-10 px-4 text-sm rounded-[15px_4px_16px_4px/4px_12px_5px_14px]",lg:"h-12 px-6 text-base rounded-[18px_5px_19px_5px/5px_14px_6px_16px]",icon:"h-10 w-10 rounded-[12px_4px_13px_3px/4px_10px_4px_12px]","icon-sm":"h-8 w-8 rounded-[10px_3px_11px_3px/3px_8px_3px_10px]"}},defaultVariants:{variant:"primary",size:"md"}}),Ze=d.forwardRef(({className:e,variant:n,size:r,asChild:a=!1,isLoading:o,children:i,disabled:s,...l},c)=>{const u=a?C6:"button";return p.jsx(u,{ref:c,className:v4({variant:n,size:r,className:e}),disabled:s||o,...l,children:o?p.jsxs(p.Fragment,{children:[p.jsx(p4,{className:"animate-spin h-4 w-4"}),i]}):i})});Ze.displayName="Button";function te(e,n,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return n?.(o)}}function x4(e,n){const r=d.createContext(n),a=i=>{const{children:s,...l}=i,c=d.useMemo(()=>l,Object.values(l));return p.jsx(r.Provider,{value:c,children:s})};a.displayName=e+"Provider";function o(i){const s=d.useContext(r);if(s)return s;if(n!==void 0)return n;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[a,o]}function zn(e,n=[]){let r=[];function a(i,s){const l=d.createContext(s),c=r.length;r=[...r,s];const u=f=>{const{scope:m,children:g,...y}=f,v=m?.[e]?.[c]||l,x=d.useMemo(()=>y,Object.values(y));return p.jsx(v.Provider,{value:x,children:g})};u.displayName=i+"Provider";function h(f,m){const g=m?.[e]?.[c]||l,y=d.useContext(g);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,h]}const o=()=>{const i=r.map(s=>d.createContext(s));return function(l){const c=l?.[e]||i;return d.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[a,b4(o,...n)]}function b4(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=a.reduce((l,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...l,...f}},{});return d.useMemo(()=>({[`__scope${n.scopeName}`]:s}),[s])}};return r.scopeName=n.scopeName,r}var ot=globalThis?.document?d.useLayoutEffect:()=>{},w4=ns[" useId ".trim().toString()]||(()=>{}),_4=0;function pn(e){const[n,r]=d.useState(w4());return ot(()=>{r(a=>a??String(_4++))},[e]),n?`radix-${n}`:""}var E4=ns[" useInsertionEffect ".trim().toString()]||ot;function Ln({prop:e,defaultProp:n,onChange:r=()=>{},caller:a}){const[o,i,s]=C4({defaultProp:n,onChange:r}),l=e!==void 0,c=l?e:o;{const h=d.useRef(e!==void 0);d.useEffect(()=>{const f=h.current;f!==l&&console.warn(`${a} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,a])}const u=d.useCallback(h=>{if(l){const f=S4(h)?h(e):h;f!==e&&s.current?.(f)}else i(h)},[l,e,i,s]);return[c,u]}function C4({defaultProp:e,onChange:n}){const[r,a]=d.useState(e),o=d.useRef(r),i=d.useRef(n);return E4(()=>{i.current=n},[n]),d.useEffect(()=>{o.current!==r&&(i.current?.(r),o.current=r)},[r,o]),[r,a,i]}function S4(e){return typeof e=="function"}function Qr(e){const n=A4(e),r=d.forwardRef((a,o)=>{const{children:i,...s}=a,l=d.Children.toArray(i),c=l.find(M4);if(c){const u=c.props.children,h=l.map(f=>f===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:f);return p.jsx(n,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,h):null})}return p.jsx(n,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function A4(e){const n=d.forwardRef((r,a)=>{const{children:o,...i}=r;if(d.isValidElement(o)){const s=P4(o),l=T4(i,o.props);return o.type!==d.Fragment&&(l.ref=a?_o(a,s):s),d.cloneElement(o,l)}return d.Children.count(o)>1?d.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var I1=Symbol("radix.slottable");function R4(e){const n=({children:r})=>p.jsx(p.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=I1,n}function M4(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===I1}function T4(e,n){const r={...n};for(const a in n){const o=e[a],i=n[a];/^on[A-Z]/.test(a)?o&&i?r[a]=(...l)=>{const c=i(...l);return o(...l),c}:o&&(r[a]=o):a==="style"?r[a]={...o,...i}:a==="className"&&(r[a]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function P4(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var N4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],we=N4.reduce((e,n)=>{const r=Qr(`Primitive.${n}`),a=d.forwardRef((o,i)=>{const{asChild:s,...l}=o,c=s?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...l,ref:i})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{});function L1(e,n){e&&On.flushSync(()=>e.dispatchEvent(n))}function yn(e){const n=d.useRef(e);return d.useEffect(()=>{n.current=e}),d.useMemo(()=>(...r)=>n.current?.(...r),[])}function O4(e,n=globalThis?.document){const r=yn(e);d.useEffect(()=>{const a=o=>{o.key==="Escape"&&r(o)};return n.addEventListener("keydown",a,{capture:!0}),()=>n.removeEventListener("keydown",a,{capture:!0})},[r,n])}var j4="DismissableLayer",Dl="dismissableLayer.update",D4="dismissableLayer.pointerDownOutside",k4="dismissableLayer.focusOutside",Xd,F1=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Eo=d.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=e,u=d.useContext(F1),[h,f]=d.useState(null),m=h?.ownerDocument??globalThis?.document,[,g]=d.useState({}),y=Me(n,R=>f(R)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(x),w=h?v.indexOf(h):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,C=w>=b,S=F4(R=>{const _=R.target,O=[...u.branches].some(P=>P.contains(_));!C||O||(o?.(R),s?.(R),R.defaultPrevented||l?.())},m),M=$4(R=>{const _=R.target;[...u.branches].some(P=>P.contains(_))||(i?.(R),s?.(R),R.defaultPrevented||l?.())},m);return O4(R=>{w===u.layers.size-1&&(a?.(R),!R.defaultPrevented&&l&&(R.preventDefault(),l()))},m),d.useEffect(()=>{if(h)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Xd=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),Jd(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Xd)}},[h,m,r,u]),d.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),Jd())},[h,u]),d.useEffect(()=>{const R=()=>g({});return document.addEventListener(Dl,R),()=>document.removeEventListener(Dl,R)},[]),p.jsx(we.div,{...c,ref:y,style:{pointerEvents:E?C?"auto":"none":void 0,...e.style},onFocusCapture:te(e.onFocusCapture,M.onFocusCapture),onBlurCapture:te(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:te(e.onPointerDownCapture,S.onPointerDownCapture)})});Eo.displayName=j4;var I4="DismissableLayerBranch",L4=d.forwardRef((e,n)=>{const r=d.useContext(F1),a=d.useRef(null),o=Me(n,a);return d.useEffect(()=>{const i=a.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),p.jsx(we.div,{...e,ref:o})});L4.displayName=I4;function F4(e,n=globalThis?.document){const r=yn(e),a=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const i=l=>{if(l.target&&!a.current){let c=function(){$1(D4,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=c,n.addEventListener("click",o.current,{once:!0})):c()}else n.removeEventListener("click",o.current);a.current=!1},s=window.setTimeout(()=>{n.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),n.removeEventListener("pointerdown",i),n.removeEventListener("click",o.current)}},[n,r]),{onPointerDownCapture:()=>a.current=!0}}function $4(e,n=globalThis?.document){const r=yn(e),a=d.useRef(!1);return d.useEffect(()=>{const o=i=>{i.target&&!a.current&&$1(k4,r,{originalEvent:i},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function Jd(){const e=new CustomEvent(Dl);document.dispatchEvent(e)}function $1(e,n,r,{discrete:a}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&o.addEventListener(e,n,{once:!0}),a?L1(o,i):o.dispatchEvent(i)}var Bs="focusScope.autoFocusOnMount",qs="focusScope.autoFocusOnUnmount",ef={bubbles:!1,cancelable:!0},H4="FocusScope",is=d.forwardRef((e,n)=>{const{loop:r=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,c]=d.useState(null),u=yn(o),h=yn(i),f=d.useRef(null),m=Me(n,v=>c(v)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(a){let v=function(E){if(g.paused||!l)return;const C=E.target;l.contains(C)?f.current=C:Bn(f.current,{select:!0})},x=function(E){if(g.paused||!l)return;const C=E.relatedTarget;C!==null&&(l.contains(C)||Bn(f.current,{select:!0}))},b=function(E){if(document.activeElement===document.body)for(const S of E)S.removedNodes.length>0&&Bn(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const w=new MutationObserver(b);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),w.disconnect()}}},[a,l,g.paused]),d.useEffect(()=>{if(l){nf.add(g);const v=document.activeElement;if(!l.contains(v)){const b=new CustomEvent(Bs,ef);l.addEventListener(Bs,u),l.dispatchEvent(b),b.defaultPrevented||(z4(q4(H1(l)),{select:!0}),document.activeElement===v&&Bn(l))}return()=>{l.removeEventListener(Bs,u),setTimeout(()=>{const b=new CustomEvent(qs,ef);l.addEventListener(qs,h),l.dispatchEvent(b),b.defaultPrevented||Bn(v??document.body,{select:!0}),l.removeEventListener(qs,h),nf.remove(g)},0)}}},[l,u,h,g]);const y=d.useCallback(v=>{if(!r&&!a||g.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(x&&b){const w=v.currentTarget,[E,C]=U4(w);E&&C?!v.shiftKey&&b===C?(v.preventDefault(),r&&Bn(E,{select:!0})):v.shiftKey&&b===E&&(v.preventDefault(),r&&Bn(C,{select:!0})):b===w&&v.preventDefault()}},[r,a,g.paused]);return p.jsx(we.div,{tabIndex:-1,...s,ref:m,onKeyDown:y})});is.displayName=H4;function z4(e,{select:n=!1}={}){const r=document.activeElement;for(const a of e)if(Bn(a,{select:n}),document.activeElement!==r)return}function U4(e){const n=H1(e),r=tf(n,e),a=tf(n.reverse(),e);return[r,a]}function H1(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function tf(e,n){for(const r of e)if(!V4(r,{upTo:n}))return r}function V4(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Z4(e){return e instanceof HTMLInputElement&&"select"in e}function Bn(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Z4(e)&&n&&e.select()}}var nf=B4();function B4(){let e=[];return{add(n){const r=e[0];n!==r&&r?.pause(),e=rf(e,n),e.unshift(n)},remove(n){e=rf(e,n),e[0]?.resume()}}}function rf(e,n){const r=[...e],a=r.indexOf(n);return a!==-1&&r.splice(a,1),r}function q4(e){return e.filter(n=>n.tagName!=="A")}var W4="Portal",Co=d.forwardRef((e,n)=>{const{container:r,...a}=e,[o,i]=d.useState(!1);ot(()=>i(!0),[]);const s=r||o&&globalThis?.document?.body;return s?Vy.createPortal(p.jsx(we.div,{...a,ref:n}),s):null});Co.displayName=W4;function G4(e,n){return d.useReducer((r,a)=>n[r][a]??r,e)}var bn=e=>{const{present:n,children:r}=e,a=K4(n),o=typeof r=="function"?r({present:a.isPresent}):d.Children.only(r),i=Me(a.ref,Y4(o));return typeof r=="function"||a.isPresent?d.cloneElement(o,{ref:i}):null};bn.displayName="Presence";function K4(e){const[n,r]=d.useState(),a=d.useRef(null),o=d.useRef(e),i=d.useRef("none"),s=e?"mounted":"unmounted",[l,c]=G4(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=ti(a.current);i.current=l==="mounted"?u:"none"},[l]),ot(()=>{const u=a.current,h=o.current;if(h!==e){const m=i.current,g=ti(u);e?c("MOUNT"):g==="none"||u?.display==="none"?c("UNMOUNT"):c(h&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ot(()=>{if(n){let u;const h=n.ownerDocument.defaultView??window,f=g=>{const v=ti(a.current).includes(CSS.escape(g.animationName));if(g.target===n&&v&&(c("ANIMATION_END"),!o.current)){const x=n.style.animationFillMode;n.style.animationFillMode="forwards",u=h.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=x)})}},m=g=>{g.target===n&&(i.current=ti(a.current))};return n.addEventListener("animationstart",m),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{h.clearTimeout(u),n.removeEventListener("animationstart",m),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(u=>{a.current=u?getComputedStyle(u):null,r(u)},[])}}function ti(e){return e?.animationName||"none"}function Y4(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ws=0;function Jc(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??af()),document.body.insertAdjacentElement("beforeend",e[1]??af()),Ws++,()=>{Ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Ws--}},[])}function af(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Q4=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Lr=new WeakMap,ni=new WeakMap,ri={},Gs=0,z1=function(e){return e&&(e.host||z1(e.parentNode))},X4=function(e,n){return n.map(function(r){if(e.contains(r))return r;var a=z1(r);return a&&e.contains(a)?a:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},J4=function(e,n,r,a){var o=X4(n,Array.isArray(e)?e:[e]);ri[r]||(ri[r]=new WeakMap);var i=ri[r],s=[],l=new Set,c=new Set(o),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};o.forEach(u);var h=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(l.has(m))h(m);else try{var g=m.getAttribute(a),y=g!==null&&g!=="false",v=(Lr.get(m)||0)+1,x=(i.get(m)||0)+1;Lr.set(m,v),i.set(m,x),s.push(m),v===1&&y&&ni.set(m,!0),x===1&&m.setAttribute(r,"true"),y||m.setAttribute(a,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return h(n),l.clear(),Gs++,function(){s.forEach(function(f){var m=Lr.get(f)-1,g=i.get(f)-1;Lr.set(f,m),i.set(f,g),m||(ni.has(f)||f.removeAttribute(a),ni.delete(f)),g||f.removeAttribute(r)}),Gs--,Gs||(Lr=new WeakMap,Lr=new WeakMap,ni=new WeakMap,ri={})}},eu=function(e,n,r){r===void 0&&(r="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),o=Q4(e);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live], script"))),J4(a,o,r,"aria-hidden")):function(){return null}},ss="Dialog",[U1]=zn(ss),[eb,rn]=U1(ss),V1=e=>{const{__scopeDialog:n,children:r,open:a,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=d.useRef(null),c=d.useRef(null),[u,h]=Ln({prop:a,defaultProp:o??!1,onChange:i,caller:ss});return p.jsx(eb,{scope:n,triggerRef:l,contentRef:c,contentId:pn(),titleId:pn(),descriptionId:pn(),open:u,onOpenChange:h,onOpenToggle:d.useCallback(()=>h(f=>!f),[h]),modal:s,children:r})};V1.displayName=ss;var Z1="DialogTrigger",tb=d.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=rn(Z1,r),i=Me(n,o.triggerRef);return p.jsx(we.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ru(o.open),...a,ref:i,onClick:te(e.onClick,o.onOpenToggle)})});tb.displayName=Z1;var tu="DialogPortal",[nb,B1]=U1(tu,{forceMount:void 0}),q1=e=>{const{__scopeDialog:n,forceMount:r,children:a,container:o}=e,i=rn(tu,n);return p.jsx(nb,{scope:n,forceMount:r,children:d.Children.map(a,s=>p.jsx(bn,{present:r||i.open,children:p.jsx(Co,{asChild:!0,container:o,children:s})}))})};q1.displayName=tu;var ji="DialogOverlay",W1=d.forwardRef((e,n)=>{const r=B1(ji,e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,i=rn(ji,e.__scopeDialog);return i.modal?p.jsx(bn,{present:a||i.open,children:p.jsx(ab,{...o,ref:n})}):null});W1.displayName=ji;var rb=Qr("DialogOverlay.RemoveScroll"),ab=d.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=rn(ji,r);return p.jsx(Rc,{as:rb,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(we.div,{"data-state":ru(o.open),...a,ref:n,style:{pointerEvents:"auto",...a.style}})})}),Er="DialogContent",G1=d.forwardRef((e,n)=>{const r=B1(Er,e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,i=rn(Er,e.__scopeDialog);return p.jsx(bn,{present:a||i.open,children:i.modal?p.jsx(ob,{...o,ref:n}):p.jsx(ib,{...o,ref:n})})});G1.displayName=Er;var ob=d.forwardRef((e,n)=>{const r=rn(Er,e.__scopeDialog),a=d.useRef(null),o=Me(n,r.contentRef,a);return d.useEffect(()=>{const i=a.current;if(i)return eu(i)},[]),p.jsx(K1,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,i=>{i.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&i.preventDefault()}),onFocusOutside:te(e.onFocusOutside,i=>i.preventDefault())})}),ib=d.forwardRef((e,n)=>{const r=rn(Er,e.__scopeDialog),a=d.useRef(!1),o=d.useRef(!1);return p.jsx(K1,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(a.current||r.triggerRef.current?.focus(),i.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(a.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;r.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),K1=d.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,l=rn(Er,r),c=d.useRef(null),u=Me(n,c);return Jc(),p.jsxs(p.Fragment,{children:[p.jsx(is,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(Eo,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ru(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(lb,{titleId:l.titleId}),p.jsx(ub,{contentRef:c,descriptionId:l.descriptionId})]})]})}),nu="DialogTitle",Y1=d.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=rn(nu,r);return p.jsx(we.h2,{id:o.titleId,...a,ref:n})});Y1.displayName=nu;var Q1="DialogDescription",sb=d.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=rn(Q1,r);return p.jsx(we.p,{id:o.descriptionId,...a,ref:n})});sb.displayName=Q1;var X1="DialogClose",J1=d.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=rn(X1,r);return p.jsx(we.button,{type:"button",...a,ref:n,onClick:te(e.onClick,()=>o.onOpenChange(!1))})});J1.displayName=X1;function ru(e){return e?"open":"closed"}var ep="DialogTitleWarning",[qj,tp]=x4(ep,{contentName:Er,titleName:nu,docsSlug:"dialog"}),lb=({titleId:e})=>{const n=tp(ep),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
5
-
6
- If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
7
-
8
- For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},cb="DialogDescriptionWarning",ub=({contentRef:e,descriptionId:n})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tp(cb).contentName}}.`;return d.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(a))},[a,e,n]),null},db=V1,fb=q1,np=W1,rp=G1,hb=Y1,pb=J1;const mb=db,gb=fb,yb=pb,ap=d.forwardRef(({className:e,...n},r)=>p.jsx(np,{ref:r,className:["fixed","inset-0","z-[1100]","bg-black/50","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0",e].filter(Boolean).join(" "),...n}));ap.displayName=np.displayName;const op=d.forwardRef(({className:e,children:n,...r},a)=>p.jsxs(gb,{children:[p.jsx(ap,{}),p.jsx(rp,{ref:a,className:["fixed","left-1/2","top-1/2","z-[1100]","-translate-x-1/2","-translate-y-1/2","w-full","max-w-[640px]","bg-surface","border-2","border-border","shadow-sketchy-lg","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95","data-[state=open]:zoom-in-95","mx-4","rounded-[24px_8px_25px_7px/8px_20px_8px_22px]",e].filter(Boolean).join(" "),...r,children:n})]}));op.displayName=rp.displayName;const ip=({title:e,onClose:n,className:r})=>p.jsxs("div",{className:["flex","items-center","justify-between","p-4","text-lg","font-bold",r].filter(Boolean).join(" "),children:[p.jsx(hb,{className:"text-lg font-bold",children:e}),n&&p.jsx(yb,{asChild:!0,children:p.jsx("button",{type:"button",className:"w-11 h-11 flex items-center justify-center cursor-pointer hover:bg-hover rounded-[10px_3px_11px_3px/3px_8px_3px_10px] transition-colors",onClick:n,children:p.jsx(Xc,{className:"w-5 h-5"})})})]});ip.displayName="DialogHeader";const sp=d.forwardRef(({className:e,...n},r)=>p.jsx("div",{ref:r,className:["p-4",e].filter(Boolean).join(" "),...n}));sp.displayName="DialogBody";const lp=d.forwardRef(({className:e,...n},r)=>p.jsx("div",{ref:r,className:["flex","items-center","justify-end","p-4",e].filter(Boolean).join(" "),...n}));lp.displayName="DialogFooter";const Ue=({isOpen:e,onClose:n,children:r})=>p.jsx(mb,{open:e,onOpenChange:a=>!a&&n(),children:p.jsx(op,{children:r})});Ue.Header=ip;Ue.Body=sp;Ue.Footer=lp;const cp=d.createContext(null);function vb({children:e}){const[n,r]=d.useState(!1),[a,o]=d.useState(""),i=d.useRef(null),s=d.useCallback(u=>(o(u),r(!0),new Promise(h=>{i.current=h})),[]),l=()=>{i.current?.(!0),i.current=null,r(!1)},c=()=>{i.current?.(!1),i.current=null,r(!1)};return p.jsxs(cp.Provider,{value:{confirm:s},children:[e,p.jsxs(Ue,{isOpen:n,onClose:c,children:[p.jsx(Ue.Header,{title:"Confirm",onClose:c}),p.jsx(Ue.Body,{children:p.jsx("p",{className:"text-sm font-bold",children:a})}),p.jsx(Ue.Footer,{children:p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(Ze,{variant:"ghost",size:"sm",onClick:c,children:"Cancel"}),p.jsx(Ze,{variant:"primary",size:"sm",onClick:l,children:"OK"})]})})]})]})}function ls(){const e=d.useContext(cp);if(!e)throw new Error("useConfirm must be used within a ConfirmProvider");return e.confirm}const up=d.createContext(null);let xb=0;function bb({children:e}){const[n,r]=d.useState([]),a=d.useRef(new Map),o=d.useCallback(i=>{const s=xb++;r(c=>[...c,{id:s,message:i}]);const l=setTimeout(()=>{r(c=>c.filter(u=>u.id!==s)),a.current.delete(s)},3e3);a.current.set(s,l)},[]);return d.useEffect(()=>{const i=a.current;return()=>{i.forEach(s=>clearTimeout(s))}},[]),p.jsxs(up.Provider,{value:{toast:o},children:[e,n.length>0&&p.jsx("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-[1200] flex flex-col gap-2 items-center",children:n.map(i=>p.jsx("div",{className:"px-5 py-3 bg-surface border-2 border-border rounded-[12px_4px_13px_3px/4px_10px_4px_12px] shadow-sketchy text-sm font-bold text-fg-default animate-slide-in-from-bottom whitespace-nowrap",children:i.message},i.id))})]})}function So(){const e=d.useContext(up);if(!e)throw new Error("useToast must be used within a ToastProvider");return e.toast}const wb=new l6({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}}),_b=({children:e})=>p.jsx(c6,{client:wb,children:p.jsx(vb,{children:p.jsx(bb,{children:e})})}),of=e=>{let n;const r=new Set,a=(u,h)=>{const f=typeof u=="function"?u(n):u;if(!Object.is(f,n)){const m=n;n=h??(typeof f!="object"||f===null)?f:Object.assign({},n,f),r.forEach(g=>g(n,m))}},o=()=>n,l={setState:a,getState:o,getInitialState:()=>c,subscribe:u=>(r.add(u),()=>r.delete(u))},c=n=e(a,o,l);return l},Eb=(e=>e?of(e):of),Cb=e=>e;function Sb(e,n=Cb){const r=he.useSyncExternalStore(e.subscribe,he.useCallback(()=>n(e.getState()),[e,n]),he.useCallback(()=>n(e.getInitialState()),[e,n]));return he.useDebugValue(r),r}const sf=e=>{const n=Eb(e),r=a=>Sb(n,a);return Object.assign(r,n),r},Ab=(e=>e?sf(e):sf),Pr=Ab(e=>({theme:"light",setTheme:n=>{e({theme:n})},toggleTheme:()=>{e(n=>({theme:n.theme==="light"?"dark":"light"}))}}));Pr.subscribe(e=>{localStorage.setItem("theme",e.theme),document.documentElement.classList.add(e.theme),document.documentElement.classList.remove(e.theme==="dark"?"light":"dark")});const Rb="_SiteLayout_180qv_1",Mb="_side_180qv_7",Tb="_open_180qv_24",Pb="_menu_180qv_29",Nb="_top_180qv_52",Ob="_center_180qv_65",jb="_content_180qv_73",Db={SiteLayout:Rb,side:Mb,open:Tb,menu:Pb,top:Nb,"top-content":"_top-content_180qv_59",center:Ob,content:jb};var Ks={exports:{}};var lf;function kb(){return lf||(lf=1,(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var i="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(i=o(i,a.call(this,l)))}return i}function a(i){if(typeof i=="string"||typeof i=="number")return this&&this[i]||i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(this,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var l in i)n.call(i,l)&&i[l]&&(s=o(s,this&&this[l]||l));return s}function o(i,s){return s?i?i+" "+s:i+s:i}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ks)),Ks.exports}var Ib=kb();const au=ra(Ib);function ou({name:e}){return p.jsx("div",{className:"bg-pastel-teal-200 dark:bg-muted text-fg-default text-xs font-bold border border-border-secondary px-2 py-1 rounded-[8px_3px_9px_2px/3px_6px_3px_7px]",children:e})}const Lb={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},cf={sm:10,md:12,lg:14},iu=d.forwardRef(({className:e,size:n="md",checked:r,disabled:a,...o},i)=>p.jsxs("label",{className:["relative inline-flex items-center justify-center cursor-pointer",a&&"cursor-not-allowed opacity-50",e].filter(Boolean).join(" "),children:[p.jsx("input",{ref:i,type:"checkbox",checked:r,disabled:a,className:"sr-only peer",...o}),p.jsx("span",{className:[Lb[n],"flex items-center justify-center","border-2 border-border","rounded-[4px_2px_5px_2px/2px_4px_2px_4px]","bg-surface","transition-all duration-200","peer-checked:bg-accent-primary","peer-focus:shadow-sketchy"].join(" "),children:r&&p.jsx(o4,{width:cf[n],height:cf[n],className:"text-fg-on-accent",weight:"bold"})})]}));iu.displayName="Checkbox";function su(e){const n=e+"CollectionProvider",[r,a]=zn(n),[o,i]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:x,children:b}=v,w=he.useRef(null),E=he.useRef(new Map).current;return p.jsx(o,{scope:x,itemMap:E,collectionRef:w,children:b})};s.displayName=n;const l=e+"CollectionSlot",c=Qr(l),u=he.forwardRef((v,x)=>{const{scope:b,children:w}=v,E=i(l,b),C=Me(x,E.collectionRef);return p.jsx(c,{ref:C,children:w})});u.displayName=l;const h=e+"CollectionItemSlot",f="data-radix-collection-item",m=Qr(h),g=he.forwardRef((v,x)=>{const{scope:b,children:w,...E}=v,C=he.useRef(null),S=Me(x,C),M=i(h,b);return he.useEffect(()=>(M.itemMap.set(C,{ref:C,...E}),()=>{M.itemMap.delete(C)})),p.jsx(m,{[f]:"",ref:S,children:w})});g.displayName=h;function y(v){const x=i(e+"CollectionConsumer",v);return he.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const E=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((M,R)=>E.indexOf(M.ref.current)-E.indexOf(R.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},y,a]}var Fb=d.createContext(void 0);function cs(e){const n=d.useContext(Fb);return e||n||"ltr"}var $b="Arrow",dp=d.forwardRef((e,n)=>{const{children:r,width:a=10,height:o=5,...i}=e;return p.jsx(we.svg,{...i,ref:n,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});dp.displayName=$b;var Hb=dp;function zb(e){const[n,r]=d.useState(void 0);return ot(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;r({width:s,height:l})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else r(void 0)},[e]),n}var lu="Popper",[fp,ia]=zn(lu),[Ub,hp]=fp(lu),pp=e=>{const{__scopePopper:n,children:r}=e,[a,o]=d.useState(null);return p.jsx(Ub,{scope:n,anchor:a,onAnchorChange:o,children:r})};pp.displayName=lu;var mp="PopperAnchor",gp=d.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:a,...o}=e,i=hp(mp,r),s=d.useRef(null),l=Me(n,s),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=a?.current||s.current,u!==c.current&&i.onAnchorChange(c.current)}),a?null:p.jsx(we.div,{...o,ref:l})});gp.displayName=mp;var cu="PopperContent",[Vb,Zb]=fp(cu),yp=d.forwardRef((e,n)=>{const{__scopePopper:r,side:a="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:h=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:y,...v}=e,x=hp(cu,r),[b,w]=d.useState(null),E=Me(n,G=>w(G)),[C,S]=d.useState(null),M=zb(C),R=M?.width??0,_=M?.height??0,O=a+(i!=="center"?"-"+i:""),P=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},j=Array.isArray(u)?u:[u],$=j.length>0,V={padding:P,boundary:j.filter(qb),altBoundary:$},{refs:A,floatingStyles:D,placement:T,isPositioned:F,middlewareData:H}=Zy({strategy:"fixed",placement:O,whileElementsMounted:(...G)=>Qy(...G,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[By({mainAxis:o+_,alignmentAxis:s}),c&&qy({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Xy():void 0,...V}),c&&Wy({...V}),Gy({...V,apply:({elements:G,rects:ie,availableWidth:pe,availableHeight:J})=>{const{width:ge,height:ve}=ie.reference,ye=G.floating.style;ye.setProperty("--radix-popper-available-width",`${pe}px`),ye.setProperty("--radix-popper-available-height",`${J}px`),ye.setProperty("--radix-popper-anchor-width",`${ge}px`),ye.setProperty("--radix-popper-anchor-height",`${ve}px`)}}),C&&Ky({element:C,padding:l}),Wb({arrowWidth:R,arrowHeight:_}),m&&Yy({strategy:"referenceHidden",...V})]}),[I,Z]=bp(T),B=yn(y);ot(()=>{F&&B?.()},[F,B]);const q=H.arrow?.x,X=H.arrow?.y,Q=H.arrow?.centerOffset!==0,[oe,le]=d.useState();return ot(()=>{b&&le(window.getComputedStyle(b).zIndex)},[b]),p.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:F?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Vb,{scope:r,placedSide:I,onArrowChange:S,arrowX:q,arrowY:X,shouldHideArrow:Q,children:p.jsx(we.div,{"data-side":I,"data-align":Z,...v,ref:E,style:{...v.style,animation:F?void 0:"none"}})})})});yp.displayName=cu;var vp="PopperArrow",Bb={top:"bottom",right:"left",bottom:"top",left:"right"},xp=d.forwardRef(function(n,r){const{__scopePopper:a,...o}=n,i=Zb(vp,a),s=Bb[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(Hb,{...o,ref:r,style:{...o.style,display:"block"}})})});xp.displayName=vp;function qb(e){return e!==null}var Wb=e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:a,middlewareData:o}=n,s=o.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,h]=bp(r),f={start:"0%",center:"50%",end:"100%"}[h],m=(o.arrow?.x??0)+l/2,g=(o.arrow?.y??0)+c/2;let y="",v="";return u==="bottom"?(y=s?f:`${m}px`,v=`${-c}px`):u==="top"?(y=s?f:`${m}px`,v=`${a.floating.height+c}px`):u==="right"?(y=`${-c}px`,v=s?f:`${g}px`):u==="left"&&(y=`${a.floating.width+c}px`,v=s?f:`${g}px`),{data:{x:y,y:v}}}});function bp(e){const[n,r="center"]=e.split("-");return[n,r]}var uu=pp,du=gp,fu=yp,hu=xp,Ys="rovingFocusGroup.onEntryFocus",Gb={bubbles:!1,cancelable:!0},Ao="RovingFocusGroup",[kl,wp,Kb]=su(Ao),[Yb,us]=zn(Ao,[Kb]),[Qb,Xb]=Yb(Ao),_p=d.forwardRef((e,n)=>p.jsx(kl.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(kl.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Jb,{...e,ref:n})})}));_p.displayName=Ao;var Jb=d.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:a,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:h=!1,...f}=e,m=d.useRef(null),g=Me(n,m),y=cs(i),[v,x]=Ln({prop:s,defaultProp:l??null,onChange:c,caller:Ao}),[b,w]=d.useState(!1),E=yn(u),C=wp(r),S=d.useRef(!1),[M,R]=d.useState(0);return d.useEffect(()=>{const _=m.current;if(_)return _.addEventListener(Ys,E),()=>_.removeEventListener(Ys,E)},[E]),p.jsx(Qb,{scope:r,orientation:a,dir:y,loop:o,currentTabStopId:v,onItemFocus:d.useCallback(_=>x(_),[x]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>R(_=>_+1),[]),onFocusableItemRemove:d.useCallback(()=>R(_=>_-1),[]),children:p.jsx(we.div,{tabIndex:b||M===0?-1:0,"data-orientation":a,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:te(e.onMouseDown,()=>{S.current=!0}),onFocus:te(e.onFocus,_=>{const O=!S.current;if(_.target===_.currentTarget&&O&&!b){const P=new CustomEvent(Ys,Gb);if(_.currentTarget.dispatchEvent(P),!P.defaultPrevented){const j=C().filter(T=>T.focusable),$=j.find(T=>T.active),V=j.find(T=>T.id===v),D=[$,V,...j].filter(Boolean).map(T=>T.ref.current);Sp(D,h)}}S.current=!1}),onBlur:te(e.onBlur,()=>w(!1))})})}),Ep="RovingFocusGroupItem",Cp=d.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:a=!0,active:o=!1,tabStopId:i,children:s,...l}=e,c=pn(),u=i||c,h=Xb(Ep,r),f=h.currentTabStopId===u,m=wp(r),{onFocusableItemAdd:g,onFocusableItemRemove:y,currentTabStopId:v}=h;return d.useEffect(()=>{if(a)return g(),()=>y()},[a,g,y]),p.jsx(kl.ItemSlot,{scope:r,id:u,focusable:a,active:o,children:p.jsx(we.span,{tabIndex:f?0:-1,"data-orientation":h.orientation,...l,ref:n,onMouseDown:te(e.onMouseDown,x=>{a?h.onItemFocus(u):x.preventDefault()}),onFocus:te(e.onFocus,()=>h.onItemFocus(u)),onKeyDown:te(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){h.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const b=nw(x,h.orientation,h.dir);if(b!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let E=m().filter(C=>C.focusable).map(C=>C.ref.current);if(b==="last")E.reverse();else if(b==="prev"||b==="next"){b==="prev"&&E.reverse();const C=E.indexOf(x.currentTarget);E=h.loop?rw(E,C+1):E.slice(C+1)}setTimeout(()=>Sp(E))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:v!=null}):s})})});Cp.displayName=Ep;var ew={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tw(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function nw(e,n,r){const a=tw(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return ew[a]}function Sp(e,n=!1){const r=document.activeElement;for(const a of e)if(a===r||(a.focus({preventScroll:n}),document.activeElement!==r))return}function rw(e,n){return e.map((r,a)=>e[(n+a)%e.length])}var Ap=_p,Rp=Cp,Il=["Enter"," "],aw=["ArrowDown","PageUp","Home"],Mp=["ArrowUp","PageDown","End"],ow=[...aw,...Mp],iw={ltr:[...Il,"ArrowRight"],rtl:[...Il,"ArrowLeft"]},sw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ro="Menu",[to,lw,cw]=su(Ro),[Nr,Tp]=zn(Ro,[cw,ia,us]),ds=ia(),Pp=us(),[uw,Or]=Nr(Ro),[dw,Mo]=Nr(Ro),Np=e=>{const{__scopeMenu:n,open:r=!1,children:a,dir:o,onOpenChange:i,modal:s=!0}=e,l=ds(n),[c,u]=d.useState(null),h=d.useRef(!1),f=yn(i),m=cs(o);return d.useEffect(()=>{const g=()=>{h.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>h.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),p.jsx(uu,{...l,children:p.jsx(uw,{scope:n,open:r,onOpenChange:f,content:c,onContentChange:u,children:p.jsx(dw,{scope:n,onClose:d.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:h,dir:m,modal:s,children:a})})})};Np.displayName=Ro;var fw="MenuAnchor",pu=d.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e,o=ds(r);return p.jsx(du,{...o,...a,ref:n})});pu.displayName=fw;var mu="MenuPortal",[hw,Op]=Nr(mu,{forceMount:void 0}),jp=e=>{const{__scopeMenu:n,forceMount:r,children:a,container:o}=e,i=Or(mu,n);return p.jsx(hw,{scope:n,forceMount:r,children:p.jsx(bn,{present:r||i.open,children:p.jsx(Co,{asChild:!0,container:o,children:a})})})};jp.displayName=mu;var zt="MenuContent",[pw,gu]=Nr(zt),Dp=d.forwardRef((e,n)=>{const r=Op(zt,e.__scopeMenu),{forceMount:a=r.forceMount,...o}=e,i=Or(zt,e.__scopeMenu),s=Mo(zt,e.__scopeMenu);return p.jsx(to.Provider,{scope:e.__scopeMenu,children:p.jsx(bn,{present:a||i.open,children:p.jsx(to.Slot,{scope:e.__scopeMenu,children:s.modal?p.jsx(mw,{...o,ref:n}):p.jsx(gw,{...o,ref:n})})})})}),mw=d.forwardRef((e,n)=>{const r=Or(zt,e.__scopeMenu),a=d.useRef(null),o=Me(n,a);return d.useEffect(()=>{const i=a.current;if(i)return eu(i)},[]),p.jsx(yu,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:te(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),gw=d.forwardRef((e,n)=>{const r=Or(zt,e.__scopeMenu);return p.jsx(yu,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),yw=Qr("MenuContent.ScrollLock"),yu=d.forwardRef((e,n)=>{const{__scopeMenu:r,loop:a=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:m,onDismiss:g,disableOutsideScroll:y,...v}=e,x=Or(zt,r),b=Mo(zt,r),w=ds(r),E=Pp(r),C=lw(r),[S,M]=d.useState(null),R=d.useRef(null),_=Me(n,R,x.onContentChange),O=d.useRef(0),P=d.useRef(""),j=d.useRef(0),$=d.useRef(null),V=d.useRef("right"),A=d.useRef(0),D=y?Rc:d.Fragment,T=y?{as:yw,allowPinchZoom:!0}:void 0,F=I=>{const Z=P.current+I,B=C().filter(G=>!G.disabled),q=document.activeElement,X=B.find(G=>G.ref.current===q)?.textValue,Q=B.map(G=>G.textValue),oe=Tw(Q,Z,X),le=B.find(G=>G.textValue===oe)?.ref.current;(function G(ie){P.current=ie,window.clearTimeout(O.current),ie!==""&&(O.current=window.setTimeout(()=>G(""),1e3))})(Z),le&&setTimeout(()=>le.focus())};d.useEffect(()=>()=>window.clearTimeout(O.current),[]),Jc();const H=d.useCallback(I=>V.current===$.current?.side&&Nw(I,$.current?.area),[]);return p.jsx(pw,{scope:r,searchRef:P,onItemEnter:d.useCallback(I=>{H(I)&&I.preventDefault()},[H]),onItemLeave:d.useCallback(I=>{H(I)||(R.current?.focus(),M(null))},[H]),onTriggerLeave:d.useCallback(I=>{H(I)&&I.preventDefault()},[H]),pointerGraceTimerRef:j,onPointerGraceIntentChange:d.useCallback(I=>{$.current=I},[]),children:p.jsx(D,{...T,children:p.jsx(is,{asChild:!0,trapped:o,onMountAutoFocus:te(i,I=>{I.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:p.jsx(Eo,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:m,onDismiss:g,children:p.jsx(Ap,{asChild:!0,...E,dir:b.dir,orientation:"vertical",loop:a,currentTabStopId:S,onCurrentTabStopIdChange:M,onEntryFocus:te(c,I=>{b.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(fu,{role:"menu","aria-orientation":"vertical","data-state":Yp(x.open),"data-radix-menu-content":"",dir:b.dir,...w,...v,ref:_,style:{outline:"none",...v.style},onKeyDown:te(v.onKeyDown,I=>{const B=I.target.closest("[data-radix-menu-content]")===I.currentTarget,q=I.ctrlKey||I.altKey||I.metaKey,X=I.key.length===1;B&&(I.key==="Tab"&&I.preventDefault(),!q&&X&&F(I.key));const Q=R.current;if(I.target!==Q||!ow.includes(I.key))return;I.preventDefault();const le=C().filter(G=>!G.disabled).map(G=>G.ref.current);Mp.includes(I.key)&&le.reverse(),Rw(le)}),onBlur:te(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(O.current),P.current="")}),onPointerMove:te(e.onPointerMove,no(I=>{const Z=I.target,B=A.current!==I.clientX;if(I.currentTarget.contains(Z)&&B){const q=I.clientX>A.current?"right":"left";V.current=q,A.current=I.clientX}}))})})})})})})});Dp.displayName=zt;var vw="MenuGroup",vu=d.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e;return p.jsx(we.div,{role:"group",...a,ref:n})});vu.displayName=vw;var xw="MenuLabel",kp=d.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e;return p.jsx(we.div,{...a,ref:n})});kp.displayName=xw;var Di="MenuItem",uf="menu.itemSelect",fs=d.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:a,...o}=e,i=d.useRef(null),s=Mo(Di,e.__scopeMenu),l=gu(Di,e.__scopeMenu),c=Me(n,i),u=d.useRef(!1),h=()=>{const f=i.current;if(!r&&f){const m=new CustomEvent(uf,{bubbles:!0,cancelable:!0});f.addEventListener(uf,g=>a?.(g),{once:!0}),L1(f,m),m.defaultPrevented?u.current=!1:s.onClose()}};return p.jsx(Ip,{...o,ref:c,disabled:r,onClick:te(e.onClick,h),onPointerDown:f=>{e.onPointerDown?.(f),u.current=!0},onPointerUp:te(e.onPointerUp,f=>{u.current||f.currentTarget?.click()}),onKeyDown:te(e.onKeyDown,f=>{const m=l.searchRef.current!=="";r||m&&f.key===" "||Il.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});fs.displayName=Di;var Ip=d.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:a=!1,textValue:o,...i}=e,s=gu(Di,r),l=Pp(r),c=d.useRef(null),u=Me(n,c),[h,f]=d.useState(!1),[m,g]=d.useState("");return d.useEffect(()=>{const y=c.current;y&&g((y.textContent??"").trim())},[i.children]),p.jsx(to.ItemSlot,{scope:r,disabled:a,textValue:o??m,children:p.jsx(Rp,{asChild:!0,...l,focusable:!a,children:p.jsx(we.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...i,ref:u,onPointerMove:te(e.onPointerMove,no(y=>{a?s.onItemLeave(y):(s.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:te(e.onPointerLeave,no(y=>s.onItemLeave(y))),onFocus:te(e.onFocus,()=>f(!0)),onBlur:te(e.onBlur,()=>f(!1))})})})}),bw="MenuCheckboxItem",Lp=d.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:a,...o}=e;return p.jsx(Up,{scope:e.__scopeMenu,checked:r,children:p.jsx(fs,{role:"menuitemcheckbox","aria-checked":ki(r)?"mixed":r,...o,ref:n,"data-state":bu(r),onSelect:te(o.onSelect,()=>a?.(ki(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Lp.displayName=bw;var Fp="MenuRadioGroup",[ww,_w]=Nr(Fp,{value:void 0,onValueChange:()=>{}}),$p=d.forwardRef((e,n)=>{const{value:r,onValueChange:a,...o}=e,i=yn(a);return p.jsx(ww,{scope:e.__scopeMenu,value:r,onValueChange:i,children:p.jsx(vu,{...o,ref:n})})});$p.displayName=Fp;var Hp="MenuRadioItem",zp=d.forwardRef((e,n)=>{const{value:r,...a}=e,o=_w(Hp,e.__scopeMenu),i=r===o.value;return p.jsx(Up,{scope:e.__scopeMenu,checked:i,children:p.jsx(fs,{role:"menuitemradio","aria-checked":i,...a,ref:n,"data-state":bu(i),onSelect:te(a.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});zp.displayName=Hp;var xu="MenuItemIndicator",[Up,Ew]=Nr(xu,{checked:!1}),Vp=d.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:a,...o}=e,i=Ew(xu,r);return p.jsx(bn,{present:a||ki(i.checked)||i.checked===!0,children:p.jsx(we.span,{...o,ref:n,"data-state":bu(i.checked)})})});Vp.displayName=xu;var Cw="MenuSeparator",Zp=d.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e;return p.jsx(we.div,{role:"separator","aria-orientation":"horizontal",...a,ref:n})});Zp.displayName=Cw;var Sw="MenuArrow",Bp=d.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e,o=ds(r);return p.jsx(hu,{...o,...a,ref:n})});Bp.displayName=Sw;var Aw="MenuSub",[Wj,qp]=Nr(Aw),Da="MenuSubTrigger",Wp=d.forwardRef((e,n)=>{const r=Or(Da,e.__scopeMenu),a=Mo(Da,e.__scopeMenu),o=qp(Da,e.__scopeMenu),i=gu(Da,e.__scopeMenu),s=d.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},h=d.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return d.useEffect(()=>h,[h]),d.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),p.jsx(pu,{asChild:!0,...u,children:p.jsx(Ip,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Yp(r.open),...e,ref:_o(n,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:te(e.onPointerMove,no(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),h()},100))})),onPointerLeave:te(e.onPointerLeave,no(f=>{h();const m=r.content?.getBoundingClientRect();if(m){const g=r.content?.dataset.side,y=g==="right",v=y?-5:5,x=m[y?"left":"right"],b=m[y?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x,y:m.top},{x:b,y:m.top},{x:b,y:m.bottom},{x,y:m.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:te(e.onKeyDown,f=>{const m=i.searchRef.current!=="";e.disabled||m&&f.key===" "||iw[a.dir].includes(f.key)&&(r.onOpenChange(!0),r.content?.focus(),f.preventDefault())})})})});Wp.displayName=Da;var Gp="MenuSubContent",Kp=d.forwardRef((e,n)=>{const r=Op(zt,e.__scopeMenu),{forceMount:a=r.forceMount,...o}=e,i=Or(zt,e.__scopeMenu),s=Mo(zt,e.__scopeMenu),l=qp(Gp,e.__scopeMenu),c=d.useRef(null),u=Me(n,c);return p.jsx(to.Provider,{scope:e.__scopeMenu,children:p.jsx(bn,{present:a||i.open,children:p.jsx(to.Slot,{scope:e.__scopeMenu,children:p.jsx(yu,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{s.isUsingKeyboardRef.current&&c.current?.focus(),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:te(e.onFocusOutside,h=>{h.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:te(e.onEscapeKeyDown,h=>{s.onClose(),h.preventDefault()}),onKeyDown:te(e.onKeyDown,h=>{const f=h.currentTarget.contains(h.target),m=sw[s.dir].includes(h.key);f&&m&&(i.onOpenChange(!1),l.trigger?.focus(),h.preventDefault())})})})})})});Kp.displayName=Gp;function Yp(e){return e?"open":"closed"}function ki(e){return e==="indeterminate"}function bu(e){return ki(e)?"indeterminate":e?"checked":"unchecked"}function Rw(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function Mw(e,n){return e.map((r,a)=>e[(n+a)%e.length])}function Tw(e,n,r){const o=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,i=r?e.indexOf(r):-1;let s=Mw(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==r));const c=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function Pw(e,n){const{x:r,y:a}=e;let o=!1;for(let i=0,s=n.length-1;i<n.length;s=i++){const l=n[i],c=n[s],u=l.x,h=l.y,f=c.x,m=c.y;h>a!=m>a&&r<(f-u)*(a-h)/(m-h)+u&&(o=!o)}return o}function Nw(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return Pw(r,n)}function no(e){return n=>n.pointerType==="mouse"?e(n):void 0}var Ow=Np,jw=pu,Dw=jp,kw=Dp,Iw=vu,Lw=kp,Fw=fs,$w=Lp,Hw=$p,zw=zp,Uw=Vp,Vw=Zp,Zw=Bp,Bw=Wp,qw=Kp,hs="DropdownMenu",[Ww]=zn(hs,[Tp]),ht=Tp(),[Gw,Qp]=Ww(hs),Xp=e=>{const{__scopeDropdownMenu:n,children:r,dir:a,open:o,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,c=ht(n),u=d.useRef(null),[h,f]=Ln({prop:o,defaultProp:i??!1,onChange:s,caller:hs});return p.jsx(Gw,{scope:n,triggerId:pn(),triggerRef:u,contentId:pn(),open:h,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(m=>!m),[f]),modal:l,children:p.jsx(Ow,{...c,open:h,onOpenChange:f,dir:a,modal:l,children:r})})};Xp.displayName=hs;var Jp="DropdownMenuTrigger",em=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:a=!1,...o}=e,i=Qp(Jp,r),s=ht(r);return p.jsx(jw,{asChild:!0,...s,children:p.jsx(we.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...o,ref:_o(n,i.triggerRef),onPointerDown:te(e.onPointerDown,l=>{!a&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:te(e.onKeyDown,l=>{a||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});em.displayName=Jp;var Kw="DropdownMenuPortal",tm=e=>{const{__scopeDropdownMenu:n,...r}=e,a=ht(n);return p.jsx(Dw,{...a,...r})};tm.displayName=Kw;var nm="DropdownMenuContent",rm=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=Qp(nm,r),i=ht(r),s=d.useRef(!1);return p.jsx(kw,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...a,ref:n,onCloseAutoFocus:te(e.onCloseAutoFocus,l=>{s.current||o.triggerRef.current?.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:te(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,h=c.button===2||u;(!o.modal||h)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});rm.displayName=nm;var Yw="DropdownMenuGroup",Qw=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=ht(r);return p.jsx(Iw,{...o,...a,ref:n})});Qw.displayName=Yw;var Xw="DropdownMenuLabel",am=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=ht(r);return p.jsx(Lw,{...o,...a,ref:n})});am.displayName=Xw;var Jw="DropdownMenuItem",om=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=ht(r);return p.jsx(Fw,{...o,...a,ref:n})});om.displayName=Jw;var e_="DropdownMenuCheckboxItem",im=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=ht(r);return p.jsx($w,{...o,...a,ref:n})});im.displayName=e_;var t_="DropdownMenuRadioGroup",n_=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=ht(r);return p.jsx(Hw,{...o,...a,ref:n})});n_.displayName=t_;var r_="DropdownMenuRadioItem",sm=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=ht(r);return p.jsx(zw,{...o,...a,ref:n})});sm.displayName=r_;var a_="DropdownMenuItemIndicator",lm=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=ht(r);return p.jsx(Uw,{...o,...a,ref:n})});lm.displayName=a_;var o_="DropdownMenuSeparator",cm=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=ht(r);return p.jsx(Vw,{...o,...a,ref:n})});cm.displayName=o_;var i_="DropdownMenuArrow",s_=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=ht(r);return p.jsx(Zw,{...o,...a,ref:n})});s_.displayName=i_;var l_="DropdownMenuSubTrigger",um=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=ht(r);return p.jsx(Bw,{...o,...a,ref:n})});um.displayName=l_;var c_="DropdownMenuSubContent",dm=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=ht(r);return p.jsx(qw,{...o,...a,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});dm.displayName=c_;var u_=Xp,d_=em,f_=tm,fm=rm,hm=am,pm=om,mm=im,gm=sm,ym=lm,vm=cm,xm=um,bm=dm;const h_=u_,p_=d_,m_=d.forwardRef(({className:e,inset:n,children:r,...a},o)=>p.jsx(xm,{ref:o,className:["flex","cursor-default","select-none","items-center","rounded-sm","px-2","py-1.5","text-sm","outline-none","focus:bg-hover","data-[state=open]:bg-hover",n&&"pl-8",e].filter(Boolean).join(" "),...a,children:r}));m_.displayName=xm.displayName;const g_=d.forwardRef(({className:e,...n},r)=>p.jsx(bm,{ref:r,className:["z-50","min-w-[8rem]","overflow-hidden","rounded-md","bg-surface","p-1","shadow-lg",e].filter(Boolean).join(" "),...n}));g_.displayName=bm.displayName;const wm=d.forwardRef(({className:e,sideOffset:n=4,...r},a)=>p.jsx(f_,{children:p.jsx(fm,{ref:a,sideOffset:n,className:["z-[1100]","min-w-[10rem]","overflow-hidden","rounded-[10px_3px_11px_3px/3px_8px_3px_10px]","bg-surface","border-2","border-border","shadow-sketchy","p-1","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95","data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2",e].filter(Boolean).join(" "),...r})}));wm.displayName=fm.displayName;const _m=d.forwardRef(({className:e,inset:n,...r},a)=>p.jsx(pm,{ref:a,className:["relative","flex","cursor-pointer","select-none","items-center","px-3","py-2","text-sm","font-bold","text-fg-muted","outline-none","transition-colors","rounded-[6px_2px_7px_2px/2px_5px_2px_6px]","focus:bg-hover","focus:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",n&&"pl-8",e].filter(Boolean).join(" "),...r}));_m.displayName=pm.displayName;const y_=d.forwardRef(({className:e,children:n,checked:r,...a},o)=>p.jsxs(mm,{ref:o,className:["relative","flex","cursor-pointer","select-none","items-center","rounded-sm","py-1.5","pl-8","pr-2","text-sm","outline-none","transition-colors","focus:bg-hover","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e].filter(Boolean).join(" "),checked:r,...a,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(ym,{children:"✓"})}),n]}));y_.displayName=mm.displayName;const v_=d.forwardRef(({className:e,children:n,...r},a)=>p.jsxs(gm,{ref:a,className:["relative","flex","cursor-pointer","select-none","items-center","rounded-sm","py-1.5","pl-8","pr-2","text-sm","outline-none","transition-colors","focus:bg-hover","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e].filter(Boolean).join(" "),...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(ym,{children:"●"})}),n]}));v_.displayName=gm.displayName;const x_=d.forwardRef(({className:e,inset:n,...r},a)=>p.jsx(hm,{ref:a,className:["px-2","py-1.5","text-sm","font-semibold",n&&"pl-8",e].filter(Boolean).join(" "),...r}));x_.displayName=hm.displayName;const b_=d.forwardRef(({className:e,...n},r)=>p.jsx(vm,{ref:r,className:["-mx-1","my-1","h-px","bg-divider",e].filter(Boolean).join(" "),...n}));b_.displayName=vm.displayName;const wu=({button:e,items:n})=>p.jsxs(h_,{children:[p.jsx(p_,{asChild:!0,children:p.jsx("button",{type:"button",className:"flex items-center justify-center",children:e})}),p.jsx(wm,{align:"end",children:n.map(r=>p.jsx(_m,{onClick:r.onClick,children:r.name},r.name))})]}),w_=tr(["w-full","border-2","border-border","bg-surface","text-fg","placeholder:text-fg-placeholder","transition-all","focus:outline-none","focus:shadow-sketchy","disabled:cursor-not-allowed","disabled:opacity-50"],{variants:{variant:{default:[],ghost:["border-transparent","bg-subtle","focus:border-border-focus"],error:["border-border-error","bg-pastel-pink-200/20","focus:border-red-500"]},size:{sm:"h-8 px-2 text-sm rounded-[8px_3px_9px_2px/3px_7px_3px_8px]",md:"h-10 px-3 text-sm rounded-[10px_3px_11px_3px/3px_9px_3px_10px]",lg:"h-12 px-4 text-base rounded-[12px_4px_13px_3px/4px_10px_4px_12px]"}},defaultVariants:{variant:"default",size:"md"}}),Ua=d.forwardRef(({className:e,variant:n,size:r,type:a="text",...o},i)=>p.jsx("input",{ref:i,type:a,className:w_({variant:n,size:r,className:e}),...o}));Ua.displayName="Input";const __=tr(["font-bold","text-fg-muted","whitespace-nowrap"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"sm"}}),Xn=d.forwardRef(({className:e,size:n,...r},a)=>p.jsx("label",{ref:a,className:__({size:n,className:e}),...r}));Xn.displayName="Label";function df(e,[n,r]){return Math.min(r,Math.max(n,e))}function E_(e){const n=d.useRef({value:e,previous:e});return d.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var Em=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),C_="VisuallyHidden",Cm=d.forwardRef((e,n)=>p.jsx(we.span,{...e,ref:n,style:{...Em,...e.style}}));Cm.displayName=C_;var S_=Cm,A_=[" ","Enter","ArrowUp","ArrowDown"],R_=[" ","Enter"],Cr="Select",[ps,ms,M_]=su(Cr),[sa]=zn(Cr,[M_,ia]),gs=ia(),[T_,nr]=sa(Cr),[P_,N_]=sa(Cr),Sm=e=>{const{__scopeSelect:n,children:r,open:a,defaultOpen:o,onOpenChange:i,value:s,defaultValue:l,onValueChange:c,dir:u,name:h,autoComplete:f,disabled:m,required:g,form:y}=e,v=gs(n),[x,b]=d.useState(null),[w,E]=d.useState(null),[C,S]=d.useState(!1),M=cs(u),[R,_]=Ln({prop:a,defaultProp:o??!1,onChange:i,caller:Cr}),[O,P]=Ln({prop:s,defaultProp:l,onChange:c,caller:Cr}),j=d.useRef(null),$=x?y||!!x.closest("form"):!0,[V,A]=d.useState(new Set),D=Array.from(V).map(T=>T.props.value).join(";");return p.jsx(uu,{...v,children:p.jsxs(T_,{required:g,scope:n,trigger:x,onTriggerChange:b,valueNode:w,onValueNodeChange:E,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:pn(),value:O,onValueChange:P,open:R,onOpenChange:_,dir:M,triggerPointerDownPosRef:j,disabled:m,children:[p.jsx(ps.Provider,{scope:n,children:p.jsx(P_,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(T=>{A(F=>new Set(F).add(T))},[]),onNativeOptionRemove:d.useCallback(T=>{A(F=>{const H=new Set(F);return H.delete(T),H})},[]),children:r})}),$?p.jsxs(Zm,{"aria-hidden":!0,required:g,tabIndex:-1,name:h,autoComplete:f,value:O,onChange:T=>P(T.target.value),disabled:m,form:y,children:[O===void 0?p.jsx("option",{value:""}):null,Array.from(V)]},D):null]})})};Sm.displayName=Cr;var Am="SelectTrigger",Rm=d.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:a=!1,...o}=e,i=gs(r),s=nr(Am,r),l=s.disabled||a,c=Me(n,s.onTriggerChange),u=ms(r),h=d.useRef("touch"),[f,m,g]=qm(v=>{const x=u().filter(E=>!E.disabled),b=x.find(E=>E.value===s.value),w=Wm(x,v,b);w!==void 0&&s.onValueChange(w.value)}),y=v=>{l||(s.onOpenChange(!0),g()),v&&(s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return p.jsx(du,{asChild:!0,...i,children:p.jsx(we.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Bm(s.value)?"":void 0,...o,ref:c,onClick:te(o.onClick,v=>{v.currentTarget.focus(),h.current!=="mouse"&&y(v)}),onPointerDown:te(o.onPointerDown,v=>{h.current=v.pointerType;const x=v.target;x.hasPointerCapture(v.pointerId)&&x.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(y(v),v.preventDefault())}),onKeyDown:te(o.onKeyDown,v=>{const x=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&m(v.key),!(x&&v.key===" ")&&A_.includes(v.key)&&(y(),v.preventDefault())})})})});Rm.displayName=Am;var Mm="SelectValue",Tm=d.forwardRef((e,n)=>{const{__scopeSelect:r,className:a,style:o,children:i,placeholder:s="",...l}=e,c=nr(Mm,r),{onValueNodeHasChildrenChange:u}=c,h=i!==void 0,f=Me(n,c.onValueNodeChange);return ot(()=>{u(h)},[u,h]),p.jsx(we.span,{...l,ref:f,style:{pointerEvents:"none"},children:Bm(c.value)?p.jsx(p.Fragment,{children:s}):i})});Tm.displayName=Mm;var O_="SelectIcon",Pm=d.forwardRef((e,n)=>{const{__scopeSelect:r,children:a,...o}=e;return p.jsx(we.span,{"aria-hidden":!0,...o,ref:n,children:a||"▼"})});Pm.displayName=O_;var j_="SelectPortal",Nm=e=>p.jsx(Co,{asChild:!0,...e});Nm.displayName=j_;var Sr="SelectContent",Om=d.forwardRef((e,n)=>{const r=nr(Sr,e.__scopeSelect),[a,o]=d.useState();if(ot(()=>{o(new DocumentFragment)},[]),!r.open){const i=a;return i?On.createPortal(p.jsx(jm,{scope:e.__scopeSelect,children:p.jsx(ps.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),i):null}return p.jsx(Dm,{...e,ref:n})});Om.displayName=Sr;var Kt=10,[jm,rr]=sa(Sr),D_="SelectContentImpl",k_=Qr("SelectContent.RemoveScroll"),Dm=d.forwardRef((e,n)=>{const{__scopeSelect:r,position:a="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:h,arrowPadding:f,collisionBoundary:m,collisionPadding:g,sticky:y,hideWhenDetached:v,avoidCollisions:x,...b}=e,w=nr(Sr,r),[E,C]=d.useState(null),[S,M]=d.useState(null),R=Me(n,G=>C(G)),[_,O]=d.useState(null),[P,j]=d.useState(null),$=ms(r),[V,A]=d.useState(!1),D=d.useRef(!1);d.useEffect(()=>{if(E)return eu(E)},[E]),Jc();const T=d.useCallback(G=>{const[ie,...pe]=$().map(ve=>ve.ref.current),[J]=pe.slice(-1),ge=document.activeElement;for(const ve of G)if(ve===ge||(ve?.scrollIntoView({block:"nearest"}),ve===ie&&S&&(S.scrollTop=0),ve===J&&S&&(S.scrollTop=S.scrollHeight),ve?.focus(),document.activeElement!==ge))return},[$,S]),F=d.useCallback(()=>T([_,E]),[T,_,E]);d.useEffect(()=>{V&&F()},[V,F]);const{onOpenChange:H,triggerPointerDownPosRef:I}=w;d.useEffect(()=>{if(E){let G={x:0,y:0};const ie=J=>{G={x:Math.abs(Math.round(J.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(J.pageY)-(I.current?.y??0))}},pe=J=>{G.x<=10&&G.y<=10?J.preventDefault():E.contains(J.target)||H(!1),document.removeEventListener("pointermove",ie),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",pe,{capture:!0})}}},[E,H,I]),d.useEffect(()=>{const G=()=>H(!1);return window.addEventListener("blur",G),window.addEventListener("resize",G),()=>{window.removeEventListener("blur",G),window.removeEventListener("resize",G)}},[H]);const[Z,B]=qm(G=>{const ie=$().filter(ge=>!ge.disabled),pe=ie.find(ge=>ge.ref.current===document.activeElement),J=Wm(ie,G,pe);J&&setTimeout(()=>J.ref.current.focus())}),q=d.useCallback((G,ie,pe)=>{const J=!D.current&&!pe;(w.value!==void 0&&w.value===ie||J)&&(O(G),J&&(D.current=!0))},[w.value]),X=d.useCallback(()=>E?.focus(),[E]),Q=d.useCallback((G,ie,pe)=>{const J=!D.current&&!pe;(w.value!==void 0&&w.value===ie||J)&&j(G)},[w.value]),oe=a==="popper"?Ll:km,le=oe===Ll?{side:l,sideOffset:c,align:u,alignOffset:h,arrowPadding:f,collisionBoundary:m,collisionPadding:g,sticky:y,hideWhenDetached:v,avoidCollisions:x}:{};return p.jsx(jm,{scope:r,content:E,viewport:S,onViewportChange:M,itemRefCallback:q,selectedItem:_,onItemLeave:X,itemTextRefCallback:Q,focusSelectedItem:F,selectedItemText:P,position:a,isPositioned:V,searchRef:Z,children:p.jsx(Rc,{as:k_,allowPinchZoom:!0,children:p.jsx(is,{asChild:!0,trapped:w.open,onMountAutoFocus:G=>{G.preventDefault()},onUnmountAutoFocus:te(o,G=>{w.trigger?.focus({preventScroll:!0}),G.preventDefault()}),children:p.jsx(Eo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:G=>G.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:p.jsx(oe,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:G=>G.preventDefault(),...b,...le,onPlaced:()=>A(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:te(b.onKeyDown,G=>{const ie=G.ctrlKey||G.altKey||G.metaKey;if(G.key==="Tab"&&G.preventDefault(),!ie&&G.key.length===1&&B(G.key),["ArrowUp","ArrowDown","Home","End"].includes(G.key)){let J=$().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);if(["ArrowUp","End"].includes(G.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(G.key)){const ge=G.target,ve=J.indexOf(ge);J=J.slice(ve+1)}setTimeout(()=>T(J)),G.preventDefault()}})})})})})})});Dm.displayName=D_;var I_="SelectItemAlignedPosition",km=d.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:a,...o}=e,i=nr(Sr,r),s=rr(Sr,r),[l,c]=d.useState(null),[u,h]=d.useState(null),f=Me(n,R=>h(R)),m=ms(r),g=d.useRef(!1),y=d.useRef(!0),{viewport:v,selectedItem:x,selectedItemText:b,focusSelectedItem:w}=s,E=d.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&v&&x&&b){const R=i.trigger.getBoundingClientRect(),_=u.getBoundingClientRect(),O=i.valueNode.getBoundingClientRect(),P=b.getBoundingClientRect();if(i.dir!=="rtl"){const ge=P.left-_.left,ve=O.left-ge,ye=R.left-ve,Ie=R.width+ye,Et=Math.max(Ie,_.width),Tt=window.innerWidth-Kt,mt=df(ve,[Kt,Math.max(Kt,Tt-Et)]);l.style.minWidth=Ie+"px",l.style.left=mt+"px"}else{const ge=_.right-P.right,ve=window.innerWidth-O.right-ge,ye=window.innerWidth-R.right-ve,Ie=R.width+ye,Et=Math.max(Ie,_.width),Tt=window.innerWidth-Kt,mt=df(ve,[Kt,Math.max(Kt,Tt-Et)]);l.style.minWidth=Ie+"px",l.style.right=mt+"px"}const j=m(),$=window.innerHeight-Kt*2,V=v.scrollHeight,A=window.getComputedStyle(u),D=parseInt(A.borderTopWidth,10),T=parseInt(A.paddingTop,10),F=parseInt(A.borderBottomWidth,10),H=parseInt(A.paddingBottom,10),I=D+T+V+H+F,Z=Math.min(x.offsetHeight*5,I),B=window.getComputedStyle(v),q=parseInt(B.paddingTop,10),X=parseInt(B.paddingBottom,10),Q=R.top+R.height/2-Kt,oe=$-Q,le=x.offsetHeight/2,G=x.offsetTop+le,ie=D+T+G,pe=I-ie;if(ie<=Q){const ge=j.length>0&&x===j[j.length-1].ref.current;l.style.bottom="0px";const ve=u.clientHeight-v.offsetTop-v.offsetHeight,ye=Math.max(oe,le+(ge?X:0)+ve+F),Ie=ie+ye;l.style.height=Ie+"px"}else{const ge=j.length>0&&x===j[0].ref.current;l.style.top="0px";const ye=Math.max(Q,D+v.offsetTop+(ge?q:0)+le)+pe;l.style.height=ye+"px",v.scrollTop=ie-Q+v.offsetTop}l.style.margin=`${Kt}px 0`,l.style.minHeight=Z+"px",l.style.maxHeight=$+"px",a?.(),requestAnimationFrame(()=>g.current=!0)}},[m,i.trigger,i.valueNode,l,u,v,x,b,i.dir,a]);ot(()=>E(),[E]);const[C,S]=d.useState();ot(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const M=d.useCallback(R=>{R&&y.current===!0&&(E(),w?.(),y.current=!1)},[E,w]);return p.jsx(F_,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:M,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(we.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});km.displayName=I_;var L_="SelectPopperPosition",Ll=d.forwardRef((e,n)=>{const{__scopeSelect:r,align:a="start",collisionPadding:o=Kt,...i}=e,s=gs(r);return p.jsx(fu,{...s,...i,ref:n,align:a,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ll.displayName=L_;var[F_,_u]=sa(Sr,{}),Fl="SelectViewport",Im=d.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:a,...o}=e,i=rr(Fl,r),s=_u(Fl,r),l=Me(n,i.onViewportChange),c=d.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),p.jsx(ps.Slot,{scope:r,children:p.jsx(we.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:te(o.onScroll,u=>{const h=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=s;if(m?.current&&f){const g=Math.abs(c.current-h.scrollTop);if(g>0){const y=window.innerHeight-Kt*2,v=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),b=Math.max(v,x);if(b<y){const w=b+g,E=Math.min(y,w),C=w-E;f.style.height=E+"px",f.style.bottom==="0px"&&(h.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}c.current=h.scrollTop})})})]})});Im.displayName=Fl;var Lm="SelectGroup",[$_,H_]=sa(Lm),z_=d.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e,o=pn();return p.jsx($_,{scope:r,id:o,children:p.jsx(we.div,{role:"group","aria-labelledby":o,...a,ref:n})})});z_.displayName=Lm;var Fm="SelectLabel",U_=d.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e,o=H_(Fm,r);return p.jsx(we.div,{id:o.id,...a,ref:n})});U_.displayName=Fm;var Ii="SelectItem",[V_,$m]=sa(Ii),Hm=d.forwardRef((e,n)=>{const{__scopeSelect:r,value:a,disabled:o=!1,textValue:i,...s}=e,l=nr(Ii,r),c=rr(Ii,r),u=l.value===a,[h,f]=d.useState(i??""),[m,g]=d.useState(!1),y=Me(n,w=>c.itemRefCallback?.(w,a,o)),v=pn(),x=d.useRef("touch"),b=()=>{o||(l.onValueChange(a),l.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(V_,{scope:r,value:a,disabled:o,textId:v,isSelected:u,onItemTextChange:d.useCallback(w=>{f(E=>E||(w?.textContent??"").trim())},[]),children:p.jsx(ps.ItemSlot,{scope:r,value:a,disabled:o,textValue:h,children:p.jsx(we.div,{role:"option","aria-labelledby":v,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:y,onFocus:te(s.onFocus,()=>g(!0)),onBlur:te(s.onBlur,()=>g(!1)),onClick:te(s.onClick,()=>{x.current!=="mouse"&&b()}),onPointerUp:te(s.onPointerUp,()=>{x.current==="mouse"&&b()}),onPointerDown:te(s.onPointerDown,w=>{x.current=w.pointerType}),onPointerMove:te(s.onPointerMove,w=>{x.current=w.pointerType,o?c.onItemLeave?.():x.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:te(s.onPointerLeave,w=>{w.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:te(s.onKeyDown,w=>{c.searchRef?.current!==""&&w.key===" "||(R_.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});Hm.displayName=Ii;var ka="SelectItemText",zm=d.forwardRef((e,n)=>{const{__scopeSelect:r,className:a,style:o,...i}=e,s=nr(ka,r),l=rr(ka,r),c=$m(ka,r),u=N_(ka,r),[h,f]=d.useState(null),m=Me(n,b=>f(b),c.onItemTextChange,b=>l.itemTextRefCallback?.(b,c.value,c.disabled)),g=h?.textContent,y=d.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:x}=u;return ot(()=>(v(y),()=>x(y)),[v,x,y]),p.jsxs(p.Fragment,{children:[p.jsx(we.span,{id:c.textId,...i,ref:m}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?On.createPortal(i.children,s.valueNode):null]})});zm.displayName=ka;var Um="SelectItemIndicator",Z_=d.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e;return $m(Um,r).isSelected?p.jsx(we.span,{"aria-hidden":!0,...a,ref:n}):null});Z_.displayName=Um;var $l="SelectScrollUpButton",B_=d.forwardRef((e,n)=>{const r=rr($l,e.__scopeSelect),a=_u($l,e.__scopeSelect),[o,i]=d.useState(!1),s=Me(n,a.onScrollButtonChange);return ot(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?p.jsx(Vm,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});B_.displayName=$l;var Hl="SelectScrollDownButton",q_=d.forwardRef((e,n)=>{const r=rr(Hl,e.__scopeSelect),a=_u(Hl,e.__scopeSelect),[o,i]=d.useState(!1),s=Me(n,a.onScrollButtonChange);return ot(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,h=Math.ceil(c.scrollTop)<u;i(h)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?p.jsx(Vm,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});q_.displayName=Hl;var Vm=d.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:a,...o}=e,i=rr("SelectScrollButton",r),s=d.useRef(null),l=ms(r),c=d.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),ot(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),p.jsx(we.div,{"aria-hidden":!0,...o,ref:n,style:{flexShrink:0,...o.style},onPointerDown:te(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(a,50))}),onPointerMove:te(o.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(a,50))}),onPointerLeave:te(o.onPointerLeave,()=>{c()})})}),W_="SelectSeparator",G_=d.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e;return p.jsx(we.div,{"aria-hidden":!0,...a,ref:n})});G_.displayName=W_;var zl="SelectArrow",K_=d.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e,o=gs(r),i=nr(zl,r),s=rr(zl,r);return i.open&&s.position==="popper"?p.jsx(hu,{...o,...a,ref:n}):null});K_.displayName=zl;var Y_="SelectBubbleInput",Zm=d.forwardRef(({__scopeSelect:e,value:n,...r},a)=>{const o=d.useRef(null),i=Me(a,o),s=E_(n);return d.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==n&&h){const f=new Event("change",{bubbles:!0});h.call(l,n),l.dispatchEvent(f)}},[s,n]),p.jsx(we.select,{...r,style:{...Em,...r.style},ref:i,defaultValue:n})});Zm.displayName=Y_;function Bm(e){return e===""||e===void 0}function qm(e){const n=yn(e),r=d.useRef(""),a=d.useRef(0),o=d.useCallback(s=>{const l=r.current+s;n(l),(function c(u){r.current=u,window.clearTimeout(a.current),u!==""&&(a.current=window.setTimeout(()=>c(""),1e3))})(l)},[n]),i=d.useCallback(()=>{r.current="",window.clearTimeout(a.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(a.current),[]),[r,o,i]}function Wm(e,n,r){const o=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,i=r?e.indexOf(r):-1;let s=Q_(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==r));const c=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function Q_(e,n){return e.map((r,a)=>e[(n+a)%e.length])}var X_=Sm,J_=Rm,e3=Tm,t3=Pm,n3=Nm,r3=Om,a3=Im,o3=Hm,i3=zm;const s3=tr(["inline-flex","items-center","justify-between","gap-2","border-2","bg-surface","text-fg","font-bold","transition-all","outline-none","focus:shadow-sketchy","disabled:cursor-not-allowed","disabled:opacity-50","cursor-pointer","whitespace-nowrap"],{variants:{variant:{default:["border-border"],ghost:["border-transparent","bg-subtle","focus:border-border-focus"]},size:{sm:"h-8 px-2 text-sm rounded-sketchy-sm",md:"h-10 px-3 text-sm rounded-sketchy-md",lg:"h-12 px-4 text-base rounded-sketchy-lg"}},defaultVariants:{variant:"default",size:"md"}}),yi=({value:e,defaultValue:n,onValueChange:r,placeholder:a,variant:o,size:i,className:s,children:l,disabled:c})=>p.jsxs(X_,{value:e,defaultValue:n,onValueChange:r,disabled:c,children:[p.jsxs(J_,{className:s3({variant:o,size:i,className:s}),children:[p.jsx(e3,{placeholder:a}),p.jsx(t3,{children:p.jsx(Gc,{className:"w-3.5 h-3.5 opacity-60"})})]}),p.jsx(n3,{children:p.jsx(Gm,{children:p.jsx(a3,{className:"p-1",children:l})})})]}),Gm=d.forwardRef(({className:e,children:n,...r},a)=>p.jsx(r3,{ref:a,position:"popper",sideOffset:4,className:["z-[1100]","min-w-[var(--radix-select-trigger-width)]","overflow-hidden","rounded-sketchy-md","bg-surface","border-2","border-border","shadow-sketchy","data-[state=open]:animate-fade-in","data-[state=open]:animate-zoom-in",e].filter(Boolean).join(" "),...r,children:n}));Gm.displayName="SelectContent";const Pn=d.forwardRef(({className:e,children:n,...r},a)=>p.jsx(o3,{ref:a,className:["relative","flex","items-center","cursor-pointer","select-none","px-3","py-2","text-sm","font-bold","text-fg-muted","outline-none","transition-colors","rounded-sketchy-sm","data-[highlighted]:bg-hover","data-[highlighted]:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e].filter(Boolean).join(" "),...r,children:p.jsx(i3,{children:n})}));Pn.displayName="SelectItem";yi.displayName="Select";const l3=tr(["w-full","border-2","border-border","bg-surface","text-fg","placeholder:text-fg-placeholder","transition-all","focus:outline-none","focus:shadow-sketchy","disabled:cursor-not-allowed","disabled:opacity-50","resize-none"],{variants:{variant:{default:[],ghost:["border-transparent","bg-subtle","focus:border-border-focus"],error:["border-border-error","bg-pastel-pink-200/20","focus:border-red-500"]},size:{sm:"p-2 text-sm rounded-[8px_3px_9px_2px/3px_7px_3px_8px] min-h-[60px]",md:"p-3 text-sm rounded-[10px_3px_11px_3px/3px_9px_3px_10px] min-h-[80px]",lg:"p-4 text-base rounded-[12px_4px_13px_3px/4px_10px_4px_12px] min-h-[100px]"}},defaultVariants:{variant:"default",size:"md"}}),Km=d.forwardRef(({className:e,variant:n,size:r,...a},o)=>p.jsx("textarea",{ref:o,className:l3({variant:n,size:r,className:e}),...a}));Km.displayName="Textarea";var Ym="Toggle",Qm=d.forwardRef((e,n)=>{const{pressed:r,defaultPressed:a,onPressedChange:o,...i}=e,[s,l]=Ln({prop:r,onChange:o,defaultProp:a??!1,caller:Ym});return p.jsx(we.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:n,onClick:te(e.onClick,()=>{e.disabled||l(!s)})})});Qm.displayName=Ym;var ar="ToggleGroup",[Xm]=zn(ar,[us]),Jm=us(),Eu=he.forwardRef((e,n)=>{const{type:r,...a}=e;if(r==="single"){const o=a;return p.jsx(c3,{...o,ref:n})}if(r==="multiple"){const o=a;return p.jsx(u3,{...o,ref:n})}throw new Error(`Missing prop \`type\` expected on \`${ar}\``)});Eu.displayName=ar;var[eg,tg]=Xm(ar),c3=he.forwardRef((e,n)=>{const{value:r,defaultValue:a,onValueChange:o=()=>{},...i}=e,[s,l]=Ln({prop:r,defaultProp:a??"",onChange:o,caller:ar});return p.jsx(eg,{scope:e.__scopeToggleGroup,type:"single",value:he.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:he.useCallback(()=>l(""),[l]),children:p.jsx(ng,{...i,ref:n})})}),u3=he.forwardRef((e,n)=>{const{value:r,defaultValue:a,onValueChange:o=()=>{},...i}=e,[s,l]=Ln({prop:r,defaultProp:a??[],onChange:o,caller:ar}),c=he.useCallback(h=>l((f=[])=>[...f,h]),[l]),u=he.useCallback(h=>l((f=[])=>f.filter(m=>m!==h)),[l]);return p.jsx(eg,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:u,children:p.jsx(ng,{...i,ref:n})})});Eu.displayName=ar;var[d3,f3]=Xm(ar),ng=he.forwardRef((e,n)=>{const{__scopeToggleGroup:r,disabled:a=!1,rovingFocus:o=!0,orientation:i,dir:s,loop:l=!0,...c}=e,u=Jm(r),h=cs(s),f={role:"group",dir:h,...c};return p.jsx(d3,{scope:r,rovingFocus:o,disabled:a,children:o?p.jsx(Ap,{asChild:!0,...u,orientation:i,dir:h,loop:l,children:p.jsx(we.div,{...f,ref:n})}):p.jsx(we.div,{...f,ref:n})})}),Li="ToggleGroupItem",rg=he.forwardRef((e,n)=>{const r=tg(Li,e.__scopeToggleGroup),a=f3(Li,e.__scopeToggleGroup),o=Jm(e.__scopeToggleGroup),i=r.value.includes(e.value),s=a.disabled||e.disabled,l={...e,pressed:i,disabled:s},c=he.useRef(null);return a.rovingFocus?p.jsx(Rp,{asChild:!0,...o,focusable:!s,active:i,ref:c,children:p.jsx(ff,{...l,ref:n})}):p.jsx(ff,{...l,ref:n})});rg.displayName=Li;var ff=he.forwardRef((e,n)=>{const{__scopeToggleGroup:r,value:a,...o}=e,i=tg(Li,r),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=i.type==="single"?s:void 0;return p.jsx(Qm,{...l,...o,ref:n,onPressedChange:c=>{c?i.onItemActivate(a):i.onItemDeactivate(a)}})}),h3=Eu,p3=rg;const m3=tr(["inline-flex","gap-0.5","overflow-hidden"],{variants:{variant:{default:["border-2","border-border","rounded-[12px_4px_13px_3px/4px_10px_4px_12px]","bg-surface"],outline:["border-2","border-border","rounded-[12px_4px_13px_3px/4px_10px_4px_12px]","bg-transparent"],pills:["bg-subtle","rounded-[14px_4px_15px_4px/4px_12px_4px_14px]","p-1","border-2","border-border"]}},defaultVariants:{variant:"default"}}),g3=tr(["flex","items-center","justify-center","font-bold","transition-all","duration-200","disabled:pointer-events-none","disabled:opacity-50"],{variants:{variant:{default:["text-fg-muted","hover:bg-hover","data-[state=on]:bg-accent-primary","data-[state=on]:text-fg-on-accent","data-[state=on]:shadow-sketchy"],outline:["text-fg-muted","hover:bg-hover-subtle","data-[state=on]:bg-accent-primary","data-[state=on]:text-fg-on-accent"],pills:["text-fg-secondary","rounded-[10px_3px_11px_3px/3px_8px_3px_10px]","data-[state=on]:bg-accent-primary","data-[state=on]:text-fg-on-accent","data-[state=on]:shadow-sketchy","data-[state=on]:border-2","data-[state=on]:border-border-secondary"]},size:{sm:"px-2 py-1.5 text-xs",md:"px-3 py-2 text-sm",lg:"px-4 py-2.5 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),ag=d.createContext({}),Cu=d.forwardRef(({className:e,variant:n,size:r,children:a,...o},i)=>p.jsx(ag.Provider,{value:{variant:n??"default",size:r??"md"},children:p.jsx(h3,{ref:i,className:m3({variant:n,className:e}),...o,children:a})}));Cu.displayName="ToggleGroup";const qr=d.forwardRef(({className:e,activeClassName:n,children:r,...a},o)=>{const i=d.useContext(ag);return p.jsx(p3,{ref:o,className:g3({variant:i.variant,size:i.size,className:[e,n].filter(Boolean).join(" ")}),...a,children:r})});qr.displayName="ToggleGroupItem";var[ys]=zn("Tooltip",[ia]),vs=ia(),og="TooltipProvider",y3=700,Ul="tooltip.open",[v3,Su]=ys(og),ig=e=>{const{__scopeTooltip:n,delayDuration:r=y3,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:i}=e,s=d.useRef(!0),l=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),p.jsx(v3,{scope:n,isOpenDelayedRef:s,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,a)},[a]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:i})};ig.displayName=og;var ro="Tooltip",[x3,To]=ys(ro),sg=e=>{const{__scopeTooltip:n,children:r,open:a,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:l}=e,c=Su(ro,e.__scopeTooltip),u=vs(n),[h,f]=d.useState(null),m=pn(),g=d.useRef(0),y=s??c.disableHoverableContent,v=l??c.delayDuration,x=d.useRef(!1),[b,w]=Ln({prop:a,defaultProp:o??!1,onChange:R=>{R?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ul))):c.onClose(),i?.(R)},caller:ro}),E=d.useMemo(()=>b?x.current?"delayed-open":"instant-open":"closed",[b]),C=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x.current=!1,w(!0)},[w]),S=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,w(!1)},[w]),M=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{x.current=!0,w(!0),g.current=0},v)},[v,w]);return d.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),p.jsx(uu,{...u,children:p.jsx(x3,{scope:n,contentId:m,open:b,stateAttribute:E,trigger:h,onTriggerChange:f,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?M():C()},[c.isOpenDelayedRef,M,C]),onTriggerLeave:d.useCallback(()=>{y?S():(window.clearTimeout(g.current),g.current=0)},[S,y]),onOpen:C,onClose:S,disableHoverableContent:y,children:r})})};sg.displayName=ro;var Vl="TooltipTrigger",lg=d.forwardRef((e,n)=>{const{__scopeTooltip:r,...a}=e,o=To(Vl,r),i=Su(Vl,r),s=vs(r),l=d.useRef(null),c=Me(n,l,o.onTriggerChange),u=d.useRef(!1),h=d.useRef(!1),f=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(du,{asChild:!0,...s,children:p.jsx(we.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:c,onPointerMove:te(e.onPointerMove,m=>{m.pointerType!=="touch"&&!h.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),h.current=!0)}),onPointerLeave:te(e.onPointerLeave,()=>{o.onTriggerLeave(),h.current=!1}),onPointerDown:te(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:te(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:te(e.onBlur,o.onClose),onClick:te(e.onClick,o.onClose)})})});lg.displayName=Vl;var Au="TooltipPortal",[b3,w3]=ys(Au,{forceMount:void 0}),cg=e=>{const{__scopeTooltip:n,forceMount:r,children:a,container:o}=e,i=To(Au,n);return p.jsx(b3,{scope:n,forceMount:r,children:p.jsx(bn,{present:r||i.open,children:p.jsx(Co,{asChild:!0,container:o,children:a})})})};cg.displayName=Au;var Xr="TooltipContent",ug=d.forwardRef((e,n)=>{const r=w3(Xr,e.__scopeTooltip),{forceMount:a=r.forceMount,side:o="top",...i}=e,s=To(Xr,e.__scopeTooltip);return p.jsx(bn,{present:a||s.open,children:s.disableHoverableContent?p.jsx(dg,{side:o,...i,ref:n}):p.jsx(_3,{side:o,...i,ref:n})})}),_3=d.forwardRef((e,n)=>{const r=To(Xr,e.__scopeTooltip),a=Su(Xr,e.__scopeTooltip),o=d.useRef(null),i=Me(n,o),[s,l]=d.useState(null),{trigger:c,onClose:u}=r,h=o.current,{onPointerInTransitChange:f}=a,m=d.useCallback(()=>{l(null),f(!1)},[f]),g=d.useCallback((y,v)=>{const x=y.currentTarget,b={x:y.clientX,y:y.clientY},w=R3(b,x.getBoundingClientRect()),E=M3(b,w),C=T3(v.getBoundingClientRect()),S=N3([...E,...C]);l(S),f(!0)},[f]);return d.useEffect(()=>()=>m(),[m]),d.useEffect(()=>{if(c&&h){const y=x=>g(x,h),v=x=>g(x,c);return c.addEventListener("pointerleave",y),h.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",y),h.removeEventListener("pointerleave",v)}}},[c,h,g,m]),d.useEffect(()=>{if(s){const y=v=>{const x=v.target,b={x:v.clientX,y:v.clientY},w=c?.contains(x)||h?.contains(x),E=!P3(b,s);w?m():E&&(m(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,h,s,u,m]),p.jsx(dg,{...e,ref:i})}),[E3,C3]=ys(ro,{isInside:!1}),S3=R4("TooltipContent"),dg=d.forwardRef((e,n)=>{const{__scopeTooltip:r,children:a,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=e,c=To(Xr,r),u=vs(r),{onClose:h}=c;return d.useEffect(()=>(document.addEventListener(Ul,h),()=>document.removeEventListener(Ul,h)),[h]),d.useEffect(()=>{if(c.trigger){const f=m=>{m.target?.contains(c.trigger)&&h()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,h]),p.jsx(Eo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:h,children:p.jsxs(fu,{"data-state":c.stateAttribute,...u,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(S3,{children:a}),p.jsx(E3,{scope:r,isInside:!0,children:p.jsx(S_,{id:c.contentId,role:"tooltip",children:o||a})})]})})});ug.displayName=Xr;var fg="TooltipArrow",A3=d.forwardRef((e,n)=>{const{__scopeTooltip:r,...a}=e,o=vs(r);return C3(fg,r).isInside?null:p.jsx(hu,{...o,...a,ref:n})});A3.displayName=fg;function R3(e,n){const r=Math.abs(n.top-e.y),a=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),i=Math.abs(n.left-e.x);switch(Math.min(r,a,o,i)){case i:return"left";case o:return"right";case r:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function M3(e,n,r=5){const a=[];switch(n){case"top":a.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":a.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":a.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":a.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return a}function T3(e){const{top:n,right:r,bottom:a,left:o}=e;return[{x:o,y:n},{x:r,y:n},{x:r,y:a},{x:o,y:a}]}function P3(e,n){const{x:r,y:a}=e;let o=!1;for(let i=0,s=n.length-1;i<n.length;s=i++){const l=n[i],c=n[s],u=l.x,h=l.y,f=c.x,m=c.y;h>a!=m>a&&r<(f-u)*(a-h)/(m-h)+u&&(o=!o)}return o}function N3(e){const n=e.slice();return n.sort((r,a)=>r.x<a.x?-1:r.x>a.x?1:r.y<a.y?-1:r.y>a.y?1:0),O3(n)}function O3(e){if(e.length<=1)return e.slice();const n=[];for(let a=0;a<e.length;a++){const o=e[a];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}n.pop();const r=[];for(let a=e.length-1;a>=0;a--){const o=e[a];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var j3=ig,D3=sg,k3=lg,I3=cg,hg=ug;const L3=j3,F3=D3,$3=k3,pg=d.forwardRef(({className:e,sideOffset:n=4,...r},a)=>p.jsx(hg,{ref:a,sideOffset:n,className:["z-50","overflow-hidden","px-3","py-1.5","text-xs","font-bold","bg-elevated","text-fg-default","border-2","border-border-secondary","rounded-[8px_3px_9px_2px/3px_6px_3px_7px]","shadow-sketchy","animate-in","fade-in-0","zoom-in-95","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2",e].filter(Boolean).join(" "),...r}));pg.displayName=hg.displayName;const mg=({content:e,children:n,side:r="top",delayDuration:a=200})=>p.jsx(L3,{children:p.jsxs(F3,{delayDuration:a,children:[p.jsx($3,{asChild:!0,children:n}),p.jsx(I3,{children:p.jsx(pg,{side:r,children:e})})]})}),Fn=d.forwardRef(({icon:e,title:n,description:r,className:a="",...o},i)=>p.jsxs("div",{ref:i,className:["flex flex-col items-center justify-center text-center","h-[400px]","bg-muted/30","border-2 border-dashed","border-border-secondary","rounded-[24px_8px_25px_7px/8px_20px_8px_22px]","p-8",a].join(" "),...o,children:[e&&p.jsx("div",{className:"mb-4 text-6xl opacity-80",children:e}),n&&p.jsx("h3",{className:"text-xl font-bold mb-2 text-fg-muted",children:n}),r&&p.jsx("p",{className:"text-fg-tertiary max-w-[400px] font-medium",children:r})]}));Fn.displayName="Empty";const or=d.forwardRef(({page:e,last:n,onChange:r,className:a="",...o},i)=>{const s=Number(e),l=Number(n),c=[];for(let f=1;f<l+1;f++)(s===f||s===1&&f<s+5||s===2&&f<s+4||f>s-3&&f<s+3||s===l-1&&f>s-4||s===l&&f>s-5)&&c.push(f);const u=s===1,h=s===l;return p.jsxs("nav",{ref:i,className:`mt-8 flex justify-center items-center gap-1 ${a}`,...o,children:[p.jsxs(Ur,{disabled:u,onClick:()=>!u&&r(1),"aria-label":"First page",isSkip:!0,children:[p.jsx(Br,{width:16}),p.jsx(Br,{width:16})]}),p.jsx(Ur,{disabled:u,onClick:()=>!u&&r(s-1),"aria-label":"Previous page",children:p.jsx(Br,{width:20})}),c.map(f=>p.jsx(Ur,{active:s===f,onClick:()=>r(f),"aria-label":`Page ${f}`,"aria-current":s===f?"page":void 0,children:f},f)),p.jsx(Ur,{disabled:h,onClick:()=>!h&&r(s+1),"aria-label":"Next page",children:p.jsx(za,{width:20})}),p.jsxs(Ur,{disabled:h,onClick:()=>!h&&r(l),"aria-label":"Last page",isSkip:!0,children:[p.jsx(za,{width:16}),p.jsx(za,{width:16})]})]})});or.displayName="Pagination";const Ur=d.forwardRef(({active:e,disabled:n,isSkip:r,children:a,className:o="",...i},s)=>{const l=`
9
- flex justify-center items-center
10
- leading-normal text-base font-bold
11
- w-9 h-9 md:w-10 md:h-10
12
- border-2 border-transparent
13
- rounded-[10px_3px_11px_3px/3px_8px_3px_10px]
14
- transition-all duration-200
15
- `,c=e?"cursor-default bg-accent-primary border-border text-fg-on-accent shadow-sketchy sketchy-sm":n?"cursor-default text-fg-disabled border-transparent":"cursor-pointer text-fg-default hover:bg-hover hover:border-border-secondary",u=r?"relative [&>svg]:absolute [&>svg:first-child]:-translate-x-[3px] [&>svg:last-child]:translate-x-[3px]":"";return p.jsx("button",{ref:s,type:"button",disabled:n,className:`${l} ${c} ${u} ${o}`,...i,children:a})});Ur.displayName="PaginationItem";const H3=tr(["h-full","transition-all","duration-300","ease-out"],{variants:{color:{primary:"bg-pastel-blue-200",success:"bg-pastel-green-200",danger:"bg-pastel-pink-200",warning:"bg-pastel-orange-200"}},defaultVariants:{color:"primary"}}),z3=d.forwardRef(({value:e,max:n,color:r,className:a="",...o},i)=>{const s=Math.min(100,Math.max(0,e/n*100));return p.jsx("div",{ref:i,className:["w-full h-3","bg-surface","border-2 border-border","rounded-[6px_2px_7px_2px/2px_5px_2px_6px]","overflow-hidden",a].join(" "),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":n,...o,children:p.jsx("div",{className:H3({color:r}),style:{width:`${s}%`}})})});z3.displayName="Progress";const Ne=d.forwardRef(({width:e,height:n=30,opacity:r,className:a="",style:o,...i},s)=>p.jsx("div",{ref:s,className:["rounded-[10px_3px_11px_3px/3px_8px_3px_10px]","border-2","border-divider","bg-[length:200%_100%]","bg-gradient-to-r","from-pastel-lavender-200/30","via-pastel-yellow-200/20","to-pastel-lavender-200/30","dark:from-zinc-800","dark:via-zinc-700","dark:to-zinc-800","animate-shimmer","animate-fade-in",a].join(" "),style:{width:e,height:n,opacity:r,...o},...i}));Ne.displayName="Skeleton";const gg=({children:e,className:n=""})=>p.jsx("div",{className:`bg-elevated py-3 px-4 rounded-[12px_4px_13px_3px/4px_10px_4px_12px] border-2 border-border-secondary shadow-sketchy ${n}`,children:p.jsx("div",{className:"flex items-center justify-between",children:p.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[p.jsx(c4,{className:"h-5 w-5 text-fg-muted"}),p.jsx("div",{className:"text-sm font-bold flex-1 text-fg-default",children:e})]})})}),Rt=({children:e,fallback:n})=>e||n,hf=({children:e,match:n})=>{if(!n)return p.jsx("span",{children:e});const r=new RegExp(`(${n})`,"gi"),a=e.split(r);return p.jsx("span",{children:a.map((o,i)=>r.test(o)?p.jsx("mark",{children:o},i):o)})};function yg({src:e,alt:n,loading:r="lazy",className:a}){const o=d.useRef(null),{theme:i}=Pr(c=>c),l=i==="dark"?"brightness(0.85) saturate(0.9)":void 0;return d.useEffect(()=>{if(!o.current||r!=="lazy"||!e)return;const c=new IntersectionObserver(([u])=>{if(u.isIntersecting){const h=u.target;h.src=h.dataset.src,c.unobserve(h)}});return c.observe(o.current),()=>{c.disconnect()}},[r,e]),p.jsx(p.Fragment,{children:r!=="lazy"?p.jsx("img",{src:e,alt:n,className:a,style:{filter:l}}):p.jsx("img",{ref:o,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2O4evXqfwAIgQN/QHwrfwAAAABJRU5ErkJggg==",alt:n,"data-src":e,className:a,style:{filter:l}})})}var Qs={exports:{}},Xs,pf;function U3(){if(pf)return Xs;pf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Xs=e,Xs}var Js,mf;function V3(){if(mf)return Js;mf=1;var e=U3();function n(){}function r(){}return r.resetWarningCache=n,Js=function(){function a(s,l,c,u,h,f){if(f!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}a.isRequired=a;function o(){return a}var i={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:n};return i.PropTypes=i,i},Js}var gf;function Z3(){return gf||(gf=1,Qs.exports=V3()()),Qs.exports}var B3=Z3();const k=ra(B3);var el,yf;function q3(){if(yf)return el;yf=1;function e(l){return l&&typeof l=="object"&&"default"in l?l.default:l}var n=Jy(),r=e(n);function a(l,c,u){return c in l?Object.defineProperty(l,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):l[c]=u,l}function o(l,c){l.prototype=Object.create(c.prototype),l.prototype.constructor=l,l.__proto__=c}var i=!!(typeof window<"u"&&window.document&&window.document.createElement);function s(l,c,u){if(typeof l!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof c!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof u<"u"&&typeof u!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function h(f){return f.displayName||f.name||"Component"}return function(m){if(typeof m!="function")throw new Error("Expected WrappedComponent to be a React component.");var g=[],y;function v(){y=l(g.map(function(b){return b.props})),x.canUseDOM?c(y):u&&(y=u(y))}var x=(function(b){o(w,b);function w(){return b.apply(this,arguments)||this}w.peek=function(){return y},w.rewind=function(){if(w.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var S=y;return y=void 0,g=[],S};var E=w.prototype;return E.UNSAFE_componentWillMount=function(){g.push(this),v()},E.componentDidUpdate=function(){v()},E.componentWillUnmount=function(){var S=g.indexOf(this);g.splice(S,1),v()},E.render=function(){return r.createElement(m,this.props)},w})(n.PureComponent);return a(x,"displayName","SideEffect("+h(m)+")"),a(x,"canUseDOM",i),x}}return el=s,el}var W3=q3();const G3=ra(W3);var tl,vf;function K3(){if(vf)return tl;vf=1;var e=typeof Element<"u",n=typeof Map=="function",r=typeof Set=="function",a=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(i,s){if(i===s)return!0;if(i&&s&&typeof i=="object"&&typeof s=="object"){if(i.constructor!==s.constructor)return!1;var l,c,u;if(Array.isArray(i)){if(l=i.length,l!=s.length)return!1;for(c=l;c--!==0;)if(!o(i[c],s[c]))return!1;return!0}var h;if(n&&i instanceof Map&&s instanceof Map){if(i.size!==s.size)return!1;for(h=i.entries();!(c=h.next()).done;)if(!s.has(c.value[0]))return!1;for(h=i.entries();!(c=h.next()).done;)if(!o(c.value[1],s.get(c.value[0])))return!1;return!0}if(r&&i instanceof Set&&s instanceof Set){if(i.size!==s.size)return!1;for(h=i.entries();!(c=h.next()).done;)if(!s.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(s)){if(l=i.length,l!=s.length)return!1;for(c=l;c--!==0;)if(i[c]!==s[c])return!1;return!0}if(i.constructor===RegExp)return i.source===s.source&&i.flags===s.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof s.valueOf=="function")return i.valueOf()===s.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof s.toString=="function")return i.toString()===s.toString();if(u=Object.keys(i),l=u.length,l!==Object.keys(s).length)return!1;for(c=l;c--!==0;)if(!Object.prototype.hasOwnProperty.call(s,u[c]))return!1;if(e&&i instanceof Element)return!1;for(c=l;c--!==0;)if(!((u[c]==="_owner"||u[c]==="__v"||u[c]==="__o")&&i.$$typeof)&&!o(i[u[c]],s[u[c]]))return!1;return!0}return i!==i&&s!==s}return tl=function(s,l){try{return o(s,l)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},tl}var Y3=K3();const Q3=ra(Y3);var nl,xf;function X3(){if(xf)return nl;xf=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(s).map(function(h){return s[h]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(h){u[h]=h}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return nl=o()?Object.assign:function(i,s){for(var l,c=a(i),u,h=1;h<arguments.length;h++){l=Object(arguments[h]);for(var f in l)n.call(l,f)&&(c[f]=l[f]);if(e){u=e(l);for(var m=0;m<u.length;m++)r.call(l,u[m])&&(c[u[m]]=l[u[m]])}}return c},nl}var J3=X3();const e5=ra(J3);var yr={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},me={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(me).map(function(e){return me[e]});var Le={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},Fi={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},ao={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},t5=Object.keys(Fi).reduce(function(e,n){return e[Fi[n]]=n,e},{}),n5=[me.NOSCRIPT,me.SCRIPT,me.STYLE],Qt="data-react-helmet",r5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a5=function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")},o5=(function(){function e(n,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,r,a){return r&&e(n.prototype,r),a&&e(n,a),n}})(),yt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},i5=function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)},bf=function(e,n){var r={};for(var a in e)n.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},s5=function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:e},Zl=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r===!1?String(n):String(n).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},l5=function(n){var r=Wr(n,me.TITLE),a=Wr(n,ao.TITLE_TEMPLATE);if(a&&r)return a.replace(/%s/g,function(){return Array.isArray(r)?r.join(""):r});var o=Wr(n,ao.DEFAULT_TITLE);return r||o||void 0},c5=function(n){return Wr(n,ao.ON_CHANGE_CLIENT_STATE)||function(){}},rl=function(n,r){return r.filter(function(a){return typeof a[n]<"u"}).map(function(a){return a[n]}).reduce(function(a,o){return yt({},a,o)},{})},u5=function(n,r){return r.filter(function(a){return typeof a[me.BASE]<"u"}).map(function(a){return a[me.BASE]}).reverse().reduce(function(a,o){if(!a.length)for(var i=Object.keys(o),s=0;s<i.length;s++){var l=i[s],c=l.toLowerCase();if(n.indexOf(c)!==-1&&o[c])return a.concat(o)}return a},[])},wa=function(n,r,a){var o={};return a.filter(function(i){return Array.isArray(i[n])?!0:(typeof i[n]<"u"&&p5("Helmet: "+n+' should be of type "Array". Instead found type "'+r5(i[n])+'"'),!1)}).map(function(i){return i[n]}).reverse().reduce(function(i,s){var l={};s.filter(function(m){for(var g=void 0,y=Object.keys(m),v=0;v<y.length;v++){var x=y[v],b=x.toLowerCase();r.indexOf(b)!==-1&&!(g===Le.REL&&m[g].toLowerCase()==="canonical")&&!(b===Le.REL&&m[b].toLowerCase()==="stylesheet")&&(g=b),r.indexOf(x)!==-1&&(x===Le.INNER_HTML||x===Le.CSS_TEXT||x===Le.ITEM_PROP)&&(g=x)}if(!g||!m[g])return!1;var w=m[g].toLowerCase();return o[g]||(o[g]={}),l[g]||(l[g]={}),o[g][w]?!1:(l[g][w]=!0,!0)}).reverse().forEach(function(m){return i.push(m)});for(var c=Object.keys(l),u=0;u<c.length;u++){var h=c[u],f=e5({},o[h],l[h]);o[h]=f}return i},[]).reverse()},Wr=function(n,r){for(var a=n.length-1;a>=0;a--){var o=n[a];if(o.hasOwnProperty(r))return o[r]}return null},d5=function(n){return{baseTag:u5([Le.HREF,Le.TARGET],n),bodyAttributes:rl(yr.BODY,n),defer:Wr(n,ao.DEFER),encode:Wr(n,ao.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:rl(yr.HTML,n),linkTags:wa(me.LINK,[Le.REL,Le.HREF],n),metaTags:wa(me.META,[Le.NAME,Le.CHARSET,Le.HTTPEQUIV,Le.PROPERTY,Le.ITEM_PROP],n),noscriptTags:wa(me.NOSCRIPT,[Le.INNER_HTML],n),onChangeClientState:c5(n),scriptTags:wa(me.SCRIPT,[Le.SRC,Le.INNER_HTML],n),styleTags:wa(me.STYLE,[Le.CSS_TEXT],n),title:l5(n),titleAttributes:rl(yr.TITLE,n)}},Bl=(function(){var e=Date.now();return function(n){var r=Date.now();r-e>16?(e=r,n(r)):setTimeout(function(){Bl(n)},0)}})(),wf=function(n){return clearTimeout(n)},f5=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Bl:global.requestAnimationFrame||Bl,h5=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||wf:global.cancelAnimationFrame||wf,p5=function(n){return console&&typeof console.warn=="function"&&console.warn(n)},_a=null,m5=function(n){_a&&h5(_a),n.defer?_a=f5(function(){_f(n,function(){_a=null})}):(_f(n),_a=null)},_f=function(n,r){var a=n.baseTag,o=n.bodyAttributes,i=n.htmlAttributes,s=n.linkTags,l=n.metaTags,c=n.noscriptTags,u=n.onChangeClientState,h=n.scriptTags,f=n.styleTags,m=n.title,g=n.titleAttributes;ql(me.BODY,o),ql(me.HTML,i),g5(m,g);var y={baseTag:Fr(me.BASE,a),linkTags:Fr(me.LINK,s),metaTags:Fr(me.META,l),noscriptTags:Fr(me.NOSCRIPT,c),scriptTags:Fr(me.SCRIPT,h),styleTags:Fr(me.STYLE,f)},v={},x={};Object.keys(y).forEach(function(b){var w=y[b],E=w.newTags,C=w.oldTags;E.length&&(v[b]=E),C.length&&(x[b]=y[b].oldTags)}),r&&r(),u(n,v,x)},vg=function(n){return Array.isArray(n)?n.join(""):n},g5=function(n,r){typeof n<"u"&&document.title!==n&&(document.title=vg(n)),ql(me.TITLE,r)},ql=function(n,r){var a=document.getElementsByTagName(n)[0];if(a){for(var o=a.getAttribute(Qt),i=o?o.split(","):[],s=[].concat(i),l=Object.keys(r),c=0;c<l.length;c++){var u=l[c],h=r[u]||"";a.getAttribute(u)!==h&&a.setAttribute(u,h),i.indexOf(u)===-1&&i.push(u);var f=s.indexOf(u);f!==-1&&s.splice(f,1)}for(var m=s.length-1;m>=0;m--)a.removeAttribute(s[m]);i.length===s.length?a.removeAttribute(Qt):a.getAttribute(Qt)!==l.join(",")&&a.setAttribute(Qt,l.join(","))}},Fr=function(n,r){var a=document.head||document.querySelector(me.HEAD),o=a.querySelectorAll(n+"["+Qt+"]"),i=Array.prototype.slice.call(o),s=[],l=void 0;return r&&r.length&&r.forEach(function(c){var u=document.createElement(n);for(var h in c)if(c.hasOwnProperty(h))if(h===Le.INNER_HTML)u.innerHTML=c.innerHTML;else if(h===Le.CSS_TEXT)u.styleSheet?u.styleSheet.cssText=c.cssText:u.appendChild(document.createTextNode(c.cssText));else{var f=typeof c[h]>"u"?"":c[h];u.setAttribute(h,f)}u.setAttribute(Qt,"true"),i.some(function(m,g){return l=g,u.isEqualNode(m)})?i.splice(l,1):s.push(u)}),i.forEach(function(c){return c.parentNode.removeChild(c)}),s.forEach(function(c){return a.appendChild(c)}),{oldTags:i,newTags:s}},xg=function(n){return Object.keys(n).reduce(function(r,a){var o=typeof n[a]<"u"?a+'="'+n[a]+'"':""+a;return r?r+" "+o:o},"")},y5=function(n,r,a,o){var i=xg(a),s=vg(r);return i?"<"+n+" "+Qt+'="true" '+i+">"+Zl(s,o)+"</"+n+">":"<"+n+" "+Qt+'="true">'+Zl(s,o)+"</"+n+">"},v5=function(n,r,a){return r.reduce(function(o,i){var s=Object.keys(i).filter(function(u){return!(u===Le.INNER_HTML||u===Le.CSS_TEXT)}).reduce(function(u,h){var f=typeof i[h]>"u"?h:h+'="'+Zl(i[h],a)+'"';return u?u+" "+f:f},""),l=i.innerHTML||i.cssText||"",c=n5.indexOf(n)===-1;return o+"<"+n+" "+Qt+'="true" '+s+(c?"/>":">"+l+"</"+n+">")},"")},bg=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(n).reduce(function(a,o){return a[Fi[o]||o]=n[o],a},r)},x5=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(n).reduce(function(a,o){return a[t5[o]||o]=n[o],a},r)},b5=function(n,r,a){var o,i=(o={key:r},o[Qt]=!0,o),s=bg(a,i);return[he.createElement(me.TITLE,s,r)]},w5=function(n,r){return r.map(function(a,o){var i,s=(i={key:o},i[Qt]=!0,i);return Object.keys(a).forEach(function(l){var c=Fi[l]||l;if(c===Le.INNER_HTML||c===Le.CSS_TEXT){var u=a.innerHTML||a.cssText;s.dangerouslySetInnerHTML={__html:u}}else s[c]=a[l]}),he.createElement(n,s)})},Cn=function(n,r,a){switch(n){case me.TITLE:return{toComponent:function(){return b5(n,r.title,r.titleAttributes)},toString:function(){return y5(n,r.title,r.titleAttributes,a)}};case yr.BODY:case yr.HTML:return{toComponent:function(){return bg(r)},toString:function(){return xg(r)}};default:return{toComponent:function(){return w5(n,r)},toString:function(){return v5(n,r,a)}}}},wg=function(n){var r=n.baseTag,a=n.bodyAttributes,o=n.encode,i=n.htmlAttributes,s=n.linkTags,l=n.metaTags,c=n.noscriptTags,u=n.scriptTags,h=n.styleTags,f=n.title,m=f===void 0?"":f,g=n.titleAttributes;return{base:Cn(me.BASE,r,o),bodyAttributes:Cn(yr.BODY,a,o),htmlAttributes:Cn(yr.HTML,i,o),link:Cn(me.LINK,s,o),meta:Cn(me.META,l,o),noscript:Cn(me.NOSCRIPT,c,o),script:Cn(me.SCRIPT,u,o),style:Cn(me.STYLE,h,o),title:Cn(me.TITLE,{title:m,titleAttributes:g},o)}},_5=function(n){var r,a;return a=r=(function(o){i5(i,o);function i(){return a5(this,i),s5(this,o.apply(this,arguments))}return i.prototype.shouldComponentUpdate=function(l){return!Q3(this.props,l)},i.prototype.mapNestedChildrenToProps=function(l,c){if(!c)return null;switch(l.type){case me.SCRIPT:case me.NOSCRIPT:return{innerHTML:c};case me.STYLE:return{cssText:c}}throw new Error("<"+l.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},i.prototype.flattenArrayTypeChildren=function(l){var c,u=l.child,h=l.arrayTypeChildren,f=l.newChildProps,m=l.nestedChildren;return yt({},h,(c={},c[u.type]=[].concat(h[u.type]||[],[yt({},f,this.mapNestedChildrenToProps(u,m))]),c))},i.prototype.mapObjectTypeChildren=function(l){var c,u,h=l.child,f=l.newProps,m=l.newChildProps,g=l.nestedChildren;switch(h.type){case me.TITLE:return yt({},f,(c={},c[h.type]=g,c.titleAttributes=yt({},m),c));case me.BODY:return yt({},f,{bodyAttributes:yt({},m)});case me.HTML:return yt({},f,{htmlAttributes:yt({},m)})}return yt({},f,(u={},u[h.type]=yt({},m),u))},i.prototype.mapArrayTypeChildrenToProps=function(l,c){var u=yt({},c);return Object.keys(l).forEach(function(h){var f;u=yt({},u,(f={},f[h]=l[h],f))}),u},i.prototype.warnOnInvalidChildren=function(l,c){return!0},i.prototype.mapChildrenToProps=function(l,c){var u=this,h={};return he.Children.forEach(l,function(f){if(!(!f||!f.props)){var m=f.props,g=m.children,y=bf(m,["children"]),v=x5(y);switch(u.warnOnInvalidChildren(f,g),f.type){case me.LINK:case me.META:case me.NOSCRIPT:case me.SCRIPT:case me.STYLE:h=u.flattenArrayTypeChildren({child:f,arrayTypeChildren:h,newChildProps:v,nestedChildren:g});break;default:c=u.mapObjectTypeChildren({child:f,newProps:c,newChildProps:v,nestedChildren:g});break}}}),c=this.mapArrayTypeChildrenToProps(h,c),c},i.prototype.render=function(){var l=this.props,c=l.children,u=bf(l,["children"]),h=yt({},u);return c&&(h=this.mapChildrenToProps(c,h)),he.createElement(n,h)},o5(i,null,[{key:"canUseDOM",set:function(l){n.canUseDOM=l}}]),i})(he.Component),r.propTypes={base:k.object,bodyAttributes:k.object,children:k.oneOfType([k.arrayOf(k.node),k.node]),defaultTitle:k.string,defer:k.bool,encodeSpecialCharacters:k.bool,htmlAttributes:k.object,link:k.arrayOf(k.object),meta:k.arrayOf(k.object),noscript:k.arrayOf(k.object),onChangeClientState:k.func,script:k.arrayOf(k.object),style:k.arrayOf(k.object),title:k.string,titleAttributes:k.object,titleTemplate:k.string},r.defaultProps={defer:!0,encodeSpecialCharacters:!0},r.peek=n.peek,r.rewind=function(){var o=n.rewind();return o||(o=wg({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),o},a},E5=function(){return null},C5=G3(d5,m5,wg)(E5),Wl=_5(C5);Wl.renderStatic=Wl.rewind;function ft({title:e,variant:n="default",description:r,headerRight:a,children:o}){return p.jsxs(p.Fragment,{children:[p.jsx(Wl,{children:p.jsx("title",{children:e?`${e} | Ocean Brain`:"Ocean Brain"})}),n==="default"&&p.jsx("div",{className:"mb-4 pb-3 border-b-2 border-border",children:p.jsxs("div",{className:a?"flex items-center justify-between":void 0,children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-lg font-bold",children:e}),r&&p.jsx("p",{className:"text-sm text-fg-tertiary font-medium mt-1",children:r})]}),a]})}),n==="subtle"&&p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:a?"flex items-center justify-between":void 0,children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-lg font-bold",children:e}),r&&p.jsx("p",{className:"text-sm text-fg-tertiary font-medium mt-1",children:r})]}),a]})}),o]})}function S5({itemsPerPage:e,onItemsPerPageChange:n,isAutoLimit:r=!1,sortBy:a,onSortByChange:o,sortOrder:i,onSortOrderChange:s,pinnedFirst:l,onPinnedFirstChange:c}){return p.jsx("div",{className:"flex justify-end mb-4",children:p.jsxs("div",{className:"inline-flex flex-wrap gap-3 items-center px-4 py-2.5 bg-surface border-2 border-border rounded-sketchy-lg shadow-sketchy",children:[p.jsxs("div",{className:"flex gap-1.5 items-center",children:[p.jsx(Yc,{fontSize:24,className:"min-w-8 text-fg-tertiary"}),p.jsxs(yi,{value:r?"auto":String(e),onValueChange:u=>{u!=="auto"&&n(Number(u))},variant:"ghost",size:"sm",children:[r&&p.jsxs(Pn,{value:"auto",children:["Auto (",e,")"]}),p.jsx(Pn,{value:"25",children:"25"}),p.jsx(Pn,{value:"50",children:"50"}),p.jsx(Pn,{value:"100",children:"100"})]})]}),p.jsx("div",{className:"w-px h-5 bg-divider"}),p.jsxs("div",{className:"flex gap-1.5 items-center",children:[p.jsx(T1,{fontSize:24,className:"min-w-8 text-fg-tertiary"}),p.jsxs(yi,{value:a,onValueChange:u=>o(u),variant:"ghost",size:"sm",children:[p.jsx(Pn,{value:"updatedAt",children:"Updated"}),p.jsx(Pn,{value:"createdAt",children:"Created"})]}),p.jsxs(yi,{value:i,onValueChange:u=>s(u),variant:"ghost",size:"sm",children:[p.jsx(Pn,{value:"desc",children:"Newest"}),p.jsx(Pn,{value:"asc",children:"Oldest"})]})]}),p.jsx("div",{className:"w-px h-5 bg-divider"}),p.jsxs(Xn,{htmlFor:"pinnedFirst",size:"sm",className:"flex items-center gap-1.5 cursor-pointer",children:[p.jsx(iu,{id:"pinnedFirst",size:"sm",checked:l,onChange:u=>c(u.target.checked)}),p.jsx("span",{className:"text-fg-secondary",children:"Pinned First"})]})]})})}const A5=e=>{let n=!1;return()=>{n||(window.requestAnimationFrame(()=>{e(),n=!1}),n=!0)}},al=new Map;function R5(){const e=nn(),n=d.useRef(null);return d.useEffect(()=>{if(n.current?.parentElement){const{parentElement:r}=n.current,a=s=>{if(s!==0){al.set(e.pathname,s);return}al.delete(e.pathname)},o=A5(()=>{if(n.current){const{scrollTop:s}=r;a(s)}}),i=al.get(e.pathname);return i&&(r.scrollTop=i),r.addEventListener("scroll",o),()=>{r.removeEventListener("scroll",o)}}},[n,e]),p.jsx("div",{ref:n,style:{display:"none"}})}function M5(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return d.useMemo(()=>a=>{n.forEach(o=>o(a))},n)}const xs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function la(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function Ru(e){return"nodeType"in e}function wt(e){var n,r;return e?la(e)?e:Ru(e)&&(n=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?n:window:window}function Mu(e){const{Document:n}=wt(e);return e instanceof n}function Po(e){return la(e)?!1:e instanceof wt(e).HTMLElement}function _g(e){return e instanceof wt(e).SVGElement}function ca(e){return e?la(e)?e.document:Ru(e)?Mu(e)?e:Po(e)||_g(e)?e.ownerDocument:document:document:document}const vn=xs?d.useLayoutEffect:d.useEffect;function Tu(e){const n=d.useRef(e);return vn(()=>{n.current=e}),d.useCallback(function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n.current==null?void 0:n.current(...a)},[])}function T5(){const e=d.useRef(null),n=d.useCallback((a,o)=>{e.current=setInterval(a,o)},[]),r=d.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,r]}function oo(e,n){n===void 0&&(n=[e]);const r=d.useRef(e);return vn(()=>{r.current!==e&&(r.current=e)},n),r}function No(e,n){const r=d.useRef();return d.useMemo(()=>{const a=e(r.current);return r.current=a,a},[...n])}function $i(e){const n=Tu(e),r=d.useRef(null),a=d.useCallback(o=>{o!==r.current&&n?.(o,r.current),r.current=o},[]);return[r,a]}function Gl(e){const n=d.useRef();return d.useEffect(()=>{n.current=e},[e]),n.current}let ol={};function Oo(e,n){return d.useMemo(()=>{if(n)return n;const r=ol[e]==null?0:ol[e]+1;return ol[e]=r,e+"-"+r},[e,n])}function Eg(e){return function(n){for(var r=arguments.length,a=new Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return a.reduce((i,s)=>{const l=Object.entries(s);for(const[c,u]of l){const h=i[c];h!=null&&(i[c]=h+e*u)}return i},{...n})}}const Gr=Eg(1),io=Eg(-1);function P5(e){return"clientX"in e&&"clientY"in e}function Pu(e){if(!e)return!1;const{KeyboardEvent:n}=wt(e.target);return n&&e instanceof n}function N5(e){if(!e)return!1;const{TouchEvent:n}=wt(e.target);return n&&e instanceof n}function Kl(e){if(N5(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:r}=e.touches[0];return{x:n,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:r}=e.changedTouches[0];return{x:n,y:r}}}return P5(e)?{x:e.clientX,y:e.clientY}:null}const so=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:r}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:r}=e;return"scaleX("+n+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[so.Translate.toString(e),so.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:r,easing:a}=e;return n+" "+r+"ms "+a}}}),Ef="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function O5(e){return e.matches(Ef)?e:e.querySelector(Ef)}const j5={display:"none"};function D5(e){let{id:n,value:r}=e;return he.createElement("div",{id:n,style:j5},r)}function k5(e){let{id:n,announcement:r,ariaLiveType:a="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return he.createElement("div",{id:n,style:o,role:"status","aria-live":a,"aria-atomic":!0},r)}function I5(){const[e,n]=d.useState("");return{announce:d.useCallback(a=>{a!=null&&n(a)},[]),announcement:e}}const Cg=d.createContext(null);function L5(e){const n=d.useContext(Cg);d.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of <DndContext>");return n(e)},[e,n])}function F5(){const[e]=d.useState(()=>new Set),n=d.useCallback(a=>(e.add(a),()=>e.delete(a)),[e]);return[d.useCallback(a=>{let{type:o,event:i}=a;e.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,i)})},[e]),n]}const $5={draggable:`
16
- To pick up a draggable item, press the space bar.
17
- While dragging, use the arrow keys to move the item.
18
- Press space again to drop the item in its new position, or press escape to cancel.
19
- `},H5={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:r}=e;return r?"Draggable item "+n.id+" was moved over droppable area "+r.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:r}=e;return r?"Draggable item "+n.id+" was dropped over droppable area "+r.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function z5(e){let{announcements:n=H5,container:r,hiddenTextDescribedById:a,screenReaderInstructions:o=$5}=e;const{announce:i,announcement:s}=I5(),l=Oo("DndLiveRegion"),[c,u]=d.useState(!1);if(d.useEffect(()=>{u(!0)},[]),L5(d.useMemo(()=>({onDragStart(f){let{active:m}=f;i(n.onDragStart({active:m}))},onDragMove(f){let{active:m,over:g}=f;n.onDragMove&&i(n.onDragMove({active:m,over:g}))},onDragOver(f){let{active:m,over:g}=f;i(n.onDragOver({active:m,over:g}))},onDragEnd(f){let{active:m,over:g}=f;i(n.onDragEnd({active:m,over:g}))},onDragCancel(f){let{active:m,over:g}=f;i(n.onDragCancel({active:m,over:g}))}}),[i,n])),!c)return null;const h=he.createElement(he.Fragment,null,he.createElement(D5,{id:a,value:o.draggable}),he.createElement(k5,{id:l,announcement:s}));return r?On.createPortal(h,r):h}var Ge;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Ge||(Ge={}));function Hi(){}function Cf(e,n){return d.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function U5(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return d.useMemo(()=>[...n].filter(a=>a!=null),[...n])}const en=Object.freeze({x:0,y:0});function Sg(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function Ag(e,n){let{data:{value:r}}=e,{data:{value:a}}=n;return r-a}function V5(e,n){let{data:{value:r}}=e,{data:{value:a}}=n;return a-r}function Sf(e){let{left:n,top:r,height:a,width:o}=e;return[{x:n,y:r},{x:n+o,y:r},{x:n,y:r+a},{x:n+o,y:r+a}]}function Rg(e,n){if(!e||e.length===0)return null;const[r]=e;return r[n]}function Af(e,n,r){return n===void 0&&(n=e.left),r===void 0&&(r=e.top),{x:n+e.width*.5,y:r+e.height*.5}}const Z5=e=>{let{collisionRect:n,droppableRects:r,droppableContainers:a}=e;const o=Af(n,n.left,n.top),i=[];for(const s of a){const{id:l}=s,c=r.get(l);if(c){const u=Sg(Af(c),o);i.push({id:l,data:{droppableContainer:s,value:u}})}}return i.sort(Ag)},B5=e=>{let{collisionRect:n,droppableRects:r,droppableContainers:a}=e;const o=Sf(n),i=[];for(const s of a){const{id:l}=s,c=r.get(l);if(c){const u=Sf(c),h=o.reduce((m,g,y)=>m+Sg(u[y],g),0),f=Number((h/4).toFixed(4));i.push({id:l,data:{droppableContainer:s,value:f}})}}return i.sort(Ag)};function q5(e,n){const r=Math.max(n.top,e.top),a=Math.max(n.left,e.left),o=Math.min(n.left+n.width,e.left+e.width),i=Math.min(n.top+n.height,e.top+e.height),s=o-a,l=i-r;if(a<o&&r<i){const c=n.width*n.height,u=e.width*e.height,h=s*l,f=h/(c+u-h);return Number(f.toFixed(4))}return 0}const W5=e=>{let{collisionRect:n,droppableRects:r,droppableContainers:a}=e;const o=[];for(const i of a){const{id:s}=i,l=r.get(s);if(l){const c=q5(l,n);c>0&&o.push({id:s,data:{droppableContainer:i,value:c}})}}return o.sort(V5)};function G5(e,n,r){return{...e,scaleX:n&&r?n.width/r.width:1,scaleY:n&&r?n.height/r.height:1}}function Mg(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:en}function K5(e){return function(r){for(var a=arguments.length,o=new Array(a>1?a-1:0),i=1;i<a;i++)o[i-1]=arguments[i];return o.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...r})}}const Y5=K5(1);function Q5(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function X5(e,n,r){const a=Q5(n);if(!a)return e;const{scaleX:o,scaleY:i,x:s,y:l}=a,c=e.left-s-(1-o)*parseFloat(r),u=e.top-l-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),h=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:h,height:f,top:u,right:c+h,bottom:u+f,left:c}}const J5={ignoreTransform:!1};function ua(e,n){n===void 0&&(n=J5);let r=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:u,transformOrigin:h}=wt(e).getComputedStyle(e);u&&(r=X5(r,u,h))}const{top:a,left:o,width:i,height:s,bottom:l,right:c}=r;return{top:a,left:o,width:i,height:s,bottom:l,right:c}}function Rf(e){return ua(e,{ignoreTransform:!0})}function eE(e){const n=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:n,bottom:r,width:n,height:r}}function tE(e,n){return n===void 0&&(n=wt(e).getComputedStyle(e)),n.position==="fixed"}function nE(e,n){n===void 0&&(n=wt(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=n[o];return typeof i=="string"?r.test(i):!1})}function bs(e,n){const r=[];function a(o){if(n!=null&&r.length>=n||!o)return r;if(Mu(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!Po(o)||_g(o)||r.includes(o))return r;const i=wt(e).getComputedStyle(o);return o!==e&&nE(o,i)&&r.push(o),tE(o,i)?r:a(o.parentNode)}return e?a(e):r}function Tg(e){const[n]=bs(e,1);return n??null}function il(e){return!xs||!e?null:la(e)?e:Ru(e)?Mu(e)||e===ca(e).scrollingElement?window:Po(e)?e:null:null}function Pg(e){return la(e)?e.scrollX:e.scrollLeft}function Ng(e){return la(e)?e.scrollY:e.scrollTop}function Yl(e){return{x:Pg(e),y:Ng(e)}}var Qe;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Qe||(Qe={}));function Og(e){return!xs||!e?!1:e===document.scrollingElement}function jg(e){const n={x:0,y:0},r=Og(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},a={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=n.y,i=e.scrollLeft<=n.x,s=e.scrollTop>=a.y,l=e.scrollLeft>=a.x;return{isTop:o,isLeft:i,isBottom:s,isRight:l,maxScroll:a,minScroll:n}}const rE={x:.2,y:.2};function aE(e,n,r,a,o){let{top:i,left:s,right:l,bottom:c}=r;a===void 0&&(a=10),o===void 0&&(o=rE);const{isTop:u,isBottom:h,isLeft:f,isRight:m}=jg(e),g={x:0,y:0},y={x:0,y:0},v={height:n.height*o.y,width:n.width*o.x};return!u&&i<=n.top+v.height?(g.y=Qe.Backward,y.y=a*Math.abs((n.top+v.height-i)/v.height)):!h&&c>=n.bottom-v.height&&(g.y=Qe.Forward,y.y=a*Math.abs((n.bottom-v.height-c)/v.height)),!m&&l>=n.right-v.width?(g.x=Qe.Forward,y.x=a*Math.abs((n.right-v.width-l)/v.width)):!f&&s<=n.left+v.width&&(g.x=Qe.Backward,y.x=a*Math.abs((n.left+v.width-s)/v.width)),{direction:g,speed:y}}function oE(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:n,left:r,right:a,bottom:o}=e.getBoundingClientRect();return{top:n,left:r,right:a,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Dg(e){return e.reduce((n,r)=>Gr(n,Yl(r)),en)}function iE(e){return e.reduce((n,r)=>n+Pg(r),0)}function sE(e){return e.reduce((n,r)=>n+Ng(r),0)}function lE(e,n){if(n===void 0&&(n=ua),!e)return;const{top:r,left:a,bottom:o,right:i}=n(e);Tg(e)&&(o<=0||i<=0||r>=window.innerHeight||a>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const cE=[["x",["left","right"],iE],["y",["top","bottom"],sE]];class Nu{constructor(n,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const a=bs(r),o=Dg(a);this.rect={...n},this.width=n.width,this.height=n.height;for(const[i,s,l]of cE)for(const c of s)Object.defineProperty(this,c,{get:()=>{const u=l(a),h=o[i]-u;return this.rect[c]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Va{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var a;return(a=this.target)==null?void 0:a.removeEventListener(...r)})},this.target=n}add(n,r,a){var o;(o=this.target)==null||o.addEventListener(n,r,a),this.listeners.push([n,r,a])}}function uE(e){const{EventTarget:n}=wt(e);return e instanceof n?e:ca(e)}function sl(e,n){const r=Math.abs(e.x),a=Math.abs(e.y);return typeof n=="number"?Math.sqrt(r**2+a**2)>n:"x"in n&&"y"in n?r>n.x&&a>n.y:"x"in n?r>n.x:"y"in n?a>n.y:!1}var Ft;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ft||(Ft={}));function Mf(e){e.preventDefault()}function dE(e){e.stopPropagation()}var Ee;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ee||(Ee={}));const kg={start:[Ee.Space,Ee.Enter],cancel:[Ee.Esc],end:[Ee.Space,Ee.Enter,Ee.Tab]},fE=(e,n)=>{let{currentCoordinates:r}=n;switch(e.code){case Ee.Right:return{...r,x:r.x+25};case Ee.Left:return{...r,x:r.x-25};case Ee.Down:return{...r,y:r.y+25};case Ee.Up:return{...r,y:r.y-25}}};class Ou{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:r}}=n;this.props=n,this.listeners=new Va(ca(r)),this.windowListeners=new Va(wt(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ft.Resize,this.handleCancel),this.windowListeners.add(Ft.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ft.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:r}=this.props,a=n.node.current;a&&lE(a),r(en)}handleKeyDown(n){if(Pu(n)){const{active:r,context:a,options:o}=this.props,{keyboardCodes:i=kg,coordinateGetter:s=fE,scrollBehavior:l="smooth"}=o,{code:c}=n;if(i.end.includes(c)){this.handleEnd(n);return}if(i.cancel.includes(c)){this.handleCancel(n);return}const{collisionRect:u}=a.current,h=u?{x:u.left,y:u.top}:en;this.referenceCoordinates||(this.referenceCoordinates=h);const f=s(n,{active:r,context:a.current,currentCoordinates:h});if(f){const m=io(f,h),g={x:0,y:0},{scrollableAncestors:y}=a.current;for(const v of y){const x=n.code,{isTop:b,isRight:w,isLeft:E,isBottom:C,maxScroll:S,minScroll:M}=jg(v),R=oE(v),_={x:Math.min(x===Ee.Right?R.right-R.width/2:R.right,Math.max(x===Ee.Right?R.left:R.left+R.width/2,f.x)),y:Math.min(x===Ee.Down?R.bottom-R.height/2:R.bottom,Math.max(x===Ee.Down?R.top:R.top+R.height/2,f.y))},O=x===Ee.Right&&!w||x===Ee.Left&&!E,P=x===Ee.Down&&!C||x===Ee.Up&&!b;if(O&&_.x!==f.x){const j=v.scrollLeft+m.x,$=x===Ee.Right&&j<=S.x||x===Ee.Left&&j>=M.x;if($&&!m.y){v.scrollTo({left:j,behavior:l});return}$?g.x=v.scrollLeft-j:g.x=x===Ee.Right?v.scrollLeft-S.x:v.scrollLeft-M.x,g.x&&v.scrollBy({left:-g.x,behavior:l});break}else if(P&&_.y!==f.y){const j=v.scrollTop+m.y,$=x===Ee.Down&&j<=S.y||x===Ee.Up&&j>=M.y;if($&&!m.x){v.scrollTo({top:j,behavior:l});return}$?g.y=v.scrollTop-j:g.y=x===Ee.Down?v.scrollTop-S.y:v.scrollTop-M.y,g.y&&v.scrollBy({top:-g.y,behavior:l});break}}this.handleMove(n,Gr(io(f,this.referenceCoordinates),g))}}}handleMove(n,r){const{onMove:a}=this.props;n.preventDefault(),a(r)}handleEnd(n){const{onEnd:r}=this.props;n.preventDefault(),this.detach(),r()}handleCancel(n){const{onCancel:r}=this.props;n.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Ou.activators=[{eventName:"onKeyDown",handler:(e,n,r)=>{let{keyboardCodes:a=kg,onActivation:o}=n,{active:i}=r;const{code:s}=e.nativeEvent;if(a.start.includes(s)){const l=i.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function Tf(e){return!!(e&&"distance"in e)}function Pf(e){return!!(e&&"delay"in e)}class ju{constructor(n,r,a){var o;a===void 0&&(a=uE(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=r;const{event:i}=n,{target:s}=i;this.props=n,this.events=r,this.document=ca(s),this.documentListeners=new Va(this.document),this.listeners=new Va(a),this.windowListeners=new Va(wt(s)),this.initialCoordinates=(o=Kl(i))!=null?o:en,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:r,bypassActivationConstraint:a}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(Ft.Resize,this.handleCancel),this.windowListeners.add(Ft.DragStart,Mf),this.windowListeners.add(Ft.VisibilityChange,this.handleCancel),this.windowListeners.add(Ft.ContextMenu,Mf),this.documentListeners.add(Ft.Keydown,this.handleKeydown),r){if(a!=null&&a({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Pf(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Tf(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,r){const{active:a,onPending:o}=this.props;o(a,n,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:n}=this,{onStart:r}=this.props;n&&(this.activated=!0,this.documentListeners.add(Ft.Click,dE,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ft.SelectionChange,this.removeTextSelection),r(n))}handleMove(n){var r;const{activated:a,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:l}}=i;if(!o)return;const c=(r=Kl(n))!=null?r:en,u=io(o,c);if(!a&&l){if(Tf(l)){if(l.tolerance!=null&&sl(u,l.tolerance))return this.handleCancel();if(sl(u,l.distance))return this.handleStart()}if(Pf(l)&&sl(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}n.cancelable&&n.preventDefault(),s(c)}handleEnd(){const{onAbort:n,onEnd:r}=this.props;this.detach(),this.activated||n(this.props.active),r()}handleCancel(){const{onAbort:n,onCancel:r}=this.props;this.detach(),this.activated||n(this.props.active),r()}handleKeydown(n){n.code===Ee.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const hE={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Du extends ju{constructor(n){const{event:r}=n,a=ca(r.target);super(n,hE,a)}}Du.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:r}=e,{onActivation:a}=n;return!r.isPrimary||r.button!==0?!1:(a?.({event:r}),!0)}}];const pE={move:{name:"mousemove"},end:{name:"mouseup"}};var Ql;(function(e){e[e.RightClick=2]="RightClick"})(Ql||(Ql={}));class mE extends ju{constructor(n){super(n,pE,ca(n.event.target))}}mE.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:r}=e,{onActivation:a}=n;return r.button===Ql.RightClick?!1:(a?.({event:r}),!0)}}];const ll={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class gE extends ju{constructor(n){super(n,ll)}static setup(){return window.addEventListener(ll.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(ll.move.name,n)};function n(){}}}gE.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:r}=e,{onActivation:a}=n;const{touches:o}=r;return o.length>1?!1:(a?.({event:r}),!0)}}];var Za;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Za||(Za={}));var zi;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(zi||(zi={}));function yE(e){let{acceleration:n,activator:r=Za.Pointer,canScroll:a,draggingRect:o,enabled:i,interval:s=5,order:l=zi.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:h,delta:f,threshold:m}=e;const g=xE({delta:f,disabled:!i}),[y,v]=T5(),x=d.useRef({x:0,y:0}),b=d.useRef({x:0,y:0}),w=d.useMemo(()=>{switch(r){case Za.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Za.DraggableRect:return o}},[r,o,c]),E=d.useRef(null),C=d.useCallback(()=>{const M=E.current;if(!M)return;const R=x.current.x*b.current.x,_=x.current.y*b.current.y;M.scrollBy(R,_)},[]),S=d.useMemo(()=>l===zi.TreeOrder?[...u].reverse():u,[l,u]);d.useEffect(()=>{if(!i||!u.length||!w){v();return}for(const M of S){if(a?.(M)===!1)continue;const R=u.indexOf(M),_=h[R];if(!_)continue;const{direction:O,speed:P}=aE(M,_,w,n,m);for(const j of["x","y"])g[j][O[j]]||(P[j]=0,O[j]=0);if(P.x>0||P.y>0){v(),E.current=M,y(C,s),x.current=P,b.current=O;return}}x.current={x:0,y:0},b.current={x:0,y:0},v()},[n,C,a,v,i,s,JSON.stringify(w),JSON.stringify(g),y,u,S,h,JSON.stringify(m)])}const vE={x:{[Qe.Backward]:!1,[Qe.Forward]:!1},y:{[Qe.Backward]:!1,[Qe.Forward]:!1}};function xE(e){let{delta:n,disabled:r}=e;const a=Gl(n);return No(o=>{if(r||!a||!o)return vE;const i={x:Math.sign(n.x-a.x),y:Math.sign(n.y-a.y)};return{x:{[Qe.Backward]:o.x[Qe.Backward]||i.x===-1,[Qe.Forward]:o.x[Qe.Forward]||i.x===1},y:{[Qe.Backward]:o.y[Qe.Backward]||i.y===-1,[Qe.Forward]:o.y[Qe.Forward]||i.y===1}}},[r,n,a])}function bE(e,n){const r=n!=null?e.get(n):void 0,a=r?r.node.current:null;return No(o=>{var i;return n==null?null:(i=a??o)!=null?i:null},[a,n])}function wE(e,n){return d.useMemo(()=>e.reduce((r,a)=>{const{sensor:o}=a,i=o.activators.map(s=>({eventName:s.eventName,handler:n(s.handler,a)}));return[...r,...i]},[]),[e,n])}var lo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(lo||(lo={}));var Xl;(function(e){e.Optimized="optimized"})(Xl||(Xl={}));const Nf=new Map;function _E(e,n){let{dragging:r,dependencies:a,config:o}=n;const[i,s]=d.useState(null),{frequency:l,measure:c,strategy:u}=o,h=d.useRef(e),f=x(),m=oo(f),g=d.useCallback(function(b){b===void 0&&(b=[]),!m.current&&s(w=>w===null?b:w.concat(b.filter(E=>!w.includes(E))))},[m]),y=d.useRef(null),v=No(b=>{if(f&&!r)return Nf;if(!b||b===Nf||h.current!==e||i!=null){const w=new Map;for(let E of e){if(!E)continue;if(i&&i.length>0&&!i.includes(E.id)&&E.rect.current){w.set(E.id,E.rect.current);continue}const C=E.node.current,S=C?new Nu(c(C),C):null;E.rect.current=S,S&&w.set(E.id,S)}return w}return b},[e,i,r,f,c]);return d.useEffect(()=>{h.current=e},[e]),d.useEffect(()=>{f||g()},[r,f]),d.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),d.useEffect(()=>{f||typeof l!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},l))},[l,f,g,...a]),{droppableRects:v,measureDroppableContainers:g,measuringScheduled:i!=null};function x(){switch(u){case lo.Always:return!1;case lo.BeforeDragging:return r;default:return!r}}}function Ig(e,n){return No(r=>e?r||(typeof n=="function"?n(e):e):null,[n,e])}function EE(e,n){return Ig(e,n)}function CE(e){let{callback:n,disabled:r}=e;const a=Tu(n),o=d.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(a)},[a,r]);return d.useEffect(()=>()=>o?.disconnect(),[o]),o}function ws(e){let{callback:n,disabled:r}=e;const a=Tu(n),o=d.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(a)},[r]);return d.useEffect(()=>()=>o?.disconnect(),[o]),o}function SE(e){return new Nu(ua(e),e)}function Of(e,n,r){n===void 0&&(n=SE);const[a,o]=d.useState(null);function i(){o(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??r)!=null?u:null}const h=n(e);return JSON.stringify(c)===JSON.stringify(h)?c:h})}const s=CE({callback(c){if(e)for(const u of c){const{type:h,target:f}=u;if(h==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),l=ws({callback:i});return vn(()=>{i(),e?(l?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(l?.disconnect(),s?.disconnect())},[e]),a}function AE(e){const n=Ig(e);return Mg(e,n)}const jf=[];function RE(e){const n=d.useRef(e),r=No(a=>e?a&&a!==jf&&e&&n.current&&e.parentNode===n.current.parentNode?a:bs(e):jf,[e]);return d.useEffect(()=>{n.current=e},[e]),r}function ME(e){const[n,r]=d.useState(null),a=d.useRef(e),o=d.useCallback(i=>{const s=il(i.target);s&&r(l=>l?(l.set(s,Yl(s)),new Map(l)):null)},[]);return d.useEffect(()=>{const i=a.current;if(e!==i){s(i);const l=e.map(c=>{const u=il(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,Yl(u)]):null}).filter(c=>c!=null);r(l.length?new Map(l):null),a.current=e}return()=>{s(e),s(i)};function s(l){l.forEach(c=>{const u=il(c);u?.removeEventListener("scroll",o)})}},[o,e]),d.useMemo(()=>e.length?n?Array.from(n.values()).reduce((i,s)=>Gr(i,s),en):Dg(e):en,[e,n])}function Df(e,n){n===void 0&&(n=[]);const r=d.useRef(null);return d.useEffect(()=>{r.current=null},n),d.useEffect(()=>{const a=e!==en;a&&!r.current&&(r.current=e),!a&&r.current&&(r.current=null)},[e]),r.current?io(e,r.current):en}function TE(e){d.useEffect(()=>{if(!xs)return;const n=e.map(r=>{let{sensor:a}=r;return a.setup==null?void 0:a.setup()});return()=>{for(const r of n)r?.()}},e.map(n=>{let{sensor:r}=n;return r}))}function PE(e,n){return d.useMemo(()=>e.reduce((r,a)=>{let{eventName:o,handler:i}=a;return r[o]=s=>{i(s,n)},r},{}),[e,n])}function Lg(e){return d.useMemo(()=>e?eE(e):null,[e])}const kf=[];function NE(e,n){n===void 0&&(n=ua);const[r]=e,a=Lg(r?wt(r):null),[o,i]=d.useState(kf);function s(){i(()=>e.length?e.map(c=>Og(c)?a:new Nu(n(c),c)):kf)}const l=ws({callback:s});return vn(()=>{l?.disconnect(),s(),e.forEach(c=>l?.observe(c))},[e]),o}function OE(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Po(n)?n:e}function jE(e){let{measure:n}=e;const[r,a]=d.useState(null),o=d.useCallback(u=>{for(const{target:h}of u)if(Po(h)){a(f=>{const m=n(h);return f?{...f,width:m.width,height:m.height}:m});break}},[n]),i=ws({callback:o}),s=d.useCallback(u=>{const h=OE(u);i?.disconnect(),h&&i?.observe(h),a(h?n(h):null)},[n,i]),[l,c]=$i(s);return d.useMemo(()=>({nodeRef:l,rect:r,setRef:c}),[r,l,c])}const DE=[{sensor:Du,options:{}},{sensor:Ou,options:{}}],kE={current:{}},vi={draggable:{measure:Rf},droppable:{measure:Rf,strategy:lo.WhileDragging,frequency:Xl.Optimized},dragOverlay:{measure:ua}};class Ba extends Map{get(n){var r;return n!=null&&(r=super.get(n))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:r}=n;return!r})}getNodeFor(n){var r,a;return(r=(a=this.get(n))==null?void 0:a.node.current)!=null?r:void 0}}const IE={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ba,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Hi},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:vi,measureDroppableContainers:Hi,windowRect:null,measuringScheduled:!1},LE={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Hi,draggableNodes:new Map,over:null,measureDroppableContainers:Hi},_s=d.createContext(LE),Fg=d.createContext(IE);function FE(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ba}}}function $E(e,n){switch(n.type){case Ge.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case Ge.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case Ge.DragEnd:case Ge.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ge.RegisterDroppable:{const{element:r}=n,{id:a}=r,o=new Ba(e.droppable.containers);return o.set(a,r),{...e,droppable:{...e.droppable,containers:o}}}case Ge.SetDroppableDisabled:{const{id:r,key:a,disabled:o}=n,i=e.droppable.containers.get(r);if(!i||a!==i.key)return e;const s=new Ba(e.droppable.containers);return s.set(r,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case Ge.UnregisterDroppable:{const{id:r,key:a}=n,o=e.droppable.containers.get(r);if(!o||a!==o.key)return e;const i=new Ba(e.droppable.containers);return i.delete(r),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function HE(e){let{disabled:n}=e;const{active:r,activatorEvent:a,draggableNodes:o}=d.useContext(_s),i=Gl(a),s=Gl(r?.id);return d.useEffect(()=>{if(!n&&!a&&i&&s!=null){if(!Pu(i)||document.activeElement===i.target)return;const l=o.get(s);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const h of[c.current,u.current]){if(!h)continue;const f=O5(h);if(f){f.focus();break}}})}},[a,n,o,s,i]),null}function zE(e,n){let{transform:r,...a}=n;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...a}),r):r}function UE(e){return d.useMemo(()=>({draggable:{...vi.draggable,...e?.draggable},droppable:{...vi.droppable,...e?.droppable},dragOverlay:{...vi.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function VE(e){let{activeNode:n,measure:r,initialRect:a,config:o=!0}=e;const i=d.useRef(!1),{x:s,y:l}=typeof o=="boolean"?{x:o,y:o}:o;vn(()=>{if(!s&&!l||!n){i.current=!1;return}if(i.current||!a)return;const u=n?.node.current;if(!u||u.isConnected===!1)return;const h=r(u),f=Mg(h,a);if(s||(f.x=0),l||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const m=Tg(u);m&&m.scrollBy({top:f.y,left:f.x})}},[n,s,l,a,r])}const $g=d.createContext({...en,scaleX:1,scaleY:1});var qn;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(qn||(qn={}));const ZE=d.memo(function(n){var r,a,o,i;let{id:s,accessibility:l,autoScroll:c=!0,children:u,sensors:h=DE,collisionDetection:f=W5,measuring:m,modifiers:g,...y}=n;const v=d.useReducer($E,void 0,FE),[x,b]=v,[w,E]=F5(),[C,S]=d.useState(qn.Uninitialized),M=C===qn.Initialized,{draggable:{active:R,nodes:_,translate:O},droppable:{containers:P}}=x,j=R!=null?_.get(R):null,$=d.useRef({initial:null,translated:null}),V=d.useMemo(()=>{var We;return R!=null?{id:R,data:(We=j?.data)!=null?We:kE,rect:$}:null},[R,j]),A=d.useRef(null),[D,T]=d.useState(null),[F,H]=d.useState(null),I=oo(y,Object.values(y)),Z=Oo("DndDescribedBy",s),B=d.useMemo(()=>P.getEnabled(),[P]),q=UE(m),{droppableRects:X,measureDroppableContainers:Q,measuringScheduled:oe}=_E(B,{dragging:M,dependencies:[O.x,O.y],config:q.droppable}),le=bE(_,R),G=d.useMemo(()=>F?Kl(F):null,[F]),ie=kr(),pe=EE(le,q.draggable.measure);VE({activeNode:R!=null?_.get(R):null,config:ie.layoutShiftCompensation,initialRect:pe,measure:q.draggable.measure});const J=Of(le,q.draggable.measure,pe),ge=Of(le?le.parentElement:null),ve=d.useRef({activatorEvent:null,active:null,activeNode:le,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:_,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ye=P.getNodeFor((r=ve.current.over)==null?void 0:r.id),Ie=jE({measure:q.dragOverlay.measure}),Et=(a=Ie.nodeRef.current)!=null?a:le,Tt=M?(o=Ie.rect)!=null?o:J:null,mt=!!(Ie.nodeRef.current&&Ie.rect),Uo=AE(mt?null:J),fa=Lg(Et?wt(Et):null),Zt=RE(M?ye??le:null),jr=NE(Zt),Dr=zE(g,{transform:{x:O.x-Uo.x,y:O.y-Uo.y,scaleX:1,scaleY:1},activatorEvent:F,active:V,activeNodeRect:J,containerNodeRect:ge,draggingNodeRect:Tt,over:ve.current.over,overlayNodeRect:Ie.rect,scrollableAncestors:Zt,scrollableAncestorRects:jr,windowRect:fa}),Vo=G?Gr(G,O):null,Zo=ME(Zt),_n=Df(Zo),sr=Df(Zo,[J]),En=Gr(Dr,_n),sn=Tt?Y5(Tt,Dr):null,it=V&&sn?f({active:V,collisionRect:sn,droppableRects:X,droppableContainers:B,pointerCoordinates:Vo}):null,Pt=Rg(it,"id"),[Bt,Bo]=d.useState(null),ha=mt?Dr:Gr(Dr,sr),Is=G5(ha,(i=Bt?.rect)!=null?i:null,J),Ct=d.useRef(null),pa=d.useCallback((We,Xe)=>{let{sensor:st,options:qt}=Xe;if(A.current==null)return;const gt=_.get(A.current);if(!gt)return;const et=We.nativeEvent,lt=new st({active:A.current,activeNode:gt,event:et,options:qt,context:ve,onAbort(qe){if(!_.get(qe))return;const{onDragAbort:Nt}=I.current,N={id:qe};Nt?.(N),w({type:"onDragAbort",event:N})},onPending(qe,ln,Nt,N){if(!_.get(qe))return;const{onDragPending:z}=I.current,W={id:qe,constraint:ln,initialCoordinates:Nt,offset:N};z?.(W),w({type:"onDragPending",event:W})},onStart(qe){const ln=A.current;if(ln==null)return;const Nt=_.get(ln);if(!Nt)return;const{onDragStart:N}=I.current,L={activatorEvent:et,active:{id:ln,data:Nt.data,rect:$}};On.unstable_batchedUpdates(()=>{N?.(L),S(qn.Initializing),b({type:Ge.DragStart,initialCoordinates:qe,active:ln}),w({type:"onDragStart",event:L}),T(Ct.current),H(et)})},onMove(qe){b({type:Ge.DragMove,coordinates:qe})},onEnd:Wt(Ge.DragEnd),onCancel:Wt(Ge.DragCancel)});Ct.current=lt;function Wt(qe){return async function(){const{active:Nt,collisions:N,over:L,scrollAdjustedTranslate:z}=ve.current;let W=null;if(Nt&&z){const{cancelDrop:K}=I.current;W={activatorEvent:et,active:Nt,collisions:N,delta:z,over:L},qe===Ge.DragEnd&&typeof K=="function"&&await Promise.resolve(K(W))&&(qe=Ge.DragCancel)}A.current=null,On.unstable_batchedUpdates(()=>{b({type:qe}),S(qn.Uninitialized),Bo(null),T(null),H(null),Ct.current=null;const K=qe===Ge.DragEnd?"onDragEnd":"onDragCancel";if(W){const re=I.current[K];re?.(W),w({type:K,event:W})}})}}},[_]),qo=d.useCallback((We,Xe)=>(st,qt)=>{const gt=st.nativeEvent,et=_.get(qt);if(A.current!==null||!et||gt.dndKit||gt.defaultPrevented)return;const lt={active:et};We(st,Xe.options,lt)===!0&&(gt.dndKit={capturedBy:Xe.sensor},A.current=qt,pa(st,Xe))},[_,pa]),ma=wE(h,qo);TE(h),vn(()=>{J&&C===qn.Initializing&&S(qn.Initialized)},[J,C]),d.useEffect(()=>{const{onDragMove:We}=I.current,{active:Xe,activatorEvent:st,collisions:qt,over:gt}=ve.current;if(!Xe||!st)return;const et={active:Xe,activatorEvent:st,collisions:qt,delta:{x:En.x,y:En.y},over:gt};On.unstable_batchedUpdates(()=>{We?.(et),w({type:"onDragMove",event:et})})},[En.x,En.y]),d.useEffect(()=>{const{active:We,activatorEvent:Xe,collisions:st,droppableContainers:qt,scrollAdjustedTranslate:gt}=ve.current;if(!We||A.current==null||!Xe||!gt)return;const{onDragOver:et}=I.current,lt=qt.get(Pt),Wt=lt&&lt.rect.current?{id:lt.id,rect:lt.rect.current,data:lt.data,disabled:lt.disabled}:null,qe={active:We,activatorEvent:Xe,collisions:st,delta:{x:gt.x,y:gt.y},over:Wt};On.unstable_batchedUpdates(()=>{Bo(Wt),et?.(qe),w({type:"onDragOver",event:qe})})},[Pt]),vn(()=>{ve.current={activatorEvent:F,active:V,activeNode:le,collisionRect:sn,collisions:it,droppableRects:X,draggableNodes:_,draggingNode:Et,draggingNodeRect:Tt,droppableContainers:P,over:Bt,scrollableAncestors:Zt,scrollAdjustedTranslate:En},$.current={initial:Tt,translated:sn}},[V,le,it,sn,_,Et,Tt,X,P,Bt,Zt,En]),yE({...ie,delta:O,draggingRect:sn,pointerCoordinates:Vo,scrollableAncestors:Zt,scrollableAncestorRects:jr});const Ls=d.useMemo(()=>({active:V,activeNode:le,activeNodeRect:J,activatorEvent:F,collisions:it,containerNodeRect:ge,dragOverlay:Ie,draggableNodes:_,droppableContainers:P,droppableRects:X,over:Bt,measureDroppableContainers:Q,scrollableAncestors:Zt,scrollableAncestorRects:jr,measuringConfiguration:q,measuringScheduled:oe,windowRect:fa}),[V,le,J,F,it,ge,Ie,_,P,X,Bt,Q,Zt,jr,q,oe,fa]),Wo=d.useMemo(()=>({activatorEvent:F,activators:ma,active:V,activeNodeRect:J,ariaDescribedById:{draggable:Z},dispatch:b,draggableNodes:_,over:Bt,measureDroppableContainers:Q}),[F,ma,V,J,b,Z,_,Bt,Q]);return he.createElement(Cg.Provider,{value:E},he.createElement(_s.Provider,{value:Wo},he.createElement(Fg.Provider,{value:Ls},he.createElement($g.Provider,{value:Is},u)),he.createElement(HE,{disabled:l?.restoreFocus===!1})),he.createElement(z5,{...l,hiddenTextDescribedById:Z}));function kr(){const We=D?.autoScrollEnabled===!1,Xe=typeof c=="object"?c.enabled===!1:c===!1,st=M&&!We&&!Xe;return typeof c=="object"?{...c,enabled:st}:{enabled:st}}}),BE=d.createContext(null),If="button",qE="Draggable";function WE(e){let{id:n,data:r,disabled:a=!1,attributes:o}=e;const i=Oo(qE),{activators:s,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:h,draggableNodes:f,over:m}=d.useContext(_s),{role:g=If,roleDescription:y="draggable",tabIndex:v=0}=o??{},x=c?.id===n,b=d.useContext(x?$g:BE),[w,E]=$i(),[C,S]=$i(),M=PE(s,n),R=oo(r);vn(()=>(f.set(n,{id:n,key:i,node:w,activatorNode:C,data:R}),()=>{const O=f.get(n);O&&O.key===i&&f.delete(n)}),[f,n]);const _=d.useMemo(()=>({role:g,tabIndex:v,"aria-disabled":a,"aria-pressed":x&&g===If?!0:void 0,"aria-roledescription":y,"aria-describedby":h.draggable}),[a,g,v,x,y,h.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:_,isDragging:x,listeners:a?void 0:M,node:w,over:m,setNodeRef:E,setActivatorNodeRef:S,transform:b}}function GE(){return d.useContext(Fg)}const KE="Droppable",YE={timeout:25};function QE(e){let{data:n,disabled:r=!1,id:a,resizeObserverConfig:o}=e;const i=Oo(KE),{active:s,dispatch:l,over:c,measureDroppableContainers:u}=d.useContext(_s),h=d.useRef({disabled:r}),f=d.useRef(!1),m=d.useRef(null),g=d.useRef(null),{disabled:y,updateMeasurementsFor:v,timeout:x}={...YE,...o},b=oo(v??a),w=d.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(b.current)?b.current:[b.current]),g.current=null},x)},[x]),E=ws({callback:w,disabled:y||!s}),C=d.useCallback((_,O)=>{E&&(O&&(E.unobserve(O),f.current=!1),_&&E.observe(_))},[E]),[S,M]=$i(C),R=oo(n);return d.useEffect(()=>{!E||!S.current||(E.disconnect(),f.current=!1,E.observe(S.current))},[S,E]),d.useEffect(()=>(l({type:Ge.RegisterDroppable,element:{id:a,key:i,disabled:r,node:S,rect:m,data:R}}),()=>l({type:Ge.UnregisterDroppable,key:i,id:a})),[a]),d.useEffect(()=>{r!==h.current.disabled&&(l({type:Ge.SetDroppableDisabled,id:a,key:i,disabled:r}),h.current.disabled=r)},[a,i,r,l]),{active:s,rect:m,isOver:c?.id===a,node:S,over:c,setNodeRef:M}}function ku(e,n,r){const a=e.slice();return a.splice(r<0?a.length+r:r,0,a.splice(n,1)[0]),a}function XE(e,n){return e.reduce((r,a,o)=>{const i=n.get(a);return i&&(r[o]=i),r},Array(e.length))}function ai(e){return e!==null&&e>=0}function JE(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==n[r])return!1;return!0}function eC(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Hg=e=>{let{rects:n,activeIndex:r,overIndex:a,index:o}=e;const i=ku(n,a,r),s=n[o],l=i[o];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},oi={scaleX:1,scaleY:1},tC=e=>{var n;let{activeIndex:r,activeNodeRect:a,index:o,rects:i,overIndex:s}=e;const l=(n=i[r])!=null?n:a;if(!l)return null;if(o===r){const u=i[s];return u?{x:0,y:r<s?u.top+u.height-(l.top+l.height):u.top-l.top,...oi}:null}const c=nC(i,o,r);return o>r&&o<=s?{x:0,y:-l.height-c,...oi}:o<r&&o>=s?{x:0,y:l.height+c,...oi}:{x:0,y:0,...oi}};function nC(e,n,r){const a=e[n],o=e[n-1],i=e[n+1];return a?r<n?o?a.top-(o.top+o.height):i?i.top-(a.top+a.height):0:i?i.top-(a.top+a.height):o?a.top-(o.top+o.height):0:0}const zg="Sortable",Ug=he.createContext({activeIndex:-1,containerId:zg,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Hg,disabled:{draggable:!1,droppable:!1}});function rC(e){let{children:n,id:r,items:a,strategy:o=Hg,disabled:i=!1}=e;const{active:s,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:h}=GE(),f=Oo(zg,r),m=l.rect!==null,g=d.useMemo(()=>a.map(M=>typeof M=="object"&&"id"in M?M.id:M),[a]),y=s!=null,v=s?g.indexOf(s.id):-1,x=u?g.indexOf(u.id):-1,b=d.useRef(g),w=!JE(g,b.current),E=x!==-1&&v===-1||w,C=eC(i);vn(()=>{w&&y&&h(g)},[w,g,y,h]),d.useEffect(()=>{b.current=g},[g]);const S=d.useMemo(()=>({activeIndex:v,containerId:f,disabled:C,disableTransforms:E,items:g,overIndex:x,useDragOverlay:m,sortedRects:XE(g,c),strategy:o}),[v,f,C.draggable,C.droppable,E,g,x,c,m,o]);return he.createElement(Ug.Provider,{value:S},n)}const aC=e=>{let{id:n,items:r,activeIndex:a,overIndex:o}=e;return ku(r,a,o).indexOf(n)},oC=e=>{let{containerId:n,isSorting:r,wasDragging:a,index:o,items:i,newIndex:s,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!a||l!==i&&o===s?!1:r?!0:s!==o&&n===c},iC={duration:200,easing:"ease"},Vg="transform",sC=so.Transition.toString({property:Vg,duration:0,easing:"linear"}),lC={roleDescription:"sortable"};function cC(e){let{disabled:n,index:r,node:a,rect:o}=e;const[i,s]=d.useState(null),l=d.useRef(r);return vn(()=>{if(!n&&r!==l.current&&a.current){const c=o.current;if(c){const u=ua(a.current,{ignoreTransform:!0}),h={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(h.x||h.y)&&s(h)}}r!==l.current&&(l.current=r)},[n,r,a,o]),d.useEffect(()=>{i&&s(null)},[i]),i}function uC(e){let{animateLayoutChanges:n=oC,attributes:r,disabled:a,data:o,getNewIndex:i=aC,id:s,strategy:l,resizeObserverConfig:c,transition:u=iC}=e;const{items:h,containerId:f,activeIndex:m,disabled:g,disableTransforms:y,sortedRects:v,overIndex:x,useDragOverlay:b,strategy:w}=d.useContext(Ug),E=dC(a,g),C=h.indexOf(s),S=d.useMemo(()=>({sortable:{containerId:f,index:C,items:h},...o}),[f,o,C,h]),M=d.useMemo(()=>h.slice(h.indexOf(s)),[h,s]),{rect:R,node:_,isOver:O,setNodeRef:P}=QE({id:s,data:S,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:M,...c}}),{active:j,activatorEvent:$,activeNodeRect:V,attributes:A,setNodeRef:D,listeners:T,isDragging:F,over:H,setActivatorNodeRef:I,transform:Z}=WE({id:s,data:S,attributes:{...lC,...r},disabled:E.draggable}),B=M5(P,D),q=!!j,X=q&&!y&&ai(m)&&ai(x),Q=!b&&F,oe=Q&&X?Z:null,G=X?oe??(l??w)({rects:v,activeNodeRect:V,activeIndex:m,overIndex:x,index:C}):null,ie=ai(m)&&ai(x)?i({id:s,items:h,activeIndex:m,overIndex:x}):C,pe=j?.id,J=d.useRef({activeId:pe,items:h,newIndex:ie,containerId:f}),ge=h!==J.current.items,ve=n({active:j,containerId:f,isDragging:F,isSorting:q,id:s,index:C,items:h,newIndex:J.current.newIndex,previousItems:J.current.items,previousContainerId:J.current.containerId,transition:u,wasDragging:J.current.activeId!=null}),ye=cC({disabled:!ve,index:C,node:_,rect:R});return d.useEffect(()=>{q&&J.current.newIndex!==ie&&(J.current.newIndex=ie),f!==J.current.containerId&&(J.current.containerId=f),h!==J.current.items&&(J.current.items=h)},[q,ie,f,h]),d.useEffect(()=>{if(pe===J.current.activeId)return;if(pe!=null&&J.current.activeId==null){J.current.activeId=pe;return}const Et=setTimeout(()=>{J.current.activeId=pe},50);return()=>clearTimeout(Et)},[pe]),{active:j,activeIndex:m,attributes:A,data:S,rect:R,index:C,newIndex:ie,items:h,isOver:O,isSorting:q,isDragging:F,listeners:T,node:_,overIndex:x,over:H,setNodeRef:B,setActivatorNodeRef:I,setDroppableNodeRef:P,setDraggableNodeRef:D,transform:ye??G,transition:Ie()};function Ie(){if(ye||ge&&J.current.newIndex===C)return sC;if(!(Q&&!Pu($)||!u)&&(q||ve))return so.Transition.toString({...u,property:Vg})}}function dC(e,n){var r,a;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e?.draggable)!=null?r:n.draggable,droppable:(a=e?.droppable)!=null?a:n.droppable}}function Ui(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const fC=[Ee.Down,Ee.Right,Ee.Up,Ee.Left],hC=(e,n)=>{let{context:{active:r,collisionRect:a,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:l}}=n;if(fC.includes(e.code)){if(e.preventDefault(),!r||!a)return;const c=[];i.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const m=o.get(f.id);if(m)switch(e.code){case Ee.Down:a.top<m.top&&c.push(f);break;case Ee.Up:a.top>m.top&&c.push(f);break;case Ee.Left:a.left>m.left&&c.push(f);break;case Ee.Right:a.left<m.left&&c.push(f);break}});const u=B5({collisionRect:a,droppableRects:o,droppableContainers:c});let h=Rg(u,"id");if(h===s?.id&&u.length>1&&(h=u[1].id),h!=null){const f=i.get(r.id),m=i.get(h),g=m?o.get(m.id):null,y=m?.node.current;if(y&&g&&f&&m){const x=bs(y).some((M,R)=>l[R]!==M),b=Zg(f,m),w=pC(f,m),E=x||!b?{x:0,y:0}:{x:w?a.width-g.width:0,y:w?a.height-g.height:0},C={x:g.left,y:g.top};return E.x&&E.y?C:io(C,E)}}}};function Zg(e,n){return!Ui(e)||!Ui(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function pC(e,n){return!Ui(e)||!Ui(n)||!Zg(e,n)?!1:e.data.current.sortable.index<n.data.current.sortable.index}const mC=e=>{let{transform:n}=e;return{...n,x:0}},Bg=e=>{const[n,r]=d.useState(!1),a=d.useRef(null),o=d.useCallback(i=>{r(!0),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{i(),r(!1)},e)},[e]);return[n,o]};function qg(e,n){return function(){return e.apply(n,arguments)}}const{toString:gC}=Object.prototype,{getPrototypeOf:Iu}=Object,{iterator:Es,toStringTag:Wg}=Symbol,Cs=(e=>n=>{const r=gC.call(n);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),an=e=>(e=e.toLowerCase(),n=>Cs(n)===e),Ss=e=>n=>typeof n===e,{isArray:da}=Array,Jr=Ss("undefined");function jo(e){return e!==null&&!Jr(e)&&e.constructor!==null&&!Jr(e.constructor)&&xt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Gg=an("ArrayBuffer");function yC(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&Gg(e.buffer),n}const vC=Ss("string"),xt=Ss("function"),Kg=Ss("number"),Do=e=>e!==null&&typeof e=="object",xC=e=>e===!0||e===!1,xi=e=>{if(Cs(e)!=="object")return!1;const n=Iu(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Wg in e)&&!(Es in e)},bC=e=>{if(!Do(e)||jo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},wC=an("Date"),_C=an("File"),EC=e=>!!(e&&typeof e.uri<"u"),CC=e=>e&&typeof e.getParts<"u",SC=an("Blob"),AC=an("FileList"),RC=e=>Do(e)&&xt(e.pipe);function MC(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Lf=MC(),Ff=typeof Lf.FormData<"u"?Lf.FormData:void 0,TC=e=>{let n;return e&&(Ff&&e instanceof Ff||xt(e.append)&&((n=Cs(e))==="formdata"||n==="object"&&xt(e.toString)&&e.toString()==="[object FormData]"))},PC=an("URLSearchParams"),[NC,OC,jC,DC]=["ReadableStream","Request","Response","Headers"].map(an),kC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ko(e,n,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let a,o;if(typeof e!="object"&&(e=[e]),da(e))for(a=0,o=e.length;a<o;a++)n.call(null,e[a],a,e);else{if(jo(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let l;for(a=0;a<s;a++)l=i[a],n.call(null,e[l],l,e)}}function Yg(e,n){if(jo(e))return null;n=n.toLowerCase();const r=Object.keys(e);let a=r.length,o;for(;a-- >0;)if(o=r[a],n===o.toLowerCase())return o;return null}const mr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Qg=e=>!Jr(e)&&e!==mr;function Jl(){const{caseless:e,skipUndefined:n}=Qg(this)&&this||{},r={},a=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const s=e&&Yg(r,i)||i;xi(r[s])&&xi(o)?r[s]=Jl(r[s],o):xi(o)?r[s]=Jl({},o):da(o)?r[s]=o.slice():(!n||!Jr(o))&&(r[s]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&ko(arguments[o],a);return r}const IC=(e,n,r,{allOwnKeys:a}={})=>(ko(n,(o,i)=>{r&&xt(o)?Object.defineProperty(e,i,{value:qg(o,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:a}),e),LC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),FC=(e,n,r,a)=>{e.prototype=Object.create(n.prototype,a),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:n.prototype}),r&&Object.assign(e.prototype,r)},$C=(e,n,r,a)=>{let o,i,s;const l={};if(n=n||{},e==null)return n;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!a||a(s,e,n))&&!l[s]&&(n[s]=e[s],l[s]=!0);e=r!==!1&&Iu(e)}while(e&&(!r||r(e,n))&&e!==Object.prototype);return n},HC=(e,n,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=n.length;const a=e.indexOf(n,r);return a!==-1&&a===r},zC=e=>{if(!e)return null;if(da(e))return e;let n=e.length;if(!Kg(n))return null;const r=new Array(n);for(;n-- >0;)r[n]=e[n];return r},UC=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Iu(Uint8Array)),VC=(e,n)=>{const a=(e&&e[Es]).call(e);let o;for(;(o=a.next())&&!o.done;){const i=o.value;n.call(e,i[0],i[1])}},ZC=(e,n)=>{let r;const a=[];for(;(r=e.exec(n))!==null;)a.push(r);return a},BC=an("HTMLFormElement"),qC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,a,o){return a.toUpperCase()+o}),$f=(({hasOwnProperty:e})=>(n,r)=>e.call(n,r))(Object.prototype),WC=an("RegExp"),Xg=(e,n)=>{const r=Object.getOwnPropertyDescriptors(e),a={};ko(r,(o,i)=>{let s;(s=n(o,i,e))!==!1&&(a[i]=s||o)}),Object.defineProperties(e,a)},GC=e=>{Xg(e,(n,r)=>{if(xt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const a=e[r];if(xt(a)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},KC=(e,n)=>{const r={},a=o=>{o.forEach(i=>{r[i]=!0})};return da(e)?a(e):a(String(e).split(n)),r},YC=()=>{},QC=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function XC(e){return!!(e&&xt(e.append)&&e[Wg]==="FormData"&&e[Es])}const JC=e=>{const n=new Array(10),r=(a,o)=>{if(Do(a)){if(n.indexOf(a)>=0)return;if(jo(a))return a;if(!("toJSON"in a)){n[o]=a;const i=da(a)?[]:{};return ko(a,(s,l)=>{const c=r(s,o+1);!Jr(c)&&(i[l]=c)}),n[o]=void 0,i}}return a};return r(e,0)},eS=an("AsyncFunction"),tS=e=>e&&(Do(e)||xt(e))&&xt(e.then)&&xt(e.catch),Jg=((e,n)=>e?setImmediate:n?((r,a)=>(mr.addEventListener("message",({source:o,data:i})=>{o===mr&&i===r&&a.length&&a.shift()()},!1),o=>{a.push(o),mr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",xt(mr.postMessage)),nS=typeof queueMicrotask<"u"?queueMicrotask.bind(mr):typeof process<"u"&&process.nextTick||Jg,rS=e=>e!=null&&xt(e[Es]),U={isArray:da,isArrayBuffer:Gg,isBuffer:jo,isFormData:TC,isArrayBufferView:yC,isString:vC,isNumber:Kg,isBoolean:xC,isObject:Do,isPlainObject:xi,isEmptyObject:bC,isReadableStream:NC,isRequest:OC,isResponse:jC,isHeaders:DC,isUndefined:Jr,isDate:wC,isFile:_C,isReactNativeBlob:EC,isReactNative:CC,isBlob:SC,isRegExp:WC,isFunction:xt,isStream:RC,isURLSearchParams:PC,isTypedArray:UC,isFileList:AC,forEach:ko,merge:Jl,extend:IC,trim:kC,stripBOM:LC,inherits:FC,toFlatObject:$C,kindOf:Cs,kindOfTest:an,endsWith:HC,toArray:zC,forEachEntry:VC,matchAll:ZC,isHTMLForm:BC,hasOwnProperty:$f,hasOwnProp:$f,reduceDescriptors:Xg,freezeMethods:GC,toObjectSet:KC,toCamelCase:qC,noop:YC,toFiniteNumber:QC,findKey:Yg,global:mr,isContextDefined:Qg,isSpecCompliantForm:XC,toJSONObject:JC,isAsyncFn:eS,isThenable:tS,setImmediate:Jg,asap:nS,isIterable:rS};let fe=class e2 extends Error{static from(n,r,a,o,i,s){const l=new e2(n.message,r||n.code,a,o,i);return l.cause=n,l.name=n.name,n.status!=null&&l.status==null&&(l.status=n.status),s&&Object.assign(l,s),l}constructor(n,r,a,o,i){super(n),Object.defineProperty(this,"message",{value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),a&&(this.config=a),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.status}}};fe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";fe.ERR_BAD_OPTION="ERR_BAD_OPTION";fe.ECONNABORTED="ECONNABORTED";fe.ETIMEDOUT="ETIMEDOUT";fe.ERR_NETWORK="ERR_NETWORK";fe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";fe.ERR_DEPRECATED="ERR_DEPRECATED";fe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";fe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";fe.ERR_CANCELED="ERR_CANCELED";fe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";fe.ERR_INVALID_URL="ERR_INVALID_URL";const aS=null;function ec(e){return U.isPlainObject(e)||U.isArray(e)}function t2(e){return U.endsWith(e,"[]")?e.slice(0,-2):e}function cl(e,n,r){return e?e.concat(n).map(function(o,i){return o=t2(o),!r&&i?"["+o+"]":o}).join(r?".":""):n}function oS(e){return U.isArray(e)&&!e.some(ec)}const iS=U.toFlatObject(U,{},null,function(n){return/^is[A-Z]/.test(n)});function As(e,n,r){if(!U.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,r=U.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,x){return!U.isUndefined(x[v])});const a=r.metaTokens,o=r.visitor||h,i=r.dots,s=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&U.isSpecCompliantForm(n);if(!U.isFunction(o))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(U.isDate(y))return y.toISOString();if(U.isBoolean(y))return y.toString();if(!c&&U.isBlob(y))throw new fe("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(y)||U.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function h(y,v,x){let b=y;if(U.isReactNative(n)&&U.isReactNativeBlob(y))return n.append(cl(x,v,i),u(y)),!1;if(y&&!x&&typeof y=="object"){if(U.endsWith(v,"{}"))v=a?v:v.slice(0,-2),y=JSON.stringify(y);else if(U.isArray(y)&&oS(y)||(U.isFileList(y)||U.endsWith(v,"[]"))&&(b=U.toArray(y)))return v=t2(v),b.forEach(function(E,C){!(U.isUndefined(E)||E===null)&&n.append(s===!0?cl([v],C,i):s===null?v:v+"[]",u(E))}),!1}return ec(y)?!0:(n.append(cl(x,v,i),u(y)),!1)}const f=[],m=Object.assign(iS,{defaultVisitor:h,convertValue:u,isVisitable:ec});function g(y,v){if(!U.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(y),U.forEach(y,function(b,w){(!(U.isUndefined(b)||b===null)&&o.call(n,b,U.isString(w)?w.trim():w,v,m))===!0&&g(b,v?v.concat(w):[w])}),f.pop()}}if(!U.isObject(e))throw new TypeError("data must be an object");return g(e),n}function Hf(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return n[a]})}function Lu(e,n){this._pairs=[],e&&As(e,this,n)}const n2=Lu.prototype;n2.append=function(n,r){this._pairs.push([n,r])};n2.toString=function(n){const r=n?function(a){return n.call(this,a,Hf)}:Hf;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function sS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function r2(e,n,r){if(!n)return e;const a=r&&r.encode||sS,o=U.isFunction(r)?{serialize:r}:r,i=o&&o.serialize;let s;if(i?s=i(n,o):s=U.isURLSearchParams(n)?n.toString():new Lu(n,o).toString(a),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class zf{constructor(){this.handlers=[]}use(n,r,a){return this.handlers.push({fulfilled:n,rejected:r,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){U.forEach(this.handlers,function(a){a!==null&&n(a)})}}const Fu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},lS=typeof URLSearchParams<"u"?URLSearchParams:Lu,cS=typeof FormData<"u"?FormData:null,uS=typeof Blob<"u"?Blob:null,dS={isBrowser:!0,classes:{URLSearchParams:lS,FormData:cS,Blob:uS},protocols:["http","https","file","blob","url","data"]},$u=typeof window<"u"&&typeof document<"u",tc=typeof navigator=="object"&&navigator||void 0,fS=$u&&(!tc||["ReactNative","NativeScript","NS"].indexOf(tc.product)<0),hS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",pS=$u&&window.location.href||"http://localhost",mS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$u,hasStandardBrowserEnv:fS,hasStandardBrowserWebWorkerEnv:hS,navigator:tc,origin:pS},Symbol.toStringTag,{value:"Module"})),at={...mS,...dS};function gS(e,n){return As(e,new at.classes.URLSearchParams,{visitor:function(r,a,o,i){return at.isNode&&U.isBuffer(r)?(this.append(a,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...n})}function yS(e){return U.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function vS(e){const n={},r=Object.keys(e);let a;const o=r.length;let i;for(a=0;a<o;a++)i=r[a],n[i]=e[i];return n}function a2(e){function n(r,a,o,i){let s=r[i++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),c=i>=r.length;return s=!s&&U.isArray(o)?o.length:s,c?(U.hasOwnProp(o,s)?o[s]=[o[s],a]:o[s]=a,!l):((!o[s]||!U.isObject(o[s]))&&(o[s]=[]),n(r,a,o[s],i)&&U.isArray(o[s])&&(o[s]=vS(o[s])),!l)}if(U.isFormData(e)&&U.isFunction(e.entries)){const r={};return U.forEachEntry(e,(a,o)=>{n(yS(a),o,r,0)}),r}return null}function xS(e,n,r){if(U.isString(e))try{return(n||JSON.parse)(e),U.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(r||JSON.stringify)(e)}const Io={transitional:Fu,adapter:["xhr","http","fetch"],transformRequest:[function(n,r){const a=r.getContentType()||"",o=a.indexOf("application/json")>-1,i=U.isObject(n);if(i&&U.isHTMLForm(n)&&(n=new FormData(n)),U.isFormData(n))return o?JSON.stringify(a2(n)):n;if(U.isArrayBuffer(n)||U.isBuffer(n)||U.isStream(n)||U.isFile(n)||U.isBlob(n)||U.isReadableStream(n))return n;if(U.isArrayBufferView(n))return n.buffer;if(U.isURLSearchParams(n))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let l;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return gS(n,this.formSerializer).toString();if((l=U.isFileList(n))||a.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return As(l?{"files[]":n}:n,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),xS(n)):n}],transformResponse:[function(n){const r=this.transitional||Io.transitional,a=r&&r.forcedJSONParsing,o=this.responseType==="json";if(U.isResponse(n)||U.isReadableStream(n))return n;if(n&&U.isString(n)&&(a&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(n,this.parseReviver)}catch(l){if(s)throw l.name==="SyntaxError"?fe.from(l,fe.ERR_BAD_RESPONSE,this,null,this.response):l}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:at.classes.FormData,Blob:at.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],e=>{Io.headers[e]={}});const bS=U.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),wS=e=>{const n={};let r,a,o;return e&&e.split(`
20
- `).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),a=s.substring(o+1).trim(),!(!r||n[r]&&bS[r])&&(r==="set-cookie"?n[r]?n[r].push(a):n[r]=[a]:n[r]=n[r]?n[r]+", "+a:a)}),n},Uf=Symbol("internals");function Ea(e){return e&&String(e).trim().toLowerCase()}function bi(e){return e===!1||e==null?e:U.isArray(e)?e.map(bi):String(e)}function _S(e){const n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=r.exec(e);)n[a[1]]=a[2];return n}const ES=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ul(e,n,r,a,o){if(U.isFunction(a))return a.call(this,n,r);if(o&&(n=r),!!U.isString(n)){if(U.isString(a))return n.indexOf(a)!==-1;if(U.isRegExp(a))return a.test(n)}}function CS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,r,a)=>r.toUpperCase()+a)}function SS(e,n){const r=U.toCamelCase(" "+n);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+r,{value:function(o,i,s){return this[a].call(this,n,o,i,s)},configurable:!0})})}let bt=class{constructor(n){n&&this.set(n)}set(n,r,a){const o=this;function i(l,c,u){const h=Ea(c);if(!h)throw new Error("header name must be a non-empty string");const f=U.findKey(o,h);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||c]=bi(l))}const s=(l,c)=>U.forEach(l,(u,h)=>i(u,h,c));if(U.isPlainObject(n)||n instanceof this.constructor)s(n,r);else if(U.isString(n)&&(n=n.trim())&&!ES(n))s(wS(n),r);else if(U.isObject(n)&&U.isIterable(n)){let l={},c,u;for(const h of n){if(!U.isArray(h))throw TypeError("Object iterator must return a key-value pair");l[u=h[0]]=(c=l[u])?U.isArray(c)?[...c,h[1]]:[c,h[1]]:h[1]}s(l,r)}else n!=null&&i(r,n,a);return this}get(n,r){if(n=Ea(n),n){const a=U.findKey(this,n);if(a){const o=this[a];if(!r)return o;if(r===!0)return _S(o);if(U.isFunction(r))return r.call(this,o,a);if(U.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,r){if(n=Ea(n),n){const a=U.findKey(this,n);return!!(a&&this[a]!==void 0&&(!r||ul(this,this[a],a,r)))}return!1}delete(n,r){const a=this;let o=!1;function i(s){if(s=Ea(s),s){const l=U.findKey(a,s);l&&(!r||ul(a,a[l],l,r))&&(delete a[l],o=!0)}}return U.isArray(n)?n.forEach(i):i(n),o}clear(n){const r=Object.keys(this);let a=r.length,o=!1;for(;a--;){const i=r[a];(!n||ul(this,this[i],i,n,!0))&&(delete this[i],o=!0)}return o}normalize(n){const r=this,a={};return U.forEach(this,(o,i)=>{const s=U.findKey(a,i);if(s){r[s]=bi(o),delete r[i];return}const l=n?CS(i):String(i).trim();l!==i&&delete r[i],r[l]=bi(o),a[l]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const r=Object.create(null);return U.forEach(this,(a,o)=>{a!=null&&a!==!1&&(r[o]=n&&U.isArray(a)?a.join(", "):a)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,r])=>n+": "+r).join(`
21
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...r){const a=new this(n);return r.forEach(o=>a.set(o)),a}static accessor(n){const a=(this[Uf]=this[Uf]={accessors:{}}).accessors,o=this.prototype;function i(s){const l=Ea(s);a[l]||(SS(o,s),a[l]=!0)}return U.isArray(n)?n.forEach(i):i(n),this}};bt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);U.reduceDescriptors(bt.prototype,({value:e},n)=>{let r=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(a){this[r]=a}}});U.freezeMethods(bt);function dl(e,n){const r=this||Io,a=n||r,o=bt.from(a.headers);let i=a.data;return U.forEach(e,function(l){i=l.call(r,i,o.normalize(),n?n.status:void 0)}),o.normalize(),i}function o2(e){return!!(e&&e.__CANCEL__)}let Lo=class extends fe{constructor(n,r,a){super(n??"canceled",fe.ERR_CANCELED,r,a),this.name="CanceledError",this.__CANCEL__=!0}};function i2(e,n,r){const a=r.config.validateStatus;!r.status||!a||a(r.status)?e(r):n(new fe("Request failed with status code "+r.status,[fe.ERR_BAD_REQUEST,fe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function AS(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function RS(e,n){e=e||10;const r=new Array(e),a=new Array(e);let o=0,i=0,s;return n=n!==void 0?n:1e3,function(c){const u=Date.now(),h=a[i];s||(s=u),r[o]=c,a[o]=u;let f=i,m=0;for(;f!==o;)m+=r[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<n)return;const g=h&&u-h;return g?Math.round(m*1e3/g):void 0}}function MS(e,n){let r=0,a=1e3/n,o,i;const s=(u,h=Date.now())=>{r=h,o=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const h=Date.now(),f=h-r;f>=a?s(u,h):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},a-f)))},()=>o&&s(o)]}const Vi=(e,n,r=3)=>{let a=0;const o=RS(50,250);return MS(i=>{const s=i.loaded,l=i.lengthComputable?i.total:void 0,c=s-a,u=o(c),h=s<=l;a=s;const f={loaded:s,total:l,progress:l?s/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&h?(l-s)/u:void 0,event:i,lengthComputable:l!=null,[n?"download":"upload"]:!0};e(f)},r)},Vf=(e,n)=>{const r=e!=null;return[a=>n[0]({lengthComputable:r,total:e,loaded:a}),n[1]]},Zf=e=>(...n)=>U.asap(()=>e(...n)),TS=at.hasStandardBrowserEnv?((e,n)=>r=>(r=new URL(r,at.origin),e.protocol===r.protocol&&e.host===r.host&&(n||e.port===r.port)))(new URL(at.origin),at.navigator&&/(msie|trident)/i.test(at.navigator.userAgent)):()=>!0,PS=at.hasStandardBrowserEnv?{write(e,n,r,a,o,i,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(n)}`];U.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),U.isString(a)&&l.push(`path=${a}`),U.isString(o)&&l.push(`domain=${o}`),i===!0&&l.push("secure"),U.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function NS(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function OS(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function s2(e,n,r){let a=!NS(n);return e&&(a||r==!1)?OS(e,n):n}const Bf=e=>e instanceof bt?{...e}:e;function Ar(e,n){n=n||{};const r={};function a(u,h,f,m){return U.isPlainObject(u)&&U.isPlainObject(h)?U.merge.call({caseless:m},u,h):U.isPlainObject(h)?U.merge({},h):U.isArray(h)?h.slice():h}function o(u,h,f,m){if(U.isUndefined(h)){if(!U.isUndefined(u))return a(void 0,u,f,m)}else return a(u,h,f,m)}function i(u,h){if(!U.isUndefined(h))return a(void 0,h)}function s(u,h){if(U.isUndefined(h)){if(!U.isUndefined(u))return a(void 0,u)}else return a(void 0,h)}function l(u,h,f){if(f in n)return a(u,h);if(f in e)return a(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,h,f)=>o(Bf(u),Bf(h),f,!0)};return U.forEach(Object.keys({...e,...n}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const f=U.hasOwnProp(c,h)?c[h]:o,m=f(e[h],n[h],h);U.isUndefined(m)&&f!==l||(r[h]=m)}),r}const l2=e=>{const n=Ar({},e);let{data:r,withXSRFToken:a,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:l}=n;if(n.headers=s=bt.from(s),n.url=r2(s2(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),U.isFormData(r)){if(at.hasStandardBrowserEnv||at.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(U.isFunction(r.getHeaders)){const c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([h,f])=>{u.includes(h.toLowerCase())&&s.set(h,f)})}}if(at.hasStandardBrowserEnv&&(a&&U.isFunction(a)&&(a=a(n)),a||a!==!1&&TS(n.url))){const c=o&&i&&PS.read(i);c&&s.set(o,c)}return n},jS=typeof XMLHttpRequest<"u",DS=jS&&function(e){return new Promise(function(r,a){const o=l2(e);let i=o.data;const s=bt.from(o.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=o,h,f,m,g,y;function v(){g&&g(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(h),o.signal&&o.signal.removeEventListener("abort",h)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function b(){if(!x)return;const E=bt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),S={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:E,config:e,request:x};i2(function(R){r(R),v()},function(R){a(R),v()},S),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(b)},x.onabort=function(){x&&(a(new fe("Request aborted",fe.ECONNABORTED,e,x)),x=null)},x.onerror=function(C){const S=C&&C.message?C.message:"Network Error",M=new fe(S,fe.ERR_NETWORK,e,x);M.event=C||null,a(M),x=null},x.ontimeout=function(){let C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const S=o.transitional||Fu;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),a(new fe(C,S.clarifyTimeoutError?fe.ETIMEDOUT:fe.ECONNABORTED,e,x)),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&U.forEach(s.toJSON(),function(C,S){x.setRequestHeader(S,C)}),U.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),l&&l!=="json"&&(x.responseType=o.responseType),u&&([m,y]=Vi(u,!0),x.addEventListener("progress",m)),c&&x.upload&&([f,g]=Vi(c),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(h=E=>{x&&(a(!E||E.type?new Lo(null,e,x):E),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(h),o.signal&&(o.signal.aborted?h():o.signal.addEventListener("abort",h)));const w=AS(o.url);if(w&&at.protocols.indexOf(w)===-1){a(new fe("Unsupported protocol "+w+":",fe.ERR_BAD_REQUEST,e));return}x.send(i||null)})},kS=(e,n)=>{const{length:r}=e=e?e.filter(Boolean):[];if(n||r){let a=new AbortController,o;const i=function(u){if(!o){o=!0,l();const h=u instanceof Error?u:this.reason;a.abort(h instanceof fe?h:new Lo(h instanceof Error?h.message:h))}};let s=n&&setTimeout(()=>{s=null,i(new fe(`timeout of ${n}ms exceeded`,fe.ETIMEDOUT))},n);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=a;return c.unsubscribe=()=>U.asap(l),c}},IS=function*(e,n){let r=e.byteLength;if(r<n){yield e;return}let a=0,o;for(;a<r;)o=a+n,yield e.slice(a,o),a=o},LS=async function*(e,n){for await(const r of FS(e))yield*IS(r,n)},FS=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:r,value:a}=await n.read();if(r)break;yield a}}finally{await n.cancel()}},qf=(e,n,r,a)=>{const o=LS(e,n);let i=0,s,l=c=>{s||(s=!0,a&&a(c))};return new ReadableStream({async pull(c){try{const{done:u,value:h}=await o.next();if(u){l(),c.close();return}let f=h.byteLength;if(r){let m=i+=f;r(m)}c.enqueue(new Uint8Array(h))}catch(u){throw l(u),u}},cancel(c){return l(c),o.return()}},{highWaterMark:2})},Wf=64*1024,{isFunction:ii}=U,$S=(({Request:e,Response:n})=>({Request:e,Response:n}))(U.global),{ReadableStream:Gf,TextEncoder:Kf}=U.global,Yf=(e,...n)=>{try{return!!e(...n)}catch{return!1}},HS=e=>{e=U.merge.call({skipUndefined:!0},$S,e);const{fetch:n,Request:r,Response:a}=e,o=n?ii(n):typeof fetch=="function",i=ii(r),s=ii(a);if(!o)return!1;const l=o&&ii(Gf),c=o&&(typeof Kf=="function"?(y=>v=>y.encode(v))(new Kf):async y=>new Uint8Array(await new r(y).arrayBuffer())),u=i&&l&&Yf(()=>{let y=!1;const v=new r(at.origin,{body:new Gf,method:"POST",get duplex(){return y=!0,"half"}}).headers.has("Content-Type");return y&&!v}),h=s&&l&&Yf(()=>U.isReadableStream(new a("").body)),f={stream:h&&(y=>y.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!f[y]&&(f[y]=(v,x)=>{let b=v&&v[y];if(b)return b.call(v);throw new fe(`Response type '${y}' is not supported`,fe.ERR_NOT_SUPPORT,x)})});const m=async y=>{if(y==null)return 0;if(U.isBlob(y))return y.size;if(U.isSpecCompliantForm(y))return(await new r(at.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(U.isArrayBufferView(y)||U.isArrayBuffer(y))return y.byteLength;if(U.isURLSearchParams(y)&&(y=y+""),U.isString(y))return(await c(y)).byteLength},g=async(y,v)=>{const x=U.toFiniteNumber(y.getContentLength());return x??m(v)};return async y=>{let{url:v,method:x,data:b,signal:w,cancelToken:E,timeout:C,onDownloadProgress:S,onUploadProgress:M,responseType:R,headers:_,withCredentials:O="same-origin",fetchOptions:P}=l2(y),j=n||fetch;R=R?(R+"").toLowerCase():"text";let $=kS([w,E&&E.toAbortSignal()],C),V=null;const A=$&&$.unsubscribe&&(()=>{$.unsubscribe()});let D;try{if(M&&u&&x!=="get"&&x!=="head"&&(D=await g(_,b))!==0){let B=new r(v,{method:"POST",body:b,duplex:"half"}),q;if(U.isFormData(b)&&(q=B.headers.get("content-type"))&&_.setContentType(q),B.body){const[X,Q]=Vf(D,Vi(Zf(M)));b=qf(B.body,Wf,X,Q)}}U.isString(O)||(O=O?"include":"omit");const T=i&&"credentials"in r.prototype,F={...P,signal:$,method:x.toUpperCase(),headers:_.normalize().toJSON(),body:b,duplex:"half",credentials:T?O:void 0};V=i&&new r(v,F);let H=await(i?j(V,P):j(v,F));const I=h&&(R==="stream"||R==="response");if(h&&(S||I&&A)){const B={};["status","statusText","headers"].forEach(oe=>{B[oe]=H[oe]});const q=U.toFiniteNumber(H.headers.get("content-length")),[X,Q]=S&&Vf(q,Vi(Zf(S),!0))||[];H=new a(qf(H.body,Wf,X,()=>{Q&&Q(),A&&A()}),B)}R=R||"text";let Z=await f[U.findKey(f,R)||"text"](H,y);return!I&&A&&A(),await new Promise((B,q)=>{i2(B,q,{data:Z,headers:bt.from(H.headers),status:H.status,statusText:H.statusText,config:y,request:V})})}catch(T){throw A&&A(),T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new fe("Network Error",fe.ERR_NETWORK,y,V,T&&T.response),{cause:T.cause||T}):fe.from(T,T&&T.code,y,V,T&&T.response)}}},zS=new Map,c2=e=>{let n=e&&e.env||{};const{fetch:r,Request:a,Response:o}=n,i=[a,o,r];let s=i.length,l=s,c,u,h=zS;for(;l--;)c=i[l],u=h.get(c),u===void 0&&h.set(c,u=l?new Map:HS(n)),h=u;return u};c2();const Hu={http:aS,xhr:DS,fetch:{get:c2}};U.forEach(Hu,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const Qf=e=>`- ${e}`,US=e=>U.isFunction(e)||e===null||e===!1;function VS(e,n){e=U.isArray(e)?e:[e];const{length:r}=e;let a,o;const i={};for(let s=0;s<r;s++){a=e[s];let l;if(o=a,!US(a)&&(o=Hu[(l=String(a)).toLowerCase()],o===void 0))throw new fe(`Unknown adapter '${l}'`);if(o&&(U.isFunction(o)||(o=o.get(n))))break;i[l||"#"+s]=o}if(!o){const s=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=r?s.length>1?`since :
22
- `+s.map(Qf).join(`
23
- `):" "+Qf(s[0]):"as no adapter specified";throw new fe("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o}const u2={getAdapter:VS,adapters:Hu};function fl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Lo(null,e)}function Xf(e){return fl(e),e.headers=bt.from(e.headers),e.data=dl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),u2.getAdapter(e.adapter||Io.adapter,e)(e).then(function(a){return fl(e),a.data=dl.call(e,e.transformResponse,a),a.headers=bt.from(a.headers),a},function(a){return o2(a)||(fl(e),a&&a.response&&(a.response.data=dl.call(e,e.transformResponse,a.response),a.response.headers=bt.from(a.response.headers))),Promise.reject(a)})}const d2="1.13.6",Rs={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{Rs[e]=function(a){return typeof a===e||"a"+(n<1?"n ":" ")+e}});const Jf={};Rs.transitional=function(n,r,a){function o(i,s){return"[Axios v"+d2+"] Transitional option '"+i+"'"+s+(a?". "+a:"")}return(i,s,l)=>{if(n===!1)throw new fe(o(s," has been removed"+(r?" in "+r:"")),fe.ERR_DEPRECATED);return r&&!Jf[s]&&(Jf[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),n?n(i,s,l):!0}};Rs.spelling=function(n){return(r,a)=>(console.warn(`${a} is likely a misspelling of ${n}`),!0)};function ZS(e,n,r){if(typeof e!="object")throw new fe("options must be an object",fe.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let o=a.length;for(;o-- >0;){const i=a[o],s=n[i];if(s){const l=e[i],c=l===void 0||s(l,i,e);if(c!==!0)throw new fe("option "+i+" must be "+c,fe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new fe("Unknown option "+i,fe.ERR_BAD_OPTION)}}const wi={assertOptions:ZS,validators:Rs},jt=wi.validators;let vr=class{constructor(n){this.defaults=n||{},this.interceptors={request:new zf,response:new zf}}async request(n,r){try{return await this._request(n,r)}catch(a){if(a instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{a.stack?i&&!String(a.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(a.stack+=`
24
- `+i):a.stack=i}catch{}}throw a}}_request(n,r){typeof n=="string"?(r=r||{},r.url=n):r=n||{},r=Ar(this.defaults,r);const{transitional:a,paramsSerializer:o,headers:i}=r;a!==void 0&&wi.assertOptions(a,{silentJSONParsing:jt.transitional(jt.boolean),forcedJSONParsing:jt.transitional(jt.boolean),clarifyTimeoutError:jt.transitional(jt.boolean),legacyInterceptorReqResOrdering:jt.transitional(jt.boolean)},!1),o!=null&&(U.isFunction(o)?r.paramsSerializer={serialize:o}:wi.assertOptions(o,{encode:jt.function,serialize:jt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),wi.assertOptions(r,{baseUrl:jt.spelling("baseURL"),withXsrfToken:jt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&U.merge(i.common,i[r.method]);i&&U.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),r.headers=bt.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(r)===!1)return;c=c&&v.synchronous;const x=r.transitional||Fu;x&&x.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let h,f=0,m;if(!c){const y=[Xf.bind(this),void 0];for(y.unshift(...l),y.push(...u),m=y.length,h=Promise.resolve(r);f<m;)h=h.then(y[f++],y[f++]);return h}m=l.length;let g=r;for(;f<m;){const y=l[f++],v=l[f++];try{g=y(g)}catch(x){v.call(this,x);break}}try{h=Xf.call(this,g)}catch(y){return Promise.reject(y)}for(f=0,m=u.length;f<m;)h=h.then(u[f++],u[f++]);return h}getUri(n){n=Ar(this.defaults,n);const r=s2(n.baseURL,n.url,n.allowAbsoluteUrls);return r2(r,n.params,n.paramsSerializer)}};U.forEach(["delete","get","head","options"],function(n){vr.prototype[n]=function(r,a){return this.request(Ar(a||{},{method:n,url:r,data:(a||{}).data}))}});U.forEach(["post","put","patch"],function(n){function r(a){return function(i,s,l){return this.request(Ar(l||{},{method:n,headers:a?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}vr.prototype[n]=r(),vr.prototype[n+"Form"]=r(!0)});let BS=class f2{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const a=this;this.promise.then(o=>{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](o);a._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(l=>{a.subscribe(l),i=l}).then(o);return s.cancel=function(){a.unsubscribe(i)},s},n(function(i,s,l){a.reason||(a.reason=new Lo(i,s,l),r(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const r=this._listeners.indexOf(n);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const n=new AbortController,r=a=>{n.abort(a)};return this.subscribe(r),n.signal.unsubscribe=()=>this.unsubscribe(r),n.signal}static source(){let n;return{token:new f2(function(o){n=o}),cancel:n}}};function qS(e){return function(r){return e.apply(null,r)}}function WS(e){return U.isObject(e)&&e.isAxiosError===!0}const nc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(nc).forEach(([e,n])=>{nc[n]=e});function h2(e){const n=new vr(e),r=qg(vr.prototype.request,n);return U.extend(r,vr.prototype,n,{allOwnKeys:!0}),U.extend(r,n,null,{allOwnKeys:!0}),r.create=function(o){return h2(Ar(e,o))},r}const De=h2(Io);De.Axios=vr;De.CanceledError=Lo;De.CancelToken=BS;De.isCancel=o2;De.VERSION=d2;De.toFormData=As;De.AxiosError=fe;De.Cancel=De.CanceledError;De.all=function(n){return Promise.all(n)};De.spread=qS;De.isAxiosError=WS;De.mergeConfig=Ar;De.AxiosHeaders=bt;De.formToJSON=e=>a2(U.isHTMLForm(e)?new FormData(e):e);De.getAdapter=u2.getAdapter;De.HttpStatusCode=nc;De.default=De;const{Axios:Qj,AxiosError:Xj,CanceledError:Jj,isCancel:eD,CancelToken:tD,VERSION:nD,all:rD,Cancel:aD,isAxiosError:oD,spread:iD,toFormData:sD,AxiosHeaders:lD,HttpStatusCode:cD,formToJSON:uD,getAdapter:dD,mergeConfig:fD}=De,GS=e=>({type:"error",category:"graphql",errors:e.map(n=>({code:n.extensions?.code??"GRAPHQL_ERROR",message:n.message??"GraphQL request failed",details:n}))}),KS=e=>{const n=De.isAxiosError(e)?e.response?.data?.message??e.message??"Network request failed":"Network request failed",r=De.isAxiosError(e)?e.code??(e.response?.status?`HTTP_${e.response.status}`:"NETWORK_ERROR"):"NETWORK_ERROR",a=De.isAxiosError(e)?e.response?.data:void 0;return{type:"error",category:"network",errors:[{code:r,message:n,details:a}]}};async function Te(e,n,r){const a=typeof e=="string"?{query:e,variables:n,operationName:r}:e;try{const{data:o}=await De.post("/graphql",a);return o.errors&&o.errors.length>0?GS(o.errors):o.data?{type:"success",...o.data}:{type:"error",category:"graphql",errors:[{code:"EMPTY_RESPONSE",message:"GraphQL response data is empty",details:o}]}}catch(o){return KS(o)}}const YS=new Set(["content","order","layout"]),QS=`query FetchNotes(
25
- $searchFilter: SearchFilterInput,
26
- $pagination: PaginationInput
27
- ) {
28
- allNotes(
29
- searchFilter: $searchFilter,
30
- pagination: $pagination
31
- ) {
32
- totalCount
33
- notes {
34
- __NOTE_ADDITIONAL_FIELDS__ id
35
- title
36
- pinned
37
- createdAt
38
- updatedAt
39
- tags {
40
- id
41
- name
42
- }
43
- }
44
- }
45
- }`,XS=e=>{if(!e||e.length===0)return"";const n=Array.from(new Set(e.filter(r=>YS.has(r))));return n.length===0?"":n.map(r=>" "+r).join(`
46
- `)+`
47
- `};function zu({limit:e=25,offset:n=0,query:r="",sortBy:a,sortOrder:o,pinnedFirst:i,fields:s}={}){const l=XS(s),c=QS.replace("__NOTE_ADDITIONAL_FIELDS__",l);return Te(c,{searchFilter:{query:r,sortBy:a,sortOrder:o,pinnedFirst:i},pagination:{limit:e,offset:n}})}function JS({query:e="",limit:n=25,offset:r=0}={}){return Te(`query FetchTagNotes(
48
- $searchFilter: SearchFilterInput,
49
- $pagination: PaginationInput
50
- ) {
51
- tagNotes(
52
- searchFilter: $searchFilter,
53
- pagination: $pagination
54
- ) {
55
- totalCount
56
- notes {
57
- id
58
- title
59
- pinned
60
- tags {
61
- id
62
- name
63
- }
64
- createdAt
65
- updatedAt
66
- }
67
- }
68
- }`,{searchFilter:{query:e},pagination:{limit:n,offset:r}})}function eA(e){return Te(`query FetchNote($id: ID!) {
69
- note(id: $id) {
70
- title
71
- pinned
72
- layout
73
- content
74
- updatedAt
75
- }
76
- }`,{id:e})}function tA(e){return Te(`query FetchBackReferences($id: ID!) {
77
- backReferences(id: $id) {
78
- id
79
- title
80
- }
81
- }`,{id:e})}function nA(e){return Te(`query FetchImageNotes($src: String!) {
82
- imageNotes(src: $src) {
83
- id
84
- title
85
- createdAt
86
- updatedAt
87
- }
88
- }`,{src:e})}function rA(e){return Te(`mutation CreateNote($note: NoteInput!) {
89
- createNote(note: $note) {
90
- id
91
- }
92
- }`,{note:e})}const e0=({id:e,...n})=>Te(`mutation UpdateNote($id: ID!, $note: NoteInput!) {
93
- updateNote(id: $id, note: $note) {
94
- id
95
- title
96
- }
97
- }`,{id:e,note:n});function aA(e,n){return Te(`mutation PinNote($id: ID!, $pinned: Boolean!) {
98
- pinNote(id: $id, pinned: $pinned) {
99
- id
100
- title
101
- pinned
102
- createdAt
103
- updatedAt
104
- }
105
- }`,{id:e,pinned:n})}function oA(e){return Te(`mutation DeleteNote($id: ID!) {
106
- deleteNote(id: $id)
107
- }`,{id:e})}function iA(e){return Te(`mutation ReorderNotes($notes: [NoteOrderInput!]!) {
108
- reorderNotes(notes: $notes) {
109
- id
110
- order
111
- }
112
- }`,{notes:e})}function sA(){return Te(`query FetchNoteGraph {
113
- noteGraph {
114
- nodes {
115
- id
116
- title
117
- connections
118
- }
119
- links {
120
- source
121
- target
122
- }
123
- }
124
- }`)}const lA=e=>!e||e.length===0?null:[...new Set(e)].sort(),cA=e=>!e||e.length===0?null:[...new Set(e)].sort(),_e={notes:{all:()=>["notes"],listAll:()=>["notes","list"],list:(e={})=>["notes","list",{limit:e.limit??25,offset:e.offset??0,query:e.query??"",sortBy:e.sortBy??null,sortOrder:e.sortOrder??null,pinnedFirst:e.pinnedFirst??null,fields:lA(e.fields)}],tagListAll:()=>["notes","tag-list"],tagList:(e={})=>["notes","tag-list",{limit:e.limit??25,offset:e.offset??0,query:e.query??""}],detail:e=>["notes","detail",{id:e}],pinned:()=>["notes","pinned"],backReferences:e=>["notes","back-references",{noteId:e}],graph:()=>["notes","graph"]},tags:{all:()=>["tags"],list:(e={})=>["tags","list",{limit:e.limit??50,offset:e.offset??0,query:e.query??""}]},images:{all:()=>["images"],listAll:()=>["images","list"],list:(e={})=>["images","list",{limit:e.limit??50,offset:e.offset??0}],detail:e=>["images","detail",{id:e}],notes:e=>["images","notes",{id:e}]},reminders:{all:()=>["reminders"],note:(e,n={})=>["reminders","note",e,{limit:n.limit??10,offset:n.offset??0}],noteAllPages:e=>["reminders","note",e],upcoming:(e={})=>["reminders","upcoming",{limit:e.limit??10,offset:e.offset??0}],upcomingAllPages:()=>["reminders","upcoming"],inDateRangeAll:()=>["reminders","in-date-range"],inDateRange:(e,n)=>["reminders","in-date-range",{year:e,month:n}]},placeholders:{all:()=>["placeholders"],listAll:()=>["placeholders","list"],list:(e={})=>["placeholders","list",{limit:e.limit??25,offset:e.offset??0,query:e.query??"",fields:cA(e.fields)}]},calendar:{notesInDateRange:(e,n)=>["calendar","notes-in-date-range",{year:e,month:n}]},ui:{heroBanner:()=>["ui","hero-banner"]}};var _i={exports:{}},uA=_i.exports,t0;function dA(){return t0||(t0=1,(function(e,n){(function(r,a){e.exports=a()})(uA,(function(){var r=1e3,a=6e4,o=36e5,i="millisecond",s="second",l="minute",c="hour",u="day",h="week",f="month",m="quarter",g="year",y="date",v="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var D=["th","st","nd","rd"],T=A%100;return"["+A+(D[(T-20)%10]||D[T]||D[0])+"]"}},E=function(A,D,T){var F=String(A);return!F||F.length>=D?A:""+Array(D+1-F.length).join(T)+A},C={s:E,z:function(A){var D=-A.utcOffset(),T=Math.abs(D),F=Math.floor(T/60),H=T%60;return(D<=0?"+":"-")+E(F,2,"0")+":"+E(H,2,"0")},m:function A(D,T){if(D.date()<T.date())return-A(T,D);var F=12*(T.year()-D.year())+(T.month()-D.month()),H=D.clone().add(F,f),I=T-H<0,Z=D.clone().add(F+(I?-1:1),f);return+(-(F+(T-H)/(I?H-Z:Z-H))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:f,y:g,w:h,d:u,D:y,h:c,m:l,s,ms:i,Q:m}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},S="en",M={};M[S]=w;var R="$isDayjsObject",_=function(A){return A instanceof $||!(!A||!A[R])},O=function A(D,T,F){var H;if(!D)return S;if(typeof D=="string"){var I=D.toLowerCase();M[I]&&(H=I),T&&(M[I]=T,H=I);var Z=D.split("-");if(!H&&Z.length>1)return A(Z[0])}else{var B=D.name;M[B]=D,H=B}return!F&&H&&(S=H),H||!F&&S},P=function(A,D){if(_(A))return A.clone();var T=typeof D=="object"?D:{};return T.date=A,T.args=arguments,new $(T)},j=C;j.l=O,j.i=_,j.w=function(A,D){return P(A,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var $=(function(){function A(T){this.$L=O(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[R]=!0}var D=A.prototype;return D.parse=function(T){this.$d=(function(F){var H=F.date,I=F.utc;if(H===null)return new Date(NaN);if(j.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var Z=H.match(x);if(Z){var B=Z[2]-1||0,q=(Z[7]||"0").substring(0,3);return I?new Date(Date.UTC(Z[1],B,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,q)):new Date(Z[1],B,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,q)}}return new Date(H)})(T),this.init()},D.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},D.$utils=function(){return j},D.isValid=function(){return this.$d.toString()!==v},D.isSame=function(T,F){var H=P(T);return this.startOf(F)<=H&&H<=this.endOf(F)},D.isAfter=function(T,F){return P(T)<this.startOf(F)},D.isBefore=function(T,F){return this.endOf(F)<P(T)},D.$g=function(T,F,H){return j.u(T)?this[F]:this.set(H,T)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(T,F){var H=this,I=!!j.u(F)||F,Z=j.p(T),B=function(pe,J){var ge=j.w(H.$u?Date.UTC(H.$y,J,pe):new Date(H.$y,J,pe),H);return I?ge:ge.endOf(u)},q=function(pe,J){return j.w(H.toDate()[pe].apply(H.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(J)),H)},X=this.$W,Q=this.$M,oe=this.$D,le="set"+(this.$u?"UTC":"");switch(Z){case g:return I?B(1,0):B(31,11);case f:return I?B(1,Q):B(0,Q+1);case h:var G=this.$locale().weekStart||0,ie=(X<G?X+7:X)-G;return B(I?oe-ie:oe+(6-ie),Q);case u:case y:return q(le+"Hours",0);case c:return q(le+"Minutes",1);case l:return q(le+"Seconds",2);case s:return q(le+"Milliseconds",3);default:return this.clone()}},D.endOf=function(T){return this.startOf(T,!1)},D.$set=function(T,F){var H,I=j.p(T),Z="set"+(this.$u?"UTC":""),B=(H={},H[u]=Z+"Date",H[y]=Z+"Date",H[f]=Z+"Month",H[g]=Z+"FullYear",H[c]=Z+"Hours",H[l]=Z+"Minutes",H[s]=Z+"Seconds",H[i]=Z+"Milliseconds",H)[I],q=I===u?this.$D+(F-this.$W):F;if(I===f||I===g){var X=this.clone().set(y,1);X.$d[B](q),X.init(),this.$d=X.set(y,Math.min(this.$D,X.daysInMonth())).$d}else B&&this.$d[B](q);return this.init(),this},D.set=function(T,F){return this.clone().$set(T,F)},D.get=function(T){return this[j.p(T)]()},D.add=function(T,F){var H,I=this;T=Number(T);var Z=j.p(F),B=function(Q){var oe=P(I);return j.w(oe.date(oe.date()+Math.round(Q*T)),I)};if(Z===f)return this.set(f,this.$M+T);if(Z===g)return this.set(g,this.$y+T);if(Z===u)return B(1);if(Z===h)return B(7);var q=(H={},H[l]=a,H[c]=o,H[s]=r,H)[Z]||1,X=this.$d.getTime()+T*q;return j.w(X,this)},D.subtract=function(T,F){return this.add(-1*T,F)},D.format=function(T){var F=this,H=this.$locale();if(!this.isValid())return H.invalidDate||v;var I=T||"YYYY-MM-DDTHH:mm:ssZ",Z=j.z(this),B=this.$H,q=this.$m,X=this.$M,Q=H.weekdays,oe=H.months,le=H.meridiem,G=function(J,ge,ve,ye){return J&&(J[ge]||J(F,I))||ve[ge].slice(0,ye)},ie=function(J){return j.s(B%12||12,J,"0")},pe=le||function(J,ge,ve){var ye=J<12?"AM":"PM";return ve?ye.toLowerCase():ye};return I.replace(b,(function(J,ge){return ge||(function(ve){switch(ve){case"YY":return String(F.$y).slice(-2);case"YYYY":return j.s(F.$y,4,"0");case"M":return X+1;case"MM":return j.s(X+1,2,"0");case"MMM":return G(H.monthsShort,X,oe,3);case"MMMM":return G(oe,X);case"D":return F.$D;case"DD":return j.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return G(H.weekdaysMin,F.$W,Q,2);case"ddd":return G(H.weekdaysShort,F.$W,Q,3);case"dddd":return Q[F.$W];case"H":return String(B);case"HH":return j.s(B,2,"0");case"h":return ie(1);case"hh":return ie(2);case"a":return pe(B,q,!0);case"A":return pe(B,q,!1);case"m":return String(q);case"mm":return j.s(q,2,"0");case"s":return String(F.$s);case"ss":return j.s(F.$s,2,"0");case"SSS":return j.s(F.$ms,3,"0");case"Z":return Z}return null})(J)||Z.replace(":","")}))},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(T,F,H){var I,Z=this,B=j.p(F),q=P(T),X=(q.utcOffset()-this.utcOffset())*a,Q=this-q,oe=function(){return j.m(Z,q)};switch(B){case g:I=oe()/12;break;case f:I=oe();break;case m:I=oe()/3;break;case h:I=(Q-X)/6048e5;break;case u:I=(Q-X)/864e5;break;case c:I=Q/o;break;case l:I=Q/a;break;case s:I=Q/r;break;default:I=Q}return H?I:j.a(I)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return M[this.$L]},D.locale=function(T,F){if(!T)return this.$L;var H=this.clone(),I=O(T,F,!0);return I&&(H.$L=I),H},D.clone=function(){return j.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},A})(),V=$.prototype;return P.prototype=V,[["$ms",i],["$s",s],["$m",l],["$H",c],["$W",u],["$M",f],["$y",g],["$D",y]].forEach((function(A){V[A[1]]=function(D){return this.$g(D,A[0],A[1])}})),P.extend=function(A,D){return A.$i||(A(D,$,P),A.$i=!0),P},P.locale=O,P.isDayjs=_,P.unix=function(A){return P(1e3*A)},P.en=M[S],P.Ls=M,P.p={},P}))})(_i)),_i.exports}var fA=dA();const xe=ra(fA),hA=()=>{const e=new Date,n=e.getDate(),r=e.getMonth(),a=e.getFullYear(),i=new Date(a,r,1).getDay();return Math.ceil((n+i)/7)},p2=()=>[{name:"Year",template:"year",replacement:xe().format("YYYY")},{name:"Month",template:"month",replacement:xe().format("MM")},{name:"Short Month",template:"mon",replacement:xe().format("M")},{name:"Day",template:"day",replacement:xe().format("DD")},{name:"Short Day",template:"d",replacement:xe().format("D")},{name:"Week of Month",template:"week_of_month",replacement:hA().toString()},{name:"Hour 24",template:"hour",replacement:xe().format("HH")},{name:"Hour 12",template:"hour_12",replacement:xe().format("hh")},{name:"Short Hour 24",template:"h",replacement:xe().format("H")},{name:"Short Hour 12",template:"h_12",replacement:xe().format("h")},{name:"AM/PM",template:"ampm",replacement:xe().format("A")},{name:"Minute",template:"minute",replacement:xe().format("mm")},{name:"Short Minute",template:"m",replacement:xe().format("m")},{name:"Second",template:"second",replacement:xe().format("ss")},{name:"Short Second",template:"s",replacement:xe().format("s")}],rc="{%",ac="%}",n0=e=>e.replace(new RegExp(`${rc}([^}]+)${ac}`,"g"),(n,r)=>p2().find(o=>o.template===r)?.replacement||n),Ms=()=>{const e=ls(),n=So(),r=er(),a=Tr();return{onCreate:async(l="",c="",u)=>{const h=n0(l),f=n0(c),m=await rA({title:h,content:f,...u&&{layout:u}});m.type!=="error"&&a(`/${m.createNote.id}`)},onPinned:async(l,c,u)=>{try{const h=await aA(l,!c);if(h.type==="error"){n(h.errors[0].message);return}await Promise.all([r.invalidateQueries({queryKey:_e.notes.listAll(),exact:!1}),r.invalidateQueries({queryKey:_e.notes.tagListAll(),exact:!1}),r.invalidateQueries({queryKey:_e.notes.pinned(),exact:!0})]),u?.()}catch{n("Failed to update note pin status")}},onDelete:async(l,c)=>{if(await e("Are you really sure?")){const u=await oA(l);if(u.type==="error"){n(u.errors[0].message);return}await Promise.all([r.invalidateQueries({queryKey:_e.notes.listAll(),exact:!1}),r.invalidateQueries({queryKey:_e.notes.tagListAll(),exact:!1}),r.invalidateQueries({queryKey:_e.notes.pinned(),exact:!0})]),c?.()}}}};function Uu({query:e="",limit:n=50,offset:r=0}={}){return Te(`query FetchTags(
125
- $searchFilter: SearchFilterInput,
126
- $pagination: PaginationInput
127
- ) {
128
- allTags(
129
- searchFilter: $searchFilter,
130
- pagination: $pagination
131
- ) {
132
- totalCount
133
- tags {
134
- id
135
- name
136
- referenceCount
137
- }
138
- }
139
- }`,{searchFilter:{query:e},pagination:{limit:n,offset:r}})}function pA({name:e=""}){return Te(`mutation CreateTag($name: String!) {
140
- createTag(name: $name) {
141
- id
142
- name
143
- }
144
- }`,{name:e})}const mA=async e=>{try{const n=await Te(`
145
- query GetServerCache($key: String!) {
146
- cache(key: $key) {
147
- value
148
- }
149
- }
150
- `,{key:e});if(n.type==="error")throw n;return n.cache.value}catch{return""}},m2=async(e,n)=>Te(`
151
- mutation SetServerCache($key: String!, $value: String!) {
152
- setCache(key: $key, value: $value) {
153
- value
154
- }
155
- }
156
- `,{key:e,value:encodeURIComponent(n)}),gA=e=>{const{data:n}=oa({queryKey:_e.notes.pinned(),async queryFn(){const r=await Te(`
157
- query {
158
- pinnedNotes {
159
- id
160
- title
161
- order
162
- }
163
- }
164
- `);if(r.type==="error")throw r;return r.pinnedNotes}});return p.jsx(p.Fragment,{children:e.render(n)})};function yA({limit:e=50,offset:n=0}={}){return Te(`query FetchImages($pagination: PaginationInput) {
165
- allImages(pagination: $pagination) {
166
- totalCount
167
- images {
168
- id
169
- url
170
- referenceCount
171
- }
172
- }
173
- }`,{pagination:{limit:e,offset:n}})}function vA(e){return Te(`query FetchImage($id: ID!) {
174
- image(id: $id) {
175
- id
176
- url
177
- }
178
- }`,{id:e})}function g2(e){return Te(`mutation DeleteImage($id: ID!) {
179
- deleteImage(id: $id)
180
- }`,{id:e})}async function xA({base64:e,externalSrc:n}){if(e){const{data:r}=await De.post("/api/image",{image:e});return r.url}if(n){const{data:r}=await De.post("/api/image-from-src",{src:n});return r.url}throw new Error("No file or src provided")}const bA=e=>{const{data:n}=oa({queryKey:_e.images.list(e.searchParams),async queryFn(){const r=await yA({offset:e.searchParams.offset,limit:e.searchParams.limit});if(r.type==="error")throw r;return r.allImages}});return e.render(n)},y2=e=>{const{data:n}=oa({queryKey:_e.notes.list(e.searchParams),async queryFn(){const r=await zu(e.searchParams);if(r.type==="error")throw r;return r.allNotes}});return e.render(n)},wA=e=>{const{data:n}=oa({queryKey:_e.notes.backReferences(e.noteId),async queryFn(){const r=await tA(e.noteId);if(r.type==="error")throw r;return r.backReferences}});return e.render(n)},_A=e=>{const{data:n}=oa({queryKey:_e.tags.list(e.searchParams),async queryFn(){const r=await Uu({offset:e.searchParams.offset,limit:e.searchParams.limit});if(r.type==="error")throw r;return r.allTags}});return e.render(n)},EA=e=>{const{data:n}=oa({queryKey:_e.notes.tagList(e.searchParams),async queryFn(){const r=await JS({query:e.searchParams.query,offset:e.searchParams.offset,limit:e.searchParams.limit});if(r.type==="error")throw r;return r.tagNotes}});return e.render(n)},v2=(e={})=>({limit:e.limit??10,offset:e.offset??0}),CA=async(e,n)=>Te(`
181
- query FetchNoteReminders($noteId: ID!, $pagination: PaginationInput) {
182
- noteReminders(noteId: $noteId, pagination: $pagination) {
183
- totalCount
184
- reminders {
185
- id
186
- noteId
187
- reminderDate
188
- priority
189
- content
190
- completed
191
- createdAt
192
- updatedAt
193
- }
194
- }
195
- }
196
- `,{noteId:e,pagination:v2(n)}),SA=async e=>Te(`
197
- query FetchUpcomingReminders($pagination: PaginationInput) {
198
- upcomingReminders(pagination: $pagination) {
199
- totalCount
200
- reminders {
201
- id
202
- noteId
203
- reminderDate
204
- priority
205
- content
206
- completed
207
- createdAt
208
- updatedAt
209
- note {
210
- id
211
- title
212
- }
213
- }
214
- }
215
- }
216
- `,{pagination:v2(e)}),AA=async e=>{const{noteId:n,reminderDate:r,priority:a="medium",content:o}=e;return Te(`
217
- mutation CreateReminder($noteId: ID!, $reminderDate: String!, $priority: ReminderPriority, $content: String) {
218
- createReminder(
219
- noteId: $noteId,
220
- reminderDate: $reminderDate,
221
- priority: $priority,
222
- content: $content
223
- ) {
224
- id
225
- noteId
226
- reminderDate
227
- completed
228
- priority
229
- createdAt
230
- updatedAt
231
- }
232
- }
233
- `,{noteId:n,reminderDate:r.toISOString(),priority:a,content:o})},RA=async({id:e,reminderDate:n,completed:r,priority:a,content:o})=>{const i={id:e};return n&&(i.reminderDate=n.toISOString()),r!==void 0&&(i.completed=r),a&&(i.priority=a),o!==void 0&&(i.content=o),Te(`
234
- mutation UpdateReminder(
235
- $id: ID!,
236
- $reminderDate: String,
237
- $completed: Boolean,
238
- $priority: ReminderPriority,
239
- $content: String
240
- ) {
241
- updateReminder(
242
- id: $id,
243
- reminderDate: $reminderDate,
244
- completed: $completed,
245
- priority: $priority,
246
- content: $content
247
- ) {
248
- id
249
- noteId
250
- reminderDate
251
- completed
252
- priority
253
- createdAt
254
- updatedAt
255
- }
256
- }
257
- `,i)},MA=async e=>Te(`
258
- mutation DeleteReminder($id: ID!) {
259
- deleteReminder(id: $id)
260
- }
261
- `,{id:e});function x2({noteId:e,searchParams:n,render:r}){const{data:a}=In({queryKey:e?_e.reminders.note(e,n):_e.reminders.upcoming(n),queryFn:async()=>{if(e){const i=await CA(e,n);if(i.type==="error")throw i;return i.noteReminders}const o=await SA(n);if(o.type==="error")throw o;return o.upcomingReminders}});return a?p.jsx(p.Fragment,{children:r(a)}):null}const un=au.bind(Db);function TA({id:e,children:n,tooltip:r}){const{attributes:a,listeners:o,setNodeRef:i,transform:s,transition:l,isDragging:c,setActivatorNodeRef:u}=uC({id:e}),h={transform:so.Transform.toString(s),transition:l,opacity:c?.5:1},f=p.jsx("div",{className:"flex-1 min-w-0 font-bold text-sm truncate",children:n});return p.jsxs("div",{ref:i,style:h,...a,className:"flex items-center gap-2 p-2 rounded-md hover:bg-hover-subtle transition-colors",children:[p.jsx("button",{ref:u,...o,className:"cursor-grab active:cursor-grabbing touch-none flex items-center justify-center",style:{cursor:c?"grabbing":"grab"},children:p.jsx(eo,{className:"size-4 text-fg-placeholder hover:text-fg-secondary"})}),r?p.jsx(mg,{content:r,side:"right",children:f}):f]})}function PA({notes:e,sensors:n,handleDragEnd:r,location:a,pinnedItems:o,setPinnedItems:i}){he.useEffect(()=>{e&&e.length>0&&i(e)},[e,i]);const s=o.length>0?o:e;return!s||s.length===0?null:p.jsx(ZE,{sensors:n,collisionDetection:Z5,onDragEnd:r,modifiers:[mC],children:p.jsx(rC,{items:s.map(l=>l.id),strategy:tC,children:s.map(l=>p.jsx(TA,{id:l.id,tooltip:l.title||"Untitled",children:p.jsx(Ve,{className:`transition-colors ${a.pathname===`/${l.id}`?"text-accent-primary":"text-fg-secondary hover:text-fg-default"}`,to:`/${l.id}`,children:l.title||"Untitled"})},l.id))})})}const NA=[{name:"Notes",path:"/",icon:s4},{name:"Graph",path:"/graph",icon:y4},{name:"Calendar",path:"/calendar",icon:r4},{name:"Reminders",path:"/reminders",icon:l1},{name:"Tags",path:"/tag",icon:g4},{name:"Setting",path:"/setting",icon:i4}],OA=({children:e})=>{const n=ls(),r=nn(),a=Tr(),o=er(),{theme:i}=Pr(_=>_),[s,l]=d.useState(!1),[c,u]=d.useState(""),[h,f]=d.useState([]),[m,g]=d.useState([]),[y,v]=d.useState([]),[,x]=Bg(500),{onCreate:b}=Ms(),w=Ni({mutationFn:iA,onSuccess:()=>{o.invalidateQueries({queryKey:_e.notes.pinned(),exact:!0})}}),E=U5(Cf(Du,{activationConstraint:{distance:8}}),Cf(Ou,{coordinateGetter:hC})),C=_=>{const{active:O,over:P}=_;P&&O.id!==P.id&&v(j=>{const $=j.findIndex(T=>T.id===O.id),V=j.findIndex(T=>T.id===P.id),A=ku(j,$,V),D=A.map((T,F)=>({id:T.id,order:F}));return w.mutate(D),A})},{data:S}=In({queryKey:_e.ui.heroBanner(),async queryFn(){return mA("heroBanner")}}),M=_=>{_?.preventDefault(),a(`/search?query=${encodeURIComponent(c)}`)},R=()=>{u("")};return d.useEffect(()=>{if(c.length<=0){x(()=>{}),f([]),g([]);return}x(()=>{zu({query:c,limit:5}).then(_=>{_.type==="success"&&f(_.allNotes.notes)}),Uu({query:c,limit:5}).then(_=>{_.type==="success"&&g(_.allTags.tags)})})},[c,x]),d.useEffect(()=>{l(!1)},[r.pathname]),p.jsxs("div",{className:un("SiteLayout"),children:[p.jsx("div",{className:"md:hidden",children:p.jsx("button",{type:"button",className:un("menu"),onClick:()=>l(_=>!_),children:p.jsx(eo,{className:"h-6 w-6 text-fg-on-accent"})})}),p.jsxs("div",{className:un("side",{open:s}),children:[S&&p.jsx("div",{className:"p-3 pb-0",children:p.jsxs("div",{className:"relative rounded-[16px_5px_17px_4px/5px_13px_5px_15px] border-2 border-border shadow-sketchy overflow-hidden cursor-pointer group",onClick:async()=>{await n("Do you want to remove this hero banner?")&&(await m2("heroBanner",""),await o.invalidateQueries({queryKey:_e.ui.heroBanner(),exact:!0}))},children:[p.jsx("img",{className:"w-full transition-transform duration-300 group-hover:scale-105",style:{filter:i==="dark"?"brightness(0.85) saturate(0.9)":void 0},src:S}),p.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 flex items-center justify-center",children:p.jsx("span",{className:"text-white text-xs font-bold opacity-0 group-hover:opacity-100 transition-opacity duration-300 bg-black/50 px-3 py-1.5 rounded-[8px_3px_9px_2px/3px_6px_3px_7px]",children:"Click to remove"})})]})}),p.jsx("div",{className:"p-3",children:p.jsxs("form",{className:"flex flex-col gap-3",onSubmit:M,children:[p.jsx("div",{className:"flex gap-3",children:p.jsxs("div",{style:{gridTemplateColumns:"40px 1fr 32px"},className:"grid flex-1 bg-surface border-2 border-border rounded-[12px_4px_13px_3px/4px_10px_4px_12px] shadow-sketchy",children:[p.jsx("button",{type:"submit",className:"flex items-center justify-center hover:text-accent-primary transition-colors",children:p.jsx(d4,{className:"h-5 w-5",weight:"bold"})}),p.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:_=>u(_.target.value),className:"h-10 w-full bg-transparent text-fg-default py-4 outline-none font-bold"}),c&&p.jsx("button",{type:"button",className:"flex items-center justify-center hover:text-accent-primary transition-colors",onClick:R,children:p.jsx(Xc,{className:"h-4 w-4",weight:"bold"})})]})}),(h.length>0||m.length>0)&&p.jsxs("div",{className:"p-3 bg-surface border-2 border-border rounded-[16px_5px_17px_4px/5px_13px_5px_15px] shadow-sketchy",children:[h.length>0&&p.jsx("ul",{className:"flex flex-col",children:h.map(({id:_,title:O})=>p.jsx("li",{className:"flex py-2 items-center border-b border-dashed border-border-subtle last:border-b-0",children:p.jsx(Ve,{to:`/${_}`,className:"text-sm font-bold hover:text-accent-primary transition-colors",children:O||"Untitled"})},_))}),m.length>0&&p.jsx("ul",{className:"flex flex-wrap gap-2 p-2",children:m.map(({id:_,name:O})=>p.jsx("li",{className:"flex items-center gap-2",children:p.jsx(Ve,{to:`/tag/${_}`,children:p.jsx(ou,{name:O})})},_))}),p.jsx("div",{className:"p-2 border-t border-dashed border-border-subtle",children:p.jsx("button",{type:"submit",className:"text-sm font-bold text-pastel-blue-200 hover:text-pastel-teal-200 transition-colors",children:"view detailed results →"})})]})]})}),p.jsxs("div",{className:un("p-3","flex","flex-col","gap-2"),children:[p.jsxs(Ze,{variant:"primary",size:"lg",className:"w-full shadow-sketchy",onClick:()=>b(),children:[p.jsx(A1,{className:"w-5 h-5",weight:"bold"})," Capture"]}),p.jsxs("div",{className:un("font-bold","flex","items-center","gap-2","p-2","pt-6","mt-5","border-t-2","border-dashed","border-border-subtle"),children:[p.jsx(h4,{className:"w-5 h-5",weight:"fill"}),"Pinned"]}),p.jsx("div",{className:"flex flex-col gap-2",children:p.jsx(d.Suspense,{fallback:p.jsxs(p.Fragment,{children:[p.jsx(Ne,{height:"24px",opacity:.5}),p.jsx(Ne,{height:"24px",opacity:.5})]}),children:p.jsx(gA,{render:_=>p.jsx(PA,{notes:_,sensors:E,handleDragEnd:C,location:r,pinnedItems:y,setPinnedItems:v})})})})]})]}),p.jsxs("div",{className:un("center"),children:[p.jsx("div",{className:un("top"),children:p.jsx("div",{className:un("top-content"),children:p.jsx("div",{className:un("flex","gap-2","p-3"),children:NA.map(_=>{const O=r.pathname===_.path;return p.jsx(Ve,{to:_.path,children:p.jsxs("div",{className:`flex items-center gap-2 text-sm font-bold px-3 py-2 border-2 transition-all rounded-[10px_3px_11px_3px/3px_8px_3px_10px] ${O?"bg-accent-primary text-fg-on-accent border-border-secondary shadow-sketchy":"border-transparent hover:border-border-secondary hover:bg-hover"}`,children:[p.jsx(_.icon,{className:"size-5",weight:O?"fill":"regular"}),_.name]})},_.path)})})})}),p.jsx("div",{className:un("content"),children:e}),p.jsx(R5,{})]})]})},oc=e=>{let n=0;for(let r=0;r<e.length;r++)n+=e.charCodeAt(r);return n},qa={high:"bg-accent-danger",medium:"bg-pastel-yellow-200 dark:bg-elevated",low:"bg-accent-success"},jA={high:"bg-accent-soft-danger",medium:"bg-pastel-yellow-200/50 dark:bg-elevated/50",low:"bg-accent-soft-success"},b2="bg-red-200 dark:bg-emphasis",r0=["bg-pastel-yellow-200 dark:bg-muted","bg-pastel-green-200 dark:bg-muted","bg-pastel-pink-200 dark:bg-muted","bg-pastel-orange-200 dark:bg-muted","bg-pastel-blue-200 dark:bg-muted","bg-pastel-purple-200 dark:bg-muted","bg-pastel-teal-200 dark:bg-muted","bg-pastel-lavender-200 dark:bg-muted"],w2=e=>r0[oc(e)%r0.length];function _2(e){const n=new Date,r=new Date(e),a=Math.floor((n.getTime()-r.getTime())/1e3);let o=Math.floor(a/31536e3);return o>=1?o+" years ago":(o=Math.floor(a/2592e3),o>=1?o+" months ago":(o=Math.floor(a/86400),o>=1?o+" days ago":(o=Math.floor(a/3600),o>=1?o+" hours ago":(o=Math.floor(a/60),o>=1?o+" minutes ago":Math.floor(a)+" seconds ago"))))}const DA=e=>`/tag/${e}`,ir=e=>`/${e}`,kA=e=>`/setting/manage-image/${e}`;function E2({id:e,title:n,tags:r,pinned:a,createdAt:o,updatedAt:i,onPinned:s,onDelete:l}){const c=new Date(Number(o)),u=_2(Number(i));return p.jsxs("div",{className:`${w2(e)} p-4 relative sketchy shadow-sketchy`,children:[a&&p.jsx("div",{className:"absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 z-10",children:p.jsx(Qc,{weight:"fill",className:"text-red-500 stroke-black stroke-8 drop-shadow-md",size:28})}),p.jsx("div",{className:"rounded-xl flex justify-between items-center",children:p.jsxs("div",{className:"flex flex-col w-full gap-4",children:[p.jsxs("div",{className:"flex justify-between",children:[p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx("div",{className:"text-fg-default text-xs",children:u}),p.jsxs("div",{className:"text-fg-muted text-xs",children:["(",c.toDateString(),")"]})]}),p.jsx("div",{className:"flex items-center gap-2",children:p.jsx(wu,{button:p.jsx(Kc,{className:"w-5 h-5"}),items:[{name:a?"Unpin":"Pin",onClick:()=>s?.()},{name:"Delete",onClick:()=>l?.()}]})})]}),p.jsx(Ve,{className:"font-bold",to:ir(e),children:n||"Untitled"}),r.length>0&&p.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(h=>p.jsx(Ve,{to:`/tag/${h.id}`,children:p.jsx(ou,{name:h.name})},h.id))})]})},e)]},e)}function IA({id:e,title:n,tags:r,createdAt:a,updatedAt:o}){const i=new Date(Number(a)),s=_2(Number(o));return p.jsx("div",{className:"border-b-2 border-dashed border-border-subtle last:border-b-0",children:p.jsxs("div",{className:"py-4 flex flex-col gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-fg-tertiary text-xs font-medium",children:s}),p.jsxs("span",{className:"text-fg-placeholder text-xs",children:["(",i.toDateString(),")"]})]}),p.jsx(Ve,{className:"font-bold text-fg-default hover:text-accent-primary transition-colors",to:ir(e),children:n||"Untitled"}),r&&r.length>0&&p.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(l=>p.jsx(Ve,{to:`/tag/${l.id}`,children:p.jsx(ou,{name:l.name})},l.id))})]})})}const LA=[{value:"narrow",label:"Narrow",description:"Optimized for reading long-form content"},{value:"wide",label:"Wide",description:"Balanced width suitable for most content"},{value:"full",label:"Full Width",description:"Maximize screen space utilization"}];function FA({isOpen:e,onClose:n,onSave:r,currentLayout:a="wide"}){const[o,i]=d.useState(a);d.useEffect(()=>{e&&i(a)},[e,a]);const s=()=>{r(o),n()};return p.jsxs(Ue,{isOpen:e,onClose:n,children:[p.jsx(Ue.Header,{title:"Layout Settings",onClose:n}),p.jsx(Ue.Body,{children:p.jsx("div",{className:"flex flex-col gap-3 sm:gap-4",children:p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx("label",{className:"text-xs sm:text-sm font-bold text-fg-muted",children:"Note Layout"}),p.jsx("div",{className:"flex flex-col gap-2",children:LA.map(l=>p.jsx(Ze,{variant:o===l.value?"primary":"ghost",className:`!justify-start !text-left !h-auto p-3 sm:p-4 ${o===l.value?"shadow-sketchy":""}`,onClick:()=>i(l.value),children:p.jsxs("div",{children:[p.jsx("div",{className:"font-bold text-sm sm:text-base text-fg-default",children:l.label}),p.jsx("div",{className:"text-xs sm:text-sm text-fg-tertiary mt-1 font-medium",children:l.description})]})},l.value))})]})})}),p.jsx(Ue.Footer,{children:p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(Ze,{variant:"ghost",size:"sm",onClick:n,children:"Cancel"}),p.jsx(Ze,{size:"sm",onClick:s,children:"Apply"})]})})]})}function $A(e,n,r,a){const o=Math.floor((e+r)/(n+r));return Math.max(o*a,a)}function Vu({minItemWidth:e,gap:n,rows:r,fallback:a,override:o}){const i=d.useRef(null),[s,l]=d.useState(a??r);return d.useLayoutEffect(()=>{if(o||!i.current)return;const h=i.current.offsetWidth,f=$A(h,e,n,r);l(f)},[e,n,r,o]),{containerRef:i,limit:o??s,isAutoLimit:!o}}const HA=240,zA=24,UA=6;function VA(){const[e,n]=Jn(),r=e.get("limit"),{containerRef:a,limit:o,isAutoLimit:i}=Vu({minItemWidth:HA,gap:zA,rows:UA,override:r?Number(r):null}),s=Number(e.get("page"))||1,l=e.get("sortBy")||"updatedAt",c=e.get("sortOrder")||"desc",u=e.get("pinnedFirst")==="true",{onDelete:h,onPinned:f}=Ms(),m=g=>{n(y=>(Object.entries(g).forEach(([v,x])=>{y.set(v,x)}),y))};return p.jsx(ft,{title:"",variant:"none",children:p.jsxs("div",{ref:a,children:[p.jsx(S5,{itemsPerPage:o,onItemsPerPageChange:g=>m({limit:g.toString(),page:"1"}),isAutoLimit:i,sortBy:l,onSortByChange:g=>m({sortBy:g,page:"1"}),sortOrder:c,onSortOrderChange:g=>m({sortOrder:g,page:"1"}),pinnedFirst:u,onPinnedFirstChange:g=>m({pinnedFirst:g.toString(),page:"1"})}),p.jsx(d.Suspense,{fallback:p.jsxs("div",{className:"grid gap-6 mt-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:[p.jsx(Ne,{height:"112px"}),p.jsx(Ne,{height:"112px"}),p.jsx(Ne,{height:"112px"})]}),children:p.jsx(y2,{searchParams:{offset:(s-1)*o,limit:o,sortBy:l,sortOrder:c,pinnedFirst:u},render:({notes:g,totalCount:y})=>p.jsx(Rt,{fallback:p.jsx(Fn,{icon:"🧠",title:"Ocean is calm",description:"Capture anything and make waves in the ocean!"}),children:g.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"grid gap-6 mt-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:g.map(v=>p.jsx(E2,{...v,onPinned:()=>f(v.id,v.pinned),onDelete:()=>h(v.id)},v.id))}),p.jsx(Rt,{fallback:null,children:y&&o<y&&p.jsx(or,{page:s,last:Math.ceil(y/o),onChange:v=>{m({page:v.toString()})}})})]})})})})]})})}const ZA="_Reference_l9lqc_1",BA={Reference:ZA},qA=au.bind(BA),WA=mh({type:"reference",propSchema:{id:{default:""},title:{default:"Unknown"}},content:"none"},{render:e=>p.jsx("span",{className:qA("Reference"),children:p.jsx(Ve,{to:ir(e.inlineContent.props.id),children:p.jsxs("span",{className:"text-fg-default",children:["[",e.inlineContent.props.title,"]"]})})})}),GA="_Tag_1o5du_1",KA={Tag:GA},YA=au.bind(KA),QA=mh({type:"tag",propSchema:{id:{default:""},tag:{default:"@Unknown"}},content:"none"},{render:e=>p.jsx("span",{className:YA("Tag"),children:p.jsx(Ve,{to:DA(e.inlineContent.props.id),children:p.jsx("span",{className:"text-fg-default",children:e.inlineContent.props.tag})})})}),XA=()=>{const e=tv(),[n,r]=d.useState([]);d.useEffect(()=>{const o=()=>{const s=e.document,l=[],c=u=>{for(const h of u){if(h.type==="heading"){const f=h,m=f.props.level||1,g=f.content?.map(y=>y.text||"").join("")||"";g.trim()&&l.push({id:h.id,level:m,text:g})}h.children&&Array.isArray(h.children)&&c(h.children)}};c(s),r(l)};o();const i=e.onChange?.(o);return()=>{i&&i()}},[e]);const a=o=>{e.setTextCursorPosition(o);const i=document.querySelector(`[data-id="${o}"]`);i&&i.scrollIntoView({behavior:"smooth",block:"center"})};return n.length===0?p.jsx("div",{className:"w-full rounded-sketchy-lg border-2 border-border bg-subtle p-6",children:p.jsxs("div",{className:"flex items-center gap-3 text-fg-tertiary",children:[p.jsx(eo,{className:"text-2xl flex-shrink-0"}),p.jsxs("div",{children:[p.jsx("div",{className:"font-medium text-base mb-1",children:"Table of Contents"}),p.jsx("div",{className:"text-sm opacity-75",children:"Add headings to your document to generate a table of contents"})]})]})}):p.jsxs("div",{className:"w-full rounded-sketchy-lg border-2 border-border bg-subtle p-6",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[p.jsx(eo,{className:"text-xl text-fg-muted"}),p.jsx("h3",{className:"text-base font-bold text-fg",children:"Table of Contents"})]}),p.jsx("nav",{className:"space-y-0.5",children:n.map(o=>{const i=(o.level-1)*16,s=o.level===1;return p.jsx("button",{onClick:()=>a(o.id),className:`
262
- block w-full text-left rounded-sketchy-sm px-3 py-2 transition-all duration-150
263
- hover:bg-hover
264
- hover:translate-x-1
265
- ${s?"text-sm font-semibold text-fg":"text-sm text-fg-muted"}
266
- `,style:{paddingLeft:`${12+i}px`},children:p.jsxs("span",{className:"flex items-center gap-2",children:[s&&p.jsx("span",{className:"w-2 h-2 rounded-sketchy-xs bg-fg-default flex-shrink-0"}),p.jsx("span",{className:"line-clamp-2",children:o.text})]})},o.id)})})]})},JA=ev({type:"tableOfContents",propSchema:{},content:"none"},{render:()=>p.jsx(XA,{})})(),eR=iv.create({inlineContentSpecs:{...lv,tag:QA,reference:WA},blockSpecs:{...sv,tableOfContents:JA}}),tR=({editor:e})=>p.jsx(Mc,{triggerCharacter:"/",getItems:async n=>cv([...nv(e).filter(r=>r.title!=="Audio"&&r.title!=="Video"&&r.title!=="File"),{title:"Table of Contents",subtext:"Insert a table of contents based on headings",onItemClick:()=>{e.insertBlocks([{type:"tableOfContents"}],e.getTextCursorPosition().block,"after")},aliases:["toc","table of contents","contents","outline","index"],group:"Other",icon:p.jsx(eo,{})}],n)}),nR=({onClick:e})=>p.jsx(Mc,{triggerCharacter:"[",getItems:async n=>{const r=await zu({query:n,limit:5});if(r.type==="error")return[];const{notes:a}=r.allNotes;return a.map(o=>({title:o.title,onItemClick:()=>e({type:"reference",props:{id:o.id,title:o.title}})}))}}),rR=({onClick:e})=>p.jsx(Mc,{triggerCharacter:"@",getItems:async n=>{const r=await Uu({query:n,limit:5});if(r.type==="error")return[];const{tags:a}=r.allTags,o=a.some(s=>s.name!==`@${n}`),i=[{title:"Add a new tag",onItemClick:async()=>{const s=await pA({name:"@"+n});if(s.type==="error")return;const{id:l,name:c}=s.createTag;e({type:"tag",props:{id:l,tag:c}})}}];return a.length===0?i:a.map(s=>({title:s.name,onItemClick:()=>e({type:"tag",props:{id:s.id,tag:s.name}})})).concat(n&&o?i:[])}});async function aR(e){return new Promise((n,r)=>{const a=new FileReader;a.readAsDataURL(e),a.onload=()=>n(a.result),a.onerror=o=>r(o)})}const oR=d.forwardRef(({content:e,editable:n,onChange:r},a)=>{const{theme:o}=Pr(s=>s),i=rv({schema:eR,initialContent:e&&JSON.parse(e)||void 0,uploadFile:async s=>xA({base64:await aR(s)})},[]);return d.useImperativeHandle(a,()=>({getContent:()=>JSON.stringify(i.document)})),p.jsxs(av,{slashMenu:!1,theme:o,editor:i,editable:n,onChange:r,children:[p.jsx(tR,{editor:i}),p.jsx(nR,{onClick:s=>{i.insertInlineContent([s," "])}}),p.jsx(rR,{onClick:s=>{i.insertInlineContent([s," "])}})]})});function C2(){const e=So(),n=er(),r=d.useCallback(async(i,s,l="medium",c,u)=>{const h=await AA({noteId:i,reminderDate:s,priority:l,content:u});if(h.type==="error"){e(h.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:_e.reminders.noteAllPages(i),exact:!1}),n.invalidateQueries({queryKey:_e.reminders.upcomingAllPages(),exact:!1}),n.invalidateQueries({queryKey:_e.reminders.inDateRangeAll(),exact:!1})]),c&&c()},[n,e]),a=d.useCallback(async(i,s,l,c)=>{const u=await RA({id:i,...l});if(u.type==="error"){e(u.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:_e.reminders.noteAllPages(s),exact:!1}),n.invalidateQueries({queryKey:_e.reminders.upcomingAllPages(),exact:!1}),n.invalidateQueries({queryKey:_e.reminders.inDateRangeAll(),exact:!1})]),c&&c()},[n,e]),o=d.useCallback(async(i,s,l)=>{const c=await MA(i);if(c.type==="error"){e(c.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:_e.reminders.noteAllPages(s),exact:!1}),n.invalidateQueries({queryKey:_e.reminders.upcomingAllPages(),exact:!1}),n.invalidateQueries({queryKey:_e.reminders.inDateRangeAll(),exact:!1})]),l&&l()},[n,e]);return{onCreate:r,onUpdate:a,onDelete:o}}const a0={low:{active:"bg-accent-success text-fg-default border-2 border-border shadow-sketchy",inactive:"bg-subtle text-fg-muted border-2 border-transparent"},medium:{active:"bg-pastel-yellow-200 dark:bg-elevated text-fg-default border-2 border-border shadow-sketchy",inactive:"bg-subtle text-fg-muted border-2 border-transparent"},high:{active:"bg-accent-danger text-fg-default border-2 border-border shadow-sketchy",inactive:"bg-subtle text-fg-muted border-2 border-transparent"}};function iR({isOpen:e,onClose:n,onSave:r,reminder:a,mode:o}){const[i,s]=d.useState(new Date),[l,c]=d.useState("medium"),[u,h]=d.useState("");d.useEffect(()=>{e&&o==="edit"&&a?(s(new Date(Number(a.reminderDate))),c(a.priority||"medium"),h(a.content||"")):e&&o==="create"&&(s(new Date),c("medium"),h(""))},[e,o,a]);const f=()=>{r(i,l,u||void 0),n()},m=g=>l===g?a0[g].active:a0[g].inactive;return p.jsxs(Ue,{isOpen:e,onClose:n,children:[p.jsx(Ue.Header,{title:o==="create"?"Create Reminder":"Edit Reminder",onClose:n}),p.jsx(Ue.Body,{children:p.jsxs("div",{className:"flex flex-col gap-3 sm:gap-4",children:[p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Xn,{children:"Date & Time"}),p.jsx(Ua,{type:"datetime-local",size:"sm",value:xe(i).format("YYYY-MM-DDTHH:mm"),onChange:g=>s(new Date(g.target.value))})]}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Xn,{children:"Content"}),p.jsx(Km,{size:"sm",placeholder:"Enter reminder content (optional)",value:u,onChange:g=>h(g.target.value)})]}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Xn,{children:"Priority"}),p.jsxs(Cu,{type:"single",value:l,onValueChange:g=>g&&c(g),className:"border-none gap-1.5 sm:gap-2",children:[p.jsx(qr,{value:"low",className:`flex-1 rounded-[8px_3px_9px_2px/3px_6px_3px_7px] font-bold ${m("low")}`,children:"Low"}),p.jsx(qr,{value:"medium",className:`flex-1 rounded-[8px_3px_9px_2px/3px_6px_3px_7px] font-bold ${m("medium")}`,children:"Medium"}),p.jsx(qr,{value:"high",className:`flex-1 rounded-[8px_3px_9px_2px/3px_6px_3px_7px] font-bold ${m("high")}`,children:"High"})]})]})]})}),p.jsx(Ue.Footer,{children:p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(Ze,{variant:"ghost",size:"sm",onClick:n,children:"Cancel"}),p.jsx(Ze,{size:"sm",onClick:f,children:o==="create"?"Create":"Save"})]})})]})}const sR="_pulsingText_jjwi3_1",lR="_urgent_jjwi3_7",o0={pulsingText:sR,urgent:lR};function cR({noteId:e}){const[n,r]=d.useState(!1),[a,o]=d.useState(!1),[i,s]=d.useState("create"),[l,c]=d.useState(void 0),{onCreate:u,onUpdate:h,onDelete:f}=C2(),m=()=>{s("create"),c(void 0),o(!0)},g=E=>{s("edit"),c(E),o(!0)},y=(E,C,S)=>{i==="create"?u(e,E,C,()=>{o(!1)},S):i==="edit"&&l&&h(l.id,e,{reminderDate:E,priority:C,content:S},()=>{o(!1)})},v=E=>{h(E.id,e,{completed:!E.completed})},x=E=>{const C=xe(Number(E)),S=xe();return C.isSame(S,"day")?`Today at ${C.format("HH:mm")}`:C.isSame(S.add(1,"day"),"day")?`Tomorrow at ${C.format("HH:mm")}`:C.format("YYYY-MM-DD HH:mm")},b=E=>{const C=xe(Number(E)),S=xe(),M=C.diff(S,"hour");return M<=6?"high":M<=24?"medium":"low"},w=E=>{const C=xe(Number(E)),S=xe(),M=C.diff(S,"hour"),R=C.diff(S,"minute")%60;return M<0||R<0?"Overdue":M===0?`${R}m remaining`:`${M}h ${R}m remaining`};return p.jsxs("div",{className:"p-4 rounded-sketchy-lg mb-5 border-2 border-border bg-surface/50",children:[p.jsxs("div",{className:"flex justify-between items-center mb-3",children:[p.jsxs("button",{onClick:()=>r(!n),className:"flex items-center gap-2 px-2 py-1 rounded-sketchy-sm hover:bg-hover-subtle transition-colors",children:[n?p.jsx(za,{size:14}):p.jsx(Gc,{size:14}),p.jsx("p",{className:"text-sm font-bold",children:"Reminders"})]}),!n&&p.jsxs(Ze,{size:"sm",variant:"ghost",onClick:m,children:[p.jsx(M1,{className:"w-3 h-3"}),p.jsx("span",{className:"hidden sm:inline text-xs",children:"Add"})]})]}),!n&&p.jsx(x2,{noteId:e,searchParams:{offset:0,limit:9999},render:({reminders:E,totalCount:C})=>p.jsx("div",{className:"flex flex-col gap-2",children:E.length===0?p.jsx("p",{className:"text-fg-placeholder text-xs",children:C===0?"No reminders.":"No incomplete reminders."}):p.jsx("div",{className:"flex flex-col gap-1.5",children:E.map(S=>{const M=S.priority||b(S.reminderDate),R=w(S.reminderDate);return p.jsxs("div",{className:`flex items-start gap-2 p-2 rounded-sketchy-md transition-colors ${S.completed?"bg-muted":jA[M]}`,children:[p.jsx(iu,{checked:S.completed,onChange:()=>v(S),size:"sm"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:`font-bold text-xs text-fg-muted ${S.completed?"line-through opacity-50":""}`,children:x(S.reminderDate)}),S.content&&p.jsx("div",{className:`text-xs text-fg-tertiary ${S.completed?"line-through opacity-50":""} truncate`,children:S.content}),!S.completed&&p.jsx("span",{className:`text-[10px] font-medium ${o0.pulsingText} ${M==="high"?o0.urgent:"text-fg-placeholder"}`,children:R})]}),p.jsx(wu,{button:p.jsx(Kc,{size:14,className:"text-fg-placeholder"}),items:[{name:"Edit",onClick:()=>g(S)},{name:"Delete",onClick:()=>f(S.id,e)}]})]},S.id)})})})}),p.jsx(iR,{isOpen:a,onClose:()=>o(!1),onSave:y,reminder:l,mode:i})]})}function uR(){const{id:e}=Fc(),n=Tr(),r=So(),a=d.useRef(null),o=d.useRef(null),[i,s]=d.useState(""),[l,c]=d.useState({}),[u,h]=d.useState(!1),[f,m]=d.useState("wide"),[g,y]=d.useState(!1),[v,x]=Bg(1e3),{data:b,isError:w,isLoading:E}=In({queryKey:_e.notes.detail(e??""),async queryFn(){const j=await eA(e);if(j.type==="error")throw r(j.errors[0].message),j;return s(j.note.title),h(j.note.pinned),m(j.note.layout||"wide"),c($=>Object.assign({},$,{[e]:xe(Number(j.note.updatedAt)).format("YYYY-MM-DD HH:mm:ss")})),j.note},enabled:!!e,gcTime:0}),C=async({title:j="",content:$=""})=>{!e||E||x(async()=>{const V=await e0({id:e,title:j,content:$});if(V.type==="error"){r(V.errors[0].message);return}s(j),c(A=>Object.assign({},A,{[e]:xe().format("YYYY-MM-DD HH:mm:ss")}))})},S=()=>{C({title:o.current?.value,content:a?.current?.getContent()})},M=async j=>{if(!e||E)return;const $=await e0({id:e,layout:j});if($.type==="error"){r($.errors[0].message);return}m(j),r("Layout has been updated.")},{onCreate:R,onDelete:_,onPinned:O}=Ms();if(w)return p.jsx("div",{className:"h-full flex justify-center items-center",children:p.jsxs("div",{onClick:()=>n(-1),className:"flex justify-center items-center gap-2 cursor-pointer animate-bounce",children:[p.jsx(Br,{className:"w-6"}),p.jsx("div",{className:"font-bold text-lg",children:"take you back"})]})});const P=()=>({narrow:"max-w-[640px]",wide:"max-w-[896px]",full:"max-w-full px-4"})[f];return p.jsx(ft,{title:i,variant:"none",children:p.jsxs("main",{className:"mx-auto "+P(),children:[E&&p.jsxs(p.Fragment,{children:[p.jsx(Ne,{className:"mb-8",height:"66px"}),p.jsx(Ne,{className:"ml-12 mb-8",height:"150px"})]}),b&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{style:{zIndex:"1001"},className:"sticky top-20 mb-8 flex items-center justify-between gap-3 p-3 px-4 border-2 border-border rounded-sketchy-lg bg-surface/90 backdrop-blur-sm shadow-sketchy",children:[p.jsxs("div",{className:"flex flex-col flex-1 gap-1",children:[p.jsx("input",{ref:o,placeholder:"Title",className:"text-md font-bold outline-none bg-transparent w-full",type:"text",defaultValue:b.title,onChange:S}),e&&l[e]&&p.jsxs("div",{className:"text-fg-placeholder text-xs",children:["Last saved at ",l[e]]})]}),p.jsxs("div",{className:"flex gap-2 items-center",children:[p.jsx(wu,{button:p.jsx(Kc,{className:"w-5 h-5"}),items:[{name:u?"Unpin":"Pin",onClick:()=>O(e,u,()=>{h(j=>!j)})},{name:"Clone this note",onClick:()=>R(o.current?.value||"untitled",a?.current?.getContent()||"",f)},{name:"Delete",onClick:()=>_(e,()=>{r("The note has been deleted.")})},{name:"Change layout",onClick:()=>y(!0)}]}),p.jsx(Ze,{size:"sm",isLoading:v,onClick:S,children:"Save"})]})]}),p.jsx(oR,{ref:a,content:b.content,onChange:S})]}),e&&p.jsx(d.Suspense,{fallback:p.jsx(Ne,{height:"80px"}),children:p.jsx(cR,{noteId:e})}),p.jsx(d.Suspense,{fallback:p.jsx(Ne,{height:"80px"}),children:p.jsx(wA,{noteId:e,render:j=>j&&j.length>0&&p.jsxs("div",{className:"p-4 rounded-sketchy-lg border-2 border-border bg-surface/50",children:[p.jsx("p",{className:"text-sm font-bold mb-2",children:"Back References"}),p.jsx("ul",{className:"text-sm flex flex-col gap-1",children:j?.map($=>p.jsx("li",{children:p.jsxs(Ve,{to:ir($.id),className:"block px-2 py-1 rounded-sketchy-sm text-fg-secondary hover:bg-hover transition-colors",children:["- ",$.title]})},$.id))})]})})}),p.jsx(FA,{isOpen:g,onClose:()=>y(!1),onSave:M,currentLayout:f})]})})}function dR(){const[e,n]=Jn(),r=10,a=Number(e.get("page"))||1,o=e.get("query")||"";return p.jsx(ft,{title:`Search "${o}"`,variant:"none",children:p.jsx("main",{className:"mx-auto max-w-[896px]",children:p.jsx(d.Suspense,{fallback:null,children:p.jsx(y2,{searchParams:{query:o,limit:r,offset:(a-1)*r,fields:["content"]},render:({notes:i,totalCount:s})=>p.jsxs(p.Fragment,{children:[p.jsx(Rt,{fallback:p.jsx(Fn,{icon:"👀",title:"No results found",description:"Try searching for something else."}),children:i.length>0&&i.map(l=>p.jsxs("div",{className:"mb-5",children:[p.jsx("div",{className:"font-semibold text-lg mb-1",children:p.jsx(Ve,{to:ir(l.id),children:p.jsx(hf,{match:o,children:l.title})})}),p.jsx("div",{className:"bg-muted p-3 rounded-lg",children:JSON.parse(l.content).filter(c=>JSON.stringify(c).includes(o)).map(c=>p.jsx(hf,{match:o,children:JSON.stringify(c)}))})]},l.id))}),p.jsx(Rt,{fallback:null,children:s&&r<s&&p.jsx(or,{page:a,last:Math.ceil(s/r),onChange:l=>{n(c=>(c.set("page",l.toString()),c))}})})]})})})})})}function fR(){const{id:e}=Fc(),[n,r]=Jn(),a=25,o=Number(n.get("page"))||1,{onDelete:i,onPinned:s}=Ms();return p.jsx(ft,{title:"Tag",variant:"subtle",children:p.jsx(d.Suspense,{fallback:p.jsxs("div",{className:"grid gap-6 mt-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:[p.jsx(Ne,{height:"112px"}),p.jsx(Ne,{height:"112px"}),p.jsx(Ne,{height:"112px"})]}),children:p.jsx(EA,{searchParams:{query:e,offset:(o-1)*a,limit:a},render:({notes:l,totalCount:c})=>p.jsx(Rt,{fallback:p.jsx(Fn,{icon:"🧠",title:"Ocean is calm",description:"Capture anything and make waves in the ocean!"}),children:l.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"grid gap-6 mt-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:l.map(u=>p.jsx(E2,{...u,onPinned:()=>s(u.id,u.pinned),onDelete:()=>i(u.id)},u.id))}),p.jsx(Rt,{fallback:null,children:c&&a<c&&p.jsx(or,{page:o,last:Math.ceil(c/a),onChange:u=>{r(h=>(h.set("page",u.toString()),h))}})})]})})})})})}const hR=100,pR=8,mR=12;function gR(){const[e,n]=Jn(),{containerRef:r,limit:a}=Vu({minItemWidth:hR,gap:pR,rows:mR}),o=Number(e.get("page"))||1;return p.jsx(ft,{title:"Tags",description:"Organize and browse notes by tags",children:p.jsx("div",{ref:r,children:p.jsx(d.Suspense,{fallback:p.jsxs("div",{className:"flex flex-wrap gap-2",children:[p.jsx(Ne,{width:"90px",height:"36px"}),p.jsx(Ne,{width:"120px",height:"36px"}),p.jsx(Ne,{width:"80px",height:"36px"}),p.jsx(Ne,{width:"100px",height:"36px"}),p.jsx(Ne,{width:"110px",height:"36px"}),p.jsx(Ne,{width:"70px",height:"36px"})]}),children:p.jsx(_A,{searchParams:{offset:(o-1)*a,limit:a},render:({tags:i,totalCount:s})=>p.jsx(Rt,{fallback:p.jsx(Fn,{icon:"🤔",title:"There are no tags",description:"Try to tag some notes using <@> key."}),children:i.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"flex flex-wrap gap-2",children:i.map(l=>p.jsx(Ve,{to:`/tag/${l.id}`,children:p.jsxs("div",{className:"bg-pastel-teal-200 dark:bg-muted px-3 py-1.5 rounded-[8px_3px_9px_2px/3px_6px_3px_7px] border-2 border-border shadow-sketchy hover:shadow-sketchy-lg hover:-translate-y-0.5 active:translate-x-0.5 active:translate-y-0.5 active:shadow-none transition-all duration-200 font-bold text-sm text-fg-default whitespace-nowrap",children:[l.name," ",p.jsxs("span",{className:"text-fg-tertiary text-xs",children:["(",l.referenceCount,")"]})]})},l.id))}),p.jsx(Rt,{fallback:null,children:s&&a<s&&p.jsx(or,{page:o,last:Math.ceil(s/a),onChange:l=>{n(c=>(c.set("page",l.toString()),c))}})})]})})})})})})}const yR=({note:e,type:n})=>p.jsx(Ve,{to:ir(e.id),className:"block min-h-[44px]",children:p.jsxs("div",{className:`
267
- ${w2(e.title)}
268
- rounded-sketchy-sm
269
- px-2 py-1.5
270
- hover:brightness-95 dark:hover:brightness-110
271
- transition-all
272
- h-full flex flex-col justify-center
273
- `,children:[p.jsx("div",{className:"font-bold text-xs line-clamp-1 text-fg-default",children:e.title}),p.jsx("div",{className:"text-fg-secondary text-[10px] font-medium",children:xe(Number(n==="create"?e.createdAt:e.updatedAt)).format("HH:mm")})]})}),vR=({reminder:e,isPast:n})=>{const r=n&&!e.completed,a=e.priority||"medium";return p.jsx(Ve,{to:ir(e.note?.id||""),className:"block min-h-[44px]",children:p.jsxs("div",{className:`
274
- rounded-sketchy-sm
275
- px-2 py-1.5
276
- hover:brightness-95 dark:hover:brightness-110
277
- transition-all
278
- h-full flex flex-col justify-center
279
- ${r?b2:qa[a]}
280
- ${e.completed?"opacity-40":""}
281
- `,children:[p.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[p.jsx(l1,{size:12,className:"text-fg-muted"}),r&&p.jsx("span",{className:"text-[9px] font-bold text-fg-error",children:"!"})]}),p.jsx("div",{className:`font-bold line-clamp-1 text-xs text-fg-default ${e.completed?"line-through":""}`,children:e.content||e.note?.title||"No title"}),p.jsx("div",{className:"text-fg-secondary text-[10px] font-medium",children:xe(Number(e.reminderDate)).format("HH:mm")})]})})},hl=3,i0=(e,n,r)=>e.map(a=>a.type==="note"?p.jsx(yR,{note:a.item,type:n},`note-${a.item.id}`):p.jsx(vR,{reminder:a.item,isPast:r},`reminder-${a.item.id}`)),xR=({day:e,isCurrentMonth:n,isSunday:r,isToday:a,isPast:o,notes:i,reminders:s,type:l})=>{const[c,u]=d.useState(!1),h=d.useMemo(()=>{const x=i.map(w=>({type:"note",item:w})),b=s.map(w=>({type:"reminder",item:w}));return o?[...x,...b]:[...b,...x]},[o,i,s]),f=h.length>hl,m=d.useCallback(()=>u(!0),[]),g=d.useCallback(()=>u(!1),[]),y=()=>n?a?"border-border outline outline-1 outline-border":"bg-surface border-border-subtle":"bg-muted/30 border-border-subtle",v=()=>a?"bg-accent-primary text-fg-on-accent border-2 border-border font-bold":n?r?"text-fg-weekend font-bold":"text-fg-secondary font-bold":"text-fg-disabled";return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:`min-h-[140px] rounded-sketchy-sm border p-2 ${y()}`,children:[p.jsx("div",{className:"flex justify-end mb-2",children:p.jsx("span",{className:`
282
- flex items-center justify-center
283
- w-7 h-7 text-sm
284
- rounded-sketchy-xs
285
- ${v()}
286
- `,children:e})}),n&&h.length>0&&p.jsxs("div",{className:"flex flex-col gap-1",children:[i0(h.slice(0,hl),l,o),f&&p.jsxs("button",{type:"button",onClick:m,className:"text-center text-[10px] font-bold text-fg-tertiary py-1 cursor-pointer hover:text-fg-muted hover:bg-hover-subtle rounded-sketchy-xs transition-colors",children:["+",h.length-hl," more"]})]})]}),f&&p.jsxs(Ue,{isOpen:c,onClose:g,children:[p.jsx(Ue.Header,{title:`${e}일`,onClose:g}),p.jsx(Ue.Body,{children:p.jsx("div",{className:"flex flex-col gap-2 max-h-[60vh] overflow-y-auto",children:i0(h,l,o)})})]})]})},bR=d.memo(xR),wR=["January","February","March","April","May","June","July","August","September","October","November","December"],_R=({month:e,year:n,onPrevMonth:r,onNextMonth:a,onToday:o})=>p.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mb-6",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:wR[e-1]}),p.jsx("span",{className:"text-xl sm:text-2xl text-fg-placeholder",children:n})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Ze,{variant:"ghost",size:"sm",onClick:o,children:"Today"}),p.jsx(Ze,{variant:"ghost",size:"icon-sm",onClick:r,children:p.jsx(Br,{width:18,height:18})}),p.jsx(Ze,{variant:"ghost",size:"icon-sm",onClick:a,children:p.jsx(za,{width:18,height:18})})]})]}),ER=[{label:"High",className:qa.high},{label:"Medium",className:qa.medium},{label:"Low",className:qa.low},{label:"Overdue",className:b2}],S2=()=>p.jsx("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:ER.map(({label:e,className:n})=>p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("div",{className:`w-3 h-3 rounded-sketchy-xs ${n}`}),p.jsx("span",{className:"text-fg-tertiary font-medium",children:e})]},e))}),CR=`
287
- query NotesInDateRange($dateRange: DateRangeInput) {
288
- notesInDateRange(dateRange: $dateRange) {
289
- id
290
- title
291
- createdAt
292
- updatedAt
293
- }
294
- }
295
- `,SR=`
296
- query RemindersInDateRange($dateRange: DateRangeInput) {
297
- remindersInDateRange(dateRange: $dateRange) {
298
- id
299
- noteId
300
- reminderDate
301
- completed
302
- priority
303
- content
304
- note {
305
- id
306
- title
307
- }
308
- }
309
- }
310
- `,AR=async e=>{const n=await Te(CR,{dateRange:e});if(n.type==="error")throw n;return n.notesInDateRange},RR=async e=>{const n=await Te(SR,{dateRange:e});if(n.type==="error")throw n;return n.remindersInDateRange},MR=({year:e,month:n})=>{const r=`${e}-${String(n).padStart(2,"0")}-01`,a=n===12?1:n+1,i=`${n===12?e+1:e}-${String(a).padStart(2,"0")}-01`,s={start:r,end:i},l=In({queryKey:_e.calendar.notesInDateRange(e,n),queryFn:()=>AR(s)}),c=In({queryKey:_e.reminders.inDateRange(e,n),queryFn:()=>RR(s)});return{notes:l.data??[],reminders:c.data??[],isLoading:l.isLoading||c.isLoading,isError:l.isError||c.isError}},TR=["SUN","MON","TUE","WED","THU","FRI","SAT"],PR=[],NR=[];function OR(){const[e,n]=Jn(),r=Number(e.get("year"))||xe().year(),a=Number(e.get("month"))||xe().month()+1,o=e.get("type")||"create",{notes:i,reminders:s,isLoading:l,isError:c}=MR({year:r,month:a}),u=d.useMemo(()=>{const y=xe(),v=`${y.year()}-${y.month()+1}-${y.date()}`,x=new Map;for(const A of i){const D=xe(Number(o==="create"?A.createdAt:A.updatedAt)),T=`${D.year()}-${D.month()+1}-${D.date()}`,F=x.get(T)||[];F.push(A),x.set(T,F)}const b=new Map;for(const A of s){const D=xe(Number(A.reminderDate)),T=`${D.year()}-${D.month()+1}-${D.date()}`,F=b.get(T)||[];F.push(A),b.set(T,F)}const w=new Date(r,a-1,1),E=new Date(r,a,0),C=w.getDay(),S=E.getDate(),M=[],R=a===1?12:a-1,_=a===1?r-1:r,O=new Date(_,R,0).getDate();for(let A=C-1;A>=0;A--)M.push({day:O-A,isCurrentMonth:!1,year:_,month:R});for(let A=1;A<=S;A++)M.push({day:A,isCurrentMonth:!0,year:r,month:a});const P=(C+S)%7,j=P===0?0:7-P,$=a===12?1:a+1,V=a===12?r+1:r;for(let A=1;A<=j;A++)M.push({day:A,isCurrentMonth:!1,year:V,month:$});return M.map((A,D)=>{const T=`${A.year}-${A.month}-${A.day}`,F=xe(`${A.year}-${String(A.month).padStart(2,"0")}-${String(A.day).padStart(2,"0")}`);return{key:T,day:A.day,isCurrentMonth:A.isCurrentMonth,isSunday:D%7===0,isToday:T===v,isPast:F.isBefore(y,"day"),notes:x.get(T)||PR,reminders:b.get(T)||NR}})},[r,a,i,s,o]),h=()=>{const y=a===1?12:a-1,v=a===1?r-1:r;n(x=>(x.set("month",y.toString()),x.set("year",v.toString()),x))},f=()=>{const y=a===12?1:a+1,v=a===12?r+1:r;n(x=>(x.set("month",y.toString()),x.set("year",v.toString()),x))},m=()=>{n(y=>(y.set("month",(xe().month()+1).toString()),y.set("year",xe().year().toString()),y))},g=y=>{y&&n(v=>(y==="create"?v.delete("type"):v.set("type",y),v))};return p.jsx(ft,{title:"Calendar",variant:"none",children:p.jsxs("div",{className:"w-full px-4 sm:px-6 py-6 sm:py-10 max-w-screen-2xl mx-auto",children:[c?p.jsx(gg,{children:"Failed to load calendar data. Please try again later."}):p.jsxs("div",{className:"bg-surface rounded-[16px_5px_17px_5px/5px_13px_5px_15px] p-3 sm:p-4 border-2 border-border shadow-sketchy overflow-x-auto",children:[p.jsx(_R,{month:a,year:r,onPrevMonth:h,onNextMonth:f,onToday:m}),p.jsxs("div",{className:"min-w-[900px]",children:[p.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:TR.map((y,v)=>p.jsx("div",{className:`
311
- py-2 text-center text-xs font-bold tracking-wider
312
- ${v===0?"text-fg-weekend":"text-fg-secondary"}
313
- `,children:y},y))}),l?p.jsx("div",{className:"grid grid-cols-7 gap-1",children:Array.from({length:35}).map((y,v)=>p.jsx(Ne,{height:140},v))}):p.jsx("div",{className:"grid grid-cols-7 gap-1",children:u.map(y=>p.jsx(bR,{day:y.day,isCurrentMonth:y.isCurrentMonth,isSunday:y.isSunday,isToday:y.isToday,isPast:y.isPast,notes:y.notes,reminders:y.reminders,type:o},y.key))})]})]}),p.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mt-6",children:[p.jsx(S2,{}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("span",{className:"text-sm text-fg-tertiary font-bold",children:"Display by:"}),p.jsxs(Cu,{type:"single",variant:"pills",size:"sm",value:o,onValueChange:g,children:[p.jsx(qr,{value:"create",children:"Create date"}),p.jsx(qr,{value:"update",children:"Update date"})]})]})]})]})})}const jR="_urgentPulsing_1th0h_47",DR="_priorityHigh_1th0h_51",kR="_priorityMedium_1th0h_67",pl={urgentPulsing:jR,priorityHigh:DR,priorityMedium:kR};function IR({reminder:e,onUpdate:n,onDelete:r}){const a=l=>{const c=xe(Number(l)),u=xe();return c.isSame(u,"day")?`Today at ${c.format("HH:mm")}`:c.isSame(u.add(1,"day"),"day")?`Tomorrow at ${c.format("HH:mm")}`:c.format("YYYY-MM-DD HH:mm")},o=l=>{const c=xe(Number(l)),u=xe(),h=c.diff(u,"hour"),f=c.diff(u,"minute")%60;return h<0||f<0?"Overdue":h===0?`${f}m remaining`:`${h}h ${f}m remaining`},i=o(e.reminderDate)==="Overdue",s=e.priority==="high"?pl.priorityHigh:e.priority==="medium"?pl.priorityMedium:"";return p.jsxs("div",{className:`flex justify-between items-center p-4 border-2 rounded-[12px_4px_13px_3px/4px_10px_4px_12px] shadow-sketchy ${qa[e.priority||"low"]} border-border-secondary ${s}`,children:[p.jsxs("div",{className:"flex flex-col",children:[p.jsx(Ve,{to:ir(e.note?.id||""),className:"font-bold hover:underline flex items-center gap-2 text-fg-default",children:e.note?.title||"Untitled Note"}),e.content&&p.jsx("p",{className:"text-sm text-fg-muted mt-1 mb-1 font-medium",children:e.content}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-sm text-fg-secondary font-medium",children:a(e.reminderDate)}),p.jsx("span",{className:`text-xs font-bold ${i?`text-fg-error ${pl.urgentPulsing}`:"text-fg-tertiary"}`,children:o(e.reminderDate)})]})]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(Ze,{variant:"soft-success",size:"sm",onClick:()=>n(e.id,e.noteId.toString(),{completed:!0}),children:"Complete"}),p.jsx(Ze,{variant:"soft-danger",size:"sm",onClick:()=>r(e.id,e.noteId.toString()),children:"Delete"})]})]})}function LR(){const[e,n]=Jn(),{onUpdate:r,onDelete:a}=C2(),o=25,i=Number(e.get("page"))||1;return p.jsx(ft,{title:"Reminders",description:"Manage all your note reminders in one place",headerRight:p.jsx(S2,{}),children:p.jsx(d.Suspense,{fallback:p.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[p.jsx(Ne,{height:"60px"}),p.jsx(Ne,{height:"60px"}),p.jsx(Ne,{height:"60px"}),p.jsx(Ne,{height:"60px"})]}),children:p.jsx(x2,{searchParams:{offset:(i-1)*o,limit:o},render:({reminders:s,totalCount:l})=>p.jsxs(Rt,{fallback:p.jsx(Fn,{icon:"🔔",title:"No upcoming reminders",description:"Add reminders to your notes to see them here"}),children:[s.length>0&&p.jsx("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:s.map(c=>p.jsx(IR,{reminder:c,onUpdate:r,onDelete:a},c.id))}),p.jsx(Rt,{fallback:null,children:l&&o<l&&p.jsx(or,{page:i,last:Math.ceil(l/o),onChange:c=>{n(u=>(u.set("page",c.toString()),u))}})})]})})})})}function FR(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function $R(e,n,r){return n=WR(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function s0(e,n){return UR(e)||FR(e,n)||A2(e,n)||BR()}function HR(e){return zR(e)||VR(e)||A2(e)||ZR()}function zR(e){if(Array.isArray(e))return ic(e)}function UR(e){if(Array.isArray(e))return e}function VR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function A2(e,n){if(e){if(typeof e=="string")return ic(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ic(e,n)}}function ic(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=new Array(n);r<n;r++)a[r]=e[r];return a}function ZR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
314
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
315
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qR(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function WR(e){var n=qR(e,"string");return typeof n=="symbol"?n:String(n)}var GR=function(n,r){var a=new Set(r);return Object.assign.apply(Object,[{}].concat(HR(Object.entries(n).filter(function(o){var i=s0(o,1),s=i[0];return!a.has(s)}).map(function(o){var i=s0(o,2),s=i[0],l=i[1];return $R({},s,l)}))))};function sc(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function KR(e){if(Array.isArray(e))return e}function YR(e){if(Array.isArray(e))return sc(e)}function QR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XR(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function JR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
316
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
317
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tM(e,n){return KR(e)||XR(e,n)||R2(e,n)||JR()}function l0(e){return YR(e)||QR(e)||R2(e)||eM()}function R2(e,n){if(e){if(typeof e=="string")return sc(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sc(e,n):void 0}}function nM(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.wrapperElementType,a=r===void 0?"div":r,o=n.nodeMapper,i=o===void 0?function(h){return h}:o,s=n.methodNames,l=s===void 0?[]:s,c=n.initPropNames,u=c===void 0?[]:c;return d.forwardRef(function(h,f){var m=d.useRef(),g=d.useMemo(function(){var x=Object.fromEntries(u.filter(function(b){return h.hasOwnProperty(b)}).map(function(b){return[b,h[b]]}));return e(x)},[]);c0(function(){g(i(m.current))},d.useLayoutEffect),c0(function(){return g._destructor instanceof Function?g._destructor:void 0});var y=d.useCallback(function(x){for(var b=arguments.length,w=new Array(b>1?b-1:0),E=1;E<b;E++)w[E-1]=arguments[E];return g[x]instanceof Function?g[x].apply(g,w):void 0},[g]),v=d.useRef({});return Object.keys(GR(h,[].concat(l0(l),l0(u)))).filter(function(x){return v.current[x]!==h[x]}).forEach(function(x){return y(x,h[x])}),v.current=h,d.useImperativeHandle(f,function(){return Object.fromEntries(l.map(function(x){return[x,function(){for(var b=arguments.length,w=new Array(b),E=0;E<b;E++)w[E]=arguments[E];return y.apply(void 0,[x].concat(w))}]}))},[y]),he.createElement(a,{ref:m})})}function c0(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.useEffect,r=d.useRef(),a=d.useRef(!1),o=d.useRef(!1),i=d.useState(0),s=tM(i,2);s[0];var l=s[1];a.current&&(o.current=!0),n(function(){return a.current||(r.current=e(),a.current=!0),l(function(c){return c+1}),function(){o.current&&r.current&&r.current()}},[])}var lc="http://www.w3.org/1999/xhtml";const u0={svg:"http://www.w3.org/2000/svg",xhtml:lc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ts(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),u0.hasOwnProperty(n)?{space:u0[n],local:e}:e}function rM(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===lc&&n.documentElement.namespaceURI===lc?n.createElement(e):n.createElementNS(r,e)}}function aM(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function M2(e){var n=Ts(e);return(n.local?aM:rM)(n)}function oM(){}function Zu(e){return e==null?oM:function(){return this.querySelector(e)}}function iM(e){typeof e!="function"&&(e=Zu(e));for(var n=this._groups,r=n.length,a=new Array(r),o=0;o<r;++o)for(var i=n[o],s=i.length,l=a[o]=new Array(s),c,u,h=0;h<s;++h)(c=i[h])&&(u=e.call(c,c.__data__,h,i))&&("__data__"in c&&(u.__data__=c.__data__),l[h]=u);return new Mt(a,this._parents)}function sM(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function lM(){return[]}function T2(e){return e==null?lM:function(){return this.querySelectorAll(e)}}function cM(e){return function(){return sM(e.apply(this,arguments))}}function uM(e){typeof e=="function"?e=cM(e):e=T2(e);for(var n=this._groups,r=n.length,a=[],o=[],i=0;i<r;++i)for(var s=n[i],l=s.length,c,u=0;u<l;++u)(c=s[u])&&(a.push(e.call(c,c.__data__,u,s)),o.push(c));return new Mt(a,o)}function P2(e){return function(){return this.matches(e)}}function N2(e){return function(n){return n.matches(e)}}var dM=Array.prototype.find;function fM(e){return function(){return dM.call(this.children,e)}}function hM(){return this.firstElementChild}function pM(e){return this.select(e==null?hM:fM(typeof e=="function"?e:N2(e)))}var mM=Array.prototype.filter;function gM(){return Array.from(this.children)}function yM(e){return function(){return mM.call(this.children,e)}}function vM(e){return this.selectAll(e==null?gM:yM(typeof e=="function"?e:N2(e)))}function xM(e){typeof e!="function"&&(e=P2(e));for(var n=this._groups,r=n.length,a=new Array(r),o=0;o<r;++o)for(var i=n[o],s=i.length,l=a[o]=[],c,u=0;u<s;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new Mt(a,this._parents)}function O2(e){return new Array(e.length)}function bM(){return new Mt(this._enter||this._groups.map(O2),this._parents)}function Zi(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}Zi.prototype={constructor:Zi,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function wM(e){return function(){return e}}function _M(e,n,r,a,o,i){for(var s=0,l,c=n.length,u=i.length;s<u;++s)(l=n[s])?(l.__data__=i[s],a[s]=l):r[s]=new Zi(e,i[s]);for(;s<c;++s)(l=n[s])&&(o[s]=l)}function EM(e,n,r,a,o,i,s){var l,c,u=new Map,h=n.length,f=i.length,m=new Array(h),g;for(l=0;l<h;++l)(c=n[l])&&(m[l]=g=s.call(c,c.__data__,l,n)+"",u.has(g)?o[l]=c:u.set(g,c));for(l=0;l<f;++l)g=s.call(e,i[l],l,i)+"",(c=u.get(g))?(a[l]=c,c.__data__=i[l],u.delete(g)):r[l]=new Zi(e,i[l]);for(l=0;l<h;++l)(c=n[l])&&u.get(m[l])===c&&(o[l]=c)}function CM(e){return e.__data__}function SM(e,n){if(!arguments.length)return Array.from(this,CM);var r=n?EM:_M,a=this._parents,o=this._groups;typeof e!="function"&&(e=wM(e));for(var i=o.length,s=new Array(i),l=new Array(i),c=new Array(i),u=0;u<i;++u){var h=a[u],f=o[u],m=f.length,g=AM(e.call(h,h&&h.__data__,u,a)),y=g.length,v=l[u]=new Array(y),x=s[u]=new Array(y),b=c[u]=new Array(m);r(h,f,v,x,b,g,n);for(var w=0,E=0,C,S;w<y;++w)if(C=v[w]){for(w>=E&&(E=w+1);!(S=x[E])&&++E<y;);C._next=S||null}}return s=new Mt(s,a),s._enter=l,s._exit=c,s}function AM(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function RM(){return new Mt(this._exit||this._groups.map(O2),this._parents)}function MM(e,n,r){var a=this.enter(),o=this,i=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),n!=null&&(o=n(o),o&&(o=o.selection())),r==null?i.remove():r(i),a&&o?a.merge(o).order():o}function TM(e){for(var n=e.selection?e.selection():e,r=this._groups,a=n._groups,o=r.length,i=a.length,s=Math.min(o,i),l=new Array(o),c=0;c<s;++c)for(var u=r[c],h=a[c],f=u.length,m=l[c]=new Array(f),g,y=0;y<f;++y)(g=u[y]||h[y])&&(m[y]=g);for(;c<o;++c)l[c]=r[c];return new Mt(l,this._parents)}function PM(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var a=e[n],o=a.length-1,i=a[o],s;--o>=0;)(s=a[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function NM(e){e||(e=OM);function n(f,m){return f&&m?e(f.__data__,m.__data__):!f-!m}for(var r=this._groups,a=r.length,o=new Array(a),i=0;i<a;++i){for(var s=r[i],l=s.length,c=o[i]=new Array(l),u,h=0;h<l;++h)(u=s[h])&&(c[h]=u);c.sort(n)}return new Mt(o,this._parents).order()}function OM(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function jM(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function DM(){return Array.from(this)}function kM(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var a=e[n],o=0,i=a.length;o<i;++o){var s=a[o];if(s)return s}return null}function IM(){let e=0;for(const n of this)++e;return e}function LM(){return!this.node()}function FM(e){for(var n=this._groups,r=0,a=n.length;r<a;++r)for(var o=n[r],i=0,s=o.length,l;i<s;++i)(l=o[i])&&e.call(l,l.__data__,i,o);return this}function $M(e){return function(){this.removeAttribute(e)}}function HM(e){return function(){this.removeAttributeNS(e.space,e.local)}}function zM(e,n){return function(){this.setAttribute(e,n)}}function UM(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function VM(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function ZM(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function BM(e,n){var r=Ts(e);if(arguments.length<2){var a=this.node();return r.local?a.getAttributeNS(r.space,r.local):a.getAttribute(r)}return this.each((n==null?r.local?HM:$M:typeof n=="function"?r.local?ZM:VM:r.local?UM:zM)(r,n))}function j2(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function qM(e){return function(){this.style.removeProperty(e)}}function WM(e,n,r){return function(){this.style.setProperty(e,n,r)}}function GM(e,n,r){return function(){var a=n.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,r)}}function KM(e,n,r){return arguments.length>1?this.each((n==null?qM:typeof n=="function"?GM:WM)(e,n,r??"")):ea(this.node(),e)}function ea(e,n){return e.style.getPropertyValue(n)||j2(e).getComputedStyle(e,null).getPropertyValue(n)}function YM(e){return function(){delete this[e]}}function QM(e,n){return function(){this[e]=n}}function XM(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function JM(e,n){return arguments.length>1?this.each((n==null?YM:typeof n=="function"?XM:QM)(e,n)):this.node()[e]}function D2(e){return e.trim().split(/^|\s+/)}function Bu(e){return e.classList||new k2(e)}function k2(e){this._node=e,this._names=D2(e.getAttribute("class")||"")}k2.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function I2(e,n){for(var r=Bu(e),a=-1,o=n.length;++a<o;)r.add(n[a])}function L2(e,n){for(var r=Bu(e),a=-1,o=n.length;++a<o;)r.remove(n[a])}function e7(e){return function(){I2(this,e)}}function t7(e){return function(){L2(this,e)}}function n7(e,n){return function(){(n.apply(this,arguments)?I2:L2)(this,e)}}function r7(e,n){var r=D2(e+"");if(arguments.length<2){for(var a=Bu(this.node()),o=-1,i=r.length;++o<i;)if(!a.contains(r[o]))return!1;return!0}return this.each((typeof n=="function"?n7:n?e7:t7)(r,n))}function a7(){this.textContent=""}function o7(e){return function(){this.textContent=e}}function i7(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function s7(e){return arguments.length?this.each(e==null?a7:(typeof e=="function"?i7:o7)(e)):this.node().textContent}function l7(){this.innerHTML=""}function c7(e){return function(){this.innerHTML=e}}function u7(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function d7(e){return arguments.length?this.each(e==null?l7:(typeof e=="function"?u7:c7)(e)):this.node().innerHTML}function f7(){this.nextSibling&&this.parentNode.appendChild(this)}function h7(){return this.each(f7)}function p7(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function m7(){return this.each(p7)}function g7(e){var n=typeof e=="function"?e:M2(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function y7(){return null}function v7(e,n){var r=typeof e=="function"?e:M2(e),a=n==null?y7:typeof n=="function"?n:Zu(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),a.apply(this,arguments)||null)})}function x7(){var e=this.parentNode;e&&e.removeChild(this)}function b7(){return this.each(x7)}function w7(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function _7(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function E7(e){return this.select(e?_7:w7)}function C7(e){return arguments.length?this.property("__data__",e):this.node().__data__}function S7(e){return function(n){e.call(this,n,this.__data__)}}function A7(e){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");return a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),{type:n,name:r}})}function R7(e){return function(){var n=this.__on;if(n){for(var r=0,a=-1,o=n.length,i;r<o;++r)i=n[r],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):n[++a]=i;++a?n.length=a:delete this.__on}}}function M7(e,n,r){return function(){var a=this.__on,o,i=S7(n);if(a){for(var s=0,l=a.length;s<l;++s)if((o=a[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=r),o.value=n;return}}this.addEventListener(e.type,i,r),o={type:e.type,name:e.name,value:n,listener:i,options:r},a?a.push(o):this.__on=[o]}}function T7(e,n,r){var a=A7(e+""),o,i=a.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,h;c<u;++c)for(o=0,h=l[c];o<i;++o)if((s=a[o]).type===h.type&&s.name===h.name)return h.value}return}for(l=n?M7:R7,o=0;o<i;++o)this.each(l(a[o],n,r));return this}function F2(e,n,r){var a=j2(e),o=a.CustomEvent;typeof o=="function"?o=new o(n,r):(o=a.document.createEvent("Event"),r?(o.initEvent(n,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(n,!1,!1)),e.dispatchEvent(o)}function P7(e,n){return function(){return F2(this,e,n)}}function N7(e,n){return function(){return F2(this,e,n.apply(this,arguments))}}function O7(e,n){return this.each((typeof n=="function"?N7:P7)(e,n))}function*j7(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var a=e[n],o=0,i=a.length,s;o<i;++o)(s=a[o])&&(yield s)}var $2=[null];function Mt(e,n){this._groups=e,this._parents=n}function Fo(){return new Mt([[document.documentElement]],$2)}function D7(){return this}Mt.prototype=Fo.prototype={constructor:Mt,select:iM,selectAll:uM,selectChild:pM,selectChildren:vM,filter:xM,data:SM,enter:bM,exit:RM,join:MM,merge:TM,selection:D7,order:PM,sort:NM,call:jM,nodes:DM,node:kM,size:IM,empty:LM,each:FM,attr:BM,style:KM,property:JM,classed:r7,text:s7,html:d7,raise:h7,lower:m7,append:g7,insert:v7,remove:b7,clone:E7,datum:C7,on:T7,dispatch:O7,[Symbol.iterator]:j7};function $t(e){return typeof e=="string"?new Mt([[document.querySelector(e)]],[document.documentElement]):new Mt([[e]],$2)}function k7(e){let n;for(;n=e.sourceEvent;)e=n;return e}function fn(e,n){if(e=k7(e),n===void 0&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var a=r.createSVGPoint();return a.x=e.clientX,a.y=e.clientY,a=a.matrixTransform(n.getScreenCTM().inverse()),[a.x,a.y]}if(n.getBoundingClientRect){var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}}return[e.pageX,e.pageY]}var I7={value:()=>{}};function $o(){for(var e=0,n=arguments.length,r={},a;e<n;++e){if(!(a=arguments[e]+"")||a in r||/[\s.]/.test(a))throw new Error("illegal type: "+a);r[a]=[]}return new Ei(r)}function Ei(e){this._=e}function L7(e,n){return e.trim().split(/^|\s+/).map(function(r){var a="",o=r.indexOf(".");if(o>=0&&(a=r.slice(o+1),r=r.slice(0,o)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:a}})}Ei.prototype=$o.prototype={constructor:Ei,on:function(e,n){var r=this._,a=L7(e+"",r),o,i=-1,s=a.length;if(arguments.length<2){for(;++i<s;)if((o=(e=a[i]).type)&&(o=F7(r[o],e.name)))return o;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++i<s;)if(o=(e=a[i]).type)r[o]=d0(r[o],e.name,n);else if(n==null)for(o in r)r[o]=d0(r[o],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new Ei(e)},call:function(e,n){if((o=arguments.length-2)>0)for(var r=new Array(o),a=0,o,i;a<o;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],a=0,o=i.length;a<o;++a)i[a].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],o=0,i=a.length;o<i;++o)a[o].value.apply(n,r)}};function F7(e,n){for(var r=0,a=e.length,o;r<a;++r)if((o=e[r]).name===n)return o.value}function d0(e,n,r){for(var a=0,o=e.length;a<o;++a)if(e[a].name===n){e[a]=I7,e=e.slice(0,a).concat(e.slice(a+1));break}return r!=null&&e.push({name:n,value:r}),e}const $7={passive:!1},co={capture:!0,passive:!1};function ml(e){e.stopImmediatePropagation()}function Kr(e){e.preventDefault(),e.stopImmediatePropagation()}function H2(e){var n=e.document.documentElement,r=$t(e).on("dragstart.drag",Kr,co);"onselectstart"in n?r.on("selectstart.drag",Kr,co):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function z2(e,n){var r=e.document.documentElement,a=$t(e).on("dragstart.drag",null);n&&(a.on("click.drag",Kr,co),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in r?a.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const si=e=>()=>e;function cc(e,{sourceEvent:n,subject:r,target:a,identifier:o,active:i,x:s,y:l,dx:c,dy:u,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}cc.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function H7(e){return!e.ctrlKey&&!e.button}function z7(){return this.parentNode}function U7(e,n){return n??{x:e.x,y:e.y}}function V7(){return navigator.maxTouchPoints||"ontouchstart"in this}function Z7(){var e=H7,n=z7,r=U7,a=V7,o={},i=$o("start","drag","end"),s=0,l,c,u,h,f=0;function m(C){C.on("mousedown.drag",g).filter(a).on("touchstart.drag",x).on("touchmove.drag",b,$7).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(C,S){if(!(h||!e.call(this,C,S))){var M=E(this,n.call(this,C,S),C,S,"mouse");M&&($t(C.view).on("mousemove.drag",y,co).on("mouseup.drag",v,co),H2(C.view),ml(C),u=!1,l=C.clientX,c=C.clientY,M("start",C))}}function y(C){if(Kr(C),!u){var S=C.clientX-l,M=C.clientY-c;u=S*S+M*M>f}o.mouse("drag",C)}function v(C){$t(C.view).on("mousemove.drag mouseup.drag",null),z2(C.view,u),Kr(C),o.mouse("end",C)}function x(C,S){if(e.call(this,C,S)){var M=C.changedTouches,R=n.call(this,C,S),_=M.length,O,P;for(O=0;O<_;++O)(P=E(this,R,C,S,M[O].identifier,M[O]))&&(ml(C),P("start",C,M[O]))}}function b(C){var S=C.changedTouches,M=S.length,R,_;for(R=0;R<M;++R)(_=o[S[R].identifier])&&(Kr(C),_("drag",C,S[R]))}function w(C){var S=C.changedTouches,M=S.length,R,_;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),R=0;R<M;++R)(_=o[S[R].identifier])&&(ml(C),_("end",C,S[R]))}function E(C,S,M,R,_,O){var P=i.copy(),j=fn(O||M,S),$,V,A;if((A=r.call(C,new cc("beforestart",{sourceEvent:M,target:m,identifier:_,active:s,x:j[0],y:j[1],dx:0,dy:0,dispatch:P}),R))!=null)return $=A.x-j[0]||0,V=A.y-j[1]||0,function D(T,F,H){var I=j,Z;switch(T){case"start":o[_]=D,Z=s++;break;case"end":delete o[_],--s;case"drag":j=fn(H||F,S),Z=s;break}P.call(T,C,new cc(T,{sourceEvent:F,subject:A,target:m,identifier:_,active:Z,x:j[0]+$,y:j[1]+V,dx:j[0]-I[0],dy:j[1]-I[1],dispatch:P}),R)}}return m.filter=function(C){return arguments.length?(e=typeof C=="function"?C:si(!!C),m):e},m.container=function(C){return arguments.length?(n=typeof C=="function"?C:si(C),m):n},m.subject=function(C){return arguments.length?(r=typeof C=="function"?C:si(C),m):r},m.touchable=function(C){return arguments.length?(a=typeof C=="function"?C:si(!!C),m):a},m.on=function(){var C=i.on.apply(i,arguments);return C===i?m:C},m.clickDistance=function(C){return arguments.length?(f=(C=+C)*C,m):Math.sqrt(f)},m}function qu(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function U2(e,n){var r=Object.create(e.prototype);for(var a in n)r[a]=n[a];return r}function Ho(){}var uo=.7,Bi=1/uo,Yr="\\s*([+-]?\\d+)\\s*",fo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",B7=/^#([0-9a-f]{3,8})$/,q7=new RegExp(`^rgb\\(${Yr},${Yr},${Yr}\\)$`),W7=new RegExp(`^rgb\\(${mn},${mn},${mn}\\)$`),G7=new RegExp(`^rgba\\(${Yr},${Yr},${Yr},${fo}\\)$`),K7=new RegExp(`^rgba\\(${mn},${mn},${mn},${fo}\\)$`),Y7=new RegExp(`^hsl\\(${fo},${mn},${mn}\\)$`),Q7=new RegExp(`^hsla\\(${fo},${mn},${mn},${fo}\\)$`),f0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};qu(Ho,ho,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:h0,formatHex:h0,formatHex8:X7,formatHsl:J7,formatRgb:p0,toString:p0});function h0(){return this.rgb().formatHex()}function X7(){return this.rgb().formatHex8()}function J7(){return V2(this).formatHsl()}function p0(){return this.rgb().formatRgb()}function ho(e){var n,r;return e=(e+"").trim().toLowerCase(),(n=B7.exec(e))?(r=n[1].length,n=parseInt(n[1],16),r===6?m0(n):r===3?new vt(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?li(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?li(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=q7.exec(e))?new vt(n[1],n[2],n[3],1):(n=W7.exec(e))?new vt(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=G7.exec(e))?li(n[1],n[2],n[3],n[4]):(n=K7.exec(e))?li(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Y7.exec(e))?v0(n[1],n[2]/100,n[3]/100,1):(n=Q7.exec(e))?v0(n[1],n[2]/100,n[3]/100,n[4]):f0.hasOwnProperty(e)?m0(f0[e]):e==="transparent"?new vt(NaN,NaN,NaN,0):null}function m0(e){return new vt(e>>16&255,e>>8&255,e&255,1)}function li(e,n,r,a){return a<=0&&(e=n=r=NaN),new vt(e,n,r,a)}function eT(e){return e instanceof Ho||(e=ho(e)),e?(e=e.rgb(),new vt(e.r,e.g,e.b,e.opacity)):new vt}function uc(e,n,r,a){return arguments.length===1?eT(e):new vt(e,n,r,a??1)}function vt(e,n,r,a){this.r=+e,this.g=+n,this.b=+r,this.opacity=+a}qu(vt,uc,U2(Ho,{brighter(e){return e=e==null?Bi:Math.pow(Bi,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?uo:Math.pow(uo,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vt(xr(this.r),xr(this.g),xr(this.b),qi(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:g0,formatHex:g0,formatHex8:tT,formatRgb:y0,toString:y0}));function g0(){return`#${gr(this.r)}${gr(this.g)}${gr(this.b)}`}function tT(){return`#${gr(this.r)}${gr(this.g)}${gr(this.b)}${gr((isNaN(this.opacity)?1:this.opacity)*255)}`}function y0(){const e=qi(this.opacity);return`${e===1?"rgb(":"rgba("}${xr(this.r)}, ${xr(this.g)}, ${xr(this.b)}${e===1?")":`, ${e})`}`}function qi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function gr(e){return e=xr(e),(e<16?"0":"")+e.toString(16)}function v0(e,n,r,a){return a<=0?e=n=r=NaN:r<=0||r>=1?e=n=NaN:n<=0&&(e=NaN),new Yt(e,n,r,a)}function V2(e){if(e instanceof Yt)return new Yt(e.h,e.s,e.l,e.opacity);if(e instanceof Ho||(e=ho(e)),!e)return new Yt;if(e instanceof Yt)return e;e=e.rgb();var n=e.r/255,r=e.g/255,a=e.b/255,o=Math.min(n,r,a),i=Math.max(n,r,a),s=NaN,l=i-o,c=(i+o)/2;return l?(n===i?s=(r-a)/l+(r<a)*6:r===i?s=(a-n)/l+2:s=(n-r)/l+4,l/=c<.5?i+o:2-i-o,s*=60):l=c>0&&c<1?0:s,new Yt(s,l,c,e.opacity)}function nT(e,n,r,a){return arguments.length===1?V2(e):new Yt(e,n,r,a??1)}function Yt(e,n,r,a){this.h=+e,this.s=+n,this.l=+r,this.opacity=+a}qu(Yt,nT,U2(Ho,{brighter(e){return e=e==null?Bi:Math.pow(Bi,e),new Yt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?uo:Math.pow(uo,e),new Yt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,a=r+(r<.5?r:1-r)*n,o=2*r-a;return new vt(gl(e>=240?e-240:e+120,o,a),gl(e,o,a),gl(e<120?e+240:e-120,o,a),this.opacity)},clamp(){return new Yt(x0(this.h),ci(this.s),ci(this.l),qi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=qi(this.opacity);return`${e===1?"hsl(":"hsla("}${x0(this.h)}, ${ci(this.s)*100}%, ${ci(this.l)*100}%${e===1?")":`, ${e})`}`}}));function x0(e){return e=(e||0)%360,e<0?e+360:e}function ci(e){return Math.max(0,Math.min(1,e||0))}function gl(e,n,r){return(e<60?n+(r-n)*e/60:e<180?r:e<240?n+(r-n)*(240-e)/60:n)*255}const Z2=e=>()=>e;function rT(e,n){return function(r){return e+r*n}}function aT(e,n,r){return e=Math.pow(e,r),n=Math.pow(n,r)-e,r=1/r,function(a){return Math.pow(e+a*n,r)}}function oT(e){return(e=+e)==1?B2:function(n,r){return r-n?aT(n,r,e):Z2(isNaN(n)?r:n)}}function B2(e,n){var r=n-e;return r?rT(e,r):Z2(isNaN(e)?n:e)}const b0=(function e(n){var r=oT(n);function a(o,i){var s=r((o=uc(o)).r,(i=uc(i)).r),l=r(o.g,i.g),c=r(o.b,i.b),u=B2(o.opacity,i.opacity);return function(h){return o.r=s(h),o.g=l(h),o.b=c(h),o.opacity=u(h),o+""}}return a.gamma=e,a})(1);function Wn(e,n){return e=+e,n=+n,function(r){return e*(1-r)+n*r}}var dc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yl=new RegExp(dc.source,"g");function iT(e){return function(){return e}}function sT(e){return function(n){return e(n)+""}}function lT(e,n){var r=dc.lastIndex=yl.lastIndex=0,a,o,i,s=-1,l=[],c=[];for(e=e+"",n=n+"";(a=dc.exec(e))&&(o=yl.exec(n));)(i=o.index)>r&&(i=n.slice(r,i),l[s]?l[s]+=i:l[++s]=i),(a=a[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,c.push({i:s,x:Wn(a,o)})),r=yl.lastIndex;return r<n.length&&(i=n.slice(r),l[s]?l[s]+=i:l[++s]=i),l.length<2?c[0]?sT(c[0].x):iT(n):(n=c.length,function(u){for(var h=0,f;h<n;++h)l[(f=c[h]).i]=f.x(u);return l.join("")})}var w0=180/Math.PI,fc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function q2(e,n,r,a,o,i){var s,l,c;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(c=e*r+n*a)&&(r-=e*c,a-=n*c),(l=Math.sqrt(r*r+a*a))&&(r/=l,a/=l,c/=l),e*a<n*r&&(e=-e,n=-n,c=-c,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(n,e)*w0,skewX:Math.atan(c)*w0,scaleX:s,scaleY:l}}var ui;function cT(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?fc:q2(n.a,n.b,n.c,n.d,n.e,n.f)}function uT(e){return e==null||(ui||(ui=document.createElementNS("http://www.w3.org/2000/svg","g")),ui.setAttribute("transform",e),!(e=ui.transform.baseVal.consolidate()))?fc:(e=e.matrix,q2(e.a,e.b,e.c,e.d,e.e,e.f))}function W2(e,n,r,a){function o(u){return u.length?u.pop()+" ":""}function i(u,h,f,m,g,y){if(u!==f||h!==m){var v=g.push("translate(",null,n,null,r);y.push({i:v-4,x:Wn(u,f)},{i:v-2,x:Wn(h,m)})}else(f||m)&&g.push("translate("+f+n+m+r)}function s(u,h,f,m){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),m.push({i:f.push(o(f)+"rotate(",null,a)-2,x:Wn(u,h)})):h&&f.push(o(f)+"rotate("+h+a)}function l(u,h,f,m){u!==h?m.push({i:f.push(o(f)+"skewX(",null,a)-2,x:Wn(u,h)}):h&&f.push(o(f)+"skewX("+h+a)}function c(u,h,f,m,g,y){if(u!==f||h!==m){var v=g.push(o(g)+"scale(",null,",",null,")");y.push({i:v-4,x:Wn(u,f)},{i:v-2,x:Wn(h,m)})}else(f!==1||m!==1)&&g.push(o(g)+"scale("+f+","+m+")")}return function(u,h){var f=[],m=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,f,m),s(u.rotate,h.rotate,f,m),l(u.skewX,h.skewX,f,m),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,m),u=h=null,function(g){for(var y=-1,v=m.length,x;++y<v;)f[(x=m[y]).i]=x.x(g);return f.join("")}}}var dT=W2(cT,"px, ","px)","deg)"),fT=W2(uT,", ",")",")"),hT=1e-12;function _0(e){return((e=Math.exp(e))+1/e)/2}function pT(e){return((e=Math.exp(e))-1/e)/2}function mT(e){return((e=Math.exp(2*e))-1)/(e+1)}const gT=(function e(n,r,a){function o(i,s){var l=i[0],c=i[1],u=i[2],h=s[0],f=s[1],m=s[2],g=h-l,y=f-c,v=g*g+y*y,x,b;if(v<hT)b=Math.log(m/u)/n,x=function(R){return[l+R*g,c+R*y,u*Math.exp(n*R*b)]};else{var w=Math.sqrt(v),E=(m*m-u*u+a*v)/(2*u*r*w),C=(m*m-u*u-a*v)/(2*m*r*w),S=Math.log(Math.sqrt(E*E+1)-E),M=Math.log(Math.sqrt(C*C+1)-C);b=(M-S)/n,x=function(R){var _=R*b,O=_0(S),P=u/(r*w)*(O*mT(n*_+S)-pT(S));return[l+P*g,c+P*y,u*O/_0(n*_+S)]}}return x.duration=b*1e3*n/Math.SQRT2,x}return o.rho=function(i){var s=Math.max(.001,+i),l=s*s,c=l*l;return e(s,l,c)},o})(Math.SQRT2,2,4);var ta=0,Ia=0,Ca=0,G2=1e3,Wi,La,Gi=0,Rr=0,Ps=0,po=typeof performance=="object"&&performance.now?performance:Date,K2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Wu(){return Rr||(K2(yT),Rr=po.now()+Ps)}function yT(){Rr=0}function Ki(){this._call=this._time=this._next=null}Ki.prototype=Gu.prototype={constructor:Ki,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Wu():+r)+(n==null?0:+n),!this._next&&La!==this&&(La?La._next=this:Wi=this,La=this),this._call=e,this._time=r,hc()},stop:function(){this._call&&(this._call=null,this._time=1/0,hc())}};function Gu(e,n,r){var a=new Ki;return a.restart(e,n,r),a}function vT(){Wu(),++ta;for(var e=Wi,n;e;)(n=Rr-e._time)>=0&&e._call.call(void 0,n),e=e._next;--ta}function E0(){Rr=(Gi=po.now())+Ps,ta=Ia=0;try{vT()}finally{ta=0,bT(),Rr=0}}function xT(){var e=po.now(),n=e-Gi;n>G2&&(Ps-=n,Gi=e)}function bT(){for(var e,n=Wi,r,a=1/0;n;)n._call?(a>n._time&&(a=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:Wi=r);La=e,hc(a)}function hc(e){if(!ta){Ia&&(Ia=clearTimeout(Ia));var n=e-Rr;n>24?(e<1/0&&(Ia=setTimeout(E0,e-po.now()-Ps)),Ca&&(Ca=clearInterval(Ca))):(Ca||(Gi=po.now(),Ca=setInterval(xT,G2)),ta=1,K2(E0))}}function C0(e,n,r){var a=new Ki;return n=n==null?0:+n,a.restart(o=>{a.stop(),e(o+n)},n,r),a}var wT=$o("start","end","cancel","interrupt"),_T=[],Y2=0,S0=1,pc=2,Ci=3,A0=4,mc=5,Si=6;function Ns(e,n,r,a,o,i){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;ET(e,r,{name:n,index:a,group:o,on:wT,tween:_T,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Y2})}function Ku(e,n){var r=on(e,n);if(r.state>Y2)throw new Error("too late; already scheduled");return r}function wn(e,n){var r=on(e,n);if(r.state>Ci)throw new Error("too late; already running");return r}function on(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function ET(e,n,r){var a=e.__transition,o;a[n]=r,r.timer=Gu(i,0,r.time);function i(u){r.state=S0,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}function s(u){var h,f,m,g;if(r.state!==S0)return c();for(h in a)if(g=a[h],g.name===r.name){if(g.state===Ci)return C0(s);g.state===A0?(g.state=Si,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete a[h]):+h<n&&(g.state=Si,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete a[h])}if(C0(function(){r.state===Ci&&(r.state=A0,r.timer.restart(l,r.delay,r.time),l(u))}),r.state=pc,r.on.call("start",e,e.__data__,r.index,r.group),r.state===pc){for(r.state=Ci,o=new Array(m=r.tween.length),h=0,f=-1;h<m;++h)(g=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(o[++f]=g);o.length=f+1}}function l(u){for(var h=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=mc,1),f=-1,m=o.length;++f<m;)o[f].call(e,h);r.state===mc&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Si,r.timer.stop(),delete a[n];for(var u in a)return;delete e.__transition}}function Ai(e,n){var r=e.__transition,a,o,i=!0,s;if(r){n=n==null?null:n+"";for(s in r){if((a=r[s]).name!==n){i=!1;continue}o=a.state>pc&&a.state<mc,a.state=Si,a.timer.stop(),a.on.call(o?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete r[s]}i&&delete e.__transition}}function CT(e){return this.each(function(){Ai(this,e)})}function ST(e,n){var r,a;return function(){var o=wn(this,e),i=o.tween;if(i!==r){a=r=i;for(var s=0,l=a.length;s<l;++s)if(a[s].name===n){a=a.slice(),a.splice(s,1);break}}o.tween=a}}function AT(e,n,r){var a,o;if(typeof r!="function")throw new Error;return function(){var i=wn(this,e),s=i.tween;if(s!==a){o=(a=s).slice();for(var l={name:n,value:r},c=0,u=o.length;c<u;++c)if(o[c].name===n){o[c]=l;break}c===u&&o.push(l)}i.tween=o}}function RT(e,n){var r=this._id;if(e+="",arguments.length<2){for(var a=on(this.node(),r).tween,o=0,i=a.length,s;o<i;++o)if((s=a[o]).name===e)return s.value;return null}return this.each((n==null?ST:AT)(r,e,n))}function Yu(e,n,r){var a=e._id;return e.each(function(){var o=wn(this,a);(o.value||(o.value={}))[n]=r.apply(this,arguments)}),function(o){return on(o,a).value[n]}}function Q2(e,n){var r;return(typeof n=="number"?Wn:n instanceof ho?b0:(r=ho(n))?(n=r,b0):lT)(e,n)}function MT(e){return function(){this.removeAttribute(e)}}function TT(e){return function(){this.removeAttributeNS(e.space,e.local)}}function PT(e,n,r){var a,o=r+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===a?i:i=n(a=s,r)}}function NT(e,n,r){var a,o=r+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===a?i:i=n(a=s,r)}}function OT(e,n,r){var a,o,i;return function(){var s,l=r(this),c;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=l+"",s===c?null:s===a&&c===o?i:(o=c,i=n(a=s,l)))}}function jT(e,n,r){var a,o,i;return function(){var s,l=r(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=l+"",s===c?null:s===a&&c===o?i:(o=c,i=n(a=s,l)))}}function DT(e,n){var r=Ts(e),a=r==="transform"?fT:Q2;return this.attrTween(e,typeof n=="function"?(r.local?jT:OT)(r,a,Yu(this,"attr."+e,n)):n==null?(r.local?TT:MT)(r):(r.local?NT:PT)(r,a,n))}function kT(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function IT(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function LT(e,n){var r,a;function o(){var i=n.apply(this,arguments);return i!==a&&(r=(a=i)&&IT(e,i)),r}return o._value=n,o}function FT(e,n){var r,a;function o(){var i=n.apply(this,arguments);return i!==a&&(r=(a=i)&&kT(e,i)),r}return o._value=n,o}function $T(e,n){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var a=Ts(e);return this.tween(r,(a.local?LT:FT)(a,n))}function HT(e,n){return function(){Ku(this,e).delay=+n.apply(this,arguments)}}function zT(e,n){return n=+n,function(){Ku(this,e).delay=n}}function UT(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?HT:zT)(n,e)):on(this.node(),n).delay}function VT(e,n){return function(){wn(this,e).duration=+n.apply(this,arguments)}}function ZT(e,n){return n=+n,function(){wn(this,e).duration=n}}function BT(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?VT:ZT)(n,e)):on(this.node(),n).duration}function qT(e,n){if(typeof n!="function")throw new Error;return function(){wn(this,e).ease=n}}function WT(e){var n=this._id;return arguments.length?this.each(qT(n,e)):on(this.node(),n).ease}function GT(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;wn(this,e).ease=r}}function KT(e){if(typeof e!="function")throw new Error;return this.each(GT(this._id,e))}function YT(e){typeof e!="function"&&(e=P2(e));for(var n=this._groups,r=n.length,a=new Array(r),o=0;o<r;++o)for(var i=n[o],s=i.length,l=a[o]=[],c,u=0;u<s;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new $n(a,this._parents,this._name,this._id)}function QT(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,a=n.length,o=r.length,i=Math.min(a,o),s=new Array(a),l=0;l<i;++l)for(var c=n[l],u=r[l],h=c.length,f=s[l]=new Array(h),m,g=0;g<h;++g)(m=c[g]||u[g])&&(f[g]=m);for(;l<a;++l)s[l]=n[l];return new $n(s,this._parents,this._name,this._id)}function XT(e){return(e+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function JT(e,n,r){var a,o,i=XT(n)?Ku:wn;return function(){var s=i(this,e),l=s.on;l!==a&&(o=(a=l).copy()).on(n,r),s.on=o}}function e9(e,n){var r=this._id;return arguments.length<2?on(this.node(),r).on.on(e):this.each(JT(r,e,n))}function t9(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function n9(){return this.on("end.remove",t9(this._id))}function r9(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Zu(e));for(var a=this._groups,o=a.length,i=new Array(o),s=0;s<o;++s)for(var l=a[s],c=l.length,u=i[s]=new Array(c),h,f,m=0;m<c;++m)(h=l[m])&&(f=e.call(h,h.__data__,m,l))&&("__data__"in h&&(f.__data__=h.__data__),u[m]=f,Ns(u[m],n,r,m,u,on(h,r)));return new $n(i,this._parents,n,r)}function a9(e){var n=this._name,r=this._id;typeof e!="function"&&(e=T2(e));for(var a=this._groups,o=a.length,i=[],s=[],l=0;l<o;++l)for(var c=a[l],u=c.length,h,f=0;f<u;++f)if(h=c[f]){for(var m=e.call(h,h.__data__,f,c),g,y=on(h,r),v=0,x=m.length;v<x;++v)(g=m[v])&&Ns(g,n,r,v,m,y);i.push(m),s.push(h)}return new $n(i,s,n,r)}var o9=Fo.prototype.constructor;function i9(){return new o9(this._groups,this._parents)}function s9(e,n){var r,a,o;return function(){var i=ea(this,e),s=(this.style.removeProperty(e),ea(this,e));return i===s?null:i===r&&s===a?o:o=n(r=i,a=s)}}function X2(e){return function(){this.style.removeProperty(e)}}function l9(e,n,r){var a,o=r+"",i;return function(){var s=ea(this,e);return s===o?null:s===a?i:i=n(a=s,r)}}function c9(e,n,r){var a,o,i;return function(){var s=ea(this,e),l=r(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),ea(this,e))),s===c?null:s===a&&c===o?i:(o=c,i=n(a=s,l))}}function u9(e,n){var r,a,o,i="style."+n,s="end."+i,l;return function(){var c=wn(this,e),u=c.on,h=c.value[i]==null?l||(l=X2(n)):void 0;(u!==r||o!==h)&&(a=(r=u).copy()).on(s,o=h),c.on=a}}function d9(e,n,r){var a=(e+="")=="transform"?dT:Q2;return n==null?this.styleTween(e,s9(e,a)).on("end.style."+e,X2(e)):typeof n=="function"?this.styleTween(e,c9(e,a,Yu(this,"style."+e,n))).each(u9(this._id,e)):this.styleTween(e,l9(e,a,n),r).on("end.style."+e,null)}function f9(e,n,r){return function(a){this.style.setProperty(e,n.call(this,a),r)}}function h9(e,n,r){var a,o;function i(){var s=n.apply(this,arguments);return s!==o&&(a=(o=s)&&f9(e,s,r)),a}return i._value=n,i}function p9(e,n,r){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(n==null)return this.tween(a,null);if(typeof n!="function")throw new Error;return this.tween(a,h9(e,n,r??""))}function m9(e){return function(){this.textContent=e}}function g9(e){return function(){var n=e(this);this.textContent=n??""}}function y9(e){return this.tween("text",typeof e=="function"?g9(Yu(this,"text",e)):m9(e==null?"":e+""))}function v9(e){return function(n){this.textContent=e.call(this,n)}}function x9(e){var n,r;function a(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&v9(o)),n}return a._value=e,a}function b9(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,x9(e))}function w9(){for(var e=this._name,n=this._id,r=J2(),a=this._groups,o=a.length,i=0;i<o;++i)for(var s=a[i],l=s.length,c,u=0;u<l;++u)if(c=s[u]){var h=on(c,n);Ns(c,e,r,u,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new $n(a,this._parents,e,r)}function _9(){var e,n,r=this,a=r._id,o=r.size();return new Promise(function(i,s){var l={value:s},c={value:function(){--o===0&&i()}};r.each(function(){var u=wn(this,a),h=u.on;h!==e&&(n=(e=h).copy(),n._.cancel.push(l),n._.interrupt.push(l),n._.end.push(c)),u.on=n}),o===0&&i()})}var E9=0;function $n(e,n,r,a){this._groups=e,this._parents=n,this._name=r,this._id=a}function J2(){return++E9}var Sn=Fo.prototype;$n.prototype={constructor:$n,select:r9,selectAll:a9,selectChild:Sn.selectChild,selectChildren:Sn.selectChildren,filter:YT,merge:QT,selection:i9,transition:w9,call:Sn.call,nodes:Sn.nodes,node:Sn.node,size:Sn.size,empty:Sn.empty,each:Sn.each,on:e9,attr:DT,attrTween:$T,style:d9,styleTween:p9,text:y9,textTween:b9,remove:n9,tween:RT,delay:UT,duration:BT,ease:WT,easeVarying:KT,end:_9,[Symbol.iterator]:Sn[Symbol.iterator]};function C9(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var S9={time:null,delay:0,duration:250,ease:C9};function A9(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return r}function R9(e){var n,r;e instanceof $n?(n=e._id,e=e._name):(n=J2(),(r=S9).time=Wu(),e=e==null?null:e+"");for(var a=this._groups,o=a.length,i=0;i<o;++i)for(var s=a[i],l=s.length,c,u=0;u<l;++u)(c=s[u])&&Ns(c,e,n,u,s,r||A9(c,n));return new $n(a,this._parents,e,n)}Fo.prototype.interrupt=CT;Fo.prototype.transition=R9;const di=e=>()=>e;function M9(e,{sourceEvent:n,target:r,transform:a,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:o}})}function jn(e,n,r){this.k=e,this.x=n,this.y=r}jn.prototype={constructor:jn,scale:function(e){return e===1?this:new jn(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new jn(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Qu=new jn(1,0,0);dn.prototype=jn.prototype;function dn(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Qu;return e.__zoom}function vl(e){e.stopImmediatePropagation()}function Sa(e){e.preventDefault(),e.stopImmediatePropagation()}function T9(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function P9(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function R0(){return this.__zoom||Qu}function N9(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function O9(){return navigator.maxTouchPoints||"ontouchstart"in this}function j9(e,n,r){var a=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],i=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function D9(){var e=T9,n=P9,r=j9,a=N9,o=O9,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=gT,u=$o("start","zoom","end"),h,f,m,g=500,y=150,v=0,x=10;function b(A){A.property("__zoom",R0).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",O).on("dblclick.zoom",P).filter(o).on("touchstart.zoom",j).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(A,D,T,F){var H=A.selection?A.selection():A;H.property("__zoom",R0),A!==H?S(A,D,T,F):H.interrupt().each(function(){M(this,arguments).event(F).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},b.scaleBy=function(A,D,T,F){b.scaleTo(A,function(){var H=this.__zoom.k,I=typeof D=="function"?D.apply(this,arguments):D;return H*I},T,F)},b.scaleTo=function(A,D,T,F){b.transform(A,function(){var H=n.apply(this,arguments),I=this.__zoom,Z=T==null?C(H):typeof T=="function"?T.apply(this,arguments):T,B=I.invert(Z),q=typeof D=="function"?D.apply(this,arguments):D;return r(E(w(I,q),Z,B),H,s)},T,F)},b.translateBy=function(A,D,T,F){b.transform(A,function(){return r(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof T=="function"?T.apply(this,arguments):T),n.apply(this,arguments),s)},null,F)},b.translateTo=function(A,D,T,F,H){b.transform(A,function(){var I=n.apply(this,arguments),Z=this.__zoom,B=F==null?C(I):typeof F=="function"?F.apply(this,arguments):F;return r(Qu.translate(B[0],B[1]).scale(Z.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof T=="function"?-T.apply(this,arguments):-T),I,s)},F,H)};function w(A,D){return D=Math.max(i[0],Math.min(i[1],D)),D===A.k?A:new jn(D,A.x,A.y)}function E(A,D,T){var F=D[0]-T[0]*A.k,H=D[1]-T[1]*A.k;return F===A.x&&H===A.y?A:new jn(A.k,F,H)}function C(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function S(A,D,T,F){A.on("start.zoom",function(){M(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){M(this,arguments).event(F).end()}).tween("zoom",function(){var H=this,I=arguments,Z=M(H,I).event(F),B=n.apply(H,I),q=T==null?C(B):typeof T=="function"?T.apply(H,I):T,X=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),Q=H.__zoom,oe=typeof D=="function"?D.apply(H,I):D,le=c(Q.invert(q).concat(X/Q.k),oe.invert(q).concat(X/oe.k));return function(G){if(G===1)G=oe;else{var ie=le(G),pe=X/ie[2];G=new jn(pe,q[0]-ie[0]*pe,q[1]-ie[1]*pe)}Z.zoom(null,G)}})}function M(A,D,T){return!T&&A.__zooming||new R(A,D)}function R(A,D){this.that=A,this.args=D,this.active=0,this.sourceEvent=null,this.extent=n.apply(A,D),this.taps=0}R.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,D){return this.mouse&&A!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var D=$t(this.that).datum();u.call(A,this.that,new M9(A,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),D)}};function _(A,...D){if(!e.apply(this,arguments))return;var T=M(this,D).event(A),F=this.__zoom,H=Math.max(i[0],Math.min(i[1],F.k*Math.pow(2,a.apply(this,arguments)))),I=fn(A);if(T.wheel)(T.mouse[0][0]!==I[0]||T.mouse[0][1]!==I[1])&&(T.mouse[1]=F.invert(T.mouse[0]=I)),clearTimeout(T.wheel);else{if(F.k===H)return;T.mouse=[I,F.invert(I)],Ai(this),T.start()}Sa(A),T.wheel=setTimeout(Z,y),T.zoom("mouse",r(E(w(F,H),T.mouse[0],T.mouse[1]),T.extent,s));function Z(){T.wheel=null,T.end()}}function O(A,...D){if(m||!e.apply(this,arguments))return;var T=A.currentTarget,F=M(this,D,!0).event(A),H=$t(A.view).on("mousemove.zoom",q,!0).on("mouseup.zoom",X,!0),I=fn(A,T),Z=A.clientX,B=A.clientY;H2(A.view),vl(A),F.mouse=[I,this.__zoom.invert(I)],Ai(this),F.start();function q(Q){if(Sa(Q),!F.moved){var oe=Q.clientX-Z,le=Q.clientY-B;F.moved=oe*oe+le*le>v}F.event(Q).zoom("mouse",r(E(F.that.__zoom,F.mouse[0]=fn(Q,T),F.mouse[1]),F.extent,s))}function X(Q){H.on("mousemove.zoom mouseup.zoom",null),z2(Q.view,F.moved),Sa(Q),F.event(Q).end()}}function P(A,...D){if(e.apply(this,arguments)){var T=this.__zoom,F=fn(A.changedTouches?A.changedTouches[0]:A,this),H=T.invert(F),I=T.k*(A.shiftKey?.5:2),Z=r(E(w(T,I),F,H),n.apply(this,D),s);Sa(A),l>0?$t(this).transition().duration(l).call(S,Z,F,A):$t(this).call(b.transform,Z,F,A)}}function j(A,...D){if(e.apply(this,arguments)){var T=A.touches,F=T.length,H=M(this,D,A.changedTouches.length===F).event(A),I,Z,B,q;for(vl(A),Z=0;Z<F;++Z)B=T[Z],q=fn(B,this),q=[q,this.__zoom.invert(q),B.identifier],H.touch0?!H.touch1&&H.touch0[2]!==q[2]&&(H.touch1=q,H.taps=0):(H.touch0=q,I=!0,H.taps=1+!!h);h&&(h=clearTimeout(h)),I&&(H.taps<2&&(f=q[0],h=setTimeout(function(){h=null},g)),Ai(this),H.start())}}function $(A,...D){if(this.__zooming){var T=M(this,D).event(A),F=A.changedTouches,H=F.length,I,Z,B,q;for(Sa(A),I=0;I<H;++I)Z=F[I],B=fn(Z,this),T.touch0&&T.touch0[2]===Z.identifier?T.touch0[0]=B:T.touch1&&T.touch1[2]===Z.identifier&&(T.touch1[0]=B);if(Z=T.that.__zoom,T.touch1){var X=T.touch0[0],Q=T.touch0[1],oe=T.touch1[0],le=T.touch1[1],G=(G=oe[0]-X[0])*G+(G=oe[1]-X[1])*G,ie=(ie=le[0]-Q[0])*ie+(ie=le[1]-Q[1])*ie;Z=w(Z,Math.sqrt(G/ie)),B=[(X[0]+oe[0])/2,(X[1]+oe[1])/2],q=[(Q[0]+le[0])/2,(Q[1]+le[1])/2]}else if(T.touch0)B=T.touch0[0],q=T.touch0[1];else return;T.zoom("touch",r(E(Z,B,q),T.extent,s))}}function V(A,...D){if(this.__zooming){var T=M(this,D).event(A),F=A.changedTouches,H=F.length,I,Z;for(vl(A),m&&clearTimeout(m),m=setTimeout(function(){m=null},g),I=0;I<H;++I)Z=F[I],T.touch0&&T.touch0[2]===Z.identifier?delete T.touch0:T.touch1&&T.touch1[2]===Z.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&(Z=fn(Z,this),Math.hypot(f[0]-Z[0],f[1]-Z[1])<x)){var B=$t(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return b.wheelDelta=function(A){return arguments.length?(a=typeof A=="function"?A:di(+A),b):a},b.filter=function(A){return arguments.length?(e=typeof A=="function"?A:di(!!A),b):e},b.touchable=function(A){return arguments.length?(o=typeof A=="function"?A:di(!!A),b):o},b.extent=function(A){return arguments.length?(n=typeof A=="function"?A:di([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),b):n},b.scaleExtent=function(A){return arguments.length?(i[0]=+A[0],i[1]=+A[1],b):[i[0],i[1]]},b.translateExtent=function(A){return arguments.length?(s[0][0]=+A[0][0],s[1][0]=+A[1][0],s[0][1]=+A[0][1],s[1][1]=+A[1][1],b):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},b.constrain=function(A){return arguments.length?(r=A,b):r},b.duration=function(A){return arguments.length?(l=+A,b):l},b.interpolate=function(A){return arguments.length?(c=A,b):c},b.on=function(){var A=u.on.apply(u,arguments);return A===u?b:A},b.clickDistance=function(A){return arguments.length?(v=(A=+A)*A,b):Math.sqrt(v)},b.tapDistance=function(A){return arguments.length?(x=+A,b):x},b}class M0 extends Map{constructor(n,r=L9){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),n!=null)for(const[a,o]of n)this.set(a,o)}get(n){return super.get(T0(this,n))}has(n){return super.has(T0(this,n))}set(n,r){return super.set(k9(this,n),r)}delete(n){return super.delete(I9(this,n))}}function T0({_intern:e,_key:n},r){const a=n(r);return e.has(a)?e.get(a):r}function k9({_intern:e,_key:n},r){const a=n(r);return e.has(a)?e.get(a):(e.set(a,r),r)}function I9({_intern:e,_key:n},r){const a=n(r);return e.has(a)&&(r=e.get(a),e.delete(a)),r}function L9(e){return e!==null&&typeof e=="object"?e.valueOf():e}function P0(e,n){let r;if(n===void 0)for(const a of e)a!=null&&(r<a||r===void 0&&a>=a)&&(r=a);else{let a=-1;for(let o of e)(o=n(o,++a,e))!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}return r}function N0(e,n){let r;if(n===void 0)for(const a of e)a!=null&&(r>a||r===void 0&&a>=a)&&(r=a);else{let a=-1;for(let o of e)(o=n(o,++a,e))!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}return r}function F9(e,n){let r=0;for(let a of e)(a=+a)&&(r+=a);return r}var $9=typeof global=="object"&&global&&global.Object===Object&&global,H9=typeof self=="object"&&self&&self.Object===Object&&self,ey=$9||H9||Function("return this")(),Yi=ey.Symbol,ty=Object.prototype,z9=ty.hasOwnProperty,U9=ty.toString,Aa=Yi?Yi.toStringTag:void 0;function V9(e){var n=z9.call(e,Aa),r=e[Aa];try{e[Aa]=void 0;var a=!0}catch{}var o=U9.call(e);return a&&(n?e[Aa]=r:delete e[Aa]),o}var Z9=Object.prototype,B9=Z9.toString;function q9(e){return B9.call(e)}var W9="[object Null]",G9="[object Undefined]",O0=Yi?Yi.toStringTag:void 0;function K9(e){return e==null?e===void 0?G9:W9:O0&&O0 in Object(e)?V9(e):q9(e)}function Y9(e){return e!=null&&typeof e=="object"}var Q9="[object Symbol]";function X9(e){return typeof e=="symbol"||Y9(e)&&K9(e)==Q9}var J9=/\s/;function eP(e){for(var n=e.length;n--&&J9.test(e.charAt(n)););return n}var tP=/^\s+/;function nP(e){return e&&e.slice(0,eP(e)+1).replace(tP,"")}function Qi(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var j0=NaN,rP=/^[-+]0x[0-9a-f]+$/i,aP=/^0b[01]+$/i,oP=/^0o[0-7]+$/i,iP=parseInt;function D0(e){if(typeof e=="number")return e;if(X9(e))return j0;if(Qi(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Qi(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=nP(e);var r=aP.test(e);return r||oP.test(e)?iP(e.slice(2),r?2:8):rP.test(e)?j0:+e}var xl=function(){return ey.Date.now()},sP="Expected a function",lP=Math.max,cP=Math.min;function ny(e,n,r){var a,o,i,s,l,c,u=0,h=!1,f=!1,m=!0;if(typeof e!="function")throw new TypeError(sP);n=D0(n)||0,Qi(r)&&(h=!!r.leading,f="maxWait"in r,i=f?lP(D0(r.maxWait)||0,n):i,m="trailing"in r?!!r.trailing:m);function g(M){var R=a,_=o;return a=o=void 0,u=M,s=e.apply(_,R),s}function y(M){return u=M,l=setTimeout(b,n),h?g(M):s}function v(M){var R=M-c,_=M-u,O=n-R;return f?cP(O,i-_):O}function x(M){var R=M-c,_=M-u;return c===void 0||R>=n||R<0||f&&_>=i}function b(){var M=xl();if(x(M))return w(M);l=setTimeout(b,v(M))}function w(M){return l=void 0,m&&a?g(M):(a=o=void 0,s)}function E(){l!==void 0&&clearTimeout(l),u=0,a=c=o=l=void 0}function C(){return l===void 0?s:w(xl())}function S(){var M=xl(),R=x(M);if(a=arguments,o=this,c=M,R){if(l===void 0)return y(c);if(f)return clearTimeout(l),l=setTimeout(b,n),g(c)}return l===void 0&&(l=setTimeout(b,n)),s}return S.cancel=E,S.flush=C,S}var uP="Expected a function";function dP(e,n,r){var a=!0,o=!0;if(typeof e!="function")throw new TypeError(uP);return Qi(r)&&(a="leading"in r?!!r.leading:a,o="trailing"in r?!!r.trailing:o),ny(e,n,{leading:a,maxWait:n,trailing:o})}var br=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-br.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?br.Bounce.In(e*2)*.5:br.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),Fa=function(){return performance.now()},ry=(function(){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,n)}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var n,r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];for(var o=0,i=r;o<i.length;o++){var s=i[o];(n=s._group)===null||n===void 0||n.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},e.prototype.remove=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var a=0,o=n;a<o.length;a++){var i=o[a];i._group=void 0,delete this._tweens[i.getId()],delete this._tweensAddedDuringUpdate[i.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(n){return!n.isPlaying()})},e.prototype.update=function(n,r){n===void 0&&(n=Fa()),r===void 0&&(r=!0);var a=Object.keys(this._tweens);if(a.length!==0)for(;a.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<a.length;o++){var i=this._tweens[a[o]],s=!r;i&&i.update(n,s)===!1&&!r&&this.remove(i)}a=Object.keys(this._tweensAddedDuringUpdate)}},e})(),gc={Linear:function(e,n){var r=e.length-1,a=r*n,o=Math.floor(a),i=gc.Utils.Linear;return n<0?i(e[0],e[1],a):n>1?i(e[r],e[r-1],r-a):i(e[o],e[o+1>r?r:o+1],a-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},ay=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),yc=new ry,k0=(function(){function e(n,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=br.Linear.None,this._interpolationFunction=gc.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=ay.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=n,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=yc,yc.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=Fa()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var a in this._valuesStartRepeat)this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var i in this._valuesEnd)o[i]=this._valuesEnd[i];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,a,o,i){for(var s in a){var l=n[s],c=Array.isArray(l),u=c?"array":typeof l,h=!c&&Array.isArray(a[s]);if(!(u==="undefined"||u==="function")){if(h){var f=a[s];if(f.length===0)continue;for(var m=[l],g=0,y=f.length;g<y;g+=1){var v=this._handleRelativeValue(l,f[g]);if(isNaN(v)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}m.push(v)}h&&(a[s]=m)}if((u==="object"||c)&&l&&!h){r[s]=c?[]:{};var x=l;for(var b in x)r[s][b]=x[b];o[s]=c?[]:{};var f=a[s];if(!this._isDynamic){var w={};for(var b in f)w[b]=f[b];a[s]=f=w}this._setupProperties(x,r[s],f,o[s],i)}else(typeof r[s]>"u"||i)&&(r[s]=l),c||(r[s]*=1),h?o[s]=a[s].slice().reverse():o[s]=r[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(n){return n===void 0&&(n=Fa()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=Fa()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;n<r;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n?(n.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var n;return(n=this._group)===null||n===void 0||n.remove(this),this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=br.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=gc.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,r){var a=this,o;if(n===void 0&&(n=Fa()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var i;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=n-this._startTime,l=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),c=this._duration+this._repeat*l,u=function(){if(a._duration===0||s>c)return 1;var v=Math.trunc(s/l),x=s-v*l,b=Math.min(x/a._duration,1);return b===0&&s===a._duration?1:b},h=u(),f=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,f),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||s>=this._duration)if(this._repeat>0){var m=Math.min(Math.trunc((s-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=m);for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*m,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var g=0,y=this._chainedTweens.length;g<y;g++)this._chainedTweens[g].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,r,a,o){for(var i in a)if(r[i]!==void 0){var s=r[i]||0,l=a[i],c=Array.isArray(n[i]),u=Array.isArray(l),h=!c&&u;h?n[i]=this._interpolationFunction(l,o):typeof l=="object"&&l?this._updateProperties(n[i],s,l,o):(l=this._handleRelativeValue(s,l),typeof l=="number"&&(n[i]=s+(l-s)*o))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],a=this._valuesEnd[n];typeof a=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(a):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e.autoStartOnUpdate=!1,e})();ay.nextId;var xn=yc;xn.getAll.bind(xn);xn.removeAll.bind(xn);xn.add.bind(xn);xn.remove.bind(xn);xn.update.bind(xn);function I0(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function fP(e){if(Array.isArray(e))return e}function hP(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function pP(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function mP(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function gP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
318
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yP(e,n){return fP(e)||mP(e,n)||vP(e,n)||gP()}function vP(e,n){if(e){if(typeof e=="string")return I0(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I0(e,n):void 0}}var xP=pP(function e(n,r){var a=r.default,o=a===void 0?null:a,i=r.triggerUpdate,s=i===void 0?!0:i,l=r.onChange,c=l===void 0?function(u,h){}:l;hP(this,e),this.name=n,this.defaultVal=o,this.triggerUpdate=s,this.onChange=c});function Xu(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,a=e.props,o=a===void 0?{}:a,i=e.methods,s=i===void 0?{}:i,l=e.aliases,c=l===void 0?{}:l,u=e.init,h=u===void 0?function(){}:u,f=e.update,m=f===void 0?function(){}:f,g=Object.keys(o).map(function(y){return new xP(y,o[y])});return function y(){for(var v=arguments.length,x=new Array(v),b=0;b<v;b++)x[b]=arguments[b];var w=!!(this instanceof y&&this.constructor),E=w?x.shift():void 0,C=x[0],S=C===void 0?{}:C,M=Object.assign({},r instanceof Function?r(S):r,{initialised:!1}),R={};function _(j){return O(j,S),P(),_}var O=function($,V){h.call(_,$,M,V),M.initialised=!0},P=ny(function(){M.initialised&&(m.call(_,M,R),R={})},1);return g.forEach(function(j){_[j.name]=$(j);function $(V){var A=V.name,D=V.triggerUpdate,T=D===void 0?!1:D,F=V.onChange,H=F===void 0?function(B,q){}:F,I=V.defaultVal,Z=I===void 0?null:I;return function(B){var q=M[A];if(!arguments.length)return q;var X=B===void 0?Z:B;return M[A]=X,H.call(_,X,M,q),!R.hasOwnProperty(A)&&(R[A]=q),T&&P(),_}}}),Object.keys(s).forEach(function(j){_[j]=function(){for(var $,V=arguments.length,A=new Array(V),D=0;D<V;D++)A[D]=arguments[D];return($=s[j]).call.apply($,[_,M].concat(A))}}),Object.entries(c).forEach(function(j){var $=yP(j,2),V=$[0],A=$[1];return _[V]=_[A]}),_.resetProps=function(){return g.forEach(function(j){_[j.name](j.defaultVal)}),_},_.resetProps(),M._rerender=P,w&&E&&_(E),_}}var Ae=(function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}});function Xi(e){"@babel/helpers - typeof";return Xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Xi(e)}var bP=/^\s+/,wP=/\s+$/;function ae(e,n){if(e=e||"",n=n||{},e instanceof ae)return e;if(!(this instanceof ae))return new ae(e,n);var r=_P(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}ae.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,a,o,i,s,l;return r=n.r/255,a=n.g/255,o=n.b/255,r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),.2126*i+.7152*s+.0722*l},setAlpha:function(n){return this._a=oy(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=F0(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=F0(this._r,this._g,this._b),r=Math.round(n.h*360),a=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+a+"%, "+o+"%)":"hsva("+r+", "+a+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=L0(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=L0(this._r,this._g,this._b),r=Math.round(n.h*360),a=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+a+"%, "+o+"%)":"hsla("+r+", "+a+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return $0(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return AP(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Fe(this._r,255)*100)+"%",g:Math.round(Fe(this._g,255)*100)+"%",b:Math.round(Fe(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Fe(this._r,255)*100)+"%, "+Math.round(Fe(this._g,255)*100)+"%, "+Math.round(Fe(this._b,255)*100)+"%)":"rgba("+Math.round(Fe(this._r,255)*100)+"%, "+Math.round(Fe(this._g,255)*100)+"%, "+Math.round(Fe(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:FP[$0(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+H0(this._r,this._g,this._b,this._a),a=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var i=ae(n);a="#"+H0(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+a+")"},toString:function(n){var r=!!n;n=n||this._format;var a=!1,o=this._a<1&&this._a>=0,i=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return i?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(a=this.toRgbString()),n==="prgb"&&(a=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(a=this.toHexString()),n==="hex3"&&(a=this.toHexString(!0)),n==="hex4"&&(a=this.toHex8String(!0)),n==="hex8"&&(a=this.toHex8String()),n==="name"&&(a=this.toName()),n==="hsl"&&(a=this.toHslString()),n==="hsv"&&(a=this.toHsvString()),a||this.toHexString())},clone:function(){return ae(this.toString())},_applyModification:function(n,r){var a=n.apply(null,[this].concat([].slice.call(r)));return this._r=a._r,this._g=a._g,this._b=a._b,this.setAlpha(a._a),this},lighten:function(){return this._applyModification(PP,arguments)},brighten:function(){return this._applyModification(NP,arguments)},darken:function(){return this._applyModification(OP,arguments)},desaturate:function(){return this._applyModification(RP,arguments)},saturate:function(){return this._applyModification(MP,arguments)},greyscale:function(){return this._applyModification(TP,arguments)},spin:function(){return this._applyModification(jP,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(IP,arguments)},complement:function(){return this._applyCombination(DP,arguments)},monochromatic:function(){return this._applyCombination(LP,arguments)},splitcomplement:function(){return this._applyCombination(kP,arguments)},triad:function(){return this._applyCombination(z0,[3])},tetrad:function(){return this._applyCombination(z0,[4])}};ae.fromRatio=function(e,n){if(Xi(e)=="object"){var r={};for(var a in e)e.hasOwnProperty(a)&&(a==="a"?r[a]=e[a]:r[a]=$a(e[a]));e=r}return ae(e,n)};function _P(e){var n={r:0,g:0,b:0},r=1,a=null,o=null,i=null,s=!1,l=!1;return typeof e=="string"&&(e=UP(e)),Xi(e)=="object"&&(An(e.r)&&An(e.g)&&An(e.b)?(n=EP(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):An(e.h)&&An(e.s)&&An(e.v)?(a=$a(e.s),o=$a(e.v),n=SP(e.h,a,o),s=!0,l="hsv"):An(e.h)&&An(e.s)&&An(e.l)&&(a=$a(e.s),i=$a(e.l),n=CP(e.h,a,i),s=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=oy(r),{ok:s,format:e.format||l,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function EP(e,n,r){return{r:Fe(e,255)*255,g:Fe(n,255)*255,b:Fe(r,255)*255}}function L0(e,n,r){e=Fe(e,255),n=Fe(n,255),r=Fe(r,255);var a=Math.max(e,n,r),o=Math.min(e,n,r),i,s,l=(a+o)/2;if(a==o)i=s=0;else{var c=a-o;switch(s=l>.5?c/(2-a-o):c/(a+o),a){case e:i=(n-r)/c+(n<r?6:0);break;case n:i=(r-e)/c+2;break;case r:i=(e-n)/c+4;break}i/=6}return{h:i,s,l}}function CP(e,n,r){var a,o,i;e=Fe(e,360),n=Fe(n,100),r=Fe(r,100);function s(u,h,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(h-u)*6*f:f<1/2?h:f<2/3?u+(h-u)*(2/3-f)*6:u}if(n===0)a=o=i=r;else{var l=r<.5?r*(1+n):r+n-r*n,c=2*r-l;a=s(c,l,e+1/3),o=s(c,l,e),i=s(c,l,e-1/3)}return{r:a*255,g:o*255,b:i*255}}function F0(e,n,r){e=Fe(e,255),n=Fe(n,255),r=Fe(r,255);var a=Math.max(e,n,r),o=Math.min(e,n,r),i,s,l=a,c=a-o;if(s=a===0?0:c/a,a==o)i=0;else{switch(a){case e:i=(n-r)/c+(n<r?6:0);break;case n:i=(r-e)/c+2;break;case r:i=(e-n)/c+4;break}i/=6}return{h:i,s,v:l}}function SP(e,n,r){e=Fe(e,360)*6,n=Fe(n,100),r=Fe(r,100);var a=Math.floor(e),o=e-a,i=r*(1-n),s=r*(1-o*n),l=r*(1-(1-o)*n),c=a%6,u=[r,s,i,i,l,r][c],h=[l,r,r,s,i,i][c],f=[i,i,l,r,r,s][c];return{r:u*255,g:h*255,b:f*255}}function $0(e,n,r,a){var o=[Xt(Math.round(e).toString(16)),Xt(Math.round(n).toString(16)),Xt(Math.round(r).toString(16))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function AP(e,n,r,a,o){var i=[Xt(Math.round(e).toString(16)),Xt(Math.round(n).toString(16)),Xt(Math.round(r).toString(16)),Xt(iy(a))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function H0(e,n,r,a){var o=[Xt(iy(a)),Xt(Math.round(e).toString(16)),Xt(Math.round(n).toString(16)),Xt(Math.round(r).toString(16))];return o.join("")}ae.equals=function(e,n){return!e||!n?!1:ae(e).toRgbString()==ae(n).toRgbString()};ae.random=function(){return ae.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function RP(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s-=n/100,r.s=Os(r.s),ae(r)}function MP(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.s+=n/100,r.s=Os(r.s),ae(r)}function TP(e){return ae(e).desaturate(100)}function PP(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l+=n/100,r.l=Os(r.l),ae(r)}function NP(e,n){n=n===0?0:n||10;var r=ae(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),ae(r)}function OP(e,n){n=n===0?0:n||10;var r=ae(e).toHsl();return r.l-=n/100,r.l=Os(r.l),ae(r)}function jP(e,n){var r=ae(e).toHsl(),a=(r.h+n)%360;return r.h=a<0?360+a:a,ae(r)}function DP(e){var n=ae(e).toHsl();return n.h=(n.h+180)%360,ae(n)}function z0(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=ae(e).toHsl(),a=[ae(e)],o=360/n,i=1;i<n;i++)a.push(ae({h:(r.h+i*o)%360,s:r.s,l:r.l}));return a}function kP(e){var n=ae(e).toHsl(),r=n.h;return[ae(e),ae({h:(r+72)%360,s:n.s,l:n.l}),ae({h:(r+216)%360,s:n.s,l:n.l})]}function IP(e,n,r){n=n||6,r=r||30;var a=ae(e).toHsl(),o=360/r,i=[ae(e)];for(a.h=(a.h-(o*n>>1)+720)%360;--n;)a.h=(a.h+o)%360,i.push(ae(a));return i}function LP(e,n){n=n||6;for(var r=ae(e).toHsv(),a=r.h,o=r.s,i=r.v,s=[],l=1/n;n--;)s.push(ae({h:a,s:o,v:i})),i=(i+l)%1;return s}ae.mix=function(e,n,r){r=r===0?0:r||50;var a=ae(e).toRgb(),o=ae(n).toRgb(),i=r/100,s={r:(o.r-a.r)*i+a.r,g:(o.g-a.g)*i+a.g,b:(o.b-a.b)*i+a.b,a:(o.a-a.a)*i+a.a};return ae(s)};ae.readability=function(e,n){var r=ae(e),a=ae(n);return(Math.max(r.getLuminance(),a.getLuminance())+.05)/(Math.min(r.getLuminance(),a.getLuminance())+.05)};ae.isReadable=function(e,n,r){var a=ae.readability(e,n),o,i;switch(i=!1,o=VP(r),o.level+o.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7;break}return i};ae.mostReadable=function(e,n,r){var a=null,o=0,i,s,l,c;r=r||{},s=r.includeFallbackColors,l=r.level,c=r.size;for(var u=0;u<n.length;u++)i=ae.readability(e,n[u]),i>o&&(o=i,a=ae(n[u]));return ae.isReadable(e,a,{level:l,size:c})||!s?a:(r.includeFallbackColors=!1,ae.mostReadable(e,["#fff","#000"],r))};var vc=ae.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},FP=ae.hexNames=$P(vc);function $P(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function oy(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Fe(e,n){HP(e)&&(e="100%");var r=zP(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function Os(e){return Math.min(1,Math.max(0,e))}function St(e){return parseInt(e,16)}function HP(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function zP(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Xt(e){return e.length==1?"0"+e:""+e}function $a(e){return e<=1&&(e=e*100+"%"),e}function iy(e){return Math.round(parseFloat(e)*255).toString(16)}function U0(e){return St(e)/255}var Gt=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function An(e){return!!Gt.CSS_UNIT.exec(e)}function UP(e){e=e.replace(bP,"").replace(wP,"").toLowerCase();var n=!1;if(vc[e])e=vc[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Gt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Gt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Gt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Gt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Gt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Gt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Gt.hex8.exec(e))?{r:St(r[1]),g:St(r[2]),b:St(r[3]),a:U0(r[4]),format:n?"name":"hex8"}:(r=Gt.hex6.exec(e))?{r:St(r[1]),g:St(r[2]),b:St(r[3]),format:n?"name":"hex"}:(r=Gt.hex4.exec(e))?{r:St(r[1]+""+r[1]),g:St(r[2]+""+r[2]),b:St(r[3]+""+r[3]),a:U0(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=Gt.hex3.exec(e))?{r:St(r[1]+""+r[1]),g:St(r[2]+""+r[2]),b:St(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function VP(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function xc(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function ZP(e){if(Array.isArray(e))return xc(e)}function sy(e,n,r){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:r;throw new TypeError("Private element is not present on this object")}function BP(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qP(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Dt(e,n){return e.get(sy(e,n))}function V0(e,n,r){BP(e,n),n.set(e,r)}function Z0(e,n,r){return e.set(sy(e,n),r),r}function WP(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,JP(a.key),a)}}function GP(e,n,r){return n&&WP(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function KP(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
319
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QP(e){return ZP(e)||KP(e)||eN(e)||YP()}function XP(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function JP(e){var n=XP(e,"string");return typeof n=="symbol"?n:n+""}function eN(e,n){if(e){if(typeof e=="string")return xc(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xc(e,n):void 0}}var tN=123,nN=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},ly=function(n,r,a){return(n<<16)+(r<<8)+a},rN=function(n){var r=ae(n).toRgb(),a=r.r,o=r.g,i=r.b;return ly(a,o,i)},B0=function(n,r){return n*tN%Math.pow(2,r)},dr=new WeakMap,Rn=new WeakMap,aN=(function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;qP(this,e),V0(this,dr,void 0),V0(this,Rn,void 0),Z0(Rn,this,n),this.reset()}return GP(e,[{key:"reset",value:function(){Z0(dr,this,["__reserved for background__"])}},{key:"register",value:function(r){if(Dt(dr,this).length>=Math.pow(2,24-Dt(Rn,this)))return null;var a=Dt(dr,this).length,o=B0(a,Dt(Rn,this)),i=nN(a+(o<<24-Dt(Rn,this)));return Dt(dr,this).push(r),i}},{key:"lookup",value:function(r){if(!r)return null;var a=typeof r=="string"?rN(r):ly.apply(void 0,QP(r));if(!a)return null;var o=a&Math.pow(2,24-Dt(Rn,this))-1,i=a>>24-Dt(Rn,this)&Math.pow(2,Dt(Rn,this))-1;return B0(o,Dt(Rn,this))!==i||o>=Dt(dr,this).length?null:Dt(dr,this)[o]}}])})(),zo,$e,cy,uy,fr,q0,dy,fy,hy,Ju,bc,wc,mo={},py=[],oN=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,js=Array.isArray;function hn(e,n){for(var r in n)e[r]=n[r];return e}function ed(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function iN(e,n,r){var a,o,i,s={};for(i in n)i=="key"?a=n[i]:i=="ref"?o=n[i]:s[i]=n[i];if(arguments.length>2&&(s.children=arguments.length>3?zo.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Wa(e,s,a,o,null)}function Wa(e,n,r,a,o){var i={type:e,props:n,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++cy,__i:-1,__u:0};return o==null&&$e.vnode!=null&&$e.vnode(i),i}function Ds(e){return e.children}function Ri(e,n){this.props=e,this.context=n}function na(e,n){if(n==null)return e.__?na(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?na(e):null}function my(e){var n,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return my(e)}}function W0(e){(!e.__d&&(e.__d=!0)&&fr.push(e)&&!Ji.__r++||q0!=$e.debounceRendering)&&((q0=$e.debounceRendering)||dy)(Ji)}function Ji(){for(var e,n,r,a,o,i,s,l=1;fr.length;)fr.length>l&&fr.sort(fy),e=fr.shift(),l=fr.length,e.__d&&(r=void 0,a=void 0,o=(a=(n=e).__v).__e,i=[],s=[],n.__P&&((r=hn({},a)).__v=a.__v+1,$e.vnode&&$e.vnode(r),td(n.__P,r,a,n.__n,n.__P.namespaceURI,32&a.__u?[o]:null,i,o??na(a),!!(32&a.__u),s),r.__v=a.__v,r.__.__k[r.__i]=r,vy(i,r,s),a.__e=a.__=null,r.__e!=o&&my(r)));Ji.__r=0}function gy(e,n,r,a,o,i,s,l,c,u,h){var f,m,g,y,v,x,b,w=a&&a.__k||py,E=n.length;for(c=sN(r,n,w,c,E),f=0;f<E;f++)(g=r.__k[f])!=null&&(m=g.__i==-1?mo:w[g.__i]||mo,g.__i=f,x=td(e,g,m,o,i,s,l,c,u,h),y=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&nd(m.ref,null,g),h.push(g.ref,g.__c||y,g)),v==null&&y!=null&&(v=y),(b=!!(4&g.__u))||m.__k===g.__k?c=yy(g,c,e,b):typeof g.type=="function"&&x!==void 0?c=x:y&&(c=y.nextSibling),g.__u&=-7);return r.__e=v,c}function sN(e,n,r,a,o){var i,s,l,c,u,h=r.length,f=h,m=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=n[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=Wa(null,s,null,null,null):js(s)?s=e.__k[i]=Wa(Ds,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Wa(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,c=i+m,s.__=e,s.__b=e.__b+1,l=null,(u=s.__i=lN(s,r,c,f))!=-1&&(f--,(l=r[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(o>h?m--:o<h&&m++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?m--:u==c+1?m++:(u>c?m--:m++,s.__u|=4))):e.__k[i]=null;if(f)for(i=0;i<h;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=na(l)),by(l,l));return a}function yy(e,n,r,a){var o,i;if(typeof e.type=="function"){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,n=yy(o[i],n,r,a));return n}e.__e!=n&&(a&&(n&&e.type&&!n.parentNode&&(n=na(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function lN(e,n,r,a){var o,i,s,l=e.key,c=e.type,u=n[r],h=u!=null&&(2&u.__u)==0;if(u===null&&l==null||h&&l==u.key&&c==u.type)return r;if(a>(h?1:0)){for(o=r-1,i=r+1;o>=0||i<n.length;)if((u=n[s=o>=0?o--:i++])!=null&&(2&u.__u)==0&&l==u.key&&c==u.type)return s}return-1}function G0(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||oN.test(n)?r:r+"px"}function fi(e,n,r,a,o){var i,s;e:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(n in a)r&&n in r||G0(e.style,n,"");if(r)for(n in r)a&&r[n]==a[n]||G0(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")i=n!=(n=n.replace(hy,"$1")),s=n.toLowerCase(),n=s in e||n=="onFocusOut"||n=="onFocusIn"?s.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=r,r?a?r.u=a.u:(r.u=Ju,e.addEventListener(n,i?wc:bc,i)):e.removeEventListener(n,i?wc:bc,i);else{if(o=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function K0(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n.t==null)n.t=Ju++;else if(n.t<r.u)return;return r($e.event?$e.event(n):n)}}}function td(e,n,r,a,o,i,s,l,c,u){var h,f,m,g,y,v,x,b,w,E,C,S,M,R,_,O,P,j=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),i=[l=n.__e=r.__e]),(h=$e.__b)&&h(n);e:if(typeof j=="function")try{if(b=n.props,w="prototype"in j&&j.prototype.render,E=(h=j.contextType)&&a[h.__c],C=h?E?E.props.value:h.__:a,r.__c?x=(f=n.__c=r.__c).__=f.__E:(w?n.__c=f=new j(b,C):(n.__c=f=new Ri(b,C),f.constructor=j,f.render=uN),E&&E.sub(f),f.state||(f.state={}),f.__n=a,m=f.__d=!0,f.__h=[],f._sb=[]),w&&f.__s==null&&(f.__s=f.state),w&&j.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=hn({},f.__s)),hn(f.__s,j.getDerivedStateFromProps(b,f.__s))),g=f.props,y=f.state,f.__v=n,m)w&&j.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),w&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(w&&j.getDerivedStateFromProps==null&&b!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(b,C),n.__v==r.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(b,f.__s,C)===!1){for(n.__v!=r.__v&&(f.props=b,f.state=f.__s,f.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function($){$&&($.__=n)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&s.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(b,f.__s,C),w&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,y,v)})}if(f.context=C,f.props=b,f.__P=e,f.__e=!1,M=$e.__r,R=0,w){for(f.state=f.__s,f.__d=!1,M&&M(n),h=f.render(f.props,f.state,f.context),_=0;_<f._sb.length;_++)f.__h.push(f._sb[_]);f._sb=[]}else do f.__d=!1,M&&M(n),h=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++R<25);f.state=f.__s,f.getChildContext!=null&&(a=hn(hn({},a),f.getChildContext())),w&&!m&&f.getSnapshotBeforeUpdate!=null&&(v=f.getSnapshotBeforeUpdate(g,y)),O=h,h!=null&&h.type===Ds&&h.key==null&&(O=xy(h.props.children)),l=gy(e,js(O)?O:[O],n,r,a,o,i,s,l,c,u),f.base=n.__e,n.__u&=-161,f.__h.length&&s.push(f),x&&(f.__E=f.__=null)}catch($){if(n.__v=null,c||i!=null)if($.then){for(n.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,n.__e=l}else{for(P=i.length;P--;)ed(i[P]);_c(n)}else n.__e=r.__e,n.__k=r.__k,$.then||_c(n);$e.__e($,n,r)}else i==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):l=n.__e=cN(r.__e,n,r,a,o,i,s,c,u);return(h=$e.diffed)&&h(n),128&n.__u?void 0:l}function _c(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(_c)}function vy(e,n,r){for(var a=0;a<r.length;a++)nd(r[a],r[++a],r[++a]);$e.__c&&$e.__c(n,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){$e.__e(i,o.__v)}})}function xy(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:js(e)?e.map(xy):hn({},e)}function cN(e,n,r,a,o,i,s,l,c){var u,h,f,m,g,y,v,x=r.props||mo,b=n.props,w=n.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((g=i[u])&&"setAttribute"in g==!!w&&(w?g.localName==w:g.nodeType==3)){e=g,i[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(b);e=document.createElementNS(o,w,b.is&&b),l&&($e.__m&&$e.__m(n,i),l=!1),i=null}if(w==null)x===b||l&&e.data==b||(e.data=b);else{if(i=i&&zo.call(e.childNodes),!l&&i!=null)for(x={},u=0;u<e.attributes.length;u++)x[(g=e.attributes[u]).name]=g.value;for(u in x)if(g=x[u],u!="children"){if(u=="dangerouslySetInnerHTML")f=g;else if(!(u in b)){if(u=="value"&&"defaultValue"in b||u=="checked"&&"defaultChecked"in b)continue;fi(e,u,null,g,o)}}for(u in b)g=b[u],u=="children"?m=g:u=="dangerouslySetInnerHTML"?h=g:u=="value"?y=g:u=="checked"?v=g:l&&typeof g!="function"||x[u]===g||fi(e,u,g,x[u],o);if(h)l||f&&(h.__html==f.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),n.__k=[];else if(f&&(e.innerHTML=""),gy(n.type=="template"?e.content:e,js(m)?m:[m],n,r,a,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:r.__k&&na(r,0),l,c),i!=null)for(u=i.length;u--;)ed(i[u]);l||(u="value",w=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[u]||w=="progress"&&!y||w=="option"&&y!=x[u])&&fi(e,u,y,x[u],o),u="checked",v!=null&&v!=e[u]&&fi(e,u,v,x[u],o))}return e}function nd(e,n,r){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&n==null||(e.__u=e(n))}else e.current=n}catch(o){$e.__e(o,r)}}function by(e,n,r){var a,o;if($e.unmount&&$e.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||nd(a,null,n)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){$e.__e(i,n)}a.base=a.__P=null}if(a=e.__k)for(o=0;o<a.length;o++)a[o]&&by(a[o],n,r||typeof e.type!="function");r||ed(e.__e),e.__c=e.__=e.__e=void 0}function uN(e,n,r){return this.constructor(e,r)}function dN(e,n,r){var a,o,i,s;n==document&&(n=document.documentElement),$e.__&&$e.__(e,n),o=(a=!1)?null:n.__k,i=[],s=[],td(n,e=n.__k=iN(Ds,null,[e]),o||mo,mo,n.namespaceURI,o?null:n.firstChild?zo.call(n.childNodes):null,i,o?o.__e:n.firstChild,a,s),vy(i,e,s)}function wy(e,n,r){var a,o,i,s,l=hn({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)i=="key"?a=n[i]:i=="ref"?o=n[i]:l[i]=n[i]===void 0&&s!=null?s[i]:n[i];return arguments.length>2&&(l.children=arguments.length>3?zo.call(arguments,2):r),Wa(e.type,l,a||e.key,o||e.ref,null)}zo=py.slice,$e={__e:function(e,n,r,a){for(var o,i,s;n=n.__;)if((o=n.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,a||{}),s=o.__d),s)return o.__E=o}catch(l){e=l}throw e}},cy=0,uy=function(e){return e!=null&&e.constructor===void 0},Ri.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=hn({},this.state),typeof e=="function"&&(e=e(hn({},r),this.props)),e&&hn(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),W0(this))},Ri.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),W0(this))},Ri.prototype.render=Ds,fr=[],dy=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,fy=function(e,n){return e.__v.__b-n.__v.__b},Ji.__r=0,hy=/(PointerCapture)$|Capture$/i,Ju=0,bc=K0(!1),wc=K0(!0);function Y0(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function fN(e){if(Array.isArray(e))return e}function hN(e,n,r){return(n=xN(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function pN(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function mN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
320
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q0(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function gN(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Q0(Object(r),!0).forEach(function(a){hN(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q0(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function yN(e,n){return fN(e)||pN(e,n)||bN(e,n)||mN()}function vN(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function xN(e){var n=vN(e,"string");return typeof n=="symbol"?n:n+""}function es(e){"@babel/helpers - typeof";return es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},es(e)}function bN(e,n){if(e){if(typeof e=="string")return Y0(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y0(e,n):void 0}}var Ec=function(n){if(es(n)!=="object")return n;var r=wy(n);if(r.props){var a;r.props=gN({},r.props),r!=null&&(a=r.props)!==null&&a!==void 0&&a.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(Ec):Ec(r.props.children))}return r},wN=function(n){return uy(wy(n))},_N=function(n,r){delete r.__k,dN(Ec(n),r)};function EN(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var CN=`.float-tooltip-kap {
321
- position: absolute;
322
- width: max-content; /* prevent shrinking near right edge */
323
- max-width: max(50%, 150px);
324
- padding: 3px 5px;
325
- border-radius: 3px;
326
- font: 12px sans-serif;
327
- color: #eee;
328
- background: rgba(0,0,0,0.6);
329
- pointer-events: none;
330
- }
331
- `;EN(CN);var SN=Xu({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.style,i=o===void 0?{}:o,s=!!n&&es(n)==="object"&&!!n.node&&typeof n.node=="function",l=$t(s?n.node():n);l.style("position")==="static"&&l.style("position","relative"),r.tooltipEl=l.append("div").attr("class","float-tooltip-kap"),Object.entries(i).forEach(function(u){var h=yN(u,2),f=h[0],m=h[1];return r.tooltipEl.style(f,m)}),r.tooltipEl.style("left","-10000px").style("display","none");var c="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,l.on("mousemove.".concat(c),function(u){r.mouseInside=!0;var h=fn(u),f=l.node(),m=f.offsetWidth,g=f.offsetHeight,y=[r.offsetX===null||r.offsetX===void 0?"-".concat(h[0]/m*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?g>130&&g-h[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",h[0]+"px").style("top",h[1]+"px").style("transform","translate(".concat(y.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseover.".concat(c),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseout.".concat(c),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):wN(n.content)?(n.tooltipEl.text(""),_N(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function AN(e,n,r){var a,o=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function i(){var s,l=a.length,c,u=0,h=0,f=0;for(s=0;s<l;++s)c=a[s],u+=c.x||0,h+=c.y||0,f+=c.z||0;for(u=(u/l-e)*o,h=(h/l-n)*o,f=(f/l-r)*o,s=0;s<l;++s)c=a[s],u&&(c.x-=u),h&&(c.y-=h),f&&(c.z-=f)}return i.initialize=function(s){a=s},i.x=function(s){return arguments.length?(e=+s,i):e},i.y=function(s){return arguments.length?(n=+s,i):n},i.z=function(s){return arguments.length?(r=+s,i):r},i.strength=function(s){return arguments.length?(o=+s,i):o},i}function RN(e){const n=+this._x.call(null,e);return _y(this.cover(n),n,e)}function _y(e,n,r){if(isNaN(n))return e;var a,o=e._root,i={data:r},s=e._x0,l=e._x1,c,u,h,f,m;if(!o)return e._root=i,e;for(;o.length;)if((h=n>=(c=(s+l)/2))?s=c:l=c,a=o,!(o=o[f=+h]))return a[f]=i,e;if(u=+e._x.call(null,o.data),n===u)return i.next=o,a?a[f]=i:e._root=i,e;do a=a?a[f]=new Array(2):e._root=new Array(2),(h=n>=(c=(s+l)/2))?s=c:l=c;while((f=+h)==(m=+(u>=c)));return a[m]=o,a[f]=i,e}function MN(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n);let a=1/0,o=-1/0;for(let i=0,s;i<n;++i)isNaN(s=+this._x.call(null,e[i]))||(r[i]=s,s<a&&(a=s),s>o&&(o=s));if(a>o)return this;this.cover(a).cover(o);for(let i=0;i<n;++i)_y(this,r[i],e[i]);return this}function TN(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var a=r-n||1,o=this._root,i,s;n>e||e>=r;)switch(s=+(e<n),i=new Array(2),i[s]=o,o=i,a*=2,s){case 0:r=n+a;break;case 1:n=r-a;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._x1=r,this}function PN(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function NN(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function kn(e,n,r){this.node=e,this.x0=n,this.x1=r}function ON(e,n){var r,a=this._x0,o,i,s=this._x1,l=[],c=this._root,u,h;for(c&&l.push(new kn(c,a,s)),n==null?n=1/0:(a=e-n,s=e+n);u=l.pop();)if(!(!(c=u.node)||(o=u.x0)>s||(i=u.x1)<a))if(c.length){var f=(o+i)/2;l.push(new kn(c[1],f,i),new kn(c[0],o,f)),(h=+(e>=f))&&(u=l[l.length-1],l[l.length-1]=l[l.length-1-h],l[l.length-1-h]=u)}else{var m=Math.abs(e-+this._x.call(null,c.data));m<n&&(n=m,a=e-m,s=e+m,r=c.data)}return r}function jN(e){if(isNaN(c=+this._x.call(null,e)))return this;var n,r=this._root,a,o,i,s=this._x0,l=this._x1,c,u,h,f,m;if(!r)return this;if(r.length)for(;;){if((h=c>=(u=(s+l)/2))?s=u:l=u,n=r,!(r=r[f=+h]))return this;if(!r.length)break;n[f+1&1]&&(a=n,m=f)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(i=r.next)&&delete r.next,o?(i?o.next=i:delete o.next,this):n?(i?n[f]=i:delete n[f],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(a?a[m]=r:this._root=r),this):(this._root=i,this)}function DN(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function kN(){return this._root}function IN(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function LN(e){var n=[],r,a=this._root,o,i,s;for(a&&n.push(new kn(a,this._x0,this._x1));r=n.pop();)if(!e(a=r.node,i=r.x0,s=r.x1)&&a.length){var l=(i+s)/2;(o=a[1])&&n.push(new kn(o,l,s)),(o=a[0])&&n.push(new kn(o,i,l))}return this}function FN(e){var n=[],r=[],a;for(this._root&&n.push(new kn(this._root,this._x0,this._x1));a=n.pop();){var o=a.node;if(o.length){var i,s=a.x0,l=a.x1,c=(s+l)/2;(i=o[0])&&n.push(new kn(i,s,c)),(i=o[1])&&n.push(new kn(i,c,l))}r.push(a)}for(;a=r.pop();)e(a.node,a.x0,a.x1);return this}function $N(e){return e[0]}function HN(e){return arguments.length?(this._x=e,this):this._x}function Ey(e,n){var r=new rd(n??$N,NaN,NaN);return e==null?r:r.addAll(e)}function rd(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function X0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var _t=Ey.prototype=rd.prototype;_t.copy=function(){var e=new rd(this._x,this._x0,this._x1),n=this._root,r,a;if(!n)return e;if(!n.length)return e._root=X0(n),e;for(r=[{source:n,target:e._root=new Array(2)}];n=r.pop();)for(var o=0;o<2;++o)(a=n.source[o])&&(a.length?r.push({source:a,target:n.target[o]=new Array(2)}):n.target[o]=X0(a));return e};_t.add=RN;_t.addAll=MN;_t.cover=TN;_t.data=PN;_t.extent=NN;_t.find=ON;_t.remove=jN;_t.removeAll=DN;_t.root=kN;_t.size=IN;_t.visit=LN;_t.visitAfter=FN;_t.x=HN;function zN(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return Cy(this.cover(n,r),n,r,e)}function Cy(e,n,r,a){if(isNaN(n)||isNaN(r))return e;var o,i=e._root,s={data:a},l=e._x0,c=e._y0,u=e._x1,h=e._y1,f,m,g,y,v,x,b,w;if(!i)return e._root=s,e;for(;i.length;)if((v=n>=(f=(l+u)/2))?l=f:u=f,(x=r>=(m=(c+h)/2))?c=m:h=m,o=i,!(i=i[b=x<<1|v]))return o[b]=s,e;if(g=+e._x.call(null,i.data),y=+e._y.call(null,i.data),n===g&&r===y)return s.next=i,o?o[b]=s:e._root=s,e;do o=o?o[b]=new Array(4):e._root=new Array(4),(v=n>=(f=(l+u)/2))?l=f:u=f,(x=r>=(m=(c+h)/2))?c=m:h=m;while((b=x<<1|v)===(w=(y>=m)<<1|g>=f));return o[w]=i,o[b]=s,e}function UN(e){var n,r,a=e.length,o,i,s=new Array(a),l=new Array(a),c=1/0,u=1/0,h=-1/0,f=-1/0;for(r=0;r<a;++r)isNaN(o=+this._x.call(null,n=e[r]))||isNaN(i=+this._y.call(null,n))||(s[r]=o,l[r]=i,o<c&&(c=o),o>h&&(h=o),i<u&&(u=i),i>f&&(f=i));if(c>h||u>f)return this;for(this.cover(c,u).cover(h,f),r=0;r<a;++r)Cy(this,s[r],l[r],e[r]);return this}function VN(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,a=this._y0,o=this._x1,i=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,i=(a=Math.floor(n))+1;else{for(var s=o-r||1,l=this._root,c,u;r>e||e>=o||a>n||n>=i;)switch(u=(n<a)<<1|e<r,c=new Array(4),c[u]=l,l=c,s*=2,u){case 0:o=r+s,i=a+s;break;case 1:r=o-s,i=a+s;break;case 2:o=r+s,a=i-s;break;case 3:r=o-s,a=i-s;break}this._root&&this._root.length&&(this._root=l)}return this._x0=r,this._y0=a,this._x1=o,this._y1=i,this}function ZN(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function BN(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function dt(e,n,r,a,o){this.node=e,this.x0=n,this.y0=r,this.x1=a,this.y1=o}function qN(e,n,r){var a,o=this._x0,i=this._y0,s,l,c,u,h=this._x1,f=this._y1,m=[],g=this._root,y,v;for(g&&m.push(new dt(g,o,i,h,f)),r==null?r=1/0:(o=e-r,i=n-r,h=e+r,f=n+r,r*=r);y=m.pop();)if(!(!(g=y.node)||(s=y.x0)>h||(l=y.y0)>f||(c=y.x1)<o||(u=y.y1)<i))if(g.length){var x=(s+c)/2,b=(l+u)/2;m.push(new dt(g[3],x,b,c,u),new dt(g[2],s,b,x,u),new dt(g[1],x,l,c,b),new dt(g[0],s,l,x,b)),(v=(n>=b)<<1|e>=x)&&(y=m[m.length-1],m[m.length-1]=m[m.length-1-v],m[m.length-1-v]=y)}else{var w=e-+this._x.call(null,g.data),E=n-+this._y.call(null,g.data),C=w*w+E*E;if(C<r){var S=Math.sqrt(r=C);o=e-S,i=n-S,h=e+S,f=n+S,a=g.data}}return a}function WN(e){if(isNaN(h=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,a,o,i,s=this._x0,l=this._y0,c=this._x1,u=this._y1,h,f,m,g,y,v,x,b;if(!r)return this;if(r.length)for(;;){if((y=h>=(m=(s+c)/2))?s=m:c=m,(v=f>=(g=(l+u)/2))?l=g:u=g,n=r,!(r=r[x=v<<1|y]))return this;if(!r.length)break;(n[x+1&3]||n[x+2&3]||n[x+3&3])&&(a=n,b=x)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(i=r.next)&&delete r.next,o?(i?o.next=i:delete o.next,this):n?(i?n[x]=i:delete n[x],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(a?a[b]=r:this._root=r),this):(this._root=i,this)}function GN(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function KN(){return this._root}function YN(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function QN(e){var n=[],r,a=this._root,o,i,s,l,c;for(a&&n.push(new dt(a,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(a=r.node,i=r.x0,s=r.y0,l=r.x1,c=r.y1)&&a.length){var u=(i+l)/2,h=(s+c)/2;(o=a[3])&&n.push(new dt(o,u,h,l,c)),(o=a[2])&&n.push(new dt(o,i,h,u,c)),(o=a[1])&&n.push(new dt(o,u,s,l,h)),(o=a[0])&&n.push(new dt(o,i,s,u,h))}return this}function XN(e){var n=[],r=[],a;for(this._root&&n.push(new dt(this._root,this._x0,this._y0,this._x1,this._y1));a=n.pop();){var o=a.node;if(o.length){var i,s=a.x0,l=a.y0,c=a.x1,u=a.y1,h=(s+c)/2,f=(l+u)/2;(i=o[0])&&n.push(new dt(i,s,l,h,f)),(i=o[1])&&n.push(new dt(i,h,l,c,f)),(i=o[2])&&n.push(new dt(i,s,f,h,u)),(i=o[3])&&n.push(new dt(i,h,f,c,u))}r.push(a)}for(;a=r.pop();)e(a.node,a.x0,a.y0,a.x1,a.y1);return this}function JN(e){return e[0]}function eO(e){return arguments.length?(this._x=e,this):this._x}function tO(e){return e[1]}function nO(e){return arguments.length?(this._y=e,this):this._y}function Sy(e,n,r){var a=new ad(n??JN,r??tO,NaN,NaN,NaN,NaN);return e==null?a:a.addAll(e)}function ad(e,n,r,a,o,i){this._x=e,this._y=n,this._x0=r,this._y0=a,this._x1=o,this._y1=i,this._root=void 0}function J0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var pt=Sy.prototype=ad.prototype;pt.copy=function(){var e=new ad(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,a;if(!n)return e;if(!n.length)return e._root=J0(n),e;for(r=[{source:n,target:e._root=new Array(4)}];n=r.pop();)for(var o=0;o<4;++o)(a=n.source[o])&&(a.length?r.push({source:a,target:n.target[o]=new Array(4)}):n.target[o]=J0(a));return e};pt.add=zN;pt.addAll=UN;pt.cover=VN;pt.data=ZN;pt.extent=BN;pt.find=qN;pt.remove=WN;pt.removeAll=GN;pt.root=KN;pt.size=YN;pt.visit=QN;pt.visitAfter=XN;pt.x=eO;pt.y=nO;function rO(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),a=+this._z.call(null,e);return Ay(this.cover(n,r,a),n,r,a,e)}function Ay(e,n,r,a,o){if(isNaN(n)||isNaN(r)||isNaN(a))return e;var i,s=e._root,l={data:o},c=e._x0,u=e._y0,h=e._z0,f=e._x1,m=e._y1,g=e._z1,y,v,x,b,w,E,C,S,M,R,_;if(!s)return e._root=l,e;for(;s.length;)if((C=n>=(y=(c+f)/2))?c=y:f=y,(S=r>=(v=(u+m)/2))?u=v:m=v,(M=a>=(x=(h+g)/2))?h=x:g=x,i=s,!(s=s[R=M<<2|S<<1|C]))return i[R]=l,e;if(b=+e._x.call(null,s.data),w=+e._y.call(null,s.data),E=+e._z.call(null,s.data),n===b&&r===w&&a===E)return l.next=s,i?i[R]=l:e._root=l,e;do i=i?i[R]=new Array(8):e._root=new Array(8),(C=n>=(y=(c+f)/2))?c=y:f=y,(S=r>=(v=(u+m)/2))?u=v:m=v,(M=a>=(x=(h+g)/2))?h=x:g=x;while((R=M<<2|S<<1|C)===(_=(E>=x)<<2|(w>=v)<<1|b>=y));return i[_]=s,i[R]=l,e}function aO(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),a=new Float64Array(n),o=new Float64Array(n);let i=1/0,s=1/0,l=1/0,c=-1/0,u=-1/0,h=-1/0;for(let f=0,m,g,y,v;f<n;++f)isNaN(g=+this._x.call(null,m=e[f]))||isNaN(y=+this._y.call(null,m))||isNaN(v=+this._z.call(null,m))||(r[f]=g,a[f]=y,o[f]=v,g<i&&(i=g),g>c&&(c=g),y<s&&(s=y),y>u&&(u=y),v<l&&(l=v),v>h&&(h=v));if(i>c||s>u||l>h)return this;this.cover(i,s,l).cover(c,u,h);for(let f=0;f<n;++f)Ay(this,r[f],a[f],o[f],e[f]);return this}function oO(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var a=this._x0,o=this._y0,i=this._z0,s=this._x1,l=this._y1,c=this._z1;if(isNaN(a))s=(a=Math.floor(e))+1,l=(o=Math.floor(n))+1,c=(i=Math.floor(r))+1;else{for(var u=s-a||1,h=this._root,f,m;a>e||e>=s||o>n||n>=l||i>r||r>=c;)switch(m=(r<i)<<2|(n<o)<<1|e<a,f=new Array(8),f[m]=h,h=f,u*=2,m){case 0:s=a+u,l=o+u,c=i+u;break;case 1:a=s-u,l=o+u,c=i+u;break;case 2:s=a+u,o=l-u,c=i+u;break;case 3:a=s-u,o=l-u,c=i+u;break;case 4:s=a+u,l=o+u,i=c-u;break;case 5:a=s-u,l=o+u,i=c-u;break;case 6:s=a+u,o=l-u,i=c-u;break;case 7:a=s-u,o=l-u,i=c-u;break}this._root&&this._root.length&&(this._root=h)}return this._x0=a,this._y0=o,this._z0=i,this._x1=s,this._y1=l,this._z1=c,this}function iO(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function sO(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Oe(e,n,r,a,o,i,s){this.node=e,this.x0=n,this.y0=r,this.z0=a,this.x1=o,this.y1=i,this.z1=s}function lO(e,n,r,a){var o,i=this._x0,s=this._y0,l=this._z0,c,u,h,f,m,g,y=this._x1,v=this._y1,x=this._z1,b=[],w=this._root,E,C;for(w&&b.push(new Oe(w,i,s,l,y,v,x)),a==null?a=1/0:(i=e-a,s=n-a,l=r-a,y=e+a,v=n+a,x=r+a,a*=a);E=b.pop();)if(!(!(w=E.node)||(c=E.x0)>y||(u=E.y0)>v||(h=E.z0)>x||(f=E.x1)<i||(m=E.y1)<s||(g=E.z1)<l))if(w.length){var S=(c+f)/2,M=(u+m)/2,R=(h+g)/2;b.push(new Oe(w[7],S,M,R,f,m,g),new Oe(w[6],c,M,R,S,m,g),new Oe(w[5],S,u,R,f,M,g),new Oe(w[4],c,u,R,S,M,g),new Oe(w[3],S,M,h,f,m,R),new Oe(w[2],c,M,h,S,m,R),new Oe(w[1],S,u,h,f,M,R),new Oe(w[0],c,u,h,S,M,R)),(C=(r>=R)<<2|(n>=M)<<1|e>=S)&&(E=b[b.length-1],b[b.length-1]=b[b.length-1-C],b[b.length-1-C]=E)}else{var _=e-+this._x.call(null,w.data),O=n-+this._y.call(null,w.data),P=r-+this._z.call(null,w.data),j=_*_+O*O+P*P;if(j<a){var $=Math.sqrt(a=j);i=e-$,s=n-$,l=r-$,y=e+$,v=n+$,x=r+$,o=w.data}}return o}const cO=(e,n,r,a,o,i)=>Math.sqrt((e-a)**2+(n-o)**2+(r-i)**2);function uO(e,n,r,a){const o=[],i=e-a,s=n-a,l=r-a,c=e+a,u=n+a,h=r+a;return this.visit((f,m,g,y,v,x,b)=>{if(!f.length)do{const w=f.data;cO(e,n,r,this._x(w),this._y(w),this._z(w))<=a&&o.push(w)}while(f=f.next);return m>c||g>u||y>h||v<i||x<s||b<l}),o}function dO(e){if(isNaN(m=+this._x.call(null,e))||isNaN(g=+this._y.call(null,e))||isNaN(y=+this._z.call(null,e)))return this;var n,r=this._root,a,o,i,s=this._x0,l=this._y0,c=this._z0,u=this._x1,h=this._y1,f=this._z1,m,g,y,v,x,b,w,E,C,S,M;if(!r)return this;if(r.length)for(;;){if((w=m>=(v=(s+u)/2))?s=v:u=v,(E=g>=(x=(l+h)/2))?l=x:h=x,(C=y>=(b=(c+f)/2))?c=b:f=b,n=r,!(r=r[S=C<<2|E<<1|w]))return this;if(!r.length)break;(n[S+1&7]||n[S+2&7]||n[S+3&7]||n[S+4&7]||n[S+5&7]||n[S+6&7]||n[S+7&7])&&(a=n,M=S)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(i=r.next)&&delete r.next,o?(i?o.next=i:delete o.next,this):n?(i?n[S]=i:delete n[S],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(a?a[M]=r:this._root=r),this):(this._root=i,this)}function fO(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function hO(){return this._root}function pO(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function mO(e){var n=[],r,a=this._root,o,i,s,l,c,u,h;for(a&&n.push(new Oe(a,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(a=r.node,i=r.x0,s=r.y0,l=r.z0,c=r.x1,u=r.y1,h=r.z1)&&a.length){var f=(i+c)/2,m=(s+u)/2,g=(l+h)/2;(o=a[7])&&n.push(new Oe(o,f,m,g,c,u,h)),(o=a[6])&&n.push(new Oe(o,i,m,g,f,u,h)),(o=a[5])&&n.push(new Oe(o,f,s,g,c,m,h)),(o=a[4])&&n.push(new Oe(o,i,s,g,f,m,h)),(o=a[3])&&n.push(new Oe(o,f,m,l,c,u,g)),(o=a[2])&&n.push(new Oe(o,i,m,l,f,u,g)),(o=a[1])&&n.push(new Oe(o,f,s,l,c,m,g)),(o=a[0])&&n.push(new Oe(o,i,s,l,f,m,g))}return this}function gO(e){var n=[],r=[],a;for(this._root&&n.push(new Oe(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));a=n.pop();){var o=a.node;if(o.length){var i,s=a.x0,l=a.y0,c=a.z0,u=a.x1,h=a.y1,f=a.z1,m=(s+u)/2,g=(l+h)/2,y=(c+f)/2;(i=o[0])&&n.push(new Oe(i,s,l,c,m,g,y)),(i=o[1])&&n.push(new Oe(i,m,l,c,u,g,y)),(i=o[2])&&n.push(new Oe(i,s,g,c,m,h,y)),(i=o[3])&&n.push(new Oe(i,m,g,c,u,h,y)),(i=o[4])&&n.push(new Oe(i,s,l,y,m,g,f)),(i=o[5])&&n.push(new Oe(i,m,l,y,u,g,f)),(i=o[6])&&n.push(new Oe(i,s,g,y,m,h,f)),(i=o[7])&&n.push(new Oe(i,m,g,y,u,h,f))}r.push(a)}for(;a=r.pop();)e(a.node,a.x0,a.y0,a.z0,a.x1,a.y1,a.z1);return this}function yO(e){return e[0]}function vO(e){return arguments.length?(this._x=e,this):this._x}function xO(e){return e[1]}function bO(e){return arguments.length?(this._y=e,this):this._y}function wO(e){return e[2]}function _O(e){return arguments.length?(this._z=e,this):this._z}function Ry(e,n,r,a){var o=new od(n??yO,r??xO,a??wO,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function od(e,n,r,a,o,i,s,l,c){this._x=e,this._y=n,this._z=r,this._x0=a,this._y0=o,this._z0=i,this._x1=s,this._y1=l,this._z1=c,this._root=void 0}function eh(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var Je=Ry.prototype=od.prototype;Je.copy=function(){var e=new od(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),n=this._root,r,a;if(!n)return e;if(!n.length)return e._root=eh(n),e;for(r=[{source:n,target:e._root=new Array(8)}];n=r.pop();)for(var o=0;o<8;++o)(a=n.source[o])&&(a.length?r.push({source:a,target:n.target[o]=new Array(8)}):n.target[o]=eh(a));return e};Je.add=rO;Je.addAll=aO;Je.cover=oO;Je.data=iO;Je.extent=sO;Je.find=lO;Je.findAllWithinRadius=uO;Je.remove=dO;Je.removeAll=fO;Je.root=hO;Je.size=pO;Je.visit=mO;Je.visitAfter=gO;Je.x=vO;Je.y=bO;Je.z=_O;function Dn(e){return function(){return e}}function Nn(e){return(e()-.5)*1e-6}function EO(e){return e.index}function th(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function CO(e){var n=EO,r=m,a,o=Dn(30),i,s,l,c,u,h,f=1;e==null&&(e=[]);function m(b){return 1/Math.min(c[b.source.index],c[b.target.index])}function g(b){for(var w=0,E=e.length;w<f;++w)for(var C=0,S,M,R,_=0,O=0,P=0,j,$;C<E;++C)S=e[C],M=S.source,R=S.target,_=R.x+R.vx-M.x-M.vx||Nn(h),l>1&&(O=R.y+R.vy-M.y-M.vy||Nn(h)),l>2&&(P=R.z+R.vz-M.z-M.vz||Nn(h)),j=Math.sqrt(_*_+O*O+P*P),j=(j-i[C])/j*b*a[C],_*=j,O*=j,P*=j,R.vx-=_*($=u[C]),l>1&&(R.vy-=O*$),l>2&&(R.vz-=P*$),M.vx+=_*($=1-$),l>1&&(M.vy+=O*$),l>2&&(M.vz+=P*$)}function y(){if(s){var b,w=s.length,E=e.length,C=new Map(s.map((M,R)=>[n(M,R,s),M])),S;for(b=0,c=new Array(w);b<E;++b)S=e[b],S.index=b,typeof S.source!="object"&&(S.source=th(C,S.source)),typeof S.target!="object"&&(S.target=th(C,S.target)),c[S.source.index]=(c[S.source.index]||0)+1,c[S.target.index]=(c[S.target.index]||0)+1;for(b=0,u=new Array(E);b<E;++b)S=e[b],u[b]=c[S.source.index]/(c[S.source.index]+c[S.target.index]);a=new Array(E),v(),i=new Array(E),x()}}function v(){if(s)for(var b=0,w=e.length;b<w;++b)a[b]=+r(e[b],b,e)}function x(){if(s)for(var b=0,w=e.length;b<w;++b)i[b]=+o(e[b],b,e)}return g.initialize=function(b,...w){s=b,h=w.find(E=>typeof E=="function")||Math.random,l=w.find(E=>[1,2,3].includes(E))||2,y()},g.links=function(b){return arguments.length?(e=b,y(),g):e},g.id=function(b){return arguments.length?(n=b,g):n},g.iterations=function(b){return arguments.length?(f=+b,g):f},g.strength=function(b){return arguments.length?(r=typeof b=="function"?b:Dn(+b),v(),g):r},g.distance=function(b){return arguments.length?(o=typeof b=="function"?b:Dn(+b),x(),g):o},g}const SO=1664525,AO=1013904223,nh=4294967296;function RO(){let e=1;return()=>(e=(SO*e+AO)%nh)/nh}var rh=3;function bl(e){return e.x}function ah(e){return e.y}function MO(e){return e.z}var TO=10,PO=Math.PI*(3-Math.sqrt(5)),NO=Math.PI*20/(9+Math.sqrt(221));function OO(e,n){n=n||2;var r=Math.min(rh,Math.max(1,Math.round(n))),a,o=1,i=.001,s=1-Math.pow(i,1/300),l=0,c=.6,u=new Map,h=Gu(g),f=$o("tick","end"),m=RO();e==null&&(e=[]);function g(){y(),f.call("tick",a),o<i&&(h.stop(),f.call("end",a))}function y(b){var w,E=e.length,C;b===void 0&&(b=1);for(var S=0;S<b;++S)for(o+=(l-o)*s,u.forEach(function(M){M(o)}),w=0;w<E;++w)C=e[w],C.fx==null?C.x+=C.vx*=c:(C.x=C.fx,C.vx=0),r>1&&(C.fy==null?C.y+=C.vy*=c:(C.y=C.fy,C.vy=0)),r>2&&(C.fz==null?C.z+=C.vz*=c:(C.z=C.fz,C.vz=0));return a}function v(){for(var b=0,w=e.length,E;b<w;++b){if(E=e[b],E.index=b,E.fx!=null&&(E.x=E.fx),E.fy!=null&&(E.y=E.fy),E.fz!=null&&(E.z=E.fz),isNaN(E.x)||r>1&&isNaN(E.y)||r>2&&isNaN(E.z)){var C=TO*(r>2?Math.cbrt(.5+b):r>1?Math.sqrt(.5+b):b),S=b*PO,M=b*NO;r===1?E.x=C:r===2?(E.x=C*Math.cos(S),E.y=C*Math.sin(S)):(E.x=C*Math.sin(S)*Math.cos(M),E.y=C*Math.cos(S),E.z=C*Math.sin(S)*Math.sin(M))}(isNaN(E.vx)||r>1&&isNaN(E.vy)||r>2&&isNaN(E.vz))&&(E.vx=0,r>1&&(E.vy=0),r>2&&(E.vz=0))}}function x(b){return b.initialize&&b.initialize(e,m,r),b}return v(),a={tick:y,restart:function(){return h.restart(g),a},stop:function(){return h.stop(),a},numDimensions:function(b){return arguments.length?(r=Math.min(rh,Math.max(1,Math.round(b))),u.forEach(x),a):r},nodes:function(b){return arguments.length?(e=b,v(),u.forEach(x),a):e},alpha:function(b){return arguments.length?(o=+b,a):o},alphaMin:function(b){return arguments.length?(i=+b,a):i},alphaDecay:function(b){return arguments.length?(s=+b,a):+s},alphaTarget:function(b){return arguments.length?(l=+b,a):l},velocityDecay:function(b){return arguments.length?(c=1-b,a):1-c},randomSource:function(b){return arguments.length?(m=b,u.forEach(x),a):m},force:function(b,w){return arguments.length>1?(w==null?u.delete(b):u.set(b,x(w)),a):u.get(b)},find:function(){var b=Array.prototype.slice.call(arguments),w=b.shift()||0,E=(r>1?b.shift():null)||0,C=(r>2?b.shift():null)||0,S=b.shift()||1/0,M=0,R=e.length,_,O,P,j,$,V;for(S*=S,M=0;M<R;++M)$=e[M],_=w-$.x,O=E-($.y||0),P=C-($.z||0),j=_*_+O*O+P*P,j<S&&(V=$,S=j);return V},on:function(b,w){return arguments.length>1?(f.on(b,w),a):f.on(b)}}}function jO(){var e,n,r,a,o,i=Dn(-30),s,l=1,c=1/0,u=.81;function h(y){var v,x=e.length,b=(n===1?Ey(e,bl):n===2?Sy(e,bl,ah):n===3?Ry(e,bl,ah,MO):null).visitAfter(m);for(o=y,v=0;v<x;++v)r=e[v],b.visit(g)}function f(){if(e){var y,v=e.length,x;for(s=new Array(v),y=0;y<v;++y)x=e[y],s[x.index]=+i(x,y,e)}}function m(y){var v=0,x,b,w=0,E,C,S,M,R=y.length;if(R){for(E=C=S=M=0;M<R;++M)(x=y[M])&&(b=Math.abs(x.value))&&(v+=x.value,w+=b,E+=b*(x.x||0),C+=b*(x.y||0),S+=b*(x.z||0));v*=Math.sqrt(4/R),y.x=E/w,n>1&&(y.y=C/w),n>2&&(y.z=S/w)}else{x=y,x.x=x.data.x,n>1&&(x.y=x.data.y),n>2&&(x.z=x.data.z);do v+=s[x.data.index];while(x=x.next)}y.value=v}function g(y,v,x,b,w){if(!y.value)return!0;var E=[x,b,w][n-1],C=y.x-r.x,S=n>1?y.y-r.y:0,M=n>2?y.z-r.z:0,R=E-v,_=C*C+S*S+M*M;if(R*R/u<_)return _<c&&(C===0&&(C=Nn(a),_+=C*C),n>1&&S===0&&(S=Nn(a),_+=S*S),n>2&&M===0&&(M=Nn(a),_+=M*M),_<l&&(_=Math.sqrt(l*_)),r.vx+=C*y.value*o/_,n>1&&(r.vy+=S*y.value*o/_),n>2&&(r.vz+=M*y.value*o/_)),!0;if(y.length||_>=c)return;(y.data!==r||y.next)&&(C===0&&(C=Nn(a),_+=C*C),n>1&&S===0&&(S=Nn(a),_+=S*S),n>2&&M===0&&(M=Nn(a),_+=M*M),_<l&&(_=Math.sqrt(l*_)));do y.data!==r&&(R=s[y.data.index]*o/_,r.vx+=C*R,n>1&&(r.vy+=S*R),n>2&&(r.vz+=M*R));while(y=y.next)}return h.initialize=function(y,...v){e=y,a=v.find(x=>typeof x=="function")||Math.random,n=v.find(x=>[1,2,3].includes(x))||2,f()},h.strength=function(y){return arguments.length?(i=typeof y=="function"?y:Dn(+y),f(),h):i},h.distanceMin=function(y){return arguments.length?(l=y*y,h):Math.sqrt(l)},h.distanceMax=function(y){return arguments.length?(c=y*y,h):Math.sqrt(c)},h.theta=function(y){return arguments.length?(u=y*y,h):Math.sqrt(u)},h}function DO(e,n,r,a){var o,i,s=Dn(.1),l,c;typeof e!="function"&&(e=Dn(+e)),n==null&&(n=0),r==null&&(r=0),a==null&&(a=0);function u(f){for(var m=0,g=o.length;m<g;++m){var y=o[m],v=y.x-n||1e-6,x=(y.y||0)-r||1e-6,b=(y.z||0)-a||1e-6,w=Math.sqrt(v*v+x*x+b*b),E=(c[m]-w)*l[m]*f/w;y.vx+=v*E,i>1&&(y.vy+=x*E),i>2&&(y.vz+=b*E)}}function h(){if(o){var f,m=o.length;for(l=new Array(m),c=new Array(m),f=0;f<m;++f)c[f]=+e(o[f],f,o),l[f]=isNaN(c[f])?0:+s(o[f],f,o)}}return u.initialize=function(f,...m){o=f,i=m.find(g=>[1,2,3].includes(g))||2,h()},u.strength=function(f){return arguments.length?(s=typeof f=="function"?f:Dn(+f),h(),u):s},u.radius=function(f){return arguments.length?(e=typeof f=="function"?f:Dn(+f),h(),u):e},u.x=function(f){return arguments.length?(n=+f,u):n},u.y=function(f){return arguments.length?(r=+f,u):r},u.z=function(f){return arguments.length?(a=+f,u):a},u}const{abs:Ra,cos:Mn,sin:$r,acos:kO,atan2:Ma,sqrt:Vn,pow:kt}=Math;function Ta(e){return e<0?-kt(-e,1/3):kt(e,1/3)}const My=Math.PI,hi=2*My,Zn=My/2,IO=1e-6,wl=Number.MAX_SAFE_INTEGER||9007199254740991,_l=Number.MIN_SAFE_INTEGER||-9007199254740991,LO={x:0,y:0,z:0},Y={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,n){const r=n(e);let a=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(a+=r.z*r.z),Vn(a)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];const a=n.length-1;if(e===1)return n[a].t=1,n[a];const o=1-e;let i=n;if(a===0)return n[0].t=e,n[0];if(a===1){const l={x:o*i[0].x+e*i[1].x,y:o*i[0].y+e*i[1].y,t:e};return r&&(l.z=o*i[0].z+e*i[1].z),l}if(a<4){let l=o*o,c=e*e,u,h,f,m=0;a===2?(i=[i[0],i[1],i[2],LO],u=l,h=o*e*2,f=c):a===3&&(u=l*o,h=l*e*3,f=o*c*3,m=e*c);const g={x:u*i[0].x+h*i[1].x+f*i[2].x+m*i[3].x,y:u*i[0].y+h*i[1].y+f*i[2].y+m*i[3].y,t:e};return r&&(g.z=u*i[0].z+h*i[1].z+f*i[2].z+m*i[3].z),g}const s=JSON.parse(JSON.stringify(n));for(;s.length>1;){for(let l=0;l<s.length-1;l++)s[l]={x:s[l].x+(s[l+1].x-s[l].x)*e,y:s[l].y+(s[l+1].y-s[l].y)*e},typeof s[l].z<"u"&&(s[l].z=s[l].z+(s[l+1].z-s[l].z)*e);s.splice(s.length-1,1)}return s[0].t=e,s[0]},computeWithRatios:function(e,n,r,a){const o=1-e,i=r,s=n;let l=i[0],c=i[1],u=i[2],h=i[3],f;if(l*=o,c*=e,s.length===2)return f=l+c,{x:(l*s[0].x+c*s[1].x)/f,y:(l*s[0].y+c*s[1].y)/f,z:a?(l*s[0].z+c*s[1].z)/f:!1,t:e};if(l*=o,c*=2*o,u*=e*e,s.length===3)return f=l+c+u,{x:(l*s[0].x+c*s[1].x+u*s[2].x)/f,y:(l*s[0].y+c*s[1].y+u*s[2].y)/f,z:a?(l*s[0].z+c*s[1].z+u*s[2].z)/f:!1,t:e};if(l*=o,c*=1.5*o,u*=3*o,h*=e*e*e,s.length===4)return f=l+c+u+h,{x:(l*s[0].x+c*s[1].x+u*s[2].x+h*s[3].x)/f,y:(l*s[0].y+c*s[1].y+u*s[2].y+h*s[3].y)/f,z:a?(l*s[0].z+c*s[1].z+u*s[2].z+h*s[3].z)/f:!1,t:e}},derive:function(e,n){const r=[];for(let a=e,o=a.length,i=o-1;o>1;o--,i--){const s=[];for(let l=0,c;l<i;l++)c={x:i*(a[l+1].x-a[l].x),y:i*(a[l+1].y-a[l].y)},n&&(c.z=i*(a[l+1].z-a[l].z)),s.push(c);r.push(s),a=s}return r},between:function(e,n,r){return n<=e&&e<=r||Y.approximately(e,n)||Y.approximately(e,r)},approximately:function(e,n,r){return Ra(e-n)<=(r||IO)},length:function(e){const r=Y.Tvalues.length;let a=0;for(let o=0,i;o<r;o++)i=.5*Y.Tvalues[o]+.5,a+=Y.Cvalues[o]*Y.arcfn(i,e);return .5*a},map:function(e,n,r,a,o){const i=r-n,s=o-a,l=e-n,c=l/i;return a+s*c},lerp:function(e,n,r){const a={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(a.z=n.z+e*(r.z-n.z)),a},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(Y.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){const a=n.x-e.x,o=n.y-e.y,i=r.x-e.x,s=r.y-e.y,l=a*s-o*i,c=a*i+o*s;return Ma(l,c)},round:function(e,n){const r=""+e,a=r.indexOf(".");return parseFloat(r.substring(0,a+1+n))},dist:function(e,n){const r=e.x-n.x,a=e.y-n.y;return Vn(r*r+a*a)},closest:function(e,n){let r=kt(2,63),a,o;return e.forEach(function(i,s){o=Y.dist(n,i),o<r&&(r=o,a=s)}),{mdist:r,mpos:a}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=kt(e,n)+kt(1-e,n),a=r-1;return Ra(a/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=kt(1-e,n),a=kt(e,n)+r;return r/a},lli8:function(e,n,r,a,o,i,s,l){const c=(e*a-n*r)*(o-s)-(e-r)*(o*l-i*s),u=(e*a-n*r)*(i-l)-(n-a)*(o*l-i*s),h=(e-r)*(i-l)-(n-a)*(o-s);return h==0?!1:{x:c/h,y:u/h}},lli4:function(e,n,r,a){const o=e.x,i=e.y,s=n.x,l=n.y,c=r.x,u=r.y,h=a.x,f=a.y;return Y.lli8(o,i,s,l,c,u,h,f)},lli:function(e,n){return Y.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new ke(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=wl,r=wl,a=_l,o=_l;return e.forEach(function(i){const s=i.bbox();n>s.x.min&&(n=s.x.min),r>s.y.min&&(r=s.y.min),a<s.x.max&&(a=s.x.max),o<s.y.max&&(o=s.y.max)}),{x:{min:n,mid:(n+a)/2,max:a,size:a-n},y:{min:r,mid:(r+o)/2,max:o,size:o-r}}},shapeintersections:function(e,n,r,a,o){if(!Y.bboxoverlap(n,a))return[];const i=[],s=[e.startcap,e.forward,e.back,e.endcap],l=[r.startcap,r.forward,r.back,r.endcap];return s.forEach(function(c){c.virtual||l.forEach(function(u){if(u.virtual)return;const h=c.intersects(u,o);h.length>0&&(h.c1=c,h.c2=u,h.s1=e,h.s2=r,i.push(h))})}),i},makeshape:function(e,n,r){const a=n.points.length,o=e.points.length,i=Y.makeline(n.points[a-1],e.points[0]),s=Y.makeline(e.points[o-1],n.points[0]),l={startcap:i,forward:e,back:n,endcap:s,bbox:Y.findbbox([i,e,n,s])};return l.intersections=function(c){return Y.shapeintersections(l,l.bbox,c,c.bbox,r)},l},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let a=wl,o=_l,i,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let l=0,c=r.length;l<c;l++)i=r[l],s=e.get(i),s[n]<a&&(a=s[n]),s[n]>o&&(o=s[n]);return{min:a,mid:(a+o)/2,max:o,size:o-a}},align:function(e,n){const r=n.p1.x,a=n.p1.y,o=-Ma(n.p2.y-a,n.p2.x-r),i=function(s){return{x:(s.x-r)*Mn(o)-(s.y-a)*$r(o),y:(s.x-r)*$r(o)+(s.y-a)*Mn(o)}};return e.map(i)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,a=Y.align(e,n),o=function(R){return 0<=R&&R<=1};if(r===2){const R=a[0].y,_=a[1].y,O=a[2].y,P=R-2*_+O;if(P!==0){const j=-Vn(_*_-R*O),$=-R+_,V=-(j+$)/P,A=-(-j+$)/P;return[V,A].filter(o)}else if(_!==O&&P===0)return[(2*_-O)/(2*_-2*O)].filter(o);return[]}const i=a[0].y,s=a[1].y,l=a[2].y,c=a[3].y;let u=-i+3*s-3*l+c,h=3*i-6*s+3*l,f=-3*i+3*s,m=i;if(Y.approximately(u,0)){if(Y.approximately(h,0))return Y.approximately(f,0)?[]:[-m/f].filter(o);const R=Vn(f*f-4*h*m),_=2*h;return[(R-f)/_,(-f-R)/_].filter(o)}h/=u,f/=u,m/=u;const g=(3*f-h*h)/3,y=g/3,v=(2*h*h*h-9*h*f+27*m)/27,x=v/2,b=x*x+y*y*y;let w,E,C,S,M;if(b<0){const R=-g/3,_=R*R*R,O=Vn(_),P=-v/(2*O),j=P<-1?-1:P>1?1:P,$=kO(j),V=Ta(O),A=2*V;return C=A*Mn($/3)-h/3,S=A*Mn(($+hi)/3)-h/3,M=A*Mn(($+2*hi)/3)-h/3,[C,S,M].filter(o)}else{if(b===0)return w=x<0?Ta(-x):-Ta(x),C=2*w-h/3,S=-w-h/3,[C,S].filter(o);{const R=Vn(b);return w=Ta(-x+R),E=Ta(x+R),[w-E-h/3].filter(o)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],a=e[2],o=n-2*r+a;if(o!==0){const i=-Vn(r*r-n*a),s=-n+r,l=-(i+s)/o,c=-(-i+s)/o;return[l,c]}else if(r!==a&&o===0)return[(2*r-a)/(2*(r-a))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,a,o){let i,s,l,c,u=0,h=0;const f=Y.compute(e,n),m=Y.compute(e,r),g=f.x*f.x+f.y*f.y;if(a?(i=Vn(kt(f.y*m.z-m.y*f.z,2)+kt(f.z*m.x-m.z*f.x,2)+kt(f.x*m.y-m.x*f.y,2)),s=kt(g+f.z*f.z,3/2)):(i=f.x*m.y-f.y*m.x,s=kt(g,3/2)),i===0||s===0)return{k:0,r:0};if(u=i/s,h=s/i,!o){const y=Y.curvature(e-.001,n,r,a,!0).k,v=Y.curvature(e+.001,n,r,a,!0).k;c=(v-u+(u-y))/2,l=(Ra(v-u)+Ra(u-y))/2}return{k:u,r:h,dk:c,adk:l}},inflections:function(e){if(e.length<4)return[];const n=Y.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,a=n[3].x*n[1].y,o=n[1].x*n[2].y,i=n[3].x*n[2].y,s=18*(-3*r+2*a+3*o-i),l=18*(3*r-a-3*o),c=18*(o-r);if(Y.approximately(s,0)){if(!Y.approximately(l,0)){let m=-c/l;if(0<=m&&m<=1)return[m]}return[]}const u=2*s;if(Y.approximately(u,0))return[];const h=l*l-4*s*c;if(h<0)return[];const f=Math.sqrt(h);return[(f-l)/u,-(l+f)/u].filter(function(m){return 0<=m&&m<=1})},bboxoverlap:function(e,n){const r=["x","y"],a=r.length;for(let o=0,i,s,l,c;o<a;o++)if(i=r[o],s=e[i].mid,l=n[i].mid,c=(e[i].size+n[i].size)/2,Ra(s-l)>=c)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){const a=e.bbox(),o=n.bbox(),i=1e5,s=r||.5;if(a.x.size+a.y.size<s&&o.x.size+o.y.size<s)return[(i*(e._t1+e._t2)/2|0)/i+"/"+(i*(n._t1+n._t2)/2|0)/i];let l=e.split(.5),c=n.split(.5),u=[{left:l.left,right:c.left},{left:l.left,right:c.right},{left:l.right,right:c.right},{left:l.right,right:c.left}];u=u.filter(function(f){return Y.bboxoverlap(f.left.bbox(),f.right.bbox())});let h=[];return u.length===0||(u.forEach(function(f){h=h.concat(Y.pairiteration(f.left,f.right,s))}),h=h.filter(function(f,m){return h.indexOf(f)===m})),h},getccenter:function(e,n,r){const a=n.x-e.x,o=n.y-e.y,i=r.x-n.x,s=r.y-n.y,l=a*Mn(Zn)-o*$r(Zn),c=a*$r(Zn)+o*Mn(Zn),u=i*Mn(Zn)-s*$r(Zn),h=i*$r(Zn)+s*Mn(Zn),f=(e.x+n.x)/2,m=(e.y+n.y)/2,g=(n.x+r.x)/2,y=(n.y+r.y)/2,v=f+l,x=m+c,b=g+u,w=y+h,E=Y.lli8(f,m,v,x,g,y,b,w),C=Y.dist(E,e);let S=Ma(e.y-E.y,e.x-E.x),M=Ma(n.y-E.y,n.x-E.x),R=Ma(r.y-E.y,r.x-E.x),_;return S<R?((S>M||M>R)&&(S+=hi),S>R&&(_=R,R=S,S=_)):R<M&&M<S?(_=R,R=S,S=_):R+=hi,E.s=S,E.e=R,E.r=C,E},numberSort:function(e,n){return e-n}};class Ga{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return Y.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,r){return n+r})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var r=n[0].bbox(),a=1;a<n.length;a++)Y.expandbox(r,n[a].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(a){r.push(...a.offset(n))}),new Ga(r)}}const{abs:Pa,min:oh,max:ih,cos:FO,sin:$O,acos:HO,sqrt:Na}=Math,zO=Math.PI;class ke{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),a=!1;if(typeof r[0]=="object"){a=r.length;const g=[];r.forEach(function(y){["x","y","z"].forEach(function(v){typeof y[v]<"u"&&g.push(y[v])})}),r=g}let o=!1;const i=r.length;if(a){if(a>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(i!==6&&i!==8&&i!==9&&i!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!o&&(i===9||i===12)||n&&n[0]&&typeof n[0].z<"u",l=this.points=[];for(let g=0,y=s?3:2;g<i;g+=y){var c={x:r[g],y:r[g+1]};s&&(c.z=r[g+2]),l.push(c)}const u=this.order=l.length-1,h=this.dims=["x","y"];s&&h.push("z"),this.dimlen=h.length;const f=Y.align(l,{p1:l[0],p2:l[u]}),m=Y.dist(l[0],l[u]);this._linear=f.reduce((g,y)=>g+Pa(y.y),0)<m/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,a,o){if(typeof o>"u"&&(o=.5),o===0)return new ke(r,r,a);if(o===1)return new ke(n,r,r);const i=ke.getABC(2,n,r,a,o);return new ke(n,i.A,a)}static cubicFromPoints(n,r,a,o,i){typeof o>"u"&&(o=.5);const s=ke.getABC(3,n,r,a,o);typeof i>"u"&&(i=Y.dist(r,s.C));const l=i*(1-o)/o,c=Y.dist(n,a),u=(a.x-n.x)/c,h=(a.y-n.y)/c,f=i*u,m=i*h,g=l*u,y=l*h,v={x:r.x-f,y:r.y-m},x={x:r.x+g,y:r.y+y},b=s.A,w={x:b.x+(v.x-b.x)/(1-o),y:b.y+(v.y-b.y)/(1-o)},E={x:b.x+(x.x-b.x)/o,y:b.y+(x.y-b.y)/o},C={x:n.x+(w.x-n.x)/o,y:n.y+(w.y-n.y)/o},S={x:a.x+(E.x-a.x)/(1-o),y:a.y+(E.y-a.y)/(1-o)};return new ke(n,C,S,a)}static getUtils(){return Y}getUtils(){return ke.getUtils()}static get PolyBezier(){return Ga}valueOf(){return this.toString()}toString(){return Y.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,r=n[0].x,a=n[0].y,o=["M",r,a,this.order===2?"Q":"C"];for(let i=1,s=n.length;i<s;i++)o.push(n[i].x),o.push(n[i].y);return o.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,r){return""+r+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=Y.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=Y.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return Y.length(this.derivative.bind(this))}static getABC(n=2,r,a,o,i=.5){const s=Y.projectionratio(i,n),l=1-s,c={x:s*r.x+l*o.x,y:s*r.y+l*o.y},u=Y.abcratio(i,n);return{A:{x:a.x+(a.x-c.x)/u,y:a.y+(a.y-c.y)/u},B:a,C:c,S:r,E:o}}getABC(n,r){r=r||this.get(n);let a=this.points[0],o=this.points[this.order];return ke.getABC(this.order,a,r,o,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let r=0,a,o;r<n;r++)o=r/(n-1),a=this.compute(o),a.t=o,this._lut.push(a);return this._lut}on(n,r){r=r||5;const a=this.getLUT(),o=[];for(let i=0,s,l=0;i<a.length;i++)s=a[i],Y.dist(s,n)<r&&(o.push(s),l+=i/a.length);return o.length?t/=o.length:!1}project(n){const r=this.getLUT(),a=r.length-1,o=Y.closest(r,n),i=o.mpos,s=(i-1)/a,l=(i+1)/a,c=.1/a;let u=o.mdist,h=s,f=h,m;u+=1;for(let g;h<l+c;h+=c)m=this.compute(h),g=Y.dist(n,m),g<u&&(u=g,f=h);return f=f<0?0:f>1?1:f,m=this.compute(f),m.t=f,m.d=u,m}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?Y.computeWithRatios(n,this.points,this.ratios,this._3d):Y.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],a=n.length;for(let o=1,i,s;o<a;o++)i=n[o],s=n[o-1],r[o]={x:(a-o)/a*i.x+o/a*s.x,y:(a-o)/a*i.y+o/a*s.y};return r[a]=n[a-1],new ke(r)}derivative(n){return Y.compute(n,this.dpoints[0],this._3d)}dderivative(n){return Y.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new ke(Y.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return Y.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Y.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),a=Na(r.x*r.x+r.y*r.y);return{t:n,x:-r.y/a,y:r.x/a}}__normal3(n){const r=this.derivative(n),a=this.derivative(n+.01),o=Na(r.x*r.x+r.y*r.y+r.z*r.z),i=Na(a.x*a.x+a.y*a.y+a.z*a.z);r.x/=o,r.y/=o,r.z/=o,a.x/=i,a.y/=i,a.z/=i;const s={x:a.y*r.z-a.z*r.y,y:a.z*r.x-a.x*r.z,z:a.x*r.y-a.y*r.x},l=Na(s.x*s.x+s.y*s.y+s.z*s.z);s.x/=l,s.y/=l,s.z/=l;const c=[s.x*s.x,s.x*s.y-s.z,s.x*s.z+s.y,s.x*s.y+s.z,s.y*s.y,s.y*s.z-s.x,s.x*s.z-s.y,s.y*s.z+s.x,s.z*s.z];return{t:n,x:c[0]*r.x+c[1]*r.y+c[2]*r.z,y:c[3]*r.x+c[4]*r.y+c[5]*r.z,z:c[6]*r.x+c[7]*r.y+c[8]*r.z}}hull(n){let r=this.points,a=[],o=[],i=0;for(o[i++]=r[0],o[i++]=r[1],o[i++]=r[2],this.order===3&&(o[i++]=r[3]);r.length>1;){a=[];for(let s=0,l,c=r.length-1;s<c;s++)l=Y.lerp(n,r[s],r[s+1]),o[i++]=l,a.push(l);r=a}return o}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;const a=this.hull(n),o={left:this.order===2?new ke([a[0],a[3],a[5]]):new ke([a[0],a[4],a[7],a[9]]),right:this.order===2?new ke([a[5],a[4],a[2]]):new ke([a[9],a[8],a[6],a[3]]),span:a};return o.left._t1=Y.map(0,0,1,this._t1,this._t2),o.left._t2=Y.map(n,0,1,this._t1,this._t2),o.right._t1=Y.map(n,0,1,this._t1,this._t2),o.right._t2=Y.map(1,0,1,this._t1,this._t2),r?(r=Y.map(r,n,1,0,1),o.right.split(r).left):o}extrema(){const n={};let r=[];return this.dims.forEach((function(a){let o=function(s){return s[a]},i=this.dpoints[0].map(o);n[a]=Y.droots(i),this.order===3&&(i=this.dpoints[1].map(o),n[a]=n[a].concat(Y.droots(i))),n[a]=n[a].filter(function(s){return s>=0&&s<=1}),r=r.concat(n[a].sort(Y.numberSort))}).bind(this)),n.values=r.sort(Y.numberSort).filter(function(a,o){return r.indexOf(a)===o}),n}bbox(){const n=this.extrema(),r={};return this.dims.forEach((function(a){r[a]=Y.getminmax(this,a,n[a])}).bind(this)),r}overlaps(n){const r=this.bbox(),a=n.bbox();return Y.bboxoverlap(r,a)}offset(n,r){if(typeof r<"u"){const a=this.get(n),o=this.normal(n),i={c:a,n:o,x:a.x+o.x*r,y:a.y+o.y*r};return this._3d&&(i.z=a.z+o.z*r),i}if(this._linear){const a=this.normal(0),o=this.points.map(function(i){const s={x:i.x+n*a.x,y:i.y+n*a.y};return i.z&&a.z&&(s.z=i.z+n*a.z),s});return[new ke(o)]}return this.reduce().map(function(a){return a._linear?a.offset(n)[0]:a.scale(n)})}simple(){if(this.order===3){const o=Y.angle(this.points[0],this.points[3],this.points[1]),i=Y.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&i<0||o<0&&i>0)return!1}const n=this.normal(0),r=this.normal(1);let a=n.x*r.x+n.y*r.y;return this._3d&&(a+=n.z*r.z),Pa(HO(a))<zO/3}reduce(){let n,r=0,a=0,o=.01,i,s=[],l=[],c=this.extrema().values;for(c.indexOf(0)===-1&&(c=[0].concat(c)),c.indexOf(1)===-1&&c.push(1),r=c[0],n=1;n<c.length;n++)a=c[n],i=this.split(r,a),i._t1=r,i._t2=a,s.push(i),r=a;return s.forEach(function(u){for(r=0,a=0;a<=1;)for(a=r+o;a<=1+o;a+=o)if(i=u.split(r,a),!i.simple()){if(a-=o,Pa(r-a)<o)return[];i=u.split(r,a),i._t1=Y.map(r,0,1,u._t1,u._t2),i._t2=Y.map(a,0,1,u._t1,u._t2),l.push(i),r=a;break}r<1&&(i=u.split(r,1),i._t1=Y.map(r,0,1,u._t1,u._t2),i._t2=u._t2,l.push(i))}),l}translate(n,r,a){a=typeof a=="number"?a:r;const o=this.order;let i=this.points.map((s,l)=>(1-l/o)*r+l/o*a);return new ke(this.points.map((s,l)=>({x:s.x+n.x*i[l],y:s.y+n.y*i[l]})))}scale(n){const r=this.order;let a=!1;if(typeof n=="function"&&(a=n),a&&r===2)return this.raise().scale(a);const o=this.clockwise,i=this.points;if(this._linear)return this.translate(this.normal(0),a?a(0):n,a?a(1):n);const s=a?a(0):n,l=a?a(1):n,c=[this.offset(0,10),this.offset(1,10)],u=[],h=Y.lli4(c[0],c[0].c,c[1],c[1].c);if(!h)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(f){const m=u[f*r]=Y.copy(i[f*r]);m.x+=(f?l:s)*c[f].n.x,m.y+=(f?l:s)*c[f].n.y}),a?([0,1].forEach(function(f){if(!(r===2&&f)){var m=i[f+1],g={x:m.x-h.x,y:m.y-h.y},y=a?a((f+1)/r):n;a&&!o&&(y=-y);var v=Na(g.x*g.x+g.y*g.y);g.x/=v,g.y/=v,u[f+1]={x:m.x+y*g.x,y:m.y+y*g.y}}}),new ke(u)):([0,1].forEach(f=>{if(r===2&&f)return;const m=u[f*r],g=this.derivative(f),y={x:m.x+g.x,y:m.y+g.y};u[f+1]=Y.lli4(m,y,h,i[f+1])}),new ke(u))}outline(n,r,a,o){if(r=r===void 0?n:r,this._linear){const S=this.normal(0),M=this.points[0],R=this.points[this.points.length-1];let _,O,P;a===void 0&&(a=n,o=r),_={x:M.x+S.x*n,y:M.y+S.y*n},P={x:R.x+S.x*a,y:R.y+S.y*a},O={x:(_.x+P.x)/2,y:(_.y+P.y)/2};const j=[_,O,P];_={x:M.x-S.x*r,y:M.y-S.y*r},P={x:R.x-S.x*o,y:R.y-S.y*o},O={x:(_.x+P.x)/2,y:(_.y+P.y)/2};const $=[P,O,_],V=Y.makeline($[2],j[0]),A=Y.makeline(j[2],$[0]),D=[V,new ke(j),A,new ke($)];return new Ga(D)}const i=this.reduce(),s=i.length,l=[];let c=[],u,h=0,f=this.length();const m=typeof a<"u"&&typeof o<"u";function g(S,M,R,_,O){return function(P){const j=_/R,$=(_+O)/R,V=M-S;return Y.map(P,0,1,S+j*V,S+$*V)}}i.forEach(function(S){const M=S.length();m?(l.push(S.scale(g(n,a,f,h,M))),c.push(S.scale(g(-r,-o,f,h,M)))):(l.push(S.scale(n)),c.push(S.scale(-r))),h+=M}),c=c.map(function(S){return u=S.points,u[3]?S.points=[u[3],u[2],u[1],u[0]]:S.points=[u[2],u[1],u[0]],S}).reverse();const y=l[0].points[0],v=l[s-1].points[l[s-1].points.length-1],x=c[s-1].points[c[s-1].points.length-1],b=c[0].points[0],w=Y.makeline(x,y),E=Y.makeline(v,b),C=[w].concat(l).concat([E]).concat(c);return new Ga(C)}outlineshapes(n,r,a){r=r||n;const o=this.outline(n,r).curves,i=[];for(let s=1,l=o.length;s<l/2;s++){const c=Y.makeshape(o[s],o[l-s],a);c.startcap.virtual=s>1,c.endcap.virtual=s<l/2-1,i.push(c)}return i}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof ke&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=oh(n.p1.x,n.p2.x),a=oh(n.p1.y,n.p2.y),o=ih(n.p1.x,n.p2.x),i=ih(n.p1.y,n.p2.y);return Y.roots(this.points,n).filter(s=>{var l=this.get(s);return Y.between(l.x,r,o)&&Y.between(l.y,a,i)})}selfintersects(n){const r=this.reduce(),a=r.length-2,o=[];for(let i=0,s,l,c;i<a;i++)l=r.slice(i,i+1),c=r.slice(i+2),s=this.curveintersects(l,c,n),o.push(...s);return o}curveintersects(n,r,a){const o=[];n.forEach(function(s){r.forEach(function(l){s.overlaps(l)&&o.push({left:s,right:l})})});let i=[];return o.forEach(function(s){const l=Y.pairiteration(s.left,s.right,a);l.length>0&&(i=i.concat(l))}),i}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,a,o){const i=(o-a)/4,s=this.get(a+i),l=this.get(o-i),c=Y.dist(n,r),u=Y.dist(n,s),h=Y.dist(n,l);return Pa(u-c)+Pa(h-c)}_iterate(n,r){let a=0,o=1,i;do{i=0,o=1;let s=this.get(a),l,c,u,h,f=!1,m=!1,g,y=o,v=1;do if(m=f,h=u,y=(a+o)/2,l=this.get(y),c=this.get(o),u=Y.getccenter(s,l,c),u.interval={start:a,end:o},f=this._error(u,s,a,o)<=n,g=m&&!f,g||(v=o),f){if(o>=1){if(u.interval.end=v=1,h=u,o>1){let b={x:u.x+u.r*FO(u.e),y:u.y+u.r*$O(u.e)};u.e+=Y.angle({x:u.x,y:u.y},b,this.get(1))}break}o=o+(o-a)/2}else o=y;while(!g&&i++<100);if(i>=100)break;h=h||u,r.push(h),a=v}while(o<1);return r}}function Cc(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function UO(e){if(Array.isArray(e))return e}function VO(e){if(Array.isArray(e))return Cc(e)}function ZO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BO(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function qO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
332
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
333
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GO(e,n){if(e==null)return{};var r,a,o=KO(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function KO(e,n){if(e==null)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(n.includes(a))continue;r[a]=e[a]}return r}function YO(e,n){return UO(e)||BO(e,n)||Ty(e,n)||qO()}function QO(e){return VO(e)||ZO(e)||Ty(e)||WO()}function XO(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function JO(e){var n=XO(e,"string");return typeof n=="symbol"?n:n+""}function Ty(e,n){if(e){if(typeof e=="string")return Cc(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cc(e,n):void 0}}var ej=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(l){return{keyAccessor:l,isProp:!(l instanceof Function)}}),i=e.reduce(function(l,c){var u=l,h=c;return o.forEach(function(f,m){var g=f.keyAccessor,y=f.isProp,v;if(y){var x=h,b=x[g],w=GO(x,[g].map(JO));v=b,h=w}else v=g(h,m);m+1<o.length?(u.hasOwnProperty(v)||(u[v]={}),u=u[v]):r?(u.hasOwnProperty(v)||(u[v]=[]),u[v].push(h)):u[v]=h}),l},{});r instanceof Function&&(function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;u===o.length?Object.keys(c).forEach(function(h){return c[h]=r(c[h])}):Object.values(c).forEach(function(h){return l(h,u+1)})})(i);var s=i;return a&&(s=[],(function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];u.length===o.length?s.push({keys:u,vals:c}):Object.entries(c).forEach(function(h){var f=YO(h,2),m=f[0],g=f[1];return l(g,[].concat(QO(u),[m]))})})(i),n instanceof Array&&n.length===0&&s.length===1&&(s[0].keys=[])),s});function tj(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}const sh=Symbol("implicit");function Py(){var e=new M0,n=[],r=[],a=sh;function o(i){let s=e.get(i);if(s===void 0){if(a!==sh)return a;e.set(i,s=n.push(i)-1)}return r[s%r.length]}return o.domain=function(i){if(!arguments.length)return n.slice();n=[],e=new M0;for(const s of i)e.has(s)||e.set(s,n.push(s)-1);return o},o.range=function(i){return arguments.length?(r=Array.from(i),o):r.slice()},o.unknown=function(i){return arguments.length?(a=i,o):a},o.copy=function(){return Py(n,r).unknown(a)},tj.apply(o,arguments),o}function nj(e){for(var n=e.length/6|0,r=new Array(n),a=0;a<n;)r[a]="#"+e.slice(a*6,++a*6);return r}const rj=nj("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function aj(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var oj=`.force-graph-container canvas {
334
- display: block;
335
- user-select: none;
336
- outline: none;
337
- -webkit-tap-highlight-color: transparent;
338
- }
339
-
340
- .force-graph-container .clickable {
341
- cursor: pointer;
342
- }
343
-
344
- .force-graph-container .grabbable {
345
- cursor: move;
346
- cursor: grab;
347
- cursor: -moz-grab;
348
- cursor: -webkit-grab;
349
- }
350
-
351
- .force-graph-container .grabbable:active {
352
- cursor: grabbing;
353
- cursor: -moz-grabbing;
354
- cursor: -webkit-grabbing;
355
- }
356
- `;aj(oj);function Sc(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function ij(e){if(Array.isArray(e))return e}function sj(e){if(Array.isArray(e))return Sc(e)}function lh(e,n,r){if(Ny())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,n);var o=new(e.bind.apply(e,a));return o}function go(e,n,r){return(n=hj(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Ny(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ny=function(){return!!e})()}function lj(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cj(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function uj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
357
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
358
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ch(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function Hr(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ch(Object(r),!0).forEach(function(a){go(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function Ka(e,n){return ij(e)||cj(e,n)||Oy(e,n)||uj()}function Ht(e){return sj(e)||lj(e)||Oy(e)||dj()}function fj(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function hj(e){var n=fj(e,"string");return typeof n=="symbol"?n:n+""}function Ac(e){"@babel/helpers - typeof";return Ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ac(e)}function Oy(e,n){if(e){if(typeof e=="string")return Sc(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sc(e,n):void 0}}var pj=Py(rj);function uh(e,n,r){!n||typeof r!="string"||e.filter(function(a){return!a[r]}).forEach(function(a){a[r]=pj(n(a))})}function mj(e,n){var r=e.nodes,a=e.links,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.nodeFilter,s=i===void 0?function(){return!0}:i,l=o.onLoopError,c=l===void 0?function(g){throw"Invalid DAG structure! Found cycle in node path: ".concat(g.join(" -> "),".")}:l,u={};r.forEach(function(g){return u[n(g)]={data:g,out:[],depth:-1,skip:!s(g)}}),a.forEach(function(g){var y=g.source,v=g.target,x=C(y),b=C(v);if(!u.hasOwnProperty(x))throw"Missing source node with id: ".concat(x);if(!u.hasOwnProperty(b))throw"Missing target node with id: ".concat(b);var w=u[x],E=u[b];w.out.push(E);function C(S){return Ac(S)==="object"?n(S):S}});var h=[];m(Object.values(u));var f=Object.assign.apply(Object,[{}].concat(Ht(Object.entries(u).filter(function(g){var y=Ka(g,2),v=y[1];return!v.skip}).map(function(g){var y=Ka(g,2),v=y[0],x=y[1];return go({},v,x.depth)}))));return f;function m(g){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,x=function(){var C=g[b];if(y.indexOf(C)!==-1){var S=[].concat(Ht(y.slice(y.indexOf(C))),[C]).map(function(M){return n(M.data)});return h.some(function(M){return M.length===S.length&&M.every(function(R,_){return R===S[_]})})||(h.push(S),c(S)),1}v>C.depth&&(C.depth=v,m(C.out,[].concat(Ht(y),[C]),v+(C.skip?0:1)))},b=0,w=g.length;b<w;b++)x()}}var gj=2,nt=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},dh=function(n,r){if(!r.isShadow){var a=Ae(r.linkDirectionalParticles);r.graphData.links.forEach(function(o){var i=Math.round(Math.abs(a(o)));i?o.__photons=Ht(Array(i)).map(function(){return{}}):delete o.__photons})}},ts=Xu({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,dh(n,r)}},dagMode:{onChange:function(n,r){!n&&(r.graphData.nodes||[]).forEach(function(a){return a.fx=a.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:nt},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:nt},nodeColor:{default:"color",triggerUpdate:!1,onChange:nt},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:nt},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:nt},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:nt},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:nt},linkColor:{default:"color",triggerUpdate:!1,onChange:nt},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:nt},linkWidth:{default:1,triggerUpdate:!1,onChange:nt},linkCurvature:{default:0,triggerUpdate:!1,onChange:nt},linkCanvasObject:{triggerUpdate:!1,onChange:nt},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:nt},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:nt},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:nt},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:nt},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:dh},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.velocityDecay(n)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(n,r,a){return a===void 0?n.forceLayout.force(r):(n.forceLayout.force(r,a),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&r(),o(),!n.isShadow&&i(),!n.isShadow&&s(),a(),this;function r(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function a(){var l=Ae(n.nodeVisibility),c=Ae(n.nodeVal),u=Ae(n.nodeColor),h=Ae(n.nodeCanvasObjectMode),f=n.ctx,m=n.isShadow/n.globalScale,g=n.graphData.nodes.filter(l);f.save(),g.forEach(function(y){var v=h(y);if(n.nodeCanvasObject&&(v==="before"||v==="replace")&&(n.nodeCanvasObject(y,f,n.globalScale),v==="replace")){f.restore();return}var x=Math.sqrt(Math.max(0,c(y)||1))*n.nodeRelSize+m;f.beginPath(),f.arc(y.x,y.y,x,0,2*Math.PI,!1),f.fillStyle=u(y)||"rgba(31, 120, 180, 0.92)",f.fill(),n.nodeCanvasObject&&v==="after"&&n.nodeCanvasObject(y,n.ctx,n.globalScale)}),f.restore()}function o(){var l=Ae(n.linkVisibility),c=Ae(n.linkColor),u=Ae(n.linkWidth),h=Ae(n.linkLineDash),f=Ae(n.linkCurvature),m=Ae(n.linkCanvasObjectMode),g=n.ctx,y=n.isShadow*2,v=n.graphData.links.filter(l);v.forEach(M);var x=[],b=[],w=v;if(n.linkCanvasObject){var E=[],C=[];v.forEach(function(R){return({before:x,after:b,replace:E}[m(R)]||C).push(R)}),w=[].concat(Ht(x),b,C),x=x.concat(E)}g.save(),x.forEach(function(R){return n.linkCanvasObject(R,g,n.globalScale)}),g.restore();var S=ej(w,[c,u,h]);g.save(),Object.entries(S).forEach(function(R){var _=Ka(R,2),O=_[0],P=_[1],j=!O||O==="undefined"?"rgba(0,0,0,0.15)":O;Object.entries(P).forEach(function($){var V=Ka($,2),A=V[0],D=V[1],T=(A||1)/n.globalScale+y;Object.entries(D).forEach(function(F){var H=Ka(F,2);H[0];var I=H[1],Z=h(I[0]);g.beginPath(),I.forEach(function(B){var q=B.source,X=B.target;if(!(!q||!X||!q.hasOwnProperty("x")||!X.hasOwnProperty("x"))){g.moveTo(q.x,q.y);var Q=B.__controlPoints;Q?g[Q.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(g,Ht(Q).concat([X.x,X.y])):g.lineTo(X.x,X.y)}}),g.strokeStyle=j,g.lineWidth=T,g.setLineDash(Z||[]),g.stroke()})})}),g.restore(),g.save(),b.forEach(function(R){return n.linkCanvasObject(R,g,n.globalScale)}),g.restore();function M(R){var _=f(R);if(!_){R.__controlPoints=null;return}var O=R.source,P=R.target;if(!(!O||!P||!O.hasOwnProperty("x")||!P.hasOwnProperty("x"))){var j=Math.sqrt(Math.pow(P.x-O.x,2)+Math.pow(P.y-O.y,2));if(j>0){var $=Math.atan2(P.y-O.y,P.x-O.x),V=j*_,A={x:(O.x+P.x)/2+V*Math.cos($-Math.PI/2),y:(O.y+P.y)/2+V*Math.sin($-Math.PI/2)};R.__controlPoints=[A.x,A.y]}else{var D=_*70;R.__controlPoints=[P.x,P.y-D,P.x+D,P.y]}}}}function i(){var l=1.6,c=.2,u=Ae(n.linkDirectionalArrowLength),h=Ae(n.linkDirectionalArrowRelPos),f=Ae(n.linkVisibility),m=Ae(n.linkDirectionalArrowColor||n.linkColor),g=Ae(n.nodeVal),y=n.ctx;y.save(),n.graphData.links.filter(f).forEach(function(v){var x=u(v);if(!(!x||x<0)){var b=v.source,w=v.target;if(!(!b||!w||!b.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var E=Math.sqrt(Math.max(0,g(b)||1))*n.nodeRelSize,C=Math.sqrt(Math.max(0,g(w)||1))*n.nodeRelSize,S=Math.min(1,Math.max(0,h(v))),M=m(v)||"rgba(0,0,0,0.28)",R=x/l/2,_=v.__controlPoints&&lh(ke,[b.x,b.y].concat(Ht(v.__controlPoints),[w.x,w.y])),O=_?function(T){return _.get(T)}:function(T){return{x:b.x+(w.x-b.x)*T||0,y:b.y+(w.y-b.y)*T||0}},P=_?_.length():Math.sqrt(Math.pow(w.x-b.x,2)+Math.pow(w.y-b.y,2)),j=E+x+(P-E-C-x)*S,$=O(j/P),V=O((j-x)/P),A=O((j-x*(1-c))/P),D=Math.atan2($.y-V.y,$.x-V.x)-Math.PI/2;y.beginPath(),y.moveTo($.x,$.y),y.lineTo(V.x+R*Math.cos(D),V.y+R*Math.sin(D)),y.lineTo(A.x,A.y),y.lineTo(V.x-R*Math.cos(D),V.y-R*Math.sin(D)),y.fillStyle=M,y.fill()}}}),y.restore()}function s(){var l=Ae(n.linkDirectionalParticles),c=Ae(n.linkDirectionalParticleSpeed),u=Ae(n.linkDirectionalParticleOffset),h=Ae(n.linkDirectionalParticleWidth),f=Ae(n.linkVisibility),m=Ae(n.linkDirectionalParticleColor||n.linkColor),g=n.ctx;g.save(),n.graphData.links.filter(f).forEach(function(y){var v=l(y);if(!(!y.hasOwnProperty("__photons")||!y.__photons.length)){var x=y.source,b=y.target;if(!(!x||!b||!x.hasOwnProperty("x")||!b.hasOwnProperty("x"))){var w=c(y),E=Math.abs(u(y)),C=y.__photons||[],S=Math.max(0,h(y)/2)/Math.sqrt(n.globalScale),M=m(y)||"rgba(0,0,0,0.28)";g.fillStyle=M;var R=y.__controlPoints?lh(ke,[x.x,x.y].concat(Ht(y.__controlPoints),[b.x,b.y])):null,_=0,O=!1;C.forEach(function(P){var j=!!P.__singleHop;if(P.hasOwnProperty("__progressRatio")||(P.__progressRatio=j?0:(_+E)/v),!j&&_++,P.__progressRatio+=w,P.__progressRatio>=1)if(!j)P.__progressRatio=P.__progressRatio%1;else{O=!0;return}var $=P.__progressRatio,V=R?R.get($):{x:x.x+(b.x-x.x)*$||0,y:x.y+(b.y-x.y)*$||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(V.x,V.y,y,g,n.globalScale):(g.beginPath(),g.arc(V.x,V.y,S,0,2*Math.PI,!1),g.fill())}),O&&(y.__photons=y.__photons.filter(function(P){return!P.__singleHop||P.__progressRatio<=1}))}}}),g.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:OO().force("link",CO()).force("charge",jO()).force("center",AN()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,r){r.ctx=n},update:function(n,r){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&uh(n.graphData.nodes,Ae(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&uh(n.graphData.links,Ae(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(m){m.source=m[n.linkSource],m.target=m[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var a=n.forceLayout.force("link");a&&a.id(function(m){return m[n.nodeId]}).links(n.graphData.links);var o=n.dagMode&&mj(n.graphData,function(m){return m[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),i=Math.max.apply(Math,Ht(Object.values(o||[]))),s=n.dagLevelDistance||n.graphData.nodes.length/(i||1)*gj*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var l=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(m){return delete m[l]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var c=["rl","bu"].includes(n.dagMode),u=function(g){return(o[g[n.nodeId]]-i/2)*s*(c?-1:1)},h=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(m){return m[h]=u(m)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?DO(function(m){var g=o[m[n.nodeId]]||-1;return(n.dagMode==="radialin"?i-g:g)*s}).strength(function(m){return n.dagNodeFilter(m)?1:0}):null);for(var f=0;f<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);f++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function jy(e,n){var r=e instanceof Array?e:[e],a=new n;return a._destructor&&a._destructor(),{linkProp:function(i){return{default:a[i](),onChange:function(l,c){r.forEach(function(u){return c[u][i](l)})},triggerUpdate:!1}},linkMethod:function(i){return function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];var h=[];return r.forEach(function(f){var m=s[f],g=m[i].apply(m,c);g!==m&&h.push(g)}),h.length?h[0]:this}}}}var yj=800,vj=4,xj=5,Dy=jy("forceGraph",ts),bj=jy(["forceGraph","shadowGraph"],ts),wj=Object.assign.apply(Object,Ht(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return go({},e,Dy.linkProp(e))})).concat(Ht(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return go({},e,bj.linkProp(e))})))),_j=Object.assign.apply(Object,Ht(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return go({},e,Dy.linkMethod(e))})));function El(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;n===300&&r===150&&(n=r=0);var a=window.devicePixelRatio;n/=a,r/=a,[e.canvas,e.shadowCanvas].forEach(function(i){i.style.width="".concat(e.width,"px"),i.style.height="".concat(e.height,"px"),i.width=e.width*a,i.height=e.height*a,!n&&!r&&i.getContext("2d").scale(a,a)});var o=dn(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/o,(e.height-r)/2/o),e.needsRedraw=!0}}function ky(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function fh(e,n,r){e.save(),ky(e),e.clearRect(0,0,n,r),e.restore()}var Ej=Xu({props:Hr({width:{default:window.innerWidth,onChange:function(n,r){return El(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return El(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(o){return(o||[]).every(function(i){return!i.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(a),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function a(o){var i=o.type,s=o.objs;s.filter(function(l){if(!l.hasOwnProperty("__indexColor"))return!0;var c=r.colorTracker.lookup(l.__indexColor);return!c||!c.hasOwnProperty("d")||c.d!==l}).forEach(function(l){l.__indexColor=r.colorTracker.register({type:i,d:l})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(a,o,i){return n(a,a.__indexColor,o,i)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(a,o,i){return n(a,a.__indexColor,o,i)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},wj),aliases:{stopAnimation:"pauseAnimation"},methods:Hr({graph2ScreenCoords:function(n,r,a){var o=dn(n.canvas);return{x:r*o.k+o.x,y:a*o.k+o.y}},screen2GraphCoords:function(n,r,a){var o=dn(n.canvas);return{x:(r-o.x)/o.k,y:(a-o.y)/o.k}},centerAt:function(n,r,a,o){if(!n.canvas)return null;if(r!==void 0||a!==void 0){var i=Object.assign({},r!==void 0?{x:r}:{},a!==void 0?{y:a}:{});return o?n.tweenGroup.add(new k0(s()).to(i,o).easing(br.Quadratic.Out).onUpdate(l).start()):l(i),this}return s();function s(){var c=dn(n.canvas);return{x:(n.width/2-c.x)/c.k,y:(n.height/2-c.y)/c.k}}function l(c){var u=c.x,h=c.y;n.zoom.translateTo(n.zoom.__baseElem,u===void 0?s().x:u,h===void 0?s().y:h),n.needsRedraw=!0}},zoom:function(n,r,a){if(!n.canvas)return null;if(r!==void 0)return a?n.tweenGroup.add(new k0({k:o()}).to({k:r},a).easing(br.Quadratic.Out).onUpdate(function(s){var l=s.k;return i(l)}).start()):i(r),this;return o();function o(){return dn(n.canvas).k}function i(s){n.zoom.scaleTo(n.zoom.__baseElem,s),n.needsRedraw=!0}},zoomToFit:function(n){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,o=arguments.length,i=new Array(o>3?o-3:0),s=3;s<o;s++)i[s-3]=arguments[s];var l=this.getGraphBbox.apply(this,i);if(l){var c={x:(l.x[0]+l.x[1])/2,y:(l.y[0]+l.y[1])/2},u=Math.max(1e-12,Math.min(1e12,(n.width-a*2)/(l.x[1]-l.x[0]),(n.height-a*2)/(l.y[1]-l.y[0])));this.centerAt(c.x,c.y,r),this.zoom(u,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},a=Ae(n.nodeVal),o=function(l){return Math.sqrt(Math.max(0,a(l)||1))*n.nodeRelSize},i=n.graphData.nodes.filter(r).map(function(s){return{x:s.x,y:s.y,r:o(s)}});return i.length?{x:[N0(i,function(s){return s.x-s.r}),P0(i,function(s){return s.x+s.r})],y:[N0(i,function(s){return s.y-s.r}),P0(i,function(s){return s.y+s.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},_j),stateInit:function(){return{lastSetZoom:1,zoom:D9(),forceGraph:new ts,shadowGraph:new ts().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new aN,tweenGroup:new ry}},init:function(n,r){var a=this;n.innerHTML="";var o=document.createElement("div");o.classList.add("force-graph-container"),o.style.position="relative",n.appendChild(o),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),o.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var i=r.canvas.getContext("2d"),s=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),l={x:-1e12,y:-1e12},c=function(){var f=null,m=window.devicePixelRatio,g=l.x>0&&l.y>0?s.getImageData(l.x*m,l.y*m,1,1):null;return g&&(f=r.colorTracker.lookup(g.data)),f};$t(r.canvas).call(Z7().subject(function(){if(!r.enableNodeDrag)return null;var h=c();return h&&h.type==="Node"?h.d:null}).on("start",function(h){var f=h.subject;f.__initialDragPos={x:f.x,y:f.y,fx:f.fx,fy:f.fy},h.active||(f.fx=f.x,f.fy=f.y),r.canvas.classList.add("grabbable")}).on("drag",function(h){var f=h.subject,m=f.__initialDragPos,g=h,y=dn(r.canvas).k,v={x:m.x+(g.x-m.x)/y-f.x,y:m.y+(g.y-m.y)/y-f.y};["x","y"].forEach(function(x){return f["f".concat(x)]=f[x]=m[x]+(g[x]-m[x])/y}),!(!f.__dragged&&xj>=Math.sqrt(F9(["x","y"].map(function(x){return Math.pow(h[x]-m[x],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,f.__dragged=!0,r.onNodeDrag(f,v))}).on("end",function(h){var f=h.subject,m=f.__initialDragPos,g={x:f.x-m.x,y:f.y-m.y};m.fx===void 0&&(f.fx=void 0),m.fy===void 0&&(f.fy=void 0),delete f.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,f.__dragged&&(delete f.__dragged,r.onNodeDragEnd(f,g))})),r.zoom(r.zoom.__baseElem=$t(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(h){return!h.button&&r.enableZoomPanInteraction&&(h.type!=="wheel"||Ae(r.enableZoomInteraction)(h))&&(h.type==="wheel"||Ae(r.enablePanInteraction)(h))}).on("zoom",function(h){var f=h.transform;[i,s].forEach(function(m){ky(m),m.translate(f.x,f.y),m.scale(f.k,f.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Hr(Hr({},f),a.centerAt())),r.needsRedraw=!0}).on("end",function(h){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Hr(Hr({},h.transform),a.centerAt()))}),El(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){dn(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=vj/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new SN(o),["pointermove","pointerdown"].forEach(function(h){return o.addEventListener(h,function(f){h==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=f),!r.isPointerDragging&&f.type==="pointermove"&&r.onBackgroundClick&&(f.pressure>0||r.isPointerPressed)&&(f.pointerType==="mouse"||f.movementX===void 0||[f.movementX,f.movementY].some(function(y){return Math.abs(y)>1}))&&(r.isPointerDragging=!0);var m=g(o);l.x=f.pageX-m.left,l.y=f.pageY-m.top;function g(y){var v=y.getBoundingClientRect(),x=window.pageXOffset||document.documentElement.scrollLeft,b=window.pageYOffset||document.documentElement.scrollTop;return{top:v.top+b,left:v.left+x}}},{passive:!0})}),o.addEventListener("pointerup",function(h){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var f=[h,r.pointerDownEvent];requestAnimationFrame(function(){if(h.button===0)if(r.hoverObj){var m=r["on".concat(r.hoverObj.type,"Click")];m&&m.apply(void 0,[r.hoverObj.d].concat(f))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,f);if(h.button===2)if(r.hoverObj){var g=r["on".concat(r.hoverObj.type,"RightClick")];g&&g.apply(void 0,[r.hoverObj.d].concat(f))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,f)})}},{passive:!0}),o.addEventListener("contextmenu",function(h){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(h.preventDefault(),!1)}),r.forceGraph(i),r.shadowGraph(s);var u=dP(function(){fh(s,r.width,r.height),r.shadowGraph.linkWidth(function(f){return Ae(r.linkWidth)(f)+r.linkHoverPrecision});var h=dn(r.canvas);r.shadowGraph.globalScale(h.k).tickFrame()},yj);r.flushShadowCanvas=u.flush,(this._animationCycle=function h(){var f=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(E){return E.__photons&&E.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var m=r.isPointerDragging?null:c();if(m!==r.hoverObj){var g=r.hoverObj,y=g?g.type:null,v=m?m.type:null;if(y&&y!==v){var x=r["on".concat(y,"Hover")];x&&x(null,g.d)}if(v){var b=r["on".concat(v,"Hover")];b&&b(m.d,y===v?g.d:null)}r.tooltip.content(m&&Ae(r["".concat(m.type.toLowerCase(),"Label")])(m.d)||null),r.canvas.classList[(m&&r["on".concat(v,"Click")]||!m&&r.onBackgroundClick)&&Ae(r.showPointerCursor)(m?.d)?"add":"remove"]("clickable"),r.hoverObj=m}f&&u()}if(f){fh(i,r.width,r.height);var w=dn(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(i,w),r.forceGraph.globalScale(w).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(i,w)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(h)})()},update:function(n){}});const ks={width:k.number,height:k.number,graphData:k.shape({nodes:k.arrayOf(k.object).isRequired,links:k.arrayOf(k.object).isRequired}),backgroundColor:k.string,nodeRelSize:k.number,nodeId:k.string,nodeLabel:k.oneOfType([k.string,k.func]),nodeVal:k.oneOfType([k.number,k.string,k.func]),nodeVisibility:k.oneOfType([k.bool,k.string,k.func]),nodeColor:k.oneOfType([k.string,k.func]),nodeAutoColorBy:k.oneOfType([k.string,k.func]),onNodeHover:k.func,onNodeClick:k.func,linkSource:k.string,linkTarget:k.string,linkLabel:k.oneOfType([k.string,k.func]),linkVisibility:k.oneOfType([k.bool,k.string,k.func]),linkColor:k.oneOfType([k.string,k.func]),linkAutoColorBy:k.oneOfType([k.string,k.func]),linkWidth:k.oneOfType([k.number,k.string,k.func]),linkCurvature:k.oneOfType([k.number,k.string,k.func]),linkDirectionalArrowLength:k.oneOfType([k.number,k.string,k.func]),linkDirectionalArrowColor:k.oneOfType([k.string,k.func]),linkDirectionalArrowRelPos:k.oneOfType([k.number,k.string,k.func]),linkDirectionalParticles:k.oneOfType([k.number,k.string,k.func]),linkDirectionalParticleSpeed:k.oneOfType([k.number,k.string,k.func]),linkDirectionalParticleOffset:k.oneOfType([k.number,k.string,k.func]),linkDirectionalParticleWidth:k.oneOfType([k.number,k.string,k.func]),linkDirectionalParticleColor:k.oneOfType([k.string,k.func]),onLinkHover:k.func,onLinkClick:k.func,dagMode:k.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:k.number,dagNodeFilter:k.func,onDagError:k.func,d3AlphaMin:k.number,d3AlphaDecay:k.number,d3VelocityDecay:k.number,warmupTicks:k.number,cooldownTicks:k.number,cooldownTime:k.number,onEngineTick:k.func,onEngineStop:k.func,getGraphBbox:k.func},Iy={zoomToFit:k.func,onNodeRightClick:k.func,onNodeDrag:k.func,onNodeDragEnd:k.func,onLinkRightClick:k.func,linkHoverPrecision:k.number,onBackgroundClick:k.func,onBackgroundRightClick:k.func,showPointerCursor:k.oneOfType([k.bool,k.func]),enablePointerInteraction:k.bool,enableNodeDrag:k.bool},id={showNavInfo:k.bool,nodeOpacity:k.number,nodeResolution:k.number,nodeThreeObject:k.oneOfType([k.object,k.string,k.func]),nodeThreeObjectExtend:k.oneOfType([k.bool,k.string,k.func]),nodePositionUpdate:k.func,linkOpacity:k.number,linkResolution:k.number,linkCurveRotation:k.oneOfType([k.number,k.string,k.func]),linkMaterial:k.oneOfType([k.object,k.string,k.func]),linkThreeObject:k.oneOfType([k.object,k.string,k.func]),linkThreeObjectExtend:k.oneOfType([k.bool,k.string,k.func]),linkPositionUpdate:k.func,linkDirectionalArrowResolution:k.number,linkDirectionalParticleResolution:k.number,linkDirectionalParticleThreeObject:k.oneOfType([k.object,k.string,k.func]),forceEngine:k.oneOf(["d3","ngraph"]),ngraphPhysics:k.object,numDimensions:k.oneOf([1,2,3])},Cj=Object.assign({},ks,Iy,{linkLineDash:k.oneOfType([k.arrayOf(k.number),k.string,k.func]),nodeCanvasObjectMode:k.oneOfType([k.string,k.func]),nodeCanvasObject:k.func,nodePointerAreaPaint:k.func,linkCanvasObjectMode:k.oneOfType([k.string,k.func]),linkCanvasObject:k.func,linkPointerAreaPaint:k.func,linkDirectionalParticleCanvasObject:k.func,autoPauseRedraw:k.bool,minZoom:k.number,maxZoom:k.number,enableZoomInteraction:k.oneOfType([k.bool,k.func]),enablePanInteraction:k.oneOfType([k.bool,k.func]),onZoom:k.func,onZoomEnd:k.func,onRenderFramePre:k.func,onRenderFramePost:k.func});Object.assign({},ks,Iy,id,{enableNavigationControls:k.bool,controlType:k.oneOf(["trackball","orbit","fly"]),rendererConfig:k.object,extraRenderers:k.arrayOf(k.shape({render:k.func.isRequired}))});Object.assign({},ks,id,{nodeDesc:k.oneOfType([k.string,k.func]),linkDesc:k.oneOfType([k.string,k.func])});Object.assign({},ks,id,{markerAttrs:k.object,yOffset:k.number,glScale:k.number});const sd=nM(Ej,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});sd.displayName="ForceGraph2D";sd.propTypes=Cj;const Ly=["#FCEBAF","#B2E0B2","#FFB3C1","#FFCCB3","#A4D8E1","#E1B7E1","#A4DBD6","#E1C6E7"],Fy=["#3f3f46","#404047","#42424a","#38383f","#3b3b42","#3d3d44","#393940","#414148"],Sj=Ly.map(e=>$y(e,.15)),Aj=Fy.map(e=>$y(e,.15));function $y(e,n){const r=parseInt(e.slice(1,3),16),a=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return`rgba(${r},${a},${o},${n})`}function hh(e){return e<=1?3:e<=3?4:e<=5?5:Math.min(8,5+Math.sqrt(e)*.8)}function Rj(){const e=Tr(),n=d.useRef(null),r=d.useRef(null),[a,o]=d.useState({width:800,height:600}),[i,s]=d.useState(null),{theme:l}=Pr(O=>O),c=l==="dark",u=d.useRef(c);u.current=c;const{data:h,isLoading:f,error:m}=In({queryKey:_e.notes.graph(),async queryFn(){const O=await sA();if(O.type==="success")return O.noteGraph;throw new Error("Failed to fetch graph data")}});d.useEffect(()=>{if(!h)return;const O=()=>{if(n.current){const P=n.current.getBoundingClientRect();o({width:P.width,height:Math.max(600,window.innerHeight-150)})}};return O(),window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)},[h]),d.useEffect(()=>{h&&r.current&&setTimeout(()=>{r.current?.zoomToFit(400,50)},500)},[h]);const g=d.useRef(i);g.current=i;const y=d.useCallback(O=>{g.current===O.id?e(`/${O.id}`):s(O.id)},[e]),v=d.useCallback(()=>{s(null)},[]),x=d.useCallback(O=>{n.current&&(n.current.style.cursor=O?"pointer":"default")},[]),b=d.useRef(!1),w=d.useCallback(()=>{b.current||(b.current=!0,r.current?.enableZoomInteraction(!1))},[]),E=d.useCallback(()=>{b.current=!1,r.current?.enableZoomInteraction(!0)},[]),C=d.useMemo(()=>{if(!h||h.nodes.length===0)return null;const O=h.nodes.filter(j=>j.connections>0);if(O.length===0)return null;const P=new Set(O.map(j=>j.id));return{nodes:O,links:h.links.filter(j=>P.has(j.source)&&P.has(j.target))}},[h]),S=d.useRef(new Map),M=d.useMemo(()=>{const O=new Map;if(C)for(const P of C.links)O.has(P.source)||O.set(P.source,new Set),O.has(P.target)||O.set(P.target,new Set),O.get(P.source).add(P.target),O.get(P.target).add(P.source);return O},[C]);S.current=M;const R=d.useCallback((O,P,j)=>{const $=u.current,V=i,A=S.current,D=hh(O.connections),T=O.x||0,F=O.y||0,H=V===O.id,I=V?A.get(V)?.has(O.id)??!1:!1,Z=V!==null&&!H&&!I;if(P.beginPath(),P.arc(T,F,D,0,Math.PI*2),Z){if(O.connections>3)P.fillStyle=$?"rgba(63,63,70,0.15)":"rgba(255,179,193,0.15)";else{const B=$?Aj:Sj;P.fillStyle=B[oc(O.id)%B.length]}P.fill();return}if(H)P.fillStyle=$?"#a1a1aa":"#FFCCB3";else if(I)P.fillStyle=$?"#71717a":"#E1B7E1";else if(O.connections>3)P.fillStyle=$?"#52525b":"#FFB3C1";else{const B=$?Fy:Ly;P.fillStyle=B[oc(O.id)%B.length]}if(P.fill(),P.strokeStyle=$?"#3f3f46":"#3d3d3d",P.lineWidth=(H?2:1)/j,P.stroke(),H&&(P.beginPath(),P.arc(T,F,D+2/j,0,Math.PI*2),P.strokeStyle=$?"#d4d4d8":"#27272a",P.lineWidth=1.5/j,P.stroke()),H||I||j>2.5){const B=O.title||"Untitled",q=Math.max(10/j,2.5);P.font=`${H||I?"bold ":""}${q}px Gaegu, cursive`,P.textAlign="center",P.textBaseline="top";const X=P.measureText(B).width,Q=2/j,oe=F+D+3/j;P.fillStyle=$?"rgba(24,24,27,0.85)":"rgba(255,252,247,0.9)",P.fillRect(T-X/2-Q,oe,X+Q*2,q+Q*2),P.fillStyle=$?"#f4f4f5":"#27272a",P.fillText(B,T,oe+Q)}},[i]),_=d.useCallback((O,P,j)=>{const $=u.current,V=i,A=O.source,D=O.target,T=V?A.id===V||D.id===V:!1,F=V!==null&&!T;P.beginPath(),P.moveTo(A.x||0,A.y||0),P.lineTo(D.x||0,D.y||0),F?(P.strokeStyle=$?"rgba(63,63,70,0.06)":"rgba(212,212,216,0.06)",P.lineWidth=.5/j):T?(P.strokeStyle=$?"#71717a":"#E1B7E1",P.lineWidth=2/j):(P.strokeStyle=$?"rgba(63,63,70,0.5)":"rgba(212,212,216,0.7)",P.lineWidth=.5/j),P.stroke()},[i]);return f?p.jsx(ft,{title:"Knowledge Graph",children:p.jsx("div",{className:"flex items-center justify-center",style:{height:"600px"},children:p.jsx(Ne,{width:"100%",height:"100%"})})}):m?p.jsx(ft,{title:"Knowledge Graph",children:p.jsx(Fn,{icon:"❌",title:"Failed to load graph",description:"There was an error loading the knowledge graph."})}):C?p.jsxs(ft,{title:"Knowledge Graph",description:`${C.nodes.length} linked notes · ${C.links.length} connections`,children:[p.jsxs("div",{ref:n,className:"relative overflow-hidden border-2 border-border rounded-sketchy-lg shadow-sketchy",style:{background:c?"#1f1f23":"#fffcf7"},children:[i&&(()=>{const O=C.nodes.find(P=>P.id===i);return O?p.jsxs("div",{className:"absolute top-3 left-3 z-10 flex items-center gap-2 px-3 py-1.5 rounded-sketchy-md border-2 border-border bg-bg-primary shadow-sketchy text-sm",children:[p.jsx("span",{className:"font-bold truncate max-w-48",children:O.title}),p.jsxs("span",{className:"text-fg-tertiary",children:["· ",O.connections," links"]}),p.jsx("button",{onClick:()=>s(null),className:"ml-1 text-fg-tertiary hover:text-fg-primary transition-colors cursor-pointer","aria-label":"Deselect node",children:"✕"})]}):null})(),p.jsx(sd,{ref:r,graphData:C,width:a.width,height:a.height,nodeId:"id",nodeLabel:"",nodeCanvasObject:R,nodePointerAreaPaint:(O,P,j)=>{j.beginPath(),j.arc(O.x||0,O.y||0,Math.max(hh(O.connections)+4,10),0,2*Math.PI),j.fillStyle=P,j.fill()},linkCanvasObject:_,linkCanvasObjectMode:()=>"replace",linkDirectionalParticles:0,onNodeClick:y,onNodeHover:x,onBackgroundClick:v,onNodeDrag:w,onNodeDragEnd:E,warmupTicks:30,cooldownTicks:80,d3AlphaDecay:.05,d3VelocityDecay:.3,enableZoomInteraction:!0,enablePanInteraction:!0,minZoom:.3,maxZoom:5})]}),p.jsxs("div",{className:"mt-4 flex flex-wrap gap-4 text-sm",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-4 h-4 rounded-sketchy-xs border-2 border-border",style:{background:c?"#52525b":"#FFB3C1"}}),p.jsx("span",{className:"text-fg-tertiary font-medium",children:"Hub notes (4+ connections)"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-4 h-4 rounded-sketchy-xs border-2 border-border",style:{background:c?"#3f3f46":"#B2E0B2"}}),p.jsx("span",{className:"text-fg-tertiary font-medium",children:"Connected notes"})]})]})]}):p.jsx(ft,{title:"Knowledge Graph",children:p.jsx(Fn,{icon:"🌌",title:"No constellations yet",description:"Link your notes together and watch your own starry sky unfold"})})}const Mj=()=>{const{theme:e,toggleTheme:n}=Pr(r=>r);return p.jsx(ft,{title:"Settings",description:"Customize your Ocean Brain experience",children:p.jsxs("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",children:[p.jsxs("button",{type:"button",className:"flex flex-col items-center gap-3 bg-subtle p-6 rounded-[12px_4px_13px_3px/4px_10px_4px_12px] border-2 border-border-secondary font-bold hover:shadow-sketchy hover:-translate-y-0.5 active:translate-y-0 active:shadow-none transition-all",onClick:n,children:[p.jsx("span",{className:"text-3xl",children:e==="dark"?p.jsx(f4,{className:"h-8 w-8 text-pastel-yellow-200",weight:"fill"}):p.jsx(m4,{className:"h-8 w-8 text-pastel-orange-200",weight:"fill"})}),p.jsx("span",{children:"Theme"}),p.jsx("span",{className:"text-xs text-fg-tertiary font-medium",children:e==="dark"?"Dark mode":"Light mode"})]}),p.jsxs(Ve,{to:"manage-image",className:"flex flex-col items-center gap-3 bg-subtle p-6 rounded-[12px_4px_13px_3px/4px_10px_4px_12px] border-2 border-border-secondary font-bold hover:shadow-sketchy hover:-translate-y-0.5 active:translate-y-0 active:shadow-none transition-all",children:[p.jsx(x1,{className:"h-8 w-8 text-fg-secondary"}),p.jsx("span",{children:"Manage Image"}),p.jsx("span",{className:"text-xs text-fg-tertiary font-medium",children:"Upload and organize images"})]}),p.jsxs(Ve,{to:"placeholder",className:"flex flex-col items-center gap-3 bg-subtle p-6 rounded-[12px_4px_13px_3px/4px_10px_4px_12px] border-2 border-border-secondary font-bold hover:shadow-sketchy hover:-translate-y-0.5 active:translate-y-0 active:shadow-none transition-all",children:[p.jsx(A1,{className:"h-8 w-8 text-fg-secondary"}),p.jsx("span",{children:"Placeholder"}),p.jsx("span",{className:"text-xs text-fg-tertiary font-medium",children:"Manage template variables"})]})]})})},Tj=240,Pj=20,Nj=4,Oj=()=>{const e=ls(),n=er(),[r,a]=Jn(),{containerRef:o,limit:i}=Vu({minItemWidth:Tj,gap:Pj,rows:Nj}),s=Number(r.get("page"))||1,l=Ni({mutationFn:g2,onSuccess:u=>{if(u.type==="error")throw u;n.invalidateQueries({queryKey:_e.images.listAll(),exact:!1})}}),c=async u=>{await e("Are you really sure?")&&l.mutate(u)};return p.jsx(ft,{title:"Images",variant:"subtle",description:"Manage images uploaded to your notes",children:p.jsx("div",{ref:o,children:p.jsx(d.Suspense,{fallback:p.jsxs("div",{className:"grid gap-5",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:[p.jsx(Ne,{height:"200px"}),p.jsx(Ne,{height:"200px"}),p.jsx(Ne,{height:"200px"})]}),children:p.jsx(bA,{searchParams:{offset:(s-1)*i,limit:i},render:({images:u,totalCount:h})=>p.jsx(Rt,{fallback:p.jsx(Fn,{icon:"🖼️",title:"There are no images",description:"Try drag and drop an image on the note editor."}),children:u.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"grid gap-5",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:u.map(f=>p.jsxs("div",{className:"rounded-[12px_4px_13px_3px/4px_10px_4px_12px] overflow-hidden border-2 border-border shadow-sketchy hover:shadow-sketchy-lg hover:-translate-y-0.5 active:translate-x-0.5 active:translate-y-0.5 active:shadow-none transition-all duration-200",children:[p.jsx(Ve,{to:kA(f.id),children:p.jsx(yg,{className:"h-48 w-full object-cover",src:f.url,alt:f.id})}),p.jsxs("div",{className:"flex p-2 justify-between items-center border-t-2 border-dashed border-border-subtle bg-subtle",children:[p.jsxs("span",{className:"text-xs font-bold text-fg-secondary px-1",children:[f.referenceCount," refs"]}),p.jsx(Ze,{variant:"danger",size:"icon-sm",disabled:f.referenceCount>0,onClick:()=>c(f.id),children:p.jsx(D1,{className:"h-4 w-4"})})]})]},f.id))}),p.jsx(Rt,{fallback:null,children:h&&i<h&&p.jsx(or,{page:s,last:Math.ceil(h/i),onChange:f=>{a(m=>(m.set("page",f.toString()),m))}})})]})})})})})})},jj=()=>{const e=ls(),n=So(),{id:r}=Fc(),a=Tr(),o=er(),{data:i}=In({queryKey:_e.images.detail(r??""),async queryFn(){const u=await vA(r);if(u.type==="error")throw u;return u.image},enabled:!!r}),{data:s}=In({queryKey:_e.images.notes(r??""),async queryFn(){const u=await nA(i.url);if(u.type==="error")throw u;return u.imageNotes},enabled:!!i}),l=!s||(s?.length||0)>0,c=async()=>{if(!l&&await e("Are you really sure?")){const u=await g2(r);if(u.type==="error"){n(u.errors[0].message);return}if(!u.deleteImage){n("Failed to delete image");return}a("/setting/manage-image")}};return p.jsxs(ft,{title:"Image Detail",variant:"none",children:[p.jsxs(Ve,{to:"/setting/manage-image",className:"inline-flex items-center gap-1 text-sm font-bold text-fg-tertiary hover:text-accent-primary transition-colors mb-4",children:[p.jsx(Br,{size:16}),"Back to Images"]}),p.jsxs("div",{className:"flex gap-6 flex-col lg:flex-row",children:[i&&p.jsx("div",{className:"w-full lg:w-[400px] lg:flex-shrink-0",children:p.jsxs("div",{className:"bg-subtle rounded-[16px_5px_17px_4px/5px_13px_5px_15px] border-2 border-border shadow-sketchy overflow-hidden",children:[p.jsx("div",{className:"bg-muted/30 p-4 flex items-center justify-center",children:p.jsx(yg,{className:"max-h-80 w-auto max-w-full object-contain rounded-sketchy-sm",src:i.url})}),p.jsxs("div",{className:"p-4 flex flex-col gap-3 border-t-2 border-dashed border-border-subtle",children:[p.jsx("div",{className:"flex items-center justify-between",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(u4,{size:14,className:"text-fg-tertiary"}),p.jsxs("span",{className:"text-sm font-bold text-fg-secondary",children:[s?.length||0," ",(s?.length||0)===1?"reference":"references"]})]})}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(mg,{content:l?"Cannot delete while referenced by notes":"Delete this image",side:"bottom",children:p.jsxs(Ze,{variant:"danger",size:"sm",className:"flex-1",disabled:l,onClick:c,children:[p.jsx(D1,{size:16}),p.jsx("span",{children:"Delete"})]})}),p.jsxs(Ze,{variant:"ghost",size:"sm",className:"flex-1",onClick:async()=>{await m2("heroBanner",i.url),await o.invalidateQueries({queryKey:_e.ui.heroBanner(),exact:!0})},children:[p.jsx(l4,{size:16,className:"fill-red-500 text-red-500"}),p.jsx("span",{children:"Set hero banner"})]})]})]})]})}),p.jsx("div",{className:"flex-1 min-w-0",children:s&&s.length>0?p.jsxs("div",{className:"bg-subtle rounded-[16px_5px_17px_4px/5px_13px_5px_15px] border-2 border-border shadow-sketchy p-4",children:[p.jsx("p",{className:"text-sm font-bold mb-2 pb-2 border-b-2 border-dashed border-border-subtle",children:"Referenced Notes"}),p.jsx("ul",{className:"flex flex-col",children:s.map(u=>p.jsx("li",{children:p.jsx(IA,{...u})},u.id))})]}):p.jsxs("div",{className:"bg-subtle rounded-[16px_5px_17px_4px/5px_13px_5px_15px] border-2 border-border p-8 flex flex-col items-center justify-center text-center",children:[p.jsx(x1,{size:32,className:"text-fg-disabled mb-2"}),p.jsx("p",{className:"text-sm font-bold text-fg-tertiary",children:"No notes reference this image"}),p.jsx("p",{className:"text-xs text-fg-placeholder mt-1",children:"This image can be safely deleted"})]})})]})]})},Hy=["id","name","template","replacement","createdAt","updatedAt"],Dj=new Set(Hy),kj=`query FetchPlaceholders(
359
- $searchFilter: SearchFilterInput,
360
- $pagination: PaginationInput
361
- ) {
362
- allPlaceholders(
363
- searchFilter: $searchFilter,
364
- pagination: $pagination
365
- ) {
366
- totalCount
367
- placeholders {
368
- __PLACEHOLDER_FIELDS__ }
369
- }
370
- }`,Ij=e=>{const n=e&&e.length>0?e.filter(a=>Dj.has(a)):Hy;return Array.from(new Set(n)).map(a=>" "+a).join(`
371
- `)+`
372
- `},Lj=async({limit:e=25,offset:n=0,query:r="",fields:a}={})=>{const o=Ij(a),i=kj.replace("__PLACEHOLDER_FIELDS__",o);return Te(i,{searchFilter:{query:r},pagination:{limit:e,offset:n}})},Fj=e=>Te(`mutation CreatePlaceholder(
373
- $name: String!,
374
- $template: String!,
375
- $replacement: String!
376
- ) {
377
- createPlaceholder(
378
- name: $name,
379
- template: $template,
380
- replacement: $replacement
381
- ) {
382
- id
383
- name
384
- template
385
- replacement
386
- createdAt
387
- updatedAt
388
- }
389
- }`,e),$j=e=>Te(`mutation DeletePlaceholder($id: ID!) {
390
- deletePlaceholder(id: $id)
391
- }`,{id:e}),ph="bg-subtle flex flex-col gap-1 p-4 rounded-[10px_3px_11px_3px/3px_8px_3px_10px] border-2 border-border-secondary font-bold",Hj=()=>{const e=So(),n=er(),[r,a]=Jn(),[o,i]=d.useState(!1),[s,l]=d.useState(!1),[c,u]=d.useState({name:"",template:"",replacement:""}),h=25,f=Number(r.get("page"))||1,m=_e.placeholders.list({limit:h,offset:(f-1)*h}),[g]=d.useState(p2),{data:y,isLoading:v}=In({queryKey:m,queryFn:async()=>{const w=await Lj({offset:(f-1)*h,limit:h});if(w.type==="error")throw w;return w.allPlaceholders}}),x=Ni({mutationFn:Fj,onSuccess:async()=>{e("Placeholder added successfully"),i(!1),u({name:"",template:"",replacement:""}),await n.invalidateQueries({queryKey:_e.placeholders.listAll(),exact:!1})}}),b=Ni({mutationFn:$j,onSuccess:async()=>{e("Placeholder deleted successfully"),await n.invalidateQueries({queryKey:_e.placeholders.listAll(),exact:!1})}});return p.jsxs(ft,{title:"Placeholders",variant:"subtle",description:"Manage template variables for note cloning",children:[p.jsx(gg,{className:"mb-4",children:p.jsxs("div",{className:"flex gap-2 items-center justify-between",children:[p.jsx("span",{children:"Placeholders will be replaced with new note data during cloning."}),p.jsx(Ze,{onClick:()=>i(!0),children:p.jsx(M1,{width:20,height:20})})]})}),p.jsxs("div",{className:"flex flex-col gap-3 mt-3",children:[p.jsxs("button",{type:"button",onClick:()=>l(!s),className:"bg-subtle flex gap-2 items-center justify-between p-4 rounded-[10px_3px_11px_3px/3px_8px_3px_10px] border-2 border-border-secondary font-bold",children:[p.jsx("div",{children:"System Placeholders"}),p.jsx("div",{className:"w-6 h-6",children:s?p.jsx(a4,{}):p.jsx(Gc,{})})]}),s&&p.jsx("div",{className:"grid gap-3 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:g.map(w=>p.jsxs("div",{className:ph,children:[p.jsx("div",{className:"text-sm",children:w.name}),p.jsxs("div",{className:"text-fg-tertiary text-xs font-medium",children:[rc,w.template,ac," → '",w.replacement,"'"]})]},w.name))}),!v&&y?.placeholders&&y.placeholders.length>0&&p.jsx("div",{className:"grid gap-3 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:y.placeholders.map(w=>p.jsxs("div",{className:`${ph} relative`,children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("div",{className:"text-sm",children:w.name}),p.jsx("button",{type:"button",className:"w-5 h-5 hover:text-red-500 transition-colors",onClick:()=>b.mutate(w.id.toString()),children:p.jsx(Xc,{})})]}),p.jsxs("div",{className:"text-fg-tertiary text-xs font-medium",children:[rc,w.template,ac," → '",w.replacement,"'"]})]},w.id))})]}),p.jsxs(Ue,{isOpen:o,onClose:()=>i(!1),children:[p.jsx(Ue.Header,{title:"Add Placeholder",onClose:()=>i(!1)}),p.jsx(Ue.Body,{children:p.jsxs("div",{className:"flex flex-col gap-3",children:[p.jsx(Xn,{htmlFor:"name",children:"Name:"}),p.jsx(Ua,{id:"name",type:"text",value:c.name,onChange:w=>u({...c,name:w.target.value}),placeholder:"Description of this placeholder"}),p.jsx(Xn,{htmlFor:"template",children:"Placeholder:"}),p.jsx(Ua,{id:"template",type:"text",value:c.template,onChange:w=>u({...c,template:w.target.value}),placeholder:"note_app"}),p.jsx(Xn,{htmlFor:"replacement",children:"Replacement:"}),p.jsx(Ua,{id:"replacement",type:"text",value:c.replacement,onChange:w=>u({...c,replacement:w.target.value}),placeholder:"Ocean Brain"})]})}),p.jsx(Ue.Footer,{children:p.jsxs("div",{className:"flex gap-2",children:[p.jsx(Ze,{variant:"ghost",onClick:()=>i(!1),children:"Cancel"}),p.jsx(Ze,{isLoading:x.isPending,onClick:()=>{if(!c.name||!c.template||!c.replacement){e("All fields are required");return}x.mutate({name:c.name,template:c.template,replacement:c.replacement})},children:"Add"})]})})]}),p.jsx(Rt,{fallback:null,children:y?.totalCount&&h<y.totalCount&&p.jsx(or,{page:f,last:Math.ceil(y.totalCount/h),onChange:w=>{a(E=>(E.set("page",w.toString()),E))}})})]})},zj=R8([{path:"/",element:p.jsx(OA,{children:p.jsx(t8,{})}),children:[{path:"/",element:p.jsx(VA,{})},{path:"/calendar",element:p.jsx(OR,{})},{path:"/reminders",element:p.jsx(LR,{})},{path:"/graph",element:p.jsx(Rj,{})},{path:"/search",element:p.jsx(dR,{})},{path:"/tag",element:p.jsx(gR,{})},{path:"/:id",element:p.jsx(uR,{})},{path:"/tag/:id",element:p.jsx(fR,{})},{path:"/setting",children:[{path:"",element:p.jsx(Mj,{})},{path:"manage-image",element:p.jsx(Oj,{})},{path:"manage-image/:id",element:p.jsx(jj,{})},{path:"placeholder",element:p.jsx(Hj,{})}]}]}]);function Uj(){const{setTheme:e}=Pr();return d.useEffect(()=>{const n=localStorage.getItem("theme");return n&&e(n),fv.listenThemeChange(r=>e(r?"dark":"light"),!n)},[e]),p.jsx(_b,{children:p.jsx($8,{router:zj})})}ov.createRoot(document.getElementById("root")).render(p.jsx(he.StrictMode,{children:p.jsx(Uj,{})}));