1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a81ff028-263d-41a2-82c8-af0627d03ee6",e._sentryDebugIdIdentifier="sentry-dbid-a81ff028-263d-41a2-82c8-af0627d03ee6")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1319],{16497:function(e){e.exports=function(){function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t(){return(t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var r="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function n(e){return("image-"+e.split("/").slice(-1)[0]).replace(/\.([a-z]+)$/,"-$1")}var i=[["width","w"],["height","h"],["format","fm"],["download","dl"],["blur","blur"],["sharpen","sharp"],["invert","invert"],["orientation","or"],["minHeight","min-h"],["maxHeight","max-h"],["minWidth","min-w"],["maxWidth","max-w"],["quality","q"],["fit","fit"],["crop","crop"],["saturation","sat"],["auto","auto"],["dpr","dpr"],["pad","pad"],["frame","frame"]],s=["clip","crop","fill","fillmax","max","scale","min"],o=["top","bottom","left","right","center","focalpoint","entropy"],a=["format"],u=function(){function u(e,r){this.options=void 0,this.options=e?t({},e.options||{},r||{}):t({},r||{})}var c=u.prototype;return c.withOptions=function(r){var n=r.baseUrl||this.options.baseUrl,s={baseUrl:n};for(var o in r)r.hasOwnProperty(o)&&(s[function(t){for(var r,n=function(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,r){if(t){if("string"==typeof t)return e(t,void 0);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,r):void 0}}(t))){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(i);!(r=n()).done;){var s=r.value,o=s[0],a=s[1];if(t===o||t===a)return o}return t}(o)]=r[o]);return new u(this,t({baseUrl:n},s))},c.image=function(e){return this.withOptions({source:e})},c.dataset=function(e){return this.withOptions({dataset:e})},c.projectId=function(e){return this.withOptions({projectId:e})},c.bg=function(e){return this.withOptions({bg:e})},c.dpr=function(e){return this.withOptions(e&&1!==e?{dpr:e}:{})},c.width=function(e){return this.withOptions({width:e})},c.height=function(e){return this.withOptions({height:e})},c.focalPoint=function(e,t){return this.withOptions({focalPoint:{x:e,y:t}})},c.maxWidth=function(e){return this.withOptions({maxWidth:e})},c.minWidth=function(e){return this.withOptions({minWidth:e})},c.maxHeight=function(e){return this.withOptions({maxHeight:e})},c.minHeight=function(e){return this.withOptions({minHeight:e})},c.size=function(e,t){return this.withOptions({width:e,height:t})},c.blur=function(e){return this.withOptions({blur:e})},c.sharpen=function(e){return this.withOptions({sharpen:e})},c.rect=function(e,t,r,n){return this.withOptions({rect:{left:e,top:t,width:r,height:n}})},c.format=function(e){return this.withOptions({format:e})},c.invert=function(e){return this.withOptions({invert:e})},c.orientation=function(e){return this.withOptions({orientation:e})},c.quality=function(e){return this.withOptions({quality:e})},c.forceDownload=function(e){return this.withOptions({download:e})},c.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},c.flipVertical=function(){return this.withOptions({flipVertical:!0})},c.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},c.fit=function(e){if(-1===s.indexOf(e))throw Error('Invalid fit mode "'+e+'"');return this.withOptions({fit:e})},c.crop=function(e){if(-1===o.indexOf(e))throw Error('Invalid crop mode "'+e+'"');return this.withOptions({crop:e})},c.saturation=function(e){return this.withOptions({saturation:e})},c.auto=function(e){if(-1===a.indexOf(e))throw Error('Invalid auto mode "'+e+'"');return this.withOptions({auto:e})},c.pad=function(e){return this.withOptions({pad:e})},c.vanityName=function(e){return this.withOptions({vanityName:e})},c.frame=function(e){if(1!==e)throw Error('Invalid frame value "'+e+'"');return this.withOptions({frame:e})},c.url=function(){return function(e){var s=t({},e||{}),o=s.source;delete s.source;var a=function(e){var r,i;if(!e)return null;if("string"==typeof e&&(i=e,/^https?:\/\//.test(""+i)))r={asset:{_ref:n(e)}};else if("string"==typeof e)r={asset:{_ref:e}};else if(e&&"string"==typeof e._ref)r={asset:e};else if(e&&"string"==typeof e._id)r={asset:{_ref:e._id||""}};else if(e&&e.asset&&"string"==typeof e.asset.url)r={asset:{_ref:n(e.asset.url)}};else{if("object"!=typeof e.asset)return null;r=t({},e)}return e.crop&&(r.crop=e.crop),e.hotspot&&(r.hotspot=e.hotspot),function(e){if(e.crop&&e.hotspot)return e;var r=t({},e);
1return 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)}(o);if(!a){if(o&&"object"==typeof o&&null!==o&&o._upload&&(!o.asset||!o.asset._ref))return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8HwQACfsD/QNViZkAAAAASUVORK5CYII=";throw Error("Unable to resolve image URL from source ("+JSON.stringify(o)+")")}var u=function(e){var t=e.split("-"),n=t[1],i=t[2],s=t[3];if(!n||!i||!s)throw Error("Malformed asset _ref '"+e+"'. Expected an id like \""+r+'".');var o=i.split("x"),a=o[0],u=o[1],c=+a,l=+u;if(!(isFinite(c)&&isFinite(l)))throw Error("Malformed asset _ref '"+e+"'. Expected an id like \""+r+'".');return{id:n,width:c,height:l,format:s}}(a.asset._ref||a.asset._id||""),c=Math.round(a.crop.left*u.width),l=Math.round(a.crop.top*u.height),h={left:c,top:l,width:Math.round(u.width-a.crop.right*u.width-c),height:Math.round(u.height-a.crop.bottom*u.height-l)},p=a.hotspot.height*u.height/2,d=a.hotspot.width*u.width/2,f=a.hotspot.x*u.width,y=a.hotspot.y*u.height;return s.rect||s.focalPoint||s.ignoreImageParams||s.crop||(s=t({},s,function(e,t){var r,n=t.width,i=t.height;if(!(n&&i))return{width:n,height:i,rect:e.crop};var s=e.crop,o=e.hotspot,a=n/i;if(s.width/s.height>a){var u=Math.round(s.height),c=Math.round(u*a),l=Math.max(0,Math.round(s.top)),h=Math.max(0,Math.round(Math.round((o.right-o.left)/2+o.left)-c/2));h<s.left?h=s.left:h+c>s.left+s.width&&(h=s.left+s.width-c),r={left:h,top:l,width:c,height:u}}else{var p=s.width,d=Math.round(p/a),f=Math.max(0,Math.round(s.left)),y=Math.max(0,Math.round(Math.round((o.bottom-o.top)/2+o.top)-d/2));y<s.top?y=s.top:y+d>s.top+s.height&&(y=s.top+s.height-d),r={left:f,top:y,width:p,height:d}}return{width:n,height:i,rect:r}}({crop:h,hotspot:{left:f-d,top:y-p,right:f+d,bottom:y+p}},s))),function(e){var t=(e.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),r=e.vanityName?"/"+e.vanityName:"",n=e.asset.id+"-"+e.asset.width+"x"+e.asset.height+"."+e.asset.format+r,s=t+"/images/"+e.projectId+"/"+e.dataset+"/"+n,o=[];if(e.rect){var a=e.rect,u=a.left,c=a.top,l=a.width,h=a.height;(0!==u||0!==c||h!==e.asset.height||l!==e.asset.width)&&o.push("rect="+u+","+c+","+l+","+h)}e.bg&&o.push("bg="+e.bg),e.focalPoint&&(o.push("fp-x="+e.focalPoint.x),o.push("fp-y="+e.focalPoint.y));var p=[e.flipHorizontal&&"h",e.flipVertical&&"v"].filter(Boolean).join("");
1return(p&&o.push("flip="+p),i.forEach(function(t){var r=t[0],n=t[1];void 0!==e[r]?o.push(n+"="+encodeURIComponent(e[r])):void 0!==e[n]&&o.push(n+"="+encodeURIComponent(e[n]))}),0===o.length)?s:s+"?"+o.join("&")}(t({},s,{asset:u}))}(this.options)},c.toString=function(){return this.url()},u}();return function(e){if(e&&"config"in e&&"function"==typeof e.config){var t=e.config(),r=t.apiHost,n=t.projectId,i=t.dataset;return new u(null,{baseUrl:(r||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:n,dataset:i})}if(e&&"clientConfig"in e&&"object"==typeof e.clientConfig){var s=e.clientConfig,o=s.apiHost,a=s.projectId,c=s.dataset;return new u(null,{baseUrl:(o||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:a,dataset:c})}return new u(null,e||{})}}()},76135:(e,t,r)=>{"use strict";function n(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}r.d(t,{Q:()=>u,u4:()=>n});var i={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},s={0:8203,1:8204,2:8205,3:65279};[,,,,].fill(String.fromCodePoint(s[0])).join(""),Object.fromEntries(Object.entries(s).map(e=>e.reverse())),Object.fromEntries(Object.entries(i).map(e=>e.reverse()));var o=`${Object.values(i).map(e=>`\\u{${e.toString(16)}}`).join("")}`,a=RegExp(`[${o}]{4,}`,"gu");function u(e){var t,r;return e&&JSON.parse({cleaned:(t=JSON.stringify(e)).replace(a,""),encoded:(null==(r=t.match(a))?void 0:r[0])||""}.cleaned)}},81991:(e,t,r)=>{"use strict";r.d(t,{UU:()=>r2});let n=!(typeof navigator>"u")&&"ReactNative"===navigator.product,i={timeout:n?6e4:12e4},s=function(e){let t={...i,..."string"==typeof e?{url:e}:e};if(t.timeout=function e(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;let r=Number(t);return isNaN(r)?e(i.timeout):{connect:r,socket:r}}(t.timeout),t.query){let{url:e,searchParams:r}=function(e){let t=e.indexOf("?");if(-1===t)return{url:e,searchParams:new URLSearchParams};let r=e.slice(0,t),i=e.slice(t+1);if(!n)return{url:r,searchParams:new URLSearchParams(i)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let s=new URLSearchParams;for(let e of i.split("&")){let[t,r]=e.split("=");t&&s.append(o(t),o(r||""))}return{url:r,searchParams:s}}(t.url);for(let[n,i]of Object.entries(t.query)){if(void 0!==i)if(Array.isArray(i))for(let e of i)r.append(n,e);else r.append(n,i);let s=r.toString();s&&(t.url=`${e}?${s}`)}}return t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t};function o(e){return decodeURIComponent(e.replace(/\+/g," "))}let a=/^https?:\/\//i,u=function(e){if(!a.test(e.url))throw Error(`"${e.url}" is not a valid URL`)},c=["request","response","progress","error","abort"],l=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var h,p,d=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(function(){if(p)return h;p=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")};return h=function(t){if(!t)return{};for(var r=Object.create(null),n=e(t).split("\n"),i=0;i<n.length;i++){var s,o=n[i],a=o.indexOf(":"),u=e(o.slice(0,a)).toLowerCase(),c=e(o.slice(a+1));typeof r[u]>"u"?r[u]=c:(s=r[u],"[object Array]"===Object.prototype.toString.call(s))?r[u].push(c):r[u]=[r[u],c]}return r}}());class f{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#e;#t;#r;#n={};#i;#s={};#o;open(e,t,r){this.#e=e,this.#t=t,this.#r="",this.readyState=1,this.onreadystatechange?.(),this.#i=void 0}abort(){this.#i&&this.#i.abort()}getAllResponseHeaders(){return this.#r}setRequestHeader(e,t){this.#n[e]=t}setInit(e,t=!0){this.#s=e,this.#o=t}send(e){let t="arraybuffer"!==this.responseType,r={...this.#s,method:this.#e,headers:this.#n,body:e};"function"==typeof AbortController&&this.#o&&(this.#i=new AbortController,"u">typeof EventTarget&&this.#i.signal instanceof EventTarget&&(r.signal=this.#i.signal)),"u">typeof document&&(r.credentials=this.withCredentials?"include":"omit"),fetch(this.#t,r).then(e=>
1(e.headers.forEach((e,t)=>{this.#r+=`${t}: ${e}\r 2`}),this.status=e.status,this.statusText=e.statusText,this.readyState=3,this.onreadystatechange?.(),t?e.text():e.arrayBuffer())).then(e=>{"string"==typeof e?this.responseText=e:this.response=e,this.readyState=4,this.onreadystatechange?.()}).catch(e=>{"AbortError"!==e.name?this.onerror?.(e):this.onabort?.()})}}let y="function"==typeof XMLHttpRequest?"xhr":"fetch",g="xhr"===y?XMLHttpRequest:f,m=(e,t)=>{let r=e.options,n=e.applyMiddleware("finalizeOptions",r),i={},s=e.applyMiddleware("interceptRequest",void 0,{adapter:y,context:e});if(s){let e=setTimeout(t,0,null,s);return{abort:()=>clearTimeout(e)}}let o=new g;o instanceof f&&"object"==typeof n.fetch&&o.setInit(n.fetch,n.useAbortSignal??!0);let a=n.headers,u=n.timeout,c=!1,l=!1,h=!1;if(o.onerror=e=>{b(o instanceof f?e instanceof Error?e:Error(`Request error while attempting to reach is ${n.url}`,{cause:e}):Error(`Request error while attempting to reach is ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.ontimeout=e=>{b(Error(`Request timeout while attempting to reach ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.onabort=()=>{m(!0),c=!0},o.onreadystatechange=function(){u&&(m(),i.socket=setTimeout(()=>p("ESOCKETTIMEDOUT"),u.socket)),!c&&o&&4===o.readyState&&0!==o.status&&function(){if(!(c||l||h)){if(0===o.status)return b(Error("Unknown XHR error"));m(),l=!0,t(null,{body:o.response||(""===o.responseType||"text"===o.responseType?o.responseText:""),url:n.url,method:n.method,headers:d(o.getAllResponseHeaders()),statusCode:o.status,statusMessage:o.statusText})}}()},o.open(n.method,n.url,!0),o.withCredentials=!!n.withCredentials,a&&o.setRequestHeader)for(let e in a)a.hasOwnProperty(e)&&o.setRequestHeader(e,a[e]);return n.rawBody&&(o.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:n,adapter:y,request:o,context:e}),o.send(n.body||null),u&&(i.connect=setTimeout(()=>p("ETIMEDOUT"),u.connect)),{abort:function(){c=!0,o&&o.abort()}};function p(t){h=!0,o.abort();let r=Error("ESOCKETTIMEDOUT"===t?`Socket timed out on request to ${n.url}`:`Connection timed out on request to ${n.url}`);r.code=t,e.channels.error.publish(r)}function m(e){(e||c||o&&o.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function b(e){if(l)return;m(!0),l=!0,o=null;let r=e||Error(`Network error while attempting to reach ${n.url}`);r.isNetworkError=!0,r.request=n,t(r)}};var b,v,w,C,E,R=r(81798),q=r(15599).hp,x={exports:{}};E||(E=1,function(e,t){let r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch{}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!e&&"u">typeof R&&"env"in R&&(e=R.env.DEBUG),e},t.useColors=function(){let e;return"u">typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch{}}(),r=!1,t.destroy=()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33
2CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=(C?w:(C=1,w=function(e){function t(e){let n,i,s,o=null;function a(...e){if(!a.enabled)return;let r=Number(new Date);a.diff=r-(n||r),a.prev=n,a.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";i++;let s=t.formatters[n];if("function"==typeof s){let t=e[i];r=s.call(a,t),e.splice(i,1),i--}return r}),t.formatArgs.call(a,e),(a.log||t.log).apply(a,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){let n=t(this.namespace+(typeof r>"u"?":":r)+e);return n.log=this.log,n}function n(e,t){let r=0,n=0,i=-1,s=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(i=n,s=r):r++,n++;else{if(-1===i)return!1;n=i+1,r=++s}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){for(let r of(t.save(e),t.namespaces=e,t.names=[],t.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===r[0]?t.skips.push(r.slice(1)):t.names.push(r)},t.enabled=function(e){for(let r of t.skips)if(n(e,r))return!1;for(let r of t.names)if(n(e,r))return!0;return!1},t.humanize=function(){if(v)return b;v=1;function e(e,t,r,n){return Math.round(e/r)+" "+n+(t>=1.5*r?"s":"")}return b=function(t,r){r=r||{};var n,i,s=typeof t;if("string"===s&&t.length>0){var o=t;if(!((o=String(o)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(a){var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*u;case"weeks":case"week":case"w":return 6048e5*u;case"days":case"day":case"d":return 864e5*u;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*u;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*u;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u}}}return}if("number"===s&&isFinite(t))return r.long?(i=Math.abs(t))>=864e5?e(t,i,864e5,"day"):i>=36e5?e(t,i,36e5,"hour"):i>=6e4?e(t,i,6e4,"minute"):i>=1e3?e(t,i,1e3,"second"):t+" ms":(n=Math.abs(t))>=864e5?Math.round(t/864e5)+"d":n>=36e5?Math.round(t/36e5)+"h":n>=6e4?Math.round(t/6e4)+"m":n>=1e3?Math.round(t/1e3)+"s":t+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t)|0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}))(t);let{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(x,x.exports)),x.exports,Object.prototype.hasOwnProperty;let I=typeof q>"u"?()=>!1:e=>q.isBuffer(e);function O(e){return"[object Object]"===Object.prototype.toString.call(e)}let _=["boolean","string","number"],$={};"u">typeof globalThis?$=globalThis:"u">typeof window?$=window:"u">typeof global?$=global:"u">typeof self&&($=self);var A=$;let j=(e={})=>{let t=e.implementation||Promise;if(!t)throw Error("`Promise` is not available in global scope, and n
2o implementation was passed");return{onReturn:(r,n)=>new t((t,i)=>{let s=n.options.cancelToken;s&&s.promise.then(e=>{r.abort.publish(e),i(e)}),r.error.subscribe(i),r.response.subscribe(r=>{t(e.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(e){i(e)}},0)})}};class T{__CANCEL__=!0;message;constructor(e){this.message=e}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class S{promise;reason;constructor(e){if("function"!=typeof e)throw TypeError("executor must be a function.");let t=null;this.promise=new Promise(e=>{t=e}),e(e=>{this.reason||(this.reason=new T(e),t(this.reason))})}static source=()=>{let e;return{token:new S(t=>{e=t}),cancel:e}}}j.Cancel=T,j.CancelToken=S,j.isCancel=e=>!(!e||!e?.__CANCEL__);var P=(e,t,r)=>("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1);function D(e){return 100*Math.pow(2,e)+100*Math.random()}let F=(e={})=>(e=>{let t=e.maxRetries||5,r=e.retryDelay||D,n=e.shouldRetry;return{onError:(e,i)=>{var s;let o=i.options,a=o.maxRetries||t,u=o.retryDelay||r,c=o.shouldRetry||n,l=o.attemptNumber||0;if(null!==(s=o.body)&&"object"==typeof s&&"function"==typeof s.pipe||!c(e,l,o)||l>=a)return e;let h=Object.assign({},i,{options:Object.assign({},o,{attemptNumber:l+1})});return setTimeout(()=>i.channels.request.publish(h),u(l)),null}}})({shouldRetry:P,...e});F.shouldRetry=P;var M=r(80594);function k(e){return"function"==typeof e}function U(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var z=U(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function N(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var V=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,r,n,i,s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var o=(0,M.Ju)(s),a=o.next();!a.done;a=o.next())a.value.remove(this)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else s.remove(this);var u=this.initialTeardown;if(k(u))try{u()}catch(e){i=e instanceof z?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=(0,M.Ju)(c),h=l.next();!h.done;h=l.next()){var p=h.value;try{W(p)}catch(e){i=null!=i?i:[],e instanceof z?i=(0,M.fX)((0,M.fX)([],(0,M.zs)(i)),(0,M.zs)(e.errors)):i.push(e)}}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(i)throw new z(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)W(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(r=this._finalizers)?r:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&N(t,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&N(r,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}(),L=V.EMPTY;function H(e){return e instanceof V||e&&"closed"in e&&k(e.remove)&&k(e.add)&&k(e.unsubscribe)}function W(e){k(e)?e():e.unsubscribe()}var B={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},G={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=G.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,(0,M.fX)([e,t],(0,M.zs)(r))):setTimeout.apply(void 0,(0,M.fX)([e,t],(0,M.zs)(r)))},clearTimeout:function(e){var t=G.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function J(e){G.setTimeout(function(){var t=B.onUnhandledError;if(t)t(e);else throw e})}function X(){}var Y=Q("C",void 0,void 0);function Q(e,t,r){return{kind:e,value:t,error:r}}var K=null;function Z(e){if(B.useDeprecatedSynchronousErrorHandling){var t=!K;
2if(t&&(K={errorThrown:!1,error:null}),e(),t){var r=K,n=r.errorThrown,i=r.error;if(K=null,n)throw i}}else e()}var ee=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,H(t)&&t.add(r)):r.destination=ea,r}return(0,M.C6)(t,e),t.create=function(e,t,r){return new ei(e,t,r)},t.prototype.next=function(e){this.isStopped?eo(Q("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?eo(Q("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?eo(Y,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(V),et=Function.prototype.bind;function er(e,t){return et.call(e,t)}var en=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){es(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){es(e)}else es(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){es(e)}},e}(),ei=function(e){function t(t,r,n){var i,s,o=e.call(this)||this;return k(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:o&&B.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},i={next:t.next&&er(t.next,s),error:t.error&&er(t.error,s),complete:t.complete&&er(t.complete,s)}):i=t,o.destination=new en(i),o}return(0,M.C6)(t,e),t}(ee);function es(e){if(B.useDeprecatedSynchronousErrorHandling)B.useDeprecatedSynchronousErrorHandling&&K&&(K.errorThrown=!0,K.error=e);else J(e)}function eo(e,t){var r=B.onStoppedNotification;r&&G.setTimeout(function(){return r(e,t)})}var ea={closed:!0,next:X,error:function(e){throw e},complete:X},eu="function"==typeof Symbol&&Symbol.observable||"@@observable";function ec(e){return e}function el(e){return 0===e.length?ec:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var eh=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this,i=!function(e){return e&&e instanceof ee||e&&k(e.next)&&k(e.error)&&k(e.complete)&&H(e)}(e)?new ei(e,t,r):e;return Z(function(){var e=n.operator,t=n.source;i.add(e?e.call(i,t):t?n._subscribe(i):n._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=ep(t))(function(t,n){var i=new ei({next:function(t){try{e(t)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t});r.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[eu]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return el(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=ep(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function ep(e){var t;return null!=(t=null!=e?e:B.Promise)?t:Promise}var ed=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function ef(e){return k(null==e?void 0:e.then)}function ey(e){return Symbol.asyncIterator&&k(null==e?void 0:e[Symbol.asyncIterator])}function eg(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var em="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function eb(e){return k(null==e?void 0:e[em])}function ev(e){return(0,M.AQ)(this,arguments,function(){var t,r,n;return(0,M.YH)(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,(0,M.N3)(t.read())];case 3:if(n=(r=i.sent()).value,!r.done)return[3,5];return[4,(0,M.N3)(void 0)];case 4:return[2,i.sent()];case 5:return[4,(0,M.N3)(n)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ew(e){return k(null==e?void 0:e.getReader)}function eC(e){if(e instanceof eh)return e;if(null!=e){var t,r,n,i;if(k(e[eu])){return t=e,new eh(function(e){var r=t[eu]();if(k(r.subscribe))return r.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(ed(e)){return r=e,new eh(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}if(ef(e)){return n=e,new eh(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,J)})}if(ey(e))return eE(e);if(eb(e)){return i=e,new eh(function(e){var t,r;try{for(var n=(0,M.Ju)(i),s=n.next();!s.done;s=n.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}if(ew(e))return eE(ev(e))}throw eg(e)}function eE(e){return new eh(function(t){(function(e,t){var r,n,i,s;return(0,M.sH)(this,void 0,void 0,function(){var o;return(0,M.YH)(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),r=(0,M.xN)(e),a.label=1;case 1:return[4,r.next()];case 2:if((n=a.sent()).done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:a.sent()},[3,11];case 6:if(a.trys.push([6,,9,10]),!(n&&!n.done&&(s=r.return)))return[3,8];return[4,s.call(r)];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];
2case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function eR(e){return new eh(function(t){eC(e()).subscribe(t)})}function eq(e){return e[e.length-1]}function ex(e){var t;return(t=eq(e))&&k(t.schedule)?e.pop():void 0}function eI(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var s=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(s),!i)return s}function eO(e){return function(t){if(k(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function e_(e,t,r,n,i){return new e$(e,t,r,n,i)}var e$=function(e){function t(t,r,n,i,s,o){var a=e.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=o,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return(0,M.C6)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),r||null==(t=this.onFinalize)||t.call(this)}},t}(ee);function eA(e,t){return void 0===t&&(t=0),eO(function(r,n){r.subscribe(e_(n,function(r){return eI(n,e,function(){return n.next(r)},t)},function(){return eI(n,e,function(){return n.complete()},t)},function(r){return eI(n,e,function(){return n.error(r)},t)}))})}function ej(e,t){return void 0===t&&(t=0),eO(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function eT(e,t){if(!e)throw Error("Iterable cannot be null");return new eh(function(r){eI(r,t,function(){var n=e[Symbol.asyncIterator]();eI(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}function eS(e,t){return t?function(e,t){if(null!=e){if(k(e[eu]))return eC(e).pipe(ej(t),eA(t));if(ed(e))return new eh(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})});if(ef(e))return eC(e).pipe(ej(t),eA(t));if(ey(e))return eT(e,t);if(eb(e))return new eh(function(r){var n;return eI(r,t,function(){n=e[em](),eI(r,t,function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){r.error(e);return}i?r.complete():r.next(t)},0,!0)}),function(){return k(null==n?void 0:n.return)&&n.return()}});if(ew(e))return eT(ev(e),t)}throw eg(e)}(e,t):eC(e)}function eP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ex(e);return eS(e,r)}function eD(e,t){return eO(function(r,n){var i=0;r.subscribe(e_(n,function(r){n.next(e.call(t,r,i++))}))})}function eF(e,t,r){return(void 0===r&&(r=1/0),k(t))?eF(function(r,n){return eD(function(e,i){return t(r,e,n,i)})(eC(e(r,n)))},r):("number"==typeof t&&(r=t),eO(function(t,n){var i,s,o,a,u,c,l,h,p;return i=r,o=[],a=0,u=0,c=!1,l=function(){!c||o.length||a||n.complete()},h=function(e){return a<i?p(e):o.push(e)},p=function(t){a++;var r=!1;eC(e(t,u++)).subscribe(e_(n,function(e){s?h(e):n.next(e)},function(){r=!0},void 0,function(){if(r)try{for(a--;o.length&&a<i;)!function(){var e=o.shift();p(e)}();l()}catch(e){n.error(e)}}))},t.subscribe(e_(n,h,function(){c=!0,l()})),function(){}}))}var eM=U(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function ek(e,t){var r="object"==typeof t;return new Promise(function(n,i){var s,o=!1;e.subscribe({next:function(e){s=e,o=!0},error:i,complete:function(){o?n(s):r?n(t.defaultValue):i(new eM)}})})}var eU=U(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ez=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,M.C6)(t,e),t.prototype.lift=function(e){var t=new eN(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new eU},t.prototype.next=function(e){var t=this;Z(function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=(0,M.Ju)(t.currentObservers),s=i.next();!s.done;s=i.next())s.value.next(e)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;Z(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;Z(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0}
2,enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,i=this.observers;return r||n?L:(this.currentObservers=null,i.push(e),new V(function(){t.currentObservers=null,N(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},t.prototype.asObservable=function(){var e=new eh;return e.source=this,e},t.create=function(e,t){return new eN(e,t)},t}(eh),eN=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return(0,M.C6)(t,e),t.prototype.next=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.next)||r.call(t,e)},t.prototype.error=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.error)||r.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!=(r=null==(t=this.source)?void 0:t.subscribe(e))?r:L},t}(ez),eV={now:function(){return(eV.delegate||Date).now()},delegate:void 0},eL=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=eV);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return(0,M.C6)(t,e),t.prototype.next=function(t){var r=this.isStopped,n=this._buffer,i=this._infiniteTimeWindow,s=this._timestampProvider,o=this._windowTime;!r&&(n.push(t),i||n.push(s.now()+o)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var s=t.now(),o=0,a=1;a<r.length&&r[a]<=s;a+=2)o=a;o&&r.splice(0,o+1)}},t}(ez);function eH(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new ez}:t,n=e.resetOnError,i=void 0===n||n,s=e.resetOnComplete,o=void 0===s||s,a=e.resetOnRefCountZero,u=void 0===a||a;return function(e){var t,n,s,a=0,c=!1,l=!1,h=function(){null==n||n.unsubscribe(),n=void 0},p=function(){h(),t=s=void 0,c=l=!1},d=function(){var e=t;p(),null==e||e.unsubscribe()};return eO(function(e,f){a++,l||c||h();var y=s=null!=s?s:r();f.add(function(){0!=--a||l||c||(n=eW(d,u))}),y.subscribe(f),!t&&a>0&&(t=new ei({next:function(e){return y.next(e)},error:function(e){l=!0,h(),n=eW(p,i,e),y.error(e)},complete:function(){c=!0,h(),n=eW(p,o),y.complete()}}),eC(e).subscribe(t))})(e)}}function eW(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!0===t)return void e();if(!1!==t){var i=new ei({next:function(){i.unsubscribe(),e()}});return eC(t.apply(void 0,(0,M.fX)([],(0,M.zs)(r)))).subscribe(i)}}function eB(e){return eO(function(t,r){var n,i=null,s=!1;i=t.subscribe(e_(r,void 0,void 0,function(o){n=eC(e(o,eB(e)(t))),i?(i.unsubscribe(),i=null,n.subscribe(r)):s=!0})),s&&(i.unsubscribe(),i=null,n.subscribe(r))})}function eG(e){return void 0===e&&(e=1/0),eF(ec,e)}var eJ=function(e){function t(t,r){return e.call(this)||this}return(0,M.C6)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(V),eX={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=eX.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,(0,M.fX)([e,t],(0,M.zs)(r))):setInterval.apply(void 0,(0,M.fX)([e,t],(0,M.zs)(r)))},clearInterval:function(e){var t=eX.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},eY=function(e){function t(t,r){var n=e.call(this,t,r)||this;
2return n.scheduler=t,n.work=r,n.pending=!1,n}return(0,M.C6)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r,n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!=(r=this.id)?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),eX.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&eX.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,N(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(eJ),eQ=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=eV.now,e}(),eK=new(function(e){function t(t,r){void 0===r&&(r=eQ.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return(0,M.C6)(t,e),t.prototype.flush=function(e){var t,r=this.actions;if(this._active)return void r.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(eQ))(eY);function eZ(e,t){var r=k(e)?e:function(){return e},n=function(e){return e.error(r())};return new eh(t?function(e){return t.schedule(n,0,e)}:n)}function e0(e){return eO(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}var e1=new eh(function(e){return e.complete()});function e3(e,t){var r="object"==typeof t;return new Promise(function(n,i){var s=new ei({next:function(e){n(e),s.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new eM)}});e.subscribe(s)})}var e6=r(76135),e2=Array.isArray,e9=Array.isArray;function e5(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=k(eq(e))?e.pop():void 0;return r?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return el(e)}(e5.apply(void 0,(0,M.fX)([],(0,M.zs)(e))),eD(function(e){return e9(e)?r.apply(void 0,(0,M.fX)([],(0,M.zs)(e))):r(e)})):eO(function(t,r){var n,i,s;(n=(0,M.fX)([t],(0,M.zs)(1===e.length&&e2(e[0])?e[0]:e)),void 0===s&&(s=ec),function(e){var t,r,o;t=void 0,r=function(){for(var t=n.length,r=Array(t),o=t,a=t,u=function(t){var u,c,l;u=i,c=function(){var u=eS(n[t],i),c=!1;u.subscribe(e_(e,function(n){r[t]=n,!c&&(c=!0,a--),a||e.next(s(r.slice()))},function(){--o||e.complete()}))},l=e,u?eI(l,u,c):c()},c=0;c<t;c++)u(c)},o=e,t?eI(o,t,r):r()})(r)})}function e8(e,t){return eO(function(r,n){var i=0;r.subscribe(e_(n,function(r){return e.call(t,r,i++)&&n.next(r)}))})}let e4="drafts.",e7="versions.";function te(e){return e.startsWith(e4)}function tt(e){return e.startsWith(e7)}function tr(e){return tt(e)?e4+ts(e):te(e)?e:e4+e}function tn(e,t){if("drafts"===t||"published"===t)throw Error('Version can not be "published" or "drafts"');return`${e7}${t}.${ts(e)}`}function ti(e){if(!tt(e))return;let[t,r,...n]=e.split(".");return r}function ts(e){return tt(e)?e.split(".").slice(2).join("."):te(e)?e.slice(e4.length):e}let to=e=>crypto.getRandomValues(new Uint8Array(e)),ta=/\r\n|[\n\r\u2028\u2029]/;function tu(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n].length+1;if(r+i>e)return{line:n+1,column:e-r};r+=i}return{line:t.length,column:t[t.length-1]?.length??0}}class tc extends Error{response;statusCode=400;responseBody;details;constructor(e,t){let r=th(e,t);super(r.message),Object.assign(this,r)}}
2class tl extends Error{response;statusCode=500;responseBody;details;constructor(e){let t=th(e);super(t.message),Object.assign(this,t)}}function th(e,t){var r,n,i;let s=e.body,o={response:e,statusCode:e.statusCode,responseBody:(r=s,-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r),message:"",details:void 0};if(!(0,e6.u4)(s))return o.message=tf(e,s),o;let a=s.error;if("string"==typeof a&&"string"==typeof s.message)return o.message=`${a} - ${s.message}`,o;if("object"!=typeof a||null===a)return"string"==typeof a?o.message=a:"string"==typeof s.message?o.message=s.message:o.message=tf(e,s),o;if("type"in(n=a)&&"mutationError"===n.type&&"description"in n&&"string"==typeof n.description||"type"in(i=a)&&"actionError"===i.type&&"description"in i&&"string"==typeof i.description){let e=a.items||[],t=e.slice(0,5).map(e=>e.error?.description).filter(Boolean),r=t.length?`: 3- ${t.join(` 4- `)}`:"";return e.length>5&&(r+=` 5...and ${e.length-5} more`),o.message=`${a.description}${r}`,o.details=s.error,o}return tp(a)?(o.message=td(a,t?.options?.query?.tag),o.details=s.error):"description"in a&&"string"==typeof a.description?(o.message=a.description,o.details=a):o.message=tf(e,s),o}function tp(e){return(0,e6.u4)(e)&&"queryParseError"===e.type&&"string"==typeof e.query&&"number"==typeof e.start&&"number"==typeof e.end}function td(e,t){let{query:r,start:n,end:i,description:s}=e;if(!r||typeof n>"u")return`GROQ query parse error: ${s}`;let o=t?` 6 7Tag: ${t}`:"";return`GROQ query parse error: 8${function(e,t,r){let n=e.split(ta),{start:i,end:s,markerLines:o}=function(e,t){let r={...e.start},n={...r,...e.end},i=r.line??-1,s=r.column??0,o=n.line,a=n.column,u=Math.max(i-3,0),c=Math.min(t.length,o+3);-1===i&&(u=0),-1===o&&(c=t.length);let l=o-i,h={};if(l)for(let e=0;e<=l;e++){let r=e+i;if(s)if(0===e){let e=t[r-1].length;h[r]=[s,e-s+1]}else if(e===l)h[r]=[0,a];else{let n=t[r-e].length;h[r]=[0,n]}else h[r]=!0}else s===a?s?h[i]=[s,0]:h[i]=!0:h[i]=[s,a-s];return{start:u,end:c,markerLines:h}}({start:tu(t.start,n),end:t.end?tu(t.end,n):void 0},n),a=`${s}`.length;return e.split(ta,s).slice(i,s).map((e,t)=>{let n=i+1+t,s=` ${` ${n}`.slice(-a)} |`,u=o[n],c=!o[n+1];if(!u)return` ${s}${e.length>0?` ${e}`:""}`;let l="";if(Array.isArray(u)){let t=e.slice(0,Math.max(u[0]-1,0)).replace(/[^\t]/g," "),n=u[1]||1;l=` 9 `+s.replace(/\d/g," ")+" "+t+"^".repeat(n),c&&r&&(l+=" "+r)}return">"+s+(e.length>0?` ${e}`:"")+l}).join(` 10`)}(r,{start:n,end:i},s)}${o}`}function tf(e,t){var r,n;let i="string"==typeof t?` (${n=100,(r=t).length>100?`${r.slice(0,n)}\u2026`:r})`:"",s=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${s}${i}`}class ty extends Error{projectId;addOriginUrl;constructor({projectId:e}){super("CorsOriginError"),this.name="CorsOriginError",this.projectId=e;let t=new URL(`https://sanity.io/manage/project/${e}/api`);if("u">typeof location){let{origin:e}=location;t.searchParams.set("cors","add"),t.searchParams.set("origin",e),this.addOriginUrl=t,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${t}`}else this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: ${t}`}}let tg={onResponse:(e,t)=>{if(e.statusCode>=500)throw new tl(e);if(e.statusCode>=400)throw new tc(e,t);return e}};function tm(e,t={}){return((e=[],t=m)=>(function e(t,r){let n=[],i=l.reduce((e,t)=>(e[t]=e[t]||[],e),{processOptions:[s],validateOptions:[u]});function o(e){let t,n=c.reduce((e,t)=>(e[t]=function(){let e=Object.create(null),t=0;return{publish:function(t){for(let r in e)e[r](t)},subscribe:function(r){let n=t++;return e[n]=r,function(){delete e[n]}}}}(),e),{}),s=function(e,t,...r){let n="onError"===e,s=t;for(let t=0;t<i[e].length&&(s=(0,i[e][t])(s,...r),!n||s);t++);return s},o=s("processOptions",e);s("validateOptions",o);let a={options:o,channels:n,applyMiddleware:s},u=n.request.subscribe(e=>{t=r(e,(t,r)=>((e,t,r)=>{let i=e,o=t;if(!i)try{o=s("onResponse",t,r)}catch(e){o=null,i=e}(i=i&&s("onError",i,r))?n.error.publish(i):o&&n.response.publish(o)})(t,r,e))});n.abort.subscribe(()=>{u(),t&&t.abort()});let l=s("onReturn",n,a);return l===n&&n.request.publish(a),l}return o.use=function(e){if(!e)throw Error("Tried to add middleware that resolved to fal
10sey value");if("function"==typeof e)throw Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.onReturn&&i.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return l.forEach(t=>{e[t]&&i[t].push(e[t])}),n.push(e),o},o.clone=()=>e(n,r),t.forEach(o.use),o})(e,t))([F({shouldRetry:tb}),...e,function(e={}){let t={},r=t=>void 0!==e.ignoreWarnings&&(Array.isArray(e.ignoreWarnings)?e.ignoreWarnings:[e.ignoreWarnings]).some(e=>"string"==typeof e?t.includes(e):e instanceof RegExp&&e.test(t));return{onResponse:e=>{let n=e.headers["x-sanity-warning"];for(let e of Array.isArray(n)?n:[n])!e||t[e]||r(e)||(t[e]=!0,console.warn(e));return e}}}(t),{processOptions:e=>{let t=e.body;return!t||"function"==typeof t.pipe||I(t)||-1===_.indexOf(typeof t)&&!Array.isArray(t)&&!function(e){if(!1===O(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!1!==O(r)&&!1!==r.hasOwnProperty("isPrototypeOf")}(t)?e:Object.assign({},e,{body:JSON.stringify(e.body),headers:Object.assign({},e.headers,{"Content-Type":"application/json"})})}},{onResponse:e=>{let t=e.headers["content-type"]||"",r=-1!==t.indexOf("application/json");return e.body&&t&&r?Object.assign({},e,{body:function(e){try{return JSON.parse(e)}catch(e){throw e.message=`Failed to parsed response body as JSON: ${e.message}`,e}}(e.body)}):e},processOptions:e=>Object.assign({},e,{headers:Object.assign({Accept:"application/json"},e.headers)})},{onRequest:e=>{if("xhr"!==e.adapter)return;let t=e.request,r=e.context;function n(e){return t=>{let n=t.lengthComputable?t.loaded/t.total*100:-1;r.channels.progress.publish({stage:e,percent:n,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}"upload"in t&&"onprogress"in t.upload&&(t.upload.onprogress=n("upload")),"onprogress"in t&&(t.onprogress=n("download"))}},tg,function(e={}){let t=e.implementation||A.Observable;if(!t)throw Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(e,r)=>new t(t=>(e.error.subscribe(e=>t.error(e)),e.progress.subscribe(e=>t.next(Object.assign({type:"progress"},e))),e.response.subscribe(e=>{t.next(Object.assign({type:"response"},e)),t.complete()}),e.request.publish(r),()=>e.abort.publish()))}}({implementation:eh})])}function tb(e,t,r){if(0===r.maxRetries)return!1;let n="GET"===r.method||"HEAD"===r.method,i=(r.uri||r.url).startsWith("/data/query"),s=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!n||!!i)&&!!s||F.shouldRetry(e,t,r)}function tv(e){return"https://www.sanity.io/help/"+e}let tw=["image","file"],tC=["before","after","replace"],tE=e=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(e))throw Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},tR=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},tq=(e,t)=>{if("string"!=typeof t||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(t)||t.includes(".."))throw Error(`${e}(): "${t}" is not a valid document ID`)},tx=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);tq(e,t._id)},tI=(e,t)=>{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);((e,t)=>
10{if("string"!=typeof t)throw Error(`\`${e}()\`: \`${t}\` is not a valid document type`)})(e,t._type)},tO=e=>{if(!e.dataset)throw Error("`dataset` must be provided to perform queries");return e.dataset||""},t_=e=>{if("string"!=typeof e||!/^[a-z0-9._-]{1,75}$/i.test(e))throw Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return e},t$=e=>{if(!e["~experimental_resource"])throw Error("`resource` must be provided to perform resource queries");let{type:t,id:r}=e["~experimental_resource"];switch(t){case"dataset":if(2!==r.split(".").length)throw Error('Dataset resource ID must be in the format "project.dataset"');return;case"dashboard":case"media-library":case"canvas":return;default:throw Error(`Unsupported resource type: ${t.toString()}`)}},tA=(e,t)=>{if(t["~experimental_resource"])throw Error(`\`${e}\` does not support resource-based operations`)},tj=e=>(function(e){let t=!1,r;return(...n)=>(t||(r=e(...n),t=!0),r)})((...t)=>console.warn(e.join(" "),...t)),tT=tj(["Because you set `withCredentials` to true, we will override your `useCdn`","setting to be false since (cookie-based) credentials are never set on the CDN"]),tS=tj(["Since you haven't set a value for `useCdn`, we will deliver content using our","global, edge-cached API-CDN. If you wish to have content delivered faster, set","`useCdn: false` to use the Live API. Note: You may incur higher costs using the live API."]),tP=tj(["The Sanity client is configured with the `perspective` set to `drafts` or `previewDrafts`, which doesn't support the API-CDN.","The Live API will be used instead. Set `useCdn: false` in your configuration to hide this warning."]),tD=tj(["The `previewDrafts` perspective has been renamed to `drafts` and will be removed in a future API version"]),tF=tj(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${tv("js-client-browser-token")} for more information and how to hide this warning.`]),tM=tj(["You have configured Sanity client to use a token, but also provided `withCredentials: true`.","This is no longer supported - only token will be used - remove `withCredentials: true`."]),tk=tj(["Using the Sanity client without specifying an API version is deprecated.",`See ${tv("js-client-api-version")}`]),tU=(tj(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),tj(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),tz={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},tN=["localhost","127.0.0.1","0.0.0.0"];function tV(e){if(Array.isArray(e)&&e.length>1&&e.includes("raw"))throw TypeError('Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives')}let tL=(e,t)=>{let r,n={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||tz.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};n.apiVersion||tk();let i={...tz,...n},s=i.useProjectHostname&&!i["~experimental_resource"];if(typeof Promise>"u"){let e=tv("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(s&&!i.projectId)throw Error("Configuration must contain `projectId`");if(i["~experimental_resource"]&&t$(i),"u">typeof i.perspective&&tV(i.perspective),"encodeSourceMap"in i)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMap' is not supported in '@sanity/client'. Did you mean 'stega.enabled'?");if("encodeSourceMapAtPath"in i)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?");if("boolean"!=typeof i.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${i.stega.enabled}`);if(i.stega.enabled&&void 0===i.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(i.stega.enabled&&"string"!=typeof i.stega.studioUrl&&"function"!=typeof i.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${i.stega.studioUrl}`);let o="u">typeof window&&window.location&&window.location.hostname,a=o&&(r=window.location.hostname,-1!==tN.indexOf(r)),u=!!i.token;i.withCredentials&&u&&(tM(),i.withCredentials=!1),o&&a&&u&&!0!==i.ignoreBrowserTokenWarning?tF():typeof i.useCdn>"u"&&tS(),s&&(e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")})(i.projectId),i.dataset&&tE(i.dataset),"requestTagPrefix"in i&&(i.requestTagPrefix=i.requestTagPrefix?t_(i.requestTagPrefix).replace(/\.+$/,""):void 0),i.apiVersion=`${i.apiVersion}`.replace(/^v/,""),i.isDefaultApi=i.apiHost===tz.apiHost,!0===i.useCdn&&i.withCredentials&&tT(),i.useCdn=!1!==i.useCdn&&!i.withCredentials,function(e){if("1"===e||"X"===e)return;let t=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&t instanceof Date&&t.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}(i.apiVersion);let c=i.apiHost.split("://",2),l=c[0],h=c[1],p=i.isDefaultApi?"apicdn.sanity.io":h;return s?(i.url=`${l}://${i.projectId}.${h}/v${i.apiVersion}`,i.cdnUrl=`${l}://${i.projectId}.${p}/v${i.apiVersion}
10`):(i.url=`${i.apiHost}/v${i.apiVersion}`,i.cdnUrl=i.url),i};class tH extends Error{name="ConnectionFailedError"}class tW extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}class tB extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class tG extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class tJ extends Error{name="MessageParseError"}let tX=["channelError","disconnect"];function tY(e,t){return eR(()=>{let t=e();return t&&(t instanceof eh||k(t.lift)&&k(t.subscribe))?t:eP(t)}).pipe(eF(e=>{var r,n;return r=e,n=t,new eh(e=>{let t=n.includes("open"),i=n.includes("reconnect");function s(t){if("data"in t){let[r,n]=tQ(t);e.error(r?new tJ("Unable to parse EventSource error message",{cause:n}):new tG((n?.data).message,n));return}r.readyState===r.CLOSED?e.error(new tH("EventSource connection failed")):i&&e.next({type:"reconnect"})}function o(){e.next({type:"open"})}function a(t){let[n,i]=tQ(t);if(n)return void e.error(new tJ("Unable to parse EventSource message",{cause:n}));if("channelError"===t.type){let t=new URL(r.url).searchParams.get("tag");e.error(new tB(function(e,t){let r=e.error;return r?tp(r)?td(r,t):r.description?r.description:"string"==typeof r?r:JSON.stringify(r,null,2):e.message||"Unknown listener error"}(i?.data,t),i.data));return}if("disconnect"===t.type)return void e.error(new tW(`Server disconnected client: ${i.data?.reason||"unknown error"}`));e.next({type:t.type,id:t.lastEventId,...i.data?{data:i.data}:{}})}r.addEventListener("error",s),t&&r.addEventListener("open",o);let u=[...new Set([...tX,...n])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);return u.forEach(e=>r.addEventListener(e,a)),()=>{r.removeEventListener("error",s),t&&r.removeEventListener("open",o),u.forEach(e=>r.removeEventListener(e,a)),r.close()}})}))}function tQ(e){try{let t="string"==typeof e.data&&JSON.parse(e.data);return[null,{type:e.type,id:e.lastEventId,...!function(e){for(let t in e)return!1;return!0}(t)?{data:t}:{}}]}catch(e){return[e,null]}}function tK(e){if("string"==typeof e)return{id:e};if(Array.isArray(e))return{query:"*[_id in $ids]",params:{ids:e}};if("object"==typeof e&&null!==e&&"query"in e&&"string"==typeof e.query)return"params"in e&&"object"==typeof e.params&&null!==e.params?{query:e.query,params:e.params}:{query:e.query};let t=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join(` 11`);throw Error(`Unknown selection - must be one of: 12 13${t}`)}class tZ{selection;operations;constructor(e,t={}){this.selection=e,this.operations=t}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return tR("diffMatchPatch",e),this._assign("diffMatchPatch",e)}unset(e){if(!Array.isArray(e))throw Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign("inc",e)}dec(e){return this._assign("dec",e)}insert(e,t,r){return((e,t,r)=>{let n="insert(at, selector, items)";if(-1===tC.indexOf(e)){let e=tC.map(e=>`"${e}"`).join(", ");throw Error(`${n} takes an "at"-argument which is one of: ${e}`)}if("string"!=typeof t)throw Error(`${n} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${n} takes an "items"-argument which must be an array`)})(e,t,r),this._assign("insert",{[e]:t,items:r})}append(e,t){return this.insert("after",`${e}[-1]`,t)}prepend(e,t){return this.insert("before",`${e}[0]`,t)}splice(e,t,r,n){let i=t<0?t-1:t,s=typeof r>"u"||-1===r?-1:Math.max(0,t+r),o=`${e}[${i}:${i<0&&s>=0?"":s}]`;return this.insert("replace",o,n||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...tK(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return tR(e,t),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},r&&this.operations[e]||{},t)}),this}_set(e,t){return this._assign(e,t,!1)}}class t0 extends tZ{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new t0(this.selection,{...this.operations},this.#a)}commit(e){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#a.mutate({patch:this.serialize()},t)}}class t1 extends tZ{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new t1(this.selection,{...this.operations},this.#a)}commit(e){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#a.mutate({patch:this.serialize()},t)}}let t3={returnDocuments:!1};class t6{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return tR("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return tR(t,e),tx(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return tR(t,e),tx(t,e),this._add({[t]:e})}delete(e){return tq("delete",e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}}class t2 extends t6{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new t2([...this.operations],this.#a,this.trxId)}commit(e){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},t3,e||{}))}patch(e,t){let r="function"==typeof t,n="string"!=typeof e&&e instanceof t1,i="object"==typeof e&&("query"in e||"id"in e);if(n)return this._add({patch:e.serialize()});if(r){let r=t(new t1(e,{},this.#a));if(!(r instanceof t1))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(i){let r=new t1(e,t||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class t9 extends t6{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new t9([...this.operations],this.#a,this.trxId)}commit(e){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},t3,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof t0)return this._add({patch:e.serialize()});if(r){let r=t(new t0(e,{},this.#a));if(!(r instanceof t0))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}let t5=({query:e,params:t={},options:r={}})=>{let n=new URLSearchParams,{tag:i,includeMutations:s,returnQuery:o,...a}=r;for(let[r,s]of(i&&n.append("tag",i),n.append("query",e),Object.entries(t)))void 0!==s&&n.append(`$${r}`,JSON.stringify(s));for(let[e,t]of Object.entries(a))t&&n.append(e,`${t}`);return!1===o&&n.append("returnQuery","false"),!1===s&&n.append("includeMutations","fal
13se"),`?${n}`},t8=e=>"response"===e.type,t4=e=>e.body;function t7(e,t,n,i,s={},o={}){let a="stega"in o?{...n||{},..."boolean"==typeof o.stega?{enabled:o.stega}:o.stega||{}}:n,u=a.enabled?(0,e6.Q)(s):s,c=!1===o.filterResponse?e=>e:e=>e.result,{cache:l,next:h,...p}={useAbortSignal:"u">typeof o.signal,resultSourceMap:a.enabled?"withKeyArraySelector":o.resultSourceMap,...o,returnQuery:!1===o.filterResponse&&!1!==o.returnQuery},d=rd(e,t,"query",{query:i,params:u},"u">typeof l||"u">typeof h?{...p,fetch:{cache:l,next:h}}:p);return a.enabled?d.pipe(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e5.apply(void 0,(0,M.fX)([],(0,M.zs)(e)))}(eS(r.e(2101).then(r.bind(r,92101)).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),eD(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return c({...e,result:r})})):d.pipe(eD(c))}function re(e,t,r,n={}){let i={uri:rv(e,"doc",(()=>{if(!n.releaseId)return r;let e=ti(r);if(!e){if(te(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${n.releaseId}\``);return tn(r,n.releaseId)}if(e!==n.releaseId)throw Error(`The document ID (\`${r}\`) is already a version of \`${e}\` release, but this does not match the provided \`options.releaseId\` (\`${n.releaseId}\`)`);return r})()),json:!0,tag:n.tag,signal:n.signal,query:void 0!==n.includeAllVersions?{includeAllVersions:n.includeAllVersions}:void 0};return rm(e,t,i).pipe(e8(t8),eD(e=>{let t=e.body.documents;return t?n.includeAllVersions?t:t[0]:n.includeAllVersions?[]:void 0}))}function rt(e,t,r,n={}){let i={uri:rv(e,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return rm(e,t,i).pipe(e8(t8),eD(e=>{let t,n,i=(t=e.body.documents||[],n=e=>e._id,t.reduce((e,t)=>(e[n(t)]=t,e),Object.create(null)));return r.map(e=>i[e]||null)}))}function rr(e,t,r,n={}){return rd(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},n)}function rn(e,t,r,n){return tx("createIfNotExists",r),rf(e,t,r,"createIfNotExists",n)}function ri(e,t,r,n){return tx("createOrReplace",r),rf(e,t,r,"createOrReplace",n)}function rs(e,t,r,n,i){return tx("createVersion",r),tI("createVersion",r),tU(),rp(e,t,{actionType:"sanity.action.document.version.create",publishedId:n,document:r},i)}function ro(e,t,r,n,i,s,o){if(!n)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!r)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return tq("createVersion",n),tq("createVersion",r),rp(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:n,versionId:i?tn(r,i):tr(r),ifBaseRevisionId:s},o)}function ra(e,t,r,n){return rd(e,t,"mutate",{mutations:[{delete:tK(r)}]},n)}function ru(e,t,r,n=!1,i){return rp(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:n},i)}function rc(e,t,r,n){return tx("replaceVersion",r),tI("replaceVersion",r),rp(e,t,{actionType:"sanity.action.document.version.replace",document:r},n)}function rl(e,t,r,n,i){return rp(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:n},i)}function rh(e,t,r,n){let i;return rd(e,t,"mutate",{mutations:Array.isArray(i=r instanceof t1||r instanceof t0?{patch:r.serialize()}:r instanceof t2||r instanceof t9?r.serialize():r)?i:[i],transactionId:n&&n.transactionId||void 0},n)}function rp(e,t,r,n){let i=Array.isArray(r)?r:[r],s=n&&n.transactionId||void 0;return rd(e,t,"actions",{actions:i,transactionId:s,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function rd(e,t,r,n,i={}){let s="mutate"===r,o="actions"===r,a=s||o?"":t5(n),u=!s&&!o&&a.length<11264,c=u?a:"",l=i.returnFirst,{timeout:h,token:p,tag:d,headers:f,returnQuery:y,lastLiveEventId:g,cacheMode:m}=i,b={method:u?"GET":"POST",uri:rv(e,r,c),json:!0,body:u?void 0:n,query:s&&((e={})=>{let t,r;return{dryRun:e.dryRun,returnIds:!0,returnDocuments:(t=e.returnDocuments,r=!0,!1===t?void 0:typeof t>"u"?r:t),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}})(i),timeout:h,headers:f,token:p,tag:d,returnQuery:y,perspective:i.perspective,resultSourceMap:i.resultSourceMap,lastLiveEventId:Array.isArray(g)?g[0]:g,cacheMode:m,canUseCdn:"query"===r,signal:i.signal,fetch:i.fetch,useAbortSignal:i.useAbortSignal,useCdn:i.useCdn};return rm(e,t,b).pipe(e8(t8),eD(t4),eD(e=>{if(!s)return e;let t=e.results||[];if(i.returnDocuments)return l?t[0]&&t[0].document:t.map(e=>e.document);let r=l?t[0]&&t[0].id:t.map(e=>e.id);return{transactionId:e.transactionId,results:t,[l?"documentId":"documentIds"]:r}}))}function rf(e,t,r,n,i={}){return rd(e,t,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},i))}let ry=e=>void 0!==e.config().dataset&&void 0!==e.config().projectId||void 0!==e.config()["~experimental_resource"],rg=(e,t)=>ry(e)&&t.startsWith(rv(e,"query"));function rm(e,t,r){var n;let i=r.url||r.uri,s=e.config(),o=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(i.startsWith("/data/")||rg(e,i)||ry(e)&&i.startsWith(rv(e,"mutate"))||ry(e)&&i.startsWith(rv(e,"doc",""))||ry(e)&&i.startsWith(rv(e,"listen"))||ry(e)&&i.startsWith(rv(e,"history",""))):r.canUseCdn,a=(r.useCdn??s.useCdn)&&o,u=r.tag&&s.requestTagPrefix?[s.requestTagPrefix,r.tag].join("."):r.tag||s.requestTagPrefix;if(u&&null!==r.tag&&(r.query={tag:t_(u),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&rg(e,i)){let e=r.resultSourceMap??s.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||s.perspective;"u">typeof t&&("previewDrafts"===t&&tD(),tV(t),r.query={perspective:Array.isArray(t)?t.join(","):t,...r.query},(Array.isArray(t)&&t.length>0||"previewDrafts"===t||"drafts"===t)&&a&&(a=!1,tP())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),a&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let c=function(e,t={}){let r={};e.headers&&Object.assign(r,e.headers);let n=t.token||e.token;n&&(r.Authorization=`Bearer ${n}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let i=!!(typeof t.withCredentials>"u"?e.withCredentials:t.withCredentials),s=typeof t.timeout>"u"?e.timeout:t.timeout;return Object.assign({},t,{headers:Object.assign({},r,t.headers||{}),timeout:typeof s>"u"?3e5:s,proxy:t.proxy||e.proxy,json:!0,withCredentials:i,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(s,Object.assign({},r,{url:rw(e,i,a)})),l=new eh(e=>t(c,s.requester).subscribe(e));return r.signal?l.pipe((n=r.signal,e=>new eh(t=>{let r=()=>t.error(function(e){if(rC)return new DOMException(e?.reason??"The operation was aborted.","AbortError");let t=Error(e?.reason??"The operation was aborted.");return t.name="AbortError",t}(n));if(n&&n.aborted)return void r();let i=e.subscribe(t);return n.addEventListener("abort",r),()=>{n.removeEventListener("abort",r),i.unsubscribe()}}))):l}function rb(e,t,r){return rm(e,t,r).pipe(e8(e=>"response"===e.type),eD(e=>e.body))}function rv(e,t,r){let n=e.config();if(n["~experimental_resource"]){t$(n);let e=rE(n),i=void 0!==r?`${t}/${r}`:t;return`${e}/${i}`.replace(/\/($|\?)/,"$1")}let i=tO(n),s=`/${t}/${i}`;return`/data${void 0!==r?`${s}/${r}`:s}`.replace(/\/($|\?)/,"$1")}function rw(e,t,r=!1){let{url:n,cdnUrl:i}=e.config();return`${r?i:n}/${t.replace(/^\//,"")}`}let rC=!!globalThis.DOMException,rE=e=>{if(!e["~experimental_resource"])throw Error("`resource` must be provided to perform resource queries");let{type:t,id:r}=e["~experimental_resource"];switch(t){case"dataset":{let e=r.split(".");if(2!==e.length)throw Error('Dataset ID must be in the format "project.dataset"');return`/projects/${e[0]}/datasets/${e[1]}`}case"canvas":return`/canvases/${r}`;case"media-library":return`/media-libraries/${r}`;case"dashboard":return`/dashboards/${r}`;default:throw Error(`Unsupported resource type: ${t.toString()}`)}};function rR(e,t,r){let n=tO(e.config());return rb(e,t,{method:"POST",uri:`/agent/action/generate/${n}`,body:r})}function rq(e,t,r){let n=tO(e.config());return rb(e,t,{method:"POST",uri:`/agent/action/transform/${n}`,body:r})}function rx(e,t,r){let n=tO(e.config());return rb(e,t,{method:"POST",uri:`/agent/action/translate/${n}`,body:r})}class rI{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}generate(e){return rR(this.#a,this.#u,e)}transform(e){return rq(this.#a,this.#u,e)}translate(e){return rx(this.#a,this.#u,e)}}class rO{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return ek(rR(this.#a,this.#u,e))}transform(e){return ek(rq(this.#a,this.#u,e))}translate(e){return ek(rx(this.#a,this.#u,e))}prompt(e){return ek(function(e,t,r){let n=tO(e.config());return rb(e,t,{method:"POST",uri:`/agent/action/prompt/${n}`,body:r})}(this.#a,this.#u,e))}patch(e){return ek(function(e,t,r){let n=tO(e.config());return rb(e,t,{method:"POST",uri:`/agent/action/patch/${n}`,body:r})}(this.#a,this.#u,e))}}class r_{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return rA(this.#a,this.#u,e,t,r)}}class r${#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return ek(rA(this.#a,this.#u,e,t,r).pipe(e8(e=>"response"===e.type),eD(e=>e.body.document)))}}function rA(e,t,r,n,i={}){var s,o;if(-1===tw.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${tw.join(", ")}`);let a=i.extract||void 0;a&&!a.length&&(a=["none"]);let u=e.config(),c=(s=i,o=n,!(typeof File>"u")&&o instanceof File?Object.assign({filename:!1===s.preserveFilename?void 0:o.name,contentType:o.type},s):s),{tag:l,label:h,title:p,description:d,creditLine:f,filename:y,source:g}=c,m={label:h,title:p,description:d,filename:y,meta:a,creditLine:f};return g&&(m.sourceId=g.id,m.sourceName=g.name,m.sourceUrl=g.url),rm(e,t,{tag:l,method:"POST",timeout:c.timeout||0,uri:function(e,t){let r="image"===t?"images":"files";if(e["~experimental_resource"]){let{type:t,id:n}=e["~experimental_resource"];switch(t){case"dataset":throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case"canvas":return`/canvases/${n}/assets/${r}`;case"media-library":return`/media-libraries/${n}/upload`;case"dashboard":return`/dashboards/${n}/assets/${r}`;default:throw Error(`Unsupported resource type: ${t.toString()}`)}}let n=tO(e);return`assets/${r}/${n}`}(u,r),headers:c.contentType?{"Content-Type":c.contentType}:{},query:m,body:n})}let rj=eR(()=>r.e(6108).then(r.t.bind(r,33727,19))).pipe(eD(({default:e})=>e),function(e,t,r){var n,i,s,o,a=!1;return o=null!=e?e:1/0,eH({connector:function(){return new eL(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}(1));function rT(){return function(e){return e.pipe(eB((e,t)=>{var r;return e instanceof tH?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return eG(1)(eS(e,ex(e)))}(eP({type:"reconnect"}),(void 0===r&&(r=eK),new eh(function(e){var t=1e3;t<0&&(t=0);var n=0;return r.schedule(function(){e.closed||(e.next(n++),e.complete())},t)})).pipe(eF(()=>t))):eZ(()=>e)}))}}let rS=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","tag"],rP={includeResult:!0};function rD(e,t,r={}){let{url:n,token:i,withCredentials:s,requestTagPrefix:o,headers:a}=this.config(),u=r.tag&&o?[o,r.tag].join("."):r.tag,c={...Object.keys(rP).concat(Object.keys(r)).reduce((e,t)=>(e[t]=typeof r[t]>"u"?rP[t]:r[t],e),{}),tag:u},l=t5({query:e,params:t,options:{tag:u,...rS.reduce((e,t)=>(typeof c[t]>"u"||(e[t]=c[t]),e),{})}}),h=`${n}${rv(this,"listen",l)}`;if(h.length>14800)return eZ(()=>Error("Query too large for listener"));let p=c.events?c.events:["mutation"],d={};return s&&(d.withCredentials=!0),(i||a)&&(d.headers={},i&&(d.headers.Authorization=`Bearer ${i}`),a&&Object.assign(d.headers,a)),tY(()=>(typeof EventSource>"u"||d.headers?rj:eP(EventSource)).pipe(eD(e=>new e(h,d))),p).pipe(rT(),e8(e=>p.includes(e.type)),eD(e=>({type:e.type,..."data"in e?e.data:{}})))}let rF="2021-03-25";class rM{#a;constructor(e){this.#a=e}events({includeDrafts:e=!1,tag:t}={}){var r,n,i,s;tA("live",this.#a.config());let{projectId:o,apiVersion:a,token:u,withCredentials:c,requestTagPrefix:l,headers:h}=this.#a.config(),p=a.replace(/^v/,"");if("X"!==p&&p<rF)throw Error(`The live events API requires API version ${rF} or later. The current API version is ${p}. Please update your API version to use this feature.`);if(e&&!u&&!c)throw Error("The live events API requires a token or withCredentials when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role.");let d=rv(this.#a,"live/events"),f=new URL(this.#a.getUrl(d,!1)),y=t&&l?[l,t].join("."):t;y&&f.searchParams.set("tag",y),e&&f.searchParams.set("includeDrafts","true");let g={};e&&c&&(g.withCredentials=!0),(e&&u||h)&&(g.headers={},e&&u&&(g.headers.Authorization=`Bearer ${u}`),h&&Object.assign(g.headers,h));let m=`${f.href}::${JSON.stringify(g)}`,b=rk.get(m);
13if(b)return b;let v=tY(()=>(typeof EventSource>"u"||g.headers?rj:eP(EventSource)).pipe(eD(e=>new e(f.href,g))),["message","restart","welcome","reconnect","goaway"]),w=(n=f,i={method:"OPTIONS",mode:"cors",credentials:g.withCredentials?"include":"omit",headers:g.headers},new eh(e=>{let t=new AbortController,r=t.signal;return fetch(n,{...i,signal:t.signal}).then(t=>{e.next(t),e.complete()},t=>{r.aborted||e.error(t)}),()=>t.abort()})).pipe(eB(()=>{throw new ty({projectId:o})})),C=v.pipe(rT(),eF(e=>"reconnect"===e.type?w.pipe(eF(()=>eP(e))):eP(e)),eB(e=>w.pipe(eF(()=>{throw e}))),eD(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})).pipe(e0(()=>rk.delete(m)),(s="function"==typeof(r={predicate:e=>"welcome"===e.type})?{predicate:r,...void 0}:r,e=>{var t,r,n,i;let o,a=!1,{predicate:u,...c}=s;return function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=ex(t),i=(e=1/0,"number"==typeof eq(t)?t.pop():e);return t.length?1===t.length?eC(t[0]):eG(i)(eS(t,n)):e1}(e.pipe((i=k(t=e=>{s.predicate(e)&&(a=!0,o=e)})?{next:t,error:r,complete:n}:t)?eO(function(e,t){null==(r=i.subscribe)||r.call(i);var r,n=!0;e.subscribe(e_(t,function(e){var r;null==(r=i.next)||r.call(i,e),t.next(e)},function(){var e;n=!1,null==(e=i.complete)||e.call(i),t.complete()},function(e){var r;n=!1,null==(r=i.error)||r.call(i,e),t.error(e)},function(){var e,t;n&&(null==(e=i.unsubscribe)||e.call(i)),null==(t=i.finalize)||t.call(i)}))}):ec,e0(()=>{a=!1,o=void 0}),eH(c)),new eh(e=>{a&&e.next(o),e.complete()}))}));return rk.set(m,C),C}}let rk=new Map;class rU{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}create(e,t){return rN(this.#a,this.#u,"PUT",e,t)}edit(e,t){return rN(this.#a,this.#u,"PATCH",e,t)}delete(e){return rN(this.#a,this.#u,"DELETE",e)}list(){tA("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),rb(this.#a,this.#u,{uri:r,tag:null})}}class rz{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return tA("dataset",this.#a.config()),ek(rN(this.#a,this.#u,"PUT",e,t))}edit(e,t){return tA("dataset",this.#a.config()),ek(rN(this.#a,this.#u,"PATCH",e,t))}delete(e){return tA("dataset",this.#a.config()),ek(rN(this.#a,this.#u,"DELETE",e))}list(){tA("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),ek(rb(this.#a,this.#u,{uri:r,tag:null}))}}function rN(e,t,r,n,i){return tA("dataset",e.config()),tE(n),rb(e,t,{method:r,uri:`/datasets/${n}`,body:i,tag:null})}class rV{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){var r,n;let i=this.#a.config()["~experimental_resource"]?.id,{instanceId:s,library
13Id:o}=function(e){let t="object"==typeof e&&"_ref"in e?e._ref:e,r=rH.exec(t);if(r){let[,e,t]=r;return{libraryId:e,instanceId:t}}if("string"==typeof e&&e.startsWith("video-"))return{instanceId:e};throw Error(`Invalid video asset instance identifier "${t}": must be a valid video instance id or a Global Dataset Reference (GDR) to the video asset in the Media Library`)}(e),a=o||i;if(!a)throw Error("Could not determine Media Library ID - you need to provide a valid Media Library ID in the client config or a Media Library GDR");let u=(r=s,n=a,`/media-libraries/${n}/video/${r}/playback-info`),c=function(e){let t={};if(e.transformations){let{thumbnail:r,animated:n,storyboard:i}=e.transformations;r&&(r.width&&(t.thumbnailWidth=r.width),r.height&&(t.thumbnailHeight=r.height),void 0!==r.time&&(t.thumbnailTime=r.time),r.fit&&(t.thumbnailFit=r.fit),r.format&&(t.thumbnailFormat=r.format)),n&&(n.width&&(t.animatedWidth=n.width),n.height&&(t.animatedHeight=n.height),void 0!==n.start&&(t.animatedStart=n.start),void 0!==n.end&&(t.animatedEnd=n.end),n.fps&&(t.animatedFps=n.fps),n.format&&(t.animatedFormat=n.format)),i&&i.format&&(t.storyboardFormat=i.format)}return e.expiration&&(t.expiration=e.expiration),t}(t);return rb(this.#a,this.#u,{method:"GET",uri:u,query:c})}}class rL{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){return ek(new rV(this.#a.observable,this.#u).getPlaybackInfo(e,t))}}let rH=/^media-library:(ml[^:]+):([^:]+)$/;class rW{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),rb(this.#a,this.#u,{uri:"/projects",query:t})}getById(e){return rb(this.#a,this.#u,{uri:`/projects/${e}`})}}class rB{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),ek(rb(this.#a,this.#u,{uri:"/projects",query:t}))}getById(e){return ek(rb(this.#a,this.#u,{uri:`/projects/${e}`}))}}let rG=((e,t=21)=>((e,t,r)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*n*t/e.length);return (s=t)=>{let o="";for(;;){let t=r(i),a=0|i;for(;a--;)if((o+=e[t[a]&n]||"").length===s)return o}}})(e,t,to))("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),rJ=(e,t)=>t?tn(e,t):tr(e);function rX(e,{releaseId:t,publishedId:r,document:n}){if(r&&n._id){let e=rJ(r,t);return((e,t)=>{if(t._id&&t._id!==e)throw Error(`The provided document ID (\`${t._id}\`) does not match the generated version ID (\`${e}\`)`)})(e,n),e}if(n._id){let r=te(n._id),i=tt(n._id);if(!r&&!i)throw Error(`\`${e}()\` requires a document with an \`_id\` that is a version or draft ID`);if(t){if(r)throw Error(`\`${e}()\` was called with a document ID (\`${n._id}\`) that is a draft ID, but a release ID (\`${t}\`) was also provided.`);let i=ti(n._id);if(i!==t)throw Error(`\`${e}()\` was called with a document ID (\`${n._id}\`) that is a version ID, but the release ID (\`${t}\`) does not match the document's version ID (\`${i}\`).`)}return n._id}if(r)return rJ(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let rY=(e,t)=>{let[r,n,i]=((e,t)=>{if("object"==typeof e&&null!==e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=rG(),metadata:n={}}=e;return[r,n,t]}return[rG(),{},e]})(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...n,releaseType:n.releaseType||"undecided"}},options:i}};class rQ{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return re(this.#a,this.#u,`_.releases.${e}`,t)}create(e,t){let{action:r,options:n}=rY(e,t),{releaseId:i,metadata:s}=r;return rp(this.#a,this.#u,r,n).pipe(eD(e=>({...e,releaseId:i,metadata:s})))}edit({releaseId:e,patch:t},r){return rp(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return rp(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return rp(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return rp(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return rp(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return rp(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return rp(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return rr(this.#a,this.#u,e,t)}}class rK{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return ek(re(this.#a,this.#u,`_.releases.${e}`,t))}async create(e,t){let{action:r,options:n}=rY(e,t),{releaseId:i,metadata:s}=r;return{...await ek(rp(this.#a,this.#u,r,n)),releaseId:i,metadata:s}}edit({releaseId:e,patch:t},r){return ek(rp(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r))}publish({releaseId:e},t){return ek(rp(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t))}archive({releaseId:e},t){return ek(rp(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t))}unarchive({releaseId:e},t){return ek(rp(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t))}schedule({releaseId:e,publishAt:t},r){return ek(rp(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r))}unschedule({releaseId:e},t){return ek(rp(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t))}delete({releaseId:e},t){return ek(rp(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t))}fetchDocuments({releaseId:e},t){return ek(rr(this.#a,this.#u,e,t))}}class rZ{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return rb(this.#a,this.#u,{uri:`/users/${e}`})}}class r0{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return ek(rb(this.#a,this.#u,{uri:`/users/${e}`}))}}class r1{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#c;#u;listen=rD;constructor(e,t=tz){this.config(t),this.#u=e,this.assets=new r_(this,this.#u),this.datasets=new rU(this,this.#u),this.live=new rM(this),this.mediaLibrary={video:new rV(this,this.#u)},this.projects=new rW(this,this.#u),this.users=new rZ(this,this.#u),this.agent={action:new rI(this,this.#u)},this.releases=new rQ(this,this.#u)}clone(){return new r1(this.#u,this.config())}config(e){if(void 0===e)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.#c=tL(e,this.#c||{}),this}withConfig(e){let t=this.config();return new r1(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return t7(this,this.#u,this.#c.stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return re(this,this.#u,e,{...t,includeAllVersions:!0});let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return re(this,this.#u,e,r)}getDocuments(e,t){return rt(this,this.#u,e,t)}create(e,t){return rf(this,this.#u,e,"create",t)}createIfNotExists(e,t){return rn(this,this.#u,e,t)}createOrReplace(e,t){return ri(this,this.#u,e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return ro(this,this.#u,t,n,r,i,s);let o=rX("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||ts(e._id);return rs(this,this.#u,a,u,s)}delete(e,t){return ra(this,this.#u,e,t)}discardVersion({releaseId:e,publishedId:t},r,n){let i=rJ(t,e);return ru(this,this.#u,i,r,n)}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=rX("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return rc(this,this.#u,s,n)}unpublishVersion({releaseId:e,publishedId:t},r){let n=tn(t,e);return rl(this,this.#u,n,t,r)}mutate(e,t){return rh(this,this.#u,e,t)}patch(e,t){return new t0(e,t,this)}transaction(e){return new t9(e,this)}action(e,t){return rp(this,this.#u,e,t)}request(e){return rb(this,this.#u,e)}getUrl(e,t){return rw(this,e,t)}getDataUrl(e,t){return rv(this,e,t)}}class r3{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#c;#u;listen=rD;constructor(e,t=tz){this.config(t),this.#u=e,this.assets=new r$(this,this.#u),this.datasets=new rz(this,this.#u),this.live=new rM(this),this.mediaLibrary={video:new rL(this,this.#u)},this.projects=new rB(this,this.#u),this.users=new r0(this,this.#u),this.agent={action:new rO(this,this.#u)},this.releases=new rK(this,this.#u),this.observable=new r1(e,t)}clone(){return new r3(this.#u,this.config())}config(e){if(void 0===e)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),this.#c=tL(e,this.#c||{}),this}withConfig(e){let t=this.config();return new r3(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return ek(t7(this,this.#u,this.#c.stega,e,t,r))}getDocument(e,t){if(t?.includeAllVersions===!0)return ek(re(this,this.#u,e,{...t,includeAllVersions:!0}));let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return ek(re(this,this.#u,e,r))}getDocuments(e,t){return ek(rt(this,this.#u,e,t))}create(e,t){return ek(rf(this,this.#u,e,"create",t))}createIfNotExists(e,t){return ek(rn(this,this.#u,e,t))}createOrReplace(e,t){return ek(ri(this,this.#u,e,t))}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return e3(ro(this,this.#u,t,n,r,i,s));let o=rX("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||ts(e._id);return e3(rs(this,this.#u,a,u,s))}delete(e,t){return ek(ra(this,this.#u,e,t))}discardVersion({releaseId:e,publishedId:t},r,n){let i=rJ(t,e);return ek(ru(this,this.#u,i,r,n))}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=rX("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return e3(rc(this,this.#u,s,n))}unpublishVersion({releaseId:e,publishedId:t},r){let n=tn(t,e);return ek(rl(this,this.#u,n,t,r))}mutate(e,t){return ek(rh(this,this.#u,e,t))}patch(e,t){return new t1(e,t,this)}transaction(e){return new t2(e,this)}action(e,t){return ek(rp(this,this.#u,e,t))}request(e){return ek(rb(this,this.#u,e))}dataRequest(e,t,r){return ek(rd(this,this.#u,e,t,r))}getUrl(e,t){return rw(this,e,t)}getDataUrl(e,t){return rv(this,e,t)}}let r6=function(e,t){return{requester:tm(e),createClient:r=>{let n=tm(e,{ignoreWarnings:r.ignoreWarnings});return new t((e,t)=>
13(t||n)({maxRedirects:0,maxRetries:r.maxRetries,retryDelay:r.retryDelay,lineage:r.lineage,...e}),r)}}}([],r3),r2=(r6.requester,r6.createClient)}}]);
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.