(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5884],{6803:function(t){t.exports=function(){function _extends(){return(_extends=Object.assign||function(t){for(var r=1;rt.length)&&(r=t.length);for(var l=0,s=Array(r);l=t.length?{done:!0}:{done:!1,value:t[r++]}};throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}(r);!(l=s()).done;){var c=l.value,u=c[0],d=c[1];if(t===u||t===d)return u}return t}(c)]=t[c]);return new ImageUrlBuilder(this,_extends({baseUrl:l},s))},u.image=function(t){return this.withOptions({source:t})},u.dataset=function(t){return this.withOptions({dataset:t})},u.projectId=function(t){return this.withOptions({projectId:t})},u.bg=function(t){return this.withOptions({bg:t})},u.dpr=function(t){return this.withOptions({dpr:t})},u.width=function(t){return this.withOptions({width:t})},u.height=function(t){return this.withOptions({height:t})},u.focalPoint=function(t,r){return this.withOptions({focalPoint:{x:t,y:r}})},u.maxWidth=function(t){return this.withOptions({maxWidth:t})},u.minWidth=function(t){return this.withOptions({minWidth:t})},u.maxHeight=function(t){return this.withOptions({maxHeight:t})},u.minHeight=function(t){return this.withOptions({minHeight:t})},u.size=function(t,r){return this.withOptions({width:t,height:r})},u.blur=function(t){return this.withOptions({blur:t})},u.sharpen=function(t){return this.withOptions({sharpen:t})},u.rect=function(t,r,l,s){return this.withOptions({rect:{left:t,top:r,width:l,height:s}})},u.format=function(t){return this.withOptions({format:t})},u.invert=function(t){return this.withOptions({invert:t})},u.orientation=function(t){return this.withOptions({orientation:t})},u.quality=function(t){return this.withOptions({quality:t})},u.forceDownload=function(t){return this.withOptions({download:t})},u.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},u.flipVertical=function(){return this.withOptions({flipVertical:!0})},u.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},u.fit=function(t){if(-1===l.indexOf(t))throw Error('Invalid fit mode "'+t+'"');return this.withOptions({fit:t})},u.crop=function(t){if(-1===s.indexOf(t))throw Error('Invalid crop mode "'+t+'"');return this.withOptions({crop:t})},u.saturation=function(t){return this.withOptions({saturation:t})},u.auto=function(t){if(-1===c.indexOf(t))throw Error('Invalid auto mode "'+t+'"');return this.withOptions({auto:t})},u.pad=function(t){return this.withOptions({pad:t})},u.url=function(){return function(l){var s=_extends({},l||{}),c=s.source;delete s.source;var u=function(t){var r;if(!t)return null;if("string"==typeof t&&/^https?:\/\//.test(""+t))r={asset:{_ref:urlToId(t)}};else if("string"==typeof t)r={asset:{_ref:t}};else if(t&&"string"==typeof t._ref)r={asset:t};else if(t&&"string"==typeof t._id)r={asset:{_ref:t._id||""}};else if(t&&t.asset&&"string"==typeof t.asset.url)r={asset:{_ref:urlToId(t.asset.url)}};else{if("object"!=typeof t.asset)return null;r=t}return t.crop&&(r.crop=t.crop),t.hotspot&&(r.hotspot=t.hotspot),function(t){if(t.crop&&t.hotspot)return t;var r=_extends({},t);return r.crop||(r.crop={left:0,top:0,bottom:0,right:0}),r.hotspot||(r.hotspot={x:.5,y:.5,height:1,width:1}),r}(r)}(c);if(!u)return null;var d=function(r){var l=r.split("-"),s=l[1],c=l[2],u=l[3];if(!s||!c||!u)throw Error("Malformed asset _ref '"+r+"'. Expected an id like \""+t+'".');var d=c.split("x"),f=d[0],m=d[1],x=+f,j=+m;if(!(isFinite(x)&&isFinite(j)))throw Error("Malformed asset _ref '"+r+"'. Expected an id like \""+t+'".');return{id:s,width:x,height:j,format:u}}(u.asset._ref||u.asset._id||""),f=Math.round(u.crop.left*d.width),m=Math.round(u.crop.top*d.height),x={left:f,top:m,width:Math.round(d.width-u.crop.right*d.width-f),height:Math.round(d.height-u.crop.bottom*d.height-m)},j=u.hotspot.height*d.height/2,T=u.hotspot.width*d.width/2,M=u.hotspot.x*d.width,N=u.hotspot.y*d.height;return s.rect||s.focalPoint||s.ignoreImageParams||s.crop||(s=_extends(_extends({},s),function(t,r){var l,s=r.width,c=r.height;if(!(s&&c))return{width:s,height:c,rect:t.crop};var u=t.crop,d=t.hotspot,f=s/c;if(u.width/u.height>f){var m=u.height,x=m*f,j=u.top,T=(d.right-d.left)/2+d.left-x/2;Tu.left+u.width&&(T=u.left+u.width-x),l={left:Math.round(T),top:Math.round(j),width:Math.round(x),height:Math.round(m)}}else{var M=u.width,N=M/f,_=u.left,S=(d.bottom-d.top)/2+d.top-N/2;Su.top+u.height&&(S=u.top+u.height-N),l={left:Math.max(0,Math.floor(_)),top:Math.max(0,Math.floor(S)),width:Math.round(M),height:Math.round(N)}}return{width:s,height:c,rect:l}}({crop:x,hotspot:{left:M-T,top:N-j,right:M+T,bottom:N+j}},s))),function(t){var l=t.baseUrl||"https://cdn.sanity.io",s=t.asset.id+"-"+t.asset.width+"x"+t.asset.height+"."+t.asset.format,c=l+"/images/"+t.projectId+"/"+t.dataset+"/"+s,u=[];if(t.rect){var d=t.rect,f=d.left,m=d.top,x=d.width,j=d.height;(0!==f||0!==m||j!==t.asset.height||x!==t.asset.width)&&u.push("rect="+f+","+m+","+x+","+j)}t.bg&&u.push("bg="+t.bg),t.focalPoint&&(u.push("fp-x="+t.focalPoint.x),u.push("fp-y="+t.focalPoint.y));var T=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return(T&&u.push("flip="+T),r.forEach(function(r){var l=r[0],s=r[1];void 0!==t[l]?u.push(s+"="+encodeURIComponent(t[l])):void 0!==t[s]&&u.push(s+"="+encodeURIComponent(t[s]))}),0===u.length)?c:c+"?"+u.join("&")}(_extends(_extends({},s),{},{asset:d}))}(this.options)},u.toString=function(){return this.url()},ImageUrlBuilder}();return function(t){if(t&&"object"==typeof t.clientConfig){var r=t.clientConfig,l=r.apiHost,s=r.projectId,c=r.dataset;return new u(null,{baseUrl:(l||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:s,dataset:c})}return new u(null,t)}}()},12870:function(t){"use strict";t.exports=function(t){for(var r=arguments.length,l=Array(r>1?r-1:0),s=1;s0&&I(function(t){return t-1})},U={0:"violet",1:"blue",2:"magenta",3:"green",4:"violet",5:"blue",6:"magenta",7:"green",8:"violet",9:"blue",10:"magenta",11:"green"},W=T.cloneElement((0,c.jsx)(M.Z,{card:d[0],font:x,index:-1===E,themeColor:U[0],themeColorMode:O},"cloneFirst")),L=T.cloneElement((0,c.jsx)(M.Z,{card:d[d.length-1],font:x,index:E===d.length,prev:prev,style:{transform:"translate3d(-100%, 0, 0)"},themeColor:U[(null==d?void 0:d.length)-1],themeColorMode:O},"cloneLast")),handleTransitionEnd=function(){0===E?(P(!1),I(d.length)):E===d.length+1&&(P(!1),I(1))};return(0,c.jsx)("section",{className:j()(S().container,f,"sm:gap-fluid-sm pb-fluid-lg lg:pb-0 lg:mb-fluid-lg overflow-x-hidden"),style:{"--gradientColor":l},children:(0,c.jsxs)("div",{className:"flex relative h-full w-full",children:[(0,c.jsx)("button",{"aria-label":"Previous testimonial",className:S().left,onClick:prev,type:"button",children:(0,c.jsx)(m.Z,{icon:(0,c.jsx)(u.Z,{}),size:"1.5em"})}),(0,c.jsx)("div",{className:"flex h-full w-full overflow-hidden",children:(0,c.jsxs)("div",{className:j()(S().content),onTransitionEnd:function(){return handleTransitionEnd()},style:{"--cardCount":d.length+2,"--transformValue":E,transition:D?void 0:"none","--curtainGradient":null===(r=(0,N.b)(null!=l?l:"white"))||void 0===r?void 0:r.bgVar},children:[L,null==d?void 0:d.map(function(t,r){return(0,c.jsx)(M.Z,{hideLogos:k,card:t,font:x,index:E===r+1,lineLength:_,themeColor:U[r],themeColorMode:O},r)}),W]})}),(0,c.jsx)("button",{"aria-label":"Next testimonial",className:S().right,onClick:function(){E1&&l<2:c=Math.round((s=Math.round(r))*l);break;case l>=2&&l<=5.5:s=Math.round((c=Math.round(1.25*t))/l);break;case l>5.5&&l<=8:s=Math.round((c=Math.round(1.5*t))/l);break;case l>8&&l<=10:s=Math.round(1.8*r),c=Math.round(2*t);break;case l>10:c=Math.round((s=Math.round(.75*r))*l)}return{width:c,height:s}},getHomepageCarouselImageSize=function(t,r,l){var s,c;switch(!0){case l<1:c=Math.round((s=Math.round(1.5*r))*l);break;case 1===l:c=s=1.25*r;break;case l>1&&l<=2.5:c=Math.round((s=Math.round(1.25*r))*l);break;case l>2.5&&l<=3.5:c=Math.round((s=Math.round(1.3*r))*l);break;case l>3.5&&l<=5.5:c=Math.round((s=r)*l);break;case l>5.5&&l<=8:s=Math.round((c=Math.round(1.2*t))/l);break;case l>8&&l<=8.5:case l>8.5:s=Math.round((c=Math.round(1.5*t))/l)}return{width:c,height:s}},getNormalizedImageSize=function(t,r,l){var s,c;switch(!0){case l<1:s=Math.round(r/l),c=Math.round(1.5*t);break;case 1===l:s=r,c=t;break;case l>1&&l<=4:c=Math.round((s=r)*l);break;case l>4&&l<=5.5:c=Math.round((s=Math.round(1.25*r))*l);break;case l>5.5&&l<=8:c=Math.round((s=Math.round(1.5*r))*l);break;case l>8:s=Math.round(1.8*r),c=Math.round(2*t)}return{width:c,height:s}},getNormalizedHorizImageSize=function(t,r,l){var s,c;switch(!0){case l<1:s=r/l,c=1.5*t;break;case 1===l:s=r,c=t;break;case l>1&&l<=6.5:c=Math.round((s=r)*l);break;case l>6.5&&l<=8:c=Math.round((s=Math.round(1.2*r))*l);break;case l>8&&l<=10:s=Math.round(1.8*r),c=Math.round(2*t);break;case l>10:c=Math.round((s=Math.round(1.2*r))*l)}return{width:c,height:s}},getNormalizedSquareImageSize=function(t,r,l){var s,c;switch(!0){case l<1:s=Math.round(r/l),c=Math.round(1.5*t);break;case 1===l:s=r,c=t;break;case l>1&&l<=2.5:c=Math.round((s=r)*l);break;case l>2.5&&l<=5.5:c=Math.round((s=Math.round(1.25*r))*l);break;case l>5.5&&l<=8:s=Math.round(1.5*r),c=Math.round(1.5*t);break;case l>8:s=Math.round(1.8*r),c=Math.round(2*t)}return{width:c,height:s}},getOptimizedImageSize=function(t,r,l){var s,c;switch(!0){case l<1:c=Math.round((s=Math.round(1.5*r))*l);break;case 1===l:c=s=1.25*r;break;case l>1&&l<=2.5:c=Math.round((s=Math.round(1.25*r))*l);break;case l>2.5&&l<=3.5:c=Math.round((s=Math.round(1.3*r))*l);break;case l>3.5&&l<=5.5:c=Math.round((s=r)*l);break;case l>5.5&&l<=8:s=Math.round((c=Math.round(1.2*t))/l);break;case l>8&&l<=8.5:case l>8.5:s=Math.round((c=Math.round(1.5*t))/l)}return{width:c,height:s}};function getComputedImageSize(t,r,l){switch(l.type){case"horizontal-optimized":return getHorizontalNormalizedImageSize(t,r,l.aspectRatio);case"normalized":return getNormalizedImageSize(t,r,null==l?void 0:l.aspectRatio);case"normalized-horizontal":return getNormalizedHorizImageSize(t,r,null==l?void 0:l.aspectRatio);case"homepage-carousel":return getHomepageCarouselImageSize(t,r,null==l?void 0:l.aspectRatio);case"normalized-square":return getNormalizedSquareImageSize(t,r,null==l?void 0:l.aspectRatio);default:return getOptimizedImageSize(t,r,null==l?void 0:l.aspectRatio)}}},13234:function(t,r,l){"use strict";l.d(r,{l:function(){return f}});var s=l(82729),c=l(12870),u=l.n(c),d=l(84540);function _templateObject(){var t=(0,s._)(["\n byline-> {\n ...,\n avatar {\n altText,\n ","\n }\n }\n"]);return _templateObject=function(){return t},t}var f=u()(_templateObject(),d.i)},84540:function(t,r,l){"use strict";l.d(r,{i:function(){return u}});var s=l(82729),c=l(12870);function _templateObject(){var t=(0,s._)(["\n asset-> {\n url,\n metadata {\n dimensions {\n height,\n width,\n aspectRatio\n }\n }\n }\n"]);return _templateObject=function(){return t},t}var u=l.n(c)()(_templateObject())},9620:function(t,r,l){"use strict";l.d(r,{k:function(){return f}});var s=l(82729),c=l(12870),u=l.n(c),d=l(84540);function _templateObject(){var t=(0,s._)(["\n image {\n altText,\n ","\n }\n"]);return _templateObject=function(){return t},t}var f=u()(_templateObject(),d.i)},32270:function(t,r,l){"use strict";l.r(r),l.d(r,{__N_SSG:function(){return D},default:function(){return Webinars}});var s=l(24043),c=l(85893),u=l(74356),d=l(82729),f=l(34764),m=l(13234),x=l(9620);function _templateObject(){var t=(0,d._)(["\n{\n 'webinarsList': *[_type == \"webinarsList\"] | order(webinarDate asc) {\n webinarRegistrationUrl,\n ondemandUrl,\n webinarDate,\n webinarLabel,\n title,\n upcomingWebinarImage {\n asset\n },\n hosts {\n list[]-> {\n name,\n avatar {\n asset\n }\n }\n }\n },\n 'webinarsPage': *[_type == \"webinarsPage\"][0] {\n meta,\n heroHeadline,\n heroParagraph,\n upcomingWebinarsHeadline,\n upcomingWebinarsParagraph,\n ondemandWebinarsHeadline,\n ondemandWebinarsParagraph,\n testimonialsHeader,\n testimonials[]-> {\n ...,\n logo-> {\n ","\n },\n ","\n },\n endOfPageModule-> {\n cta,\n heading,\n ...,\n },\n }\n}\n"]);return _templateObject=function(){return t},t}var j=(0,f.Z)(_templateObject(),x.k,m.l),T=l(99577),M=l(25675),N=l.n(M),_=l(13608);new Intl.DateTimeFormat("en-US",{dateStyle:"long"});var formatDate=function(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})},formatTimePacific=function(t){return new Date(t).toLocaleTimeString("en-US",{hour:"numeric",hour12:!0,timeZone:"America/Los_Angeles"})},formatTimeEastern=function(t){return new Date(t).toLocaleTimeString("en-US",{hour:"numeric",hour12:!0,timeZone:"America/New_York"})},S=l(57990);function WebinarHero(t){var r,l=t.upcomingWebinar,s=t.heroHeadline,u=t.heroParagraph,d=new Date,f=(null==l?void 0:null===(r=l.upcomingWebinarImage)||void 0===r?void 0:r.asset)?(0,_.ZP)(null==l?void 0:l.upcomingWebinarImage.asset).url():void 0,m=new Date(null==l?void 0:l.webinarDate),x=formatDate(m),j=new Date(m.getTime()+36e5).getTime()-d.getTime()<36e5,M="".concat(formatTimePacific(null==l?void 0:l.webinarDate)," PT | ").concat(formatTimeEastern(null==l?void 0:l.webinarDate))+" ET";return(0,c.jsx)("header",{className:"".concat(l?"py-fluid-md bg-gradient-to-r from-white via-thd-color-violet-20 to-thd-color-violet-20":"py-fluid-sm bg-thd-color-violet-20"),children:(0,c.jsx)("div",{className:"thd-container-max ",children:(0,c.jsxs)("div",{className:"flex flex-wrap ".concat(l?"justify-between":"justify-center"," items-center"),children:[(0,c.jsxs)("div",{className:"mb-24 lg:mb-0 ".concat(l?"lg:w-3/12":"text-center lg:w-4/12"),children:[(0,c.jsx)("h1",{className:"text-5xl md:text-7xl font-medium text-thd-color-violet-90 tracking-tighter mb-lg",children:null!=s?s:"Webinars"}),(0,c.jsx)("p",{className:"text-xl text-thd-color-grey-90 leading-normal",children:null!=u?u:"Tune in to webinars live, or watch them on-demand. Our monthly webinar series spotlights Loom experts, partners, and friends."})]}),l&&(0,c.jsx)("div",{className:"lg:w-8/12 ",children:(0,c.jsx)("div",{className:"bg-white thd-shadow lg:shadow-none thd-rounded-int p-24 xl:p-40",children:(0,c.jsxs)("div",{className:"flex items-center flex-wrap -mx-12 xl:-mx-24",children:[(0,c.jsx)("div",{className:"w-full lg:w-7/12 px-12 xl:px-24 mb-24 lg:mb-0",children:f&&(0,c.jsx)("div",{children:(0,c.jsx)(N(),{src:f,alt:null==l?void 0:l.title,width:600,height:400,className:"rounded-md w-full"})})}),(0,c.jsxs)("div",{className:"w-ful lg:w-5/12 px-12 xl:px-24",children:[(0,c.jsx)(S.DRh,{className:"text-xs mb-18 uppercase font-medium\n ".concat(j?"bg-thd-color-green-20 text-thd-color-green-90":"bg-thd-color-violet-20 text-thd-color-violet-90"),children:j?"In Progress":"Upcoming"}),(0,c.jsx)("h2",{className:"text-thd-color-grey-90 tracking-tighter text-3xl md:text-4xl font-medium mb-md",children:null==l?void 0:l.title}),(0,c.jsxs)("p",{className:"uppercase text-sm mb-lg text-thd-color-grey-80 font-medium",children:[x," ",M]}),l.webinarRegistrationUrl&&(0,c.jsx)(T.Z,{buttonType:"primary",color:"violet-60",cta:{copy:"".concat(j?"Join in progress webinar":"Register Now"),link:l.webinarRegistrationUrl},size:"lg",type:"primary",icon:"arrow-right",iconPosition:"right",iconGap:"gap-[.5em]"})]})]})})})]})})})}var O=l(47861),k={"violet-20":{pillBgColor:"bg-thd-color-violet-80",bgColor:"bg-thd-color-violet-20",textColor:"text-thd-color-violet-90",dateTextColor:"text-thd-color-violet-90"},"violet-60":{pillBgColor:"bg-thd-color-violet-80",bgColor:"bg-thd-color-violet-60",textColor:"text-thd-color-violet-10",dateTextColor:"text-thd-color-violet-20"},"violet-80":{pillBgColor:"bg-thd-color-violet-70",bgColor:"bg-thd-color-violet-80",textColor:"text-thd-color-violet-10",dateTextColor:"text-thd-color-violet-20"}};function WebinarCard(t){var r=t.webinar,l=function(t){switch(t){case"Speaker Notes":default:return"violet-20";case"Loom 101":return"violet-60";case"Atlassian Webinar":return"violet-80"}}(r.webinarLabel),s=formatDate(null==r?void 0:r.webinarDate),u="".concat(formatTimePacific(null==r?void 0:r.webinarDate)," PT | ").concat(formatTimeEastern(null==r?void 0:r.webinarDate)," ET"),d=new Date,f=new Date(r.webinarDate)T}),H=R[0],Z=R.slice(1),A=M.filter(function(t){return new Date(t.webinarDate)0&&(0,c.jsx)("section",{className:"py-fluid-sm lg:py-fluid-md",children:(0,c.jsxs)("div",{className:"thd-container-max",children:[D&&(0,c.jsx)(WebinarSectionHeader,{headline:D,paragraph:P}),(0,c.jsx)(WebinarGrid,{webinars:Z})]})}),A.length>0&&(0,c.jsx)("section",{id:"on-demand",className:"py-fluid-sm lg:py-fluid-md scroll-my-100 ".concat(Z.length>0&&"bg-thd-color-violet-10"),children:(0,c.jsxs)("div",{className:"thd-container-max",children:[O&&(0,c.jsx)(WebinarSectionHeader,{headline:O,paragraph:k}),(0,c.jsx)(WebinarGrid,{webinars:B})]})}),(0,c.jsx)("section",{className:"pt-fluid-sm lg:pt-fluid-md",children:(0,c.jsx)("div",{className:"thd-container-max",children:(0,c.jsx)(WebinarSectionHeader,{headline:W})})}),L&&(0,c.jsx)(z.Z,{bgVar:"white",cards:L}),(null==U?void 0:U.cta)&&(0,c.jsx)(I.Z,{cta:null==U?void 0:U.cta,heading:null==U?void 0:U.heading})]})}},22828:function(t){t.exports={container:"ThreadTestimonialCarousel_container__3hu57",left:"ThreadTestimonialCarousel_left__ioRt3",right:"ThreadTestimonialCarousel_right__9bhB0",content:"ThreadTestimonialCarousel_content__ODboU",avatar:"ThreadTestimonialCarousel_avatar__3d3SV"}},40275:function(t,r,l){"use strict";let s;l.d(r,{Kx:function(){return w},T:function(){return g},o_:function(){return v}});var c=l(67294);let u=new Uint8Array(16),d=[];for(let t=0;t<256;++t)d.push((t+256).toString(16).slice(1));var f={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let m=["channel/disconnect","channel/response","channel/heartbeat"],x=["handshake/syn","handshake/syn-ack","handshake/ack"],p=t=>m.some(r=>r===t),h=t=>x.some(r=>r===t),y=({data:t={}})=>"object"==typeof t&&null!==t&&!Array.isArray(t)&&!("domain"in t)&&["id","type","from","to"].every(r=>r in t)&&t.type.startsWith("handshake/");function g(t,r,l){let[m,x]=(0,c.useState)(),[j,T]=(0,c.useState)(!1);(0,c.useEffect)(()=>{if(window.self===window.top&&!window.opener)return;let t=function(t){let r=window.self!==window.top||window.opener,l={buffer:[],id:null,origin:null,source:null,status:"connecting"};function o(r,c){if(h(r)||p(r)||"connecting"!==l.status&&"reconnecting"!==l.status){if(l.id&&l.origin&&l.source){let m={connectionId:l.id,data:c,domain:"sanity/channels",from:t.id,id:function(t,r,l){if(f.randomUUID&&!t)return f.randomUUID();let c=(t=t||{}).random||(t.rng||function(){if(!s&&!(s="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return s(u)})();return c[6]=15&c[6]|64,c[8]=63&c[8]|128,function(t,r=0){return d[t[r+0]]+d[t[r+1]]+d[t[r+2]]+d[t[r+3]]+"-"+d[t[r+4]]+d[t[r+5]]+"-"+d[t[r+6]]+d[t[r+7]]+"-"+d[t[r+8]]+d[t[r+9]]+"-"+d[t[r+10]]+d[t[r+11]]+d[t[r+12]]+d[t[r+13]]+d[t[r+14]]+d[t[r+15]]}(c)}(),to:t.connectTo,type:r};try{l.source.postMessage(m,{targetOrigin:l.origin})}catch{throw Error(`Failed to postMessage '${m.id}' on '${t.id}'`)}}}else l.buffer.push({type:r,data:c})}function i(r){if(y(r))console.error("Visual editing package mismatch detected! Please ensure you are using the latest version of Sanity Studio and any packages listed here:\nhttps://github.com/sanity-io/visual-editing");else if(function(r){let{data:l}=r;return"sanity/channels"===l.domain&&l.to===t.id&&l.from===t.connectTo&&"channel/response"!==l.type}(r)){let{data:t}=r;if(l.origin&&r.origin!==l.origin)return;if(r.source&&l.source!==r.source&&(l.source=r.source),h(t.type)&&t.data){if("handshake/syn"===t.type)return l.origin=r.origin,l.id=t.data.id,a("connecting"),void o("handshake/syn-ack",{id:l.id});if("handshake/ack"===t.type&&t.data.id===l.id)return void a("connected")}else if(t.connectionId===l.id&&r.origin===l.origin){if("channel/disconnect"===t.type)return void a("disconnected");{let r=[t.type,t.data];c.forEach(t=>{t(...r)}),o("channel/response",{responseTo:t.id})}return}}}let c=new Set,m=new Set;function a(t){l.status=t,m.forEach(r=>{r(t)}),"connected"===t&&function(){let t=[...l.buffer];l.buffer.splice(0,l.buffer.length),t.forEach(({type:t,data:r})=>{o(t,r)})}()}return window.addEventListener("message",i,!1),a("connecting"),{destroy:function(){["disconnected"].includes(l.status)||a("disconnected"),c.clear(),m.clear(),window.removeEventListener("message",i,!1)},inFrame:r,send:function(t,r){o(t,r)},subscribe:function(t){return c.add(t),()=>c.delete(t)},onStatusUpdate:function(t){return m.add(t),()=>m.delete(t)}}}({id:"preview-kit",connectTo:"presentation"});t.onStatusUpdate(t=>{"connected"===t?T(!0):"disconnected"===t&&T(!1)});let r=setTimeout(()=>x(t),0);return()=>{clearTimeout(r),t.destroy(),x(void 0)}},[l,r]);let M=JSON.stringify(Array.from(t.keys()));(0,c.useEffect)(()=>{"[]"!==M&&m&&j&&m.send("preview-kit/documents",{projectId:r,dataset:l,perspective:"previewDrafts",documents:Array.from(t.values())})},[M,m,j,l,t,r])}function w(t){let r=(0,c.useMemo)(()=>JSON.stringify(t||{}),[t]);return(0,c.useMemo)(()=>JSON.parse(r),[r])}function v(t){let{refreshInterval:r}=t,l=function(){let[t,r]=(0,c.useState)(!1);(0,c.useEffect)(()=>{r(navigator.onLine);let e=()=>r(!0),n=()=>r(!1);return window.addEventListener("online",e),window.addEventListener("offline",n),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}},[]);let l=(0,c.useSyncExternalStore)(b,()=>document.visibilityState,()=>"hidden");return!t||"hidden"===l}(),[s,u]=(0,c.useState)("hit"),d=(0,c.useCallback)(()=>(u("inflight"),()=>u("hit")),[]);return(0,c.useEffect)(()=>{if(!r||"hit"!==s)return;let t=setTimeout(()=>u("stale"),r);return()=>clearTimeout(t)},[r,s]),(0,c.useEffect)(()=>{if("hit"!==s)return;let e=()=>u("stale");return window.addEventListener("focus",e),()=>window.removeEventListener("focus",e)},[r,s]),(0,c.useEffect)(()=>{l&&"hit"===s&&u("stale"),l||"stale"!==s||u("refresh")},[l,s]),[s,d]}function b(t){return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)}},80684:function(t,r,l){"use strict";l.d(r,{d:function(){return c}});var s=l(67294);let c=(0,s.createContext)(null)},74356:function(t,r,l){"use strict";l.d(r,{Ji:function(){return O},yR:function(){return g}});var s,c,u=l(40275),d=l(67294),f=l(80684),m="u">typeof Element,x="function"==typeof Map,j="function"==typeof Set,T="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView,M=(s=function(t,r){try{return function v(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){var l,s,c,u;if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((l=t.length)!=r.length)return!1;for(s=l;0!=s--;)if(!v(t[s],r[s]))return!1;return!0}if(x&&t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(u=t.entries();!(s=u.next()).done;)if(!r.has(s.value[0]))return!1;for(u=t.entries();!(s=u.next()).done;)if(!v(s.value[1],r.get(s.value[0])))return!1;return!0}if(j&&t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(u=t.entries();!(s=u.next()).done;)if(!r.has(s.value[0]))return!1;return!0}if(T&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if((l=t.length)!=r.length)return!1;for(s=l;0!=s--;)if(t[s]!==r[s])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf&&"function"==typeof t.valueOf&&"function"==typeof r.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString&&"function"==typeof t.toString&&"function"==typeof r.toString)return t.toString()===r.toString();if((l=(c=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(s=l;0!=s--;)if(!Object.prototype.hasOwnProperty.call(r,c[s]))return!1;if(m&&t instanceof Element)return!1;for(s=l;0!=s--;)if(("_owner"!==c[s]&&"__v"!==c[s]&&"__o"!==c[s]||!t.$$typeof)&&!v(t[c[s]],r[c[s]]))return!1;return!0}return t!=t&&r!=r}(t,r)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}).__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s,N={exports:{}},_={};/** * @license React * use-sync-external-store-with-selector.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */N.exports=function(){if(c)return _;c=1;var t="function"==typeof Object.is?Object.is:function(t,r){return t===r&&(0!==t||1/t==1/r)||t!=t&&r!=r},r=d.useSyncExternalStore,l=d.useRef,s=d.useEffect,u=d.useMemo,f=d.useDebugValue;return _.useSyncExternalStoreWithSelector=function(c,d,m,x,j){var T=l(null);if(null===T.current){var M={hasValue:!1,value:null};T.current=M}else M=T.current;var N=r(c,(T=u(function(){function e(c){if(!s){if(s=!0,r=c,c=x(c),void 0!==j&&M.hasValue){var u=M.value;if(j(u,c))return l=u}return l=c}if(u=l,t(r,c))return u;var d=x(c);return void 0!==j&&j(u,d)?u:(r=c,l=d)}var r,l,s=!1,c=void 0===m?null:m;return[function(){return e(d())},null===c?void 0:function(){return e(c())}]},[d,m,x,j]))[0],T[1]);return s(function(){M.hasValue=!0,M.value=N},[N]),f(N),N},_}();var S=N.exports;function g(t,r,l,s){let{isEqual:c=M}=s||{},m=(0,d.useContext)(f.d),x=(0,u.Kx)(l),j=(0,d.useMemo)(()=>({subscribe:()=>()=>{},getSnapshot:()=>t}),[t]),T=(0,d.useMemo)(()=>(null==m?void 0:m(t,r,x))||{subscribe:()=>()=>{},getSnapshot:()=>t},[m,t,x,r]),[N]=(0,d.useState)(()=>{if(void 0===t)throw Error("initialSnapshot can't be undefined, if you don't want an initial value use null instead");try{return JSON.parse(JSON.stringify(t))}catch(r){return console.warn("Failed to deep clone initialSnapshot, this is likely an error and an indication that the snapshot isn't JSON serializable",{initialSnapshot:t,error:r}),t}}),_=(0,d.useCallback)(()=>N,[N]),O=(0,d.useCallback)(t=>t,[]),k=S.useSyncExternalStoreWithSelector((null==T?void 0:T.subscribe)||j.subscribe,(null==T?void 0:T.getSnapshot)||j.getSnapshot,_,O,c),C=null!==m;return[k,C&&N===k,C]}let O=(0,d.lazy)(()=>l.e(6166).then(l.bind(l,46166)))},34764:function(t,r,l){"use strict";function groq(t,...r){let l=t.length-1;return t.slice(0,l).reduce((t,l,s)=>t+l+r[s],"")+t[l]}l.d(r,{Z:function(){return groq}})}},function(t){t.O(0,[6413,8747,5675,476,3228,1033,4499,1528,963,7202,8100,7837,6671,9774,2888,179],function(){return t(t.s=56749)}),_N_E=t.O()}]);