1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8cf60ce9-b59c-464c-9525-1e823310b254",e._sentryDebugIdIdentifier="sentry-dbid-8cf60ce9-b59c-464c-9525-1e823310b254")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"a1914b02daa8c613ead1e27da03d97f802f0ebde"};(self.webpackChunkkurgo=self.webpackChunkkurgo||[]).push([[8377],{38377:function(e,t,n){n.r(t),n.d(t,{encodeIntoResult:function(){return d},stegaEncodeSourceMap:function(){return I},stegaEncodeSourceMap$1:function(){return A}});var r=n(32315);const o=/_key\s*==\s*['"](.*)['"]/;function i(e){if(!Array.isArray(e))throw new Error("Path is not an array");return e.reduce((e,t,n)=>{const r=typeof t;if("number"===r)return`${e}[${t}]`;if("string"===r)return`${e}${0===n?"":"."}${t}`;if(function(e){return"string"==typeof e?o.test(e.trim()):"object"==typeof e&&"_key"in e}(t)&&t._key)return`${e}[_key=="${t._key}"]`;if(Array.isArray(t)){const[n,r]=t;return`${e}[${n}:${r}]`}throw new Error(`Unsupported path segment \`${JSON.stringify(t)}\``)},"")}const s={"\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","'":"\\'","\\":"\\\\"},a={"\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t","\\'":"'","\\\\":"\\"};function c(e){const t=[],n=/\['(.*?)'\]|\[(\d+)\]|\[\?\(@\._key=='(.*?)'\)\]/g;let r;for(;null!==(r=n.exec(e));){if(void 0!==r[1]){const e=r[1].replace(/\\(\\|f|n|r|t|')/g,e=>a[e]);t.push(e);continue}if(void 0===r[2]){if(void 0!==r[3]){const e=r[3].replace(/\\(\\')/g,e=>a[e]);t.push({_key:e,_index:-1});continue}}else t.push(parseInt(r[2],10))}return t}function u(e){return e.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(""!==e._key)return{_key:e._key};if(-1!==e._index)return e._index;throw new Error(`invalid segment:${JSON.stringify(e)}`)})}function p(e){return e.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(-1!==e._index)return e._index;throw new Error(`invalid segment:${JSON.stringify(e)}`)})}function l(e,t){if(!t?.mappings)return;const n=`$${p(e).map(e=>"string"==typeof e?`['${e.replace(/[\f\n\r\t'\\]/g,e=>s[e])}']`:"number"==typeof e?`[${e}]`:""!==e._key?`[?(@._key=='${e._key.replace(/['\\]/g,e=>s[e])}')]`:`[${e._index}]`).join("")}`;if(void 0!==t.mappings[n])return{mapping:t.mappings[n],matchedPath:n,pathSuffix:""};const r=function(e){return e.map(e=>"string"==typeof e?`['${e.replace(/[\f\n\r\t'\\]/g,e=>s[e])}']`:"number"==typeof e?`[${e}]`:""!==e._key?`[?(@._key=='${e._key.replace(/['\\]/g,e=>s[e])}')]`:`[${e._index}]`)}(p(e));for(let o=r.length-1;o>=0;o--){const e=`$${r.slice(0,o).join("")}`,i=t.mappings[e];if(i){return{mapping:i,matchedPath:e,pathSuffix:n.substring(e.length)}}}}function f(e,t,n=[]){if(function(e){return null!==e&&Array.isArray(e)}(e))return e.map((e,o)=>{if((0,r.u4)(e)){const r=e._key;if("string"==typeof r)return f(e,t,n.concat({_key:r,_index:o}))}return f(e,t,n.concat(o))});if((0,r.u4)(e)){if("block"===e._type||"span"===e._type){const r={...e};return"block"===e._type?r.children=f(e.children,t,n.concat("children")):"span"===e._type&&(r.text=f(e.text,t,n.concat("text"))),r}return Object.fromEntries(Object.entries(e).map(([e,r])=>[e,f(r,t,n.concat(e))]))}return t(e,n)}function d(e,t,n){return f(e,(e,r)=>{if("string"!=typeof e)return e;const o=l(r,t);if(!o)return e;const{mapping:i,matchedPath:s}=o;if("value"!==i.type||"documentValue"!==i.source.type)return e;const a=t.documents[i.source.document],u=t.paths[i.source.path],p=c(s),f=c(u).concat(r.slice(p.length));return n({sourcePath:f,sourceDocument:a,resultPath:r,value:e})})}const h=".",g=`drafts${h}`,y=`versions${h}`;function m(e){return e.startsWith(g)}function b(e){return e.startsWith(y)}function w(e){const{baseUrl:t,workspace:n="default",tool:r="default",id:o,type:s,path:a,projectId:c,dataset:p}=e;if(!t)throw new Error("baseUrl is required");if(!a)throw new Error("path is required");if(!o)throw new Error("id is required");if("/"!==t&&t.endsWith("/"))throw new Error("baseUrl must not end with a slash");const l="default"===n?void 0:n,f="default"===r?void 0:r,d=function(e){return b(e)?e.split(h).slice(2).join(h):m(e)?e.slice(g.length):e}(o),y=Array.isArray(a)?i(u(a)):a,w=new URLSearchParams({baseUrl:t,id:d,type:s,path:y});if(l&&w.set("workspace",l),f&&w.set("tool",f),c&&w.set("projectId",c),p&&w.set("dataset",p),function(e){return!m(e)&&!b
1(e)}(o))w.set("perspective","published");else if(b(o)){const e=function(e){if(!b(e))return;const[t,n,...r]=e.split(h);return n}(o);w.set("perspective",e)}const $=["/"===t?"":t];l&&$.push(l);const _=["mode=presentation",`id=${d}`,`type=${s}`,`path=${encodeURIComponent(y)}`];return f&&_.push(`tool=${f}`),$.push("intent","edit",`${_.join(";")}?${w}`),$.join("/")}const $=({sourcePath:e,resultPath:t,value:n})=>{if(/^\d{4}-\d{2}-\d{2}/.test(r=n)&&Date.parse(r)||function(e){try{const{protocol:t}=new URL(e,e.startsWith("/")?"https://acme.com":void 0);return k.has(t)||t.startsWith("web+")}catch{return!1}}(n))return!1;var r;const o=e.at(-1);return!("slug"===e.at(-2)&&"current"===o||"string"==typeof o&&(o.startsWith("_")||o.endsWith("Id"))||e.some(e=>"meta"===e||"metadata"===e||"openGraph"===e||"seo"===e)||v(e)||v(t)||"string"==typeof o&&_.has(o))},_=new Set(["color","colour","currency","email","format","gid","hex","href","hsl","hsla","icon","id","index","key","language","layout","link","linkAction","locale","lqip","page","path","ref","rgb","rgba","route","secret","slug","status","tag","template","theme","type","textTheme","unit","url","username","variant","website"]);const k=new Set(["app:","data:","discord:","file:","ftp:","ftps:","geo:","http:","https:","imap:","javascript:","magnet:","mailto:","maps:","ms-excel:","ms-powerpoint:","ms-word:","slack:","sms:","spotify:","steam:","teams:","tel:","vscode:","zoom:"]);function v(e){return e.some(e=>"string"==typeof e&&null!==e.match(/type/i))}const E=[8203,8204,8205,65279],S=E.map(e=>String.fromCharCode(e)),x=[8203,8204,8205,8290,8291,8288,65279,8289,119155,119156,119157,119158,119159,119160,119161,119162];Object.fromEntries(E.map((e,t)=>[e,t])),Object.fromEntries(x.map((e,t)=>[e,t.toString(16)]));const U=String.fromCodePoint(E[0]).repeat(4);function j(e,t,n="auto"){return!0!==n&&("auto"!==n||(r=e)&&"string"==typeof r&&Date.parse(r)||function(e){try{return new URL(e,e.startsWith("/")?"https://example.com":void 0),!0}catch{return!1}}(e))?e:`${e}${function(e){if(void 0===e)return"";const t="string"==typeof e?e:JSON.stringify(e),n=(new TextEncoder).encode(t);let r="";for(let o=0;o<n.length;o++){const e=n[o];r+=S[e>>6&3]+S[e>>4&3]+S[e>>2&3]+S[3&e]}return U+r}(t)}`;var r}[...E,...x].map(e=>`\\u{${e.toString(16)}}`).join("");const P=20;function I(e,t,n){const{filter:r,logger:i,enabled:s}=n;if(!s){const r="config.enabled must be true, don't call this function otherwise";throw i?.error?.(`[@sanity/client]: ${r}`,{result:e,resultSourceMap:t,config:n}),new TypeError(r)}if(!t)return i?.error?.("[@sanity/client]: Missing Content Source Map from response body",{result:e,resultSourceMap:t,config:n}),e;if(!n.studioUrl){const r="config.studioUrl must be defined";throw i?.error?.(`[@sanity/client]: ${r}`,{result:e,resultSourceMap:t,config:n}),new TypeError(r)}const a={encoded:[],skipped:[]},c=d(e,t,({sourcePath:e,sourceDocument:t,resultPath:o,value:s})=>{if(!1===("function"==typeof r?r({sourcePath:e,resultPath:o,filterDefault:$,sourceDocument:t,value:s}):$({sourcePath:e,resultPath:o,value:s})))return i&&a.skipped.push({path:D(e),value:`${s.slice(0,P)}${s.length>P?"...":""}`,length:s.length}),s;i&&a.encoded.push({path:D(e),value:`${s.slice(0,P)}${s.length>P?"...":""}`,length:s.length});const{baseUrl:c,workspace:u,tool:p}=function(e){let t="string"==typeof e?e:e.baseUrl;return"/"!==t&&(t=t.replace(/\/$/,"")),"string"==typeof e?{baseUrl:t}:{...e,baseUrl:t}}("function"==typeof n.studioUrl?n.studioUrl(t):n.studioUrl);if(!c)return s;const{_id:l,_type:f,_projectId:d,_dataset:h}=t;return j(s,{origin:"sanity.io",href:w({baseUrl:c,workspace:u,tool:p,id:l,type:f,path:e,...!n.omitCrossDatasetReferenceData&&{dataset:h,projectId:d}})},!0)});if(i){const e=a.skipped.length,t=a.encoded.length;if((e||t)&&((i?.groupCollapsed||i.log)?.("[@sanity/client]: Encoding source map into result"),i.log?.(`[@sanity/client]: Paths encoded: ${a.encoded.length}, skipped: ${a.skipped.length}`)),a.encoded.length>0&&(i?.log?.("[@sanity/client]: Table of encoded paths"),(i?.table||i.log)?.(a.encoded)),a.skipped.length>0){const e=new Set;for(const{path:t}of a.skipped)e.add(t.replace(o,"0").replace(/\[\d+\]/g,"[]"));i?.log?.("[@sanity/client]: List of skipped paths",[...e.values()])}(e||t)&&i?.groupEnd?.()}return c}function D(e){return i(u(e))}var A=Object.freeze({__proto__:null,stegaEncodeSourceMap:I})}}]); 2//# sourceMappingURL=8377-6cf45efb5dc7e63e3808.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.