1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="6cfeb198-76d6-375b-b9b9-b0899dc1e448")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,494377,352432,975646,617984,865811,902540,671879,e=>{"use strict";var t=e.i(352819),r=e.i(329053),n=e.i(362106);let i={month:"long",day:"numeric"};e.s(["RELATIVE_RESET_LIMIT_HOURS",0,48,"RESET_DATE_FORMAT",0,i],352432);let a={Scheduled:"scheduled",AllowanceSpent:"allowanceSpent"},s=({allowance:e})=>e&&e.refilled>=e.limit?a.AllowanceSpent:a.Scheduled;e.s(["CreditsRefillState",0,a,"resolveCreditsRefillState",0,s],975646);var l=e.i(191788),o=e.i(944254),u=e.i(26905),c=e.i(285700);let d=48*u.MS_IN_HOUR,h=e=>{let t=e?new Date(e).getTime():NaN;return Number.isNaN(t)?[]:[t]},m=()=>{let{subscription:e,creditsPerPeriod:t,refillPeriod:n}=(0,r.useUser)(),i=(0,c.useQueryClient)(),a=e?.refill,m=a?.nextRefillTime??e?.creditsExpireTime,f=a?.limit,p=f?.expireTime,[g,y]=(0,l.useState)(()=>new Date);return(0,l.useEffect)(()=>{let e,t=[...h(m),...h(p)];if(0===t.length)return;let r=()=>{let n=Date.now(),a=t.flatMap(e=>[e-d,e+1e3]).filter(e=>e>n).sort((e,t)=>e-t)[0];void 0===a?i.invalidateQueries({queryKey:o.queryKeyUser}):e=setTimeout(()=>{y(new Date),t.some(e=>e<=Date.now())&&i.invalidateQueries({queryKey:o.queryKeyUser}),r()},Math.min(a-n,u.MAX_TIMEOUT_MS))};return r(),()=>clearTimeout(e)},[m,p,i]),(0,l.useMemo)(()=>{let e=f?{limit:f.credits,period:f.period,refilled:f.refilledCredits,resetTime:f.expireTime}:void 0;return{state:s({allowance:e}),refillTime:m,now:g,refillPeriod:n,creditsPerPeriod:t,allowance:e}},[n,t,f,m,g])};e.s(["useCreditsRefill",0,m],617984),e.s(["useAllowanceSpentCopy",0,()=>{let e=(0,t.useTranslations)(),{plan:s,isWorkspaceUser:l}=(0,r.useUser)(),o=(0,n.useLocalizedFormatDate)(i),{state:u,refillTime:c,allowance:d,creditsPerPeriod:h,refillPeriod:f}=m();if(u!==a.AllowanceSpent||!c||!s?.isFree||l)return;let p=o(c),g={credits:h??0,period:f??"",date:p};return{title:e("dialogs.paywall.newPaywall.creditsAllowanceSpent.title",{date:p}),description:d?e("dialogs.paywall.newPaywall.creditsAllowanceSpent.descriptionCapped",{...g,limit:d.limit,limitPeriod:d.period}):e("dialogs.paywall.newPaywall.creditsAllowanceSpent.description",g)}}],865811);var f=e.i(338365),p=e.i(60553);e.i(309121);var g=e.i(207784);let y=(e,t)=>{let r=new Date(e).getTime();if(!Number.isNaN(r))return(r-t.getTime())/u.MS_IN_HOUR<=48?{key:"subscriptions.plan.resetsIn",values:{time:e}}:{key:"subscriptions.plan.resetsOn",values:{time:e}}},b=(e=i)=>{let s=(0,t.useTranslations)(),o=(0,n.useLocalizedFormatDate)(e),u=(0,p.useDateFnsLocale)(),{plan:c,subscription:d,subscriptionCredits:h}=(0,r.useUser)(),{state:b,refillTime:v,refillPeriod:w,creditsPerPeriod:S,allowance:M,now:O}=m(),q=!!c?.isFree,P=d?.status===g.SubscriptionStatus.Cancelling||d?.status===g.SubscriptionStatus.Cancelled;return(0,l.useMemo)(()=>void 0!==S&&w&&v?(({state:e,refillPeriod:t,creditsPerPeriod:r,subscriptionCredits:n,allowance:i,refillTime:s,isEnding:l,isFree:o,now:u})=>{let c=o?"subscriptions.plan.limit":"subscriptions.plan.amount",d=e===a.AllowanceSpent,h={id:"refill",period:t,total:r,remaining:n,amountKey:c};if(l)return[h];h.timing=d?{key:"subscriptions.plan.paused",values:{time:s}}:y(s,u);let m=i&&(i.period!==t||i.limit<r);return i&&m?[h,{id:"allowance",period:i.period,total:i.limit,remaining:Math.max(0,i.limit-i.refilled),amountKey:c,timing:y(i.resetTime,u)}]:[h]})({state:b,refillPeriod:w,creditsPerPeriod:S,subscriptionCredits:h,allowance:M,refillTime:v,isEnding:P,isFree:q,now:O}).map(e=>{let{amountKey:t,total:r,period:n,timing:i}=e,a=s(t,{count:r,period:n});if(!i)return{...e,amountLabel:a,resetLabel:void 0};let{time:l,...c}=i.values,d="subscriptions.plan.resetsIn"===i.key?(0,f.formatDistanceToNowStrict)(String(l),{addSuffix:!0,locale:u}):o(String(l));return{...e,amountLabel:a,resetLabel:s(i.key,{...c,when:d})}}):[],[s,o,u,b,w,S,h,M,v,P,q,O])};e.s(["useCreditsPlanDetails",0,b,"useCreditsPlanRules",0,()=>b().map(({amountLabel:e,resetLabel:t})=>t?[e,t].join(" · "):e)],902540);let v={month:"short",day:"numeric"};e.s(["useCreditsBreakdown",0,()=>{let e=(0,t.useTranslations)();return b(v).flatMap(t=>{if(void 0===t.remaining)return[];let r=Math.min(t.remaining,t.total),n=t.total>0?r/t.total*100:0;return[{id:t.id,total:t.total,progressValue:r,percent:n,label:e("subscriptions.credits.period",{period:t.period}),remainingLabel:e("subscriptions.credits.remaining",{remaining:t.remaining,total:t.total}),resetLabel:t.resetLabel}]})}],671879),e.s([],494377)},848828,e=>{"use strict";var t=e.i(191788);e.s(["useAsyncAction",0,(e,r,n)=>{let i=(0,t.useCallback)(t=>e?.subscribeActions(t)??(()=>{}),[e]),a=(0,t.useCallback)(()=>
2{if(!e)return null;for(let t of e.runningActions.values())if(r(t.data))return t.data;return null},[e,r]),s=(0,t.useCallback)(()=>null,[]),l=(0,t.useRef)(a());return(0,t.useEffect)(()=>{if(n)return i(()=>{let e=a();l.current!==e&&(null!==l.current&&n({type:"complete",action:l.current}),null!==e&&n({type:"start",action:e}),l.current=e)})},[i,a,n]),(0,t.useSyncExternalStore)(i,a,s)}])},623056,e=>{"use strict";var t=e.i(127043);e.s(["getBcp47Locale",0,e=>t.BCP47_LOCALE_MAP[e]])},362106,e=>{"use strict";var t=e.i(16471),r=e.i(167559),n=e.i(191788),i=e.i(623056);let a={year:"numeric",month:"long",day:"numeric"};e.s(["useLocalizedFormatDate",0,(e=a)=>{let s=(0,r.useLocale)();return(0,n.useCallback)((r,n,l)=>((e,r=a,n)=>(0,t.intlFormat)(new Date(e),r,{locale:(0,i.getBcp47Locale)(n)}))(r,n??e,l??s),[s,e])},"useLocalizedFormatDateRange",0,(e=a)=>{let t=(0,r.useLocale)(),s=(0,n.useMemo)(()=>new Intl.DateTimeFormat((0,i.getBcp47Locale)(t),e),[t,e]);return(0,n.useCallback)((e,t)=>t?s.formatRange(e,t):s.format(e),[s])}])},60553,e=>{"use strict";var t=e.i(741913),r=e.i(191788);let n=(0,r.createContext)(t.enUS);e.s(["DateFnsLocaleContext",0,n,"useDateFnsLocale",0,()=>(0,r.useContext)(n)])},26905,e=>{"use strict";e.s(["MAX_TIMEOUT_MS",0,0x80000000-1,"MS_IN_HOUR",0,36e5])},527861,e=>{"use strict";let t={};e.s(["getDefaultOptions",0,function(){return t},"setDefaultOptions",0,function(e){t=e}])},98450,e=>{"use strict";var t=e.i(635113);e.s(["getTimezoneOffsetInMilliseconds",0,function(e){let r=(0,t.toDate)(e),n=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return n.setUTCFullYear(r.getFullYear()),e-n}])},124323,e=>{"use strict";var t=e.i(498170);e.s(["normalizeDates",0,function(e,...r){let n=t.constructFrom.bind(null,e||r.find(e=>"object"==typeof e));return r.map(n)}])},460836,e=>{"use strict";var t=e.i(635113);e.s(["compareAsc",0,function(e,r){let n=(0,t.toDate)(e)-(0,t.toDate)(r);return n<0?-1:n>0?1:n}])},692093,e=>{"use strict";var t=e.i(498170);e.s(["constructNow",0,function(e){return(0,t.constructFrom)(e,Date.now())}])},338365,e=>{"use strict";var t=e.i(692093),r=e.i(550216),n=e.i(527861),i=e.i(736980),a=e.i(98450),s=e.i(124323),l=e.i(460836),o=e.i(402848);e.s(["formatDistanceToNowStrict",0,function(e,u){return function(e,t,u){let c,d=(0,n.getDefaultOptions)(),h=u?.locale??d.locale??r.defaultLocale,m=(0,l.compareAsc)(e,t);if(isNaN(m))throw RangeError("Invalid time value");let f=Object.assign({},u,{addSuffix:u?.addSuffix,comparison:m}),[p,g]=(0,s.normalizeDates)(u?.in,...m>0?[t,e]:[e,t]),y=(0,i.getRoundingMethod)(u?.roundingMethod??"round"),b=g.getTime()-p.getTime(),v=b/o.millisecondsInMinute,w=(b-((0,a.getTimezoneOffsetInMilliseconds)(g)-(0,a.getTimezoneOffsetInMilliseconds)(p)))/o.millisecondsInMinute,S=u?.unit;if("second"===(c=S||(v<1?"second":v<60?"minute":v<o.minutesInDay?"hour":w<o.minutesInMonth?"day":w<o.minutesInYear?"month":"year"))){let e=y(b/1e3);return h.formatDistance("xSeconds",e,f)}if("minute"===c){let e=y(v);return h.formatDistance("xMinutes",e,f)}if("hour"===c){let e=y(v/60);return h.formatDistance("xHours",e,f)}if("day"===c){let e=y(w/o.minutesInDay);return h.formatDistance("xDays",e,f)}if("month"===c){let e=y(w/o.minutesInMonth);return 12===e&&"month"!==S?h.formatDistance("xYears",1,f):h.formatDistance("xMonths",e,f)}else{let e=y(w/o.minutesInYear);return h.formatDistance("xYears",e,f)}}(e,(0,t.constructNow)(e),u)}],338365)},16471,e=>{"use strict";var t=e.i(635113);e.s(["intlFormat",0,function(e,r,n){var i;let a;return void 0===(i=r)||"locale"in i?n=r:a=r,new Intl.DateTimeFormat(n?.locale,a).format((0,t.toDate)(e))}])},206914,e=>{"use strict";e.s(["buildFormatLongFn",0,function(e){return (t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}])},300478,e=>{"use strict";e.s(["buildLocalizeFn",0,function(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,i=r?.width?String(r.width):t;n=e.formattingValues[i]||e.formattingValues[t]}else{let t=e.defaultWidth,i=r?.width?String(r.width):e.defaultWidth;n=e.values[i]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}])},671780,215092,e=>{"use strict";e.s(["buildMatchFn",0,function(e){return(t,r={})=>{let n,i=r.width,a=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],s=t.match(a);if(!s)return null;let l=s[0],o=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(o)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}(o,e=>e.test(l)):function(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}(o,e=>e.test(l));return n=e.valueCallback?e.valueCallback(u):u,{value:n=r.valueCallback?r.valueCallback(n):n,rest:t.slice(l.length)}}}],671780),e.s(["buildMatchPatternFn",0,function(e){return(t,r={})=>{let n=t.match(e.matchPattern);if(!n)return null;let i=n[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:t.slice(i.length)}}}],215092)},550216,741913,e=>{"use strict";var t=e.i(483527),r=e.i(488747),n=e.i(256477),i=e.i(448871),a=e.i(671780);let s={ordinalNumber:(0,e.i(215092).buildMatchPatternFn)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:(0,a.buildMatchFn)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,a.buildMatchFn)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:(0,a.buildMatchFn)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,a.buildMatchFn)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,a.buildMatchFn)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},l={code:"en-US",formatDistance:t.formatDistance,formatLong:r.formatLong,formatRelative:n.formatRelative,localize:i.localize,match:s,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.s(["enUS",0,l],741913),e.s(["defaultLocale",0,l],550216)},483527,e=>{"use strict";let t={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};e.s(["formatDistance",0,(e,r,n)=>{let i,a=t[e];if(i="string"==typeof a?a:1===r?a.one:a.other.replace("{{count}}",r.toString()),n?.addSuffix)if(n.comparison&&n.comparison>0)return"in "+i;else return i+" ago";return i}])},488747,256477,e=>{"use strict";var t=e.i(206914);let r={date:(0,t.buildFormatLongFn)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,t.buildFormatLongFn)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,t.buildFormatLongFn)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};e.s(["formatLong",0,r],488747);let n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};
2e.s(["formatRelative",0,(e,t,r,i)=>n[e]],256477)},448871,e=>{"use strict";var t=e.i(300478);let r={ordinalNumber:(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:(0,t.buildLocalizeFn)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,t.buildLocalizeFn)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:(0,t.buildLocalizeFn)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,t.buildLocalizeFn)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,t.buildLocalizeFn)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};e.s(["localize",0,r])},161592,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"LoadableContext",{enumerable:!0,get:function(){return n}});let n=e.r(741705)._(e.r(191788)).default.createContext(null)},852414,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return h}});let n=e.r(741705)._(e.r(191788)),i=e.r(161592),a=[],s=[],l=!1;function o(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}class u{constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}}function c(t){return function(t,r){let o=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},r),c=null;function d(){if(!c){let e=new u(t,o);c={getCurrentValue:e.getCurrentValue.bind(e),subscribe:e.subscribe.bind(e),retry:e.retry.bind(e),promise:e.promise.bind(e)}}return c.promise()}if("u"<typeof window&&a.push(d),!l&&"u">
2typeof window){let t=o.webpack&&"function"==typeof e.t.resolveWeak?o.webpack():o.modules;t&&s.push(e=>{for(let r of t)if(e.includes(r))return d()})}function h(e,t){let r;d(),(r=n.default.useContext(i.LoadableContext))&&Array.isArray(o.modules)&&o.modules.forEach(e=>{r(e)});let a=n.default.useSyncExternalStore(c.subscribe,c.getCurrentValue,c.getCurrentValue);return n.default.useImperativeHandle(t,()=>({retry:c.retry}),[]),n.default.useMemo(()=>{var t;return a.loading||a.error?n.default.createElement(o.loading,{isLoading:a.loading,pastDelay:a.pastDelay,timedOut:a.timedOut,error:a.error,retry:c.retry}):a.loaded?n.default.createElement((t=a.loaded)&&t.default?t.default:t,e):null},[e,a])}return h.preload=()=>d(),h.displayName="LoadableComponent",n.default.forwardRef(h)}(o,t)}function d(e,t){let r=[];for(;e.length;){let n=e.pop();r.push(n(t))}return Promise.all(r).then(()=>{if(e.length)return d(e,t)})}c.preloadAll=()=>new Promise((e,t)=>{d(a).then(e,t)}),c.preloadReady=(e=[])=>new Promise(t=>{let r=()=>(l=!0,t());d(s,e).then(r,r)}),"u">typeof window&&(window.__NEXT_PRELOADREADY=c.preloadReady);let h=c},425167,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return d},noSSR:function(){return c}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let a=e.r(741705),s=e.r(391398);e.r(191788);let l=a._(e.r(852414)),o="u"<typeof window;function u(e){return{default:e?.default||e}}function c(e,t){if(delete t.webpack,delete t.modules,!o)return e(t);let r=t.loading;return()=>(0,s.jsx)(r,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function d(e,t){let r=l.default,n={loading:({error:e,isLoading:t,pastDelay:r})=>null};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e});let i=(n={...n,...t}).loader;return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?r({...n,loader:()=>null!=i?i().then(u):Promise.resolve(u(()=>null))}):(delete n.webpack,delete n.modules,c(r,n))}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},168489,(e,t,r)=>{t.exports=e.r(425167)},695894,884762,870334,1976,e=>{"use strict";var t=e.i(350461),r=e.i(191788);let n=function(){if("u"<typeof window)return(t.default.env.DEBUG||"").includes("nuqs");try{let e="nuqs-localStorage-test";if("u"<typeof localStorage)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem("debug")||"").includes("nuqs")}catch{return!1}}();function i(e,...t){if(!n)return;let r=function(e,...t){return e.replace(/%[sfdO]/g,e=>{let r=t.shift();return"%O"===e&&r?JSON.stringify(r).replace(/"([^"]+)":/g,"$1:"):String(r)})}(e,...t);performance.mark(r);try{console.log(e,...t)}catch{console.log(r)}}function a(e,...t){n&&console.warn(e,...t)}let s={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?"};function l(e){return`[nuqs] ${s[e]} 3 See https://nuqs.dev/NUQS-${e}`}let o=(0,r.createContext)({useAdapter(){throw Error(l(404))}});function u(e){let t=(0,r.useContext)(o);if(!("useAdapter"in t))throw Error(l(404));return t.useAdapter(e)}o.displayName="NuqsAdapterContext",n&&"u">typeof window&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==o&&console.error(l(303)),window.__NuqsAdapterContext=o);let c=()=>(0,r.useContext)(o).defaultOptions,d=()=>(0,r.useContext)(o).processUrlSearchParams;function h(e){return{method:"throttle",timeMs:e}}e.s(["a",0,d,"c",0,i,"i",0,c,"l",0,a,"n",0,function(e){return({children:t,defaultOptions:n,processUrlSearchParams:i,...a})=>
3(0,r.createElement)(o.Provider,{...a,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:i}},t)},"o",0,function(e){if(0===e.size)return"";let t=[];for(let[r,n]of e.entries()){let e=r.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${e}=${n.replace(/%/g,"%25").replace(/\+/g,"%2B").replace(/ /g,"+").replace(/#/g,"%23").replace(/&/g,"%26").replace(/"/g,"%22").replace(/'/g,"%27").replace(/`/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/[\x00-\x1F]/g,e=>encodeURIComponent(e))}`)}return"?"+t.join("&")},"r",0,u,"s",0,l],884762);let m=h(function(){if("u"<typeof window||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}());function f(e){return null===e||Array.isArray(e)&&0===e.length}function p(e,t,r){if("string"==typeof e)r.set(t,e);else{for(let n of(r.delete(t),e))r.append(t,n);r.has(t)||r.set(t,"")}return r}function g(){let e=new Map;return{on(t,r){let n=e.get(t)||[];return n.push(r),e.set(t,n),()=>this.off(t,r)},off(t,r){let n=e.get(t);n&&e.set(t,n.filter(e=>e!==r))},emit(t,r){e.get(t)?.forEach(e=>e(r))}}}function y(e,t,r){let n=setTimeout(function(){e(),r.removeEventListener("abort",i)},t);function i(){clearTimeout(n),r.removeEventListener("abort",i)}r.addEventListener("abort",i)}function b(){let e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},r=()=>{};return{promise:new e((e,n)=>{t=e,r=n}),resolve:t,reject:r}}function v(){return new URLSearchParams(location.search)}var w=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=m.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:r},n=m.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),i("[nuqs gtq] Enqueueing %s=%s %O",e,t,r),this.updateMap.set(e,t),"push"===r.history&&(this.options.history="push"),r.scroll&&(this.options.scroll=!0),!1===r.
3shallow&&(this.options.shallow=!1),r.startTransition&&this.transitions.add(r.startTransition),(!Number.isFinite(this.timeMs)||n>this.timeMs)&&(this.timeMs=n)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=v}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=v,rateLimitFactor:t=1,...r},n){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return i("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=b();let a=()=>{this.lastFlushedAt=performance.now();let[t,i]=this.applyPendingUpdates({...r,autoResetQueueOnUpdate:r.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},n);null===i?(this.resolvers.resolve(t),this.resetQueueOnNextPush=!0):this.resolvers.reject(t),this.resolvers=null},s=()=>{let e=performance.now()-this.lastFlushedAt,r=this.timeMs,n=t*Math.max(0,r-e);i("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",n,r,t),0===n?a():y(a,n,this.controller.signal)};return y(s,0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){let e=Array.from(this.updateMap.keys());return i("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=m.timeMs,e}applyPendingUpdates(e,t){let{updateUrl:r,getSearchParamsSnapshot:n}=e,a=n();if(i("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,a.toString()),0===this.updateMap.size)return[a,null];let s=Array.from(this.updateMap.entries()),o={...this.options},u=Array.from(this.transitions);for(let[t,r]of(e.autoResetQueueOnUpdate&&this.reset(),i("[nuqs gtq] Flushing queue %O with options %O",s,o),s))null===r?a.delete(t):a=p(r,t,a);t&&(a=t(a));try{return!function(e,t){let r=t;for(let t=e.length-1;t>=0;t--){let n=e[t];if(!n)continue;let i=r;r=()=>n(i)}r()}(u,()=>{r(a,o)}),[a,null]}catch(e){return console.error(l(429),s.map(([e])=>e).join(),e),[a,e]}}};let S=new w;var M=class{callback;resolvers=b();controller=new AbortController;queuedValue=void 0;constructor(e){this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,y(()=>{let t=this.resolvers;try{i("[nuqs dq] Flushing debounce queue",e);let r=this.callback(e);i("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=b(),r.then(e=>t.resolve(e)).catch(e=>t.reject(e))}catch(e){this.queuedValue=void 0,t.reject(e)}},t,this.controller.signal),this.resolvers.promise}};let O=new class{throttleQueue;queues=new Map;queuedQuerySync=g();constructor(e=new w){this.throttleQueue=e}useQueuedQueries(e){var t,n;let i,a;return t=(e,t)=>this.queuedQuerySync.on(e,t),n=e=>this.getQueuedQuery(e),i=(0,r.useCallback)(()=>{let t=Object.fromEntries(e.map(e=>[e,n(e)]));return[JSON.stringify(t),t]},[e.join(","),n]),null===(a=(0,r.useRef)(null)).current&&(a.current=i()),(0,r.useSyncExternalStore)((0,r.useCallback)(r=>{let n=e.map(e=>t(e,r));return()=>n.forEach(e=>e())},[e.join(","),t]),()=>{let[e,t]=i();return a.current[0]===e?a.current[1]:(a.current=[e,t],t)},()=>a.current[1])}push(e,t,r,n){if(!Number.isFinite(t))return Promise.resolve((r.getSearchParamsSnapshot??v)());let a=e.key;if(!this.queues.has(a)){i("[nuqs dqc] Creating debounce queue for `%s`",a);let e=new M(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(r,n).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&(i("[nuqs dqc] Cleaning up empty queue for `%s`",e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(a,e)}i("[nuqs dqc] Enqueueing debounce update %O",e);let s=this.queues.get(a).push(e,t);return this.queuedQuerySync.emit(a),s}abort(e){let t=this.queues.get(e);return t?(i("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),e=>(e.then(t.resolvers.resolve,t.resolvers.reject),e)):e=>e}abortAll(){for(let[e,t]of this.queues.entries())i("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),t.abort(),t.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){let t=this.queues.get(e)?.queuedValue?.query;return void 0!==t?t:this.throttleQueue.getQueuedQuery(e)}}(S);function q(e,t){return e===t||null!==e&&null!==t&&"string"!=typeof e&&"string"!=typeof t&&e.length===t.length&&e.every((e,r)=>e===t[r])}function P(e,t,r){try{return e(t)}catch(e){return a("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),t,e,r),null}}function k(e){function t(t){if(void 0===t)return null;let r="";if(Array.isArray(t)){if(void 0===t[0])return null;r=t[0]}return"string"==typeof t&&(r=t),P(e.parse,r)}return{type:"single",eq:(e,t)=>
3e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide:r=>t(r)??e}},withOptions(e){return{...this,...e}}}}e.s(["a",0,p,"c",0,h,"i",0,f,"n",0,S,"o",0,function(e){return{method:"debounce",timeMs:e}},"r",0,g,"s",0,m,"t",0,O],870334),e.s(["t",0,q],1976);let C=k({parse:e=>e,serialize:String}),_=k({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});function A(e,t){return e.valueOf()===t.valueOf()}function j(e){return k({parse:t=>e.includes(t)?t:null,serialize:String})}k({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)}),k({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(1&t.length?"0":"")+t}}),k({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),k({parse:e=>"true"===e.toLowerCase(),serialize:String}),k({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:A}),k({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:A}),k({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:A});let D=g(),T={};function F(e,t={}){let n=(0,r.useId)(),a=c(),s=d(),{history:o="replace",scroll:h=a?.scroll??!1,shallow:f=a?.shallow??!0,throttleMs:p=m.timeMs,limitUrlUpdates:g=a?.limitUrlUpdates,clearOnDefault:y=a?.clearOnDefault??!0,startTransition:b,urlKeys:v=T}=t,w=Object.keys(e).join(","),M=(0,r.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,v[e]??e])),[w,JSON.stringify(v)]),q=u(Object.values(M)),P=q.searchParams,k=(0,r.useRef)({}),C=(0,r.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(",")]),_=O.useQueuedQueries(Object.values(M)),[A,j]=(0,r.useState)(()=>x(e,v,P??new URLSearchParams,_).state),E=(0,r.useRef)(A);if(i("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,w,A,P),Object.keys(k.current).join("&")!==Object.values(M).join("&")){let{state:t,hasChanged:r}=x(e,v,P,_,k.current,E.current);r&&(i("[nuq+ %s `%s`] State changed: %O",n,w,{state:t,initialSearchParams:P,queuedQueries:_,queryRef:k.current,stateRef:E.current}),E.current=t,j(t)),k.current=Object.fromEntries(Object.entries(M).map(([t,r])=>[r,e[t]?.type==="multi"?P?.getAll(r):P?.get(r)??null]))}(0,r.useEffect)(()=>{let{state:t,hasChanged:r}=x(e,v,P,_,k.current,E.current);r&&(i("[nuq+ %s `%s`] State changed: %O",n,w,{state:t,initialSearchParams:P,queuedQueries:_,queryRef:k.current,stateRef:E.current}),E.current=t,j(t))},[Object.values(M).map(e=>`${e}=${P?.getAll(e)}`).join("&"),JSON.stringify(_)]),(0,r.useEffect)(()=>{let t=Object.keys(e).reduce((t,r)=>(t[r]=({state:t,query:a})=>{j(s=>{let{defaultValue:l}=e[r],o=M[r],u=t??l??null;return Object.is(s[r]??l??null,u)?(i("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,w,o,t,l,E.current),s):(E.current={...E.current,[r]:u},k.current[o]=a,i("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,w,o,t,l,E.current),E.current)})},t),{});for(let r of Object.keys(e)){let e=M[r];i("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,e,w),D.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=M[r];i("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,e,w),D.off(e,t[r])}}},[w,M]);let R=(0,r.useCallback)((t,r={})=>{let a,u=Object.fromEntries(Object.keys(e).map(e=>[e,null])),c="function"==typeof t?t(L(E.current,C))??u:t??u;i("[nuq+ %s `%s`] setState: %O",n,w,c);let d=0,v=!1,P=[];for(let[t,n]of Object.entries(c)){let i=e[t],u=M[t];if(!i||void 0===n)continue;(r.clearOnDefault??i.clearOnDefault??y)&&null!==n&&void 0!==i.defaultValue&&(i.eq??((e,t)=>e===t))(n,i.defaultValue)&&(n=null);let c=null===n?null:(i.serialize??String)(n);D.emit(u,{state:n,query:c});let w={key:u,query:c,options:{history:r.history??i.history??o,shallow:r.shallow??i.shallow??f,scroll:r.scroll??i.scroll??h,startTransition:r.startTransition??i.startTransition??b}};if(r?.limitUrlUpdates?.method==="debounce"||g?.method==="debounce"||i.limitUrlUpdates?.method==="debounce"){!0===w.options.shallow&&console.warn(l(422));let e=r?.limitUrlUpdates?.timeMs??g?.timeMs??i.limitUrlUpdates?.timeMs??m.timeMs,t=O.push(w,e,q,s);d<e&&(a=t,d=e)}else{let e=r?.limitUrlUpdates?.timeMs??i?.limitUrlUpdates?.timeMs??g?.timeMs??r.throttleMs??i.throttleMs??p;P.push(O.abort(u)),S.push(w,e),v=!0}}let k=P.reduce((e,t)=>
3t(e),v?S.flush(q,s):S.getPendingPromise(q));return a??k},[w,o,f,h,p,g?.method,g?.timeMs,b,M,q.updateUrl,q.getSearchParamsSnapshot,q.rateLimitFactor,s,C]);return[(0,r.useMemo)(()=>L(A,C),[A,C]),R]}function x(e,t,r,n,i,a){let s=!1,l=Object.entries(e).reduce((e,[l,o])=>{let u=t?.[l]??l,c=n[u],d="multi"===o.type?[]:null,h=void 0===c?("multi"===o.type?r?.getAll(u):r?.get(u))??d:c;return i&&a&&q(i[u]??d,h)?e[l]=a[l]??null:(s=!0,e[l]=(f(h)?null:P(o.parse,h,u))??null,i&&(i[u]=h)),e},{});if(!s){let t=Object.keys(e),r=Object.keys(a??{});s=t.length!==r.length||t.some(e=>!r.includes(e))}return{state:l,hasChanged:s}}function L(e,t){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??t[r]??null]))}e.s(["createParser",0,k,"parseAsInteger",0,_,"parseAsString",0,C,"parseAsStringEnum",0,function(e){return j(e)},"parseAsStringLiteral",0,j,"useQueryState",0,function(e,t={}){let{parse:n,type:i,serialize:a,eq:s,defaultValue:l,...o}=t,[{[e]:u},c]=F({[e]:{parse:n??(e=>e),type:i,serialize:a,eq:s,defaultValue:l}},o);return[u,(0,r.useCallback)((t,r={})=>c(r=>({[e]:"function"==typeof t?t(r[e]):t}),r),[e,c])]},"useQueryStates",0,F],695894)}]); 4 5//# debugId=6cfeb198-76d6-375b-b9b9-b0899dc1e448
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.