PageSourceSearch

https://www.getdbt.com/_next/static/chunks/3170.96124340d018cc98.js

js getdbt.com collected 2026-09-24 07:26:44 UTC 415,333 bytes, 293 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3170],{3533:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});let r=e=>"object"==typeof e&&null!==e},7199:(e,t,n)=>{var r=n(36786),i=n(47275),o=n(16382),a=n(48545),s=1/0,l=r?r.prototype:void 0,u=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-s?"-0":n}},10904:(e,t,n)=>{var r=n(97989),i=n(92937),o=n(87247),a=n(41921);e.exports=function(e){return function(t){var n=i(t=a(t))?o(t):void 0,s=n?n[0]:t.charAt(0),l=n?r(n,1).join(""):t.slice(1);return s[e]()+l}}},14418:e=>{var t="\ud800-\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="['’]",s="["+o+"]",l="["+r+"]",u="[^"+t+o+"\\d+"+n+r+i+"]",c="(?:\ud83c[\udde6-\uddff]){2}",d="[\ud800-\udbff][\udc00-\udfff]",h="["+i+"]",f="(?:"+l+"|"+u+")",p="(?:"+h+"|"+u+")",m="(?:"+a+"(?:d|ll|m|re|s|t|ve))?",g="(?:"+a+"(?:D|LL|M|RE|S|T|VE))?",y="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",v="[\\ufe0e\\ufe0f]?",b="(?:\\u200d(?:"+["[^"+t+"]",c,d].join("|")+")"+v+y+")*",x="(?:"+["["+n+"]",c,d].join("|")+")"+(v+y+b),w=RegExp([h+"?"+l+"+"+m+"(?="+[s,h,"$"].join("|")+")",p+"+"+g+"(?="+[s,h+f,"$"].join("|")+")",h+"?"+f+"+"+m,h+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",x].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},16382:e=>{e.exports=Array.isArray},18956:(e,t,n)=>{"use strict";e.exports=n(74238)},23847:(e,t,n)=>{"use strict";n.d(t,{M:()=>i});var r=n(7620);function i(e){let t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}},26472:(e,t,n)=>{"use strict";n.d(t,{xQ:()=>o});var r=n(7620),i=n(42015);function o(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,r.useContext)(i.t);if(null===t)return[!0,null];let{isPresent:n,onExitComplete:o,register:a}=t,s=(0,r.useId)();(0,r.useEffect)(()=>{if(e)return a(s)},[e]);let l=(0,r.useCallback)(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,l]:[!0]}},27015:(e,t,n)=>{e.exports=n(10904)("toUpperCase")},27523:e=>{e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},33560:(e,t,n)=>{"use strict";n.d(t,{tb:()=>W});var r,i,o=[],a="ResizeObserver loop completed with undelivered notifications.",s=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:a}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=a),window.dispatchEvent(e)};!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(r||(r={}));var l=function(e){return Object.freeze(e)},u=function(e,t){this.inlineSize=e,this.blockSize=t,l(this)},c=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,l(this)}return e.prototype.toJSON=function(){return{x:this.x,y:this.y,top:this.top,right:this.right,bottom:this.bottom,left:this.left,width:this.width,height:this.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),d=function(e){return e instanceof SVGElement&&"getBBox"in e},h=function(e){if(d(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e.offsetWidth,o=e.offsetHeight;return!(i||o||e.getClientRects().length)},f=function(e){if(e instanceof Element)return!0;var t,n=null==(t=null==e?void 0:e.ownerDocument)?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},p=function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},m="undefined"!=typeof window?window:{},g=new WeakMap,y=/auto|scroll/,v=/^tb|vertical/,b=/msie|trident/i.test(m.navigator&&m.navigator.userAgent),x=function(e){return parseFloat(e||"0")},w=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new u((n?t:e)||0,(n?e:t)||0)},S=l({devicePixelContentBoxSize:w(),borderBoxSize:w(),contentBoxSize:w(),contentRect:new c(0,0,0,0)}),k=function(e,t){if(void 0===t&&(t=!1),g.has(e)&&!t)return g.get(e);if(h(e))return g.set(e,S),S;var n=getComputedStyle(e),r=d(e)&&e.ownerSVGElement&&e.getBBox(),i=!b&&"border-box"===n.boxSizing,o=v.test(n.writingMode||""),a=!r&&y.test(n.overflowY||""),s=!r&&y.test(n.overflowX||""),u=r?0:x(n.paddingTop),f=r?0:x(n.paddingRight),p=r?0:x(n.paddingBottom),m=r?0:x(n.paddingLeft),k=r?0:x(n.borderTopWidth),E=r?0:x(n.borderRightWidth),j=r?0:x(n.borderBottomWidth),C=r?0:x(n.borderLeftWidth),A=m+f,T=u+p,M=C+E,P=k+j,_=s?e.offsetHeight-P-e.clientHeight:0,I=a?e.offsetWidth-M-e.clientWidth:0,R=r?r.width:x(n.width)-(i?A+M:0)-I,O=r?r.height:x(n.height)-(i?T+P:0)-_,$=R+A+I+M,D=O+T+_+P,L=l({devicePixelContentBoxSize:w(Math.round(R*devicePixelRatio),Math.round(O*devicePixelRatio),o),borderBoxSize:w($,D,o),contentBoxSize:w(R,O,o),contentRect:new c(m,u,R,O)});return g.set(e,L),L},E=function(e,t,n){var i=k(e,n),o=i.borderBoxSize,a=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(t){case r.DEVICE_PIXEL_CONTENT_BOX:return s;case r.BORDER_BOX:return o;default:return a}},j=function(e){var t=k(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=l([t.borderBoxSize]),this.contentBoxSize=l([t.contentBoxSize]),this.devicePixelContentBoxSize=l([t.devicePixelContentBoxSize])},C=function(e){if(h(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},A=function(){var e=1/0,t=[];o.forEach(function(n){if(0!==n.activeTargets.length){var r=[];
1n.activeTargets.forEach(function(t){var n=new j(t.target),i=C(t.target);r.push(n),t.lastReportedSize=E(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0;n<t.length;n++)(0,t[n])();return e},T=function(e){o.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(C(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},M=function(){var e=0;for(T(0);o.some(function(e){return e.activeTargets.length>0});)T(e=A());return o.some(function(e){return e.skippedTargets.length>0})&&s(),e>0},P=[],_=function(e){if(!i){var t=0,n=document.createTextNode("");new MutationObserver(function(){return P.splice(0).forEach(function(e){return e()})}).observe(n,{characterData:!0}),i=function(){n.textContent="".concat(t?t--:t++)}}P.push(e),i()},I=function(e){_(function(){requestAnimationFrame(e)})},R=0,O={attributes:!0,characterData:!0,childList:!0,subtree:!0},$=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],D=function(e){return void 0===e&&(e=0),Date.now()+e},L=!1,V=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!L){L=!0;var n=D(e);I(function(){var r=!1;try{r=M()}finally{if(L=!1,e=n-D(),!R)return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,O)};document.body?t():m.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),$.forEach(function(t){return m.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),$.forEach(function(t){return m.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}()),z=function(e){!R&&e>0&&V.start(),(R+=e)||V.stop()},N=function(){function e(e,t){this.target=e,this.observedBox=t||r.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=E(this.target,this.observedBox,!0);return d(e=this.target)||p(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),F=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},B=new WeakMap,U=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return -1},H=function(){function e(){}return e.connect=function(e,t){var n=new F(e,t);B.set(e,n)},e.observe=function(e,t,n){var r=B.get(e),i=0===r.observationTargets.length;0>U(r.observationTargets,t)&&(i&&o.push(r),r.observationTargets.push(new N(t,n&&n.box)),z(1),V.schedule())},e.unobserve=function(e,t){var n=B.get(e),r=U(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&o.splice(o.indexOf(n),1),n.observationTargets.splice(r,1),z(-1))},e.disconnect=function(e){var t=this,n=B.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),W=function(){function e(e){if(0==arguments.length)throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");H.connect(this,e)}return e.prototype.observe=function(e,t){if(0==arguments.length)throw TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!f(e))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");H.observe(this,e,t)},e.prototype.unobserve=function(e){if(0==arguments.length)throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!f(e))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");H.unobserve(this,e)},e.prototype.disconnect=function(){H.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}()}
1,35612:(e,t,n)=>{e.exports=n(86187)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"})},36786:(e,t,n)=>{e.exports=n(38126).Symbol},38126:(e,t,n)=>{var r=n(58379),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=r||i||Function("return this")()},38615:(e,t,n)=>{var r=n(35612),i=n(41921),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
17f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(o,r).replace(a,"")}},39070:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});let r=(0,n(7620).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},39913:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},41921:(e,t,n)=>{var r=n(7199);e.exports=function(e){return null==e?"":r(e)}},42015:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});let r=(0,n(7620).createContext)(null)},43561:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},45860:(e,t,n)=>{var r=n(36786),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},46392:(e,t,n)=>{"use strict";n.d(t,{me:()=>ef,sR:()=>em,JW:()=>g});let r=["gray","blue","purple","magenta","red","orange","yellow","green","cyan"],i=["50","100","200","300","400","500","600","700","800","900","950"],o={black:{title:"Black",hex:"#0d0e12"},white:{title:"White",hex:"#ffffff"},gray:{50:{title:"Gray 50",hex:"#f6f6f8"},100:{title:"Gray 100",hex:"#eeeef1"},200:{title:"Gray 200",hex:"#e3e4e8"},300:{title:"Gray 300",hex:"#bbbdc9"},400:{title:"Gray 400",hex:"#9499ad"},500:{title:"Gray 500",hex:"#727892"},600:{title:"Gray 600",hex:"#515870"},700:{title:"Gray 700",hex:"#383d51"},800:{title:"Gray 800",hex:"#252837"},900:{title:"Gray 900",hex:"#1b1d27"},950:{title:"Gray 950",hex:"#13141b"}},blue:{50:{title:"Blue 50",hex:"#f5f8ff"},100:{title:"Blue 100",hex:"#e5edff"},200:{title:"Blue 200",hex:"#dbe5ff"},300:{title:"Blue 300",hex:"#a8bfff"},400:{title:"Blue 400",hex:"#7595ff"},500:{title:"Blue 500",hex:"#556bfc"},600:{title:"Blue 600",hex:"#4043e7"},700:{title:"Blue 700",hex:"#2927aa"},800:{title:"Blue 800",hex:"#192457"},900:{title:"Blue 900",hex:"#161a41"},950:{title:"Blue 950",hex:"#101228"}},purple:{50:{title:"Purple 50",hex:"#f8f5ff"},100:{title:"Purple 100",hex:"#f1ebff"},200:{title:"Purple 200",hex:"#ece1fe"},300:{title:"Purple 300",hex:"#ccb1fc"},400:{title:"Purple 400",hex:"#b087f7"},500:{title:"Purple 500",hex:"#8f57ef"},600:{title:"Purple 600",hex:"#721fe5"},700:{title:"Purple 700",hex:"#4c1a9e"},800:{title:"Purple 800",hex:"#2f1862"},900:{title:"Purple 900",hex:"#23173f"},950:{title:"Purple 950",hex:"#181128"}},magenta:{50:{title:"Magenta 50",hex:"#fef6f9"},100:{title:"Magenta 100",hex:"#fde8ef"},200:{title:"Magenta 200",hex:"#fcdee9"},300:{title:"Magenta 300",hex:"#f7abc5"},400:{title:"Magenta 400",hex:"#f0709b"},500:{title:"Magenta 500",hex:"#e72767"},600:{title:"Magenta 600",hex:"#b11651"},700:{title:"Magenta 700",hex:"#7c1342"},800:{title:"Magenta 800",hex:"#4b1130"},900:{title:"Magenta 900",hex:"#341325"},950:{title:"Magenta 950",hex:"#1f0f14"}},red:{50:{title:"Red 50",hex:"#fff6f5"},100:{title:"Red 100",hex:"#ffe7e5"},200:{title:"Red 200",hex:"#ffdedc"},300:{title:"Red 300",hex:"#fdada5"},400:{title:"Red 400",hex:"#f77769"},500:{title:"Red 500",hex:"#ef4434"},600:{title:"Red 600",hex:"#cc2819"},700:{title:"Red 700",hex:"#8b2018"},800:{title:"Red 800",hex:"#4d1714"},900:{title:"Red 900",hex:"#321615"},950:{title:"Red 950",hex:"#1e1011"}},orange:{50:{title:"Orange 50",hex:"#fff7f0"},100:{title:"Orange 100",hex:"#ffeadb"},200:{title:"Orange 200",hex:"#ffddc7"},300:{title:"Orange 300",hex:"#ffb685"},400:{title:"Orange 400",hex:"#ff8e42"},500:{title:"Orange 500",hex:"#fa6400"},600:{title:"Orange 600",hex:"#b14802"},700:{title:"Orange 700",hex:"#7c3404"},800:{title:"Orange 800",hex:"#461e07"},900:{title:"Orange 900",hex:"#32160b"},950:{title:"Orange 950",hex:"#21120d"}},yellow:{50:{title:"Yellow 50",hex:"#fefae1"},100:{title:"Yellow 100",hex:"#fcf3bb"},200:{title:"Yellow 200",hex:"#f9e994"},300:{title:"Yellow 300",hex:"#f7d455"},400:{title:"Yellow 400",hex:"#f9bc15"},500:{title:"Yellow 500",hex:"#d28a04"},600:{title:"Yellow 600",hex:"#965908"},700:{title:"Yellow 700",hex:"#653a0b"},800:{title:"Yellow 800",hex:"#3b220c"},900:{title:"Yellow 900",hex:"#271a11"},950:{title:"Yellow 950",hex:"#181410"}},green:{50:{title:"Green 50",hex:"#e7fef5"},100:{title:"Green 100",hex:"#c5fce8"},200:{title:"Green 200",hex:"#a9f9dc"},300:{title:"Green 300",hex:"#59f3ba"},400:{title:"Green 400",hex:"#0ff0a1"},500:{title:"Green 500",hex:"#04b97a"},600:{title:"Green 600",hex:"#01794f"},700:{title:"Green 700",hex:"#015133"},800:{title:"Green 800",hex:"#023120"},900:{title:"Green 900",hex:"#06231a"},950:{title:"Green 950",hex:"#071715"}},cyan:{50:{title:"Cyan 50",hex:"#e7fefe"},100:{title:"Cyan 100",hex:"#c5fcfc"},200:{title:"Cyan 200",hex:"#96f8f8"},300:{title:"Cyan 300",hex:"#62efef"},400:{title:"Cyan 400",hex:"#18e2e2"},500:{title:"Cyan 500",hex:"#04b8be"},600:{title:"Cyan 600",hex:"#037782"},700:{title:"Cyan 700",hex:"#024950"},800:{title:"Cyan 800",hex:"#042f34"},900:{title:"Cyan 900",hex:"#072227"},950:{title:"Cyan 950",hex:"#0d181c"}}},a={transparent:{lightest:"hsl(240, 100%, 95%)",lighter:"hsl(240, 100%, 70%)",light:"hsl(240, 100%, 65%)",base
1:"hsl(240, 100%, 50%)",dark:"hsl(240, 100%, 35%)",darker:"hsl(240, 100%, 20%)",darkest:"hsl(240, 100%, 5%)"},primary:{lightest:"hsl(240, 100%, 95%)",lighter:"hsl(240, 100%, 70%)",light:"hsl(240, 100%, 65%)",base:"hsl(240, 100%, 50%)",dark:"hsl(240, 100%, 35%)",darker:"hsl(240, 100%, 20%)",darkest:"hsl(240, 100%, 5%)"},positive:{lightest:"hsl(120, 100%, 95%)",lighter:"hsl(120, 100%, 70%)",light:"hsl(120, 100%, 65%)",base:"hsl(120, 100%, 50%)",dark:"hsl(120, 100%, 35%)",darker:"hsl(120, 100%, 20%)",darkest:"hsl(120, 100%, 5%)"},caution:{lightest:"hsl(60, 100%, 95%)",lighter:"hsl(60, 100%, 70%)",light:"hsl(60, 100%, 65%)",base:"hsl(60, 100%, 50%)",dark:"hsl(60, 100%, 35%)",darker:"hsl(60, 100%, 20%)",darkest:"hsl(60, 100%, 5%)"},critical:{lightest:"hsl(0, 100%, 95%)",lighter:"hsl(0, 100%, 70%)",light:"hsl(0, 100%, 65%)",base:"hsl(0, 100%, 50%)",dark:"hsl(0, 100%, 35%)",darker:"hsl(0, 100%, 20%)",darkest:"hsl(0, 100%, 5%)"}};a.transparent.darkest,a.transparent.lightest,a.transparent.lightest,a.transparent.darkest,a.transparent.darker,a.transparent.lighter,a.transparent.base,a.transparent.base,a.primary.darkest,a.primary.lightest,a.primary.lightest,a.primary.darkest,a.primary.darker,a.primary.lighter,a.primary.base,a.primary.base,a.positive.darkest,a.positive.lightest,a.positive.lightest,a.positive.darkest,a.positive.darker,a.positive.lighter,a.positive.base,a.positive.base,a.caution.darkest,a.caution.lightest,a.caution.lightest,a.caution.darkest,a.caution.darker,a.caution.lighter,a.caution.base,a.caution.base,a.critical.darkest,a.critical.lightest,a.critical.lightest,a.critical.darkest,a.critical.darker,a.critical.lighter,a.critical.base,a.critical.base;let s={avatar:{sizes:[{distance:-4,size:19},{distance:-4,size:25},{distance:-8,size:33},{distance:-12,size:49}],focusRing:{offset:1,width:1}},button:{textWeight:"medium",border:{width:1},focusRing:{offset:-1,width:1}},card:{border:{width:1},focusRing:{offset:-1,width:1},shadow:{outline:.5}},container:[320,640,960,1280,1600,1920],media:[360,600,900,1200,1800,2400],layer:{dialog:{zOffset:600},popover:{zOffset:400},tooltip:{zOffset:200}},radius:[0,1,3,6,9,12,21],shadow:[null,{umbra:[0,0,0,0],penumbra:[0,0,0,0],ambient:[0,0,0,0]},{umbra:[0,3,5,-2],penumbra:[0,6,10,0],ambient:[0,1,18,1]},{umbra:[0,7,8,-4],penumbra:[0,12,17,2],ambient:[0,5,22,4]},{umbra:[0,9,11,-5],penumbra:[0,18,28,2],ambient:[0,7,34,6]},{umbra:[0,11,15,-7],penumbra:[0,24,38,3],ambient:[0,9,46,8]}],space:[0,4,8,12,20,32,52,84,136,220],input:{border:{width:1},checkbox:{size:17,focusRing:{offset:-1,width:1}},radio:{size:17,markSize:9,focusRing:{offset:-1,width:1}},switch:{width:25,height:17,padding:5,transitionDurationMs:150,transitionTimingFunction:"ease-out",focusRing:{offset:1,width:1}},select:{focusRing:{offset:-1,width:1}},text:{focusRing:{offset:-1,width:1}}},style:{button:{root:{transition:"background-color 100ms,border-color 100ms,color 100ms"}}}},l={code:{family:"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:19,iconSize:29,lineHeight:27,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:22,iconSize:33,lineHeight:31,letterSpacing:0}]},heading:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:700,medium:800,semibold:900,bold:900},sizes:[{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:17,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:16,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:21,iconSize:33,lineHeight:29,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:27,iconSize:41,lineHeight:35,letterSpacing:0},{ascenderHeight:9.5,descenderHeight:8.5,fontSize:33,iconSize:49,lineHeight:41,letterSpacing:0},{ascenderHeight:10.5,descenderHeight:9.5,fontSize:38,iconSize:53,lineHeight:47,letterSpacing:0}]},label:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", system-ui, sans-serif',weights:{regular:600,medium:700,semibold:800,bold:900},sizes:[{ascenderHeight:2,descenderHeight:2,fontSize:8.1,iconSize:13,lineHeight:10,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:9.5,iconSize:15,lineHeight:11,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:10.8,iconSize:17,lineHeight:12,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:12.25,iconSize:19,lineHeight:13,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:13.6,iconSize:21,lineHeight:14,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:15,iconSize:23,lineHeight:15,letterSpacing:.5}]},text:{family:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:10,iconSize:17,lineHeight:15,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:13,iconSize:21,lineHeight:19,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:15,iconSize:25,lineHeight:23,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:18,iconSize:29,lineHeight:27,letterSpacing:0}
1,{ascenderHeight:8,descenderHeight:8,fontSize:21,iconSize:33,lineHeight:31,letterSpacing:0}]}},u=new WeakMap;function c(e){let t=u.get(e);if(t)return t;let n=h(e,e.card.enabled),r={_blend:e._blend||(e.dark?"screen":"multiply"),_dark:e.dark,accent:n.accent,avatar:n.avatar,backdrop:e.base.shadow.ambient,badge:n.badge,bg:e.base.bg,border:e.base.border,button:{default:d(e,e.button.default),ghost:d(e,e.button.ghost),bleed:d(e,e.button.bleed)},code:n.code,fg:e.base.fg,focusRing:e.base.focusRing,icon:n.muted.fg,input:{default:f(e.input.default),invalid:f(e.input.invalid)},kbd:n.kbd,link:n.link,muted:{...n.muted,bg:e.selectable?.default.enabled.bg2||e.base.bg},selectable:d(e,e.selectable||e.muted),shadow:e.base.shadow,skeleton:{from:e.skeleton?.from||e.base.border,to:e.skeleton?.to||e.base.border},syntax:e.syntax};return u.set(e,r),r}function d(e,t){return{default:{enabled:h(e,t.default.enabled),hovered:h(e,t.default.hovered),pressed:h(e,t.default.pressed),selected:h(e,t.default.selected),disabled:h(e,t.default.disabled)},neutral:{enabled:h(e,t.default.enabled),hovered:h(e,t.default.hovered),pressed:h(e,t.default.pressed),selected:h(e,t.default.selected),disabled:h(e,t.default.disabled)},primary:{enabled:h(e,t.primary.enabled),hovered:h(e,t.primary.hovered),pressed:h(e,t.primary.pressed),selected:h(e,t.primary.selected),disabled:h(e,t.primary.disabled)},suggest:{enabled:h(e,t.primary.enabled),hovered:h(e,t.primary.hovered),pressed:h(e,t.primary.pressed),selected:h(e,t.primary.selected),disabled:h(e,t.primary.disabled)},positive:{enabled:h(e,t.positive.enabled),hovered:h(e,t.positive.hovered),pressed:h(e,t.positive.pressed),selected:h(e,t.positive.selected),disabled:h(e,t.positive.disabled)},caution:{enabled:h(e,t.caution.enabled),hovered:h(e,t.caution.hovered),pressed:h(e,t.caution.pressed),selected:h(e,t.caution.selected),disabled:h(e,t.caution.disabled)},critical:{enabled:h(e,t.critical.enabled),hovered:h(e,t.critical.hovered),pressed:h(e,t.critical.pressed),selected:h(e,t.critical.selected),disabled:h(e,t.critical.disabled)}}}function h(e,t){return{...t,avatar:{gray:{bg:e.spot.gray,fg:e.base.bg},blue:{bg:e.spot.blue,fg:e.base.bg},purple:{bg:e.spot.purple,fg:e.base.bg},magenta:{bg:e.spot.magenta,fg:e.base.bg},red:{bg:e.spot.red,fg:e.base.bg},orange:{bg:e.spot.orange,fg:e.base.bg},yellow:{bg:e.spot.yellow,fg:e.base.bg},green:{bg:e.spot.green,fg:e.base.bg},cyan:{bg:e.spot.cyan,fg:e.base.bg}},badge:{default:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,dot:e.muted.default.enabled.muted.fg,icon:e.muted.default.enabled.muted.fg},neutral:{bg:e.muted.transparent.enabled.bg,fg:e.muted.transparent.enabled.fg,dot:e.muted.transparent.enabled.muted.fg,icon:e.muted.transparent.enabled.muted.fg},primary:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},suggest:{bg:e.muted.primary.enabled.bg,fg:e.muted.primary.enabled.fg,dot:e.muted.primary.enabled.muted.fg,icon:e.muted.primary.enabled.muted.fg},positive:{bg:e.muted.positive.enabled.bg,fg:e.muted.positive.enabled.fg,dot:e.muted.positive.enabled.muted.fg,icon:e.muted.positive.enabled.muted.fg},caution:{bg:e.muted.caution.enabled.bg,fg:e.muted.caution.enabled.fg,dot:e.muted.caution.enabled.muted.fg,icon:e.muted.caution.enabled.muted.fg},critical:{bg:e.muted.critical.enabled.bg,fg:e.muted.critical.enabled.fg,dot:e.muted.critical.enabled.muted.fg,icon:e.muted.critical.enabled.muted.fg}},kbd:{bg:e.muted.default.enabled.bg,fg:e.muted.default.enabled.fg,border:e.muted.default.enabled.border},muted:{...e.muted.default.enabled.muted,bg:t.bg2||t.bg},skeleton:{from:t.skeleton?.from||t.border,to:t.skeleton?.to||t.border}}}function f(e){return{enabled:p(e.enabled),disabled:p(e.disabled),readOnly:p(e.readOnly),hovered:p(e.hovered)}}function p(e){return{bg:e.bg,border:e.border,fg:e.fg,muted:{bg:e.bg2},placeholder:e.placeholder}}let m=new WeakMap;function g(e){if(e.sanity.v2?._resolved)return e.sanity.v2;let t=m.get(e);if(t)return t;let n={_version:2,_resolved:!0,avatar:{...s.avatar,...e.sanity.avatar},button:{...s.button,...e.sanity.button},card:s.card,color:c(e.sanity.color),container:e.sanity.container,font:e.sanity.fonts,input:{...s.input,...e.sanity.input,checkbox:{...s.input.checkbox,...e.sanity.input.checkbox},radio:{...s.input.radio,...e.sanity.input.radio},switch:{...s.input.switch,...e.sanity.input.switch}},layer:e.sanity.layer??s.layer,media:e.sanity.media,radius:e.sanity.radius,shadow:e.sanity.shadows,space:e.sanity.space,style:e.sanity.styles};return m.set(e,n),n}function y(e){return 2===e._version}let v=new WeakMap;function b(e,t,n){Object.defineProperty(e,t,{get(){let r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,writable:!1,
1configurable:!1}),r},enumerable:!0,configurable:!0})}let x=new WeakMap,w=["transparent","default","primary","positive","caution","critical"];function S(e,t){let n={};for(let r of w)b(n,r,()=>{var n;return{base:{bg:(n=t[e][r]).bg,fg:n.fg,border:n.border,focusRing:n.focusRing,shadow:n.shadow},button:n.button,card:n.selectable.default,dark:n._dark,input:{default:E(n.input.default),invalid:E(n.input.invalid)},muted:{...n.button.ghost,transparent:n.button.ghost.default},solid:{...n.button.default,transparent:n.button.default.default},selectable:n.selectable,spot:{gray:n.avatar.gray.bg,blue:n.avatar.blue.bg,purple:n.avatar.purple.bg,magenta:n.avatar.magenta.bg,red:n.avatar.red.bg,orange:n.avatar.orange.bg,yellow:n.avatar.yellow.bg,green:n.avatar.green.bg,cyan:n.avatar.cyan.bg},syntax:n.syntax}});return n}function k(e){let t=x.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,font:a,input:s,media:l,radius:u,shadow:c,space:d,style:h}=e,f={};b(f,"light",()=>S("light",i)),b(f,"dark",()=>S("dark",i));let p={_version:0,avatar:n,button:r,container:o,color:f,focusRing:s.text.focusRing,fonts:a,input:s,media:l,radius:u,shadows:c,space:d,styles:h,v2:e};return x.set(e,p),p}function E(e){return{enabled:j(e.enabled),disabled:j(e.disabled),readOnly:j(e.readOnly),hovered:j(e.hovered)}}function j(e){return{bg:e.bg,bg2:e.muted.bg,border:e.border,fg:e.fg,placeholder:e.placeholder}}let C=["multiply","screen"],A=["transparent","default","neutral","primary","suggest","positive","caution","critical"],T=["default","neutral","primary","suggest","positive","caution","critical"],M=["enabled","hovered","pressed","selected","disabled"],P=["default","ghost","bleed"],_=["default","invali
1d"],I=["enabled","hovered","readOnly","disabled"];function R(e){return i.includes(e)}function O(e){return/^\d+%$/.test(e)}function $(e){var t;let n=e.split("/"),i=n.shift()||"",[o,a]=i.split(" ");if(R(o)){let e=n.shift()||"";return O(a)?{type:"color",tint:o,mix:Number(a.slice(0,-1))/100}:D(e)?{type:"color",tint:o,opacity:Number(e)}:{type:"color",tint:o}}if("black"===(t=o)||"white"===t){let e=n.shift()||"";return O(a)?{type:"color",key:o,mix:Number(a.slice(0,-1))/100}:D(e)?{type:"color",key:o,opacity:Number(e)}:{type:"color",key:o}}if(r.includes(o)){let[e,t]=(i=n.shift()||"").split(" ");if(R(e)){let r=n.shift()||"";return O(t)?{type:"color",hue:o,tint:e,mix:Number(t.slice(0,-1))/100}:D(r)?{type:"color",hue:o,tint:e,opacity:Number(r)}:{type:"color",hue:o,tint:e}}return{type:"hue",value:o}}if(C.includes(o))return{type:"blendMode",value:o}}function D(e){return"0"===e||/^0\.[0-9]+$/.test(e)||"1"===e}[...r],[...A],[...T],[...M],[..._],[...I];let L=["500","500"];function V(e,t=L){var n;let r,{hue:i,scheme:o}=e,a=$(t[+("light"!==o)]);if(!a||"color"!==a.type)throw Error(`Invalid color token: ${t[0]}`);return n={...a,hue:a.hue||i},r="",r="black"===n.key||"white"===n.key?n.key:`${n.hue}/${n.tint}`,void 0!==n.mix?`${r} ${100*n.mix}%`:(void 0!==n.opacity&&(r+=`/${n.opacity}`),r)}let z={base:{"*":{_blend:["multiply","screen"],accent:{fg:["purple/600","purple/400"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},backdrop:["gray/200/0.5","black/0.5"],badge:{"*":{bg:["100","900"],fg:["600","400"],icon:["500","500"],dot:["500","500"]},positive:{bg:["200 50%","900"],fg:["600","500"]},caution:{bg:["200 50%","900"],fg:["600","500"]}},bg:["50","950"],border:["200","800"],code:{bg:["50","950"],fg:["600","400"]},fg:["800","200"],focusRing:["blue/500","blue/500"],icon:["600","400"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/600","blue/300"]},muted:{bg:["50","950"],fg:["700 75%","300 75%"]},shadow:{outline:["500/0.3","500/0.4"],umbra:["gray/500/0.1","black/0.2"],penumbra:["gray/500/0.07","black/0.14"],ambient:["gray/500/0.06","black/0.12"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},transparent:{bg:["50","black"]},default:{bg:["white","950"],fg:["800","200"],muted:{fg:["600","400"]}},primary:{_hue:"blue"},suggest:{_hue:"purple"},positive:{_hue:"green",shadow:{outline:["500/0.4","500/0.4"]}},caution:{_hue:"yellow",shadow:{outline:["600/0.3","500/0.4"]}},critical:{_hue:"red"}},button:{default:{"*":{"*":{_blend:["screen","multiply"],accent:{fg:["purple/300","purple/700"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["900","100"],fg:["400","600"],dot:["500","500"],icon:["500","500"]}},bg:["500","400"],border:["500/0","400/0"],code:{bg:["500 20%","400 20%"],fg:["200","600"]},fg:["white","black"],icon:["100 70%","900 70%"],kbd:{bg:["black","white"],fg:["200","600"],border:["800","200"]},link:{fg:["blue/200","blue/600"]},muted:{bg:["950","50"],fg:["100 70%","900 70%"]},skeleton:{from:["900","100"],to:["900 50%","100 50%"]}},hovered:{bg:["600","300"],border:["700/0","300/0"]},pressed:{bg:["700","300"]},selected:{bg:["700","300"]},disabled:{_hue:"gray",accent:{fg:["100 70%","900 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/500","gray/400"],fg:["white","black"]}},badge:{"*":{bg:["gray/700","gray/300"],fg:["white","black"],dot:["white","black"],icon:["white","black"]}},bg:["300","600"],code:{bg:["950","50"],fg:["300","600"]},fg:["300","600"],muted:{bg:["950","50"],fg:["300","600"]},kbd:{bg:["black","white"],fg:["white","black"],border:["700","300"]},link:{fg:["100 70%","900 70%"]}}},default:{"*":{avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},bg:["800","200"],muted:{bg:["950","50"],fg:["400","600"]}},hovered:{bg:["900","100"]},pressed:{bg:["black","white"]},selected:{bg:["black","white"]}}},ghost:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 60%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["50","950"],border:["100","900"],code:{bg:["500 10%","400 10%"],fg:["700 60%","400 60%"]},fg:["600","400"],icon:["700 60%","300 60%"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/700 60%","blue/300 60%"]},muted:{bg:["100","950"],fg:["700 60%","300 60%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["100","900"],fg:["700","300"]},pressed:{bg:["200","800"],fg:["800","200"]},selected:{bg:["200","800"],fg:["800","200"]},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}}
1,badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},border:["100","900"],code:{bg:["50","950"],fg:["200","800"]},fg:["400","600"],icon:["300","700"],muted:{fg:["300","700"]},kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]}}},positive:{"*":{border:["600 20%","800"]}},caution:{"*":{border:["600 20%","800"]}}},bleed:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 70%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["white","black"],border:["white/0","black/0"],code:{bg:["50","950"],fg:["700 75%","300 75%"]},fg:["700","300"],icon:["700 75%","300 75%"],kbd:{bg:["white","black"],fg:["700","300"],border:["200","800"]},link:{fg:["blue/700 70%","blue/300 70%"]},muted:{bg:["100","950"],fg:["700 75%","300 75%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["50","900"],fg:["800","200"],icon:["800 70%","300 70%"]},pressed:{bg:["100","800"],fg:["800","200"],icon:["800 70%","200 70%"]},selected:{bg:["100","900"],fg:["800","200"],icon:["800 60%","200 60%"]},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}},badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},code:{bg:["50","950"],fg:["200","800"]},fg:["400","600"],icon:["300","700"],muted:{fg:["400","600"]},kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]}}}}},input:{"*":{"*":{_blend:["multiply","screen"],bg:["white","black"],border:["200","700"],fg:["black","200"],muted:{bg:["50","950"]},placeholder:["400","600"]},hovered:{border:["300","700"]},readOnly:{bg:["50","950"],border:["200","800"],fg:["800","200"]},disabled:{bg:["50","950"],fg:["400","600"],border:["100","900"],placeholder:["200","800 50%"]}},invalid:{"*":{_hue:"red",bg:["100","950"]}}},selectable:{"*":{"*":{_blend:["multiply","screen"],accent:{fg:["purple/700 70%","purple/300 70%"]},avatar:{"*":{_blend:["screen","multiply"],bg:["500","400"],fg:["white","black"]}},badge:{"*":{bg:["100","900"],fg:["600","400"],dot:["500","500"],icon:["500","500"]}},bg:["white","black"],border:["200","800"],code:{bg:["50","950"],fg:["600","400"]},fg:["700","300"],icon:["700 75%","300 75%"],kbd:{bg:["white","black"],fg:["600","400"],border:["200","800"]},link:{fg:["blue/700 70%","blue/300 70%"]},muted:{bg:["50","950"],fg:["700 75%","300 75%"]},skeleton:{from:["100","900"],to:["100 50%","900 50%"]}},hovered:{bg:["50","950"]},pressed:{bg:["100","900"]},selected:{_blend:["screen","multiply"],accent:{fg:["purple/300","purple/700"]},avatar:{"*":{_blend:["multiply","screen"],bg:["white","black"],fg:["black","white"]}},badge:{"*":{bg:["900","100"],fg:["400","600"],dot:["500","500"],icon:["500","500"]}},bg:["500","400"],border:["500 20%","400 20%"],code:{bg:["500 20%","400 20%"],fg:["200","600"]},fg:["white","black"],icon:["100 70%","900 70%"],kbd:{bg:["black","white"],fg:["200","600"],border:["800","200"]},link:{fg:["blue/200","blue/600"]},muted:{bg:["500 10%","400 10%"],fg:["100 70%","900 70%"]},skeleton:{from:["900","100"],to:["900 50%","100 50%"]}},disabled:{_hue:"gray",accent:{fg:["200","800"]},avatar:{"*":{_blend:["screen","multiply"],bg:["gray/100","gray/900"],fg:["white","black"]}},badge:{"*":{_hue:"gray",bg:["50","950"],fg:["gray/200","gray/800"],dot:["gray/200","gray/800"],icon:["gray/200","gray/800"]}},border:["100","900"],code:{bg:["50","950"],fg:["200","800"]},fg:["200","800"],icon:["200","800"],kbd:{bg:["white","black"],fg:["200","800"],border:["100","900"]},link:{fg:["200","800"]},muted:{bg:["50 50%","950 50%"],fg:["200","800"]}}},default:{selected:{_hue:"blue"}},critical:{disabled:{bg:["50 50%","950 50%"]}}},syntax:{atrule:["purple/600","purple/400"],attrName:["green/600","green/400"],attrValue:["yellow/600","yellow/400"],attribute:["yellow/600","yellow/400"],boolean:["purple/600","purple/400"],builtin:["purple/600","purple/400"],c
1data:["yellow/600","yellow/400"],char:["yellow/600","yellow/400"],class:["orange/600","orange/400"],className:["cyan/600","cyan/400"],comment:["gray/400","gray/600"],constant:["purple/600","purple/400"],deleted:["red/600","red/400"],entity:["red/600","red/400"],function:["green/600","green/400"],hexcode:["blue/600","blue/400"],id:["purple/600","purple/400"],important:["purple/600","purple/400"],inserted:["yellow/600","yellow/400"],keyword:["magenta/600","magenta/400"],number:["purple/600","purple/400"],operator:["magenta/600","magenta/400"],property:["blue/600","blue/400"],pseudoClass:["yellow/600","yellow/400"],pseudoElement:["yellow/600","yellow/400"],punctuation:["gray/600","gray/400"],regex:["blue/600","blue/400"],selector:["red/600","red/400"],string:["yellow/600","yellow/400"],symbol:["purple/600","purple/400"],tag:["red/600","red/400"],unit:["orange/600","orange/400"],url:["red/600","red/400"],variable:["red/600","red/400"]}};function N(e){return!!(e&&"object"==typeof e&&!Array.isArray(e))}function F(...e){let t=e.filter(Boolean);return 0===t.length?{}:t.reduce(B,{})}function B(e,t){for(let n of Object.keys(t)){let r=e[n],i=t[n];N(r)&&N(i)?e[n]=F(r,i):e[n]=i}return e}function U(e,t){let{scheme:n}=e,r={};for(let e of A)b(r,e,()=>(function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{_blend:(i?._blend||["multiply","screen"])[+("light"!==n)],_dark:"dark"===n,accent:{fg:V(o,i?.accent?.fg)},avatar:H({scheme:n},i),backdrop:V(o,i?.backdrop),badge:G(i?.badge,{scheme:n},t),bg:V(o,i?.bg),border:V(o,i?.border),button:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of P)i[e]=function(e,t){let{cardTone:n,mode:r,scheme:i}=e,o={};for(let e of T)o[e]=function(e,t){let{cardTone:n,mode:r,scheme:i,tone:o}=e,a={};for(let e of M)a[e]=function(e,t){let{cardTone:n,mode:r,tone:i,scheme:o,state:a}=e,s=t?.color?.base?.[n],l=t?.color?.button?.[r]?.[i]?.[a],u=l?._hue||s?._hue||"gray",c=l?._blend||["screen","multiply"],d={hue:u,scheme:o};return{_blend:c[+("light"!==o)],accent:{fg:V(d,l?.accent?.fg)},avatar:H({scheme:o},l),badge:G(l?.badge,{scheme:o},t),bg:V(d,l?.bg),border:V(d,l?.border),code:{bg:V(d,l?.code?.bg),fg:V(d,l?.code?.fg)},fg:V(d,l?.fg),icon:V(d,l?.icon),muted:{bg:V(d,l?.muted?.bg),fg:V(d,l?.muted?.fg)},kbd:{bg:V(d,l?.kbd?.bg),fg:V(d,l?.kbd?.fg),border:V(d,l?.kbd?.border)},link:{fg:V(d,l?.link?.fg)},skeleton:{from:V(d,l?.skeleton?.from),to:V(d,l?.skeleton?.to)}}}({cardTone:n,mode:r,tone:o,scheme:i,state:e},t);return a}({cardTone:n,mode:r,scheme:i,tone:e},t);return o}({cardTone:r,scheme:n,mode:e},t);return i}({scheme:n,tone:r},t),code:{bg:V(o,i?.code?.bg),fg:V(o,i?.code?.fg)},fg:V(o,i?.fg),focusRing:V(o,i?.focusRing),icon:V(o,i?.icon),input:function(e,t){let{scheme:n,tone:r}=e;return{default:Y({mode:"default",scheme:n,tone:r},t),invalid:Y({mode:"invalid",scheme:n,tone:r},t)}}({scheme:n,tone:r},t),kbd:{bg:V(o,i?.kbd?.bg),fg:V(o,i?.kbd?.fg),border:V(o,i?.kbd?.border)},link:{fg:V(o,i?.link?.fg)},muted:{bg:V(o,i?.muted?.bg),fg:V(o,i?.muted?.fg)},selectable:function(e,t){let{scheme:n,tone:r}=e,i={};for(let e of T)i[e]=function(e,t){let{cardTone:n,scheme:r,tone:i}=e,o={};for(let e of M)o[e]=function(e,t){let{cardTone:n,scheme:r,state:i,tone:o}=e,a=t?.color?.base?.[n],s=t?.color?.selectable?.[o]?.[i],l=s?._hue||a?._hue||"gray",u=s?._blend||["screen","multiply"],c={hue:l,scheme:r};return{_blend:u[+("light"!==r)],accent:{fg:V(c,s?.accent?.fg)},avatar:H({scheme:r},s),badge:G(s?.badge,{scheme:r},t),bg:V(c,s?.bg),border:V(c,s?.border),code:{bg:V(c,s?.code?.bg),fg:V(c,s?.code?.fg)},fg:V(c,s?.fg),icon:V(c,s?.icon),muted:{bg:V(c,s?.muted?.bg),fg:V(c,s?.muted?.fg)},kbd:{bg:V(c,s?.kbd?.bg),fg:V(c,s?.kbd?.fg),border:V(c,s?.kbd?.border)},link:{fg:V(c,s?.link?.fg)},skeleton:{from:V(c,s?.skeleton?.from),to:V(c,s?.skeleton?.to)}}}({cardTone:n,tone:i,scheme:r,state:e},t);return o}({cardTone:r,scheme:n,tone:e},t);return i}({scheme:n,tone:r},t),shadow:function(e,t){let{scheme:n,tone:r}=e,i=t?.color?.base?.[r],o={hue:i?._hue||"gray",scheme:n};return{outline:V(o,i?.shadow?.outline),umbra:V(o,i?.shadow?.umbra),penumbra:V(o,i?.shadow?.penumbra),ambient:V(o,i?.shadow?.ambient)}}
1({scheme:n,tone:r},t),skeleton:{from:V(o,i?.skeleton?.from),to:V(o,i?.skeleton?.to)},syntax:function(e,t){let{scheme:n}=e,r=t?.color?.syntax,i={hue:"gray",scheme:n};return{atrule:V(i,r?.atrule),attrName:V(i,r?.attrName),attrValue:V(i,r?.attrValue),attribute:V(i,r?.attribute),boolean:V(i,r?.boolean),builtin:V(i,r?.builtin),cdata:V(i,r?.cdata),char:V(i,r?.char),class:V(i,r?.class),className:V(i,r?.className),comment:V(i,r?.comment),constant:V(i,r?.constant),deleted:V(i,r?.deleted),doctype:V(i,r?.doctype),entity:V(i,r?.entity),function:V(i,r?.function),hexcode:V(i,r?.hexcode),id:V(i,r?.id),important:V(i,r?.important),inserted:V(i,r?.inserted),keyword:V(i,r?.keyword),number:V(i,r?.number),operator:V(i,r?.operator),prolog:V(i,r?.prolog),property:V(i,r?.property),pseudoClass:V(i,r?.pseudoClass),pseudoElement:V(i,r?.pseudoElement),punctuation:V(i,r?.punctuation),regex:V(i,r?.regex),selector:V(i,r?.selector),string:V(i,r?.string),symbol:V(i,r?.symbol),tag:V(i,r?.tag),unit:V(i,r?.unit),url:V(i,r?.url),variable:V(i,r?.variable)}}({scheme:n},t)}})({scheme:n,tone:e},t));return r}function H(e,t){let{scheme:n}=e;return{gray:W({color:"gray",scheme:n},t),blue:W({color:"blue",scheme:n},t),purple:W({color:"purple",scheme:n},t),magenta:W({color:"magenta",scheme:n},t),red:W({color:"red",scheme:n},t),orange:W({color:"orange",scheme:n},t),yellow:W({color:"yellow",scheme:n},t),green:W({color:"green",scheme:n},t),cyan:W({color:"cyan",scheme:n},t)}}function W(e,t){let{color:n,scheme:r}=e,i=t?.avatar?.[n],o={hue:i?._hue||"gray",scheme:r};return{_blend:(i?._blend||["screen","multiply"])[+("light"!==r)],bg:V(o,i?.bg),fg:V(o,i?.fg)}}function G(e,t,n){let{scheme:r}=t,i={};for(let t of T)i[t]=function(e,t,n){let{scheme:r,tone:i}=t,o=e?.[i],a={hue:o?._hue||n?.color?.base?.[i]?._hue||"gray",scheme:r};return{bg:V(a,o?.bg),fg:V(a,o?.fg),dot:V(a,o?.dot),icon:V(a,o?.icon)}}(e,{scheme:r,tone:t},n);return i}function Y(e,t){let{mode:n,scheme:r,tone:i}=e;return{enabled:q({mode:n,scheme:r,state:"enabled",cardTone:i},t),hovered:q({mode:n,scheme:r,state:"hovered",cardTone:i},t),readOnly:q({mode:n,scheme:r,state:"readOnly",cardTone:i},t),disabled:q({mode:n,scheme:r,state:"disabled",cardTone:i},t)}}function q(e,t){let{cardTone:n,mode:r,scheme:i,state:o}=e,a=t?.color?.base?.[n],s=t?.color?.input?.[r]?.[o],l=s?._hue||a?._hue||"gray",u=s?._blend||["screen","multiply"],c={hue:l,scheme:i};return{_blend:u[+("light"!==i)],bg:V(c,s?.bg),border:V(c,s?.border),fg:V(c,s?.fg),muted:{bg:V(c,s?.muted?.bg)},placeholder:V(c,s?.placeholder)}}function X(e,t=0,n=1){return Math.min(n,Math.max(t,e))}function K(e,t,n,r,i){var o;return n*(1-(o=X((i-e)/(t-e))))+r*o}function Z(e){return Math.round(e)}function J(e){if(4===e.length){let t=e.slice(1,2),n=e.slice(2,3),r=e.slice(3,4);return{r:parseInt(t+t,16),g:parseInt(n+n,16),b:parseInt(r+r,16)}}return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}function Q(e){let t=Z(X(Math.round(e.r),0,255)),n=Z(X(Math.round(e.g),0,255)),r=Z(X(Math.round(e.b),0,255));return"a"in e?`rgba(${t},${n},${r},${e.a})`:"#"+(0x1000000+(t<<16)+(n<<8)+r).toString(16).slice(1)}let ee=/hsl\(\s*(\d+)\s*,\s*((\d+(?:\.\d+)?)%)\s*,\s*((\d+(?:\.\d+)?)%)\s*\)/i;function et(e){if(!e)return{r:0,g:0,b:0};if("string"!=typeof e)throw Error("parseColor: expected a string");if("#"===e[0]&&(4===e.length||7===e.length)&&function(e){for(let t of e)if(-1==="0123456789ABCDEFabcdef".indexOf(t))return!1;return!0}(e.slice(1)))return J(e);if(e.startsWith("hsl("))return function(e){let t=e.s/100,n=e.l/100,r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e.h/60%2-1)),o=n-r/2,a=0,s=0,l=0;return 0<=e.h&&e.h<60?(a=r,s=i,l=0):60<=e.h&&e.h<120?(a=i,s=r,l=0):120<=e.h&&e.h<180?(a=0,s=r,l=i):180<=e.h&&e.h<240?(a=0,s=i,l=r):240<=e.h&&e.h<300?(a=i,s=0,l=r):300<=e.h&&e.h<360&&(a=r,s=0,l=i),{r:Math.round((a+o)*255),g:Math.round((s+o)*255),b:Math.round((l+o)*255)}}(function(e){let t=ee.exec(e);if(!t)throw Error(`parseHsl: string is not a HSL color: "${e}"`);return{h:parseInt(t[1]),s:parseFloat(t[3]),l:parseFloat(t[5])}}(e));if(e.startsWith("rgba(")){let t=e.replace(/rgba\(|\)/g,"").split(",");return{r:parseInt(t[0]),g:parseInt(t[1]),b:parseInt(t[2]),a:parseFloat(t[3])}}throw Error(`parseColor: unexpected color format: "${e}"`)}let en=[0,255];function er(e,t){let{bg:n,blendMode:r,colorPalette:i}=t;if("white"===n)throw Error("Cannot blend with white background");let o=$(e);if(!o||"color"!==o.type)throw Error(`Invalid color token value: ${e}`);let a="";if("black"===o.key&&(a=ei(i.black)),"white"===o.key&&(a=ei(i.white)),o.hue&&o.tint&&(a=ei(i[o.hue][o.tint])),!a)throw Error(`Invalid color token value: ${e}`);let s=a,l={blendMode:r,bg:n,black:ei(i.black),white:ei(i.white)};try{if(a=function(e,t){var n,r,i,o,a,s;let{blendMode:l}=t,u=et(e),c=et(t.black),d=et(t.white),h=t.bg?et(t.bg):"multiply"===l?d:c,f={r:[c.r,d.r],g:[c.g,d.g],b:[c.b,d.b]},p={r:X(K(...f.r,...en,h.r),...en),g:X(K(...f.g,...en,h.g),...en),b:X(K(...f.b,...en,h.b),...en)},m={r:X(K(...f.r,...en,u.r),...en),g:X(K(...f.g,...en,u.g),...en),b:X(K(...f.b,...en,u.b),...en)},g="multiply"===l?{r:255*(p.r/255*(m.r/255)),g:255*(p.g/255*(m.g/255)),b:255*(p.b/255*(m.b/255))}:{r:255*((n=p.r/255)+(r=m.r/255)-n*r),g:255*((i=p.g/255)+(o=m.g/255)-i*o),b:255*((a=p.b/255)+(s=m.b/255)-a*s)};return Q({r:X(K(...en,...f.r,g.r),...f.r),g:X(K(...en,...f.g,g.g),...f.g),b:X(K(...en,...f.b,g.b),...f.b)})}(a,l),n&&void 0!==o.mix){var u,c,d,h,f,p,m;let e=J(n),t=J(a);a=Q((u=o.mix,{r:(c=e.r,d=t.r,c+(d-c)*u),g:(h=e.g,f=t.g,h+(f-h)*u),b:(p=e.b,m=t.b,p+(m-p)*u)}))}}catch(e){throw console.warn("could not blend",a,l),e}
1return"#aN"===a&&(console.warn(`invalid color token value: ${e}`),a=s),void 0!==o.opacity&&(a=function(e,t){let n=et(e);return`rgba(${n.r},${n.g},${n.b},${t})`}(a,o.opacity)),a}function ei(e){return"string"==typeof e?e:e.hex}function eo(e,t){let n=ea(t.default,{colorPalette:e}),r=n.bg;if("white"===r)throw Error("Cannot blend with white background");let i={default:n};for(let n of A){if("default"===n)continue;let o="transparent"===n?{colorPalette:e}:{bg:r,colorPalette:e};b(i,n,()=>ea(t[n],o))}return i}function ea(e,t){var n,r,i,o;let{colorPalette:a,bg:s}=t,l=e._blend||"multiply",u=er(e.bg,{colorPalette:a,bg:s,blendMode:l}),c={colorPalette:a,bg:u,blendMode:l},d=(n=e.button,r={baseBg:u,blendMode:l,colorPalette:a},{default:eu(n.default,r),ghost:eu(n.ghost,r),bleed:eu(n.bleed,r)}),h=function(e,t){let n={};for(let o of T){var r,i;n[o]=(r=e[o],i=t,{enabled:ec(r.enabled,i),hovered:ec(r.hovered,i),pressed:ec(r.pressed,i),selected:ec(r.selected,i),disabled:ec(r.disabled,i)})}return n}(e.selectable,{colorPalette:a,baseBg:u,blendMode:l}),f={outline:er(e.shadow.outline,c),umbra:er(e.shadow.umbra,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}}),penumbra:er(e.shadow.penumbra,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}}),ambient:er(e.shadow.ambient,{...c,bg:void 0,colorPalette:{...a,black:"#000000"}})};return{_blend:l,_dark:e._dark,accent:{fg:er(e.accent.fg,c)},avatar:es(e.avatar,{baseBg:u,colorPalette:a,blendMode:l}),backdrop:er(e.backdrop,c),badge:el(e.badge,{baseBg:u,colorPalette:a,blendMode:l}),bg:u,border:er(e.border,c),button:d,code:{bg:er(e.code.bg,c),fg:er(e.code.fg,c)},fg:er(e.fg,c),focusRing:er(e.focusRing,c),icon:er(e.icon,c),input:(i=e.input,o={baseBg:u,colorPalette:a,blendMode:l},{default:ed(i.default,o),invalid:ed(i.invalid,o)}),kbd:function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=er(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:o,blendMode:r,colorPalette:i};return{bg:o,fg:er(e.fg,a),border:er(e.border,a)}}(e.kbd,{baseBg:u,colorPalette:a,blendMode:l}),link:{fg:er(e.link.fg,c)},muted:{bg:er(e.muted.bg,c),fg:er(e.muted.fg,c)},shadow:f,skeleton:{from:er(e.skeleton.from,c),to:er(e.skeleton.to,c)},syntax:function(e,t){let{colorPalette:n,baseBg:r,blendMode:i}=t,o={colorPalette:n,bg:r,blendMode:i};return{atrule:er(e.atrule,o),attrName:er(e.attrName,o),attrValue:er(e.attrValue,o),attribute:er(e.attribute,o),boolean:er(e.boolean,o),builtin:er(e.builtin,o),cdata:er(e.cdata,o),char:er(e.char,o),class:er(e.class,o),className:er(e.className,o),comment:er(e.comment,o),constant:er(e.constant,o),deleted:er(e.deleted,o),doctype:er(e.doctype,o),entity:er(e.entity,o),function:er(e.function,o),hexcode:er(e.hexcode,o),id:er(e.id,o),important:er(e.important,o),inserted:er(e.inserted,o),keyword:er(e.keyword,o),number:er(e.number,o),operator:er(e.operator,o),prolog:er(e.prolog,o),property:er(e.property,o),pseudoClass:er(e.pseudoClass,o),pseudoElement:er(e.pseudoElement,o),punctuation:er(e.punctuation,o),regex:er(e.regex,o),selector:er(e.selector,o),string:er(e.string,o),symbol:er(e.symbol,o),tag:er(e.tag,o),unit:er(e.unit,o),url:er(e.url,o),variable:er(e.variable,o)}}(e.syntax,{baseBg:u,colorPalette:a,blendMode:l}),selectable:h}}function es(e,t){let n={};for(let i of r)n[i]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",a=er(e.bg,{bg:n,blendMode:r,colorPalette:i});return{_blend:o,bg:a,fg:er(e.fg,{bg:a,blendMode:o,colorPalette:i})}}(e[i],t);return n}function el(e,t){let n={};for(let r of T)n[r]=function(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=er(e.bg,{bg:n,blendMode:r,colorPalette:i}),a={bg:o,blendMode:r,colorPalette:i};return{bg:o,dot:er(e.dot,a),fg:er(e.fg,a),icon:er(e.icon,a)}}(e[r],t);return n}function eu(e,t){let n={};for(let o of T){var r,i;n[o]=(r=e[o],i=t,{enabled:ec(r.enabled,i),hovered:ec(r.hovered,i),pressed:ec(r.pressed,i),selected:ec(r.selected,i),disabled:ec(r.disabled,i)})}return n}function ec(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",a=er(e.bg,{bg:n,blendMode:r,colorPalette:i}),s={bg:a,blendMode:o,colorPalette:i};
1return{_blend:o,accent:{fg:er(e.accent.fg,s)},avatar:es(e.avatar,{baseBg:a,colorPalette:i,blendMode:o}),badge:el(e.badge,{baseBg:a,colorPalette:i,blendMode:o}),bg:a,border:er(e.border,s),code:{bg:er(e.code.bg,s),fg:er(e.code.fg,s)},fg:er(e.fg,s),icon:er(e.icon,s),link:{fg:er(e.link.fg,s)},muted:{bg:er(e.muted.bg,s),fg:er(e.muted.fg,s)},kbd:{bg:er(e.kbd.bg,s),fg:er(e.kbd.fg,s),border:er(e.kbd.border,s)},skeleton:{from:er(e.skeleton?.from,s),to:er(e.skeleton?.to,s)}}}function ed(e,t){return{enabled:eh(e.enabled,t),hovered:eh(e.hovered,t),readOnly:eh(e.readOnly,t),disabled:eh(e.disabled,t)}}function eh(e,t){let{baseBg:n,blendMode:r,colorPalette:i}=t,o=e._blend||"multiply",a=er(e.bg,{colorPalette:i,bg:n,blendMode:r}),s={colorPalette:i,bg:a,blendMode:o};return{_blend:o,bg:a,border:er(e.border,s),fg:er(e.fg,s),muted:{bg:er(e.muted.bg,s)},placeholder:er(e.placeholder,s)}}function ef(e){let t=function(e){let t={color:function(e){let t=F(z,e);return{base:function(e){let t={};for(let n of A)t[n]=function(e,t){let n=F(e?.base?.["*"],e?.base?.[t]),i=n._hue||e?.base?.[t]?._hue||"gray";return{...n,_hue:i,avatar:r.reduce((e,t)=>({...e,[t]:F({_hue:t},n.avatar?.["*"],n.avatar?.[t])}),{}),badge:T.reduce((t,r)=>({...t,[r]:{_hue:e?.base?.[r]?._hue||i,...n.badge?.["*"],...n.badge?.[r]}}),{})}}(e,n);return t}(t),button:function(e){let t={};for(let n of P)t[n]=function(e,t){let n={};for(let i of T)n[i]=function(e,t,n){let i={};for(let o of M)i[o]=function(e,t,n,i){let o=F(e?.button?.[n]?.["*"]?.["*"],e?.button?.[n]?.[t]?.["*"],e?.button?.[n]?.["*"]?.[i],e?.button?.[n]?.[t]?.[i]),a=o._hue||e?.base?.[t]?._hue;return{...o,_hue:a,avatar:r.reduce((e,t)=>({...e,[t]:F({_hue:t},o.avatar?.["*"],o.avatar?.[t])}),{}),badge:T.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||a,...o.badge?.["*"],...o.badge?.[n]}}),{})}}(e,n,t,o);return i}(e,t,i);return n}(e,n);return t}(t),input:function(e){let t={};for(let n of _)t[n]=function(e,t){let n={};for(let r of I)n[r]=function(e,t,n){let r=F(e?.input?.["*"]?.["*"],e?.
1input?.[t]?.["*"],e?.input?.["*"]?.[n],e?.input?.[t]?.[n]),i=r._hue||e?.input?.[t]?._hue;return{...r,_hue:i}}(e,t,r);return n}(e,n);return t}(t),selectable:function(e){let t={};for(let n of T)t[n]=function(e,t){let n={_hue:e?.selectable?.[t]?._hue||e?.base?.[t]?._hue};for(let i of M)n[i]=function(e,t,n){let i=F(e?.selectable?.["*"]?.["*"],e?.selectable?.[t]?.["*"],e?.selectable?.["*"]?.[n],e?.selectable?.[t]?.[n]),o=i._hue||e?.base?.[t]?._hue;return{...i,_hue:o,avatar:r.reduce((e,t)=>({...e,[t]:F({_hue:t},i.avatar?.["*"],i.avatar?.[t])}),{}),badge:T.reduce((t,n)=>({...t,[n]:{_hue:e?.base?.[n]?._hue||o,...i.badge?.["*"],...i.badge?.[n]}}),{})}}(e,t,i);return n}(e,n);return t}(t),syntax:t.syntax}}(e?.color)},n={};return b(n,"light",()=>U({scheme:"light"},t)),b(n,"dark",()=>U({scheme:"dark"},t)),n}(e);return k({_version:2,avatar:e?.avatar??s.avatar,button:e?.button??s.button,card:e?.card??s.card,color:function(e,t){let n=t?.palette??o,r={};return b(r,"light",()=>eo(n,e.light)),b(r,"dark",()=>eo(n,e.dark)),r}(t,e),container:e?.container??s.container,font:e?.font??l,input:e?.input??s.input,layer:e?.layer??s.layer,media:e?.media??s.media,radius:e?.radius??s.radius,shadow:e?.shadow??s.shadow,space:e?.space??s.space,style:e?.style??s.style})}let ep=new Map;function em(e,t,n){var r;let i=function(e,t,n){let r=ep.get(t);if(!r)return;let i=r.get(n);if(i)return i.get(e)}(e,t,n);if(i)return i;let o=y(e)?k(e):e,a=y(e)?e:function(e){if(e.v2)return e.v2;let t=v.get(e);if(t)return t;let{avatar:n,button:r,color:i,container:o,fonts:a,input:l,layer:u,media:d,radius:h,shadows:f,space:p,styles:m}=e,g={_version:2,avatar:{...s.avatar,...n},button:{...s.button,...r},card:s.card,color:{light:{transparent:c(i.light.transparent),default:c(i.light.default),neutral:c(i.light.transparent),primary:c(i.light.primary),suggest:c(i.light.primary),positive:c(i.light.positive),caution:c(i.light.caution),critical:c(i.light.critical)},dark:{transparent:c(i.dark.transparent),default:c(i.dark.default),neutral:c(i.dark.transparent),primary:c(i.dark.primary),suggest:c(i.dark.primary),positive:c(i.dark.positive),caution:c(i.dark.caution),critical:c(i.dark.critical)}},container:o,font:a,input:{...s.input,...l,checkbox:{...s.input.checkbox,...l.checkbox},radio:{...s.input.radio,...l.radio},switch:{...s.input.switch,...l.switch}},layer:u??s.layer,media:d,radius:h,shadow:f,space:p,style:m};return v.set(e,g),g}(e),l=o.layer||s.layer,u=a.color[t]||a.color.light,d="neutral"in(r=u[n]||u.default).badge?r:{...r,badge:{...r.badge,neutral:r.badge.default,suggest:r.badge.primary},button:{bleed:{...r.button.bleed,neutral:r.button.bleed.default,suggest:r.button.bleed.primary},default:{...r.button.default,neutral:r.button.default.default,suggest:r.button.default.primary},ghost:{...r.button.ghost,neutral:r.button.ghost.default,suggest:r.button.ghost.primary}},selectable:{...r.selectable,neutral:r.selectable.default,suggest:r.selectable.primary}},h=a.layer||s.layer,{color:f,...p}=o,m={...p,layer:l,v2:{...a,_resolved:!0,color:d,layer:h}};b(m,"color",()=>{let e=o.color[t]||o.color.light;return e[n]||e.default});let g={sanity:m};return function(e,t,n,r){ep.has(t)||ep.set(t,new Map);let i=ep.get(t);i.has(n)||i.set(n,new WeakMap),i.get(n).set(e,r)}(e,t,n,g),g}},47275:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},48545:(e,t,n)=>{var r=n(81863),i=n(39913);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},48683:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});var r=n(7620);let i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},48805:e=>{e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}},53085:e=>{var t="\ud800-\udfff",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\ud83c[\udffb-\udfff]",i="[^"+t+"]",o="(?:\ud83c[\udde6-\uddff]){2}",a="[\ud800-\udbff][\udc00-\udfff]",s="(?:"+n+"|"+r+")?",l="[\\ufe0e\\ufe0f]?",u="(?:\\u200d(?:"+[i,o,a].join("|")+")"+l+s+")*",c=RegExp(r+"(?="+r+")|"+("(?:"+[i+n+"?",n,o,a,"["+t+"]"].join("|"))+")"+(l+s+u),"g");e.exports=function(e){return e.match(c)||[]}},58250:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},58379:(e,t,n)=>{e.exports="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},60292:(e,t,n)=>{var r=n(48805),i=n(38615),o=n(92534),a=RegExp("['’]","g");e.exports=function(e){return function(t){return r(o(i(t).replace(a,"")),e,"")}}},64805:e=>{e.exports=function(e){return e.split("")}},68966:(e,t,n)=>{"use strict";let r;n.r(t),n.d(t,{default:()=>sV}
1);var i,o,a,s,l,u=n(54568),c=n(74607),d=n(2990),h=n(7620),f=n(97509),p=n(59744),m=n(53962),g=n(96728);function y(e){return e.split(/[[.\]]/g).filter(Boolean).map(e=>{var t;return e.includes("==")?function(e){let[t,n]=e.split("==");if("_key"!==t)throw Error(`Currently only "_key" is supported as path segment. Found ${t}`);if(typeof n>"u")throw Error('Invalid path segment, expected `key=="value"`');return{_key:n.replace(/^['"]/,"").replace(/['"]$/,"")}}(e):v.test(t=e)?Number(t):t})}let v=/^-?\d+$/,b=/^[a-z_$]+/;function x(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:"object"==typeof e&&"_key"in e&&"string"==typeof e._key?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&b.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function w(e){if("createIfNotExists"in e)return{type:"createIfNotExists",document:e.createIfNotExists};if("createOrReplace"in e)return{type:"createOrReplace",document:e.createOrReplace};if("create"in e)return{type:"create",document:e.create};if("delete"in e)return{id:e.delete.id,type:"delete"};if("patch"in e){var t,n,r,i,o,a;return{type:"patch",id:e.patch.id,patches:[..."set"in(n=t=e.patch)?Object.keys(n.set).map(e=>({path:y(e),op:{type:"set",value:n.set[e]}})):[],..."setIfMissing"in(r=t)?Object.keys(r.setIfMissing).map(e=>({path:y(e),op:{type:"setIfMissing",value:r.setIfMissing[e]}})):[],..."unset"in(i=t)?i.unset.map(e=>({path:y(e),op:{type:"unset"}})):[],..."inc"in(o=t)?Object.keys(o.inc).map(e=>({path:y(e),op:{type:"inc",amount:o.inc[e]}})):[],..."inc"in(a=t)?Object.keys(a.dec).map(e=>({path:y(e),op:{type:"dec",amount:a.dec[e]}})):[],...function(e){if(!("insert"in e))return[];let t=function(e){let t=S.filter(t=>t in e);if(t.length>1)throw Error(`Insert patch is ambiguous. Should only contain one of: ${S.join(", ")}, instead found ${t.join(", ")}`);return t[0]}(e.insert);if(!t)throw Error("Insert patch missing position");let n=y(e.insert[t]),r=n.pop();return[{path:n,op:{type:"insert",position:t,referenceItem:r,items:e.insert.items}}]}(t)]}}throw Error(`Unknown mutation: ${JSON.stringify(e)}`)}let S=["before","replace","after"];function k(e){return j(e)}function E(e){return e.flatMap(k)}function j(e){if("create"===e.type||"createIfNotExists"===e.type||"createOrReplace"===e.type)return{[e.type]:e.document};if("delete"===e.type)return{delete:{id:e.id}};let t=e.options?.ifRevision;return e.patches.map(n=>({patch:{id:e.id,...t&&{ifRevisionID:t},...function(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[x(t)]};if("insert"===n.type)return{insert:{[n.position]:x([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[x(t)]:n.value}};if("inc"===n.type)return{inc:{[x(t)]:n.amount}};if("dec"===n.type)return{dec:{[x(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[x(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${x(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>x([...t,{_key:e._key}])),insert:{[n.position]:x([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[x(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>x(t.concat(e)))};if("replace"===n.type)return{insert:{replace:x(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[x(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(n)}}))}function C(e){return Array.isArray(e)?e:[e]}var A=Object.freeze({__proto__:null,decode:function(e){return w(e)},decodeAll:function(e){return e.map(w)},encode:k,encodeAll:E,encodeMutation:j,encodeTransaction:function(e){return{transactionId:e.id,mutations:E(e.mutations)}}});function T(e,t,n){return{type:"insert",referenceItem:n,position:t,items:C(e)}}function M(e,t){return{type:"truncate",startIndex:e,endIndex:t}}function P(e){return{type:"remove",referenceItem:e}}function _(e,t){return{path:"string"==typeof e?y(e):e,op:t}}var I=n(22397);let R=(0,I.H6)(),O=R,$=new Set,D=/_key\s*==\s*['"](.*)['"]/,L=/^\d*:\d*$/;function V(e){return"number"==typeof e||"string"==typeof e&&/^\[\d+\]$/.test(e)}function z(e){return"string"==typeof e?D.test(e.trim()):"object"==typeof e&&"_key"in e}let N=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,F=/_ke
1y\s*==\s*['"](.*)['"]/;function B(e,t,n){let r="string"==typeof t?function(e){if("string"!=typeof e)throw Error("Path is not a string");let t=e.match(N);if(!t)throw Error("Invalid path string");return t.map(U)}(t):t;if(!Array.isArray(r))throw Error("Path must be an array or a string");let i=e;for(let e=0;e<r.length;e++){let t=r[e];if(V(t)){if(!Array.isArray(i))return n;i=i[t]}if(z(t)){if(!Array.isArray(i))return n;i=i.find(e=>e._key===t._key)}if("string"==typeof t&&(i="object"==typeof i&&null!==i?i[t]:void 0),typeof i>"u")return n}return i}function U(e){return V(e)?Number(e.replace(/[^\d]/g,"")):z(e)?{_key:e.match(F)[1]}:!function(e){if("string"==typeof e&&L.test(e))return!0;if(!Array.isArray(e)||2!==e.length)return!1;let[t,n]=e;return("number"==typeof t||""===t)&&("number"==typeof n||""===n)}(e)?e:function(e){let[t,n]=e.split(":").map(e=>""===e?e:Number(e));return[t,n]}(e)}function H(){return(0,h.useSyncExternalStore)(Y,G,W)}function W(){return R}function G(){return O}function Y(e){return $.add(e),()=>$.delete(e)}function q(){let e,t=(0,c.c)(2),n=H();return t[0]!==n?(e=n===R,t[0]=n,t[1]=e):e=t[1],!e}function X(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(e,r)},t)}}function K(e,t){let n=(0,d.Fk)(),r=(0,d.v$)();if(t===R||!n&&!r)throw Error("The `useDocuments` hook cannot be used in this context");let i=(0,p.T4)(e),o=(0,p.IM)(e),a=t.getSnapshot().context?.documents,s=a?.[i],l=a?.[o],u=s||l;if(!u)throw Error(`Document "${e}" not found`);let c=s.getSnapshot().context?.local||l.getSnapshot().context?.local,h=new Promise(e=>{if(c)e(c);else{let t=u.on("ready",n=>{let{snapshot:r}=n;e(r||null),t.unsubscribe()})}});return{draftDoc:s,draftId:i,getSnapshot:()=>h,publishedDoc:l,publishedId:o,get snapshot(){if(!c)throw Error(`Snapshot for document "${e}" not found`);return c}}}function Z(){let e,t,n,r=(0,c.c)(7),i=H();r[0]!==i?(e=e=>({id:e,commit:()=>{let{draftDoc:t}=K(e,i);t.send({type:"submit"})},get:t=>{let{snapshot:n}=K(e,i);return t?B(n,t):n},getSnapshot:function(e,t){let{getSnapshot:n}=K(e,t);return n}(e,i),patch:async(t,n)=>{let r=K(e,i),{draftDoc:o,draftId:a,getSnapshot:s,publishedId:l}=r,{commit:u=!0}=n||{},c=await ("function"==typeof t?t({draftId:a,publishedId:l,get snapshot(){return r.snapshot},getSnapshot:s}):t),d=await s();if(!d)throw Error(`Snapshot for document "${e}" not found`);o.send({type:"mutate",mutations:[{type:"createIfNotExists",document:{...d,_id:a}},{type:"patch",id:a,patches:C(c),...{}}]}),u&&("object"==typeof u&&"debounce"in u?X(()=>o.send({type:"submit"}),u.debounce)():o.send({type:"submit"}))}}),r[0]=i,r[1]=e):e=r[1];let o=e;r[2]!==i?(t=(e,t,n)=>{let{draftDoc:r}=K(e,i),{commit:o}=n||{},a=void 0===o||o;r.send({type:"mutate",mutations:t}),a&&("object"==typeof a&&"debounce"in a?X(()=>r.send({type:"submit"}),a.debounce)():r.send({type:"submit"}))},r[2]=i,r[3]=t):t=r[3];let a=t;return r[4]!==o||r[5]!==a?(n={getDocument:o,mutateDocument:a},r[4]=o,r[5]=a,r[6]=n):n=r[6],n}let J=(()=>{let e;return()=>{if(e)return e;e=[];for(let t=0;t<256;++t)e[t]=(t+256).toString(16).slice(1);return e}})();function Q(e){let t=J();return(function(e=16){let t=new Uint8Array(e);return function(e){let t="undefined"!=typeof window&&"crypto"in window?window.crypto:globalThis.crypto;if(!t||!t.getRandomValues)throw Error("WebCrypto not available in this environment");t.getRandomValues(e)}(t),t})(e).reduce((e,n)=>e+t[n],"").slice(0,e)}function ee(e){let t,n,r="string"==typeof e?e:e.path,i=r.lastIndexOf("."),o=r.substring(i+1,r.length);if(!o.indexOf("["))throw Error("Invalid path: not an array");let a=r.lastIndexOf("["),s=r.substring(0,a);if(o.includes("_key")){let e=o.indexOf('"')+1,r=o.indexOf('"',e);t=o.substring(e,r),n=!0}else{let e=o.indexOf("[")+1,r=o.indexOf("]",e);t=o.substring(e,r),n=!1}if(!s||!t)throw Error("Invalid path");return{path:s,key:t,hasExplicitKey:n}}async function et(e,t,n){if(!e.type)throw Error("Node type is missing");let{path:r,key:i}=ee(e),o=await t.getSnapshot(),a=B(o,r),s=B(o,e.path),l=a.findIndex(e=>e._key===i),u=-1,c="before";if("first"===n){if(0===l)return[];u=0,c="before"}else if("last"===n){if(l===a.length-1)return[];u=-1,c="after"}else if("next"===n){if(l===a.length-1)return[];u=l,c="after"}else if("previous"===n){if(0===l)return[];u=l-1,c="before"}return[_(r,M(l,l+1)),_(r,T(s,c,u))]}var en=n(89405);let er=(0,en.FsL)((0,en.YjP)(),(0,en.BpQ)(1)),ei=(0,en.lqM)(er),eo=(0,en.Ikc)({baseUrl:er,dataset:ei,id:er,path:er,projectId:ei,tool:ei,type:ei,workspace:ei,perspective:(0,en.NpB)((0,en.YjP)(),"drafts")}),ea=/^([\w-]+):(0|[1-9][0-9]*)$/,es=/^([\w-]+):([0-9]+),([0-9]+)$/,el=/^([\w-]+):([\w-]+)$/,eu=(0,en.FsL)((0,en.YjP)(),(0,en.BpQ)(1)),ec=(0,en.Ikc)({origin:eu,href:eu,data:(0,en.lqM)((0,en.g1P)((0,en.YjP)(),(0,en.L5J)()))});function ed(e){let t=(0,en.xLC)(eo,e);if(t.success)return t.output;let n=(0,en.xLC)(ec,e);if(n.success)try{let e=new URL(n.output.href,typeof document>"u"?"https://example.com":location.origin);return e.searchParams.size>
10?(0,en.qgA)(eo,Object.fromEntries(e.searchParams.entries())):n.output}catch(e){return console.error("Failed to parse sanity node",e),n.output}}var eh={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},ef={0:8203,1:8204,2:8205,3:65279},ep=[,,,,].fill(String.fromCodePoint(ef[0])).join(""),em=Object.fromEntries(Object.entries(ef).map(e=>e.reverse())),eg=Object.fromEntries(Object.entries(eh).map(e=>e.reverse())),ey=`${Object.values(eh).map(e=>`\\u{${e.toString(16)}}`).join("")}`,ev=RegExp(`[${ey}]{4,}`,"gu");let eb=[];for(let e=0;e<256;++e)eb.push((e+256).toString(16).slice(1));let ex=new Uint8Array(16);var ew={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function eS(e,t,n){if(ew.randomUUID&&!e)return ew.randomUUID();let i=(e=e||{}).random??e.rng?.()??function(){if(!r){if(typeof crypto>"u"||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(ex)}();if(i.length<16)throw Error("Random bytes length must be >= 16");return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return(eb[e[t+0]]+eb[e[t+1]]+eb[e[t+2]]+eb[e[t+3]]+"-"+eb[e[t+4]]+eb[e[t+5]]+"-"+eb[e[t+6]]+eb[e[t+7]]+"-"+eb[e[t+8]]+eb[e[t+9]]+"-"+eb[e[t+10]]+eb[e[t+11]]+eb[e[t+12]]+eb[e[t+13]]+eb[e[t+14]]+eb[e[t+15]]).toLowerCase()}(i)}function ek(e){let t=e.getBoundingClientRect();return{x:t.x+scrollX,y:t.y+scrollY,w:t.width,h:t.height}}function eE(e,t,n){return"x"===n?{x:e.x+t,y:e.y,w:e.w-2*t,h:e.h}:{x:e.x,y:e.y+t,w:e.w,h:e.h-2*t}}function ej(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}function eC(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function eA(e,t,n){let r,i,o={x:e.x1,y:e.y1};if(t.some(e=>(function(e,t){let n=e.x>=t.x&&e.x<=t.x+t.w,r=e.y>=t.y&&e.y<=t.y+t.h;return n&&r})(o,eE(e,Math.min(e.w,e.h)/10,"horizontal"===n?"x":"y"))))return null;for(let a of t){let t=function(e,t){let n=[{x1:t.x,y1:t.y,x2:t.x+t.w,y2:t.y},{x1:t.x+t.w,y1:t.y,x2:t.x+t.w,y2:t.y+t.h},{x1:t.x+t.w,y1:t.y+t.h,x2:t.x,y2:t.y+t.h},{x1:t.x,y1:t.y+t.h,x2:t.x,y2:t.y}],r=[];for(let t=0;t<n.length;t++){let i=function(e,t){let{x1:n,y1:r,x2:i,y2:o}=e,{x1:a,y1:s,x2:l,y2:u}=t;if(n===i&&r===o||a===l&&s===u)return!1;let c=(u-s)*(i-n)-(l-a)*(o-r);if(0===c)return!1;let d=((l-a)*(r-s)-(u-s)*(n-a))/c,h=((i-n)*(r-s)-(o-r)*(n-a))/c;return!(d<0)&&!(d>1)&&!(h<0)&&!(h>1)&&{x:n+d*(i-n),y:r+d*(o-r)}}(e,n[t]);if(i){let e=!1;for(let t=0;t<r.length;t++)r[t].x===i.x&&r[t].y===i.y&&(e=!0);e||r.push(i)}}return 0!==r.length&&r.sort((t,n)=>eC(t,{x:e.x1,y:e.y1})-eC(n,{x:e.x1,y:e.y1}))}(e,eE(a,Math.min(a.w,a.h)/10,"horizontal"===n?"x":"y"));if(t){let e=t[0];r?eC(o,e)<eC(o,r)&&(r=e,i=a):(r=e,i=a)}}return i||null}function eT(e,t,n){let{x:r,y:i,w:o,h:a}=e,{x:s,y:l}=n;return{x:s+(r-s)*t,y:l+(i-l)*t,w:o*t,h:a*t}}function eM(e){let t=Math.max(0,Math.min(...e.map(e=>e.y))),n=Math.min(document.body.scrollHeight,Math.max(...e.map(e=>e.y+e.h)));return{min:t,max:n,height:n-t}}function eP(e,t){return t.find(t=>ej(ek(t.elements.element),e))?.sanity}function e_(e,t,n){return Object.values(t).every(e=>null===e)?null:"horizontal"===n?{left:t.left?{rect:t.left,sanity:eP(t.left,e)}:null,right:t.right?{rect:t.right,sanity:eP(t.right,e)}:null}:{top:t.top?{rect:t.top,sanity:eP(t.top,e)}:null,bottom:t.bottom?{rect:t.bottom,sanity:eP(t.bottom,e)}:null}}function eI(e){let t=document.body.getBoundingClientRect();return{x:Math.max(t.x,Math.min(e.clientX,t.x+t.width)),y:e.clientY+window.scrollY}}function eR(e,t,n){let r=ek(t),i=[...t.querySelectorAll(":where(h1, h2, h3, h4, p, a, img, span, button):not(:has(*))")];e.x<=r.x&&(e.x=r.x),e.x>=r.x+r.w&&(e.x=r.x+r.w),e.y>=r.y+r.h&&(e.y=r.y+r.h),e.y<=r.y&&(e.y=r.y);let o=i.map(e=>{let t=eT(ek(e),n,{x:r.x,y:r.y});return{x:t.x-r.x,y:t.y-r.y,w:t.w,h:t.h,tagName:e.tagName}});return{offsetX:(r.x-e.x)*n,offsetY:(r.y-e.y)*n,w:r.w*n,h:r.h*n,maxWidth:r.w*n*.75,childRects:o}}async function eO(e,t,n,r,i){return new Promise(o=>{e.addEventListener("transitionend",()=>{setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"})},2*i),o()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),r({type:"overlay/dragToggleMinimap",display:!0}),document.body.style.overflow="hidden",document.body.style.height="100%",document.documentElement.style.overflow="initial",document.documentElement.style.height="100%",setTimeout(()=>{e.style.transformOrigin="50% 0px",e.style.transition="transform 150ms ease",e.style.transform=`translate3d(0px, ${-n+scrollY}px, 0px) scale(${t})`},25)})}function e$(e){let t=function(e){let t=Math.max(0,Math.min(...e.map(e=>e.x))),n=Math.min(document.body.offsetWidth,Math.max(...e.map(e=>e.x+e.w)));return{min:t,max:n,width:n-t}}(e),n=eM(e),r=t.min>8&&t.min+t.width<=window.innerWidth-8,i=n.min>8&&n.min+n.height<=document.body.scrollHeight-8,o=r&&i;return{x:o?t.min-8:t.min,y:o?n.min-8:n.min,w:o?t.width+16:t.width,h:o?n.height+16:n.height}}async function eD(e,t,n,r,i,o){return new Promise(a=>{if(1===new DOMMatrix(window.getComputedStyle(t).transform).a)return;let s=n-window.innerHeight,l=scrollY;(e-=window.innerHeight/2)<0&&(e=0),t.addEventListener("transitionend",()=>{t.style.transition="none",t.style.transform="none",scrollTo({top:e,behavior:"instant"}),setTimeout(()=>{r({type:"overlay/dragEndMinimapTransition"}),r({type:"overlay/dragToggleMinimap",display:!1})},2*i),a()},{once:!0}),r({type:"overlay/dragStartMinimapTransition"}),t.style.transform=`translateY(${Math.max(l-e,-s+l)}px) scale(1)`,o&&(document.body.style.overflow=o.body.overflow,document.body.style.height=o.body.height,document.documentElement.style.overflow=o.documentElement.overflow,document.documentElement.style.height=o.documentElement.height)})}let eL=!1,eV={y:0},ez={x:0,y:0},eN=typeof document>"u"?0:document.documentElement.scrollHeight,eF=null,eB=e=>e instanceof HTMLElement||e instanceof SVGElement,eU=e=>e&&eB(e)?e.dataset?.sanityOverlayElement?e:eU(e.parentElement):null;function eH(e){return ev.lastIndex=0,ev.test(e)}function eW(e,t=!1){return eH(e)?function(e,t=!1){try{let n=function(e){let t=e.match(ev);if(t)return function(e,t=!1){let n=Array.from(e);if(n.length%2==0){if(n.length%4||!e.startsWith(ep))return function(e,t){var n;let r=[];for(let t=.5*e.length;t--;){let n=`${eg[e[2*t].codePointAt(0)]}${eg[e[2*t+1].codePointAt(0)]}`;r.unshift(String.fromCharCode(parseInt(n,16)))}let i=[],o=[r.join("")],a=10;for(;o.length;){let e=o.shift();try{if(i.push(JSON.parse(e)),t)break}catch(r){if(!a--)throw r;let t=+(null==(n=r.message.match(/\sposition\s(\d+)$/))?void 0:n[1]);if(!t)throw r;o.unshift(e.substring(0,t),e.substring(t))}}return i}(n,t)}
1else throw Error("Encoded data has invalid length");let r=[];for(let e=.25*n.length;e--;){let t=n.slice(4*e,4*e+4).map(e=>em[e.codePointAt(0)]).join("");r.unshift(String.fromCharCode(parseInt(t,4)))}if(t){r.shift();let e=r.indexOf("\0");return -1===e&&(e=r.length),[JSON.parse(r.slice(0,e).join(""))]}return r.join("").split("\0").filter(Boolean).map(e=>JSON.parse(e))}(t[0],!0)[0]}(e);return n&&"sanity.io"===n.origin?(t&&(n.href=n.href?.replace(".alt","")),n):null}catch(t){return console.error("Failed to decode stega for string: ",e,"with the original error: ",t),null}}(e,t):null}function eG(e){return"path"in e}function eY(e){if(!e.length||!e.map(e=>eG(e)).every((e,t,n)=>e===n[0]))return;if(!eG(e[0]))return e[0];let t=e.filter(eG),n=e[0],r=["projectId","dataset","id","baseUrl","workspace","tool"];for(let e=1;e<t.length;e++){let i=t[e];if(r.some(e=>i[e]!==n?.[e])){n=void 0;break}n={...n,path:function(e,t){let n=e.split("."),r=t.split("."),i=Math.min(n.length,r.length);return n=n.slice(0,i).reverse(),r=r.slice(0,i).reverse(),n.reduce((e,t,n)=>t===r[n]?[...e,t]:[],[]).reverse().join(".")}(n.path,i.path)}}return n}function eq(e){let t=e.lastIndexOf(".");return e.substring(t,e.length).includes("[")}function eX(e){if(!eq(e))return null;let t=e.split(".");return t[t.length-1]=t[t.length-1].replace(/\[.*?\]/g,"[]"),t.join(".")}function eK(e,t){return!!eq(e.path)&&!!eq(t.path)&&eX(e.path)===eX(t.path)}function eZ(e,t,n,r){if(!e.getAttribute("data-sanity")||e.getAttribute("data-sanity-drag-disable")||!t||!eG(t)||!eq(t.path))return null;let i=e.getAttribute("data-sanity-drag-group"),o=[...n].reduce((e,n)=>{let o=r.get(n),a=n.getAttribute("data-sanity-drag-disable"),s=n.getAttribute("data-sanity-drag-group"),l=null!==n.getAttribute("data-sanity");return o?.sanity&&!a&&eG(o.sanity)&&eK(t,o.sanity)&&(null===i||i===s)&&l&&e.push(o),e},[]);return o.length<=1?null:o}let eJ=(0,h.createContext)(null);var eQ=n(68744),e0=n(81715),e1=n(74238);function e2(e){let t=function e(t){var n;return!!(n=t)&&("object"==typeof n||"function"==typeof n)&&("reference"===t.name||e(t.type))}(e)&&1===(e.to??[]).length?e.to[0].icon:void 0;return e.icon??e.type?.icon??t}function e5(e,t){return{query:"change query"===t.type?t.query:e.query,groups:"select group"===t.type?e.groups.map(e=>({...e,selected:t.name===e.name})):e.groups,views:"toggle view"===t.type?e.views.map(e=>({...e,selected:t.name===e.name})):e.views}}let e3="all-items",e4={gridTemplateColumns:"repeat(auto-fill, minmax(118px, 1fr))",alignItems:"start"};function e6(e){let t,n,r,i,o,a,s,l,d,f,p,g,y,v,b,x,w=(0,c.c)(54),S=void 0===e.showIcons||e.showIcons,k=void 0===e.filter||"auto"===e.filter?e.schemaTypes.length>5:e.filter;w[0]!==e.groups||w[1]!==e.labels?(t=e.groups?[{name:e3,title:e.labels["insert-menu.filter.all-items"],selected:!0},...e.groups.map(e7)]:[],w[0]=e.groups,w[1]=e.labels,w[2]=t):t=w[2],w[3]!==e.views?(n=e.views??[{name:"list"}],w[3]=e.views,w[4]=n):n=w[4],w[5]!==n?(r=n.map(e8),w[5]=n,w[6]=r):r=w[6],w[7]!==t||w[8]!==r?(i={query:"",groups:t,views:r},w[7]=t,w[8]=r,w[9]=i):i=w[9];let[E,j]=(0,h.useReducer)(e5,i);if(w[10]!==e||w[11]!==k||w[12]!==S||w[13]!==E.groups||w[14]!==E.query||w[15]!==E.views){var C,A,T;let t,n,r,i=(C=e.schemaTypes,A=E.query,T=E.groups,C.filter(e=>(function(e,t){let n=t.find(e=>e.selected);return!n||n.name===e3||n.of?.includes(e.name)})(e,T)&&function(e,t){let n=t.trim().toLowerCase();return e.title?e.title?.toLowerCase().includes(n):e.name.includes(n)}(e,A))),c=E.views.find(e9),h=k||E.views.length>1,v=E.groups&&E.groups.length>0,b=h||v;s=m.W1,y=0,a=m.so,f="column",p="fill",w[25]!==b?(t=b?{style:{borderBottom:"1px solid var(--card-border-color)"},paddingBottom:1}:{},w[25]=b,w[26]=t):t=w[26],w[27]!==e.labels||w[28]!==k||w[29]!==h||w[30]!==E.query||w[31]!==E.views?(n=h?(0,u.jsxs)(m.so,{flex:"none",align:"center",paddingTop:1,paddingX:1,gap:1,children:[k?(0,u.jsx)(m.az,{flex:1,children:(0,u.jsx)(m.ks,{autoFocus:!0,border:!1,fontSize:1,icon:eQ.WIv,onChange:e=>{j({type:"change query",query:e.target.value})},placeholder:e.labels["insert-menu.search.placeholder"],value:E.query})}):null,E.views.length>1?(0,u.jsx)(m.az,{flex:"none",children:(0,u.jsx)(tn,{views:E.views,onToggle:e=>{j({type:"toggle view",name:e})},labels:e.labels})}):null]}):null,w[27]=e.labels,w[28]=k,w[29]=h,w[30]=E.query,w[31]=E.views,w[32]=n):n=w[32],w[33]!==v||w[34]!==E.groups?(r=v?(0,u.jsx)(m.az,{paddingTop:1,paddingX:1,children:(0,u.jsx)(m.wb,{space:1,children:E.groups.map(e=>(0,u.jsx)(m.oz,{id:`${e.name}-tab`,"aria-controls":`${e.name}-panel`,label:e.title??e0(e.name),selected:e.selected,onClick:()=>{j({type:"select group",name:e.name})}},e.name))})}):null,w[33]=v,w[34]=E.groups,w[35]=r):r=w[35],w[36]!==t||w[37]!==n||w[38]!==r?(g=(0,u.jsxs)(m.az,{...t,children:[n,r]}),w[36]=t,w[37]=n,w[38]=r,w[39]=g):g=w[39],o=m.az,l=1,d=0===i.length?(0,u.jsx)(m.az,{padding:2,children:(0,u.jsx)(m.EY,{muted:!0,size:1,children:e.labels["insert-menu.search.no-results"]})}):c?"grid"===c.name?(0,u.jsx)(m.xA,{autoRows:"auto",flex:1,gap:1,style:e4,children:i.map(t=>(0,u.jsx)(ti,{icon:S?e2(t):void 0,onClick:()=>{e.onSelect(t)},previewImageUrl:c.previewImageUrl?.(t.name),schemaType:t}
1,t.name))}):(0,u.jsx)(m.BJ,{flex:1,space:1,children:i.map(t=>(0,u.jsx)(m.Dr,{icon:S?e2(t):void 0,onClick:()=>{e.onSelect(t)},text:t.title??e0(t.name)},t.name))}):null,w[10]=e,w[11]=k,w[12]=S,w[13]=E.groups,w[14]=E.query,w[15]=E.views,w[16]=o,w[17]=a,w[18]=s,w[19]=l,w[20]=d,w[21]=f,w[22]=p,w[23]=g,w[24]=y}else o=w[16],a=w[17],s=w[18],l=w[19],d=w[20],f=w[21],p=w[22],g=w[23],y=w[24];return w[40]!==o||w[41]!==l||w[42]!==d?(v=(0,u.jsx)(o,{padding:l,children:d}),w[40]=o,w[41]=l,w[42]=d,w[43]=v):v=w[43],w[44]!==a||w[45]!==v||w[46]!==f||w[47]!==p||w[48]!==g?(b=(0,u.jsxs)(a,{direction:f,height:p,children:[g,v]}),w[44]=a,w[45]=v,w[46]=f,w[47]=p,w[48]=g,w[49]=b):b=w[49],w[50]!==s||w[51]!==b||w[52]!==y?(x=(0,u.jsx)(s,{padding:y,children:b}),w[50]=s,w[51]=b,w[52]=y,w[53]=x):x=w[53],x}function e9(e){return e.selected}function e8(e,t){return{...e,selected:0===t}}function e7(e){return{...e,selected:!1}}let te={grid:eQ.jxC,list:eQ.r$9},tt={grid:"insert-menu.toggle-grid-view.tooltip",list:"insert-menu.toggle-list-view.tooltip"};function tn(e){let t,n,r,i,o=(0,c.c)(11),a=e.views.findIndex(tr),s=e.views[a+1]??e.views[0],l=e.labels[tt[s.name]];o[0]!==l?(t=(0,u.jsx)(m.EY,{size:1,children:l}),o[0]=l,o[1]=t):t=o[1];let d=te[s.name];return o[2]!==s.name||o[3]!==e?(n=()=>{e.onToggle(s.name)},o[2]=s.name,o[3]=e,o[4]=n):n=o[4],o[5]!==d||o[6]!==n?(r=(0,u.jsx)(m.$n,{mode:"bleed",icon:d,onClick:n}),o[5]=d,o[6]=n,o[7]=r):r=o[7],o[8]!==t||o[9]!==r?(i=(0,u.jsx)(m.m_,{content:t,placement:"top",portal:!0,children:r}),o[8]=t,o[9]=r,o[10]=i):i=o[10],i}function tr(e){return e.selected}function ti(e){let t,n,r,i,o,a,s,l,d,f=(0,c.c)(19),[p,g]=(0,h.useState)(!1),y=e.icon;f[0]===Symbol.for("react.memo_cache_sentinel")?(t={overflow:"hidden"},f[0]=t):t=f[0],f[1]===Symbol.for("react.memo_cache_sentinel")?(n={backgroundColor:"var(--card-muted-bg-color)",paddingBottom:"66.6%",position:"relative"},f[1]=n):n=f[1],f[2]!==y?(r=(0,e1.isValidElementType)(y)?(0,u.jsx)(m.so,{align:"center",justify:"center",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:(0,u.jsx)(m.EY,{size:1,children:(0,u.jsx)(y,{})})}):null,f[2]=y,f[3]=r):r=f[3],f[4]!==p||f[5]!==e.previewImageUrl?(i=!e.previewImageUrl||p?null:(0,u.jsx)("img",{src:e.previewImageUrl,style:{objectFit:"contain",width:"100%",height:"100%",position:"absolute",inset:0},onError:()=>{g(!0)}}),f[4]=p,f[5]=e.previewImageUrl,f[6]=i):i=f[6],f[7]===Symbol.for("react.memo_cache_sentinel")?(o=(0,u.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",boxShadow:"inset 0 0 0 0.5px var(--card-fg-color)",opacity:.1}}),f[7]=o):o=f[7],f[8]!==r||f[9]!==i?(a=(0,u.jsxs)(m.az,{flex:"none",style:n,children:[r,i,o]}),f[8]=r,f[9]=i,f[10]=a):a=f[10];let v=e.schemaType.title??e.schemaType.name;return f[11]!==v?(s=(0,u.jsx)(m.az,{flex:1,padding:2,children:(0,u.jsx)(m.EY,{size:1,weight:"medium",children:v})}),f[11]=v,f[12]=s):s=f[12],f[13]!==a||f[14]!==s?(l=(0,u.jsxs)(m.so,{direction:"column",gap:1,padding:1,children:[a,s]}),f[13]=a,f[14]=s,f[15]=l):l=f[15],f[16]!==e.onClick||f[17]!==l?(d=(0,u.jsx)(m.Dr,{padding:0,radius:2,onClick:e.onClick,style:t,children:l}),f[16]=e.onClick,f[17]=l,f[18]=d):d=f[18],d}function to(e){if(!e)return(0,u.jsx)(eQ.XRf,{});if("string"===e.type)return(0,u.jsx)(eQ.H3M,{});if("number"===e.type)return(0,u.jsx)(eQ.bZn,{});let{value:t}=e;if("icon"in e&&e.icon)return(0,u.jsx)("div",{dangerouslySetInnerHTML:{__html:e.icon}});let{type:n}=t;if("string"===n)return(0,u.jsx)(eQ.H3M,{});if("boolean"===n)return(0,u.jsx)(eQ.Dee,{});if("number"===n)return(0,u.jsx)(eQ.bZn,{});if("array"===n||"union"===n)return(Array.isArray(t.of)?t.of:[t.of]).some(e=>"name"in e&&"block"===e.name)?(0,u.jsx)(eQ.a1,{}):(0,u.jsx)(eQ.Ss4,{});if("object"===n){if("image"===e.name)return(0,u.jsx)(eQ.xfq,{});if("block"===e.name)return(0,u.jsx)(eQ.H3M,{})}return(0,u.jsx)(eQ.XRf,{})}let ta=(0,g.AH)`
2  overflow-y: scroll;
3  overscroll-behavior: contain;
4  -ms-overflow-style: none;
5  scrollbar-width: none;
6
7  &:before {
8    content: '';
9    display: block;
10    height: calc(100% + 1px);
11    position: absolute;
12    top: 0;
13    width: 100%;
14    z-index: -1;
15  }
16`,ts=g.I4.div`
17  height: 100%;
18  inset: 0;
19  pointer-events: all;
20  position: fixed;
21  width: 100%;
22  display: flex;
23  justify-content: center;
24  align-items: center;
25
26  ${e=>e.$blockScroll&&ta}
27`,tl=g.I4.div`
28  background: transparent;
29  height: 100%;
30  inset: 0;
31  position: absolute;
32  width: 100%;
33`,tu=e=>{let t,n=(0,c.c)(2);return n[0]!==e?(t=(0,u.jsx)(m.ZL,{children:(0,u.jsx)(tc,{...e})}),n[0]=e,n[1]=t):t=n[1],t},tc=e=>{let t,n,r=(0,c.c)(7),{children:i,onDismiss:o,setBoundaryElement:a,blockScroll:s}=e,l=void 0===s||s;return r[0]!==o?(t=(0,u.jsx)(tl,{onMouseDownCapture:()=>{o?.()}}),r[0]=o,r[1]=t):t=r[1],r[2]!==l||r[3]!==i||r[4]!==a||r[5]!==t?(n=(0,u.jsxs)(ts,{"data-sanity-overlay-element":!0,ref:a,onClick:td,$blockScroll:l,children:[t,i]}),r[2]=l,r[3]=i,r[4]=a,r[5]=t,r[6]=n):n=r[6],n};function td(e){e.stopPropagation()}function th(e){return{type:"log",name:e.name,version:e.version,description:e.description,maxSampleRate:e.maxSampleRate,schema:void 0}}let tf={"Visual Editing Drag Sequence Completed":th({name:"Visual Editing Drag Sequence Completed",description:"An array is successfully reordered using drag and drop.",version:1}),"Visual Editing Drag Minimap Enabled":th({name:"Visual Editing Drag Minimap Enabled",description:"The zoomed-out minimap view is enabled during a drag sequence.",version:1}),"Visual Editing Context Menu Item Removed":th({name:"Visual Editing Context Menu Item Removed",description:"An item is removed using the Context Menu.",version:1}),"Visual Editing Context Menu Item Duplicated":th({name:"Visual Editing Context Menu Item Duplicated",description:"An item is duplicated using the Context Menu.",version:1}),"Visual Editing Context Menu Item Moved":th({name:"Visual Editing Context Menu Item Moved",description:"An item is moved using the Context Menu.",version:1}),"Visual Editing Context Menu Item Inserted":th({name:"Visual Editing Context Menu Item Inserted",description:"An item is inserted using the Context Menu.",version:1}),"Visual Editing Insert Menu Item Inserted":th({name:"Visual Editing Insert Menu Item Inserted",description:"An item is inserted using the Insert Menu.",version:1}),"Visual Editing Overlay Clicked":th({name:"Visual Editing Overlay Clicked",description:"An Overlay is clicked.",version:1})},tp=(0,h.createContext)(void 0);function tm(){let e=(0,h.useContext)(tp);if(!e)throw Error("Telemetry context is missing");return e}let tg={"insert-menu.filter.all-items":"All","insert-menu.search.no-results":"No results","insert-menu.search.placeholder":"Filter types…","insert-menu.toggle-grid-view.tooltip":"Toggle grid view","insert-menu.toggle-list-view.tooltip":"Toggle list view"},ty=e=>{let t,n,r,i,o=(0,c.c)(11),{node:a,onSelect:s}=e;o[0]!==a.options?.insertMenu?(t=a.options?.insertMenu||{},o[0]=a.options?.insertMenu,o[1]=t):t=o[1];let l=t;o[2]!==l.views?(n=l.views?.map(tv),o[2]=l.views,o[3]=n):n=o[3];let d=n;return o[4]!==a.of?(r=a.of.map(tb),o[4]=a.of,o[5]=r):r=o[5],o[6]!==l||o[7]!==s||o[8]!==r||o[9]!==d?(i=(0,u.jsx)(e6,{...l,labels:tg,schemaTypes:r,onSelect:s,views:d}),o[6]=l,o[7]=s,o[8]=r,o[9]=d,o[10]=i):i=o[10],i};function tv(e){return"grid"===e.name?{...e,previewImageUrl:t=>e.previewImageUrls?.[t]}:e}function tb(e){return{...e,icon:to(e)}}let tx=e=>{let t,n,r,i,o,a=(0,c.c)(10);return a[0]!==e?({children:t,style:r,...n}=e,a[0]=e,a[1]=t,a[2]=n,a[3]=r):(t=a[1],n=a[2],r=a[3]),a[4]!==r?(i={...r,pointerEvents:"all"},a[4]=r,a[5]=i):i=a[5],a[6]!==t||a[7]!==n||a[8]!==i?(o=(0,u.jsx)("div",{style:i,"data-sanity-overlay-element":!0,...n,children:t}),a[6]=t,a[7]=n,a[8]=i,a[9]=o):o=a[9],o};var tw=n(46392),tS=n(81685);function tk(e){if(!(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex")||((0,m.nY)(e)?!!e.href&&"ignore"!==e.rel:(0,m.A3)(e)?"hidden"
33!==e.type&&"file"!==e.type&&!e.disabled:!!((0,m.WE)(e)||(0,m.q4)(e)||(0,m.QY)(e))&&!e.disabled)))return!1;try{e.focus()}catch{}return document.activeElement===e}function tE(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if((0,m.sb)(n)&&(tk(n)||tE(n)))return!0}return!1}n(99100);let tj=g.I4.div.withConfig({displayName:"StyledAutocomplete",componentId:"sc-1igauft-0"})`line-height:0;`,tC=(0,g.I4)(m.az).withConfig({displayName:"ListBox",componentId:"sc-1igauft-1"})`& > ul{list-style:none;padding:0;margin:0;}`,tA=(0,g.i7)`
34  from {
35    transform: rotate(0deg);
36  }
37
38  to {
39    transform: rotate(360deg);
40  }
41`,tT=(0,g.I4)(eQ.Nl1).withConfig({displayName:"AnimatedSpinnerIcon",componentId:"sc-1igauft-2"})`animation:${tA} 500ms linear infinite;`;function tM(e){let t,n,r,i=(0,c.c)(11),{children:o,id:a,onSelect:s,selected:l,value:d}=e;i[0]!==s||i[1]!==d?(t=()=>{setTimeout(()=>{s(d)},0)},i[0]=s,i[1]=d,i[2]=t):t=i[2];let h=t;i[3]!==h?(n=e=>{"Enter"!==e.key||(0,m.zd)(e.currentTarget)||h()},i[3]=h,i[4]=n):n=i[4];let f=n;return i[5]!==o||i[6]!==h||i[7]!==f||i[8]!==a||i[9]!==l?(r=(0,u.jsx)("li",{"aria-selected":l,"data-ui":"AutocompleteOption",id:a,role:"option",onClick:h,onKeyDown:f,children:o}),i[5]=o,i[6]=h,i[7]=f,i[8]=a,i[9]=l,i[10]=r):r=i[10],r}function tP(e,t){return"input/change"===t.type?{...e,activeValue:null,focused:!0,query:t.query}:"input/focus"===t.type?{...e,focused:!0}:"root/blur"===t.type?{...e,focused:!1,query:null}:"root/clear"===t.type?{...e,activeValue:null,query:null,value:null}:"root/escape"===t.type?{...e,focused:!1,query:null}:"root/open"===t.type?{...e,query:e.query||t.query}:"root/setActiveValue"===t.type?{...e,activeValue:t.value,listFocused:t.listFocused||e.listFocused}:"root/setListFocused"===t.type?{...e,listFocused:t.listFocused}:"value/change"===t.type?{...e,activeValue:t.value,query:null,value:t.value}:e}let t_=["Control","Shift","Alt","Enter","Home","End","PageUp","PageDown","Meta","Tab","CapsLock"],tI=["bottom-start","top-start"],tR=(e,t)=>t?t.value:e,tO=(e,t)=>t.value.toLowerCase().indexOf(e.toLowerCase())>-1;function t$({renderPopover:e,content:t,hidden:n,inputElement:r,onMouseEnter:i,onMouseLeave:o,resultsPopoverElementRef:a}){return e({content:t,hidden:n,inputElement:r,onMouseEnter:i,onMouseLeave:o},a)}function tD(e){return 0===e?0:1===e||2===e?1:e-2}function tL(e){return Math.max(e-1,0)}(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,d,f,p,g,y,v,b,x,w,S,k,E,j,C,A,T,M,P,_,I,R,O,$,D,L,V,z,N,F,B,U,H,W,G,Y,q,X,K,Z,J,Q,ee,et,en,er,ei,eo,ea,es,el,eu,ec,ed,eh,ef,ep,em,eg=(0,c.c)(181);eg[0]!==e?({border:A,customValidity:n,disabled:r,filterOption:i,fontSize:T,icon:o,id:a,listBox:M,loading:s,onBlur:l,onChange:d,onFocus:f,onQueryChange:p,onSelect:g,openButton:y,openOnFocus:v,options:b,padding:P,popover:_,prefix:x,radius:I,readOnly:w,relatedElements:S,renderOption:k,renderPopover:E,renderValue:R,suffix:C,value:O,...j}=e,eg[0]=e,eg[1]=n,eg[2]=r,eg[3]=i,eg[4]=o,eg[5]=a,eg[6]=s,eg[7]=l,eg[8]=d,eg[9]=f,eg[10]=p,eg[11]=g,eg[12]=y,eg[13]=v,eg[14]=b,eg[15]=x,eg[16]=w,eg[17]=S,eg[18]=k,eg[19]=E,eg[20]=j,eg[21]=C,eg[22]=A,eg[23]=T,eg[24]=M,eg[25]=P,eg[26]=_,eg[27]=I,eg[28]=R,eg[29]=O):(n=eg[1],r=eg[2],i=eg[3],o=eg[4],a=eg[5],s=eg[6],l=eg[7],d=eg[8],f=eg[9],p=eg[10],g=eg[11],y=eg[12],v=eg[13],b=eg[14],x=eg[15],w=eg[16],S=eg[17],k=eg[18],E=eg[19],j=eg[20],C=eg[21],A=eg[22],T=eg[23],M=eg[24],P=eg[25],_=eg[26],I=eg[27],R=eg[28],O=eg[29]);let ey=void 0===A||A,ev=void 0===T?2:T,eb=void 0===M?m.sU:M,ex=void 0===P?3:P,ew=void 0===_?m.sU:_,eS=void 0===I?2:I,ek=void 0===R?tR:R,eE=O||null,ej=O||null;eg[30]!==eE||eg[31]!==ej?($={activeValue:eE,focused:!1,listFocused:!1,query:null,value:ej},eg[30]=eE,eg[31]=ej,eg[32]=$):$=eg[32];let[eC,eA]=(0,h.useReducer)(tP,$),{activeValue:eT,focused:eM,listFocused:eP,query:e_,value:eI}=eC;eg[33]!==ev||eg[34]!==ex?(D=e=>{let{value:t}=e;return(0,u.jsx)(m.Zp,{"data-as":"button",padding:ex,radius:2,tone:"inherit",children:(0,u.jsx)(m.EY,{size:ev,textOverflow:"ellipsis",children:t})})},eg[33]=ev,eg[34]=ex,eg[35]=D):D=eg[35];let eR="function"==typeof k?k:D,eO="function"==typeof i?i:tO,e$=(0,h.useRef)(null),eD=(0,h.useRef)(null),eL=(0,h.useRef)(null),eV=(0,h.useRef)(null),[ez,eN]=(0,h.useState)(null);eg[36]===Symbol.for("react.memo_cache_sentinel")?(L=e=>{(0,h.startTransition)(()=>eN(e))},eg[36]=L):L=eg[36];let eF=L,eB=(0,h.useRef)(!1),eU=(0,h.useRef)(eI),eH=(0,h.useRef)(O),eW=(0,h.useRef)(!1);eg[37]!==ez?(V=()=>ez,z=[ez],eg[37]=ez,eg[38]=V,eg[39]=z):(V=eg[38],z=eg[39]),(0,h.useImperativeHandle)(eL,V,z),eg[40]!==ez?(N=()=>ez,F=[ez],eg[40]=ez,eg[41]=N,eg[42]=F):(N=eg[41],F=eg[42]),(0,h.useImperativeHandle)(t,N,F);let eG=`${a}-listbox`,eY=Array.isArray(b)?b:m.Ml,eq=(0,m.GB)(ex);eg[43]!==eY||eg[44]!==eI?(B=null!==eI?eY.find(e=>e.value===eI):void 0,eg[43]=eY,eg[44]=eI,eg[45]=B):B=eg[45];let eX=B;if(eg[46]!==eO||eg[47]!==eY||eg[48]!==e_){let e;eg[50]!==eO||eg[51]!==e_?(e=e=>!e_||eO(e_,e),eg[50]=eO,eg[51]=e_,eg[52]=e):e=eg[52],U=eY.filter(e),eg[46]=eO,eg[47]=eY,eg[48]=e_,eg[49]=U}else U=eg[49];let eK=U,eZ=eK.length,eJ=eT?`${a}-option-${eT}`:void 0,e0=null!==e_&&s||eM&&null!==e_;eg[53]!==l||eg[54]!==p||eg[55]!==S?(H=e=>{setTimeout(()=>{if(eW.current)return;let t=(S||[]).concat(e$.current?[e$.current]:[],eD.current?[eD.current]:[]),n=!1;if(document.activeElement){for(let e of t)if(e===document.activeElement||e.contains(document.activeElement)){n=!0;break}}!1===n&&(eA({type:"root/blur"}),eW.current=!1,p&&p(null),l&&l(e))},0)},eg[53]=l,eg[54]=p,eg[55]=S,eg[56]=H):H=eg[56];let e1=H;eg[57]===Symbol.for("react.memo_cache_sentinel")?(W=e=>{let t=eV.current,n=e.target instanceof HTMLElement?e.target:null,r=t?.contains(n)||!1;r!==eB.current&&(eB.current=r,eA({type:"root/setListFocused",listFocused:r}))},eg[57]=W):W=eg[57];let e2=W;eg[58]!==d||eg[59]!==p||eg[60]!==g?(G=e=>{eA({type:"value/change",value:e}),eW.current=!1,g&&g(e),eU.current=e,d&&d(e),p&&p(null),eL.current?.focus()},eg[58]=d,eg[59]=p,eg[60]=g,eg[61]=G):G=eg[61];let e5=G;eg[62]!==eT||eg[63]!==eK||eg[64]!==eZ||eg[65]!==p?(Y=e=>{if("ArrowDown"===e.key){if(e.preventDefault(),!eZ)return;let t=eK.find(e=>e.value===eT),n=t?eK.indexOf(t):-1,r=eK[(n+1)%eZ];r&&eA({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("ArrowUp"===e.key){if(e.preventDefault(),!eZ)return;let t=eK.find(e=>e.value===eT),n=t?eK.indexOf(t):-1,r=eK[-1===n?eZ-1:(eZ+n-1)%eZ];r&&eA({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("Escape"===e.key){eA({type:"root/escape"}),eW.current=!1,p&&p(null),eL.current?.focus();return}let t=e.target,n=eV.current;
41if((n===t||n?.contains(t))&&!t_.includes(e.key))return void eL.current?.focus()},eg[62]=eT,eg[63]=eK,eg[64]=eZ,eg[65]=p,eg[66]=Y):Y=eg[66];let e3=Y;eg[67]!==p?(q=e=>{let t=e.currentTarget.value;eA({type:"input/change",query:t}),p&&p(t)},eg[67]=p,eg[68]=q):q=eg[68];let e4=q;eg[69]!==eX||eg[70]!==ek||eg[71]!==eI?(X=()=>{eA({type:"root/open",query:eI?ek(eI,eX):""})},eg[69]=eX,eg[70]=ek,eg[71]=eI,eg[72]=X):X=eg[72];let e6=X;eg[73]!==e6||eg[74]!==eM||eg[75]!==f||eg[76]!==v?(K=e=>{eM||(eA({type:"input/focus"}),f&&f(e),v&&e6())},eg[73]=e6,eg[74]=eM,eg[75]=f,eg[76]=v,eg[77]=K):K=eg[77];let e9=K;eg[78]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>{eW.current=!0},eg[78]=Z):Z=eg[78];let e8=Z;eg[79]===Symbol.for("react.memo_cache_sentinel")?(J=()=>{eW.current=!1},eg[79]=J):J=eg[79];let e7=J;eg[80]!==d||eg[81]!==p?(Q=()=>{eA({type:"root/clear"}),eU.current="",d&&d(""),p&&p(null),eL.current?.focus()},eg[80]=d,eg[81]=p,eg[82]=Q):Q=eg[82];let te=Q;eg[83]===Symbol.for("react.memo_cache_sentinel")?(ee=()=>{eA({type:"input/focus"})},eg[83]=ee):ee=eg[83];let tt=ee;eg[84]!==O?(et=()=>{if(O!==eH.current){eH.current=O,void 0!==O&&(eA({type:"value/change",value:O}),eU.current=O);return}O!==eU.current&&(eU.current=O||null,eA({type:"value/change",value:O||null}))},en=[O],eg[84]=O,eg[85]=et,eg[86]=en):(et=eg[85],en=eg[86]),(0,h.useEffect)(et,en),eg[87]!==eM?(er=()=>{!eM&&eU.current&&eA({type:"root/setActiveValue",value:eU.current})},ei=[eM],eg[87]=eM,eg[88]=er,eg[89]=ei):(er=eg[88],ei=eg[89]),(0,h.useEffect)(er,ei),eg[90]!==eT||eg[91]!==eK?(eo=()=>{let e=eV.current;if(!e)return;let t=eK.find(e=>e.value===eT);if(t){let n=eK.indexOf(t),r=e.childNodes[n];if(r){if(document.activeElement&&r.contains(document.activeElement))return;tE(r)}}},ea=[eT,eK],eg[90]=eT,eg[91]=eK,eg[92]=eo,eg[93]=ea):(eo=eg[92],ea=eg[93]),(0,h.useEffect)(eo,ea);e:{if(!s&&!r&&eI){let e;eg[94]===Symbol.for("react.memo_cache_sentinel")?(e={"aria-label":"Clear",onFocus:tt},eg[94]=e):e=eg[94],es=e;break e}es=void 0}let tn=es,tr=eq.map(tD),ti=eq.map(tL),to="object"==typeof y?y:m.sU;eg[95]!==e6||eg[96]!==to?(el=e=>{e6(),to.onClick&&to.onClick(e),function(e){requestAnimationFrame(e)}(()=>eL.current?.focus())},eg[95]=e6,eg[96]=to,eg[97]=el):el=eg[97];let ta=el;eg[98]!==r||eg[99]!==e0||eg[100]!==ev||eg[101]!==ta||eg[102]!==y||eg[103]!==tr||eg[104]!==ti||eg[105]!==to||eg[106]!==w?(eu=r||w||!y?void 0:(0,u.jsx)(m.az,{"aria-hidden":e0,padding:tr,children:(0,u.jsx)(m.$n,{"aria-label":"Open",disabled:e0,fontSize:ev,icon:eQ.D3D,mode:"bleed",padding:ti,...to,onClick:ta})}),eg[98]=r,eg[99]=e0,eg[100]=ev,eg[101]=ta,eg[102]=y,eg[103]=tr,eg[104]=ti,eg[105]=to,eg[106]=w,eg[107]=eu):eu=eg[107];let ts=eu;t:{if(null===e_){if(null!==eI){let e;eg[108]!==eX||eg[109]!==ek||eg[110]!==eI?(e=ek(eI,eX),eg[108]=eX,eg[109]=ek,eg[110]=eI,eg[111]=e):e=eg[111],ec=e;break t}ec="";break t}ec=e_}let tl=ec;eg[112]!==eP?(ed=e=>{"Tab"===e.key&&eP&&eL.current?.focus()},eg[112]=eP,eg[113]=ed):ed=eg[113];let tu=ed;n:{let e,t,n;if(0===eK.length){eh=null;break n}if(eg[114]!==eT||eg[115]!==eX||eg[116]!==eK||eg[117]!==e5||eg[118]!==a||eg[119]!==eP||eg[120]!==s||eg[121]!==eR){let t;eg[123]!==eT||eg[124]!==eX||eg[125]!==e5||eg[126]!==a||eg[127]!==eP||eg[128]!==s||eg[129]!==eR?(t=e=>{let t=null!==eT?e.value===eT:eX===e;return(0,u.jsx)(tM,{id:`${a}-option-${e.value}`,onSelect:e5,selected:t,value:e.value,children:(0,h.cloneElement)(eR(e),{disabled:s,selected:t,tabIndex:eP&&t?0:-1})},e.value)},eg[123]=eT,eg[124]=eX,eg[125]=e5,eg[126]=a,eg[127]=eP,eg[128]=s,eg[129]=eR,eg[130]=t):t=eg[130],e=eK.map(t),eg[114]=eT,eg[115]=eX,eg[116]=eK,eg[117]=e5,eg[118]=a,eg[119]=eP,eg[120]=s,eg[121]=eR,eg[122]=e}else e=eg[122];eg[131]!==eG||eg[132]!==e?(t=(0,u.jsx)(m.BJ,{as:"ul","aria-multiselectable":!1,"data-ui":"AutoComplete__resultsList",id:eG,ref:eV,role:"listbox",space:1,children:e}),eg[131]=eG,eg[132]=e,eg[133]=t):t=eg[133],eg[134]!==tu||eg[135]!==eb||eg[136]!==t?(n=(0,u.jsx)(tC,{"data-ui":"AutoComplete__results",onKeyDown:tu,padding:1,...eb,tabIndex:-1,children:t}),eg[134]=tu,eg[135]=eb,eg[136]=t,eg[137]=n):n=eg[137],eh=n}let tc=eh;r:{let e;if(E){let e,t=!e0;eg[138]!==tc||eg[139]!==e8||eg[140]!==e7||eg[141]!==ez||eg[142]!==E||eg[143]!==t?(e=(0,u.jsx)(t$,{content:tc,hidden:t,inputElement:ez,onMouseEnter:e8,onMouseLeave:e7,resultsPopoverElementRef:eD,renderPopover:E}),eg[138]=tc,eg[139]=e8,eg[140]=e7,eg[141]=ez,eg[142]=E,eg[143]=t,eg[144]=e):e=eg[144],ef=e;break r}if(0===eZ){ef=null;break r}eg[145]!==tc||eg[146]!==e0||eg[147]!==e8||eg[148]!==e7||eg[149]!==ez||eg[150]!==ew||eg[151]!==eS?(e=(0,u.jsx)(m.AM,{arrow:!1,constrainSize:!0,content:tc,fallbackPlacements:tI,matchReferenceWidth:!0,onMouseEnter:e8,onMouseLeave:e7,open:e0,overflow:"auto",placement:"bottom-start",portal:!0,radius:eS,ref:eD,referenceElement:ez,...ew}),eg[145]=tc,eg[146]=e0,eg[147]=e8,eg[148]=e7,eg[149]=ez,eg[150]=ew,eg[151]=eS,eg[152]=e):e=eg[152],ef=e}let td=ef,th=s&&tT,tf=C||ts;return eg[153]!==eJ||eg[154]!==ey||eg[155]!==tn||eg[156]!==n||eg[157]!==r||eg[158]!==e0||eg[159]!==ev||eg[160]!==te||eg[161]!==e4||eg[162]!==e9||eg[163]!==o||eg[164]!==a||eg[165]!==tl||eg[166]!==eG||eg[167]!==eq||eg[168]!==x||eg[169]!==eS||eg[170]!==w||eg[171]!==j||eg[172]!==th||eg[173]!==tf?(ep=(0,u.jsx)(m.ks,{...j,"aria-activedescendant":eJ,"aria-autocomplete":"list","aria-expanded":e0,"aria-owns":eG,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",border:ey,clearButton:tn,customValidity:n,disabled:r,fontSize:ev,icon:o,iconRight:th,id:a,inputMode:"search",onChange:e4,onClear:te,onFocus:e9,padding:eq,prefix:x,radius:eS,readOnly:w,ref:eF,role:"combobox",spell
41Check:!1,suffix:tf,value:tl}),eg[153]=eJ,eg[154]=ey,eg[155]=tn,eg[156]=n,eg[157]=r,eg[158]=e0,eg[159]=ev,eg[160]=te,eg[161]=e4,eg[162]=e9,eg[163]=o,eg[164]=a,eg[165]=tl,eg[166]=eG,eg[167]=eq,eg[168]=x,eg[169]=eS,eg[170]=w,eg[171]=j,eg[172]=th,eg[173]=tf,eg[174]=ep):ep=eg[174],eg[175]!==e1||eg[176]!==e2||eg[177]!==e3||eg[178]!==td||eg[179]!==ep?(em=(0,u.jsxs)(tj,{"data-ui":"Autocomplete",onBlur:e1,onFocus:e2,onKeyDown:e3,ref:e$,children:[ep,td]}),eg[175]=e1,eg[176]=e2,eg[177]=e3,eg[178]=td,eg[179]=ep,eg[180]=em):em=eg[180],em}).displayName="ForwardRef(Autocomplete)";let tV=g.I4.ol.withConfig({displayName:"StyledBreadcrumbs",componentId:"sc-1es8h8q-0"})`margin:0;padding:0;display:flex;list-style:none;align-items:center;white-space:nowrap;line-height:0;`,tz=(0,g.I4)(m.$n).withConfig({displayName:"ExpandButton",componentId:"sc-1es8h8q-1"})`appearance:none;margin:-4px;`;(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,d,f,p,g,y,v,b,x=(0,c.c)(30);x[0]!==e?({children:n,gap:r,maxLength:i,separator:a,space:s,...o}=e,x[0]=e,x[1]=n,x[2]=r,x[3]=i,x[4]=o,x[5]=a,x[6]=s):(n=x[1],r=x[2],i=x[3],o=x[4],a=x[5],s=x[6]);let w=void 0===r?void 0===s?2:s:r;x[7]!==w?(l=(0,m.GB)(w),x[7]=w,x[8]=l):l=x[8];let S=l,[k,E]=(0,h.useState)(!1),j=(0,h.useRef)(null),C=(0,h.useRef)(null);x[9]===Symbol.for("react.memo_cache_sentinel")?(d=()=>E(!1),x[9]=d):d=x[9];let A=d;x[10]===Symbol.for("react.memo_cache_sentinel")?(f=()=>E(!0),x[10]=f):f=x[10];let T=f;x[11]===Symbol.for("react.memo_cache_sentinel")?(p=()=>[j.current,C.current],x[11]=p):p=x[11],(0,m.PR)(A,p),x[12]!==n?(g=h.Children.toArray(n).filter(h.isValidElement),x[12]=n,x[13]=g):g=x[13];let M=g;x[14]!==i||x[15]!==k||x[16]!==M||x[17]!==S?(y={collapse:A,expand:T,expandElementRef:j,maxLength:i,open:k,popoverElementRef:C,rawItems:M,space:S},x[14]=i,x[15]=k,x[16]=M,x[17]=S,x[18]=y):y=x[18];let P=function(e){let t=(0,c.c)(28),{collapse:n,expand:r,expandElementRef:i,maxLength:o,open:a,popoverElementRef:s,rawItems:l,space:d}=e,h=l.length;if(o&&h>o){let e,c=Math.ceil(o/2),f=Math.floor(o/2);if(t[0]!==f||t[1]!==c||t[2]!==n||t[3]!==r||t[4]!==i||t[5]!==h||t[6]!==a||t[7]!==s||t[8]!==l||t[9]!==d){let o,p,g,y,v=l.slice(0,c-1);t[11]!==f||t[12]!==c||t[13]!==h||t[14]!==l?(o=l.slice(c-1,h-f),t[11]=f,t[12]=c,t[13]=h,t[14]=l,t[15]=o):o=t[15],t[16]!==d||t[17]!==o?(p=(0,u.jsx)(m.BJ,{as:"ol",overflow:"auto",padding:d,gap:d,children:o}),t[16]=d,t[17]=o,t[18]=p):p=t[18];let b=a?n:r;t[19]!==i||t[20]!==a||t[21]!==b?(g=(0,u.jsx)(tz,{fontSize:1,mode:"bleed",onClick:b,padding:1,ref:i,selected:a,text:"…"}),t[19]=i,t[20]=a,t[21]=b,t[22]=g):g=t[22],t[23]!==a||t[24]!==s||t[25]!==p||t[26]!==g?(y=(0,u.jsx)(m.AM,{constrainSize:!0,content:p,open:a,placement:"top",portal:!0,ref:s,children:g},"button"),t[23]=a,t[24]=s,t[25]=p,t[26]=g,t[27]=y):y=t[27],e=[...v,y,...l.slice(h-f)],t[0]=f,t[1]=c,t[2]=n,t[3]=r,t[4]=i,t[5]=h,t[6]=a,t[7]=s,t[8]=l,t[9]=d,t[10]=e}else e=t[10];return e}return l}(y);if(x[19]!==P||x[20]!==a||x[21]!==S){let e;x[23]!==a||x[24]!==S?(e=(e,t)=>(0,u.jsxs)(h.Fragment,{children:[t>0&&(0,u.jsx)(m.az,{"aria-hidden":!0,as:"li",paddingX:S,children:a||(0,u.jsx)(m.EY,{muted:!0,children:"/"})}),(0,u.jsx)(m.az,{as:"li",children:e})]},t),x[23]=a,x[24]=S,x[25]=e):e=x[25],v=P.map(e),x[19]=P,x[20]=a,x[21]=S,x[22]=v}else v=x[22];return x[26]!==t||x[27]!==o||x[28]!==v?(b=(0,u.jsx)(tV,{"data-ui":"Breadcrumbs",...o,ref:t,children:v}),x[26]=t,x[27]=o,x[28]=v,x[29]=b):b=x[29],b}).displayName="ForwardRef(Breadcrumbs)";let tN=(0,m.bz)("@sanity/ui/context/dialog",{version:0});function tF(e,t,n){return!e||!t||(0,m.Q3)(e,n)||(0,m.Q3)(t,n)}let tB=(0,g.I4)(m.Wd).withConfig({displayName:"StyledDialog",componentId:"sc-4n4xb3-0"})(m.l_,function({theme:e}){let{color:t}=(0,tw.JW)(e);return{"&:not([hidden])":{display:"flex"},top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"center",outline:"none",background:t.backdrop}},function(e){let{media:t}=(0,tw.JW)(e.theme);return(0,m.U1)(t,e.$position,e=>({"&&":{position:e}}))},function(e){return e.$animate?(0,g.AH)`
42    @keyframes zoomIn {
43      from {
44        opacity: 0;
45        transform: scale(0.95);
46      }
47      to {
48        opacity: 1;
49        transform: scale(1);
50      }
51    }
52    @keyframes fadeIn {
53      from {
54        opacity: 0;
55      }
56      to {
57        opacity: 1;
58      }
59    }
60
61    animation: fadeIn 200ms ease-out;
62    // Animates the dialog card.
63    & > [data-ui='DialogCard'] {
64      animation: zoomIn 200ms ease-out;
65    }
66  `:(0,g.AH)``}),tU=(0,g.I4)(m.mc).withConfig({displayName:"DialogContainer",componentId:"sc-4n4xb3-1"})`&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;`,tH=(0,g.I4)(m.Zp).withConfig({displayName:"DialogCardRoot",componentId:"sc-4n4xb3-2"})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`,tW=(0,g.I4)(m.so).withConfig({displayName:"DialogLayout",componentId:"sc-4n4xb3-3"})`flex:1;min-height:0;width:100%;`,tG=(0,g.I4)(m.az).withConfig({displayName:"DialogHeader",componentId:"sc-4n4xb3-4"})`position:relative;z-index:2;`,tY=(0,g.I4)(m.az).withConfig({displayName:"DialogContent",componentId:"sc-4n4xb3-5"})`position:relative;z-index:1;overflow:auto;outline:none;`,tq=(0,g.I4)(m.az).withConfig({displayName:"DialogFooter",componentId:"sc-4n4xb3-6"})`position:relative;z-index:3;`,tX=(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,d,f,p,g,y,v,b,x,w,S=(0,c.c)(44),{__unstable_autoFocus:k,__unstable_hideCloseButton:E,children:j,contentRef:C,footer:A,header:T,id:M,onClickOutside:P,onClose:_,portal:I,radius:R,scheme:O,shadow:$,width:D}=e,L=(0,m.WP)(),V=I?L.elements?.[I]||null:L.element,z=(0,m.$w)().element;S[0]!==R?(n=(0,m.GB)(R),S[0]=R,S[1]=n):n=S[1];let N=n;S[2]!==$?(r=(0,m.GB)($),S[2]=$,S[3]=r):r=S[3];let F=r;S[4]!==D?(i=(0,m.GB)(D),S[4]=D,S[5]=i):i=S[5];let B=i,U=(0,h.useRef)(null),H=(0,h.useRef)(null),{isTopLayer:W}=(0,m.Z4)(),G=`${M}_label`,Y=!!_&&!1===E,q=!!T||Y;return S[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>U.current,S[6]=o):o=S[6],(0,h.useImperativeHandle)(t,o),S[7]===Symbol.for("react.memo_cache_sentinel")?(a=()=>H.current,S[7]=a):a=S[7],(0,h.useImperativeHandle)(C,a),S[8]!==k?(s=()=>{k&&U.current&&tE(U.current)},l=[k,U],S[8]=k,S[9]=s,S[10]=l):(s=S[9],l=S[10]),(0,h.useEffect)(s,l),S[11]!==z||S[12]!==W||S[13]!==_||S[14]!==V?(d=e=>{if(!W||!_)return;let t=document.activeElement;t&&!tF(z,V,t)||"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),_())},S[11]=z,S[12]=W,S[13]=_,S[14]=V,S[15]=d):d=S[15],(0,m.Pm)(d),S[16]!==z||S[17]!==W||S[18]!==P||S[19]!==V?(f=W&&P&&(e=>{let t=e.target;t&&!tF(z,V,t)||P()}),S[16]=z,S[17]=W,S[18]=P,S[19]=V,S[20]=f):f=S[20],S[21]===Symbol.for("react.memo_cache_sentinel")?(p=()=>[U.current],S[21]=p):p=S[21],(0,m.PR)(f,p),S[22]!==T||S[23]!==G||S[24]!==_||S[25]!==Y||S[26]!==q?(g=q&&(0,u.jsx)(tG,{children:(0,u.jsxs)(m.so,{align:"flex-start",padding:3,children:[(0,u.jsx)(m.az,{flex:1,padding:2,children:T&&(0,u.jsx)(m.EY,{id:G,size:1,weight:"semibold",children:T})}),Y&&(0,u.jsx)(m.az,{flex:"none",children:(0,u.jsx)(m.$n,{"aria-label":"Close dialog",disabled:!_,icon:eQ.USm,mode:"bleed",onClick:_,padding:2})})]})}),S[22]=T,S[23]=G,S[24]=_,S[25]=Y,S[26]=q,S[27]=g):g=S[27],S[28]!==j?(y=(0,u.jsx)(tY,{flex:1,ref:H,tabIndex:-1,children:j}),S[28]=j,S[29]=y):y=S[29],S[30]!==A?(v=A&&(0,u.jsx)(tq,{children:A}),S[30]=A,S[31]=v):v=S[31],S[32]!==g||S[33]!==y||S[34]!==v?(b=(0,u.jsxs)(tW,{direction:"column",children:[g,y,v]}),S[32]=g,S[33]=y,S[34]=v,S[35]=b):b=S[35],S[36]!==N||S[37]!==O||S[38]!==F||S[39]!==b?(x=(0,u.jsx)(tH,{radius:N,ref:U,scheme:O,shadow:F,children:b}),S[36]=N,S[37]=O,S[38]=F,S[39]=b,S[40]=x):x=S[40],S[41]!==x||S[42]!==B?(w=(0,u.jsx)(tU,{"data-ui":"DialogCard",width:B,children:x}),S[41]=x,S[42]=B,S[43]=w):w=S[43],w});tX.displayName="ForwardRef(DialogCard)",(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,d,f,p,g,y,v,b,x,w,S,k,E,j,C,A,T,M,P,_,I,R,O,$,D,L,V,z=(0,c.c)(70),N=(0,h.useContext)(tN),{layer:F}=(0,m.M4)();z[0]!==e?({__unstable_autoFocus:x,__unstable_hideCloseButton:w,cardRadius:S,cardShadow:k,children:i,contentRef:o,footer:a,header:s,id:l,onActivate:d,onClickOutside:f,onClose:p,onFocus:g,padding:E,portal:y,position:n,scheme:b,width:j,zOffset:r,animate:C,...v}=e,z[0]=e,z[1]=n,z[2]=r,z[3]=i,z[4]=o,z[5]=a,z[6]=s,z[7]=l,z[8]=d,z[9]=f,z[10]=p,z[11]=g,z[12]=y,z[13]=v,z[14]=b,z[15]=x,z[16]=w,z[17]=S,z[18]=k,z[19]=E,z[20]=j,z[21]=C):(n=z[1],r=z[2],i=z[3],o=z[4],a=z[5],s=z[6],l=z[7],d=z[8],f=z[9],p=z[10],g=z[11],y=z[12],v=z[13],b=z[14],x=z[15],w=z[16],S=z[17],k=z[18],E=z[19],j=z[20],C=z[21]);let B=void 0===x||x,U=void 0!==w&&w,H=void 0===S?4:S,W=void 0===k?3:k,G=void 0===E?3:E,Y=void 0===j?0:j,q=void 0!==C&&C,X=n??(N.position||"fixed"),K=r??(N.zOffset||F.dialog.zOffset),Z=!(0,m.jt)()&&q,J=(0,m.WP)(),Q=y?J.elements?.[y]||null:J.element,ee=(0,m.$w)().element;z[22]!==H?(A=(0,m.GB)(H),z[22]=H,z[23]=A):A=z[23];let et=A;z[24]!==G?(T=(0,m.GB)(G),z[24]=G,z[25]=T):T=z[25];let en=T;z[26]!==X?(M=(0,m.GB)(X),z[26]=X,z[27]=M):M=z[27];let er=M;z[28]!==Y?(P=(0,m.GB)(Y),z[28]=Y,z[29]=P):P=z[29];let ei=P;z[30]!==K?(_=(0,m.GB)(K),z[30]=K,z[31]=_):_=z[31];let eo=_,ea=(0,h.useRef)(null),es=(0,h.useRef)(null),el=(0,h.useRef)(null),eu=(0,h.useRef)(null);z[32]!==g?(I=e=>{g?.(e);let t=e.target,n=el.current;return n&&t===ea.current?void function e(t){for(let n=t.childNodes.length-1;n>=0;n--){let r=t.childNodes[n];if((0,m.sb)(r)&&(tk(r)||e(r)))return!0}return!1}(n):n&&t===es.current?void tE(n):void((0,m.sb)(e.target)&&(eu.current=e.target))},z[32]=g,z[33]=I):I=z[33];let ec=I,ed=`${l}_label`,eh=(0,h.useRef)(void 0);z[34]!==ee||z[35]!==Q?(R=()=>{eh.current&&clearTimeout(eh.current),eh.current=setTimeout(()=>{let e=document.activeElement;if(e&&!tF(ee,Q,e)){let e=eu.current;if(!e||!document.body.contains(e)){let e=el.current;e&&tE(e);return}
66e.focus()}},0)},z[34]=ee,z[35]=Q,z[36]=R):R=z[36];let ef=R;return z[37]===Symbol.for("react.memo_cache_sentinel")?(O=(0,u.jsx)("div",{ref:ea,tabIndex:0}),z[37]=O):O=z[37],z[38]!==B||z[39]!==et||z[40]!==W||z[41]!==i||z[42]!==o||z[43]!==a||z[44]!==s||z[45]!==U||z[46]!==l||z[47]!==f||z[48]!==p||z[49]!==y||z[50]!==b||z[51]!==ei?($=(0,u.jsx)(tX,{__unstable_autoFocus:B,__unstable_hideCloseButton:U,contentRef:o,footer:a,header:s,id:l,onClickOutside:f,onClose:p,portal:y,radius:et,ref:el,scheme:b,shadow:W,width:ei,children:i}),z[38]=B,z[39]=et,z[40]=W,z[41]=i,z[42]=o,z[43]=a,z[44]=s,z[45]=U,z[46]=l,z[47]=f,z[48]=p,z[49]=y,z[50]=b,z[51]=ei,z[52]=$):$=z[52],z[53]===Symbol.for("react.memo_cache_sentinel")?(D=(0,u.jsx)("div",{ref:es,tabIndex:0}),z[53]=D):D=z[53],z[54]!==Z||z[55]!==ec||z[56]!==ef||z[57]!==l||z[58]!==ed||z[59]!==d||z[60]!==en||z[61]!==er||z[62]!==t||z[63]!==v||z[64]!==$||z[65]!==eo?(L=(0,u.jsxs)(tB,{...v,$animate:Z,$padding:en,$position:er,"aria-labelledby":ed,"aria-modal":!0,"data-ui":"Dialog",id:l,onActivate:d,onClick:ef,onFocus:ec,ref:t,role:"dialog",zOffset:eo,children:[O,$,D]}),z[54]=Z,z[55]=ec,z[56]=ef,z[57]=l,z[58]=ed,z[59]=d,z[60]=en,z[61]=er,z[62]=t,z[63]=v,z[64]=$,z[65]=eo,z[66]=L):L=z[66],z[67]!==y||z[68]!==L?(V=(0,u.jsx)(m.ZL,{__unstable_name:y,children:L}),z[67]=y,z[68]=L,z[69]=V):V=z[69],V}).displayName="ForwardRef(Dialog)";let tK=(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,d,f,p,g,y,v,b,x,w,S,k,E,j,C,A,T,M=(0,c.c)(62),{__unstable_disableRestoreFocusOnClose:P,boundaryElement:_,button:I,id:R,menu:O,onClose:$,onOpen:D,placement:L,popoverScheme:V,portal:z,popover:N,popoverRadius:F,preventOverflow:B}=e,U=void 0!==P&&P,H=void 0===z||z,[W,G]=(0,h.useState)(!1),[Y,q]=(0,h.useState)(null),[X,K]=(0,h.useState)(null);M[0]===Symbol.for("react.memo_cache_sentinel")?(n=[],M[0]=n):n=M[0];let[Z,J]=(0,h.useState)(n),Q=(0,h.useRef)(W);M[1]!==D||M[2]!==W?(r=()=>{D&&W&&!Q.current&&D()},i=[D,W],M[1]=D,M[2]=W,M[3]=r,M[4]=i):(r=M[3],i=M[4]),(0,h.useEffect)(r,i),M[5]!==$||M[6]!==W?(o=()=>{$&&!W&&Q.current&&$()},a=[$,W],M[5]=$,M[6]=W,M[7]=o,M[8]=a):(o=M[7],a=M[8]),(0,h.useEffect)(o,a),M[9]!==W?(s=()=>{Q.current=W},l=[W],M[9]=W,M[10]=s,M[11]=l):(s=M[10],l=M[11]),(0,h.useEffect)(s,l),M[12]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{G(tZ),q(null)},M[12]=d):d=M[12];let ee=d;M[13]!==W?(f=e=>{W&&e.preventDefault()},M[13]=W,M[14]=f):f=M[14];let et=f;M[15]===Symbol.for("react.memo_cache_sentinel")?(p=e=>{if("ArrowDown"===e.key||"Enter"===e.key||" "===e.key){e.preventDefault(),G(!0),q("first");return}if("ArrowUp"===e.key){e.preventDefault(),G(!0),q("last");return}},M[15]=p):p=M[15];let en=p;M[16]!==X||M[17]!==Z?(g=e=>{let t=e.target;if(t instanceof Node&&!(X&&(t===X||X.contains(t)))){for(let e of Z)if(t===e||e.contains(t))return;G(!1)}},M[16]=X,M[17]=Z,M[18]=g):g=M[18];let er=g;M[19]!==X||M[20]!==U?(y=()=>{G(!1),!U&&X&&X.focus()},M[19]=X,M[20]=U,M[21]=y):y=M[21];let ei=y;M[22]!==Z?(v=e=>{let t=e.relatedTarget;if(t instanceof Node){for(let e of Z)if(e===t||e.contains(t))return;G(!1)}},M[22]=Z,M[23]=v):v=M[23];let eo=v;M[24]!==X||M[25]!==U?(b=()=>{G(!1),!U&&X&&X.focus()},M[24]=X,M[25]=U,M[26]=b):b=M[26];let ea=b;M[27]===Symbol.for("react.memo_cache_sentinel")?(x=e=>(J(t=>t.concat([e])),()=>J(t=>t.filter(t=>t!==e))),M[27]=x):x=M[27];let es=x;M[28]!==X||M[29]!==eo||M[30]!==ea||M[31]!==er||M[32]!==ei||M[33]!==R||M[34]!==O||M[35]!==Y?(w=O&&(0,h.cloneElement)(O,{"aria-labelledby":R,onBlurCapture:eo,onClickOutside:er,onEscape:ei,onItemClick:ea,originElement:X,registerElement:es,shouldFocus:Y}),M[28]=X,M[29]=eo,M[30]=ea,M[31]=er,M[32]=ei,M[33]=R,M[34]=O,M[35]=Y,M[36]=w):w=M[36];let el=w;M[37]!==I||M[38]!==et||M[39]!==R||M[40]!==W?(S=I&&(0,h.cloneElement)(I,{"data-ui":"MenuButton",id:R,onClick:ee,onKeyDown:en,onMouseDown:et,"aria-haspopup":!0,"aria-expanded":W,ref:K,selected:I.props.selected??W}),M[37]=I,M[38]=et,M[39]=R,M[40]=W,M[41]=S):S=M[41];let eu=S;M[42]!==X?(k=()=>X,E=[X],M[42]=X,M[43]=k,M[44]=E):(k=M[43],E=M[44]),(0,h.useImperativeHandle)(t,k,E),M[45]!==N?(j=N||{},M[45]=N,M[46]=j):j=M[46],M[47]!==_||M[48]!==L||M[49]!==F||M[50]!==V||M[51]!==H||M[52]!==B||M[53]!==j?(C={boundaryElement:_,overflow:"auto",placement:L,portal:H,preventOverflow:B,radius:F,scheme:V,...j},M[47]=_,M[48]=L,M[49]=F,M[50]=V,M[51]=H,M[52]=B,M[53]=j,M[54]=C):C=M[54];let ec=C;return M[55]!==eu?(A=eu||(0,u.jsx)(u.Fragment,{}),M[55]=eu,M[56]=A):A=M[56],M[57]!==el||M[58]!==W||M[59]!==ec||M[60]!==A?(T=(0,u.jsx)(m.AM,{"data-ui":"MenuButton__popover",...ec,content:el,open:W,children:A}),M[57]=el,M[58]=W,M[59]=ec,M[60]=A,M[61]=T):T=M[61],T});function tZ(e){return!e}tK.displayName="ForwardRef(MenuButton)";let tJ=(0,g.i7)`
67  0% {
68    background-position: 100%;
69  }
70  100% {
71    background-position: -100%;
72  }
73`,tQ=(0,g.AH)`
74  background-image: linear-gradient(
75    to right,
76    var(--card-skeleton-color-from),
77    var(--card-skeleton-color-to),
78    var(--card-skeleton-color-from),
79    var(--card-skeleton-color-from),
80    var(--card-skeleton-color-from)
81  );
82  background-position: 100%;
83  background-size: 200% 100%;
84  background-attachment: fixed;
85  animation-name: ${tJ};
86  animation-timing-function: ease-in-out;
87  animation-iteration-count: infinite;
88  animation-duration: 2000ms;
89`,t0=(0,g.AH)`
90  opacity: ${({$visible:e})=>+!!e};
91  transition: opacity 200ms ease-in;
92
93  @media screen and (prefers-reduced-motion: no-preference) {
94    ${({$animated:e})=>e?tQ:(0,g.AH)`
95            background-color: var(--card-skeleton-color-from);
96          `}
97  }
98
99  @media screen and (prefers-reduced-motion: reduce) {
100    background-color: var(--card-skeleton-color-from);
101  }
102`,t1=(0,g.I4)(m.az).withConfig({displayName:"StyledSkeleton",componentId:"sc-ebtpni-0"})(m.gK,t0),t2=(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,d,f=(0,c.c)(16);f[0]!==e?({animated:o,delay:n,radius:r,...i}=e,f[0]=e,f[1]=n,f[2]=r,f[3]=i,f[4]=o):(n=f[1],r=f[2],i=f[3],o=f[4]);let p=void 0!==o&&o,[g,y]=(0,h.useState)(!n);f[5]!==n?(a=()=>
102{if(!n)return;let e=setTimeout(()=>{y(!0)},n);return()=>{clearTimeout(e)}},s=[n],f[5]=n,f[6]=a,f[7]=s):(a=f[6],s=f[7]),(0,h.useEffect)(a,s),f[8]!==r?(l=(0,m.GB)(r),f[8]=r,f[9]=l):l=f[9];let v=!n||g;return f[10]!==p||f[11]!==t||f[12]!==i||f[13]!==l||f[14]!==v?(d=(0,u.jsx)(t1,{...i,$animated:p,$radius:l,$visible:v,ref:t}),f[10]=p,f[11]=t,f[12]=i,f[13]=l,f[14]=v,f[15]=d):d=f[15],d});t2.displayName="ForwardRef(Skeleton)";let t5=(0,g.I4)(t2).withConfig({displayName:"StyledSkeleton",componentId:"sc-2p7a1v-0"})(e=>{let{$size:t,$style:n}=e,{font:r,media:i}=(0,tw.JW)(e.theme),o=r[n];return(0,m.U1)(i,t,e=>{let t=o.sizes[e];return{height:t.lineHeight-t.ascenderHeight-t.descenderHeight}})});(0,h.forwardRef)(function(e,t){let n,r,i,o,a=(0,c.c)(9);a[0]!==e?({size:r,...n}=e,a[0]=e,a[1]=n,a[2]=r):(n=a[1],r=a[2]);let s=void 0===r?2:r;a[3]!==s?(i=(0,m.GB)(s),a[3]=s,a[4]=i):i=a[4];let l=i;return a[5]!==l||a[6]!==t||a[7]!==n?(o=(0,u.jsx)(t5,{...n,$size:l,ref:t,$style:"text"}),a[5]=l,a[6]=t,a[7]=n,a[8]=o):o=a[8],o}).displayName="ForwardRef(TextSkeleton)",(0,h.forwardRef)(function(e,t){let n,r,i,o,a=(0,c.c)(9);a[0]!==e?({size:r,...n}=e,a[0]=e,a[1]=n,a[2]=r):(n=a[1],r=a[2]);let s=void 0===r?2:r;a[3]!==s?(i=(0,m.GB)(s),a[3]=s,a[4]=i):i=a[4];let l=i;return a[5]!==l||a[6]!==t||a[7]!==n?(o=(0,u.jsx)(t5,{...n,$size:l,ref:t,$style:"label"}),a[5]=l,a[6]=t,a[7]=n,a[8]=o):o=a[8],o}).displayName="ForwardRef(LabelSkeleton)",(0,h.forwardRef)(function(e,t){let n,r,i,o,a=(0,c.c)(9);a[0]!==e?({size:r,...n}=e,a[0]=e,a[1]=n,a[2]=r):(n=a[1],r=a[2]);let s=void 0===r?2:r;a[3]!==s?(i=(0,m.GB)(s),a[3]=s,a[4]=i):i=a[4];let l=i;return a[5]!==l||a[6]!==t||a[7]!==n?(o=(0,u.jsx)(t5,{...n,$size:l,ref:t,$style:"heading"}),a[5]=l,a[6]=t,a[7]=n,a[8]=o):o=a[8],o}).displayName="ForwardRef(HeadingSkeleton)",(0,h.forwardRef)(function(e,t){let n,r,i,o,a=(0,c.c)(9);a[0]!==e?({size:r,...n}=e,a[0]=e,a[1]=n,a[2]=r):(n=a[1],r=a[2]);let s=void 0===r?2:r;a[3]!==s?(i=(0,m.GB)(s),a[3]=s,a[4]=i):i=a[4];let l=i;return a[5]!==l||a[6]!==t||a[7]!==n?(o=(0,u.jsx)(t5,{...n,$size:l,ref:t,$style:"code"}),a[5]=l,a[6]=t,a[7]=n,a[8]=o):o=a[8],o}).displayName="ForwardRef(CodeSkeleton)",(0,h.forwardRef)(function(e,t){let n,r,i,o=(0,c.c)(9);o[0]!==e?({flex:n,...r}=e,o[0]=e,o[1]=n,o[2]=r):(n=o[1],r=o[2]);let a=void 0===e.tabIndex?0:e.tabIndex;return o[3]!==n||o[4]!==e.children||o[5]!==t||o[6]!==r||o[7]!==a?(i=(0,u.jsx)(m.az,{"data-ui":"TabPanel",...r,flex:n,ref:t,role:"tabpanel",tabIndex:a,children:e.children}),o[3]=n,o[4]=e.children,o[5]=t,o[6]=r,o[7]=a,o[8]=i):i=o[8],i}).displayName="ForwardRef(TabPanel)";let t3={error:"critical",warning:"caution",success:"positive",info:"neutral"},t4={error:"critical",warning:"caution",success:"positive",info:"neutral"},t6=(0,g.I4)(m.so).withConfig({displayName:"TextBox",componentId:"sc-1rr7rxo-0"})`overflow-x:auto;`,t9=(0,g.I4)(m.Zp).withConfig({displayName:"StyledToast",componentId:"sc-1rr7rxo-1"})`pointer-events:all;width:100%;position:relative;overflow:hidden;overflow:clip;&[data-has-duration]{padding-bottom:calc(${2}px / 2);}`,t8=g.I4.div.withConfig({displayName:"LoadingBar",componentId:"sc-1rr7rxo-2"})`display:flex;position:absolute;bottom:0px;top:0px;left:0px;right:0px;pointer-events:none;z-index:-1;overflow:hidden;overflow:clip;background:transparent;align-items:flex-end;will-change:opacity;`,t7=(0,g.I4)(m.Zp).withConfig({displayName:"LoadingBarMask",componentId:"sc-1rr7rxo-3"})`position:absolute;top:0;left:-${2}px;right:-${2}px;bottom:${2}px;z-index:1;`,ne=(0,g.I4)(m.Zp).withConfig({displayName:"LoadingBarProgress",componentId:"sc-1rr7rxo-4"})`display:block;height:100%;width:100%;transform-origin:0% 50%;background-color:${e=>{let{color:t}=(0,tw.JW)(e.theme);return t.button.default[e.tone].enabled.bg}};`,nt={error:"alert",warning:"alert",success:"alert",info:"alert"};function nn(e){let t,n,r,i,o,a,s,l,d,h,f,p,g,y,v,b,x,w,S,k,E=(0,c.c)(50);E[0]!==e?({closable:t,description:n,duration:r,onClose:i,radius:s,title:l,status:a,updatedAt:d,...o}=e,E[0]=e,E[1]=t,E[2]=n,E[3]=r,E[4]=i,E[5]=o,E[6]=a,E[7]=s,E[8]=l,E[9]=d):(t=E[1],n=E[2],r=E[3],i=E[4],o=E[5],a=E[6],s=E[7],l=E[8],d=E[9]);let j=void 0===s?3:s,C=a?t3[a]:"default",A=a?t4[a]:"default",T=a?nt[a]:"status",M=.26
102*!(0,m.jt)();E[10]!==M?(h=M?{type:"spring",visualDuration:M,bounce:.25}:{duration:0},E[10]=M,E[11]=h):h=E[11];let P=h,_=r&&isFinite(r)&&r<20736e5;E[12]===Symbol.for("react.memo_cache_sentinel")?(f=["hidden","initial"],E[12]=f):f=E[12];let I=f;E[13]===Symbol.for("react.memo_cache_sentinel")?(p=["visible","slideIn"],E[13]=p):p=E[13];let R=p;E[14]===Symbol.for("react.memo_cache_sentinel")?(g=["hidden","slideOut"],E[14]=g):g=E[14];let O=g,$=_?"":void 0;return E[15]!==l?(y=l&&(0,u.jsx)(m.EY,{size:1,weight:"medium",children:l}),E[15]=l,E[16]=y):y=E[16],E[17]!==n||E[18]!==P?(v=n&&(0,u.jsx)(ns,{muted:!0,size:1,variants:ni,transition:P,children:n}),E[17]=n,E[18]=P,E[19]=v):v=E[19],E[20]!==y||E[21]!==v?(b=(0,u.jsx)(t6,{flex:1,padding:3,children:(0,u.jsxs)(m.BJ,{space:3,children:[y,v]})}),E[20]=y,E[21]=v,E[22]=b):b=E[22],E[23]!==A||E[24]!==t||E[25]!==i?(x=t&&(0,u.jsx)(m.az,{padding:1,children:(0,u.jsx)(m.$n,{as:"button",icon:eQ.USm,mode:"bleed",padding:2,tone:A,onClick:i,style:{verticalAlign:"top"}})}),E[23]=A,E[24]=t,E[25]=i,E[26]=x):x=E[26],E[27]!==b||E[28]!==x||E[29]!==P?(w=(0,u.jsxs)(na,{align:"flex-start",variants:ni,transition:P,children:[b,x]}),E[27]=b,E[28]=x,E[29]=P,E[30]=w):w=E[30],E[31]!==C||E[32]!==r||E[33]!==_||E[34]!==i||E[35]!==j||E[36]!==P||E[37]!==d||E[38]!==M?(S=_&&(0,u.jsxs)(nl,{variants:ni,transition:P,children:[(0,u.jsx)(t7,{tone:C,radius:j}),(0,u.jsx)(nu,{tone:C,initial:{scaleX:0},animate:{scaleX:1},transition:{delay:M,duration:r/1e3,ease:"linear"},onAnimationComplete:i},`progress-${d}`)]}),E[31]=C,E[32]=r,E[33]=_,E[34]=i,E[35]=j,E[36]=P,E[37]=d,E[38]=M,E[39]=S):S=E[39],E[40]!==C||E[41]!==j||E[42]!==o||E[43]!==T||E[44]!==w||E[45]!==S||E[46]!==$||E[47]!==P||E[48]!==M?(k=(0,u.jsxs)(no,{"data-ui":"Toast",role:T,...o,"data-has-duration":$,custom:M,radius:j,shadow:2,tone:C,forwardedAs:"li",layout:"position",variants:nr,initial:I,animate:R,exit:O,transition:P,children:[w,S]}),E[40]=C,E[41]=j,E[42]=o,E[43]=T,E[44]=w,E[45]=S,E[46]=$,E[47]=P,E[48]=M,E[49]=k):k=E[49],k}nn.displayName="Toast";let nr={initial:{y:32,scale:.5,zIndex:1},hidden:{opacity:0},visible:e=>e?{opacity:1,transition:{when:"beforeChildren",staggerChildren:e/3,duration:e/3}}:{opacity:1},slideIn:{y:0,scale:1},slideOut:{zIndex:0,scale:.75}},ni={initial:{willChange:"transform"},hidden:{opacity:0},visible:{opacity:1}},no=tS.P.create(t9),na=tS.P.create(m.so),ns=tS.P.create(m.EY),nl=tS.P.create(t8),nu=tS.P.create(ne);(0,m.bz)("@sanity/ui/context/toast",null);(0,g.I4)(m.xA).withConfig({displayName:"StyledLayer",componentId:"sc-1tbwn58-0"})`box-sizing:border-box;position:fixed;right:0;bottom:0;list-style:none;pointer-events:none;max-width:420px;width:100%;`;function nc(e){if("treeitem"===e.getAttribute("role")&&e.focus(),"none"===e.getAttribute("role")){let t=e.firstChild;t&&t instanceof HTMLElement&&t.focus()}}let nd=(0,m.bz)("@sanity/ui/context/tree",null);(0,h.forwardRef)(function(e,t){let n,r,i,o,a,s,l,d,f,p,g,y,v,b,x,w,S,k,E,j,C,A,T=(0,
102c.c)(38);T[0]!==e?({children:n,gap:r,space:a,onFocus:i,...o}=e,T[0]=e,T[1]=n,T[2]=r,T[3]=i,T[4]=o,T[5]=a):(n=T[1],r=T[2],i=T[3],o=T[4],a=T[5]);let M=void 0===r?void 0===a?1:a:r,P=(0,h.useRef)(null),[_,I]=(0,h.useState)(null),R=(0,h.useRef)(_);T[6]===Symbol.for("react.memo_cache_sentinel")?(s=[],T[6]=s):s=T[6];let O=s;T[7]===Symbol.for("react.memo_cache_sentinel")?(l=[],T[7]=l):l=T[7];let[$,D]=(0,h.useState)(l);T[8]===Symbol.for("react.memo_cache_sentinel")?(d={},T[8]=d):d=T[8];let[L,V]=(0,h.useState)(d),z=(0,h.useRef)(L);T[9]===Symbol.for("react.memo_cache_sentinel")?(f=()=>P.current,T[9]=f):f=T[9],(0,h.useImperativeHandle)(t,f),T[10]!==_?(p=()=>{R.current=_},g=[_],T[10]=_,T[11]=p,T[12]=g):(p=T[11],g=T[12]),(0,h.useEffect)(p,g),T[13]!==L?(y=()=>{z.current=L},v=[L],T[13]=L,T[14]=y,T[15]=v):(y=T[14],v=T[15]),(0,h.useEffect)(y,v),T[16]===Symbol.for("react.memo_cache_sentinel")?(b=(e,t,n,r)=>(V(r=>({...r,[t]:{element:e,expanded:n}})),r&&I(e),()=>{V(e=>{let n={...e};return delete n[t],n})}),T[16]=b):b=T[16];let N=b;T[17]===Symbol.for("react.memo_cache_sentinel")?(x=(e,t)=>{V(n=>{let r=n[e];return r?{...n,[e]:{...r,expanded:t}}:n})},T[17]=x):x=T[17];let F=x,B=_||$[0]||null;T[18]!==M||T[19]!==L||T[20]!==B?(w={version:0,focusedElement:B,level:0,path:O,registerItem:N,setExpanded:F,setFocusedElement:I,gap:M,space:M,state:L},T[18]=M,T[19]=L,T[20]=B,T[21]=w):w=T[21];let U=w;T[22]!==$?(S=e=>{if(R.current){if("ArrowDown"===e.key){e.preventDefault();let t=function(e,t,n){let r=t.indexOf(n),i=t.slice(r),o=t.length;for(let t=1;t<o;t+=1){if(!i[t])continue;let n=i[t].getAttribute("data-tree-key");if(!n)continue;let r=n.split("/");r.pop();let o=[],a=!0;for(let t=0;t<r.length;t+=1){o.push(r[t]);let n=o.join("/");if(!e[n]?.expanded){a=!1;break}}if(a)return i[t]}return null}(z.current,$,R.current);t&&(nc(t),I(t));return}if("ArrowUp"===e.key){e.preventDefault();let t=function(e,t,n){let r=t.indexOf(n),i=t.slice(0,r),o=i.length;for(let t=o-1;t>=0;t-=1){let n=i[t].getAttribute("data-tree-key");if(!n)continue;let r=n.split("/");r.pop();let o=[],a=!0;for(let t=0;t<r.length;t+=1){o.push(r[t]);let n=o.join("/");if(!e[n]?.expanded){a=!1;break}}if(a)return i[t]}return null}(z.current,$,R.current);t&&(nc(t),I(t));return}if("ArrowLeft"===e.key){e.preventDefault();let t=R.current.getAttribute("data-tree-key");if(!t)return;let n=z.current[t];if(!n)return;if(n.expanded)V(e=>{let n=e[t];return n?{...e,[t]:{...n,expanded:!1}}:e});else{let e=t.split("/");e.pop();let n=e.join("/"),r=n&&z.current[n];r&&(r.element.focus(),I(r.element))}return}if("ArrowRight"===e.key){e.preventDefault();let t=R.current.getAttribute("data-tree-key");if(!t)return;z.current[t]?.expanded||V(e=>{let n=e[t];return n?{...e,[t]:{...n,expanded:!0}}:e});return}}},T[22]=$,T[23]=S):S=T[23];let H=S;T[24]!==i?(k=e=>{I(e.target),i?.(e)},T[24]=i,T[25]=k):k=T[25];let W=k;return T[26]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{P.current&&D(Array.from(P.current.querySelectorAll('[data-ui="TreeItem"]')))},T[26]=E):E=T[26],T[27]!==n?(j=[n],T[27]=n,T[28]=j):j=T[28],(0,h.useEffect)(E,j),T[29]!==n||T[30]!==W||T[31]!==H||T[32]!==o||T[33]!==M?(C=(0,u.jsx)(m.BJ,{as:"ul","data-ui":"Tree",...o,onFocus:W,onKeyDown:H,ref:P,role:"tree",gap:M,children:n}),T[29]=n,T[30]=W,T[31]=H,T[32]=o,T[33]=M,T[34]=C):C=T[34],T[35]!==U||T[36]!==C?(A=(0,u.jsx)(nd.Provider,{value:U,children:C}),T[35]=U,T[36]=C,T[37]=A):A=T[37],A}).displayName="ForwardRef(Tree)";(0,g.I4)(m.az).attrs({forwardedAs:"a"}).withConfig({displayName:"TreeItemBox",componentId:"sc-iiskig-1"})(function(e){let{$level:t}=e,{space:n}=(0,tw.JW)(e.theme);return(0,g.AH)`
103    padding-left: ${(0,m.D0)(n[2]*t)};
104
105    &[data-as='a'] {
106      text-decoration: none;
107    }
108  `}),(0,g.I4)(m.EY).withConfig({displayName:"ToggleArrowText",componentId:"sc-iiskig-2"})`& > svg{transition:transform 100ms;}`;let nh=e=>"object"==typeof e&&null!=e&&1===e.nodeType,nf=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,np=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return nf(n.overflowY,t)||nf(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},nm=(e,t,n,r,i,o,a,s)=>o<e&&a>t||o>e&&a<t?0:o<=e&&s<=n||a>=t&&s>=n?o-e-r:a>t&&s<n||o<e&&s>n?a-t+i:0,ng=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},ny=(e,t)=>{var n,r,i,o;if("undefined"==typeof document)return[];
108let{scrollMode:a,block:s,inline:l,boundary:u,skipOverflowHiddenElements:c}=t,d="function"==typeof u?u:e=>e!==u;if(!nh(e))throw TypeError("Invalid target");let h=document.scrollingElement||document.documentElement,f=[],p=e;for(;nh(p)&&d(p);){if((p=ng(p))===h){f.push(p);break}null!=p&&p===document.body&&np(p)&&!np(document.documentElement)||null!=p&&np(p,c)&&f.push(p)}let m=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,g=null!=(o=null==(i=window.visualViewport)?void 0:i.height)?o:innerHeight,{scrollX:y,scrollY:v}=window,{height:b,width:x,top:w,right:S,bottom:k,left:E}=e.getBoundingClientRect(),{top:j,right:C,bottom:A,left:T}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),M="start"===s||"nearest"===s?w-j:"end"===s?k+A:w+b/2-j+A,P="center"===l?E+x/2-T+C:"end"===l?S+C:E-T,_=[];for(let e=0;e<f.length;e++){let t=f[e],{height:n,width:r,top:i,right:o,bottom:u,left:c}=t.getBoundingClientRect();if("if-needed"===a&&w>=0&&E>=0&&k<=g&&S<=m&&(t===h&&!np(t)||w>=i&&k<=u&&E>=c&&S<=o))break;let d=getComputedStyle(t),p=parseInt(d.borderLeftWidth,10),j=parseInt(d.borderTopWidth,10),C=parseInt(d.borderRightWidth,10),A=parseInt(d.borderBottomWidth,10),T=0,I=0,R="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-C:0,O="offsetHeight"in t?t.offsetHeight-t.clientHeight-j-A:0,$="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,D="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(h===t)T="start"===s?M:"end"===s?M-g:"nearest"===s?nm(v,v+g,g,j,A,v+M,v+M+b,b):M-g/2,I="start"===l?P:"center"===l?P-m/2:"end"===l?P-m:nm(y,y+m,m,p,C,y+P,y+P+x,x),T=Math.max(0,T+v),I=Math.max(0,I+y);else{T="start"===s?M-i-j:"end"===s?M-u+A+O:"nearest"===s?nm(i,u,n,j,A+O,M,M+b,b):M-(i+n/2)+O/2,I="start"===l?P-c-p:"center"===l?P-(c+r/2)+R/2:"end"===l?P-o+C+R:nm(c,o,r,p,C+R,P,P+x,x);let{scrollLeft:e,scrollTop:a}=t;T=0===D?0:Math.max(0,Math.min(a+T/D,t.scrollHeight-n/D+O)),I=0===$?0:Math.max(0,Math.min(e+I/$,t.scrollWidth-r/$+R)),M+=a-T,P+=e-I}_.push({el:t,top:T,left:I})}return _};var nv=n(51623),nb=n(67379),nx=n(8394),nw=n(88813),nS=n(74435);function nk(e){let[t,n]=e;return[t,n]}function nE(e,t){let n=e,r=t,i=n.length,o=r.length;if(0===i||0===o)return 0;i>o?n=n.substring(i-o):i<o&&(r=r.substring(0,i));let a=Math.min(i,o);if(n===r)return a;let s=0,l=1;for(let e=0;-1!==e;){let t=n.substring(a-l);if(-1===(e=r.indexOf(t)))break;l+=e,(0===e||n.substring(a-l)===r.substring(0,l))&&(s=l,l++)}return s}function nj(e,t){if(!e||!t||e[0]!==t[0])return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(o,i)===t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function nC(e,t){if(!e||!t||e[e.length-1]!==t[t.length-1])return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(e.length-i,e.length-o)===t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function nA(e){let t=e.charCodeAt(0);return t>=56320&&t<=57343}function nT(e,t,n,r,i){let o=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),l=t.substring(r),u=nD(o,a,{checkLines:!1,deadline:i}),c=nD(s,l,{checkLines:!1,deadline:i});return u.concat(c)}function nM(e,t,n){let r=e.slice(n,n+Math.floor(e.length/4)),i=-1,o="",a,s,l,u;for(;-1!==(i=t.indexOf(r,i+1));){let r=nj(e.slice(n),t.slice(i)),c=nC(e.slice(0,n),t.slice(0,i));o.length<c+r&&(o=t.slice(i-c,i)+t.slice(i,i+r),a=e.slice(0,n-c),s=e.slice(n+r),l=t.slice(0,i-c),u=t.slice(i+r))}return 2*o.length>=e.length?[a||"",s||"",l||"",u||"",o||""]:null}var nP=Object.defineProperty,n_=Object.getOwnPropertySymbols,nI=Object.prototype.hasOwnProperty,nR=Object.prototype.propertyIsEnumerable,nO=(e,t,n)=>t in e?nP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function n$(e,t,n){if(null===e||null===t)throw Error("Null input. (diff)");let r=nD(e,t,function(e){let t;var n,r={checkLines:!0,deadline:(n=e.timeout||1,t=1,"u">typeof n&&(t=n<=0?Number.MAX_VALUE:n),Date.now()+1e3*t)},i=e;for(var o in i||(i={}))nI.call(i,o)&&nO(r,o,i[o]);if(n_)for(var o of n_(i))nR.call(i,o)&&nO(r,o,i[o]);return r}(n||{}));return function(e){for(let t=0;t<e.length;t++){let[n,r]=e[t];if(0===r.length)continue;let i=r[0];(function(e){let t=e.charCodeAt(0);return t>=55296&&t<=56319})(r[r.length-1])&&0===n&&nz(e,t,1),nA(i)&&0===n&&nz(e,t,-1)}for(let t=0;t<e.length;t++)0===e[t][1].length&&e.splice(t,1)}(r),r}function nD(e,t,n){let r=e,i=t;if(r===i)return r?[[0,r]]:[];let o=nj(r,i),a=r.substring(0,o);o=nC(r=r.substring(o),i=i.substring(o));let s=r.substring(r.length-o),l=function(e,t,n){let r;if(!e)return[[1,t]];if(!t)return[[-1,e]];let i=e.length>t.length?e:t,o=e.length>t.length?t:e,a=i.indexOf(o);if(-1!==a)return r=[[1,i.substring(0,a)],[0,o],[1,i.substring(a+o.length)]],e.length>t.length&&(r[0][0]=-1,r[2][0]=-1),r;if(1===o.length)return[[-1,e],[1,t]];let s=function(e,t,n=1){let r,i,o,a,s;if(n<=0)return null;let l=e.length>t.length?e:t,u=e.length>t.length?t:e;if(l.length<4||2*u.length<l.length)return null;
108let c=nM(l,u,Math.ceil(l.length/4)),d=nM(l,u,Math.ceil(l.length/2));if(c&&d)r=c[4].length>d[4].length?c:d;else{if(!c&&!d)return null;d?c||(r=d):r=c}if(!r)throw Error("Unable to find a half match.");return e.length>t.length?(i=r[0],o=r[1],a=r[2],s=r[3]):(a=r[0],s=r[1],i=r[2],o=r[3]),[i,o,a,s,r[4]]}(e,t);if(s){let e=s[0],t=s[1],r=s[2],i=s[3],o=s[4],a=nD(e,r,n),l=nD(t,i,n);return a.concat([[0,o]],l)}return n.checkLines&&e.length>100&&t.length>100?function(e,t,n){let r=e,i=t,o=function(e,t){let n=[],r={};function i(e){let t="",i=0,a=-1,s=n.length;for(;a<e.length-1;){-1===(a=e.indexOf(`
109`,i))&&(a=e.length-1);let l=e.slice(i,a+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(s===o&&(l=e.slice(i),a=e.length),t+=String.fromCharCode(s),r[l]=s,n[s++]=l),i=a+1}return t}n[0]="";let o=4e4,a=i(e);return o=65535,{chars1:a,chars2:i(t),lineArray:n}}(r,i);r=o.chars1,i=o.chars2;let a=o.lineArray,s=nD(r,i,{checkLines:!1,deadline:n.deadline});(function(e,t){for(let n=0;n<e.length;n++){let r=e[n][1],i=[];for(let e=0;e<r.length;e++)i[e]=t[r.charCodeAt(e)];e[n][1]=i.join("")}})(s,a),(s=nN(s)).push([0,""]);let l=0,u=0,c=0,d="",h="";for(;l<s.length;){switch(s[l][0]){case 1:c++,h+=s[l][1];break;case -1:u++,d+=s[l][1];break;case 0:if(u>=1&&c>=1){s.splice(l-u-c,u+c),l=l-u-c;let e=nD(d,h,{checkLines:!1,deadline:n.deadline});for(let t=e.length-1;t>=0;t--)s.splice(l,0,e[t]);l+=e.length}c=0,u=0,d="",h="";break;default:throw Error("Unknown diff operation.")}l++}return s.pop(),s}(e,t,n):function(e,t,n){let r=e.length,i=t.length,o=Math.ceil((r+i)/2),a=2*o,s=Array(a),l=Array(a);for(let e=0;e<a;e++)s[e]=-1,l[e]=-1;s[o+1]=0,l[o+1]=0;let u=r-i,c=u%2!=0,d=0,h=0,f=0,p=0;for(let m=0;m<o&&!(Date.now()>n);m++){for(let f=-m+d;f<=m-h;f+=2){let p,g=o+f,y=(p=f===-m||f!==m&&s[g-1]<s[g+1]?s[g+1]:s[g-1]+1)-f;for(;p<r&&y<i&&e.charAt(p)===t.charAt(y);)p++,y++;if(s[g]=p,p>r)h+=2;else if(y>i)d+=2;else if(c){let i=o+u-f;if(i>=0&&i<a&&-1!==l[i]&&p>=r-l[i])return nT(e,t,p,y,n)}}for(let d=-m+f;d<=m-p;d+=2){let h,g=o+d,y=(h=d===-m||d!==m&&l[g-1]<l[g+1]?l[g+1]:l[g-1]+1)-d;for(;h<r&&y<i&&e.charAt(r-h-1)===t.charAt(i-y-1);)h++,y++;if(l[g]=h,h>r)p+=2;else if(y>i)f+=2;else if(!c){let i=o+u-d;if(i>=0&&i<a&&-1!==s[i]){let a=s[i],l=o+a-i;if(a>=(h=r-h))return nT(e,t,a,l,n)}}}}return[[-1,e],[1,t]]}(e,t,n.deadline)}(r=r.substring(0,r.length-o),i=i.substring(0,i.length-o),n);return a&&l.unshift([0,a]),s&&l.push([0,s]),l=nY(l)}function nL(e,t,n){return 1===n?e+t:t+e}function nV(e,t){return 1===t?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function nz(e,t,n){var r,i;let o=1===n?-1:1,a=null,s=null,l=t+n;for(;l>=0&&l<e.length&&(null===a||null===s);l+=n){let[r,i]=e[l];if(0!==i.length){if(1===r){null===a&&(a=l);continue}else if(-1===r){null===s&&(s=l);continue}else if(0===r){if(null===a&&null===s){let[r,i]=nV(e[t][1],n);e[t][1]=r,e[l][1]=nL(e[l][1],i,o);return}break}}}if(null!==a&&null!==s&&(r=a,i=s,1===n?e[r][1][e[r][1].length-1]===e[i][1][e[i][1].length-1]:e[r][1][0]===e[i][1][0])){let[r,i]=nV(e[a][1],o),[l]=nV(e[s][1],o);e[a][1]=r,e[s][1]=l,e[t][1]=nL(e[t][1],i,n);return}let[u,c]=nV(e[t][1],n);e[t][1]=u,null===a?(e.splice(l,0,[1,c]),null!==s&&s>=l&&s++):e[a][1]=nL(e[a][1],c,o),null===s?e.splice(l,0,[-1,c]):e[s][1]=nL(e[s][1],c,o)}function nN(e){let t=e.map(e=>nk(e)),n=!1,r=[],i=0,o=null,a=0,s=0,l=0,u=0,c=0;for(;a<t.length;)0===t[a][0]?(r[i++]=a,s=u,l=c,u=0,c=0,o=t[a][1]):(1===t[a][0]?u+=t[a][1].length:c+=t[a][1].length,o&&o.length<=Math.max(s,l)&&o.length<=Math.max(u,c)&&(t.splice(r[i-1],0,[-1,o]),t[r[i-1]+1][0]=1,i--,a=--i>0?r[i-1]:-1,s=0,l=0,u=0,c=0,o=null,n=!0)),a++;for(n&&(t=nY(t)),t=nG(t),a=1;a<t.length;){if(-1===t[a-1][0]&&1===t[a][0]){let e=t[a-1][1],n=t[a][1],r=nE(e,n),i=nE(n,e);r>=i?(r>=e.length/2||r>=n.length/2)&&(t.splice(a,0,[0,n.substring(0,r)]),t[a-1][1]=e.substring(0,e.length-r),t[a+1][1]=n.substring(r),a++):(i>=e.length/2||i>=n.length/2)&&(t.splice(a,0,[0,e.substring(0,i)]),t[a-1][0]=1,t[a-1][1]=n.substring(0,n.length-i),t[a+1][0]=-1,t[a+1][1]=e.substring(i),a++),a++}a++}return t}let nF=/[^a-zA-Z0-9]/,nB=/\s/,nU=/[\r\n]/,nH=/\n\r?\n$/,nW=/^\r?\n\r?\n/;function nG(e){let t=e.map(e=>nk(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(nF),o=r.match(nF),a=i&&n.match(nB),s=o&&r.match(nB),l=a&&n.match(nU),u=s&&r.match(nU),c=l&&e.match(nH),d=u&&t.match(nW);return c||d?5:l||u?4:i&&!a&&s?3:a||s?2:i||o?1:0}let r=1;for(;r<t.length-1;){if(0===t[r-1][0]&&0===t[r+1][0]){let e=t[r-1][1],i=t[r][1],o=t[r+1][1],a=nC(e,i);if(a){let t=i.substring(i.length-a);e=e.substring(0,e.length-a),i=t+i.substring(0,i.length-a),o=t+o}let s=e,l=i,u=o,c=n(e,i)+n(i,o);for(;i.charAt(0)===o.charAt(0);){e+=i.charAt(0),i=i.substring(1)+o.charAt(0),o=o.substring(1);let t=n(e,i)+n(i,o);t>
109=c&&(c=t,s=e,l=i,u=o)}t[r-1][1]!==s&&(s?t[r-1][1]=s:(t.splice(r-1,1),r--),t[r][1]=l,u?t[r+1][1]=u:(t.splice(r+1,1),r--))}r++}return t}function nY(e){let t=e.map(e=>nk(e));t.push([0,""]);let n=0,r=0,i=0,o="",a="",s;for(;n<t.length;)switch(t[n][0]){case 1:i++,a+=t[n][1],n++;break;case -1:r++,o+=t[n][1],n++;break;case 0:r+i>1?(0!==r&&0!==i&&(0!==(s=nj(a,o))&&(n-r-i>0&&0===t[n-r-i-1][0]?t[n-r-i-1][1]+=a.substring(0,s):(t.splice(0,0,[0,a.substring(0,s)]),n++),a=a.substring(s),o=o.substring(s)),0!==(s=nC(a,o))&&(t[n][1]=a.substring(a.length-s)+t[n][1],a=a.substring(0,a.length-s),o=o.substring(0,o.length-s))),n-=r+i,t.splice(n,r+i),o.length&&(t.splice(n,0,[-1,o]),n++),a.length&&(t.splice(n,0,[1,a]),n++),n++):0!==n&&0===t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,o="",a="";break;default:throw Error("Unknown diff operation")}""===t[t.length-1][1]&&t.pop();let l=!1;for(n=1;n<t.length-1;)0===t[n-1][0]&&0===t[n+1][0]&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),l=!0):t[n][1].substring(0,t[n+1][1].length)===t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),l=!0)),n++;return l&&(t=nY(t)),t}var nq=Object.defineProperty,nX=Object.getOwnPropertySymbols,nK=Object.prototype.hasOwnProperty,nZ=Object.prototype.propertyIsEnumerable,nJ=(e,t,n)=>t in e?nq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nQ=(e,t)=>{for(var n in t||(t={}))nK.call(t,n)&&nJ(e,n,t[n]);if(nX)for(var n of nX(t))nZ.call(t,n)&&nJ(e,n,t[n]);return e};let n0={threshold:.5,distance:1e3};function n1(e,t,n,r={}){if(null===e||null===t||null===n)throw Error("Null input. (match())");let i=Math.max(0,Math.min(n,e.length));return e===t?0:e.length?e.substring(i,i+t.length)===t?i:function(e,t,n,r={}){if(t.length>32)throw Error("Pattern too long for this browser.");let i=nQ(nQ({},n0),r),o=function(e){let t={};for(let n=0;n<e.length;n++)t[e.charAt(n)]=0;for(let n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t}(t);function a(e,r){let o=e/t.length,a=Math.abs(n-r);return i.distance?o+a/i.distance:a?1:o}let s=i.threshold,l=e.indexOf(t,n);-1!==l&&(s=Math.min(a(0,l),s),-1!==(l=e.lastIndexOf(t,n+t.length))&&(s=Math.min(a(0,l),s)));let u=1<<t.length-1;l=-1;let c,d,h=t.length+e.length,f=[];for(let r=0;r<t.length;r++){for(c=0,d=h;c<d;)a(r,n+d)<=s?c=d:h=d,d=Math.floor((h-c)/2+c);h=d;let i=Math.max(1,n-d+1),p=Math.min(n+d,e.length)+t.length,m=Array(p+2);m[p+1]=(1<<r)-1;for(let t=p;t>=i;t--){let c=o[e.charAt(t-1)];if(0===r?m[t]=(m[t+1]<<1|1)&c:m[t]=(m[t+1]<<1|1)&c|((f[t+1]|f[t])<<1|1)|f[t+1],m[t]&u){let e=a(r,t-1);if(e<=s)if(s=e,(l=t-1)>n)i=Math.max(1,2*n-l);else break}}if(a(r+1,n)>s)break;f=m}return l}(e,t,i,r):-1}function n2(e){let t=[];for(let n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function n5(e){let t=[];for(let n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")}function n3(e,t){let n=0,r=0,i=0,o=0,a;for(a=0;a<e.length&&(1!==e[a][0]&&(n+=e[a][1].length),-1!==e[a][0]&&(r+=e[a][1].length),!(n>t));a++)i=n,o=r;return e.length!==a&&-1===e[a][0]?o:o+(t-i)}function n4(e){let t=0;for(let n=0;n<e.length;n++){let r=e.codePointAt(n);if(typeof r>"u")throw Error("Failed to get codepoint");t+=n6(r)}return t}function n6(e){return e<=127?1:e<=2047?2:e<=65535?3:4}function n9(e,t){return{diffs:[],start1:e,start2:t,utf8Start1:e,utf8Start2:t,length1:0,length2:0,utf8Length1:0,utf8Length2:0}}var n8=Object.defineProperty,n7=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,rn=(e,t,n)=>t in e?n8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rr=(e,t)=>{for(var n in t||(t={}))re.call(t,n)&&rn(e,n,t[n]);if(n7)for(var n of n7(t))rt.call(t,n)&&rn(e,n,t[n]);return e};let ri={margin:4};function ro(e={}){return rr(rr({},ri),e)}function ra(e,t,n){if(0===t.length)return[];let r=[],i=n9(0,0),o=0,a=0,s=0,l=0,u=0,c=e,d=e;for(let e=0;e<t.length;e++){let h=t[e],[f,p]=h,m=p.length,g=n4(p);switch(!o&&0!==f&&(i.start1=a,i.start2=s,i.utf8Start1=l,i.utf8Start2=u),f){case 1:i.diffs[o++]=h,i.length2+=m,i.utf8Length2+=g,d=d.substring(0,s)+p+d.substring(s);break;case -1:i.length1+=m,i.utf8Length1+=g,i.diffs[o++]=h,d=d.substring(0,s)+d.substring(s+m);break;case 0:m<=2*n.margin&&o&&t.length!==e+1?(i.diffs[o++]=h,i.length1+=m,i.length2+=m,i.utf8Length1+=g,i.utf8Length2+=g):m>=2*n.margin&&o&&(rs(i,c,n),r.push(i),i=n9(-1,-1),o=0,c=d,a=s,l=u);break;default:throw Error("Unknown diff type")}1!==f&&(a+=m,l+=g),-1!==f&&(s+=m,u+=g)}return o&&(rs(i,c,n),r.push(i)),r}function rs(e,t,n){if(0===t.length)return;let r=t.substring(e.start2,e.start2+e.length1),i=0;for(;t.indexOf(r)!==t.lastIndexOf(r)&&r.length<32-n.margin-n.margin;)i+=n.margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=n.margin;let o=e.start2-i;o>=1&&nA(t[o])&&o--;let a=t.substring(o,e.start2);a&&e.diffs.unshift([0,a]);let s=a.length,l=n4(a),u=e.start2+e.length1+i;u<t.length&&nA(t[u])&&u++;let c=t.substring(e.start2+e.length1,u);c&&e.diffs.push([0,c]);let d=c.length,h=n4(c);e.start1-=s,e.start2-=s,e.utf8Start1-=l,e.utf8Start2-=l,e.length1+=s+d,e.length2+=s+d,e.utf8Length1+=l+h,e.utf8Length2+=l+h}let rl=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;function ru(e){return parseInt(e,10)}function rc(e){let t,n,r,{utf8Length1:i,utf8Length2:o,utf8Start1:a,utf8Start2:s,diffs:l}=e;t=0===i?`${a},0`:1===i?`${a+1}`:`${a+1},${i}`,n=0===o?`${s},0`:1===o?`${s+1}`:`${s+1},${o}`;let u=[`@@ -${t} +${n} @@
110`];for(let e=0;e<l.length;e++){switch(l[e][0]){case 1:r="+";break;case -1:r="-";break;case 0:r=" ";break;default:throw Error("Unknown patch operation.")}u[e+1]=`${r+encodeURI(l[e][1])}
111`}return u.join("").replace(/%20/g," ")}var rd="object"==typeof global&&global&&global.Object===Object&&global,rh="object"==typeof self&&self&&self.Object===Object&&self,rf=rd||rh||Function("return this")(),rp=rf.Symbol,rm=Object.prototype,rg=rm.hasOwnProperty,ry=rm.toString,rv=rp?rp.toStringTag:void 0;let rb=function(e){var t=rg.call(e,rv),n=e[rv];try{e[rv]=void 0;var r=!0}catch(e){}var i=ry.call(e);return r&&(t?e[rv]=n:delete e[rv]),i};var rx=Object.prototype.toString,rw=rp?rp.toStringTag:void 0;
111let rS=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":rw&&rw in Object(e)?rb(e):rx.call(e)},rk=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},rE=function(e){if(!rk(e))return!1;var t=rS(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var rj=rf["__core-js_shared__"],rC=function(){var e=/[^.]+$/.exec(rj&&rj.keys&&rj.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),rA=Function.prototype.toString;let rT=function(e){if(null!=e){try{return rA.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var rM=/^\[object .+?Constructor\]$/,rP=Object.prototype,r_=Function.prototype.toString,rI=rP.hasOwnProperty,rR=RegExp("^"+r_.call(rI).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let rO=function(e){return!!rk(e)&&(!rC||!(rC in e))&&(rE(e)?rR:rM).test(rT(e))},r$=function(e,t){var n=null==e?void 0:e[t];return rO(n)?n:void 0};var rD=function(){try{var e=r$(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();let rL=function(e,t,n){"__proto__"==t&&rD?rD(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},rV=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r},rz=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e},rN=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},rF=function(e){return null!=e&&"object"==typeof e},rB=function(e){return rF(e)&&"[object Arguments]"==rS(e)};var rU=Object.prototype,rH=rU.hasOwnProperty,rW=rU.propertyIsEnumerable,rG=rB(function(){return arguments}())?rB:function(e){return rF(e)&&rH.call(e,"callee")&&!rW.call(e,"callee")},rY=Array.isArray,rq="object"==typeof exports&&exports&&!exports.nodeType&&exports,rX=rq&&"object"==typeof module&&module&&!module.nodeType&&module,rK=rX&&rX.exports===rq?rf.Buffer:void 0;let rZ=(rK?rK.isBuffer:void 0)||function(){return!1};var rJ=/^(?:0|[1-9]\d*)$/;let rQ=function(e,t){var n=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&rJ.test(e))&&e>-1&&e%1==0&&e<t},r0=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff};var r1={};r1["[object Float32Array]"]=r1["[object Float64Array]"]=r1["[object Int8Array]"]=r1["[object Int16Array]"]=r1["[object Int32Array]"]=r1["[object Uint8Array]"]=r1["[object Uint8ClampedArray]"]=r1["[object Uint16Array]"]=r1["[object Uint32Array]"]=!0,r1["[object Arguments]"]=r1["[object Array]"]=r1["[object ArrayBuffer]"]=r1["[object Boolean]"]=r1["[object DataView]"]=r1["[object Date]"]=r1["[object Error]"]=r1["[object Function]"]=r1["[object Map]"]=r1["[object Number]"]=r1["[object Object]"]=r1["[object RegExp]"]=r1["[object Set]"]=r1["[object String]"]=r1["[object WeakMap]"]=!1;var r2="object"==typeof exports&&exports&&!exports.nodeType&&exports,r5=r2&&"object"==typeof module&&module&&!module.nodeType&&module,r3=r5&&r5.exports===r2&&rd.process,r4=function(){try{var e=r5&&r5.require&&r5.require("util").types;if(e)return e;return r3&&r3.binding&&r3.binding("util")}catch(e){}}(),r6=r4&&r4.isTypedArray,r9=r6?function(e){return r6(e)}:function(e){return rF(e)&&r0(e.length)&&!!r1[rS(e)]},r8=Object.prototype.hasOwnProperty;let r7=function(e,t){var n=rY(e),r=!n&&rG(e),i=!n&&!r&&rZ(e),o=!n&&!r&&!i&&r9(e),a=n||r||i||o,s=a?rN(e.length,String):[],l=s.length;for(var u in e)(t||r8.call(e,u))&&!(a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||rQ(u,l)))&&s.push(u);return s};var ie=Object.prototype;let it=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ie)};var ir=(a=Object.keys,s=Object,function(e){return a(s(e))}),ii=Object.prototype.hasOwnProperty;let io=function(e){if(!it(e))return ir(e);var t=[];for(var n in Object(e))ii.call(e,n)&&"constructor"!=n&&t.push(n);return t},ia=function(e){return null!=e&&r0(e.length)&&!rE(e)},is=function(e){return ia(e)?r7(e):io(e)};var il=(i=function(e,t){return e&&rz(e,t,is)},function(e,t){if(null==e)return e;if(!ia(e))return i(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e});let iu=function(e,t,n,r){return il(e,function(e,i,o){t(r,e,n(e),o)}),r},ic=function(e,t){return e===t||e!=e&&t!=t},id=function(e,t){for(var n=e.length;n--;)if(ic(e[n][0],t))return n;return -1};var ih=Array.prototype.splice;function ip(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ip.prototype.clear=function(){this.__data__=[],this.size=0},ip.prototype.delete=function(e){var t=this.__data__,n=id(t,e);return!(n<0)&&(n==t.length-1?t.pop():ih.call(t,n,1),--this.size,!0)},ip.prototype.get=function(e){var t=this.__data__,n=id(t,e);return n<0?void 0:t[n][1]},ip.prototype.has=function(e){return id(this.__data__,e)>-1},ip.prototype.set=function(e,t){var n=this.__data__,r=id(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var im=r$(rf,"Map"),ig=r$(Object,"create"),iy=Object.prototype.hasOwnProperty,iv=Object.prototype.hasOwnProperty;function ib(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ib.prototype.clear=function(){this.__data__=ig?ig(null):{},this.size=0},ib.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},ib.prototype.get=function(e){var t=this.__data__;if(ig){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return iy.call(t,e)?t[e]:void 0},ib.prototype.has=function(e){var t=this.__data__;return ig?void 0!==t[e]:iv.call(t,e)},ib.prototype.set=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=ig&&void 0===t?"__lodash_hash_undefined__":t,this};let ix=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},iw=function(e,t){var n=e.__data__;return ix(t)?n["string"==typeof t?"string":"hash"]:n.map};function iS(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ik(e){var t=this.__data__=new ip(e);this.size=t.size}function iE(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new iS;++t<n;)this.add(e[t])}iS.prototype.clear=function(){this.size=0,this.__data__={hash:new ib,map:new(im||ip),string:new ib}},iS.prototype.delete=function(e){var t=iw(this,e).delete(e);return this.size-=!!t,t},iS.prototype.get=function(e){return iw(this,e).get(e)},iS.prototype.has=function(e){return iw(this,e).has(e)},iS.prototype.set=function(e,t){var n=iw(this,e),r=n.size;return n.set(e,t),this.size+=+(n.size!=r),this},ik.prototype.clear=function(){this.__data__=new ip,this.size=0},ik.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ik.prototype.get=function(e){return this.__data__.get(e)},ik.prototype.has=function(e){return this.__data__.has(e)},ik.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ip){var r=n.__data__;if(!im||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new iS(r)}return n.set(e,t),this.size=n.size,this},iE.prototype.add=iE.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},iE.prototype.has=function(e){return this.__data__.has(e)};let ij=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}
111,iC=function(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,h=!0,f=2&n?new iE:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=a?r(m,p,d,t,e,o):r(p,m,d,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!ij(t,function(e,t){if(!f.has(t)&&(p===e||i(p,e,n,r,o)))return f.push(t)})){h=!1;break}}else if(!(p===m||i(p,m,n,r,o))){h=!1;break}}return o.delete(e),o.delete(t),h};var iA=rf.Uint8Array;let iT=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},iM=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n};var iP=rp?rp.prototype:void 0,i_=iP?iP.valueOf:void 0;let iI=function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new iA(e),new iA(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return ic(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=iT;case"[object Set]":var l=1&r;if(s||(s=iM),e.size!=t.size&&!l)break;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=iC(s(e),s(t),r,i,o,a);return a.delete(e),c;case"[object Symbol]":if(i_)return i_.call(e)==i_.call(t)}return!1},iR=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},iO=function(e,t,n){var r=t(e);return rY(e)?r:iR(r,n(e))},i$=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o};var iD=Object.prototype.propertyIsEnumerable,iL=Object.getOwnPropertySymbols,iV=iL?function(e){return null==e?[]:i$(iL(e=Object(e)),function(t){return iD.call(e,t)})}:function(){return[]};let iz=function(e){return iO(e,is,iV)};var iN=Object.prototype.hasOwnProperty;let iF=function(e,t,n,r,i,o){var a=1&n,s=iz(e),l=s.length;if(l!=iz(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:iN.call(t,c)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<l;){var m=e[c=s[u]],g=t[c];if(r)var y=a?r(g,m,c,t,e,o):r(m,g,c,e,t,o);if(!(void 0===y?m===g||i(m,g,n,r,o):y)){f=!1;break}p||(p="constructor"==c)}if(f&&!p){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(f=!1)}return o.delete(e),o.delete(t),f};var iB=r$(rf,"DataView"),iU=r$(rf,"Promise"),iH=r$(rf,"Set"),iW=r$(rf,"WeakMap"),iG="[object Map]",iY="[object Promise]",iq="[object Set]",iX="[object WeakMap]",iK="[object DataView]",iZ=rT(iB),iJ=rT(im),iQ=rT(iU),i0=rT(iH),i1=rT(iW),i2=rS;(iB&&i2(new iB(new ArrayBuffer(1)))!=iK||im&&i2(new im)!=iG||iU&&i2(iU.resolve())!=iY||iH&&i2(new iH)!=iq||iW&&i2(new iW)!=iX)&&(i2=function(e){var t=rS(e),n="[object Object]"==t?e.constructor:void 0,r=n?rT(n):"";if(r)switch(r){case iZ:return iK;case iJ:return iG;case iQ:return iY;case i0:return iq;case i1:return iX}return t});let i5=i2;var i3="[object Arguments]",i4="[object Array]",i6="[object Object]",i9=Object.prototype.hasOwnProperty;let i8=function(e,t,n,r,i,o){var a=rY(e),s=rY(t),l=a?i4:i5(e),u=s?i4:i5(t);l=l==i3?i6:l,u=u==i3?i6:u;var c=l==i6,d=u==i6,h=l==u;if(h&&rZ(e)){if(!rZ(t))return!1;a=!0,c=!1}if(h&&!c)return o||(o=new ik),a||r9(e)?iC(e,t,n,r,i,o):iI(e,t,l,n,r,i,o);if(!(1&n)){var f=c&&i9.call(e,"__wrapped__"),p=d&&i9.call(t,"__wrapped__");
111if(f||p){var m=f?e.value():e,g=p?t.value():t;return o||(o=new ik),i(m,g,n,r,o)}}return!!h&&(o||(o=new ik),iF(e,t,n,r,i,o))},i7=function e(t,n,r,i,o){return t===n||(null!=t&&null!=n&&(rF(t)||rF(n))?i8(t,n,r,i,e,o):t!=t&&n!=n)},oe=function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=n[i])[0],u=e[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in e))return!1}else{var d=new ik;if(r)var h=r(u,c,l,e,t,d);if(!(void 0===h?i7(c,u,3,r,d):h))return!1}}return!0},ot=function(e){return e==e&&!rk(e)},on=function(e){for(var t=is(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ot(i)]}return t},or=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},oi=function(e){var t=on(e);return 1==t.length&&t[0][2]?or(t[0][0],t[0][1]):function(n){return n===e||oe(n,e,t)}},oo=function(e){return"symbol"==typeof e||rF(e)&&"[object Symbol]"==rS(e)};var oa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,os=/^\w*$/;let ol=function(e,t){if(rY(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||oo(e))||os.test(e)||!oa.test(e)||null!=t&&e in Object(t)};function ou(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ou.Cache||iS),n}ou.Cache=iS;var oc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,od=/\\(\\)?/g,oh=function(e){var t=ou(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(oc,function(e,n,r,i){t.push(r?i.replace(od,"$1"):n||e)}),t});let of=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var op=1/0,om=rp?rp.prototype:void 0,og=om?om.toString:void 0;let oy=function e(t){if("string"==typeof t)return t;if(rY(t))return of(t,e)+"";if(oo(t))return og?og.call(t):"";var n=t+"";return"0"==n&&1/t==-op?"-0":n},ov=function(e,t){return rY(e)?e:ol(e,t)?[e]:oh(null==e?"":oy(e))};var ob=1/0;let ox=function(e){if("string"==typeof e||oo(e))return e;var t=e+"";return"0"==t&&1/e==-ob?"-0":t},ow=function(e,t){t=ov(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[ox(t[n++])];return n&&n==r?e:void 0},oS=function(e,t,n){var r=null==e?void 0:ow(e,t);return void 0===r?n:r},ok=function(e,t){return null!=e&&t in Object(e)},oE=function(e,t,n){t=ov(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=ox(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&r0(i)&&rQ(a,i)&&(rY(e)||rG(e))},oj=function(e){return e},oC=function(e){var t;return ol(e)?(t=ox(e),function(e){return null==e?void 0:e[t]}):function(t){return ow(t,e)}},oA=function(e){if("function"==typeof e)return e;if(null==e)return oj;if("object"==typeof e){var t,n;return rY(e)?(t=e[0],n=e[1],ol(t)&&ot(n)?or(ox(t),n):function(e){var r=oS(e,t);return void 0===r&&r===n?null!=e&&oE(e,t,ok):i7(n,r,3)}):oi(e)}return oC(e)};var oT=Object.prototype.hasOwnProperty,oM=(o=function(e,t,n){oT.call(e,n)?e[n].push(t):rL(e,n,[t])},function(e,t){return(rY(e)?rV:iu)(e,o,oA(t,2),{})});let oP=["Value","Copy","Blank","ReturnIntoArray","ReturnIntoObject","ReturnIntoObjectSameKey","PushField","PushElement","PushParent","Pop","PushFieldCopy","PushFieldBlank","PushElementCopy","PushElementBlank","ReturnIntoObjectPop","ReturnIntoObjectSameKeyPop","ReturnIntoArrayPop","ObjectSetFieldValue","ObjectCopyField","ObjectDeleteField","ArrayAppendValue","ArrayAppendSlice","StringAppendString","StringAppendSlice"];class o_{model;root;patch;i;inputStack;outputStack;constructor(e,t,n){this.model=e,this.root=t,this.patch=n,this.i=0,this.inputStack=[],this.outputStack=[]}read(){return this.patch[this.i++]}process(){for(this.inputStack.push({value:this.root}),this.outputStack.push({value:this.root});this.i<this.patch.length;){let e=this.read(),t=oP[e];if(!t)throw Error(`Unknown opcode: ${e}`);this[`process${t}`].apply(this)}let e=this.outputStack.pop();return this.finalizeOutput(e)}inputEntry(){return this.inputStack[this.inputStack.length-1]}inputKey(e,t){return e.keys||(e.keys=this.model.objectGetKeys(e.value).sort()),e.keys[t]}outputEntry(){return this.outputStack[this.outputStack.length-1]}outputArray(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyArray(e.value)),e.writeValue}outputObject(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyObject(e.value)),e.writeValue}outputString(){let e=this.outputEntry();return e.writeValue||(e.writeValue=this.model.copyString(e.value)),e.writeValue}finalizeOutput(e){return e.writeValue?this.model.finalize(e.writeValue):e.value}processValue(){let e=this.model.wrap(this.read());this.outputStack.push({value:e})}processCopy(){let e=this.inputEntry();this.outputStack.push({value:e.value})}processBlank(){this.outputStack.push({value:null})}processReturnIntoArray(){let e=this.outputStack.pop(),t=this.finalizeOutput(e),n=this.outputArray();this.model.arrayAppendValue(n,t)}processReturnIntoObject(){let e=this.read(),t=this.outputStack.pop(),n=this.finalizeOutput(t);n=this.model.markChanged(n);let r=this.outputObject();this.model.objectSetField(r,e,n)}processReturnIntoObjectSameKey(){let e=this.inputEntry(),t=this.outputStack.pop(),n=this.finalizeOutput(t),r=this.outputObject();this.model.objectSetField(r,e.key,n)}processPushField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.model.objectGetField(t.value,n);this.inputStack.push({value:r,key:n})}processPushElement(){let e=this.read(),t=this.inputEntry(),n=this.model.arrayGetElement(t.value,e);this.inputStack.push({value:n})}processPop(){this.inputStack.pop()}processPushFieldCopy(){this.processPushField(),this.processCopy()}processPushFieldBlank(){this.processPushField(),this.processBlank()}processPushElementCopy(){this.processPushElement(),this.processCopy()}processPushElementBlank(){this.processPushElement(),this.processBlank()}processReturnIntoObjectPop(){this.processReturnIntoObject(),this.processPop()}processReturnIntoObjectSameKeyPop(){this.processReturnIntoObjectSameKey(),this.processPop()}processReturnIntoArrayPop(){this.processReturnIntoArray(),this.processPop()}processObjectSetFieldValue(){this.processValue(),this.processReturnIntoObject()}processObjectCopyField(){this.processPushField(),this.processCopy(),this.processReturnIntoObjectSameKey(),this.processPop()}processObjectDeleteField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.outputObject();this.model.objectDeleteField(r,n)}processArrayAppendValue(){let e=this.model.wrap(this.read()),t=this.outputArray();this.model.arrayAppendValue(t,e)}processArrayAppendSlice(){let e=this.read(),t=this.read(),n=this.outputArray(),r=this.inputEntry().value;this.model.arrayAppendSlice(n,r,e,t)}processStringAppendString(){let e=this.model.wrap(this.read()),t=this.outputString();this.model.stringAppendValue(t,e)}processStringAppendSlice(){let e=this.read(),t=this.read(),n=this.outputString(),r=this.inputEntry().value;this.model.stringAppendSlice(n,r,e,t)}}function oI(e){return e>>16?4:e>>11?3:e>>7?2:1}function oR(e,t,n=0){let r=n,i=0;for(i=n;r<t;
111i++){let t=oI(e.codePointAt(i));4===t&&i++,r+=t}return i}class oO{wrap(e){return e}finalize(e){return Array.isArray(e)?e:e.data}markChanged(e){return e}objectGetKeys(e){return Object.keys(e)}objectGetField(e,t){return e[t]}arrayGetElement(e,t){return e[t]}copyObject(e){let t={type:"object",data:{}};if(null!==e)for(let[n,r]of Object.entries(e))t.data[n]=r;return t}copyArray(e){return null===e?[]:e.slice()}copyString(e){return{type:"string",data:null===e?"":e}}objectSetField(e,t,n){e.data[t]=n}objectDeleteField(e,t){delete e.data[t]}arrayAppendValue(e,t){e.push(t)}arrayAppendSlice(e,t,n,r){e.push(...t.slice(n,r))}stringAppendSlice(e,t,n,r){let i=oR(t,n),o=oR(t,r,i);e.data+=t.slice(i,o)}stringAppendValue(e,t){e.data+=t}}var o$=n(58782),oD=n(41101),oL=n(72909),oV=n(51599),oz=n(4916),oN=n(17867),oF=n(64132),oB=1,oU={};function oH(e){return e in oU&&(delete oU[e],!0)}var oW={setImmediate:function(e){var t=oB++;return oU[t]=!0,l||(l=Promise.resolve()),l.then(function(){return oH(t)&&e()}),t},clearImmediate:function(e){oH(e)}},oG=oW.setImmediate,oY=oW.clearImmediate,oq={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=oq.delegate;return((null==n?void 0:n.setImmediate)||oG).apply(void 0,(0,oN.fX)([],(0,oN.zs)(e)))},clearImmediate:function(e){var t=oq.delegate;return((null==t?void 0:t.clearImmediate)||oY)(e)},delegate:void 0},oX=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return(0,oN.C6)(t,e),t.prototype.requestAsyncId=function(t,n,r){return(void 0===r&&(r=0),null!==r&&r>0)?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=oq.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i,o=t.actions;null!=n&&(null==(i=o[o.length-1])?void 0:i.id)!==n&&(oq.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(oF.R),oK=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,oN.C6)(t,e),t.prototype.flush=function(e){this._active=!0;var t,n=this._scheduled;this._scheduled=void 0;var r=this.actions;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while((e=r[0])&&e.id===n&&r.shift());if(this._active=!1,t){for(;(e=r[0])&&e.id===n&&r.shift();)e.unsubscribe();throw t}},t}(n(86722).q))(oX),oZ=n(13898),oJ=n(16850),oQ=n(20101);function o0(e){if("patch"===e.type)return e.id;if("create"===e.type)return e.document._id;if("delete"===e.type)return e.id;if("createIfNotExists"===e.type||"createOrReplace"===e.type)return e.document._id;throw Error("Invalid mutation type")}let o1=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function o2(e){return"string"==typeof e?._key}function o5(e){return"object"==typeof e&&"_key"in e&&"string"==typeof e._key}function o3(e){return"number"==typeof e||o5(e)}function o4(e,t){if(0===e.length)return t;let n=t;for(let t of e){if(o3(t)){if(!Array.isArray(n))return;if(o5(t)){n=n.find(e=>e._key===t._key);continue}n=n[t];continue}n=n[t]}return n}let o6=/^[a-z_$]+/;function o9(e){return e.map((e,t)=>{var n;return n=0===t,Array.isArray(e)?`[${e[0]}:${e[1]||""}]`:"number"==typeof e?`[${e}]`:o5(e)?`[_key==${JSON.stringify(e._key)}]`:"string"==typeof e&&o6.test(e)?n?e:`.${e}`:`['${e}']`}).join("")}function o8(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function o7(e,t){if("number"==typeof t){var n=e.length,r=t;if(0===n&&(-1===r||0===r))return 0;let i=r<0?n+r:r;return i>=n||i<0?null:i}if(o5(t)){let n=e.findIndex(e=>(null!==e&&"object"==typeof e&&"string"==typeof e._key&&e._key||null)===t._key);return -1===n?null:n}throw Error(`Expected path segment to be addressing a single array item either by numeric index or by '_key'. Instead saw ${JSON.stringify(t)}`)}function ae(e,t,n,r){let i=e.slice();return i.splice(t,n,...r||[]),i}function at(e,t){var n;if(!Array.isArray(t))throw TypeError('Cannot apply "insert()" on non-array value');let r=o7(t,e.referenceItem);if(null===r)throw Error(`Found no matching array element to insert ${e.position}`);return 0===t.length?e.items:ae(t,(n=e.position,"before"===n?r:r+1),0,e.
111items)}let an=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);var ar=Object.freeze({__proto__:null,assign:function(e,t){if(!o8(t))throw TypeError('Cannot apply "assign()" on non-object value');return!function(e){for(let t in e)if(an(e,t))return!1;return!0}(e.value)?{...t,...e.value}:t},dec:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "dec()" on non-numeric value');return t-e.amount},diffMatchPatch:function(e,t){if("string"!=typeof t)throw TypeError('Cannot apply "diffMatchPatch()" on non-string value');return function(e,t,n={}){if("string"==typeof e)throw Error("Patches must be an array - pass the patch to `parsePatch()` first");let r=t;if(0===e.length)return[r,[]];let i=function(e,t,n={}){let r=0,i=0;function o(e){for(;r<e;){let e=t.codePointAt(i);if(typeof e>"u")return i;r+=n6(e),e>65535?i+=2:i+=1}if(!n.allowExceedingIndices&&r!==e)throw Error("Failed to determine byte offset");return i}let a=[];for(let t of e)a.push({diffs:t.diffs.map(e=>nk(e)),start1:o(t.start1),start2:o(t.start2),utf8Start1:t.utf8Start1,utf8Start2:t.utf8Start2,length1:t.length1,length2:t.length2,utf8Length1:t.utf8Length1,utf8Length2:t.utf8Length2});return a}(e,r,{allowExceedingIndices:n.allowExceedingIndices}),o=n.margin||4,a=n.deleteThreshold||.4,s=function(e,t=4){let n="";for(let e=1;e<=t;e++)n+=String.fromCharCode(e);for(let n of e)n.start1+=t,n.start2+=t,n.utf8Start1+=t,n.utf8Start2+=t;let r=e[0],i=r.diffs;if(0===i.length||0!==i[0][0])i.unshift([0,n]),r.start1-=t,r.start2-=t,r.utf8Start1-=t,r.utf8Start2-=t,r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>i[0][1].length){let e=i[0][1].length,o=t-e;i[0][1]=n.substring(e)+i[0][1],r.start1-=o,r.start2-=o,r.utf8Start1-=o,r.utf8Start2-=o,r.length1+=o,r.length2+=o,r.utf8Length1+=o,r.utf8Length2+=o}if(0===(i=(r=e[e.length-1]).diffs).length||0!==i[i.length-1][0])i.push([0,n]),r.length1+=t,r.length2+=t,r.utf8Length1+=t,r.utf8Length2+=t;else if(t>i[i.length-1][1].length){let e=t-i[i.length-1][1].length;i[i.length-1][1]+=n.substring(0,e),r.length1+=e,r.length2+=e,r.utf8Length1+=e,r.utf8Length2+=e}return n}(i,o);r=s+r+s,function(e,t=4){for(let n=0;n<e.length;n++){if(e[n].length1<=32)continue;let r=e[n];e.splice(n--,1);let i=r.start1,o=r.start2,a="";for(;0!==r.diffs.length;){let s=n9(i-a.length,o-a.length),l=!0;if(""!==a){let e=n4(a);s.length1=a.length,s.utf8Length1=e,s.length2=a.length,s.utf8Length2=e,s.diffs.push([0,a])}for(;0!==r.diffs.length&&s.length1<32-t;){let e=r.diffs[0][0],n=r.diffs[0][1],a=n4(n);if(1===e){s.length2+=n.length,s.utf8Length2+=a,o+=n.length;let e=r.diffs.shift();e&&s.diffs.push(e),l=!1}else -1===e&&1===s.diffs.length&&0===s.diffs[0][0]&&n.length>64?(s.length1+=n.length,s.utf8Length1+=a,i+=n.length,l=!1,s.diffs.push([e,n]),r.diffs.shift()):(a=n4(n=n.substring(0,32-s.length1-t)),s.length1+=n.length,s.utf8Length1+=a,i+=n.length,0===e?(s.length2+=n.length,s.utf8Length2+=a,o+=n.length):l=!1,s.diffs.push([e,n]),n===r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(n.length))}a=(a=n5(s.diffs)).substring(a.length-t);let u=n2(r.diffs).substring(0,t),c=n4(u);""!==u&&(s.length1+=u.length,s.length2+=u.length,s.utf8Length1+=c,s.utf8Length2+=c,0!==s.diffs.length&&0===s.diffs[s.diffs.length-1][0]?s.diffs[s.diffs.length-1][1]+=u:s.diffs.push([0,u])),l||e.splice(++n,0,s)}}}(i,o);let l=0,u=[];for(let e=0;e<i.length;e++){let t=i[e].start2+l,n=n2(i[e].diffs),o,s=-1;if(n.length>32?-1!==(o=n1(r,n.substring(0,32),t))&&(-1===(s=n1(r,n.substring(n.length-32),t+n.length-32))||o>=s)&&(o=-1):o=n1(r,n,t),-1===o)u[e]=!1,l-=i[e].length2-i[e].length1;else{let c;if(u[e]=!0,l=o-t,c=-1===s?r.substring(o,o+n.length):r.substring(o,s+32),n===c)r=r.substring(0,o)+n5(i[e].diffs)+r.substring(o+n.length);else{let t=n$(n,c,{checkLines:!1});if(n.length>32&&function(e){let t=0,n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i][0],a=e[i][1];switch(o){case 1:n+=a.length;break;case -1:r+=a.length;break;case 0:t+=Math.max(n,r),n=0,r=0;break;default:throw Error("Unknown diff operation.")}}return t+Math.max(n,r)}(t)/n.length>a)u[e]=!1;else{t=nG(t);let n=0,a=0;for(let s=0;s<i[e].diffs.length;s++){let l=i[e].diffs[s];0!==l[0]&&(a=n3(t,n)),1===l[0]?r=r.substring(0,o+a)+l[1]+r.substring(o+a):-1===l[0]&&(r=r.substring(0,o+a)+r.substring(o+n3(t,n+l[1].length))),-1!==l[0]&&(n+=l[1].length)}}}}}return[r=r.substring(s.length,r.length-s.length),u]}(function(e){if(!e)return[];let t=[],n=e.split(`
112`),r=0;for(;r<n.length;){let e=n[r].match(rl);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let i=n9(ru(e[1]),ru(e[3]));for(t.push(i),""===e[2]?(i.start1--,i.utf8Start1--,i.length1=1,i.utf8Length1=1):"0"===e[2]?(i.length1=0,i.utf8Length1=0):(i.start1--,i.utf8Start1--,i.utf8Length1=ru(e[2]),i.length1=i.utf8Length1),""===e[4]?(i.start2--,i.utf8Start2--,i.length2=1,i.utf8Length2=1):"0"===e[4]?(i.length2=0,i.utf8Length2=0):(i.start2--,i.utf8Start2--,i.utf8Length2=ru(e[4]),i.length2=i.utf8Length2),r++;r<n.length;){let e,t=n[r],o=t.charAt(0);if("@"===o)break;if(""===o){r++;continue}try{e=decodeURI(t.slice(1))}catch(e){throw Error(`Illegal escape in parse: ${t}`)}let a=n4(e)-e.length;if("-"===o)i.diffs.push([-1,e]),i.length1-=a;else if("+"===o)i.diffs.push([1,e]),i.length2-=a;else if(" "===o)i.diffs.push([0,e]),i.length1-=a,i.length2-=a;else throw Error(`Invalid patch mode "${o}" in: ${e}`);r++}}return t}(e.value),t)[0]},inc:function(e,t){if("number"!=typeof t)throw TypeError('Cannot apply "inc()" on non-numeric value');return t+e.amount},insert:at,remove:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "remove()" on non-array value');let n=o7(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return ae(t,n,1,[])},replace:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "replace()" on non-array value');let n=o7(t,e.referenceItem);if(null===n)throw Error("Found no matching array element to replace");return ae(t,n,e.items.length,e.items)},set:function(e,t){return e.value},setIfMissing:function(e,t){return t??e.value},truncate:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "truncate()" on non-array value');return"number"==typeof e.endIndex?t.slice(0,e.startIndex).concat(t.slice(e.endIndex)):t.slice(0,e.startIndex)},unassign:function(e,t){if(!o8(t))throw TypeError('Cannot apply "unassign()" on non-object value');return 0===e.keys.length?t:function(e,t){let n={...e};for(let e of t)delete n[e];return n}(t,e.keys)},unset:function(e){},upsert:function(e,t){if(!Array.isArray(t))throw TypeError('Cannot apply "upsert()" on non-array value');
112if(0===e.items.length)return t;let n=[],r=[];if(e.items.forEach((e,i)=>{let o=t.findIndex(t=>t?._key===e._key);o>=0?n[o]=i:r.push(e)}),0===n.length&&0==r.length)return t;let i=[...t];for(let t of n)i[t]=e.items[n[t]];return at({type:"insert",items:r,referenceItem:e.referenceItem,position:e.position},i)}});function ai(e,t){return e.reduce((e,t)=>ao(t,e),t)}function ao(e,t){return function e(t,n,r){if(!(t.length>0)){if(!(n.type in ar))throw Error(`Invalid operation type: "${n.type}"`);return ar[n.type](n,r)}let[i,...o]=t;if(o3(i)&&Array.isArray(r)){var a=i,s=o,l=n,u=r;let t=o7(u,a);if(null===t||-1===t)return u;let c=u[t],d=e(s,l,c);return d===c?u:ae(u,t,1,[d])}if("string"==typeof i&&o8(r)){var c=i,d=o,h=n,f=r;let t=f[c];if(void 0===t&&d.length>0)return f;let a=e(d,h,t);return a===t?f:{...f,[c]:a}}throw Error(`Cannot apply operation of type "${n.type}" to path ${o9(t)} on ${typeof r} value`)}(e.path,e.op,t)}function aa(e){return"_id"in e}function as(e,t){return t.reduce((e,t)=>{let n=al(e,t);if("error"===n.status)throw Error(n.message);return"noop"===n.status?e:n.after},e)}function al(e,t){if("create"===t.type)return function(e,t){var n;if(e)return{status:"error",message:"Document already exist"};let r=(n=t.document,aa(n)?n:{...n,_id:o1()});return{status:"created",id:r._id,after:r}}(e,t);if("createIfNotExists"===t.type){return n=e,aa((r=t).document)?n?{status:"noop"}:{status:"created",id:r.document._id,after:r.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"}}if("delete"===t.type){return i=e,o=t,i?o.id!==i._id?{status:"error",message:"Delete mutation targeted wrong document"}:{status:"deleted",id:o.id,before:i,after:void 0}:{status:"noop"}}if("createOrReplace"===t.type){return a=e,aa((s=t).document)?a?{status:"updated",id:s.document._id,before:a,after:s.document}:{status:"created",id:s.document._id,after:s.document}:{status:"error",message:"Cannot createIfNotExists on document without _id"}}if("patch"===t.type){var n,r,i,o,a,s,l=e,u=t;if(!l)return{status:"error",message:"Cannot apply patch on nonexistent document"};let c=function(e,t){if(e.options?.ifRevision&&t._rev!==e.options.ifRevision)throw Error("Revision mismatch");if(e.id!==t._id)throw Error(`Document id mismatch. Refusing to apply mutation for document with id="${e.id}" on the given document with id="${t._id}"`);return ai(e.patches,t)}(u,l);return l===c?{status:"noop"}:{status:"updated",id:u.id,before:l,after:c}}throw Error(`Invalid mutation type: ${t.type}`)}function au(e,t,n){let r=[];for(let n of e.slice().reverse()){if(t(n))return r;r.push(n)}return r.reverse()}function ac(e,t){return o9(e)===o9(t)}function ad(e,t){let n=e;return t.reduce((e,t)=>{let r=n;if(n=ao(t,n),"set"===t.op.type&&"string"==typeof t.op.value){let n=o4(t.path,r);if("string"==typeof n){let r={...t,op:{type:"diffMatchPatch",value:(function(e,t,n){if("string"==typeof e&&"string"==typeof t){let n=n$(e,t,{checkLines:!0});return n.length>2&&(n=function(e,t=4){let n=e.map(e=>nk(e)),r=!1,i=[],o=0,a=null,s=0,l=!1,u=!1,c=!1,d=!1;for(;s<n.length;)0===n[s][0]?(n[s][1].length<t&&(c||d)?(i[o++]=s,l=c,u=d,a=n[s][1]):(o=0,a=null),c=!1,d=!1):(-1===n[s][0]?d=!0:c=!0,a&&(l&&u&&c&&d||a.length<t/2&&3===function(...e){return e.reduce((e,t)=>e+ +!!t,0)}(l,u,c,d))&&(n.splice(i[o-1],0,[-1,a]),n[i[o-1]+1][0]=1,o--,a=null,l&&u?(c=!0,d=!0,o=0):(s=--o>0?i[o-1]:-1,c=!1,d=!1),r=!0)),s++;return r&&(n=nY(n)),n}(n=nN(n))),ra(e,n,ro(void 0))}if(e&&Array.isArray(e)&&typeof t>"u")return ra(n2(e),e,ro(void 0));if("string"==typeof e&&t&&Array.isArray(t))return ra(e,t,ro(n));throw Error("Unknown call format to make()")})(n,t.op.value).map(rc).join("")}};return e.flatMap(e=>ac(e.path,t.path)&&"diffMatchPatch"===e.op.type?[]:e).concat(r)}}return e.push(t),e},[])}function ah(e,t,n,r){let i=t,o=r.map(t=>{let n=t.mutations.flatMap(t=>{if(o0(t)!==e)return[];let n=i;return i=as(i,[t]),n&&"patch"===t.type?{type:"dmpified",mutation:{...t,dmpPatches:ad(n,t.patches),original:t.patches}}:t});return{...t,mutations:n}}),a=n;return o.map(t=>{let n=[];return t.mutations.forEach(t=>{if("dmpified"===t.type)try{a=ai(t.mutation.dmpPatches,a),n.push(t)}catch{console.warn("Failed to apply dmp patch, falling back to original");try{a=ai(t.mutation.original,a),n.push(t)}catch(t){throw Error(`Failed to apply patch for document "${e}": ${t.message}`)}}else a=as(a,[t])})}),[r.map(t=>({...t,mutations:t.mutations.map(t=>"patch"!==t.type||o0(t)!==e?t:{...t,patches:t.patches.map(e=>"set"!==e.op.type?e:{...e,op:{...e.op,value:o4(e.path,a)}})})})),a]}function af(e){var t=e;if("create"===t.type||"createIfNotExists"===t.type||"createOrReplace"===t.type)return{[t.type]:t.document};
112if("delete"===t.type)return{delete:{id:t.id}};let n=t.options?.ifRevision;return t.patches.map(e=>({patch:{id:t.id,...n&&{ifRevisionID:n},...function(e){let{path:t,op:n}=e;if("unset"===n.type)return{unset:[o9(t)]};if("insert"===n.type)return{insert:{[n.position]:o9([...t,n.referenceItem]),items:n.items}};if("diffMatchPatch"===n.type)return{diffMatchPatch:{[o9(t)]:n.value}};if("inc"===n.type)return{inc:{[o9(t)]:n.amount}};if("dec"===n.type)return{dec:{[o9(t)]:n.amount}};if("set"===n.type||"setIfMissing"===n.type)return{[n.type]:{[o9(t)]:n.value}};if("truncate"===n.type){let e=[n.startIndex,"number"==typeof n.endIndex?n.endIndex:""].join(":");return{unset:[`${o9(t)}[${e}]`]}}if("upsert"===n.type)return{unset:n.items.map(e=>o9([...t,{_key:e._key}])),insert:{[n.position]:o9([...t,n.referenceItem]),items:n.items}};if("assign"===n.type)return{set:Object.fromEntries(Object.keys(n.value).map(e=>[o9(t.concat(e)),n.value[e]]))};if("unassign"===n.type)return{unset:n.keys.map(e=>o9(t.concat(e)))};if("replace"===n.type)return{insert:{replace:o9(t.concat(n.referenceItem)),items:n.items}};if("remove"===n.type)return{unset:[o9(t.concat(n.referenceItem))]};throw Error(`Unknown operation type ${n.type}`)}(e)}}))}function ap(e){let t=e.listen('*[!(_id in path("_.**"))]',{},{events:["welcome","mutation","reconnect"],includeResult:!1,includePreviousRevision:!1,visibility:"transaction",effectFormat:"mendoza",includeMutations:!1}).pipe((0,o$.u)({resetOnRefCountZero:!0})),n=t.pipe((0,oD.p)(e=>"reconnect"===e.type)),r=t.pipe((0,oD.p)(e=>"welcome"===e.type)),i=t.pipe((0,oD.p)(e=>"mutation"===e.type)),o=(0,nS.h)(r,n).pipe((0,oL.t)({bufferSize:1,refCount:!0})).pipe((0,oD.p)(e=>"welcome"===e.type));return(0,nS.h)(o,i,n)}let am=(0,oZ.mj)({types:{},actions:{"assign error to context":(0,oJ.a)({error:({event:e})=>e}),"clear error from context":(0,oJ.a)({error:void 0}),"connect to server-sent events":(0,nb.r)({type:"connect"}),"listen to server-sent events":(0,nb.b)("server-sent events",{id:"listener",input:({context:e})=>({listener:e.sharedListener||ap(e.client),id:e.id})}),"stop listening to server-sent events":(0,nb.s)("listener"),"buffer remote mutation events":(0,oJ.a)({mutationEvents:({event:e,context:t})=>((0,oZ.DT)(e,"mutation"),[...t.mutationEvents,e])}),"restore stashed changes":(0,oJ.a)({stagedChanges:({event:e,context:t})=>((0,oZ.DT)(e,"xstate.done.actor.submitTransactions"),t.stashedChanges),stashedChanges:[]}),"rebase fetched remote snapshot":(0,oQ.e)(({enqueue:e})=>{e.assign(({event:e,context:t})=>{(0,oZ.DT)(e,"xstate.done.actor.getDocument");let n=t.remote,r=e.output,i=!1;for(let e of t.mutationEvents)e.effects?.apply&&(e.previousRev||"appear"===e.transition)&&(i||e.previousRev!==r?._rev||(i=!0),i&&(r=ag(r,e.effects.apply,e.resultRev)));t.cache&&(!t.cache.has(t.id)||t.cache.get(t.id)._rev!==r?._rev)&&t.cache.set(t.id,r);let[o,a]=ah(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:a,stagedChanges:o,mutationEvents:[]}}),e.sendParent(({context:e})=>({type:"rebased.remote",id:e.id,document:e.remote}))}),"apply mendoza patch":(0,oJ.a)(({event:e,context:t})=>{(0,oZ.DT)(e,"mutation");let n=t.remote;if(e.transactionId===n?._rev)return{};let r=ag(n,e.effects.apply,e.resultRev);t.cache&&(!t.cache.has(t.id)||t.cache.get(t.id)._rev!==r?._rev)&&t.cache.set(t.id,r);let[i,o]=ah(t.id,null===n?void 0:n,null===r?void 0:r,t.stagedChanges);return{remote:r,local:o,stagedChanges:i}}),"increment fetch attempts":(0,oJ.a)({fetchRemoteSnapshotAttempts:({context:e})=>e.fetchRemoteSnapshotAttempts+1}),"reset fetch attempts":(0,oJ.a)({fetchRemoteSnapshotAttempts:0}),"increment submit attempts":(0,oJ.a)({submitTransactionsAttempts:({context:e})=>e.submitTransactionsAttempts+1}),"reset submit attempts":(0,oJ.a)({submitTransactionsAttempts:0}),"stage mutation":(0,oJ.a)({stagedChanges:({event:e,context:t})=>((0,oZ.DT)(e,"mutate"),[...t.stagedChanges,{transaction:!1,mutations:e.mutations}])}),"stash mutation":(0,oJ.a)({stashedChanges:({event:e,context:t})=>((0,oZ.DT)(e,"mutate"),[...t.stashedChanges,{transaction:!1,mutations:e.mutations}])}),"rebase local snapshot":(0,oQ.e)(({enqueue:e})=>{e.assign({local:({event:e,context:t})=>{(0,oZ.DT)(e,"mutate");let n=new Map;
112return t.local&&n.set(t.id,t.local),function(e,t){e.forEach(e=>{("created"===e.status||"updated"===e.status)&&t.set(e.id,e.after),"deleted"===e.status&&t.delete(e.id)})}(function(e,t){let n=Object.create(null);for(let r of e){let e=o0(r);if(!e)throw Error("Unable to get document id from mutation");let i=n[e]?.after||t.get(e),o=al(i,r);if("error"===o.status)throw Error(o.message);"noop"!==o.status&&("updated"===o.status||"created"===o.status||"deleted"===o.status)&&(e in n||(n[e]={before:i,after:void 0,muts:[]}),n[e].after=o.after)}return Object.entries(n).map(([e,{before:t,after:n,muts:r}])=>({id:e,status:n?t?"updated":"created":"deleted",mutations:r,before:t,after:n}))}(e.mutations,n),n),n.get(t.id)}}),e.sendParent(({context:e})=>({type:"rebased.local",id:e.id,document:e.local}))}),"send pristine event to parent":(0,oQ.b)(({context:e})=>({type:"pristine",id:e.id})),"send sync event to parent":(0,oQ.b)(({context:e})=>({type:"sync",id:e.id,document:e.remote})),"send mutation event to parent":(0,oQ.b)(({context:e,event:t})=>((0,oZ.DT)(t,"mutation"),{type:"mutation",id:e.id,previousRev:t.previousRev,resultRev:t.resultRev,effects:t.effects}))},actors:{"server-sent events":(0,I.OX)(({input:e})=>{let{listener:t,id:n}=e;return(0,oV.v)(()=>t).pipe((0,oD.p)(e=>"welcome"===e.type||"reconnect"===e.type||"mutation"===e.type&&e.documentId===n),(0,oz.Q)(oK))}),"fetch remote snapshot":(0,I.Sx)(async({input:e,signal:t})=>{let{client:n,id:r}=e;return await n.getDocument(r,{signal:t}).catch(e=>{if(!(e instanceof Error&&"AbortError"===e.name))throw e})}),"submit mutations as transactions":(0,I.Sx)(async({input:e,signal:t})=>{let{client:n,transactions:r}=e;for(let e of r){if(t.aborted)return;await n.dataRequest("mutate",function(e){return{transactionId:e.id,mutations:e.mutations.flatMap(af)}}(e),{visibility:"async",returnDocuments:!1,signal:t}).catch(e=>{if(!(e instanceof Error&&"AbortError"===e.name))throw e})}})},delays:{fetchRemoteSnapshotTimeout:({context:e})=>1e3*Math.pow(2,e.fetchRemoteSnapshotAttempts),submitTransactionsTimeout:({context:e})=>1e3*Math.pow(2,e.submitTransactionsAttempts)}}).createMachine({id:"document-mutator",context:({input:e})=>({client:e.client.withConfig({allowReconfigure:!1}),sharedListener:e.sharedListener,id:e.id,remote:void 0,local:void 0,mutationEvents:[],stagedChanges:[],stashedChanges:[],error:void 0,fetchRemoteSnapshotAttempts:0,submitTransactionsAttempts:0,cache:e.cache}),entry:["connect to server-sent events"],on:{mutate:{actions:["rebase local snapshot","stage mutation"]}},initial:"disconnected",states:{disconnected:{on:{connect:{target:"connecting",actions:["listen to server-sent events"]}}},connecting:{on:{welcome:"connected",reconnect:"reconnecting",error:"connectFailure"},tags:["busy"]},connectFailure:{on:{connect:{target:"connecting",actions:["listen to server-sent events"]}},entry:["stop listening to server-sent events","assign error to context"],exit:["clear error from context"],tags:["error"]},reconnecting:{on:{welcome:{target:"connected"},error:{target:"connectFailure"}},tags:["busy","error"]},connected:{on:{mutation:{actions:["buffer remote mutation events"]},reconnect:"reconnecting"},entry:["clear error from context"],initial:"loading",states:{loading:{invoke:{src:"fetch remote snapshot",id:"getDocument",input:({context:e})=>({client:e.client,id:e.id}),onError:{target:"loadFailure"},onDone:{target:"loaded",actions:["rebase fetched remote snapshot","reset fetch attempts"]}},tags:["busy"]},loaded:{entry:["send sync event to parent"],on:{mutation:{actions:["apply mendoza patch","send mutation event to parent"]}},initial:"pristine",states:{pristine:{on:{mutate:{actions:["rebase local snapshot","stage mutation"],target:"dirty"}},tags:["ready"]},dirty:{on:{submit:"submitting"},tags:["ready"]},submitting:{on:{mutate:{actions:["rebase local snapshot","stash mutation"]}},invoke:{src:"submit mutations as transactions",id:"submitTransactions",input:({context:e})=>{let t=new Map;return t.set(e.id,e.remote),{client:e.client,transactions:(function(e,t){let n=[],r=[];return e.forEach(e=>{t(e)?r.push(e):(r.length>0&&n.push(r),r=[],n.push([e]))}),r.length>0&&n.push(r),n})(e.stagedChanges,e=>!e.transaction).flatMap(e=>({...e[0],mutations:e.flatMap(e=>e.mutations)})).map(e=>({...e,mutations:Object.values(oM(e.mutations,o0)).flatMap(e=>{var t,n;return(0===(n=0===(t=e).length?t:t.reduce((e,t)=>
112"delete"===t.type?[t]:(e.push(t),e),[])).length?n:n.reduce((e,t)=>("createIfNotExists"!==t.type?e.push(t):au(e,e=>"delete"===e.type).find(e=>"createIfNotExists"===e.type)||e.push(t),e),[])).flat().reduce((e,t)=>{let n=e[e.length-1];return n&&"patch"!==n.type||"patch"!==t.type?e.concat(t):e.slice(0,-1).concat({...t,patches:(n?.patches||[]).concat(t.patches)})},[])})})).map(e=>({...e,mutations:e.mutations.map(e=>"patch"!==e.type?e:{...e,patches:e.patches.reduce((e,t)=>{if("unset"!==t.op.type)return e.push(t),e;let n=e.filter(e=>{var n,r;return n=t.path,r=e.path,!(n.length<=r.length&&n.every((e,t)=>{var n,i;return n=e,i=function(e,t){if(t<0||t>=e.length)throw Error("Index out of bounds");return e[t]}(r,t),o2(n)&&o2(i)?n._key===i._key:"number"==typeof n?Number(n)===Number(i):n===i}))});return n.push(t),n},[]).reduceRight((e,t)=>(e.find(e=>{var n,r;return n=e.op,("set"===(r=t.op).type||"unset"===r.type)&&("set"===n.type||"unset"===n.type)&&ac(e.path,t.path)})||e.unshift(t),e),[]).reduce((e,t)=>("setIfMissing"!==t.op.type?e.push(t):au(e,e=>"unset"===e.op.type).find(e=>"setIfMissing"===e.op.type&&ac(e.path,t.path))||e.push(t),e),[])})})).map(e=>{var n;return{...e,mutations:(n=t,e.mutations.map((e,t)=>{var r,i;return"patch"===e.type?(r=n.get(e.id),i=e,r?{...i,patches:ad(r,i.patches)}:i):e}))}}).map(e=>e.transaction&&void 0!==e.id?{id:e.id,mutations:e.mutations}:{mutations:e.mutations})}},onError:{target:"submitFailure"},onDone:{target:"pristine",actions:["restore stashed changes","reset submit attempts","send pristine event to parent"]}},tags:["busy","ready"]},submitFailure:{exit:["clear error from context"],after:{submitTransactionsTimeout:{actions:["increment submit attempts"],target:"submitting"}},on:{retry:"submitting"},tags:["error","ready"]}}},loadFailure:{exit:["clear error from context"],after:{fetchRemoteSnapshotTimeout:{actions:["increment fetch attempts"],target:"loading"}},on:{retry:"loading"},tags:["error"]}}}}});function ag(e,t,n){var r;let i=(r=function(e){if(!e)return null;let{_rev:t,...n}=e;return n}(e),new o_(new oO,r,t).process());return i?Object.assign(i,{_rev:n}):null}let ay=(0,oZ.mj)({types:{},actions:{"emit sync event":(0,oQ.a)(({event:e})=>((0,oZ.DT)(e,"sync"),e)),"emit mutation event":(0,oQ.a)(({event:e})=>((0,oZ.DT)(e,"mutation"),e)),"emit rebased event":(0,oQ.a)(({event:e})=>((0,oZ.DT)(e,["rebased.local","rebased.remote"]),e)),"emit pristine event":(0,oQ.a)(({event:e})=>((0,oZ.DT)(e,["pristine"]),e)),"add document actor":(0,oJ.a)({documents:({context:e,event:t,spawn:n})=>{(0,oZ.DT)(t,"observe");let r=t.documentId;return e.documents[r]?e.documents:{...e.documents,[r]:n("documentMutatorMachine",{input
112:{id:r,client:e.client,sharedListener:e.sharedListener||ap(e.client)},id:r})}}}),"stop remote snapshot":(0,nb.s)(({context:e,event:t})=>((0,oZ.DT)(t,"unobserve"),e.documents[t.documentId])),"remove remote snapshot from context":(0,oJ.a)({documents:({context:e,event:t})=>{if((0,oZ.DT)(t,"unobserve"),!e.documents[t.documentId])return e.documents;let{[t.documentId]:n,...r}=e.documents;return r}})},actors:{documentMutatorMachine:am}}).createMachine({id:"dataset-mutator",context:({input:e})=>({documents:{},client:e.client,sharedListener:e.sharedListener}),on:{sync:{actions:["emit sync event"]},mutation:{actions:["emit mutation event"]},"rebased.*":{actions:["emit rebased event"]},pristine:{actions:["emit pristine event"]},observe:{actions:["add document actor"]},unobserve:{actions:["stop remote snapshot","remove remote snapshot from context"]}},initial:"pristine",states:{pristine:{}}}),av=e=>{let t,n,r,i,o=(0,c.c)(8),{comlink:a,history:s}=e;return o[0]!==a||o[1]!==s?(t=()=>a?.on("presentation/navigate",e=>{s?.update(e)}),n=[a,s],o[0]=a,o[1]=s,o[2]=t,o[3]=n):(t=o[2],n=o[3]),(0,h.useEffect)(t,n),o[4]!==a||o[5]!==s?(r=()=>{if(s)return s.subscribe(e=>{e.title=e.title||document.title,a?.post("visual-editing/navigate",e)})},i=[a,s],o[4]=a,o[5]=s,o[6]=r,o[7]=i):(r=o[6],i=o[7]),(0,h.useEffect)(r,i),null},ab=e=>{let t,n,r=(0,c.c)(3),{comlink:i}=e;return r[0]!==i?(t=()=>{let e=()=>{i.post("visual-editing/meta",{title:document.title})},t=new MutationObserver(t=>{let[n]=t;"TITLE"===n.target.nodeName&&e()});return t.observe(document.head,{subtree:!0,characterData:!0,childList:!0}),e(),()=>t.disconnect()},n=[i],r[0]=i,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,h.useEffect)(t,n),null};function ax(e){let t=new CustomEvent("sanity/dragEnd",{detail:e,cancelable:!0});window.dispatchEvent(t)}let aw=(0,h.createContext)(null);function aS(){let e=(0,h.useContext)(aw);if(!e)throw Error("Schema context is missing");return e}function ak(e,t,n,r){if(!e.type)throw Error("Node type is missing");return()=>t.patch(()=>(function(e,t,n){let{path:r,key:i}=ee(e);return[_(r,T([{_type:t,_key:Q()}],n,{_key:i}))]})(e,n,r))}function aE(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Duplicate",icon:eQ.TdU,action:function(e,t){if(!e.type)throw Error("Node type is missing");return()=>t.patch(async({getSnapshot:t})=>(function(e,t,n="after"){let{path:r,key:i}=ee(e);return[_(r,T({...B(t,e.path),_key:Q()},n,{_key:i}))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Duplicated"}]:[]}function aj(e){let{node:t,doc:n}=e;return n?[{type:"action",label:"Remove",icon:eQ.YPx,action:function(e,t){if(!e.type)throw Error("Node type is missing");return()=>t.patch(async({getSnapshot:t})=>(function(e,t){let{path:n,key:r}=ee(e),i=B(t,n).findIndex(e=>e._key===r);return[_(n,M(i,i+1))]})(e,await t()))}(t,n),telemetryEvent:"Visual Editing Context Menu Item Removed"}]:[]}async function aC(e,t=!0){let{node:n,doc:r}=e;if(!r)return[];let i=[],o=[],[a,s,l,u]=await Promise.all([et(n,r,"previous"),et(n,r,"next"),et(n,r,"first"),et(n,r,"last")]);return l.length&&o.push({type:"action",label:"To top",icon:eQ.VQ$,action:()=>r.patch(l),telemetryEvent:"Visual Editing Context Menu Item Moved"}),a.length&&o.push({type:"action",label:"Up",icon:eQ.Kpk,action:()=>r.patch(a),telemetryEvent:"Visual Editing Context Menu Item Moved"}),s.length&&o.push({type:"action",label:"Down",icon:eQ.ZLN,action:()=>r.patch(s),telemetryEvent:"Visual Editing Context Menu Item Moved"}),u.length&&o.push({type:"action",label:"To bottom",icon:eQ.wvk,action:()=>r.patch(u),telemetryEvent:"Visual Editing Context Menu Item Moved"}),o.length&&(i.push({type:"group",label:"Move",icon:eQ.ycB,items:o}),t&&i.push({type:"divider"})),i}async function aA(e){let{node:t,field:n,doc:r}=e,i=[];return i.push(...aE(e)),i.push(...aj(e)),i.push(...await aC(e)),i.push({type:"action",label:"Insert before",icon:eQ.SKY,action:ak(t,r,n.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i.push({type:"action",label:"Insert after",icon:eQ.amD,action:ak(t,r,n.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}),i}let aT=e=>{let t,n,r,i,o,a=(0,c.c)(12),{label:s,parent:l,width:d,onSelect:h,boundaryElement:f}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=["left-start","right","left","right-end","left-end","bottom","top"],a[0]=t):t=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(n=[4,4,4,4],a[1]=n):n=a[1],a[2]!==f||a[3]!==d?(r={arrow:!1,constrainSize:!0,floatingBoundary:f,padding:0,placement:"right-start",fallbackPlacements:t,preventOverflow:!0,width:d,__unstable_margins:n},a[2]=f,a[3]=d,a[4]=r):r=a[4],a[5]!==h||a[6]!==l?(i=(0,u.jsx)(ty,{node:l,onSelect:h}),a[5]=h,a[6]=l,a[7]=i):i=a[7],a[8]!==s||a[9]!==r||a[10]!==i?(o=(0,u.jsx)(m.rX,{fontSize:1,icon:eQ.amD,padding:2,popover:r,space
112:2,text:s,children:i}),a[8]=s,a[9]=r,a[10]=i,a[11]=o):o=a[11],o};async function aM(e){let{doc:t,node:n,parent:r}=e,i=[];if(i.push(...aE(e)),i.push(...aj(e)),i.push(...await aC(e)),r.options?.insertMenu){let e=(r.options.insertMenu||{}).views?.some(e=>"grid"===e.name)?0:void 0;i.push({type:"custom",component:({boundaryElement:i,sendTelemetry:o})=>(0,u.jsx)(aT,{label:"Insert before",onSelect:e=>{ak(n,t,e.name,"before")(),o("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:i})}),i.push({type:"custom",component:({boundaryElement:i,sendTelemetry:o})=>(0,u.jsx)(aT,{label:"Insert after",onSelect:e=>{ak(n,t,e.name,"after")(),o("Visual Editing Context Menu Item Inserted",null)},parent:r,width:e,boundaryElement:i})})}else i.push({type:"group",label:"Insert before",icon:eQ.SKY,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",icon:to(e),label:"block"===e.name?"Paragraph":e.title||e.name,action:ak(n,t,e.name,"before"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))}),i.push({type:"group",label:"Insert after",icon:eQ.amD,items:r.of.filter(e=>"unionOption"===e.type).map(e=>({type:"action",label:"block"===e.name?"Paragraph":e.title||e.name,icon:to(e),action:ak(n,t,e.name,"after"),telemetryEvent:"Visual Editing Context Menu Item Inserted"}))});return i}let aP=[-4,4,-4,4];function a_(e){let t,n=(0,c.c)(27),{node:r,onDismiss:i,boundaryElement:o}=e,a=tm();n[0]!==r||n[1]!==i||n[2]!==a?(t=()=>{"action"===r.type&&(r.action?.(),i?.(),r.telemetryEvent&&a(r.telemetryEvent,null))},n[0]=r,n[1]=i,n[2]=a,n[3]=t):t=n[3];let s=t;if("divider"===r.type){let e;return n[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,u.jsx)(m.Nj,{}),n[4]=e):e=n[4],e}if("action"===r.type){let e,t=!r.action;return n[5]!==r.hotkeys||n[6]!==r.icon||n[7]!==r.label||n[8]!==s||n[9]!==t?(e=(0,u.jsx)(m.Dr,{fontSize:1,hotkeys:r.hotkeys,icon:r.icon,padding:2,space:2,text:r.label,disabled:t,onClick:s}),n[5]=r.hotkeys,n[6]=r.icon,n[7]=r.label,n[8]=s,n[9]=t,n[10]=e):e=n[10],e}if("group"===r.type){let e,t,a,s=r.icon;n[11]===Symbol.for("react.memo_cache_sentinel")?(e={arrow:!1,constrainSize:!0,placement:"right-start",fallbackPlacements:["left-start","right","left","right-end","left-end","bottom","top"],preventOverflow:!0,__unstable_margins:aP},n[11]=e):e=n[11];let l=r.label;if(n[12]!==o||n[13]!==r.items||n[14]!==i){let e;n[16]!==o||n[17]!==i?(e=(e,t)=>(0,u.jsx)(a_,{node:e,onDismiss:i,boundaryElement:o},t),n[16]=o,n[17]=i,n[18]=e):e=n[18],t=r.items.map(e),n[12]=o,n[13]=r.items,n[14]=i,n[15]=t}else t=n[15];return n[19]!==r.icon||n[20]!==r.label||n[21]!==t?(a=(0,u.jsx)(m.rX,{fontSize:1,icon:s,padding:2,popover:e,space:2,text:l,children:t}),n[19]=r.icon,n[20]=r.label,n[21]=t,n[22]=a):a=n[22],a}if("custom"===r.type){let e,{component:t}=r;return n[23]!==t||n[24]!==o||n[25]!==a?(e=(0,u.jsx)(t,{boundaryElement:o,sendTelemetry:a}),n[23]=t,n[24]=o,n[25]=a,n[26]=e):e=n[26],e}return null}let aI=e=>{let t,n,r,i,o,a,s,l,d,f,p,g,y,v,b,x=(0,c.c)(43),{node:w,onDismiss:S,position:k}=e,{x:E,y:j}=k,[C,A]=(0,h.useState)(null),{getField:T}=aS(),{getDocument:M}=Z();x[0]!==T||x[1]!==w?(t=T(w),x[0]=T,x[1]=w,x[2]=t):t=x[2];let{field:P,parent:_}=t,I=P?.title||P?.name||"Unknown type",[R,O]=(0,h.useState)(void 0);x[3]!==P||x[4]!==M||x[5]!==w||x[6]!==_?(n=()=>{(async()=>{let e=M(w.id);e&&O(await function(e){let{node:t,field:n,parent:r,doc:i}=e;return n?.type==="arrayItem"?aA({node:t,field:n,doc:i}):r?.type==="union"?aM({node:t,parent:r,doc:i}):Promise.resolve([])}({node:w,field:P,parent:_,doc:e}))})()},r=[P,w,_,M],x[3]=P,x[4]=M,x[5]=w,x[6]=_,x[7]=n,x[8]=r):(n=x[7],r=x[8]),(0,h.useEffect)(n,r),x[9]!==E||x[10]!==j?(i={getBoundingClientRect:()=>({bottom:j,left:E,right:E,top:j,width:0,height:0})},x[9]=E,x[10]=j,x[11]=i):i=x[11];let $=i;x[12]!==P?(o=to(P),x[12]=P,x[13]=o):o=x[13];let D=o;x[14]===Symbol.for("react.memo_cache_sentinel")?(a={minWidth:120,maxWidth:160},x[14]=a):a=x[14],x[15]!==D||x[16]!==R?(s=(0,u.jsx)(m.az,{flex:"none",children:R?(0,u.jsx)(m.EY,{size:1,children:D}):(0,u.jsx)(m.y$,{size:1})}),x[15]=D,x[16]=R,x[17]=s):s=x[17];let L=R?I:"Loading...";x[18]!==L?(l=(0,u.jsx)(m.BJ,{flex:1,space:2,children:(0,u.jsx)(m.EY,{size:1,weight:"semibold",children:L})}),x[18]=L,x[19]=l):l=x[19],x[20]!==s||x[21]!==l?(d=(0,u.jsxs)(m.so,{gap:2,padding:2,children:[s,l]}),x[20]=s,x[21]=l,x[22]=d):d=x[22],x[23]!==C||x[24]!==R||x[25]!==S?(f=R&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(m.Nj,{}),R.map((e,t)=>(0,u.jsx)(a_,{node:e,onDismiss:S,boundaryElement:C},t))]}),x[23]=C,x[24]=R,x[25]=S,x[26]=f):f=x[26],x[27]!==d||x[28]!==f?(p=(0,u.jsxs)(m.W1,{style:a,children:[d,f]}),x[27]=d,x[28]=f,x[29]=p):p=x[29];let V=`${E}-${j}`;return x[30]!==E||x[31]!==j?(g={position:"absolute",left:E,top:j},x[30]=E,x[31]=j,x[32]=g):g=x[32],x[33]!==V||x[34]!==g?(y=(0,u.jsx)("div",{style:g},V),x[33]=V,x[34]=g,x[35]=y):y=x[35],x[36]!==$||x[37]!==p||x[38]!==y?(v=(0,u.jsx)(m.AM,{__unstable_margins:aP,arrow:!1,open:!0,placement:"right-start",referenceElement:$,content:p,children:y}),x[36]=$,x[37]=p,x[38]=y,x[39]=v):v=x[39],x[40]!==S||x[41]!==v?(b=(0,u.jsx)(tu,{setBoundaryElement:A,onDismiss:S,children:v}),x[40]=S,x[41]=v,x[42]=b):b=x[42],b},aR=(0,h.createContext)(null),aO=(0,g.I4)(m.Zp)`
113  background-color: var(--overlay-bg);
114  border-radius: 3px;
115  pointer-events: none;
116  position: absolute;
117  will-change: transform;
118  box-shadow: var(--overlay-box-shadow);
119  transition: none;
120
121  --overlay-bg: transparent;
122  --overlay-box-shadow: inset 0 0 0 1px transparent;
123
124  [data-overlays] & {
125    --overlay-bg: color-mix(in srgb, transparent 95%, var(--card-focus-ring-color));
126    --overlay-box-shadow: inset 0 0 0 2px
127      color-mix(in srgb, transparent 50%, var(--card-focus-ring-color));
128  }
129
130  [data-fading-out] & {
131    transition:
132      box-shadow 1550ms,
133      background-color 1550ms;
134
135    --overlay-bg: rgba(0, 0, 255, 0);
136    --overlay-box-shadow: inset 0 0 0 1px transparent;
137  }
138
139  &[data-focused] {
140    --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color);
141  }
142
143  &[data-hovered]:not([data-focused]) {
144    transition: none;
145    --overlay-box-shadow: inset 0 0 0 2px var(--card-focus-ring-color);
146  }
147
148  /* [data-unmounted] & {
149    --overlay-box-shadow: inset 0 0 0 1px var(--card-focus-ring-color);
150  } */
151
152  :link {
153    text-decoration: none;
154  }
155`,a$=(0,g.I4)(m.so)`
156  bottom: 100%;
157  cursor: pointer;
158  pointer-events: none;
159  position: absolute;
160  right: 0;
161
162  [data-hovered]:not([data-menu-open]) & {
163    pointer-events: all;
164  }
165
166  [data-flipped] & {
167    bottom: auto;
168    top: 100%;
169  }
170`,aD=(0,g.I4)(m.so)`
171  top: 100%;
172  cursor: pointer;
173  pointer-events: none;
174  position: absolute;
175  left: 0;
176
177  gap: 4px;
178  padding: 4px 0;
179  flex-wrap: wrap;
180
181  [data-hovered]:not([data-menu-open]) & {
182    pointer-events: all;
183  }
184
185  [data-flipped] & {
186    top: calc(100% + 2rem);
187  }
188`,aL=(0,g.I4)(m.so)`
189  margin: -0.5rem;
190
191  [data-hovered]:not([data-menu-open]) & {
192    pointer-events: all;
193  }
194`,aV=(0,g.I4)(m.so)`
195  bottom: 100%;
196  cursor: pointer;
197  pointer-events: none;
198  position: absolute;
199  left: 0;
200
201  [data-hovered]:not([data-menu-open]) & {
202    pointer-events: all;
203  }
204
205  [data-flipped] & {
206    bottom: auto;
207    top: 100%;
208  }
209`,az=(0,g.I4)(m.Zp)`
210  cursor: pointer;
211  background-color: var(--card-focus-ring-color);
212  right: 0;
213  border-radius: 3px;
214
215  & [data-ui='Text'] {
216    color: #fff;
217    white-space: nowrap;
218  }
219`,aN=(0,g.I4)(m.so)`
220  display: flex;
221  align-items: center;
222  background-color: var(--card-focus-ring-color);
223  right: 0;
224  border-radius: 3px;
225  & [data-ui='Text'],
226  & [data-sanity-icon] {
227    color: #fff;
228    white-space: nowrap;
229  }
230`,aF=g.I4.div`
231  position: absolute;
232  inset: 0;
233  pointer-events: all;
234`,aB=e=>{let t,n,r,i,o,a,s,l,d,f,g,y,v,b,x,w,S,k=(0,c.c)(60),{id:E,element:j,focused:C,componentResolver:A,node:T,showActions:M,draggable:P,targets:_,elementType:I,comlink:R,onActivateExclusivePlugin:O,onMenuOpenChange:$,inFrame:D}=e,{getField:L,getType:V}=aS();k[0]!==V||k[1]!==T?(t=V(T),k[0]=V,k[1]=T,k[2]=t):t=k[2];let z=t;k[3]!==T?(n="path"in T?function(e){let{id:t,type:n,path:r,baseUrl:i,tool:o,workspace:a,perspective:s}=e,[l,u]=(0,p.iz)({baseUrl:i,workspace:a,tool:o,type:n,id:t,path:r?function(e){let t="";for(let n of e){if("string"==typeof n){t&&(t+="."),t+=n;continue}if("number"==typeof n){t&&(t+=":"),t+=`${n}`;continue}if(null!==n&&Array.isArray(n)){t&&(t+=":"),t+=`${n.join(",")}}`;continue}if(n._key){t&&(t+=":"),t+=`${n._key}`;continue}}return t}(p.C.fromString(r)):[]}).split("?"),c=new URLSearchParams(u),d=s||c.get("perspective");return"drafts"===d?c.delete("perspective"):d&&c.set("perspective",d),`${l}?${c}`}(T):T.href,k[3]=T,k[4]=n):n=k[4];let N=n,F=function(){let e=(0,h.useContext)(aR);if(!e)throw Error("Preview Snapshots context is missing");return e}();e:{let e;if(!("path"in T)){r=void 0;break e}k[5]!==T||k[6]!==F?(e=F.find(e=>e._id===T.id)?.title,k[5]=T,k[6]=F,k[7]=e):e=k[7],r=e}let B=r;k[8]!==j||k[9]!==C||k[10]!==L||k[11]!==V?(i=function(e,t){let n=V(e),{field:r,parent:i}=L(e);if(!("id"in e)||!r||!n)return;let o=r.value.type;return{document:n,element:j,targetElement:t||j,field:r,focused:!!C,node:e,parent:i,type:o}},k[8]=j,k[9]=C,k[10]=L,k[11]=V,k[12]=i):i=k[12];let U=i;if(k[13]!==I||k[14]!==U||k[15]!==T?(o="element"===I?U(T):void 0,k[13]=I,k[14]=U,k[15]=T,k[16]=o):o=k[16],k[17]!==U||k[18]!==_){let e;k[20]!==U?(e=e=>U(e.sanity,e.element),k[20]=U,k[21]=e):e=k[21],a=_.map(e).filter(aG),k[17]=U,k[18]=_,k[19]=a}else a=k[19];k[22]!==o||k[23]!==a?(s={legacyComponentContext:o,pluginContexts:a},k[22]=o,k[23]=a,k[24]=s):s=k[24];let H=s,W=function(e,t){let n,r=(0,c.c)(3);if(r[0]!==e||r[1]!==t){e:{if(!e){n=void 0;break e}let r=t?.(e);if(!r){n=void 0;break e}if((0,h.isValidElement)(r)){n=r;break e}n=(Array.isArray(r)?r:[r]).map(aH)}r[0]=e,r[1]=t,r[2]=n}else n=r[2];return n}(H.legacyComponentContext,A),G=function(e,t){let n,r=(0,c.c)(5);if(r[0]!==e||r[1]!==t){let i;r[3]!==t?(i=e=>{let n={id:eS(),context:e,hud:[],exclusive:[]};return t?.forEach(t=>{t.guard?.(e)&&("hud"===t.type&&n.hud.push(t),"exclusive"===t.type&&n.exclusive.push(t))}),n},r[3]=t,r[4]=i):i=r[4],n=e.map(i),r[0]=e,r[1]=t,r[2]=n}else n=r[2];return n}(H.pluginContexts,e.plugins);k[25]!==z?(l=z?.icon?(0,u.jsx)("div",{dangerouslySetInnerHTML:{__html:z.icon}}):(0,u.jsx)(eQ.pyG,{}),k[25]=z,k[26]=l):l=k[26];let Y=l,q=(0,h.useId)();k[27]!==G?(d=G?.some(aY),k[27]=G,k[28]=d):d=k[28];let X=d||G?.length>1;k[29]!==E?(f=()=>{window.dispatchEvent(new CustomEvent("sanity-overlay/label-click",{detail:{id:E}}))},k[29]=E,k[30]=f):f=k[30];let K=f;return k[31]!==N||k[32]!==D||k[33]!==M?(g=M?(0,u.jsx)(a$,{gap:1,paddingY:1,children:(0,u.jsx)(aW,{inFrame:D,href:N})}):null,k[31]=N,k[32]=D,k[33]=M,k[34]=g):g=k[34],k[35]!==R||k[36]!==P||k[37]!==K||k[38]!==Y||k[39]!==q||k[40]!==G||k[41]!==O||k[42]!==$||k[43]!==X||k[44]!==B?(y=(B||X)&&(0,u.jsx)(aV,{gap:1,paddingY:1,onClick:K,children:(0,u.jsxs)(aN,{gap:2,padding:2,children:[P&&(0,u.jsx)(m.az,{marginRight:1,children:(0,u.jsx)(m.EY,{className:"drag-handle",size:0,children:(0,u.jsx)(eQ.GG1,{})})}),(0,u.jsx)(m.EY,{size:0,children:Y}),B&&(0,u.jsx)(m.EY,{size:1,weight:"medium",children:B}),X&&(0,u.jsx)(m.az,{paddingLeft:2,onClick:aq,children:(0,u.jsx)(aL,{children:(0,u.jsx)(tK,{id:q,popover:{animate:!0,placement:"bottom-start",constrainSize:!0,tone:"default"},onOpen:()=>{$?.(!0)},onClose:()=>{$?.(!1)},button:(0,u.jsx)(m.$n,{icon:eQ.Lz$,tone:"primary",padding:2}),menu:(0,u.jsx)(m.W1,{paddingY:0,children:(0,u.jsx)(tx,{children:G?.map((e,t)=>(0,u.jsxs)(h.Fragment,{children:[(0,u.jsxs)(m.BJ,{role:"group",paddingY:1,space:0,children:[(0,u.jsx)(m.Dr,{paddingY:2,text:(0,u.jsx)(m.az,{paddingY:2,children:(0,u.jsx)(m.EY,{muted:!0,size:1,style:{textTransform:"capitalize"},children:`${e.context.document.name}: ${e.context.field?.name}`})}),onClick:()=>{e.context.node&&R?.post("visual-editing/focus",e.context.node)}}),e.exclusive.map(t=>
234t.component?(0,u.jsx)(m.Dr,{paddingY:2,icon:t.icon||(0,u.jsx)(eQ.gP2,{}),text:(0,u.jsx)(m.az,{paddingY:2,children:(0,u.jsx)(m.EY,{size:1,children:t.title||t.name})}),onClick:()=>O?.(t,e.context)},t.name):null)]}),t<G.length-1&&(0,u.jsx)(m.Nj,{})]},e.id))})})})})})]})}),k[35]=R,k[36]=P,k[37]=K,k[38]=Y,k[39]=q,k[40]=G,k[41]=O,k[42]=$,k[43]=X,k[44]=B,k[45]=y):y=k[45],k[46]!==G?(v=G?.map(aX),k[46]=G,k[47]=v):v=k[47],k[48]!==v?(b=(0,u.jsx)(aD,{children:v}),k[48]=v,k[49]=b):b=k[49],k[50]!==g||k[51]!==y||k[52]!==b?(x=(0,u.jsxs)(tx,{children:[g,y,b]}),k[50]=g,k[51]=y,k[52]=b,k[53]=x):x=k[53],k[54]!==W||k[55]!==H.legacyComponentContext?(w=Array.isArray(W)?W.map((e,t)=>{let{component:n,props:r}=e;return(0,u.jsx)(n,{PointerEvents:tx,...H.legacyComponentContext,...r},t)}):W,k[54]=W,k[55]=H.legacyComponentContext,k[56]=w):w=k[56],k[57]!==x||k[58]!==w?(S=(0,u.jsxs)(u.Fragment,{children:[x,w]}),k[57]=x,k[58]=w,k[59]=S):S=k[59],S},aU=(0,h.memo)(function(e){let t,n,r,i,o,a,s,l,d,f,p,m,g,y=(0,c.c)(39),{draggable:v,focused:b,hovered:x,rect:w,wasMaybeCollapsed:S,enableScrollIntoView:k,inFrame:E}=e,j=(0,h.useRef)(null),C=(0,h.useRef)(!1),A=`${w.w}px`,T=`${w.h}px`,M=`translate(${w.x}px, ${w.y}px)`;y[0]!==A||y[1]!==T||y[2]!==M?(t={width:A,height:T,transform:M},y[0]=A,y[1]=T,y[2]=M,y[3]=t):t=y[3];let P=t;y[4]!==k||y[5]!==b||y[6]!==S?(n=()=>{if(!C.current&&!S&&!0===b&&j.current&&k){let e=j.current;!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(ny(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:i,top:o,left:a}of ny(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=o-n.top+n.bottom,t=a-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}}(j.current,{behavior:t=>{0!==t.length&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},scrollMode:"if-needed",block:"center",inline:"nearest"})}C.current=!0===b},r=[b,S,k],y[4]=k,y[5]=b,y[6]=S,y[7]=n,y[8]=r):(n=y[7],r=y[8]),(0,h.useEffect)(n,r);let[_,I]=(0,h.useState)(!1);y[9]!==x?(i=()=>{if(!j.current||!x)return;let e=new IntersectionObserver(e=>{let[t]=e;I(t.boundingClientRect.top<0)},{threshold:1});return e.observe(j.current),()=>e.disconnect()},y[9]=x,y[10]=i):i=y[10],y[11]!==x||y[12]!==_?(o=[x,_],y[11]=x,y[12]=_,y[13]=o):o=y[13],(0,h.useEffect)(i,o);let[R,O]=(0,h.useState)(null);y[14]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{O(null),window.dispatchEvent(new CustomEvent("sanity-overlay/exclusive-plugin-closed"))},y[14]=a):a=y[14];let $=a;y[15]===Symbol.for("react.memo_cache_sentinel")?(s=(e,t)=>{O({plugin:e,context:t})},y[15]=s):s=y[15];let D=s,L=R?.plugin.component,[V,z]=(0,h.useState)(!1);y[16]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{(0,h.startTransition)(()=>z(!1))},y[16]=l):l=y[16],y[17]!==x?(d=[x],y[17]=x,y[18]=d):d=y[18],(0,h.useEffect)(l,d),y[19]!==L||y[20]!==V?(f=V||L?(0,u.jsx)(tc,{onDismiss:$,blockScroll:V}):null,y[19]=L,y[20]=V,y[21]=f):f=y[21];let N=b?"":void 0,F=x?"":void 0,B=_?"":void 0,U=v?"":void 0,H=V?"":void 0;return y[22]!==L||y[23]!==R||y[24]!==x||y[25]!==E||y[26]!==e?(p=L?(0,u.jsx)(aF,{"data-sanity-overlay-element":!0,onClick:aK,children:(0,u.jsx)(L,{...R.context,closeExclusiveView:$})}):x?(0,u.jsx)(aB,{...e,inFrame:E,onActivateExclusivePlugin:D,onMenuOpenChange:z}):null,y[22]=L,y[23]=R,y[24]=x,y[25]=E,y[26]=e,y[27]=p):p=y[27],y[28]!==P||y[29]!==N||y[30]!==F||y[31]!==B||y[32]!==U||y[33]!==H||y[34]!==p?(m=(0,u.jsx)(aO,{"data-focused":N,"data-hovered":F,"data-flipped":B,"data-draggable":U,"data-menu-open":H,ref:j,style:P,children:p}),y[28]=P,y[29]=N,y[30]=F,y[31]=B,y[32]=U,y[33]=H,y[34]=p,y[35]=m):m=y[35],y[36]!==f||y[37]!==m?(g=(0,u.jsxs)(u.Fragment,{children:[f,m]}),y[36]=f,y[37]=m,y[38]=g):g=y[38],g});function aH(e){return"object"==typeof e&&"component"in e?e:{component:e,props:{}}}let aW=(0,h.memo)(function(e){let t,n,r,i=(0,c.c)(8),{inFrame:o}=e,a=(0,h.useSyncExternalStore)(aZ,aJ);i[0]!==e.href||i[1]!==a?(t=function e(t,n){try{let r=new URL(t,typeof location>"u"?void 0:location.origin);if(r.hash){let t=new URL(e(r.hash.slice(1),n));return`${r.origin}${r.pathname}${r.search}#${t.pathname}${t.search}`}return r.searchParams.set("preview",n),r.toString()}catch{return t}}(e.href,a),i[0]=e.href,i[1]=a,i[2]=t):t=i[2];let s=t,l=o?void 0:"_blank",d=o?"noopener":"noopener noreferrer";return i[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,u.jsx)(az,{padding:2,children:(0,u.jsx)(m.EY,{size:1,weight:"medium",children:"Open in Studio"})}),i[3]=n):n=i[3],i[4]!==s||i[5]!==l||i[6]!==d?(r=(0,u.jsx)(m.az,{as:"a",href:s,target:l,rel:d,children:n}),i[4]=s,i[5]=l,i[6]=d,i[7]=r):r=i[7],r});function aG(e){return void 0!==e}function aY(e){return e.exclusive.length>0}function aq(e){e.stopPropagation()}function aX(e){return(0,u.jsx)(h.Fragment,{children:e.hud.map(t=>{let n=t.component;return n?(0,u.jsx)(n,{...e.context},t.name):null})},e.id)}function aK(e){e.stopPropagation()}function aZ(e){let t=()=>e();return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)}function aJ(){return window.location.href}let aQ=e=>{let t,n=(0,c.c)(5),{dragGroupRect:r}
234=e,i=`${r.y}px`,o=`${r.x}px`,a=`${r.w-1}px`,s=`${r.h-1}px`;return n[0]!==i||n[1]!==o||n[2]!==a||n[3]!==s?(t=(0,u.jsx)("div",{style:{position:"absolute",top:i,left:o,width:a,height:s,border:"1px dashed #f0709b",pointerEvents:"none"}}),n[0]=i,n[1]=o,n[2]=a,n[3]=s,n[4]=t):t=n[4],t},a0=e=>{let t,n=(0,c.c)(4),{dragInsertPosition:r}=e;if(null===r)return;let i=r?.left||r?.right?"horizontal":"vertical",o=0,a=0,s=0,l=0;if("horizontal"===i){let{left:e,right:t}=r;if(s=6,t&&e){let n=e.rect.x+e.rect.w,r=t.rect.x,i=.0125*Math.min(t.rect.h,e.rect.h);o=.5*n+.5*r-3,a=e.rect.y+i,l=Math.min(t.rect.h,e.rect.h)-2*i}else if(t&&!e){let e=.0125*t.rect.h;o=t.rect.x-3,a=t.rect.y+e,l=t.rect.h-2*e}else if(e&&!t){let t=.0125*e.rect.h;o=e.rect.x+e.rect.w-3,a=e.rect.y+t,l=e.rect.h-2*t}}else{let{bottom:e,top:t}=r;if(e&&t){let n=Math.min(t.rect.x,e.rect.x),r=t.rect.y+t.rect.h,i=e.rect.y,u=.0125*Math.min(e.rect.w,t.rect.w);l=6,o=n+u,a=.5*r+.5*i-3,s=Math.max(e.rect.w,t.rect.w)-2*u}else if(e&&!t){let t=.0125*e.rect.w;o=e.rect.x+t,a=e.rect.y-3,s=e.rect.w-2*t,l=6}else if(t&&!e){let e=.0125*t.rect.w;o=t.rect.x+e,a=t.rect.y+t.rect.h-3,s=t.rect.w-2*e,l=6}}let d=`${s}px`,h=`${l}px`,f=`translate(${o}px, ${a}px)`;return n[0]!==d||n[1]!==h||n[2]!==f?(t=(0,u.jsx)("div",{style:{position:"absolute",width:d,height:h,transform:f,background:"#556bfc",border:"2px solid white",borderRadius:"999px",zIndex:"999999"}}),n[0]=d,n[1]=h,n[2]=f,n[3]=t):t=n[3],t},a1=g.I4.div`
235  --drag-preview-opacity: 0.98;
236  --drag-preview-skeleton-stroke: #ffffff;
237
238  @media (prefers-color-scheme: dark) {
239    --drag-preview-skeleton-stroke: #383d51;
240  }
241
242  position: fixed;
243  display: grid;
244  transform: ${({$scaleFactor:e,$width:t,$height:n})=>`translate(calc(var(--drag-preview-x) - ${t/2}px), calc(var(--drag-preview-y) - ${n/2}px)) scale(${e})`};
245  width: ${({$width:e})=>`${e}px`};
246  height: ${({$height:e})=>`${e}px`};
247  z-index: 9999999;
248  opacity: var(--drag-preview-opacity);
249  cursor: move;
250
251  .drag-preview-content-wrapper {
252    position: relative;
253    width: 100%;
254    height: 100%;
255    container-type: inline-size;
256  }
257
258  [data-ui='card'] {
259    position: relative;
260    width: 100%;
261    height: 100%;
262  }
263
264  .drag-preview-skeleton {
265    position: absolute;
266    inset: 0;
267
268    rect {
269      stroke: var(--drag-preview-skeleton-stroke);
270    }
271  }
272
273  .drag-preview-handle {
274    position: absolute;
275    top: 4cqmin;
276    left: 4cqmin;
277    width: 6cqmin;
278    fill: var(--drag-preview-handle-fill);
279  }
280`,a2=e=>{let t,n,r,i,o,a,s,l,d,h,f,p,g,y,v,b,x,w,S,k,E,j=(0,c.c)(50),{skeleton:C}=e,A=Math.min(C.maxWidth,window.innerWidth/2),T=C.w>A?A/C.w:1,M=C.offsetX*T,P=C.offsetY*T,_=(0,m.Xy)(),I=(0,m.M4)(),R=I.radius[~~function(e,t,n,r,i){var o;return o=(e-0)*(i-1)/1920+1,o<r?r:o>i?i:o}(C.w,0,0,1,I.radius.length-2)];if(j[0]!==M||j[1]!==P||j[2]!==_||j[3]!==R||j[4]!==T||j[5]!==C.childRects||j[6]!==C.h||j[7]!==C.w){let e=C.childRects.filter(a5),u=C.childRects.filter(a3);n=a1,i=C.w,o=C.h,a=M,s=P,l=T,t=m.Zp,p=R,g=4,y="hidden",v="transparent",b=_?"dark":"light",f="drag-preview-content-wrapper",d="drag-preview-skeleton",h=`0 0 ${C.w} ${C.h}`,r=[...e,...u],j[0]=M,j[1]=P,j[2]=_,j[3]=R,j[4]=T,j[5]=C.childRects,j[6]=C.h,j[7]=C.w,j[8]=t,j[9]=n,j[10]=r,j[11]=i,j[12]=o,j[13]=a,j[14]=s,j[15]=l,j[16]=d,j[17]=h,j[18]=f,j[19]=p,j[20]=g,j[21]=y,j[22]=v,j[23]=b}else t=j[8],n=j[9],r=j[10],i=j[11],o=j[12],a=j[13],s=j[14],l=j[15],d=j[16],h=j[17],f=j[18],p=j[19],g=j[20],y=j[21],v=j[22],b=j[23];return j[24]!==r||j[25]!==I.color?(x=r.map((e,t)=>(0,u.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:I.color.skeleton.from},t)),j[24]=r,j[25]=I.color,j[26]=x):x=j[26],j[27]!==x||j[28]!==d||j[29]!==h?(w=(0,u.jsx)("svg",{className:d,viewBox:h,children:x}),j[27]=x,j[28]=d,j[29]=h,j[30]=w):w=j[30],j[31]!==w||j[32]!==f?(S=(0,u.jsx)("div",{className:f,children:w}),j[31]=w,j[32]=f,j[33]=S):S=j[33],j[34]!==t||j[35]!==S||j[36]!==p||j[37]!==g||j[38]!==y||j[39]!==v||j[40]!==b?(k=(0,u.jsx)(t,{radius:p,shadow:g,overflow:y,tone:v,scheme:b,children:S}),j[34]=t,j[35]=S,j[36]=p,j[37]=g,j[38]=y,j[39]=v,j[40]=b,j[41]=k):k=j[41],j[42]!==n||j[43]!==i||j[44]!==o||j[45]!==a||j[46]!==s||j[47]!==l||j[48]!==k?(E=(0,u.jsx)(n,{$width:i,$height:o,$offsetX:a,$offsetY:s,$scaleFactor:l,children:k}),j[42]=n,j[43]=i,j[44]=o,j[45]=a,j[46]=s,j[47]=l,j[48]=k,j[49]=E):E=j[49],E};function a5(e){return"IMG"===e.tagName}function a3(e){return"IMG"!==e.tagName}let a4=(0,g.I4)(m.Zp)`
281  position: fixed;
282  bottom: 2rem;
283  left: 2rem;
284`,a6=()=>{let e,t,n=(0,c.c)(2);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e={zIndex:"999999"},n[0]=e):e=n[0],n[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,u.jsx)(a4,{padding:2,shadow:2,radius:2,style:e,children:(0,u.jsxs)(m.so,{align:"center",gap:2,children:[(0,u.jsx)(m.qW,{keys:["Shift"]}),(0,u.jsx)(m.EY,{size:1,children:"Zoom Out"}),(0,u.jsx)(eQ.mSu,{})]})}),n[1]=t):t=n[1],t};function a9(e,t){let{type:n}=t,{contextMenu:r,focusPath:i,perspective:o,isDragging:a,dragInsertPosition:s,dragShowMinimap:l,dragShowMinimapPrompt:u,dragSkeleton:c,dragMinimapTransition:d,dragGroupRect:h}=e,f=!1;if("presentation/focus"===n){let n=e.focusPath;n!==(i=t.data.path)&&(f=n.slice(i.length).startsWith("["))}return"presentation/perspective"===n&&(o=t.data.perspective),"element/contextmenu"===n&&(r="sanity"in t?{node:t.sanity,position:t.position}:null),("element/click"===n||"element/mouseleave"===n||"overlay/blur"===n||"presentation/blur"===n||"presentation/focus"===n)&&(r=null),"overlay/dragUpdateInsertPosition"===n&&(s=t.insertPosition),"overlay/dragStart"===n&&(a=!0),"overlay/dragUpdateSkeleton"===t.type&&(c=t.skeleton),"overlay/dragEnd"===n&&(a=!1),"overlay/dragToggleMinimapPrompt"===t.type&&(u=t.display),"overlay/dragStartMinimapTransition"===n&&(d=!0),"overlay/dragEndMinimapTransition"===n&&(d=!1),"overlay/dragUpdateGroupRect"===n&&(h=t.groupRect),"overlay/dragToggleMinimap"===n&&(l=t.display),{...e,contextMenu:r,elements:((e,t)=>{let{type:n}=t;switch(n){case"element/register":return e.find(e=>e.id===t.id)?e:[...e,{id:t.id,activated:!1,element:t.element,focused:!1,hovered:!1,rect:t.rect,sanity:t.sanity,dragDisabled:t.dragDisabled,targets:t.targets,elementType:t.elementType}];case"element/activate":return e.map(e=>e.id===t.id?{...e,activated:!0}:e);case"element/update":return e.map(e=>e.id===t.id?{...e,sanity:t.sanity,rect:t.rect,targets:t.targets,elementType:t.elementType}:e);case"element/unregister":return e.filter(e=>e.id!==t.id);case"element/deactivate":return e.map(e=>e.id===t.id?{...e,activated:!1,hovered:!1}:e);case"element/mouseenter":return e.map(e=>e.id===t.id?{...e,rect:t.rect,hovered:!0}:{...e,hovered:!1});case"element/mouseleave":return e.map(e=>e.id===t.id?{...e,hovered:!1}:e);case"element/updateRect":return e.map(e=>e.id===t.id?{...e,rect:t.rect}:e);case"element/click":return e.map(e=>({...e,focused:e.id===t.id&&"clicked"}));case"overlay/reset-mouse-state":return e.map(e=>({...e,focused:!1,hovered:!1}));case"overlay/blur":return e.map(e=>({...e,focused:!1}));case"presentation/blur":return e.map(e=>({...e,focused:!1}));case"presentation/focus":{let n=e.find(e=>"clicked"===e.focused);return e.map(e=>
284{let r="path"in e.sanity&&e.sanity.id===t.data.id&&e.sanity.path===t.data.path;return n&&e===n&&r?e:{...e,focused:r&&n?"duplicate":r}})}default:return e}})(e.elements,t),dragInsertPosition:s,dragSkeleton:c,dragGroupRect:h,isDragging:a,focusPath:i,perspective:o,wasMaybeCollapsed:f,dragShowMinimap:l,dragShowMinimapPrompt:u,dragMinimapTransition:d}}let a8=function(e){let t,n,r,i,o,a,s,l=(0,c.c)(13),{comlink:d,children:f}=e;l[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],l[0]=t):t=l[0];let[p,m]=(0,h.useState)(t);l[1]!==d?(n=async e=>{if(d)try{let t=await d.fetch("visual-editing/preview-snapshots",void 0,{signal:e,suppressWarnings:!0});m(t.snapshots)}catch{}},l[1]=d,l[2]=n):n=l[2];let g=n;return l[3]!==d||l[4]!==g?(r=()=>{if(!d)return;let e=new AbortController,t=d.onStatus(()=>{g(e.signal)},"connected");return()=>{e.abort(),t()}},i=[d,g],l[3]=d,l[4]=g,l[5]=r,l[6]=i):(r=l[5],i=l[6]),(0,h.useEffect)(r,i),l[7]!==d?(o=()=>d?.on("presentation/preview-snapshots",e=>{m(e.snapshots)}),a=[d],l[7]=d,l[8]=o,l[9]=a):(o=l[8],a=l[9]),(0,h.useEffect)(o,a),l[10]!==f||l[11]!==p?(s=(0,u.jsx)(aR.Provider,{value:p,children:f}),l[10]=f,l[11]=p,l[12]=s):s=l[12],s};function a7(e){return"document"===e.type}function se(e){return"type"===e.type}let st=function(e){let t,n,r,i,o,a,s,l,d,f,p,m=(0,c.c)(22),{comlink:g,children:y,elements:v}=e;m[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Map,m[0]=t):t=m[0];let[b,x]=(0,h.useState)(t),[w,S]=(0,h.useState)(null);m[1]!==g?(n=()=>{if(!g)return;let e=async function(e){if(g)try{let t=await g.fetch("visual-editing/schema",void 0,{signal:e,suppressWarnings:!0});S(t.schema)}catch{}},t=new AbortController,n=g.onStatus(()=>{e(t.signal)},"connected");return()=>{t.abort(),n()}},r=[g],m[1]=g,m[2]=n,m[3]=r):(n=m[2],r=m[3]),(0,h.useEffect)(n,r),m[4]===Symbol.for("react.memo_cache_sentinel")?(i=[],m[4]=i):i=m[4];let k=(0,h.useRef)(i),E=(0,h.useDeferredValue)(v);m[5]!==E?(o=E.reduce((e,t)=>{let{sanity:n}=t;if(!("id"in n)||!n.path.includes("[_key=="))return e;let r=n.path.split(".").toReversed().reduce((e,t)=>e.length?[t,...e]:t.includes("[_key==")?[t]:[],[]).join(".");return e.find(e=>e.id===n.id&&e.path===r)||e.push({id:n.id,path:r}),e},[]),m[5]=E,m[6]=o):o=m[6];let j=o,C=(0,h.useRef)(null);m[7]!==g||m[8]!==j?(a=()=>{if(!j.length||!g)return;let e=async(e,t)=>{let n=k.current;try{k.current=e;let n=await g.fetch("visual-editing/schema-union-types",{paths:e},{signal:t,suppressWarnings:!0});if(t.aborted)return;x(n.types),C.current=null}catch{}t.aborted&&(k.current=n)};j.some(e=>!k.current.find(t=>{let{id:n,path:r}=t;return n===e.id&&r===e.path}))&&(C.current?.abort(),C.current=new AbortController,e(j,C.current.signal))},s=[g,j],m[7]=g,m[8]=j,m[9]=a,m[10]=s):(a=m[9],s=m[10]),(0,h.useEffect)(a,s),m[11]!==w?(l=(e,t)=>{if(!w||"string"!=typeof e&&(!("path"in e)||!Array.isArray(w)))return;let n="string"==typeof e?e:e.type;return w.filter("document"===(t||"document")?a7:se).find(e=>e.name===n)},m[11]=w,m[12]=l):l=m[12];let A=l;m[13]!==A||m[14]!==b?(d=e=>{if(!("path"in e))return{field:void 0,parent:void 0};let t=A(e);if(!t)return{field:void 0,parent:void 0};let n=e.path.split(".").flatMap(sn);try{return function t(n,r,i,o){let a=void 0===o?[]:o;if(!n)return{field:void 0,parent:void 0};let[s,...l]=r;if("fields"in n){let e=n.fields[s];if(!e&&"rest"in n)return t(n.rest,r,n,a);if(!l.length)return{field:e,parent:i};if(!e)throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...a,...r].join(".")}"`);return t(e.value,l,n,[...a,s])}if("array"===n.type)return t(n.of,r,n,a);if("arrayItem"===n.type)return l.length?t(n.value,l,n,[...a,s]):{field:n,parent:i};if("union"===n.type){let r=s.startsWith("[_key==")?b?.get(e.id)?.get([a.join("."),s].filter(Boolean).join("")):s;return t(n.of.find(e=>"unionOption"===e.type?e.name===r:e),l,n,[...a,s])}if("unionOption"===n.type)return s?t(n.value,r,n,a):{field:n,parent:i};if("inline"===n.type)return t(A(n.name,"type").value,r,n,a);throw Error(`[@sanity/visual-editing] No field could be resolved at path: "${[...a,...r].join(".")}"`)}(t,n,void 0)}catch(e){return e instanceof Error&&console.warn(e.message),{field:void 0,parent:void 0}}},m[13]=A,m[14]=b,m[15]=d):d=m[15];let T=d;m[16]!==T||m[17]!==A?(f={getField:T,getType:A},m[16]=T,m[17]=A,m[18]=f):f=m[18];let M=f;return m[19]!==y||m[20]!==M?(p=(0,u.jsx)(aw.Provider,{value:M,children:y}),m[19]=y,m[20]=M,m[21]=p):p=m[21],p};function sn(e){return e.includes("[")?e.split(/(\[.+\])/,2):[e]}let sr=(e=>{let t=e,n=new Set;return{getState:()=>t,setState:e=>
284{t=e(t),n.forEach(e=>e())},subscribe:e=>(n.add(e),()=>n.delete(e))}})({}),si=e=>{let t,n,r,i,o,a,s=(0,c.c)(11),{comlink:l,children:d}=e;s[0]!==l?(t=()=>l?.on("presentation/shared-state",so),n=[l],s[0]=l,s[1]=t,s[2]=n):(t=s[1],n=s[2]),(0,h.useEffect)(t,n),s[3]!==l?(r=()=>{(async function(){let e=await l?.fetch("visual-editing/shared-state",void 0,{suppressWarnings:!0});e&&sr.setState(()=>e.state)})().catch(sa)},i=[l],s[3]=l,s[4]=r,s[5]=i):(r=s[4],i=s[5]),(0,h.useEffect)(r,i),s[6]!==l?(o={comlink:l,store:sr},s[6]=l,s[7]=o):o=s[7];let f=o;return s[8]!==d||s[9]!==f?(a=(0,u.jsx)(eJ.Provider,{value:f,children:d}),s[8]=d,s[9]=f,s[10]=a):a=s[10],a};function so(e){"value"in e?sr.setState(t=>({...t,[e.key]:e.value})):sr.setState(t=>Object.fromEntries(Object.entries(t).filter(t=>{let[n]=t;return n!==e.key})))}function sa(e){console.debug(e),console.warn("[@sanity/visual-editing]: Failed to fetch shared state. Check your version of `sanity` is up-to-date")}let ss=e=>{let t,n,r=(0,c.c)(5),{children:i,comlink:o}=e;r[0]!==o?(t=(e,t)=>{if(!o)return;let n=tf[e];if(n)o.post("visual-editing/telemetry-log",{event:n,data:t});else throw Error(`Telemetry event: ${e} does not exist`)},r[0]=o,r[1]=t):t=r[1];let a=t;return r[2]!==i||r[3]!==a?(n=(0,u.jsx)(tp.Provider,{value:a,children:i}),r[2]=i,r[3]=a,r[4]=n):n=r[4],n};function sl(){}function su(e){return e.id}function sc(e){return!!e}function sd(e){let{sanity:t}=e;return t&&"id"in t?t:null}let sh=g.I4.div`
285  background-color: transparent;
286  direction: ltr;
287  inset: 0;
288  pointer-events: none;
289  position: absolute;
290  width: 100%;
291  height: 100%;
292  z-index: ${({$zIndex:e})=>e??"9999999"};
293`;function sf(e){let t,n;return t=requestAnimationFrame(()=>{n=requestAnimationFrame(e)}),()=>{void 0!==t&&cancelAnimationFrame(t),void 0!==n&&cancelAnimationFrame(n)}}let sp=e=>{let t,n,r,i,o,a=(0,c.c)(8),{documentIds:s}=e;a[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],a[0]=t):t=a[0];let[l,u]=(0,h.useState)(t);a[1]!==s?(n=()=>{(0,h.startTransition)(()=>u(e=>{let t=Array.from(new Set(s));return e.length===t.length&&e.reduce(sT,t)?.length===0?e:t}))},r=[s],a[1]=s,a[2]=n,a[3]=r):(n=a[2],r=a[3]),(0,h.useEffect)(n,r);let d=H();return a[4]!==d||a[5]!==l?(i=()=>{for(let e of l)d.send({type:"observe",documentId:(0,p.T4)(e)}),d.send({type:"observe",documentId:(0,p.IM)(e)});return()=>{for(let e of l)d.send({type:"unobserve",documentId:(0,p.T4)(e)}),d.send({type:"unobserve",documentId:(0,p.IM)(e)})}},o=[d,l],a[4]=d,a[5]=l,a[6]=i,a[7]=o):(i=a[6],o=a[7]),(0,h.useEffect)(i,o),null},sm=e=>{let t,n,r,i=(0,c.c)(12),{comlink:o,dispatch:a,inFrame:s,inPopUp:l,onDrag:u,overlayEnabled:d,rootElement:f}=e,{dispatchDragEndEvent:m}=function(){let e,t,n,r=(0,c.c)(4),{getDocument:i}=Z();return r[0]!==i?(e=()=>{let e=e=>{let{insertPosition:t,target:n,preventInsertDefault:r}=e.detail;if(r)return;let o=function(e){if(e){let{top:t,right:n,bottom:r,left:i}=e;if(i||t)return{node:(i??t).sanity,position:"after"};if(n||r)return{node:(n??r).sanity,position:"before"}}}(t);if(o){let e=i(n.id),{node:t,position:r}=o,{key:a,hasExplicitKey:s}=ee(n),{path:l,key:u}=ee(t);l&&u&&u!==a&&e.patch(async e=>{let{getSnapshot:t}=e,i=B(await t(),n.path);return s?[_(l,P({_key:a})),_(l,T(i,r,{_key:u}))]:[_(l,P(~~a)),_(l,T(i,r,u>a?~~u-1:~~u))]})}};return window.addEventListener("sanity/dragEnd",e),()=>{window.removeEventListener("sanity/dragEnd",e)}},t=[i],r[0]=i,r[1]=e,r[2]=t):(e=r[1],t=r[2]),(0,h.useEffect)(e,t),r[3]===Symbol.for("react.memo_cache_sentinel")?(n={dispatchDragEndEvent:ax},r[3]=n):n=r[3],n}(),g=tm();i[0]!==o||i[1]!==a||i[2]!==m||i[3]!==u||i[4]!==g?(t=e=>{if("element/click"===e.type){let{sanity:t}=e;o?.post("visual-editing/focus",t),g("Visual Editing Overlay Clicked",null)}else if("overlay/activate"===e.type)o?.post("visual-editing/toggle",{enabled:!0});else if("overlay/deactivate"===e.type)o?.post("visual-editing/toggle",{enabled:!1});else if("overlay/dragEnd"===e.type){let{insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}=e;m({insertPosition:t,target:n,dragGroup:r,flow:i,preventInsertDefault:o}),t&&g("Visual Editing Drag Sequence Completed",null)}else if("overlay/dragUpdateCursorPosition"===e.type)return void u(e.x,e.y);else if("overlay/dragToggleMinimap"===e.type&&!0===e.display)g("Visual Editing Drag Minimap Enabled",null);else if("overlay/setCursor"===e.type){let{element:t,cursor:n}=e;n?t.style.cursor=n:t.style.removeProperty("cursor")}a(e)},i[0]=o,i[1]=a,i[2]=m,i[3]=u,i[4]=g,i[5]=t):t=i[5];let y=function(e,t,n,r){let i,o,a=(0,c.c)(7),s=(0,h.useRef)(void 0),l=q();return a[0]!==e||a[1]!==t||a[2]!==n||a[3]!==r||a[4]!==l?(i=()=>
293{if(e)return s.current=function({handler:e,overlayElement:t,inFrame:n,inPopUp:r,optimisticActorReady:i}){let o=!1,a=new Map,s=new WeakMap,l=new Set,u=new WeakMap,c=new WeakMap,d,h,f,m=!1,g=[],y=()=>g[g.length-1];function v(e,t){e.removeEventListener("click",t.click,{capture:!0}),e.removeEventListener("contextmenu",t.contextmenu,{capture:!0}),e.removeEventListener("mousemove",t.mousemove,{capture:!0}),e.removeEventListener("mousedown",t.mousedown,{capture:!0}),e.removeEventListener("mouseenter",t.mouseenter),e.removeEventListener("mouseleave",t.mouseleave)}function b({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;i.addEventListener("click",r.click,{capture:!0}),i.addEventListener("contextmenu",r.contextmenu,{capture:!0}),i.addEventListener("mousemove",r.mousemove,{once:!0,capture:!0}),i.addEventListener("mousedown",r.mousedown,{capture:!0}),d.observe(o),e({type:"element/activate",id:t})}function x({id:t,elements:n,handlers:r}){let{element:i,measureElement:o}=n;v(i,r),d.unobserve(o),g=g.filter(e=>e!==i),e({type:"element/deactivate",id:t})}function w(t){if(!(!n&&!r||!i))for(let n of g){if(t===n){let n=s.get(t)?.sanity;if(!n||!eG(n))return;if(eZ(t,n,l,s)){let n=t.style.cursor;n&&c.set(t,n),e({type:"overlay/setCursor",element:t,cursor:"move"});continue}}S(n)}}function S(t){let n=c.get(t);e({type:"overlay/setCursor",element:t,cursor:n})}function k(c){for(let d of function e(t){let n=[];function r(e,t,n,r){let i=function(e){if("object"==typeof e&&null!==e)return ed(e);try{let t=JSON.parse(e);return ed(t)}catch{let t=e.split(";").reduce((e,t)=>{let[n,r]=t.split("=");if(!n||t.includes("=")&&!r)return e;switch(n){case"id":e.id=r;break;case"type":e.type=r;break;case"path":e.path=p.C.toString(function(e){let t=[];for(let n of e.split(".")){let e=ea.exec(n);if(e){t.push(e[1],Number(e[2]));continue}let r=es.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}let i=el.exec(n);if(i){t.push(i[1],{_key:i[2]});continue}t.push(n)}return t}(r));break;case"base":e.baseUrl=decodeURIComponent(r);break;case"perspective":e.perspective=r;break;case"tool":e.tool=r;break;case"workspace":e.workspace=r;break;case"projectId":e.projectId=r;break;case"dataset":e.dataset=r}return e},{});if((0,en.is)(eo,t))return t;return}}(t);if(!i)return;let o=function e(t){let{display:n}=window.getComputedStyle(t);if("inline"!==n)return t;let r=t.parentElement;return r?e(r):null}(e);if(o)return{elements:{element:e,measureElement:o},sanity:i,reason:n,preventGrouping:r}}if(t)for(let i of t.childNodes)!function t(i,o){let a=function(t){let{nodeType:n,parentElement:i,textContent:o}=t;if(t.nodeType===Node.ELEMENT_NODE&&t.dataset?.sanityEditTarget!==void 0){let n=eY(e(t).map(e=>"element"===e.type?e.commonSanity:void 0).filter(e=>void 0!==e));if(n)return{reason:"edit-target",elements:{element:t,measureElement:t},sanity:n}}else if(n===Node.TEXT_NODE&&i&&o){let e=eW(o);return e?r(i,e,"stega-text",!0):void 0}else if(t.nodeType===Node.ELEMENT_NODE){if("SCRIPT"===t.tagName||"SANITY-VISUAL-EDITING"===t.tagName)return;if(t.dataset?.sanity)return r(t,t.dataset.sanity,"data-attribute",!!(t.textContent&&eH(t.textContent)));if(t.dataset?.sanityEditInfo)return r(t,t.dataset.sanityEditInfo,"data-attribute",!!(t.textContent&&eH(t.textContent)));if("IMG"===t.tagName){let e=eW(t.alt,!0);return e?r(t,e,"stega-attribute"):void 0}if("TIME"===t.tagName){let e=eW(t.dateTime,!0);return e?r(t,e,"stega-attribute"):void 0}if("SVG"===t.tagName.toUpperCase()){if(!t.ariaLabel)return;let e=eW(t.ariaLabel,!0);return e?r(t,e,"stega-attribute"):void 0}}}(i),s=o;if(i.nodeType===Node.ELEMENT_NODE&&i.dataset?.sanityEditGroup!==void 0&&(s={type:"group",elements:{element:i,measureElement:i},targets:[]},n.push(s)),a){let e={elements:a.elements,sanity:a.sanity,reason:a.reason};s&&!a.preventGrouping?s.targets.push(e):n.push({elements:a.elements,type:"element",targets:[e]})}if(i.nodeType===Node.ELEMENT_NODE&&"IMG"!==i.tagName&&"SCRIPT"!==i.tagName&&"SANITY-VISUAL-EDITING"!==i.tagName)for(let e of i.childNodes)t(e,s)}(i,void 0);return n.map(e=>{if(0===e.targets.length&&"group"===e.type)return{...e,commonSanity:void 0};let t=1===e.targets.length?e.targets[0].sanity:eY(e.targets.map(({s
293anity:e})=>e).filter(e=>void 0!==e))||e.targets[0].sanity;return t?{...e,commonSanity:t}:null}).filter(e=>null!==e)}(c)){if("group"===d.type){for(let e of d.targets){let t=s.get(e.elements.element);t&&"element"===t.type&&E(e.elements.element)}0===d.targets.length&&E(d.elements.element)}if(!d.commonSanity)continue;let{element:c}=d.elements;s.has(c)?function(t){let{element:n}=t.elements,r=s.get(n);r&&(s.set(n,{...r,sanity:t.commonSanity}),e({type:"element/update",elementType:r.type,id:r.id,rect:ek(n),sanity:t.commonSanity,targets:t.targets.map(e=>({sanity:e.sanity,element:e.elements.element}))}))}(d):function({type:c,elements:d,commonSanity:f,targets:p}){let{element:v,measureElement:x}=d,k={click(t){let r=t.target;if(v===y()&&v.contains(r)){n&&(t.preventDefault(),t.stopPropagation());let r=s.get(v)?.sanity;r&&!m&&e({type:"element/click",id:E,sanity:r})}},contextmenu(t){if(!("path"in f)||!n&&!r||!i||!f.path.split(".").pop()?.includes("[_key=="))return;let o=t.target;v===y()&&v.contains(o)&&((n||r)&&(t.preventDefault(),t.stopPropagation()),e({type:"element/contextmenu",id:E,position:{x:t.clientX,y:t.clientY},sanity:f}))},mousedown(t){if(t.preventDefault(),t.currentTarget!==g.at(-1)||v.getAttribute("data-sanity-drag-disable")||!n&&!r||!i)return;let o=s.get(v)?.sanity;if(!o||!eG(o)||!eq(o.path))return;let a=eZ(v,f,l,s);a&&function(e){var t;let{mouseEvent:n,element:r,overlayGroup:i,handler:o,target:a,onSequenceStart:s,onSequenceEnd:l}=e;if(0!==n.button)return;window.focus();let u=i.map(e=>ek(e.elements.element)),c=r.getAttribute("data-sanity-drag-flow")||((t=u).some(e=>t.filter(t=>!ej(e,t)).some(t=>e.y===t.y))?"horizontal":"vertical"),d=r.getAttribute("data-sanity-drag-group"),h=!!r.getAttribute("data-sanity-drag-minimap-disable"),f=!!r.getAttribute("data-sanity-drag-prevent-default"),p=r.getAttribute("data-unstable_sanity-drag-document-height"),m=r.getAttribute("data-unstable_sanity-drag-group-height"),g=null,y=eI(n),v=document.body,{minYScaled:b,scaleFactor:x}=function(e,t){let n=t||eM(e).height,r=(n+=200)>window.innerHeight?window.innerHeight/n:1,{min:i}=eM(e.map(e=>eT(e,r,{x:window.innerWidth/2,y:0})));return{scaleFactor:r,minYScaled:i-100*r}}(u,m?~~m:null),w=!1,S=!1,k=!0;eL||(eF={body:{overflow:window.getComputedStyle(document.body).overflow,height:window.getComputedStyle(document.body).height},documentElement:{overflow:window.getComputedStyle(document.documentElement).overflow,height:window.getComputedStyle(document.documentElement).height}},eN=p?~~p:document.documentElement.scrollHeight);let E=setInterval(()=>{u=i.map(e=>ek(e.elements.element))},150),j=()=>{x>=1||(o({type:"overlay/dragUpdateSkeleton",skeleton:eR(ez,r,x)}),o({type:"overlay/dragToggleMinimapPrompt",display:!1}),eO(v,x,b,o,150).then(()=>{setTimeout(()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:e$(u)})},300)}))},C=e=>{Math.abs(e.deltaY)>=10&&x<1&&!eL&&!S&&!h&&k&&(o({type:"overlay/dragToggleMinimapPrompt",display:!0}),S=!0),!e.shiftKey||eL||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eL=!0,setTimeout(()=>{j()},50))},A=e=>{if(e.preventDefault(),eV=function(e){let t=document.body,n=window.getComputedStyle(t).transform;if("none"===n)return{x:e.x,y:e.y};let r=new DOMMatrix(n).inverse(),i=new DOMPoint(e.x,e.y).matrixTransform(r);return{x:i.x,y:i.y}}(ez=eI(e)),4>Math.abs(eC(ez,y)))return;if(!w){let e=e$(u),t=eR(ez,r,1);o({type:"overlay/dragStart",flow:c}),o({type:"overlay/dragUpdateSkeleton",skeleton:t}),o({type:"overlay/dragUpdateGroupRect",groupRect:e}),w=!0,s()}o({type:"overlay/dragUpdateCursorPosition",x:ez.x,y:ez.y}),!e.shiftKey||eL||h||(window.dispatchEvent(new CustomEvent("unstable_sanity/dragApplyMinimap")),eL=!0,setTimeout(()=>{j()},50));let t=function(e,t,n){if("horizontal"===n){let r={x1:e.x,y1:e.y,x2:e.x-1e8,y2:e.y},i={x1:e.x,y1:e.y,x2:e.x+1e8,y2:e.y};return{left:eA(r,t,n),right:eA(i,t,n)}}{let r={x1:e.x,y1:e.y,x2:e.x,y2:e.y-1e8},i={x1:e.x,y1:e.y,x2:e.x,y2:e.y+1e8};return{top:eA(r,t,n),bottom:eA(i,t,n)}}}(ez,u,c);JSON.stringify(g)!==JSON.stringify(t)&&o({type:"overlay/dragUpdateInsertPosition",insertPosition:e_(i,g=t,c)})},T=()=>{k=!1,o({type:"overlay/dragEnd",target:a,insertPosition:g?e_(i,g,c):null,dragGroup:d,flow:c,preventInsertDefault:f}),S&&o({type:"overlay/dragToggleMinimapPrompt",display:!1}),eL||(clearInterval(E),l(),R(),I()),_()},M=e=>{"Shift"===e.key&&eL&&(eL=!1,o({type:"overlay/dragUpdateSkeleton",skeleton:eR(ez,r,1/x)}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eD(eV.y,v,eN,o,150,eF)},50),o({type:"overlay/dragUpdateGroupRect",groupRect:null}),k||(clearInterval(E),_(),R(),I(),l()))},P=()=>{o({type:"overlay/dragUpdateGroupRect",groupRect:null}),window.dispatchEvent(new CustomEvent("unstable_sanity/dragResetMinimap")),setTimeout(()=>{eD(eV.y,v,eN,o,150,eF).then(()=>{eL=!1})},50),clearInterval(E),_(),R(),I(),l()},_=()=>{window.removeEventListener("mousemove",A),window.removeEventListener("wheel",C),window.removeEventListener("mouseup",T)},I=()=>{window.removeEventListener("keyup",M)},R=()=>{window.removeEventListener("blur",P)};window.addEventListener("blur",P),window.addEventListener("keyup",M),window.addEventListener("wheel",C),window.addEventListener("mousemove",A),window.addEventListener("mouseup",T)}({element:v,handler:e,mouseEvent:t,overlayGroup:a,target:o,onSequenceStart:()=>{m=!0},onSequenceEnd:()=>{setTimeout(()=>{m=!1},250)}})},mousemove(e){k.mouseenter(e);let t=e.currentTarget;t&&(t.addEventListener("mouseenter",k.mouseenter),t.addEventListener("mouseleave",k.mouseleave))},mouseenter(){document.querySelector("vercel-live-feedback")&&v.closest("[data-vercel-edit-info]")||v.closest("[data-vercel-edit-target]")||(g.push(v),e({type:"element/mouseenter",id:E,rect:ek(v)}),w(v))},mouseleave(n){function r(){g.pop();let t=y();if(e({type:"element/mouseleave",id:E}),t){w(t);let n=s.get(t);n&&e({type:"element/mouseenter",id:n.id,rect:ek(t)})}S(v)}let{relatedTarget:i}=n,o=eU(i),a=t.contains(o);if(eB(o)&&a)return function e(t){let n=i=>{let{relatedTarget:o}=i;eU(o)?o&&eB(o)&&(t.removeEventListener("mouseleave",n),e(o)):(t.removeEventListener("mouseleave",n),r())};t.addEventListener("mouseleave",n)}(o);r()}},E=eS(),j={type:c,id:E,elements:d,sanity:f,handlers:k};l.add(v),u.set(x,v),a.set(E,v),s.set(v,j),h?.observe(v),e({type:"element/register",elementType:c,id:E,element:v,rect:ek(v),sanity:f,dragDisabled:!!v.getAttribute("data-sanity-drag-disable"),targets:p.map(e=>({sanity:e.sanity,element:e.elements.element}))}),o&&b(j)}(d)}}function E(t){let n=s.get(t);if(n){let{id:r,handlers:i}=n;v(t,i),d.unobserve(t),s.delete(t),l.delete(t),a.delete(r),e({type:"element/unregister",id:r})}}function j(t){let n=s.get(t);n&&e({type:"element/updateRect",id:n.id,rect:ek(t)})}function C(e){if(o)for(let t of e){let{target:e}=t,n=eB(e)&&s.get(e);n&&(t.isIntersecting?b(n):x(n))}}function A(t){let n=eU(t.target);if(n){"capture"===n.dataset.sanityOverlayElement&&(t.preventDefault(),t.stopPropagation());return}g=[],e({type:"overlay/blur"})}function T(){g=[],e({type:"overlay/reset-mouse-state"})}function M(){for(let e of l)j(e)}function P(t){"Escape"===t.key&&(g=[],e({type:"overlay/blur"}))}function _(e){let{target:t}=e;if(!(t===window.document||!eB(t)))for(let e of l)t.contains(e)&&j(e)}function I(){o||(h=new IntersectionObserver(C,{threshold:.3}
293),l.forEach(e=>h.observe(e)),e({type:"overlay/activate"}),o=!0)}function R(){o&&(h?.disconnect(),l.forEach(e=>{let t=s.get(e);t&&x(t)}),e({type:"overlay/deactivate"}),o=!1)}function O(t){let{id:n}=t.detail,r=a.get(n);if(!r)return;let i=s.get(r)?.sanity;i&&e({type:"element/click",id:n,sanity:i})}return window.document.fonts.ready.then(()=>{for(let e of l)j(e)}),window.addEventListener("click",A),window.addEventListener("contextmenu",A),window.addEventListener("sanity-overlay/exclusive-plugin-closed",T),window.addEventListener("sanity-overlay/label-click",O),window.addEventListener("keydown",P),window.addEventListener("resize",M),window.addEventListener("scroll",_,{capture:!0,passive:!0}),d=new ResizeObserver(function(e){for(let t of e){let e=t.target;if(eB(e)){let t=u.get(e);if(!t)return;j(t)}}}),(f=new MutationObserver(function(e){let n=!1;for(let r of e){let{target:e,type:i}=r,o="characterData"===i?e.parentElement:e;if(!(o===t||t.contains(o))&&(n=!0,eB(o))){let e=o.parentElement?.closest("[data-sanity-edit-group]")||null;k({childNodes:[eB(e)?e:o]})}}if(n)for(let e of l)e.isConnected||E(e),s.get(e)?.type!=="group"||e.hasAttribute("data-sanity-edit-group")||E(e)})).observe(document.body,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),k(document.body),I(),{activate:I,deactivate:R,destroy:function(){window.removeEventListener("click",A),window.removeEventListener("contextmenu",A),window.removeEventListener("sanity-overlay/exclusive-plugin-closed",T),window.removeEventListener("sanity-overlay/label-click",O),window.removeEventListener("keydown",P),window.removeEventListener("resize",M),window.removeEventListener("scroll",_),f.disconnect(),d.disconnect(),l.forEach(e=>{E(e)}),a.clear(),l.clear(),g=[],R()}}}({handler:t,overlayElement:e,inFrame:n,inPopUp:r,optimisticActorReady:l}),()=>{s.current?.destroy(),s.current=void 0}},o=[e,t,n,r,l],a[0]=e,a[1]=t,a[2]=n,a[3]=r,a[4]=l,a[5]=i,a[6]=o):(i=a[5],o=a[6]),(0,h.useEffect)(i,o),s}(f,t,s,l);return i[6]!==y.current||i[7]!==d?(n=()=>{d?y.current?.activate():y.current?.deactivate()},i[6]=y.current,i[7]=d,i[8]=n):n=i[8],i[9]!==y||i[10]!==d?(r=[y,d],i[9]=y,i[10]=d,i[11]=r):r=i[11],(0,h.useEffect)(n,r),null};function sg(e){let t,n,r,i,o,a,s,l,d,f,p,g,y,v,b,x,w,S,k,E,j,C,A,T=(0,
293c.c)(77),{comlink:M,comlinkStatus:P,componentResolver:_,inFrame:I,inPopUp:R,zIndex:O}=e,$=(0,m.Xy)();T[0]===Symbol.for("react.memo_cache_sentinel")?(t={contextMenu:null,dragInsertPosition:null,dragShowMinimap:!1,dragShowMinimapPrompt:!1,dragSkeleton:null,elements:[],focusPath:"",isDragging:!1,perspective:"published",wasMaybeCollapsed:!1,dragMinimapTransition:!1,dragGroupRect:null},T[0]=t):t=T[0];let[D,L]=(0,h.useReducer)(a9,t),{contextMenu:V,dragInsertPosition:z,dragShowMinimap:N,dragShowMinimapPrompt:F,dragSkeleton:B,elements:U,isDragging:H,perspective:W,wasMaybeCollapsed:G,dragMinimapTransition:Y,dragGroupRect:X}=D,[K,Z]=(0,h.useState)(null),[J,Q]=(0,h.useState)(!0);T[1]!==M?(n=()=>{let e=[M?.on("presentation/focus",e=>{L({type:"presentation/focus",data:e})}),M?.on("presentation/blur",e=>{L({type:"presentation/blur",data:e})}),M?.on("presentation/toggle-overlay",()=>{Q(sj)})].filter(Boolean);return()=>e.forEach(sE)},r=[M],T[1]=M,T[2]=n,T[3]=r):(n=T[2],r=T[3]),(0,h.useEffect)(n,r),function(e,t){let n,r,i=(0,c.c)(4);i[0]!==e||i[1]!==t?(n=()=>{let n=new AbortController;e?.fetch("visual-editing/fetch-perspective",void 0,{signal:n.signal,suppressWarnings:!0}).then(e=>{t({type:"presentation/perspective",data:e})}).catch(sl);let r=e?.on("presentation/perspective",e=>{t({type:"presentation/perspective",data:e})});return()=>{r?.(),n.abort()}},r=[e,t],i[0]=e,i[1]=t,i[2]=n,i[3]=r):(n=i[2],r=i[3]),(0,h.useEffect)(n,r)}(M,L),function(e,t,n){let r,i,o,a=(0,c.c)(7),s=(0,h.useRef)(void 0);a[0]!==e?(r=(t,n)=>{e?.post("visual-editing/documents",{documents:t,perspective:n})},a[0]=e,a[1]=r):r=a[1];let l=r;a[2]!==t||a[3]!==n||a[4]!==l?(i=()=>{let e=t.map(sd).filter(sc),r=new Set(e.map(su));if(!s.current||!function(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}(r,s.current.nodeIds)||n!==s.current.perspective){let t=Array.from(r).map(t=>{let{type:n,projectId:r,dataset:i}=e.find(e=>e.id===t);return r&&i?{_id:t,_type:n,_projectId:r,_dataset:i}:{_id:t,_type:n}});s.current={nodeIds:r,perspective:n},l(t,n)}},o=[t,n,l],a[2]=t,a[3]=n,a[4]=l,a[5]=i,a[6]=o):(i=a[5],o=a[6]),(0,h.useEffect)(i,o)}(M,U,W),T[4]!==K?(i=(e,t)=>{K&&(K.style.setProperty("--drag-preview-x",`${e}px`),K.style.setProperty("--drag-preview-y",`${t-window.scrollY}px`))},T[4]=K,T[5]=i):i=T[5];let ee=i;T[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{let e=!1,t=t=>{sA(t)&&e&&(e=!1,Q(sS))},n=t=>{var n,r;if(sA(t)){if(t.ctrlKey||t.metaKey||t.shiftKey)return;e||(e=!0,Q(sw))}n=["mod","\\"],r=t,n.every(e=>sC[e]?r[sC[e]]:r.key===e.toUpperCase())&&Q(sx)},r=()=>{e&&(e=!1,Q(sb))};return window.addEventListener("click",sk),window.addEventListener("keydown",n),window.addEventListener("keyup",t),window.addEventListener("blur",r),()=>{window.removeEventListener("click",sk),window.removeEventListener("keydown",n),window.removeEventListener("keyup",t),window.removeEventListener("blur",r)}},a=[Q],T[6]=o,T[7]=a):(o=T[6],a=T[7]),(0,h.useEffect)(o,a);let[et,en]=(0,h.useState)(!1),[er,ei]=(0,h.useState)(!1),eo=(0,h.useRef)(void 0);T[8]!==J?(s=()=>{if(J)return sf(()=>{en(!0),sf(()=>{ei(!0),eo.current=setTimeout(()=>{ei(!1),en(!1)},1500)})});eo.current&&(clearTimeout(eo.current),(0,h.startTransition)(()=>{en(!1),ei(!1)}))},l=[J],T[8]=J,T[9]=s,T[10]=l):(s=T[9],l=T[10]),(0,h.useEffect)(s,l),T[11]!==U?(d=U.flatMap(sv),T[11]=U,T[12]=d):d=T[12];let ea=d;T[13]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{L({type:"overlay/blur"})},T[13]=f):f=T[13];let es=f,el=q(),eu=el?_:void 0,[ec,ed]=(0,h.useState)(!1);!ec&&I&&"connected"===P&&ed(!0);e:{let t;if(H){let e;T[14]===Symbol.for("react.memo_cache_sentinel")?(e=[],T[14]=e):e=T[14],p=e;break e}T[15]!==M||T[16]!==eu||T[17]!==Y||T[18]!==N||T[19]!==U||T[20]!==I||T[21]!==H||T[22]!==el||T[23]!==e.plugins||T[24]!==ec||T[25]!==G?(t=U.filter(sy).map(t=>{let{id:n,element:r,focused:i,hovered:o,rect:a,sanity:s,dragDisabled:l,targets:c,elementType:d}=t,h=!l&&!!r.getAttribute("data-sanity")&&el&&U.some(e=>"id"in e.sanity&&"id"in s&&eK(e.sanity,s)&&e.sanity.path!==s.path);return(0,u.jsx)(aU,{comlink:M,componentResolver:eu,plugins:e.plugins,element:r,enableScrollIntoView:!H&&!Y&&!N,id:n,focused:i,hovered:o,node:s,rect:a,showActions:!ec,draggable:h,isDragging:H||Y,wasMaybeCollapsed:i&&G,targets:c,elementType:d,inFrame:I},n)}),T[15]=M,T[16]=eu,T[17]=Y,T[18]=N,T[19]=U,T[20]=I,T[21]=H,T[22]=el,T[23]=e.plugins,T[24]=ec,T[25]=G,T[26]=t):t=T[26],p=t}let eh=p,ef=$?"dark":"light",ep=er?"":void 0,em=et?"":void 0;return T[27]!==ea||T[28]!==W?(g=(0,u.jsx)(sp,{documentIds:ea,perspective:W}),T[27]=ea,T[28]=W,T[29]=g):g=T[29],T[30]!==M||T[31]!==I||T[32]!==R||T[33]!==J||T[34]!==K||T[35]!==ee?(y=(0,u.jsx)(sm,{comlink:M,dispatch:L,inFrame:I,inPopUp:R,onDrag:ee,overlayEnabled:J,rootElement:K}),T[30]=M,T[31]=I,T[32]=R,T[33]=J,T[34]=K,T[35]=ee,T[36]=y):y=T[36],T[37]!==V?(v=V&&(0,u.jsx)(aI,{...V,onDismiss:es}),T[37]=V,T[38]=v):v=T[38],T[39]!==X||T[40]!==z||T[41]!==Y||T[42]!==F||T[43]!==H?(b=H&&!Y&&(0,u.jsxs)(u.Fragment,{children:[z&&(0,u.jsx)(a0,{dragInsertPosition:z}),F&&(0,u.jsx)(a6,{}),X&&(0,u.jsx)(aQ,{dragGroupRect:X})]}),T[39]=X,T[40]=z,T[41]=Y,T[42]=F,T[43]=H,T[44]=b):b=T[44],T[45]!==B||T[46]!==H?(x=H&&B&&(0,u.jsx)(a2,{skeleton:B}),T[45]=B,T[46]=H,T[47]=x):x=T[47],T[48]!==eh||T[49]!==ep||T[50]!==em||T[51]!==g||T[52]!==y||T[53]!==v||T[54]!==b||T[55]!==x||T[56]!==O?(w=(0,u.jsxs)(sh,{"data-fading-out":ep,"data-overlays":em,ref:Z,$zIndex:O,children:[g,y,v,eh,b,x]}),T[48]=eh,T[49]=ep,T[50]=em,T[51]=g,T[52]=y,T[53]=v,T[54]=b,T[55]=x,T[56]=O,T[57]=w):w=T[57],T[58]!==M||T[59]!==w?(S=(0,u.jsx)(si,{comlink:M,children:w}),T[58]=M,T[59]=w,T[60]=S):S=T[60],T[61]!==M||T[62]!==S?(k=(0,u.jsx)(a8,{comlink:M,children:S}),T[61]=M,T[62]=S,T[63]=k):k=T[63],T[64]!==M||T[65]!==U||T[66]!==k?(E=(0,u.jsx)(st,{comlink:M,elements:U,children:k}),T[64]=M,T[65]=U,T[66]=k,T[67]=E):E=T[67],T[68]!==K||T[69]!==E?(j=(0,u.jsx)(m.XS,{children:(0,u.jsx)(m.GD,{element:K,children:E})}),T[68]=K,T[69]=E,T[70]=j):j=T[70],T[71]!==ef||T[72]!==j?(C=(0,u.jsx)(m.NP,{scheme:ef,theme:m.Qx,tone:"transparent",children:j}),T[71]=ef,T[72]=j,T[73]=C):C=T[73],T[74]!==M||T[75]!==C?(A=(0,u.jsx)(ss,{comlink:M,children:C}),T[74]=M,T[75]=C,T[76]=A):A=T[76],A}function sy(e){return e.activated||e.focused}function sv(e){return"id"in e.sanity?[e.sanity.id]:[]}
293function sb(e){return!e}function sx(e){return!e}function sw(e){return!e}function sS(e){return!e}function sk(e){let t=e.target;if(((0,m.nY)(t)||(0,m.sb)(t)&&t.closest("a"))&&e.altKey){e.preventDefault(),e.stopPropagation();let t=new MouseEvent(e.type,{...e,altKey:!1,bubbles:!0,cancelable:!0});e.target?.dispatchEvent(t)}}function sE(e){return e()}function sj(e){return!e}let sC={alt:"altKey",ctrl:"ctrlKey",mod:"u">typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function sA(e){return"Alt"===e.key}function sT(e,t){return e.filter(e=>e!==t)}let sM=e=>{let t,n,r=(0,c.c)(4),{comlink:i,refresh:o}=e,a=(0,h.useRef)(0),s=(0,h.useRef)(0);return r[0]!==i||r[1]!==o?(t=()=>i.on("presentation/refresh",e=>{if("manual"===e.source){clearTimeout(a.current);let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e);let n=!1;a.current=window.setTimeout(()=>{i.post("visual-editing/refreshed",e),n=!0},3e3),t?.finally?.(()=>{n||(clearTimeout(a.current),i.post("visual-editing/refreshed",e))})}else if("mutation"===e.source){clearTimeout(s.current);let t=o(e);if(!1===t)return;i.post("visual-editing/refreshing",e),s.current=window.setTimeout(()=>{let t=o(e);!1!==t&&(i.post("visual-editing/refreshing",e),t?.finally?.(()=>{i.post("visual-editing/refreshed",e)})||i.post("visual-editing/refreshed",e))},1e3),t?.finally?.(()=>{i.post("visual-editing/refreshed",e)})||i.post("visual-editing/refreshed",e)}}),n=[i,o],r[0]=i,r[1]=o,r[2]=t,r[3]=n):(t=r[2],n=r[3]),(0,h.useEffect)(t,n),null};function sP(e){let{data:t,origin:n}=e;t&&"object"==typeof t&&"domain"in t&&"sanity/channels"===t.domain&&"from"in t&&"presentation"===t.from&&"type"in t&&"presentation/status"===t.type&&window.parent.postMessage({domain:"sanity/channels",type:"visual-editing/status",data:{origin:location.origin}},n)}function s_(){console.warn("[@sanity/visual-editing] Package version mismatch detected: Please update your Sanity studio to prevent potential compatibility issues.")}function sI(){}let sR=e=>{let t,n,r,i,o,a,s,l,p=(0,c.c)(23),{components:m,plugins:g,history:y,portal:v,refresh:b,zIndex:x}=e,w=void 0===v||v,[S,k]=(0,h.useState)(null),[E,j]=(0,h.useState)(null);p[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{(0,h.startTransition)(()=>{k((0,d.Fk)()),j((0,d.v$)())})},n=[],p[0]=t,p[1]=n):(t=p[0],n=p[1]),(0,h.useEffect)(t,n);let[C,T]=(0,h.useState)(null);p[2]!==w?(r=()=>{if(!1===w)return;let e=document.createElement("sanity-visual-editing");return document.documentElement.appendChild(e),(0,h.startTransition)(()=>T(e)),()=>{(0,h.startTransition)(()=>T(null)),document.documentElement.contains(e)&&document.documentElement.removeChild(e)}},i=[w],p[2]=w,p[3]=r,p[4]=i):(r=p[3],i=p[4]),(0,h.useEffect)(r,i);let[M,P]=function(e){let t,n,r,i,o,a=(0,c.c)(9),s=void 0===e||e,[l,u]=(0,h.useState)(),[f,p]=(0,h.useState)("idle");return a[0]!==s?(t=()=>{if(!s)return;let e=(0,nv.RM)({name:"visual-editing",connectTo:"presentation"},(0,nv.Uc)().provide({actors:(0,d.jF)()})),t=e.onStatus(()=>p("connected"),"connected");(0,h.startTransition)(()=>u(e));let n=e.start();return()=>{t(),n(),(0,h.startTransition)(()=>u(void 0))}},n=[s],a[0]=s,a[1]=t,a[2]=n):(t=a[1],n=a[2]),(0,h.useEffect)(t,n),a[3]!==f?(r=()=>{if("connected"===f)return;let e=new AbortController;return window.addEventListener("message",sP,{signal:e.signal}),()=>{e.abort()}},i=[f],a[3]=f,a[4]=r,a[5]=i):(r=a[4],i=a[5]),(0,h.useEffect)(r,i),a[6]!==l||a[7]!==f?(o=[l,f],a[6]=l,a[7]=f,a[8]=o):o=a[8],o}(!0===S||!0===E);!function(e){let t,n,r=(0,c.c)(3);r[0]!==e?(t=()=>{if(!e)return;let t=function(e){let t=new nx.m(1),n=new nw.B;return e.fetch("visual-editing/snapshot-welcome",void 0,{suppressWarnings:!0}).then(e=>{t.next(e.event)}).catch(()=>{}
293),e.on("presentation/snapshot-event",e=>{"reconnect"===e.event.type&&t.next(e.event),"mutation"===e.event.type&&n.next(e.event)}),(0,nS.h)(t,n)}(e),n=ay.provide({actors:{documentMutatorMachine:(e=>{let t=(0,I.Sx)(async({input:t,signal:n})=>{let{id:r}=t,{snapshot:i}=await e.fetch("visual-editing/fetch-snapshot",{documentId:r},{signal:n});return i}),n=(0,I.Sx)(async({input:t})=>{let{transactions:n}=t;for(let t of n){let n=A.encodeTransaction(t);return e.post("visual-editing/mutate",n)}});return am.provide({actions:{"send sync event to parent":(0,oQ.e)(({enqueue:e})=>{e.sendParent(({context:e})=>({type:"sync",id:e.id,document:e.remote})),e.emit(({context:e})=>({type:"ready",snapshot:e.local}))})},actors:{"fetch remote snapshot":t,"submit mutations as transactions":n}})})(e)}}),r=(0,nb.c)(n,{input:{client:{withConfig:sI},sharedListener:t}});r.start();let i=new AbortController;return e.fetch("visual-editing/features",void 0,{signal:i.signal,suppressWarnings:!0}).then(e=>{e.features.optimistic&&function(e){for(let t of(O=e,$))t()}(r)}).catch(s_),()=>{r.stop(),i.abort()}},n=[e],r[0]=e,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,h.useEffect)(t,n)}("connected"===P?M:void 0),p[5]!==M||p[6]!==P||p[7]!==m||p[8]!==S||p[9]!==E||p[10]!==g||p[11]!==x?(o=null!==S&&null!==E&&(0,u.jsx)(sg,{comlink:M,comlinkStatus:P,componentResolver:m,plugins:g,inFrame:S,inPopUp:E,zIndex:x}),p[5]=M,p[6]=P,p[7]=m,p[8]=S,p[9]=E,p[10]=g,p[11]=x,p[12]=o):o=p[12],p[13]!==M||p[14]!==y||p[15]!==b?(a=M&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(av,{comlink:M,history:y}),(0,u.jsx)(ab,{comlink:M}),b&&(0,u.jsx)(sM,{comlink:M,refresh:b})]}),p[13]=M,p[14]=y,p[15]=b,p[16]=a):a=p[16],p[17]!==o||p[18]!==a?(s=(0,u.jsxs)(u.Fragment,{children:[o,a]}),p[17]=o,p[18]=a,p[19]=s):s=p[19];let _=s;return!1!==w&&C?(p[20]!==_||p[21]!==C?(l=(0,f.createPortal)(_,C),p[20]=_,p[21]=C,p[22]=l):l=p[22],l):_};sR.displayName="VisualEditing";var sO=n(27541),s$=n(51850);function sD(e){let t=e.indexOf("#"),n=e.indexOf("?"),r=n>-1&&(t<0||n<t);return r||t>-1?{pathname:e.substring(0,r?n:t),query:r?e.substring(n,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}function sL(e,t){if(!function(e,t){if("string"!=typeof e)return!1;let{pathname:n}=sD(e);return n===t||n.startsWith(`${t}/`)}(e,t))return e;let n=e.slice(t.length);return n.startsWith("/")?n:`/${n}`}function sV(e){let{basePath:t="",plugins:n,components:r,refresh:i,trailingSlash:o=!1,zIndex:a}=e,s=(0,sO.useRouter)(),l=(0,h.useRef)(s),[c,d]=(0,h.useState)();(0,h.useEffect)(()=>{l.current=s},[s]);let f=(0,h.useMemo)(()=>({subscribe:e=>(d(()=>e),()=>d(void 0)),update:e=>{switch(e.type){case"push":return l.current.push(sL(e.url,t));case"pop":return l.current.back();case"replace":return l.current.replace(sL(e.url,t));default:throw Error(`Unknown update type: ${e.type}`)}}}),[t]),p=(0,sO.usePathname)(),m=(0,sO.useSearchParams)();(0,h.useEffect)(()=>{c&&c({type:"push",url:((e,t)=>{let{pathname:n,query:r,hash:i}=sD(e);return t?n.endsWith("/")?`${n}${r}${i}`:`${n}/${r}${i}`:`${n.replace(/\/$/,"")||"/"}${r}${i}`})(function(e,t){if(!e.startsWith("/")||!t)return e;if("/"===e&&t)return t;let{pathname:n,query:r,hash:i}=sD(e);return`${t}${n}${r}${i}`}(`${p}${m?.size?`?${m}`:""}`,t),o)})},[t,c,p,m,o]);let g=(0,h.useCallback)(e=>{if(i)return i(e);switch(e.source){case"manual":return e.livePreviewEnabled?(console.debug("Live preview is setup, calling router.refresh() to refresh the server components without refetching cached data"),l.current.refresh(),Promise.resolve()):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),(0,s$.q)());case"mutation":return e.livePreviewEnabled?(console.debug("Live preview is setup, mutation is skipped assuming its handled by the live preview"),!1):(console.debug("No loaders in live mode detected, or preview kit setup, revalidating root layout"),(0,s$.q)());default:throw Error("Unknown refresh source",{cause:e})}},[i]);return(0,u.jsx)(sR,{plugins:n,components:r,history:f,portal:!0,refresh:g,zIndex:a})}},74238:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case c:case d:case p:return e;default:switch(e=e&&e.$$typeof){case l:case u:case f:case h:case s:return e;default:return t}}case r:return t}}}t.ContextConsumer=s,t.ContextProvider=l,t.Element=n,t.ForwardRef=u,t.Fragment=i,t.Lazy=f,t.Memo=h,t.Portal=r,t.Profiler=a,t.StrictMode=o,t.Suspense=c,t.SuspenseList=d,t.isContextConsumer=function(e){return g(e)===s},t.isContextProvider=function(e){return g(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return g(e)===u},t.isFragment=function(e){return g(e)===i},t.isLazy=function(e){return g(e)===f},t.isMemo=function(e){return g(e)===h},t.isPortal=function(e){return g(e)===r},t.isProfiler=function(e){return g(e)===a},t.isStrictMode=function(e){return g(e)===o},t.isSuspense=function(e){return g(e)===c},t.isSuspenseList=function(e){return g(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===o||e===c||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===h||e.$$typeof===l||e.$$typeof===s||e.$$typeof===u||e.$$typeof===m||void 0!==e.getModuleId)||!1},t.typeOf=g},74607:(e,t,n)=>{"use strict";var r,i,o=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of l(t))c.call(e,i)||i===n||a(e,i,{get:()=>t[i],enumerable:!(r=s(t,i))||r.enumerable});return e},h={};((e,t)=>
293{for(var n in t)a(e,n,{get:t[n],enumerable:!0})})(h,{$dispatcherGuard:()=>E,$makeReadOnly:()=>C,$reset:()=>j,$structuralCheck:()=>_,c:()=>b,clearRenderCounterRegistry:()=>T,renderCounterRegistry:()=>A,useRenderCounter:()=>M}),e.exports=d(a({},"__esModule",{value:!0}),h);var f=((e,t,n)=>(n=null!=e?o(u(e)):{},d(!t&&e&&e.__esModule?n:a(n,"default",{value:e,enumerable:!0}),e)))(n(7620)),{useRef:p,useEffect:m,isValidElement:g}=f,y=null!=(r=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?r:f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.memo_cache_sentinel"),b="function"==typeof(null==(i=f.__COMPILER_RUNTIME)?void 0:i.c)?f.__COMPILER_RUNTIME.c:function(e){return f.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=v;return t[v]=!0,t},[])},x={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{x[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var w=null;function S(e){return y.ReactCurrentDispatcher.current=e,y.ReactCurrentDispatcher.current}x.useMemoCache=e=>{if(null!=w)return w.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var k=[];function E(e){let t=y.ReactCurrentDispatcher.current;if(0===e){if(k.push(t),1===k.length&&(w=t),t===x)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");S(x)}else if(1===e){let e=k.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===k.length&&(w=null),S(e)}else if(2===e)k.push(t),S(w);else if(3===e){let e=k.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");S(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function j(e){for(let t=0;t<e.length;t++)e[t]=v}function C(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var A=new Map;function T(){for(let e of A.values())e.forEach(e=>{e.count=0})}function M(e){let t=p(null);null!=t.current&&(t.current.count+=1),m(()=>{if(null==t.current){let n,r={count:0};null==(n=A.get(e))&&(n=new Set,A.set(e,n)),n.add(r),t.current=r}return()=>{null!==t.current&&function(e,t){let n=A.get(e);null!=n&&n.delete(t)}(e,t.current)}})}var P=new Set;function _(e,t,n,r,i,o){function a(e,t,a,s){let l=`${r}:${o} [${i}] ${n}${a} changed from ${e} to ${t} at depth ${s}`;P.has(l)||(P.add(l),console.error(l))}!function e(t,n,r,i){if(!(i>2)){if(t!==n)if(typeof t!=typeof n)a(`type ${typeof t}`,`type ${typeof n}`,r,i);else if("object"==typeof t){let o=Array.isArray(t),s=Array.isArray(n);if(null===t&&null!==n)a("null",`type ${typeof n}`,r,i);else if(null===n)a(`type ${typeof t}`,"null",r,i);else if(t instanceof Map)if(n instanceof Map)if(t.size!==n.size)a(`Map instance with size ${t.size}`,`Map instance with size ${n.size}`,r,i);else for(let[o,s]of t)n.has(o)?e(s,n.get(o),`${r}.get(${o})`,i+1):a(`Map instance with key ${o}`,`Map instance without key ${o}`,r,i);else a("Map instance","other value",r,i);else if(n instanceof Map)a("other value","Map instance",r,i);else if(t instanceof Set)if(n instanceof Set)if(t.size!==n.size)a(`Set instance with size ${t.size}`,`Set instance with size ${n.size}`,r,i);else for(let e of n)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,r,i);else a("Set instance","other value",r,i);else if(n instanceof Set)a("other value","Set instance",r,i);else if(o||s)if(o!==s)a(`type ${o?"array":"object"}`,`type ${s?"array":"object"}`,r,i);else if(t.length!==n.length)a(`array with length ${t.length}`,`array with length ${n.length}`,r,i);else for(let o=0;o<t.length;o++)e(t[o],n[o],`${r}[${o}]`,i+1);else if(g(t)||g(n))g(t)!==g(n)?a(`type ${g(t)?"React element":"object"}`,`type ${g(n)?"React element":"object"}`,r,i):t.type!==n.type?a(`React element of type ${t.type}`,`React element of type ${n.type}`,r,i):e(t.props,n.props,`[props of ${r}]`,i+1);else{for(let e in n)e in t||a(`object without key ${e}`,`object with key ${e}
293`,r,i);for(let o in t)o in n?e(t[o],n[o],`${r}.${o}`,i+1):a(`object with key ${o}`,`object without key ${o}`,r,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(n)?isNaN(t)!==isNaN(n)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,r,i):t!==n&&a(t,n,r,i)}}}(e,t,"",0)}},81685:(e,t,n)=>{"use strict";let r,i,o;n.d(t,{P:()=>oz});let a=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],s=new Set([...a,"pathRotation"]),l=(e,t,n)=>n>t?t:n<e?e:n,u={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},c={...u,transform:e=>l(0,1,e)},d={...u,default:1},h=e=>Math.round(1e5*e)/1e5,f=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,p=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,m=(e,t)=>n=>!!("string"==typeof n&&p.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),g=(e,t,n)=>r=>{if("string"!=typeof r)return r;let[i,o,a,s]=r.match(f);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},y={...u,transform:e=>Math.round(l(0,255,e))},v={test:m("rgb","red"),parse:g("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+y.transform(e)+", "+y.transform(t)+", "+y.transform(n)+", "+h(c.transform(r))+")"},b={test:m("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:v.transform},x=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),w=x("deg"),S=x("%"),k=x("px"),E=x("vh"),j=x("vw"),C={...S,parse:e=>S.parse(e)/100,transform:e=>S.transform(100*e)},A={test:m("hsl","hue"),parse:g("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+S.transform(h(t))+", "+S.transform(h(n))+", "+h(c.transform(r))+")"},T={test:e=>v.test(e)||b.test(e)||A.test(e),parse:e=>v.test(e)?v.parse(e):A.test(e)?A.parse(e):b.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?v.transform(e):A.transform(e),getAnimatableNone:e=>{let t=T.parse(e);return t.alpha=0,T.transform(t)}},M=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,P="number",_="color",I=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function R(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],o=0,a=t.replace(I,e=>(T.test(e)?(r.color.push(o),i.push(_),n.push(T.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(P),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:a,indexes:r,types:i}}function O({split:e,types:t}){let n=e.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=e[o],void 0!==r[o]){let e=t[o];e===P?i+=h(r[o]):e===_?i+=T.transform(r[o]):i+=r[o]}return i}}let $={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(f)?.length||0)+(e.match(M)?.length||0)>0},parse:function(e){return R(e).values},createTransformer:function(e){return O(R(e))},getAnimatableNone:function(e){let t=R(e);return O(t)(t.values.map((e,n)=>{var r;let i;return r=t.split[n],"number"==typeof e?r?.trim().endsWith("/")?e:0:"number"==typeof(i=e)?0:T.test(i)?T.getAnimatableNone(i):i}))}},D=new Set(["brightness","contrast","saturate","opacity"]);function L(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(f)||[];if(!r)return e;let i=n.replace(r,""),o=+!!D.has(t);return r!==n&&(o*=100),t+"("+o+i+")"}let V=/\b([a-z-]*)\(.*?\)/gu,z={...$,getAnimatableNone:e=>{let t=e.match(V);return t?t.map(L).join(" "):e}},N={...$,getAnimatableNone:e=>{let t=$.parse(e);return $.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},F={...u,transform:Math.round},B={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,top:k,right:k,bottom:k,left:k,inset:k,insetBlock:k,insetBlockStart:k,insetBlockEnd:k,insetInline:k,insetInlineStart:k,insetInlineEnd:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,paddingBlock:k,paddingBlockStart:k,paddingBlockEnd:k,paddingInline:k,paddingInlineStart:k,paddingInlineEnd:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,marginBlock:k,marginBlockStart:k,marginBlockEnd:k,marginInline:k,marginInlineStart:k,marginInlineEnd:k,fontSize:k,backgroundPositionX:k,backgroundPositionY:k,rotate:w,pathRotation:w,rotateX:w,rotateY:w,rotateZ:w,scale:d,scaleX:d,scaleY:d,scaleZ:d,skew:w,skewX:w,skewY:w,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:c,originX:C,originY:C,originZ:k,zIndex:F,fillOpacity:c,strokeOpacity:c,numOctaves:F},U={...B,color:T,backgroundColor:T,outlineColor:T,fill:T,stroke:T,borderColor:T,borderTopColor:T,borderRightColor:T,borderBottomColor:T,borderLeftColor:T,filter:z,WebkitFilter:z,mask:N,WebkitMask:N}
293,H=e=>U[e],W=()=>({translate:0,scale:1,origin:0,originPoint:0}),G=()=>({x:W(),y:W()}),Y=()=>({min:0,max:0}),q=()=>({x:Y(),y:Y()}),X=e=>!!(e&&e.getVelocity),K=new Set(["width","height","top","left","right","bottom",...a]),Z=e=>t=>t.test(e),J=[u,k,S,w,j,E,{test:e=>"auto"===e,parse:e=>e}],Q=e=>J.find(Z(e));n(40459);let ee=()=>{},et=()=>{},en=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),er=e=>t=>"string"==typeof t&&t.startsWith(e),ei=er("--"),eo=er("var(--"),ea=e=>!!eo(e)&&es.test(e.split("/*")[0].trim()),es=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function el(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let eu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,ec=e=>180*e/Math.PI,ed=e=>ef(ec(Math.atan2(e[1],e[0]))),eh={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ed,rotateZ:ed,skewX:e=>ec(Math.atan(e[1])),skewY:e=>ec(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ef=e=>((e%=360)<0&&(e+=360),e),ep=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),em=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),eg={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ep,scaleY:em,scale:e=>(ep(e)+em(e))/2,rotateX:e=>ef(ec(Math.atan2(e[6],e[5]))),rotateY:e=>ef(ec(Math.atan2(-e[2],e[0]))),rotateZ:ed,rotate:ed,skewX:e=>ec(Math.atan(e[4])),skewY:e=>ec(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ey(e){return+!!e.includes("scale")}function ev(e,t){let n,r;if(!e||"none"===e)return ey(t);let i=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(i)n=eg,r=i;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=eh,r=t}if(!r)return ey(t);let o=n[t],a=r[1].split(",").map(eb);return"function"==typeof o?o(a):a[o]}function eb(e){return parseFloat(e.trim())}let ex=e=>e===u||e===k,ew=new Set(["x","y","z"]),eS=a.filter(e=>!ew.has(e)),ek={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{let i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{let i=e.max-e.min;return"border-box"===r?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ev(t,"x"),y:(e,{transform:t})=>ev(t,"y")};ek.translateX=ek.x,ek.translateY=ek.y;let eE=e=>e,ej={},eC=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],eA={value:null,addProjectionMetrics:null};function eT(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=eC.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,i=!1,o=!1,a=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){a.has(t)&&(c.schedule(t),e()),l++,t(s)}let c={schedule:(e,t=!1,o=!1)=>{let s=o&&i?n:r;return t&&a.add(e),s.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{if(s=e,i){o=!0;return}i=!0;let a=n;n=r,r=a,n.forEach(u),t&&eA.value&&eA.value.frameloop[t].push(l),l=0,n.clear(),i=!1,o&&(o=!1,c.process(e))}};return c}(o,t?n:void 0),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=a,m=()=>{let o=ej.useManualTiming,a=o?i.timestamp:performance.now();n=!1,o||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:eC.reduce((t,o)=>{let s=a[o];return t[o]=(t,o=!1,a=!1)=>(!n&&(n=!0,r=!0,i.isProcessing||e(m)),s.schedule(t,o,a)),t},{}),cancel:e=>{for(let t=0;t<eC.length;t++)a[eC[t]].cancel(e)},state:i,steps:a}}let{schedule:eM,cancel:eP,state:e_,steps:eI}=eT("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:eE,!0),eR=new Set,eO=!1,e$=!1,eD=!1;function eL(){if(e$){let e=Array.from(eR).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=function(e){let t=[];
293return eS.forEach(n=>{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(+!!n.startsWith("scale")))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}e$=!1,eO=!1,eR.forEach(e=>e.complete(eD)),eR.clear()}function eV(){eR.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(e$=!0)})}class ez{constructor(e,t,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(eR.add(this),eO||(eO=!0,eM.read(eV),eM.resolveKeyframes(eL))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){let i=r?.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){let r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),eR.delete(this)}cancel(){"scheduled"===this.state&&(eR.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let eN=e=>/^0[^.\s]+$/u.test(e),eF=new Set([z,N]);function eB(e,t){let n=H(e);return eF.has(n)||(n=$),n.getAnimatableNone?n.getAnimatableNone(t):void 0}let eU=new Set(["auto","none","0"]);class eH extends ez{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&ea(r=r.trim())){let i=function e(t,n,r=1){et(r<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[i,o]=function(e){let t=eu.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}(t);if(!i)return;let a=window.getComputedStyle(n).getPropertyValue(i);if(a){let e=a.trim();return en(e)?parseFloat(e):e}return ea(o)?e(o,n,r+1):o}(r,t.current);void 0!==i&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!K.has(n)||2!==e.length)return;let[r,i]=e,o=Q(r),a=Q(i);if(el(r)!==el(i)&&ek[n]){this.needsMeasurement=!0;return}if(o!==a)if(ex(o)&&ex(a))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else ek[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++){var r;(null===e[t]||("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||eN(r)))&&n.push(t)}n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){let t=e[i];"string"==typeof t&&!eU.has(t)&&R(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=eB(n,r)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ek[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,o=n[i];n[i]=ek[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEac
293h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}let eW=e=>1e3*e;function eG(e,t){-1===e.indexOf(t)&&e.push(t)}function eY(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class eq{constructor(){this.subscriptions=[]}add(e){return eG(this.subscriptions,e),()=>eY(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function eX(e,t,n){t.startsWith("--")?e.style.setProperty(t,n):e.style[t]=n}function eK(e){let t;return()=>(void 0===t&&(t=e()),t)}let eZ={};function eJ(e,t){let n=eK(e);return()=>eZ[t]??n()}let eQ=eJ(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),e0=e=>null!==e;function e1(e,{repeat:t,repeatType:n="loop"},r,i=1){let o=e.filter(e0),a=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return a&&void 0!==r?r:o[a]}class e2{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let e5={layout:0,mainThread:0,waapi:0},e3=e=>Array.isArray(e)&&"number"==typeof e[0],e4=eJ(()=>{try{document.createElement("div").animate({opacity:0}
293,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),e6=(e,t,n=10)=>{let r="",i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(1e4*e(t/(i-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},e9=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,e8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:e9([0,.65,.55,1]),circOut:e9([.55,0,1,.45]),backIn:e9([.31,.01,.66,-.59]),backOut:e9([.33,1.53,.69,.99])};function e7(e){return"function"==typeof e&&"applyToOptions"in e}class te extends e2{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,et("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:e,...t}){return e7(e)&&e4()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?e4()?e6(t,n):"ease-out":e3(t)?e9(t):Array.isArray(t)?t.map(t=>e(t,n)||e8.easeOut):e8[t]}(s,i);Array.isArray(d)&&(c.easing=d),eA.value&&e5.waapi++;let h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};u&&(h.pseudoElement=u);let f=e.animate(c,h);return eA.value&&f.finished.finally(()=>{e5.waapi--}),f}(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=e1(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(e),eX(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=eW(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&eQ())?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),eE):r(this)}}let tt=new Set(["opacity","clipPath","filter","transform"]),{schedule:tn}=eT(queueMicrotask,!1);function tr(){r=void 0}let ti={now:()=>(void 0===r&&ti.set(e_.isProcessing||ej.useManualTiming?e_.timestamp:performance.now()),r),set:e=>{r=e,queueMicrotask(tr)}},to=(e,t)=>t?1e3/t*e:0,ta={current:void 0};class ts{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=ti.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=ti.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new eq);let n=this.events[e].add(t);return"change"===e?()=>{n(),eM.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}
293setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return ta.current&&ta.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=ti.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return to(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function tl(e,t){return new ts(e,t)}let tu=[...J,T,$],tc=new WeakMap;function td(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function th(e){return"string"==typeof e||Array.isArray(e)}let tf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tp=["initial",...tf];function tm(e){return td(e.animate)||tp.some(t=>th(e[t]))}function tg(e){return!!(tm(e)||e.variants)}let ty={current:null},tv={current:!1},tb="undefined"!=typeof window;function tx(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function tw(e,t,n,r){if("function"==typeof t){let[i,o]=tx(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[i,o]=tx(r);t=t(void 0!==n?n:e.custom,i,o)}return t}let tS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tk={};class tE{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ez,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=ti.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,eM.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=tm(t),this.isVariantNode=tg(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];void 0!==l[e]&&X(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,tc.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
293h((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(tv.current||function(){if(tv.current=!0,tb)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ty.current=e.matches;e.addEventListener("change",t),t()}else ty.current=!1}(),this.shouldReduceMotion=ty.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),eP(this.notifyUpdate),eP(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let n;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&tt.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:o,duration:a}=t.accelerate,s=new te({element:this.current,name:e,keyframes:r,times:i,ease:o,duration:eW(a)}),l=n(s);this.valueSubscriptions.set(e,()=>{l(),s.cancel()});return}let r=s.has(e);r&&this.onBindTransform&&this.onBindTransform();let i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&eM.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"undefined"!=typeof window&&window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),n&&n()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in tk){let t=tk[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):q()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tS.length;t++){let n=tS[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(let r in t){let i=t[r],o=n[r];if(X(i))e.addValue(r,i);else if(X(o))e.addValue(r,tl(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){let t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,tl(void 0!==t?t:i,{owner:e}))}}for(let r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=tl(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=n){if("string"==typeof n&&(en(n)||eN(n)))n=parseFloat(n);else{let r;r=n,!tu.find(Z(r))&&$.test(t)&&(n=eB(e,t))}this.setBaseTarget(e,X(n)?n.get():n)}return X(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let r=tw(this.props,n,this.presenceContext?.custom);r&&(t=r[e])}if(n&&void 0!==t)return t;let r=this.getBaseTargetFromProps(this.props,e);return void 0===r||X(r)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new eq),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){tn.render(this.render)}}class tj extends tE{constructor(){super(...arguments),this.KeyframeResolver=eH}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;X(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function tC(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let tA=(e,t)=>
293t&&"number"==typeof e?t.transform(e):e,tT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tM=a.length;function tP(e,t,n){let{style:r,vars:i,transformOrigin:o}=e,l=!1,u=!1;for(let e in t){let n=t[e];if(s.has(e)){l=!0;continue}if(ei(e)){i[e]=n;continue}{let t=tA(n,B[e]);e.startsWith("origin")?(u=!0,o[e]=t):r[e]=t}}if(!t.transform&&(l||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<tM;o++){let s=a[o],l=e[s];if(void 0===l)continue;let u=!0;if("number"==typeof l)u=l===+!!s.startsWith("scale");else{let e=parseFloat(l);u=s.startsWith("scale")?1===e:0===e}if(!u||n){let e=tA(l,B[s]);if(!u){i=!1;let t=tT[s]||s;r+=`${t}(${e}) `}n&&(t[s]=e)}}let o=e.pathRotation;return o&&(i=!1,r+=`rotate(${tA(o,B.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),u){let{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}let t_={offset:"stroke-dashoffset",array:"stroke-dasharray"},tI={offset:"strokeDashoffset",array:"strokeDasharray"},tR=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tO(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s},l,u,c){if(tP(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;for(let e of(d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),tR))void 0!==d[e]&&(h[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==i&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;let o=i?t_:tI;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}(d,i,o,a,!1)}let t$=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),tD=e=>"string"==typeof e&&"svg"===e.toLowerCase();function tL(e,{style:t,vars:n},r,i){let o,a=e.style;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function tV(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let tz={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!k.test(e))return e;else e=parseFloat(e);let n=tV(e,t.target.x),r=tV(e,t.target.y);return`${n}% ${r}%`}},tN=(e,t,n)=>e+(t-e)*n,tF={borderRadius:{...tz,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tz,borderTopRightRadius:tz,borderBottomLeftRadius:tz,borderBottomRightRadius:tz,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=$.parse(e);if(r.length>5)return e;let i=$.createTransformer(e),o=+("number"!=typeof r[0]),a=n.x.scale*t.x,s=n.y.scale*t.y;r[0+o]/=a,r[1+o]/=s;let l=tN(a,s,.5);return"number"==typeof r[2+o]&&(r[2+o]/=l),"number"==typeof r[3+o]&&(r[3+o]/=l),i(r)}}};function tB(e,{layout:t,layoutId:n}){return s.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!tF[e]||"opacity"===e)}function tU(e,t,n){let r=e.style,i=t?.style,o={};if(!r)return o;for(let t in r)(X(r[t])||i&&X(i[t])||tB(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(o[t]=r[t]);return o}function tH(e,t,n){let r=tU(e,t,n);for(let n in e)(X(e[n])||X(t[n]))&&(r[-1!==a.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}class tW extends tj{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=q}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(s.has(t)){let e=H(t);return e&&e.default||0}return t=t$.has(t)?t:tC(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return tH(e,t,n)}
293build(e,t,n){tO(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){for(let n in tL(e,t,void 0,r),t.attrs)e.setAttribute(t$.has(n)?n:tC(n),t.attrs[n])}mount(e){this.isSVGTag=tD(e.tagName),super.mount(e)}}function tG({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function tY(e){return void 0===e||1===e}function tq({scale:e,scaleX:t,scaleY:n}){return!tY(e)||!tY(t)||!tY(n)}function tX(e){return tq(e)||tK(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function tK(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function tZ(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function tJ(e,t=0,n=1,r,i){e.min=tZ(e.min,t,n,r,i),e.max=tZ(e.max,t,n,r,i)}function tQ(e,{x:t,y:n}){tJ(e.x,t.translate,t.scale,t.originPoint),tJ(e.y,n.translate,n.scale,n.originPoint)}function t0(e,t){e.min+=t,e.max+=t}function t1(e,t,n,r,i=.5){let o=tN(e.min,e.max,i);tJ(e,t,n,o,r)}function t2(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function t5(e,t,n){let r=n??e;t1(e.x,t2(t.x,r.x),t.scaleX,t.scale,t.originX),t1(e.y,t2(t.y,r.y),t.scaleY,t.scale,t.originY)}function t3(e,t){return tG(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}class t4 extends tj{constructor(){super(...arguments),this.type="html",this.renderInstance=tL}readValueFromInstance(e,t){if(s.has(t))return this.projection?.isProjecting?ey(t):((e,t)=>{let{transform:n="none"}=getComputedStyle(e);return ev(n,t)})(e,t);{let n=window.getComputedStyle(e),r=(ei(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return t3(e,t)}build(e,t,n){tP(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return tU(e,t,n)}}var t6=n(7620);let t9=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function t8(e){if("string"!=typeof e||e.includes("-"));else if(t9.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}var t7=n(54568),ne=n(95971);let nt=(0,t6.createContext)({strict:!1});var nn=n(39070);let nr=(0,t6.createContext)({});function ni(e){return Array.isArray(e)?e.join(" "):e}let no=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function na(e,t,n){for(let r in t)X(t[r])||tB(r,n)||(e[r]=t[r])}let ns=()=>({...no(),attrs:{}}),nl=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function nu(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||nl.has(e)}let nc=e=>!nu(e);try{!function(e){"function"==typeof e&&(nc=t=>t.startsWith("on")?!nu(t):e(t))}(require("@emotion/is-prop-valid").default)}catch{}function nd(e){return X(e)?e.get():e}var nh=n(42015),nf=n(23847);let np=e=>(t,n)=>{let r=(0,t6.useContext)(nr),i=(0,t6.useContext)(nh.t),o=()=>(function(e,t,n,r){let{scrapeMotionValuesFromProps:i,createRenderState:o}=e;return{latestValues:function(e,t,n,r){let i={},o=r(e,{});for(let e in o)i[e]=nd(o[e]);let{initial:a,animate:s}=e,l=tm(e),u=tg(e);t&&u&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial,d=(c=c||!1===a)?s:a;if(d&&"boolean"!=typeof d&&!td(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=tw(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}(t,n,r,i),renderState:o()}})(e,t,r,i);return n?o():(0,nf.M)(o)},nm=np({scrapeMotionValuesFromProps:tU,createRenderState:no}),ng=np({scrapeMotionValuesFromProps:tH,createRenderState:ns}),ny={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},nv=!1;function nb(){return!function(){if(nv)return;let e={};for(let t in ny)e[t]={isEnabled:e=>ny[t].some(t=>!!e[t])};tk=e,nv=!0}(),tk}let nx=Symbol.for("motionComponentSymbol"),nw="data-"+tC("framerAppearId"),nS=(0,t6.createContext)({});function nk(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}var nE=n(48683);function nj(e){var t,n;let{forwardMotionProps:r=!1,type:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;o&&function(e){let t=nb();for(let n in e)t[n]={...t[n],...e[n]};tk=t}(o);let s=i?"svg"===i:t8(e),l=s?ng:nm;function u(t,n){let i,o={...(0,t6.useContext)(nn.Q),...t,layoutId:function(e){let{layoutId:t}=e,n=(0,t6.useContext)(ne.L).id;return n&&void 0!==t?n+"-"+t:t}(t)},{isStatic:u}=o,c=function(e){let{initial:t,animate:n}=function(e,t){if(tm(e)){let{initial:t,animate:n}=e;return{initial:!1===t||th(t)?t:void 0,animate:th(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,t6.useContext)(nr));return(0,t6.useMemo)(()=>({initial:t,animate:n}),[ni(t),ni(n)])}(t),d=l(t,u);if(!u&&"undefined"!=typeof window){(0,t6.useContext)(nt).strict;let t=function(e){let{drag:t,layout:n}=nb();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}
293(o);i=t.MeasureLayout,c.visualElement=function(e,t,n,r,i,o){var a,s,l,u;let{visualElement:c}=(0,t6.useContext)(nr),d=(0,t6.useContext)(nt),h=(0,t6.useContext)(nh.t),f=(0,t6.useContext)(nn.Q),p=f.reducedMotion,m=f.skipAnimations,g=(0,t6.useRef)(null),y=(0,t6.useRef)(!1);r=r||d.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:!!h&&!1===h.initial,reducedMotionConfig:p,skipAnimations:m,isSVG:o}),y.current&&g.current&&(g.current.manuallyAnimateOnMount=!0));let v=g.current,b=(0,t6.useContext)(nS);v&&!v.projection&&i&&("html"===v.type||"svg"===v.type)&&function(e,t,n,r){let{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&nk(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}(g.current,n,i,b);let x=(0,t6.useRef)(!1);(0,t6.useInsertionEffect)(()=>{v&&x.current&&v.update(n,h)});let w=n[nw],S=(0,t6.useRef)(!!w&&"undefined"!=typeof window&&!(null==(a=(s=window).MotionHandoffIsComplete)?void 0:a.call(s,w))&&(null==(l=(u=window).MotionHasOptimisedAnimation)?void 0:l.call(u,w)));return(0,nE.E)(()=>{y.current=!0,v&&(x.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),S.current&&v.animationState&&v.animationState.animateChanges())}),(0,t6.useEffect)(()=>{v&&(!S.current&&v.animationState&&v.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var e,t;null==(e=(t=window).MotionHandoffMarkAsComplete)||e.call(t,w)}),S.current=!1),v.enteringChildren=void 0)}),v}(e,d,o,a,t.ProjectionNode,s)}return(0,t7.jsxs)(nr.Provider,{value:c,children:[i&&c.visualElement?(0,t7.jsx)(i,{visualElement:c.visualElement,...o}):null,function(e,t,n,r,i){let{latestValues:o}=r,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6?arguments[6]:void 0,l=((null!=s?s:t8(e))?function(e,t,n,r){let i=(0,t6.useMemo)(()=>{let n=ns();return tO(n,t,tD(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};na(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let n={},r=function(e,t){let n=e.style||{},r={};return na(r,n,e),Object.assign(r,function(e,t){let{transformTemplate:n}=e;return(0,t6.useMemo)(()=>{let e=no();return tP(e,t,n),Object.assign({},e.vars,e.style)},[t])}(e,t)),r}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n})(t,o,i,e),u=function(e,t,n){let r={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&!X(e[i])&&(nc(i)||!0===n&&nu(i)||!t&&!nu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,a),c=e!==t6.Fragment?{...u,...l,ref:n}:{},{children:d}=t,h=(0,t6.useMemo)(()=>X(d)?d.get():d,[d]);return(0,t6.createElement)(e,{...c,children:h})}(e,t,function(e,t,n){let r=(0,t6.useRef)(n);(0,t6.useInsertionEffect)(()=>{r.current=n});let i=(0,t6.useRef)(null);return(0,t6.useCallback)(n=>{if(n){var o;null==(o=e.onMount)||o.call(e,n)}t&&(n?t.mount(n):t.unmount());let a=r.current;if("function"==typeof a)if(n){let e=a(n);"function"==typeof e&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}(d,c.visualElement,n),d,u,r,s)]})}u.displayName="motion.".concat("string"==typeof e?e:"create(".concat(null!=(n=null!=(t=e.displayName)?t:e.name)?n:"",")"));let c=(0,t6.forwardRef)(u);return c[nx]=e,c}class nC{constructor(e){this.isMounted=!1,this.node=e}update(){}}function nA(e,t,n){let r=e.getProps();return tw(r,t,void 0!==n?n:r.custom,e)}function nT(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function nM(e,t){let n=e?.[t]??e?.default??e;return n!==e?nT(n,e):n}let nP=e=>Array.isArray(e);function n_(e,t){let n=e.getValue("willChange");if(X(n)&&n.add)return n.add(t);if(!n&&ej.WillChange){let n=new ej.WillChange("auto");e.addValue("willChange",n),n.add(t)}}let nI=(...e)=>e.reduce((e,t)=>
293n=>t(e(n)));function nR(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function nO(e,t){return n=>n>0?t:e}let n$=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},nD=[b,v,A];function nL(e){let t=nD.find(t=>t.test(e));if(ee(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===A&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,a=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=nR(s,r,e+1/3),o=nR(s,r,e),a=nR(s,r,e-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}(n)),n}let nV=(e,t)=>{let n=nL(e),r=nL(t);if(!n||!r)return nO(e,t);let i={...n};return e=>(i.red=n$(n.red,r.red,e),i.green=n$(n.green,r.green,e),i.blue=n$(n.blue,r.blue,e),i.alpha=tN(n.alpha,r.alpha,e),v.transform(i))},nz=new Set(["none","hidden"]);function nN(e,t){return n=>tN(e,t,n)}function nF(e){return"number"==typeof e?nN:"string"==typeof e?ea(e)?nO:T.test(e)?nV:nH:Array.isArray(e)?nB:"object"==typeof e?T.test(e)?nV:nU:nO}function nB(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>nF(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function nU(e,t){let n={...e,...t},r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=nF(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}let nH=(e,t)=>{let n=$.createTransformer(t),r=R(e),i=R(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?nz.has(e)&&!i.values.length||nz.has(t)&&!r.values.length?function(e,t){return nz.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):nI(nB(function(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let o=t.types[i],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}(r,i),i.values),n):(ee(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),nO(e,t))};function nW(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?tN(e,t,n):nF(e)(e,t)}let nG=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>eM.update(t,e),stop:()=>eP(t),now:()=>e_.isProcessing?e_.timestamp:ti.now()}};function nY(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}let nq={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function nX(e,t){return e*Math.sqrt(1-t*t)}let nK=["duration","bounce"],nZ=["stiffness","damping","mass"];function nJ(e,t){return t.some(t=>void 0!==e[t])}function nQ(e=nq.visualDuration,t=nq.bounce){let n,r,i,o,a,s,u="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:c,restDelta:d}=u,h=u.keyframes[0],f=u.keyframes[u.keyframes.length-1],p={done:!1,value:h},{stiffness:m,damping:g,mass:y,duration:v,velocity:b,isResolvedFromDuration:x}=function(e){let t={velocity:nq.velocity,stiffness:nq.stiffness,damping:nq.damping,mass:nq.mass,isResolvedFromDuration:!1,...e};if(!nJ(e,nZ)&&nJ(e,nK))if(t.velocity=0,e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),r=n*n,i=2*l(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:nq.mass,stiffness:r,damping:i}}else{let n=function({duration:e=nq.duration,bounce:t=nq.bounce,velocity:n=nq.velocity,mass:r=nq.mass}){let i,o;ee(e<=eW(nq.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=l(nq.minDamping,nq.maxDamping,a),e=l(nq.minDuration,nq.maxDuration,e/1e3),a<1?(i=t=>{let r=t*a,i=r*e;return .001-(r-n)/nX(t,a)*Math.exp(-i)},o=t=>{let r=t*a*e,o=Math.pow(a,2)*Math.pow(t,2)*e,s=Math.exp(-r),l=nX(Math.pow(t,2),a);return(r*n+n-o)*s*(-i(t)+.001>0?-1:1)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),o=t=>e*e*(n-t)*Math.exp(-t*e));let s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=eW(e),isNaN(s))return{stiffness:nq.stiffness,damping:nq.damping,duration:e};{let t=Math.pow(s,2)*r;
293return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});(t={...t,...n,mass:nq.mass}).isResolvedFromDuration=!0}return t}({...u,velocity:-((u.velocity||0)/1e3)}),w=b||0,S=g/(2*Math.sqrt(m*y)),k=f-h,E=Math.sqrt(m/y)/1e3,j=5>Math.abs(k);if(c||(c=j?nq.restSpeed.granular:nq.restSpeed.default),d||(d=j?nq.restDelta.granular:nq.restDelta.default),S<1)i=nX(E,S),o=(w+S*E*k)/i,n=e=>f-Math.exp(-S*E*e)*(o*Math.sin(i*e)+k*Math.cos(i*e)),a=S*E*o+k*i,s=S*E*k-o*i,r=e=>Math.exp(-S*E*e)*(a*Math.sin(i*e)+s*Math.cos(i*e));else if(1===S){n=e=>f-Math.exp(-E*e)*(k+(w+E*k)*e);let e=w+E*k;r=t=>Math.exp(-E*t)*(E*e*t-w)}else{let e=E*Math.sqrt(S*S-1);n=t=>{let n=Math.exp(-S*E*t),r=Math.min(e*t,300);return f-n*((w+S*E*k)*Math.sinh(r)+e*k*Math.cosh(r))/e};let t=(w+S*E*k)/e,i=S*E*t-k*e,o=S*E*k-t*e;r=t=>{let n=Math.exp(-S*E*t),r=Math.min(e*t,300);return n*(i*Math.sinh(r)+o*Math.cosh(r))}}let C={calculatedDuration:x&&v||null,velocity:e=>eW(r(e)),next:e=>{if(!x&&S<1){let t=Math.exp(-S*E*e),n=Math.sin(i*e),r=Math.cos(i*e),l=f-t*(o*n+k*r);return p.done=Math.abs(eW(t*(a*n+s*r)))<=c&&Math.abs(f-l)<=d,p.value=p.done?f:l,p}let t=n(e);return x?p.done=e>=v:p.done=Math.abs(eW(r(e)))<=c&&Math.abs(f-t)<=d,p.value=p.done?f:t,p},toString:()=>{let e=Math.min(nY(C),2e4),t=e6(t=>C.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return C}function n0(e,t,n){let r=Math.max(t-5,0);return to(n-e(r),t-r)}function n1({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:c}){let d,h,f=e[0],p={done:!1,value:f},m=n*t,g=f+m,y=void 0===a?g:a(g);y!==g&&(m=y-f);let v=e=>-m*Math.exp(-e/r),b=e=>y+v(e),x=e=>{let t=v(e),n=b(e);p.done=Math.abs(t)<=u,p.value=p.done?y:n},w=e=>{let t;if(t=p.value,void 0!==s&&t<s||void 0!==l&&t>l){var n;d=e,h=nQ({keyframes:[p.value,(n=p.value,void 0===s?l:void 0===l||Math.abs(s-n)<Math.abs(l-n)?s:l)],velocity:n0(b,e,p.value),damping:i,stiffness:o,restDelta:u,restSpeed:c})}};return w(0),{calculatedDuration:null,next:e=>{let t=!1;return(h||void 0!==d||(t=!0,x(e),w(e)),void 0!==d&&e>=d)?h.next(e-d):(t||x(e),p)}}}nQ.applyToOptions=e=>{let t=function(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(nY(r),2e4);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:i/1e3}}(e,100,nQ);return e.ease=t.ease,e.duration=eW(t.duration),e.type="keyframes",e};let n2=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function n5(e,t,n,r){return e===t&&n===r?eE:i=>0===i||1===i?i:n2(function(e,t,n,r,i){let o,a,s=0;do(o=n2(a=t+(n-t)/2,r,i)-e)>0?n=a:t=a;while(Math.abs(o)>1e-7&&++s<12);return a}(i,0,1,e,n),t,r)}let n3=n5(.42,0,1,1),n4=n5(0,0,.58,1),n6=n5(.42,0,.58,1),n9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,n8=e=>t=>1-e(1-t),n7=n5(.33,1.53,.69,.99),re=n8(n7),rt=n9(re),rn=e=>e>=1?1:(e*=2)<1?.5*re(e):.5*(2-Math.pow(2,-10*(e-1))),rr=e=>1-Math.sin(Math.acos(e)),ri=n8(rr),ro=n9(rr),ra={linear:eE,easeIn:n3,easeInOut:n6,easeOut:n4,circIn:rr,circInOut:ro,circOut:ri,backIn:re,backInOut:rt,backOut:n7,anticipate:rn},rs=e=>{if(e3(e)){et(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,r,i]=e;return n5(t,n,r,i)}return"string"==typeof e?(et(void 0!==ra[e],`Invalid easing type '${e}'`,"invalid-easing-type"),ra[e]):e},rl=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1};function ru({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){var i;let o=Array.isArray(r)&&"number"!=typeof r[0]?r.map(rs):rs(r),a={done:!1,value:t[0]},s=function(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;if(et(o===t.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];let a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=function(e,t,n){let r=[],i=n||ej.mix||nW,o=e.length-1;for(let n=0;n<o;n++){let o=i(e[n],e[n+1]);t&&(o=nI(Array.isArray(t)?t[n]||eE:t,o)),r.push(o)}return r}(t,r,i),u=s.length,c=n=>{if(a&&n<e[0])return t[0];let r=0;if(u>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=rl(e[r],e[r+1],n);return s[r](i)};return n?t=>c(l(e[0],e[o-1],t)):c}((i=n&&n.length===t.length?n:function(e){let t=[0];return!function(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=rl(0,t,r);e.push(tN(n,1,i))}}(t,e.length-1),t}(t),i.map(t=>t*e)),t,{ease:Array.isArray(o)?o:t.map(()=>o||n6).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}let rc={decay:n1,inertia:n1,tween:ru,keyframes:ru,spring:nQ};function rd(e){"string"==typeof e.type&&(e.type=rc[e.type])}let rh=e=>e/100;class rf extends e2{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==ti.now()&&this.tick(ti.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},e5.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;rd(e);let{type:t=ru,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e,{keyframes:a}=e,s=t||ru;s!==ru&&"number"!=typeof a[0]&&(this.mixKeyframes=nI(rh,nW(a[0],a[1])),a=[0,100]);let l=s({...e,keyframes:a});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...a].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=nY(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let n,{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:u}=this;if(null===this.startTime)return r.next(0);let{delay:c=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:p,type:m,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let x=this.currentTime,w=r;if(h){let e=Math.min(this.currentTime,i)/s,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,h+1))%2&&("reverse"===f?(n=1-n,p&&(n-=p/s)):"mirror"===f&&(w=a)),x=l(0,1,n)*s}b?(this.delayState.value=d[0],n=this.delayState):n=w.next(x),o&&!b&&(n.value=o(n.value));let{done:S}=n;b||null===u||(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return k&&m!==n1&&(n.value=e1(d,this.options,y,this.speed)),g&&g(n.value),k&&this.finish(),n}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e=eW(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return n0(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(ti.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=nG,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ti.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,e5.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}let rp={anticipate:rn,backInOut:rt,circInOut:ro};class rm extends te{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in rp&&(e.ease=rp[e.ease])}(e),rd(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let a=new rf({...o,autoplay:!1}),s=Math.max(10,ti.now()-this.startTime),u=l(0,10,s-10),c=a.sample(s).value,{name:d}=this.options;i&&d&&eX(i,d,c),t.setWithVelocity(a.sample(Math.max(0,s-u)).value,c,u),a.stop()}}let rg=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&($.test(e)||"0"===e)&&!e.startsWith("url("));function ry(e){e.duration=0,e.type="keyframes"}let rv=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,rb=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),rx=eK(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class rw extends e2{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:
293o="loop",keyframes:a,name:s,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ti.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,name:s,motionValue:l,element:u,...c},h=u?.KeyframeResolver||ez;this.keyframeResolver=new h(a,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){let i;this.keyframeResolver=void 0;let{name:o,type:a,velocity:s,delay:l,isHandoff:u,onUpdate:c}=n;this.resolvedAt=ti.now();let d=!0;!function(e,t,n,r){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],a=rg(i,t),s=rg(o,t);return ee(a===s,`You are trying to animate ${t} from "${i}" to "${o}". "${a?o:i}" is not an animatable value.`,"value-not-animatable"),!!a&&!!s&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||e7(n))&&r)}(e,o,a,s)&&(d=!1,(ej.instantAnimations||!l)&&c?.(e1(e,n,t)),e[0]=e[e.length-1],ry(n),n.repeat=0);let h={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=d&&!u&&function(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return rx()&&n&&(tt.has(n)||rb.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&rv.test(e[t]))return!0;return!1}(s))&&("transform"!==n||!u)&&!l&&!r&&"mirror"!==i&&0!==o&&"inertia"!==a}(h),p=h.motionValue?.owner?.current;if(f)try{i=new rm({...h,element:p})}catch{i=new rf(h)}else i=new rf(h);i.finished.then(()=>{this.notifyFinished()}).catch(eE),this.pendingTimeline&&(this.stopTimeline=i.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=i}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),eD=!0,eV(),eL(),eD=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let rS={type:"spring",stiffness:500,damping:25,restSpeed:10},rk={type:"keyframes",duration:.8},rE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rj=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),rC=(e,t,n,r={},i,o)=>a=>{let l=nM(r,e)||{},u=l.delay||r.delay||0,{elapsed:c=0}=r;c-=eW(u);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:i};!function(e){for(let t in e)if(!rj.has(t))return!0;return!1}(l)&&Object.assign(d,((e,{keyframes:t})=>t.length>2?rk:s.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:rS:rE)(e,d)),d.duration&&(d.duration=eW(d.duration)),d.repeatDelay&&(d.repeatDelay=eW(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let h=!1;if(!1!==d.type&&(0!==d.duration||d.repeatDelay)||(ry(d),0===d.delay&&(h=!0)),(ej.instantAnimations||ej.skipAnimations||i?.shouldSkipAnimations||l.skipAnimations)&&(h=!0,ry(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!o&&void 0!==t.get()){let e=e1(d.keyframes,l);if(void 0!==e)return void eM.update(()=>{d.onUpdate(e),d.onComplete()})}return l.isSync?new rf(d):new rw(d)};function rA(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:a,...s}=t,l=e.getDefaultTransition();o=o?nT(o,l):l;let u=o?.reduceMotion,c=o?.skipAnimations;r&&(o=r);let d=[],h=i&&e.animationState&&e.animationState.getState()[i],f=o?.path;for(let t in f&&f.animateVisualElement(e,s,o,n,d),s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(void 0===i||h&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(h,t))continue;let a={delay:n,...nM(o||{},t)};c&&(a.skipAnimations=!0);let l=r.get();if(void 0!==l&&!r.isAnimating()&&!Array.isArray(i)&&i===l&&!a.velocity){eM.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=e.props[nw];if(n){let e=window.MotionHandoffAnimation(n,t,eM);null!==e&&(a.startTime=e,f=!0)}}n_(e,t);let p=u??e.shouldReduceMotion;r.start(rC(t,r,i,p&&K.has(t)?{type:!1}:a,e,f));let m=r.animation;m&&d.push(m)}if(a){let t=()=>eM.update(()=>{a&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=nA(e,t)||{};for(let t in i={...i,...n}){var o;let n=nP(o=i[t])?o[o.length-1]||0:o;e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,tl(n))}}(e,a)});d.length?Promise.all(d).then(t):t()}return d}function rT(e,t,n,r=0,i=1){let o=Array.from(e).sort((e,t)=>
293e.sortNodePosition(t)).indexOf(t),a=e.size,s=(a-1)*r;return"function"==typeof n?n(o,a):1===i?o*r:s-o*r}function rM(e,t,n={}){let r=nA(e,t,"exit"===n.type?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let o=r?()=>Promise.all(rA(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,i=0,o=1,a){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(rM(l,t,{...a,delay:n+("function"==typeof r?0:r)+rT(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,o,a,s,n)}:()=>Promise.resolve(),{when:s}=i;if(!s)return Promise.all([o(),a(n.delay)]);{let[e,t]="beforeChildren"===s?[o,a]:[a,o];return e().then(()=>t())}}let rP=tp.length;function r_(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}let rI=[...tf].reverse(),rR=tf.length;function rO(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function r$(){return{animate:rO(!0),whileInView:rO(),whileHover:rO(),whileTap:rO(),whileDrag:rO(),whileFocus:rO(),exit:rO()}}class rD extends nC{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t))r=Promise.all(t.map(t=>rM(e,t,n)));else if("string"==typeof t)r=rM(e,t,n);else{let i="function"==typeof t?nA(e,t,n.custom):t;r=Promise.all(rA(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=r$(),r=!0,i=!1,o=t=>(n,r)=>{let i=nA(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(a){let{props:s}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<rP;e++){let r=tp[e],i=t.props[r];(th(i)||!1===i)&&(n[r]=i)}return n}(e.parent)||{},u=[],c=new Set,d={},h=1/0;for(let t=0;t<rR;t++){var f,p;let m=rI[t],g=n[m],y=void 0!==s[m]?s[m]:l[m],v=th(y),b=m===a?g.isActive:null;!1===b&&(h=t);let x=y===l[m]&&y!==s[m]&&v;if(x&&(r||i)&&e.manuallyAnimateOnMount&&(x=!1),g.protectedKeys={...d},!g.isActive&&null===b||!y&&!g.prevProp||td(y)||"boolean"==typeof y)continue;if("exit"===m&&g.isActive&&!0!==b){g.prevResolvedValues&&(d={...d,...g.prevResolvedValues});continue}let w=(f=g.prevProp,"string"==typeof(p=y)?p!==f:!!Array.isArray(p)&&!r_(p,f)),S=w||m===a&&g.isActive&&!x&&v||t>h&&v,k=!1,E=Array.isArray(y)?y:[y],j=E.reduce(o(m),{});!1===b&&(j={});let{prevResolvedValues:C={}}=g,A={...C,...j},T=t=>{S=!0,c.has(t)&&(k=!0,c.delete(t)),g.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in A){let t=j[e],n=C[e];if(!d.hasOwnProperty(e))(nP(t)&&nP(n)?!r_(t,n)||w:t!==n)?null!=t?T(e):c.add(e):void 0!==t&&c.has(e)?T(e):g.protectedKeys[e]=!0}g.prevProp=y,g.prevResolvedValues=j,g.isActive&&(d={...d,...j}),(r||i)&&e.blockInitialAnimation&&(S=!1);let M=x&&w,P=!M||k;S&&P&&u.push(...E.map(t=>{let n={type:m};if("string"==typeof t&&(r||i)&&!M&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=nA(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=rT(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){let t={};if("boolean"!=typeof s.initial){let n=nA(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),u.push({animation:t})}let m=!!u.length;return r&&(!1===s.initial||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,i=!1,m?t(u):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=r$(),i=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();td(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let rL=0;class rV extends nC{constructor(){super(...arguments),this.id=rL++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){let n=nA(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>
293{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}let rz={x:!1,y:!1};function rN(e){return[e("x"),e("y")]}function rF(e){return e.max-e.min}function rB(e,t,n,r=.5){e.origin=r,e.originPoint=tN(t.min,t.max,e.origin),e.scale=rF(n)/rF(t),e.translate=tN(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function rU(e,t,n,r){rB(e.x,t.x,n.x,r?r.originX:void 0),rB(e.y,t.y,n.y,r?r.originY:void 0)}function rH(e,t,n,r=0){e.min=(r?tN(n.min,n.max,r):n.min)+t.min,e.max=e.min+rF(t)}function rW(e,t,n,r=0){let i=r?tN(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+rF(t)}function rG(e,t,n,r){rW(e.x,t.x,n.x,r?.x),rW(e.y,t.y,n.y,r?.y)}let rY=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),rq=new Set(["INPUT","SELECT","TEXTAREA"]);function rX(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var rK=n(3533);function rZ(e){return(0,rK.G)(e)&&"ownerSVGElement"in e}function rJ(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>null!=e)}let rQ=new WeakMap,r0=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:rZ(r)&&"getBBox"in r?r.getBBox()[t]:r[n],r1=r0("inline","width","offsetWidth"),r2=r0("block","height","offsetHeight");function r5({target:e,borderBoxSize:t}){rQ.get(e)?.forEach(n=>{n(e,{get width(){return r1(e,t)},get height(){return r2(e,t)}})})}function r3(e){e.forEach(r5)}let r4=new Set;function r6(e,t){return"function"==typeof e?(r4.add(e),o||(o=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};r4.forEach(t=>t(e))},window.addEventListener("resize",o)),()=>{r4.delete(e),r4.size||"function"!=typeof o||(window.removeEventListener("resize",o),o=void 0)}):function(e,t){i||"undefined"!=typeof ResizeObserver&&(i=new ResizeObserver(r3));let n=rJ(e);return n.forEach(e=>{let n=rQ.get(e);n||(n=new Set,rQ.set(e,n)),n.add(t),i?.observe(e)}),()=>{n.forEach(e=>{let n=rQ.get(e);n?.delete(t),n?.size||i?.unobserve(e)})}}(e,t)}let r9=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function r8(e){return{point:{x:e.pageX,y:e.pageY}}}function r7(e,t,n,r){return rX(e,t,e=>r9(e)&&n(e,r8(e)),r)}let ie=({current:e})=>e?e.ownerDocument.defaultView:null,it=(e,t)=>Math.abs(e-t),ir=new Set(["auto","scroll"]);class ii{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=io(this.lastRawMoveEventInfo,this.transformPagePoint));let e=is(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){return Math.sqrt(it(e.x,t.x)**2+it(e.y,t.y)**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=e_;this.history.push({...r,timestamp:i});let{onStart:o,onMove:a}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=io(t,this.transformPagePoint),eM.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=is("pointercancel"===e.type?this.lastMoveEventInfo:io(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!r9(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;let s=io(r8(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=e_;this.history=[{...l,timestamp:u}];let{onSessionStart:c}=t;c&&c(e,is(s,this.history)),this.removeListeners=nI(r7(this.contextWindow,"pointermove",this.handlePointerMove),r7(this.contextWindow,"pointerup",this.handlePointerUp),r7(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(ir.has(e.overflowX)||ir.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(0!==i.x||0!==i.y)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),eM.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),eP(this.updatePoint)}}function io(e,t){return t?{point:t(e.point)}:e}function ia(e,t){return{x:e.x-t.x,y:e.y-t.y}}function is({point:e},t){return{point:e,delta:ia(e,il(t)),offset:ia(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=il(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>eW(.1)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>2*eW(t)&&(r=e[1]);let o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};let a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t,.1)}}function il(e){return e[e.length-1]}function iu(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function ic(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function id(e,t,n){return{min:ih(e,t),max:ih(e,n)}}function ih(e,t){return"number"==typeof e?e:e[t]||0}let ip=new WeakMap;class im{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=q(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let i=e=>{t&&this.snapToCursor(r8(e).point),this.stopAnimation()},o=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"
293y"===e)if(rz[e])return null;else return rz[e]=!0,()=>{rz[e]=!1};return rz.x||rz.y?null:(rz.x=rz.y=!0,()=>{rz.x=rz.y=!1})}(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rN(e=>{let t=this.getAxisMotionValue(e).get()||0;if(S.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=rF(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&eM.update(()=>i(e,t),!1,!0),n_(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:a}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),o&&eM.update(()=>o(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new ii(e,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:ie(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:a}=this.getProps();a&&eM.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!iy(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?tN(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?tN(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&nk(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:iu(e.x,n,i),y:iu(e.y,t,r)}}(n.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:id(e,"left","right"),y:id(e,"top","bottom")}}(t),r!==this.constraints&&!nk(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&rN(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nk(t))return!1;let r=t.current;et(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());let o=function(e,t,n){let r=t3(e,n),{scroll:i}=t;return i&&(t0(r.x,i.offset.x),t0(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),a=(e=i.layout.layoutBox,{x:ic(e.x,o.x),y:ic(e.y,o.y)});if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=tG(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{};return Promise.all(rN(a=>{if(!iy(a,t,this.currentDirection))return;let l=s&&s[a]||{};(!0===o||o===a)&&(l={min:0,max:0});let u={type:"inertia",velocity:n?e[a]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(a,u)})).then(a)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return n_(this.visualElement,e),n.start(rC(e,n,0,t,this.visualElement,!1))}stopAnimation(){rN(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){rN(t=>{let{drag:n}=this.getProps();if(!iy(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:o}=r.layout.layoutBox[t],a=i.get()||0;i.set(e[t]-tN(n,o,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!nk(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};rN(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let n=t.get();r[e]=function(e,t){let n=.5,r=rF(e),i=rF(t);return i>r?n=rl(t.min,t.max-r,e.min):r>i&&(n=rl(e.min,e.max-i,t.min)),l(0,1,n)}({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),rN(t=>{if(!iy(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(tN(i,o,r[t]))}),this.visualElement.render()}addListeners(){let e;if(!this.visualElement.current)return;ip.set(this.visualElement,this);let t=this.visualElement.current,n=r7(t,"pointerdown",e=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=e.target,o=i!==t&&(rq.has(i.tagName)||!0===i.isContentEditable);n&&r&&!o&&this.start(e)}),r=()=>{let{dragConstraints:n}=this.getProps();nk(n)&&n.current&&(this.constraints=this.resolveRefConstraints(),e||(e=function(e,t,n){let r=r6(e,ig(n)),i=r6(t,ig(n));return()=>{r(),i()}}(t,n.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),eM.read(r);let a=rX(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(rN(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s(),e&&e()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function ig(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function iy(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}class iv extends nC{constructor(e){super(e),this.removeGroupControls=e
293E,this.removeListeners=eE,this.controls=new im(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||eE}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}let ib=e=>(t,n)=>{e&&eM.update(()=>e(t,n),!1,!0)};class ix extends nC{constructor(){super(...arguments),this.removePointerDownListener=eE}onPointerDown(e){this.session=new ii(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ie(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ib(e),onStart:ib(t),onMove:ib(n),onEnd:(e,t)=>{delete this.session,r&&eM.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=r7(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let iw={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var iS=n(26472);let ik=!1;class iE extends t6.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),ik&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),iw.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o&&(o.isPresent=i,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),ik=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||eM.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),tn.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;ik=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ij(e){let[t,n]=(0,iS.xQ)(),r=(0,t6.useContext)(ne.L);return(0,t7.jsx)(iE,{...e,layoutGroup:r,switchLayoutGroup:(0,t6.useContext)(nS),isPresent:t,safeToRemove:n})}let iC=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],iA=iC.length,iT=e=>"string"==typeof e?parseFloat(e):e,iM=e=>"number"==typeof e||k.test(e);function iP(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let i_=iR(0,.5,ri),iI=iR(.5,.95,eE);function iR(e,t,n){return r=>r<e?0:r>t?1:n(rl(e,t,r))}function iO(e,t){e.min=t.min,e.max=t.max}function i$(e,t){iO(e.x,t.x),iO(e.y,t.y)}function iD(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function iL(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}function iV(e,t,[n,r,i],o,a){!function(e,t=0,n=1,r=.5,i,o=e,a=e){if(S.test(t)&&(t=parseFloat(t),t=tN(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=tN(o.min,o.max,r);e===o&&(s-=t),e.min=iL(e.min,t,n,s,i),e.max=iL(e.max,t,n,s,i)}(e,t[n],t[r],t[i],t.scale,o,a)}let iz=["x","scaleX","originX"],iN=["y","scaleY","originY"];function iF(e,t,n,r){iV(e.x,t,iz,n?n.x:void 0,r?r.x:void 0),iV(e.y,t,iN,n?n.y:void 0,r?r.y:void 0)}function iB(e){return 0===e.translate&&1===e.scale}function iU(e){return iB(e.x)&&iB(e.y)}function iH(e,t){return e.min===t.min&&e.max===t.max}function iW(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function iG(e,t){return iW(e.x,t.x)&&iW(e.y,t.y)}function iY(e){return rF(e.x)/rF(e.y)}function iq(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class iX{constructor(){this.members=[]}add(e){eG(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&!1!==r.isConnected||n.snapshot||(eY(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(eY(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(!1!==e.isPresent&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(void 0===r||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isU
293pdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let iK=(e,t)=>e.depth-t.depth;class iZ{constructor(){this.children=[],this.isDirty=!1}add(e){eG(this.children,e),this.isDirty=!0}remove(e){eY(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(iK),this.isDirty=!1,this.children.forEach(e)}}let iJ={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},iQ=["","X","Y","Z"],i0=0;function i1(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function i2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=i0++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,eA.value&&(iJ.nodes=iJ.calculatedTargetDeltas=iJ.calculatedProjections=0),this.nodes.forEach(i4),this.nodes.forEach(oi),this.nodes.forEach(oo),this.nodes.forEach(i6),eA.addProjectionMetrics&&eA.addProjectionMetrics(iJ)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new iZ)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new eq),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=rZ(t)&&!(rZ(t)&&"svg"===t.tagName),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;eM.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){let n=ti.now(),r=({timestamp:t})=>{let i=t-n;i>=250&&(eP(r),e(i-250))};return eM.setup(r,!0),()=>eP(r)}(i,250),iw.hasAnimatedSinceResize&&(iw.hasAnimatedSinceResize=!1,this.nodes.forEach(or)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&i&&(n||r)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let o=this.options.transition||i.getDefaultTransition()||od,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!iG(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...nM(o,"layout"),onPlay:a,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u,t.path)}else t||or(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),eP(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEac
293h(oa),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:n}=t.options;if(!n)return;let r=n.props[nw];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",eM,!(e||n))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,("string"==typeof t.latestValues.x||"string"==typeof t.latestValues.y)&&(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(i7),this.nodes.forEach(i8);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(oe);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ot),this.nodes.forEach(on),this.nodes.forEach(i5),this.nodes.forEach(i3)):this.nodes.forEach(oe),this.clearAllSnapshots();let e=ti.now();e_.delta=l(0,1e3/60,e-e_.timestamp),e_.timestamp=e,e_.isProcessing=!0,eI.update.process(e_),eI.preRender.process(e_),eI.render.process(e_),e_.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,tn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(i9),this.sharedNodes.forEach(os)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,eM.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){eM.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||rF(this.snapshot.measuredBox.x)||rF(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=q()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!iU(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||tX(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let n=this.measurePageBox(),r=this.removeElementScroll(n);return e&&(r=this.removeTransform(r)),op((t=r).x),op(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return q();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(og))){let{scroll:e}=this.root;e&&(t0(t.x,e.offset.x),t0(t.y,e.offset.y))}return t}removeElementScroll(e){let t=q();if(i$(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:o}=r;r!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&i$(t,e),t0(t.x,i.offset.x),t0(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||q();i$(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(t0(r.x,-n.scroll.offset.x),t0(r.y,-n.scroll.offset.y)),tX(n.latestValues)&&t5(r,n.latestValues,n.layout?.layoutBox)}return tX(this.latestValues)&&t5(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=q();i$(t,e);for(let e=0;e<this.path.length;e++){let n,r=this.path[e];tX(r.latestValues)&&(r.instance&&(tq(r.latestValues)&&r.updateSnapshot(),i$(n=q(),r.measurePageBox())),iF(t,r.latestValues,r.snapshot?.layoutBox,n))}return tX(this.latestValues)&&iF(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==e_.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
293isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=e_.timestamp;let o=this.getClosestProjectingParent();if(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=q(),this.targetWithTransforms=q()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var a,s,l,u;this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,u=this.options.layoutAnchor||void 0,rH(a.x,s.x,l.x,u?.x),rH(a.y,s.y,l.y,u?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):i$(this.target,this.layout.layoutBox),tQ(this.target,this.targetDelta)):i$(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&!!o.resumingFrom==!!this.resumingFrom&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),eA.value&&iJ.calculatedTargetDeltas++}}getClosestProjectingParent(){if(!(!this.parent||tq(this.parent.latestValues)||tK(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=q(),this.relativeTargetOrigin=q(),rG(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),i$(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===e_.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;i$(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){let i,o,a=n.length;if(a){t.x=t.y=1;for(let s=0;s<a;s++){o=(i=n[s]).projectionDelta;let{visualElement:a}=i.options;(!a||!a.props.style||"contents"!==a.props.style.display)&&(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(t0(e.x,-i.scroll.offset.x),t0(e.
293y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,tQ(e,o)),r&&tX(i.latestValues)&&t5(e,i.latestValues,i.layout?.layoutBox))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=q());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(iD(this.prevProjectionDelta.x,this.projectionDelta.x),iD(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rU(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===a&&iq(this.projectionDelta.x,this.prevProjectionDelta.x)&&iq(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s)),eA.value&&iJ.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=G(),this.projectionDelta=G(),this.projectionDeltaWithTransform=G()}setAnimationOrigin(e,t=!1,n){let r,i=this.snapshot,o=i?i.latestValues:{},a={...this.latestValues},s=G();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let l=q(),u=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),d=!c||c.members.length<=1,h=!!(u&&!d&&!0===this.options.crossfade&&!this.path.some(oc));this.animationProgress=0;let f=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,i=f?.(n);if(i?(s.x.translate=i.x,s.x.scale=tN(e.x.scale,1,n),s.x.origin=e.x.origin,s.x.originPoint=e.x.originPoint,s.y.translate=i.y,s.y.scale=tN(e.y.scale,1,n),s.y.origin=e.y.origin,s.y.originPoint=e.y.originPoint):(ol(s.x,e.x,n),ol(s.y,e.y,n)),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var c,p,m,g,y,v;rG(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),m=this.relativeTarget,g=this.relativeTargetOrigin,y=l,v=n,ou(m.x,g.x,y.x,v),ou(m.y,g.y,y.y,v),r&&(c=this.relativeTarget,p=r,iH(c.x,p.x)&&iH(c.y,p.y))&&(this.isProjectionDirty=!1),r||(r=q()),i$(r,this.relativeTarget)}u&&(this.animationValues=a,function(e,t,n,r,i,o){i?(e.opacity=tN(0,n.opacity??1,i_(r)),e.opacityExit=tN(t.opacity??1,0,iI(r))):o&&(e.opacity=tN(t.opacity??1,n.opacity??1,r));for(let i=0;i<iA;i++){let o=iC[i],a=iP(t,o),s=iP(n,o);(void 0!==a||void 0!==s)&&(a||(a=0),s||(s=0),0===a||0===s||iM(a)===iM(s)?(e[o]=Math.max(tN(iT(a),iT(s),r),0),(S.test(s)||S.test(a))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=tN(t.rotate||0,n.rotate||0,r))}(a,o,this.latestValues,n,h,d)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=a),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(eP(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=eM.update(()=>{iw.hasAnimatedSinceResize=!0,e5.layout++,this.motionValue||(this.motionValue=tl(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){let r=X(e)?e:tl(e);return r.start(rC("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{e5.layout--},onComplete:()=>{e5.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&om(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||q();let t=rF(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=rF(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}i$(t,n),t5(t,i),rU(this.projectionDeltaWithTransform,this.layoutCorrected,t,i
293)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new iX),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&i1("z",e,r,this.animationValues);for(let t=0;t<iQ.length;t++)i1(`rotate${iQ[t]}`,e,r,this.animationValues),i1(`skew${iQ[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=nd(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none";return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=nd(t?.pointerEvents)||""),this.hasProjected&&!tX(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1);return}e.visibility="";let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();
293let o=function(e,t,n){let r="",i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:o,rotateY:a,skewX:s,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),o&&(r+=`rotateX(${o}deg) `),a&&(r+=`rotateY(${a}deg) `),s&&(r+=`skewX(${s}deg) `),l&&(r+=`skewY(${l}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==s||1!==l)&&(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);n&&(o=n(i,o)),e.transform=o;let{x:a,y:s}=this.projectionDelta;for(let t in e.transformOrigin=`${100*a.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0,tF){if(void 0===i[t])continue;let{correct:n,applyTo:a,isCSSVariable:s}=tF[t],l="none"===o?i[t]:n(i[t],r);if(a){let t=a.length;for(let n=0;n<t;n++)e[a[n]]=l}else s?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?nd(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(i8),this.root.sharedNodes.clear()}}}function i5(e){e.updateLayout()}function i3(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if("size"===i)rN(e=>{let r=o?t.measuredBox[e]:t.layoutBox[e],i=rF(r);r.min=n[e].min,r.max=r.min+i});else if("x"===i||"y"===i){let e="x"===i?"y":"x";iO(o?t.measuredBox[e]:t.layoutBox[e],n[e])}else om(i,t.layoutBox,n)&&rN(r=>{let i=o?t.measuredBox[r]:t.layoutBox[r],a=rF(n[r]);i.max=i.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)});let a=G();rU(a,n,t.layoutBox);let s=G();o?rU(s,e.applyTransform(r,!0),t.measuredBox):rU(s,n,t.layoutBox);let l=!iU(a),u=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:o}=r;if(i&&o){let a=e.options.layoutAnchor||void 0,s=q();rG(s,t.layoutBox,i.layoutBox,a);let l=q();rG(l,n,o.layoutBox,a),iG(s,l)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function i4(e){eA.value&&iJ.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function i6(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function i9(e){e.clearSnapshot()}function i8(e){e.clearMeasurements()}function i7(e){e.isLayoutDirty=!0,e.updateLayout()}function oe(e){e.isLayoutDirty=!1}function ot(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function on(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function or(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function oi(e){e.resolveTargetDelta()}function oo(e){e.calcProjection()}function oa(e){e.resetSkewAndRotation()}function os(e){e.removeLeadSnapshot()}function ol(e,t,n){e.translate=tN(t.translate,0,n),e.scale=tN(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ou(e,t,n,r){e.min=tN(t.min,n.min,r),e.max=tN(t.max,n.max,r)}function oc(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let od={duration:.45,ease:[.4,0,.1,1]},oh=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),of=oh("applewebkit/")&&!oh("chrome/")?Math.round:eE;function op(e){e.min=of(e.min),e.max=of(e.max)}function om(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(iY(t)-iY(n)))}function og(e){return e!==e.root&&e.scroll?.wasRoot}let oy=i2({attachResizeListener:(e,t)=>rX(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ov={current:void 0},ob=i2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ov.current){let e=new oy({});e.mount(window),e.setOptions({layoutScroll:!0}),ov.current=e}return ov.current},resetTransform:(e,t)=>
293{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function ox(e,t){let n=rJ(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ow(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);let i=r["onHover"+n];i&&eM.postRender(()=>i(t,r8(t)))}class oS extends nC{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[r,i,o]=ox(e,n);return r.forEach(e=>{let n,r=!1,o=!1,a=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),o&&(o=!1,a(e))},l=e=>{if("touch"!==e.pointerType){if(r){o=!0;return}a(e)}};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||rz.x||rz.y)return;o=!1;let a=t(e,r);"function"==typeof a&&(n=a,e.addEventListener("pointerleave",l,i))},i),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",s,i)},i)}),o}(e,(e,t)=>(ow(this.node,t,"Start"),e=>ow(this.node,e,"End"))))}unmount(){}}class ok extends nC{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=nI(rX(this.node.current,"focus",()=>this.onFocus()),rX(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}var oE=n(83449);let oj=(e,t)=>!!t&&(e===t||oj(e,t.parentElement)),oC=new WeakSet;function oA(e){return t=>{"Enter"===t.key&&e(t)}}function oT(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function oM(e){return r9(e)&&!(rz.x||rz.y)}let oP=new WeakSet;function o_(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);let i=r["onTap"+("End"===n?"":n)];i&&eM.postRender(()=>i(t,r8(t)))}class oI extends nC{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}){let[r,i,o]=ox(e,n),a=e=>{let r=e.currentTarget;if(!oM(e)||oP.has(e))return;oC.add(r),n.stopPropagation&&oP.add(e);let o=t(r,e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),oC.has(r)&&oC.delete(r),oM(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{a(e,r===window||r===document||n.useGlobalTarget||oj(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",l,i)};return r.forEach(e=>{((n.useGlobalTarget?window:e).addEventListener("pointerdown",a,i),(0,oE.s)(e))&&(e.addEventListener("focus",e=>((e,t)=>{let n=e.currentTarget;if(!n)return;let r=oA(()=>{if(oC.has(n))return;oT(n,"down");let e=oA(()=>{oT(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>oT(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),rY.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}(e,(e,t)=>(o_(this.node,t,"Start"),(e,{success:t})=>o_(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}}let oR=new WeakMap,oO=new WeakMap,o$=e=>{let t=oR.get(e.target);t&&t(e)},oD=e=>{e.forEach(o$)},oL={some:0,all:1};class oV extends nC{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:oL[r]},a=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)};this.stopObserver=function(e,t,n){let r=function({root:e,...t}){let n=e||document;oO.has(n)||oO.set(n,{});let r=oO.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(oD,{root:e,...t})),r[i]}(t);return oR.set(e,n),r.observe(e),()=>{oR.delete(e),r.unobserve(e)}}(this.node.current,o,a)}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}let oz=function(e,t){if("undefined"==typeof Proxy)return nj;let n=new Map,r=(n,r)=>nj(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,o)=>"create"===o?r:(n.has(o)||n.set(o,nj(o,void 0,e,t)),n.get(o))})}({animation:{Feature:rD},exit:{Feature:rV},inView:{Feature:oV},tap:{Feature:oI},focus:{Feature:ok},hover:{Feature:oS},pan:{Feature:ix},drag:{Feature:iv,ProjectionNode:ob,MeasureLayout:ij},layout:{ProjectionNode:ob,MeasureLayout:ij}},(e,t)=>t.isSVG??t8(e)?new tW(t):new t4(t,{allowProjection:e!==t6.Fragment}))},81715:(e,t,n)=>{var r=n(60292),i=n(27015);e.exports=r(function(e,t,n){return e+(n?" ":"")+i(t)})},81863:(e,t,n)=>{var r=n(36786),i=n(45860),o=n(43561),a=r?r.toStringTag:void 0;
293e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},83449:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});var r=n(3533);function i(e){return(0,r.G)(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}},86187:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},87247:(e,t,n)=>{var r=n(64805),i=n(92937),o=n(53085);e.exports=function(e){return i(e)?o(e):r(e)}},92534:(e,t,n)=>{var r=n(58250),i=n(98733),o=n(41921),a=n(14418);e.exports=function(e,t,n){return(e=o(e),void 0===(t=n?void 0:t))?i(e)?a(e):r(e):e.match(t)||[]}},92937:e=>{var t=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},95971:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});let r=(0,n(7620).createContext)({})},96728:(e,t,n)=>{"use strict";n.d(t,{NP:()=>ts,AH:()=>tp,i7:()=>tv,I4:()=>tg,DP:()=>ta});var r,i,o,a=n(7620),s="-ms-",l="-moz-",u="-webkit-",c="comm",d="rule",h="decl",f="@keyframes",p=Math.abs,m=String.fromCharCode,g=Object.assign;function y(e,t){return(e=t.exec(e))?e[0]:e}function v(e,t,n){return e.replace(t,n)}function b(e,t,n){return e.indexOf(t,n)}function x(e,t){return 0|e.charCodeAt(t)}function w(e,t,n){return e.slice(t,n)}function S(e){return e.length}function k(e,t){return t.push(e),e}function E(e,t){return e.filter(function(e){return!y(e,t)})}var j=1,C=1,A=0,T=0,M=0,P="";function _(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:j,column:C,length:a,return:"",siblings:s}}function I(e,t){return g(_("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function R(e){for(;e.root;)e=I(e.root,{children:[e]});k(e,e.siblings)}function O(){return M=T<A?x(P,T++):0,C++,10===M&&(C=1,j++),M}function $(){return x(P,T)}function D(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function L(e){var t,n;return(t=T-1,n=function e(t){for(;O();)switch(M){case t:return T;case 34:case 39:34!==t&&39!==t&&e(M);break;case 40:41===t&&e(t);break;case 92:O()}return T}(91===e?e+2:40===e?e+1:e),w(P,t,n)).trim()}function V(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function z(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case h:return e.return=e.return||e.value;case c:return"";case f:return e.return=e.value+"{"+V(e.children,r)+"}";case d:if(!S(e.value=e.props.join(",")))return""}return S(n=V(e.children,r))?e.return=e.value+"{"+n+"}":""}function N(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case h:e.return=function e(t,n,r){var i;switch(i=n,45^x(t,0)?(((i<<2^x(t,0))<<2^x(t,1))<<2^x(t,2))<<2^x(t,3):0){case 5103:return u+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return u+t+t;case 4855:return u+t.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+t;case 4789:return l+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return u+t+l+t+s+t+t;case 5936:switch(x(t,n+11)){case 114:return u+t+s+v(t,/[svh]\w+-[tblr]{2}/,"tb")+t;
293case 108:return u+t+s+v(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return u+t+s+v(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return u+t+s+t+t;case 6165:return u+t+s+"flex-"+t+t;case 5187:return u+t+v(t,/(\w+).+(:[^]+)/,u+"box-$1$2"+s+"flex-$1$2")+t;case 5443:return u+t+s+"flex-item-"+v(t,/flex-|-self/g,"")+(y(t,/flex-|baseline/)?"":s+"grid-row-"+v(t,/flex-|-self/g,""))+t;case 4675:return u+t+s+"flex-line-pack"+v(t,/align-content|flex-|-self/g,"")+t;case 5548:return u+t+s+v(t,"shrink","negative")+t;case 5292:return u+t+s+v(t,"basis","preferred-size")+t;case 6060:return u+"box-"+v(t,"-grow","")+u+t+s+v(t,"grow","positive")+t;case 4554:return u+v(t,/([^-])(transform)/g,"$1"+u+"$2")+t;case 6187:return v(v(v(t,/(zoom-|grab)/,u+"$1"),/(image-set)/,u+"$1"),t,"")+t;case 5495:case 3959:return v(t,/(image-set\([^]*)/,u+"$1$`$1");case 4968:return v(v(t,/(.+:)(flex-)?(.*)/,u+"box-pack:$3"+s+"flex-pack:$3"),/space-between/,"justify")+u+t+t;case 4200:if(!y(t,/flex-|baseline/))return s+"grid-column-align"+w(t,n)+t;break;case 2592:case 3360:return s+v(t,"template-","")+t;case 4384:case 3616:if(r&&r.some(function(e,t){return n=t,y(e.props,/grid-\w+-end/)}))return~b(t+(r=r[n].value),"span",0)?t:s+v(t,"-start","")+t+s+"grid-row-span:"+(~b(r,"span",0)?y(r,/\d+/):y(r,/\d+/)-y(t,/\d+/))+";";return s+v(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(e){return y(e.props,/grid-\w+-start/)})?t:s+v(v(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return v(t,/(.+)-inline(.+)/,u+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(S(t)-1-n>6)switch(x(t,n+1)){case 109:if(45!==x(t,n+4))break;case 102:return v(t,/(.+:)(.+)-([^]+)/,"$1"+u+"$2-$3$1"+l+(108==x(t,n+3)?"$3":"$2-$3"))+t;case 115:return~b(t,"stretch",0)?e(v(t,"stretch","fill-available"),n,r)+t:t}break;case 5152:case 5920:return v(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,n,r,i,o,a,l){return s+n+":"+r+l+(i?s+n+"-span:"+(o?a:a-r)+l:"")+t});case 4949:if(121===x(t,n+6))return v(t,":",":"+u)+t;break;case 6444:switch(x(t,45===x(t,14)?18:11)){case 120:return v(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+u+(45===x(t,14)?"inline-":"")+"box$3$1"+u+"$2$3$1"+s+"$2box$3")+t;case 100:return v(t,":",":"+s)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return v(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,n);return;case f:return V([I(e,{value:v(e.value,"@","@"+u)})],r);case d:if(e.length){var i,o;return i=n=e.props,o=function(t){switch(y(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":R(I(e,{props:[v(t,/:(read-\w+)/,":"+l+"$1")]})),R(I(e,{props:[t]})),g(e,{props:E(n,r)});break;case"::placeholder":R(I(e,{props:[v(t,/:(plac\w+)/,":"+u+"input-$1")]})),R(I(e,{props:[v(t,/:(plac\w+)/,":"+l+"$1")]})),R(I(e,{props:[v(t,/:(plac\w+)/,s+"input-$1")]})),R(I(e,{props:[t]})),g(e,{props:E(n,r)})}return""},i.map(o).join("")}}}function F(e,t,n,r,i,o,a,s,l,u,c,h){for(var f=i-1,m=0===i?o:[""],g=m.length,y=0,b=0,x=0;y<r;++y)for(var S=0,k=w(e,f+1,f=p(b=a[y])),E=e;S<g;++S)(E=(b>0?m[S]+" "+k:v(k,/&\f/g,m[S])).trim())&&(l[x++]=E);return _(e,t,n,0===i?d:s,l,u,c,h)}function B(e,t,n,r,i){return _(e,t,n,h,w(e,0,r),w(e,r+1,-1),r,i)}var U=n(40459);let H=void 0!==U&&void 0!==U.env&&(U.env.REACT_APP_SC_ATTR||U.env.SC_ATTR)||"data-styled",W="active",G="data-styled-version",Y="6.4.2",q="/*!sc*/\n",X="undefined"!=typeof window&&"undefined"!=typeof document;function K(e){if(void 0!==U&&void 0!==U.env){let t=U.env[e];if(void 0!==t&&""!==t)return"false"!==t}}let Z=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!=(i=null!=(r=K("REACT_APP_SC_DISABLE_SPEEDY"))?r:K("SC_DISABLE_SPEEDY"))?i:void 0!==U&&void 0!==U.env&&!1),J="sc-keyframes-";function Q(e,...t){return Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let ee=new Map,et=new Map,en=1,er=e=>{if(ee.has(e))return ee.get(e);for(;et.has(en);)en++;let t=en++;return ee.set(e,t),et.set(t,e),t},ei=e=>et.get(e),eo=(e,t)=>{en=t+1,ee.set(e,t),et.set(t,e)},ea=Object.freeze([]),es=Object.freeze({}),el=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,eu=/(^-|-$)/g;function ec(e){return e.replace(el,"-").replace(eu,"")}
293let ed=/(a)(d)/gi,eh=e=>String.fromCharCode(e+(e>25?39:97));function ef(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=eh(t%52)+n;return(eh(t%52)+n).replace(ed,"$1-$2")}let ep=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},em=e=>ep(5381,e);function eg(e){return"string"==typeof e}let ey=Symbol.for("react.memo"),ev=Symbol.for("react.forward_ref"),eb={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},ex={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ew={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eS={[ev]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[ey]:ew};function ek(e){return("type"in e&&e.type.$$typeof)===ey?ew:"$$typeof"in e?eS[e.$$typeof]:eb}let eE=Object.defineProperty,ej=Object.getOwnPropertyNames,eC=Object.getOwnPropertySymbols,eA=Object.getOwnPropertyDescriptor,eT=Object.getPrototypeOf,eM=Object.prototype;function eP(e){return"function"==typeof e}let e_=Symbol.for("react.forward_ref");function eI(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&e.$$typeof===e_&&"styledComponentId"in e}function eR(e,t){return e&&t?e+" "+t:e||t||""}function eO(e,t){return e.join(t||"")}function e$(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function eD(e,t){Object.defineProperty(e,"toString",{value:t})}let eL=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){let t=this.groupSizes,n=t.length,r=n;for(;e>=r;)if((r<<=1)<0)throw Q(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e<r;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),r=0;for(let i=0,o=t.length;i<o;i++)this.tag.insertRule(n,t[i])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){let t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let e=n;e<r;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;let n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let e=r;e<i;e++)t+=this.tag.getRule(e)+q;return t}},eV=`style[${H}][${G}="${Y}"]`,ez=RegExp(`^${H}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),eN=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,eF=e=>{if(!e)return document;if(eN(e))return e;if("getRootNode"in e){let t=e.getRootNode();if(eN(t))return t}return document},eB=(e,t,n)=>{let r,i=n.split(",");for(let n=0,o=i.length;n<o;n++)(r=i[n])&&e.registerName(t,r)},eU=(e,t)=>{var n;let r=(null!=(n=t.textContent)?n:"").split(q),i=[];for(let t=0,n=r.length;t<n;t++){let n=r[t].trim();if(!n)continue;let o=n.match(ez);if(o){let t=0|parseInt(o[1],10),n=o[2];0!==t&&(eo(n,t),eB(e,n,o[3]),e.getTag().insertRules(t,i)),i.length=0}else i.push(n)}},eH=e=>{let t=eF(e.options.target).querySelectorAll(eV);for(let n=0,r=t.length;n<r;n++){let r=t[n];r&&r.getAttribute(H)!==W&&(eU(e,r),r.parentNode&&r.parentNode.removeChild(r))}},eW=!1,eG=(e,t)=>{let r=document.head,i=e||r,o=document.createElement("style"),a=(e=>{let t=Array.from(e.querySelectorAll(`style[${H}]`));return t[t.length-1]})(i),s=void 0!==a?a.nextSibling:null;o.setAttribute(H,W),o.setAttribute(G,Y);let l=t||function(){if(!1!==eW)return eW;if("undefined"!=typeof document){let e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return eW=e.nonce||e.getAttribute("content")||void 0;let t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return eW=t.getAttribute("content")||void 0}return eW=n.nc}();return l&&o.setAttribute("nonce",l),i.insertBefore(o,s),o},eY=class{constructor(e,t){this.element=eG(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;let n=null!=(t=e.getRootNode().styleSheets)?t:document.styleSheets;for(let t=0,r=n.length;t<r;t++){let r=n[t];if(r.ownerNode===e)return r}throw Q(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){let t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}}
293,eq=class{constructor(e,t){this.element=eG(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){let n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}},eX=X,eK={isServer:!X,useCSSOMInjection:!Z};class eZ{static registerId(e){return er(e)}constructor(e=es,t={},n){this.options=Object.assign(Object.assign({},eK),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&X&&eX&&(eX=!1,eH(this)),eD(this,()=>(e=>{let t=e.getTag(),{length:n}=t,r="";for(let i=0;i<n;i++){let n=ei(i);if(void 0===n)continue;let o=e.names.get(n);if(void 0===o||!o.size)continue;let a=t.getGroup(i);if(0===a.length)continue;let s=H+".g"+i+'[id="'+n+'"]',l="";for(let e of o)e.length>0&&(l+=e+",");r+=a+s+'{content:"'+l+'"}'+q}return r})(this))}rehydrate(){!this.server&&X&&eH(this)}reconstructWithOptions(e,t=!0){let n=new eZ(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&X&&e.target!==this.options.target&&eF(this.options.target)!==eF(e.target)&&eH(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=new eL((({useCSSOMInjection:e,target:t,nonce:n})=>e?new eY(t,n):new eq(t,n))(this.options)))}hasNameForId(e,t){var n,r;return null!=(r=null==(n=this.names.get(e))?void 0:n.has(t))&&r}registerName(e,t){er(e),e.startsWith(J)&&this.keyframeIds.add(e);let n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(er(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(er(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}let eJ=new WeakSet,eQ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function e0(e){if(45===e.charCodeAt(0)&&45===e.charCodeAt(1))return e;let t="";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[n]}return t.startsWith("ms-")?"-"+t:t}let e1=Symbol.for("sc-keyframes");function e2(e){return eP(e)&&!(e.prototype&&e.prototype.isReactComponent)}let e5=e=>null==e||!1===e||""===e,e3=Symbol.for("react.client.reference");function e4(e){return e.$$typeof===e3}function e6(e,t,n,r,i=[]){if(e5(e))return i;let o=typeof e;if("string"===o)return i.push(e),i;if("function"===o)return e4(e)?i:e2(e)&&t?e6(e(t),t,n,r,i):(i.push(e),i);if(Array.isArray(e)){for(let o=0;o<e.length;o++)e6(e[o],t,n,r,i);return i}return eI(e)?i.push(`.${e.styledComponentId}`):"object"==typeof e&&null!==e&&e1 in e?n?(e.inject(n,r),i.push(e.getName(r))):i.push(e):e4(e)||(e$(e)?e.toString!==Object.prototype.toString?i.push(e.toString()):function e(t,n){for(let r in t){let i=t[r];t.hasOwnProperty(r)&&!e5(i)&&(Array.isArray(i)&&eJ.has(i)||eP(i)?n.push(e0(r)+":",i,";"):e$(i)?(n.push(r+" {"),e(i,n),n.push("}")):n.push(e0(r)+": "+(null==i||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in eQ||r.startsWith("--")?String(i).trim():i+"px")+";"))}}(e,i):i.push(e.toString())),i}let e9=em(Y);class e8{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=ep(e9,t),this.baseStyle=n,eZ.registerId(t)}generateAndInjectStyles(e,t,n){let r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";{let i="";for(let r=0;r<this.rules.length;r++){let o=this.rules[r];if("string"==typeof o)i+=o;else if(o)if(e2(o)){let r=o(e);"string"==typeof r?i+=r:null!=r&&!1!==r&&(i+=eO(e6(r,e,t,n)))}else i+=eO(e6(o,e,t,n))}
293if(i){this.dynamicNameCache||(this.dynamicNameCache=new Map);let e=n.hash?n.hash+i:i,o=this.dynamicNameCache.get(e);if(!o){if(o=ef(ep(ep(this.baseHash,n.hash),i)>>>0),this.dynamicNameCache.size>=200){let e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,o)}if(!t.hasNameForId(this.componentId,o)){let e=n(i,"."+o,void 0,this.componentId);t.insertRules(this.componentId,o,e)}r=eR(r,o)}}return r}}let e7=/&/g;function te(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function tt(e){let t=e.length,n="",r=0,i=0,o=0,a=!1,s=!1;for(let l=0;l<t;l++){let u=e.charCodeAt(l);if(0!==o||a||47!==u||42!==e.charCodeAt(l+1))if(a)42===u&&47===e.charCodeAt(l+1)&&(a=!1,l++);else if(34!==u&&39!==u||te(e,l)){if(0===o)if(123===u)i++;else if(125===u){if(--i<0){s=!0;let n=l+1;for(;n<t;){let t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,i=0,l=n-1,r=n;continue}0===i&&(n+=e.substring(r,l+1),r=l+1)}else 59===u&&0===i&&(n+=e.substring(r,l+1),r=l+1)}else 0===o?o=u:o===u&&(o=0);else a=!0,l++}return s||0!==i||0!==o?(r<t&&0===i&&0===o&&(n+=e.substring(r)),n):e}let tn=new eZ,tr=function({options:e=es,plugins:t=ea}=es){var n,r,i;let o,a,s,l=(e,t,n)=>n.startsWith(a)&&n.endsWith(a)&&n.replaceAll(a,"").length>0?`.${o}`:e,u=t.slice();u.push(e=>{e.type===d&&e.value.includes("&")&&(s||(s=RegExp(`\\${a}\\b`,"g")),e.props[0]=e.props[0].replace(e7,a).replace(s,l))}),e.prefix&&u.push(N),u.push(z);let h=[],f=(i=(r=u.concat((n=e=>h.push(e),function(e){!e.root&&(e=e.return)&&n(e)}))).length,function(e,t,n,o){for(var a="",s=0;s<i;s++)a+=r[s](e,t,n,o)||"";return a}),g=(t,n="",r="",i="&")=>{var l,u,d;o=i,a=n,s=void 0;let g=function(e){let t=-1!==e.indexOf("//"),n=-1!==e.indexOf("}");if(!t&&!n)return e;if(!t)return tt(e);let r=e.length,i="",o=0,a=0,s=0,l=0,u=0,c=!1;for(;a<r;){let t=e.charCodeAt(a);if(34!==t&&39!==t||te(e,a))if(0===s)if(47===t&&a+1<r&&42===e.charCodeAt(a+1)){for(a+=2;a+1<r&&(42!==e.charCodeAt(a)||47!==e.charCodeAt(a+1));)a++;a+=2}else if(40!==t)if(41!==t)if(l>0)a++;else if(42===t&&a+1<r&&47===e.charCodeAt(a+1))i+=e.substring(o,a),a+=2,o=a,c=!0;else if(47===t&&a+1<r&&47===e.charCodeAt(a+1)){for(i+=e.substring(o,a);a<r&&10!==e.charCodeAt(a);)a++;o=a,c=!0}else 123===t?u++:125===t&&u--,a++;else l>0&&l--,a++;else l++,a++;else a++;else 0===s?s=t:s===t&&(s=0),a++}return c?(o<r&&(i+=e.substring(o)),0===u?i:tt(i)):0===u?e:tt(e)}(t),y=(d=function e(t,n,r,i,o,a,s,l,u){for(var d,h,f,g,y=0,E=0,A=s,I=0,R=0,V=0,z=1,N=1,U=1,H=0,W="",G=o,Y=a,q=i,X=W;N;)switch(V=H,H=O()){case 40:if(108!=V&&58==x(X,A-1)){-1!=b(X+=v(L(H),"&","&\f"),"&\f",p(y?l[y-1]:0))&&(U=-1);break}case 34:case 39:case 91:X+=L(H);break;case 9:case 10:case 13:case 32:X+=function(e){for(;M=$();)if(M<33)O();else break;return D(e)>2||D(M)>3?"":" "}(V);break;case 92:X+=function(e,t){for(var n;--t&&O()&&!(M<48)&&!(M>102)&&(!(M>57)||!(M<65))&&(!(M>70)||!(M<97)););return n=T+(t<6&&32==$()&&32==O()),w(P,e,n)}(T-1,7);continue;case 47:switch($()){case 42:case 47:k((d=function(e,t){for(;O();)if(e+M===57)break;else if(e+M===84&&47===$())break;return"/*"+w(P,t,T-1)+"*"+m(47===e?e:O())}(O(),T),h=n,f=r,g=u,_(d,h,f,c,m(M),w(d,2,-2),0,g)),u),(5==D(V||1)||5==D($()||1))&&S(X)&&" "!==w(X,-1,void 0)&&(X+=" ");break;default:X+="/"}break;case 123*z:l[y++]=S(X)*U;case 125*z:case 59:case 0:switch(H){case 0:case 125:N=0;case 59+E:-1==U&&(X=v(X,/\f/g,"")),R>0&&(S(X)-A||0===z&&47===V)&&k(R>32?B(X+";",i,r,A-1,u):B(v(X," ","")+";",i,r,A-2,u),u);break;case 59:X+=";";default:if(k(q=F(X,n,r,y,E,o,l,W,G=[],Y=[],A,a),a),123===H)if(0===E)e(X,n,q,q,G,a,A,l,Y);else{switch(I){case 99:if(110===x(X,3))break;case 108:if(97===x(X,2))break;default:E=0;case 100:case 109:case 115:}E?e(t,q,q,i&&k(F(t,q,q,0,0,o,l,W,o,G=[],A,Y),Y),o,Y,A,l,i?G:Y):e(X,q,q,q,[""],Y,0,l,Y)}}y=E=R=0,z=U=1,W=X="",A=s;break;case 58:A=1+S(X),R=V;default:if(z<1){if(123==H)--z;else if(125==H&&0==z++&&125==(M=T>0?x(P,--T):0,C--,10===M&&(C=1,j--),M))continue}switch(X+=m(H),H*z){case 38:U=E>0?1:(X+="\f",-1);break;case 44:l[y++]=(S(X)-1)*U,U=1;break;case 64:45===$()&&(X+=L(O())),I=$(),E=A=S(W=X+=function(e){for(;!D($());)O();return w(P,e,T)}(T)),H++;break;case 45:45===V&&2==S(X)&&(z=0)}}return a}("",null,null,null,[""],(u=l=r||n?r+" "+n+" { "+g+" }":g,j=C=1,A=S(P=u),T=0,l=[]),0,[0],l),P="",d);return e.namespace&&(y=function e(t,n){let r=n+" ",i=","+r;for(let o=0;o<t.length;o++){let a=t[o];if("rule"===a.type){a.value=(r+a.value).replaceAll(",",i);let e=a.props,t=[];for(let n=0;n<e.length;n++)t[n]=r+e[n];a.props=t}Array.isArray(a.children)&&"@keyframes"!==a.type&&e(a.children,n)}return t}(y,e.namespace)),h=[],V(y,f),h},y=5381;for(let e=0;e<t.length;e++)t[e].name||Q(15),y=ep(y,t[e].name);return(null==e?void 0:e.namespace)&&(y=ep(y,e.namespace)),(null==e?void 0:e.prefix)&&(y=ep(y,"p")),g.hash=5381!==y?y.toString():"",g}(),ti=a.createContext({shouldForwardProp:void 0,styleSheet:tn,stylis:tr,stylisPlugins:void 0});ti.Consumer;let to=a.createContext(void 0);function ta(){let e=a.useContext(to);if(!e)throw Q(18);return e}function ts(e){let t=a.useContext(to),n=a.useMemo(()=>(function(e,t){if(!e)throw Q(14);if(eP(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw Q(8);return t?Object.assign(Object.assign({},t),e):e})(e.theme,t),[e.theme,t]);return e.children?a.createElement(to.Provider,{value:n},e.children):null}to.Consumer;let tl=Object.prototype.hasOwnProperty,tu={};
293function tc(e,t,n){let r=eI(e),i=!eg(e),{attrs:o=ea,componentId:s=function(e,t){let n="string"!=typeof e?"sc":ec(e);tu[n]=(tu[n]||0)+1;let r=n+"-"+ef(em(Y+n+tu[n])>>>0);return t?t+"-"+r:r}(t.displayName,t.parentComponentId),displayName:l=eg(e)?`styled.${e}`:`Styled(${e.displayName||e.name||"Component"})`}=t,u=t.displayName&&t.componentId?ec(t.displayName)+"-"+t.componentId:t.componentId||s,c=r&&e.attrs?e.attrs.concat(o).filter(Boolean):o,{shouldForwardProp:d}=t;if(r&&e.shouldForwardProp){let n=e.shouldForwardProp;if(t.shouldForwardProp){let e=t.shouldForwardProp;d=(t,r)=>n(t,r)&&e(t,r)}else d=n}let h=new e8(n,u,r?e.componentStyle:void 0);function f(e,t){return function(e,t,n){let r,i,{attrs:o,componentStyle:s,defaultProps:l,foldedComponentIds:u,styledComponentId:c,target:d}=e,h=a.useContext(to),f=a.useContext(ti),p=e.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n=es){return e.theme!==n.theme&&e.theme||t||n.theme}(t,h,l)||es;{let e=a.useRef(null),n=e.current;if(null!==n&&n[1]===m&&n[2]===f.styleSheet&&n[3]===f.stylis&&n[7]===s&&function(e,t,n){let r=0;for(let n in t)if(tl.call(t,n)&&(r++,e[n]!==t[n]))return!1;return r===n}(n[0],t,n[4]))r=n[5],i=n[6];else{var g,y,v;r=function(e,t,n){let r=Object.assign(Object.assign({},t),{className:void 0,theme:n}),i=e.length>1;for(let n=0;n<e.length;n++){let o=e[n],a=eP(o)?o(i?Object.assign({},r):r):o;for(let e in a)"className"===e?r.className=eR(r.className,a[e]):"style"===e?r.style=Object.assign(Object.assign({},r.style),a[e]):e in t&&void 0===t[e]||(r[e]=a[e])}return"className"in t&&"string"==typeof t.className&&(r.className=eR(r.className,t.className)),r}(o,t,m),g=r,y=f.styleSheet,v=f.stylis,i=s.generateAndInjectStyles(g,y,v);let n=0;for(let e in t)tl.call(t,e)&&n++;e.current=[t,m,f.styleSheet,f.stylis,n,r,i,s]}}let b=r.as||d,x=function(e,t,n,r){let i={};for(let o in e)void 0===e[o]||"$"===o[0]||"as"===o||"theme"===o&&e.theme===n||("forwardedAs"===o?i.as=e.forwardedAs:r&&!r(o,t)||(i[o]=e[o]));return i}(r,b,m,p),w=eR(u,c);return i&&(w+=" "+i),r.className&&(w+=" "+r.className),x[eg(b)&&b.includes("-")?"class":"className"]=w,n&&(x.ref=n),(0,a.createElement)(b,x)}(p,e,t)}f.displayName=l;let p=a.forwardRef(f);return p.attrs=c,p.componentStyle=h,p.displayName=l,p.shouldForwardProp=d,p.foldedComponentIds=r?eR(e.foldedComponentIds,e.styledComponentId):"",p.styledComponentId=u,p.target=r?e.target:e,Object.defineProperty(p,"defaultProps",{get(){return this._foldedDefaultProps},set(t){this._foldedDefaultProps=r?function(e,...t){for(let n of t)!function e(t,n,r=!1){if(!r&&!e$(t)&&!Array.isArray(t))return n;if(Array.isArray(n))for(let r=0;r<n.length;r++)t[r]=e(t[r],n[r]);else if(e$(n))for(let r in n)t[r]=e(t[r],n[r]);return t}(e,n,!0);return e}({},e.defaultProps,t):t}}),eD(p,()=>`.${p.styledComponentId}`),i&&function e(t,n,r){if("string"!=typeof n){let i=eT(n);i&&i!==eM&&e(t,i,r);let o=ej(n).concat(eC(n)),a=ek(t),s=ek(n);for(let e=0;e<o.length;++e){let i=o[e];if(!(i in ex||r&&r[i]||s&&i in s||a&&i in a)){let e=eA(n,i);try{eE(t,i,e)}catch(e){}}}}return t}(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),p}var td=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function th(e,t){let n=[e[0]];for(let r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}let tf=e=>(eJ.add(e),e);function tp(e,...t){return eP(e)||e$(e)?tf(e6(th(ea,[e,...t]))):0===t.length&&1===e.length&&"string"==typeof e[0]?e6(e):tf(e6(th(e,t)))}let tm=e=>(function e(t,n,r=es){if(!n)throw Q(1,n);let i=(e,...i)=>t(n,r,tp(e,...i));return i.attrs=i=>e(t,n,Object.assign(Object.assign({}
293,r),{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)})),i.withConfig=i=>e(t,n,Object.assign(Object.assign({},r),i)),i})(tc,e),tg=tm;td.forEach(e=>{tg[e]=tm(e)});class ty{constructor(e,t){this[o]=!0,this.inject=(e,t=tr)=>{let n=this.getName(t);if(!e.hasNameForId(this.id,n)){let r=t(this.rules,n,"@keyframes");e.insertRules(this.id,n,r)}},this.name=e,this.id=J+e,this.rules=t,er(this.id),eD(this,()=>{throw Q(12,String(this.name))})}getName(e=tr){return e.hash?this.name+ef(e.hash>>>0):this.name}}function tv(e,...t){let n=eO(tp(e,...t));return new ty(ef(em(n)>>>0),n)}o=e1},97989:(e,t,n)=>{var r=n(27523);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},98733:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},99100:(e,t,n)=>{"use strict";n.d(t,{N:()=>b});var r=n(54568),i=n(7620),o=n(95971),a=n(23847),s=n(48683),l=n(42015),u=n(83449),c=n(39070);function d(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class h extends i.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,u.s)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,n=(0,u.s)(e)&&e.offsetWidth||0,r=(0,u.s)(e)&&e.offsetHeight||0,i=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(i.height),o.width=parseFloat(i.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=n-o.width-o.left,o.bottom=r-o.height-o.top,o.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function f(e){var t,n;let{children:o,isPresent:a,anchorX:s,anchorY:l,root:u,pop:f}=e,p=(0,i.useId)(),m=(0,i.useRef)(null),g=(0,i.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:y}=(0,i.useContext)(c.Q),v=function(...e){return i.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=d(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():d(e[t],null)}}}}(...e),e)}(m,null!=(n=null==(t=o.props)?void 0:t.ref)?n:null==o?void 0:o.ref);return(0,i.useInsertionEffect)(()=>{let{width:e,height:t,top:n,left:r,right:i,bottom:o,direction:c}=g.current;if(a||!1===f||!m.current||!e||!t)return;let d="rtl"===c;m.current.dataset.motionPopId=p;let h=document.createElement("style");y&&(h.nonce=y);let v=null!=u?u:document.head;return v.appendChild(h),h.sheet&&h.sheet.insertRule('\n          [data-motion-pop-id="'.concat(p,'"] {\n            position: absolute !important;\n            width: ').concat(e,"px !important;\n            height: ").concat(t,"px !important;\n            ").concat("left"===s?d?"right: ".concat(i):"left: ".concat(r):d?"left: ".concat(r):"right: ".concat(i),"px !important;\n            ").concat("bottom"===l?"bottom: ".concat(o):"top: ".concat(n),"px !important;\n          }\n        ")),()=>{var e;null==(e=m.current)||e.removeAttribute("data-motion-pop-id"),v.contains(h)&&v.removeChild(h)}},[a]),(0,r.jsx)(h,{isPresent:a,childRef:m,sizeRef:g,pop:f,children:!1===f?o:i.cloneElement(o,{ref:v})})}let p=e=>{let{children:t,initial:n,isPresent:o,onExitComplete:s,custom:u,presenceAffectsLayout:c,mode:d,anchorX:h,anchorY:p,root:g}=e,y=(0,a.M)(m),v=(0,i.useId)(),b=!0,x=(0,i.useMemo)(()=>(b=!1,{id:v,initial:n,isPresent:o,custom:u,onExitComplete:e=>{for(let t of(y.set(e,!0),y.values()))if(!t)return;s&&s()},register:e=>(y.set(e,!1),()=>y.delete(e))}),[o,y,s]);return c&&b&&(x={...x}),(0,i.useMemo)(()=>{y.forEach((e,t)=>y.set(t,!1))},[o]),i.useEffect(()=>{o||y.size||!s||s()},[o]),t=(0,r.jsx)(f,{pop:"popLayout"===d,isPresent:o,anchorX:h,anchorY:p,root:g,children:t}),(0,r.jsx)(l.t.Provider,{value:x,children:t})};function m(){return new Map}var g=n(26472);let y=e=>e.key||"";function v(e){let t=[];return i.Children.forEach(e,e=>{(0,i.isValidElement)(e)&&t.push(e)}),t}let b=e=>{let{children:t,custom:n,initial:l=!0,onExitComplete:u,presenceAffectsLayout:c=!0,mode:d="sync",propagate:h=!1,anchorX:f="left",anchorY:m="top",root:b}=e,[x,w]=(0,g.xQ)(h),S=(0,i.useMemo)(()=>v(t),[t]),k=h&&!x?[]:S.map(y),E=(0,i.useRef)(!0),j=(0,i.useRef)(S),C=(0,a.M)(()=>new Map),A=(0,i.useRef)(new Set),[T,M]=(0,i.useState)(S),[P,_]=(0,i.useState)(S);(0,s.E)(()=>{E.current=!1,j.current=S;for(let e=0;e<P.length;e++){let t=y(P[e]);k.includes(t)?(C.delete(t),A.current.delete(t)):!0!==C.get(t)&&C.set(t,!1)}},[P,k.length,k.join("-")]);let I=[];if(S!==T){let e=[...S];for(let t=0;t<P.length;t++){let n=P[t],r=y(n);k.includes(r)||(e.splice(t,0,n),I.push(n))}return"wait"===d&&I.length&&(e=I),_(v(e)),M(S),null}let{forceRender:R}=(0,i.useContext)(o.L);return(0,r.jsx)(r.Fragment,{children:P.map(e=>{let t=y(e),i=(!h||!!x)&&(S===P||k.includes(t));return(0,r.jsx)(p,{isPresent:i,initial:(!E.current||!!l)&&void 0,custom:n,presenceAffectsLayout:c,mode:d,root:b,onExitComplete:i?void 0:()=>
293{if(A.current.has(t)||!C.has(t))return;A.current.add(t),C.set(t,!0);let e=!0;C.forEach(t=>{t||(e=!1)}),e&&(null==R||R(),_(j.current),h&&(null==w||w()),u&&u())},anchorX:f,anchorY:m,children:e},t)})})}}}]);

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.