PageSourceSearch

https://cdn.apopro.dk/2026-09-17-12-49-50/_next/static/chunks/6082.a229267e4968dfb7.js

js apopro.dk collected 2026-09-25 02:39:46 UTC 101,063 bytes, 15 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6082],{26801:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,s=u(e),o=s[0],a=s[1],c=new i((o+a)*3/4-a),l=0,h=a>0?o-4:o;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],o=0,a=n-i;o<a;o+=16383)s.push(function(e,t,n){for(var i,s=[],o=t;o<n;o+=3)i=(e[o]<<16&0xff0000)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}(e,o,o+16383>a?a:o+16383));return 1===i?s.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&s.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),s.join("")};for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o<a;++o)r[o]=s[o],n[s.charCodeAt(o)]=o;function u(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},36082:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>rE});var n,i=r(73321),s=r(95155);let o=!(typeof navigator>"u")&&"ReactNative"===navigator.product,a={timeout:o?6e4:12e4},u=function(e){let t={...a,..."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(a.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),n=e.slice(t+1);if(!o)return{url:r,searchParams:new URLSearchParams(n)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let i=new URLSearchParams;for(let e of n.split("&")){let[t,r]=e.split("=");t&&i.append(c(t),c(r||""))}return{url:r,searchParams:i}}(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 c(e){return decodeURIComponent(e.replace(/\+/g," "))}let l=/^https?:\/\//i,h=function(e){if(!l.test(e.url))throw Error(`"${e.url}" is not a valid URL`)},f=["request","response","progress","error","abort"],p=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var d,y,g,m=(d=function(){if(g)return y;g=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")};return y=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}}())&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d;class b{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 w="function"==typeof XMLHttpRequest?"xhr":"fetch",v="xhr"===w?XMLHttpRequest:b,E=(e,t)=>{let r=e.options,n=e.applyMiddleware("finalizeOptions",r),i={},s=e.applyMiddleware("interceptRequest",void 0,{adapter:w,context:e});if(s){let e=setTimeout(t,0,null,s);return{abort:()=>clearTimeout(e)}}let o=new v;o instanceof b&&"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=>{d(o instanceof b?e instanceof Error?e:Error(`Request error while attempting to reach ${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=>{d(Error(`Request timeout while attempting to reach ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.onabort=()=>{p(!0),c=!0},o.onreadystatechange=function(){u&&(p(),i.socket=setTimeout(()=>f("ESOCKETTIMEDOUT"),u.socket)),!c&&o&&4===o.readyState&&0!==o.status&&function(){if(!(c||l||h)){if(0===o.status)return d(Error("Unknown XHR error"));p(),l=!0,t(null,{body:o.response||(""===o.responseType||"text"===o.responseType?o.responseText:""),url:n.url,method:n.method,headers:m(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:w,request:o,context:e}),o.send(n.body||null),u&&(i.connect=setTimeout(()=>f("ETIMEDOUT"),u.connect)),{abort:function(){c=!0,o&&o.abort()}};function f(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 p(e){(e||c||o&&o.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function d(e){if(l)return;p(!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 R,C,I,$,q,T=r(87358),A=r(49304).hp,O={exports:{}};q||(q=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 T&&"env"in T&&(e=T.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=($?I:($=1,I=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(C)return R;C=1;function e(e,t,r,n){return Math.round(e/r)+" "+n+(t>=1.5*r?"s":"")}return R=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}}}(O,O.exports)),O.exports,Object.prototype.hasOwnProperty;let x=typeof A>"u"?()=>!1:e=>A.isBuffer(e);function S(e){return"[object Object]"===Object.prototype.toString.call(e)}let j=["boolean","string","number"],B={};"u">typeof globalThis?B=globalThis:"u">typeof window?B=window:"u">typeof global?B=global:"u">typeof self&&(B=self);var P=B;let U=(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 _{__CANCEL__=!0;message;constructor(e){this.message=e}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class F{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 _(e),t(this.reason))})}static source=()=>{let e;return{token:new F(t=>{e=t}),cancel:e}}}U.Cancel=_,U.CancelToken=F,U.isCancel=e=>!(!e||!e?.__CANCEL__);var k=(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 L=(e={})=>{var t;let r,n,i;return r=(t={shouldRetry:k,...e}).maxRetries||5,n=t.retryDelay||D,i=t.shouldRetry,{onError:(e,t)=>{var s;let o=t.options,a=o.maxRetries||r,u=o.retryDelay||n,c=o.shouldRetry||i,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({},t,{options:Object.assign({},o,{attemptNumber:l+1})});return setTimeout(()=>t.channels.request.publish(h),u(l)),null}}};L.shouldRetry=k;var M=r(65132),N=r(84707),V=r(21583),z=r(18212),H=r(55633),G=r(97993),W=r(45426),J=r(96681),Y=r(11096),Q=r(75341),X=r(31562),Z=r(61319),K=r(34920),ee=r(4897),et=r(34090),er=r(33751),en=r(16975),ei=r(28278),es=r(50611),eo=r(49303),ea=r(36569),eu=r(79619),ec=r(49395),el=r(66687),eh=r(89166),ef=r(36171);function ep(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,ef.ms)(e);return r?(0,eh.F)(ep.apply(void 0,(0,eo.fX)([],(0,eo.zs)(e))),(0,el.I)(r)):(0,eu.N)(function(t,r){(0,ea.P)((0,eo.fX)([t],(0,eo.zs)((0,ec.K)(e))))(r)})}var ed=r(97561),ey=r(98063),eg=r(43897);let em="drafts.",eb="versions.";function ew(e){return e.startsWith(em)}function ev(e){return e.startsWith(eb)}function eE(e){return ev(e)?em+eI(e):ew(e)?e:em+e}function eR(e,t){if("drafts"===t||"published"===t)throw Error('Version can not be "published" or "drafts"');return`${eb}${t}.${eI(e)}`}function eC(e){if(!ev(e))return;let[t,r]=e.split(".");return r}function eI(e){return ev(e)?e.split(".").slice(2).join("."):ew(e)?e.slice(em.length):e}let e$=e=>crypto.getRandomValues(new Uint8Array(e)),eq=/\r\n|[\n\r\u2028\u2029]/;function eT(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 eA extends Error{response;statusCode=400;responseBody;traceId;details;constructor(e,t){const r=ex(e,t);super(r.message),Object.assign(this,r)}}class eO extends Error{response;statusCode=500;responseBody;traceId;details;constructor(e){const t=ex(e);super(t.message),Object.assign(this,t)}}function ex(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),traceId:function(e){let t=e?.headers?.traceparent;if(t)return t.split("-")[1]}(e),message:"",details:void 0};if(!(0,es.u4)(s))return o.message=`${eB(e,s)}${eP(o.traceId)}`,o;let a=s.error;if("string"==typeof a&&"string"==typeof s.message)return o.message=`${a} - ${s.message}${eP(o.traceId)}`,o;if("object"!=typeof a||null===a)return"string"==typeof a?o.message=`${a}${eP(o.traceId)}`:"string"==typeof s.message?o.message=`${s.message}${eP(o.traceId)}`:o.message=`${eB(e,s)}${eP(o.traceId)}`,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}${eP(o.traceId)}${r}`,o.details=s.error,o}return eS(a)?(o.message=ej(a,t?.options?.query?.tag,o.traceId),o.details=s.error):"description"in a&&"string"==typeof a.description?(o.message=`${a.description}${eP(o.traceId)}`,o.details=a):o.message=`${eB(e,s)}${eP(o.traceId)}`,o}function eS(e){return(0,es.u4)(e)&&"queryParseError"===e.type&&"string"==typeof e.query&&"number"==typeof e.start&&"number"==typeof e.end}function ej(e,t,r){let{query:n,start:i,end:s,description:o}=e,a=r?`
6(traceId: ${r})`:"";if(!n||typeof i>"u")return`GROQ query parse error: ${o}${a}`;let u=t?`
7
8Tag: ${t}`:"";return`GROQ query parse error:
9${function(e,t,r){let n=e.split(eq),{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:eT(t.start,n),end:t.end?eT(t.end,n):void 0},n),a=`${s}`.length;return e.split(eq,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=[`
10 `,s.replace(/\d/g," ")," ",t,"^".repeat(n)].join(""),c&&r&&(l+=" "+r)}return[">",s,e.length>0?` ${e}`:"",l].join("")}).join(`
11`)}(n,{start:i,end:s},o)}${u}${a}`}function eB(e,t){var r;let n="string"==typeof t?` (${(r=t).length>100?`${r.slice(0,100)}\u2026`:r})`:"",i=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${i}${n}`}function eP(e){return e?` (traceId: ${e})`:""}
11class eU extends Error{projectId;addOriginUrl;constructor({projectId:e,credentials:t}={}){if(super("CorsOriginError"),this.name="CorsOriginError",this.projectId=e,e&&"u">typeof location){const r=new URL(`https://sanity.io/manage/project/${e}/api`),{origin:n}=location;r.searchParams.set("cors","add"),r.searchParams.set("origin",n),t&&r.searchParams.set("credentials",""),this.addOriginUrl=r,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${r}`}else e?this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: https://sanity.io/manage/project/${e}/api`:this.message="The current origin is not allowed to connect to the Live Content API."}}let e_={onResponse:(e,t)=>{if(e.statusCode>=500)throw new eO(e);if(e.statusCode>=400)throw new eA(e,t);return e}};function eF(e,t={}){return((e=[],t=E)=>(function e(t,r){let n=[],i=p.reduce((e,t)=>(e[t]=e[t]||[],e),{processOptions:[u],validateOptions:[h]});function s(e){let t,n="object"==typeof e&&e.callSiteStack?e.callSiteStack:void 0,s=n?void 0:Error(),o=f.reduce((e,t)=>{let r,n;return e[t]=(r=Object.create(null),n=0,{publish:function(e){for(let t in r)r[t](e)},subscribe:function(e){let t=n++;return r[t]=e,function(){delete r[t]}}}),e},{}),a=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},u=a("processOptions",e);a("validateOptions",u);let c={options:u,channels:o,applyMiddleware:a},l=o.request.subscribe(e=>{t=r(e,(t,r)=>((e,t,r)=>{let i=e,u=t;if(!i)try{u=a("onResponse",t,r)}catch(e){u=null,i=e}if(i=i&&a("onError",i,r)){if(i instanceof Error){let e=n?.stack||s?.stack;if("string"==typeof e){let t=e.split("\n").slice(n?1:2);t.length>0&&(i.stack+="\n"+t.join("\n"))}}o.error.publish(i)}else u&&o.response.publish(u)})(t,r,e))});o.abort.subscribe(()=>{l(),t&&t.abort()});let h=a("onReturn",o,c);return h===o&&o.request.publish(c),h}return s.use=function(e){if(!e)throw Error("Tried to add middleware that resolved to falsey 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 p.forEach(t=>{e[t]&&i[t].push(e[t])}),n.push(e),s},s.clone=()=>e(n,r),t.forEach(s.use),s})(e,t))([L({shouldRetry:ek}),...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||x(t)||-1===j.indexOf(typeof t)&&!Array.isArray(t)&&!function(e){if(!1===S(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!1!==S(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"))}},e_,function(e={}){let t=e.implementation||P.Observable;if(!t)throw Error("`Observable` is not available in global scope, and n
11o 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:M.c})])}function ek(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||L.shouldRetry(e,t,r)}function eD(e){return"https://www.sanity.io/help/"+e}let eL=["image","file"],eM=["before","after","replace"],eN=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")},eV=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},ez=(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`)},eH=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);ez(e,t._id)},eG=(e,t)=>{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);var r=t._type;if("string"!=typeof r)throw Error(`\`${e}()\`: \`${r}\` is not a valid document type`)},eW=e=>{if(e.dataset)return e.dataset;let t=e.resource;if(t&&"dataset"===t.type){let e=t.id.split(".");if(2!==e.length)throw Error('Dataset resource ID must be in the format "project.dataset"');return e[1]}throw Error("`dataset` must be provided to perform queries")},eJ=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},eY=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=t;switch(r){case"dataset":if(2!==n.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: ${r.toString()}`)}},eQ=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)},eX=e=>{var t;let r,n;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(n=t(...e),r=!0),n)},eZ=eX(["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"]),eK=eX(["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."]),e0=eX(["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."]),e1=eX(["The `previewDrafts` perspective has been renamed to  `drafts` and will be removed in a future API version"]),e2=eX(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${eD("js-client-browser-token")} for more information and how to hide this warning.`]),e3=eX(["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`."]),e6=eX(["Using the Sanity client without specifying an API version is deprecated.",`See ${eD("js-client-api-version")}`]),e5=(eX(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),eX(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),e8=eX(["The `~experimental_resource` configuration property has been renamed to `resource`.","Please update your client configuration to use `resource` instead. Support for `~experimental_resource` will be removed in a future version."]),e4={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},e9=["localhost","127.0.0.1","0.0.0.0"];function e7(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 te=(e,t)=>
11{let r,n={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||e4.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};n.apiVersion||e6();let i={...e4,...n};i["~experimental_resource"]&&!i.resource&&(e8(),i.resource=i["~experimental_resource"]);let s=i.resource,o=i.useProjectHostname&&!s;if(typeof Promise>"u"){let e=eD("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(o&&!i.projectId)throw Error("Configuration must contain `projectId`");if(s&&eY(i),"u">typeof i.perspective&&e7(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 a="u">typeof window&&window.location&&window.location.hostname,u=a&&(r=window.location.hostname,-1!==e9.indexOf(r)),c=!!i.token;i.withCredentials&&c&&(e3(),i.withCredentials=!1),a&&u&&c&&!0!==i.ignoreBrowserTokenWarning?e2():typeof i.useCdn>"u"&&eK(),o&&(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&&eN(i.dataset),"requestTagPrefix"in i&&(i.requestTagPrefix=i.requestTagPrefix?eJ(i.requestTagPrefix).replace(/\.+$/,""):void 0),i.apiVersion=`${i.apiVersion}`.replace(/^v/,""),i.isDefaultApi=i.apiHost===e4.apiHost,!0===i.useCdn&&i.withCredentials&&eZ(),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 l=i.apiHost.split("://",2),h=l[0],f=l[1],p=i.isDefaultApi?"apicdn.sanity.io":f;return o?(i.url=`${h}://${i.projectId}.${f}/v${i.apiVersion}`,i.cdnUrl=`${h}://${i.projectId}.${p}/v${i.apiVersion}
11`):(i.url=`${i.apiHost}/v${i.apiVersion}`,i.cdnUrl=i.url),i};class tt extends Error{name="ConnectionFailedError";status;constructor(e,t={}){const{status:r,...n}=t;super(e,n),this.status=r}}class tr extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}class tn extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class ti extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class ts extends Error{name="MessageParseError"}let to=["channelError","disconnect"];function ta(e,t){return(0,N.v)(()=>{let t=e();return(0,V.A)(t)?t:(0,z.of)(t)}).pipe((0,H.Z)(e=>{var r,n;return r=e,n=t,new M.c(e=>{let t=n.includes("open"),i=n.includes("reconnect");function s(t){if("data"in t){let[r,n]=tu(t);e.error(r?new ts("Unable to parse EventSource error message",{cause:n}):new ti((n?.data).message,n));return}let n=t.status,s="number"==typeof n?n:void 0;void 0!==s?e.error(new tt("EventSource connection failed",{status:s})):r.readyState===r.CLOSED?e.error(new tt("EventSource connection failed")):i&&e.next({type:"reconnect"})}function o(){e.next({type:"open"})}function a(t){let[n,i]=tu(t);if(n)return void e.error(new ts("Unable to parse EventSource message",{cause:n}));if("channelError"===t.type){var s,o;let t,n=new URL(r.url).searchParams.get("tag");e.error(new tn((s=i?.data,o=n,(t=s.error)?eS(t)?ej(t,o):t.description?t.description:"string"==typeof t?t:JSON.stringify(t,null,2):s.message||"Unknown listener error"),i.data));return}"disconnect"===t.type?e.error(new tr(`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([...to,...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 tu(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 tc(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(`
12`);throw Error(`Unknown selection - must be one of:
13
14${t}`)}class tl{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 eV("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===eM.indexOf(e)){let e=eM.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{...tc(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return eV(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 th extends tl{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new th(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 tf extends tl{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new tf(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 tp={returnDocuments:!1};class td{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return eV("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return eV(t,e),eH(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return eV(t,e),eH(t,e),this._add({[t]:e})}delete(e){return ez("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 ty extends td{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new ty([...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},tp,e||{}))}patch(e,t){let r="function"==typeof t,n="string"!=typeof e&&e instanceof tf,i="object"==typeof e&&("query"in e||"id"in e);if(n)return this._add({patch:e.serialize()});if(r){let r=t(new tf(e,{},this.#a));if(!(r instanceof tf))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(i){let r=new tf(e,t||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class tg extends td{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new tg([...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},tp,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof th)return this._add({patch:e.serialize()});if(r){let r=t(new th(e,{},this.#a));if(!(r instanceof th))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}let tm=({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
14se"),`?${n}`},tb=e=>"response"===e.type,tw=e=>e.body;function tv(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,es.Q)(s):s,c=!1===o.filterResponse?e=>e:e=>e.result,{cache:l,next:h,...f}={useAbortSignal:"u">typeof o.signal,resultSourceMap:a.enabled?"withKeyArraySelector":o.resultSourceMap,...o,returnQuery:!1===o.filterResponse&&!1!==o.returnQuery},p=tU(e,t,"query",{query:i,params:u},"u">typeof l||"u">typeof h?{...f,fetch:{cache:l,next:h}}:f);return a.enabled?p.pipe(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ep.apply(void 0,(0,eo.fX)([],(0,eo.zs)(e)))}((0,G.H)(r.e(9621).then(r.bind(r,39621)).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),(0,en.T)(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return c({...e,result:r})})):p.pipe((0,en.T)(c))}function tE(e,t,r,n={}){let i={uri:tM(e,"doc",(()=>{if(!n.releaseId)return r;let e=eC(r);if(!e){if(ew(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${n.releaseId}\``);return eR(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 tD(e,t,i).pipe((0,ed.p)(tb),(0,en.T)(e=>{let t=e.body.documents;return t?n.includeAllVersions?t:t[0]:n.includeAllVersions?[]:void 0}))}function tR(e,t,r,n={}){let i={uri:tM(e,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return tD(e,t,i).pipe((0,ed.p)(tb),(0,en.T)(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 tC(e,t,r,n={}){if(0===r.length)return(0,z.of)(new Set);let i=[];for(let e=0;e<r.length;e+=100)i.push(r.slice(e,e+100));return(0,G.H)(i).pipe((0,ey.H)(r=>tD(e,t,{uri:tM(e,"doc",r.map(encodeURIComponent).join(",")),tag:n.tag,signal:n.signal,query:{excludeContent:!0}}).pipe((0,ed.p)(tb),(0,en.T)(e=>{let t=new Set;for(let r of e.body.omitted||[])"existence"===r.reason&&t.add(r.id);return new Set(r.filter(e=>!t.has(e)))}))),(0,eg.T)((e,t)=>{for(let r of t)e.add(r);return e},new Set))}function tI(e,t,r,n={}){return tU(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},n)}function t$(e,t,r,n){return eH("createIfNotExists",r),t_(e,t,r,"createIfNotExists",n)}function tq(e,t,r,n){return eH("createOrReplace",r),t_(e,t,r,"createOrReplace",n)}function tT(e,t,r,n,i){return eH("createVersion",r),eG("createVersion",r),e5(),tP(e,t,{actionType:"sanity.action.document.version.create",publishedId:n,document:r},i)}function tA(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 ez("createVersion",n),ez("createVersion",r),tP(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:n,versionId:i?eR(r,i):eE(r),ifBaseRevisionId:s},o)}function tO(e,t,r,n){return tU(e,t,"mutate",{mutations:[{delete:tc(r)}]},n)}function tx(e,t,r,n=!1,i){return tP(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:n},i)}function tS(e,t,r,n){return eH("replaceVersion",r),eG("replaceVersion",r),tP(e,t,{actionType:"sanity.action.document.version.replace",document:r},n)}function tj(e,t,r,n,i){return tP(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:n},i)}function tB(e,t,r,n){let i;return tU(e,t,"mutate",{mutations:Array.isArray(i=r instanceof tf||r instanceof th?{patch:r.serialize()}:r instanceof ty||r instanceof tg?r.serialize():r)?i:[i],transactionId:n&&n.transactionId||void 0},n)}function tP(e,t,r,n){let i=Array.isArray(r)?r:[r],s=n&&n.transactionId||void 0;return tU(e,t,"actions",{actions:i,transactionId:s,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function tU(e,t,r,n,i={}){let s="mutate"===r,o="actions"===r,a=s||o?"":tm(n),u=!s&&!o&&a.length<11264,c=u?a:"",l=i.returnFirst,{timeout:h,token:f,tag:p,headers:d,returnQuery:y,lastLiveEventId:g,cacheMode:m}=i,b={method:u?"GET":"POST",uri:tM(e,r,c),json:!0,body:u?void 0:n,query:s&&((e={})=>{let t;return{dryRun:e.dryRun,returnIds:!0,returnDocuments:(t=e.returnDocuments,!1===t?void 0:!!(typeof t>"u")||t),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}})(i),timeout:h,headers:d,token:f,tag:p,returnQuery:y,perspective:i.perspective,variant:i.variant,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 tD(e,t,b).pipe((0,ed.p)(tb),(0,en.T)(tw),(0,en.T)(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 t_(e,t,r,n,i={}){return tU(e,t,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},i))}let tF=e=>{let t=e.config();return void 0!==t.dataset&&void 0!==t.projectId||void 0!==t.resource},tk=(e,t)=>tF(e)&&t.startsWith(tM(e,"query"));function tD(e,t,r){var n;let i=Error(),s=r.url||r.uri,o=e.config(),a=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(s.startsWith("/data/")||tk(e,s)||tF(e)&&s.startsWith(tM(e,"mutate"))||tF(e)&&s.startsWith(tM(e,"doc",""))||tF(e)&&s.startsWith(tM(e,"listen"))||tF(e)&&s.startsWith(tM(e,"history",""))):r.canUseCdn,u=(r.useCdn??o.useCdn)&&a,c=r.tag&&o.requestTagPrefix?[o.requestTagPrefix,r.tag].join("."):r.tag||o.requestTagPrefix;if(c&&null!==r.tag&&(r.query={tag:eJ(c),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&tk(e,s)){let e=r.resultSourceMap??o.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||o.perspective;"u">typeof t&&("previewDrafts"===t&&e1(),e7(t),r.query={perspective:Array.isArray(t)?t.join(","):t,...r.query},(Array.isArray(t)&&t.length>0||"previewDrafts"===t||"drafts"===t)&&u&&(u=!1,e0()));let n=r.variant||o.variant;"string"==typeof n&&(r.query={variant:n,...r.query}),"object"==typeof n&&(r.query={variantCondition:Object.entries(n).map(([e,t])=>`${e}:${t}`).toSorted(),...r.query}),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),u&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let l=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})}(o,Object.assign({}
14,r,{url:tN(e,s,u),callSiteStack:i})),h=new M.c(e=>t(l,o.requester).subscribe(e));return r.signal?h.pipe((n=r.signal,e=>new M.c(t=>{let r=()=>t.error(function(e){if(tV)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()}}))):h}function tL(e,t,r){return tD(e,t,r).pipe((0,ed.p)(e=>"response"===e.type),(0,en.T)(e=>e.body))}function tM(e,t,r){let n=e.config();if(n.resource){eY(n);let e=tz(n),i=void 0!==r?`${t}/${r}`:t;return`${e}/${i}`.replace(/\/($|\?)/,"$1")}let i=eW(n),s=`/${t}/${i}`;return`/data${void 0!==r?`${s}/${r}`:s}`.replace(/\/($|\?)/,"$1")}function tN(e,t,r=!1){let{url:n,cdnUrl:i}=e.config();return`${r?i:n}/${t.replace(/^\//,"")}`}let tV=!!globalThis.DOMException,tz=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=t;switch(r){case"dataset":{let e=n.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/${n}`;case"media-library":return`/media-libraries/${n}`;case"dashboard":return`/dashboards/${n}`;default:throw Error(`Unsupported resource type: ${r.toString()}`)}};function tH(e,t,r){let n=eW(e.config());return tL(e,t,{method:"POST",uri:`/agent/action/generate/${n}`,body:r})}function tG(e,t,r){let n=eW(e.config());return tL(e,t,{method:"POST",uri:`/agent/action/transform/${n}`,body:r})}function tW(e,t,r){let n=eW(e.config());return tL(e,t,{method:"POST",uri:`/agent/action/translate/${n}`,body:r})}class tJ{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return tH(this.#a,this.#u,e)}transform(e){return tG(this.#a,this.#u,e)}translate(e){return tW(this.#a,this.#u,e)}}class tY{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return(0,W.s)(tH(this.#a,this.#u,e))}transform(e){return(0,W.s)(tG(this.#a,this.#u,e))}translate(e){return(0,W.s)(tW(this.#a,this.#u,e))}prompt(e){var t,r;let n;return(0,W.s)((t=this.#a,r=this.#u,n=eW(t.config()),tL(t,r,{method:"POST",uri:`/agent/action/prompt/${n}`,body:e})))}patch(e){var t,r;let n;return(0,W.s)((t=this.#a,r=this.#u,n=eW(t.config()),tL(t,r,{method:"POST",uri:`/agent/action/patch/${n}`,body:e})))}}class tQ{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return tZ(this.#a,this.#u,e,t,r)}}class tX{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){let n=tZ(this.#a,this.#u,e,t,r);return(0,W.s)(n.pipe((0,ed.p)(e=>"response"===e.type),(0,en.T)(e=>e.body.document)))}}function tZ(e,t,r,n,i={}){var s,o;if(-1===eL.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${eL.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:f,description:p,creditLine:d,filename:y,source:g}=c,m=u.resource?.type==="media-library",b=m?{title:f,filename:y}:{label:h,title:f,description:p,filename:y,meta:a,creditLine:d};return g&&!m&&(b.sourceId=g.id,b.sourceName=g.name,b.sourceUrl=g.url),tD(e,t,{tag:l,method:"POST",timeout:c.timeout||0,uri:function(e,t){let r="image"===t?"images":"files",n=e.resource;if(n){let{type:e,id:t}=n;switch(e){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/${t}/assets/${r}`;case"media-library":return`/media-libraries/${t}/upload`;case"dashboard":return`/dashboards/${t}/assets/${r}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}}let i=eW(e);return`assets/${r}/${i}`}(u,r),headers:c.contentType?{"Content-Type":c.contentType}:{},query:b,body:n})}let tK=(0,N.v)(()=>r.e(9023).then(r.bind(r,19023))).pipe((0,en.T)(({default:e})=>e),(0,J.t)(1)),t0=new Set([408,429]);function t1(){return function(e){return e.pipe((0,Y.W)((e,t)=>e instanceof tt&&("number"!=typeof e.status||e.status<400||e.status>=500||t0.has(e.status))?(0,Q.x)((0,z.of)({type:"reconnect"}),(0,X.O)(1e3).pipe((0,H.Z)(()=>t))):(0,Z.$)(()=>e)))}}let t2=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","enableResume","tag"],t3={includeResult:!0};function t6(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(t3).concat(Object.keys(r)).reduce((e,t)=>
14(e[t]=typeof r[t]>"u"?t3[t]:r[t],e),{}),tag:u},l=tm({query:e,params:t,options:{tag:u,...t2.reduce((e,t)=>(typeof c[t]>"u"||(e[t]=c[t]),e),{})}}),h=`${n}${tM(this,"listen",l)}`;if(h.length>14800)return(0,Z.$)(()=>Error("Query too large for listener"));let f=c.events?c.events:["mutation"],p={};return s&&(p.withCredentials=!0),(i||a)&&(p.headers={},i&&(p.headers.Authorization=`Bearer ${i}`),a&&Object.assign(p.headers,a)),ta(()=>(typeof EventSource>"u"||p.headers?tK:(0,z.of)(EventSource)).pipe((0,en.T)(e=>new e(h,p))),f).pipe(t1(),(0,ed.p)(e=>f.includes(e.type)),(0,en.T)(e=>({type:e.type,..."data"in e?e.data:{}})))}let t5="2021-03-25";class t8{#a;constructor(e){this.#a=e}events({includeDrafts:e=!1,tag:t,waitFor:r}={}){var n,i,s,o,a;let{projectId:u,apiVersion:c,token:l,withCredentials:h,requestTagPrefix:f,headers:p}=this.#a.config(),d=c.replace(/^v/,"");if("X"!==d&&d<t5)throw Error(`The live events API requires API version ${t5} or later. The current API version is ${d}. Please update your API version to use this feature.`);if(e&&!l&&!h)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 y=tM(this.#a,"live/events"),g=new URL(this.#a.getUrl(y,!1)),m=t&&f?[f,t].join("."):t;m&&g.searchParams.set("tag",m),e&&g.searchParams.set("includeDrafts","true"),r&&g.searchParams.set("waitFor",r);let b={};e&&h&&(b.withCredentials=!0),(e&&l||p)&&(b.headers={},e&&l&&(b.headers.Authorization=`Bearer ${l}`),p&&Object.assign(b.headers,p));let w=`${g.href}::${JSON.stringify(b)}`,v=t4.get(w);if(v)return v;let E=ta(()=>(typeof EventSource>"u"||b.headers?tK:(0,z.of)(EventSource)).pipe((0,en.T)(e=>new e(g.href,b))),["message","restart","welcome","reconnect","goaway"]),R=(i=new URL(this.#a.getUrl("/check/cors",!1)),s=u,o=!0===b.withCredentials,new M.c(e=>{let t=new AbortController,{signal:r}=t;return fetch(i,{method:"GET",mode:"cors",credentials:"omit",signal:r}).then(e=>{if(!(r.aborted||!e.ok))return e.json()}).then(t=>{if(!r.aborted){if(o&&t?.result?.withCredentials===!1)return void e.error(new eU({projectId:s,credentials:!0}));if(t?.result?.allowed===!1)return void e.error(new eU({projectId:s,credentials:o}));e.next(),e.complete()}}).catch(()=>{r.aborted||e.closed||(e.next(),e.complete())}),()=>t.abort()})),C=E.pipe(t1(),(0,H.Z)(e=>"reconnect"===e.type?R.pipe((0,H.Z)(()=>(0,z.of)(e))):(0,z.of)(e)),(0,Y.W)(e=>e instanceof eU?(0,Z.$)(()=>e):R.pipe((0,H.Z)(()=>{throw e}))),(0,en.T)(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})).pipe((0,ee.j)(()=>t4.delete(w)),(a="function"==typeof(n={predicate:e=>"welcome"===e.type})?{predicate:n,...void 0}:n,e=>{let t,r=!1,{predicate:n,...i}=a,s=e.pipe((0,K.M)(e=>{a.predicate(e)&&(r=!0,t=e)}),(0,ee.j)(()=>{r=!1,t=void 0}),(0,et.u)(i)),o=new M.c(e=>{r&&e.next(t),e.complete()});return(0,er.h)(s,o)}));return t4.set(w,C),C}}let t4=new Map;class t9{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return rt(this.#a,this.#u,"PUT",e,t)}edit(e,t){return rt(this.#a,this.#u,"PATCH",e,t)}delete(e){return rt(this.#a,this.#u,"DELETE",e)}list(){eQ("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),tL(this.#a,this.#u,{uri:r,tag:null})}getEmbeddingsSettings(e){return eQ("dataset",this.#a.config()),eN(e),tL(this.#a,this.#u,{uri:re(this.#a,e),tag:null})}editEmbeddingsSettings(e,t){return eQ("dataset",this.#a.config()),eN(e),tL(this.#a,this.#u,{method:"PUT",uri:re(this.#a,e),body:t,tag:null})}}class t7{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return eQ("dataset",this.#a.config()),(0,W.s)(rt(this.#a,this.#u,"PUT",e,t))}edit(e,t){return eQ("dataset",this.#a.config()),(0,W.s)(rt(this.#a,this.#u,"PATCH",e,t))}delete(e){return eQ("dataset",this.#a.config()),(0,W.s)(rt(this.#a,this.#u,"DELETE",e))}list(){eQ("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),(0,W.s)(tL(this.#a,this.#u,{uri:r,tag:null}))}getEmbeddingsSettings(e){return eQ("dataset",this.#a.config()),eN(e),(0,W.s)(tL(this.#a,this.#u,{uri:re(this.#a,e),tag:null}))}editEmbeddingsSettings(e,t){return eQ("dataset",this.#a.config()),eN(e),(0,W.s)(tL(this.#a,this.#u,{method:"PUT",uri:re(this.#a,e),body:t,tag:null}))}}function re(e,t){let r=e.config();return!1===r.useProjectHostname?`/projects/${r.projectId}/datasets/${t}/settings/embeddings`:`/datasets/${t}/settings/embeddings`}function rt(e,t,r,n,i){return eQ("dataset",e.config()),eN(n),tL(e,t,{method:r,uri:`/datasets/${n}`,body:i,tag:null})}class rr{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){var r,n;let i=this.#a.config(),s=(i.resource||i["~experimental_resource"])?.id,{instanceId:o,library
14Id:a}=function(e){let t="object"==typeof e&&"_ref"in e?e._ref:e,r=ri.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),u=a||s;if(!u)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 c=(r=o,n=u,`/media-libraries/${n}/video/${r}/playback-info`),l=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 tL(this.#a,this.#u,{method:"GET",uri:c,query:l})}}class rn{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){return(0,W.s)(new rr(this.#a.observable,this.#u).getPlaybackInfo(e,t))}}let ri=/^media-library:(ml[^:]+):([^:]+)$/;class rs{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.includeFeatures===!1&&(t.includeFeatures="false"),e?.organizationId&&(t.organizationId=e.organizationId),e?.onlyExplicitMembership&&(t.onlyExplicitMembership="true"),tL(this.#a,this.#u,{uri:"/projects",query:t})}getById(e){return tL(this.#a,this.#u,{uri:`/projects/${e}`})}}class ro{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.includeFeatures===!1&&(t.includeFeatures="false"),e?.organizationId&&(t.organizationId=e.organizationId),e?.onlyExplicitMembership&&(t.onlyExplicitMembership="true"),(0,W.s)(tL(this.#a,this.#u,{uri:"/projects",query:t}))}getById(e){return(0,W.s)(tL(this.#a,this.#u,{uri:`/projects/${e}`}))}}let ra=((e,t=21)=>{var r;let n,i;return r=t,i=-~(1.6*(n=(2<<Math.log(e.length-1)/Math.LN2)-1)*r/e.length),(t=r)=>{if(t<=0)return"";let s="";for(;;){let r=e$(i),o=0|i;for(;o--;)if((s+=e[r[o]&n]||"").length===t)return s}}})("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),ru=(e,t)=>t?eR(e,t):eE(e);function rc(e,{releaseId:t,publishedId:r,document:n}){if(r&&n._id){let e=ru(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=ew(n._id),i=ev(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=eC(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 ru(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let rl=(e,t)=>{let[r,n,i]=((e,t)=>{if("object"==typeof e&&null!==e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=ra(),metadata:n={}}=e;return[r,n,t]}return[ra(),{},e]})(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...n,releaseType:n.releaseType||"undecided"}},options:i}};class rh{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return tE(this.#a,this.#u,`_.releases.${e}`,t)}create(e,t){let{action:r,options:n}=rl(e,t),{releaseId:i,metadata:s}=r;return tP(this.#a,this.#u,r,n).pipe((0,en.T)(e=>({...e,releaseId:i,metadata:s})))}edit({releaseId:e,patch:t},r){return tP(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return tP(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return tP(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return tP(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return tP(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return tP(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return tP(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return tI(this.#a,this.#u,e,t)}}class rf{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return(0,W.s)(tE(this.#a,this.#u,`_.releases.${e}`,t))}async create(e,t){let{action:r,options:n}=rl(e,t),{releaseId:i,metadata:s}=r;return{...await (0,W.s)(tP(this.#a,this.#u,r,n)),releaseId:i,metadata:s}}edit({releaseId:e,patch:t},r){return(0,W.s)(tP(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r))}publish({releaseId:e},t){return(0,W.s)(tP(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t))}archive({releaseId:e},t){return(0,W.s)(tP(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t))}unarchive({releaseId:e},t){return(0,W.s)(tP(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t))}schedule({releaseId:e,publishAt:t},r){return(0,W.s)(tP(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r))}unschedule({releaseId:e},t){return(0,W.s)(tP(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t))}delete({releaseId:e},t){return(0,W.s)(tP(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t))}fetchDocuments({releaseId:e},t){return(0,W.s)(tI(this.#a,this.#u,e,t))}}class rp{#a;#u;
14constructor(e,t){this.#a=e,this.#u=t}getById(e){return tL(this.#a,this.#u,{uri:`/users/${e}`})}}class rd{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return(0,W.s)(tL(this.#a,this.#u,{uri:`/users/${e}`}))}}class ry{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#c;#l;#u;listen=t6;constructor(e,t=e4){this.config(t),this.#l=e;const r=t._requestHandler;this.#u=r?(()=>{let n;return(i,s)=>(n||(n=new rg(e,{...t,_requestHandler:void 0})),r(i,t=>e(t,s),n))})():e,this.assets=new tQ(this,this.#u),this.datasets=new t9(this,this.#u),this.live=new t8(this),this.mediaLibrary={video:new rr(this,this.#u)},this.projects=new rs(this,this.#u),this.users=new rp(this,this.#u),this.agent={action:new tJ(this,this.#u)},this.releases=new rh(this,this.#u)}clone(){return new ry(this.#l,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=te(e,this.#c||{}),this}withConfig(e){let t=this.config();return new ry(this.#l,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return tv(this,this.#u,this.#c.stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return tE(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 tE(this,this.#u,e,r)}getDocuments(e,t){return tR(this,this.#u,e,t)}documentsExists(e,t){return tC(this,this.#u,e,t)}create(e,t){return t_(this,this.#u,e,"create",t)}createIfNotExists(e,t){return t$(this,this.#u,e,t)}createOrReplace(e,t){return tq(this,this.#u,e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return tA(this,this.#u,t,n,r,i,s);let o=rc("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||eI(e._id);return tT(this,this.#u,a,u,s)}delete(e,t){return tO(this,this.#u,e,t)}discardVersion({releaseId:e,publishedId:t},r,n){let i=ru(t,e);return tx(this,this.#u,i,r,n)}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=rc("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return tS(this,this.#u,s,n)}unpublishVersion({releaseId:e,publishedId:t},r){let n=eR(t,e);return tj(this,this.#u,n,t,r)}mutate(e,t){return tB(this,this.#u,e,t)}patch(e,t){return new th(e,t,this)}transaction(e){return new tg(e,this)}action(e,t){return tP(this,this.#u,e,t)}request(e){return tL(this,this.#u,e)}getUrl(e,t){return tN(this,e,t)}getDataUrl(e,t){return tM(this,e,t)}}class rg{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#c;#l;#u;listen=t6;constructor(e,t=e4){this.config(t),this.#l=e;const r=t._requestHandler;this.#u=r?(()=>{let n;return(i,s)=>(n||(n=new rg(e,{...t,_requestHandler:void 0})),r(i,t=>e(t,s),n))})():e,this.assets=new tX(this,this.#u),this.datasets=new t7(this,this.#u),this.live=new t8(this),this.mediaLibrary={video:new rn(this,this.#u)},this.projects=new ro(this,this.#u),this.users=new rd(this,this.#u),this.agent={action:new tY(this,this.#u)},this.releases=new rf(this,this.#u),this.observable=new ry(e,t)}clone(){return new rg(this.#l,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=te(e,this.#c||{}),this}withConfig(e){let t=this.config();return new rg(this.#l,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return(0,W.s)(tv(this,this.#u,this.#c.stega,e,t,r))}getDocument(e,t){if(t?.includeAllVersions===!0)return(0,W.s)(tE(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(0,W.s)(tE(this,this.#u,e,r))}getDocuments(e,t){return(0,W.s)(tR(this,this.#u,e,t))}documentsExists(e,t){return(0,W.s)(tC(this,this.#u,e,t))}create(e,t){return(0,W.s)(t_(this,this.#u,e,"create",t))}createIfNotExists(e,t){return(0,W.s)(t$(this,this.#u,e,t))}createOrReplace(e,t){return(0,W.s)(tq(this,this.#u,e,t))}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return(0,ei._)(tA(this,this.#u,t,n,r,i,s));let o=rc("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o}
14,u=t||eI(e._id);return(0,ei._)(tT(this,this.#u,a,u,s))}delete(e,t){return(0,W.s)(tO(this,this.#u,e,t))}discardVersion({releaseId:e,publishedId:t},r,n){let i=ru(t,e);return(0,W.s)(tx(this,this.#u,i,r,n))}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=rc("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return(0,ei._)(tS(this,this.#u,s,n))}unpublishVersion({releaseId:e,publishedId:t},r){let n=eR(t,e);return(0,W.s)(tj(this,this.#u,n,t,r))}mutate(e,t){return(0,W.s)(tB(this,this.#u,e,t))}patch(e,t){return new tf(e,t,this)}transaction(e){return new ty(e,this)}action(e,t){return(0,W.s)(tP(this,this.#u,e,t))}request(e){return(0,W.s)(tL(this,this.#u,e))}dataRequest(e,t,r){return(0,W.s)(tU(this,this.#u,e,t,r))}getUrl(e,t){return tN(this,e,t)}getDataUrl(e,t){return tM(this,e,t)}}let rm={requester:eF(n=[]),createClient:e=>{let t=eF(n,{ignoreWarnings:e.ignoreWarnings});return new rg((r,n)=>(n||t)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,lineage:e.lineage,...r}),e)}},rb=(rm.requester,rm.createClient);var rw=r(12115);function rv(e){let t=(0,i.useRouter)();return(0,rw.useEffect)(()=>{let r=setInterval(()=>(0,rw.startTransition)(()=>t.refresh()),e.interval);return()=>clearInterval(r)},[t,e.interval]),null}function rE(e){let{config:t,includeDrafts:r=!1,requestTag:n,waitFor:o,action:a,onError:u=rR,onWelcome:c=rC,onReconnect:l=rI,onRestart:h="refresh",onGoAway:f=r$}=e,{projectId:p,dataset:d,apiHost:y="https://api.sanity.io",apiVersion:g,useProjectHostname:m=!0,token:b,requestTagPrefix:w}=t,v={includeDrafts:r,waitFor:o},E=(0,rw.useMemo)(()=>rb({projectId:p,dataset:d,apiHost:y,apiVersion:g,useProjectHostname:m,ignoreBrowserTokenWarning:!0,token:b,useCdn:!1,requestTagPrefix:w}),[y,g,d,p,w,b,m]),[R,C]=(0,rw.useState)(!1),[I,$]=(0,rw.useState)();if(void 0!==I)throw I;let q=(0,rw.useEffectEvent)(e=>{"throw"===u?$(e):u(e,v)}),T=(0,i.useRouter)(),A=(0,rw.useEffectEvent)(e=>{switch(e.type){case"welcome":(0,rw.startTransition)(()=>C(!1)),c&&(0,rw.startTransition)(()=>c(e,v));break;case"message":(0,rw.startTransition)(()=>"refresh"===a?T.refresh():a(e.tags.map(e=>`sanity:${e}`)).then(e=>{"refresh"===e&&(0,rw.startTransition)(()=>T.refresh())}));break;case"reconnect":l&&(0,rw.startTransition)(()=>l(e,v));break;case"restart":(0,rw.startTransition)(()=>C(!1)),h&&(0,rw.startTransition)(()=>"refresh"===h?T.refresh():Promise.resolve(h(e,v)).then(e=>{"refresh"===e&&(0,rw.startTransition)(()=>T.refresh())}));break;case"goaway":f?(0,rw.startTransition)(()=>f(e,v,e=>(0,rw.startTransition)(()=>C(e)))):f||q(Error(`Sanity Live connection closed, automatic revalidation is disabled, the server gave this reason: ${e.reason}`,{cause:e}));break;default:q(Error("Unknown live event type",{cause:e}))}});return((0,rw.useEffect)(()=>{let e=E.live.events({includeDrafts:r,tag:n,waitFor:o}).subscribe({next:A,error:q});return()=>e.unsubscribe()},[E.live,n,r,o]),R&&Number.isFinite(R)&&R>0)?(0,s.jsx)(rv,{interval:R}):null}rv.displayName="RefreshOnInterval",rE.displayName="SanityLiveClientComponent";let rR=(e,t)=>{e instanceof Error&&"CorsOriginError"===e.name?console.warn(`Sanity Live is unable to connect to the Sanity API as the current origin - ${window.origin} - is not in the list of allowed CORS origins for this Sanity Project.`,e.addOriginUrl&&"Add it here:",e.addOriginUrl?.toString()):console.error(e)},rC=(e,{includeDrafts:t,waitFor:r})=>{console.info(`<SanityLive${t?" includeDrafts":""}> is connected and listening for live events to ${t?"all content including drafts and version documents in content releases":"published content"}.${"function"===r?" Events will be delayed until after a Sanity Function has processed them.":""}`)},rI=(e,{includeDrafts:t})=>{console.error(`<SanityLive${t?" includeDrafts":""}> is attempting to reconnect`)},r$=(e,{includeDrafts:t},r)=>{console.warn(`<SanityLive${t?" includeDrafts":""}> connection is closed after receiving a 'goaway' event, the server gave this reason:`,JSON.stringify(e.reason),"Content will now be refreshed every 30 seconds"),r(3e4)}},49303:(e,t,r)=>{"use strict";r.d(t,{AQ:()=>
vendor: 3,884 bytes, line 14
14d,C6:()=>i,Cl:()=>s,Ju:()=>c,N3:()=>p,Tt:()=>o,YH:()=>u,fX:()=>f,gz:()=>h,sH:()=>a,xN:()=>y,zs:()=>l});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function a(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}u((n=n.apply(e,t||[])).next())})}function u(e,t){var r,n,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){var c=[a,u];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,n=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){s=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){s.label=c[1];break}if(6===c[0]&&s.label<i[1]){s.label=i[1],i=c;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(c);break}i[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}function f(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function p(e){return this instanceof p?(this.v=e,this):new p(e)}function d(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),n[Symbol.asyncIterator]=function(){return this},n;function o(e,t){i[e]&&(n[e]=function(t){return new Promise(function(r,n){
14s.push([e,t,r,n])>1||a(e,t)})},t&&(n[e]=t(n[e])))}function a(e,t){try{var r;(r=i[e](t)).value instanceof p?Promise.resolve(r.value.v).then(u,c):l(s[0][2],r)}catch(e){l(s[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function y(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=c(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){var s,o,a;s=n,o=i,a=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){s({value:e,done:a})},o)})}}}"function"==typeof SuppressedError&&SuppressedError},49304:(e,t,r)=>{"use strict";let n=r(26801),i=r(81852),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e){var n=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!a.isEncoding(i))throw TypeError("Unknown encoding: "+i);let r=0|d(n,i),s=o(r),u=s.write(n,i);return u!==r&&(s=s.slice(0,u)),s}if(ArrayBuffer.isView(e)){var s=e;if(F(s,Uint8Array)){let e=new Uint8Array(s);return f(e.buffer,e.byteOffset,e.byteLength)}return h(s)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(F(e,SharedArrayBuffer)||e&&F(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let u=e.valueOf&&e.valueOf();if(null!=u&&u!==e)return a.from(u,t,r);let c=function(e){if(a.isBuffer(e)){let t=0|p(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(c)return c;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),o(e<0?0:0|p(e))}function h(e){let t=e.length<0?0:0|p(e.length),r=o(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e,t,r){let n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),a.prototype),n}function p(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(i)return n?-1:P(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=k[e[n]];return i}(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":var s,o,a;return s=this,o=t,a=r,0===o&&a===s.length?n.fromByteArray(s):n.fromByteArray(s.slice(o,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){let n=e.slice(t,r),i="";for(let e=0;e<n.length-1;
vendor: 17,032 bytes, line 14
14e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}(this,t,r);default:if(i)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function g(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){var s;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(s=r*=1)!=s&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return b(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let s,o=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;o=2,a/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(s=r;s<a;s++)if(c(e,s)===c(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===u)return n*o}else -1!==n&&(s-=s-n),n=-1}else for(r+u>a&&(r=a-u),s=r;s>=0;s--){let r=!0;for(let n=0;n<u;n++)if(c(e,s+n)!==c(t,n)){r=!1;break}if(r)return s}return -1}function w(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let t=e[i],s=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,a,u;switch(o){case 1:t<128&&(s=t);break;case 2:(192&(r=e[i+1]))==128&&(u=(31&t)<<6|63&r)>127&&(s=u);break;case 3:r=e[i+1],n=e[i+2],(192&r)==128&&(192&n)==128&&(u=(15&t)<<12|(63&r)<<6|63&n)>2047&&(u<55296||u>57343)&&(s=u);break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],(192&r)==128&&(192&n)==128&&(192&a)==128&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a)>65535&&u<1114112&&(s=u)}}null===s?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=o}var s=n;let o=s.length;if(o<=4096)return String.fromCharCode.apply(String,s);let a="",u=0;for(;u<o;)a+=String.fromCharCode.apply(String,s.slice(u,u+=4096));return a}function v(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function E(e,t,r,n,i,s){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function R(e,t,r,n,i){x(t,n,i,e,r,7);let s=Number(t&BigInt(0xffffffff));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function C(e,t,r,n,i){x(t,n,i,e,r,7);let s=Number(t&BigInt(0xffffffff));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function I(e,t,r,n,i,s){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function $(e,t,r,n,s){return t*=1,r>>>=0,s||I(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function q(e,t,r,n,s){return t*=1,r>>>=0,s||I(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.hp=a,t.IS=50,a.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return(c(e),e<=0)?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(F(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;let n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){let t=e[r];if(F(t,Uint8Array))i+t.length>n.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else if(a.isBuffer(t))t.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},a.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},a.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},a.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?w(this,0,e):y.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){let e="",r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(a.prototype[s]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(F(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let s=i-n,o=r-t,u=Math.min(s,o),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<u;++e)if(c[e]!==l[e]){s=c[e],o=l[e];break}return s<o?-1:+(o<s)},a.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){var i,s,o,a,u,c,l,h;if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let p=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let i;r=Number(r)||0;let s=e.length-r;n?(n=Number(n))>s&&(n=s):n=s;let o=t.length;for(n>o/2&&(n=o/2),i=0;i<n;++i){var a;let n=parseInt(t.substr(2*i,2),16);if((a=n)!=a)break;e[r+i]=n}return i}(this,e,t,r);case"utf8":case"utf-8":return i=t,s=r,_(P(e,this.length-i),this,i,s);case"ascii":case"latin1":case"binary":return o=t,a=r,_(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,o,a);case"base64":return u=t,c=r,_(U(e),this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=t,h=r,_(function(e,t){let r,n,i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i.push(r%256),i.push(n);return i}(e,this.length-l),this,l,h);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);let n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||v(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||v(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=D(function(e){S(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&j(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),a.prototype.readBigUInt64BE=D(function(e){S(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&j(e,this.length-8);let n=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],i=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||v(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||v(e,t,this.length);let n=t,i=1,s=this[e+--n];for(;n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},a.prototype.readInt8=function(e,t){return(e>>>=0,t||v(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||v(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||v(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=D(function(e){S(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&j(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+0x1000000*this[++e])}),a.prototype.readBigInt64BE=D(function(e){S(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&j(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r)}),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||v(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||v(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||v(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||v(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;E(this,e,t,r,n,0)}let i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;E(this,e,t,r,n,0)}let i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||E(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||E(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||E(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||E(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||E(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=D(function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=D(function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);E(this,e,t,r,n-1,-n)}let i=0,s=1,o=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s|0)-o&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);E(this,e,t,r,n-1,-n)}let i=r-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s|0)-o&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||E(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||E(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||E(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||E(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||E(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=D(function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=D(function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,r){return $(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return $(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return q(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return q(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);let i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},a.prototype.fill=function(e,t,r,n){let i;if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){let t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{let s=a.isBuffer(e)?e:a.from(e,n),o=s.length;
14if(0===o)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%o]}return this};let T={};function A(e,t,r){T[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function O(e){let t="",r=e.length,n=+("-"===e[0]);for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function x(e,t,r,n,i,s){if(e>r||e<t){let n,i="bigint"==typeof t?"n":"";throw n=s>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(s+1)*8}${i}`:`>= -(2${i} ** ${(s+1)*8-1}${i}) and < 2 ** ${(s+1)*8-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new T.ERR_OUT_OF_RANGE("value",n,e)}S(i,"offset"),(void 0===n[i]||void 0===n[i+s])&&j(i,n.length-(s+1))}function S(e,t){if("number"!=typeof e)throw new T.ERR_INVALID_ARG_TYPE(t,"number",e)}function j(e,t,r){if(Math.floor(e)!==e)throw S(e,r),new T.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new T.ERR_BUFFER_OUT_OF_BOUNDS;throw new T.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}A("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),A("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),A("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?i=O(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=O(i)),i+="n"),n+=` It must be ${t}. Received ${i}`},RangeError);let B=/[^+/0-9A-Za-z-_]/g;function P(e,t){let r;t=t||1/0;let n=e.length,i=null,s=[];for(let o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319||o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function U(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let k=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function D(e){return"u"<typeof BigInt?L:e}function L(){throw Error("BigInt not supported")}},50611:(e,t,r)=>{"use strict";function n(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}r.d(t,{Q:()=>h,u4:()=>n,y:()=>u});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},o={0:String.fromCodePoint(s[0]),1:String.fromCodePoint(s[1]),2:String.fromCodePoint(s[2]),3:String.fromCodePoint(s[3])},a=[,,,,].fill(String.fromCodePoint(s[0])).join("");function u(e,t,r="auto"){return!0===r||"auto"===r&&(!(!Number.isNaN(Number(e))||/[a-z]/i.test(e)&&!/\d+(?:[-:\/]\d+){2}(?:T\d+(?:[-:\/]\d+){1,2}(\.\d+)?Z?)?/.test(e))&&Date.parse(e)||function(e){try{new URL(e,e.startsWith("/")?"https://acme.com":void 0)}catch{return!1}return!0}(e))?e:`${e}${function(e){let t=JSON.stringify(e),r=new TextEncoder().encode(t),n="";for(let e=0;e<r.length;e++){let t=r[e];n+=o[t>>6&3]+o[t>>4&3]+o[t>>2&3]+o[3&t]}return a+n}(t)}`}Object.fromEntries(Object.entries(o).map(e=>[e[1],+e[0]])),Object.fromEntries(Object.entries(i).map(e=>e.reverse()));
14var c=`${Object.values(i).map(e=>`\\u{${e.toString(16)}}`).join("")}`,l=RegExp(`[${c}]{4,}`,"gu");function h(e){var t,r;return e&&JSON.parse({cleaned:(t=JSON.stringify(e)).replace(l,""),encoded:(null==(r=t.match(l))?void 0:r[0])||""}.cleaned)}},73321:(e,t,r)=>{"use strict";var n=r(74645);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},81852:(e,t)=>{t.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,s=p&(1<<-l)-1,p>>=-l,l+=a;l>0;s=256*s+e[t+h],h+=f,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=n;l>0;o=256*o+e[t+h],h+=f,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),s-=c}return(p?-1:1)*o*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var o,a,u,c=8*s-i-1,l=(1<<c)-1,h=l>>1,f=5960464477539062e-23*(23===i),p=n?0:s-1,d=n?1:-1,y=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+h>=1?t+=f/u:t+=f*Math.pow(2,1-h),t*u>=2&&(o++,u/=2),o+h>
vendor: 252 bytes, lines 14-15
14=l?(a=0,o=l):o+h>=1?(a=(t*u-1)*Math.pow(2,i),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*y}}}]);
15//# sourceMappingURL=6082.a229267e4968dfb7.js.map

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.