-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomponent---src-pages-index-tsx-3585ac96728881e5f3b4.js
More file actions
3 lines (3 loc) · 67.1 KB
/
Copy pathcomponent---src-pages-index-tsx-3585ac96728881e5f3b4.js
File metadata and controls
3 lines (3 loc) · 67.1 KB
1
2
3
/*! For license information please see component---src-pages-index-tsx-3585ac96728881e5f3b4.js.LICENSE.txt */
"use strict";(self.webpackChunktsangszechun_com=self.webpackChunktsangszechun_com||[]).push([[245],{2225:function(e,t,n){n.d(t,{k5:function(){return f}});var r=n(6540),l={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},a=r.createContext&&r.createContext(l),o=["attr","size","title"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){return e&&e.map((e,t)=>r.createElement(e.tag,u({key:t},e.attr),d(e.child)))}function f(e){return t=>r.createElement(m,i({attr:u({},e.attr)},t),d(e.child))}function m(e){var t=t=>{var n,{attr:l,size:a,title:s}=e,c=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,o),d=a||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),r.createElement("svg",i({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,l,c,{className:n,style:u(u({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),s&&r.createElement("title",null,s),e.children)};return void 0!==a?r.createElement(a.Consumer,null,e=>t(e)):t(l)}},2729:function(e){const t=/[\p{Lu}]/u,n=/[\p{Ll}]/u,r=/^[\p{Lu}](?![\p{Lu}])/gu,l=/([\p{Alpha}\p{N}_]|$)/u,a=/[_.\- ]+/,o=new RegExp("^"+a.source),i=new RegExp(a.source+l.source,"gu"),s=new RegExp("\\d+"+l.source,"gu"),u=(e,l)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(l={pascalCase:!1,preserveConsecutiveUppercase:!1,...l},0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length)return"";const a=!1===l.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(l.locale),u=!1===l.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(l.locale);if(1===e.length)return l.pascalCase?u(e):a(e);return e!==a(e)&&(e=((e,r,l)=>{let a=!1,o=!1,i=!1;for(let s=0;s<e.length;s++){const u=e[s];a&&t.test(u)?(e=e.slice(0,s)+"-"+e.slice(s),a=!1,i=o,o=!0,s++):o&&i&&n.test(u)?(e=e.slice(0,s-1)+"-"+e.slice(s-1),i=o,o=!1,a=!0):(a=r(u)===u&&l(u)!==u,i=o,o=l(u)===u&&r(u)!==u)}return e})(e,a,u)),e=e.replace(o,""),e=l.preserveConsecutiveUppercase?((e,t)=>(r.lastIndex=0,e.replace(r,e=>t(e))))(e,a):a(e),l.pascalCase&&(e=u(e.charAt(0))+e.slice(1)),((e,t)=>(i.lastIndex=0,s.lastIndex=0,e.replace(i,(e,n)=>t(n)).replace(s,e=>t(e))))(e,u)};e.exports=u,e.exports.default=u},2940:function(e,t,n){var r=n(6540);function l({title:e,titleId:t,...n},l){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{fillRule:"evenodd",d:"M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5Zm-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5H5.25Z",clipRule:"evenodd"}))}const a=r.forwardRef(l);t.A=a},5160:function(e,t,n){var r=n(6540);var l="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useSyncExternalStore,o=r.useRef,i=r.useEffect,s=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,c){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!i){if(i=!0,a=e,e=r(e),void 0!==c&&f.hasValue){var t=f.value;if(c(t,e))return o=t}return o=e}if(t=o,l(a,e))return t;var n=r(e);return void 0!==c&&c(t,n)?(a=e,t):(a=e,o=n)}var a,o,i=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,r,c]);var m=a(e,d[0],d[1]);return i(function(){f.hasValue=!0,f.value=m},[m]),u(m),m}},5588:function(e,t,n){n.d(t,{G:function(){return I},L:function(){return g},M:function(){return k},P:function(){return x},_:function(){return i},a:function(){return o},b:function(){return d},c:function(){return u},g:function(){return f},h:function(){return s}});var r=n(6540),l=(n(2729),n(5556)),a=n.n(l);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(e,t){if(null==e)return{};var n,r,l={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(l[n]=e[n]);return l}const s=()=>"undefined"!=typeof HTMLImageElement&&"loading"in HTMLImageElement.prototype;const u=e=>{var t;return(e=>{var t,n;return Boolean(null==e||null==(t=e.images)||null==(n=t.fallback)?void 0:n.src)})(e)?e:(e=>Boolean(null==e?void 0:e.gatsbyImageData))(e)?e.gatsbyImageData:(e=>Boolean(null==e?void 0:e.gatsbyImage))(e)?e.gatsbyImage:null==e||null==(t=e.childImageSharp)?void 0:t.gatsbyImageData};function c(e,t,n){const r={};let l="gatsby-image-wrapper";return"fixed"===n?(r.width=e,r.height=t):"constrained"===n&&(l="gatsby-image-wrapper gatsby-image-wrapper-constrained"),{className:l,"data-gatsby-image-wrapper":"",style:r}}function d(e,t,n,r,l){return void 0===l&&(l={}),o({},n,{loading:r,shouldLoad:e,"data-main-image":"",style:o({},l,{opacity:t?1:0})})}function f(e,t,n,r,l,a,i,s){const u={};a&&(u.backgroundColor=a,"fixed"===n?(u.width=r,u.height=l,u.backgroundColor=a,u.position="relative"):("constrained"===n||"fullWidth"===n)&&(u.position="absolute",u.top=0,u.left=0,u.bottom=0,u.right=0)),i&&(u.objectFit=i),s&&(u.objectPosition=s);const c=o({},e,{"aria-hidden":!0,"data-placeholder-image":"",style:o({opacity:t?0:1,transition:"opacity 500ms linear"},u)});return c}const m=["children"],p=function(e){let{layout:t,width:n,height:l}=e;return"fullWidth"===t?r.createElement("div",{"aria-hidden":!0,style:{paddingTop:l/n*100+"%"}}):"constrained"===t?r.createElement("div",{style:{maxWidth:n,display:"block"}},r.createElement("img",{alt:"",role:"presentation","aria-hidden":"true",src:`data:image/svg+xml;charset=utf-8,%3Csvg%20height='${l}'%20width='${n}'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%3E%3C/svg%3E`,style:{maxWidth:"100%",display:"block",position:"static"}})):null},g=function(e){let{children:t}=e,n=i(e,m);return r.createElement(r.Fragment,null,r.createElement(p,o({},n)),t,null)},h=["src","srcSet","loading","alt","shouldLoad"],v=["fallback","sources","shouldLoad"],b=function(e){let{src:t,srcSet:n,loading:l,alt:a="",shouldLoad:s}=e,u=i(e,h);return r.createElement("img",o({},u,{decoding:"async",loading:l,src:s?t:void 0,"data-src":s?void 0:t,srcSet:s?n:void 0,"data-srcset":s?void 0:n,alt:a}))},y=function(e){let{fallback:t,sources:n=[],shouldLoad:l=!0}=e,a=i(e,v);const s=a.sizes||(null==t?void 0:t.sizes),u=r.createElement(b,o({},a,t,{sizes:s,shouldLoad:l}));return n.length?r.createElement("picture",null,n.map(e=>{let{media:t,srcSet:n,type:a}=e;return r.createElement("source",{key:`${t}-${a}-${n}`,type:a,media:t,srcSet:l?n:void 0,"data-srcset":l?void 0:n,sizes:s})}),u):u};var w;b.propTypes={src:l.string.isRequired,alt:l.string.isRequired,sizes:l.string,srcSet:l.string,shouldLoad:l.bool},y.displayName="Picture",y.propTypes={alt:l.string.isRequired,shouldLoad:l.bool,fallback:l.exact({src:l.string.isRequired,srcSet:l.string,sizes:l.string}),sources:l.arrayOf(l.oneOfType([l.exact({media:l.string.isRequired,type:l.string,sizes:l.string,srcSet:l.string.isRequired}),l.exact({media:l.string,type:l.string.isRequired,sizes:l.string,srcSet:l.string.isRequired})]))};const E=["fallback"],x=function(e){let{fallback:t}=e,n=i(e,E);return t?r.createElement(y,o({},n,{fallback:{src:t},"aria-hidden":!0,alt:""})):r.createElement("div",o({},n))};x.displayName="Placeholder",x.propTypes={fallback:l.string,sources:null==(w=y.propTypes)?void 0:w.sources,alt:function(e,t,n){return e[t]?new Error(`Invalid prop \`${t}\` supplied to \`${n}\`. Validation failed.`):null}};const k=function(e){return r.createElement(r.Fragment,null,r.createElement(y,o({},e)),r.createElement("noscript",null,r.createElement(y,o({},e,{shouldLoad:!0}))))};k.displayName="MainImage",k.propTypes=y.propTypes;const S=["as","className","class","style","image","loading","imgClassName","imgStyle","backgroundColor","objectFit","objectPosition"],C=["style","className"],N=e=>e.replace(/\n/g,""),O=function(e,t,n){for(var r=arguments.length,l=new Array(r>3?r-3:0),o=3;o<r;o++)l[o-3]=arguments[o];return e.alt||""===e.alt?a().string.apply(a(),[e,t,n].concat(l)):new Error(`The "alt" prop is required in ${n}. If the image is purely presentational then pass an empty string: e.g. alt="". Learn more: https://a11y-style-guide.com/style-guide/section-media.html`)},T={image:a().object.isRequired,alt:O},P=["as","image","style","backgroundColor","className","class","onStartLoad","onLoad","onError"],F=["style","className"],j=new Set;let L,A;const R=function(e){let{as:t="div",image:l,style:a,backgroundColor:u,className:d,class:f,onStartLoad:m,onLoad:p,onError:g}=e,h=i(e,P);const{width:v,height:b,layout:y}=l,w=c(v,b,y),{style:E,className:x}=w,k=i(w,F),S=(0,r.useRef)(),C=(0,r.useMemo)(()=>JSON.stringify(l.images),[l.images]);f&&(d=f);const N=function(e,t,n){let r="";return"fullWidth"===e&&(r=`<div aria-hidden="true" style="padding-top: ${n/t*100}%;"></div>`),"constrained"===e&&(r=`<div style="max-width: ${t}px; display: block;"><img alt="" role="presentation" aria-hidden="true" src="data:image/svg+xml;charset=utf-8,%3Csvg%20height='${n}'%20width='${t}'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%3E%3C/svg%3E" style="max-width: 100%; display: block; position: static;"></div>`),r}(y,v,b),O=(0,r.useMemo)(()=>({__html:N}),[N]);return(0,r.useEffect)(()=>{L||(L=Promise.all([n.e(277),n.e(684),n.e(932)]).then(n.bind(n,551)).then(e=>{let{renderImageToString:t,swapPlaceholderImage:n}=e;return A=t,{renderImageToString:t,swapPlaceholderImage:n}}));const e=S.current.querySelector("[data-gatsby-image-ssr]");if(e&&s())return e.complete?(null==m||m({wasCached:!0}),null==p||p({wasCached:!0}),setTimeout(()=>{e.removeAttribute("data-gatsby-image-ssr")},0)):(null==m||m({wasCached:!0}),e.addEventListener("load",function t(){e.removeEventListener("load",t),null==p||p({wasCached:!0}),setTimeout(()=>{e.removeAttribute("data-gatsby-image-ssr")},0)})),void j.add(C);if(A&&j.has(C))return;let t,r;return L.then(e=>{let{renderImageToString:n,swapPlaceholderImage:i}=e;S.current&&(S.current.innerHTML=n(o({isLoading:!0,isLoaded:j.has(C),image:l},h)),j.has(C)||(t=requestAnimationFrame(()=>{S.current&&(r=i(S.current,C,j,a,m,p,g))})))}),()=>{t&&cancelAnimationFrame(t),r&&r()}},[l]),(0,r.useLayoutEffect)(()=>{j.has(C)&&A&&(S.current.innerHTML=A(o({isLoading:j.has(C),isLoaded:j.has(C),image:l},h)),null==m||m({wasCached:!0}),null==p||p({wasCached:!0}))},[l]),(0,r.createElement)(t,o({},k,{style:o({},E,a,{backgroundColor:u}),className:`${x}${d?` ${d}`:""}`,ref:S,dangerouslySetInnerHTML:O,suppressHydrationWarning:!0}))},I=(0,r.memo)(function(e){return e.image?(0,r.createElement)(R,e):null});I.propTypes=T,I.displayName="GatsbyImage";const D=["src","__imageData","__error","width","height","aspectRatio","tracedSVGOptions","placeholder","formats","quality","transformOptions","jpgOptions","pngOptions","webpOptions","avifOptions","blurredOptions","breakpoints","outputPixelDensities"];function M(e){return function(t){let{src:n,__imageData:l,__error:a}=t,s=i(t,D);return a&&console.warn(a),l?r.createElement(e,o({image:l},s)):(console.warn("Image not loaded",n),null)}}const $=M(function(e){let{as:t="div",className:n,class:l,style:a,image:s,loading:u="lazy",imgClassName:m,imgStyle:p,backgroundColor:h,objectFit:v,objectPosition:b}=e,y=i(e,S);if(!s)return console.warn("[gatsby-plugin-image] Missing image prop"),null;l&&(n=l),p=o({objectFit:v,objectPosition:b,backgroundColor:h},p);const{width:w,height:E,layout:O,images:T,placeholder:P,backgroundColor:F}=s,j=c(w,E,O),{style:L,className:A}=j,R=i(j,C),I={fallback:void 0,sources:[]};return T.fallback&&(I.fallback=o({},T.fallback,{srcSet:T.fallback.srcSet?N(T.fallback.srcSet):void 0})),T.sources&&(I.sources=T.sources.map(e=>o({},e,{srcSet:N(e.srcSet)}))),r.createElement(t,o({},R,{style:o({},L,a,{backgroundColor:h}),className:`${A}${n?` ${n}`:""}`}),r.createElement(g,{layout:O,width:w,height:E},r.createElement(x,o({},f(P,!1,O,w,E,F,v,b))),r.createElement(k,o({"data-gatsby-image-ssr":"",className:m},y,d("eager"===u,!1,I,u,p)))))}),_=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),l=2;l<n;l++)r[l-2]=arguments[l];return"fullWidth"!==e.layout||"width"!==t&&"height"!==t||!e[t]?a().number.apply(a(),[e,t].concat(r)):new Error(`"${t}" ${e[t]} may not be passed when layout is fullWidth.`)},H=new Set(["fixed","fullWidth","constrained"]),W={src:a().string.isRequired,alt:O,width:_,height:_,sizes:a().string,layout:e=>{if(void 0!==e.layout&&!H.has(e.layout))return new Error(`Invalid value ${e.layout}" provided for prop "layout". Defaulting to "constrained". Valid values are "fixed", "fullWidth" or "constrained".`)}};$.displayName="StaticImage",$.propTypes=W;const z=M(I);z.displayName="StaticImage",z.propTypes=W},7095:function(e,t,n){n.r(t),n.d(t,{BigTitle:function(){return gn},Head:function(){return xn},Subtitle:function(){return hn},default:function(){return En}});var r=n(6540),l=n.t(r,2);function a(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function o(){let e=[],t={addEventListener(e,n,r,l){return e.addEventListener(n,r,l),t.add(()=>e.removeEventListener(n,r,l))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...e){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...e))},setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return a(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=o();return e(t),this.add(()=>t.dispose())},add(t){return e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function i(){let[e]=(0,r.useState)(o);return(0,r.useEffect)(()=>()=>e.dispose(),[e]),e}var s=Object.defineProperty,u=(e,t,n)=>(((e,t,n)=>{t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let c=new class{constructor(){u(this,"current",this.detect()),u(this,"handoffState","pending"),u(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},d=(e,t)=>{c.isServer?(0,r.useEffect)(e,t):(0,r.useLayoutEffect)(e,t)};function f(e){let t=(0,r.useRef)(e);return d(()=>{t.current=e},[e]),t}let m=function(e){let t=f(e);return r.useCallback((...e)=>t.current(...e),[t])};function p(){let e=(0,r.useRef)(!1);return d(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function g(){let e=function(){let e="undefined"==typeof document;return(e=>e.useSyncExternalStore)(l)(()=>()=>{},()=>!1,()=>!e)}(),[t,n]=r.useState(c.isHandoffComplete);return t&&!1===c.isHandoffComplete&&n(!1),r.useEffect(()=>{!0!==t&&n(!0)},[t]),r.useEffect(()=>c.handoff(),[]),!e&&t}let h=Symbol();function v(e,t=!0){return Object.assign(e,{[h]:t})}function b(...e){let t=(0,r.useRef)(e);(0,r.useEffect)(()=>{t.current=e},[e]);let n=m(e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)});return e.every(e=>null==e||(null==e?void 0:e[h]))?void 0:n}var y,w;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(y=null==process?void 0:{})?void 0:y.NODE_ENV)&&void 0===(null==(w=null==Element?void 0:Element.prototype)?void 0:w.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var E=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(E||{});function x(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function k(e,t,n,l){let[a,s]=(0,r.useState)(n),{hasFlag:u,addFlag:c,removeFlag:f}=function(e=0){let[t,n]=(0,r.useState)(e),l=(0,r.useCallback)(e=>n(e),[]),a=(0,r.useCallback)(e=>n(t=>t|e),[]),o=(0,r.useCallback)(e=>(t&e)===e,[t]),i=(0,r.useCallback)(e=>n(t=>t&~e),[]),s=(0,r.useCallback)(e=>n(t=>t^e),[]);return{flags:t,setFlag:l,addFlag:a,hasFlag:o,removeFlag:i,toggleFlag:s}}(e&&a?3:0),m=(0,r.useRef)(!1),p=(0,r.useRef)(!1),g=i();return d(()=>{var r;if(e)return n&&s(!0),t?(null==(r=null==l?void 0:l.start)||r.call(l,n),function(e,{prepare:t,run:n,done:r,inFlight:l}){let a=o();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:l}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(function(e,t){var n,r;let l=o();if(!e)return l.dispose;let a=!1;l.add(()=>{a=!0});let i=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter(e=>e instanceof CSSTransition))?r:[];return 0===i.length?(t(),l.dispose):(Promise.allSettled(i.map(e=>e.finished)).then(()=>{a||t()}),l.dispose)}(e,r))})}),a.dispose}(t,{inFlight:m,prepare(){p.current?p.current=!1:p.current=m.current,m.current=!0,!p.current&&(n?(c(3),f(4)):(c(4),f(2)))},run(){p.current?n?(f(3),c(4)):(f(4),c(3)):n?f(1):c(1)},done(){var e;p.current&&function(e){var t,n;return(null!=(n=null==(t=e.getAnimations)?void 0:t.call(e))?n:[]).some(e=>e instanceof CSSTransition&&"finished"!==e.playState)}(t)||(m.current=!1,f(7),n||s(!1),null==(e=null==l?void 0:l.end)||e.call(l,n))}})):void(n&&c(3))},[e,n,t,g]),e?[a,{closed:u(1),enter:u(2),leave:u(4),transition:u(2)||u(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}let S=(0,r.createContext)(null);S.displayName="OpenClosedContext";var C=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(C||{});function N(){return(0,r.useContext)(S)}function O({value:e,children:t}){return r.createElement(S.Provider,{value:e},t)}function T({children:e}){return r.createElement(S.Provider,{value:null},e)}function P(...e){return Array.from(new Set(e.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}function F(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,F),r}var j=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(j||{}),L=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(L||{});function A(){let e=function(){let e=(0,r.useRef)([]),t=(0,r.useCallback)(t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)},[]);return(...n)=>{if(!n.every(e=>null==e))return e.current=n,t}}();return(0,r.useCallback)(t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:l,visible:a=!0,name:o,mergeRefs:i}){i=null!=i?i:I;let s=D(t,e);if(a)return R(s,n,r,o,i);let u=null!=l?l:0;if(2&u){let{static:e=!1,...t}=s;if(e)return R(t,n,r,o,i)}if(1&u){let{unmount:e=!0,...t}=s;return F(e?0:1,{0(){return null},1(){return R({...t,hidden:!0,style:{display:"none"}},n,r,o,i)}})}return R(s,n,r,o,i)}({mergeRefs:e,...t}),[e])}function R(e,t={},n,l,a){let{as:o=n,children:i,refName:s="ref",...u}=_(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},d="function"==typeof i?i(t):i;"className"in u&&u.className&&"function"==typeof u.className&&(u.className=u.className(t)),u["aria-labelledby"]&&u["aria-labelledby"]===u.id&&(u["aria-labelledby"]=void 0);let f={};if(t){let e=!1,n=[];for(let[r,l]of Object.entries(t))"boolean"==typeof l&&(e=!0),!0===l&&n.push(r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e){f["data-headlessui-state"]=n.join(" ");for(let e of n)f[`data-${e}`]=""}}if(W(o)&&(Object.keys($(u)).length>0||Object.keys($(f)).length>0)){if(!(!(0,r.isValidElement)(d)||Array.isArray(d)&&d.length>1||function(e){return W(e.type)}(d))){let e=d.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>P(t(...e),u.className):P(t,u.className),l=n?{className:n}:{},o=D(d.props,$(_(u,["ref"])));for(let r in f)r in o&&delete f[r];return(0,r.cloneElement)(d,Object.assign({},o,f,c,{ref:a(H(d),c.ref)},l))}if(Object.keys($(u)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${l} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys($(u)).concat(Object.keys($(f))).map(e=>` - ${e}`).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>` - ${e}`).join("\n")].join("\n"))}return(0,r.createElement)(o,Object.assign({},_(u,["ref"]),!W(o)&&c,!W(o)&&f),d)}function I(...e){return e.every(e=>null==e)?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function D(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let r in n)Object.assign(t,{[r](e,...t){let l=n[r];for(let n of l){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function M(e){var t;return Object.assign((0,r.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function $(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function _(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function H(e){return r.version.split(".")[0]>="19"?e.props.ref:e.ref}function W(e){return e===r.Fragment||e===Symbol.for("react.fragment")}function z(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!W(null!=(t=e.as)?t:Y)||1===r.Children.count(e.children)}let q=(0,r.createContext)(null);q.displayName="TransitionContext";var U=(e=>(e.Visible="visible",e.Hidden="hidden",e))(U||{});let V=(0,r.createContext)(null);function B(e){return"children"in e?B(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function G(e,t){let n=f(e),l=(0,r.useRef)([]),a=p(),o=i(),s=m((e,t=L.Hidden)=>{let r=l.current.findIndex(({el:t})=>t===e);-1!==r&&(F(t,{[L.Unmount](){l.current.splice(r,1)},[L.Hidden](){l.current[r].state="hidden"}}),o.microTask(()=>{var e;!B(l)&&a.current&&(null==(e=n.current)||e.call(n))}))}),u=m(e=>{let t=l.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):l.current.push({el:e,state:"visible"}),()=>s(e,L.Unmount)}),c=(0,r.useRef)([]),d=(0,r.useRef)(Promise.resolve()),g=(0,r.useRef)({enter:[],leave:[]}),h=m((e,n,r)=>{c.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(([t])=>t!==e)),null==t||t.chains.current[n].push([e,new Promise(e=>{c.current.push(e)})]),null==t||t.chains.current[n].push([e,new Promise(e=>{Promise.all(g.current[n].map(([e,t])=>t)).then(()=>e())})]),"enter"===n?d.current=d.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(n)):r(n)}),v=m((e,t,n)=>{Promise.all(g.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=c.current.shift())||e()}).then(()=>n(t))});return(0,r.useMemo)(()=>({children:l,register:u,unregister:s,onStart:h,onStop:v,wait:d,chains:g}),[u,s,l,h,v,g,d])}V.displayName="NestingContext";let Y=r.Fragment,K=j.RenderStrategy;let J=M(function(e,t){let{show:n,appear:l=!1,unmount:a=!0,...o}=e,i=(0,r.useRef)(null),s=b(...z(e)?[i,t]:null===t?[]:[t]);g();let u=N();if(void 0===n&&null!==u&&(n=(u&C.Open)===C.Open),void 0===n)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=(0,r.useState)(n?"visible":"hidden"),p=G(()=>{n||f("hidden")}),[h,v]=(0,r.useState)(!0),y=(0,r.useRef)([n]);d(()=>{!1!==h&&y.current[y.current.length-1]!==n&&(y.current.push(n),v(!1))},[y,n]);let w=(0,r.useMemo)(()=>({show:n,appear:l,initial:h}),[n,l,h]);d(()=>{n?f("visible"):!B(p)&&null!==i.current&&f("hidden")},[n,p]);let E={unmount:a},x=m(()=>{var t;h&&v(!1),null==(t=e.beforeEnter)||t.call(e)}),k=m(()=>{var t;h&&v(!1),null==(t=e.beforeLeave)||t.call(e)}),S=A();return r.createElement(V.Provider,{value:p},r.createElement(q.Provider,{value:w},S({ourProps:{...E,as:r.Fragment,children:r.createElement(X,{ref:s,...E,...o,beforeEnter:x,beforeLeave:k})},theirProps:{},defaultTag:r.Fragment,features:K,visible:"visible"===c,name:"Transition"})))}),X=M(function(e,t){var n,l;let{transition:a=!0,beforeEnter:o,afterEnter:i,beforeLeave:s,afterLeave:u,enter:c,enterFrom:f,enterTo:p,entered:h,leave:v,leaveFrom:y,leaveTo:w,...E}=e,[S,N]=(0,r.useState)(null),T=(0,r.useRef)(null),j=z(e),R=b(...j?[T,t,N]:null===t?[]:[t]),I=null==(n=E.unmount)||n?L.Unmount:L.Hidden,{show:D,appear:M,initial:_}=function(){let e=(0,r.useContext)(q);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[H,W]=(0,r.useState)(D?"visible":"hidden"),U=function(){let e=(0,r.useContext)(V);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:J,unregister:X}=U;d(()=>J(T),[J,T]),d(()=>{if(I===L.Hidden&&T.current)return D&&"visible"!==H?void W("visible"):F(H,{hidden:()=>X(T),visible:()=>J(T)})},[H,T,J,X,D,I]);let Z=g();d(()=>{if(j&&Z&&"visible"===H&&null===T.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[T,H,Z,j]);let Q=_&&!M,ee=M&&D&&_,te=(0,r.useRef)(!1),ne=G(()=>{te.current||(W("hidden"),X(T))},U),re=m(e=>{te.current=!0;let t=e?"enter":"leave";ne.onStart(T,t,e=>{"enter"===e?null==o||o():"leave"===e&&(null==s||s())})}),le=m(e=>{let t=e?"enter":"leave";te.current=!1,ne.onStop(T,t,e=>{"enter"===e?null==i||i():"leave"===e&&(null==u||u())}),"leave"===t&&!B(ne)&&(W("hidden"),X(T))});(0,r.useEffect)(()=>{j&&a||(re(D),le(D))},[D,j,a]);let ae=!(!a||!j||!Z||Q),[,oe]=k(ae,S,D,{start:re,end:le}),ie=$({ref:R,className:(null==(l=P(E.className,ee&&c,ee&&f,oe.enter&&c,oe.enter&&oe.closed&&f,oe.enter&&!oe.closed&&p,oe.leave&&v,oe.leave&&!oe.closed&&y,oe.leave&&oe.closed&&w,!oe.transition&&D&&h))?void 0:l.trim())||void 0,...x(oe)}),se=0;"visible"===H&&(se|=C.Open),"hidden"===H&&(se|=C.Closed),D&&"hidden"===H&&(se|=C.Opening),!D&&"visible"===H&&(se|=C.Closing);let ue=A();return r.createElement(V.Provider,{value:ne},r.createElement(O,{value:se},ue({ourProps:ie,theirProps:E,defaultTag:Y,features:K,visible:"visible"===H,name:"Transition.Child"})))}),Z=M(function(e,t){let n=null!==(0,r.useContext)(q),l=null!==N();return r.createElement(r.Fragment,null,!n&&l?r.createElement(J,{ref:t,...e}):r.createElement(X,{ref:t,...e}))}),Q=Object.assign(J,{Child:Z,Root:J});var ee=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ee||{});function te(e,t,n,l){let a=f(n);(0,r.useEffect)(()=>{function n(e){a.current(e)}return(e=null!=e?e:window).addEventListener(t,n,l),()=>e.removeEventListener(t,n,l)},[e,t,l])}class ne extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}}var re,le,ae,oe=Object.defineProperty,ie=(e,t,n)=>(((e,t,n)=>{t in e?oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),se=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ue=(e,t,n)=>(se(e,t,"read from private field"),n?n.call(e):t.get(e)),ce=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},de=(e,t,n,r)=>(se(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);class fe{constructor(e){ce(this,re,{}),ce(this,le,new ne(()=>new Set)),ce(this,ae,new Set),ie(this,"disposables",o()),de(this,re,e),c.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return ue(this,re)}subscribe(e,t){if(c.isServer)return()=>{};let n={selector:e,callback:t,current:e(ue(this,re))};return ue(this,ae).add(n),this.disposables.add(()=>{ue(this,ae).delete(n)})}on(e,t){return c.isServer?()=>{}:(ue(this,le).get(e).add(t),this.disposables.add(()=>{ue(this,le).get(e).delete(t)}))}send(e){let t=this.reduce(ue(this,re),e);if(t!==ue(this,re)){de(this,re,t);for(let e of ue(this,ae)){let t=e.selector(ue(this,re));me(e.current,t)||(e.current=t,e.callback(t))}for(let t of ue(this,le).get(e.type))t(ue(this,re),e)}}}function me(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&pe(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&pe(e.entries(),t.entries()):!(!ge(e)||!ge(t))&&pe(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function pe(e,t){for(;;){let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}}function ge(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}re=new WeakMap,le=new WeakMap,ae=new WeakMap;var he=Object.defineProperty,ve=(e,t,n)=>(((e,t,n)=>{t in e?he(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),be=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(be||{});let ye={0(e,t){let n=t.id,r=e.stack,l=e.stack.indexOf(n);if(-1!==l){let t=e.stack.slice();return t.splice(l,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(-1===r)return e;let l=e.stack.slice();return l.splice(r,1),{...e,stack:l}}};class we extends fe{constructor(){super(...arguments),ve(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),ve(this,"selectors",{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new we({stack:[]})}reduce(e,t){return F(t.type,ye,e,t)}}const Ee=new ne(()=>we.new());var xe=n(8418);function ke(e,t,n=me){return(0,xe.useSyncExternalStoreWithSelector)(m(t=>e.subscribe(Se,t)),m(()=>e.state),m(()=>e.state),m(t),n)}function Se(e){return e}function Ce(e,t){let n=(0,r.useId)(),l=Ee.get(t),[a,o]=ke(l,(0,r.useCallback)(e=>[l.selectors.isTop(e,n),l.selectors.inStack(e,n)],[l,n]));return d(()=>{if(e)return l.actions.push(n),()=>l.actions.pop(n)},[l,e,n]),!!e&&(!o||a)}function Ne(e,t=("undefined"!=typeof document?document.defaultView:null),n){let r=Ce(e,"escape");te(t,"keydown",e=>{r&&(e.defaultPrevented||e.key===ee.Escape&&n(e))})}function Oe(e){var t;return c.isServer?null:null==e?document:null!=(t=null==e?void 0:e.ownerDocument)?t:document}function Te(e){var t,n;return c.isServer?null:null==e?document:null!=(n=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e))?n:document}function Pe(e){var t,n;return null!=(n=null==(t=Te(e))?void 0:t.activeElement)?n:null}let Fe=new Map,je=new Map;function Le(e){var t;let n=null!=(t=je.get(e))?t:0;return je.set(e,n+1),0!==n||(Fe.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>Ae(e)}function Ae(e){var t;let n=null!=(t=je.get(e))?t:1;if(1===n?je.delete(e):je.set(e,n-1),1!==n)return;let r=Fe.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Fe.delete(e))}function Re(e){return function(e){return"object"==typeof e&&null!==e&&"nodeType"in e}(e)&&"tagName"in e}function Ie(e){return Re(e)&&"accessKey"in e}function De(e){return Re(e)&&"tabIndex"in e}let Me=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),$e=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var _e=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(_e||{}),He=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(He||{}),We=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(We||{});function ze(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(Me)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var qe=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(qe||{});function Ue(e,t=0){var n;return e!==(null==(n=Oe(e))?void 0:n.body)&&F(t,{0(){return e.matches(Me)},1(){let t=e;for(;null!==t;){if(t.matches(Me))return!0;t=t.parentElement}return!1}})}var Ve=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Ve||{});function Be(e){null==e||e.focus({preventScroll:!0})}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Ge=["textarea","input"].join(",");function Ye(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:l=[]}={}){let a=Array.isArray(e)?e.length>0?Te(e[0]):document:Te(e),o=Array.isArray(e)?n?function(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),l=t(n);if(null===r||null===l)return 0;let a=r.compareDocumentPosition(l);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll($e)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e):ze(e);l.length>0&&o.length>1&&(o=o.filter(e=>!l.some(t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))),r=null!=r?r:null==a?void 0:a.activeElement;let i,s=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,o.indexOf(r))-1;if(4&t)return Math.max(0,o.indexOf(r))+1;if(8&t)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&t?{preventScroll:!0}:{},d=0,f=o.length;do{if(d>=f||d+f<=0)return 0;let e=u+d;if(16&t)e=(e+f)%f;else{if(e<0)return 3;if(e>=f)return 1}i=o[e],null==i||i.focus(c),d+=s}while(i!==Pe(i));return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,Ge))&&n}(i)&&i.select(),2}function Ke(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Je(){return Ke()||/Android/gi.test(window.navigator.userAgent)}function Xe(e,t,n,l){let a=f(n);(0,r.useEffect)(()=>{if(e)return document.addEventListener(t,n,l),()=>document.removeEventListener(t,n,l);function n(e){a.current(e)}},[e,t,l])}function Ze(e,t,n,l){let a=f(n);(0,r.useEffect)(()=>{if(e)return window.addEventListener(t,n,l),()=>window.removeEventListener(t,n,l);function n(e){a.current(e)}},[e,t,l])}function Qe(e,t,n){let l=f(n),a=(0,r.useCallback)(function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let a=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of a)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!Ue(r,qe.Loose)&&-1!==r.tabIndex&&e.preventDefault(),l.current(e,r)},[l,t]),o=(0,r.useRef)(null);Xe(e,"pointerdown",e=>{var t,n;Je()||(o.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),Xe(e,"pointerup",e=>{if(Je()||!o.current)return;let t=o.current;return o.current=null,a(e,()=>t)},!0);let i=(0,r.useRef)({x:0,y:0});Xe(e,"touchstart",e=>{i.current.x=e.touches[0].clientX,i.current.y=e.touches[0].clientY},!0),Xe(e,"touchend",e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-i.current.x)>=30||Math.abs(n-i.current.y)>=30))return a(e,()=>De(e.target)?e.target:null)},!0),Ze(e,"blur",e=>a(e,()=>function(e){return Ie(e)&&"IFRAME"===e.nodeName}(window.document.activeElement)?window.document.activeElement:null),!0)}function et(...e){return(0,r.useMemo)(()=>Oe(...e),[...e])}var tt=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(tt||{});let nt=M(function(e,t){var n;let{features:r=1,...l}=e,a={ref:t,"aria-hidden":!(2&~r)||(null!=(n=l["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}};return A()({ourProps:a,theirProps:l,slot:{},defaultTag:"span",name:"Hidden"})});let rt=(0,r.createContext)(null);function lt({children:e,node:t}){let[n,l]=(0,r.useState)(null),a=at(null!=t?t:n);return r.createElement(rt.Provider,{value:a},e,null===a&&r.createElement(nt,{features:tt.Hidden,ref:e=>{var t,n;if(e)for(let r of null!=(n=null==(t=Oe(e))?void 0:t.querySelectorAll("html > *, body > *"))?n:[])if(r!==document.body&&r!==document.head&&Re(r)&&null!=r&&r.contains(e)){l(r);break}}}))}function at(e=null){var t;return null!=(t=(0,r.useContext)(rt))?t:e}function ot(){let e;return{before({doc:t}){var n;let r=t.documentElement,l=null!=(n=t.defaultView)?n:window;e=Math.max(0,l.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,l=Math.max(0,r.clientWidth-r.offsetWidth),a=Math.max(0,e-l);n.style(r,"paddingRight",`${a}px`)}}}function it(){return Ke()?{before({doc:e,d:t,meta:n}){function r(e){for(let t of n().containers)for(let n of t())if(n.contains(e))return!0;return!1}t.microTask(()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=o();n.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>n.dispose()))}let l=null!=(n=window.scrollY)?n:window.pageYOffset,a=null;t.addEventListener(e,"click",t=>{if(De(t.target))try{let n=t.target.closest("a");if(!n)return;let{hash:l}=new URL(n.href),o=e.querySelector(l);De(o)&&!r(o)&&(a=o)}catch{}},!0),t.group(n=>{t.addEventListener(e,"touchstart",e=>{if(n.dispose(),De(e.target)&&function(e){return Re(e)&&"style"in e}(e.target))if(r(e.target)){let t=e.target;for(;t.parentElement&&r(t.parentElement);)t=t.parentElement;n.style(t,"overscrollBehavior","contain")}else n.style(e.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",e=>{if(De(e.target)){if(function(e){return Ie(e)&&"INPUT"===e.nodeName}(e.target))return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}},{passive:!1}),t.add(()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;l!==t&&window.scrollTo(0,l),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function st(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ut=function(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(e){return r.add(e),()=>r.delete(e)},dispatch(e,...l){let a=t[e].call(n,...l);a&&(n=a,r.forEach(e=>e()))}}}(()=>new Map,{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:o(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=st(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=st(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[it(),ot(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];n.forEach(({before:e})=>null==e?void 0:e(t)),n.forEach(({after:e})=>null==e?void 0:e(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function ct(e,t,n=()=>({containers:[]})){let l=function(e){return(0,r.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}(ut),a=t?l.get(t):void 0,o=!!a&&a.count>0;return d(()=>{if(t&&e)return ut.dispatch("PUSH",t,n),()=>ut.dispatch("POP",t,n)},[e,t]),o}function dt(e){return(0,r.useMemo)(()=>e,Object.values(e))}ut.subscribe(()=>{let e=ut.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&ut.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&ut.dispatch("TEARDOWN",n)}});let ft=(0,r.createContext)(()=>{});function mt({value:e,children:t}){return r.createElement(ft.Provider,{value:e},t)}let pt=(0,r.createContext)(!1);function gt(e){return r.createElement(pt.Provider,{value:e.force},e.children)}let ht=(0,r.createContext)(void 0);let vt=(0,r.createContext)(null);function bt(){let e=(0,r.useContext)(vt);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,bt),e}return e}vt.displayName="DescriptionContext";let yt=M(function(e,t){let n=(0,r.useId)(),l=(0,r.useContext)(ht),{id:a=`headlessui-description-${n}`,...o}=e,i=bt(),s=b(t);d(()=>i.register(a),[a,i.register]);let u=dt({...i.slot,disabled:l||!1}),c={ref:s,...i.props,id:a};return A()({ourProps:c,theirProps:o,slot:u,defaultTag:"p",name:i.name||"Description"})}),wt=Object.assign(yt,{});function Et(e){let t=m(e),n=(0,r.useRef)(!1);(0,r.useEffect)(()=>(n.current=!1,()=>{n.current=!0,a(()=>{n.current&&t()})}),[t])}var xt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(xt||{});function kt(e,t){let n=(0,r.useRef)([]),l=m(e);(0,r.useEffect)(()=>{let e=[...n.current];for(let[r,a]of t.entries())if(n.current[r]!==a){let r=l(t,e);return n.current=t,r}},[l,...t])}let St=[];function Ct(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)Re(n.current)&&t.add(n.current);return t}!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}(()=>{function e(e){if(!De(e.target)||e.target===document.body||St[0]===e.target)return;let t=e.target;t=t.closest(Me),St.unshift(null!=t?t:e.target),St=St.filter(e=>null!=e&&e.isConnected),St.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});var Nt=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Nt||{});let Ot=M(function(e,t){let n=(0,r.useRef)(null),l=b(n,t),{initialFocus:o,initialFocusFallback:s,containers:u,features:c=15,...d}=e;g()||(c=0);let f=et(n.current);!function(e,{ownerDocument:t}){let n=!!(8&e),l=function(e=!0){let t=(0,r.useRef)(St.slice());return kt(([e],[n])=>{!0===n&&!1===e&&a(()=>{t.current.splice(0)}),!1===n&&!0===e&&(t.current=St.slice())},[e,St,t]),m(()=>{var e;return null!=(e=t.current.find(e=>null!=e&&e.isConnected))?e:null})}(n);kt(()=>{n||function(e){return Pe(e)===e}(null==t?void 0:t.body)&&Be(l())},[n]),Et(()=>{n&&Be(l())})}(c,{ownerDocument:f});let h=function(e,{ownerDocument:t,container:n,initialFocus:l,initialFocusFallback:o}){let i=(0,r.useRef)(null),s=Ce(!!(1&e),"focus-trap#initial-focus"),u=p();return kt(()=>{if(0===e)return;if(!s)return void(null!=o&&o.current&&Be(o.current));let r=n.current;r&&a(()=>{if(!u.current)return;let n=null==t?void 0:t.activeElement;if(null!=l&&l.current){if((null==l?void 0:l.current)===n)return void(i.current=n)}else if(r.contains(n))return void(i.current=n);if(null!=l&&l.current)Be(l.current);else{if(16&e){if(Ye(r,_e.First|_e.AutoFocus)!==He.Error)return}else if(Ye(r,_e.First)!==He.Error)return;if(null!=o&&o.current&&(Be(o.current),(null==t?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}i.current=null==t?void 0:t.activeElement})},[o,s,e]),i}(c,{ownerDocument:f,container:n,initialFocus:o,initialFocusFallback:s});!function(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:l}){let a=p(),o=!!(4&e);te(null==t?void 0:t.defaultView,"focus",e=>{if(!o||!a.current)return;let t=Ct(r);Ie(n.current)&&t.add(n.current);let i=l.current;if(!i)return;let s=e.target;Ie(s)?Pt(t,s)?(l.current=s,Be(s)):(e.preventDefault(),e.stopPropagation(),Be(i)):Be(l.current)},!0)}(c,{ownerDocument:f,container:n,containers:u,previousActiveElement:h});let v=function(){let e=(0,r.useRef)(0);return Ze(!0,"keydown",t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)},!0),e}(),y=m(e=>{if(!Ie(n.current))return;let t=n.current;F(v.current,{[xt.Forwards]:()=>{Ye(t,_e.First,{skipElements:[e.relatedTarget,s]})},[xt.Backwards]:()=>{Ye(t,_e.Last,{skipElements:[e.relatedTarget,s]})}})}),w=Ce(!!(2&c),"focus-trap#tab-lock"),E=i(),x=(0,r.useRef)(!1),k={ref:l,onKeyDown(e){"Tab"==e.key&&(x.current=!0,E.requestAnimationFrame(()=>{x.current=!1}))},onBlur(e){if(!(4&c))return;let t=Ct(u);Ie(n.current)&&t.add(n.current);let r=e.relatedTarget;De(r)&&"true"!==r.dataset.headlessuiFocusGuard&&(Pt(t,r)||(x.current?Ye(n.current,F(v.current,{[xt.Forwards]:()=>_e.Next,[xt.Backwards]:()=>_e.Previous})|_e.WrapAround,{relativeTo:e.target}):De(e.target)&&Be(e.target)))}},S=A();return r.createElement(r.Fragment,null,w&&r.createElement(nt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:y,features:tt.Focusable}),S({ourProps:k,theirProps:d,defaultTag:"div",name:"FocusTrap"}),w&&r.createElement(nt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:y,features:tt.Focusable}))}),Tt=Object.assign(Ot,{features:Nt});function Pt(e,t){for(let n of e)if(n.contains(t))return!0;return!1}var Ft=n(961);function jt(e){let t=(0,r.useContext)(pt),n=(0,r.useContext)(It),[l,a]=(0,r.useState)(()=>{var r;if(!t&&null!==n)return null!=(r=n.current)?r:null;if(c.isServer)return null;let l=null==e?void 0:e.getElementById("headlessui-portal-root");if(l)return l;if(null===e)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return(0,r.useEffect)(()=>{null!==l&&(null!=e&&e.body.contains(l)||null==e||e.body.appendChild(l))},[l,e]),(0,r.useEffect)(()=>{t||null!==n&&a(n.current)},[n,a,t]),l}let Lt=r.Fragment,At=M(function(e,t){let{ownerDocument:n=null,...l}=e,a=(0,r.useRef)(null),o=b(v(e=>{a.current=e}),t),s=et(a.current),u=jt(null!=n?n:s),c=(0,r.useContext)(Dt),d=i(),f=A();return Et(()=>{var e;u&&u.childNodes.length<=0&&(null==(e=u.parentElement)||e.removeChild(u))}),u?(0,Ft.createPortal)(r.createElement("div",{"data-headlessui-portal":"",ref:e=>{d.dispose(),c&&e&&d.add(c.register(e))}},f({ourProps:{ref:o},theirProps:l,slot:{},defaultTag:Lt,name:"Portal"})),u):null});let Rt=r.Fragment,It=(0,r.createContext)(null);let Dt=(0,r.createContext)(null);let Mt=M(function(e,t){let n=b(t),{enabled:l=!0,ownerDocument:a,...o}=e,i=A();return l?r.createElement(At,{...o,ownerDocument:a,ref:n}):i({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:Lt,name:"Portal"})}),$t=M(function(e,t){let{target:n,...l}=e,a={ref:b(t)},o=A();return r.createElement(It.Provider,{value:n},o({ourProps:a,theirProps:l,defaultTag:Rt,name:"Popover.Group"}))}),_t=Object.assign(Mt,{Group:$t});var Ht=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ht||{}),Wt=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Wt||{});let zt={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},qt=(0,r.createContext)(null);function Ut(e){let t=(0,r.useContext)(qt);if(null===t){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ut),t}return t}function Vt(e,t){return F(t.type,zt,e,t)}qt.displayName="DialogContext";let Bt=M(function(e,t){let n=(0,r.useId)(),{id:l=`headlessui-dialog-${n}`,open:a,onClose:i,initialFocus:s,role:u="dialog",autoFocus:c=!0,__demoMode:p=!1,unmount:h=!1,...v}=e,y=(0,r.useRef)(!1);u="dialog"===u||"alertdialog"===u?u:(y.current||(y.current=!0,console.warn(`Invalid role [${u}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog");let w=N();void 0===a&&null!==w&&(a=(w&C.Open)===C.Open);let E=(0,r.useRef)(null),x=b(E,t),k=et(E.current),S=a?0:1,[O,P]=(0,r.useReducer)(Vt,{titleId:null,descriptionId:null,panelRef:(0,r.createRef)()}),F=m(()=>i(!1)),j=m(e=>P({type:0,id:e})),L=!!g()&&0===S,[R,I]=function(){let e=(0,r.useContext)(Dt),t=(0,r.useRef)([]),n=m(n=>(t.current.push(n),e&&e.register(n),()=>l(n))),l=m(n=>{let r=t.current.indexOf(n);-1!==r&&t.current.splice(r,1),e&&e.unregister(n)}),a=(0,r.useMemo)(()=>({register:n,unregister:l,portals:t}),[n,l,t]);return[t,(0,r.useMemo)(()=>function({children:e}){return r.createElement(Dt.Provider,{value:a},e)},[a])]}(),D={get current(){var e;return null!=(e=O.panelRef.current)?e:E.current}},M=at(),{resolveContainers:$}=function({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=m(()=>{var r,l;let a=Oe(n),o=[];for(let t of e)null!==t&&(Re(t)?o.push(t):"current"in t&&Re(t.current)&&o.push(t.current));if(null!=t&&t.current)for(let e of t.current)o.push(e);for(let e of null!=(r=null==a?void 0:a.querySelectorAll("html > *, body > *"))?r:[])e!==document.body&&e!==document.head&&Re(e)&&"headlessui-portal-root"!==e.id&&(n&&(e.contains(n)||e.contains(null==(l=null==n?void 0:n.getRootNode())?void 0:l.host))||o.some(t=>e.contains(t))||o.push(e));return o});return{resolveContainers:r,contains:m(e=>r().some(t=>t.contains(e)))}}({mainTreeNode:M,portals:R,defaultContainers:[D]}),_=null!==w&&(w&C.Closing)===C.Closing;!function(e,{allowed:t,disallowed:n}={}){let r=Ce(e,"inert-others");d(()=>{var e,l;if(!r)return;let a=o();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&a.add(Le(t));let i=null!=(l=null==t?void 0:t())?l:[];for(let t of i){if(!t)continue;let e=Oe(t);if(!e)continue;let n=t.parentElement;for(;n&&n!==e.body;){for(let e of n.children)i.some(t=>e.contains(t))||a.add(Le(e));n=n.parentElement}}return a.dispose},[r,t,n])}(!p&&!_&&L,{allowed:m(()=>{var e,t;return[null!=(t=null==(e=E.current)?void 0:e.closest("[data-headlessui-portal]"))?t:null]}),disallowed:m(()=>{var e;return[null!=(e=null==M?void 0:M.closest("body > *:not(#headlessui-portal-root)"))?e:null]})});let H=Ee.get(null);d(()=>{if(L)return H.actions.push(l),()=>H.actions.pop(l)},[H,l,L]);let W=ke(H,(0,r.useCallback)(e=>H.selectors.isTop(e,l),[H,l]));Qe(W,$,e=>{e.preventDefault(),F()}),Ne(W,null==k?void 0:k.defaultView,e=>{e.preventDefault(),e.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur(),F()}),function(e,t,n=()=>[document.body]){ct(Ce(e,"scroll-lock"),t,e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}})}(!p&&!_&&L,k,$),function(e,t,n){let l=f(e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()});(0,r.useEffect)(()=>{if(!e)return;let n=null===t?null:Ie(t)?t:t.current;if(!n)return;let r=o();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver(()=>l.current(n));e.observe(n),r.add(()=>e.disconnect())}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver(()=>l.current(n));e.observe(n),r.add(()=>e.disconnect())}return()=>r.dispose()},[t,l,e])}(L,E,F);let[z,q]=function(){let[e,t]=(0,r.useState)([]);return[e.length>0?e.join(" "):void 0,(0,r.useMemo)(()=>function(e){let n=m(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))),l=(0,r.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value}),[n,e.slot,e.name,e.props,e.value]);return r.createElement(vt.Provider,{value:l},e.children)},[t])]}(),U=(0,r.useMemo)(()=>[{dialogState:S,close:F,setTitleId:j,unmount:h},O],[S,F,j,h,O]),V=dt({open:0===S}),B={ref:x,id:l,role:u,tabIndex:-1,"aria-modal":p?void 0:0===S||void 0,"aria-labelledby":O.titleId,"aria-describedby":z,unmount:h},G=!function(){var e;let[t]=(0,r.useState)(()=>"undefined"!=typeof window&&"function"==typeof window.matchMedia?window.matchMedia("(pointer: coarse)"):null),[n,l]=(0,r.useState)(null!=(e=null==t?void 0:t.matches)&&e);return d(()=>{if(t)return t.addEventListener("change",e),()=>t.removeEventListener("change",e);function e(e){l(e.matches)}},[t]),n}(),Y=Nt.None;L&&!p&&(Y|=Nt.RestoreFocus,Y|=Nt.TabLock,c&&(Y|=Nt.AutoFocus),G&&(Y|=Nt.InitialFocus));let K=A();return r.createElement(T,null,r.createElement(gt,{force:!0},r.createElement(_t,null,r.createElement(qt.Provider,{value:U},r.createElement($t,{target:E},r.createElement(gt,{force:!1},r.createElement(q,{slot:V},r.createElement(I,null,r.createElement(Tt,{initialFocus:s,initialFocusFallback:E,containers:$,features:Y},r.createElement(mt,{value:F},K({ourProps:B,theirProps:v,slot:V,defaultTag:Gt,features:Yt,visible:0===S,name:"Dialog"})))))))))))}),Gt="div",Yt=j.RenderStrategy|j.Static;let Kt=M(function(e,t){let{transition:n=!1,open:l,...a}=e,o=N(),i=e.hasOwnProperty("open")||null!==o,s=e.hasOwnProperty("onClose");if(!i&&!s)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!o&&"boolean"!=typeof e.open)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if("function"!=typeof e.onClose)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return void 0===l&&!n||a.static?r.createElement(lt,null,r.createElement(Bt,{ref:t,open:l,...a})):r.createElement(lt,null,r.createElement(Q,{show:l,transition:n,unmount:a.unmount},r.createElement(Bt,{ref:t,...a})))}),Jt=M(function(e,t){let n=(0,r.useId)(),{id:l=`headlessui-dialog-panel-${n}`,transition:a=!1,...o}=e,[{dialogState:i,unmount:s},u]=Ut("Dialog.Panel"),c=b(t,u.panelRef),d=dt({open:0===i}),f=m(e=>{e.stopPropagation()}),p={ref:c,id:l,onClick:f},g=a?Z:r.Fragment,h=a?{unmount:s}:{},v=A();return r.createElement(g,{...h},v({ourProps:p,theirProps:o,slot:d,defaultTag:"div",name:"Dialog.Panel"}))}),Xt=(M(function(e,t){let{transition:n=!1,...l}=e,[{dialogState:a,unmount:o}]=Ut("Dialog.Backdrop"),i=dt({open:0===a}),s={ref:t,"aria-hidden":!0},u=n?Z:r.Fragment,c=n?{unmount:o}:{},d=A();return r.createElement(u,{...c},d({ourProps:s,theirProps:l,slot:i,defaultTag:"div",name:"Dialog.Backdrop"}))}),M(function(e,t){let n=(0,r.useId)(),{id:l=`headlessui-dialog-title-${n}`,...a}=e,[{dialogState:o,setTitleId:i}]=Ut("Dialog.Title"),s=b(t);(0,r.useEffect)(()=>(i(l),()=>i(null)),[l,i]);let u=dt({open:0===o}),c={ref:s,id:l};return A()({ourProps:c,theirProps:a,slot:u,defaultTag:"h2",name:"Dialog.Title"})})),Zt=Object.assign(Kt,{Panel:Jt,Title:Xt,Description:wt});var Qt={siteTitle:"Tsang Sze Chun",siteTitleAlt:"Jacky Tsang",siteTitleShort:"Jacky Tsang",siteHeadline:"Personal website of Tsang Sze Chun",siteUrl:"https://tsangszechun.com/",siteLanguage:"en",siteLogo:"logo.jpg",siteDescription:"Personal website of Tsang Sze Chun",author:"JackyTsang",backgroundColor:"#171717",themeColor:"#5b21b6"},en=n(4794),tn=n(5588),nn=n(2940);function rn({title:e,titleId:t,...n},l){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}var ln=r.forwardRef(rn),an=n(6512),on=n(8027);const sn=[{name:"LinkedIn",description:"There records my career path, my skills, my origin, my whole.",link:"https://www.linkedin.com/in/jacky-tsang-93646a193/"},{name:"GitHub",description:"A developer needs a Github to support him somewhere in his life.",link:"https://github.com/jacky-ttt/"},{name:"Medium",description:"I post articles on Medium now and then. Mostly about the dev I used in my work.",link:"https://jacky-ttt.medium.com/"}],un=["android","kotlin","compose","coroutines","snapshot test","dagger 2","dagger hilt","retrofit","mockk","mockito","TDD","git","typescript","javascript es6","react","react native","next.js","gatsby.js","html5","css","ethers.js","web3.js","aws lambda","serverless framework","hardhat","solidity","java","spring framework","c++","matlab","opencv","vtk","processing"],cn=(e,t,n)=>0===e.length?[]:e.map((r,l)=>{const a=1===e.length?0:Math.pow(l/(e.length-1),2),{r:o,g:i,b:s}=dn(t),{r:u,g:c,b:d}=dn(n),f=Math.floor(o+a*(u-o)),m=Math.floor(i+a*(c-i)),p=Math.floor(s+a*(d-s));return`#${f.toString(16).padStart(2,"0")}${m.toString(16).padStart(2,"0")}${p.toString(16).padStart(2,"0")}`}),dn=e=>{const t=e.replace(/#/g,"");return{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16)}},fn="Tsang Sze Chun".split(""),mn=cn(fn,"#ea580c","#fef9c3"),pn=()=>r.createElement("span",{className:"group inline sm:inline-block hover:cursor-pointer"},r.createElement("span",{className:"inline-block transition-all duration-500 group-hover:scale-105 group-hover:-translate-y-0.5 group-hover:drop-shadow-[0_4px_14px_rgba(251,146,60,0.45)]"},fn.map((e,t)=>r.createElement("span",{key:`${e}-${t}`,style:{color:mn[t]}}," "===e?" ":e)))),gn=e=>{let{children:t}=e;return r.createElement("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-sans font-medium text-white mb-6 tracking-wide"},r.createElement("div",{className:"hidden min-[440px]:block"},"Hello,"),r.createElement("div",{className:"hidden min-[440px]:block"},r.createElement("span",{className:"inline whitespace-pre"},"I'm "),r.createElement(pn,null),"."),r.createElement("div",{className:"block min-[440px]:hidden"},"Hello, I'm"),r.createElement("div",{className:"block min-[440px]:hidden"},r.createElement(pn,null)),t)},hn=e=>{let{children:t}=e;return r.createElement("h1",{className:"text-xl sm:text-2xl lg:text-4xl font-sans text-white mt-8 xxl:w-3/4"},t)},vn=e=>{let{title:t,subtitle:n,link:l,gradientBg:a}=e;return r.createElement("div",{className:"group perspective cursor-pointer"},r.createElement("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:`w-full h-full block shadow-lg relative no-underline rounded-lg px-8 py-8 lg:py-24 text-white group-hover:animate-pulse preserve-3d group-hover:rotate3d-x-10 2xl:group-hover:rotate3d-x-5 duration-200 bg-gradient-to-r ${a}`},r.createElement("div",{className:"w-full h-full "},r.createElement("div",{className:"flex items-center"},r.createElement("div",{className:"text-white uppercase text-2xl md:text-3xl xl:text-4xl tracking-wide font-mono"},t),r.createElement(nn.A,{className:"h-6 w-6 text-neutral-100/80 ml-1 sm:ml-2 collapse group-hover:visible","aria-hidden":"true"})),r.createElement("div",{className:"opacity-75 font-sans text-sm md:text-base"},n))))},bn=e=>{let{id:t,title:n,subtitle:l,description:a,backDescription:o,bgColor:i,image:s,setOpen:u}=e;const c=(0,tn.c)(s);return r.createElement("div",{className:"group perspective cursor-pointer",onClick:()=>{u(e=>(e=>e==t?-1:t)(e))}},r.createElement("div",{className:"w-full h-full shadow-lg rounded-lg overflow-hidden group-hover:rotate3d-x-10 2xl:group-hover:rotate3d-x-5 duration-200",style:{backgroundColor:i}},c&&r.createElement(tn.G,{className:"bg-neutral-500 before:bg-black/80 before:absolute before:inset-0 before:z-10",image:c,alt:n}),r.createElement("div",{className:"px-4 py-4"},r.createElement("h3",{className:"text-lg uppercase font-mono font-medium text-white"},n),r.createElement("p",{className:"text-sm font-sans font-light text-white leading-3"},l),r.createElement("p",{className:"mt-4 text-sm font-sans text-white/80"},a))))},yn=e=>{let{name:t,bgColor:n}=e;return r.createElement("div",{className:"rounded-lg bg-violet-800 leading-5 font-mono uppercase text-sm md:text-base px-4 py-2 hover:scale-110 duration-200",style:{backgroundColor:n}},t)},wn=e=>{var t,n,l,a;let{project:o,open:i,setOpen:s}=e;const u=()=>s(-1),c=o?(0,tn.c)(o.fullImage):void 0;return r.createElement(Q.Root,{show:i,as:r.Fragment},r.createElement(Zt,{as:"div",className:"relative z-50",onClose:u},r.createElement(Q.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"},r.createElement("div",{className:"fixed inset-0 bg-gray-900 bg-opacity-75 transition-opacity"})),r.createElement("div",{className:"fixed inset-0 overflow-y-auto"},r.createElement("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center"},r.createElement(Q.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},r.createElement(Zt.Panel,{className:"relative transform overflow-hidden rounded-lg bg-neutral-800 shadow-xl transition-all w-full max-w-4xl"},r.createElement("div",null,r.createElement("div",{className:"absolute inset-0 z-10 ml-auto mt-4 mr-4 flex h-12 w-12 items-center justify-center rounded-full bg-neutral-900/60 cursor-pointer",onClick:u},r.createElement(ln,{className:"h-6 w-6 text-neutral-100/80","aria-hidden":"true"})),null!=o&&c&&r.createElement(tn.G,{className:"bg-neutral-500",image:c,alt:o.name}),r.createElement("div",{className:"my-6 justify-center mx-auto px-6 sm:px-32"},r.createElement(Zt.Title,{as:"h3",className:"text-3xl uppercase font-mono font-medium text-white"},null!==(t=null==o?void 0:o.name)&&void 0!==t?t:""),r.createElement("p",{className:"text-sm sm:text-base font-sans font-light text-white/80 leading-3"},null!==(n=null==o?void 0:o.year)&&void 0!==n?n:""),r.createElement("p",{className:"text-sm sm:text-base italic font-sans font-light text-white/80 mt-4"},null!==(l=null==o?void 0:o.skill)&&void 0!==l?l:""),r.createElement("p",{className:"text-base sm:text-lg text-justify font-sans font-normal text-white mt-4"},null!==(a=null==o?void 0:o.fullDescription)&&void 0!==a?a:"")))))))))};var En=()=>{const{0:e,1:t}=(0,r.useState)(-1),n=(0,en.useStaticQuery)("1780544417").allProjectsJson.nodes,l=["from-blue-800 to-cyan-500","from-neutral-800 to-zinc-500","from-green-800 to-emerald-500"],a=cn(un,"#5b21b6","#d946ef"),o=cn(n,"#7f1d1d","#ea580c");return r.createElement("main",{className:"w-full p-12 md:p-24 lg:p-36 justify-center items-center flex"},r.createElement("div",{className:"w-full xl:w-[88rem]"},r.createElement("div",{className:"animate-in fade-in slide-in-from-top-14 duration-1000"},r.createElement(gn,null),r.createElement(hn,null,r.createElement("span",{className:"inline-flex items-center gap-2"},"Android Developer.",r.createElement(on.DGu,{"aria-hidden":"true",className:"text-[#3DDC84]"})))),r.createElement("div",{className:"grid lg:grid-rows-1 lg:grid-cols-3 gap-4 mt-20 animate-in fade-in slide-in-from-top-10 duration-1000"},sn.map((e,t)=>r.createElement(vn,{key:t,title:e.name,subtitle:e.description,link:e.link,gradientBg:l[t]}))),r.createElement("div",{className:"animate-in fade-in slide-in-from-top-6 duration-1000"},r.createElement("p",{className:"mt-20 mb-4 text-2xl font-sans text-white"},"Skills"),r.createElement("div",{className:"flex flex-wrap gap-2 sm:gap-3 text-white"},un.map((e,t)=>r.createElement(yn,{key:t,name:e,bgColor:a[t]})))),r.createElement("div",{className:"animate-in fade-in slide-in-from-top-6 duration-1000"},r.createElement("p",{className:"mt-20 mb-4 text-2xl font-sans text-white"},"Projects"),r.createElement("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"},n.map((e,n)=>r.createElement(bn,{key:n,id:n,title:e.name,subtitle:e.year,description:e.description,backDescription:e.skill,image:e.image,bgColor:o[n],setOpen:t})))),r.createElement("div",{className:"mt-20 flex"},r.createElement("a",{href:"https://github.com/jacky-ttt/jacky-ttt.github.io/tree/dev",target:"_blank",rel:"noopener noreferrer",className:"group mx-auto inline-flex items-center text-base sm:text-lg lg:text-xl no-underline rounded-lg text-white/80"},r.createElement(an.Jce,{className:"inline mr-1"}),"Source",r.createElement("span",{className:"ml-1 inline-flex w-0 overflow-hidden opacity-0 transition-all duration-200 group-hover:w-4 group-hover:opacity-100"},r.createElement(nn.A,{className:"h-4 w-4","aria-hidden":"true"})))),r.createElement(wn,{project:n[e],open:-1!=e,setOpen:t})))};const xn=()=>r.createElement(r.Fragment,null,r.createElement("title",null,Qt.siteTitle),r.createElement("meta",{name:"description",content:Qt.siteDescription}),r.createElement("meta",{property:"og:title",content:Qt.siteTitle}),r.createElement("meta",{property:"og:url",content:Qt.siteUrl}),r.createElement("meta",{property:"og:description",content:Qt.siteDescription}),r.createElement("meta",{property:"og:type",content:"website"}))},8418:function(e,t,n){e.exports=n(5160)}}]);
//# sourceMappingURL=component---src-pages-index-tsx-3585ac96728881e5f3b4.js.map