@sveltia/cms 0.104.2 → 0.104.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -10
- package/dist/sveltia-cms.js +6 -6
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +6 -6
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
package/dist/sveltia-cms.js
CHANGED
|
@@ -144,7 +144,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
144
144
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
145
145
|
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=zh(e),r=kc(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=zh(e),r=kc(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function _S(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new gS||null,prettyErrors:e}}function BM(t,e={}){const{lineCounter:n,prettyErrors:r}=_S(e),i=new tb(n?.addNewLine),o=new Zv(e),s=Array.from(o.compose(i.parse(t)));if(r&&n)for(const a of s)a.errors.forEach(Nh(t,n)),a.warnings.forEach(Nh(t,n));return s.length>0?s:Object.assign([],{empty:!0},o.streamInfo())}function yS(t,e={}){const{lineCounter:n,prettyErrors:r}=_S(e),i=new tb(n?.addNewLine),o=new Zv(e);let s=null;for(const a of o.compose(i.parse(t),!0,t.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new ja(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(Nh(t,n)),s.warnings.forEach(Nh(t,n))),s}function qM(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const i=yS(t,n);if(!i)return null;if(i.warnings.forEach(o=>Pk(i.options.logLevel,o)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function HM(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(t===void 0){const{keepUndefined:i}=n??e??{};if(!i)return}return Da(t)&&!r?t.toString(n):new yc(t,r,n).toString(n)}const sd=Object.freeze(Object.defineProperty({__proto__:null,Alias:ph,CST:zM,Composer:Zv,Document:yc,Lexer:pS,LineCounter:gS,Pair:Pr,Parser:tb,Scalar:_t,Schema:Ph,YAMLError:Gv,YAMLMap:Si,YAMLParseError:ja,YAMLSeq:Hs,YAMLWarning:eS,isAlias:qs,isCollection:Pn,isDocument:Da,isMap:cc,isNode:Nn,isPair:Cn,isScalar:hn,isSeq:uc,parse:qM,parseAllDocuments:BM,parseDocument:yS,stringify:HM,visit:Ma,visitAsync:hh},Symbol.toStringTag,{value:"Module"})),Ks=it([]),qa=en([Ks],([t],e)=>{e(t.find(({collectionName:n,internalPath:r})=>n===void 0&&r!==void 0))}),eo=it(),Uh=en([eo,qa],([t,e])=>t?.internalPath!==void 0?t:e),to=({collectionName:t,fileName:e,keyPath:n})=>se(Ks).find(r=>r.collectionName===t&&r.fileName===e&&r.keyPath===n),jh=(t,{matchSubFolders:e=!0}={})=>{const{filename:n}=fn(t);return n.startsWith("+")?[]:se(Ks).filter(({internalPath:r,entryRelative:i})=>r===void 0?!1:i?t.startsWith(`${r}/`):new RegExp(`^${r.replace(/{{.+?}}/g,".+?")}${r&&e?"\\b":"$"}`).test(fn(t).dirname??"")).sort((r,i)=>(i.internalPath??"").localeCompare(r.internalPath??"")??0)},nb=t=>!!t&&!t.entryRelative&&!t.hasTemplateTags;class Co{#t;#r="";#e="";#a={};#s=[];constructor(e,n,{keyPath:r,autoIncrement:i,indexes:o=[]}={}){this.#t=void 0,this.#r=e,this.#e=n,this.#a={keyPath:r,autoIncrement:i},this.#s=o}async#o(e){return new Promise(n=>{const r=globalThis.indexedDB.open(this.#r,e);r.onupgradeneeded=()=>{const i=r.result,o=this.#e,s=i.objectStoreNames.contains(o)?i.transaction(o,"readwrite").objectStore(o):i.createObjectStore(o,this.#a);this.#s.forEach(({name:a,keyPath:c,options:u})=>{s.indexNames.contains(a)||s.createIndex(a,c,u)})},r.onsuccess=()=>{n(r.result)}})}async#l(){let e=!1,n=await this.#o();const{version:r,objectStoreNames:i}=n,o=this.#e;if(i.contains(o)){const s=n.transaction(o).objectStore(o);e=this.#s.some(({name:a})=>!s.indexNames.contains(a))}else e=!0;return e&&(n.close(),n=await this.#o(r+1)),n.onversionchange=()=>{n.close(),this.#t=void 0},n}async#n(e){this.#t??=await this.#l();const n=this.#t,r=this.#e,i=n.transaction(r,"readwrite"),o=e(i.objectStore(r));return o?new Promise(s=>{o.onsuccess=()=>{s(o.result)}}):new Promise(s=>{i.oncomplete=()=>{s(void 0)}})}async set(e,n){return this.#n(r=>r.put(n,e))}async put(e){return this.#n(n=>n.put(e))}async saveEntries(e){return this.#n(n=>{e.forEach(([r,i])=>{n.put(i,r)})})}async get(e){return this.#n(n=>n.get(e))}async keys(){return this.#n(e=>e.getAllKeys())}async values(){return this.#n(e=>e.getAll())}async entries(){const[e,n]=await Promise.all([this.keys(),this.values()]);return e.map((r,i)=>[r,n[i]])}async#i({callback:e=void 0,index:n=void 0,query:r=void 0,direction:i="next",multiple:o=!1}){return new Promise(s=>{this.#n(a=>{const c=(n?a.index(n):a).openCursor(r,i),u=[];c.onsuccess=()=>{const d=c.result;if(d){const{value:f}=d;typeof e!="function"||e(f)?o?(u.push(f),d.continue()):s(f):d.continue()}else s(o?u:void 0)}})})}async find(e,{index:n,query:r}={}){return this.#i({callback:e,index:n,query:r})}async findLast(e,{index:n,query:r}={}){return this.#i({callback:e,index:n,query:r,direction:"prev"})}async filter(e,{index:n,query:r}={}){return this.#i({callback:e,index:n,query:r,multiple:!0})}async delete(e){await this.#n(n=>n.delete(e))}async deleteEntries(e){await this.#n(n=>{e.forEach(r=>{n.delete(r)})})}async clear(){await this.#n(e=>e.clear())}}class ai{static async set(e,n){globalThis.localStorage.setItem(e,JSON.stringify(n))}static async get(e){const n=globalThis.localStorage.getItem(e);return n?JSON.parse(n):null}static async delete(e){globalThis.localStorage.removeItem(e)}static async clear(){globalThis.localStorage.clear()}static async keys(){return Object.keys(globalThis.localStorage)}static async values(){return Object.values(globalThis.localStorage).map(e=>JSON.parse(e))}static async entries(){return Object.entries(globalThis.localStorage).map(([e,n])=>[e,JSON.parse(n)])}}const wS=t=>Array.isArray(t)&&t.every(e=>Xt(e)),ad=t=>[...new Set(t)];var rb,xS;function GM(){return xS||(xS=1,rb=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}),rb}var KM=GM();const pn=Yi(KM);function kS(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function SS(t){return t}function no(t,e){e=e||{};const n=e.delimiter||".",r=e.maxDepth,i=e.transformKey||SS,o={};function s(a,c,u){u=u||1,Object.keys(a).forEach(function(d){const f=a[d],h=e.safe&&Array.isArray(f),p=Object.prototype.toString.call(f),g=kS(f),m=p==="[object Object]"||p==="[object Array]",v=c?c+n+i(d):i(d);if(!h&&!g&&m&&Object.keys(f).length&&(!e.maxDepth||u<r))return s(f,v,u+1);o[v]=f})}return s(t),o}function is(t,e){e=e||{};const n=e.delimiter||".",r=e.overwrite||!1,i=e.transformKey||SS,o={};if(kS(t)||Object.prototype.toString.call(t)!=="[object Object]")return t;function a(d){const f=Number(d);return isNaN(f)||d.indexOf(".")!==-1||e.object?d:f}function c(d,f,h){return Object.keys(h).reduce(function(p,g){return p[d+n+g]=h[g],p},f)}function u(d){const f=Object.prototype.toString.call(d),h=f==="[object Array]",p=f==="[object Object]";if(d){if(h)return!d.length;if(p)return!Object.keys(d).length}else return!0}return t=Object.keys(t).reduce(function(d,f){const h=Object.prototype.toString.call(t[f]);return!(h==="[object Object]"||h==="[object Array]")||u(t[f])?(d[f]=t[f],d):c(f,d,no(t[f],e))},{}),Object.keys(t).forEach(function(d){const f=d.split(n).map(i);let h=a(f.shift()),p=a(f[0]),g=o;for(;p!==void 0;){if(h==="__proto__")return;const m=Object.prototype.toString.call(g[h]),v=m==="[object Object]"||m==="[object Array]";if(!r&&!v&&typeof g[h]<"u")return;(r&&!v||!r&&g[h]==null)&&(g[h]=typeof p=="number"&&!e.object?[]:{}),g=g[h],f.length>0&&(h=a(f.shift()),p=a(f[0]))}g[h]=is(t[d],e)}),o}const Ha=({date:t=new Date,timeZone:e=void 0}={})=>{const n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"longOffset"};return Object.fromEntries(new Intl.DateTimeFormat("en-US",{...n,hour12:!1,timeZone:e}).formatToParts(t).filter(({type:r})=>r in n).map(({type:r,value:i})=>[r,r==="hour"&&i==="24"?"00":i]))};function VM(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const WM=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","i"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ","a"],["ُ","u"],["ِ","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","h"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","N"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"]],YM=(t,e)=>{for(const[n,r]of e)t=t.replace(new RegExp(VM(n),"g"),r);return t};function JM(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...WM,...e.customReplacements]);return t=t.normalize(),t=YM(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const ES=(t,{fallback:e=!0}={})=>{const{slug:{encoding:n="unicode",clean_accents:r=!1,sanitize_replacement:i="-",trim:o=!0}={}}=se(Nt)??{};let s=t;if(r&&(s=JM(s).normalize("NFD").replace(/\p{Diacritic}/gu,"")),n==="ascii"?s=s.replaceAll(/[^\w-~]/g," "):s=s.replaceAll(/[\p{Z}\p{C}!"#$&'()*+,/:;<=>?@[\]^`{|}]/gu," "),s=s.toLocaleLowerCase().trim().replaceAll(/\s+/g,i),i){const a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=new RegExp(`${a}+`,"g");s=s.replace(c,i),o&&(s=s.replace(new RegExp(`^${a}+|${a}+$`,"g"),""))}return!s&&e?oi("short"):s};var Bh={exports:{}},ZM=Bh.exports,TS;function XM(){return TS||(TS=1,(function(t,e){(function(n,r){t.exports=r()})(ZM,(function(){var n=1e3,r=6e4,i=36e5,o="millisecond",s="second",a="minute",c="hour",u="day",d="week",f="month",h="quarter",p="year",g="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var F=["th","st","nd","rd"],U=L%100;return"["+L+(F[(U-20)%10]||F[U]||F[0])+"]"}},w=function(L,F,U){var V=String(L);return!V||V.length>=F?L:""+Array(F+1-V.length).join(U)+L},S={s:w,z:function(L){var F=-L.utcOffset(),U=Math.abs(F),V=Math.floor(U/60),W=U%60;return(F<=0?"+":"-")+w(V,2,"0")+":"+w(W,2,"0")},m:function L(F,U){if(F.date()<U.date())return-L(U,F);var V=12*(U.year()-F.year())+(U.month()-F.month()),W=F.clone().add(V,f),J=U-W<0,N=F.clone().add(V+(J?-1:1),f);return+(-(V+(U-W)/(J?W-N:N-W))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:p,w:d,d:u,D:g,h:c,m:a,s,ms:o,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},C="en",E={};E[C]=y;var $="$isDayjsObject",k=function(L){return L instanceof P||!(!L||!L[$])},x=function L(F,U,V){var W;if(!F)return C;if(typeof F=="string"){var J=F.toLowerCase();E[J]&&(W=J),U&&(E[J]=U,W=J);var N=F.split("-");if(!W&&N.length>1)return L(N[0])}else{var B=F.name;E[B]=F,W=B}return!V&&W&&(C=W),W||!V&&C},A=function(L,F){if(k(L))return L.clone();var U=typeof F=="object"?F:{};return U.date=L,U.args=arguments,new P(U)},I=S;I.l=x,I.i=k,I.w=function(L,F){return A(L,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var P=(function(){function L(U){this.$L=x(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[$]=!0}var F=L.prototype;return F.parse=function(U){this.$d=(function(V){var W=V.date,J=V.utc;if(W===null)return new Date(NaN);if(I.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var N=W.match(v);if(N){var B=N[2]-1||0,K=(N[7]||"0").substring(0,3);return J?new Date(Date.UTC(N[1],B,N[3]||1,N[4]||0,N[5]||0,N[6]||0,K)):new Date(N[1],B,N[3]||1,N[4]||0,N[5]||0,N[6]||0,K)}}return new Date(W)})(U),this.init()},F.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},F.$utils=function(){return I},F.isValid=function(){return this.$d.toString()!==m},F.isSame=function(U,V){var W=A(U);return this.startOf(V)<=W&&W<=this.endOf(V)},F.isAfter=function(U,V){return A(U)<this.startOf(V)},F.isBefore=function(U,V){return this.endOf(V)<A(U)},F.$g=function(U,V,W){return I.u(U)?this[V]:this.set(W,U)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(U,V){var W=this,J=!!I.u(V)||V,N=I.p(U),B=function(ce,he){var pe=I.w(W.$u?Date.UTC(W.$y,he,ce):new Date(W.$y,he,ce),W);return J?pe:pe.endOf(u)},K=function(ce,he){return I.w(W.toDate()[ce].apply(W.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(he)),W)},Y=this.$W,Q=this.$M,ie=this.$D,ee="set"+(this.$u?"UTC":"");switch(N){case p:return J?B(1,0):B(31,11);case f:return J?B(1,Q):B(0,Q+1);case d:var te=this.$locale().weekStart||0,re=(Y<te?Y+7:Y)-te;return B(J?ie-re:ie+(6-re),Q);case u:case g:return K(ee+"Hours",0);case c:return K(ee+"Minutes",1);case a:return K(ee+"Seconds",2);case s:return K(ee+"Milliseconds",3);default:return this.clone()}},F.endOf=function(U){return this.startOf(U,!1)},F.$set=function(U,V){var W,J=I.p(U),N="set"+(this.$u?"UTC":""),B=(W={},W[u]=N+"Date",W[g]=N+"Date",W[f]=N+"Month",W[p]=N+"FullYear",W[c]=N+"Hours",W[a]=N+"Minutes",W[s]=N+"Seconds",W[o]=N+"Milliseconds",W)[J],K=J===u?this.$D+(V-this.$W):V;if(J===f||J===p){var Y=this.clone().set(g,1);Y.$d[B](K),Y.init(),this.$d=Y.set(g,Math.min(this.$D,Y.daysInMonth())).$d}else B&&this.$d[B](K);return this.init(),this},F.set=function(U,V){return this.clone().$set(U,V)},F.get=function(U){return this[I.p(U)]()},F.add=function(U,V){var W,J=this;U=Number(U);var N=I.p(V),B=function(Q){var ie=A(J);return I.w(ie.date(ie.date()+Math.round(Q*U)),J)};if(N===f)return this.set(f,this.$M+U);if(N===p)return this.set(p,this.$y+U);if(N===u)return B(1);if(N===d)return B(7);var K=(W={},W[a]=r,W[c]=i,W[s]=n,W)[N]||1,Y=this.$d.getTime()+U*K;return I.w(Y,this)},F.subtract=function(U,V){return this.add(-1*U,V)},F.format=function(U){var V=this,W=this.$locale();if(!this.isValid())return W.invalidDate||m;var J=U||"YYYY-MM-DDTHH:mm:ssZ",N=I.z(this),B=this.$H,K=this.$m,Y=this.$M,Q=W.weekdays,ie=W.months,ee=W.meridiem,te=function(he,pe,me,fe){return he&&(he[pe]||he(V,J))||me[pe].slice(0,fe)},re=function(he){return I.s(B%12||12,he,"0")},ce=ee||function(he,pe,me){var fe=he<12?"AM":"PM";return me?fe.toLowerCase():fe};return J.replace(b,(function(he,pe){return pe||(function(me){switch(me){case"YY":return String(V.$y).slice(-2);case"YYYY":return I.s(V.$y,4,"0");case"M":return Y+1;case"MM":return I.s(Y+1,2,"0");case"MMM":return te(W.monthsShort,Y,ie,3);case"MMMM":return te(ie,Y);case"D":return V.$D;case"DD":return I.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return te(W.weekdaysMin,V.$W,Q,2);case"ddd":return te(W.weekdaysShort,V.$W,Q,3);case"dddd":return Q[V.$W];case"H":return String(B);case"HH":return I.s(B,2,"0");case"h":return re(1);case"hh":return re(2);case"a":return ce(B,K,!0);case"A":return ce(B,K,!1);case"m":return String(K);case"mm":return I.s(K,2,"0");case"s":return String(V.$s);case"ss":return I.s(V.$s,2,"0");case"SSS":return I.s(V.$ms,3,"0");case"Z":return N}return null})(he)||N.replace(":","")}))},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(U,V,W){var J,N=this,B=I.p(V),K=A(U),Y=(K.utcOffset()-this.utcOffset())*r,Q=this-K,ie=function(){return I.m(N,K)};switch(B){case p:J=ie()/12;break;case f:J=ie();break;case h:J=ie()/3;break;case d:J=(Q-Y)/6048e5;break;case u:J=(Q-Y)/864e5;break;case c:J=Q/i;break;case a:J=Q/r;break;case s:J=Q/n;break;default:J=Q}return W?J:I.a(J)},F.daysInMonth=function(){return this.endOf(f).$D},F.$locale=function(){return E[this.$L]},F.locale=function(U,V){if(!U)return this.$L;var W=this.clone(),J=x(U,V,!0);return J&&(W.$L=J),W},F.clone=function(){return I.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},L})(),O=P.prototype;return A.prototype=O,[["$ms",o],["$s",s],["$m",a],["$H",c],["$W",u],["$M",f],["$y",p],["$D",g]].forEach((function(L){O[L[1]]=function(F){return this.$g(F,L[0],L[1])}})),A.extend=function(L,F){return L.$i||(L(F,P,A),L.$i=!0),A},A.locale=x,A.isDayjs=k,A.unix=function(L){return A(1e3*L)},A.en=E[C],A.Ls=E,A.p={},A}))})(Bh)),Bh.exports}var QM=XM();const rr=Yi(QM);var qh={exports:{}},e3=qh.exports,CS;function t3(){return CS||(CS=1,(function(t,e){(function(n,r){t.exports=r()})(e3,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,c={},u=function(v){return(v=+v)+(v>68?1900:2e3)},d=function(v){return function(b){this[v]=+b}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(b){if(!b||b==="Z")return 0;var y=b.match(/([+-]|\d\d)/g),w=60*y[1]+(+y[2]||0);return w===0?0:y[0]==="+"?-w:w})(v)}],h=function(v){var b=c[v];return b&&(b.indexOf?b:b.s.concat(b.f))},p=function(v,b){var y,w=c.meridiem;if(w){for(var S=1;S<=24;S+=1)if(v.indexOf(w(S,0,b))>-1){y=S>12;break}}else y=v===(b?"pm":"PM");return y},g={A:[a,function(v){this.afternoon=p(v,!1)}],a:[a,function(v){this.afternoon=p(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[o,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[s,d("seconds")],ss:[s,d("seconds")],m:[s,d("minutes")],mm:[s,d("minutes")],H:[s,d("hours")],h:[s,d("hours")],HH:[s,d("hours")],hh:[s,d("hours")],D:[s,d("day")],DD:[o,d("day")],Do:[a,function(v){var b=c.ordinal,y=v.match(/\d+/);if(this.day=y[0],b)for(var w=1;w<=31;w+=1)b(w).replace(/\[|\]/g,"")===v&&(this.day=w)}],w:[s,d("week")],ww:[o,d("week")],M:[s,d("month")],MM:[o,d("month")],MMM:[a,function(v){var b=h("months"),y=(h("monthsShort")||b.map((function(w){return w.slice(0,3)}))).indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[a,function(v){var b=h("months").indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,d("year")],YY:[o,function(v){this.year=u(v)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function m(v){var b,y;b=v,y=c&&c.formats;for(var w=(v=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(A,I,P){var O=P&&P.toUpperCase();return I||y[P]||n[P]||y[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(L,F,U){return F||U.slice(1)}))}))).match(r),S=w.length,C=0;C<S;C+=1){var E=w[C],$=g[E],k=$&&$[0],x=$&&$[1];w[C]=x?{regex:k,parser:x}:E.replace(/^\[|\]$/g,"")}return function(A){for(var I={},P=0,O=0;P<S;P+=1){var L=w[P];if(typeof L=="string")O+=L.length;else{var F=L.regex,U=L.parser,V=A.slice(O),W=F.exec(V)[0];U.call(I,W),A=A.replace(W,"")}}return(function(J){var N=J.afternoon;if(N!==void 0){var B=J.hours;N?B<12&&(J.hours+=12):B===12&&(J.hours=0),delete J.afternoon}})(I),I}}return function(v,b,y){y.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var w=b.prototype,S=w.parse;w.parse=function(C){var E=C.date,$=C.utc,k=C.args;this.$u=$;var x=k[1];if(typeof x=="string"){var A=k[2]===!0,I=k[3]===!0,P=A||I,O=k[2];I&&(O=k[2]),c=this.$locale(),!A&&O&&(c=y.Ls[O]),this.$d=(function(V,W,J,N){try{if(["x","X"].indexOf(W)>-1)return new Date((W==="X"?1e3:1)*V);var B=m(W)(V),K=B.year,Y=B.month,Q=B.day,ie=B.hours,ee=B.minutes,te=B.seconds,re=B.milliseconds,ce=B.zone,he=B.week,pe=new Date,me=Q||(K||Y?1:pe.getDate()),fe=K||pe.getFullYear(),ge=0;K&&!Y||(ge=Y>0?Y-1:pe.getMonth());var _e,be=ie||0,Ne=ee||0,$e=te||0,Ke=re||0;return ce?new Date(Date.UTC(fe,ge,me,be,Ne,$e,Ke+60*ce.offset*1e3)):J?new Date(Date.UTC(fe,ge,me,be,Ne,$e,Ke)):(_e=new Date(fe,ge,me,be,Ne,$e,Ke),he&&(_e=N(_e).week(he).toDate()),_e)}catch{return new Date("")}})(E,x,$,y),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),P&&E!=this.format(x)&&(this.$d=new Date("")),c={}}else if(x instanceof Array)for(var L=x.length,F=1;F<=L;F+=1){k[1]=x[F-1];var U=y.apply(this,k);if(U.isValid()){this.$d=U.$d,this.$L=U.$L,this.init();break}F===L&&(this.$d=new Date(""))}else S.call(this,C)}}}))})(qh)),qh.exports}var n3=t3();const ib=Yi(n3);var Hh={exports:{}},r3=Hh.exports,AS;function i3(){return AS||(AS=1,(function(t,e){(function(n,r){t.exports=r()})(r3,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,i,o){var s=i.prototype,a=s.format;o.en.formats=n,s.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,d=(function(f,h){return f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(p,g,m){var v=m&&m.toUpperCase();return g||h[m]||n[m]||h[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(b,y,w){return y||w.slice(1)}))}))})(c,u===void 0?{}:u);return a.call(this,d)}}}))})(Hh)),Hh.exports}var o3=i3();const ob=Yi(o3);var Gh={exports:{}},s3=Gh.exports,$S;function a3(){return $S||($S=1,(function(t,e){(function(n,r){t.exports=r()})(s3,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,s,a){var c=s.prototype;a.utc=function(m){var v={date:m,utc:!0,args:arguments};return new s(v)},c.utc=function(m){var v=a(this.toDate(),{locale:this.$L,utc:!0});return m?v.add(this.utcOffset(),n):v},c.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var u=c.parse;c.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),u.call(this,m)};var d=c.init;c.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else d.call(this)};var f=c.utcOffset;c.utcOffset=function(m,v){var b=this.$utils().u;if(b(m))return this.$u?0:b(this.$offset)?f.call(this):this.$offset;if(typeof m=="string"&&(m=(function(C){C===void 0&&(C="");var E=C.match(r);if(!E)return null;var $=(""+E[0]).match(i)||["-",0,0],k=$[0],x=60*+$[1]+ +$[2];return x===0?0:k==="+"?x:-x})(m),m===null))return this;var y=Math.abs(m)<=16?60*m:m;if(y===0)return this.utc(v);var w=this.clone();if(v)return w.$offset=y,w.$u=!1,w;var S=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(w=this.local().add(y+S,n)).$offset=y,w.$x.$localOffset=S,w};var h=c.format;c.format=function(m){var v=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},c.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var p=c.toDate;c.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var g=c.diff;c.diff=function(m,v,b){if(m&&this.$u===m.$u)return g.call(this,m,v,b);var y=this.local(),w=a(m).local();return g.call(y,w,v,b)}}}))})(Gh)),Gh.exports}var l3=a3();const sb=Yi(l3),ld=t=>{let e;if(t!=="_default")try{[e]=Intl.getCanonicalLocales(t)}catch{}return e},Ui=t=>{const e=ld(t);if(!e)return t;const n=new Intl.DisplayNames(se(Wt),{type:"language"});try{return n.of(e)??t}catch(r){return console.error(r),t}},Sc=(t,e={})=>new Intl.ListFormat(ld(t),{style:"narrow",type:"conjunction",...e}),ab=({_i18n:t,locale:e,path:n})=>{const{defaultLocale:r,omitDefaultLocaleFromFileName:i}=t;return i&&e===r&&(n=n.replace(/\.{{locale}}\.(\w+)$/,".$1")),n.replaceAll("{{locale}}",e)},c3=/^(?:\d{4}-[01]\d-[0-3]\d)?(?:T?[0-2]\d:[0-5]\d)?(?::[0-5]\d)?(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$/,u3=/^\d{4}-[01]\d-[0-3]\d$/,d3=/T00:00(?::00)?(?:\.000)?Z$/,lb={year:"numeric",month:"short",day:"numeric"},cb={hour:"numeric",minute:"numeric",hour12:!0},f3={...lb,...cb};rr.extend(ib),rr.extend(ob),rr.extend(sb);const Vs=t=>{const{format:e,date_format:n=void 0,time_format:r=void 0,picker_utc:i=!1}=t;return{format:e||[typeof n=="string"?n:"",typeof r=="string"?r:""].join(" ").trim()||void 0,dateOnly:r===!1,timeOnly:n===!1,utc:i}},Ec=(t,e)=>{const{format:n,timeOnly:r,utc:i}=Vs(e);if(t)try{return n?(i?rr.utc:rr)(t,n).toDate():r?new Date(`${new Date().toJSON().split("T")[0]}T${t}`):new Date(t)}catch(o){console.error(o);return}},IS=t=>{const{dateOnly:e,timeOnly:n,utc:r}=Vs(t),{year:i,month:o,day:s,hour:a,minute:c}=Ha({timeZone:r?"UTC":void 0}),u=`${i}-${o}-${s}`,d=`${a}:${c}`;return e?u:n?d:r?`${u}T${d}:00.000Z`:`${u}T${d}`},PS=(t,e,n)=>{const{format:r,dateOnly:i,timeOnly:o,utc:s}=Vs(n),a=i?"YYYY-MM-DD":o?"HH:mm":"YYYY-MM-DDTHH:mm",c=`:00${e?.endsWith(".000")?".000":""}`;if(t==="")return"";if(t)try{if(r){const u=(s?rr.utc:rr)(t,a).format(r);return r.includes("Z")&&u.endsWith("+00:00")?u.replace("+00:00","Z"):u}return i?t:s?`${t}:00.000Z`:`${t}${c}`}catch(u){console.error(u);return}},h3=(t,e)=>{const{dateOnly:n,timeOnly:r,utc:i}=Vs(e);if(!t)return"";const o=n?t?.match(/^(?<date>\d{4}-[01]\d-[0-3]\d)\b/)?.groups?.date:r?t?.match(/(?:^|T)(?<time>[0-2]\d:[0-5]\d)\b/)?.groups?.time:void 0;if(o)return o;try{const s=t?Ec(t,e):new Date;if(t&&!s||t&&s&&Number.isNaN(s.getTime()))return"";const{year:a,month:c,day:u,hour:d,minute:f}=Ha({date:s,timeZone:i?"UTC":void 0}),h=`${a}-${c}-${u}`,p=`${d}:${f}`;return n?h:r?p:`${h}T${p}`}catch(s){return console.error(s),""}},NS=({locale:t,fieldConfig:e,currentValue:n})=>{const{format:r,dateOnly:i,timeOnly:o,utc:s}=Vs(e);if(typeof n!="string"||!n.trim())return"";if(r)try{return(s?rr.utc:rr)(n,r).format(r)}catch{}const a=Ec(n,e),c=ld(t);return!a||Number.isNaN(a.getTime())?"":o?a.toLocaleTimeString(c,cb):i?a.toLocaleDateString(c,{...lb,timeZone:s||u3.test(n)||d3.test(n)?"UTC":void 0}):a.toLocaleString(c,{...lb,...cb,timeZone:s?"UTC":void 0,timeZoneName:s?void 0:"short"})};rr.extend(ib),rr.extend(ob),rr.extend(sb);const ub=/^date\('(?<format>.+?)'(?:,\s*'(?<timeZone>.+?)')?\)$/,LS=/^default\('(?<defaultValue>.+?)'\)$/,OS=/^ternary\('(?<truthyValue>.*?)',\s*'(?<falsyValue>.*?)'\)$/,p3=/^truncate\((?<max>\d+)(?:,\s*'(?<ellipsis>.+?)')?\)$/,g3=t=>String(t).toUpperCase(),m3=t=>String(t).toLowerCase(),v3=(t,{format:e,timeZone:n},r)=>{const i=String(t),{dateOnly:o,utc:s}=Vs(r),c=(n==="utc"||s||o&&!!i.match(/^\d{4}-[01]\d-[0-3]\d$/)||o&&!!i.match(/T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?Z$/)?rr.utc:rr)(i);return c.isValid()?c.format(e):""},b3=(t,{defaultValue:e})=>t?String(t):e,_3=(t,{truthyValue:e,falsyValue:n})=>t?e:n,y3=(t,{max:e,ellipsis:n="…"})=>I1(String(t),Number(e),{ellipsis:n}),w3=({fieldConfig:t,value:e,transformation:n})=>{if(n==="upper")return g3(e);if(n==="lower")return m3(e);const r=n.match(ub);if(r?.groups)return v3(e,r.groups,t??{});const i=n.match(LS);if(i?.groups)return b3(e,i.groups);const o=n.match(OS);if(o?.groups)return _3(e,o.groups);const s=n.match(p3);return s?.groups?y3(e,s.groups):String(e)},db=({fieldConfig:t,value:e,transformations:n})=>(n.forEach(r=>{e=w3({fieldConfig:t,value:e,transformation:r})}),e),Lt=(t=0)=>new Promise(e=>{globalThis.setTimeout(()=>{e(void 0)},t)}),RS={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.autodesk.fbx":["fbx"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dcmp+xml":["dcmp"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.slides":["ggs"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.drawing":["gdraw"],"application/vnd.google-apps.form":["gform"],"application/vnd.google-apps.jam":["gjam"],"application/vnd.google-apps.map":["gmap"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.script":["gscript"],"application/vnd.google-apps.site":["gsite"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.gov.sk.xmldatacontainer+xml":["xdcf"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-visio.viewer":["vdx"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.nato.bindingdataobject+xml":["bdo"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.procrate.brushset":["brushset"],"application/vnd.procreate.brush":["brush"],"application/vnd.procreate.dream":["drm"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw","vsdx","vtx"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blender":["blend"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-compressed":["*rar"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-ipynb+json":["ipynb"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zip-compressed":["*zip"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-adobe-dng":["dng"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.bary":["bary"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["*mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(RS);const FS={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/dicom":["dcm"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg","one","onea"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"application/zip+dotlottie":["lottie"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a","m4b"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/ief":["ief"],"image/jaii":["jaii"],"image/jais":["jais"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpg","jpeg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxl":["jxl"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/pjpeg":["jfif"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime","mht","mhtml"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step":["step","stp","stpnc","p21","210"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts","m2t","m2ts","mts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(FS);var ji=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Tc,cd,Ga;class x3{constructor(...e){Tc.set(this,new Map),cd.set(this,new Map),Ga.set(this,new Map);for(const n of e)this.define(n)}define(e,n=!1){for(let[r,i]of Object.entries(e)){r=r.toLowerCase(),i=i.map(a=>a.toLowerCase()),ji(this,Ga,"f").has(r)||ji(this,Ga,"f").set(r,new Set);const o=ji(this,Ga,"f").get(r);let s=!0;for(let a of i){const c=a.startsWith("*");if(a=c?a.slice(1):a,o?.add(a),s&&ji(this,cd,"f").set(r,a),s=!1,c)continue;const u=ji(this,Tc,"f").get(a);if(u&&u!=r&&!n)throw new Error(`"${r} -> ${a}" conflicts with "${u} -> ${a}". Pass \`force=true\` to override this definition.`);ji(this,Tc,"f").set(a,r)}}return this}getType(e){if(typeof e!="string")return null;const n=e.replace(/^.*[/\\]/s,"").toLowerCase(),r=n.replace(/^.*\./s,"").toLowerCase(),i=n.length<e.length;return!(r.length<n.length-1)&&i?null:ji(this,Tc,"f").get(r)??null}getExtension(e){return typeof e!="string"?null:(e=e?.split?.(";")[0],(e&&ji(this,cd,"f").get(e.trim().toLowerCase()))??null)}getAllExtensions(e){return typeof e!="string"?null:ji(this,Ga,"f").get(e.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const e of ji(this,Ga,"f").values())Object.freeze(e);return this}_getTestState(){return{types:ji(this,Tc,"f"),extensions:ji(this,cd,"f")}}}Tc=new WeakMap,cd=new WeakMap,Ga=new WeakMap;const os=new x3(FS,RS)._freeze();var fb,DS;function k3(){if(DS)return fb;DS=1;function t(n){return n>=55296&&n<=56319}function e(n){return n>=56320&&n<=57343}return fb=function(r,i,o){if(typeof i!="string")throw new Error("Input must be string");for(var s=i.length,a=0,c,u,d=0;d<s;d+=1){if(c=i.charCodeAt(d),u=i[d],t(c)&&e(i.charCodeAt(d+1))&&(d+=1,u+=i[d]),a+=r(u),a===o)return i.slice(0,d+1);if(a>o)return i.slice(0,d-u.length+1)}return i},fb}var hb,MS;function S3(){if(MS)return hb;MS=1;function t(n){return n>=55296&&n<=56319}function e(n){return n>=56320&&n<=57343}return hb=function(r){if(typeof r!="string")throw new Error("Input must be string");for(var i=r.length,o=0,s=null,a=null,c=0;c<i;c++)s=r.charCodeAt(c),e(s)?a!=null&&t(a)?o+=1:o+=3:s<=127?o+=1:s>=128&&s<=2047?o+=2:s>=2048&&s<=65535&&(o+=3),a=s;return o},hb}var pb,zS;function E3(){if(zS)return pb;zS=1;var t=k3(),e=S3();return pb=t.bind(null,e),pb}var gb,US;function T3(){if(US)return gb;US=1;var t=E3(),e=/[\/\?<>\\:\*\|"]/g,n=/[\x00-\x1f\x80-\x9f]/g,r=/^\.+$/,i=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,o=/[\. ]+$/;function s(a,c){if(typeof a!="string")throw new Error("Input must be string");var u=a.replace(e,c).replace(n,c).replace(r,c).replace(i,c).replace(o,c);return t(u,255)}return gb=function(a,c){var u=c&&c.replacement||"",d=s(a,u);return u===""?d:s(d,"")},gb}var C3=T3();const A3=Yi(C3),jS=(t,e)=>new RegExp(`^${t.split("/").map(e).join("\\/")}\\b`),BS=t=>{const e=t.startsWith("@");return e&&(t=t.slice(1)),t=t.split("/").map(n=>encodeURIComponent(n).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`)).join("/"),e?`@${t}`:t},$3=t=>decodeURIComponent(t),Kh=t=>{const e=new Intl.NumberFormat(se(Wt),{maximumFractionDigits:1}),n=1e3,r=n*1e3,i=r*1e3,o=i*1e3;return t<n?se(ue)("file_size_units.b",{values:{size:e.format(t)}}):t<r?se(ue)("file_size_units.kb",{values:{size:e.format(t/n)}}):t<i?se(ue)("file_size_units.mb",{values:{size:e.format(t/r)}}):t<o?se(ue)("file_size_units.gb",{values:{size:e.format(t/i)}}):se(ue)("file_size_units.tb",{values:{size:e.format(t/o)}})},qS=(t,e)=>{if(!e.length)return t;const{filename:n,extension:r}=fn(t),i=new RegExp(`^${Kt(n)}(?:-(?<num>\\d+?))?${r?`\\.${r}`:""}$`),o=e.sort((a,c)=>ki(a.split(".")[0],c.split(".")[0])).findLast(a=>i.test(a));if(!o)return t;const s=Number(o.match(i)?.groups?.num??0)+1;return`${n}-${s}${r?`.${r}`:""}`},HS=(t,{slugificationEnabled:e=!1,assetNamesInSameFolder:n=[]}={})=>{let r=A3(t.normalize());if(e){const{filename:i,extension:o}=fn(r);r=`${ES(i)}${o?`.${o}`:""}`}return qS(r,n)},Cc=t=>t.filter(Boolean).join("/"),mb=t=>{const e=t.split("/");let n=!1;return e.forEach((r,i)=>{if(r==="."||r===".."){if(n&&(e[i]=null,r==="..")){const o=e.findLastIndex((s,a)=>!!s&&a<i);o>-1&&(e[o]=null)}}else n=!0}),Cc(e)},vb=t=>typeof t=="string"?new Blob([t],{type:"text/plain"}):t,Ka=async t=>{const n=await vb(t).arrayBuffer();return Fa(new Blob([`blob ${n.byteLength}\0`,n]))};let GS=class{constructor(e){if(I3(e))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=e,this.byteLength=this.buffer.length}getUint8(e){return this.buffer.readUInt8(e)}getUint16(e,n){return n?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}getUint32(e,n){return n?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}getInt32(e,n){return n?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}};function I3(t){return typeof t!="object"||t.length===void 0||t.readUInt8===void 0||t.readUInt16LE===void 0||t.readUInt16BE===void 0||t.readUInt32LE===void 0||t.readUInt32BE===void 0||t.readInt32LE===void 0||t.readInt32BE===void 0}function KS(t,e,n){try{return new DataView(t,e,n)}catch{return new GS(t,e,n)}}function yt(t,e,n){const r=[];for(let i=0;i<n&&e+i<t.byteLength;i++)r.push(t.getUint8(e+i));return Va(r)}function Ac(t,e){const n=[];let r=0;for(;e+r<t.byteLength;){const i=t.getUint8(e+r);if(i===0)break;n.push(i),r++}return Va(n)}function P3(t,e,n){const r=[];for(let i=0;i<n&&e+i<t.byteLength;i+=2)r.push(t.getUint16(e+i));return r[r.length-1]===0&&r.pop(),Va(r)}function VS(t,e){const n=t.getUint8(e),r=yt(t,e+1,n);return[n,r]}function Va(t){return t.map(e=>String.fromCharCode(e)).join("")}function kt(){for(let t=1;t<arguments.length;t++)for(const e in arguments[t])arguments[0][e]=arguments[t][e];return arguments[0]}function WS(t,e,n){let r=!1;Object.defineProperty(t,e,{get(){return r||(r=!0,Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n.apply(t),writable:!0})),t[e]},configurable:!0,enumerable:!0})}function YS(t){if(typeof btoa<"u")return btoa(typeof t=="string"?t:Array.prototype.reduce.call(new Uint8Array(t),(e,n)=>e+String.fromCharCode(n),""));if(!(typeof Buffer>"u"))return typeof Buffer.from<"u"?Buffer.from(t).toString("base64"):new Buffer(t).toString("base64")}function N3(t){const e=t.substring(t.indexOf(",")+1);if(t.indexOf(";base64")!==-1)return typeof atob<"u"?Uint8Array.from(atob(e),r=>r.charCodeAt(0)).buffer:typeof Buffer>"u"?void 0:typeof Buffer.from<"u"?Buffer.from(e,"base64"):new Buffer(e,"base64");const n=decodeURIComponent(e);return typeof Buffer<"u"?typeof Buffer.from<"u"?Buffer.from(n):new Buffer(n):Uint8Array.from(n,r=>r.charCodeAt(0)).buffer}function L3(t,e,n){return JS(n,e-t.length)+t}function O3(t,e){return parseInt(t.replace(".",""),e)/Math.pow(e,(t.split(".")[1]||"").length)}function JS(t,e){return new Array(e+1).join(t)}const Vh=void 0,ZS=0;function XS(t,e,n,r="string"){if(e===ZS&&typeof DecompressionStream=="function"){const i=new DecompressionStream("deflate"),o=new Blob([t]).stream().pipeThrough(i);return r==="dataview"?new Response(o).arrayBuffer().then(s=>new DataView(s)):new Response(o).arrayBuffer().then(s=>new TextDecoder(n).decode(s))}return e!==void 0?Promise.reject(`Unknown compression method ${e}.`):t}const QS={USE_FILE:!0,USE_JFIF:!0,USE_PNG_FILE:!0,USE_EXIF:!0,USE_IPTC:!0,USE_XMP:!0,USE_ICC:!0,USE_MPF:!0,USE_PHOTOSHOP:!0,USE_THUMBNAIL:!0,USE_TIFF:!0,USE_JPEG:!0,USE_PNG:!0,USE_HEIC:!0,USE_AVIF:!0,USE_WEBP:!0,USE_GIF:!0,USE_MAKER_NOTES:!0};function Zn(t){return t.map(e=>String.fromCharCode(e)).join("")}function bb(t){if(t.length>=8){const e=Zn(t.slice(0,8));if(e==="ASCII\0\0\0")return Zn(t.slice(8));if(e==="JIS\0\0\0\0\0")return"[JIS encoded text]";if(e==="UNICODE\0")return"[Unicode encoded text]";if(e==="\0\0\0\0\0\0\0\0")return"[Undefined encoding]"}return"Undefined"}function Wh(t){return t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600}const _b=18761,yb=19789,Ao={BIG_ENDIAN:yb,LITTLE_ENDIAN:_b,getByteOrder:R3};function R3(t,e){if(t.getUint16(e)===_b)return _b;if(t.getUint16(e)===yb)return yb;throw new Error("Illegal byte order value. Faulty image.")}const eE={isTiffFile:F3,findTiffOffsets:M3};function F3(t){return!!t&&t.byteLength>=4&&D3(t)}function D3(t){const r=t.getUint16(0)===Ao.LITTLE_ENDIAN;return t.getUint16(2,r)===42}function M3(){return{hasAppMarkers:!0,tiffHeaderOffset:0}}const tE={isJpegFile:ez,findJpegOffsets:tz},z3=2,U3=65496,nE=2,Bi=4,Nr=2,j3=2,B3=10,q3=18,rE=33,iE=79,oE=18,H3=8,wb="ICC_PROFILE\0",sE=Bi+wb.length,G3=sE+1,aE="MPF\0",lE=65472,cE=65474,K3=65476,V3=65499,W3=65501,Y3=65498,uE=65504,xb=65505,dE=65506,J3=65517,Z3=65519,X3=65534,Q3=65535,fE="JFIF",hE="Exif",pE="http://ns.adobe.com/xap/1.0/\0",gE="http://ns.adobe.com/xmp/extension/\0",mE="Photoshop 3.0";function ez(t){return!!t&&t.byteLength>=z3&&t.getUint16(0)===U3}function tz(t){let e=nE,n,r,i,o,s,a,c,u,d;for(;e+Bi+5<=t.byteLength;){if(nz(t,e))n=t.getUint16(e+Nr),r=e+Nr;else if(rz(t,e))n=t.getUint16(e+Nr),i=e+Nr;else if(sz(t,e))n=t.getUint16(e+Nr),o=e+j3;else if(az(t,e))n=t.getUint16(e+Nr),s=e+B3;else if(lz(t,e))c||(c=[]),n=t.getUint16(e+Nr),c.push(fz(e,n));else if(uz(t,e))c||(c=[]),n=t.getUint16(e+Nr),c.push(hz(e,n));else if(pz(t,e))n=t.getUint16(e+Nr),a=e+q3;else if(iz(t,e)){n=t.getUint16(e+Nr);const f=e+oE,h=n-(oE-Nr),p=t.getUint8(e+sE),g=t.getUint8(e+G3);u||(u=[]),u.push({offset:f,length:h,chunkNumber:p,chunksTotal:g})}else if(oz(t,e))n=t.getUint16(e+Nr),d=e+H3;else if(gz(t,e))n=t.getUint16(e+Nr);else if(mz(t,e)){e++;continue}else break;e+=Nr+n}return{hasAppMarkers:e>nE,fileDataOffset:r||i,jfifDataOffset:o,tiffHeaderOffset:s,iptcDataOffset:a,xmpChunks:c,iccChunks:u,mpfDataOffset:d}}function nz(t,e){return t.getUint16(e)===lE}function rz(t,e){return t.getUint16(e)===cE}function iz(t,e){const n=wb.length;return t.getUint16(e)===dE&&yt(t,e+Bi,n)===wb}function oz(t,e){const n=aE.length;return t.getUint16(e)===dE&&yt(t,e+Bi,n)===aE}function sz(t,e){const n=fE.length;return t.getUint16(e)===uE&&yt(t,e+Bi,n)===fE&&t.getUint8(e+Bi+n)===0}function az(t,e){const n=hE.length;return t.getUint16(e)===xb&&yt(t,e+Bi,n)===hE&&t.getUint8(e+Bi+n)===0}function lz(t,e){return t.getUint16(e)===xb&&cz(t,e)}function cz(t,e){const n=pE.length;return yt(t,e+Bi,n)===pE}function uz(t,e){return t.getUint16(e)===xb&&dz(t,e)}function dz(t,e){const n=gE.length;return yt(t,e+Bi,n)===gE}function fz(t,e){return{dataOffset:t+rE,length:e-(rE-Nr)}}function hz(t,e){return{dataOffset:t+iE,length:e-(iE-Nr)}}function pz(t,e){const n=mE.length;return t.getUint16(e)===J3&&yt(t,e+Bi,n)===mE&&t.getUint8(e+Bi+n)===0}function gz(t,e){const n=t.getUint16(e);return n>=uE&&n<=Z3||n===X3||n===lE||n===cE||n===K3||n===V3||n===W3||n===Y3}function mz(t,e){return t.getUint16(e)===Q3}const vE={isPngFile:_z,findPngOffsets:yz},kb=`PNG\r
|
|
146
146
|
|
|
147
|
-
`,Yh=4,ro=4,$c=0,Ws=Yh,yr=Yh+ro,Sb="XML:com.adobe.xmp\0",Eb="tEXt",Wa="iTXt",Jh="zTXt",bE="pHYs",_E="tIME",vz="eXIf",bz="iCCP";function _z(t){return!!t&&yt(t,0,kb.length)===kb}function yz(t,e){const r={hasAppMarkers:!1};let i=kb.length;for(;i+Yh+ro<=t.byteLength;){if(wz(t,i))r.hasAppMarkers=!0,r.pngHeaderOffset=i+yr;else if(xz(t,i)){const o=Cz(t,i);o!==void 0&&(r.hasAppMarkers=!0,r.xmpChunks=[{dataOffset:o,length:t.getUint32(i+$c)-(o-(i+yr))}])}else if(kz(t,i,e)){r.hasAppMarkers=!0;const o=yt(t,i+Ws,ro);r.pngTextChunks||(r.pngTextChunks=[]),r.pngTextChunks.push({length:t.getUint32(i+$c),type:o,offset:i+yr})}else if(Sz(t,i))r.hasAppMarkers=!0,r.tiffHeaderOffset=i+yr;else if(e&&Ez(t,i)){r.hasAppMarkers=!0;const o=t.getUint32(i+$c),s=i+yr,{profileName:a,compressionMethod:c,compressedProfileOffset:u}=Az(t,s);r.iccChunks||(r.iccChunks=[]),r.iccChunks.push({offset:u,length:o-(u-s),chunkNumber:1,chunksTotal:1,profileName:a,compressionMethod:c})}else Tz(t,i)&&(r.hasAppMarkers=!0,r.pngChunkOffsets||(r.pngChunkOffsets=[]),r.pngChunkOffsets.push(i+$c));i+=t.getUint32(i+$c)+Yh+ro+4}return r}function wz(t,e){return yt(t,e+Ws,ro)==="IHDR"}function xz(t,e){return yt(t,e+Ws,ro)===Wa&&yt(t,e+yr,Sb.length)===Sb}function kz(t,e,n){const r=yt(t,e+Ws,ro);return r===Eb||r===Wa||r===Jh&&n}function Sz(t,e){return yt(t,e+Ws,ro)===vz}function Ez(t,e){return yt(t,e+Ws,ro)===bz}function Tz(t,e){const n=[bE,_E],r=yt(t,e+Ws,ro);return n.includes(r)}function Cz(t,e){e+=yr+Sb.length+1+1;let i=0;for(;i<2&&e<t.byteLength;)t.getUint8(e)===0&&i++,e++;if(!(i<2))return e}function Az(t,e){const i=Ac(t,e);e+=i.length+1;const o=t.getUint8(e);return e+=1,{profileName:i,compressionMethod:o,compressedProfileOffset:e}}function $z(t,e){return t.getUint32(e+4)}function Iz(t,e,n,r){const{offsets:o,sizes:s}=Pz(e,n+3),a=t.getUint8(o.offsetSize)>>4;s.item.extent.extentOffset=a;const c=t.getUint8(o.lengthSize)&15;s.item.extent.extentLength=c;const u=t.getUint8(o.baseOffsetSize)>>4;s.item.baseOffset=u;const d=Nz(t,o.indexSize,e);s.item.extent.extentIndex=d!==void 0?d:0;const f=Lz(t,o.itemCount,e);return{type:"iloc",items:Oz(t,e,o,s,a,c,d,f),length:r}}function Pz(t,e){const n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};t<2?(n.itemCount=2,n.item.itemId=2):t===2&&(n.itemCount=4,n.item.itemId=4),t===1||t===2?n.item.constructionMethod=2:n.item.constructionMethod=0;const r={offsetSize:e,lengthSize:e,baseOffsetSize:e+1,indexSize:e+1};return r.itemCount=e+2,r.items=r.itemCount+n.itemCount,r.item={itemId:0},r.item.constructionMethod=r.item.itemId+n.item.itemId,r.item.dataReferenceIndex=r.item.constructionMethod+n.item.constructionMethod,{offsets:r,sizes:n}}function Nz(t,e,n){if(n===1||n===2)return t.getUint8(e)&15}function Lz(t,e,n){if(n<2)return t.getUint16(e);if(n===2)return t.getUint32(e)}function Oz(t,e,n,r,i,o,s,a){if(a===void 0)return[];const c=[];let u=n.items;for(let d=0;d<a;d++){const f={extents:[]};f.itemId=Rz(t,u,e),u+=r.item.itemId,f.constructionMethod=e===1||e===2?t.getUint16(u)&15:void 0,u+=r.item.constructionMethod,f.dataReferenceIndex=t.getUint16(u),u+=r.item.dataReferenceIndex,f.baseOffset=Zh(t,u,r.item.baseOffset),u+=r.item.baseOffset,f.extentCount=t.getUint16(u),u+=r.item.extentCount;for(let h=0;h<f.extentCount;h++){const p={};p.extentIndex=Fz(t,e,u,s),u+=r.item.extent.extentIndex,p.extentOffset=Zh(t,u,i),u+=r.item.extent.extentOffset,p.extentLength=Zh(t,u,o),u+=r.item.extent.extentLength,f.extents.push(p)}c.push(f)}return c}function Rz(t,e,n){if(n<2)return t.getUint16(e);if(n===2)return t.getUint32(e)}function Fz(t,e,n,r){if((e===1||e===2)&&r>0)return Zh(t,n,r)}function Zh(t,e,n){return n===4?t.getUint32(e):n===8?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),$z(t,e)):0}const Dz=1718909296,Mz=1768977008,zz=1835365473,Uz=1768714083,jz=1768517222,Bz=1768842853,qz=1768973167,Hz=1668246642,yE=1165519206,Tb=1835625829,Gz=1970432288;function Xh(t,e){const{length:o,contentOffset:s}=Kz(t,e);if(o<8)return;const a=t.getUint32(e+4);if(a===Dz)return rU(t,s,o);if(a===Mz)return iU(t,e,s,o);if(a===qz)return oU(t,e,s,o);if(a===Hz)return sU(t,s,o);const c=t.getUint8(s);return a===zz?lU(t,e,s+1,o):a===Uz?Iz(t,c,s+1,o):a===jz?cU(t,e,c,s+1,o):a===Bz?dU(t,e,c,s+1,o):{type:void 0,length:o}}function Kz(t,e){const s=t.getUint32(e);return Vz(s)?{length:t.byteLength-e,contentOffset:e+4+4}:Wz(s)&&Yz(t,e)?{length:t.getUint32(e+12),contentOffset:e+4+4+8}:{length:s,contentOffset:e+4+4}}function Vz(t){return t===0}function Wz(t){return t===1}function Yz(t,e){return t.getUint32(e+8)===0}function wE(t){{const e={},n=Jz(t);return n?(e.tiffHeaderOffset=Zz(t,n),e.xmpChunks=eU(n),e.iccChunks=nU(n),e.hasAppMarkers=e.tiffHeaderOffset!==void 0||e.xmpChunks!==void 0||e.iccChunks!==void 0,e):{hasAppMarkers:!1}}}function Jz(t){let r=0;for(;r+4+4<=t.byteLength;){const i=Xh(t,r);if(i===void 0)break;if(i.type==="meta")return i;r+=i.length}}function Zz(t,e){try{const n=Xz(e).itemId,r=Cb(e,n),i=r.baseOffset+r.extents[0].extentOffset;return Qz(t,i)}catch{return}}function Xz(t){return t.subBoxes.find(e=>e.type==="iinf").itemInfos.find(e=>e.itemType===yE)}function Cb(t,e){return t.subBoxes.find(n=>n.type==="iloc").items.find(n=>n.itemId===e)}function Qz(t,e){return e+4+t.getUint32(e)}function eU(t){try{const e=tU(t).itemId,n=Cb(t,e),r=Cb(t,e).extents[0];return[{dataOffset:n.baseOffset+r.extentOffset,length:r.extentLength}]}catch{return}}function tU(t){return t.subBoxes.find(e=>e.type==="iinf").itemInfos.find(e=>e.itemType===Tb&&e.contentType==="application/rdf+xml")}function nU(t){try{const e=t.subBoxes.find(n=>n.type==="iprp").subBoxes.find(n=>n.type==="ipco").properties.find(n=>n.type==="colr").icc;if(e)return[e]}catch{}}function rU(t,e,n){return{type:"ftyp",majorBrand:yt(t,e,4),length:n}}function iU(t,e,n,r){return{type:"iprp",subBoxes:Qh(t,n,r-(n-e)),length:r}}function oU(t,e,n,r){return{type:"ipco",properties:Qh(t,n,r-(n-e)),length:r}}function sU(t,e,n){return{type:"colr",icc:aU(t,e),length:n}}function aU(t,e){const r=yt(t,e,4);if(!(r!=="prof"&&r!=="rICC"))return{offset:e+4,length:t.getUint32(e+4),chunkNumber:1,chunksTotal:1}}function lU(t,e,n,r){return{type:"meta",subBoxes:Qh(t,n+3,r-(n+3-e)),length:r}}function Qh(t,e,n){const r=[yE,Tb],i=[];let o=e;for(;o<e+n;){const s=Xh(t,o);if(s===void 0)break;s.type!==void 0&&(s.itemType===void 0||r.indexOf(s.itemType)!==-1)&&i.push(s),o+=s.length}return i}function cU(t,e,n,r,i){const{offsets:o}=uU(n,r);return{type:"iinf",itemInfos:Qh(t,o.itemInfos,i-(o.itemInfos-e)),length:i}}function uU(t,e){const r={entryCount:e+3},i={};return t===0?i.entryCount=2:i.entryCount=4,r.itemInfos=r.entryCount+i.entryCount,{offsets:r}}function dU(t,e,n,r,i){r+=3;const s={type:"infe",length:i};return(n===0||n===1)&&(s.itemId=t.getUint16(r),r+=2,s.itemProtectionIndex=t.getUint16(r),r+=2,s.itemName=Ac(t,r),r+=s.itemName.length+1),n>=2&&(n===2?(s.itemId=t.getUint16(r),r+=2):n===3&&(s.itemId=t.getUint32(r),r+=4),s.itemProtectionIndex=t.getUint16(r),r+=2,s.itemType=t.getUint32(r),r+=4,s.itemName=Ac(t,r),r+=s.itemName.length+1,s.itemType===Tb?(s.contentType=Ac(t,r),r+=s.contentType.length+1,e+i>r&&(s.contentEncoding=Ac(t,r),r+=s.contentEncoding.length+1)):s.itemType===Gz&&(s.itemUri=Ac(t,r),r+=s.itemUri.length+1)),s}const xE={isHeicFile:fU,findHeicOffsets:hU};function fU(t){if(!t)return!1;const e=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=Xh(t,0);return n&&e.indexOf(n.majorBrand)!==-1}catch{return!1}}function hU(t){return wE(t)}const kE={isAvifFile:pU,findAvifOffsets:gU};function pU(t){if(!t)return!1;try{const e=Xh(t,0);return e&&e.majorBrand==="avif"}catch{return!1}}function gU(t){return wE(t)}const SE={isWebpFile:mU,findOffsets:vU};function mU(t){const n="RIFF",i="WEBP";return!!t&&yt(t,0,n.length)===n&&yt(t,8,i.length)===i}function vU(t){const r="Exif\0\0";let o=12,s=!1,a,c,u,d;for(;o+8<t.byteLength;){const f=yt(t,o,4),h=t.getUint32(o+4,!0);f==="EXIF"?(s=!0,yt(t,o+8,r.length)===r?a=o+8+r.length:a=o+8):f==="XMP "?(s=!0,c=[{dataOffset:o+8,length:h}]):f==="ICCP"?(s=!0,u=[{offset:o+8,length:h,chunkNumber:1,chunksTotal:1}]):f==="VP8X"&&(s=!0,d=o+8),o+=8+(h%2===0?h:h+1)}return{hasAppMarkers:s,tiffHeaderOffset:a,xmpChunks:c,iccChunks:u,vp8xChunkOffset:d}}const EE={isGifFile:yU,findOffsets:wU},bU=6,_U=["GIF87a","GIF89a"];function yU(t){return!!t&&_U.includes(yt(t,0,bU))}function wU(){return{gifHeaderOffset:0}}const TE={isXMLFile:xU,findOffsets:kU},CE=0,AE="<?xpacket begin";function xU(t){return!!t&&yt(t,CE,AE.length)===AE}function kU(t){const e=[];return e.push({dataOffset:CE,length:t.byteLength}),{xmpChunks:e}}const SU={parseAppMarkers:EU};function EU(t,e){if(eE.isTiffFile(t))return Ys(eE.findTiffOffsets(),"tiff","TIFF");if(tE.isJpegFile(t))return Ys(tE.findJpegOffsets(t),"jpeg","JPEG");if(vE.isPngFile(t))return Ys(vE.findPngOffsets(t,e),"png","PNG");if(xE.isHeicFile(t))return Ys(xE.findHeicOffsets(t),"heic","HEIC");if(kE.isAvifFile(t))return Ys(kE.findAvifOffsets(t),"avif","AVIF");if(SE.isWebpFile(t))return Ys(SE.findOffsets(t),"webp","WebP");if(EE.isGifFile(t))return Ys(EE.findOffsets(t),"gif","GIF");if(TE.isXMLFile(t))return Ys(TE.findOffsets(t),"xml","XML");throw new Error("Invalid image format")}function Ys(t,e,n){return kt({},t,{fileType:{value:e,description:n}})}const mt={ApertureValue:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2),ColorSpace(t){return t===1?"sRGB":t===65535?"Uncalibrated":"Unknown"},ComponentsConfiguration(t){return t.map(e=>{if(e===49)return"Y";if(e===50)return"Cb";if(e===51)return"Cr";if(e===52)return"R";if(e===53)return"G";if(e===54)return"B"}).join("")},Contrast(t){return t===0?"Normal":t===1?"Soft":t===2?"Hard":"Unknown"},CustomRendered(t){return t===0?"Normal process":t===1?"Custom process":"Unknown"},ExposureMode(t){return t===0?"Auto exposure":t===1?"Manual exposure":t===2?"Auto bracket":"Unknown"},ExposureProgram(t){return t===0?"Undefined":t===1?"Manual":t===2?"Normal program":t===3?"Aperture priority":t===4?"Shutter priority":t===5?"Creative program":t===6?"Action program":t===7?"Portrait mode":t===8?"Landscape mode":t===9?"Bulb":"Unknown"},ExposureTime(t){if(t[0]/t[1]>.25){const e=t[0]/t[1];return Number.isInteger(e)?""+e:e.toFixed(1)}return t[0]!==0?`1/${Math.round(t[1]/t[0])}`:`0/${t[1]}`},FNumber:t=>`f/${Number(t[0]/t[1]).toFixed(1)}`,FocalLength:t=>t[0]/t[1]+" mm",FocalPlaneResolutionUnit(t){return t===2?"inches":t===3?"centimeters":t===4?"millimeters":"Unknown"},LightSource:t=>t===1?"Daylight":t===2?"Fluorescent":t===3?"Tungsten (incandescent light)":t===4?"Flash":t===9?"Fine weather":t===10?"Cloudy weather":t===11?"Shade":t===12?"Daylight fluorescent (D 5700 – 7100K)":t===13?"Day white fluorescent (N 4600 – 5400K)":t===14?"Cool white fluorescent (W 3900 – 4500K)":t===15?"White fluorescent (WW 3200 – 3700K)":t===17?"Standard light A":t===18?"Standard light B":t===19?"Standard light C":t===20?"D55":t===21?"D65":t===22?"D75":t===23?"D50":t===24?"ISO studio tungsten":t===255?"Other light source":"Unknown",MeteringMode(t){return t===1?"Average":t===2?"CenterWeightedAverage":t===3?"Spot":t===4?"MultiSpot":t===5?"Pattern":t===6?"Partial":t===255?"Other":"Unknown"},ResolutionUnit(t){return t===2?"inches":t===3?"centimeters":"Unknown"},Saturation(t){return t===0?"Normal":t===1?"Low saturation":t===2?"High saturation":"Unknown"},FocalLengthIn35mmFilm(t){return t===0?"Unknown":t+" mm"},SceneCaptureType(t){return t===0?"Standard":t===1?"Landscape":t===2?"Portrait":t===3?"Night scene":"Unknown"},Sharpness(t){return t===0?"Normal":t===1?"Soft":t===2?"Hard":"Unknown"},ShutterSpeedValue(t){const e=Math.pow(2,t[0]/t[1]);return e<=1?`${Math.round(1/e)}`:`1/${Math.round(e)}`},WhiteBalance(t){return t===0?"Auto white balance":t===1?"Manual white balance":"Unknown"},XResolution:t=>""+Math.round(t[0]/t[1]),YResolution:t=>""+Math.round(t[0]/t[1])},$E={11:"ProcessingSoftware",254:{name:"SubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"})[t]||"Unknown"},255:{name:"OldSubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"})[t]||"Unknown"},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:t=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"})[t]||"Unknown"},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:t=>({1:"Normal",2:"Reversed"})[t]||"Unknown"},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:t=>t===1?"top-left":t===2?"top-right":t===3?"bottom-right":t===4?"bottom-left":t===5?"left-top":t===6?"right-top":t===7?"right-bottom":t===8?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:mt.XResolution},283:{name:"YResolution",description:mt.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:t=>""+Math.round(t[0]/t[1])},287:{name:"YPosition",description:t=>""+Math.round(t[0]/t[1])},290:{name:"GrayResponseUnit",description:t=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"})[t]||"Unknown"},296:{name:"ResolutionUnit",description:mt.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:t=>t.map(e=>`${e[0]}/${e[1]}`).join(", ")},319:{name:"PrimaryChromaticities",description:t=>t.map(e=>`${e[0]}/${e[1]}`).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:t=>({1:"CMYK",2:"Not CMYK"})[t]||"Unknown"},337:"TargetPrinter",338:{name:"ExtraSamples",description:t=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"})[t]||"Unknown"},339:{name:"SampleFormat",description:t=>{const e={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(t)?t.map(n=>e[n]||"Unknown").join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:t=>t.map(e=>""+e[0]/e[1]).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:t=>t===1?"centered":t===2?"co-sited":"undefined "+t},532:{name:"ReferenceBlackWhite",description:t=>t.map(e=>""+e[0]/e[1]).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:t=>t.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:ud},40092:{name:"XPComment",description:ud},40093:{name:"XPAuthor",description:ud},40094:{name:"XPKeywords",description:ud},40095:{name:"XPSubject",description:ud},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:t=>({0:"Unsafe",1:"Safe"})[t]||"Unknown"},50778:{name:"CalibrationIlluminant1",description:mt.LightSource},50779:{name:"CalibrationIlluminant2",description:mt.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:t=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"})[t]||"Unknown"},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:t=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"})[t]||"Unknown"},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:t=>({0:"Linear",1:"sRGB"})[t]||"Unknown"},51108:{name:"ProfileLookTableEncoding",description:t=>({0:"Linear",1:"sRGB"})[t]||"Unknown"},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:t=>({0:"Auto",1:"None"})[t]||"Unknown"},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function ud(t){return new TextDecoder("utf-16").decode(new Uint8Array(t)).replace(/\u0000+$/,"")}const TU={33434:{name:"ExposureTime",description:mt.ExposureTime},33437:{name:"FNumber",description:mt.FNumber},34850:{name:"ExposureProgram",description:mt.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:t=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"})[t]||"Unknown"},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:t=>Zn(t)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:mt.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:mt.ShutterSpeedValue},37378:{name:"ApertureValue",description:mt.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2)},37382:{name:"SubjectDistance",description:t=>t[0]/t[1]+" m"},37383:{name:"MeteringMode",description:mt.MeteringMode},37384:{name:"LightSource",description:mt.LightSource},37385:{name:"Flash",description:t=>t===0?"Flash did not fire":t===1?"Flash fired":t===5?"Strobe return light not detected":t===7?"Strobe return light detected":t===9?"Flash fired, compulsory flash mode":t===13?"Flash fired, compulsory flash mode, return light not detected":t===15?"Flash fired, compulsory flash mode, return light detected":t===16?"Flash did not fire, compulsory flash mode":t===24?"Flash did not fire, auto mode":t===25?"Flash fired, auto mode":t===29?"Flash fired, auto mode, return light not detected":t===31?"Flash fired, auto mode, return light detected":t===32?"No flash function":t===65?"Flash fired, red-eye reduction mode":t===69?"Flash fired, red-eye reduction mode, return light not detected":t===71?"Flash fired, red-eye reduction mode, return light detected":t===73?"Flash fired, compulsory flash mode, red-eye reduction mode":t===77?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":t===79?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":t===89?"Flash fired, auto mode, red-eye reduction mode":t===93?"Flash fired, auto mode, return light not detected, red-eye reduction mode":t===95?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:mt.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:t=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"})[t]||"Unknown"},37395:"ImageHistory",37396:{name:"SubjectArea",description:t=>t.length===2?`Location; X: ${t[0]}, Y: ${t[1]}`:t.length===3?`Circle; X: ${t[0]}, Y: ${t[1]}, diameter: ${t[2]}`:t.length===4?`Rectangle; X: ${t[0]}, Y: ${t[1]}, width: ${t[2]}, height: ${t[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:bb},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:t=>t[0]/t[1]+" °C"},37889:{name:"Humidity",description:t=>t[0]/t[1]+" %"},37890:{name:"Pressure",description:t=>t[0]/t[1]+" hPa"},37891:{name:"WaterDepth",description:t=>t[0]/t[1]+" m"},37892:{name:"Acceleration",description:t=>t[0]/t[1]+" mGal"},37893:{name:"CameraElevationAngle",description:t=>t[0]/t[1]+" °"},40960:{name:"FlashpixVersion",description:t=>t.map(e=>String.fromCharCode(e)).join("")},40961:{name:"ColorSpace",description:mt.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:mt.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([t,e])=>`X: ${t}, Y: ${e}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:t=>t===1?"Undefined":t===2?"One-chip color area sensor":t===3?"Two-chip color area sensor":t===4?"Three-chip color area sensor":t===5?"Color sequential area sensor":t===7?"Trilinear sensor":t===8?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:t=>t===3?"DSC":"Unknown"},41729:{name:"SceneType",description:t=>t===1?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:mt.CustomRendered},41986:{name:"ExposureMode",description:mt.ExposureMode},41987:{name:"WhiteBalance",description:mt.WhiteBalance},41988:{name:"DigitalZoomRatio",description:t=>t[0]===0?"Digital zoom was not used":""+t[0]/t[1]},41989:{name:"FocalLengthIn35mmFilm",description:mt.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:mt.SceneCaptureType},41991:{name:"GainControl",description:t=>t===0?"None":t===1?"Low gain up":t===2?"High gain up":t===3?"Low gain down":t===4?"High gain down":"Unknown"},41992:{name:"Contrast",description:mt.Contrast},41993:{name:"Saturation",description:mt.Saturation},41994:{name:"Sharpness",description:mt.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:t=>t===1?"Macro":t===2?"Close view":t===3?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:t=>{const e=parseFloat((t[0][0]/t[0][1]).toFixed(5)),n=parseFloat((t[1][0]/t[1][1]).toFixed(5)),r=`${e}-${n} mm`;if(t[3][1]===0)return`${r} f/?`;const i=1/(t[2][1]/t[2][1]/(t[3][0]/t[3][1]));return`${r} f/${parseFloat(i.toFixed(5))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:t=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"})[t]||"Unknown"},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},CU={0:{name:"GPSVersionID",description:t=>t[0]===2&&t[1]===2&&t[2]===0&&t[3]===0?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:t=>{const e=t.join("");return e==="N"?"North latitude":e==="S"?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:Wh},3:{name:"GPSLongitudeRef",description:t=>{const e=t.join("");return e==="E"?"East longitude":e==="W"?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:Wh},5:{name:"GPSAltitudeRef",description:t=>t===0?"Sea level":t===1?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:t=>t[0]/t[1]+" m"},7:{name:"GPSTimeStamp",description:t=>t.map(([e,n])=>{const r=e/n;return/^\d(\.|$)/.test(`${r}`)?`0${r}`:r}).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:t=>{const e=t.join("");return e==="A"?"Measurement in progress":e==="V"?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:t=>{const e=t.join("");return e==="2"?"2-dimensional measurement":e==="3"?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:t=>{const e=t.join("");return e==="K"?"Kilometers per hour":e==="M"?"Miles per hour":e==="N"?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:t=>{const e=t.join("");return e==="N"?"North latitude":e==="S"?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:t=>{const e=t.join("");return e==="E"?"East longitude":e==="W"?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},23:{name:"GPSDestBearingRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:t=>{const e=t.join("");return e==="K"?"Kilometers":e==="M"?"Miles":e==="N"?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:bb},28:{name:"GPSAreaInformation",description:bb},29:"GPSDateStamp",30:{name:"GPSDifferential",description:t=>t===0?"Measurement without differential correction":t===1?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},AU={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:t=>Zn(t)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},$U={45056:{name:"MPFVersion",description:t=>Zn(t)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},IU={4:{name:"ShotInfo",description:t=>t}},PU={0:{name:"PentaxVersion",description:t=>t.join(".")},5:"PentaxModelID",555:"LevelInfo"},IE=kt({},$E,TU),Ab="0th",PE="1st",NE="exif",LE="gps",OE="interoperability",RE="mpf",FE="canon",$b="pentax",Js={[Ab]:IE,[PE]:$E,[NE]:IE,[LE]:CU,[OE]:AU,[RE]:$U,[FE]:IU,[$b]:PU},DE={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},Ib={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},We={getAsciiValue:NU,getByteAt:ME,getAsciiAt:LU,getShortAt:OU,getLongAt:ep,getRationalAt:RU,getUndefinedAt:FU,getSlongAt:Pb,getSrationalAt:DU,getIfdPointerAt:MU,typeSizes:DE,tagTypes:Ib,getTypeSize:zU};function NU(t){return t.map(e=>String.fromCharCode(e))}function ME(t,e){return t.getUint8(e)}function LU(t,e){return t.getUint8(e)}function OU(t,e,n){return t.getUint16(e,n===Ao.LITTLE_ENDIAN)}function ep(t,e,n){return t.getUint32(e,n===Ao.LITTLE_ENDIAN)}function RU(t,e,n){return[ep(t,e,n),ep(t,e+4,n)]}function FU(t,e){return ME(t,e)}function Pb(t,e,n){return t.getInt32(e,n===Ao.LITTLE_ENDIAN)}function DU(t,e,n){return[Pb(t,e,n),Pb(t,e+4,n)]}function MU(t,e,n){return ep(t,e,n)}function zU(t){if(Ib[t]===void 0)throw new Error("No such type found.");return DE[Ib[t]]}const UU={1:We.getByteAt,2:We.getAsciiAt,3:We.getShortAt,4:We.getLongAt,5:We.getRationalAt,7:We.getUndefinedAt,9:We.getSlongAt,10:We.getSrationalAt,13:We.getIfdPointerAt};function zE(t,e,n){return e+We.getLongAt(t,e+4,n)}function Zs(t,e,n,r,i,o){const s=We.getTypeSize("SHORT"),a=12,c={},u=jU(t,r,i);r+=s;for(let d=0;d<u&&!(r+a>t.byteLength);d++){const f=BU(t,e,n,r,i,o);f!==void 0&&(c[f.name]={id:f.id,value:f.value,description:f.description},(f.name==="MakerNote"||e===$b&&f.name==="LevelInfo")&&(c[f.name].__offset=f.__offset)),r+=a}if(r<t.byteLength-We.getTypeSize("LONG")){const d=We.getLongAt(t,r,i);d!==0&&e===Ab&&(c.Thumbnail=Zs(t,PE,n,n+d,i,o))}return c}function jU(t,e,n){return e+We.getTypeSize("SHORT")<=t.byteLength?We.getShortAt(t,e,n):0}function BU(t,e,n,r,i,o){const a=We.getTypeSize("SHORT"),c=a+We.getTypeSize("SHORT"),u=c+We.getTypeSize("LONG"),d=We.getShortAt(t,r,i),f=We.getShortAt(t,r+a,i),h=We.getLongAt(t,r+c,i);let p,g;if(We.typeSizes[f]===void 0||!o&&Js[e][d]===void 0)return;if(qU(f,h))g=r+u,p=UE(t,g,f,h,i);else if(g=We.getLongAt(t,r+u,i),HU(t,n,g,f,h)){const b=d===33723;p=UE(t,n+g,f,h,i,b)}else p="<faulty value>";f===We.tagTypes.ASCII&&(p=GU(p),p=KU(p));let m=`undefined-${d}`,v=p;if(Js[e][d]!==void 0)if(Js[e][d].name!==void 0&&Js[e][d].description!==void 0){m=Js[e][d].name;try{v=Js[e][d].description(p)}catch{v=jE(p)}}else f===We.tagTypes.RATIONAL||f===We.tagTypes.SRATIONAL?(m=Js[e][d],v=""+p[0]/p[1]):(m=Js[e][d],v=jE(p));return{id:d,name:m,value:p,description:v,__offset:g}}function qU(t,e){return We.typeSizes[t]*e<=We.getTypeSize("LONG")}function UE(t,e,n,r,i,o=!1){let s=[];o&&(r=r*We.typeSizes[n],n=We.tagTypes.BYTE);for(let a=0;a<r;a++)s.push(UU[n](t,e,i)),e+=We.typeSizes[n];return n===We.tagTypes.ASCII?s=We.getAsciiValue(s):s.length===1&&(s=s[0]),s}function HU(t,e,n,r,i){return e+n+We.typeSizes[r]*i<=t.byteLength}function GU(t){const e=[];let n=0;for(let r=0;r<t.length;r++){if(t[r]==="\0"){n++;continue}e[n]===void 0&&(e[n]=""),e[n]+=t[r]}return e}function KU(t){try{return t.map(e=>decodeURIComponent(escape(e)))}catch{return t}}function jE(t){return t instanceof Array?t.join(", "):t}const BE="Exif IFD Pointer",qE="GPS Info IFD Pointer",HE="Interoperability IFD Pointer",GE={read:VU};function VU(t,e,n){const r=Ao.getByteOrder(t,e);let i=WU(t,e,r,n);return i=YU(i,t,e,r,n),i=JU(i,t,e,r,n),i=ZU(i,t,e,r,n),{tags:i,byteOrder:r}}function WU(t,e,n,r){return Zs(t,Ab,e,zE(t,e,n),n,r)}function YU(t,e,n,r,i){return t[BE]!==void 0?kt(t,Zs(e,NE,n,n+t[BE].value,r,i)):t}function JU(t,e,n,r,i){return t[qE]!==void 0?kt(t,Zs(e,LE,n,n+t[qE].value,r,i)):t}function ZU(t,e,n,r,i){return t[HE]!==void 0?kt(t,Zs(e,OE,n,n+t[HE].value,r,i)):t}const XU={read:QU},Ic=16;function QU(t,e,n){const r=Ao.getByteOrder(t,e),i=Zs(t,RE,e,zE(t,e,r),r,n);return ej(t,e,i,r)}function ej(t,e,n,r){if(!n.MPEntry)return n;const i=[];for(let o=0;o<Math.ceil(n.MPEntry.value.length/Ic);o++){i[o]={};const s=dd(n.MPEntry.value,o*Ic,We.getTypeSize("LONG"),r);i[o].ImageFlags=tj(s),i[o].ImageFormat=nj(s),i[o].ImageType=rj(s);const a=dd(n.MPEntry.value,o*Ic+4,We.getTypeSize("LONG"),r);i[o].ImageSize={value:a,description:""+a};const c=ij(o,n.MPEntry,r,e);i[o].ImageOffset={value:c,description:""+c};const u=dd(n.MPEntry.value,o*Ic+12,We.getTypeSize("SHORT"),r);i[o].DependentImage1EntryNumber={value:u,description:""+u};const d=dd(n.MPEntry.value,o*Ic+14,We.getTypeSize("SHORT"),r);i[o].DependentImage2EntryNumber={value:d,description:""+d},i[o].image=t.buffer.slice(c,c+a),WS(i[o],"base64",function(){return YS(this.image)})}return n.Images=i,n}function dd(t,e,n,r){if(r===Ao.LITTLE_ENDIAN){let o=0;for(let s=0;s<n;s++)o+=t[e+s]<<8*s;return o}let i=0;for(let o=0;o<n;o++)i+=t[e+o]<<8*(n-1-o);return i}function tj(t){const e=[t>>31&1,t>>30&1,t>>29&1],n=[];return e[0]&&n.push("Dependent Parent Image"),e[1]&&n.push("Dependent Child Image"),e[2]&&n.push("Representative Image"),{value:e,description:n.join(", ")||"None"}}function nj(t){const e=t>>24&7;return{value:e,description:e===0?"JPEG":"Unknown"}}function rj(t){const e=t&16777215;return{value:e,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[e]||"Unknown"}}function ij(t,e,n,r){return oj(t)?0:dd(e.value,t*Ic+8,We.getTypeSize("LONG"),n)+r}function oj(t){return t===0}const sj={read:aj};function aj(t,e){const n=lj(t,e),r=fj(t,e,n);return{"Bits Per Sample":cj(t,e,n),"Image Height":uj(t,e,n),"Image Width":dj(t,e,n),"Color Components":r,Subsampling:r&&hj(t,e,r.value,n)}}function lj(t,e){return We.getShortAt(t,e)}function cj(t,e,n){if(3>n)return;const o=We.getByteAt(t,e+2);return{value:o,description:""+o}}function uj(t,e,n){if(5>n)return;const o=We.getShortAt(t,e+3);return{value:o,description:`${o}px`}}function dj(t,e,n){if(7>n)return;const o=We.getShortAt(t,e+5);return{value:o,description:`${o}px`}}function fj(t,e,n){if(8>n)return;const o=We.getByteAt(t,e+7);return{value:o,description:""+o}}function hj(t,e,n,r){if(8+3*n>r)return;const s=[];for(let a=0;a<n;a++){const c=e+8+a*3;s.push([We.getByteAt(t,c),We.getByteAt(t,c+1),We.getByteAt(t,c+2)])}return{value:s,description:s.length>1?pj(s)+gj(s):""}}function pj(t){const e={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return t.map(n=>e[n[0]]).join("")}function gj(t){const e={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return t.length===0||t[0][1]===void 0||e[t[0][1]]===void 0?"":e[t[0][1]]}const mj={read:vj};function vj(t,e){const n=bj(t,e),r=Sj(t,e,n),i=Ej(t,e,n),o={"JFIF Version":_j(t,e,n),"Resolution Unit":yj(t,e,n),XResolution:xj(t,e,n),YResolution:kj(t,e,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(r!==void 0&&i!==void 0){const s=Tj(t,e,3*r.value*i.value,n);s&&(o["JFIF Thumbnail"]=s)}for(const s in o)o[s]===void 0&&delete o[s];return o}function bj(t,e){return We.getShortAt(t,e)}function _j(t,e,n){if(9>n)return;const o=We.getByteAt(t,e+7),s=We.getByteAt(t,e+7+1);return{value:o*256+s,description:o+"."+s}}function yj(t,e,n){if(10>n)return;const o=We.getByteAt(t,e+9);return{value:o,description:wj(o)}}function wj(t){return t===0?"None":t===1?"inches":t===2?"cm":"Unknown"}function xj(t,e,n){if(12>n)return;const o=We.getShortAt(t,e+10);return{value:o,description:""+o}}function kj(t,e,n){if(14>n)return;const o=We.getShortAt(t,e+12);return{value:o,description:""+o}}function Sj(t,e,n){if(15>n)return;const o=We.getByteAt(t,e+14);return{value:o,description:`${o}px`}}function Ej(t,e,n){if(16>n)return;const o=We.getByteAt(t,e+15);return{value:o,description:`${o}px`}}function Tj(t,e,n,r){return n===0||16+n>r?void 0:{value:t.buffer.slice(e+16,e+16+n),description:"<24-bit RGB pixel data>"}}const Xs={iptc:{256:{name:"Model Version",description:t=>((t[0]<<8)+t[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:t=>((t[0]<<8)+t[1]).toString()},278:{name:"File Format Version",description:t=>((t[0]<<8)+t[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:Nb},336:{name:"Time Sent",description:Lb},346:{name:"Coded Character Set",description:KE,encoding_name:KE},356:"UNO",376:{name:"ARM Identifier",description:t=>((t[0]<<8)+t[1]).toString()},378:{name:"ARM Version",description:t=>((t[0]<<8)+t[1]).toString()},512:{name:"Record Version",description:t=>((t[0]<<8)+t[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:t=>Zn(t)==="01"?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:t=>{const e=Zn(t).split(":");return e[2]+(e[3]?"/"+e[3]:"")+(e[4]?"/"+e[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:t=>{const e=Zn(t);return e==="01"?"Object Kill":e==="02"?"Object Replace":e==="03"?"Object Append":e==="04"?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:Nb},572:{name:"Time Created",description:Lb},574:{name:"Digital Creation Date",description:Nb},575:{name:"Digital Creation Time",description:Lb},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:t=>{const e=Zn(t);return e==="a"?"morning":e==="p"?"evening":e==="b"?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:t=>t},642:"Image Type",643:{name:"Image Orientation",description:t=>{const e=Zn(t);return e==="P"?"Portrait":e==="L"?"Landscape":e==="S"?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:t=>{const e=Zn(t),n=e.charAt(0),r=e.charAt(1);let i="";return n==="1"?i+="Mono":n==="2"&&(i+="Stereo"),r==="A"?i+=", actuality":r==="C"?i+=", question and answer session":r==="M"?i+=", music, transmitted by itself":r==="Q"?i+=", response to a question":r==="R"?i+=", raw sound":r==="S"?i+=", scener":r==="V"?i+=", voicer":r==="W"&&(i+=", wrap"),i!==""?i:e}},663:{name:"Audio Sampling Rate",description:t=>parseInt(Zn(t),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:t=>{const e=parseInt(Zn(t),10);return e+(e===1?" bit":" bits")}},665:{name:"Audio Duration",description:t=>{const e=Zn(t);return e.length>=6?e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2):e}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:t=>t.length===2?"ObjectData Preview File Format":"Record 2 destination",description:t=>{if(t.length===2){const e=(t[0]<<8)+t[1];return e===0?"No ObjectData":e===1?"IPTC-NAA Digital Newsphoto Parameter Record":e===2?"IPTC7901 Recommended Message Format":e===3?"Tagged Image File Format (Adobe/Aldus Image data)":e===4?"Illustrator (Adobe Graphics data)":e===5?"AppleSingle (Apple Computer Inc)":e===6?"NAA 89-3 (ANPA 1312)":e===7?"MacBinary II":e===8?"IPTC Unstructured Character Oriented File Format (UCOFF)":e===9?"United Press International ANPA 1312 variant":e===10?"United Press International Down-Load Message":e===11?"JPEG File Interchange (JFIF)":e===12?"Photo-CD Image-Pac (Eastman Kodak)":e===13?"Microsoft Bit Mapped Graphics File [*.BMP]":e===14?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":e===15?"Audio plus Moving Video [*.AVI] (Microsoft)":e===16?"PC DOS/Windows Executable Files [*.COM][*.EXE]":e===17?"Compressed Binary File [*.ZIP] (PKWare Inc)":e===18?"Audio Interchange File Format AIFF (Apple Computer Inc)":e===19?"RIFF Wave (Microsoft Corporation)":e===20?"Freehand (Macromedia/Aldus)":e===21?'Hypertext Markup Language "HTML" (The Internet Society)':e===22?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":e===23?"MPEG 2 Audio Layer 3, ISO/IEC":e===24?"Portable Document File (*.PDF) Adobe":e===25?"News Industry Text Format (NITF)":e===26?"Tape Archive (*.TAR)":e===27?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":e===28?"Ritzaus Bureau NITF version (RBNITF DTD)":e===29?"Corel Draw [*.CDR]":`Unknown format ${e}`}return Zn(t)}},713:{name:"ObjectData Preview File Format Version",description:(t,e)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},r=Zn(t);if(e["ObjectData Preview File Format"]){const i=Zn(e["ObjectData Preview File Format"].value);if(n[i]&&n[i][r])return n[i][r]}return r}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:t=>t[0].toString()},1812:{name:"Max Subfile Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1882:{name:"ObjectData Size Announced",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1887:{name:"Maximum ObjectData Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}}}};function Nb(t){const e=Zn(t);return e.length>=8?e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2):e}function Lb(t){const e=Zn(t);let n=e;return e.length>=6&&(n=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2),e.length===11&&(n+=e.substr(6,1)+e.substr(7,2)+":"+e.substr(9,2))),n}function KE(t){const e=Zn(t);return e==="\x1B%G"?"UTF-8":e==="\x1B%5"?"Windows-1252":e==="\x1B%/G"?"UTF-8 Level 1":e==="\x1B%/H"?"UTF-8 Level 2":e==="\x1B%/I"?"UTF-8 Level 3":e==="\x1B/A"?"ISO-8859-1":e==="\x1B/B"?"ISO-8859-2":e==="\x1B/C"?"ISO-8859-3":e==="\x1B/D"?"ISO-8859-4":e==="\x1B/@"?"ISO-8859-5":e==="\x1B/G"?"ISO-8859-6":e==="\x1B/F"?"ISO-8859-7":e==="\x1B/H"?"ISO-8859-8":"Unknown"}const Cj={get:Aj};function Aj(){if(typeof TextDecoder<"u")return TextDecoder}const VE={decode:$j,TAG_HEADER_SIZE:5};function $j(t,e){const n=Cj.get();if(typeof n<"u"&&t!==void 0)try{return new n(t).decode(e instanceof DataView?e.buffer:Uint8Array.from(e))}catch{}const r=e.map(i=>String.fromCharCode(i)).join("");return Ij(r)}function Ij(t){try{return decodeURIComponent(escape(t))}catch{return t}}const Pj=943868237,fd=4,tp=2,Nj=1,Lj=2,WE=4,Oj=fd+tp+Lj+WE,Rj=1028,YE=5,Ob={read:Fj};function Fj(t,e,n){try{if(Array.isArray(t))return JE(new DataView(Uint8Array.from(t).buffer),{size:t.length},0,n);const{naaBlock:r,dataOffset:i}=Dj(t,e);return JE(t,r,i,n)}catch{return{}}}function Dj(t,e){for(;e+Oj<=t.byteLength;){const n=Mj(t,e);if(zj(n))return{naaBlock:n,dataOffset:e+n.headerSize};e+=n.headerSize+n.size+Uj(n)}throw new Error("No IPTC NAA resource block.")}function Mj(t,e){if(t.getUint32(e,!1)!==Pj)throw new Error("Not an IPTC resource block.");const n=t.getUint8(e+fd+tp),r=(n%2===0?n+1:n)+Nj;return{headerSize:fd+tp+r+WE,type:t.getUint16(e+fd),size:t.getUint32(e+fd+tp+r)}}function zj(t){return t.type===Rj}function Uj(t){return t.size%2!==0?1:0}function JE(t,e,n,r){const i={};let o;const s=n+e.size;for(;n<s&&n<t.byteLength;){const{tag:a,tagSize:c}=jj(t,n,i,o,r);if(a===null)break;a&&("encoding"in a&&(o=a.encoding),i[a.name]===void 0||a.repeatable===void 0?i[a.name]={id:a.id,value:a.value,description:a.description}:(i[a.name]instanceof Array||(i[a.name]=[{id:i[a.name].id,value:i[a.name].value,description:i[a.name].description}]),i[a.name].push({id:a.id,value:a.value,description:a.description}))),n+=YE+c}return i}function jj(t,e,n,r,i){if(Bj(t,e))return{tag:null,tagSize:0};const a=t.getUint16(e+1),c=t.getUint16(e+3);if(!i&&!Xs.iptc[a])return{tag:void 0,tagSize:c};const u=qj(t,e+YE,c),d={id:a,name:Hj(Xs.iptc[a],a,u),value:u,description:Vj(Xs.iptc[a],u,n,r)};return Jj(a)&&(d.repeatable=!0),Zj(a)&&(d.encoding=Xs.iptc[a].encoding_name(u)),{tag:d,tagSize:c}}function Bj(t,e){return t.getUint8(e)!==28}function qj(t,e,n){const r=[];for(let i=0;i<n;i++)r.push(t.getUint8(e+i));return r}function Hj(t,e,n){return t?Gj(t)?t:Kj(t)?t.name(n):t.name:`undefined-${e}`}function Gj(t){return typeof t=="string"}function Kj(t){return typeof t.name=="function"}function Vj(t,e,n,r){if(Yj(t))try{return t.description(e,n)}catch{}return Wj(t,e)?VE.decode(r,e):e}function Wj(t,e){return t&&e instanceof Array}function Yj(t){return t&&t.description!==void 0}function Jj(t){return Xs.iptc[t]&&Xs.iptc[t].repeatable}function Zj(t){return Xs.iptc[t]&&Xs.iptc[t].encoding_name!==void 0}const np={"tiff:Orientation"(t){return t==="1"?"Horizontal (normal)":t==="2"?"Mirror horizontal":t==="3"?"Rotate 180":t==="4"?"Mirror vertical":t==="5"?"Mirror horizontal and rotate 270 CW":t==="6"?"Rotate 90 CW":t==="7"?"Mirror horizontal and rotate 90 CW":t==="8"?"Rotate 270 CW":t},"tiff:ResolutionUnit":t=>mt.ResolutionUnit(parseInt(t,10)),"tiff:XResolution":t=>Pc(mt.XResolution,t),"tiff:YResolution":t=>Pc(mt.YResolution,t),"exif:ApertureValue":t=>Pc(mt.ApertureValue,t),"exif:GPSLatitude":XE,"exif:GPSLongitude":XE,"exif:FNumber":t=>Pc(mt.FNumber,t),"exif:FocalLength":t=>Pc(mt.FocalLength,t),"exif:FocalPlaneResolutionUnit":t=>mt.FocalPlaneResolutionUnit(parseInt(t,10)),"exif:ColorSpace":t=>mt.ColorSpace(Xj(t)),"exif:ComponentsConfiguration"(t,e){if(/^\d, \d, \d, \d$/.test(e)){const n=e.split(", ").map(r=>r.charCodeAt(0));return mt.ComponentsConfiguration(n)}return e},"exif:Contrast":t=>mt.Contrast(parseInt(t,10)),"exif:CustomRendered":t=>mt.CustomRendered(parseInt(t,10)),"exif:ExposureMode":t=>mt.ExposureMode(parseInt(t,10)),"exif:ExposureProgram":t=>mt.ExposureProgram(parseInt(t,10)),"exif:ExposureTime"(t){return ZE(t)?mt.ExposureTime(t.split("/").map(e=>parseInt(e,10))):t},"exif:MeteringMode":t=>mt.MeteringMode(parseInt(t,10)),"exif:Saturation":t=>mt.Saturation(parseInt(t,10)),"exif:SceneCaptureType":t=>mt.SceneCaptureType(parseInt(t,10)),"exif:Sharpness":t=>mt.Sharpness(parseInt(t,10)),"exif:ShutterSpeedValue":t=>Pc(mt.ShutterSpeedValue,t),"exif:WhiteBalance":t=>mt.WhiteBalance(parseInt(t,10))};function Pc(t,e){return ZE(e)?t(e.split("/")):e}function Xj(t){return t.substring(0,2)==="0x"?parseInt(t.substring(2),16):parseInt(t,10)}function ZE(t){return/^-?\d+\/-?\d+$/.test(t)}function XE(t){const[e,n]=t.split(",");if(e!==void 0&&n!==void 0){const r=parseFloat(e),i=parseFloat(n),o=n.charAt(n.length-1);if(!Number.isNaN(r)&&!Number.isNaN(i))return""+(r+i/60)+o}return t}const Qj={get:eB};function eB(t){if(t)return t;if(typeof DOMParser<"u")return new DOMParser;try{const{DOMParser:e,onErrorStopParsing:n}=__non_webpack_require__("@xmldom/xmldom");return new e({onError:n})}catch{return}}function tB(t){const e=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd",/Namespace prefix .+ is not defined/];for(let n=0;n<e.length;n++)if(new RegExp(e[n]).test(t.message))return!0;return!1}function nB(t){const e=t.match(/<([A-Za-z_][A-Za-z0-9._-]*)([^>]*)>/);if(!e)return t;const n=e[1],r=rB(t),o=iB(t).filter(a=>r.indexOf(a)===-1);if(o.length===0)return t;const s=sB(o);return aB(t,n,s)}function rB(t){const e=[],n=/xmlns:([\w-]+)=["'][^"']+["']/g;let r;for(;(r=n.exec(t))!==null;)e.indexOf(r[1])===-1&&e.push(r[1]);return e}function iB(t){const e=[],n=/\b([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*\b/g;let r;for(;(r=n.exec(t))!==null;){const i=r[1];i==="xmlns"||i==="xml"||e.indexOf(i)===-1&&e.push(i)}return e}const oB={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};function sB(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=oB[r]||"http://fallback.namespace/"+r;e.push(" xmlns:"+r+'="'+i+'"')}return e.join("")}function aB(t,e,n){const r=new RegExp("<"+e+"([^>]*)>");return t.replace(r,"<"+e+"$1"+n+">")}const QE={read:cB};class lB extends Error{constructor(e){super(e),this.name="ParseError"}}function cB(t,e,n){const r={};if(typeof t=="string")return rp(r,t,n),r;const[i,o]=uB(t,e),s=rp(r,i,n);if(o){const a=rp(r,o,n);!s&&!a&&(delete r._raw,rp(r,Rb(t,e),n))}return r}function uB(t,e){if(e.length===0)return[];const n=[Rb(t,e.slice(0,1))];return e.length>1&&n.push(Rb(t,e.slice(1))),n}function Rb(t,e){const n=e.reduce((o,s)=>o+s.length,0),r=new Uint8Array(n);let i=0;for(let o=0;o<e.length;o++){const s=e[o],a=t.buffer.slice(s.dataOffset,s.dataOffset+s.length);r.set(new Uint8Array(a),i),i+=s.length}return new DataView(r.buffer)}function rp(t,e,n){try{const{doc:r,raw:i}=dB(e,n);t._raw=(t._raw||"")+i;const o=tT(r);return kt(t,rT(nT(o,!0))),!0}catch{return!1}}function dB(t,e){const n=Qj.get(e);if(!n)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const r=typeof t=="string"?t:yt(t,0,t.byteLength);return{doc:eT(n,fB(r)),raw:r}}function fB(t){return t.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")}function eT(t,e,n=!1){try{const r=t.parseFromString(e,"application/xml"),i=r.getElementsByTagName("parsererror");if(i.length>0)throw new lB(i[0].textContent);return r}catch(r){if(r.name==="ParseError"&&tB(r)&&!n)return eT(t,nB(e),!0);throw r}}function tT(t){for(let e=0;e<t.childNodes.length;e++){if(t.childNodes[e].tagName==="x:xmpmeta")return tT(t.childNodes[e]);if(t.childNodes[e].tagName==="rdf:RDF")return t.childNodes[e]}throw new Error}function nT(t,e=!1){const n=hB(t);return pB(n)?e?{}:gB(n[0]):mB(n)}function hB(t){const e=[];for(let n=0;n<t.childNodes.length;n++)e.push(t.childNodes[n]);return e}function pB(t){return t.length===1&&t[0].nodeName==="#text"}function gB(t){return t.nodeValue}function mB(t){const e={};return t.forEach(n=>{if(vB(n)){const r=bB(n);e[n.nodeName]!==void 0?(Array.isArray(e[n.nodeName])||(e[n.nodeName]=[e[n.nodeName]]),e[n.nodeName].push(r)):e[n.nodeName]=r}}),e}function vB(t){return t.nodeName&&t.nodeName!=="#text"}function bB(t){return{attributes:_B(t),value:nT(t)}}function _B(t){const e={};for(let n=0;n<t.attributes.length;n++)e[t.attributes[n].nodeName]=decodeURIComponent(escape(t.attributes[n].value));return e}function rT(t){const e={};if(typeof t=="string")return t;for(const n in t){let r=t[n];Array.isArray(r)||(r=[r]),r.forEach(i=>{kt(e,Fb(i.attributes)),typeof i.value=="object"&&kt(e,iT(i.value))})}return e}function Fb(t){const e={};for(const n in t)try{yB(n)&&(e[op(n)]={value:t[n],attributes:{},description:ss(t[n],n)})}catch{}return e}function yB(t){return t!=="rdf:parseType"&&!ip(t)}function ip(t){return t.split(":")[0]==="xmlns"}function op(t){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(t)?"RatingPercent":t.split(":")[1]}function ss(t,e=void 0){if(Array.isArray(t)){const n=wB(t);return e&&typeof np[e]=="function"?np[e](t,n):n}if(typeof t=="object")return xB(t);try{return e&&typeof np[e]=="function"?np[e](t):decodeURIComponent(escape(t))}catch{return t}}function wB(t){return t.map(e=>e.value!==void 0?ss(e.value):ss(e)).join(", ")}function xB(t){const e=[];for(const n in t)e.push(`${kB(n)}: ${ss(t[n].value)}`);return e.join("; ")}function kB(t){return t==="CiAdrCity"?"CreatorCity":t==="CiAdrCtry"?"CreatorCountry":t==="CiAdrExtadr"?"CreatorAddress":t==="CiAdrPcode"?"CreatorPostalCode":t==="CiAdrRegion"?"CreatorRegion":t==="CiEmailWork"?"CreatorWorkEmail":t==="CiTelWork"?"CreatorWorkPhone":t==="CiUrlWork"?"CreatorWorkUrl":t}function iT(t){const e={};for(const n in t)try{ip(n)||(e[op(n)]=SB(t[n],n))}catch{}return e}function SB(t,e){return TB(t)?CB(t,e):EB(t)?{value:"",attributes:{},description:""}:oT(t)?sT(t,e):aT(t)?lT(t,e):cT(t)?uT(t,e):IB(t)?PB(t,e):Db(t,e)}function EB(t){return t.attributes["rdf:parseType"]==="Resource"&&typeof t.value=="string"&&t.value.trim()===""}function TB(t){return Array.isArray(t)}function CB(t,e){return Db(t[t.length-1],e)}function oT(t){return t.attributes["rdf:parseType"]==="Resource"&&t.value["rdf:value"]!==void 0||t.value["rdf:Description"]!==void 0&&t.value["rdf:Description"].value["rdf:value"]!==void 0}function sT(t,e){const n=hd(t);t.value["rdf:Description"]!==void 0&&(t=t.value["rdf:Description"]),kt(n,hd(t),AB(t));const r=$B(t);return{value:r,attributes:n,description:ss(r,e)}}function hd(t){const e={};for(const n in t.attributes)n!=="rdf:parseType"&&n!=="rdf:resource"&&!ip(n)&&(e[op(n)]=t.attributes[n]);return e}function AB(t){const e={};for(const n in t.value)n!=="rdf:value"&&!ip(n)&&(e[op(n)]=t.value[n].value);return e}function $B(t){return fT(t.value["rdf:value"])||t.value["rdf:value"].value}function aT(t){return t.attributes["rdf:parseType"]==="Resource"||t.value["rdf:Description"]!==void 0&&t.value["rdf:Description"].value["rdf:value"]===void 0}function lT(t,e){const n={value:{},attributes:{}};return t.value["rdf:Description"]!==void 0&&(kt(n.value,Fb(t.value["rdf:Description"].attributes)),kt(n.attributes,hd(t)),t=t.value["rdf:Description"]),kt(n.value,iT(t.value)),n.description=ss(n.value,e),n}function cT(t){return Object.keys(t.value).length===0&&t.attributes["xml:lang"]===void 0&&t.attributes["rdf:resource"]===void 0}function uT(t,e){const n=Fb(t.attributes);return{value:n,attributes:{},description:ss(n,e)}}function IB(t){return dT(t.value)!==void 0}function dT(t){return t["rdf:Bag"]||t["rdf:Seq"]||t["rdf:Alt"]}function PB(t,e){let n=dT(t.value).value["rdf:li"];const r=hd(t),i=[];return n===void 0?n=[]:Array.isArray(n)||(n=[n]),n.forEach(o=>{i.push(NB(o))}),{value:i,attributes:r,description:ss(i,e)}}function NB(t){return oT(t)?sT(t):aT(t)?lT(t).value:cT(t)?uT(t).value:Db(t)}function Db(t,e){const n=fT(t)||rT(t.value);return{value:n,attributes:hd(t),description:ss(n,e)}}function fT(t){return t.attributes&&t.attributes["rdf:resource"]}const as={CLOSED_SUBPATH_LENGTH:0,CLOSED_SUBPATH_BEZIER_LINKED:1,CLOSED_SUBPATH_BEZIER_UNLINKED:2,OPEN_SUBPATH_LENGTH:3,OPEN_SUBPATH_BEZIER_LINKED:4,OPEN_SUBPATH_BEZIER_UNLINKED:5,FILL_RULE:6,CLIPBOARD:7,INITIAL_FILL_RULE:8},hT=24,Mb={2e3:{name:"PathInformation",description:LB},2999:{name:"ClippingPathName",description(t){const[,e]=VS(t,0);return e}}};function LB(t){const n={},r=[];for(let i=0;i<t.byteLength;i+=2+hT){const o=We.getShortAt(t,i);zb[o]&&(n[o]||(n[o]=zb[o].description),r.push({type:o,path:zb[o].path(t,i+2)}))}return JSON.stringify({types:n,paths:r})}const zb={[as.CLOSED_SUBPATH_LENGTH]:{description:"Closed subpath length",path:(t,e)=>[We.getShortAt(t,e)]},[as.CLOSED_SUBPATH_BEZIER_LINKED]:{description:"Closed subpath Bezier knot, linked",path:sp},[as.CLOSED_SUBPATH_BEZIER_UNLINKED]:{description:"Closed subpath Bezier knot, unlinked",path:sp},[as.OPEN_SUBPATH_LENGTH]:{description:"Open subpath length",path:(t,e)=>[We.getShortAt(t,e)]},[as.OPEN_SUBPATH_BEZIER_LINKED]:{description:"Open subpath Bezier knot, linked",path:sp},[as.OPEN_SUBPATH_BEZIER_UNLINKED]:{description:"Open subpath Bezier knot, unlinked",path:sp},[as.FILL_RULE]:{description:"Path fill rule",path:()=>[]},[as.INITIAL_FILL_RULE]:{description:"Initial fill rule",path:(t,e)=>[We.getShortAt(t,e)]},[as.CLIPBOARD]:{description:"Clipboard",path:RB}};function sp(t,e){const r=[];for(let i=0;i<hT;i+=8)r.push(OB(t,e+i));return r}function OB(t,e){const n=Ya(t,e,8);return[Ya(t,e+4,8),n]}function RB(t,e){return[[Ya(t,e,8),Ya(t,e+4,8),Ya(t,e+8,8),Ya(t,e+12,8)],Ya(t,e+16,8)]}function Ya(t,e,n){const r=We.getLongAt(t,e),i=r>>>31?-1:1,o=(r&2130706432)>>>32-n,s=r&parseInt(JS("1",32-n),2);return i*O3(o.toString(2)+"."+L3(s.toString(2),32-n,"0"),2)}const FB={read:zB},pT="8BIM",DB=2,MB=4,gT=pT.length;function zB(t,e){const n=KS(new Uint8Array(t).buffer),r={};let i=0;for(;i<t.length;){const o=yt(n,i,gT);i+=gT;const s=We.getShortAt(n,i);i+=DB;const{tagName:a,tagNameSize:c}=UB(n,i);i+=c;const u=We.getLongAt(n,i);if(i+=MB,o===pT){const d=KS(n.buffer,i,u),f={id:s,value:yt(d,0,u)};if(Mb[s]){try{f.description=Mb[s].description(d)}catch{f.description="<no description formatter>"}r[a||Mb[s].name]=f}else e&&(r[`undefined-${s}`]=f)}i+=u+u%2}return r}function UB(t,e){const[n,r]=VS(t,e);return{tagName:r,tagNameSize:1+n+(n%2===0?1:0)}}const mT={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},vT={4:{name:"Preferred CMM type",value:(t,e)=>yt(t,e,4),description:t=>t!==null?Ub(t):""},8:{name:"Profile Version",value:(t,e)=>t.getUint8(e).toString(10)+"."+(t.getUint8(e+1)>>4).toString(10)+"."+(t.getUint8(e+1)%16).toString(10)},12:{name:"Profile/Device class",value:(t,e)=>yt(t,e,4),description:t=>{switch(t.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return t}}},16:{name:"Color Space",value:(t,e)=>yt(t,e,4)},20:{name:"Connection Space",value:(t,e)=>yt(t,e,4)},24:{name:"ICC Profile Date",value:(t,e)=>jB(t,e).toISOString()},36:{name:"ICC Signature",value:(t,e)=>BB(t.buffer.slice(e,e+4))},40:{name:"Primary Platform",value:(t,e)=>yt(t,e,4),description:t=>Ub(t)},48:{name:"Device Manufacturer",value:(t,e)=>yt(t,e,4),description:t=>Ub(t)},52:{name:"Device Model Number",value:(t,e)=>yt(t,e,4)},64:{name:"Rendering Intent",value:(t,e)=>t.getUint32(e),description:t=>{switch(t){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return t}}},80:{name:"Profile Creator",value:(t,e)=>yt(t,e,4)}};function jB(t,e){const n=t.getUint16(e),r=t.getUint16(e+2)-1,i=t.getUint16(e+4),o=t.getUint16(e+6),s=t.getUint16(e+8),a=t.getUint16(e+10);return new Date(Date.UTC(n,r,i,o,s,a))}function BB(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function Ub(t){switch(t.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return t}}const bT={read:ZB},qB=84,HB=128,GB="acsp",KB="desc",VB="mluc",WB="text",YB="sig ",JB=12;function ZB(t,e,n){return n&&e[0].compressionMethod!==Vh?XB(t,e):e4(t,e)}function XB(t,e){if(!QB(e[0].compressionMethod))return{};const n=new DataView(t.buffer.slice(e[0].offset,e[0].offset+e[0].length));return XS(n,e[0].compressionMethod,"utf-8","dataview").then(_T).catch(()=>({}))}function QB(t){return t===ZS}function e4(t,e){try{const n=e.reduce((s,a)=>s+a.length,0),r=new Uint8Array(n);let i=0;const o=t4(t);for(let s=1;s<=e.length;s++){const a=e.find(d=>d.chunkNumber===s);if(!a)throw new Error(`ICC chunk ${s} not found`);const c=o.slice(a.offset,a.offset+a.length),u=new Uint8Array(c);r.set(u,i),i+=u.length}return _T(new DataView(r.buffer))}catch{return{}}}function t4(t){return Array.isArray(t)?new DataView(Uint8Array.from(t).buffer).buffer:t.buffer}function n4(t){return t.length<HB+4}function r4(t,e){return t.length<e+JB}function _T(t){const e=t.buffer,n=t.getUint32();if(t.byteLength!==n)throw new Error("ICC profile length not matching");if(t.byteLength<qB)throw new Error("ICC profile too short");const r={},i=Object.keys(vT);for(let c=0;c<i.length;c++){const u=i[c],d=vT[u],f=d.value(t,parseInt(u,10));let h=f;d.description&&(h=d.description(f)),r[d.name]={value:f,description:h}}if(ap(e.slice(36,40))!==GB)throw new Error("ICC profile: missing signature");if(n4(e))return r;const s=t.getUint32(128);let a=132;for(let c=0;c<s;c++){if(r4(e,a))return r;const u=yt(t,a,4),d=t.getUint32(a+4),f=t.getUint32(a+8);if(d>e.length)return r;const h=yt(t,d,4);if(h===KB){const p=t.getUint32(d+8);if(p>f)return r;const g=ap(e.slice(d+12,d+p+11));pd(r,u,g)}else if(h===VB){const p=t.getUint32(d+8),g=t.getUint32(d+12);let m=d+16;const v=[];for(let b=0;b<p;b++){const y=yt(t,m+0,2),w=yt(t,m+2,2),S=t.getUint32(m+4),C=t.getUint32(m+8),E=P3(t,d+C,S);v.push({languageCode:y,countryCode:w,text:E}),m+=g}if(p===1)pd(r,u,v[0].text);else{const b={};for(let y=0;y<v.length;y++)b[`${v[y].languageCode}-${v[y].countryCode}`]=v[y].text;pd(r,u,b)}}else if(h===WB){const p=ap(e.slice(d+8,d+f-7));pd(r,u,p)}else if(h===YB){const p=ap(e.slice(d+8,d+12));pd(r,u,p)}a=a+12}return r}function ap(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function pd(t,e,n){mT[e]?t[mT[e].name]={value:n,description:n}:t[e]={value:n,description:n}}const lp=27,i4={read:o4,SHOT_INFO_AUTO_ROTATE:lp};function o4(t,e,n,r,i){let o=Zs(t,FE,e,e+n,r,i);return o.ShotInfo&&(o=kt({},o,s4(o.ShotInfo.value)),delete o.ShotInfo),o}function s4(t){const e={};return t[lp]!==void 0&&(e.AutoRotate={value:t[lp],description:a4(t[lp])}),e}function a4(t){return t===0?"None":t===1?"Rotate 90 CW":t===2?"Rotate 180":t===3?"Rotate 270 CW":"Unknown"}const yT=8,wT=yT+2,xT={K3_III:78420},cp={CAMERA_ORIENTATION:1,ROLL_ANGLE:3,PITCH_ANGLE:5},l4={read:c4,PENTAX_IFD_OFFSET:wT,MODEL_ID:xT,LIK3III:cp};function c4(t,e,n,r){const i=Ao.getByteOrder(t,e+n+yT),o=e+n;let s=Zs(t,$b,o,o+wT,i,r);return u4(s)&&(s=kt({},s,d4(t,o+s.LevelInfo.__offset,i)),delete s.LevelInfo),s}function u4(t){return t.PentaxModelID&&t.PentaxModelID.value===xT.K3_III&&t.LevelInfo}function d4(t,e,n){const r={};if(e+7>t.byteLength)return r;const i=t.getInt8(e+cp.CAMERA_ORIENTATION);r.CameraOrientation={value:i,description:f4(i)};const o=t.getInt16(e+cp.ROLL_ANGLE,n===Ao.LITTLE_ENDIAN);r.RollAngle={value:o,description:h4(o)};const s=t.getInt16(e+cp.PITCH_ANGLE,n===Ao.LITTLE_ENDIAN);return r.PitchAngle={value:s,description:p4(s)},r}function f4(t){return t===0?"Horizontal (normal)":t===1?"Rotate 270 CW":t===2?"Rotate 180":t===3?"Rotate 90 CW":t===4?"Upwards":t===5?"Downwards":"Unknown"}function h4(t){return""+t*-.5}function p4(t){return""+t*-.5}const g4={read:m4};function m4(t,e){return{"Image Width":v4(t,e),"Image Height":b4(t,e),"Bit Depth":_4(t,e),"Color Type":y4(t,e),Compression:w4(t,e),Filter:x4(t,e),Interlace:k4(t,e)}}function v4(t,e){if(e+0+4>t.byteLength)return;const i=We.getLongAt(t,e);return{value:i,description:`${i}px`}}function b4(t,e){if(e+4+4>t.byteLength)return;const i=We.getLongAt(t,e+4);return{value:i,description:`${i}px`}}function _4(t,e){if(e+8+1>t.byteLength)return;const i=We.getByteAt(t,e+8);return{value:i,description:`${i}`}}function y4(t,e){const i={0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"};if(e+9+1>t.byteLength)return;const o=We.getByteAt(t,e+9);return{value:o,description:i[o]||"Unknown"}}function w4(t,e){if(e+10+1>t.byteLength)return;const i=We.getByteAt(t,e+10);return{value:i,description:i===0?"Deflate/Inflate":"Unknown"}}function x4(t,e){if(e+11+1>t.byteLength)return;const i=We.getByteAt(t,e+11);return{value:i,description:i===0?"Adaptive":"Unknown"}}function k4(t,e){const i={0:"Noninterlaced",1:"Adam7 Interlace"};if(e+12+1>t.byteLength)return;const o=We.getByteAt(t,e+12);return{value:o,description:i[o]||"Unknown"}}const S4={read:$4},jb="STATE_KEYWORD",Bb="STATE_COMPRESSION",qb="STATE_LANG",E4="STATE_TRANSLATED_KEYWORD",Hb="STATE_TEXT",T4=1,C4=1,A4=6;function $4(t,e,n,r){const i={},o=[];for(let s=0;s<e.length;s++){const{offset:a,length:c,type:u}=e[s],d=I4(t,a,c,u,n);if(d instanceof Promise)o.push(d.then(({name:f,value:h,description:p})=>{try{if(QS.USE_EXIF&&ST(f,h))return{__exif:GE.read(TT(h),A4,r).tags};if(QS.USE_IPTC&&ET(f,h))return{__iptc:Ob.read(TT(h),0,r)};if(f&&!ST(f,h)&&!ET(f,h))return{[f]:{value:h,description:p}}}catch{}return{}}));else{const{name:f,value:h,description:p}=d;f&&(i[f]={value:h,description:p})}}return{readTags:i,readTagsPromise:o.length>0?Promise.all(o):void 0}}function I4(t,e,n,r,i){const o=[],s=[];let a,c=jb,u=Vh;for(let f=0;f<n&&e+f<t.byteLength;f++){if(c===Bb){u=P4({type:r,dataView:t,offset:e+f}),r===Wa&&(f+=T4),c=kT(r,c);continue}else if(c===Hb){a=new DataView(t.buffer.slice(e+f,e+n));break}const h=t.getUint8(e+f);h===0?c=kT(r,c):c===jb?o.push(h):c===qb&&s.push(h)}if(u!==Vh&&!i)return{};const d=XS(a,u,N4(r));return d instanceof Promise?d.then(f=>Gb(f,r,s,o)).catch(()=>Gb("<text using unknown compression>".split(""),r,s,o)):Gb(d,r,s,o)}function P4({type:t,dataView:e,offset:n}){if(t===Wa){if(e.getUint8(n)===C4)return e.getUint8(n+1)}else if(t===Jh)return e.getUint8(n);return Vh}function kT(t,e){return e===jb&&[Wa,Jh].includes(t)?Bb:e===Bb?t===Wa?qb:Hb:e===qb?E4:Hb}function N4(t){return t===Eb||t===Jh?"latin1":"utf-8"}function Gb(t,e,n,r){const i=O4(t);return{name:L4(e,n,r),value:i,description:e===Wa?R4(t):i}}function L4(t,e,n){const r=Va(n);if(t===Eb||e.length===0)return r;const i=Va(e);return`${r} (${i})`}function O4(t){return t instanceof DataView?yt(t,0,t.byteLength):t}function R4(t){return VE.decode("UTF-8",t)}function ST(t,e){return t.toLowerCase()==="raw profile type exif"&&e.substring(1,5)==="exif"}function ET(t,e){return t.toLowerCase()==="raw profile type iptc"&&e.substring(1,5)==="iptc"}function TT(t){const e=t.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/);return F4(e[2].replace(/\n/g,""))}function F4(t){const e=new DataView(new ArrayBuffer(t.length/2));for(let n=0;n<t.length;n+=2)e.setUint8(n/2,parseInt(t.substring(n,n+2),16));return e}const D4={read:M4};function M4(t,e){const n={};for(let r=0;r<e.length;r++){const i=We.getLongAt(t,e[r]+$c),o=yt(t,e[r]+Ws,ro);o===bE?(n["Pixels Per Unit X"]=z4(t,e[r],i),n["Pixels Per Unit Y"]=U4(t,e[r],i),n["Pixel Units"]=j4(t,e[r],i)):o===_E&&(n["Modify Date"]=B4(t,e[r],i))}return n}function z4(t,e,n){if(!up(t,e,n,0,4))return;const o=We.getLongAt(t,e+yr+0);return{value:o,description:""+o}}function U4(t,e,n){if(!up(t,e,n,4,4))return;const o=We.getLongAt(t,e+yr+4);return{value:o,description:""+o}}function j4(t,e,n){if(!up(t,e,n,8,1))return;const o=We.getByteAt(t,e+yr+8);return{value:o,description:o===1?"meters":"Unknown"}}function B4(t,e,n){if(!up(t,e,n,0,7))return;const i=We.getShortAt(t,e+yr),o=We.getByteAt(t,e+yr+2),s=We.getByteAt(t,e+yr+3),a=We.getByteAt(t,e+yr+4),c=We.getByteAt(t,e+yr+5),u=We.getByteAt(t,e+yr+6);return{value:[i,o,s,a,c,u],description:`${Nc(i,4)}-${Nc(o,2)}-${Nc(s,2)} ${Nc(a,2)}:${Nc(c,2)}:${Nc(u,2)}`}}function up(t,e,n,r,i){return r+i<=n&&e+yr+r+i<=t.byteLength}function Nc(t,e){return`${"0".repeat(e-(""+t).length)}${t}`}const q4={read:K4},H4=4,G4=7;function K4(t,e){const n={},r=We.getByteAt(t,e);return n.Alpha=V4(r),n.Animation=W4(r),n.ImageWidth=CT(t,e+H4),n.ImageHeight=CT(t,e+G4),n}function V4(t){const e=t&16;return{value:e?1:0,description:e?"Yes":"No"}}function W4(t){const e=t&2;return{value:e?1:0,description:e?"Yes":"No"}}function CT(t,e){const n=We.getByteAt(t,e)+256*We.getByteAt(t,e+1)+65536*We.getByteAt(t,e+2)+1;return{value:n,description:n+"px"}}const Y4={read:J4};function J4(t){return{"GIF Version":Z4(t),"Image Width":X4(t),"Image Height":Q4(t),"Global Color Map":e6(t),"Bits Per Pixel":n6(t),"Color Resolution Depth":t6(t)}}function Z4(t){if(6>t.byteLength)return;const r=yt(t,3,3);return{value:r,description:r}}function X4(t){if(8>t.byteLength)return;const r=t.getUint16(6,!0);return{value:r,description:`${r}px`}}function Q4(t){if(10>t.byteLength)return;const r=t.getUint16(8,!0);return{value:r,description:`${r}px`}}function e6(t){if(11>t.byteLength)return;const i=(t.getUint8(10)&128)>>>7;return{value:i,description:i===1?"Yes":"No"}}function t6(t){if(11>t.byteLength)return;const i=((t.getUint8(10)&112)>>>4)+1;return{value:i,description:`${i} ${i===1?"bit":"bits"}`}}function n6(t){if(11>t.byteLength)return;const i=(t.getUint8(10)&7)+1;return{value:i,description:`${i} ${i===1?"bit":"bits"}`}}const r6=[6,7,99],i6={get:o6};function o6(t,e,n){if(s6(e)){e.type="image/jpeg";const r=n+e.JPEGInterchangeFormat.value;e.image=t.buffer.slice(r,r+e.JPEGInterchangeFormatLength.value),WS(e,"base64",function(){return YS(this.image)})}return e}function s6(t){return t&&(t.Compression===void 0||r6.includes(t.Compression.value))&&t.JPEGInterchangeFormat&&t.JPEGInterchangeFormat.value&&t.JPEGInterchangeFormatLength&&t.JPEGInterchangeFormatLength.value}const Kb={INCHES:2,CENTIMETERS:3,MILLIMETERS:4},Vb={INCHES_TO_MM:25.4,CM_TO_MM:10,MM_TO_MM:1},a6={get:l6};function l6(t,e){const n={};let r=!1;const i=Ja(t,"exif","FocalLength",e),o=Ja(t,"exif","FocalPlaneXResolution",e),s=Ja(t,"exif","FocalPlaneYResolution",e),a=Ja(t,"exif","FocalPlaneResolutionUnit",e),c=Ja(t,"file","Image Width",e),u=Ja(t,"file","Image Height",e),d=Ja(t,"exif","FocalLengthIn35mmFilm",e)||c6(o,s,a,c,u,i);d&&(n.FocalLength35efl={value:d,description:mt.FocalLengthIn35mmFilm(d)},r=!0);const f=u6(i,d);f&&(n.ScaleFactorTo35mmEquivalent=f,r=!0);const h=d6(d);if(h&&(n.FieldOfView=h,r=!0),r)return n}function Ja(t,e,n,r){if(r&&t[e]&&t[e][n])return t[e][n].value;if(!r&&t[n])return t[n].value}function c6(t,e,n,r,i,o){if(t&&e&&n&&r&&i&&o)try{let a;switch(n){case Kb.INCHES:a=Vb.INCHES_TO_MM;break;case Kb.CENTIMETERS:a=Vb.CM_TO_MM;break;case Kb.MILLIMETERS:a=Vb.MM_TO_MM;break;default:return}const c=t[0]/t[1]*a,u=e[0]/e[1]*a,d=r/c,f=i/u,h=Math.sqrt(d**2+f**2);return o[0]/o[1]*(43.27/h)}catch{}}function u6(t,e){if(t&&e)try{const n=e/(t[0]/t[1]);return{value:n,description:n.toFixed(1)}}catch{}}function d6(t){if(t)try{const n=2*Math.atan(36/(2*t))*(180/Math.PI);return{value:n,description:n.toFixed(1)+" deg"}}catch{}}function AT(t){this.name="MetadataMissingError",this.message=t||"No Exif data",this.stack=new Error().stack}AT.prototype=new Error;const $T={MetadataMissingError:AT},f6={load:h6,loadView:IT,errors:$T};function h6(t,e={}){return p6(t)?(e.async=!0,g6(t,e).then(n=>Wb(n,e))):x6(t)?(e.async=!0,k6(t).then(n=>Wb(n,e))):Wb(t,e)}function p6(t){return typeof t=="string"}function g6(t,e){return/^\w+:\/\//.test(t)?typeof fetch<"u"?m6(t,e):v6(t,e):_6(t)?Promise.resolve(N3(t)):y6(t,e)}function m6(t,{length:e}={}){const n={method:"GET"};return Number.isInteger(e)&&e>=0&&(n.headers={range:`bytes=0-${e-1}`}),fetch(t,n).then(r=>r.arrayBuffer())}function v6(t,{length:e}={}){return new Promise((n,r)=>{const i={};Number.isInteger(e)&&e>=0&&(i.headers={range:`bytes=0-${e-1}`}),b6(t)(t,i,s=>{if(s.statusCode>=200&&s.statusCode<=299){const a=[];s.on("data",c=>a.push(Buffer.from(c))),s.on("error",c=>r(c)),s.on("end",()=>n(Buffer.concat(a)))}else r(`Could not fetch file: ${s.statusCode} ${s.statusMessage}`),s.resume()}).on("error",s=>r(s))})}function b6(t){return/^https:\/\//.test(t)?__non_webpack_require__("https").get:__non_webpack_require__("http").get}function _6(t){return/^data:[^;,]*(;base64)?,/.test(t)}function y6(t,{length:e}={}){return new Promise((n,r)=>{const i=w6();i.open(t,(o,s)=>{o?r(o):i.stat(t,(a,c)=>{if(a)r(a);else{const u=Math.min(c.size,e!==void 0?e:c.size),d=Buffer.alloc(u),f={buffer:d,length:u};i.read(s,f,h=>{h?r(h):i.close(s,p=>{p&&console.warn(`Could not close file ${t}:`,p),n(d)})})}})})})}function w6(){try{return __non_webpack_require__("fs")}catch{return}}function x6(t){return typeof File<"u"&&t instanceof File}function k6(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=i=>e(i.target.result),r.onerror=()=>n(r.error),r.readAsArrayBuffer(t)})}function Wb(t,e){return S6(t)&&(t=new Uint8Array(t).buffer),IT(E6(t),e)}function S6(t){try{return Buffer.isBuffer(t)}catch{return!1}}function E6(t){try{return new DataView(t)}catch{return new GS(t)}}function IT(t,{expanded:e=!1,async:n=!1,includeUnknown:r=!1,domParser:i=void 0}={expanded:!1,async:!1,includeUnknown:!1,domParser:void 0}){let o=!1,s={};const a=[],{fileType:c,fileDataOffset:u,jfifDataOffset:d,tiffHeaderOffset:f,iptcDataOffset:h,xmpChunks:p,iccChunks:g,mpfDataOffset:m,pngHeaderOffset:v,pngTextChunks:b,pngChunkOffsets:y,vp8xChunkOffset:w,gifHeaderOffset:S}=SU.parseAppMarkers(t,n);if(T6(u)){o=!0;const x=sj.read(t,u);e?s.file=x:s=kt({},s,x)}if(C6(d)){o=!0;const x=mj.read(t,d);e?s.jfif=x:s=kt({},s,x)}if(A6(f)){o=!0;const{tags:x,byteOrder:A}=GE.read(t,f,r);if(x.Thumbnail&&(s.Thumbnail=x.Thumbnail,delete x.Thumbnail),e?(s.exif=x,$6(s)):s=kt({},s,x),x["IPTC-NAA"]&&!PT(h)){const I=Ob.read(x["IPTC-NAA"].value,0,r);e?s.iptc=I:s=kt({},s,I)}if(x.ApplicationNotes&&!NT(p)){const I=QE.read(Va(x.ApplicationNotes.value),void 0,i);e?s.xmp=I:(delete I._raw,s=kt({},s,I))}if(x.ImageSourceData&&x.PhotoshopSettings){const I=FB.read(x.PhotoshopSettings.value,r);e?s.photoshop=I:s=kt({},s,I)}if(x.ICC_Profile&&!LT(g)){const I=bT.read(x.ICC_Profile.value,[{offset:0,length:x.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);e?s.icc=I:s=kt({},s,I)}if(x.MakerNote){if(I6(x)){const I=i4.read(t,f,x.MakerNote.__offset,A,r);e?s.makerNotes=I:s=kt({},s,I)}else if(P6(x)){const I=l4.read(t,f,x.MakerNote.__offset,r);e?s.makerNotes=I:s=kt({},s,I)}}x.MakerNote&&delete x.MakerNote.__offset}if(PT(h)){o=!0;const x=Ob.read(t,h,r);e?s.iptc=x:s=kt({},s,x)}if(NT(p)){o=!0;const x=QE.read(t,p,i);e?s.xmp=x:(delete x._raw,s=kt({},s,x))}if(LT(g)){o=!0;const x=bT.read(t,g,n);x instanceof Promise?a.push(x.then($)):$(x)}if(N6(m)){o=!0;const x=XU.read(t,m,r);e?s.mpf=x:s=kt({},s,x)}if(L6(v)){o=!0;const x=g4.read(t,v);e?(s.png=s.png?kt({},s.png,x):x,s.pngFile=x):s=kt({},s,x)}if(O6(b)){o=!0;const{readTags:x,readTagsPromise:A}=S4.read(t,b,n,r);k(x),A&&a.push(A.then(I=>I.forEach(k)))}if(R6(y)){o=!0;const x=D4.read(t,y);e?s.png=s.png?kt({},s.png,x):x:s=kt({},s,x)}if(F6(w)){o=!0;const x=q4.read(t,w);e?s.riff=s.riff?kt({},s.riff,x):x:s=kt({},s,x)}if(D6(S)){o=!0;const x=Y4.read(t,S);e?s.gif=s.gif?kt({},s.gif,x):x:s=kt({},s,x)}const C=a6.get(s,e);C&&(e?s.composite=C:s=kt({},s,C));const E=i6.get(t,s.Thumbnail,f);if(E?(o=!0,s.Thumbnail=E):delete s.Thumbnail,c&&(e?(s.file||(s.file={}),s.file.FileType=c):s.FileType=c,o=!0),!o)throw new $T.MetadataMissingError;if(n)return Promise.all(a).then(()=>s);return s;function $(x){e?s.icc=x:s=kt({},s,x)}function k(x){if(e){for(const A of["exif","iptc"]){const I=`__${A}`;x[I]&&(s[A]=s[A]?kt({},s.exif,x[I]):x[I],delete x[I])}s.png=s.png?kt({},s.png,x):x,s.pngText=s.pngText?kt({},s.png,x):x}else s=kt({},s,x.__exif?x.__exif:{},x.__iptc?x.__iptc:{},x),delete s.__exif,delete s.__iptc}}function T6(t){return t!==void 0}function C6(t){return t!==void 0}function A6(t){return t!==void 0}function $6(t){if(t.exif){if(t.exif.GPSLatitude&&t.exif.GPSLatitudeRef)try{t.gps=t.gps||{},t.gps.Latitude=Wh(t.exif.GPSLatitude.value),t.exif.GPSLatitudeRef.value.join("")==="S"&&(t.gps.Latitude=-t.gps.Latitude)}catch{}if(t.exif.GPSLongitude&&t.exif.GPSLongitudeRef)try{t.gps=t.gps||{},t.gps.Longitude=Wh(t.exif.GPSLongitude.value),t.exif.GPSLongitudeRef.value.join("")==="W"&&(t.gps.Longitude=-t.gps.Longitude)}catch{}if(t.exif.GPSAltitude&&t.exif.GPSAltitudeRef)try{t.gps=t.gps||{},t.gps.Altitude=t.exif.GPSAltitude.value[0]/t.exif.GPSAltitude.value[1],t.exif.GPSAltitudeRef.value===1&&(t.gps.Altitude=-t.gps.Altitude)}catch{}}}function PT(t){return t!==void 0}function NT(t){return Array.isArray(t)&&t.length>0}function LT(t){return Array.isArray(t)&&t.length>0}function I6(t){return t.Make&&t.Make.value&&Array.isArray(t.Make.value)&&t.Make.value[0]==="Canon"&&t.MakerNote&&t.MakerNote.__offset}function P6(t){const e="PENTAX ";return t.MakerNote.value.length>e.length&&Va(t.MakerNote.value.slice(0,e.length))===e&&t.MakerNote.__offset}function N6(t){return t!==void 0}function L6(t){return t!==void 0}function O6(t){return t!==void 0}function R6(t){return t!==void 0}function F6(t){return t!==void 0}function D6(t){return t!==void 0}const Za=(t,e)=>{if(typeof t!="number")return NaN;if(!Number.isFinite(t))return t;const n=10**e;return Math.round(t*n)/n},M6=/^(?<year>\d{4}):(?<month>\d{2}):(?<date>\d{2}) (?<hour>\d{2}):(?<minute>\d{2}):(?<second>\d{2})$/,z6=async(t,e)=>{if(!(e==="image")||!t.file)return{createdDate:void 0,coordinates:void 0};const{exif:{DateTimeOriginal:r,DateTime:i}={DateTimeOriginal:void 0,DateTime:void 0},gps:{Latitude:o,Longitude:s}={Latitude:void 0,Longitude:void 0}}=await f6.load(t.file,{expanded:!0}).catch(()=>{})??{},c=(r?.description??i?.description)?.match(M6);let u,d;if(c?.groups){const{year:f,month:h,date:p,hour:g,minute:m,second:v}=c.groups,b=new Date(`${f}-${h}-${p}T${g}:${m}:${v}Z`);Number.isNaN(b.getTime())||(u=b)}return typeof o=="number"&&typeof s=="number"&&Number.isFinite(o)&&Number.isFinite(s)&&(d={latitude:Za(o,7),longitude:Za(s,7)}),{createdDate:u,coordinates:d}},U6=t=>{const e=new Image;return new Promise(n=>{const r=()=>{n({dimensions:{width:e.naturalWidth,height:e.naturalHeight}})};e.addEventListener("load",r,{once:!0}),e.src=t})},j6=async(t,e)=>{const n=document.createElement(e);return new Promise(r=>{const i=()=>{const{duration:o}=n;e==="audio"&&r({duration:o});const{videoWidth:s,videoHeight:a}=n;r({dimensions:{width:s,height:a},duration:o})};n.addEventListener("loadedmetadata",i,{once:!0}),n.src=t})},B6=async(t,e)=>e==="image"?U6(t):j6(t,e),q6=async(t,e,n)=>{const{dimensions:r,duration:i}=await B6(e,n),{createdDate:o,coordinates:s}=await z6(t,n);return{dimensions:r,duration:i,createdDate:o,coordinates:s}},Vce="modulepreload",Wce=function(t){return"/"+t},Yce={},OT=function(e,n,r){let i=Promise.resolve();function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return e().catch(o)})},Yb="0.104.2",H6={"@jsquash/webp":"^1.5.0","@lexical/markdown":"^0.33.1","@sindresorhus/transliterate":"^1.6.0","@sveltia/ui":"^0.27.9","@sveltia/utils":"^0.8.0","create-react-class":"^15.7.0",dayjs:"^1.11.18",deepmerge:"^4.3.1",exifreader:"^4.31.2","fast-deep-equal":"^3.1.3",flat:"^6.0.1","isomorphic-dompurify":"^2.26.0",leaflet:"^1.9.4",lexical:"^0.33.1",marked:"^16.2.1","marked-bidi":"^1.0.13",mime:"^4.0.7","parse-entities":"^4.0.2","pdfjs-dist":"^5.4.149",qrcode:"^1.5.4",react:"^19.1.1","react-dom":"^19.1.1","sanitize-filename":"^1.6.3","smol-toml":"^1.4.2","svelte-i18n":"^4.0.1",svgo:"^4.0.0","terra-draw":"^1.13.0","terra-draw-leaflet-adapter":"^1.0.3",turndown:"^7.2.1",yaml:"^2.8.1"},Jb=t=>{const e=`https://unpkg.com/${t}`,n=H6[t]?.replace(/^\D/,"");return n?`${e}@${n}`:e},Lc=async(t,e)=>OT(()=>import(`${Jb(t)}/${e}`),void 0),RT=["avif","gif","jpeg","png","webp"],G6=RT.map(t=>`image/${t}`),Zb=/\b(?:avif|gif|jpe?g|png|webp)$/i,K6=["image/svg+xml"],V6=/\b(?:svg)$/i,$o=[...G6,...K6],FT=["webp"],Xb={},W6=async t=>{if(t in Xb)return Xb[t];const e=`image/${t}`,n=new OffscreenCanvas(1,1);n.getContext("2d");const i=(await n.convertToBlob({type:e})).type===e;return Xb[t]=i,i},DT=async(t,{format:e="webp",quality:n=85}={})=>{const r=`image/${e}`;if(!await W6(e)&&FT.includes(e)){const o=t.getContext("2d").getImageData(0,0,t.width,t.height);try{const s=(await Lc(`@jsquash/${e}`,"encode.js?module")).default,a=await s(o,{quality:n});return new Blob([a],{type:r})}catch{}}return t.convertToBlob({type:r,quality:n/100})},Y6=({width:t,height:e},{width:n=t,height:r=e,fit:i="scale-down"}={})=>{const o={scale:1,width:t,height:e};if(t===r&&e===r)return o;const s=t>e,a=t<r||e<r;let c=1,u=0,d=0;if(i==="scale-down"){if(a)return o;i="contain"}return i==="contain"&&(s?(n>r?(c=n/t,u=n):(c=r/t,u=r),d=e*c):(n>r?(c=r/e,d=r):(c=n/e,d=n),u=t*c)),{scale:c,width:u,height:d}},MT=(t,e,n)=>{const{scale:r,width:i,height:o}=Y6(e,n);return t.width=i,t.height=o,{scale:r,width:i,height:o}},J6=async({blob:t})=>{const e=URL.createObjectURL(t),n=new Image;return new Promise(r=>{n.addEventListener("load",()=>{r({source:n,naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight}),URL.revokeObjectURL(e)},{once:!0}),n.src=e})},Z6=async({blob:t})=>{const e=URL.createObjectURL(t),n=document.createElement("video");return new Promise(r=>{n.addEventListener("canplay",()=>{n.pause(),r({source:n,naturalWidth:n.videoWidth,naturalHeight:n.videoHeight}),URL.revokeObjectURL(e)},{once:!0}),n.muted=!0,n.autoplay=!0,n.playsInline=!0,n.src=e,n.style.opacity="0",n.style.pointerEvents="none",document.body.appendChild(n)})},X6=async t=>t.type.startsWith("video/")?Z6({blob:t}):J6({blob:t}),Qb=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{let s,a=0,c=0;try{s=await createImageBitmap(t),{width:a,height:c}=s}catch{({source:s,naturalWidth:a,naturalHeight:c}=await X6(t))}r??=a,i??=c;const u=new OffscreenCanvas(512,512),d=u.getContext("2d");return MT(u,{width:a,height:c},{fit:o,width:r,height:i}),d.drawImage(s,0,0,u.width,u.height),s instanceof HTMLVideoElement&&document.body.removeChild(s),DT(u,{format:e,quality:n})},Q6=async t=>{const e=await t.text();try{const{optimize:n}=await Lc("svgo","dist/svgo.browser.js"),{data:r}=n(e);return new Blob([r],{type:t.type})}catch{}return t},Oc=Jb("pdfjs-dist"),e8=`${Oc}/build/pdf.min.mjs`,t8=`${Oc}/build/pdf.worker.min.mjs`,n8={isEvalSupported:!1,disableAutoFetch:!0,cMapUrl:`${Oc}/cmaps/`,iccUrl:`${Oc}/iccs/`,standardFontDataUrl:`${Oc}/standard_fonts/`,wasmUrl:`${Oc}/wasm/`};let dp;const r8=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{if(!dp)try{dp=await import(e8),dp.GlobalWorkerOptions.workerSrc=t8}catch{throw new Error("Failed to load PDF.js library")}const s=URL.createObjectURL(t),a=new OffscreenCanvas(512,512),c=a.getContext("2d");try{const d=await(await dp.getDocument({...n8,url:s}).promise).getPage(1),f=d.getViewport({scale:1}),{scale:h}=MT(a,{width:f.width,height:f.height},{width:r,height:i,fit:o});await d.render({canvasContext:c,viewport:h===1?f:d.getViewport({scale:h})}).promise,URL.revokeObjectURL(s)}catch{throw new Error("Failed to render PDF")}return DT(a,{format:e,quality:n})},e_=new Set,Qs=async(t,e=0)=>{const{file:n,blobURL:r,name:i,path:o}=t;if(r)return fetch(r).then(a=>a.blob());let s;if(n)s=n;else{if(e_.has(o)&&e<=25)return await Lt(200),Qs(t,e+1);e_.add(o);const a=await se(wn)?.fetchBlob?.(t);if(!a)throw new Error("Failed to retrieve blob");s=new Blob([a],{type:os.getType(i)??a.type})}return t.blobURL=URL.createObjectURL(s),e_.delete(o),s},t_=async t=>(t.blobURL||await Qs(t),t.blobURL);let fp;const n_=async(t,{cacheOnly:e=!1}={})=>{const n=t.name.endsWith(".pdf");if(!(["image","video"].includes(t.kind)||n))return;if(fp===void 0){const{databaseName:i}=se(wn)?.repository??{};fp=i?new Co(i,"asset-thumbnails"):null}let r=await fp?.get(t.sha);if(!r){if(e)return;const i=await Qs(t),o={format:"webp",quality:85,width:512,height:512,fit:"contain"};r=n?await r8(i,o):await Qb(i,o),await fp?.set(t.sha,r)}return URL.createObjectURL(r)},gd=(t,{pathOnly:e=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{const{publicPath:i,entryRelative:o,hasTemplateTags:s}=t.folder.collectionName===void 0?t.folder:jh(t.path).find(({collectionName:d})=>d!==void 0)??se(qa);if(o)return e&&r&&fn(t.path).dirname===fn(Object.values(r.locales)[0].path).dirname?t.name:void 0;const{_baseURL:a="",output:{encode_file_path:c=!1}={}}=se(Nt);let u=s?t.path.replace(jS(t.folder.internalPath??"",d=>{const f=d.match(/{{(?<tag>.+?)}}/)?.groups?.tag;return f?`(?<${f}>[^/]+)`:Kt(d)}),i?.replaceAll(/{{(.+?)}}/g,"$<$1>")??""):t.path.replace(t.folder.internalPath??"",i==="/"?"":i??"");if(c&&(u=BS(u)),!(!u.startsWith("/")&&!n))return e?u:`${a}${u}`},Rc=async({value:t,entry:e,collectionName:n,fileName:r,thumbnail:i=!1})=>{if(!t)return;if(/^(?:https?|data|blob):/.test(t))return t;const o=T_({value:t,entry:e,collectionName:n,fileName:r});if(o)return(i?await n_(o):await t_(o))??gd(o)},hp={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},pp=async t=>{const{kind:e,path:n}=t,{blobBaseURL:r}=se(wn)?.repository??{},i=await t_(t),o=gd(t,{allowSpecial:!0,pathOnly:!0})??i;let s={};return["image","video","audio"].includes(e)&&i&&(s=await q6(t,i,e)),{...s,publicURL:gd(t),repoBlobURL:r?`${r}/${n}`:void 0,usedEntries:o?await S_(o):[]}},Fc=it(!1),Io=it(),r_=it([]),li=it([]),i_=it([]),zT=t=>se(r_).filter(({collectionName:e,filePathMap:n})=>n?Object.values(n).includes(t):Kr(e)?._file?.fullPathRegEx?.test(t)).sort((e,n)=>n.folderPath?.localeCompare(e.folderPath??"")??0),i8=()=>{try{return se(ue)("index_file")}catch{return"Index File"}},ci=t=>{const{index_file:e}=t;if(!Ld(t)||!e)return;const n=e===!0?{}:e;return{name:n.name??"_index",label:n.label??i8(),icon:n.icon??"home",fields:n.fields,editor:n.editor}},Po=(t,e)=>{const n=ci(t);return n?e.slug===n.name:!1},o8=t=>{const e=ci(t);return e?!Lo(t.name).some(({slug:n})=>n===e.name):!1};rr.extend(ib),rr.extend(ob),rr.extend(sb);const s8=/{{(?:year|month|day|hour|minute|second)}}/,ls=t=>zT(Object.values(t.locales)[0].path).map(({collectionName:e})=>Kr(e)).filter(e=>!!e),a8=({dateFieldName:t,fields:e,content:n})=>{const r=t?e.find(({widget:a,name:c})=>a==="datetime"&&c===t):e.find(({widget:a})=>a==="datetime"),i=r?n[r.name]:void 0;if(!r||!i)return;const{format:o,picker_utc:s=!1}=r;return Ha({date:(s?rr.utc:rr)(i,o).toDate(),timeZone:s?"UTC":void 0})},UT=(t,e,n,r)=>{const{show_preview_links:i=!0,_baseURL:o}=se(Nt)??{},{slug:s,path:a,content:c}=t.locales[e]??{},{preview_path:u,preview_path_date_field:d,fields:f=[]}=r??n;if(!i||!o||!a||!c||!u)return;const h=Po(n,t),g=(h?ci(n):void 0)?.fields??f;let m;if(!(s8.test(u)&&(m=a8({dateFieldName:d,fields:g,content:c}),!m)))try{const v=Oo(u,{type:"preview_path",collection:n,content:c,locale:e,currentSlug:s,entryFilePath:a,dateTimeParts:m,isIndexFile:h});return`${o.replace(/\/$/,"")}/${v.replace(/^\//,"")}`}catch{return}},l8=(t,e)=>`${se(wn)?.repository?.blobBaseURL}/${t.locales[e]?.path}?plain=1`,gp=t=>!("divider"in t)&&typeof t.file=="string"&&Array.isArray(t.fields),mp=t=>t.filter(e=>gp(e)),Dc=(t,e)=>{const n=typeof t=="string"?Kr(t):t;if(!(!n||!("_fileMap"in n)))return n._fileMap[e]},md=t=>t.label||t.name,ea=(t,e)=>"_fileMap"in t?Object.values(t._fileMap).filter(({_file:n,_i18n:r})=>n.fullPath===e.locales[r.defaultLocale]?.path):[],o_=(t,e)=>se(li).find(n=>ls(n).some(r=>r.name===t&&ea(r,n).some(i=>i.name===e))),jT=(t,e)=>{if(t&&e){const{collections:n,singletons:r}=se(Nt);return t==="_singletons"?Array.isArray(r)?mp(r).findIndex(i=>i.name===e):-1:ia({collections:n}).find(({name:i})=>i===t)?.files?.findIndex(({name:i})=>i===e)??-1}return-1},BT=["file","image"],Xa=[...BT,"relation","select"],qT=[...Xa,"list","number"],HT=({multiline:t,dotAll:e,source:n})=>t||e||n.includes("[\\s\\S]")||n.includes("[\\S\\s]"),GT=t=>is(Object.fromEntries(Object.entries(no(t)).filter(([e])=>!e.split(".").pop()?.startsWith("__sc_")))),KT=t=>t.replace(/"/g,"'"),Qa=t=>t.replace(/"/g,"""),vp=new Map,VT=/!\[(?<alt>(?:[^\]\\]|\\.)*)\]\((?<src>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title>(?:[^"\\]|\\.)*)")?\)/,c8=/\[!\[(?<alt2>(?:[^\]\\]|\\.)*)\]\((?<src2>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title2>(?:[^"\\]|\\.)*)")?\)\](?:\((?<link>[^)]*\([^)]*\)[^)]*|[^)]*)\))/,u8=new RegExp(`${VT.source}|${c8.source}`),WT={id:"image",label:"Image",fields:[{name:"src",label:"Source",widget:"image"},{name:"alt",label:"Alt Text",required:!1},{name:"title",label:"Title",required:!1}],pattern:VT,toBlock:t=>{const{src:e="",alt:n="",title:r=""}=t;return e?`}"`:""})`:""},toPreview:t=>{const{src:e="",alt:n="",title:r=""}=t;return`<img src="${Qa(e)}" alt="${Qa(n)}" title="${Qa(r)}">`}},d8={id:"linked-image",label:"Image",fields:[...WT.fields,{name:"link",label:"Link",required:!1}],pattern:u8,fromBlock:t=>{const{src:e,alt:n,title:r,src2:i,alt2:o,title2:s,link:a}=t.groups??{};return{src:(e||i||"").trim(),alt:(n||o||"").trim(),title:(r||s||"").trim(),link:(a||"").trim()}},toBlock:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=e?`}"`:""})`:"";return o&&i?`[${o}](${i})`:o},toPreview:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=`<img src="${Qa(e)}" alt="${Qa(n)}" title="${Qa(r)}">`;return i?`<a href="${Qa(i)}">${o}</a>`:o}},YT=t=>{if(vp.has(t))return vp.get(t);const e={icon:"image",label:se(ue)("editor_components.image"),fields:[{name:"src",label:se(ue)("editor_components.src"),widget:"image"},{name:"alt",label:se(ue)("editor_components.alt"),required:!1},{name:"title",label:se(ue)("editor_components.title"),required:!1}]};return{image:{...WT,...e},"linked-image":{...d8,...e,fields:[...e.fields,{name:"link",label:se(ue)("editor_components.link"),required:!1}]}}[t]};var s_,JT;function ZT(){if(JT)return s_;JT=1;const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:s,create:a}=Object,{apply:c,construct:u}=typeof Reflect<"u"&&Reflect;o||(o=function(Se){return Se}),s||(s=function(Se){return Se}),c||(c=function(Se,Ue,Ie){return Se.apply(Ue,Ie)}),u||(u=function(Se,Ue){return new Se(...Ue)});const d=k(Array.prototype.forEach),f=k(Array.prototype.lastIndexOf),h=k(Array.prototype.pop),p=k(Array.prototype.push),g=k(Array.prototype.splice),m=k(String.prototype.toLowerCase),v=k(String.prototype.toString),b=k(String.prototype.match),y=k(String.prototype.replace),w=k(String.prototype.indexOf),S=k(String.prototype.trim),C=k(Object.prototype.hasOwnProperty),E=k(RegExp.prototype.test),$=x(TypeError);function k(Ae){return function(Se){Se instanceof RegExp&&(Se.lastIndex=0);for(var Ue=arguments.length,Ie=new Array(Ue>1?Ue-1:0),Ve=1;Ve<Ue;Ve++)Ie[Ve-1]=arguments[Ve];return c(Ae,Se,Ie)}}function x(Ae){return function(){for(var Se=arguments.length,Ue=new Array(Se),Ie=0;Ie<Se;Ie++)Ue[Ie]=arguments[Ie];return u(Ae,Ue)}}function A(Ae,Se){let Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;e&&e(Ae,null);let Ie=Se.length;for(;Ie--;){let Ve=Se[Ie];if(typeof Ve=="string"){const ye=Ue(Ve);ye!==Ve&&(n(Se)||(Se[Ie]=ye),Ve=ye)}Ae[Ve]=!0}return Ae}function I(Ae){for(let Se=0;Se<Ae.length;Se++)C(Ae,Se)||(Ae[Se]=null);return Ae}function P(Ae){const Se=a(null);for(const[Ue,Ie]of t(Ae))C(Ae,Ue)&&(Array.isArray(Ie)?Se[Ue]=I(Ie):Ie&&typeof Ie=="object"&&Ie.constructor===Object?Se[Ue]=P(Ie):Se[Ue]=Ie);return Se}function O(Ae,Se){for(;Ae!==null;){const Ie=i(Ae,Se);if(Ie){if(Ie.get)return k(Ie.get);if(typeof Ie.value=="function")return k(Ie.value)}Ae=r(Ae)}function Ue(){return null}return Ue}const L=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),U=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),V=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),W=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),J=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N=o(["#text"]),B=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),K=o(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Y=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Q=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ie=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ee=s(/<%[\w\W]*|[\w\W]*%>/gm),te=s(/\$\{[\w\W]*/gm),re=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),ce=s(/^aria-[\-\w]+$/),he=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pe=s(/^(?:\w+script|data):/i),me=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fe=s(/^html$/i),ge=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var _e=Object.freeze({__proto__:null,ARIA_ATTR:ce,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:ge,DATA_ATTR:re,DOCTYPE_NAME:fe,ERB_EXPR:ee,IS_ALLOWED_URI:he,IS_SCRIPT_OR_DATA:pe,MUSTACHE_EXPR:ie,TMPLIT_EXPR:te});const be={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ne=function(){return typeof window>"u"?null:window},$e=function(Se,Ue){if(typeof Se!="object"||typeof Se.createPolicy!="function")return null;let Ie=null;const Ve="data-tt-policy-suffix";Ue&&Ue.hasAttribute(Ve)&&(Ie=Ue.getAttribute(Ve));const ye="dompurify"+(Ie?"#"+Ie:"");try{return Se.createPolicy(ye,{createHTML(ke){return ke},createScriptURL(ke){return ke}})}catch{return console.warn("TrustedTypes policy "+ye+" could not be created."),null}},Ke=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function je(){let Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ne();const Se=ut=>je(ut);if(Se.version="3.2.6",Se.removed=[],!Ae||!Ae.document||Ae.document.nodeType!==be.document||!Ae.Element)return Se.isSupported=!1,Se;let{document:Ue}=Ae;const Ie=Ue,Ve=Ie.currentScript,{DocumentFragment:ye,HTMLTemplateElement:ke,Node:Le,Element:Qe,NodeFilter:Ze,NamedNodeMap:Ee=Ae.NamedNodeMap||Ae.MozNamedAttrMap,HTMLFormElement:ze,DOMParser:Je,trustedTypes:dt}=Ae,lt=Qe.prototype,vt=O(lt,"cloneNode"),zt=O(lt,"remove"),bn=O(lt,"nextSibling"),sn=O(lt,"childNodes"),Ct=O(lt,"parentNode");if(typeof ke=="function"){const ut=Ue.createElement("template");ut.content&&ut.content.ownerDocument&&(Ue=ut.content.ownerDocument)}let St,Jt="";const{implementation:Gt,createNodeIterator:Dn,createDocumentFragment:Sn,getElementsByTagName:an}=Ue,{importNode:_n}=Ie;let At=Ke();Se.isSupported=typeof t=="function"&&typeof Ct=="function"&&Gt&&Gt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Fr,ERB_EXPR:ni,TMPLIT_EXPR:Vi,DATA_ATTR:pi,ARIA_ATTR:xt,IS_SCRIPT_OR_DATA:En,ATTR_WHITESPACE:$n,CUSTOM_ELEMENT:sr}=_e;let{IS_ALLOWED_URI:Tr}=_e,Ot=null;const ar=A({},[...L,...F,...U,...W,...N]);let Rt=null;const Cr=A({},[...B,...K,...Y,...Q]);let Zt=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ar=null,gr=null,qn=!0,Dr=!0,Li=!1,gi=!0,mi=!1,ln=!0,ct=!1,$t=!1,gn=!1,yn=!1,vi=!1,Wi=!1,tr=!0,bi=!1;const Cs="user-content-";let Bl=!0,As=!1,nr={},mr=null;const Jo=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let WL=null;const YL=A({},["audio","video","img","source","image","track"]);let nx=null;const JL=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gm="http://www.w3.org/1998/Math/MathML",mm="http://www.w3.org/2000/svg",$s="http://www.w3.org/1999/xhtml";let Pu=$s,rx=!1,ix=null;const Mce=A({},[gm,mm,$s],v);let vm=A({},["mi","mo","mn","ms","mtext"]),bm=A({},["annotation-xml"]);const zce=A({},["title","style","font","a","script"]);let Nf=null;const Uce=["application/xhtml+xml","text/html"],jce="text/html";let vr=null,Nu=null;const Bce=Ue.createElement("form"),ZL=function(de){return de instanceof RegExp||de instanceof Function},ox=function(){let de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Nu&&Nu===de)){if((!de||typeof de!="object")&&(de={}),de=P(de),Nf=Uce.indexOf(de.PARSER_MEDIA_TYPE)===-1?jce:de.PARSER_MEDIA_TYPE,vr=Nf==="application/xhtml+xml"?v:m,Ot=C(de,"ALLOWED_TAGS")?A({},de.ALLOWED_TAGS,vr):ar,Rt=C(de,"ALLOWED_ATTR")?A({},de.ALLOWED_ATTR,vr):Cr,ix=C(de,"ALLOWED_NAMESPACES")?A({},de.ALLOWED_NAMESPACES,v):Mce,nx=C(de,"ADD_URI_SAFE_ATTR")?A(P(JL),de.ADD_URI_SAFE_ATTR,vr):JL,WL=C(de,"ADD_DATA_URI_TAGS")?A(P(YL),de.ADD_DATA_URI_TAGS,vr):YL,mr=C(de,"FORBID_CONTENTS")?A({},de.FORBID_CONTENTS,vr):Jo,Ar=C(de,"FORBID_TAGS")?A({},de.FORBID_TAGS,vr):P({}),gr=C(de,"FORBID_ATTR")?A({},de.FORBID_ATTR,vr):P({}),nr=C(de,"USE_PROFILES")?de.USE_PROFILES:!1,qn=de.ALLOW_ARIA_ATTR!==!1,Dr=de.ALLOW_DATA_ATTR!==!1,Li=de.ALLOW_UNKNOWN_PROTOCOLS||!1,gi=de.ALLOW_SELF_CLOSE_IN_ATTR!==!1,mi=de.SAFE_FOR_TEMPLATES||!1,ln=de.SAFE_FOR_XML!==!1,ct=de.WHOLE_DOCUMENT||!1,yn=de.RETURN_DOM||!1,vi=de.RETURN_DOM_FRAGMENT||!1,Wi=de.RETURN_TRUSTED_TYPE||!1,gn=de.FORCE_BODY||!1,tr=de.SANITIZE_DOM!==!1,bi=de.SANITIZE_NAMED_PROPS||!1,Bl=de.KEEP_CONTENT!==!1,As=de.IN_PLACE||!1,Tr=de.ALLOWED_URI_REGEXP||he,Pu=de.NAMESPACE||$s,vm=de.MATHML_TEXT_INTEGRATION_POINTS||vm,bm=de.HTML_INTEGRATION_POINTS||bm,Zt=de.CUSTOM_ELEMENT_HANDLING||{},de.CUSTOM_ELEMENT_HANDLING&&ZL(de.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Zt.tagNameCheck=de.CUSTOM_ELEMENT_HANDLING.tagNameCheck),de.CUSTOM_ELEMENT_HANDLING&&ZL(de.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Zt.attributeNameCheck=de.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),de.CUSTOM_ELEMENT_HANDLING&&typeof de.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Zt.allowCustomizedBuiltInElements=de.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),mi&&(Dr=!1),vi&&(yn=!0),nr&&(Ot=A({},N),Rt=[],nr.html===!0&&(A(Ot,L),A(Rt,B)),nr.svg===!0&&(A(Ot,F),A(Rt,K),A(Rt,Q)),nr.svgFilters===!0&&(A(Ot,U),A(Rt,K),A(Rt,Q)),nr.mathMl===!0&&(A(Ot,W),A(Rt,Y),A(Rt,Q))),de.ADD_TAGS&&(Ot===ar&&(Ot=P(Ot)),A(Ot,de.ADD_TAGS,vr)),de.ADD_ATTR&&(Rt===Cr&&(Rt=P(Rt)),A(Rt,de.ADD_ATTR,vr)),de.ADD_URI_SAFE_ATTR&&A(nx,de.ADD_URI_SAFE_ATTR,vr),de.FORBID_CONTENTS&&(mr===Jo&&(mr=P(mr)),A(mr,de.FORBID_CONTENTS,vr)),Bl&&(Ot["#text"]=!0),ct&&A(Ot,["html","head","body"]),Ot.table&&(A(Ot,["tbody"]),delete Ar.tbody),de.TRUSTED_TYPES_POLICY){if(typeof de.TRUSTED_TYPES_POLICY.createHTML!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof de.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');St=de.TRUSTED_TYPES_POLICY,Jt=St.createHTML("")}else St===void 0&&(St=$e(dt,Ve)),St!==null&&typeof Jt=="string"&&(Jt=St.createHTML(""));o&&o(de),Nu=de}},XL=A({},[...F,...U,...V]),QL=A({},[...W,...J]),qce=function(de){let Be=Ct(de);(!Be||!Be.tagName)&&(Be={namespaceURI:Pu,tagName:"template"});const at=m(de.tagName),In=m(Be.tagName);return ix[de.namespaceURI]?de.namespaceURI===mm?Be.namespaceURI===$s?at==="svg":Be.namespaceURI===gm?at==="svg"&&(In==="annotation-xml"||vm[In]):!!XL[at]:de.namespaceURI===gm?Be.namespaceURI===$s?at==="math":Be.namespaceURI===mm?at==="math"&&bm[In]:!!QL[at]:de.namespaceURI===$s?Be.namespaceURI===mm&&!bm[In]||Be.namespaceURI===gm&&!vm[In]?!1:!QL[at]&&(zce[at]||!XL[at]):!!(Nf==="application/xhtml+xml"&&ix[de.namespaceURI]):!1},Zo=function(de){p(Se.removed,{element:de});try{Ct(de).removeChild(de)}catch{zt(de)}},Lu=function(de,Be){try{p(Se.removed,{attribute:Be.getAttributeNode(de),from:Be})}catch{p(Se.removed,{attribute:null,from:Be})}if(Be.removeAttribute(de),de==="is")if(yn||vi)try{Zo(Be)}catch{}else try{Be.setAttribute(de,"")}catch{}},eO=function(de){let Be=null,at=null;if(gn)de="<remove></remove>"+de;else{const lr=b(de,/^[\r\n\t ]+/);at=lr&&lr[0]}Nf==="application/xhtml+xml"&&Pu===$s&&(de='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+de+"</body></html>");const In=St?St.createHTML(de):de;if(Pu===$s)try{Be=new Je().parseFromString(In,Nf)}catch{}if(!Be||!Be.documentElement){Be=Gt.createDocument(Pu,"template",null);try{Be.documentElement.innerHTML=rx?Jt:In}catch{}}const Mr=Be.body||Be.documentElement;return de&&at&&Mr.insertBefore(Ue.createTextNode(at),Mr.childNodes[0]||null),Pu===$s?an.call(Be,ct?"html":"body")[0]:ct?Be.documentElement:Mr},tO=function(de){return Dn.call(de.ownerDocument||de,de,Ze.SHOW_ELEMENT|Ze.SHOW_COMMENT|Ze.SHOW_TEXT|Ze.SHOW_PROCESSING_INSTRUCTION|Ze.SHOW_CDATA_SECTION,null)},sx=function(de){return de instanceof ze&&(typeof de.nodeName!="string"||typeof de.textContent!="string"||typeof de.removeChild!="function"||!(de.attributes instanceof Ee)||typeof de.removeAttribute!="function"||typeof de.setAttribute!="function"||typeof de.namespaceURI!="string"||typeof de.insertBefore!="function"||typeof de.hasChildNodes!="function")},nO=function(de){return typeof Le=="function"&&de instanceof Le};function Is(ut,de,Be){d(ut,at=>{at.call(Se,de,Be,Nu)})}const rO=function(de){let Be=null;if(Is(At.beforeSanitizeElements,de,null),sx(de))return Zo(de),!0;const at=vr(de.nodeName);if(Is(At.uponSanitizeElement,de,{tagName:at,allowedTags:Ot}),ln&&de.hasChildNodes()&&!nO(de.firstElementChild)&&E(/<[/\w!]/g,de.innerHTML)&&E(/<[/\w!]/g,de.textContent)||de.nodeType===be.progressingInstruction||ln&&de.nodeType===be.comment&&E(/<[/\w]/g,de.data))return Zo(de),!0;if(!Ot[at]||Ar[at]){if(!Ar[at]&&oO(at)&&(Zt.tagNameCheck instanceof RegExp&&E(Zt.tagNameCheck,at)||Zt.tagNameCheck instanceof Function&&Zt.tagNameCheck(at)))return!1;if(Bl&&!mr[at]){const In=Ct(de)||de.parentNode,Mr=sn(de)||de.childNodes;if(Mr&&In){const lr=Mr.length;for(let _i=lr-1;_i>=0;--_i){const Ps=vt(Mr[_i],!0);Ps.__removalCount=(de.__removalCount||0)+1,In.insertBefore(Ps,bn(de))}}}return Zo(de),!0}return de instanceof Qe&&!qce(de)||(at==="noscript"||at==="noembed"||at==="noframes")&&E(/<\/no(script|embed|frames)/i,de.innerHTML)?(Zo(de),!0):(mi&&de.nodeType===be.text&&(Be=de.textContent,d([Fr,ni,Vi],In=>{Be=y(Be,In," ")}),de.textContent!==Be&&(p(Se.removed,{element:de.cloneNode()}),de.textContent=Be)),Is(At.afterSanitizeElements,de,null),!1)},iO=function(de,Be,at){if(tr&&(Be==="id"||Be==="name")&&(at in Ue||at in Bce))return!1;if(!(Dr&&!gr[Be]&&E(pi,Be))){if(!(qn&&E(xt,Be))){if(!Rt[Be]||gr[Be]){if(!(oO(de)&&(Zt.tagNameCheck instanceof RegExp&&E(Zt.tagNameCheck,de)||Zt.tagNameCheck instanceof Function&&Zt.tagNameCheck(de))&&(Zt.attributeNameCheck instanceof RegExp&&E(Zt.attributeNameCheck,Be)||Zt.attributeNameCheck instanceof Function&&Zt.attributeNameCheck(Be))||Be==="is"&&Zt.allowCustomizedBuiltInElements&&(Zt.tagNameCheck instanceof RegExp&&E(Zt.tagNameCheck,at)||Zt.tagNameCheck instanceof Function&&Zt.tagNameCheck(at))))return!1}else if(!nx[Be]){if(!E(Tr,y(at,$n,""))){if(!((Be==="src"||Be==="xlink:href"||Be==="href")&&de!=="script"&&w(at,"data:")===0&&WL[de])){if(!(Li&&!E(En,y(at,$n,"")))){if(at)return!1}}}}}}return!0},oO=function(de){return de!=="annotation-xml"&&b(de,sr)},sO=function(de){Is(At.beforeSanitizeAttributes,de,null);const{attributes:Be}=de;if(!Be||sx(de))return;const at={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Rt,forceKeepAttr:void 0};let In=Be.length;for(;In--;){const Mr=Be[In],{name:lr,namespaceURI:_i,value:Ps}=Mr,Lf=vr(lr),ax=Ps;let zr=lr==="value"?ax:S(ax);if(at.attrName=Lf,at.attrValue=zr,at.keepAttr=!0,at.forceKeepAttr=void 0,Is(At.uponSanitizeAttribute,de,at),zr=at.attrValue,bi&&(Lf==="id"||Lf==="name")&&(Lu(lr,de),zr=Cs+zr),ln&&E(/((--!?|])>)|<\/(style|title)/i,zr)){Lu(lr,de);continue}if(at.forceKeepAttr)continue;if(!at.keepAttr){Lu(lr,de);continue}if(!gi&&E(/\/>/i,zr)){Lu(lr,de);continue}mi&&d([Fr,ni,Vi],lO=>{zr=y(zr,lO," ")});const aO=vr(de.nodeName);if(!iO(aO,Lf,zr)){Lu(lr,de);continue}if(St&&typeof dt=="object"&&typeof dt.getAttributeType=="function"&&!_i)switch(dt.getAttributeType(aO,Lf)){case"TrustedHTML":{zr=St.createHTML(zr);break}case"TrustedScriptURL":{zr=St.createScriptURL(zr);break}}if(zr!==ax)try{_i?de.setAttributeNS(_i,lr,zr):de.setAttribute(lr,zr),sx(de)?Zo(de):h(Se.removed)}catch{Lu(lr,de)}}Is(At.afterSanitizeAttributes,de,null)},Hce=function ut(de){let Be=null;const at=tO(de);for(Is(At.beforeSanitizeShadowDOM,de,null);Be=at.nextNode();)Is(At.uponSanitizeShadowNode,Be,null),rO(Be),sO(Be),Be.content instanceof ye&&ut(Be.content);Is(At.afterSanitizeShadowDOM,de,null)};return Se.sanitize=function(ut){let de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=null,at=null,In=null,Mr=null;if(rx=!ut,rx&&(ut="<!-->"),typeof ut!="string"&&!nO(ut))if(typeof ut.toString=="function"){if(ut=ut.toString(),typeof ut!="string")throw $("dirty is not a string, aborting")}else throw $("toString is not a function");if(!Se.isSupported)return ut;if($t||ox(de),Se.removed=[],typeof ut=="string"&&(As=!1),As){if(ut.nodeName){const Ps=vr(ut.nodeName);if(!Ot[Ps]||Ar[Ps])throw $("root node is forbidden and cannot be sanitized in-place")}}else if(ut instanceof Le)Be=eO("<!---->"),at=Be.ownerDocument.importNode(ut,!0),at.nodeType===be.element&&at.nodeName==="BODY"||at.nodeName==="HTML"?Be=at:Be.appendChild(at);else{if(!yn&&!mi&&!ct&&ut.indexOf("<")===-1)return St&&Wi?St.createHTML(ut):ut;if(Be=eO(ut),!Be)return yn?null:Wi?Jt:""}Be&&gn&&Zo(Be.firstChild);const lr=tO(As?ut:Be);for(;In=lr.nextNode();)rO(In),sO(In),In.content instanceof ye&&Hce(In.content);if(As)return ut;if(yn){if(vi)for(Mr=Sn.call(Be.ownerDocument);Be.firstChild;)Mr.appendChild(Be.firstChild);else Mr=Be;return(Rt.shadowroot||Rt.shadowrootmode)&&(Mr=_n.call(Ie,Mr,!0)),Mr}let _i=ct?Be.outerHTML:Be.innerHTML;return ct&&Ot["!doctype"]&&Be.ownerDocument&&Be.ownerDocument.doctype&&Be.ownerDocument.doctype.name&&E(fe,Be.ownerDocument.doctype.name)&&(_i="<!DOCTYPE "+Be.ownerDocument.doctype.name+`>
|
|
147
|
+
`,Yh=4,ro=4,$c=0,Ws=Yh,yr=Yh+ro,Sb="XML:com.adobe.xmp\0",Eb="tEXt",Wa="iTXt",Jh="zTXt",bE="pHYs",_E="tIME",vz="eXIf",bz="iCCP";function _z(t){return!!t&&yt(t,0,kb.length)===kb}function yz(t,e){const r={hasAppMarkers:!1};let i=kb.length;for(;i+Yh+ro<=t.byteLength;){if(wz(t,i))r.hasAppMarkers=!0,r.pngHeaderOffset=i+yr;else if(xz(t,i)){const o=Cz(t,i);o!==void 0&&(r.hasAppMarkers=!0,r.xmpChunks=[{dataOffset:o,length:t.getUint32(i+$c)-(o-(i+yr))}])}else if(kz(t,i,e)){r.hasAppMarkers=!0;const o=yt(t,i+Ws,ro);r.pngTextChunks||(r.pngTextChunks=[]),r.pngTextChunks.push({length:t.getUint32(i+$c),type:o,offset:i+yr})}else if(Sz(t,i))r.hasAppMarkers=!0,r.tiffHeaderOffset=i+yr;else if(e&&Ez(t,i)){r.hasAppMarkers=!0;const o=t.getUint32(i+$c),s=i+yr,{profileName:a,compressionMethod:c,compressedProfileOffset:u}=Az(t,s);r.iccChunks||(r.iccChunks=[]),r.iccChunks.push({offset:u,length:o-(u-s),chunkNumber:1,chunksTotal:1,profileName:a,compressionMethod:c})}else Tz(t,i)&&(r.hasAppMarkers=!0,r.pngChunkOffsets||(r.pngChunkOffsets=[]),r.pngChunkOffsets.push(i+$c));i+=t.getUint32(i+$c)+Yh+ro+4}return r}function wz(t,e){return yt(t,e+Ws,ro)==="IHDR"}function xz(t,e){return yt(t,e+Ws,ro)===Wa&&yt(t,e+yr,Sb.length)===Sb}function kz(t,e,n){const r=yt(t,e+Ws,ro);return r===Eb||r===Wa||r===Jh&&n}function Sz(t,e){return yt(t,e+Ws,ro)===vz}function Ez(t,e){return yt(t,e+Ws,ro)===bz}function Tz(t,e){const n=[bE,_E],r=yt(t,e+Ws,ro);return n.includes(r)}function Cz(t,e){e+=yr+Sb.length+1+1;let i=0;for(;i<2&&e<t.byteLength;)t.getUint8(e)===0&&i++,e++;if(!(i<2))return e}function Az(t,e){const i=Ac(t,e);e+=i.length+1;const o=t.getUint8(e);return e+=1,{profileName:i,compressionMethod:o,compressedProfileOffset:e}}function $z(t,e){return t.getUint32(e+4)}function Iz(t,e,n,r){const{offsets:o,sizes:s}=Pz(e,n+3),a=t.getUint8(o.offsetSize)>>4;s.item.extent.extentOffset=a;const c=t.getUint8(o.lengthSize)&15;s.item.extent.extentLength=c;const u=t.getUint8(o.baseOffsetSize)>>4;s.item.baseOffset=u;const d=Nz(t,o.indexSize,e);s.item.extent.extentIndex=d!==void 0?d:0;const f=Lz(t,o.itemCount,e);return{type:"iloc",items:Oz(t,e,o,s,a,c,d,f),length:r}}function Pz(t,e){const n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};t<2?(n.itemCount=2,n.item.itemId=2):t===2&&(n.itemCount=4,n.item.itemId=4),t===1||t===2?n.item.constructionMethod=2:n.item.constructionMethod=0;const r={offsetSize:e,lengthSize:e,baseOffsetSize:e+1,indexSize:e+1};return r.itemCount=e+2,r.items=r.itemCount+n.itemCount,r.item={itemId:0},r.item.constructionMethod=r.item.itemId+n.item.itemId,r.item.dataReferenceIndex=r.item.constructionMethod+n.item.constructionMethod,{offsets:r,sizes:n}}function Nz(t,e,n){if(n===1||n===2)return t.getUint8(e)&15}function Lz(t,e,n){if(n<2)return t.getUint16(e);if(n===2)return t.getUint32(e)}function Oz(t,e,n,r,i,o,s,a){if(a===void 0)return[];const c=[];let u=n.items;for(let d=0;d<a;d++){const f={extents:[]};f.itemId=Rz(t,u,e),u+=r.item.itemId,f.constructionMethod=e===1||e===2?t.getUint16(u)&15:void 0,u+=r.item.constructionMethod,f.dataReferenceIndex=t.getUint16(u),u+=r.item.dataReferenceIndex,f.baseOffset=Zh(t,u,r.item.baseOffset),u+=r.item.baseOffset,f.extentCount=t.getUint16(u),u+=r.item.extentCount;for(let h=0;h<f.extentCount;h++){const p={};p.extentIndex=Fz(t,e,u,s),u+=r.item.extent.extentIndex,p.extentOffset=Zh(t,u,i),u+=r.item.extent.extentOffset,p.extentLength=Zh(t,u,o),u+=r.item.extent.extentLength,f.extents.push(p)}c.push(f)}return c}function Rz(t,e,n){if(n<2)return t.getUint16(e);if(n===2)return t.getUint32(e)}function Fz(t,e,n,r){if((e===1||e===2)&&r>0)return Zh(t,n,r)}function Zh(t,e,n){return n===4?t.getUint32(e):n===8?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),$z(t,e)):0}const Dz=1718909296,Mz=1768977008,zz=1835365473,Uz=1768714083,jz=1768517222,Bz=1768842853,qz=1768973167,Hz=1668246642,yE=1165519206,Tb=1835625829,Gz=1970432288;function Xh(t,e){const{length:o,contentOffset:s}=Kz(t,e);if(o<8)return;const a=t.getUint32(e+4);if(a===Dz)return rU(t,s,o);if(a===Mz)return iU(t,e,s,o);if(a===qz)return oU(t,e,s,o);if(a===Hz)return sU(t,s,o);const c=t.getUint8(s);return a===zz?lU(t,e,s+1,o):a===Uz?Iz(t,c,s+1,o):a===jz?cU(t,e,c,s+1,o):a===Bz?dU(t,e,c,s+1,o):{type:void 0,length:o}}function Kz(t,e){const s=t.getUint32(e);return Vz(s)?{length:t.byteLength-e,contentOffset:e+4+4}:Wz(s)&&Yz(t,e)?{length:t.getUint32(e+12),contentOffset:e+4+4+8}:{length:s,contentOffset:e+4+4}}function Vz(t){return t===0}function Wz(t){return t===1}function Yz(t,e){return t.getUint32(e+8)===0}function wE(t){{const e={},n=Jz(t);return n?(e.tiffHeaderOffset=Zz(t,n),e.xmpChunks=eU(n),e.iccChunks=nU(n),e.hasAppMarkers=e.tiffHeaderOffset!==void 0||e.xmpChunks!==void 0||e.iccChunks!==void 0,e):{hasAppMarkers:!1}}}function Jz(t){let r=0;for(;r+4+4<=t.byteLength;){const i=Xh(t,r);if(i===void 0)break;if(i.type==="meta")return i;r+=i.length}}function Zz(t,e){try{const n=Xz(e).itemId,r=Cb(e,n),i=r.baseOffset+r.extents[0].extentOffset;return Qz(t,i)}catch{return}}function Xz(t){return t.subBoxes.find(e=>e.type==="iinf").itemInfos.find(e=>e.itemType===yE)}function Cb(t,e){return t.subBoxes.find(n=>n.type==="iloc").items.find(n=>n.itemId===e)}function Qz(t,e){return e+4+t.getUint32(e)}function eU(t){try{const e=tU(t).itemId,n=Cb(t,e),r=Cb(t,e).extents[0];return[{dataOffset:n.baseOffset+r.extentOffset,length:r.extentLength}]}catch{return}}function tU(t){return t.subBoxes.find(e=>e.type==="iinf").itemInfos.find(e=>e.itemType===Tb&&e.contentType==="application/rdf+xml")}function nU(t){try{const e=t.subBoxes.find(n=>n.type==="iprp").subBoxes.find(n=>n.type==="ipco").properties.find(n=>n.type==="colr").icc;if(e)return[e]}catch{}}function rU(t,e,n){return{type:"ftyp",majorBrand:yt(t,e,4),length:n}}function iU(t,e,n,r){return{type:"iprp",subBoxes:Qh(t,n,r-(n-e)),length:r}}function oU(t,e,n,r){return{type:"ipco",properties:Qh(t,n,r-(n-e)),length:r}}function sU(t,e,n){return{type:"colr",icc:aU(t,e),length:n}}function aU(t,e){const r=yt(t,e,4);if(!(r!=="prof"&&r!=="rICC"))return{offset:e+4,length:t.getUint32(e+4),chunkNumber:1,chunksTotal:1}}function lU(t,e,n,r){return{type:"meta",subBoxes:Qh(t,n+3,r-(n+3-e)),length:r}}function Qh(t,e,n){const r=[yE,Tb],i=[];let o=e;for(;o<e+n;){const s=Xh(t,o);if(s===void 0)break;s.type!==void 0&&(s.itemType===void 0||r.indexOf(s.itemType)!==-1)&&i.push(s),o+=s.length}return i}function cU(t,e,n,r,i){const{offsets:o}=uU(n,r);return{type:"iinf",itemInfos:Qh(t,o.itemInfos,i-(o.itemInfos-e)),length:i}}function uU(t,e){const r={entryCount:e+3},i={};return t===0?i.entryCount=2:i.entryCount=4,r.itemInfos=r.entryCount+i.entryCount,{offsets:r}}function dU(t,e,n,r,i){r+=3;const s={type:"infe",length:i};return(n===0||n===1)&&(s.itemId=t.getUint16(r),r+=2,s.itemProtectionIndex=t.getUint16(r),r+=2,s.itemName=Ac(t,r),r+=s.itemName.length+1),n>=2&&(n===2?(s.itemId=t.getUint16(r),r+=2):n===3&&(s.itemId=t.getUint32(r),r+=4),s.itemProtectionIndex=t.getUint16(r),r+=2,s.itemType=t.getUint32(r),r+=4,s.itemName=Ac(t,r),r+=s.itemName.length+1,s.itemType===Tb?(s.contentType=Ac(t,r),r+=s.contentType.length+1,e+i>r&&(s.contentEncoding=Ac(t,r),r+=s.contentEncoding.length+1)):s.itemType===Gz&&(s.itemUri=Ac(t,r),r+=s.itemUri.length+1)),s}const xE={isHeicFile:fU,findHeicOffsets:hU};function fU(t){if(!t)return!1;const e=["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"];try{const n=Xh(t,0);return n&&e.indexOf(n.majorBrand)!==-1}catch{return!1}}function hU(t){return wE(t)}const kE={isAvifFile:pU,findAvifOffsets:gU};function pU(t){if(!t)return!1;try{const e=Xh(t,0);return e&&e.majorBrand==="avif"}catch{return!1}}function gU(t){return wE(t)}const SE={isWebpFile:mU,findOffsets:vU};function mU(t){const n="RIFF",i="WEBP";return!!t&&yt(t,0,n.length)===n&&yt(t,8,i.length)===i}function vU(t){const r="Exif\0\0";let o=12,s=!1,a,c,u,d;for(;o+8<t.byteLength;){const f=yt(t,o,4),h=t.getUint32(o+4,!0);f==="EXIF"?(s=!0,yt(t,o+8,r.length)===r?a=o+8+r.length:a=o+8):f==="XMP "?(s=!0,c=[{dataOffset:o+8,length:h}]):f==="ICCP"?(s=!0,u=[{offset:o+8,length:h,chunkNumber:1,chunksTotal:1}]):f==="VP8X"&&(s=!0,d=o+8),o+=8+(h%2===0?h:h+1)}return{hasAppMarkers:s,tiffHeaderOffset:a,xmpChunks:c,iccChunks:u,vp8xChunkOffset:d}}const EE={isGifFile:yU,findOffsets:wU},bU=6,_U=["GIF87a","GIF89a"];function yU(t){return!!t&&_U.includes(yt(t,0,bU))}function wU(){return{gifHeaderOffset:0}}const TE={isXMLFile:xU,findOffsets:kU},CE=0,AE="<?xpacket begin";function xU(t){return!!t&&yt(t,CE,AE.length)===AE}function kU(t){const e=[];return e.push({dataOffset:CE,length:t.byteLength}),{xmpChunks:e}}const SU={parseAppMarkers:EU};function EU(t,e){if(eE.isTiffFile(t))return Ys(eE.findTiffOffsets(),"tiff","TIFF");if(tE.isJpegFile(t))return Ys(tE.findJpegOffsets(t),"jpeg","JPEG");if(vE.isPngFile(t))return Ys(vE.findPngOffsets(t,e),"png","PNG");if(xE.isHeicFile(t))return Ys(xE.findHeicOffsets(t),"heic","HEIC");if(kE.isAvifFile(t))return Ys(kE.findAvifOffsets(t),"avif","AVIF");if(SE.isWebpFile(t))return Ys(SE.findOffsets(t),"webp","WebP");if(EE.isGifFile(t))return Ys(EE.findOffsets(t),"gif","GIF");if(TE.isXMLFile(t))return Ys(TE.findOffsets(t),"xml","XML");throw new Error("Invalid image format")}function Ys(t,e,n){return kt({},t,{fileType:{value:e,description:n}})}const mt={ApertureValue:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2),ColorSpace(t){return t===1?"sRGB":t===65535?"Uncalibrated":"Unknown"},ComponentsConfiguration(t){return t.map(e=>{if(e===49)return"Y";if(e===50)return"Cb";if(e===51)return"Cr";if(e===52)return"R";if(e===53)return"G";if(e===54)return"B"}).join("")},Contrast(t){return t===0?"Normal":t===1?"Soft":t===2?"Hard":"Unknown"},CustomRendered(t){return t===0?"Normal process":t===1?"Custom process":"Unknown"},ExposureMode(t){return t===0?"Auto exposure":t===1?"Manual exposure":t===2?"Auto bracket":"Unknown"},ExposureProgram(t){return t===0?"Undefined":t===1?"Manual":t===2?"Normal program":t===3?"Aperture priority":t===4?"Shutter priority":t===5?"Creative program":t===6?"Action program":t===7?"Portrait mode":t===8?"Landscape mode":t===9?"Bulb":"Unknown"},ExposureTime(t){if(t[0]/t[1]>.25){const e=t[0]/t[1];return Number.isInteger(e)?""+e:e.toFixed(1)}return t[0]!==0?`1/${Math.round(t[1]/t[0])}`:`0/${t[1]}`},FNumber:t=>`f/${Number(t[0]/t[1]).toFixed(1)}`,FocalLength:t=>t[0]/t[1]+" mm",FocalPlaneResolutionUnit(t){return t===2?"inches":t===3?"centimeters":t===4?"millimeters":"Unknown"},LightSource:t=>t===1?"Daylight":t===2?"Fluorescent":t===3?"Tungsten (incandescent light)":t===4?"Flash":t===9?"Fine weather":t===10?"Cloudy weather":t===11?"Shade":t===12?"Daylight fluorescent (D 5700 – 7100K)":t===13?"Day white fluorescent (N 4600 – 5400K)":t===14?"Cool white fluorescent (W 3900 – 4500K)":t===15?"White fluorescent (WW 3200 – 3700K)":t===17?"Standard light A":t===18?"Standard light B":t===19?"Standard light C":t===20?"D55":t===21?"D65":t===22?"D75":t===23?"D50":t===24?"ISO studio tungsten":t===255?"Other light source":"Unknown",MeteringMode(t){return t===1?"Average":t===2?"CenterWeightedAverage":t===3?"Spot":t===4?"MultiSpot":t===5?"Pattern":t===6?"Partial":t===255?"Other":"Unknown"},ResolutionUnit(t){return t===2?"inches":t===3?"centimeters":"Unknown"},Saturation(t){return t===0?"Normal":t===1?"Low saturation":t===2?"High saturation":"Unknown"},FocalLengthIn35mmFilm(t){return t===0?"Unknown":t+" mm"},SceneCaptureType(t){return t===0?"Standard":t===1?"Landscape":t===2?"Portrait":t===3?"Night scene":"Unknown"},Sharpness(t){return t===0?"Normal":t===1?"Soft":t===2?"Hard":"Unknown"},ShutterSpeedValue(t){const e=Math.pow(2,t[0]/t[1]);return e<=1?`${Math.round(1/e)}`:`1/${Math.round(e)}`},WhiteBalance(t){return t===0?"Auto white balance":t===1?"Manual white balance":"Unknown"},XResolution:t=>""+Math.round(t[0]/t[1]),YResolution:t=>""+Math.round(t[0]/t[1])},$E={11:"ProcessingSoftware",254:{name:"SubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"})[t]||"Unknown"},255:{name:"OldSubfileType",description:t=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"})[t]||"Unknown"},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:t=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"})[t]||"Unknown"},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:t=>({1:"Normal",2:"Reversed"})[t]||"Unknown"},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:t=>t===1?"top-left":t===2?"top-right":t===3?"bottom-right":t===4?"bottom-left":t===5?"left-top":t===6?"right-top":t===7?"right-bottom":t===8?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:mt.XResolution},283:{name:"YResolution",description:mt.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:t=>""+Math.round(t[0]/t[1])},287:{name:"YPosition",description:t=>""+Math.round(t[0]/t[1])},290:{name:"GrayResponseUnit",description:t=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"})[t]||"Unknown"},296:{name:"ResolutionUnit",description:mt.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:t=>t.map(e=>`${e[0]}/${e[1]}`).join(", ")},319:{name:"PrimaryChromaticities",description:t=>t.map(e=>`${e[0]}/${e[1]}`).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:t=>({1:"CMYK",2:"Not CMYK"})[t]||"Unknown"},337:"TargetPrinter",338:{name:"ExtraSamples",description:t=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"})[t]||"Unknown"},339:{name:"SampleFormat",description:t=>{const e={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(t)?t.map(n=>e[n]||"Unknown").join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:t=>t.map(e=>""+e[0]/e[1]).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:t=>t===1?"centered":t===2?"co-sited":"undefined "+t},532:{name:"ReferenceBlackWhite",description:t=>t.map(e=>""+e[0]/e[1]).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:t=>t.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:ud},40092:{name:"XPComment",description:ud},40093:{name:"XPAuthor",description:ud},40094:{name:"XPKeywords",description:ud},40095:{name:"XPSubject",description:ud},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:t=>({0:"Unsafe",1:"Safe"})[t]||"Unknown"},50778:{name:"CalibrationIlluminant1",description:mt.LightSource},50779:{name:"CalibrationIlluminant2",description:mt.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:t=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"})[t]||"Unknown"},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:t=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"})[t]||"Unknown"},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:t=>({0:"Linear",1:"sRGB"})[t]||"Unknown"},51108:{name:"ProfileLookTableEncoding",description:t=>({0:"Linear",1:"sRGB"})[t]||"Unknown"},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:t=>({0:"Auto",1:"None"})[t]||"Unknown"},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function ud(t){return new TextDecoder("utf-16").decode(new Uint8Array(t)).replace(/\u0000+$/,"")}const TU={33434:{name:"ExposureTime",description:mt.ExposureTime},33437:{name:"FNumber",description:mt.FNumber},34850:{name:"ExposureProgram",description:mt.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:t=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"})[t]||"Unknown"},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:t=>Zn(t)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:mt.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:mt.ShutterSpeedValue},37378:{name:"ApertureValue",description:mt.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:t=>Math.pow(Math.sqrt(2),t[0]/t[1]).toFixed(2)},37382:{name:"SubjectDistance",description:t=>t[0]/t[1]+" m"},37383:{name:"MeteringMode",description:mt.MeteringMode},37384:{name:"LightSource",description:mt.LightSource},37385:{name:"Flash",description:t=>t===0?"Flash did not fire":t===1?"Flash fired":t===5?"Strobe return light not detected":t===7?"Strobe return light detected":t===9?"Flash fired, compulsory flash mode":t===13?"Flash fired, compulsory flash mode, return light not detected":t===15?"Flash fired, compulsory flash mode, return light detected":t===16?"Flash did not fire, compulsory flash mode":t===24?"Flash did not fire, auto mode":t===25?"Flash fired, auto mode":t===29?"Flash fired, auto mode, return light not detected":t===31?"Flash fired, auto mode, return light detected":t===32?"No flash function":t===65?"Flash fired, red-eye reduction mode":t===69?"Flash fired, red-eye reduction mode, return light not detected":t===71?"Flash fired, red-eye reduction mode, return light detected":t===73?"Flash fired, compulsory flash mode, red-eye reduction mode":t===77?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":t===79?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":t===89?"Flash fired, auto mode, red-eye reduction mode":t===93?"Flash fired, auto mode, return light not detected, red-eye reduction mode":t===95?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:mt.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:t=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"})[t]||"Unknown"},37395:"ImageHistory",37396:{name:"SubjectArea",description:t=>t.length===2?`Location; X: ${t[0]}, Y: ${t[1]}`:t.length===3?`Circle; X: ${t[0]}, Y: ${t[1]}, diameter: ${t[2]}`:t.length===4?`Rectangle; X: ${t[0]}, Y: ${t[1]}, width: ${t[2]}, height: ${t[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:bb},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:t=>t[0]/t[1]+" °C"},37889:{name:"Humidity",description:t=>t[0]/t[1]+" %"},37890:{name:"Pressure",description:t=>t[0]/t[1]+" hPa"},37891:{name:"WaterDepth",description:t=>t[0]/t[1]+" m"},37892:{name:"Acceleration",description:t=>t[0]/t[1]+" mGal"},37893:{name:"CameraElevationAngle",description:t=>t[0]/t[1]+" °"},40960:{name:"FlashpixVersion",description:t=>t.map(e=>String.fromCharCode(e)).join("")},40961:{name:"ColorSpace",description:mt.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:mt.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([t,e])=>`X: ${t}, Y: ${e}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:t=>t===1?"Undefined":t===2?"One-chip color area sensor":t===3?"Two-chip color area sensor":t===4?"Three-chip color area sensor":t===5?"Color sequential area sensor":t===7?"Trilinear sensor":t===8?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:t=>t===3?"DSC":"Unknown"},41729:{name:"SceneType",description:t=>t===1?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:mt.CustomRendered},41986:{name:"ExposureMode",description:mt.ExposureMode},41987:{name:"WhiteBalance",description:mt.WhiteBalance},41988:{name:"DigitalZoomRatio",description:t=>t[0]===0?"Digital zoom was not used":""+t[0]/t[1]},41989:{name:"FocalLengthIn35mmFilm",description:mt.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:mt.SceneCaptureType},41991:{name:"GainControl",description:t=>t===0?"None":t===1?"Low gain up":t===2?"High gain up":t===3?"Low gain down":t===4?"High gain down":"Unknown"},41992:{name:"Contrast",description:mt.Contrast},41993:{name:"Saturation",description:mt.Saturation},41994:{name:"Sharpness",description:mt.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:t=>t===1?"Macro":t===2?"Close view":t===3?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:t=>{const e=parseFloat((t[0][0]/t[0][1]).toFixed(5)),n=parseFloat((t[1][0]/t[1][1]).toFixed(5)),r=`${e}-${n} mm`;if(t[3][1]===0)return`${r} f/?`;const i=1/(t[2][1]/t[2][1]/(t[3][0]/t[3][1]));return`${r} f/${parseFloat(i.toFixed(5))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:t=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"})[t]||"Unknown"},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},CU={0:{name:"GPSVersionID",description:t=>t[0]===2&&t[1]===2&&t[2]===0&&t[3]===0?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:t=>{const e=t.join("");return e==="N"?"North latitude":e==="S"?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:Wh},3:{name:"GPSLongitudeRef",description:t=>{const e=t.join("");return e==="E"?"East longitude":e==="W"?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:Wh},5:{name:"GPSAltitudeRef",description:t=>t===0?"Sea level":t===1?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:t=>t[0]/t[1]+" m"},7:{name:"GPSTimeStamp",description:t=>t.map(([e,n])=>{const r=e/n;return/^\d(\.|$)/.test(`${r}`)?`0${r}`:r}).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:t=>{const e=t.join("");return e==="A"?"Measurement in progress":e==="V"?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:t=>{const e=t.join("");return e==="2"?"2-dimensional measurement":e==="3"?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:t=>{const e=t.join("");return e==="K"?"Kilometers per hour":e==="M"?"Miles per hour":e==="N"?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:t=>{const e=t.join("");return e==="N"?"North latitude":e==="S"?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:t=>{const e=t.join("");return e==="E"?"East longitude":e==="W"?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:t=>t[0][0]/t[0][1]+t[1][0]/t[1][1]/60+t[2][0]/t[2][1]/3600},23:{name:"GPSDestBearingRef",description:t=>{const e=t.join("");return e==="T"?"True direction":e==="M"?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:t=>{const e=t.join("");return e==="K"?"Kilometers":e==="M"?"Miles":e==="N"?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:bb},28:{name:"GPSAreaInformation",description:bb},29:"GPSDateStamp",30:{name:"GPSDifferential",description:t=>t===0?"Measurement without differential correction":t===1?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},AU={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:t=>Zn(t)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},$U={45056:{name:"MPFVersion",description:t=>Zn(t)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},IU={4:{name:"ShotInfo",description:t=>t}},PU={0:{name:"PentaxVersion",description:t=>t.join(".")},5:"PentaxModelID",555:"LevelInfo"},IE=kt({},$E,TU),Ab="0th",PE="1st",NE="exif",LE="gps",OE="interoperability",RE="mpf",FE="canon",$b="pentax",Js={[Ab]:IE,[PE]:$E,[NE]:IE,[LE]:CU,[OE]:AU,[RE]:$U,[FE]:IU,[$b]:PU},DE={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},Ib={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},We={getAsciiValue:NU,getByteAt:ME,getAsciiAt:LU,getShortAt:OU,getLongAt:ep,getRationalAt:RU,getUndefinedAt:FU,getSlongAt:Pb,getSrationalAt:DU,getIfdPointerAt:MU,typeSizes:DE,tagTypes:Ib,getTypeSize:zU};function NU(t){return t.map(e=>String.fromCharCode(e))}function ME(t,e){return t.getUint8(e)}function LU(t,e){return t.getUint8(e)}function OU(t,e,n){return t.getUint16(e,n===Ao.LITTLE_ENDIAN)}function ep(t,e,n){return t.getUint32(e,n===Ao.LITTLE_ENDIAN)}function RU(t,e,n){return[ep(t,e,n),ep(t,e+4,n)]}function FU(t,e){return ME(t,e)}function Pb(t,e,n){return t.getInt32(e,n===Ao.LITTLE_ENDIAN)}function DU(t,e,n){return[Pb(t,e,n),Pb(t,e+4,n)]}function MU(t,e,n){return ep(t,e,n)}function zU(t){if(Ib[t]===void 0)throw new Error("No such type found.");return DE[Ib[t]]}const UU={1:We.getByteAt,2:We.getAsciiAt,3:We.getShortAt,4:We.getLongAt,5:We.getRationalAt,7:We.getUndefinedAt,9:We.getSlongAt,10:We.getSrationalAt,13:We.getIfdPointerAt};function zE(t,e,n){return e+We.getLongAt(t,e+4,n)}function Zs(t,e,n,r,i,o){const s=We.getTypeSize("SHORT"),a=12,c={},u=jU(t,r,i);r+=s;for(let d=0;d<u&&!(r+a>t.byteLength);d++){const f=BU(t,e,n,r,i,o);f!==void 0&&(c[f.name]={id:f.id,value:f.value,description:f.description},(f.name==="MakerNote"||e===$b&&f.name==="LevelInfo")&&(c[f.name].__offset=f.__offset)),r+=a}if(r<t.byteLength-We.getTypeSize("LONG")){const d=We.getLongAt(t,r,i);d!==0&&e===Ab&&(c.Thumbnail=Zs(t,PE,n,n+d,i,o))}return c}function jU(t,e,n){return e+We.getTypeSize("SHORT")<=t.byteLength?We.getShortAt(t,e,n):0}function BU(t,e,n,r,i,o){const a=We.getTypeSize("SHORT"),c=a+We.getTypeSize("SHORT"),u=c+We.getTypeSize("LONG"),d=We.getShortAt(t,r,i),f=We.getShortAt(t,r+a,i),h=We.getLongAt(t,r+c,i);let p,g;if(We.typeSizes[f]===void 0||!o&&Js[e][d]===void 0)return;if(qU(f,h))g=r+u,p=UE(t,g,f,h,i);else if(g=We.getLongAt(t,r+u,i),HU(t,n,g,f,h)){const b=d===33723;p=UE(t,n+g,f,h,i,b)}else p="<faulty value>";f===We.tagTypes.ASCII&&(p=GU(p),p=KU(p));let m=`undefined-${d}`,v=p;if(Js[e][d]!==void 0)if(Js[e][d].name!==void 0&&Js[e][d].description!==void 0){m=Js[e][d].name;try{v=Js[e][d].description(p)}catch{v=jE(p)}}else f===We.tagTypes.RATIONAL||f===We.tagTypes.SRATIONAL?(m=Js[e][d],v=""+p[0]/p[1]):(m=Js[e][d],v=jE(p));return{id:d,name:m,value:p,description:v,__offset:g}}function qU(t,e){return We.typeSizes[t]*e<=We.getTypeSize("LONG")}function UE(t,e,n,r,i,o=!1){let s=[];o&&(r=r*We.typeSizes[n],n=We.tagTypes.BYTE);for(let a=0;a<r;a++)s.push(UU[n](t,e,i)),e+=We.typeSizes[n];return n===We.tagTypes.ASCII?s=We.getAsciiValue(s):s.length===1&&(s=s[0]),s}function HU(t,e,n,r,i){return e+n+We.typeSizes[r]*i<=t.byteLength}function GU(t){const e=[];let n=0;for(let r=0;r<t.length;r++){if(t[r]==="\0"){n++;continue}e[n]===void 0&&(e[n]=""),e[n]+=t[r]}return e}function KU(t){try{return t.map(e=>decodeURIComponent(escape(e)))}catch{return t}}function jE(t){return t instanceof Array?t.join(", "):t}const BE="Exif IFD Pointer",qE="GPS Info IFD Pointer",HE="Interoperability IFD Pointer",GE={read:VU};function VU(t,e,n){const r=Ao.getByteOrder(t,e);let i=WU(t,e,r,n);return i=YU(i,t,e,r,n),i=JU(i,t,e,r,n),i=ZU(i,t,e,r,n),{tags:i,byteOrder:r}}function WU(t,e,n,r){return Zs(t,Ab,e,zE(t,e,n),n,r)}function YU(t,e,n,r,i){return t[BE]!==void 0?kt(t,Zs(e,NE,n,n+t[BE].value,r,i)):t}function JU(t,e,n,r,i){return t[qE]!==void 0?kt(t,Zs(e,LE,n,n+t[qE].value,r,i)):t}function ZU(t,e,n,r,i){return t[HE]!==void 0?kt(t,Zs(e,OE,n,n+t[HE].value,r,i)):t}const XU={read:QU},Ic=16;function QU(t,e,n){const r=Ao.getByteOrder(t,e),i=Zs(t,RE,e,zE(t,e,r),r,n);return ej(t,e,i,r)}function ej(t,e,n,r){if(!n.MPEntry)return n;const i=[];for(let o=0;o<Math.ceil(n.MPEntry.value.length/Ic);o++){i[o]={};const s=dd(n.MPEntry.value,o*Ic,We.getTypeSize("LONG"),r);i[o].ImageFlags=tj(s),i[o].ImageFormat=nj(s),i[o].ImageType=rj(s);const a=dd(n.MPEntry.value,o*Ic+4,We.getTypeSize("LONG"),r);i[o].ImageSize={value:a,description:""+a};const c=ij(o,n.MPEntry,r,e);i[o].ImageOffset={value:c,description:""+c};const u=dd(n.MPEntry.value,o*Ic+12,We.getTypeSize("SHORT"),r);i[o].DependentImage1EntryNumber={value:u,description:""+u};const d=dd(n.MPEntry.value,o*Ic+14,We.getTypeSize("SHORT"),r);i[o].DependentImage2EntryNumber={value:d,description:""+d},i[o].image=t.buffer.slice(c,c+a),WS(i[o],"base64",function(){return YS(this.image)})}return n.Images=i,n}function dd(t,e,n,r){if(r===Ao.LITTLE_ENDIAN){let o=0;for(let s=0;s<n;s++)o+=t[e+s]<<8*s;return o}let i=0;for(let o=0;o<n;o++)i+=t[e+o]<<8*(n-1-o);return i}function tj(t){const e=[t>>31&1,t>>30&1,t>>29&1],n=[];return e[0]&&n.push("Dependent Parent Image"),e[1]&&n.push("Dependent Child Image"),e[2]&&n.push("Representative Image"),{value:e,description:n.join(", ")||"None"}}function nj(t){const e=t>>24&7;return{value:e,description:e===0?"JPEG":"Unknown"}}function rj(t){const e=t&16777215;return{value:e,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[e]||"Unknown"}}function ij(t,e,n,r){return oj(t)?0:dd(e.value,t*Ic+8,We.getTypeSize("LONG"),n)+r}function oj(t){return t===0}const sj={read:aj};function aj(t,e){const n=lj(t,e),r=fj(t,e,n);return{"Bits Per Sample":cj(t,e,n),"Image Height":uj(t,e,n),"Image Width":dj(t,e,n),"Color Components":r,Subsampling:r&&hj(t,e,r.value,n)}}function lj(t,e){return We.getShortAt(t,e)}function cj(t,e,n){if(3>n)return;const o=We.getByteAt(t,e+2);return{value:o,description:""+o}}function uj(t,e,n){if(5>n)return;const o=We.getShortAt(t,e+3);return{value:o,description:`${o}px`}}function dj(t,e,n){if(7>n)return;const o=We.getShortAt(t,e+5);return{value:o,description:`${o}px`}}function fj(t,e,n){if(8>n)return;const o=We.getByteAt(t,e+7);return{value:o,description:""+o}}function hj(t,e,n,r){if(8+3*n>r)return;const s=[];for(let a=0;a<n;a++){const c=e+8+a*3;s.push([We.getByteAt(t,c),We.getByteAt(t,c+1),We.getByteAt(t,c+2)])}return{value:s,description:s.length>1?pj(s)+gj(s):""}}function pj(t){const e={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return t.map(n=>e[n[0]]).join("")}function gj(t){const e={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return t.length===0||t[0][1]===void 0||e[t[0][1]]===void 0?"":e[t[0][1]]}const mj={read:vj};function vj(t,e){const n=bj(t,e),r=Sj(t,e,n),i=Ej(t,e,n),o={"JFIF Version":_j(t,e,n),"Resolution Unit":yj(t,e,n),XResolution:xj(t,e,n),YResolution:kj(t,e,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(r!==void 0&&i!==void 0){const s=Tj(t,e,3*r.value*i.value,n);s&&(o["JFIF Thumbnail"]=s)}for(const s in o)o[s]===void 0&&delete o[s];return o}function bj(t,e){return We.getShortAt(t,e)}function _j(t,e,n){if(9>n)return;const o=We.getByteAt(t,e+7),s=We.getByteAt(t,e+7+1);return{value:o*256+s,description:o+"."+s}}function yj(t,e,n){if(10>n)return;const o=We.getByteAt(t,e+9);return{value:o,description:wj(o)}}function wj(t){return t===0?"None":t===1?"inches":t===2?"cm":"Unknown"}function xj(t,e,n){if(12>n)return;const o=We.getShortAt(t,e+10);return{value:o,description:""+o}}function kj(t,e,n){if(14>n)return;const o=We.getShortAt(t,e+12);return{value:o,description:""+o}}function Sj(t,e,n){if(15>n)return;const o=We.getByteAt(t,e+14);return{value:o,description:`${o}px`}}function Ej(t,e,n){if(16>n)return;const o=We.getByteAt(t,e+15);return{value:o,description:`${o}px`}}function Tj(t,e,n,r){return n===0||16+n>r?void 0:{value:t.buffer.slice(e+16,e+16+n),description:"<24-bit RGB pixel data>"}}const Xs={iptc:{256:{name:"Model Version",description:t=>((t[0]<<8)+t[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:t=>((t[0]<<8)+t[1]).toString()},278:{name:"File Format Version",description:t=>((t[0]<<8)+t[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:Nb},336:{name:"Time Sent",description:Lb},346:{name:"Coded Character Set",description:KE,encoding_name:KE},356:"UNO",376:{name:"ARM Identifier",description:t=>((t[0]<<8)+t[1]).toString()},378:{name:"ARM Version",description:t=>((t[0]<<8)+t[1]).toString()},512:{name:"Record Version",description:t=>((t[0]<<8)+t[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:t=>Zn(t)==="01"?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:t=>{const e=Zn(t).split(":");return e[2]+(e[3]?"/"+e[3]:"")+(e[4]?"/"+e[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:t=>{const e=Zn(t);return e==="01"?"Object Kill":e==="02"?"Object Replace":e==="03"?"Object Append":e==="04"?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:Nb},572:{name:"Time Created",description:Lb},574:{name:"Digital Creation Date",description:Nb},575:{name:"Digital Creation Time",description:Lb},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:t=>{const e=Zn(t);return e==="a"?"morning":e==="p"?"evening":e==="b"?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:t=>t},642:"Image Type",643:{name:"Image Orientation",description:t=>{const e=Zn(t);return e==="P"?"Portrait":e==="L"?"Landscape":e==="S"?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:t=>{const e=Zn(t),n=e.charAt(0),r=e.charAt(1);let i="";return n==="1"?i+="Mono":n==="2"&&(i+="Stereo"),r==="A"?i+=", actuality":r==="C"?i+=", question and answer session":r==="M"?i+=", music, transmitted by itself":r==="Q"?i+=", response to a question":r==="R"?i+=", raw sound":r==="S"?i+=", scener":r==="V"?i+=", voicer":r==="W"&&(i+=", wrap"),i!==""?i:e}},663:{name:"Audio Sampling Rate",description:t=>parseInt(Zn(t),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:t=>{const e=parseInt(Zn(t),10);return e+(e===1?" bit":" bits")}},665:{name:"Audio Duration",description:t=>{const e=Zn(t);return e.length>=6?e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2):e}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:t=>t.length===2?"ObjectData Preview File Format":"Record 2 destination",description:t=>{if(t.length===2){const e=(t[0]<<8)+t[1];return e===0?"No ObjectData":e===1?"IPTC-NAA Digital Newsphoto Parameter Record":e===2?"IPTC7901 Recommended Message Format":e===3?"Tagged Image File Format (Adobe/Aldus Image data)":e===4?"Illustrator (Adobe Graphics data)":e===5?"AppleSingle (Apple Computer Inc)":e===6?"NAA 89-3 (ANPA 1312)":e===7?"MacBinary II":e===8?"IPTC Unstructured Character Oriented File Format (UCOFF)":e===9?"United Press International ANPA 1312 variant":e===10?"United Press International Down-Load Message":e===11?"JPEG File Interchange (JFIF)":e===12?"Photo-CD Image-Pac (Eastman Kodak)":e===13?"Microsoft Bit Mapped Graphics File [*.BMP]":e===14?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":e===15?"Audio plus Moving Video [*.AVI] (Microsoft)":e===16?"PC DOS/Windows Executable Files [*.COM][*.EXE]":e===17?"Compressed Binary File [*.ZIP] (PKWare Inc)":e===18?"Audio Interchange File Format AIFF (Apple Computer Inc)":e===19?"RIFF Wave (Microsoft Corporation)":e===20?"Freehand (Macromedia/Aldus)":e===21?'Hypertext Markup Language "HTML" (The Internet Society)':e===22?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":e===23?"MPEG 2 Audio Layer 3, ISO/IEC":e===24?"Portable Document File (*.PDF) Adobe":e===25?"News Industry Text Format (NITF)":e===26?"Tape Archive (*.TAR)":e===27?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":e===28?"Ritzaus Bureau NITF version (RBNITF DTD)":e===29?"Corel Draw [*.CDR]":`Unknown format ${e}`}return Zn(t)}},713:{name:"ObjectData Preview File Format Version",description:(t,e)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},r=Zn(t);if(e["ObjectData Preview File Format"]){const i=Zn(e["ObjectData Preview File Format"].value);if(n[i]&&n[i][r])return n[i][r]}return r}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:t=>t[0].toString()},1812:{name:"Max Subfile Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1882:{name:"ObjectData Size Announced",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}},1887:{name:"Maximum ObjectData Size",description:t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<8)+t[n];return e.toString()}}}};function Nb(t){const e=Zn(t);return e.length>=8?e.substr(0,4)+"-"+e.substr(4,2)+"-"+e.substr(6,2):e}function Lb(t){const e=Zn(t);let n=e;return e.length>=6&&(n=e.substr(0,2)+":"+e.substr(2,2)+":"+e.substr(4,2),e.length===11&&(n+=e.substr(6,1)+e.substr(7,2)+":"+e.substr(9,2))),n}function KE(t){const e=Zn(t);return e==="\x1B%G"?"UTF-8":e==="\x1B%5"?"Windows-1252":e==="\x1B%/G"?"UTF-8 Level 1":e==="\x1B%/H"?"UTF-8 Level 2":e==="\x1B%/I"?"UTF-8 Level 3":e==="\x1B/A"?"ISO-8859-1":e==="\x1B/B"?"ISO-8859-2":e==="\x1B/C"?"ISO-8859-3":e==="\x1B/D"?"ISO-8859-4":e==="\x1B/@"?"ISO-8859-5":e==="\x1B/G"?"ISO-8859-6":e==="\x1B/F"?"ISO-8859-7":e==="\x1B/H"?"ISO-8859-8":"Unknown"}const Cj={get:Aj};function Aj(){if(typeof TextDecoder<"u")return TextDecoder}const VE={decode:$j,TAG_HEADER_SIZE:5};function $j(t,e){const n=Cj.get();if(typeof n<"u"&&t!==void 0)try{return new n(t).decode(e instanceof DataView?e.buffer:Uint8Array.from(e))}catch{}const r=e.map(i=>String.fromCharCode(i)).join("");return Ij(r)}function Ij(t){try{return decodeURIComponent(escape(t))}catch{return t}}const Pj=943868237,fd=4,tp=2,Nj=1,Lj=2,WE=4,Oj=fd+tp+Lj+WE,Rj=1028,YE=5,Ob={read:Fj};function Fj(t,e,n){try{if(Array.isArray(t))return JE(new DataView(Uint8Array.from(t).buffer),{size:t.length},0,n);const{naaBlock:r,dataOffset:i}=Dj(t,e);return JE(t,r,i,n)}catch{return{}}}function Dj(t,e){for(;e+Oj<=t.byteLength;){const n=Mj(t,e);if(zj(n))return{naaBlock:n,dataOffset:e+n.headerSize};e+=n.headerSize+n.size+Uj(n)}throw new Error("No IPTC NAA resource block.")}function Mj(t,e){if(t.getUint32(e,!1)!==Pj)throw new Error("Not an IPTC resource block.");const n=t.getUint8(e+fd+tp),r=(n%2===0?n+1:n)+Nj;return{headerSize:fd+tp+r+WE,type:t.getUint16(e+fd),size:t.getUint32(e+fd+tp+r)}}function zj(t){return t.type===Rj}function Uj(t){return t.size%2!==0?1:0}function JE(t,e,n,r){const i={};let o;const s=n+e.size;for(;n<s&&n<t.byteLength;){const{tag:a,tagSize:c}=jj(t,n,i,o,r);if(a===null)break;a&&("encoding"in a&&(o=a.encoding),i[a.name]===void 0||a.repeatable===void 0?i[a.name]={id:a.id,value:a.value,description:a.description}:(i[a.name]instanceof Array||(i[a.name]=[{id:i[a.name].id,value:i[a.name].value,description:i[a.name].description}]),i[a.name].push({id:a.id,value:a.value,description:a.description}))),n+=YE+c}return i}function jj(t,e,n,r,i){if(Bj(t,e))return{tag:null,tagSize:0};const a=t.getUint16(e+1),c=t.getUint16(e+3);if(!i&&!Xs.iptc[a])return{tag:void 0,tagSize:c};const u=qj(t,e+YE,c),d={id:a,name:Hj(Xs.iptc[a],a,u),value:u,description:Vj(Xs.iptc[a],u,n,r)};return Jj(a)&&(d.repeatable=!0),Zj(a)&&(d.encoding=Xs.iptc[a].encoding_name(u)),{tag:d,tagSize:c}}function Bj(t,e){return t.getUint8(e)!==28}function qj(t,e,n){const r=[];for(let i=0;i<n;i++)r.push(t.getUint8(e+i));return r}function Hj(t,e,n){return t?Gj(t)?t:Kj(t)?t.name(n):t.name:`undefined-${e}`}function Gj(t){return typeof t=="string"}function Kj(t){return typeof t.name=="function"}function Vj(t,e,n,r){if(Yj(t))try{return t.description(e,n)}catch{}return Wj(t,e)?VE.decode(r,e):e}function Wj(t,e){return t&&e instanceof Array}function Yj(t){return t&&t.description!==void 0}function Jj(t){return Xs.iptc[t]&&Xs.iptc[t].repeatable}function Zj(t){return Xs.iptc[t]&&Xs.iptc[t].encoding_name!==void 0}const np={"tiff:Orientation"(t){return t==="1"?"Horizontal (normal)":t==="2"?"Mirror horizontal":t==="3"?"Rotate 180":t==="4"?"Mirror vertical":t==="5"?"Mirror horizontal and rotate 270 CW":t==="6"?"Rotate 90 CW":t==="7"?"Mirror horizontal and rotate 90 CW":t==="8"?"Rotate 270 CW":t},"tiff:ResolutionUnit":t=>mt.ResolutionUnit(parseInt(t,10)),"tiff:XResolution":t=>Pc(mt.XResolution,t),"tiff:YResolution":t=>Pc(mt.YResolution,t),"exif:ApertureValue":t=>Pc(mt.ApertureValue,t),"exif:GPSLatitude":XE,"exif:GPSLongitude":XE,"exif:FNumber":t=>Pc(mt.FNumber,t),"exif:FocalLength":t=>Pc(mt.FocalLength,t),"exif:FocalPlaneResolutionUnit":t=>mt.FocalPlaneResolutionUnit(parseInt(t,10)),"exif:ColorSpace":t=>mt.ColorSpace(Xj(t)),"exif:ComponentsConfiguration"(t,e){if(/^\d, \d, \d, \d$/.test(e)){const n=e.split(", ").map(r=>r.charCodeAt(0));return mt.ComponentsConfiguration(n)}return e},"exif:Contrast":t=>mt.Contrast(parseInt(t,10)),"exif:CustomRendered":t=>mt.CustomRendered(parseInt(t,10)),"exif:ExposureMode":t=>mt.ExposureMode(parseInt(t,10)),"exif:ExposureProgram":t=>mt.ExposureProgram(parseInt(t,10)),"exif:ExposureTime"(t){return ZE(t)?mt.ExposureTime(t.split("/").map(e=>parseInt(e,10))):t},"exif:MeteringMode":t=>mt.MeteringMode(parseInt(t,10)),"exif:Saturation":t=>mt.Saturation(parseInt(t,10)),"exif:SceneCaptureType":t=>mt.SceneCaptureType(parseInt(t,10)),"exif:Sharpness":t=>mt.Sharpness(parseInt(t,10)),"exif:ShutterSpeedValue":t=>Pc(mt.ShutterSpeedValue,t),"exif:WhiteBalance":t=>mt.WhiteBalance(parseInt(t,10))};function Pc(t,e){return ZE(e)?t(e.split("/")):e}function Xj(t){return t.substring(0,2)==="0x"?parseInt(t.substring(2),16):parseInt(t,10)}function ZE(t){return/^-?\d+\/-?\d+$/.test(t)}function XE(t){const[e,n]=t.split(",");if(e!==void 0&&n!==void 0){const r=parseFloat(e),i=parseFloat(n),o=n.charAt(n.length-1);if(!Number.isNaN(r)&&!Number.isNaN(i))return""+(r+i/60)+o}return t}const Qj={get:eB};function eB(t){if(t)return t;if(typeof DOMParser<"u")return new DOMParser;try{const{DOMParser:e,onErrorStopParsing:n}=__non_webpack_require__("@xmldom/xmldom");return new e({onError:n})}catch{return}}function tB(t){const e=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd",/Namespace prefix .+ is not defined/];for(let n=0;n<e.length;n++)if(new RegExp(e[n]).test(t.message))return!0;return!1}function nB(t){const e=t.match(/<([A-Za-z_][A-Za-z0-9._-]*)([^>]*)>/);if(!e)return t;const n=e[1],r=rB(t),o=iB(t).filter(a=>r.indexOf(a)===-1);if(o.length===0)return t;const s=sB(o);return aB(t,n,s)}function rB(t){const e=[],n=/xmlns:([\w-]+)=["'][^"']+["']/g;let r;for(;(r=n.exec(t))!==null;)e.indexOf(r[1])===-1&&e.push(r[1]);return e}function iB(t){const e=[],n=/\b([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*\b/g;let r;for(;(r=n.exec(t))!==null;){const i=r[1];i==="xmlns"||i==="xml"||e.indexOf(i)===-1&&e.push(i)}return e}const oB={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};function sB(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=oB[r]||"http://fallback.namespace/"+r;e.push(" xmlns:"+r+'="'+i+'"')}return e.join("")}function aB(t,e,n){const r=new RegExp("<"+e+"([^>]*)>");return t.replace(r,"<"+e+"$1"+n+">")}const QE={read:cB};class lB extends Error{constructor(e){super(e),this.name="ParseError"}}function cB(t,e,n){const r={};if(typeof t=="string")return rp(r,t,n),r;const[i,o]=uB(t,e),s=rp(r,i,n);if(o){const a=rp(r,o,n);!s&&!a&&(delete r._raw,rp(r,Rb(t,e),n))}return r}function uB(t,e){if(e.length===0)return[];const n=[Rb(t,e.slice(0,1))];return e.length>1&&n.push(Rb(t,e.slice(1))),n}function Rb(t,e){const n=e.reduce((o,s)=>o+s.length,0),r=new Uint8Array(n);let i=0;for(let o=0;o<e.length;o++){const s=e[o],a=t.buffer.slice(s.dataOffset,s.dataOffset+s.length);r.set(new Uint8Array(a),i),i+=s.length}return new DataView(r.buffer)}function rp(t,e,n){try{const{doc:r,raw:i}=dB(e,n);t._raw=(t._raw||"")+i;const o=tT(r);return kt(t,rT(nT(o,!0))),!0}catch{return!1}}function dB(t,e){const n=Qj.get(e);if(!n)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const r=typeof t=="string"?t:yt(t,0,t.byteLength);return{doc:eT(n,fB(r)),raw:r}}function fB(t){return t.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")}function eT(t,e,n=!1){try{const r=t.parseFromString(e,"application/xml"),i=r.getElementsByTagName("parsererror");if(i.length>0)throw new lB(i[0].textContent);return r}catch(r){if(r.name==="ParseError"&&tB(r)&&!n)return eT(t,nB(e),!0);throw r}}function tT(t){for(let e=0;e<t.childNodes.length;e++){if(t.childNodes[e].tagName==="x:xmpmeta")return tT(t.childNodes[e]);if(t.childNodes[e].tagName==="rdf:RDF")return t.childNodes[e]}throw new Error}function nT(t,e=!1){const n=hB(t);return pB(n)?e?{}:gB(n[0]):mB(n)}function hB(t){const e=[];for(let n=0;n<t.childNodes.length;n++)e.push(t.childNodes[n]);return e}function pB(t){return t.length===1&&t[0].nodeName==="#text"}function gB(t){return t.nodeValue}function mB(t){const e={};return t.forEach(n=>{if(vB(n)){const r=bB(n);e[n.nodeName]!==void 0?(Array.isArray(e[n.nodeName])||(e[n.nodeName]=[e[n.nodeName]]),e[n.nodeName].push(r)):e[n.nodeName]=r}}),e}function vB(t){return t.nodeName&&t.nodeName!=="#text"}function bB(t){return{attributes:_B(t),value:nT(t)}}function _B(t){const e={};for(let n=0;n<t.attributes.length;n++)e[t.attributes[n].nodeName]=decodeURIComponent(escape(t.attributes[n].value));return e}function rT(t){const e={};if(typeof t=="string")return t;for(const n in t){let r=t[n];Array.isArray(r)||(r=[r]),r.forEach(i=>{kt(e,Fb(i.attributes)),typeof i.value=="object"&&kt(e,iT(i.value))})}return e}function Fb(t){const e={};for(const n in t)try{yB(n)&&(e[op(n)]={value:t[n],attributes:{},description:ss(t[n],n)})}catch{}return e}function yB(t){return t!=="rdf:parseType"&&!ip(t)}function ip(t){return t.split(":")[0]==="xmlns"}function op(t){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(t)?"RatingPercent":t.split(":")[1]}function ss(t,e=void 0){if(Array.isArray(t)){const n=wB(t);return e&&typeof np[e]=="function"?np[e](t,n):n}if(typeof t=="object")return xB(t);try{return e&&typeof np[e]=="function"?np[e](t):decodeURIComponent(escape(t))}catch{return t}}function wB(t){return t.map(e=>e.value!==void 0?ss(e.value):ss(e)).join(", ")}function xB(t){const e=[];for(const n in t)e.push(`${kB(n)}: ${ss(t[n].value)}`);return e.join("; ")}function kB(t){return t==="CiAdrCity"?"CreatorCity":t==="CiAdrCtry"?"CreatorCountry":t==="CiAdrExtadr"?"CreatorAddress":t==="CiAdrPcode"?"CreatorPostalCode":t==="CiAdrRegion"?"CreatorRegion":t==="CiEmailWork"?"CreatorWorkEmail":t==="CiTelWork"?"CreatorWorkPhone":t==="CiUrlWork"?"CreatorWorkUrl":t}function iT(t){const e={};for(const n in t)try{ip(n)||(e[op(n)]=SB(t[n],n))}catch{}return e}function SB(t,e){return TB(t)?CB(t,e):EB(t)?{value:"",attributes:{},description:""}:oT(t)?sT(t,e):aT(t)?lT(t,e):cT(t)?uT(t,e):IB(t)?PB(t,e):Db(t,e)}function EB(t){return t.attributes["rdf:parseType"]==="Resource"&&typeof t.value=="string"&&t.value.trim()===""}function TB(t){return Array.isArray(t)}function CB(t,e){return Db(t[t.length-1],e)}function oT(t){return t.attributes["rdf:parseType"]==="Resource"&&t.value["rdf:value"]!==void 0||t.value["rdf:Description"]!==void 0&&t.value["rdf:Description"].value["rdf:value"]!==void 0}function sT(t,e){const n=hd(t);t.value["rdf:Description"]!==void 0&&(t=t.value["rdf:Description"]),kt(n,hd(t),AB(t));const r=$B(t);return{value:r,attributes:n,description:ss(r,e)}}function hd(t){const e={};for(const n in t.attributes)n!=="rdf:parseType"&&n!=="rdf:resource"&&!ip(n)&&(e[op(n)]=t.attributes[n]);return e}function AB(t){const e={};for(const n in t.value)n!=="rdf:value"&&!ip(n)&&(e[op(n)]=t.value[n].value);return e}function $B(t){return fT(t.value["rdf:value"])||t.value["rdf:value"].value}function aT(t){return t.attributes["rdf:parseType"]==="Resource"||t.value["rdf:Description"]!==void 0&&t.value["rdf:Description"].value["rdf:value"]===void 0}function lT(t,e){const n={value:{},attributes:{}};return t.value["rdf:Description"]!==void 0&&(kt(n.value,Fb(t.value["rdf:Description"].attributes)),kt(n.attributes,hd(t)),t=t.value["rdf:Description"]),kt(n.value,iT(t.value)),n.description=ss(n.value,e),n}function cT(t){return Object.keys(t.value).length===0&&t.attributes["xml:lang"]===void 0&&t.attributes["rdf:resource"]===void 0}function uT(t,e){const n=Fb(t.attributes);return{value:n,attributes:{},description:ss(n,e)}}function IB(t){return dT(t.value)!==void 0}function dT(t){return t["rdf:Bag"]||t["rdf:Seq"]||t["rdf:Alt"]}function PB(t,e){let n=dT(t.value).value["rdf:li"];const r=hd(t),i=[];return n===void 0?n=[]:Array.isArray(n)||(n=[n]),n.forEach(o=>{i.push(NB(o))}),{value:i,attributes:r,description:ss(i,e)}}function NB(t){return oT(t)?sT(t):aT(t)?lT(t).value:cT(t)?uT(t).value:Db(t)}function Db(t,e){const n=fT(t)||rT(t.value);return{value:n,attributes:hd(t),description:ss(n,e)}}function fT(t){return t.attributes&&t.attributes["rdf:resource"]}const as={CLOSED_SUBPATH_LENGTH:0,CLOSED_SUBPATH_BEZIER_LINKED:1,CLOSED_SUBPATH_BEZIER_UNLINKED:2,OPEN_SUBPATH_LENGTH:3,OPEN_SUBPATH_BEZIER_LINKED:4,OPEN_SUBPATH_BEZIER_UNLINKED:5,FILL_RULE:6,CLIPBOARD:7,INITIAL_FILL_RULE:8},hT=24,Mb={2e3:{name:"PathInformation",description:LB},2999:{name:"ClippingPathName",description(t){const[,e]=VS(t,0);return e}}};function LB(t){const n={},r=[];for(let i=0;i<t.byteLength;i+=2+hT){const o=We.getShortAt(t,i);zb[o]&&(n[o]||(n[o]=zb[o].description),r.push({type:o,path:zb[o].path(t,i+2)}))}return JSON.stringify({types:n,paths:r})}const zb={[as.CLOSED_SUBPATH_LENGTH]:{description:"Closed subpath length",path:(t,e)=>[We.getShortAt(t,e)]},[as.CLOSED_SUBPATH_BEZIER_LINKED]:{description:"Closed subpath Bezier knot, linked",path:sp},[as.CLOSED_SUBPATH_BEZIER_UNLINKED]:{description:"Closed subpath Bezier knot, unlinked",path:sp},[as.OPEN_SUBPATH_LENGTH]:{description:"Open subpath length",path:(t,e)=>[We.getShortAt(t,e)]},[as.OPEN_SUBPATH_BEZIER_LINKED]:{description:"Open subpath Bezier knot, linked",path:sp},[as.OPEN_SUBPATH_BEZIER_UNLINKED]:{description:"Open subpath Bezier knot, unlinked",path:sp},[as.FILL_RULE]:{description:"Path fill rule",path:()=>[]},[as.INITIAL_FILL_RULE]:{description:"Initial fill rule",path:(t,e)=>[We.getShortAt(t,e)]},[as.CLIPBOARD]:{description:"Clipboard",path:RB}};function sp(t,e){const r=[];for(let i=0;i<hT;i+=8)r.push(OB(t,e+i));return r}function OB(t,e){const n=Ya(t,e,8);return[Ya(t,e+4,8),n]}function RB(t,e){return[[Ya(t,e,8),Ya(t,e+4,8),Ya(t,e+8,8),Ya(t,e+12,8)],Ya(t,e+16,8)]}function Ya(t,e,n){const r=We.getLongAt(t,e),i=r>>>31?-1:1,o=(r&2130706432)>>>32-n,s=r&parseInt(JS("1",32-n),2);return i*O3(o.toString(2)+"."+L3(s.toString(2),32-n,"0"),2)}const FB={read:zB},pT="8BIM",DB=2,MB=4,gT=pT.length;function zB(t,e){const n=KS(new Uint8Array(t).buffer),r={};let i=0;for(;i<t.length;){const o=yt(n,i,gT);i+=gT;const s=We.getShortAt(n,i);i+=DB;const{tagName:a,tagNameSize:c}=UB(n,i);i+=c;const u=We.getLongAt(n,i);if(i+=MB,o===pT){const d=KS(n.buffer,i,u),f={id:s,value:yt(d,0,u)};if(Mb[s]){try{f.description=Mb[s].description(d)}catch{f.description="<no description formatter>"}r[a||Mb[s].name]=f}else e&&(r[`undefined-${s}`]=f)}i+=u+u%2}return r}function UB(t,e){const[n,r]=VS(t,e);return{tagName:r,tagNameSize:1+n+(n%2===0?1:0)}}const mT={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},vT={4:{name:"Preferred CMM type",value:(t,e)=>yt(t,e,4),description:t=>t!==null?Ub(t):""},8:{name:"Profile Version",value:(t,e)=>t.getUint8(e).toString(10)+"."+(t.getUint8(e+1)>>4).toString(10)+"."+(t.getUint8(e+1)%16).toString(10)},12:{name:"Profile/Device class",value:(t,e)=>yt(t,e,4),description:t=>{switch(t.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return t}}},16:{name:"Color Space",value:(t,e)=>yt(t,e,4)},20:{name:"Connection Space",value:(t,e)=>yt(t,e,4)},24:{name:"ICC Profile Date",value:(t,e)=>jB(t,e).toISOString()},36:{name:"ICC Signature",value:(t,e)=>BB(t.buffer.slice(e,e+4))},40:{name:"Primary Platform",value:(t,e)=>yt(t,e,4),description:t=>Ub(t)},48:{name:"Device Manufacturer",value:(t,e)=>yt(t,e,4),description:t=>Ub(t)},52:{name:"Device Model Number",value:(t,e)=>yt(t,e,4)},64:{name:"Rendering Intent",value:(t,e)=>t.getUint32(e),description:t=>{switch(t){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return t}}},80:{name:"Profile Creator",value:(t,e)=>yt(t,e,4)}};function jB(t,e){const n=t.getUint16(e),r=t.getUint16(e+2)-1,i=t.getUint16(e+4),o=t.getUint16(e+6),s=t.getUint16(e+8),a=t.getUint16(e+10);return new Date(Date.UTC(n,r,i,o,s,a))}function BB(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function Ub(t){switch(t.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return t}}const bT={read:ZB},qB=84,HB=128,GB="acsp",KB="desc",VB="mluc",WB="text",YB="sig ",JB=12;function ZB(t,e,n){return n&&e[0].compressionMethod!==Vh?XB(t,e):e4(t,e)}function XB(t,e){if(!QB(e[0].compressionMethod))return{};const n=new DataView(t.buffer.slice(e[0].offset,e[0].offset+e[0].length));return XS(n,e[0].compressionMethod,"utf-8","dataview").then(_T).catch(()=>({}))}function QB(t){return t===ZS}function e4(t,e){try{const n=e.reduce((s,a)=>s+a.length,0),r=new Uint8Array(n);let i=0;const o=t4(t);for(let s=1;s<=e.length;s++){const a=e.find(d=>d.chunkNumber===s);if(!a)throw new Error(`ICC chunk ${s} not found`);const c=o.slice(a.offset,a.offset+a.length),u=new Uint8Array(c);r.set(u,i),i+=u.length}return _T(new DataView(r.buffer))}catch{return{}}}function t4(t){return Array.isArray(t)?new DataView(Uint8Array.from(t).buffer).buffer:t.buffer}function n4(t){return t.length<HB+4}function r4(t,e){return t.length<e+JB}function _T(t){const e=t.buffer,n=t.getUint32();if(t.byteLength!==n)throw new Error("ICC profile length not matching");if(t.byteLength<qB)throw new Error("ICC profile too short");const r={},i=Object.keys(vT);for(let c=0;c<i.length;c++){const u=i[c],d=vT[u],f=d.value(t,parseInt(u,10));let h=f;d.description&&(h=d.description(f)),r[d.name]={value:f,description:h}}if(ap(e.slice(36,40))!==GB)throw new Error("ICC profile: missing signature");if(n4(e))return r;const s=t.getUint32(128);let a=132;for(let c=0;c<s;c++){if(r4(e,a))return r;const u=yt(t,a,4),d=t.getUint32(a+4),f=t.getUint32(a+8);if(d>e.length)return r;const h=yt(t,d,4);if(h===KB){const p=t.getUint32(d+8);if(p>f)return r;const g=ap(e.slice(d+12,d+p+11));pd(r,u,g)}else if(h===VB){const p=t.getUint32(d+8),g=t.getUint32(d+12);let m=d+16;const v=[];for(let b=0;b<p;b++){const y=yt(t,m+0,2),w=yt(t,m+2,2),S=t.getUint32(m+4),C=t.getUint32(m+8),E=P3(t,d+C,S);v.push({languageCode:y,countryCode:w,text:E}),m+=g}if(p===1)pd(r,u,v[0].text);else{const b={};for(let y=0;y<v.length;y++)b[`${v[y].languageCode}-${v[y].countryCode}`]=v[y].text;pd(r,u,b)}}else if(h===WB){const p=ap(e.slice(d+8,d+f-7));pd(r,u,p)}else if(h===YB){const p=ap(e.slice(d+8,d+12));pd(r,u,p)}a=a+12}return r}function ap(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function pd(t,e,n){mT[e]?t[mT[e].name]={value:n,description:n}:t[e]={value:n,description:n}}const lp=27,i4={read:o4,SHOT_INFO_AUTO_ROTATE:lp};function o4(t,e,n,r,i){let o=Zs(t,FE,e,e+n,r,i);return o.ShotInfo&&(o=kt({},o,s4(o.ShotInfo.value)),delete o.ShotInfo),o}function s4(t){const e={};return t[lp]!==void 0&&(e.AutoRotate={value:t[lp],description:a4(t[lp])}),e}function a4(t){return t===0?"None":t===1?"Rotate 90 CW":t===2?"Rotate 180":t===3?"Rotate 270 CW":"Unknown"}const yT=8,wT=yT+2,xT={K3_III:78420},cp={CAMERA_ORIENTATION:1,ROLL_ANGLE:3,PITCH_ANGLE:5},l4={read:c4,PENTAX_IFD_OFFSET:wT,MODEL_ID:xT,LIK3III:cp};function c4(t,e,n,r){const i=Ao.getByteOrder(t,e+n+yT),o=e+n;let s=Zs(t,$b,o,o+wT,i,r);return u4(s)&&(s=kt({},s,d4(t,o+s.LevelInfo.__offset,i)),delete s.LevelInfo),s}function u4(t){return t.PentaxModelID&&t.PentaxModelID.value===xT.K3_III&&t.LevelInfo}function d4(t,e,n){const r={};if(e+7>t.byteLength)return r;const i=t.getInt8(e+cp.CAMERA_ORIENTATION);r.CameraOrientation={value:i,description:f4(i)};const o=t.getInt16(e+cp.ROLL_ANGLE,n===Ao.LITTLE_ENDIAN);r.RollAngle={value:o,description:h4(o)};const s=t.getInt16(e+cp.PITCH_ANGLE,n===Ao.LITTLE_ENDIAN);return r.PitchAngle={value:s,description:p4(s)},r}function f4(t){return t===0?"Horizontal (normal)":t===1?"Rotate 270 CW":t===2?"Rotate 180":t===3?"Rotate 90 CW":t===4?"Upwards":t===5?"Downwards":"Unknown"}function h4(t){return""+t*-.5}function p4(t){return""+t*-.5}const g4={read:m4};function m4(t,e){return{"Image Width":v4(t,e),"Image Height":b4(t,e),"Bit Depth":_4(t,e),"Color Type":y4(t,e),Compression:w4(t,e),Filter:x4(t,e),Interlace:k4(t,e)}}function v4(t,e){if(e+0+4>t.byteLength)return;const i=We.getLongAt(t,e);return{value:i,description:`${i}px`}}function b4(t,e){if(e+4+4>t.byteLength)return;const i=We.getLongAt(t,e+4);return{value:i,description:`${i}px`}}function _4(t,e){if(e+8+1>t.byteLength)return;const i=We.getByteAt(t,e+8);return{value:i,description:`${i}`}}function y4(t,e){const i={0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"};if(e+9+1>t.byteLength)return;const o=We.getByteAt(t,e+9);return{value:o,description:i[o]||"Unknown"}}function w4(t,e){if(e+10+1>t.byteLength)return;const i=We.getByteAt(t,e+10);return{value:i,description:i===0?"Deflate/Inflate":"Unknown"}}function x4(t,e){if(e+11+1>t.byteLength)return;const i=We.getByteAt(t,e+11);return{value:i,description:i===0?"Adaptive":"Unknown"}}function k4(t,e){const i={0:"Noninterlaced",1:"Adam7 Interlace"};if(e+12+1>t.byteLength)return;const o=We.getByteAt(t,e+12);return{value:o,description:i[o]||"Unknown"}}const S4={read:$4},jb="STATE_KEYWORD",Bb="STATE_COMPRESSION",qb="STATE_LANG",E4="STATE_TRANSLATED_KEYWORD",Hb="STATE_TEXT",T4=1,C4=1,A4=6;function $4(t,e,n,r){const i={},o=[];for(let s=0;s<e.length;s++){const{offset:a,length:c,type:u}=e[s],d=I4(t,a,c,u,n);if(d instanceof Promise)o.push(d.then(({name:f,value:h,description:p})=>{try{if(QS.USE_EXIF&&ST(f,h))return{__exif:GE.read(TT(h),A4,r).tags};if(QS.USE_IPTC&&ET(f,h))return{__iptc:Ob.read(TT(h),0,r)};if(f&&!ST(f,h)&&!ET(f,h))return{[f]:{value:h,description:p}}}catch{}return{}}));else{const{name:f,value:h,description:p}=d;f&&(i[f]={value:h,description:p})}}return{readTags:i,readTagsPromise:o.length>0?Promise.all(o):void 0}}function I4(t,e,n,r,i){const o=[],s=[];let a,c=jb,u=Vh;for(let f=0;f<n&&e+f<t.byteLength;f++){if(c===Bb){u=P4({type:r,dataView:t,offset:e+f}),r===Wa&&(f+=T4),c=kT(r,c);continue}else if(c===Hb){a=new DataView(t.buffer.slice(e+f,e+n));break}const h=t.getUint8(e+f);h===0?c=kT(r,c):c===jb?o.push(h):c===qb&&s.push(h)}if(u!==Vh&&!i)return{};const d=XS(a,u,N4(r));return d instanceof Promise?d.then(f=>Gb(f,r,s,o)).catch(()=>Gb("<text using unknown compression>".split(""),r,s,o)):Gb(d,r,s,o)}function P4({type:t,dataView:e,offset:n}){if(t===Wa){if(e.getUint8(n)===C4)return e.getUint8(n+1)}else if(t===Jh)return e.getUint8(n);return Vh}function kT(t,e){return e===jb&&[Wa,Jh].includes(t)?Bb:e===Bb?t===Wa?qb:Hb:e===qb?E4:Hb}function N4(t){return t===Eb||t===Jh?"latin1":"utf-8"}function Gb(t,e,n,r){const i=O4(t);return{name:L4(e,n,r),value:i,description:e===Wa?R4(t):i}}function L4(t,e,n){const r=Va(n);if(t===Eb||e.length===0)return r;const i=Va(e);return`${r} (${i})`}function O4(t){return t instanceof DataView?yt(t,0,t.byteLength):t}function R4(t){return VE.decode("UTF-8",t)}function ST(t,e){return t.toLowerCase()==="raw profile type exif"&&e.substring(1,5)==="exif"}function ET(t,e){return t.toLowerCase()==="raw profile type iptc"&&e.substring(1,5)==="iptc"}function TT(t){const e=t.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/);return F4(e[2].replace(/\n/g,""))}function F4(t){const e=new DataView(new ArrayBuffer(t.length/2));for(let n=0;n<t.length;n+=2)e.setUint8(n/2,parseInt(t.substring(n,n+2),16));return e}const D4={read:M4};function M4(t,e){const n={};for(let r=0;r<e.length;r++){const i=We.getLongAt(t,e[r]+$c),o=yt(t,e[r]+Ws,ro);o===bE?(n["Pixels Per Unit X"]=z4(t,e[r],i),n["Pixels Per Unit Y"]=U4(t,e[r],i),n["Pixel Units"]=j4(t,e[r],i)):o===_E&&(n["Modify Date"]=B4(t,e[r],i))}return n}function z4(t,e,n){if(!up(t,e,n,0,4))return;const o=We.getLongAt(t,e+yr+0);return{value:o,description:""+o}}function U4(t,e,n){if(!up(t,e,n,4,4))return;const o=We.getLongAt(t,e+yr+4);return{value:o,description:""+o}}function j4(t,e,n){if(!up(t,e,n,8,1))return;const o=We.getByteAt(t,e+yr+8);return{value:o,description:o===1?"meters":"Unknown"}}function B4(t,e,n){if(!up(t,e,n,0,7))return;const i=We.getShortAt(t,e+yr),o=We.getByteAt(t,e+yr+2),s=We.getByteAt(t,e+yr+3),a=We.getByteAt(t,e+yr+4),c=We.getByteAt(t,e+yr+5),u=We.getByteAt(t,e+yr+6);return{value:[i,o,s,a,c,u],description:`${Nc(i,4)}-${Nc(o,2)}-${Nc(s,2)} ${Nc(a,2)}:${Nc(c,2)}:${Nc(u,2)}`}}function up(t,e,n,r,i){return r+i<=n&&e+yr+r+i<=t.byteLength}function Nc(t,e){return`${"0".repeat(e-(""+t).length)}${t}`}const q4={read:K4},H4=4,G4=7;function K4(t,e){const n={},r=We.getByteAt(t,e);return n.Alpha=V4(r),n.Animation=W4(r),n.ImageWidth=CT(t,e+H4),n.ImageHeight=CT(t,e+G4),n}function V4(t){const e=t&16;return{value:e?1:0,description:e?"Yes":"No"}}function W4(t){const e=t&2;return{value:e?1:0,description:e?"Yes":"No"}}function CT(t,e){const n=We.getByteAt(t,e)+256*We.getByteAt(t,e+1)+65536*We.getByteAt(t,e+2)+1;return{value:n,description:n+"px"}}const Y4={read:J4};function J4(t){return{"GIF Version":Z4(t),"Image Width":X4(t),"Image Height":Q4(t),"Global Color Map":e6(t),"Bits Per Pixel":n6(t),"Color Resolution Depth":t6(t)}}function Z4(t){if(6>t.byteLength)return;const r=yt(t,3,3);return{value:r,description:r}}function X4(t){if(8>t.byteLength)return;const r=t.getUint16(6,!0);return{value:r,description:`${r}px`}}function Q4(t){if(10>t.byteLength)return;const r=t.getUint16(8,!0);return{value:r,description:`${r}px`}}function e6(t){if(11>t.byteLength)return;const i=(t.getUint8(10)&128)>>>7;return{value:i,description:i===1?"Yes":"No"}}function t6(t){if(11>t.byteLength)return;const i=((t.getUint8(10)&112)>>>4)+1;return{value:i,description:`${i} ${i===1?"bit":"bits"}`}}function n6(t){if(11>t.byteLength)return;const i=(t.getUint8(10)&7)+1;return{value:i,description:`${i} ${i===1?"bit":"bits"}`}}const r6=[6,7,99],i6={get:o6};function o6(t,e,n){if(s6(e)){e.type="image/jpeg";const r=n+e.JPEGInterchangeFormat.value;e.image=t.buffer.slice(r,r+e.JPEGInterchangeFormatLength.value),WS(e,"base64",function(){return YS(this.image)})}return e}function s6(t){return t&&(t.Compression===void 0||r6.includes(t.Compression.value))&&t.JPEGInterchangeFormat&&t.JPEGInterchangeFormat.value&&t.JPEGInterchangeFormatLength&&t.JPEGInterchangeFormatLength.value}const Kb={INCHES:2,CENTIMETERS:3,MILLIMETERS:4},Vb={INCHES_TO_MM:25.4,CM_TO_MM:10,MM_TO_MM:1},a6={get:l6};function l6(t,e){const n={};let r=!1;const i=Ja(t,"exif","FocalLength",e),o=Ja(t,"exif","FocalPlaneXResolution",e),s=Ja(t,"exif","FocalPlaneYResolution",e),a=Ja(t,"exif","FocalPlaneResolutionUnit",e),c=Ja(t,"file","Image Width",e),u=Ja(t,"file","Image Height",e),d=Ja(t,"exif","FocalLengthIn35mmFilm",e)||c6(o,s,a,c,u,i);d&&(n.FocalLength35efl={value:d,description:mt.FocalLengthIn35mmFilm(d)},r=!0);const f=u6(i,d);f&&(n.ScaleFactorTo35mmEquivalent=f,r=!0);const h=d6(d);if(h&&(n.FieldOfView=h,r=!0),r)return n}function Ja(t,e,n,r){if(r&&t[e]&&t[e][n])return t[e][n].value;if(!r&&t[n])return t[n].value}function c6(t,e,n,r,i,o){if(t&&e&&n&&r&&i&&o)try{let a;switch(n){case Kb.INCHES:a=Vb.INCHES_TO_MM;break;case Kb.CENTIMETERS:a=Vb.CM_TO_MM;break;case Kb.MILLIMETERS:a=Vb.MM_TO_MM;break;default:return}const c=t[0]/t[1]*a,u=e[0]/e[1]*a,d=r/c,f=i/u,h=Math.sqrt(d**2+f**2);return o[0]/o[1]*(43.27/h)}catch{}}function u6(t,e){if(t&&e)try{const n=e/(t[0]/t[1]);return{value:n,description:n.toFixed(1)}}catch{}}function d6(t){if(t)try{const n=2*Math.atan(36/(2*t))*(180/Math.PI);return{value:n,description:n.toFixed(1)+" deg"}}catch{}}function AT(t){this.name="MetadataMissingError",this.message=t||"No Exif data",this.stack=new Error().stack}AT.prototype=new Error;const $T={MetadataMissingError:AT},f6={load:h6,loadView:IT,errors:$T};function h6(t,e={}){return p6(t)?(e.async=!0,g6(t,e).then(n=>Wb(n,e))):x6(t)?(e.async=!0,k6(t).then(n=>Wb(n,e))):Wb(t,e)}function p6(t){return typeof t=="string"}function g6(t,e){return/^\w+:\/\//.test(t)?typeof fetch<"u"?m6(t,e):v6(t,e):_6(t)?Promise.resolve(N3(t)):y6(t,e)}function m6(t,{length:e}={}){const n={method:"GET"};return Number.isInteger(e)&&e>=0&&(n.headers={range:`bytes=0-${e-1}`}),fetch(t,n).then(r=>r.arrayBuffer())}function v6(t,{length:e}={}){return new Promise((n,r)=>{const i={};Number.isInteger(e)&&e>=0&&(i.headers={range:`bytes=0-${e-1}`}),b6(t)(t,i,s=>{if(s.statusCode>=200&&s.statusCode<=299){const a=[];s.on("data",c=>a.push(Buffer.from(c))),s.on("error",c=>r(c)),s.on("end",()=>n(Buffer.concat(a)))}else r(`Could not fetch file: ${s.statusCode} ${s.statusMessage}`),s.resume()}).on("error",s=>r(s))})}function b6(t){return/^https:\/\//.test(t)?__non_webpack_require__("https").get:__non_webpack_require__("http").get}function _6(t){return/^data:[^;,]*(;base64)?,/.test(t)}function y6(t,{length:e}={}){return new Promise((n,r)=>{const i=w6();i.open(t,(o,s)=>{o?r(o):i.stat(t,(a,c)=>{if(a)r(a);else{const u=Math.min(c.size,e!==void 0?e:c.size),d=Buffer.alloc(u),f={buffer:d,length:u};i.read(s,f,h=>{h?r(h):i.close(s,p=>{p&&console.warn(`Could not close file ${t}:`,p),n(d)})})}})})})}function w6(){try{return __non_webpack_require__("fs")}catch{return}}function x6(t){return typeof File<"u"&&t instanceof File}function k6(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=i=>e(i.target.result),r.onerror=()=>n(r.error),r.readAsArrayBuffer(t)})}function Wb(t,e){return S6(t)&&(t=new Uint8Array(t).buffer),IT(E6(t),e)}function S6(t){try{return Buffer.isBuffer(t)}catch{return!1}}function E6(t){try{return new DataView(t)}catch{return new GS(t)}}function IT(t,{expanded:e=!1,async:n=!1,includeUnknown:r=!1,domParser:i=void 0}={expanded:!1,async:!1,includeUnknown:!1,domParser:void 0}){let o=!1,s={};const a=[],{fileType:c,fileDataOffset:u,jfifDataOffset:d,tiffHeaderOffset:f,iptcDataOffset:h,xmpChunks:p,iccChunks:g,mpfDataOffset:m,pngHeaderOffset:v,pngTextChunks:b,pngChunkOffsets:y,vp8xChunkOffset:w,gifHeaderOffset:S}=SU.parseAppMarkers(t,n);if(T6(u)){o=!0;const x=sj.read(t,u);e?s.file=x:s=kt({},s,x)}if(C6(d)){o=!0;const x=mj.read(t,d);e?s.jfif=x:s=kt({},s,x)}if(A6(f)){o=!0;const{tags:x,byteOrder:A}=GE.read(t,f,r);if(x.Thumbnail&&(s.Thumbnail=x.Thumbnail,delete x.Thumbnail),e?(s.exif=x,$6(s)):s=kt({},s,x),x["IPTC-NAA"]&&!PT(h)){const I=Ob.read(x["IPTC-NAA"].value,0,r);e?s.iptc=I:s=kt({},s,I)}if(x.ApplicationNotes&&!NT(p)){const I=QE.read(Va(x.ApplicationNotes.value),void 0,i);e?s.xmp=I:(delete I._raw,s=kt({},s,I))}if(x.ImageSourceData&&x.PhotoshopSettings){const I=FB.read(x.PhotoshopSettings.value,r);e?s.photoshop=I:s=kt({},s,I)}if(x.ICC_Profile&&!LT(g)){const I=bT.read(x.ICC_Profile.value,[{offset:0,length:x.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);e?s.icc=I:s=kt({},s,I)}if(x.MakerNote){if(I6(x)){const I=i4.read(t,f,x.MakerNote.__offset,A,r);e?s.makerNotes=I:s=kt({},s,I)}else if(P6(x)){const I=l4.read(t,f,x.MakerNote.__offset,r);e?s.makerNotes=I:s=kt({},s,I)}}x.MakerNote&&delete x.MakerNote.__offset}if(PT(h)){o=!0;const x=Ob.read(t,h,r);e?s.iptc=x:s=kt({},s,x)}if(NT(p)){o=!0;const x=QE.read(t,p,i);e?s.xmp=x:(delete x._raw,s=kt({},s,x))}if(LT(g)){o=!0;const x=bT.read(t,g,n);x instanceof Promise?a.push(x.then($)):$(x)}if(N6(m)){o=!0;const x=XU.read(t,m,r);e?s.mpf=x:s=kt({},s,x)}if(L6(v)){o=!0;const x=g4.read(t,v);e?(s.png=s.png?kt({},s.png,x):x,s.pngFile=x):s=kt({},s,x)}if(O6(b)){o=!0;const{readTags:x,readTagsPromise:A}=S4.read(t,b,n,r);k(x),A&&a.push(A.then(I=>I.forEach(k)))}if(R6(y)){o=!0;const x=D4.read(t,y);e?s.png=s.png?kt({},s.png,x):x:s=kt({},s,x)}if(F6(w)){o=!0;const x=q4.read(t,w);e?s.riff=s.riff?kt({},s.riff,x):x:s=kt({},s,x)}if(D6(S)){o=!0;const x=Y4.read(t,S);e?s.gif=s.gif?kt({},s.gif,x):x:s=kt({},s,x)}const C=a6.get(s,e);C&&(e?s.composite=C:s=kt({},s,C));const E=i6.get(t,s.Thumbnail,f);if(E?(o=!0,s.Thumbnail=E):delete s.Thumbnail,c&&(e?(s.file||(s.file={}),s.file.FileType=c):s.FileType=c,o=!0),!o)throw new $T.MetadataMissingError;if(n)return Promise.all(a).then(()=>s);return s;function $(x){e?s.icc=x:s=kt({},s,x)}function k(x){if(e){for(const A of["exif","iptc"]){const I=`__${A}`;x[I]&&(s[A]=s[A]?kt({},s.exif,x[I]):x[I],delete x[I])}s.png=s.png?kt({},s.png,x):x,s.pngText=s.pngText?kt({},s.png,x):x}else s=kt({},s,x.__exif?x.__exif:{},x.__iptc?x.__iptc:{},x),delete s.__exif,delete s.__iptc}}function T6(t){return t!==void 0}function C6(t){return t!==void 0}function A6(t){return t!==void 0}function $6(t){if(t.exif){if(t.exif.GPSLatitude&&t.exif.GPSLatitudeRef)try{t.gps=t.gps||{},t.gps.Latitude=Wh(t.exif.GPSLatitude.value),t.exif.GPSLatitudeRef.value.join("")==="S"&&(t.gps.Latitude=-t.gps.Latitude)}catch{}if(t.exif.GPSLongitude&&t.exif.GPSLongitudeRef)try{t.gps=t.gps||{},t.gps.Longitude=Wh(t.exif.GPSLongitude.value),t.exif.GPSLongitudeRef.value.join("")==="W"&&(t.gps.Longitude=-t.gps.Longitude)}catch{}if(t.exif.GPSAltitude&&t.exif.GPSAltitudeRef)try{t.gps=t.gps||{},t.gps.Altitude=t.exif.GPSAltitude.value[0]/t.exif.GPSAltitude.value[1],t.exif.GPSAltitudeRef.value===1&&(t.gps.Altitude=-t.gps.Altitude)}catch{}}}function PT(t){return t!==void 0}function NT(t){return Array.isArray(t)&&t.length>0}function LT(t){return Array.isArray(t)&&t.length>0}function I6(t){return t.Make&&t.Make.value&&Array.isArray(t.Make.value)&&t.Make.value[0]==="Canon"&&t.MakerNote&&t.MakerNote.__offset}function P6(t){const e="PENTAX ";return t.MakerNote.value.length>e.length&&Va(t.MakerNote.value.slice(0,e.length))===e&&t.MakerNote.__offset}function N6(t){return t!==void 0}function L6(t){return t!==void 0}function O6(t){return t!==void 0}function R6(t){return t!==void 0}function F6(t){return t!==void 0}function D6(t){return t!==void 0}const Za=(t,e)=>{if(typeof t!="number")return NaN;if(!Number.isFinite(t))return t;const n=10**e;return Math.round(t*n)/n},M6=/^(?<year>\d{4}):(?<month>\d{2}):(?<date>\d{2}) (?<hour>\d{2}):(?<minute>\d{2}):(?<second>\d{2})$/,z6=async(t,e)=>{if(!(e==="image")||!t.file)return{createdDate:void 0,coordinates:void 0};const{exif:{DateTimeOriginal:r,DateTime:i}={DateTimeOriginal:void 0,DateTime:void 0},gps:{Latitude:o,Longitude:s}={Latitude:void 0,Longitude:void 0}}=await f6.load(t.file,{expanded:!0}).catch(()=>{})??{},c=(r?.description??i?.description)?.match(M6);let u,d;if(c?.groups){const{year:f,month:h,date:p,hour:g,minute:m,second:v}=c.groups,b=new Date(`${f}-${h}-${p}T${g}:${m}:${v}Z`);Number.isNaN(b.getTime())||(u=b)}return typeof o=="number"&&typeof s=="number"&&Number.isFinite(o)&&Number.isFinite(s)&&(d={latitude:Za(o,7),longitude:Za(s,7)}),{createdDate:u,coordinates:d}},U6=t=>{const e=new Image;return new Promise(n=>{const r=()=>{n({dimensions:{width:e.naturalWidth,height:e.naturalHeight}})};e.addEventListener("load",r,{once:!0}),e.src=t})},j6=async(t,e)=>{const n=document.createElement(e);return new Promise(r=>{const i=()=>{const{duration:o}=n;e==="audio"&&r({duration:o});const{videoWidth:s,videoHeight:a}=n;r({dimensions:{width:s,height:a},duration:o})};n.addEventListener("loadedmetadata",i,{once:!0}),n.src=t})},B6=async(t,e)=>e==="image"?U6(t):j6(t,e),q6=async(t,e,n)=>{const{dimensions:r,duration:i}=await B6(e,n),{createdDate:o,coordinates:s}=await z6(t,n);return{dimensions:r,duration:i,createdDate:o,coordinates:s}},Vce="modulepreload",Wce=function(t){return"/"+t},Yce={},OT=function(e,n,r){let i=Promise.resolve();function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return e().catch(o)})},Yb="0.104.3",H6={"@jsquash/webp":"^1.5.0","@lexical/markdown":"^0.33.1","@sindresorhus/transliterate":"^1.6.0","@sveltia/ui":"^0.27.9","@sveltia/utils":"^0.8.0","create-react-class":"^15.7.0",dayjs:"^1.11.18",deepmerge:"^4.3.1",exifreader:"^4.31.2","fast-deep-equal":"^3.1.3",flat:"^6.0.1","isomorphic-dompurify":"^2.26.0",leaflet:"^1.9.4",lexical:"^0.33.1",marked:"^16.2.1","marked-bidi":"^1.0.13",mime:"^4.0.7","parse-entities":"^4.0.2","pdfjs-dist":"^5.4.149",qrcode:"^1.5.4",react:"^19.1.1","react-dom":"^19.1.1","sanitize-filename":"^1.6.3","smol-toml":"^1.4.2","svelte-i18n":"^4.0.1",svgo:"^4.0.0","terra-draw":"^1.13.0","terra-draw-leaflet-adapter":"^1.0.3",turndown:"^7.2.1",yaml:"^2.8.1"},Jb=t=>{const e=`https://unpkg.com/${t}`,n=H6[t]?.replace(/^\D/,"");return n?`${e}@${n}`:e},Lc=async(t,e)=>OT(()=>import(`${Jb(t)}/${e}`),void 0),RT=["avif","gif","jpeg","png","webp"],G6=RT.map(t=>`image/${t}`),Zb=/\b(?:avif|gif|jpe?g|png|webp)$/i,K6=["image/svg+xml"],V6=/\b(?:svg)$/i,$o=[...G6,...K6],FT=["webp"],Xb={},W6=async t=>{if(t in Xb)return Xb[t];const e=`image/${t}`,n=new OffscreenCanvas(1,1);n.getContext("2d");const i=(await n.convertToBlob({type:e})).type===e;return Xb[t]=i,i},DT=async(t,{format:e="webp",quality:n=85}={})=>{const r=`image/${e}`;if(!await W6(e)&&FT.includes(e)){const o=t.getContext("2d").getImageData(0,0,t.width,t.height);try{const s=(await Lc(`@jsquash/${e}`,"encode.js?module")).default,a=await s(o,{quality:n});return new Blob([a],{type:r})}catch{}}return t.convertToBlob({type:r,quality:n/100})},Y6=({width:t,height:e},{width:n=t,height:r=e,fit:i="scale-down"}={})=>{const o={scale:1,width:t,height:e};if(t===r&&e===r)return o;const s=t>e,a=t<r||e<r;let c=1,u=0,d=0;if(i==="scale-down"){if(a)return o;i="contain"}return i==="contain"&&(s?(n>r?(c=n/t,u=n):(c=r/t,u=r),d=e*c):(n>r?(c=r/e,d=r):(c=n/e,d=n),u=t*c)),{scale:c,width:u,height:d}},MT=(t,e,n)=>{const{scale:r,width:i,height:o}=Y6(e,n);return t.width=i,t.height=o,{scale:r,width:i,height:o}},J6=async({blob:t})=>{const e=URL.createObjectURL(t),n=new Image;return new Promise(r=>{n.addEventListener("load",()=>{r({source:n,naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight}),URL.revokeObjectURL(e)},{once:!0}),n.src=e})},Z6=async({blob:t})=>{const e=URL.createObjectURL(t),n=document.createElement("video");return new Promise(r=>{n.addEventListener("canplay",()=>{n.pause(),r({source:n,naturalWidth:n.videoWidth,naturalHeight:n.videoHeight}),URL.revokeObjectURL(e)},{once:!0}),n.muted=!0,n.autoplay=!0,n.playsInline=!0,n.src=e,n.style.opacity="0",n.style.pointerEvents="none",document.body.appendChild(n)})},X6=async t=>t.type.startsWith("video/")?Z6({blob:t}):J6({blob:t}),Qb=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{let s,a=0,c=0;try{s=await createImageBitmap(t),{width:a,height:c}=s}catch{({source:s,naturalWidth:a,naturalHeight:c}=await X6(t))}r??=a,i??=c;const u=new OffscreenCanvas(512,512),d=u.getContext("2d");return MT(u,{width:a,height:c},{fit:o,width:r,height:i}),d.drawImage(s,0,0,u.width,u.height),s instanceof HTMLVideoElement&&document.body.removeChild(s),DT(u,{format:e,quality:n})},Q6=async t=>{const e=await t.text();try{const{optimize:n}=await Lc("svgo","dist/svgo.browser.js"),{data:r}=n(e);return new Blob([r],{type:t.type})}catch{}return t},Oc=Jb("pdfjs-dist"),e8=`${Oc}/build/pdf.min.mjs`,t8=`${Oc}/build/pdf.worker.min.mjs`,n8={isEvalSupported:!1,disableAutoFetch:!0,cMapUrl:`${Oc}/cmaps/`,iccUrl:`${Oc}/iccs/`,standardFontDataUrl:`${Oc}/standard_fonts/`,wasmUrl:`${Oc}/wasm/`};let dp;const r8=async(t,{format:e="png",quality:n=85,width:r=void 0,height:i=void 0,fit:o="scale-down"}={})=>{if(!dp)try{dp=await import(e8),dp.GlobalWorkerOptions.workerSrc=t8}catch{throw new Error("Failed to load PDF.js library")}const s=URL.createObjectURL(t),a=new OffscreenCanvas(512,512),c=a.getContext("2d");try{const d=await(await dp.getDocument({...n8,url:s}).promise).getPage(1),f=d.getViewport({scale:1}),{scale:h}=MT(a,{width:f.width,height:f.height},{width:r,height:i,fit:o});await d.render({canvasContext:c,viewport:h===1?f:d.getViewport({scale:h})}).promise,URL.revokeObjectURL(s)}catch{throw new Error("Failed to render PDF")}return DT(a,{format:e,quality:n})},e_=new Set,Qs=async(t,e=0)=>{const{file:n,blobURL:r,name:i,path:o}=t;if(r)return fetch(r).then(a=>a.blob());let s;if(n)s=n;else{if(e_.has(o)&&e<=25)return await Lt(200),Qs(t,e+1);e_.add(o);const a=await se(wn)?.fetchBlob?.(t);if(!a)throw new Error("Failed to retrieve blob");s=new Blob([a],{type:os.getType(i)??a.type})}return t.blobURL=URL.createObjectURL(s),e_.delete(o),s},t_=async t=>(t.blobURL||await Qs(t),t.blobURL);let fp;const n_=async(t,{cacheOnly:e=!1}={})=>{const n=t.name.endsWith(".pdf");if(!(["image","video"].includes(t.kind)||n))return;if(fp===void 0){const{databaseName:i}=se(wn)?.repository??{};fp=i?new Co(i,"asset-thumbnails"):null}let r=await fp?.get(t.sha);if(!r){if(e)return;const i=await Qs(t),o={format:"webp",quality:85,width:512,height:512,fit:"contain"};r=n?await r8(i,o):await Qb(i,o),await fp?.set(t.sha,r)}return URL.createObjectURL(r)},gd=(t,{pathOnly:e=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{const{publicPath:i,entryRelative:o,hasTemplateTags:s}=t.folder.collectionName===void 0?t.folder:jh(t.path).find(({collectionName:d})=>d!==void 0)??se(qa);if(o)return e&&r&&fn(t.path).dirname===fn(Object.values(r.locales)[0].path).dirname?t.name:void 0;const{_baseURL:a="",output:{encode_file_path:c=!1}={}}=se(Nt);let u=s?t.path.replace(jS(t.folder.internalPath??"",d=>{const f=d.match(/{{(?<tag>.+?)}}/)?.groups?.tag;return f?`(?<${f}>[^/]+)`:Kt(d)}),i?.replaceAll(/{{(.+?)}}/g,"$<$1>")??""):t.path.replace(t.folder.internalPath??"",i==="/"?"":i??"");if(c&&(u=BS(u)),!(!u.startsWith("/")&&!n))return e?u:`${a}${u}`},Rc=async({value:t,entry:e,collectionName:n,fileName:r,thumbnail:i=!1})=>{if(!t)return;if(/^(?:https?|data|blob):/.test(t))return t;const o=T_({value:t,entry:e,collectionName:n,fileName:r});if(o)return(i?await n_(o):await t_(o))??gd(o)},hp={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},pp=async t=>{const{kind:e,path:n}=t,{blobBaseURL:r}=se(wn)?.repository??{},i=await t_(t),o=gd(t,{allowSpecial:!0,pathOnly:!0})??i;let s={};return["image","video","audio"].includes(e)&&i&&(s=await q6(t,i,e)),{...s,publicURL:gd(t),repoBlobURL:r?`${r}/${n}`:void 0,usedEntries:o?await S_(o):[]}},Fc=it(!1),Io=it(),r_=it([]),li=it([]),i_=it([]),zT=t=>se(r_).filter(({collectionName:e,filePathMap:n})=>n?Object.values(n).includes(t):Kr(e)?._file?.fullPathRegEx?.test(t)).sort((e,n)=>n.folderPath?.localeCompare(e.folderPath??"")??0),i8=()=>{try{return se(ue)("index_file")}catch{return"Index File"}},ci=t=>{const{index_file:e}=t;if(!Ld(t)||!e)return;const n=e===!0?{}:e;return{name:n.name??"_index",label:n.label??i8(),icon:n.icon??"home",fields:n.fields,editor:n.editor}},Po=(t,e)=>{const n=ci(t);return n?e.slug===n.name:!1},o8=t=>{const e=ci(t);return e?!Lo(t.name).some(({slug:n})=>n===e.name):!1};rr.extend(ib),rr.extend(ob),rr.extend(sb);const s8=/{{(?:year|month|day|hour|minute|second)}}/,ls=t=>zT(Object.values(t.locales)[0].path).map(({collectionName:e})=>Kr(e)).filter(e=>!!e),a8=({dateFieldName:t,fields:e,content:n})=>{const r=t?e.find(({widget:a,name:c})=>a==="datetime"&&c===t):e.find(({widget:a})=>a==="datetime"),i=r?n[r.name]:void 0;if(!r||!i)return;const{format:o,picker_utc:s=!1}=r;return Ha({date:(s?rr.utc:rr)(i,o).toDate(),timeZone:s?"UTC":void 0})},UT=(t,e,n,r)=>{const{show_preview_links:i=!0,_baseURL:o}=se(Nt)??{},{slug:s,path:a,content:c}=t.locales[e]??{},{preview_path:u,preview_path_date_field:d,fields:f=[]}=r??n;if(!i||!o||!a||!c||!u)return;const h=Po(n,t),g=(h?ci(n):void 0)?.fields??f;let m;if(!(s8.test(u)&&(m=a8({dateFieldName:d,fields:g,content:c}),!m)))try{const v=Oo(u,{type:"preview_path",collection:n,content:c,locale:e,currentSlug:s,entryFilePath:a,dateTimeParts:m,isIndexFile:h});return`${o.replace(/\/$/,"")}/${v.replace(/^\//,"")}`}catch{return}},l8=(t,e)=>`${se(wn)?.repository?.blobBaseURL}/${t.locales[e]?.path}?plain=1`,gp=t=>!("divider"in t)&&typeof t.file=="string"&&Array.isArray(t.fields),mp=t=>t.filter(e=>gp(e)),Dc=(t,e)=>{const n=typeof t=="string"?Kr(t):t;if(!(!n||!("_fileMap"in n)))return n._fileMap[e]},md=t=>t.label||t.name,ea=(t,e)=>"_fileMap"in t?Object.values(t._fileMap).filter(({_file:n,_i18n:r})=>n.fullPath===e.locales[r.defaultLocale]?.path):[],o_=(t,e)=>se(li).find(n=>ls(n).some(r=>r.name===t&&ea(r,n).some(i=>i.name===e))),jT=(t,e)=>{if(t&&e){const{collections:n,singletons:r}=se(Nt);return t==="_singletons"?Array.isArray(r)?mp(r).findIndex(i=>i.name===e):-1:ia({collections:n}).find(({name:i})=>i===t)?.files?.findIndex(({name:i})=>i===e)??-1}return-1},BT=["file","image"],Xa=[...BT,"relation","select"],qT=[...Xa,"list","number"],HT=({multiline:t,dotAll:e,source:n})=>t||e||n.includes("[\\s\\S]")||n.includes("[\\S\\s]"),GT=t=>is(Object.fromEntries(Object.entries(no(t)).filter(([e])=>!e.split(".").pop()?.startsWith("__sc_")))),KT=t=>t.replace(/"/g,"'"),Qa=t=>t.replace(/"/g,"""),vp=new Map,VT=/!\[(?<alt>(?:[^\]\\]|\\.)*)\]\((?<src>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title>(?:[^"\\]|\\.)*)")?\)/,c8=/\[!\[(?<alt2>(?:[^\]\\]|\\.)*)\]\((?<src2>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title2>(?:[^"\\]|\\.)*)")?\)\](?:\((?<link>[^)]*\([^)]*\)[^)]*|[^)]*)\))/,u8=new RegExp(`${VT.source}|${c8.source}`),WT={id:"image",label:"Image",fields:[{name:"src",label:"Source",widget:"image"},{name:"alt",label:"Alt Text",required:!1},{name:"title",label:"Title",required:!1}],pattern:VT,toBlock:t=>{const{src:e="",alt:n="",title:r=""}=t;return e?`}"`:""})`:""},toPreview:t=>{const{src:e="",alt:n="",title:r=""}=t;return`<img src="${Qa(e)}" alt="${Qa(n)}" title="${Qa(r)}">`}},d8={id:"linked-image",label:"Image",fields:[...WT.fields,{name:"link",label:"Link",required:!1}],pattern:u8,fromBlock:t=>{const{src:e,alt:n,title:r,src2:i,alt2:o,title2:s,link:a}=t.groups??{};return{src:(e||i||"").trim(),alt:(n||o||"").trim(),title:(r||s||"").trim(),link:(a||"").trim()}},toBlock:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=e?`}"`:""})`:"";return o&&i?`[${o}](${i})`:o},toPreview:t=>{const{src:e="",alt:n="",title:r="",link:i=""}=t,o=`<img src="${Qa(e)}" alt="${Qa(n)}" title="${Qa(r)}">`;return i?`<a href="${Qa(i)}">${o}</a>`:o}},YT=t=>{if(vp.has(t))return vp.get(t);const e={icon:"image",label:se(ue)("editor_components.image"),fields:[{name:"src",label:se(ue)("editor_components.src"),widget:"image"},{name:"alt",label:se(ue)("editor_components.alt"),required:!1},{name:"title",label:se(ue)("editor_components.title"),required:!1}]};return{image:{...WT,...e},"linked-image":{...d8,...e,fields:[...e.fields,{name:"link",label:se(ue)("editor_components.link"),required:!1}]}}[t]};var s_,JT;function ZT(){if(JT)return s_;JT=1;const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:s,create:a}=Object,{apply:c,construct:u}=typeof Reflect<"u"&&Reflect;o||(o=function(Se){return Se}),s||(s=function(Se){return Se}),c||(c=function(Se,Ue,Ie){return Se.apply(Ue,Ie)}),u||(u=function(Se,Ue){return new Se(...Ue)});const d=k(Array.prototype.forEach),f=k(Array.prototype.lastIndexOf),h=k(Array.prototype.pop),p=k(Array.prototype.push),g=k(Array.prototype.splice),m=k(String.prototype.toLowerCase),v=k(String.prototype.toString),b=k(String.prototype.match),y=k(String.prototype.replace),w=k(String.prototype.indexOf),S=k(String.prototype.trim),C=k(Object.prototype.hasOwnProperty),E=k(RegExp.prototype.test),$=x(TypeError);function k(Ae){return function(Se){Se instanceof RegExp&&(Se.lastIndex=0);for(var Ue=arguments.length,Ie=new Array(Ue>1?Ue-1:0),Ve=1;Ve<Ue;Ve++)Ie[Ve-1]=arguments[Ve];return c(Ae,Se,Ie)}}function x(Ae){return function(){for(var Se=arguments.length,Ue=new Array(Se),Ie=0;Ie<Se;Ie++)Ue[Ie]=arguments[Ie];return u(Ae,Ue)}}function A(Ae,Se){let Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;e&&e(Ae,null);let Ie=Se.length;for(;Ie--;){let Ve=Se[Ie];if(typeof Ve=="string"){const ye=Ue(Ve);ye!==Ve&&(n(Se)||(Se[Ie]=ye),Ve=ye)}Ae[Ve]=!0}return Ae}function I(Ae){for(let Se=0;Se<Ae.length;Se++)C(Ae,Se)||(Ae[Se]=null);return Ae}function P(Ae){const Se=a(null);for(const[Ue,Ie]of t(Ae))C(Ae,Ue)&&(Array.isArray(Ie)?Se[Ue]=I(Ie):Ie&&typeof Ie=="object"&&Ie.constructor===Object?Se[Ue]=P(Ie):Se[Ue]=Ie);return Se}function O(Ae,Se){for(;Ae!==null;){const Ie=i(Ae,Se);if(Ie){if(Ie.get)return k(Ie.get);if(typeof Ie.value=="function")return k(Ie.value)}Ae=r(Ae)}function Ue(){return null}return Ue}const L=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),U=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),V=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),W=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),J=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N=o(["#text"]),B=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),K=o(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Y=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Q=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ie=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ee=s(/<%[\w\W]*|[\w\W]*%>/gm),te=s(/\$\{[\w\W]*/gm),re=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),ce=s(/^aria-[\-\w]+$/),he=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pe=s(/^(?:\w+script|data):/i),me=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fe=s(/^html$/i),ge=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var _e=Object.freeze({__proto__:null,ARIA_ATTR:ce,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:ge,DATA_ATTR:re,DOCTYPE_NAME:fe,ERB_EXPR:ee,IS_ALLOWED_URI:he,IS_SCRIPT_OR_DATA:pe,MUSTACHE_EXPR:ie,TMPLIT_EXPR:te});const be={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ne=function(){return typeof window>"u"?null:window},$e=function(Se,Ue){if(typeof Se!="object"||typeof Se.createPolicy!="function")return null;let Ie=null;const Ve="data-tt-policy-suffix";Ue&&Ue.hasAttribute(Ve)&&(Ie=Ue.getAttribute(Ve));const ye="dompurify"+(Ie?"#"+Ie:"");try{return Se.createPolicy(ye,{createHTML(ke){return ke},createScriptURL(ke){return ke}})}catch{return console.warn("TrustedTypes policy "+ye+" could not be created."),null}},Ke=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function je(){let Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ne();const Se=ut=>je(ut);if(Se.version="3.2.6",Se.removed=[],!Ae||!Ae.document||Ae.document.nodeType!==be.document||!Ae.Element)return Se.isSupported=!1,Se;let{document:Ue}=Ae;const Ie=Ue,Ve=Ie.currentScript,{DocumentFragment:ye,HTMLTemplateElement:ke,Node:Le,Element:Qe,NodeFilter:Ze,NamedNodeMap:Ee=Ae.NamedNodeMap||Ae.MozNamedAttrMap,HTMLFormElement:ze,DOMParser:Je,trustedTypes:dt}=Ae,lt=Qe.prototype,vt=O(lt,"cloneNode"),zt=O(lt,"remove"),bn=O(lt,"nextSibling"),sn=O(lt,"childNodes"),Ct=O(lt,"parentNode");if(typeof ke=="function"){const ut=Ue.createElement("template");ut.content&&ut.content.ownerDocument&&(Ue=ut.content.ownerDocument)}let St,Jt="";const{implementation:Gt,createNodeIterator:Dn,createDocumentFragment:Sn,getElementsByTagName:an}=Ue,{importNode:_n}=Ie;let At=Ke();Se.isSupported=typeof t=="function"&&typeof Ct=="function"&&Gt&&Gt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Fr,ERB_EXPR:ni,TMPLIT_EXPR:Vi,DATA_ATTR:pi,ARIA_ATTR:xt,IS_SCRIPT_OR_DATA:En,ATTR_WHITESPACE:$n,CUSTOM_ELEMENT:sr}=_e;let{IS_ALLOWED_URI:Tr}=_e,Ot=null;const ar=A({},[...L,...F,...U,...W,...N]);let Rt=null;const Cr=A({},[...B,...K,...Y,...Q]);let Zt=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ar=null,gr=null,qn=!0,Dr=!0,Li=!1,gi=!0,mi=!1,ln=!0,ct=!1,$t=!1,gn=!1,yn=!1,vi=!1,Wi=!1,tr=!0,bi=!1;const Cs="user-content-";let Bl=!0,As=!1,nr={},mr=null;const Jo=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let WL=null;const YL=A({},["audio","video","img","source","image","track"]);let nx=null;const JL=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gm="http://www.w3.org/1998/Math/MathML",mm="http://www.w3.org/2000/svg",$s="http://www.w3.org/1999/xhtml";let Pu=$s,rx=!1,ix=null;const Mce=A({},[gm,mm,$s],v);let vm=A({},["mi","mo","mn","ms","mtext"]),bm=A({},["annotation-xml"]);const zce=A({},["title","style","font","a","script"]);let Nf=null;const Uce=["application/xhtml+xml","text/html"],jce="text/html";let vr=null,Nu=null;const Bce=Ue.createElement("form"),ZL=function(de){return de instanceof RegExp||de instanceof Function},ox=function(){let de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Nu&&Nu===de)){if((!de||typeof de!="object")&&(de={}),de=P(de),Nf=Uce.indexOf(de.PARSER_MEDIA_TYPE)===-1?jce:de.PARSER_MEDIA_TYPE,vr=Nf==="application/xhtml+xml"?v:m,Ot=C(de,"ALLOWED_TAGS")?A({},de.ALLOWED_TAGS,vr):ar,Rt=C(de,"ALLOWED_ATTR")?A({},de.ALLOWED_ATTR,vr):Cr,ix=C(de,"ALLOWED_NAMESPACES")?A({},de.ALLOWED_NAMESPACES,v):Mce,nx=C(de,"ADD_URI_SAFE_ATTR")?A(P(JL),de.ADD_URI_SAFE_ATTR,vr):JL,WL=C(de,"ADD_DATA_URI_TAGS")?A(P(YL),de.ADD_DATA_URI_TAGS,vr):YL,mr=C(de,"FORBID_CONTENTS")?A({},de.FORBID_CONTENTS,vr):Jo,Ar=C(de,"FORBID_TAGS")?A({},de.FORBID_TAGS,vr):P({}),gr=C(de,"FORBID_ATTR")?A({},de.FORBID_ATTR,vr):P({}),nr=C(de,"USE_PROFILES")?de.USE_PROFILES:!1,qn=de.ALLOW_ARIA_ATTR!==!1,Dr=de.ALLOW_DATA_ATTR!==!1,Li=de.ALLOW_UNKNOWN_PROTOCOLS||!1,gi=de.ALLOW_SELF_CLOSE_IN_ATTR!==!1,mi=de.SAFE_FOR_TEMPLATES||!1,ln=de.SAFE_FOR_XML!==!1,ct=de.WHOLE_DOCUMENT||!1,yn=de.RETURN_DOM||!1,vi=de.RETURN_DOM_FRAGMENT||!1,Wi=de.RETURN_TRUSTED_TYPE||!1,gn=de.FORCE_BODY||!1,tr=de.SANITIZE_DOM!==!1,bi=de.SANITIZE_NAMED_PROPS||!1,Bl=de.KEEP_CONTENT!==!1,As=de.IN_PLACE||!1,Tr=de.ALLOWED_URI_REGEXP||he,Pu=de.NAMESPACE||$s,vm=de.MATHML_TEXT_INTEGRATION_POINTS||vm,bm=de.HTML_INTEGRATION_POINTS||bm,Zt=de.CUSTOM_ELEMENT_HANDLING||{},de.CUSTOM_ELEMENT_HANDLING&&ZL(de.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Zt.tagNameCheck=de.CUSTOM_ELEMENT_HANDLING.tagNameCheck),de.CUSTOM_ELEMENT_HANDLING&&ZL(de.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Zt.attributeNameCheck=de.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),de.CUSTOM_ELEMENT_HANDLING&&typeof de.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Zt.allowCustomizedBuiltInElements=de.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),mi&&(Dr=!1),vi&&(yn=!0),nr&&(Ot=A({},N),Rt=[],nr.html===!0&&(A(Ot,L),A(Rt,B)),nr.svg===!0&&(A(Ot,F),A(Rt,K),A(Rt,Q)),nr.svgFilters===!0&&(A(Ot,U),A(Rt,K),A(Rt,Q)),nr.mathMl===!0&&(A(Ot,W),A(Rt,Y),A(Rt,Q))),de.ADD_TAGS&&(Ot===ar&&(Ot=P(Ot)),A(Ot,de.ADD_TAGS,vr)),de.ADD_ATTR&&(Rt===Cr&&(Rt=P(Rt)),A(Rt,de.ADD_ATTR,vr)),de.ADD_URI_SAFE_ATTR&&A(nx,de.ADD_URI_SAFE_ATTR,vr),de.FORBID_CONTENTS&&(mr===Jo&&(mr=P(mr)),A(mr,de.FORBID_CONTENTS,vr)),Bl&&(Ot["#text"]=!0),ct&&A(Ot,["html","head","body"]),Ot.table&&(A(Ot,["tbody"]),delete Ar.tbody),de.TRUSTED_TYPES_POLICY){if(typeof de.TRUSTED_TYPES_POLICY.createHTML!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof de.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');St=de.TRUSTED_TYPES_POLICY,Jt=St.createHTML("")}else St===void 0&&(St=$e(dt,Ve)),St!==null&&typeof Jt=="string"&&(Jt=St.createHTML(""));o&&o(de),Nu=de}},XL=A({},[...F,...U,...V]),QL=A({},[...W,...J]),qce=function(de){let Be=Ct(de);(!Be||!Be.tagName)&&(Be={namespaceURI:Pu,tagName:"template"});const at=m(de.tagName),In=m(Be.tagName);return ix[de.namespaceURI]?de.namespaceURI===mm?Be.namespaceURI===$s?at==="svg":Be.namespaceURI===gm?at==="svg"&&(In==="annotation-xml"||vm[In]):!!XL[at]:de.namespaceURI===gm?Be.namespaceURI===$s?at==="math":Be.namespaceURI===mm?at==="math"&&bm[In]:!!QL[at]:de.namespaceURI===$s?Be.namespaceURI===mm&&!bm[In]||Be.namespaceURI===gm&&!vm[In]?!1:!QL[at]&&(zce[at]||!XL[at]):!!(Nf==="application/xhtml+xml"&&ix[de.namespaceURI]):!1},Zo=function(de){p(Se.removed,{element:de});try{Ct(de).removeChild(de)}catch{zt(de)}},Lu=function(de,Be){try{p(Se.removed,{attribute:Be.getAttributeNode(de),from:Be})}catch{p(Se.removed,{attribute:null,from:Be})}if(Be.removeAttribute(de),de==="is")if(yn||vi)try{Zo(Be)}catch{}else try{Be.setAttribute(de,"")}catch{}},eO=function(de){let Be=null,at=null;if(gn)de="<remove></remove>"+de;else{const lr=b(de,/^[\r\n\t ]+/);at=lr&&lr[0]}Nf==="application/xhtml+xml"&&Pu===$s&&(de='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+de+"</body></html>");const In=St?St.createHTML(de):de;if(Pu===$s)try{Be=new Je().parseFromString(In,Nf)}catch{}if(!Be||!Be.documentElement){Be=Gt.createDocument(Pu,"template",null);try{Be.documentElement.innerHTML=rx?Jt:In}catch{}}const Mr=Be.body||Be.documentElement;return de&&at&&Mr.insertBefore(Ue.createTextNode(at),Mr.childNodes[0]||null),Pu===$s?an.call(Be,ct?"html":"body")[0]:ct?Be.documentElement:Mr},tO=function(de){return Dn.call(de.ownerDocument||de,de,Ze.SHOW_ELEMENT|Ze.SHOW_COMMENT|Ze.SHOW_TEXT|Ze.SHOW_PROCESSING_INSTRUCTION|Ze.SHOW_CDATA_SECTION,null)},sx=function(de){return de instanceof ze&&(typeof de.nodeName!="string"||typeof de.textContent!="string"||typeof de.removeChild!="function"||!(de.attributes instanceof Ee)||typeof de.removeAttribute!="function"||typeof de.setAttribute!="function"||typeof de.namespaceURI!="string"||typeof de.insertBefore!="function"||typeof de.hasChildNodes!="function")},nO=function(de){return typeof Le=="function"&&de instanceof Le};function Is(ut,de,Be){d(ut,at=>{at.call(Se,de,Be,Nu)})}const rO=function(de){let Be=null;if(Is(At.beforeSanitizeElements,de,null),sx(de))return Zo(de),!0;const at=vr(de.nodeName);if(Is(At.uponSanitizeElement,de,{tagName:at,allowedTags:Ot}),ln&&de.hasChildNodes()&&!nO(de.firstElementChild)&&E(/<[/\w!]/g,de.innerHTML)&&E(/<[/\w!]/g,de.textContent)||de.nodeType===be.progressingInstruction||ln&&de.nodeType===be.comment&&E(/<[/\w]/g,de.data))return Zo(de),!0;if(!Ot[at]||Ar[at]){if(!Ar[at]&&oO(at)&&(Zt.tagNameCheck instanceof RegExp&&E(Zt.tagNameCheck,at)||Zt.tagNameCheck instanceof Function&&Zt.tagNameCheck(at)))return!1;if(Bl&&!mr[at]){const In=Ct(de)||de.parentNode,Mr=sn(de)||de.childNodes;if(Mr&&In){const lr=Mr.length;for(let _i=lr-1;_i>=0;--_i){const Ps=vt(Mr[_i],!0);Ps.__removalCount=(de.__removalCount||0)+1,In.insertBefore(Ps,bn(de))}}}return Zo(de),!0}return de instanceof Qe&&!qce(de)||(at==="noscript"||at==="noembed"||at==="noframes")&&E(/<\/no(script|embed|frames)/i,de.innerHTML)?(Zo(de),!0):(mi&&de.nodeType===be.text&&(Be=de.textContent,d([Fr,ni,Vi],In=>{Be=y(Be,In," ")}),de.textContent!==Be&&(p(Se.removed,{element:de.cloneNode()}),de.textContent=Be)),Is(At.afterSanitizeElements,de,null),!1)},iO=function(de,Be,at){if(tr&&(Be==="id"||Be==="name")&&(at in Ue||at in Bce))return!1;if(!(Dr&&!gr[Be]&&E(pi,Be))){if(!(qn&&E(xt,Be))){if(!Rt[Be]||gr[Be]){if(!(oO(de)&&(Zt.tagNameCheck instanceof RegExp&&E(Zt.tagNameCheck,de)||Zt.tagNameCheck instanceof Function&&Zt.tagNameCheck(de))&&(Zt.attributeNameCheck instanceof RegExp&&E(Zt.attributeNameCheck,Be)||Zt.attributeNameCheck instanceof Function&&Zt.attributeNameCheck(Be))||Be==="is"&&Zt.allowCustomizedBuiltInElements&&(Zt.tagNameCheck instanceof RegExp&&E(Zt.tagNameCheck,at)||Zt.tagNameCheck instanceof Function&&Zt.tagNameCheck(at))))return!1}else if(!nx[Be]){if(!E(Tr,y(at,$n,""))){if(!((Be==="src"||Be==="xlink:href"||Be==="href")&&de!=="script"&&w(at,"data:")===0&&WL[de])){if(!(Li&&!E(En,y(at,$n,"")))){if(at)return!1}}}}}}return!0},oO=function(de){return de!=="annotation-xml"&&b(de,sr)},sO=function(de){Is(At.beforeSanitizeAttributes,de,null);const{attributes:Be}=de;if(!Be||sx(de))return;const at={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Rt,forceKeepAttr:void 0};let In=Be.length;for(;In--;){const Mr=Be[In],{name:lr,namespaceURI:_i,value:Ps}=Mr,Lf=vr(lr),ax=Ps;let zr=lr==="value"?ax:S(ax);if(at.attrName=Lf,at.attrValue=zr,at.keepAttr=!0,at.forceKeepAttr=void 0,Is(At.uponSanitizeAttribute,de,at),zr=at.attrValue,bi&&(Lf==="id"||Lf==="name")&&(Lu(lr,de),zr=Cs+zr),ln&&E(/((--!?|])>)|<\/(style|title)/i,zr)){Lu(lr,de);continue}if(at.forceKeepAttr)continue;if(!at.keepAttr){Lu(lr,de);continue}if(!gi&&E(/\/>/i,zr)){Lu(lr,de);continue}mi&&d([Fr,ni,Vi],lO=>{zr=y(zr,lO," ")});const aO=vr(de.nodeName);if(!iO(aO,Lf,zr)){Lu(lr,de);continue}if(St&&typeof dt=="object"&&typeof dt.getAttributeType=="function"&&!_i)switch(dt.getAttributeType(aO,Lf)){case"TrustedHTML":{zr=St.createHTML(zr);break}case"TrustedScriptURL":{zr=St.createScriptURL(zr);break}}if(zr!==ax)try{_i?de.setAttributeNS(_i,lr,zr):de.setAttribute(lr,zr),sx(de)?Zo(de):h(Se.removed)}catch{Lu(lr,de)}}Is(At.afterSanitizeAttributes,de,null)},Hce=function ut(de){let Be=null;const at=tO(de);for(Is(At.beforeSanitizeShadowDOM,de,null);Be=at.nextNode();)Is(At.uponSanitizeShadowNode,Be,null),rO(Be),sO(Be),Be.content instanceof ye&&ut(Be.content);Is(At.afterSanitizeShadowDOM,de,null)};return Se.sanitize=function(ut){let de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=null,at=null,In=null,Mr=null;if(rx=!ut,rx&&(ut="<!-->"),typeof ut!="string"&&!nO(ut))if(typeof ut.toString=="function"){if(ut=ut.toString(),typeof ut!="string")throw $("dirty is not a string, aborting")}else throw $("toString is not a function");if(!Se.isSupported)return ut;if($t||ox(de),Se.removed=[],typeof ut=="string"&&(As=!1),As){if(ut.nodeName){const Ps=vr(ut.nodeName);if(!Ot[Ps]||Ar[Ps])throw $("root node is forbidden and cannot be sanitized in-place")}}else if(ut instanceof Le)Be=eO("<!---->"),at=Be.ownerDocument.importNode(ut,!0),at.nodeType===be.element&&at.nodeName==="BODY"||at.nodeName==="HTML"?Be=at:Be.appendChild(at);else{if(!yn&&!mi&&!ct&&ut.indexOf("<")===-1)return St&&Wi?St.createHTML(ut):ut;if(Be=eO(ut),!Be)return yn?null:Wi?Jt:""}Be&&gn&&Zo(Be.firstChild);const lr=tO(As?ut:Be);for(;In=lr.nextNode();)rO(In),sO(In),In.content instanceof ye&&Hce(In.content);if(As)return ut;if(yn){if(vi)for(Mr=Sn.call(Be.ownerDocument);Be.firstChild;)Mr.appendChild(Be.firstChild);else Mr=Be;return(Rt.shadowroot||Rt.shadowrootmode)&&(Mr=_n.call(Ie,Mr,!0)),Mr}let _i=ct?Be.outerHTML:Be.innerHTML;return ct&&Ot["!doctype"]&&Be.ownerDocument&&Be.ownerDocument.doctype&&Be.ownerDocument.doctype.name&&E(fe,Be.ownerDocument.doctype.name)&&(_i="<!DOCTYPE "+Be.ownerDocument.doctype.name+`>
|
|
148
148
|
`+_i),mi&&d([Fr,ni,Vi],Ps=>{_i=y(_i,Ps," ")}),St&&Wi?St.createHTML(_i):_i},Se.setConfig=function(){let ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ox(ut),$t=!0},Se.clearConfig=function(){Nu=null,$t=!1},Se.isValidAttribute=function(ut,de,Be){Nu||ox({});const at=vr(ut),In=vr(de);return iO(at,In,Be)},Se.addHook=function(ut,de){typeof de=="function"&&p(At[ut],de)},Se.removeHook=function(ut,de){if(de!==void 0){const Be=f(At[ut],de);return Be===-1?void 0:g(At[ut],Be,1)[0]}return h(At[ut])},Se.removeHooks=function(ut){At[ut]=[]},Se.removeAllHooks=function(){At=Ke()},Se}var Ge=je();return s_=Ge,s_}var a_,XT;function f8(){return XT||(XT=1,a_=window.DOMPurify||(window.DOMPurify=ZT().default||ZT())),a_}var bp=f8();const Ei=Yi(bp);function l_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var el=l_();function QT(t){el=t}var vd={exec:()=>null};function Qt(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Hr.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,e)};return r}var Hr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},h8=/^(?:[ \t]*(?:\n|$))+/,p8=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,g8=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,bd=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,m8=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,c_=/(?:[*+-]|\d{1,9}[.)])/,eC=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tC=Qt(eC).replace(/bull/g,c_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),v8=Qt(eC).replace(/bull/g,c_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),u_=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,b8=/^[^\n]+/,d_=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,_8=Qt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",d_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),y8=Qt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c_).getRegex(),_p="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",f_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,w8=Qt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",f_).replace("tag",_p).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nC=Qt(u_).replace("hr",bd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_p).getRegex(),x8=Qt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nC).getRegex(),h_={blockquote:x8,code:p8,def:_8,fences:g8,heading:m8,hr:bd,html:w8,lheading:tC,list:y8,newline:h8,paragraph:nC,table:vd,text:b8},rC=Qt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",bd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_p).getRegex(),k8={...h_,lheading:v8,table:rC,paragraph:Qt(u_).replace("hr",bd).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rC).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_p).getRegex()},S8={...h_,html:Qt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",f_).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Qt(u_).replace("hr",bd).replace("heading",` *#{1,6} *[^
|
|
149
149
|
]`).replace("lheading",tC).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},E8=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,T8=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,iC=/^( {2,}|\\)\n(?!\s*$)/,C8=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,yp=/[\p{P}\p{S}]/u,p_=/[\s\p{P}\p{S}]/u,oC=/[^\s\p{P}\p{S}]/u,A8=Qt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,p_).getRegex(),sC=/(?!~)[\p{P}\p{S}]/u,$8=/(?!~)[\s\p{P}\p{S}]/u,I8=/(?:[^\s\p{P}\p{S}]|~)/u,P8=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,aC=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,N8=Qt(aC,"u").replace(/punct/g,yp).getRegex(),L8=Qt(aC,"u").replace(/punct/g,sC).getRegex(),lC="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",O8=Qt(lC,"gu").replace(/notPunctSpace/g,oC).replace(/punctSpace/g,p_).replace(/punct/g,yp).getRegex(),R8=Qt(lC,"gu").replace(/notPunctSpace/g,I8).replace(/punctSpace/g,$8).replace(/punct/g,sC).getRegex(),F8=Qt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,oC).replace(/punctSpace/g,p_).replace(/punct/g,yp).getRegex(),D8=Qt(/\\(punct)/,"gu").replace(/punct/g,yp).getRegex(),M8=Qt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),z8=Qt(f_).replace("(?:-->|$)","-->").getRegex(),U8=Qt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",z8).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),wp=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,j8=Qt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",wp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),cC=Qt(/^!?\[(label)\]\[(ref)\]/).replace("label",wp).replace("ref",d_).getRegex(),uC=Qt(/^!?\[(ref)\](?:\[\])?/).replace("ref",d_).getRegex(),B8=Qt("reflink|nolink(?!\\()","g").replace("reflink",cC).replace("nolink",uC).getRegex(),g_={_backpedal:vd,anyPunctuation:D8,autolink:M8,blockSkip:P8,br:iC,code:T8,del:vd,emStrongLDelim:N8,emStrongRDelimAst:O8,emStrongRDelimUnd:F8,escape:E8,link:j8,nolink:uC,punctuation:A8,reflink:cC,reflinkSearch:B8,tag:U8,text:C8,url:vd},q8={...g_,link:Qt(/^!?\[(label)\]\((.*?)\)/).replace("label",wp).getRegex(),reflink:Qt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wp).getRegex()},m_={...g_,emStrongRDelimAst:R8,emStrongLDelim:L8,url:Qt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},H8={...m_,br:Qt(iC).replace("{2,}","*").getRegex(),text:Qt(m_.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xp={normal:h_,gfm:k8,pedantic:S8},_d={normal:g_,gfm:m_,breaks:H8,pedantic:q8},G8={"&":"&","<":"<",">":">",'"':""","'":"'"},dC=t=>G8[t];function No(t,e){if(e){if(Hr.escapeTest.test(t))return t.replace(Hr.escapeReplace,dC)}else if(Hr.escapeTestNoEncode.test(t))return t.replace(Hr.escapeReplaceNoEncode,dC);return t}function fC(t){try{t=encodeURI(t).replace(Hr.percentDecode,"%")}catch{return null}return t}function hC(t,e){let n=t.replace(Hr.findPipe,(o,s,a)=>{let c=!1,u=s;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Hr.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(Hr.slashPipe,"|");return r}function yd(t,e,n){let r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function K8(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function pC(t,e,n,r,i){let o=e.href,s=e.title||null,a=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,c}function V8(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let i=r[1];return e.split(`
|
|
150
150
|
`).map(o=>{let s=o.match(n.other.beginningSpace);if(s===null)return o;let[a]=s;return a.length>=i.length?o.slice(i.length):o}).join(`
|
|
@@ -237,7 +237,7 @@ ${o}`,n),this.line=r,this.column=i,this.codeblock=o}}function D5(t,e){let n=0;fo
|
|
|
237
237
|
`}else i+=d,i+=" = ",i+=O_(t[c],u,n,r),i+=`
|
|
238
238
|
`}}return`${i}
|
|
239
239
|
${o}`.trim()}function Q5(t,{maxDepth:e=1e3,numbersAsFloat:n=!1}={}){if(Ed(t)!=="object")throw new TypeError("stringify can only be called with an object");return R_(t,"",e,n)}const zC=t=>JSON.parse(t),UC=t=>js(W5(t)),jC=t=>sd.parse(t),eq=t=>t.startsWith("+++")?"toml-frontmatter":t.startsWith("{")?"json-frontmatter":"yaml-frontmatter",tq=({collection:t,collectionFile:e,format:n,text:r})=>{const{_file:{format:i,fmDelimiters:o}}=e??t,[s,a]=(i==="frontmatter"?$A({format:n,delimiter:o}):o)??["---","---"],c=Kt(s),u=Kt(a),d=new RegExp(`^${c}\\n(?:(?<head>.*?)\\n)?${u}$(?:\\n(?<body>.+))?`,"ms"),{head:f,body:h}=r.match(d)?.groups??{};if(!f&&!h)return{body:r};let p={};return n==="yaml-frontmatter"&&(p=jC(f)),n==="toml-frontmatter"&&(p=UC(f)),n==="json-frontmatter"&&(p=zC(`{${f}}`)),{...p,body:h}},nq=async({text:t="",path:e,folder:{collectionName:n,fileName:r}})=>{const i=Kr(n),o=i&&r?Dc(i,r):void 0;if(!i)throw new Error("Collection not found");if(r&&!o)throw new Error("Collection file not found");t=t.trim().replace(/\r\n?/g,`
|
|
240
|
-
`);let{_file:{format:s}}=o??i;const a=zp.get(s)?.parser;if(a)return a(t);try{if(s==="yaml"||s==="yml")return jC(t);if(s==="toml")return UC(t);if(s==="json")return zC(t);if(s==="frontmatter"&&(s=eq(t)),/^(?:yaml|toml|json)-frontmatter$/.test(s))return tq({collection:i,collectionFile:o,format:s,text:t})}catch(c){throw new Error(`${e} could not be parsed due to ${c.name}: ${c.message}`)}throw new Error(`${e} could not be parsed due to an unknown format: ${s}`)},Td=({field:t,fields:e,types:n})=>{const r=!!t,i=!!e,o=!!n;return{hasSingleSubField:r,hasMultiSubFields:i,hasVariableTypes:o,hasSubFields:r||i||o}},BC=t=>t.length===1&&t[0].widget==="list"&&t[0].root===!0,rq=({collectionName:t,fileName:e,keyPath:n,valueMap:r,isIndexFile:i=!1,locale:o,summaryTemplate:s,hasSingleSubField:a,index:c})=>{const u={collectionName:t,fileName:e,keyPath:"",valueMap:r,isIndexFile:i},d=`${n}.${c}`;return s?s.replaceAll(/{{(.+?)}}/g,(f,h)=>{const[p,...g]=h.split(/\s*\|\s*/),m=p.replace(/^fields\./,""),v=`${d}.${m}`;if(a){const y=mn({...u,keyPath:n})?.field;if(!y||y.name!==m)return""}return Uc({...u,keyPath:a?d:v,locale:o,transformations:g})}):a?r[d]:kC({valueMap:r,locale:o,keyPath:d,keyPathRegex:new RegExp(`^${Kt(n)}\\.${c}[\\b\\.]`),getFieldArgs:u})},qC=t=>/\/_index(?:\.[\w-]+)?\.md$/.test(t),F_=({subPath:t,subPathTemplate:e})=>{if(e?.includes("{{slug}}")){let n="",r=e;for(;r.length>0;){const o=r.indexOf("{{");if(o===-1){n+=Kt(r);break}o>0&&(n+=Kt(r.substring(0,o)));const s=r.indexOf("}}",o);if(s===-1){n+=Kt(r);break}r.substring(o,s+2)==="{{slug}}"?n+="(.+)":n+="[^/]+",r=r.substring(s+2)}const[,i]=t.match(new RegExp(`^${n}$`))??[];if(i)return i}return t},iq=async(t,e)=>{try{return await nq(t)}catch(n){console.error(n),e.push(n);return}},oq=(t,e,n)=>{if(BC(e)){const r=e[0].name;return n?!Xt(t)||!Object.values(t).every(Array.isArray)?void 0:Object.fromEntries(Object.entries(t).map(([i,o])=>[i,{[r]:o}])):Array.isArray(t)?{[r]:t}:void 0}return Xt(t)?t:void 0},sq=(t,e,n,r,i)=>r?.split("/").pop()==="_index"&&/\/_index(?:\.[\w-]+)?\.[\w]+$/.test(t)&&i!=="md"?!0:qC(t)?!(e||ci(n)?.name==="_index"||r?.split("/").pop()==="_index"&&i==="md"):!1,aq=(t,e,n,r,i)=>{const{path:o,folder:{filePathMap:s}}=t;if(e){if(i){const[d,f]=Object.entries(s??{}).find(([,h])=>h===o)??[];return{subPath:f,locale:d}}return{subPath:o,locale:void 0}}if(!n)return{subPath:void 0,locale:void 0};const a=o.match(n);if(!a?.groups)return{subPath:void 0,locale:void 0};const{subPath:c,locale:u=r}=a.groups;return{subPath:c,locale:u}},lq=(t,e,n,r,i,o)=>{const s=r||F_({subPath:i,subPathTemplate:o});t.slug=s,t.locales._default={slug:s,path:n,content:no(e)}},cq=(t,e,n,r,i,o,s)=>{const a=r||F_({subPath:i,subPathTemplate:o});t.slug=a,t.locales=Object.fromEntries(s.filter(c=>c in e).map(c=>[c,{slug:a,path:n,content:no(e[c])}]))},uq=(t,e,n,r,i,o,s,a,c,u,d)=>{const f=u&&typeof e[u]=="string"?e[u]:void 0,h=r||F_({subPath:i,subPathTemplate:o}),p={slug:h,path:n,content:no(e)},g=`${c}/${f??h}`,m=d.find(v=>v.id===g);return m?(m.locales[s]=p,s===a&&(m.slug=h,m.subPath=i),!0):(t.id=g,t.locales[s]=p,s===a&&(t.slug=h),!1)},dq=async({file:t,entries:e,errors:n})=>{const r=await iq(t,n);if(!r)return;const{path:i,meta:o={},folder:{collectionName:s,fileName:a}}=t,c=Kr(s),u=c&&a?Dc(c,a):void 0;if(!c||a&&!u)return;const{fields:d=[],_file:{fullPathRegEx:f,subPath:h,extension:p},_i18n:{i18nEnabled:g,allLocales:m,defaultLocale:v,structureMap:{i18nSingleFile:b,i18nMultiFile:y,i18nMultiFolder:w,i18nRootMultiFolder:S},canonicalSlug:{key:C}}}=u??c,E=oq(r,d,b);if(!E||sq(i,a,c,h,p))return;const $=y||w||S,{subPath:k,locale:x}=aq(t,a,f,v,$);if(!k||$&&!x)return;const A={id:"",slug:"",subPath:k,locales:{},...o};if(!g)lq(A,E,i,a,k,h);else if(b)cq(A,E,i,a,k,h,m);else if($&&x&&uq(A,E,i,a,k,h,x,v,s,C,e))return;e.push(A)},HC=async t=>{const e=[],n=[];return await Promise.all(t.map(r=>dq({file:r,entries:e,errors:n}))),{entries:e.filter(r=>(r.id=oi(),!!r.slug&&!!Object.keys(r.locales).length)),errors:n}},D_=t=>{const e=[],n=[],r=[];t.forEach(o=>{const{path:s,name:a}=o;if(a.startsWith("."))NC.test(a)&&r.push({...o,type:"config"});else{const[c]=zT(s),[u]=jh(s);c&&e.push({...o,type:"entry",folder:c}),u&&!e.find(d=>d.path===s)&&!qC(s)&&n.push({...o,type:"asset",folder:u})}});const i=[...e,...n,...r];return{entryFiles:e,assetFiles:n,configFiles:r,allFiles:i,count:i.length}},GC=async(t,e,n="file")=>{const r=tn(e??"");let i=t;if(!r){if(n==="directory")return i;throw new Error("Path is required for file handle retrieval")}const o=r.split("/"),s=o.length-1,a=!0;for await(const[c,u]of o.entries())i=await(c===s&&n==="file"?i.getFileHandle(u,{create:a}):i.getDirectoryHandle(u,{create:a}));return i},KC=(t,e)=>GC(t,e,"file"),Cd=(t,e)=>GC(t,e,"directory"),VC=t=>jS(t,e=>e.replace(/{{.+?}}/,".+?")),WC=async(t,e)=>{const{rootDirHandle:n,scanningPaths:r,scanningPathsRegEx:i,fileList:o}=e;for await(const[s,a]of t.entries()){if(s.startsWith(".")&&!NC.test(s))continue;const c=(await n.resolve(a))?.join("/")??"",u=i.some(d=>d.test(c));if(a.kind==="file"){if(!u)continue;try{let d=await a.getFile();const{type:f,lastModified:h}=d;d=new File([d],d.name,{type:f,lastModified:h}),o.push({file:d,path:c})}catch(d){console.error(d)}}if(a.kind==="directory"){const d=VC(c);if(!u&&!r.some(f=>d.test(f)))continue;await WC(a,e)}}},fq=async({file:t,path:e})=>({file:t,path:e.normalize(),name:t.name.normalize(),size:t.size,sha:await Ka(t)}),hq=async t=>{const e=[],n=ad([...se(r_).map(({filePathMap:r,folderPathMap:i})=>Object.values(r||(i??{}))).flat(1),...se(Ks).filter(({internalPath:r})=>r!==void 0).map(({internalPath:r})=>r)].map(r=>tn(r??"")));return await WC(t,{rootDirHandle:t,scanningPaths:n,scanningPathsRegEx:n.map(VC),fileList:e}),Promise.all(e.map(fq))},pq=async t=>{const{name:e,file:n}=t;if(e!==".gitkeep")try{t.text=await rF(n)}catch(r){t.text="",console.error(r)}},YC=async t=>{const{entryFiles:e,assetFiles:n,configFiles:r}=D_(await hq(t));await Promise.all([...e,...r].map(pq));const{entries:i,errors:o}=await HC(e);li.set(i),Un.set(PC(n)),$_.set(r),i_.set(o),Fc.set(!0)},gq=async({rootDirHandle:t,previousPath:e,path:n})=>{const{dirname:r,basename:i}=fn(n),o=await KC(t,e);return r&&r!==fn(e).dirname?await o.move(await Cd(t,r),i):await o.move(i),o},mq=async({rootDirHandle:t,fileHandle:e,path:n,data:r})=>{e??=await KC(t,n);const i=await e.createWritable?.();try{await i?.write(r)}catch{}finally{try{await i?.close()}catch{}}return e.getFile()},vq=async(t,e)=>{let n=await Cd(t,e.join("/"));for(;;){const r=[];for await(const o of n.keys())r.push(o);if(r.length>1||!e.length)break;const i=e.pop();n=await Cd(t,e.join("/")),await n.removeEntry(i)}},bq=async({rootDirHandle:t,path:e})=>{const{dirname:n="",basename:r}=fn(tn(e));await(await Cd(t,n)).removeEntry(r),n&&await vq(t,n.split("/"))},_q=async(t,{action:e,path:n,previousPath:r,data:i})=>{let o;return e==="move"&&r&&(o=await gq({rootDirHandle:t,previousPath:r,path:n})),["create","update","move"].includes(e)&&i?mq({rootDirHandle:t,fileHandle:o,path:n,data:i}):(e==="delete"&&await bq({rootDirHandle:t,path:n}),null)},JC=async(t,e)=>{const n=await Promise.all(e.map(async r=>{const{path:i,data:o}=r;let s=null;if(t)try{s=await _q(t,r)}catch(a){console.error(a)}if(!s)if(o!==void 0)s=vb(o);else return null;return[i,{file:s,sha:await Ka(s)}]}));return{sha:await Ka(new Date().toJSON()),files:Object.fromEntries(n.filter(r=>!!r))}},ZC="local",yq="Local Repository";let M_;const wq={service:"",label:"",owner:"",repo:"",branch:""},XC=new Proxy({},{get:(t,e)=>(M_??wq)[e]}),z_="root_dir_handle";let Pp,U_;const xq=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await Pp?.get(z_)??null;if(n)if(await n.requestPermission({mode:"readwrite"})!=="granted")n=null;else try{await n.entries().next()}catch(r){n=null,console.error(r)}return!n&&e&&(n=await window.showDirectoryPicker(),n&&(await n.getDirectoryHandle(".git"),await Pp?.set(z_,n))),n},kq={isGit:!1,name:ZC,label:yq,repository:XC,init:()=>{const{name:t}=se(Nt).backend;M_=Id[t]?.init?.();const{databaseName:e}=M_??{};return Pp=e?new Co(e,"file-system-handles"):null,XC},signIn:async({auto:t=!1})=>{const e=await xq({showPicker:!t});if(e)U_=e;else throw new Error("Directory handle could not be acquired");return{backendName:ZC}},signOut:async()=>{await Pp?.delete(z_)},fetchFiles:async()=>{await YC(U_)},commitChanges:async t=>JC(U_,t)},Sq="sveltia-cms-test",QC="test-repo",Eq="Test";let Np;const Tq={isGit:!1,name:QC,label:Eq,init:()=>{},signIn:async()=>{try{Np=await Cd(await navigator.storage.getDirectory(),Sq)}catch{}return{backendName:QC}},signOut:async()=>{},fetchFiles:async()=>{Np?await YC(Np):Fc.set(!0)},commitChanges:async t=>JC(Np,t)},rl="gitea",eA="Gitea / Forgejo",tA="https://gitea.com/api/v1",Cq="https://gitea.com",Aq="login/oauth/authorize",$q=1.24,Iq=12,Kn=it();Kn.subscribe(t=>{(async()=>{try{t?await ai.set("sveltia-cms.user",t):t===null&&await ai.delete("sveltia-cms.user")}catch{}})()});const Ad=async(t,e={},{responseType:n="json",refreshAccessToken:r=void 0}={})=>{let i;e.cache="no-cache",e.headers=new Headers(e.headers),n==="json"&&e.headers.set("Accept","application/json"),e.method==="POST"&&Xt(e.body)&&(e.headers.set("Content-Type","application/json"),e.body=JSON.stringify(e.body));try{i=await fetch(t,e)}catch(u){throw new Error("Failed to send the request",{cause:u})}if(n==="raw")return i;const{ok:o,status:s}=i;let a;try{if(o&&n==="blob")return i.blob();if(o&&n==="text")return i.text();a=await i.json()}catch(u){throw new Error("Failed to parse the response",{cause:u})}if(o&&!(t.endsWith("/graphql")&&Xt(a)&&a.errors))return a;if(s===401&&r){const[u]=e.headers.get("Authorization")?.split(" ")??["token"],{token:d}=await r();return e.headers.set("Authorization",`${u} ${d}`),Ad(t,e,{responseType:n})}if(!Xt(a))throw new Error("Server responded with an error",{cause:{status:s}});let c="";throw typeof a.error=="string"&&(c=a.error),typeof a.message=="string"&&(c=a.message),Array.isArray(a.errors)&&(typeof a.errors[0]=="string"&&(c=a.errors.join(", ")),Xt(a.errors[0])&&typeof a.errors[0].message=="string"&&(c=a.errors.map(u=>u.message).join(", "))),new Error("Server responded with an error",{cause:{status:s,message:c}})},il={...{clientId:"",authURL:"",tokenURL:"",authScheme:"token",restBaseURL:"",graphqlBaseURL:""}},$d={},Pq=async({clientId:t,tokenURL:e,refreshToken:n})=>{let r,i="";try{r=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({grant_type:"refresh_token",client_id:t,refresh_token:n})})}catch{}if(!r?.ok)throw new Error(se(ue)("sign_in_error.TOKEN_REFRESH_FAILED"));return{access_token:i,refresh_token:n}=await r.json(),Kn.update(o=>o&&{...o,token:i,refreshToken:n}),{token:i,refreshToken:n}},Xn=async(t,{method:e="GET",headers:n={},body:r=null,isGraphQL:i=!1,responseType:o="json",token:s=void 0,refreshToken:a=void 0}={})=>{const{clientId:c,tokenURL:u,restBaseURL:d,graphqlBaseURL:f,authScheme:h="token"}=il,p=se(Kn),g=i?f:d;return s??=p?.token,a??=p?.refreshToken,n.Authorization=`${h} ${s}`,Ad(`${g}${t}`,{method:e,headers:n,body:r},{responseType:o,refreshAccessToken:a?()=>Pq({clientId:c,tokenURL:u,refreshToken:a}):void 0})},fs=async(t,e={})=>{t=t.replace(/\n\s*/g," "),Object.entries($d).forEach(([r,i])=>{t.includes(`$${r}`)&&(e[r]??=i)});const{data:n}=await Xn("",{method:"POST",body:{query:t,variables:e},isGraphQL:!0});return n},Nq=async({token:t,refreshToken:e})=>{const{id:n,full_name:r,login:i,email:o,avatar_url:s,html_url:a}=await Xn("/user",{token:t,refreshToken:e}),c=se(Kn);return c?.token&&c.token!==t&&(t=c.token,e=c.refreshToken),{backendName:rl,id:n,name:r,login:i,email:o,avatarURL:s,profileURL:a,token:t,refreshToken:e}},nA=it(!1),Lq=({authURL:t})=>{const{availHeight:r,availWidth:i}=window.screen,o=r/2-800/2,s=i/2-600/2;return window.open(t,"auth",`width=600,height=800,top=${o},left=${s}`)},rA=async({backendName:t,authURL:e})=>{const n=Lq({authURL:e});return new Promise((r,i)=>{const o=t==="github"?setInterval(()=>{n?.closed&&(clearInterval(o),i(Object.assign(new Error("Authentication aborted"),{name:"AbortError"})))},1e3):0,s=({origin:a,data:c})=>{if(a!==new URL(e).origin||typeof c!="string")return;const u=t;if(c===`authorizing:${u}`){n?.postMessage(c,a);return}const{result:d}=c.match(`^authorization:${u}:(success|error):(?<result>.+)`)?.groups??{};let f;try{f=d?JSON.parse(d):{error:"No data"},Xt(f)||(f={error:"Malformed data"})}catch{f={error:"Malformed data"}}"token"in f?r(f):i(new Error("Authentication failed",{cause:new Error(f.errorCode?se(ue)(`sign_in_error.${f.errorCode}`,{default:f.error}):f.error)})),window.removeEventListener("message",s),clearInterval(o),n?.close()};window.addEventListener("message",s)})},iA=async({backendName:t,siteDomain:e,authURL:n,scope:r})=>{const{hostname:i}=window.location;e??=i==="localhost"?"cms.netlify.com":i;try{new URL(n).origin==="https://api.netlify.com"&&(e=new URL(`https://${e}`).hostname)}catch{}const o=new URLSearchParams({provider:t,site_id:e,scope:r});return rA({backendName:t,authURL:`${n}?${o.toString()}`})},Oq=async()=>{const t=`${av()}${av()}`,e=btoa(await Fa(t,{algorithm:"SHA-256",format:"binary"})).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return{csrfToken:oi().replaceAll("-",""),codeVerifier:t,codeChallenge:e}},oA=async({backendName:t,clientId:e,authURL:n,scope:r})=>{const{csrfToken:i,codeVerifier:o,codeChallenge:s}=await Oq(),{origin:a,pathname:c}=window.location,u=`${a}${c}`,d=new URLSearchParams({client_id:e,redirect_uri:u,response_type:"code",state:i,scope:r,code_challenge:s,code_challenge_method:"S256"});return await ai.set("sveltia-cms.auth",{csrfToken:i,codeVerifier:o,realAuthURL:`${n}?${d.toString()}`}),await ai.set("sveltia-cms.user",{backendName:t}),rA({backendName:t,authURL:u})},Lp=({provider:t="unknown",token:e,refreshToken:n,error:r,errorCode:i})=>{const o=r?"error":"success",s=r?{provider:t,error:r,errorCode:i}:{provider:t,token:e,refreshToken:n};window.addEventListener("message",({data:a,origin:c})=>{a===`authorizing:${t}`&&window.opener?.postMessage(`authorization:${t}:${o}:${JSON.stringify(s)}`,c)}),window.opener?.postMessage(`authorizing:${t}`,"*")},Rq=async({backendName:t,clientId:e,tokenURL:n,code:r,state:i})=>{const{origin:o,pathname:s}=new URL(window.location.href),{csrfToken:a,codeVerifier:c}=await ai.get("sveltia-cms.auth")??{},u=t,d=`${o}${s}`;if(await ai.delete("sveltia-cms.auth"),!a||!c||i!==a)return Lp({provider:u,error:se(ue)("sign_in_error.CSRF_DETECTED"),errorCode:"CSRF_DETECTED"});let f,h="",p="",g="";try{f=await fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({grant_type:"authorization_code",client_id:e,code:r,redirect_uri:d,code_verifier:c})})}catch{}if(!f)return Lp({provider:u,error:se(ue)("sign_in_error.TOKEN_REQUEST_FAILED"),errorCode:"TOKEN_REQUEST_FAILED"});try{({access_token:h,refresh_token:p,error:g}=await f.json())}catch{return Lp({provider:u,error:se(ue)("sign_in_error.MALFORMED_RESPONSE"),errorCode:"MALFORMED_RESPONSE"})}return Lp({provider:u,token:h,refreshToken:p,error:g})},sA=async({backendName:t,clientId:e,tokenURL:n})=>{nA.set(!0);const{search:r}=window.location,{code:i,state:o}=Object.fromEntries(new URLSearchParams(r));if(i&&o)await Rq({backendName:t,clientId:e,tokenURL:n,code:i,state:o});else{const{realAuthURL:s}=await ai.get("sveltia-cms.auth")??{};s&&(window.location.href=s)}},Fq=async({token:t,refreshToken:e,auto:n=!1})=>{if(!t){const{origin:r}=window.location,{clientId:i,authURL:o,tokenURL:s}=il,a="read:repository,write:repository,read:user",c=window.opener?.origin===r&&window.name==="auth";if(c&&await sA({backendName:rl,clientId:i,tokenURL:s}),c||n)return;({token:t,refreshToken:e}=await oA({backendName:rl,clientId:i,authURL:o,scope:a}))}return Nq({token:t,refreshToken:e})},Dq=async()=>{},j_={service:"",label:"",owner:"",repo:"",branch:"",repoURL:"",treeBaseURL:"",blobBaseURL:"",isSelfHosted:!1,databaseName:""},B_=(t,e)=>`${t==="https://api.github.com"?"https://github.com":t.replace(/\/api(?:\/v\d+)?(?:\/.*)?/,"")}/${e}`,Gr={...j_};let aA=null;const Mq=t=>{const{origin:e}=new URL(t);return`${e}/user/settings/applications`},lA=(t,e)=>({treeBaseURL:e?`${t}/src/branch/${e}`:t,blobBaseURL:e?`${t}/src/branch/${e}`:""}),cA=async()=>{const{owner:t,repo:e}=Gr;return aA??=await Xn(`/repos/${t}/${e}`),aA},zq=async()=>{const{repo:t}=Gr;try{const{permissions:e}=await cA();if(!e?.pull)throw new Error("Not a collaborator of the repository",{cause:new Error(se(ue)("repository_no_access",{values:{repo:t}}))})}catch(e){throw e instanceof Error&&e.message.includes("Not a collaborator")?e:new Error("Failed to check repository access",{cause:new Error(se(ue)("repository_not_found",{values:{repo:t}}))})}},Uq=async()=>{const{repo:t,repoURL:e=""}=Gr;try{const{default_branch:n}=await cA();if(!n)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(se(ue)("repository_empty",{values:{repo:t}}))});return Object.assign(Gr,{branch:n},lA(e,n)),n}catch{throw new Error("Failed to retrieve the default branch name.",{cause:new Error(se(ue)("repository_not_found",{values:{repo:t}}))})}},jq={create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"},q_=(t,{commitType:e="update",collection:n,skipCI:r=void 0})=>{const{backend:{commit_messages:i={},skip_ci:o,automatic_deployments:s}}=se(Nt),{login:a="",name:c=""}=se(Kn),[u=""]=t.map(g=>g.slug).filter(Boolean),[d,...f]=t.map(({path:g})=>g),h=n?hs(n,{useSingular:!0}):"";let p=i[e]||jq[e]||"";return["create","update","delete"].includes(e)&&(p=p.replaceAll("{{slug}}",u).replaceAll("{{collection}}",h).replaceAll("{{path}}",d).replaceAll("{{author-login}}",a).replaceAll("{{author-name}}",c)),["uploadMedia","deleteMedia"].includes(e)&&(p=p.replaceAll("{{path}}",d).replaceAll("{{author-login}}",a).replaceAll("{{author-name}}",c),f.length&&(p+=` +${f.length}`)),["openAuthoring"].includes(e)&&(p=p.replaceAll("{{message}}",e).replaceAll("{{author-login}}",a).replaceAll("{{author-name}}",c)),!["delete","deleteMedia"].includes(e)&&(r??(o===!0||s===!1))&&(p=`[skip ci] ${p}`),p},Bq=async()=>{const{owner:t,repo:e,branch:n}=Gr;try{const{commit:{id:r,message:i}}=await Xn(`/repos/${t}/${e}/branches/${n}`);return{hash:r,message:i}}catch{throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(se(ue)("branch_not_found",{values:{repo:e,branch:n}}))})}},qq=async(t,e)=>{const{owner:n,repo:r,branch:i}=Gr,o=q_(t,e),{name:s,email:a}=se(Kn),c=new Date().toJSON(),u=await Promise.all(t.map(async({action:h,path:p,previousPath:g,previousSha:m,data:v=""})=>({operation:h==="move"?"update":h,path:p,content:await cv(v),from_path:g,sha:m}))),{commit:d,files:f}=await Xn(`/repos/${n}/${r}/contents`,{method:"POST",body:{branch:i,author:{name:s,email:a},committer:{name:s,email:a},dates:{author:c,committer:c},message:o,files:u}});return{sha:d.sha,date:new Date(d.created),files:Object.fromEntries(f.map(({path:h,sha:p})=>[h,{sha:p}]))}},uA={isForgejo:!1},Hq=async()=>{const{version:t}=await Xn("/version"),e=t.includes("+gitea-"),n=e?"Forgejo":"Gitea",r=e?Iq:$q;if(Object.assign(uA,{isForgejo:e}),Object.assign(Gr,{label:n}),Number.parseFloat(t)<r)throw new Error(`Unsupported ${n} version`,{cause:new Error(se(ue)("backend_unsupported_version",{values:{name:n,version:r}}))})},Gq=async({metaDB:t,lastHash:e,cachedFileEntries:n,fetchFileList:r})=>{const i=await t.get("last_commit_hash"),o=await t.get("git_config_fetched");if(i&&i===e&&o&&n.length)return D_(n.map(([a,c])=>({path:a,name:fn(a).basename,...c})));const s=D_(await r(e));return t.set("last_commit_hash",e),t.set("git_config_fetched",!0),s},Kq=({allFiles:t,cachedFiles:e})=>{t.forEach(({sha:n,path:r},i)=>{e[r]?.sha===n&&Object.assign(t[i],e[r])})},H_=({file:t,fetchedFileMap:e})=>{const{meta:n,size:r,text:i}=e[t.path]??{};return{...t,size:t.size??r,text:t.text??i,meta:t.meta??n}},dA=({entries:t,assets:e,configFiles:n,errors:r=[]})=>{li.set(t),Un.set(e),$_.set(n),i_.set(r),Fc.set(!0)},Vq=async({cacheDB:t,allFiles:e,cachedFiles:n,fetchingFiles:r,fetchedFileMap:i})=>{const o=e.map(({path:a})=>a),s=Object.keys(n).filter(a=>!o.includes(a));r.length&&await t.saveEntries(Object.entries(i)),s.length&&t.deleteEntries(s)},G_=async({repository:t,fetchDefaultBranchName:e,fetchLastCommit:n,fetchFileList:r,fetchFileContents:i})=>{const{databaseName:o,branch:s}=t,a=new Co(o,"meta"),c=new Co(o,"file-cache"),u=await c.entries();let d=s;d||(d=await e(),t.branch=d);const{hash:f,message:h}=await n(),p=await Gq({metaDB:a,lastHash:f,cachedFileEntries:u,fetchFileList:r});if(Rp.set(!h.startsWith("[skip ci]")),!p.count){dA({entries:[],assets:[],configFiles:[]});return}const{entryFiles:g,assetFiles:m,configFiles:v,allFiles:b}=p,y=Object.fromEntries(u);Kq({allFiles:b,cachedFiles:y});const w=b.filter(({meta:$})=>!$),S=w.length?await i(w):{},{entries:C,errors:E}=await HC(g.map($=>H_({file:$,fetchedFileMap:S})));dA({entries:C,assets:PC(m.map($=>H_({file:$,fetchedFileMap:S}))),configFiles:v.map($=>H_({file:$,fetchedFileMap:S})),errors:E}),await Vq({cacheDB:c,allFiles:b,cachedFiles:y,fetchingFiles:w,fetchedFileMap:S})},Wq=async t=>{const{owner:e,repo:n,branch:r}=Gr,i=`/repos/${e}/${n}/git/trees/${t??r}?recursive=1`,o=[];let s=1;for(;;){const{tree:a,truncated:c}=await Xn(`${i}&page=${s}`);if(a&&o.push(...a),a&&c)s+=1;else break}return o.filter(({type:a})=>a==="blob").map(({path:a,sha:c,size:u})=>({path:a,sha:c,size:u,name:fn(a).basename}))},Yq=async(t,e)=>{const n=await Promise.all(t.map(async({path:r,sha:i,size:o},s)=>{const a=e[s],c={sha:i,size:o??0,text:a?.content&&a.encoding==="base64"?await oF(a.content):"",meta:{}};return[r,c]}).filter(r=>!!r));return Object.fromEntries(n)},Jq=async t=>{const{owner:e,repo:n,branch:r}=Gr,{isForgejo:i}=uA,o=i?`/repos/${e}/${n}/git/blobs`:`/repos/${e}/${n}/file-contents?ref=${r}`,s=i?"sha":"path",a=t.filter(({type:f})=>f!=="asset").map(({[s]:f})=>f);if(!a.length)return{};const c=[],u=[...a];Io.set(0);const{default_paging_num:d=30}=await Xn("/settings/api");for(;;){const f=u.splice(0,d),h=await(i?Xn(`${o}?shas=${f.join(",")}`):Xn(o,{method:"POST",body:{files:f}}));if(c.push(...h),Io.set(Math.ceil((a.length-u.length)/a.length*100)),!u.length)break}return Io.set(void 0),Yq(t,c)},Zq=async()=>{await Hq(),await zq(),await G_({repository:Gr,fetchDefaultBranchName:Uq,fetchLastCommit:Bq,fetchFileList:Wq,fetchFileContents:Jq})},Xq=async t=>{const{owner:e,repo:n,branch:r}=Gr,{path:i}=t;return Xn(`/repos/${e}/${n}/media/${r}/${encodeURI(i)}`,{responseType:"blob"})},K_="sveltia-cms.prefs",V_=it(),ft=it({},t=>{V_.set(void 0),(async()=>{try{const e=await ai.get(K_)??{};e.apiKeys??={},e.useDraftBackup??=!0,e.closeOnSave??=!0,e.closeWithEscape??=!0,e.underlineLinks??=!0,e.beta??=!1,e.devModeEnabled??=!1,e.defaultTranslationService??="google",t(e)}catch{V_.set({type:"permission_denied"})}})()});ft.subscribe(t=>{if(!t||!Object.keys(t).length)return;(async()=>{try{pn(t,await ai.get(K_))||await ai.set(K_,t)}catch{}})();const{locale:e,theme:n,underlineLinks:r=!0,beta:i=!1,devModeEnabled:o=!1}=t;e&&se(ak).includes(e)&&Wt.set(e);const s=!n||n==="auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:s?a:n,autoTheming:s,underlineLinks:r,beta:i,devMode:o})});const Qq={isGit:!0,name:rl,label:eA,repository:Gr,init:()=>{const{backend:t}=se(Nt)??{};if(t?.name!==rl)return;const{repo:e,branch:n,base_url:r=Cq,auth_endpoint:i=Aq,app_id:o="",api_root:s=tA}=t,[a,c]=e.split("/"),u=`${a}/${c}`,d=`${tn(r)}/${tn(i)}`,f=B_(s,u);return Object.assign(Gr,{service:rl,label:eA,owner:a,repo:c,branch:n,repoURL:f,newPatURL:Mq(f),databaseName:`${rl}:${u}`,isSelfHosted:s!==tA},lA(f,n)),Object.assign(il,{clientId:o,authURL:d,tokenURL:d.replace("/authorize","/access_token"),restBaseURL:tn(s)}),se(ft).devModeEnabled&&console.info("repositoryInfo",Gr),Gr},signIn:Fq,signOut:Dq,fetchFiles:Zq,fetchBlob:Xq,commitChanges:qq},qc="github",fA="GitHub",Op="https://api.github.com",eH="https://api.netlify.com",tH="auth",nH=t=>(t=tn(t),t===Op||t.endsWith("/api/v3")?t:t.endsWith("/api")?`${t}/v3`:`${t}/api/v3`),rH=t=>(t=tn(t),t===Op?`${t}/graphql`:t.endsWith("/graphql")?t:t.endsWith("/api/v3")?t.replace("/api/v3","/graphql"):t.endsWith("/api")?`${t}/graphql`:`${t}/api/graphql`),iH=async({token:t})=>{const{id:e,name:n,login:r,email:i,avatar_url:o,html_url:s}=await Xn("/user",{token:t});return{backendName:qc,id:e,name:n,login:r,email:i,avatarURL:o,profileURL:s,token:t}},oH=async({token:t,auto:e=!1})=>{if(!(e&&!t)){if(!t){const{site_domain:n}=se(Nt)?.backend??{},{authURL:r}=il;({token:t}=await iA({backendName:qc,siteDomain:n,authURL:r,scope:"repo,user"}))}return iH({token:t})}},sH=async()=>{},Ti={...j_},aH=t=>{const{origin:e}=new URL(t),n=new URLSearchParams({name:"Sveltia CMS",contents:"write"});return`${e}/settings/personal-access-tokens/new?${n}`},hA=(t,e)=>({treeBaseURL:e?`${t}/tree/${e}`:t,blobBaseURL:e?`${t}/blob/${e}`:""}),lH=async()=>{const{owner:t,repo:e}=Ti,n=se(Kn)?.login,{ok:r}=await Xn(`/repos/${t}/${e}/collaborators/${encodeURIComponent(n)}`,{headers:{Accept:"application/json"},responseType:"raw"});if(!r)throw new Error("Not a collaborator of the repository",{cause:new Error(se(ue)("repository_no_access",{values:{repo:e}}))})},cH=`
|
|
240
|
+
`);let{_file:{format:s}}=o??i;const a=zp.get(s)?.parser;if(a)return a(t);try{if(s==="yaml"||s==="yml")return jC(t);if(s==="toml")return UC(t);if(s==="json")return zC(t);if(s==="frontmatter"&&(s=eq(t)),/^(?:yaml|toml|json)-frontmatter$/.test(s))return tq({collection:i,collectionFile:o,format:s,text:t})}catch(c){throw new Error(`${e} could not be parsed due to ${c.name}: ${c.message}`)}throw new Error(`${e} could not be parsed due to an unknown format: ${s}`)},Td=({field:t,fields:e,types:n})=>{const r=!!t,i=!!e,o=!!n;return{hasSingleSubField:r,hasMultiSubFields:i,hasVariableTypes:o,hasSubFields:r||i||o}},BC=t=>t.length===1&&t[0].widget==="list"&&t[0].root===!0,rq=({collectionName:t,fileName:e,keyPath:n,valueMap:r,isIndexFile:i=!1,locale:o,summaryTemplate:s,hasSingleSubField:a,index:c})=>{const u={collectionName:t,fileName:e,keyPath:"",valueMap:r,isIndexFile:i},d=`${n}.${c}`;return s?s.replaceAll(/{{(.+?)}}/g,(f,h)=>{const[p,...g]=h.split(/\s*\|\s*/),m=p.replace(/^fields\./,""),v=`${d}.${m}`;if(a){const y=mn({...u,keyPath:n})?.field;if(!y||y.name!==m)return""}return Uc({...u,keyPath:a?d:v,locale:o,transformations:g})}):a?r[d]:kC({valueMap:r,locale:o,keyPath:d,keyPathRegex:new RegExp(`^${Kt(n)}\\.${c}[\\b\\.]`),getFieldArgs:u})},qC=t=>/\/_index(?:\.[\w-]+)?\.md$/.test(t),F_=({subPath:t,subPathTemplate:e})=>{if(e?.includes("{{slug}}")){let n="",r=e;for(;r.length>0;){const o=r.indexOf("{{");if(o===-1){n+=Kt(r);break}o>0&&(n+=Kt(r.substring(0,o)));const s=r.indexOf("}}",o);if(s===-1){n+=Kt(r);break}r.substring(o,s+2)==="{{slug}}"?n+="(.+)":n+="[^/]+",r=r.substring(s+2)}const[,i]=t.match(new RegExp(`^${n}$`))??[];if(i)return i}return t},iq=async(t,e)=>{try{return await nq(t)}catch(n){console.error(n),e.push(n);return}},oq=(t,e,n)=>{if(BC(e)){const r=e[0].name;return n?!Xt(t)||!Object.values(t).every(Array.isArray)?void 0:Object.fromEntries(Object.entries(t).map(([i,o])=>[i,{[r]:o}])):Array.isArray(t)?{[r]:t}:void 0}return Xt(t)?t:void 0},sq=(t,e,n,r,i)=>r?.split("/").pop()==="_index"&&/\/_index(?:\.[\w-]+)?\.[\w]+$/.test(t)&&i!=="md"?!0:qC(t)?!(e||ci(n)?.name==="_index"||r?.split("/").pop()==="_index"&&i==="md"):!1,aq=(t,e,n,r,i)=>{const{path:o,folder:{filePathMap:s}}=t;if(e){if(i){const[d,f]=Object.entries(s??{}).find(([,h])=>h===o)??[];return{subPath:f,locale:d}}return{subPath:o,locale:void 0}}if(!n)return{subPath:void 0,locale:void 0};const a=o.match(n);if(!a?.groups)return{subPath:void 0,locale:void 0};const{subPath:c,locale:u=r}=a.groups;return{subPath:c,locale:u}},lq=(t,e,n,r,i,o)=>{const s=r||F_({subPath:i,subPathTemplate:o});t.slug=s,t.locales._default={slug:s,path:n,content:no(e)}},cq=(t,e,n,r,i,o,s)=>{const a=r||F_({subPath:i,subPathTemplate:o});t.slug=a,t.locales=Object.fromEntries(s.filter(c=>c in e).map(c=>[c,{slug:a,path:n,content:no(e[c])}]))},uq=(t,e,n,r,i,o,s,a,c,u,d)=>{const f=u&&typeof e[u]=="string"?e[u]:void 0,h=r||F_({subPath:i,subPathTemplate:o}),p={slug:h,path:n,content:no(e)},g=`${c}/${f??h}`,m=d.find(v=>v.id===g);return m?(m.locales[s]=p,s===a&&(m.slug=h,m.subPath=i),!0):(t.id=g,t.locales[s]=p,s===a&&(t.slug=h),!1)},dq=async({file:t,entries:e,errors:n})=>{const r=await iq(t,n);if(!r)return;const{path:i,meta:o={},folder:{collectionName:s,fileName:a}}=t,c=Kr(s),u=c&&a?Dc(c,a):void 0;if(!c||a&&!u)return;const{fields:d=[],_file:{fullPathRegEx:f,subPath:h,extension:p},_i18n:{i18nEnabled:g,allLocales:m,defaultLocale:v,structureMap:{i18nSingleFile:b,i18nMultiFile:y,i18nMultiFolder:w,i18nRootMultiFolder:S},canonicalSlug:{key:C}}}=u??c,E=oq(r,d,b);if(!E||sq(i,a,c,h,p))return;const $=y||w||S,{subPath:k,locale:x}=aq(t,a,f,v,$);if(!k||$&&!x)return;const A={id:"",slug:"",subPath:k,locales:{},...o};if(!g)lq(A,E,i,a,k,h);else if(b)cq(A,E,i,a,k,h,m);else if($&&x&&uq(A,E,i,a,k,h,x,v,s,C,e))return;e.push(A)},HC=async t=>{const e=[],n=[];return await Promise.all(t.map(r=>dq({file:r,entries:e,errors:n}))),{entries:e.filter(r=>(r.id=oi(),!!r.slug&&!!Object.keys(r.locales).length)),errors:n}},D_=t=>{const e=[],n=[],r=[];t.forEach(o=>{const{path:s,name:a}=o;if(a.startsWith("."))NC.test(a)&&r.push({...o,type:"config"});else{const[c]=zT(s),[u]=jh(s);c&&e.push({...o,type:"entry",folder:c}),u&&!e.find(d=>d.path===s)&&!qC(s)&&n.push({...o,type:"asset",folder:u})}});const i=[...e,...n,...r];return{entryFiles:e,assetFiles:n,configFiles:r,allFiles:i,count:i.length}},GC=async(t,e,n="file")=>{const r=tn(e??"");let i=t;if(!r){if(n==="directory")return i;throw new Error("Path is required for file handle retrieval")}const o=r.split("/"),s=o.length-1,a=!0;for await(const[c,u]of o.entries())i=await(c===s&&n==="file"?i.getFileHandle(u,{create:a}):i.getDirectoryHandle(u,{create:a}));return i},KC=(t,e)=>GC(t,e,"file"),Cd=(t,e)=>GC(t,e,"directory"),VC=t=>jS(t,e=>e.replace(/{{.+?}}/,".+?")),WC=async(t,e)=>{const{rootDirHandle:n,scanningPaths:r,scanningPathsRegEx:i,fileList:o}=e;for await(const[s,a]of t.entries()){if(s.startsWith(".")&&!NC.test(s))continue;const c=(await n.resolve(a))?.join("/")??"",u=i.some(d=>d.test(c));if(a.kind==="file"){if(!u)continue;try{let d=await a.getFile();const{type:f,lastModified:h}=d;d=new File([d],d.name,{type:f,lastModified:h}),o.push({file:d,path:c})}catch(d){console.error(d)}}if(a.kind==="directory"){const d=VC(c);if(!u&&!r.some(f=>d.test(f)))continue;await WC(a,e)}}},fq=async({file:t,path:e})=>({file:t,path:e.normalize(),name:t.name.normalize(),size:t.size,sha:await Ka(t)}),hq=async t=>{const e=[],n=ad([...se(r_).map(({filePathMap:r,folderPathMap:i})=>Object.values(r||(i??{}))).flat(1),...se(Ks).filter(({internalPath:r})=>r!==void 0).map(({internalPath:r})=>r)].map(r=>tn(r??"")));return await WC(t,{rootDirHandle:t,scanningPaths:n,scanningPathsRegEx:n.map(VC),fileList:e}),Promise.all(e.map(fq))},pq=async t=>{const{name:e,file:n}=t;if(e!==".gitkeep")try{t.text=await rF(n)}catch(r){t.text="",console.error(r)}},YC=async t=>{const{entryFiles:e,assetFiles:n,configFiles:r}=D_(await hq(t));await Promise.all([...e,...r].map(pq));const{entries:i,errors:o}=await HC(e);li.set(i),Un.set(PC(n)),$_.set(r),i_.set(o),Fc.set(!0)},gq=async({rootDirHandle:t,previousPath:e,path:n})=>{const{dirname:r,basename:i}=fn(n),o=await KC(t,e);return r&&r!==fn(e).dirname?await o.move(await Cd(t,r),i):await o.move(i),o},mq=async({rootDirHandle:t,fileHandle:e,path:n,data:r})=>{e??=await KC(t,n);const i=await e.createWritable?.();try{await i?.write(r)}catch{}finally{try{await i?.close()}catch{}}return e.getFile()},vq=async(t,e)=>{let n=await Cd(t,e.join("/"));for(;;){const r=[];for await(const o of n.keys())r.push(o);if(r.length>1||!e.length)break;const i=e.pop();n=await Cd(t,e.join("/")),await n.removeEntry(i)}},bq=async({rootDirHandle:t,path:e})=>{const{dirname:n="",basename:r}=fn(tn(e));await(await Cd(t,n)).removeEntry(r),n&&await vq(t,n.split("/"))},_q=async(t,{action:e,path:n,previousPath:r,data:i})=>{let o;return e==="move"&&r&&(o=await gq({rootDirHandle:t,previousPath:r,path:n})),["create","update","move"].includes(e)&&i?mq({rootDirHandle:t,fileHandle:o,path:n,data:i}):(e==="delete"&&await bq({rootDirHandle:t,path:n}),null)},JC=async(t,e)=>{const n=await Promise.all(e.map(async r=>{const{path:i,data:o}=r;let s=null;if(t)try{s=await _q(t,r)}catch(a){console.error(a)}if(!s)if(o!==void 0)s=vb(o);else return null;return[i,{file:s,sha:await Ka(s)}]}));return{sha:await Ka(new Date().toJSON()),files:Object.fromEntries(n.filter(r=>!!r))}},ZC="local",yq="Local Repository";let M_;const wq={service:"",label:"",owner:"",repo:"",branch:""},XC=new Proxy({},{get:(t,e)=>(M_??wq)[e]}),z_="root_dir_handle";let Pp,U_;const xq=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await Pp?.get(z_)??null;if(n)if(await n.requestPermission({mode:"readwrite"})!=="granted")n=null;else try{await n.entries().next()}catch(r){n=null,console.error(r)}return!n&&e&&(n=await window.showDirectoryPicker(),n&&(await n.getDirectoryHandle(".git"),await Pp?.set(z_,n))),n},kq={isGit:!1,name:ZC,label:yq,repository:XC,init:()=>{const{name:t}=se(Nt).backend;M_=Id[t]?.init?.();const{databaseName:e}=M_??{};return Pp=e?new Co(e,"file-system-handles"):null,XC},signIn:async({auto:t=!1})=>{const e=await xq({showPicker:!t});if(e)U_=e;else throw new Error("Directory handle could not be acquired");return{backendName:ZC}},signOut:async()=>{await Pp?.delete(z_)},fetchFiles:async()=>{await YC(U_)},commitChanges:async t=>JC(U_,t)},Sq="sveltia-cms-test",QC="test-repo",Eq="Test";let Np;const Tq={isGit:!1,name:QC,label:Eq,init:()=>{},signIn:async()=>{try{Np=await Cd(await navigator.storage.getDirectory(),Sq)}catch{}return{backendName:QC}},signOut:async()=>{},fetchFiles:async()=>{Np?await YC(Np):Fc.set(!0)},commitChanges:async t=>JC(Np,t)},rl="gitea",eA="Gitea / Forgejo",tA="https://gitea.com/api/v1",Cq="https://gitea.com",Aq="login/oauth/authorize",$q=1.24,Iq=12,Kn=it();Kn.subscribe(t=>{(async()=>{try{t?await ai.set("sveltia-cms.user",t):t===null&&await ai.delete("sveltia-cms.user")}catch{}})()});const Ad=async(t,e={},{responseType:n="json",refreshAccessToken:r=void 0}={})=>{let i;e.cache="no-cache",e.headers=new Headers(e.headers),n==="json"&&e.headers.set("Accept","application/json"),e.method==="POST"&&Xt(e.body)&&(e.headers.set("Content-Type","application/json"),e.body=JSON.stringify(e.body));try{i=await fetch(t,e)}catch(u){throw new Error("Failed to send the request",{cause:u})}if(n==="raw")return i;const{ok:o,status:s}=i;let a;try{if(o&&n==="blob")return i.blob();if(o&&n==="text")return i.text();a=await i.json()}catch(u){throw new Error("Failed to parse the response",{cause:u})}if(o&&!(t.endsWith("/graphql")&&Xt(a)&&a.errors))return a;if(s===401&&r){const[u]=e.headers.get("Authorization")?.split(" ")??["token"],{token:d}=await r();return e.headers.set("Authorization",`${u} ${d}`),Ad(t,e,{responseType:n})}if(!Xt(a))throw new Error("Server responded with an error",{cause:{status:s}});let c="";throw typeof a.error=="string"&&(c=a.error),typeof a.message=="string"&&(c=a.message),Array.isArray(a.errors)&&(typeof a.errors[0]=="string"&&(c=a.errors.join(", ")),Xt(a.errors[0])&&typeof a.errors[0].message=="string"&&(c=a.errors.map(u=>u.message).join(", "))),new Error("Server responded with an error",{cause:{status:s,message:c}})},il={...{clientId:"",authURL:"",tokenURL:"",authScheme:"token",restBaseURL:"",graphqlBaseURL:""}},$d={},Pq=async({clientId:t,tokenURL:e,refreshToken:n})=>{let r,i="";try{r=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({grant_type:"refresh_token",client_id:t,refresh_token:n})})}catch{}if(!r?.ok)throw new Error(se(ue)("sign_in_error.TOKEN_REFRESH_FAILED"));return{access_token:i,refresh_token:n}=await r.json(),Kn.update(o=>o&&{...o,token:i,refreshToken:n}),{token:i,refreshToken:n}},Xn=async(t,{method:e="GET",headers:n={},body:r=null,isGraphQL:i=!1,responseType:o="json",token:s=void 0,refreshToken:a=void 0}={})=>{const{clientId:c,tokenURL:u,restBaseURL:d,graphqlBaseURL:f,authScheme:h="token"}=il,p=se(Kn),g=i?f:d;return s??=p?.token,a??=p?.refreshToken,n.Authorization=`${h} ${s}`,Ad(`${g}${t}`,{method:e,headers:n,body:r},{responseType:o,refreshAccessToken:a?()=>Pq({clientId:c,tokenURL:u,refreshToken:a}):void 0})},fs=async(t,e={})=>{t=t.replace(/\n\s*/g," "),Object.entries($d).forEach(([r,i])=>{t.includes(`$${r}`)&&(e[r]??=i)});const{data:n}=await Xn("",{method:"POST",body:{query:t,variables:e},isGraphQL:!0});return n},Nq=async({token:t,refreshToken:e})=>{const{id:n,full_name:r,login:i,email:o,avatar_url:s,html_url:a}=await Xn("/user",{token:t,refreshToken:e}),c=se(Kn);return c?.token&&c.token!==t&&(t=c.token,e=c.refreshToken),{backendName:rl,id:n,name:r,login:i,email:o,avatarURL:s,profileURL:a,token:t,refreshToken:e}},nA=it(!1),Lq=({authURL:t})=>{const{availHeight:r,availWidth:i}=window.screen,o=r/2-800/2,s=i/2-600/2;return window.open(t,"auth",`width=600,height=800,top=${o},left=${s}`)},rA=async({backendName:t,authURL:e})=>{const n=Lq({authURL:e});return new Promise((r,i)=>{const o=t==="github"?setInterval(()=>{n?.closed&&(clearInterval(o),i(Object.assign(new Error("Authentication aborted"),{name:"AbortError"})))},1e3):0,s=({origin:a,data:c})=>{if(a!==new URL(e).origin||typeof c!="string")return;const u=t;if(c===`authorizing:${u}`){n?.postMessage(c,a);return}const{result:d}=c.match(`^authorization:${u}:(success|error):(?<result>.+)`)?.groups??{};let f;try{f=d?JSON.parse(d):{error:"No data"},Xt(f)||(f={error:"Malformed data"})}catch{f={error:"Malformed data"}}"token"in f?r(f):i(new Error("Authentication failed",{cause:new Error(f.errorCode?se(ue)(`sign_in_error.${f.errorCode}`,{default:f.error}):f.error)})),window.removeEventListener("message",s),clearInterval(o),n?.close()};window.addEventListener("message",s)})},iA=async({backendName:t,siteDomain:e,authURL:n,scope:r})=>{const{hostname:i}=window.location;e??=i==="localhost"?"cms.netlify.com":i;try{new URL(n).origin==="https://api.netlify.com"&&(e=new URL(`https://${e}`).hostname)}catch{}const o=new URLSearchParams({provider:t,site_id:e,scope:r});return rA({backendName:t,authURL:`${n}?${o}`})},Oq=async()=>{const t=`${av()}${av()}`,e=btoa(await Fa(t,{algorithm:"SHA-256",format:"binary"})).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return{csrfToken:oi().replaceAll("-",""),codeVerifier:t,codeChallenge:e}},oA=async({backendName:t,clientId:e,authURL:n,scope:r})=>{const{csrfToken:i,codeVerifier:o,codeChallenge:s}=await Oq(),{origin:a,pathname:c}=window.location,u=`${a}${c}`,d=new URLSearchParams({client_id:e,redirect_uri:u,response_type:"code",state:i,scope:r,code_challenge:s,code_challenge_method:"S256"});return await ai.set("sveltia-cms.auth",{csrfToken:i,codeVerifier:o,realAuthURL:`${n}?${d}`}),await ai.set("sveltia-cms.user",{backendName:t}),rA({backendName:t,authURL:u})},Lp=({provider:t="unknown",token:e,refreshToken:n,error:r,errorCode:i})=>{const o=r?"error":"success",s=r?{provider:t,error:r,errorCode:i}:{provider:t,token:e,refreshToken:n};window.addEventListener("message",({data:a,origin:c})=>{a===`authorizing:${t}`&&window.opener?.postMessage(`authorization:${t}:${o}:${JSON.stringify(s)}`,c)}),window.opener?.postMessage(`authorizing:${t}`,"*")},Rq=async({backendName:t,clientId:e,tokenURL:n,code:r,state:i})=>{const{origin:o,pathname:s}=new URL(window.location.href),{csrfToken:a,codeVerifier:c}=await ai.get("sveltia-cms.auth")??{},u=t,d=`${o}${s}`;if(await ai.delete("sveltia-cms.auth"),!a||!c||i!==a)return Lp({provider:u,error:se(ue)("sign_in_error.CSRF_DETECTED"),errorCode:"CSRF_DETECTED"});let f,h="",p="",g="";try{f=await fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({grant_type:"authorization_code",client_id:e,code:r,redirect_uri:d,code_verifier:c})})}catch{}if(!f)return Lp({provider:u,error:se(ue)("sign_in_error.TOKEN_REQUEST_FAILED"),errorCode:"TOKEN_REQUEST_FAILED"});try{({access_token:h,refresh_token:p,error:g}=await f.json())}catch{return Lp({provider:u,error:se(ue)("sign_in_error.MALFORMED_RESPONSE"),errorCode:"MALFORMED_RESPONSE"})}return Lp({provider:u,token:h,refreshToken:p,error:g})},sA=async({backendName:t,clientId:e,tokenURL:n})=>{nA.set(!0);const{search:r}=window.location,{code:i,state:o}=Object.fromEntries(new URLSearchParams(r));if(i&&o)await Rq({backendName:t,clientId:e,tokenURL:n,code:i,state:o});else{const{realAuthURL:s}=await ai.get("sveltia-cms.auth")??{};s&&(window.location.href=s)}},Fq=t=>{const{origin:e}=new URL(t);return`${e}/user/settings/applications`},Dq=async({token:t,refreshToken:e,auto:n=!1})=>{if(!t){const{origin:r}=window.location,{clientId:i,authURL:o,tokenURL:s}=il,a="read:repository,write:repository,read:user",c=window.opener?.origin===r&&window.name==="auth";if(c&&await sA({backendName:rl,clientId:i,tokenURL:s}),c||n)return;({token:t,refreshToken:e}=await oA({backendName:rl,clientId:i,authURL:o,scope:a}))}return Nq({token:t,refreshToken:e})},Mq=async()=>{},j_={service:"",label:"",owner:"",repo:"",branch:"",repoURL:"",treeBaseURL:"",blobBaseURL:"",isSelfHosted:!1,databaseName:""},B_=(t,e)=>`${t==="https://api.github.com"?"https://github.com":t.replace(/\/api(?:\/v\d+)?(?:\/.*)?/,"")}/${e}`,Gr={...j_};let aA=null;const lA=(t,e)=>({treeBaseURL:e?`${t}/src/branch/${e}`:t,blobBaseURL:e?`${t}/src/branch/${e}`:""}),cA=async()=>{const{owner:t,repo:e}=Gr;return aA??=await Xn(`/repos/${t}/${e}`),aA},zq=async()=>{const{repo:t}=Gr;try{const{permissions:e}=await cA();if(!e?.pull)throw new Error("Not a collaborator of the repository",{cause:new Error(se(ue)("repository_no_access",{values:{repo:t}}))})}catch(e){throw e instanceof Error&&e.message.includes("Not a collaborator")?e:new Error("Failed to check repository access",{cause:new Error(se(ue)("repository_not_found",{values:{repo:t}}))})}},Uq=async()=>{const{repo:t,repoURL:e=""}=Gr;try{const{default_branch:n}=await cA();if(!n)throw new Error("Failed to retrieve the default branch name.",{cause:new Error(se(ue)("repository_empty",{values:{repo:t}}))});return Object.assign(Gr,{branch:n},lA(e,n)),n}catch{throw new Error("Failed to retrieve the default branch name.",{cause:new Error(se(ue)("repository_not_found",{values:{repo:t}}))})}},jq={create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"},q_=(t,{commitType:e="update",collection:n,skipCI:r=void 0})=>{const{backend:{commit_messages:i={},skip_ci:o,automatic_deployments:s}}=se(Nt),{login:a="",name:c=""}=se(Kn),[u=""]=t.map(g=>g.slug).filter(Boolean),[d,...f]=t.map(({path:g})=>g),h=n?hs(n,{useSingular:!0}):"";let p=i[e]||jq[e]||"";return["create","update","delete"].includes(e)&&(p=p.replaceAll("{{slug}}",u).replaceAll("{{collection}}",h).replaceAll("{{path}}",d).replaceAll("{{author-login}}",a).replaceAll("{{author-name}}",c)),["uploadMedia","deleteMedia"].includes(e)&&(p=p.replaceAll("{{path}}",d).replaceAll("{{author-login}}",a).replaceAll("{{author-name}}",c),f.length&&(p+=` +${f.length}`)),["openAuthoring"].includes(e)&&(p=p.replaceAll("{{message}}",e).replaceAll("{{author-login}}",a).replaceAll("{{author-name}}",c)),!["delete","deleteMedia"].includes(e)&&(r??(o===!0||s===!1))&&(p=`[skip ci] ${p}`),p},Bq=async()=>{const{owner:t,repo:e,branch:n}=Gr;try{const{commit:{id:r,message:i}}=await Xn(`/repos/${t}/${e}/branches/${n}`);return{hash:r,message:i}}catch{throw new Error("Failed to retrieve the last commit hash.",{cause:new Error(se(ue)("branch_not_found",{values:{repo:e,branch:n}}))})}},qq=async(t,e)=>{const{owner:n,repo:r,branch:i}=Gr,o=q_(t,e),{name:s,email:a}=se(Kn),c=new Date().toJSON(),u=await Promise.all(t.map(async({action:h,path:p,previousPath:g,previousSha:m,data:v=""})=>({operation:h==="move"?"update":h,path:p,content:await cv(v),from_path:g,sha:m}))),{commit:d,files:f}=await Xn(`/repos/${n}/${r}/contents`,{method:"POST",body:{branch:i,author:{name:s,email:a},committer:{name:s,email:a},dates:{author:c,committer:c},message:o,files:u}});return{sha:d.sha,date:new Date(d.created),files:Object.fromEntries(f.map(({path:h,sha:p})=>[h,{sha:p}]))}},uA={isForgejo:!1},Hq=async()=>{const{version:t}=await Xn("/version"),e=t.includes("+gitea-"),n=e?"Forgejo":"Gitea",r=e?Iq:$q;if(Object.assign(uA,{isForgejo:e}),Object.assign(Gr,{label:n}),Number.parseFloat(t)<r)throw new Error(`Unsupported ${n} version`,{cause:new Error(se(ue)("backend_unsupported_version",{values:{name:n,version:r}}))})},Gq=async({metaDB:t,lastHash:e,cachedFileEntries:n,fetchFileList:r})=>{const i=await t.get("last_commit_hash"),o=await t.get("git_config_fetched");if(i&&i===e&&o&&n.length)return D_(n.map(([a,c])=>({path:a,name:fn(a).basename,...c})));const s=D_(await r(e));return t.set("last_commit_hash",e),t.set("git_config_fetched",!0),s},Kq=({allFiles:t,cachedFiles:e})=>{t.forEach(({sha:n,path:r},i)=>{e[r]?.sha===n&&Object.assign(t[i],e[r])})},H_=({file:t,fetchedFileMap:e})=>{const{meta:n,size:r,text:i}=e[t.path]??{};return{...t,size:t.size??r,text:t.text??i,meta:t.meta??n}},dA=({entries:t,assets:e,configFiles:n,errors:r=[]})=>{li.set(t),Un.set(e),$_.set(n),i_.set(r),Fc.set(!0)},Vq=async({cacheDB:t,allFiles:e,cachedFiles:n,fetchingFiles:r,fetchedFileMap:i})=>{const o=e.map(({path:a})=>a),s=Object.keys(n).filter(a=>!o.includes(a));r.length&&await t.saveEntries(Object.entries(i)),s.length&&t.deleteEntries(s)},G_=async({repository:t,fetchDefaultBranchName:e,fetchLastCommit:n,fetchFileList:r,fetchFileContents:i})=>{const{databaseName:o,branch:s}=t,a=new Co(o,"meta"),c=new Co(o,"file-cache"),u=await c.entries();let d=s;d||(d=await e(),t.branch=d);const{hash:f,message:h}=await n(),p=await Gq({metaDB:a,lastHash:f,cachedFileEntries:u,fetchFileList:r});if(Rp.set(!h.startsWith("[skip ci]")),!p.count){dA({entries:[],assets:[],configFiles:[]});return}const{entryFiles:g,assetFiles:m,configFiles:v,allFiles:b}=p,y=Object.fromEntries(u);Kq({allFiles:b,cachedFiles:y});const w=b.filter(({meta:$})=>!$),S=w.length?await i(w):{},{entries:C,errors:E}=await HC(g.map($=>H_({file:$,fetchedFileMap:S})));dA({entries:C,assets:PC(m.map($=>H_({file:$,fetchedFileMap:S}))),configFiles:v.map($=>H_({file:$,fetchedFileMap:S})),errors:E}),await Vq({cacheDB:c,allFiles:b,cachedFiles:y,fetchingFiles:w,fetchedFileMap:S})},Wq=async t=>{const{owner:e,repo:n,branch:r}=Gr,i=`/repos/${e}/${n}/git/trees/${t??r}?recursive=1`,o=[];let s=1;for(;;){const{tree:a,truncated:c}=await Xn(`${i}&page=${s}`);if(a&&o.push(...a),a&&c)s+=1;else break}return o.filter(({type:a})=>a==="blob").map(({path:a,sha:c,size:u})=>({path:a,sha:c,size:u,name:fn(a).basename}))},Yq=async(t,e)=>{const n=await Promise.all(t.map(async({path:r,sha:i,size:o},s)=>{const a=e[s],c={sha:i,size:o??0,text:a?.content&&a.encoding==="base64"?await oF(a.content):"",meta:{}};return[r,c]}).filter(r=>!!r));return Object.fromEntries(n)},Jq=async t=>{const{owner:e,repo:n,branch:r}=Gr,{isForgejo:i}=uA,o=i?`/repos/${e}/${n}/git/blobs`:`/repos/${e}/${n}/file-contents?ref=${r}`,s=i?"sha":"path",a=t.filter(({type:f})=>f!=="asset").map(({[s]:f})=>f);if(!a.length)return{};const c=[],u=[...a];Io.set(0);const{default_paging_num:d=30}=await Xn("/settings/api");for(;;){const f=u.splice(0,d),h=await(i?Xn(`${o}?shas=${f.join(",")}`):Xn(o,{method:"POST",body:{files:f}}));if(c.push(...h),Io.set(Math.ceil((a.length-u.length)/a.length*100)),!u.length)break}return Io.set(void 0),Yq(t,c)},Zq=async()=>{await Hq(),await zq(),await G_({repository:Gr,fetchDefaultBranchName:Uq,fetchLastCommit:Bq,fetchFileList:Wq,fetchFileContents:Jq})},Xq=async t=>{const{owner:e,repo:n,branch:r}=Gr,{path:i}=t;return Xn(`/repos/${e}/${n}/media/${r}/${encodeURI(i)}`,{responseType:"blob"})},K_="sveltia-cms.prefs",V_=it(),ft=it({},t=>{V_.set(void 0),(async()=>{try{const e=await ai.get(K_)??{};e.apiKeys??={},e.useDraftBackup??=!0,e.closeOnSave??=!0,e.closeWithEscape??=!0,e.underlineLinks??=!0,e.beta??=!1,e.devModeEnabled??=!1,e.defaultTranslationService??="google",t(e)}catch{V_.set({type:"permission_denied"})}})()});ft.subscribe(t=>{if(!t||!Object.keys(t).length)return;(async()=>{try{pn(t,await ai.get(K_))||await ai.set(K_,t)}catch{}})();const{locale:e,theme:n,underlineLinks:r=!0,beta:i=!1,devModeEnabled:o=!1}=t;e&&se(ak).includes(e)&&Wt.set(e);const s=!n||n==="auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:s?a:n,autoTheming:s,underlineLinks:r,beta:i,devMode:o})});const Qq={isGit:!0,name:rl,label:eA,repository:Gr,init:()=>{const{backend:t}=se(Nt)??{};if(t?.name!==rl)return;const{repo:e,branch:n,base_url:r=Cq,auth_endpoint:i=Aq,app_id:o="",api_root:s=tA}=t,[a,c]=e.split("/"),u=`${a}/${c}`,d=`${tn(r)}/${tn(i)}`,f=B_(s,u);return Object.assign(Gr,{service:rl,label:eA,owner:a,repo:c,branch:n,repoURL:f,newPatURL:Fq(f),databaseName:`${rl}:${u}`,isSelfHosted:s!==tA},lA(f,n)),Object.assign(il,{clientId:o,authURL:d,tokenURL:d.replace("/authorize","/access_token"),restBaseURL:tn(s)}),se(ft).devModeEnabled&&console.info("repositoryInfo",Gr),Gr},signIn:Dq,signOut:Mq,fetchFiles:Zq,fetchBlob:Xq,commitChanges:qq},qc="github",fA="GitHub",Op="https://api.github.com",eH="https://api.netlify.com",tH="auth",nH=t=>(t=tn(t),t===Op||t.endsWith("/api/v3")?t:t.endsWith("/api")?`${t}/v3`:`${t}/api/v3`),rH=t=>(t=tn(t),t===Op?`${t}/graphql`:t.endsWith("/graphql")?t:t.endsWith("/api/v3")?t.replace("/api/v3","/graphql"):t.endsWith("/api")?`${t}/graphql`:`${t}/api/graphql`),iH=async({token:t})=>{const{id:e,name:n,login:r,email:i,avatar_url:o,html_url:s}=await Xn("/user",{token:t});return{backendName:qc,id:e,name:n,login:r,email:i,avatarURL:o,profileURL:s,token:t}},oH=t=>{const{origin:e}=new URL(t),n=new URLSearchParams({name:"Sveltia CMS",contents:"write"});return`${e}/settings/personal-access-tokens/new?${n}`},sH=async({token:t,auto:e=!1})=>{if(!(e&&!t)){if(!t){const{site_domain:n}=se(Nt)?.backend??{},{authURL:r}=il;({token:t}=await iA({backendName:qc,siteDomain:n,authURL:r,scope:"repo,user"}))}return iH({token:t})}},aH=async()=>{},Ti={...j_},hA=(t,e)=>({treeBaseURL:e?`${t}/tree/${e}`:t,blobBaseURL:e?`${t}/blob/${e}`:""}),lH=async()=>{const{owner:t,repo:e}=Ti,n=se(Kn)?.login,{ok:r}=await Xn(`/repos/${t}/${e}/collaborators/${encodeURIComponent(n)}`,{headers:{Accept:"application/json"},responseType:"raw"});if(!r)throw new Error("Not a collaborator of the repository",{cause:new Error(se(ue)("repository_no_access",{values:{repo:e}}))})},cH=`
|
|
241
241
|
query($owner: String!, $repo: String!) {
|
|
242
242
|
repository(owner: $owner, name: $repo) {
|
|
243
243
|
defaultBranchRef {
|
|
@@ -302,7 +302,7 @@ ${o}`.trim()}function Q5(t,{maxDepth:e=1e3,numbersAsFloat:n=!1}={}){if(Ed(t)!=="
|
|
|
302
302
|
`),a.join("")}).join("")}
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
`,mH=async(t,e)=>{const n=t.map(({path:r,sha:i,size:o},s)=>{const{author:{name:a,email:c,user:u},committedDate:d}=e[`commit_${s}`].target.history.nodes[0],f={sha:i,size:o,text:e[`content_${s}`]?.text,meta:{commitAuthor:{name:a,email:c,id:u?.id,login:u?.login},commitDate:new Date(d)}};return[r,f]});return Object.fromEntries(n)},vH=async t=>{const e=structuredClone(t),n=[],r=250,i={};Io.set(0);const o=window.setInterval(()=>{Io.update((s=0)=>s+1)},e.length/10);for(let s=0;s<e.length;s+=r)n.push(e.slice(s,s+r));return await Promise.all(n.map(async(s,a)=>{await Lt(a*500);const c=await fs(gH(s,a*r));Object.assign(i,c.repository)})),window.clearInterval(o),Io.set(void 0),mH(e,i)},bH=async()=>{await lH(),await G_({repository:Ti,fetchDefaultBranchName:uH,fetchLastCommit:pA,fetchFileList:pH,fetchFileContents:vH})},_H=async t=>{const{owner:e,repo:n}=Ti,{sha:r,path:i}=t,o=await Xn(`/repos/${e}/${n}/git/blobs/${r}`,{headers:{Accept:"application/vnd.github.raw"},responseType:"raw"});return o.headers.get("Content-Type")!=="application/octet-stream"?new Blob([await o.text()],{type:os.getType(i)??"text/plain"}):o.blob()},yH="https://www.githubstatus.com/",wH="https://www.githubstatus.com/api/v2/status.json",xH={isGit:!0,name:qc,label:fA,repository:Ti,statusDashboardURL:yH,checkStatus:async()=>{try{const{status:{indicator:t}}=await Ad(wH);if(t==="none")return"none";if(t==="minor")return"minor";if(t==="major"||t==="critical")return"major"}catch{}return"unknown"},init:()=>{const{backend:t}=se(Nt)??{};if(t?.name!==qc)return;const{repo:e,branch:n,base_url:r=eH,auth_endpoint:i=tH,api_root:o=Op,graphql_api_root:s=o}=t,[a,c]=e.split("/"),u=`${a}/${c}`,d=`${tn(r)}/${tn(i)}`,f=B_(o,u);return Object.assign(Ti,{service:qc,label:fA,owner:a,repo:c,branch:n,repoURL:f,newPatURL:
|
|
305
|
+
`,mH=async(t,e)=>{const n=t.map(({path:r,sha:i,size:o},s)=>{const{author:{name:a,email:c,user:u},committedDate:d}=e[`commit_${s}`].target.history.nodes[0],f={sha:i,size:o,text:e[`content_${s}`]?.text,meta:{commitAuthor:{name:a,email:c,id:u?.id,login:u?.login},commitDate:new Date(d)}};return[r,f]});return Object.fromEntries(n)},vH=async t=>{const e=structuredClone(t),n=[],r=250,i={};Io.set(0);const o=window.setInterval(()=>{Io.update((s=0)=>s+1)},e.length/10);for(let s=0;s<e.length;s+=r)n.push(e.slice(s,s+r));return await Promise.all(n.map(async(s,a)=>{await Lt(a*500);const c=await fs(gH(s,a*r));Object.assign(i,c.repository)})),window.clearInterval(o),Io.set(void 0),mH(e,i)},bH=async()=>{await lH(),await G_({repository:Ti,fetchDefaultBranchName:uH,fetchLastCommit:pA,fetchFileList:pH,fetchFileContents:vH})},_H=async t=>{const{owner:e,repo:n}=Ti,{sha:r,path:i}=t,o=await Xn(`/repos/${e}/${n}/git/blobs/${r}`,{headers:{Accept:"application/vnd.github.raw"},responseType:"raw"});return o.headers.get("Content-Type")!=="application/octet-stream"?new Blob([await o.text()],{type:os.getType(i)??"text/plain"}):o.blob()},yH="https://www.githubstatus.com/",wH="https://www.githubstatus.com/api/v2/status.json",xH={isGit:!0,name:qc,label:fA,repository:Ti,statusDashboardURL:yH,checkStatus:async()=>{try{const{status:{indicator:t}}=await Ad(wH);if(t==="none")return"none";if(t==="minor")return"minor";if(t==="major"||t==="critical")return"major"}catch{}return"unknown"},init:()=>{const{backend:t}=se(Nt)??{};if(t?.name!==qc)return;const{repo:e,branch:n,base_url:r=eH,auth_endpoint:i=tH,api_root:o=Op,graphql_api_root:s=o}=t,[a,c]=e.split("/"),u=`${a}/${c}`,d=`${tn(r)}/${tn(i)}`,f=B_(o,u);return Object.assign(Ti,{service:qc,label:fA,owner:a,repo:c,branch:n,repoURL:f,newPatURL:oH(f),databaseName:`${qc}:${u}`,isSelfHosted:o!==Op},hA(f,n)),Object.assign(il,{clientId:"",authURL:d,tokenURL:d.replace("/authorize","/access_token"),restBaseURL:nH(o),graphqlBaseURL:rH(s)}),Object.assign($d,{owner:a,repo:c,branch:n}),se(ft).devModeEnabled&&console.info("repositoryInfo",Ti),Ti},signIn:sH,signOut:aH,fetchFiles:bH,fetchBlob:_H,commitChanges:fH,triggerDeployment:hH},ol="gitlab",gA="GitLab",mA="https://gitlab.com/api/v4",kH="https://gitlab.com",SH="oauth/authorize",EH=async({token:t,refreshToken:e})=>{const{id:n,name:r,username:i,email:o,avatar_url:s,web_url:a}=await Xn("/user",{token:t,refreshToken:e}),c=se(Kn);return c?.token&&c.token!==t&&(t=c.token,e=c.refreshToken),{backendName:ol,id:n,name:r,login:i,email:o,avatarURL:s,profileURL:a,token:t,refreshToken:e}},TH=t=>{const{origin:e}=new URL(t),n=new URLSearchParams({name:"Sveltia CMS",scopes:"api,read_user"});return`${e}/-/user_settings/personal_access_tokens?${n}`},CH=async({token:t,refreshToken:e,auto:n=!1})=>{if(!t){const{site_domain:r,auth_type:i}=se(Nt)?.backend??{},{clientId:o,authURL:s,tokenURL:a}=il,c={backendName:ol,authURL:s,scope:"api"};if(i==="pkce"){const u=window.opener?.origin===window.location.origin&&window.name==="auth";if(u&&await sA({backendName:ol,clientId:o,tokenURL:a}),u||n)return;({token:t,refreshToken:e}=await oA({...c,clientId:o}))}else{if(n)return;({token:t}=await iA({...c,siteDomain:r}))}}return EH({token:t,refreshToken:e})},AH=async()=>{},oo={...j_},vA=(t,e)=>({treeBaseURL:e?`${t}/-/tree/${e}`:t,blobBaseURL:e?`${t}/-/blob/${e}`:""}),$H=async()=>{const{owner:t,repo:e}=oo,n=se(Kn)?.id,{ok:r}=await Xn(`/projects/${encodeURIComponent(`${t}/${e}`)}/members/all/${n}`,{headers:{Accept:"application/json"},responseType:"raw"});if(!r)throw new Error("Not a collaborator of the repository",{cause:new Error(se(ue)("repository_no_access",{values:{repo:e}}))})},IH=`
|
|
306
306
|
query($fullPath: ID!) {
|
|
307
307
|
project(fullPath: $fullPath) {
|
|
308
308
|
repository {
|
|
@@ -376,7 +376,7 @@ ${o}`.trim()}function Q5(t,{maxDepth:e=1e3,numbersAsFloat:n=!1}={}){if(Ed(t)!=="
|
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
|
-
`,o=await fs(i);if(n.push(...Object.values(o.project.repository).map(({lastCommit:s})=>s)),!e.length)break}return n},jH=async(t,e,n)=>{const r=t.map(({path:i,sha:o},s)=>{const{size:a,rawTextBlob:c}=e[s],u=n[s],d={sha:o,size:Number(a),text:c,meta:{}};if(u){const{author:f,authorName:h,authorEmail:p,committedDate:g}=u,{id:m,username:v}=f??{},b=m?.match(/\d+/);d.meta={commitAuthor:{name:h,email:p,id:b?Number(b[0]):void 0,login:v},committedDate:new Date(g)}}return[i,d]});return Object.fromEntries(r)},BH=async t=>{const e=t.map(({path:i})=>i),n=await MH(e),r=e.length<100?await UH(e):[];return jH(t,n,r)},qH=async()=>{await $H(),await G_({repository:oo,fetchDefaultBranchName:PH,fetchLastCommit:LH,fetchFileList:FH,fetchFileContents:BH})},HH=async t=>{const{owner:e,repo:n,branch:r=""}=oo,{path:i}=t;return Xn(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?lfs=true&ref=${encodeURIComponent(r)}`,{responseType:"blob"})},GH="https://status.gitlab.com/",KH="https://status-api.hostedstatus.com/1.0/status/5b36dc6502d06804c08349f7",Id={github:xH,gitlab:{isGit:!0,name:ol,label:gA,repository:oo,statusDashboardURL:GH,checkStatus:async()=>{try{const{result:{status_overall:{status_code:t}}}=await Ad(KH);if(t===100)return"none";if([200,300,400].includes(t))return"minor";if([500,600].includes(t))return"major"}catch{}return"unknown"},init:()=>{const{backend:t}=se(Nt)??{};if(t?.name!==ol)return;const{repo:e,branch:n,base_url:r=kH,auth_endpoint:i=SH,app_id:o="",api_root:s=mA,graphql_api_root:a=s.replace(/\/api\/.+$/,"/api/graphql")}=t,{owner:c,repo:u}=e.match(/(?<owner>.+)\/(?<repo>[^/]+)$/)?.groups??{},d=`${c}/${u}`,f=`${tn(r)}/${tn(i)}`,h=B_(s,d);return Object.assign(oo,{service:ol,label:gA,owner:c,repo:u,branch:n,repoURL:h,newPatURL:AH(h),databaseName:`${ol}:${d}`,isSelfHosted:s!==mA},vA(h,n)),Object.assign(il,{clientId:o,authURL:f,tokenURL:f.replace("/authorize","/token"),authScheme:"Bearer",restBaseURL:tn(s),graphqlBaseURL:tn(a)}),Object.assign($d,{fullPath:d,branch:n}),se(ft).devModeEnabled&&console.info("repositoryInfo",oo),oo},signIn:TH,signOut:CH,fetchFiles:qH,fetchBlob:HH,commitChanges:OH},gitea:Qq,local:kq,"test-repo":Tq},VH=Object.keys(Id).filter(t=>t!=="local"),WH=Object.fromEntries(Object.entries(Id).filter(([,t])=>t.isGit)),Hc=it(),wn=en([Hc],([t],e,n)=>{n(r=>{const i=t?Id[t]:void 0;return i&&i!==r&&i.init(),i})}),Rp=it(!0),Fp=[],bA=(t,{globalMediaFolder:e,globalPublicFolder:n})=>t.trim().replace("{{media_folder}}",`/${e}`).replace("{{public_folder}}",`/${n}`).replace("//","/"),YH=({collectionName:t,fileName:e,mediaFolder:n,publicFolder:r,baseFolder:i,globalFolders:o})=>{n=bA(n,o),r=r!==void 0?bA(r,o):n;const s=!n.startsWith("/");return{collectionName:t,fileName:e,internalPath:tn(s?i??"":n),publicPath:r===""||/^[.@]/.test(r)?r:`/${tn(r)}`,entryRelative:s,hasTemplateTags:/{{.+?}}/.test(n)}},_A=t=>{if(t.mediaFolder===void 0)return;const e=YH(t),{globalMediaFolder:n,globalPublicFolder:r}=t.globalFolders;!e.entryRelative&&e.internalPath===n&&e.publicPath===r||Fp.push(e)},yA=({collectionName:t,files:e,globalFolders:n})=>{mp(e).forEach(r=>{const{name:i,file:o,media_folder:s,public_folder:a}=r;_A({collectionName:t,fileName:i,mediaFolder:s,publicFolder:a,baseFolder:fn(o).dirname,globalFolders:n})})},JH=t=>{Fp.length=0;const{media_folder:e,public_folder:n,collections:r,singletons:i}=t,o=tn(e).replace(/^\.$/,""),s=n?`/${tn(n)}`.replace(/^\/@/,"@"):`/${o}`,a={collectionName:void 0,internalPath:void 0,publicPath:void 0,entryRelative:!1,hasTemplateTags:!1},c={collectionName:void 0,internalPath:o,publicPath:s,entryRelative:!1,hasTemplateTags:!1},u={globalMediaFolder:o,globalPublicFolder:s};return ia({collections:r}).forEach(d=>{const{name:f,files:h,folder:p,path:g,media_folder:m,public_folder:v}=d;_A({collectionName:f,mediaFolder:m===void 0&&g!==void 0?"":m,publicFolder:v,baseFolder:p,globalFolders:u}),h?.length&&yA({collectionName:f,files:h,globalFolders:u})}),i?.length&&yA({collectionName:"_singletons",files:i,globalFolders:u}),Fp.sort((d,f)=>ki(d.internalPath??"",f.internalPath??"")),[a,c,...Fp]},ra={SINGLE_FILE:"single_file",MULTIPLE_FILES:"multiple_files",MULTIPLE_FOLDERS:"multiple_folders",MULTIPLE_FOLDERS_I18N_ROOT:"multiple_folders_i18n_root"},Pd="_default",W_={key:"translationKey",value:"{{slug}}"},so={i18nEnabled:!1,saveAllLocales:!0,allLocales:[Pd],initialLocales:[Pd],defaultLocale:Pd,structure:ra.SINGLE_FILE,structureMap:{i18nSingleFile:!1,i18nMultiFile:!1,i18nMultiFolder:!1,i18nRootMultiFolder:!1},canonicalSlug:{...W_},omitDefaultLocaleFromFileName:!1},ZH=(t,e)=>{const n=se(Nt);if(!Xt(n.i18n))return;const r={...n.i18n};if(t.i18n||Z_(t)){if(Xt(t.i18n)&&Object.assign(r,t.i18n),e)if(e.i18n)Xt(e.i18n)&&Object.assign(r,e.i18n);else return}else return;return r},XH=(t,e)=>e?e.file.includes("{{locale}}")?ra.MULTIPLE_FILES:ra.SINGLE_FILE:t,QH=(t,e)=>({i18nSingleFile:t&&e===ra.SINGLE_FILE,i18nMultiFile:t&&e===ra.MULTIPLE_FILES,i18nMultiFolder:t&&e===ra.MULTIPLE_FOLDERS,i18nRootMultiFolder:t&&e===ra.MULTIPLE_FOLDERS_I18N_ROOT}),eG=(t,e,n)=>t?n&&e.includes(n)?n:e[0]:Pd,tG=(t,e,n)=>t==="all"?e:t==="default"?[n]:e.filter(r=>r===n||(Array.isArray(t)?t.includes(r):!0)),Nd=(t,e)=>{const n=ZH(t,e),{structure:r=ra.SINGLE_FILE,locales:i=[],default_locale:o,initial_locales:s,save_all_locales:a=!0,canonical_slug:c={key:void 0,value:void 0},omit_default_locale_from_filename:u=!1}=n??{};n?.save_all_locales!==void 0&&nh("save_all_locales");const{key:d=W_.key,value:f=W_.value}=c,h=i.length>0,p=h?i:[Pd],g=eG(h,p,o),m=XH(r,e),v=QH(h,m),b=h?a===!0&&s===void 0:!0,y=tG(s,p,g),w=u&&(e?/\.{{locale}}\.[a-zA-Z0-9]+$/.test(e.file):v.i18nMultiFile);return{i18nEnabled:h,saveAllLocales:b,allLocales:p,defaultLocale:g,initialLocales:y,structure:m,structureMap:v,canonicalSlug:{key:d,value:f},omitDefaultLocaleFromFileName:w}},nG=({collection:t,file:e})=>{const n=tn(e.file);if(!n.includes("{{locale}}"))return{_default:n};const r=Nd(t,e);return Object.fromEntries(r.allLocales.map(i=>[i,ab({_i18n:r,locale:i,path:n})]))},wA=(t,e)=>{if(gp(e))return{collectionName:t.name,fileName:e.name,filePathMap:nG({collection:t,file:e})}},xA=(t,e)=>ki(Object.values(t.filePathMap??{})[0],Object.values(e.filePathMap??{})[0]),rG=({collections:t})=>ia({collections:t,type:"entry",visible:!0}).map(e=>{const{name:n,folder:r}=e,i=tn(r),{allLocales:o,structureMap:{i18nRootMultiFolder:s}}=Nd(e);return{collectionName:n,folderPath:i,folderPathMap:Object.fromEntries(o.map(a=>[a,s?`${a}/${i}`:i]))}}).sort((e,n)=>ki(e.folderPath??"",n.folderPath??"")),iG=({collections:t})=>ia({collections:t,type:"file",visible:!0}).map(e=>(e.files??[]).map(n=>wA(e,n))).flat(1).filter(e=>!!e).sort(xA),oG=({singletons:t})=>{const e=Array.isArray(t)?mp(t):[];if(!e.length)return[];const n={name:"_singletons",files:e};return e.map(r=>wA(n,r)).filter(r=>!!r).sort(xA)},sG=t=>[...rG(t),...iG(t),...oG(t)],aG=["text/yaml","application/yaml","application/json"],lG=async({href:t,type:e="application/yaml"})=>{let n;if(!aG.includes(e))throw new Error(se(ue)("config.error.parse_failed"),{cause:new Error(se(ue)("config.error.parse_failed_unsupported_type"))});try{n=await fetch(t)}catch(s){throw new Error(se(ue)("config.error.fetch_failed"),{cause:s})}const{ok:r,status:i}=n;if(!r)throw new Error(se(ue)("config.error.fetch_failed"),{cause:new Error(se(ue)("config.error.fetch_failed_not_ok",{values:{status:i}}))});let o;try{e==="application/json"?o=n.json():o=sd.parse(await n.text(),{merge:!0})}catch(s){throw new Error(se(ue)("config.error.parse_failed"),{cause:s})}if(!Xt(o))throw new Error(se(ue)("config.error.parse_failed"),{cause:new Error(se(ue)("config.error.parse_failed_invalid_object"))});return o},cG=t=>{if(t.endsWith("/"))return`${t}config.yml`;const e=t.split("/");return e.pop()?.includes(".")?`${e.join("/")}/config.yml`:`${t}/config.yml`},kA=async()=>{const t=[...document.querySelectorAll('link[rel="cms-config-url"]')].map(({href:n,type:r})=>({href:n,type:r}));t.length||t.push({href:cG(window.location.pathname)});const e=await Promise.all(t.map(n=>lG(n)));return e.length===1?e[0]:dv.all(e)},uG={DEV:!1},{DEV:dG}=uG,fG=void 0,SA={},Nt=it(),Y_=it(),J_=it(),hG=t=>{if(!Array.isArray(t.collections)&&!Array.isArray(t.singletons))throw new Error(se(ue)("config.error.no_collection"));if(!t.backend)throw new Error(se(ue)("config.error.missing_backend"));if(!t.backend.name)throw new Error(se(ue)("config.error.missing_backend_name"));if(!VH.includes(t.backend.name))throw new Error(se(ue)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(Object.keys(WH).includes(t.backend.name)){if(t.backend.repo===void 0)throw new Error(se(ue)("config.error.missing_repository"));if(typeof t.backend.repo!="string"||!/(.+)\/([^/]+)$/.test(t.backend.repo))throw new Error(se(ue)("config.error.invalid_repository"))}if(t.backend.auth_type==="implicit")throw new Error(se(ue)("config.error.oauth_implicit_flow"));if(t.backend.auth_type==="pkce"&&!t.backend.app_id)throw new Error(se(ue)("config.error.oauth_no_app_id"));if(t.backend.automatic_deployments!==void 0&&nh("automatic_deployments"),t.media_folder===void 0)throw new Error(se(ue)("config.error.missing_media_folder"));if(typeof t.media_folder!="string")throw new Error(se(ue)("config.error.invalid_media_folder"));if(t.public_folder!==void 0){if(typeof t.public_folder!="string")throw new Error(se(ue)("config.error.invalid_public_folder"));if(/^\.{1,2}\//.test(t.public_folder))throw new Error(se(ue)("config.error.public_folder_relative_path"));if(/^https?:/.test(t.public_folder))throw new Error(se(ue)("config.error.public_folder_absolute_url"))}},pG=async t=>{Nt.set(void 0),J_.set(void 0);try{if(!window.isSecureContext)throw new Error(se(ue)("config.error.no_secure_context"));let e;if(t){if(!Xt(t))throw new Error(se(ue)("config.error.parse_failed"));e=t,e.load_config_file!==!1&&(e=dv(await kA(),e))}else e=await kA();Object.assign(SA,e),hG(e);const n=structuredClone(e);n._siteURL=n.site_url?.trim()||(dG?fG:window.location.origin),n._baseURL=lv(n._siteURL)?new URL(n._siteURL).origin:"",n.collections?.forEach(r=>{"folder"in r&&(r.folder==="."||r.folder==="/")&&(r.folder="")}),Nt.set(n),Y_.set(await Fa(sd.stringify(n)))}catch(e){J_.set({message:e.name==="Error"?e.message:se(ue)("config.error.unexpected")}),console.error(e,e.cause)}};Nt.subscribe(t=>{if(se(ft).devModeEnabled&&console.info("siteConfig",t),!t)return;const e=sG(t),n=JH(t);r_.set(e),Ks.set(n),se(ft).devModeEnabled&&(console.info("allEntryFolders",e),console.info("allAssetFolders",n))});const Vn=it(),Dp=new Map,Ld=t=>typeof t.folder=="string"&&!Array.isArray(t.files),Mp=t=>t.folder===void 0&&Array.isArray(t.files),Z_=t=>Mp(t)&&t.name==="_singletons",gG=(t,{visible:e=void 0,type:n=void 0}={})=>"divider"in t||e&&t.hide?!1:n==="entry"?Ld(t):n==="file"?Mp(t):n==="singleton"?Z_(t):Ld(t)||Mp(t),ia=({collections:t=se(Nt)?.collections??[],visible:e,type:n}={})=>t.filter(r=>gG(r,{visible:e,type:n})),mG=()=>ia({visible:!0})[0],vG=t=>{const{folder:e,fields:n,thumbnail:r}=t;return e?typeof r=="string"?[r]:Array.isArray(r)?r:n?.length?n.filter(({widget:i="string"})=>["image","file"].includes(i)).map(({name:i})=>i):[]:[]},bG=(t,e)=>({...t,_i18n:e,_type:"entry",_file:IA({rawCollection:t,_i18n:e}),_thumbnailFieldNames:vG(t)}),EA=(t,e,n)=>({...t,_i18n:e,_type:Z_(t)?"singleton":"file",_fileMap:Object.fromEntries(n.filter(gp).map(r=>{const i=Nd(t,r),o=IA({rawCollection:t,file:r,_i18n:i});return[r.name,{...r,_file:o,_i18n:i}]}))}),TA=()=>{const t=se(Nt)?.singletons;if(!Array.isArray(t))return;const e=mp(t).map(i=>({...i,file:tn(i.file)}));if(!e.length)return;const n={name:"_singletons",files:e},r=Nd(n);return EA(n,r,e)},Kr=t=>{const e=Dp.get(t);if(e)return e;if(t==="_singletons"){const u=TA();return Dp.set(t,u),u}const n=ia().find(u=>u.name===t),r=n?Ld(n):!1,i=n?Mp(n):!1;if(!n||!r&&!i){Dp.set(t,void 0);return}const{folder:o,files:s=[]}=n;r?n.folder=tn(o):s.forEach(u=>{u.file&&(u.file=tn(u.file))});const a=Nd(n),c=r?bG(n,a):EA(n,a,s);return Dp.set(t,c),c},hs=(t,{useSingular:e=!1}={})=>{const{_type:n,name:r,label:i,label_singular:o}=t;return n==="singleton"?se(ue)("files"):e&&o?o:i||r},CA=t=>t?t==="_singletons"?9999999:se(Nt)?.collections?.findIndex(({name:e})=>e===t)??-1:-1,zp=new Map,AA=({extension:t,format:e})=>{const n=e?zp.get(e)?.extension:void 0;return n||t||(e==="yaml"||e==="yml"?"yml":e==="toml"?"toml":e==="json"?"json":"md")},_G=({extension:t,format:e})=>e||(t==="yaml"||t==="yml"?"yaml":t==="toml"?"toml":t==="json"?"json":["md","mkd","mkdn","mdwn","mdown","markdown"].includes(t)?"frontmatter":"yaml-frontmatter"),yG=({extension:t,format:e,basePath:n,subPath:r,indexFileName:i,_i18n:o})=>{const{allLocales:s,defaultLocale:a,omitDefaultLocaleFromFileName:c,structureMap:{i18nMultiFile:u,i18nMultiFolder:d,i18nRootMultiFolder:f}}=o,h=r?`(?<subPath>${r.replace(/\//g,"\\/").replace(/{{.+?}}/g,"[^/]+?")}${i?`|${i}`:""})`:"(?<subPath>[^/]+?)",p=`(?<locale>${s.join("|")})`,g=["^",f?`${p}\\/`:"",n?`${Kt(n)}\\/`:"",d?`${p}\\/`:"",h,u?c?`(?:\\.(?<locale>${s.filter(m=>m!==a).join("|")}))?`:`\\.${p}`:"","\\.",AA({format:e,extension:t}),"$"].join("");return new RegExp(g)},$A=({format:t,delimiter:e})=>{if(typeof e=="string"&&e.trim())return[e,e];if(Array.isArray(e)&&e.length===2)return e;if(t==="json-frontmatter")return["{","}"];if(t==="toml-frontmatter")return["+++","+++"];if(t==="yaml-frontmatter")return["---","---"]},IA=({rawCollection:t,file:e,_i18n:n})=>{const{folder:r,path:i,extension:o,format:s,frontmatter_delimiter:a,yaml_quote:c}=t,u=Ld(t),d=e?.file?tn(e.file):void 0,f=d?fn(d).extension:o,h=e?.format??s,p=AA({format:h,extension:f}),g=_G({format:h,extension:p}),m=e?.frontmatter_delimiter??a,v=u?tn(r):void 0,b=u?ci(t)?.name:void 0;return c!==void 0&&nh("yaml_quote"),{extension:p,format:g,basePath:v,subPath:u?i:void 0,fullPathRegEx:v!==void 0?yG({extension:p,format:g,basePath:v,subPath:i,indexFileName:b,_i18n:n}):void 0,fullPath:d?ab({_i18n:n,locale:n.defaultLocale,path:d}):void 0,fmDelimiters:$A({format:g,delimiter:m}),yamlQuote:!!c}},wG="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(wG);const xG=Object.freeze(Object.defineProperty({__proto__:null,strings:{ok:"OK",cancel:"Cancel",close:"Close",clear:"Clear",insert:"Insert",update:"Update",remove:"Remove",collapse:"Collapse",expand:"Expand",dismiss:"Dismiss",calendar:{year:"Year",previous_decade:"Previous Decade",next_decade:"Next Decade",month:"Month",previous_month:"Previous Month",next_month:"Next Month",today:"Today"},split_button:{x_options:"{name} Options",more_options:"More Options"},combobox:{select_an_option:"Select an option…",filter_options:"Filter Options",no_matching_options:"No matching options found"},number_input:{decrease:"Decrease",increase:"Increase"},password_input:{show_password:"Show Password",hide_password:"Hide Password"},text_editor:{text_editor:"Text Editor",code_editor:"Code Editor",text_style_options:"Text Style Options",show_text_style_options:"Show Text Style Options",paragraph:"Paragraph",heading_1:"Heading 1",heading_2:"Heading 2",heading_3:"Heading 3",heading_4:"Heading 4",heading_5:"Heading 5",heading_6:"Heading 6",bulleted_list:"Bulleted List",numbered_list:"Numbered List",blockquote:"Block Quote",code_block:"Code Block",bold:"Bold",italic:"Italic",code:"Code",link:"Link",insert_link:"Insert Link",update_link:"Update Link",text:"Text",url:"URL",edit_in_markdown:"Edit in Markdown",converter_error:"There was an error while enabling rich text mode. Please use the plain text editor instead.",language:"Language",plain_text:"Plain Text"}}},Symbol.toStringTag,{value:"Module"})),kG=Object.freeze(Object.defineProperty({__proto__:null,strings:{ok:"OK",cancel:"キャンセル",close:"閉じる",clear:"クリア",insert:"挿入",update:"更新",remove:"削除",collapse:"折り畳む",expand:"広げる",dismiss:"閉じる",calendar:{year:"年",previous_decade:"前の 10 年",next_decade:"次の 10 年",month:"月",previous_month:"前月",next_month:"翌月",today:"今日"},split_button:{x_options:"{name} オプション",more_options:"その他のオプション"},combobox:{select_an_option:"オプションを選択…",filter_options:"オプションを絞り込み",no_matching_options:"一致するオプションは見つかりませんでした"},number_input:{decrease:"減らす",increase:"増やす"},password_input:{show_password:"パスワードを表示",hide_password:"パスワードを隠す"},text_editor:{text_editor:"テキストエディター",code_editor:"コードエディター",text_style_options:"テキストスタイルオプション",show_text_style_options:"テキストスタイルオプションを表示",paragraph:"段落",heading_1:"見出し 1",heading_2:"見出し 2",heading_3:"見出し 3",heading_4:"見出し 4",heading_5:"見出し 5",heading_6:"見出し 6",bulleted_list:"番号なしリスト",numbered_list:"番号付きリスト",blockquote:"ブロック引用",code_block:"コードブロック",bold:"太字",italic:"斜体",code:"コード",link:"リンク",insert_link:"リンクを挿入",update_link:"リンクを更新",text:"テキスト",url:"URL",edit_in_markdown:"マークダウンで編集",converter_error:"リッチテキストモードを有効化中に問題が発生しました。代わりにプレーンテキストエディターを使用してください。",language:"言語",plain_text:"プレーンテキスト"}}},Symbol.toStringTag,{value:"Module"}));var SG=j("<span> </span>");const EG={hash:"svelte-1tdjcqs",code:".icon.small-arrow.svelte-1tdjcqs {overflow:hidden;width:12px;text-indent:-6px;}"};function Xe(t,e){xe(t,EG);let n=ot(e,["$$slots","$$events","$$legacy","class","name"]);var r=SG();pt(r,()=>({...n,class:`sui icon material-symbols-outlined ${e.class??""}`,"aria-hidden":!("aria-label"in n)}),void 0,void 0,"svelte-1tdjcqs");var i=M(r);Z(()=>ne(i,e.name)),T(t,r)}var TG=j("<div><!> <!></div>");const CG={hash:"svelte-1lvgxwx",code:".alert.svelte-1lvgxwx {display:flex;align-items:center;gap:var(--gap, 8px);padding:var(--padding, 8px);border-width:var(--border-width, var(--sui-control-medium-border-width));border-style:var(--border-style, solid);border-radius:var(--border-radius, var(--sui-control-medium-border-radius));font-size:var(--font-size, var(--sui-font-size-default));}.alert.error.svelte-1lvgxwx {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.alert.warning.svelte-1lvgxwx {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.alert.info.svelte-1lvgxwx {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.alert.success.svelte-1lvgxwx {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}"};function jn(t,e){xe(t,CG);let n=ot(e,["$$slots","$$events","$$legacy","status","children","icon"]);var r=TG();pt(r,()=>({...n,role:"alert",class:`sui alert ${e.status??""}`}),void 0,void 0,"svelte-1lvgxwx");var i=M(r);{var o=c=>{var u=X(),d=D(u);Fe(d,()=>e.icon),T(c,u)},s=c=>{{let u=_(()=>e.status==="success"?"check_circle":e.status);Xe(c,{get name(){return l(u)}})}};H(i,c=>{e.icon?c(o):c(s,!1)})}var a=z(i,2);Fe(a,()=>e.children??Me),T(t,r)}const PA=()=>navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"),X_=(t,e)=>{const{ctrlKey:n,metaKey:r,altKey:i,shiftKey:o,code:s}=t,a=s.replace(/^(?:Digit|Key)(.)$/,"$1");return e.split(/\s+/).some(c=>{const u=c.split("+");return u.includes("Ctrl")&&!n||u.includes("Meta")&&!r||u.includes("Alt")&&!i||u.includes("Shift")&&!o||!u.includes("Ctrl")&&n||!u.includes("Meta")&&r||!u.includes("Alt")&&i||!u.includes("Shift")&&o?!1:u.filter(d=>!["Ctrl","Meta","Alt","Shift"].includes(d)).every(d=>d.toUpperCase()===a.toUpperCase())})},NA=(t,e="")=>{let n;const r=s=>{const{disabled:a,offsetParent:c}=t,{top:u,left:d}=t.getBoundingClientRect();!X_(s,n)||!c||(a&&t.style.setProperty("pointer-events","auto"),document.elementsFromPoint(d+4,u+4).includes(t)&&(s.preventDefault(),a||(t.focus(),t.click())),a&&t.style.removeProperty("pointer-events"))},i=()=>{globalThis.removeEventListener("keydown",r,{capture:!0}),t.removeAttribute("aria-keyshortcuts")},o=()=>{n=e?e.replace(/\bAccel\b/g,PA()?"Meta":"Ctrl"):void 0,n&&(globalThis.addEventListener("keydown",r,{capture:!0}),t.setAttribute("aria-keyshortcuts",n))};return o(),{update(s){i(),o()},destroy(){i()}}};var AG=j('<span role="none" class="sui truncated-text svelte-xh9ynf"><!></span>');const $G={hash:"svelte-xh9ynf",code:".truncated-text.svelte-xh9ynf {display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;overflow-wrap:anywhere;}"};function wr(t,e){xe(t,$G);let n=R(e,"lines",3,1),r=R(e,"children",3,void 0);var i=AG(),o=M(i);Fe(o,()=>r()??Me),Z(()=>Zi(i,`-webkit-line-clamp: ${n()??""}; line-clamp: ${n()??""};`)),T(t,i)}const Q_=(t="e",e=7)=>[t,oi(e)].join("-"),Gc=t=>{if(t)return new Promise(e=>{const n=new IntersectionObserver(([r])=>{r.isIntersecting&&(n.disconnect(),e(void 0))});globalThis.requestAnimationFrame(()=>{n.observe(t)})})};let IG=class{open=it(!1);style=it({inset:void 0,zIndex:void 0,minWidth:void 0,maxWidth:void 0,height:void 0});observer=new IntersectionObserver(e=>{e.forEach(({intersectionRect:n,rootBounds:r})=>{if(!n||!r)return;const i=this.popupElement.querySelector(".content"),{scrollHeight:o,scrollWidth:s}=i,a=n.top-8,c=r.height-n.bottom-8;let{position:u}=this,d;u.startsWith("bottom-")&&o>c&&(a>c?(u=u.replace("bottom-","top-"),d=a):d=c),u.endsWith("-left")&&n.left+s>r.width-8&&(u=u.replace("-left","-right"));const f=u.startsWith("bottom-")?`${Math.round(n.bottom)}px`:u.endsWith("-top")?`${Math.round(n.top)}px`:"auto",h=u.startsWith("left-")?`${Math.round(r.width-n.left)}px`:u.endsWith("-right")?`${Math.round(r.width-n.right)}px`:"auto",p=u.startsWith("top-")?`${Math.round(r.height-n.top)}px`:u.endsWith("-bottom")?`${Math.round(r.height-n.bottom)}px`:"auto",g=u.startsWith("right-")?`${Math.round(n.right)}px`:u.endsWith("-left")?`${Math.round(n.left)}px`:"auto",m={inset:[f,h,p,g].join(" "),zIndex:1e3,minWidth:`${Math.round(n.width)}px`,maxWidth:u.endsWith("-left")?`${Math.round(r.width-n.left-8)}px`:`${Math.round(n.right-8)}px`,height:d?`${Math.round(d)}px`:"auto"};JSON.stringify(m)!==JSON.stringify(se(this.style))&&this.style.set(m)})});constructor(e,n,r,i){this.anchorElement=e,this.popupElement=n,this.position=r,this.positionBaseElement=i??e,this.id=Q_("popup"),this.anchorElement.setAttribute("aria-controls",this.id),this.popupElement.setAttribute("id",this.id),Uu(e,"click",()=>{!this.isDisabled&&!this.isReadOnly&&this.open.set(!se(this.open))}),Uu(e,"keydown",o=>{const{key:s,ctrlKey:a,metaKey:c,shiftKey:u,altKey:d}=o,f=u||d||a||c;!this.isDisabled&&!this.isReadOnly&&["Enter"," "].includes(s)&&!f&&(o.preventDefault(),o.stopPropagation(),this.open.set(!se(this.open)))}),Uu(e,"transitionstart",()=>{this.anchorElement.closest(".hiding, .hidden, [hidden]")&&this.hideImmediately()}),new IntersectionObserver(([o])=>{!o.isIntersecting&&se(this.open)&&this.hideImmediately()}).observe(this.anchorElement),Uu(this.popupElement,"click",o=>{o.stopPropagation();const s=o.target;se(this.open)&&(s===this.popupElement||s.matches('[role^="menuitem"], [role="option"]'))&&this.open.set(!1)}),Uu(this.popupElement,"keydown",o=>{const{key:s,ctrlKey:a,metaKey:c,shiftKey:u,altKey:d}=o;s==="Escape"&&!(u||d||a||c)&&(o.preventDefault(),o.stopPropagation(),this.open.set(!1))}),this.open.subscribe(o=>{o?this.checkPosition():this.anchorElement.getAttribute("aria-expanded")==="true"&&(this.anchorElement.focus(),this.anchorElement.removeAttribute("aria-controls")),this.anchorElement.setAttribute("aria-expanded",String(o))}),new ResizeObserver(()=>{this.checkPosition()}).observe(this.positionBaseElement)}get isDisabled(){return this.anchorElement.matches('[aria-disabled="true"]')}get isReadOnly(){return this.anchorElement.matches('[aria-readonly="true"]')}checkPosition(){this.observer.unobserve(this.positionBaseElement),this.observer.observe(this.positionBaseElement)}async hideImmediately(){this.popupElement.hidden=!0,this.open.set(!1),await Lt(50),this.popupElement.hidden=!1}};const PG=(...t)=>new IG(...t);function NG(t,e){var n=X(),r=D(n);Fe(r,()=>e.children??Me),T(t,n)}var LG=j("<dialog><!> <!></dialog>");const OG={hash:"svelte-4e0en9",code:"dialog.svelte-4e0en9 {position:fixed;inset:0;z-index:9999999;display:flex;justify-content:center;align-items:center;overflow:hidden;outline:0;margin:0;border:0;padding:0;width:100dvw;max-width:100dvw;height:100dvh;max-height:100dvh;color:var(--sui-primary-foreground-color);background:transparent;-webkit-user-select:none;user-select:none;touch-action:none;pointer-events:all;cursor:default;}dialog.svelte-4e0en9::backdrop {background:transparent;}dialog.backdrop.svelte-4e0en9 {background-color:var(--sui-popup-backdrop-color);}dialog.open.svelte-4e0en9 {transition-duration:50ms;opacity:1;}dialog.svelte-4e0en9:not(.open) {transition-duration:400ms;opacity:0;}dialog[hidden].svelte-4e0en9 {transition-duration:1ms !important;}dialog.svelte-4e0en9:not(.active) {pointer-events:none !important;}dialog.svelte-4e0en9:not(.active) * {transition-duration:0ms !important;pointer-events:none !important;}"};function LA(t,e){ae(e,!0),xe(t,OG);const n=w=>{var S=LG(),C=({target:A})=>{i()&&a()&&A?.matches("dialog")&&(i(i().returnValue="cancel",!0),r(!1))},E=A=>{A.preventDefault(),i()&&c()&&(i(i().returnValue="cancel",!0),r(!1))};pt(S,A=>({...d,inert:!l(p),role:o(),class:`sui modal ${e.class??""}`,onclick:C,oncancel:E,[_r]:A}),[()=>({backdrop:s(),open:l(p),active:l(g)})],void 0,"svelte-4e0en9");var $=M(S);Fe($,()=>e.extraContent??Me);var k=z($,2);{var x=A=>{var I=X(),P=D(I);Fe(P,()=>e.children??Me),T(A,I)};H(k,A=>{(l(m)||u())&&A(x)})}bt(S,A=>i(A),()=>i()),T(w,S)};let r=R(e,"open",15,!1),i=R(e,"dialog",15),o=R(e,"role",3,"dialog"),s=R(e,"showBackdrop",3,!1),a=R(e,"lightDismiss",3,!1),c=R(e,"escapeDismiss",3,!0),u=R(e,"keepContent",3,!1),d=ot(e,["$$slots","$$events","$$legacy","open","dialog","class","role","showBackdrop","lightDismiss","escapeDismiss","keepContent","children","extraContent","onOpening","onOpen","onClosing","onOk","onCancel","onClose"]);const f=()=>{i()?.focus()},h=w=>{i()&&(i(i().returnValue=w,!0),r(!1))};let p=oe(!1),g=oe(!1),m=oe(!1);const v=async()=>new Promise(w=>{const S=C=>{C.target===i()&&(i().removeEventListener("transitionend",S),w())};i()?.addEventListener("transitionend",S)}),b=async()=>{!i()||i()?.open||(e.onOpening?.(new CustomEvent("Opening")),G(m,!0),i().showModal(),e.onOpen?.(new CustomEvent("Open")),await Lt(0),G(p,!0),await v(),G(g,!0))},y=async()=>{if(!i()||!i().open)return;const{returnValue:w}=i();e.onClosing?.(new CustomEvent("Closing")),document.body.inert=!0,i().close(),document.body.inert=!1,G(g,!1),G(p,!1),await v(),G(m,!1),w==="ok"&&e.onOk?.(new CustomEvent("Ok")),w==="cancel"&&e.onCancel?.(new CustomEvent("Cancel")),e.onClose?.(new CustomEvent("Close",{detail:{returnValue:w}})),i(i().returnValue="",!0)};return Re(()=>{r()?b():y()}),qt(()=>{const w=Qf(NG,{target:document.querySelector(".sui.app-shell")??document.body,props:{children:n}});return()=>{i()?.close(),m1(w)}}),le({focus:f,close:h})}var RG=j('<div role="none"><!></div>');const FG={hash:"svelte-eb9zx0",code:".content.svelte-eb9zx0 {position:absolute;overflow-y:auto;outline-width:0 !important;width:auto;color:var(--sui-primary-foreground-color);background-color:var(--sui-secondary-background-color-translucent);box-shadow:0 8px 16px var(--sui-popup-shadow-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition-property:opacity, transform;}.content.menu.svelte-eb9zx0 {border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}.content.menu.svelte-eb9zx0 .sui.menu {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.listbox.svelte-eb9zx0 {border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);}.content.listbox.svelte-eb9zx0 .sui.listbox {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.touch.svelte-eb9zx0 {position:static;border-width:0 !important;border-radius:4px !important;padding:8px;min-width:320px !important;max-width:calc(100dvw - 32px) !important;max-height:calc(100dvh - 32px) !important;}dialog.open .content.touch.svelte-eb9zx0 {transform:scale(100%) !important;}dialog:not(.open) .content.touch.svelte-eb9zx0 {transform:scale(90%);}.content.touch.combobox.svelte-eb9zx0 .sui.listbox {gap:4px;padding:8px 4px !important;}dialog.open .content.svelte-eb9zx0 {transition-duration:50ms;opacity:1;transform:translateY(2px);}dialog:not(.open) .content.svelte-eb9zx0 {transition-duration:300ms;opacity:0;transform:translateY(-8px);}"};function Up(t,e){ae(e,!0),xe(t,FG);const[n,r]=ve(),i=()=>q(l(w),"$style",n),o=P=>{var O=RG();let L,F;var U=M(O);Fe(U,()=>e.children??Me),bt(O,V=>c(V),()=>c()),Z((V,W)=>{O.hidden=!s(),L=rn(O,1,`content ${e.class??""} ${l(y)??""}`,"svelte-eb9zx0",L,V),F=Zi(O,"",F,W)},[()=>({touch:l($)}),()=>({inset:i().inset,"z-index":i().zIndex,"min-width":i().minWidth,"max-width":i().maxWidth,"max-height":i().height,visibility:i().inset?void 0:"hidden"})]),jr("mouseenter",O,()=>{a(!0),h()&&window.clearTimeout(C)}),jr("mouseleave",O,()=>{a(!1),h()&&(C=window.setTimeout(()=>{s(!1)},200))}),T(P,O)};let s=R(e,"open",15,!1),a=R(e,"hovered",15,!1),c=R(e,"content",15,void 0),u=R(e,"showBackdrop",3,void 0),d=R(e,"position",3,"bottom-left"),f=R(e,"positionBaseElement",3,void 0),h=R(e,"parentDialogElement",3,void 0),p=R(e,"touchOptimized",3,!1),g=ot(e,["$$slots","$$events","$$legacy","open","hovered","content","class","showBackdrop","anchor","position","positionBaseElement","parentDialogElement","touchOptimized","children","onOpen"]),m=oe(!1),v=oe(void 0),b=oe(!1),y=oe(void 0),w=oe(Ft(it({inset:void 0,zIndex:void 0,width:void 0,height:void 0}))),S,C=0;const E=()=>{S=PG(e.anchor,l(v),d(),f()),BR(G(w,S.style,!0),"$style",n),S.open.subscribe(P=>{s(P)}),G(y,e.anchor?.getAttribute("aria-haspopup")??void 0,!0),G(m,!0)};Re(()=>{h()&&!l(v)&&c()&&(G(v,h()),l(v).append(c()))}),Re(()=>{e.anchor&&l(v)&&!l(m)&&E()}),Re(()=>{h()&&s()&&S?.checkPosition()});const $=_(()=>p()&&l(b));qt(()=>{G(b,globalThis.matchMedia("(pointer: coarse)").matches,!0)});var k=X(),x=D(k);{var A=P=>{o(P)},I=P=>{{let O=_(()=>u()??l($));LA(P,dn(()=>g,{role:"none",class:"popup",get showBackdrop(){return l(O)},lightDismiss:!0,keepContent:!0,onOpen:async L=>{if(e.onOpen?.(L),await Lt(100),!c())return;const F=c().querySelector('[tabindex]:not([aria-disabled="true"])');F?F.focus():(c(c().tabIndex=-1,!0),c().focus())},get dialog(){return l(v)},set dialog(L){G(v,L,!0)},get open(){return s()},set open(L){s(L)},children:(L,F)=>{o(L)},$$slots:{default:!0}}))}};H(x,P=>{h()?P(A):P(I,!1)})}T(t,k),le(),r()}var DG=j('<span role="none" class="label svelte-1dln6ll"><!></span>'),MG=j('<span role="none" class="label svelte-1dln6ll"><!></span>'),zG=j('<span role="none" class="label svelte-1dln6ll"><!></span>'),UG=j("<!> <!>",1),jG=j("<button><!> <!> <!></button> <!>",1);const BG={hash:"svelte-1dln6ll",code:'button.svelte-1dln6ll {flex:none;display:inline-flex;align-items:center;gap:4px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color, inherit);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;transition:all 200ms;}button[hidden].svelte-1dln6ll {display:none !important;}button.svelte-1dln6ll:not(:disabled):focus-visible {z-index:1;}button.svelte-1dln6ll:is(.primary:where(.svelte-1dln6ll), .secondary:where(.svelte-1dln6ll), .tertiary:where(.svelte-1dln6ll), .ghost:where(.svelte-1dln6ll)) {justify-content:center;border-width:1px;}button.svelte-1dln6ll:is(.primary:where(.svelte-1dln6ll), .secondary:where(.svelte-1dln6ll), .tertiary:where(.svelte-1dln6ll), .ghost:where(.svelte-1dln6ll)) .label:where(.svelte-1dln6ll):only-child {padding:0 4px;}button.primary.svelte-1dln6ll {border-width:var(--sui-button-primary-border-width, 1px);border-style:var(--sui-button-primary-border-style, solid);border-color:var(--sui-button-primary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted));background-color:var(--sui-button-primary-background-color, var(--sui-primary-accent-color));font-weight:var(--sui-button-primary-font-weight, var(--sui-font-weight-normal, normal));}button.primary.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-primary-foreground-color-focus, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-focus, var(--sui-primary-accent-color-light));}button.primary.svelte-1dln6ll:active {color:var(--sui-button-primary-foreground-color-active, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-active, var(--sui-primary-accent-color-dark));}button.secondary.svelte-1dln6ll {border-width:var(--sui-button-secondary-border-width, 1px);border-style:var(--sui-button-secondary-border-style, solid);border-color:var(--sui-button-secondary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text));background-color:var(--sui-button-secondary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-secondary-font-weight, var(--sui-font-weight-normal, normal));}button.secondary.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-secondary-foreground-color-focus, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-focus, var(--sui-hover-background-color));}button.secondary.svelte-1dln6ll:active {color:var(--sui-button-secondary-foreground-color-active, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-active, var(--sui-active-background-color));}button.secondary[aria-pressed=true].svelte-1dln6ll {color:var(--sui-button-secondary-foreground-color-pressed);background-color:var(--sui-button-secondary-background-color-pressed, var(--sui-primary-accent-color));}button.tertiary.svelte-1dln6ll {border-width:var(--sui-button-tertiary-border-width, 1px);border-style:var(--sui-button-tertiary-border-style, solid);border-color:var(--sui-button-tertiary-border-color, var(--sui-button-border-color));color:var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));background-color:var(--sui-button-tertiary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-tertiary-font-weight, var(--sui-font-weight-normal, normal));}button.tertiary.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-tertiary-foreground-color-focus, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-focus, var(--sui-hover-background-color));}button.tertiary.svelte-1dln6ll:active {color:var(--sui-button-tertiary-foreground-color-active, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-active, var(--sui-active-background-color));}button.tertiary[aria-pressed=true].svelte-1dln6ll {color:var(--sui-button-tertiary-foreground-color-pressed);background-color:var(--sui-button-tertiary-background-color-pressed, var(--sui-selected-background-color));}button.ghost.svelte-1dln6ll {font-weight:var(--sui-button-ghost-font-weight, var(--sui-font-weight-normal, normal));}button.ghost.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-ghost-foreground-color-focus);background-color:var(--sui-button-ghost-background-color-focus, var(--sui-hover-background-color));}button.ghost.svelte-1dln6ll:active {color:var(--sui-button-ghost-foreground-color-active);background-color:var(--sui-button-ghost-background-color-active, var(--sui-active-background-color));}button.ghost[aria-pressed=true].svelte-1dln6ll {color:var(--sui-button-ghost-foreground-color-pressed);background-color:var(--sui-button-ghost-background-color-pressed, var(--sui-selected-background-color));}button.link.svelte-1dln6ll {outline:0;margin:0;border-radius:0 !important;padding:0 !important;height:auto !important;color:var(--sui-button-link-foreground-color, var(--sui-primary-accent-color-text));}button.link.svelte-1dln6ll .label:where(.svelte-1dln6ll) {padding:0;line-height:var(--sui-line-height-compact);text-decoration:var(--sui-button-link-text-decoration, none);text-underline-offset:2px;white-space:normal;}:is(:root, :host)[data-underline-links="true"] button.link.svelte-1dln6ll .label:where(.svelte-1dln6ll) {text-decoration:underline;}button.link.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus, :where(.svelte-1dln6ll):active) .label:where(.svelte-1dln6ll) {text-decoration:var(--sui-button-link-text-decoration-focus, underline);}button.small.svelte-1dln6ll {border-radius:var(--sui-button-small-border-radius);padding:var(--sui-button-small-padding);height:var(--sui-button-small-height);font-size:var(--sui-button-small-font-size, var(--sui-font-size-small));}button.small.svelte-1dln6ll .icon {font-size:var(--sui-font-size-large);}button.medium.svelte-1dln6ll {border-radius:var(--sui-button-medium-border-radius);padding:var(--sui-button-medium-padding);height:var(--sui-button-medium-height);font-size:var(--sui-button-medium-font-size, var(--sui-font-size-default));}button.large.svelte-1dln6ll {border-radius:var(--sui-button-large-border-radius);padding:var(--sui-button-large-padding);height:var(--sui-button-large-height);font-size:var(--sui-button-large-font-size, var(--sui-font-size-large));}button.pill.svelte-1dln6ll {border-radius:80px;padding:var(--sui-button-medium-pill-padding, 0 12px);}button.flex.svelte-1dln6ll {flex:auto;width:-moz-available;width:-webkit-fill-available;width:stretch;}button.iconic.svelte-1dln6ll {justify-content:center;padding:0;aspect-ratio:1/1;}button.danger.svelte-1dln6ll {background-color:var(--sui-error-background-color);}button.svelte-1dln6ll .label:where(.svelte-1dln6ll) {padding:0 4px;}button.svelte-1dln6ll > * {pointer-events:none;}button.svelte-1dln6ll :has([slot=start-icon] + [slot=end-icon]) {gap:0;}'};function et(t,e){ae(e,!0),xe(t,BG);let n=R(e,"element",15),r=R(e,"class",3,""),i=R(e,"type",3,"button"),o=R(e,"role",3,"button"),s=R(e,"name",3,void 0),a=R(e,"value",3,void 0),c=R(e,"valueType",19,()=>typeof a()),u=R(e,"hidden",3,!1),d=R(e,"disabled",3,!1),f=R(e,"readonly",3,!1),h=R(e,"pressed",3,void 0),p=R(e,"keyShortcuts",3,void 0),g=R(e,"label",3,""),m=R(e,"lines",3,1),v=R(e,"variant",3,void 0),b=R(e,"size",3,"medium"),y=R(e,"iconic",3,!1),w=R(e,"pill",3,!1),S=R(e,"flex",3,!1),C=R(e,"popupPosition",3,"bottom-left"),E=R(e,"showPopupBackdrop",3,!1),$=ot(e,["$$slots","$$events","$$legacy","element","class","type","role","name","value","valueType","hidden","disabled","readonly","pressed","keyShortcuts","label","lines","variant","size","iconic","pill","flex","popupPosition","showPopupBackdrop","children","startIcon","endIcon","popup"]);var k=jG(),x=D(k);pt(x,V=>({...$,class:`sui button ${v()??""} ${b()??""} ${r()??""}`,type:i(),name:s(),value:a(),hidden:u(),disabled:d(),role:o(),"aria-hidden":u(),"aria-disabled":d(),"aria-readonly":f(),"aria-pressed":h(),"data-type":c(),"data-name":s(),"data-label":g(),"data-value":a(),[_r]:V}),[()=>({iconic:y(),pill:w(),flex:S()})],void 0,"svelte-1dln6ll");var A=M(x);Fe(A,()=>e.startIcon??Me);var I=z(A,2);{var P=V=>{var W=X(),J=D(W);{var N=K=>{var Y=DG(),Q=M(Y);wr(Q,{get lines(){return m()},children:(ie,ee)=>{var te=Oe();Z(()=>ne(te,g())),T(ie,te)},$$slots:{default:!0}}),T(K,Y)},B=K=>{var Y=MG(),Q=M(Y);Fe(Q,()=>e.children??Me),T(K,Y)};H(J,K=>{g()?K(N):K(B,!1)})}T(V,W)},O=V=>{var W=UG(),J=D(W);{var N=K=>{var Y=zG(),Q=M(Y);wr(Q,{get lines(){return m()},children:(ie,ee)=>{var te=Oe();Z(()=>ne(te,g())),T(ie,te)},$$slots:{default:!0}}),T(K,Y)};H(J,K=>{g()&&K(N)})}var B=z(J,2);Fe(B,()=>e.children??Me),T(V,W)};H(I,V=>{v()==="link"?V(P):V(O,!1)})}var L=z(I,2);Fe(L,()=>e.endIcon??Me),bt(x,V=>n(V),()=>n()),Ms(x,(V,W)=>NA?.(V,W),p);var F=z(x,2);{var U=V=>{Up(V,{get anchor(){return n()},get position(){return C()},get showBackdrop(){return E()},touchOptimized:!0,children:(W,J)=>{var N=X(),B=D(N);Fe(B,()=>e.popup),T(W,N)},$$slots:{default:!0}})};H(F,V=>{e.popup&&V(U)})}T(t,k),le()}var qG=j('<div role="none"><!></div>'),HG=j('<div role="none"><div role="alert" class="message svelte-16zgk6j"><!> <!></div> <!></div>');const GG={hash:"svelte-16zgk6j",code:".infobar.svelte-16zgk6j {flex:none;display:flex;align-items:center;gap:var(--sui-infobar-gap, 8px);border-width:var(--sui-infobar-border-width, 0 0 1px);border-style:var(--sui-infobar-border-style, solid);padding:var(--sui-infobar-padding, 0);min-height:var(--sui-infobar-min-height, 32px);font-size:var(--sui-infobar-font-size, var(--sui-font-size-small));}.infobar.info.svelte-16zgk6j {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.infobar.warning.svelte-16zgk6j {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.infobar.error.svelte-16zgk6j {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.infobar.success.svelte-16zgk6j {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}.message.svelte-16zgk6j {flex:auto;display:flex;align-items:center;justify-content:var(--sui-infobar-message-justify-content, left);gap:var(--sui-infobar-message-gap, 6px);padding:var(--sui-infobar-message-padding, 0 8px);}.message.svelte-16zgk6j button {font-size:inherit !important;}.message.svelte-16zgk6j .icon {font-size:16px; /* !hardcoded */}"};function jp(t,e){ae(e,!0),xe(t,GG);const[n,r]=ve(),i=()=>q(ue,"$_",n);let o=R(e,"show",15,!0),s=R(e,"dismissible",3,!0),a=R(e,"status",3,"info"),c=R(e,"children",3,void 0),u=R(e,"icon",3,void 0);var d=X(),f=D(d);{var h=p=>{var g=HG(),m=M(g),v=M(m);{var b=E=>{var $=X(),k=D($);Fe(k,u),T(E,$)},y=E=>{{let $=_(()=>a()==="success"?"check_circle":a());Xe(E,{get name(){return l($)}})}};H(v,E=>{u()?E(b):E(y,!1)})}var w=z(v,2);Fe(w,()=>c()??Me);var S=z(m,2);{var C=E=>{var $=qG(),k=M($);{let x=_(()=>i()("_sui.dismiss"));et(k,{iconic:!0,size:"small",variant:"ghost",get"aria-label"(){return l(x)},onclick:()=>{o(!1)},children:(A,I)=>{Xe(A,{name:"close"})},$$slots:{default:!0}})}T(E,$)};H(S,E=>{s()&&E(C)})}Z(()=>rn(g,1,`infobar ${a()??""}`,"svelte-16zgk6j")),T(p,g)};H(f,p=>{o()&&p(h)})}T(t,d),le(),r()}var KG=j("<div><!></div>");const VG={hash:"svelte-1iwfqt0",code:".bottom-navigation.svelte-1iwfqt0 {height:var(--sui-bottom-navigation-height, var(--sui-primary-toolbar-size));border-top-width:var(--sui-bottom-navigation-border-color, 1px);border-top-style:var(--sui-bottom-navigation-border-style, solid);border-top-color:var(--sui-bottom-navigation-border-color, var(--sui-secondary-border-color));}.bottom-navigation.svelte-1iwfqt0:is([inert]:where(.svelte-1iwfqt0), [hidden]:where(.svelte-1iwfqt0)) {display:none;}.bottom-navigation.svelte-1iwfqt0 .buttons {flex:auto;display:flex;align-items:center;justify-content:space-evenly;}"};function WG(t,e){xe(t,VG);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=KG();pt(r,()=>({role:"none",class:`sui bottom-navigation ${e.class??""}`,...n}),void 0,void 0,"svelte-1iwfqt0");var i=M(r);Fe(i,()=>e.children??Me),T(t,r)}var YG=j("<div><!></div>");const JG={hash:"svelte-h04q9p",code:".button-group.svelte-h04q9p {flex:none;display:inline-flex;align-items:center;}"};function ZG(t,e){xe(t,JG);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=YG();pt(r,()=>({...n,role:"group",class:`sui button-group ${e.class??""}`}),void 0,void 0,"svelte-h04q9p");var i=M(r);Fe(i,()=>e.children??Me),T(t,r)}var XG=j('<div role="none" class="sui floating-action-button-wrapper svelte-7t3j1e"><!></div>');const QG={hash:"svelte-7t3j1e",code:`.floating-action-button-wrapper.svelte-7t3j1e {display:contents;}
|
|
379
|
+
`,o=await fs(i);if(n.push(...Object.values(o.project.repository).map(({lastCommit:s})=>s)),!e.length)break}return n},jH=async(t,e,n)=>{const r=t.map(({path:i,sha:o},s)=>{const{size:a,rawTextBlob:c}=e[s],u=n[s],d={sha:o,size:Number(a),text:c,meta:{}};if(u){const{author:f,authorName:h,authorEmail:p,committedDate:g}=u,{id:m,username:v}=f??{},b=m?.match(/\d+/);d.meta={commitAuthor:{name:h,email:p,id:b?Number(b[0]):void 0,login:v},committedDate:new Date(g)}}return[i,d]});return Object.fromEntries(r)},BH=async t=>{const e=t.map(({path:i})=>i),n=await MH(e),r=e.length<100?await UH(e):[];return jH(t,n,r)},qH=async()=>{await $H(),await G_({repository:oo,fetchDefaultBranchName:PH,fetchLastCommit:LH,fetchFileList:FH,fetchFileContents:BH})},HH=async t=>{const{owner:e,repo:n,branch:r=""}=oo,{path:i}=t;return Xn(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?lfs=true&ref=${encodeURIComponent(r)}`,{responseType:"blob"})},GH="https://status.gitlab.com/",KH="https://status-api.hostedstatus.com/1.0/status/5b36dc6502d06804c08349f7",Id={github:xH,gitlab:{isGit:!0,name:ol,label:gA,repository:oo,statusDashboardURL:GH,checkStatus:async()=>{try{const{result:{status_overall:{status_code:t}}}=await Ad(KH);if(t===100)return"none";if([200,300,400].includes(t))return"minor";if([500,600].includes(t))return"major"}catch{}return"unknown"},init:()=>{const{backend:t}=se(Nt)??{};if(t?.name!==ol)return;const{repo:e,branch:n,base_url:r=kH,auth_endpoint:i=SH,app_id:o="",api_root:s=mA,graphql_api_root:a=s.replace(/\/api\/.+$/,"/api/graphql")}=t,{owner:c,repo:u}=e.match(/(?<owner>.+)\/(?<repo>[^/]+)$/)?.groups??{},d=`${c}/${u}`,f=`${tn(r)}/${tn(i)}`,h=B_(s,d);return Object.assign(oo,{service:ol,label:gA,owner:c,repo:u,branch:n,repoURL:h,newPatURL:TH(h),databaseName:`${ol}:${d}`,isSelfHosted:s!==mA},vA(h,n)),Object.assign(il,{clientId:o,authURL:f,tokenURL:f.replace("/authorize","/token"),authScheme:"Bearer",restBaseURL:tn(s),graphqlBaseURL:tn(a)}),Object.assign($d,{fullPath:d,branch:n}),se(ft).devModeEnabled&&console.info("repositoryInfo",oo),oo},signIn:CH,signOut:AH,fetchFiles:qH,fetchBlob:HH,commitChanges:OH},gitea:Qq,local:kq,"test-repo":Tq},VH=Object.keys(Id).filter(t=>t!=="local"),WH=Object.fromEntries(Object.entries(Id).filter(([,t])=>t.isGit)),Hc=it(),wn=en([Hc],([t],e,n)=>{n(r=>{const i=t?Id[t]:void 0;return i&&i!==r&&i.init(),i})}),Rp=it(!0),Fp=[],bA=(t,{globalMediaFolder:e,globalPublicFolder:n})=>t.trim().replace("{{media_folder}}",`/${e}`).replace("{{public_folder}}",`/${n}`).replace("//","/"),YH=({collectionName:t,fileName:e,mediaFolder:n,publicFolder:r,baseFolder:i,globalFolders:o})=>{n=bA(n,o),r=r!==void 0?bA(r,o):n;const s=!n.startsWith("/");return{collectionName:t,fileName:e,internalPath:tn(s?i??"":n),publicPath:r===""||/^[.@]/.test(r)?r:`/${tn(r)}`,entryRelative:s,hasTemplateTags:/{{.+?}}/.test(n)}},_A=t=>{if(t.mediaFolder===void 0)return;const e=YH(t),{globalMediaFolder:n,globalPublicFolder:r}=t.globalFolders;!e.entryRelative&&e.internalPath===n&&e.publicPath===r||Fp.push(e)},yA=({collectionName:t,files:e,globalFolders:n})=>{mp(e).forEach(r=>{const{name:i,file:o,media_folder:s,public_folder:a}=r;_A({collectionName:t,fileName:i,mediaFolder:s,publicFolder:a,baseFolder:fn(o).dirname,globalFolders:n})})},JH=t=>{Fp.length=0;const{media_folder:e,public_folder:n,collections:r,singletons:i}=t,o=tn(e).replace(/^\.$/,""),s=n?`/${tn(n)}`.replace(/^\/@/,"@"):`/${o}`,a={collectionName:void 0,internalPath:void 0,publicPath:void 0,entryRelative:!1,hasTemplateTags:!1},c={collectionName:void 0,internalPath:o,publicPath:s,entryRelative:!1,hasTemplateTags:!1},u={globalMediaFolder:o,globalPublicFolder:s};return ia({collections:r}).forEach(d=>{const{name:f,files:h,folder:p,path:g,media_folder:m,public_folder:v}=d;_A({collectionName:f,mediaFolder:m===void 0&&g!==void 0?"":m,publicFolder:v,baseFolder:p,globalFolders:u}),h?.length&&yA({collectionName:f,files:h,globalFolders:u})}),i?.length&&yA({collectionName:"_singletons",files:i,globalFolders:u}),Fp.sort((d,f)=>ki(d.internalPath??"",f.internalPath??"")),[a,c,...Fp]},ra={SINGLE_FILE:"single_file",MULTIPLE_FILES:"multiple_files",MULTIPLE_FOLDERS:"multiple_folders",MULTIPLE_FOLDERS_I18N_ROOT:"multiple_folders_i18n_root"},Pd="_default",W_={key:"translationKey",value:"{{slug}}"},so={i18nEnabled:!1,saveAllLocales:!0,allLocales:[Pd],initialLocales:[Pd],defaultLocale:Pd,structure:ra.SINGLE_FILE,structureMap:{i18nSingleFile:!1,i18nMultiFile:!1,i18nMultiFolder:!1,i18nRootMultiFolder:!1},canonicalSlug:{...W_},omitDefaultLocaleFromFileName:!1},ZH=(t,e)=>{const n=se(Nt);if(!Xt(n.i18n))return;const r={...n.i18n};if(t.i18n||Z_(t)){if(Xt(t.i18n)&&Object.assign(r,t.i18n),e)if(e.i18n)Xt(e.i18n)&&Object.assign(r,e.i18n);else return}else return;return r},XH=(t,e)=>e?e.file.includes("{{locale}}")?ra.MULTIPLE_FILES:ra.SINGLE_FILE:t,QH=(t,e)=>({i18nSingleFile:t&&e===ra.SINGLE_FILE,i18nMultiFile:t&&e===ra.MULTIPLE_FILES,i18nMultiFolder:t&&e===ra.MULTIPLE_FOLDERS,i18nRootMultiFolder:t&&e===ra.MULTIPLE_FOLDERS_I18N_ROOT}),eG=(t,e,n)=>t?n&&e.includes(n)?n:e[0]:Pd,tG=(t,e,n)=>t==="all"?e:t==="default"?[n]:e.filter(r=>r===n||(Array.isArray(t)?t.includes(r):!0)),Nd=(t,e)=>{const n=ZH(t,e),{structure:r=ra.SINGLE_FILE,locales:i=[],default_locale:o,initial_locales:s,save_all_locales:a=!0,canonical_slug:c={key:void 0,value:void 0},omit_default_locale_from_filename:u=!1}=n??{};n?.save_all_locales!==void 0&&nh("save_all_locales");const{key:d=W_.key,value:f=W_.value}=c,h=i.length>0,p=h?i:[Pd],g=eG(h,p,o),m=XH(r,e),v=QH(h,m),b=h?a===!0&&s===void 0:!0,y=tG(s,p,g),w=u&&(e?/\.{{locale}}\.[a-zA-Z0-9]+$/.test(e.file):v.i18nMultiFile);return{i18nEnabled:h,saveAllLocales:b,allLocales:p,defaultLocale:g,initialLocales:y,structure:m,structureMap:v,canonicalSlug:{key:d,value:f},omitDefaultLocaleFromFileName:w}},nG=({collection:t,file:e})=>{const n=tn(e.file);if(!n.includes("{{locale}}"))return{_default:n};const r=Nd(t,e);return Object.fromEntries(r.allLocales.map(i=>[i,ab({_i18n:r,locale:i,path:n})]))},wA=(t,e)=>{if(gp(e))return{collectionName:t.name,fileName:e.name,filePathMap:nG({collection:t,file:e})}},xA=(t,e)=>ki(Object.values(t.filePathMap??{})[0],Object.values(e.filePathMap??{})[0]),rG=({collections:t})=>ia({collections:t,type:"entry",visible:!0}).map(e=>{const{name:n,folder:r}=e,i=tn(r),{allLocales:o,structureMap:{i18nRootMultiFolder:s}}=Nd(e);return{collectionName:n,folderPath:i,folderPathMap:Object.fromEntries(o.map(a=>[a,s?`${a}/${i}`:i]))}}).sort((e,n)=>ki(e.folderPath??"",n.folderPath??"")),iG=({collections:t})=>ia({collections:t,type:"file",visible:!0}).map(e=>(e.files??[]).map(n=>wA(e,n))).flat(1).filter(e=>!!e).sort(xA),oG=({singletons:t})=>{const e=Array.isArray(t)?mp(t):[];if(!e.length)return[];const n={name:"_singletons",files:e};return e.map(r=>wA(n,r)).filter(r=>!!r).sort(xA)},sG=t=>[...rG(t),...iG(t),...oG(t)],aG=["text/yaml","application/yaml","application/json"],lG=async({href:t,type:e="application/yaml"})=>{let n;if(!aG.includes(e))throw new Error(se(ue)("config.error.parse_failed"),{cause:new Error(se(ue)("config.error.parse_failed_unsupported_type"))});try{n=await fetch(t)}catch(s){throw new Error(se(ue)("config.error.fetch_failed"),{cause:s})}const{ok:r,status:i}=n;if(!r)throw new Error(se(ue)("config.error.fetch_failed"),{cause:new Error(se(ue)("config.error.fetch_failed_not_ok",{values:{status:i}}))});let o;try{e==="application/json"?o=n.json():o=sd.parse(await n.text(),{merge:!0})}catch(s){throw new Error(se(ue)("config.error.parse_failed"),{cause:s})}if(!Xt(o))throw new Error(se(ue)("config.error.parse_failed"),{cause:new Error(se(ue)("config.error.parse_failed_invalid_object"))});return o},cG=t=>{if(t.endsWith("/"))return`${t}config.yml`;const e=t.split("/");return e.pop()?.includes(".")?`${e.join("/")}/config.yml`:`${t}/config.yml`},kA=async()=>{const t=[...document.querySelectorAll('link[rel="cms-config-url"]')].map(({href:n,type:r})=>({href:n,type:r}));t.length||t.push({href:cG(window.location.pathname)});const e=await Promise.all(t.map(n=>lG(n)));return e.length===1?e[0]:dv.all(e)},uG={DEV:!1},{DEV:dG}=uG,fG=void 0,SA={},Nt=it(),Y_=it(),J_=it(),hG=t=>{if(!Array.isArray(t.collections)&&!Array.isArray(t.singletons))throw new Error(se(ue)("config.error.no_collection"));if(!t.backend)throw new Error(se(ue)("config.error.missing_backend"));if(!t.backend.name)throw new Error(se(ue)("config.error.missing_backend_name"));if(!VH.includes(t.backend.name))throw new Error(se(ue)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(Object.keys(WH).includes(t.backend.name)){if(t.backend.repo===void 0)throw new Error(se(ue)("config.error.missing_repository"));if(typeof t.backend.repo!="string"||!/(.+)\/([^/]+)$/.test(t.backend.repo))throw new Error(se(ue)("config.error.invalid_repository"))}if(t.backend.auth_type==="implicit")throw new Error(se(ue)("config.error.oauth_implicit_flow"));if(t.backend.auth_type==="pkce"&&!t.backend.app_id)throw new Error(se(ue)("config.error.oauth_no_app_id"));if(t.backend.automatic_deployments!==void 0&&nh("automatic_deployments"),t.media_folder===void 0)throw new Error(se(ue)("config.error.missing_media_folder"));if(typeof t.media_folder!="string")throw new Error(se(ue)("config.error.invalid_media_folder"));if(t.public_folder!==void 0){if(typeof t.public_folder!="string")throw new Error(se(ue)("config.error.invalid_public_folder"));if(/^\.{1,2}\//.test(t.public_folder))throw new Error(se(ue)("config.error.public_folder_relative_path"));if(/^https?:/.test(t.public_folder))throw new Error(se(ue)("config.error.public_folder_absolute_url"))}},pG=async t=>{Nt.set(void 0),J_.set(void 0);try{if(!window.isSecureContext)throw new Error(se(ue)("config.error.no_secure_context"));let e;if(t){if(!Xt(t))throw new Error(se(ue)("config.error.parse_failed"));e=t,e.load_config_file!==!1&&(e=dv(await kA(),e))}else e=await kA();Object.assign(SA,e),hG(e);const n=structuredClone(e);n._siteURL=n.site_url?.trim()||(dG?fG:window.location.origin),n._baseURL=lv(n._siteURL)?new URL(n._siteURL).origin:"",n.collections?.forEach(r=>{"folder"in r&&(r.folder==="."||r.folder==="/")&&(r.folder="")}),Nt.set(n),Y_.set(await Fa(sd.stringify(n)))}catch(e){J_.set({message:e.name==="Error"?e.message:se(ue)("config.error.unexpected")}),console.error(e,e.cause)}};Nt.subscribe(t=>{if(se(ft).devModeEnabled&&console.info("siteConfig",t),!t)return;const e=sG(t),n=JH(t);r_.set(e),Ks.set(n),se(ft).devModeEnabled&&(console.info("allEntryFolders",e),console.info("allAssetFolders",n))});const Vn=it(),Dp=new Map,Ld=t=>typeof t.folder=="string"&&!Array.isArray(t.files),Mp=t=>t.folder===void 0&&Array.isArray(t.files),Z_=t=>Mp(t)&&t.name==="_singletons",gG=(t,{visible:e=void 0,type:n=void 0}={})=>"divider"in t||e&&t.hide?!1:n==="entry"?Ld(t):n==="file"?Mp(t):n==="singleton"?Z_(t):Ld(t)||Mp(t),ia=({collections:t=se(Nt)?.collections??[],visible:e,type:n}={})=>t.filter(r=>gG(r,{visible:e,type:n})),mG=()=>ia({visible:!0})[0],vG=t=>{const{folder:e,fields:n,thumbnail:r}=t;return e?typeof r=="string"?[r]:Array.isArray(r)?r:n?.length?n.filter(({widget:i="string"})=>["image","file"].includes(i)).map(({name:i})=>i):[]:[]},bG=(t,e)=>({...t,_i18n:e,_type:"entry",_file:IA({rawCollection:t,_i18n:e}),_thumbnailFieldNames:vG(t)}),EA=(t,e,n)=>({...t,_i18n:e,_type:Z_(t)?"singleton":"file",_fileMap:Object.fromEntries(n.filter(gp).map(r=>{const i=Nd(t,r),o=IA({rawCollection:t,file:r,_i18n:i});return[r.name,{...r,_file:o,_i18n:i}]}))}),TA=()=>{const t=se(Nt)?.singletons;if(!Array.isArray(t))return;const e=mp(t).map(i=>({...i,file:tn(i.file)}));if(!e.length)return;const n={name:"_singletons",files:e},r=Nd(n);return EA(n,r,e)},Kr=t=>{const e=Dp.get(t);if(e)return e;if(t==="_singletons"){const u=TA();return Dp.set(t,u),u}const n=ia().find(u=>u.name===t),r=n?Ld(n):!1,i=n?Mp(n):!1;if(!n||!r&&!i){Dp.set(t,void 0);return}const{folder:o,files:s=[]}=n;r?n.folder=tn(o):s.forEach(u=>{u.file&&(u.file=tn(u.file))});const a=Nd(n),c=r?bG(n,a):EA(n,a,s);return Dp.set(t,c),c},hs=(t,{useSingular:e=!1}={})=>{const{_type:n,name:r,label:i,label_singular:o}=t;return n==="singleton"?se(ue)("files"):e&&o?o:i||r},CA=t=>t?t==="_singletons"?9999999:se(Nt)?.collections?.findIndex(({name:e})=>e===t)??-1:-1,zp=new Map,AA=({extension:t,format:e})=>{const n=e?zp.get(e)?.extension:void 0;return n||t||(e==="yaml"||e==="yml"?"yml":e==="toml"?"toml":e==="json"?"json":"md")},_G=({extension:t,format:e})=>e||(t==="yaml"||t==="yml"?"yaml":t==="toml"?"toml":t==="json"?"json":["md","mkd","mkdn","mdwn","mdown","markdown"].includes(t)?"frontmatter":"yaml-frontmatter"),yG=({extension:t,format:e,basePath:n,subPath:r,indexFileName:i,_i18n:o})=>{const{allLocales:s,defaultLocale:a,omitDefaultLocaleFromFileName:c,structureMap:{i18nMultiFile:u,i18nMultiFolder:d,i18nRootMultiFolder:f}}=o,h=r?`(?<subPath>${r.replace(/\//g,"\\/").replace(/{{.+?}}/g,"[^/]+?")}${i?`|${i}`:""})`:"(?<subPath>[^/]+?)",p=`(?<locale>${s.join("|")})`,g=["^",f?`${p}\\/`:"",n?`${Kt(n)}\\/`:"",d?`${p}\\/`:"",h,u?c?`(?:\\.(?<locale>${s.filter(m=>m!==a).join("|")}))?`:`\\.${p}`:"","\\.",AA({format:e,extension:t}),"$"].join("");return new RegExp(g)},$A=({format:t,delimiter:e})=>{if(typeof e=="string"&&e.trim())return[e,e];if(Array.isArray(e)&&e.length===2)return e;if(t==="json-frontmatter")return["{","}"];if(t==="toml-frontmatter")return["+++","+++"];if(t==="yaml-frontmatter")return["---","---"]},IA=({rawCollection:t,file:e,_i18n:n})=>{const{folder:r,path:i,extension:o,format:s,frontmatter_delimiter:a,yaml_quote:c}=t,u=Ld(t),d=e?.file?tn(e.file):void 0,f=d?fn(d).extension:o,h=e?.format??s,p=AA({format:h,extension:f}),g=_G({format:h,extension:p}),m=e?.frontmatter_delimiter??a,v=u?tn(r):void 0,b=u?ci(t)?.name:void 0;return c!==void 0&&nh("yaml_quote"),{extension:p,format:g,basePath:v,subPath:u?i:void 0,fullPathRegEx:v!==void 0?yG({extension:p,format:g,basePath:v,subPath:i,indexFileName:b,_i18n:n}):void 0,fullPath:d?ab({_i18n:n,locale:n.defaultLocale,path:d}):void 0,fmDelimiters:$A({format:g,delimiter:m}),yamlQuote:!!c}},wG="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(wG);const xG=Object.freeze(Object.defineProperty({__proto__:null,strings:{ok:"OK",cancel:"Cancel",close:"Close",clear:"Clear",insert:"Insert",update:"Update",remove:"Remove",collapse:"Collapse",expand:"Expand",dismiss:"Dismiss",calendar:{year:"Year",previous_decade:"Previous Decade",next_decade:"Next Decade",month:"Month",previous_month:"Previous Month",next_month:"Next Month",today:"Today"},split_button:{x_options:"{name} Options",more_options:"More Options"},combobox:{select_an_option:"Select an option…",filter_options:"Filter Options",no_matching_options:"No matching options found"},number_input:{decrease:"Decrease",increase:"Increase"},password_input:{show_password:"Show Password",hide_password:"Hide Password"},text_editor:{text_editor:"Text Editor",code_editor:"Code Editor",text_style_options:"Text Style Options",show_text_style_options:"Show Text Style Options",paragraph:"Paragraph",heading_1:"Heading 1",heading_2:"Heading 2",heading_3:"Heading 3",heading_4:"Heading 4",heading_5:"Heading 5",heading_6:"Heading 6",bulleted_list:"Bulleted List",numbered_list:"Numbered List",blockquote:"Block Quote",code_block:"Code Block",bold:"Bold",italic:"Italic",code:"Code",link:"Link",insert_link:"Insert Link",update_link:"Update Link",text:"Text",url:"URL",edit_in_markdown:"Edit in Markdown",converter_error:"There was an error while enabling rich text mode. Please use the plain text editor instead.",language:"Language",plain_text:"Plain Text"}}},Symbol.toStringTag,{value:"Module"})),kG=Object.freeze(Object.defineProperty({__proto__:null,strings:{ok:"OK",cancel:"キャンセル",close:"閉じる",clear:"クリア",insert:"挿入",update:"更新",remove:"削除",collapse:"折り畳む",expand:"広げる",dismiss:"閉じる",calendar:{year:"年",previous_decade:"前の 10 年",next_decade:"次の 10 年",month:"月",previous_month:"前月",next_month:"翌月",today:"今日"},split_button:{x_options:"{name} オプション",more_options:"その他のオプション"},combobox:{select_an_option:"オプションを選択…",filter_options:"オプションを絞り込み",no_matching_options:"一致するオプションは見つかりませんでした"},number_input:{decrease:"減らす",increase:"増やす"},password_input:{show_password:"パスワードを表示",hide_password:"パスワードを隠す"},text_editor:{text_editor:"テキストエディター",code_editor:"コードエディター",text_style_options:"テキストスタイルオプション",show_text_style_options:"テキストスタイルオプションを表示",paragraph:"段落",heading_1:"見出し 1",heading_2:"見出し 2",heading_3:"見出し 3",heading_4:"見出し 4",heading_5:"見出し 5",heading_6:"見出し 6",bulleted_list:"番号なしリスト",numbered_list:"番号付きリスト",blockquote:"ブロック引用",code_block:"コードブロック",bold:"太字",italic:"斜体",code:"コード",link:"リンク",insert_link:"リンクを挿入",update_link:"リンクを更新",text:"テキスト",url:"URL",edit_in_markdown:"マークダウンで編集",converter_error:"リッチテキストモードを有効化中に問題が発生しました。代わりにプレーンテキストエディターを使用してください。",language:"言語",plain_text:"プレーンテキスト"}}},Symbol.toStringTag,{value:"Module"}));var SG=j("<span> </span>");const EG={hash:"svelte-1tdjcqs",code:".icon.small-arrow.svelte-1tdjcqs {overflow:hidden;width:12px;text-indent:-6px;}"};function Xe(t,e){xe(t,EG);let n=ot(e,["$$slots","$$events","$$legacy","class","name"]);var r=SG();pt(r,()=>({...n,class:`sui icon material-symbols-outlined ${e.class??""}`,"aria-hidden":!("aria-label"in n)}),void 0,void 0,"svelte-1tdjcqs");var i=M(r);Z(()=>ne(i,e.name)),T(t,r)}var TG=j("<div><!> <!></div>");const CG={hash:"svelte-1lvgxwx",code:".alert.svelte-1lvgxwx {display:flex;align-items:center;gap:var(--gap, 8px);padding:var(--padding, 8px);border-width:var(--border-width, var(--sui-control-medium-border-width));border-style:var(--border-style, solid);border-radius:var(--border-radius, var(--sui-control-medium-border-radius));font-size:var(--font-size, var(--sui-font-size-default));}.alert.error.svelte-1lvgxwx {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.alert.warning.svelte-1lvgxwx {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.alert.info.svelte-1lvgxwx {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.alert.success.svelte-1lvgxwx {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}"};function jn(t,e){xe(t,CG);let n=ot(e,["$$slots","$$events","$$legacy","status","children","icon"]);var r=TG();pt(r,()=>({...n,role:"alert",class:`sui alert ${e.status??""}`}),void 0,void 0,"svelte-1lvgxwx");var i=M(r);{var o=c=>{var u=X(),d=D(u);Fe(d,()=>e.icon),T(c,u)},s=c=>{{let u=_(()=>e.status==="success"?"check_circle":e.status);Xe(c,{get name(){return l(u)}})}};H(i,c=>{e.icon?c(o):c(s,!1)})}var a=z(i,2);Fe(a,()=>e.children??Me),T(t,r)}const PA=()=>navigator.userAgentData?.platform==="macOS"||navigator.platform.startsWith("Mac"),X_=(t,e)=>{const{ctrlKey:n,metaKey:r,altKey:i,shiftKey:o,code:s}=t,a=s.replace(/^(?:Digit|Key)(.)$/,"$1");return e.split(/\s+/).some(c=>{const u=c.split("+");return u.includes("Ctrl")&&!n||u.includes("Meta")&&!r||u.includes("Alt")&&!i||u.includes("Shift")&&!o||!u.includes("Ctrl")&&n||!u.includes("Meta")&&r||!u.includes("Alt")&&i||!u.includes("Shift")&&o?!1:u.filter(d=>!["Ctrl","Meta","Alt","Shift"].includes(d)).every(d=>d.toUpperCase()===a.toUpperCase())})},NA=(t,e="")=>{let n;const r=s=>{const{disabled:a,offsetParent:c}=t,{top:u,left:d}=t.getBoundingClientRect();!X_(s,n)||!c||(a&&t.style.setProperty("pointer-events","auto"),document.elementsFromPoint(d+4,u+4).includes(t)&&(s.preventDefault(),a||(t.focus(),t.click())),a&&t.style.removeProperty("pointer-events"))},i=()=>{globalThis.removeEventListener("keydown",r,{capture:!0}),t.removeAttribute("aria-keyshortcuts")},o=()=>{n=e?e.replace(/\bAccel\b/g,PA()?"Meta":"Ctrl"):void 0,n&&(globalThis.addEventListener("keydown",r,{capture:!0}),t.setAttribute("aria-keyshortcuts",n))};return o(),{update(s){i(),o()},destroy(){i()}}};var AG=j('<span role="none" class="sui truncated-text svelte-xh9ynf"><!></span>');const $G={hash:"svelte-xh9ynf",code:".truncated-text.svelte-xh9ynf {display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;overflow-wrap:anywhere;}"};function wr(t,e){xe(t,$G);let n=R(e,"lines",3,1),r=R(e,"children",3,void 0);var i=AG(),o=M(i);Fe(o,()=>r()??Me),Z(()=>Zi(i,`-webkit-line-clamp: ${n()??""}; line-clamp: ${n()??""};`)),T(t,i)}const Q_=(t="e",e=7)=>[t,oi(e)].join("-"),Gc=t=>{if(t)return new Promise(e=>{const n=new IntersectionObserver(([r])=>{r.isIntersecting&&(n.disconnect(),e(void 0))});globalThis.requestAnimationFrame(()=>{n.observe(t)})})};let IG=class{open=it(!1);style=it({inset:void 0,zIndex:void 0,minWidth:void 0,maxWidth:void 0,height:void 0});observer=new IntersectionObserver(e=>{e.forEach(({intersectionRect:n,rootBounds:r})=>{if(!n||!r)return;const i=this.popupElement.querySelector(".content"),{scrollHeight:o,scrollWidth:s}=i,a=n.top-8,c=r.height-n.bottom-8;let{position:u}=this,d;u.startsWith("bottom-")&&o>c&&(a>c?(u=u.replace("bottom-","top-"),d=a):d=c),u.endsWith("-left")&&n.left+s>r.width-8&&(u=u.replace("-left","-right"));const f=u.startsWith("bottom-")?`${Math.round(n.bottom)}px`:u.endsWith("-top")?`${Math.round(n.top)}px`:"auto",h=u.startsWith("left-")?`${Math.round(r.width-n.left)}px`:u.endsWith("-right")?`${Math.round(r.width-n.right)}px`:"auto",p=u.startsWith("top-")?`${Math.round(r.height-n.top)}px`:u.endsWith("-bottom")?`${Math.round(r.height-n.bottom)}px`:"auto",g=u.startsWith("right-")?`${Math.round(n.right)}px`:u.endsWith("-left")?`${Math.round(n.left)}px`:"auto",m={inset:[f,h,p,g].join(" "),zIndex:1e3,minWidth:`${Math.round(n.width)}px`,maxWidth:u.endsWith("-left")?`${Math.round(r.width-n.left-8)}px`:`${Math.round(n.right-8)}px`,height:d?`${Math.round(d)}px`:"auto"};JSON.stringify(m)!==JSON.stringify(se(this.style))&&this.style.set(m)})});constructor(e,n,r,i){this.anchorElement=e,this.popupElement=n,this.position=r,this.positionBaseElement=i??e,this.id=Q_("popup"),this.anchorElement.setAttribute("aria-controls",this.id),this.popupElement.setAttribute("id",this.id),Uu(e,"click",()=>{!this.isDisabled&&!this.isReadOnly&&this.open.set(!se(this.open))}),Uu(e,"keydown",o=>{const{key:s,ctrlKey:a,metaKey:c,shiftKey:u,altKey:d}=o,f=u||d||a||c;!this.isDisabled&&!this.isReadOnly&&["Enter"," "].includes(s)&&!f&&(o.preventDefault(),o.stopPropagation(),this.open.set(!se(this.open)))}),Uu(e,"transitionstart",()=>{this.anchorElement.closest(".hiding, .hidden, [hidden]")&&this.hideImmediately()}),new IntersectionObserver(([o])=>{!o.isIntersecting&&se(this.open)&&this.hideImmediately()}).observe(this.anchorElement),Uu(this.popupElement,"click",o=>{o.stopPropagation();const s=o.target;se(this.open)&&(s===this.popupElement||s.matches('[role^="menuitem"], [role="option"]'))&&this.open.set(!1)}),Uu(this.popupElement,"keydown",o=>{const{key:s,ctrlKey:a,metaKey:c,shiftKey:u,altKey:d}=o;s==="Escape"&&!(u||d||a||c)&&(o.preventDefault(),o.stopPropagation(),this.open.set(!1))}),this.open.subscribe(o=>{o?this.checkPosition():this.anchorElement.getAttribute("aria-expanded")==="true"&&(this.anchorElement.focus(),this.anchorElement.removeAttribute("aria-controls")),this.anchorElement.setAttribute("aria-expanded",String(o))}),new ResizeObserver(()=>{this.checkPosition()}).observe(this.positionBaseElement)}get isDisabled(){return this.anchorElement.matches('[aria-disabled="true"]')}get isReadOnly(){return this.anchorElement.matches('[aria-readonly="true"]')}checkPosition(){this.observer.unobserve(this.positionBaseElement),this.observer.observe(this.positionBaseElement)}async hideImmediately(){this.popupElement.hidden=!0,this.open.set(!1),await Lt(50),this.popupElement.hidden=!1}};const PG=(...t)=>new IG(...t);function NG(t,e){var n=X(),r=D(n);Fe(r,()=>e.children??Me),T(t,n)}var LG=j("<dialog><!> <!></dialog>");const OG={hash:"svelte-4e0en9",code:"dialog.svelte-4e0en9 {position:fixed;inset:0;z-index:9999999;display:flex;justify-content:center;align-items:center;overflow:hidden;outline:0;margin:0;border:0;padding:0;width:100dvw;max-width:100dvw;height:100dvh;max-height:100dvh;color:var(--sui-primary-foreground-color);background:transparent;-webkit-user-select:none;user-select:none;touch-action:none;pointer-events:all;cursor:default;}dialog.svelte-4e0en9::backdrop {background:transparent;}dialog.backdrop.svelte-4e0en9 {background-color:var(--sui-popup-backdrop-color);}dialog.open.svelte-4e0en9 {transition-duration:50ms;opacity:1;}dialog.svelte-4e0en9:not(.open) {transition-duration:400ms;opacity:0;}dialog[hidden].svelte-4e0en9 {transition-duration:1ms !important;}dialog.svelte-4e0en9:not(.active) {pointer-events:none !important;}dialog.svelte-4e0en9:not(.active) * {transition-duration:0ms !important;pointer-events:none !important;}"};function LA(t,e){ae(e,!0),xe(t,OG);const n=w=>{var S=LG(),C=({target:A})=>{i()&&a()&&A?.matches("dialog")&&(i(i().returnValue="cancel",!0),r(!1))},E=A=>{A.preventDefault(),i()&&c()&&(i(i().returnValue="cancel",!0),r(!1))};pt(S,A=>({...d,inert:!l(p),role:o(),class:`sui modal ${e.class??""}`,onclick:C,oncancel:E,[_r]:A}),[()=>({backdrop:s(),open:l(p),active:l(g)})],void 0,"svelte-4e0en9");var $=M(S);Fe($,()=>e.extraContent??Me);var k=z($,2);{var x=A=>{var I=X(),P=D(I);Fe(P,()=>e.children??Me),T(A,I)};H(k,A=>{(l(m)||u())&&A(x)})}bt(S,A=>i(A),()=>i()),T(w,S)};let r=R(e,"open",15,!1),i=R(e,"dialog",15),o=R(e,"role",3,"dialog"),s=R(e,"showBackdrop",3,!1),a=R(e,"lightDismiss",3,!1),c=R(e,"escapeDismiss",3,!0),u=R(e,"keepContent",3,!1),d=ot(e,["$$slots","$$events","$$legacy","open","dialog","class","role","showBackdrop","lightDismiss","escapeDismiss","keepContent","children","extraContent","onOpening","onOpen","onClosing","onOk","onCancel","onClose"]);const f=()=>{i()?.focus()},h=w=>{i()&&(i(i().returnValue=w,!0),r(!1))};let p=oe(!1),g=oe(!1),m=oe(!1);const v=async()=>new Promise(w=>{const S=C=>{C.target===i()&&(i().removeEventListener("transitionend",S),w())};i()?.addEventListener("transitionend",S)}),b=async()=>{!i()||i()?.open||(e.onOpening?.(new CustomEvent("Opening")),G(m,!0),i().showModal(),e.onOpen?.(new CustomEvent("Open")),await Lt(0),G(p,!0),await v(),G(g,!0))},y=async()=>{if(!i()||!i().open)return;const{returnValue:w}=i();e.onClosing?.(new CustomEvent("Closing")),document.body.inert=!0,i().close(),document.body.inert=!1,G(g,!1),G(p,!1),await v(),G(m,!1),w==="ok"&&e.onOk?.(new CustomEvent("Ok")),w==="cancel"&&e.onCancel?.(new CustomEvent("Cancel")),e.onClose?.(new CustomEvent("Close",{detail:{returnValue:w}})),i(i().returnValue="",!0)};return Re(()=>{r()?b():y()}),qt(()=>{const w=Qf(NG,{target:document.querySelector(".sui.app-shell")??document.body,props:{children:n}});return()=>{i()?.close(),m1(w)}}),le({focus:f,close:h})}var RG=j('<div role="none"><!></div>');const FG={hash:"svelte-eb9zx0",code:".content.svelte-eb9zx0 {position:absolute;overflow-y:auto;outline-width:0 !important;width:auto;color:var(--sui-primary-foreground-color);background-color:var(--sui-secondary-background-color-translucent);box-shadow:0 8px 16px var(--sui-popup-shadow-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition-property:opacity, transform;}.content.menu.svelte-eb9zx0 {border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}.content.menu.svelte-eb9zx0 .sui.menu {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.listbox.svelte-eb9zx0 {border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);}.content.listbox.svelte-eb9zx0 .sui.listbox {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.touch.svelte-eb9zx0 {position:static;border-width:0 !important;border-radius:4px !important;padding:8px;min-width:320px !important;max-width:calc(100dvw - 32px) !important;max-height:calc(100dvh - 32px) !important;}dialog.open .content.touch.svelte-eb9zx0 {transform:scale(100%) !important;}dialog:not(.open) .content.touch.svelte-eb9zx0 {transform:scale(90%);}.content.touch.combobox.svelte-eb9zx0 .sui.listbox {gap:4px;padding:8px 4px !important;}dialog.open .content.svelte-eb9zx0 {transition-duration:50ms;opacity:1;transform:translateY(2px);}dialog:not(.open) .content.svelte-eb9zx0 {transition-duration:300ms;opacity:0;transform:translateY(-8px);}"};function Up(t,e){ae(e,!0),xe(t,FG);const[n,r]=ve(),i=()=>q(l(w),"$style",n),o=P=>{var O=RG();let L,F;var U=M(O);Fe(U,()=>e.children??Me),bt(O,V=>c(V),()=>c()),Z((V,W)=>{O.hidden=!s(),L=rn(O,1,`content ${e.class??""} ${l(y)??""}`,"svelte-eb9zx0",L,V),F=Zi(O,"",F,W)},[()=>({touch:l($)}),()=>({inset:i().inset,"z-index":i().zIndex,"min-width":i().minWidth,"max-width":i().maxWidth,"max-height":i().height,visibility:i().inset?void 0:"hidden"})]),jr("mouseenter",O,()=>{a(!0),h()&&window.clearTimeout(C)}),jr("mouseleave",O,()=>{a(!1),h()&&(C=window.setTimeout(()=>{s(!1)},200))}),T(P,O)};let s=R(e,"open",15,!1),a=R(e,"hovered",15,!1),c=R(e,"content",15,void 0),u=R(e,"showBackdrop",3,void 0),d=R(e,"position",3,"bottom-left"),f=R(e,"positionBaseElement",3,void 0),h=R(e,"parentDialogElement",3,void 0),p=R(e,"touchOptimized",3,!1),g=ot(e,["$$slots","$$events","$$legacy","open","hovered","content","class","showBackdrop","anchor","position","positionBaseElement","parentDialogElement","touchOptimized","children","onOpen"]),m=oe(!1),v=oe(void 0),b=oe(!1),y=oe(void 0),w=oe(Ft(it({inset:void 0,zIndex:void 0,width:void 0,height:void 0}))),S,C=0;const E=()=>{S=PG(e.anchor,l(v),d(),f()),BR(G(w,S.style,!0),"$style",n),S.open.subscribe(P=>{s(P)}),G(y,e.anchor?.getAttribute("aria-haspopup")??void 0,!0),G(m,!0)};Re(()=>{h()&&!l(v)&&c()&&(G(v,h()),l(v).append(c()))}),Re(()=>{e.anchor&&l(v)&&!l(m)&&E()}),Re(()=>{h()&&s()&&S?.checkPosition()});const $=_(()=>p()&&l(b));qt(()=>{G(b,globalThis.matchMedia("(pointer: coarse)").matches,!0)});var k=X(),x=D(k);{var A=P=>{o(P)},I=P=>{{let O=_(()=>u()??l($));LA(P,dn(()=>g,{role:"none",class:"popup",get showBackdrop(){return l(O)},lightDismiss:!0,keepContent:!0,onOpen:async L=>{if(e.onOpen?.(L),await Lt(100),!c())return;const F=c().querySelector('[tabindex]:not([aria-disabled="true"])');F?F.focus():(c(c().tabIndex=-1,!0),c().focus())},get dialog(){return l(v)},set dialog(L){G(v,L,!0)},get open(){return s()},set open(L){s(L)},children:(L,F)=>{o(L)},$$slots:{default:!0}}))}};H(x,P=>{h()?P(A):P(I,!1)})}T(t,k),le(),r()}var DG=j('<span role="none" class="label svelte-1dln6ll"><!></span>'),MG=j('<span role="none" class="label svelte-1dln6ll"><!></span>'),zG=j('<span role="none" class="label svelte-1dln6ll"><!></span>'),UG=j("<!> <!>",1),jG=j("<button><!> <!> <!></button> <!>",1);const BG={hash:"svelte-1dln6ll",code:'button.svelte-1dln6ll {flex:none;display:inline-flex;align-items:center;gap:4px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color, inherit);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;transition:all 200ms;}button[hidden].svelte-1dln6ll {display:none !important;}button.svelte-1dln6ll:not(:disabled):focus-visible {z-index:1;}button.svelte-1dln6ll:is(.primary:where(.svelte-1dln6ll), .secondary:where(.svelte-1dln6ll), .tertiary:where(.svelte-1dln6ll), .ghost:where(.svelte-1dln6ll)) {justify-content:center;border-width:1px;}button.svelte-1dln6ll:is(.primary:where(.svelte-1dln6ll), .secondary:where(.svelte-1dln6ll), .tertiary:where(.svelte-1dln6ll), .ghost:where(.svelte-1dln6ll)) .label:where(.svelte-1dln6ll):only-child {padding:0 4px;}button.primary.svelte-1dln6ll {border-width:var(--sui-button-primary-border-width, 1px);border-style:var(--sui-button-primary-border-style, solid);border-color:var(--sui-button-primary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted));background-color:var(--sui-button-primary-background-color, var(--sui-primary-accent-color));font-weight:var(--sui-button-primary-font-weight, var(--sui-font-weight-normal, normal));}button.primary.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-primary-foreground-color-focus, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-focus, var(--sui-primary-accent-color-light));}button.primary.svelte-1dln6ll:active {color:var(--sui-button-primary-foreground-color-active, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-active, var(--sui-primary-accent-color-dark));}button.secondary.svelte-1dln6ll {border-width:var(--sui-button-secondary-border-width, 1px);border-style:var(--sui-button-secondary-border-style, solid);border-color:var(--sui-button-secondary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text));background-color:var(--sui-button-secondary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-secondary-font-weight, var(--sui-font-weight-normal, normal));}button.secondary.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-secondary-foreground-color-focus, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-focus, var(--sui-hover-background-color));}button.secondary.svelte-1dln6ll:active {color:var(--sui-button-secondary-foreground-color-active, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-active, var(--sui-active-background-color));}button.secondary[aria-pressed=true].svelte-1dln6ll {color:var(--sui-button-secondary-foreground-color-pressed);background-color:var(--sui-button-secondary-background-color-pressed, var(--sui-primary-accent-color));}button.tertiary.svelte-1dln6ll {border-width:var(--sui-button-tertiary-border-width, 1px);border-style:var(--sui-button-tertiary-border-style, solid);border-color:var(--sui-button-tertiary-border-color, var(--sui-button-border-color));color:var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));background-color:var(--sui-button-tertiary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-tertiary-font-weight, var(--sui-font-weight-normal, normal));}button.tertiary.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-tertiary-foreground-color-focus, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-focus, var(--sui-hover-background-color));}button.tertiary.svelte-1dln6ll:active {color:var(--sui-button-tertiary-foreground-color-active, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-active, var(--sui-active-background-color));}button.tertiary[aria-pressed=true].svelte-1dln6ll {color:var(--sui-button-tertiary-foreground-color-pressed);background-color:var(--sui-button-tertiary-background-color-pressed, var(--sui-selected-background-color));}button.ghost.svelte-1dln6ll {font-weight:var(--sui-button-ghost-font-weight, var(--sui-font-weight-normal, normal));}button.ghost.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus-visible, [aria-expanded=true]:where(.svelte-1dln6ll)) {color:var(--sui-button-ghost-foreground-color-focus);background-color:var(--sui-button-ghost-background-color-focus, var(--sui-hover-background-color));}button.ghost.svelte-1dln6ll:active {color:var(--sui-button-ghost-foreground-color-active);background-color:var(--sui-button-ghost-background-color-active, var(--sui-active-background-color));}button.ghost[aria-pressed=true].svelte-1dln6ll {color:var(--sui-button-ghost-foreground-color-pressed);background-color:var(--sui-button-ghost-background-color-pressed, var(--sui-selected-background-color));}button.link.svelte-1dln6ll {outline:0;margin:0;border-radius:0 !important;padding:0 !important;height:auto !important;color:var(--sui-button-link-foreground-color, var(--sui-primary-accent-color-text));}button.link.svelte-1dln6ll .label:where(.svelte-1dln6ll) {padding:0;line-height:var(--sui-line-height-compact);text-decoration:var(--sui-button-link-text-decoration, none);text-underline-offset:2px;white-space:normal;}:is(:root, :host)[data-underline-links="true"] button.link.svelte-1dln6ll .label:where(.svelte-1dln6ll) {text-decoration:underline;}button.link.svelte-1dln6ll:is(:where(.svelte-1dln6ll):hover, :where(.svelte-1dln6ll):focus, :where(.svelte-1dln6ll):active) .label:where(.svelte-1dln6ll) {text-decoration:var(--sui-button-link-text-decoration-focus, underline);}button.small.svelte-1dln6ll {border-radius:var(--sui-button-small-border-radius);padding:var(--sui-button-small-padding);height:var(--sui-button-small-height);font-size:var(--sui-button-small-font-size, var(--sui-font-size-small));}button.small.svelte-1dln6ll .icon {font-size:var(--sui-font-size-large);}button.medium.svelte-1dln6ll {border-radius:var(--sui-button-medium-border-radius);padding:var(--sui-button-medium-padding);height:var(--sui-button-medium-height);font-size:var(--sui-button-medium-font-size, var(--sui-font-size-default));}button.large.svelte-1dln6ll {border-radius:var(--sui-button-large-border-radius);padding:var(--sui-button-large-padding);height:var(--sui-button-large-height);font-size:var(--sui-button-large-font-size, var(--sui-font-size-large));}button.pill.svelte-1dln6ll {border-radius:80px;padding:var(--sui-button-medium-pill-padding, 0 12px);}button.flex.svelte-1dln6ll {flex:auto;width:-moz-available;width:-webkit-fill-available;width:stretch;}button.iconic.svelte-1dln6ll {justify-content:center;padding:0;aspect-ratio:1/1;}button.danger.svelte-1dln6ll {background-color:var(--sui-error-background-color);}button.svelte-1dln6ll .label:where(.svelte-1dln6ll) {padding:0 4px;}button.svelte-1dln6ll > * {pointer-events:none;}button.svelte-1dln6ll :has([slot=start-icon] + [slot=end-icon]) {gap:0;}'};function et(t,e){ae(e,!0),xe(t,BG);let n=R(e,"element",15),r=R(e,"class",3,""),i=R(e,"type",3,"button"),o=R(e,"role",3,"button"),s=R(e,"name",3,void 0),a=R(e,"value",3,void 0),c=R(e,"valueType",19,()=>typeof a()),u=R(e,"hidden",3,!1),d=R(e,"disabled",3,!1),f=R(e,"readonly",3,!1),h=R(e,"pressed",3,void 0),p=R(e,"keyShortcuts",3,void 0),g=R(e,"label",3,""),m=R(e,"lines",3,1),v=R(e,"variant",3,void 0),b=R(e,"size",3,"medium"),y=R(e,"iconic",3,!1),w=R(e,"pill",3,!1),S=R(e,"flex",3,!1),C=R(e,"popupPosition",3,"bottom-left"),E=R(e,"showPopupBackdrop",3,!1),$=ot(e,["$$slots","$$events","$$legacy","element","class","type","role","name","value","valueType","hidden","disabled","readonly","pressed","keyShortcuts","label","lines","variant","size","iconic","pill","flex","popupPosition","showPopupBackdrop","children","startIcon","endIcon","popup"]);var k=jG(),x=D(k);pt(x,V=>({...$,class:`sui button ${v()??""} ${b()??""} ${r()??""}`,type:i(),name:s(),value:a(),hidden:u(),disabled:d(),role:o(),"aria-hidden":u(),"aria-disabled":d(),"aria-readonly":f(),"aria-pressed":h(),"data-type":c(),"data-name":s(),"data-label":g(),"data-value":a(),[_r]:V}),[()=>({iconic:y(),pill:w(),flex:S()})],void 0,"svelte-1dln6ll");var A=M(x);Fe(A,()=>e.startIcon??Me);var I=z(A,2);{var P=V=>{var W=X(),J=D(W);{var N=K=>{var Y=DG(),Q=M(Y);wr(Q,{get lines(){return m()},children:(ie,ee)=>{var te=Oe();Z(()=>ne(te,g())),T(ie,te)},$$slots:{default:!0}}),T(K,Y)},B=K=>{var Y=MG(),Q=M(Y);Fe(Q,()=>e.children??Me),T(K,Y)};H(J,K=>{g()?K(N):K(B,!1)})}T(V,W)},O=V=>{var W=UG(),J=D(W);{var N=K=>{var Y=zG(),Q=M(Y);wr(Q,{get lines(){return m()},children:(ie,ee)=>{var te=Oe();Z(()=>ne(te,g())),T(ie,te)},$$slots:{default:!0}}),T(K,Y)};H(J,K=>{g()&&K(N)})}var B=z(J,2);Fe(B,()=>e.children??Me),T(V,W)};H(I,V=>{v()==="link"?V(P):V(O,!1)})}var L=z(I,2);Fe(L,()=>e.endIcon??Me),bt(x,V=>n(V),()=>n()),Ms(x,(V,W)=>NA?.(V,W),p);var F=z(x,2);{var U=V=>{Up(V,{get anchor(){return n()},get position(){return C()},get showBackdrop(){return E()},touchOptimized:!0,children:(W,J)=>{var N=X(),B=D(N);Fe(B,()=>e.popup),T(W,N)},$$slots:{default:!0}})};H(F,V=>{e.popup&&V(U)})}T(t,k),le()}var qG=j('<div role="none"><!></div>'),HG=j('<div role="none"><div role="alert" class="message svelte-16zgk6j"><!> <!></div> <!></div>');const GG={hash:"svelte-16zgk6j",code:".infobar.svelte-16zgk6j {flex:none;display:flex;align-items:center;gap:var(--sui-infobar-gap, 8px);border-width:var(--sui-infobar-border-width, 0 0 1px);border-style:var(--sui-infobar-border-style, solid);padding:var(--sui-infobar-padding, 0);min-height:var(--sui-infobar-min-height, 32px);font-size:var(--sui-infobar-font-size, var(--sui-font-size-small));}.infobar.info.svelte-16zgk6j {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.infobar.warning.svelte-16zgk6j {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.infobar.error.svelte-16zgk6j {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.infobar.success.svelte-16zgk6j {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}.message.svelte-16zgk6j {flex:auto;display:flex;align-items:center;justify-content:var(--sui-infobar-message-justify-content, left);gap:var(--sui-infobar-message-gap, 6px);padding:var(--sui-infobar-message-padding, 0 8px);}.message.svelte-16zgk6j button {font-size:inherit !important;}.message.svelte-16zgk6j .icon {font-size:16px; /* !hardcoded */}"};function jp(t,e){ae(e,!0),xe(t,GG);const[n,r]=ve(),i=()=>q(ue,"$_",n);let o=R(e,"show",15,!0),s=R(e,"dismissible",3,!0),a=R(e,"status",3,"info"),c=R(e,"children",3,void 0),u=R(e,"icon",3,void 0);var d=X(),f=D(d);{var h=p=>{var g=HG(),m=M(g),v=M(m);{var b=E=>{var $=X(),k=D($);Fe(k,u),T(E,$)},y=E=>{{let $=_(()=>a()==="success"?"check_circle":a());Xe(E,{get name(){return l($)}})}};H(v,E=>{u()?E(b):E(y,!1)})}var w=z(v,2);Fe(w,()=>c()??Me);var S=z(m,2);{var C=E=>{var $=qG(),k=M($);{let x=_(()=>i()("_sui.dismiss"));et(k,{iconic:!0,size:"small",variant:"ghost",get"aria-label"(){return l(x)},onclick:()=>{o(!1)},children:(A,I)=>{Xe(A,{name:"close"})},$$slots:{default:!0}})}T(E,$)};H(S,E=>{s()&&E(C)})}Z(()=>rn(g,1,`infobar ${a()??""}`,"svelte-16zgk6j")),T(p,g)};H(f,p=>{o()&&p(h)})}T(t,d),le(),r()}var KG=j("<div><!></div>");const VG={hash:"svelte-1iwfqt0",code:".bottom-navigation.svelte-1iwfqt0 {height:var(--sui-bottom-navigation-height, var(--sui-primary-toolbar-size));border-top-width:var(--sui-bottom-navigation-border-color, 1px);border-top-style:var(--sui-bottom-navigation-border-style, solid);border-top-color:var(--sui-bottom-navigation-border-color, var(--sui-secondary-border-color));}.bottom-navigation.svelte-1iwfqt0:is([inert]:where(.svelte-1iwfqt0), [hidden]:where(.svelte-1iwfqt0)) {display:none;}.bottom-navigation.svelte-1iwfqt0 .buttons {flex:auto;display:flex;align-items:center;justify-content:space-evenly;}"};function WG(t,e){xe(t,VG);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=KG();pt(r,()=>({role:"none",class:`sui bottom-navigation ${e.class??""}`,...n}),void 0,void 0,"svelte-1iwfqt0");var i=M(r);Fe(i,()=>e.children??Me),T(t,r)}var YG=j("<div><!></div>");const JG={hash:"svelte-h04q9p",code:".button-group.svelte-h04q9p {flex:none;display:inline-flex;align-items:center;}"};function ZG(t,e){xe(t,JG);let n=ot(e,["$$slots","$$events","$$legacy","class","children"]);var r=YG();pt(r,()=>({...n,role:"group",class:`sui button-group ${e.class??""}`}),void 0,void 0,"svelte-h04q9p");var i=M(r);Fe(i,()=>e.children??Me),T(t,r)}var XG=j('<div role="none" class="sui floating-action-button-wrapper svelte-7t3j1e"><!></div>');const QG={hash:"svelte-7t3j1e",code:`.floating-action-button-wrapper.svelte-7t3j1e {display:contents;}
|
|
380
380
|
@media (width < 768px) {.floating-action-button-wrapper.svelte-7t3j1e {display:block;position:fixed;inset:auto 16px 72px auto;z-index:100;}.floating-action-button-wrapper.svelte-7t3j1e button {border-radius:50%;height:56px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.4);}.floating-action-button-wrapper.svelte-7t3j1e button .icon {font-size:32px;}
|
|
381
381
|
}`};function OA(t,e){xe(t,QG);let n=R(e,"children",3,void 0);var r=XG(),i=M(r);Fe(i,()=>n()??Me),T(t,r)}const RA=t=>{const{type:e="string",name:n,label:r}=t.dataset;let{value:i}=t.dataset;return e==="number"?(i=Number(i),Number.isNaN(i)&&(i=null)):e==="boolean"?i=i==="true":e==="string"&&(i=i?String(i):""),{target:t,type:e,name:n,label:r,value:i}},FA=t=>(t=t.trim(),t?t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase():""),e7={grid:{orientation:"vertical",childRoles:["row"],childSelectedAttr:"aria-selected",focusChild:!0,selectFirst:!0},listbox:{orientation:"vertical",childRoles:["option"],childSelectedAttr:"aria-selected",focusChild:!1,selectFirst:!1},menu:{orientation:"vertical",childRoles:["menuitem","menuitemcheckbox","menuitemradio"],childSelectedAttr:"aria-checked",focusChild:!0,selectFirst:!1},menubar:{orientation:"horizontal",childRoles:["menuitem","menuitemcheckbox","menuitemradio"],childSelectedAttr:"aria-checked",focusChild:!0,selectFirst:!1},radiogroup:{orientation:"horizontal",childRoles:["radio"],childSelectedAttr:"aria-checked",focusChild:!0,selectFirst:!1},tablist:{orientation:"horizontal",childRoles:["tab"],childSelectedAttr:"aria-selected",focusChild:!0,selectFirst:!0}};let t7=class{constructor(e,{clickToSelect:n=!0}={}){e.dispatchEvent(new CustomEvent("Initializing")),this.parent=e,this.role=e.getAttribute("role"),this.multi=this.parent.getAttribute("aria-multiselectable")==="true",this.id=Q_(this.role),this.parentGroupSelector=`[role="group"], [role="${this.role}"]`,this.clickToSelect=n;const{orientation:r,childRoles:i,childSelectedAttr:o,focusChild:s,selectFirst:a}=e7[this.role];this.orientation=this.grid?"horizontal":this.parent.getAttribute("aria-orientation")??r,this.childRoles=i,this.childSelectedAttr=o,this.childSelectedProp=o.replace("aria-",""),this.focusChild=s,this.selectFirst=a,this.parent.tabIndex=s?-1:0,(async()=>(await Lt(100),this.activate()))()}activate(){const{parent:e,allMembers:n,selected:r}=this;n.forEach((i,o)=>{const s=i.getAttribute(this.childSelectedAttr)==="true"||(r?i===r:this.selectFirst&&o===0),a=document.querySelector(`#${i.getAttribute("aria-controls")}`);i.id||=`${this.id}-item-${o+1}`,i.tabIndex=s?0:-1,i.setAttribute(this.childSelectedAttr,String(s)),a&&(a.inert=!s,a.setAttribute("aria-labelledby",i.id),a.setAttribute("aria-hidden",String(!s)),s&&globalThis.setTimeout(()=>{try{a.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{a.scrollIntoView(!0)}},300))}),e.addEventListener("click",i=>{this.onClick(i)}),e.addEventListener("keydown",i=>{this.onKeyDown(i)}),e.dispatchEvent(new CustomEvent("Initialized"))}get selector(){return this.childRoles.map(e=>`[role="${e}"]`).join(",")}get allMembers(){return[...this.parent.querySelectorAll(this.selector)]}get activeMembers(){return this.allMembers.filter(e=>!e.matches('[aria-disabled="true"], [aria-hidden="true"]'))}get selected(){return this.activeMembers.find(e=>e.matches(`[${this.childSelectedAttr}="true"]`))}get isDisabled(){return this.parent.matches('[aria-disabled="true"]')}get isReadOnly(){return this.parent.matches('[aria-readonly="true"]')}get grid(){return this.role==="grid"||this.role==="listbox"&&this.parent.matches(".grid")}selectTarget(e,n){if(this.isDisabled||this.isReadOnly){e.preventDefault();return}const r=n.getAttribute("role"),i=n.closest(this.parentGroupSelector),o=e.type==="click",s=e.type==="keydown"&&e.key===" ";this.activeMembers.forEach(a=>{const c=a.matches('[role="menuitemcheckbox"]'),u=a.matches('[role="menuitemradio"]');if((c||u)&&(a.getAttribute("role")!==r||a.closest(this.parentGroupSelector)!==i))return;const d=c||this.multi,f=u||!d,h=a===n,p=a.matches(`[${this.childSelectedAttr}="true"]`),g=a.getAttribute("aria-controls"),m=g?document.getElementById(g):null;d&&h&&(o||s)&&(a.setAttribute(this.childSelectedAttr,String(!p)),a.dispatchEvent(new CustomEvent("Change",{detail:{[this.childSelectedProp]:!p}})),p||a.dispatchEvent(new CustomEvent("Select"))),f&&p!==h&&(!u||s||o)&&(a.setAttribute(this.childSelectedAttr,String(h)),a.dispatchEvent(new CustomEvent("Change",{detail:{[this.childSelectedProp]:h}})),h&&a.dispatchEvent(new CustomEvent("Select"))),this.focusChild?globalThis.requestAnimationFrame(()=>{a.tabIndex=h?0:-1,h&&(a.focus(),a.dispatchEvent(new CustomEvent("Focus")))}):(a.classList.toggle("focused",h),h&&a.dispatchEvent(new CustomEvent("Focus"))),m&&(m.inert=!h,m.setAttribute("aria-hidden",String(!h)),h&&globalThis.setTimeout(()=>{try{m.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{m.scrollIntoView(!0)}},300)),h&&(this.parent.setAttribute("aria-activedescendant",a.id),globalThis.setTimeout(()=>{try{a.scrollIntoView({block:"nearest",inline:"nearest",behavior:"auto"})}catch{a.scrollIntoView(!0)}},300))}),this.parent.dispatchEvent(new CustomEvent("Change",{detail:RA(n)}))}onClick(e){const n=e.target,r=n.matches(this.selector)?n:n.closest(this.selector);!r||e.button!==0||!this.clickToSelect||this.selectTarget(e,r)}onKeyDown(e){const{key:n,ctrlKey:r,metaKey:i,shiftKey:o,altKey:s}=e;if(o||s||r||i)return;const c=e.target,{allMembers:u,activeMembers:d}=this,f=(()=>{if(!this.focusChild)return d.find(g=>g.matches(".focused"));if(c.matches(this.selector))return c})();if(["Enter"," ","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(n)&&e.preventDefault(),n==="Enter"){f?.click();return}if(n===" "){f&&this.selectTarget(e,f);return}let h,p;if(this.grid){const g=Math.floor(this.parent.clientWidth/d[0].clientWidth);h=f?u.indexOf(f):-1,n==="ArrowUp"&&h>0&&(p=u[h-g]),n==="ArrowDown"&&h<u.length-1&&(p=u[h+g]),n==="ArrowLeft"&&h>0&&(p=u[h-1]),n==="ArrowRight"&&h<u.length-1&&(p=u[h+1]),p?.matches('[aria-disabled="true"], [aria-hidden="true"]')&&(p=void 0)}else h=f?d.indexOf(f):-1,n===(this.orientation==="horizontal"?"ArrowLeft":"ArrowUp")&&(h>0&&(p=d[h-1]),h===0&&(p=d[d.length-1])),n===(this.orientation==="horizontal"?"ArrowRight":"ArrowDown")&&(h<d.length-1&&(p=d[h+1]),h===d.length-1&&([p]=d));p&&p!==f&&this.selectTarget(e,p)}onUpdate({searchTerms:e}){const n=FA(e),r=n?n.split(/\s+/):[],i=this.allMembers.map(o=>{const s=FA(o.dataset.searchValue??o.dataset.label??o.querySelector(".label")?.textContent??o.textContent??""),a=!r.every(c=>s.includes(c));return o.dispatchEvent(new CustomEvent("Toggle",{detail:{hidden:a}})),a}).filter(o=>!o).length;this.parent.dispatchEvent(new CustomEvent("Filter",{detail:{matched:i,total:this.allMembers.length}}))}};const Kc=(t,e)=>{const n=new t7(t,e);return{update(r){n.onUpdate(r)}}};var n7=j('<div><div role="none" class="inner svelte-1ig077g"><!></div></div>');const r7={hash:"svelte-1ig077g",code:".select-button-group.svelte-1ig077g {flex:none;display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);}.select-button-group.svelte-1ig077g:focus-visible {outline-width:0 !important;}.select-button-group.svelte-1ig077g button {margin:0 !important;border-radius:0 !important;color:var(--sui-primary-foreground-color);}.select-button-group.svelte-1ig077g button:first-child {border-top-left-radius:4px !important;border-bottom-left-radius:4px !important;}.select-button-group.svelte-1ig077g button:not(:first-child) {border-left-width:0;}.select-button-group.svelte-1ig077g button:last-child {border-top-right-radius:4px !important;border-bottom-right-radius:4px !important;}.select-button-group.svelte-1ig077g button[aria-checked=true] {color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color);}.select-button-group.svelte-1ig077g [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.select-button-group.svelte-1ig077g [aria-disabled=false] button[aria-disabled=true] {filter:grayscale(0) opacity(1);}.select-button-group.svelte-1ig077g [aria-disabled=false] button[aria-disabled=true] * {filter:grayscale(1) opacity(0.35);}.inner.svelte-1ig077g {display:contents;}"};function Bp(t,e){xe(t,r7);let n=R(e,"hidden",3,!1),r=R(e,"disabled",3,!1),i=R(e,"readonly",3,!1),o=R(e,"required",3,!1),s=R(e,"invalid",3,!1),a=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","readonly","required","invalid","children"]);var c=n7();pt(c,()=>({...a,role:"radiogroup",class:`sui select-button-group ${e.class??""}`,hidden:n(),tabindex:"-1","aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":o(),"aria-invalid":s()}),void 0,void 0,"svelte-1ig077g");var u=M(c),d=M(u);Fe(d,()=>e.children??Me),Ms(c,f=>Kc?.(f)),Z(()=>u.inert=r()),T(t,c)}function Od(t,e){ae(e,!0);let n=R(e,"selected",15,!1),r=ot(e,["$$slots","$$events","$$legacy","selected","class","onChange"]);et(t,dn(()=>r,{role:"radio",get class(){return`sui select-button ${e.class??""}`},get"aria-checked"(){return n()},onChange:i=>{n(i.detail.selected),e.onChange?.(i)}})),le()}var i7=j("<!> <!>",1);function Lr(t,e){ae(e,!0);let n=R(e,"hidden",3,!1),r=R(e,"disabled",3,!1),i=R(e,"popupPosition",3,"bottom-left"),o=R(e,"popupPositionBaseElement",3,void 0),s=R(e,"showPopupBackdrop",3,!1),a=R(e,"label",3,""),c=R(e,"variant",3,void 0),u=R(e,"size",3,"medium"),d=R(e,"iconic",3,!1),f=ot(e,["$$slots","$$events","$$legacy","class","hidden","disabled","popupPosition","popupPositionBaseElement","showPopupBackdrop","label","variant","size","iconic","children","startIcon","endIcon","popup"]),h=oe(void 0);const p=()=>{l(h)?.focus()};var g=i7(),m=D(g);et(m,dn(()=>f,{get class(){return`sui menu-button ${e.class??""}`},get hidden(){return n()},get disabled(){return r()},get label(){return a()},get variant(){return c()},get size(){return u()},get iconic(){return d()},"aria-haspopup":"menu",get element(){return l(h)},set element(S){G(h,S,!0)},startIcon:S=>{var C=X(),E=D(C);Fe(E,()=>e.startIcon??Me),T(S,C)},children:S=>{var C=X(),E=D(C);Fe(E,()=>e.children??Me),T(S,C)},endIcon:S=>{var C=X(),E=D(C);{var $=x=>{var A=X(),I=D(A);Fe(I,()=>e.endIcon),T(x,A)},k=x=>{var A=X(),I=D(A);{var P=L=>{Xe(L,{name:"more_vert"})},O=L=>{Xe(L,{name:"arrow_drop_down",class:"small-arrow"})};H(I,L=>{d()?L(P):L(O,!1)},!0)}T(x,A)};H(E,x=>{e.endIcon?x($):x(k,!1)})}T(S,C)},$$slots:{startIcon:!0,default:!0,endIcon:!0}}));var v=z(m,2);return Up(v,{get anchor(){return l(h)},get position(){return i()},get positionBaseElement(){return o()},get showBackdrop(){return s()},children:(b,y)=>{var w=X(),S=D(w);Fe(S,()=>e.popup??Me),T(b,w)},$$slots:{default:!0}}),T(t,g),le({focus:p})}var o7=j('<div role="group" class="sui split-button svelte-1teyy90"><!> <!></div>');const s7={hash:"svelte-1teyy90",code:".split-button.svelte-1teyy90 {flex:none;display:inline-flex;margin:var(--sui-focus-ring-width);}.split-button.svelte-1teyy90 button {margin:0;}.split-button.svelte-1teyy90 button.menu-button {border-left-width:0;border-top-left-radius:0;border-bottom-left-radius:0;aspect-ratio:3/4;}.split-button.svelte-1teyy90 button:not(.menu-button) {border-top-right-radius:0;border-bottom-right-radius:0;}"};function DA(t,e){ae(e,!0),xe(t,s7);const[n,r]=ve(),i=()=>q(ue,"$_",n);let o=R(e,"hidden",3,!1),s=R(e,"disabled",3,!1),a=R(e,"label",3,""),c=R(e,"variant",3,void 0),u=R(e,"size",3,"medium"),d=R(e,"popupPosition",3,"bottom-left"),f=R(e,"showPopupBackdrop",3,!1),h=ot(e,["$$slots","$$events","$$legacy","hidden","disabled","label","variant","size","popupPosition","showPopupBackdrop","chevronIcon","popup"]),p=oe(void 0);var g=o7(),m=M(g);et(m,dn(()=>h,{get hidden(){return o()},get disabled(){return s()},get label(){return a()},get variant(){return c()},get size(){return u()}}));var v=z(m,2);{const b=S=>{var C=X(),E=D(C);{var $=x=>{var A=X(),I=D(A);Fe(I,()=>e.chevronIcon),T(x,A)},k=x=>{Xe(x,{name:"arrow_drop_down",class:"small-arrow"})};H(E,x=>{e.chevronIcon?x($):x(k,!1)})}T(S,C)},y=S=>{var C=X(),E=D(C);Fe(E,()=>e.popup??Me),T(S,C)};let w=_(()=>i()("_sui.split_button.more_options"));Lr(v,{iconic:!0,get hidden(){return o()},get disabled(){return s()},get variant(){return c()},get size(){return u()},get"aria-label"(){return l(w)},get popupPosition(){return d()},get popupPositionBaseElement(){return l(p)},get showPopupBackdrop(){return f()},endIcon:b,popup:y,$$slots:{endIcon:!0,popup:!0}})}bt(g,b=>G(p,b),()=>l(p)),Z(b=>{g.hidden=o(),Te(g,"aria-hidden",o()),Te(g,"aria-disabled",s()),Te(g,"aria-label",b)},[()=>i()("_sui.split_button.x_options",{values:{name:a()}})]),T(t,g),le(),r()}var a7=j("<div></div>");const l7={hash:"svelte-ncj2qo",code:".divider.svelte-ncj2qo {flex:none;background-color:var(--sui-secondary-border-color);}.divider[aria-orientation=horizontal].svelte-ncj2qo {margin:8px 0;width:100%;height:1px;}.divider[aria-orientation=vertical].svelte-ncj2qo {margin:0 8px;width:1px;height:100%;}"};function Vr(t,e){xe(t,l7);let n=R(e,"hidden",3,!1),r=R(e,"orientation",3,"horizontal"),i=ot(e,["$$slots","$$events","$$legacy","class","hidden","orientation"]);var o=a7();pt(o,()=>({...i,role:"separator",class:`sui divider ${e.class??""}`,hidden:n(),"aria-hidden":n(),"aria-orientation":r()}),void 0,void 0,"svelte-ncj2qo"),T(t,o)}var c7=j("<div></div>");const u7={hash:"svelte-1rs4j5f",code:".spacer.flex.svelte-1rs4j5f {flex:auto;}.spacer.svelte-1rs4j5f:not(.flex) {width:8px;height:8px;}"};function Wr(t,e){xe(t,u7);let n=R(e,"flex",3,!1),r=ot(e,["$$slots","$$events","$$legacy","class","flex"]);var i=c7();pt(i,o=>({...r,role:"none",class:`sui spacer ${e.class??""}`,[_r]:o}),[()=>({flex:n()})],void 0,"svelte-1rs4j5f"),T(t,i)}La(["click"]);var d7=j('<div><div role="none" class="inner svelte-wisqat"><!></div></div>');const f7={hash:"svelte-wisqat",code:`.checkbox-group.svelte-wisqat {display:inline-flex;}.checkbox-group.horizontal.svelte-wisqat {gap:8px;align-items:center;flex-wrap:wrap;}.checkbox-group.vertical.svelte-wisqat {gap:4px;flex-direction:column;}
|
|
382
382
|
@media (pointer: coarse) {.checkbox-group.vertical.svelte-wisqat {gap:8px;}
|
|
@@ -617,7 +617,7 @@ Return a JSON object with this exact structure:
|
|
|
617
617
|
{
|
|
618
618
|
"translations": ["translated text 1", "translated text 2", ...]
|
|
619
619
|
}`},fN=t=>`Translate these texts:
|
|
620
|
-
${JSON.stringify(t)}`,dee="anthropic",fee="Anthropic Claude",hee="Anthropic API",pee="https://docs.anthropic.com/en/api/overview",gee="https://console.anthropic.com/settings/keys",mee=/sk-ant-api03-[a-zA-Z0-9-_]{80,}/,vee=["af,ar,be,bg,bn,bs,ca,cs,cy,da,de,el,en,eo,es,et,eu,fa,fi,fr,ga,gl,gu,he,hi,hr,hu,hy,id,is,it,ja","ka,kk,km,kn,ko,ky,la,lt,lv,mk,ml,mn,mr,ms,mt,my,ne,nl,no,pl,pt,ro,ru,si,sk,sl,sq,sr,sv,sw,ta,te","th,tl,tr,uk,ur,uz,vi,zh"].join(",").split(","),im=t=>{const[e]=t.toLowerCase().split(/[-_]/);if(vee.includes(e))return e},bee={serviceId:dee,serviceLabel:fee,apiLabel:hee,developerURL:pee,apiKeyURL:gee,apiKeyPattern:mee,markdownSupported:!0,getSourceLanguage:im,getTargetLanguage:im,translate:async(t,{sourceLocale:e,targetLocale:n,apiKey:r})=>{const i=im(e),o=im(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const s="https://api.anthropic.com/v1/messages",a=dN(i,o),c=fN(t),u={model:"claude-3-5-haiku-latest",max_tokens:4e3,temperature:.3,system:a,messages:[{role:"user",content:c}]};try{const d=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true"},body:JSON.stringify(u)});if(!d.ok){const m=await d.json().catch(()=>({}));throw new Error(`Anthropic API error: ${d.status} ${d.statusText}${m.error?.message?` - ${m.error.message}`:""}`)}const f=await d.json();if(!f.content||!Array.isArray(f.content)||!f.content[0])throw new Error("Invalid response format from Anthropic API.");const h=f.content[0].text.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from Anthropic API.")}if(!p||!Array.isArray(p.translations))throw new Error("Invalid JSON structure in Anthropic API response.");const{translations:g}=p;if(g.length!==t.length){const m=t.length,v=g.length;throw new Error(`Translation count mismatch: expected ${m}, got ${v}`)}return g}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with Anthropic API.")}}},_ee="google",yee="Google Cloud Translation",wee="Cloud Translation API",xee="https://console.cloud.google.com/apis/library/translate.googleapis.com",kee="https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials",See=/AIza[0-9A-Za-z-_]{35}/,hN=["ab,ace,ach,af,ak,alz,am,ar,as,awa,ay,az","ba,ban,bbc,be,bem,bew,bg,bho,bik,bm,bn,br,bs,bts,btx,bua","ca,ceb,cgg,chm,ckb,cnh,co,crh,crs,cs,cv,cy","da,de,din,doi,dov,dv,dz","ee,el,en,eo,es,et,eu","fa,ff,fi,fil,fj,fr,fr-CA,fr-FR,fy","ga,gaa,gd,gl,gn,gom,gu","ha,haw,he,hi,hil,hmn,hr,hrx,ht,hu,hy","id,ig,ilo,is,it,iw","ja,jv,jw","ka,kk,km,kn,ko,kri,ktu,ku,ky","la,lb,lg,li,lij,lmo,ln,lo,lt,ltg,luo,lus,lv","mai,mak,mg,mi,min,mk,ml,mn,mni-Mtei,mr,ms,ms-Arab,mt,my","ne,new,nl,no,nr,nso,nus,ny","oc,om,or","pa,pa-Arab,pag,pam,pap,pl,ps,pt,pt-BR,pt-PT","qu","rn,ro,rom,ru,rw","sa,scn,sd,sg,shn,si,sk,sl,sm,sn,so,sq,sr,ss,st,su,sv,sw,szl","ta,te,tet,tg,th,ti,tk,tl,tn,tr,ts,tt","ug,uk,ur,uz","vi","xh","yi,yo,yua,yue","zh,zh-CN,zh-TW,zu"].join(",").split(","),om=t=>{const e=t.replace(/^([a-z]{2,3})[-_]([a-z]{2,4})$/i,(r,i,o)=>`${i.toLowerCase()}-${o.toUpperCase()}`);if(hN.includes(e))return e;const[n]=e.split("-");if(hN.includes(n))return n},pN={serviceId:_ee,serviceLabel:yee,apiLabel:wee,developerURL:xee,apiKeyURL:kee,apiKeyPattern:See,markdownSupported:!1,getSourceLanguage:om,getTargetLanguage:om,translate:async(t,{sourceLocale:e,targetLocale:n,apiKey:r})=>{const i=om(e),o=om(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const s="https://translation.googleapis.com/language/translate/v2",a={q:t,source:i,target:o,format:"html"};try{const c=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json","X-goog-api-key":r},body:JSON.stringify(a)});if(!c.ok){const d=await c.json().catch(()=>({}));throw new Error(`Google Translate API error: ${c.status} ${c.statusText}${d.error?.message?` - ${d.error.message}`:""}`)}const{data:u}=await c.json();return u.translations.map(d=>d.translatedText)}catch(c){throw c instanceof Error?c:new Error("Failed to translate text with Google Translate API.")}}},Eee="openai",Tee="OpenAI GPT",Cee="OpenAI API",Aee="https://platform.openai.com/docs/overview",$ee="https://platform.openai.com/api-keys",Iee=/sk-[a-zA-Z0-9-_]{40,}/,Pee=["af,ar,be,bg,bn,bs,ca,cs,cy,da,de,el,en,eo,es,et,eu,fa,fi,fr,ga,gl,gu,he,hi,hr,hu,hy,id,is,it,ja","ka,kk,km,kn,ko,ky,la,lt,lv,mk,ml,mn,mr,ms,mt,my,ne,nl,no,pl,pt,ro,ru,si,sk,sl,sq,sr,sv,sw,ta,te","th,tl,tr,uk,ur,uz,vi,zh"].join(",").split(","),sm=t=>{const[e]=t.toLowerCase().split(/[-_]/);if(Pee.includes(e))return e},x0={google:pN,anthropic:bee,openai:{serviceId:Eee,serviceLabel:Tee,apiLabel:Cee,developerURL:Aee,apiKeyURL:$ee,apiKeyPattern:Iee,markdownSupported:!0,getSourceLanguage:sm,getTargetLanguage:sm,translate:async(t,{sourceLocale:e,targetLocale:n,apiKey:r})=>{const i=sm(e),o=sm(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const s="https://api.openai.com/v1/chat/completions",a=dN(i,o),c=fN(t),u={model:"gpt-3.5-turbo-1106",messages:[{role:"system",content:a},{role:"user",content:c}],temperature:.3,max_tokens:4e3,response_format:{type:"json_object"}};try{const d=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify(u)});if(!d.ok){const m=await d.json().catch(()=>({}));throw new Error(`OpenAI API error: ${d.status} ${d.statusText}${m.error?.message?` - ${m.error.message}`:""}`)}const f=await d.json();if(!f.choices||!f.choices[0]||!f.choices[0].message)throw new Error("Invalid response format from OpenAI API.");const h=f.choices[0].message.content.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from OpenAI API.")}if(!p||!Array.isArray(p.translations))throw new Error("Invalid JSON structure in OpenAI API response.");const{translations:g}=p;if(g.length!==t.length){const m=t.length,v=g.length;throw new Error(`Translation count mismatch: expected ${m}, got ${v}`)}return g}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with OpenAI API.")}}}},am=en([ft],([t])=>{const{defaultTranslationService:e="google"}=t;return x0[e]??pN}),gN=new rm({headingStyle:"atx",bulletListMarker:"-",codeBlockStyle:"fenced"});gN.keep(["span","div"]);const Nee=({draft:t,options:e})=>{const{collectionName:n,fileName:r,currentValues:i,isIndexFile:o}=t,{sourceLocale:s,targetLocale:a,keyPath:c="",translate:u=!1}=e,d=i[s],f={collectionName:n,fileName:r,valueMap:d,isIndexFile:o};return Object.fromEntries(Object.entries(d).map(([h,p])=>{const g=i[a][h],m=mn({...f,keyPath:h}),v=m?.widget??"string";return c&&!h.startsWith(c)||typeof p!="string"||!p||!["markdown","text","string","list"].includes(v)||v==="list"&&(m.field??m.fields)||!u&&p===g||!c&&u&&g?null:[h,{value:p,isMarkdown:v==="markdown"}]}).filter(h=>!!h))},Tf=(t,e,{count:n,sourceLocale:r})=>{ov.set({id:Date.now(),show:!0,status:t,message:e,count:n,sourceLocale:r})},Lee=async({currentValues:t,options:e,copingFieldMap:n})=>{const{serviceId:r,markdownSupported:i,translate:o}=se(am),{sourceLocale:s,targetLocale:a}=e,c=Object.keys(n).length,u=c===1?"one":"many",d=se(ft).apiKeys?.[r]||await new Promise(f=>{Hu.set({show:!0,multiple:c>1,resolve:f})});if(d){Tf("info","translation.started",{count:c,sourceLocale:s});try{const f=await o(Object.entries(n).map(([,{value:h,isMarkdown:p}])=>p&&!i?Et.parse(h):h),{apiKey:d,sourceLocale:s,targetLocale:a});Object.entries(n).forEach(([h,{isMarkdown:p}],g)=>{const m=f[g];t[a][h]=p&&!i?gN.turndown(m):m}),Tf("success",`translation.complete.${u}`,{count:c,sourceLocale:s})}catch(f){Tf("error","translation.error",{count:c,sourceLocale:s}),console.error(f)}}},Oee=({currentValues:t,options:e,copingFieldMap:n})=>{const{sourceLocale:r,targetLocale:i}=e,o=Object.keys(n).length,s=o===1?"one":"many";Object.entries(n).forEach(([a,{value:c}])=>{t[i][a]=c}),Tf("success",`copy.complete.${s}`,{count:o,sourceLocale:r})},mN=async t=>{const{sourceLocale:e,translate:n=!1}=t,r=se(tt),{currentValues:i}=r,o=Nee({draft:r,options:t}),s=Object.keys(o).length;if(!s){Tf("info",`${n?"translation":"copy"}.none`,{count:s,sourceLocale:e});return}n?await Lee({currentValues:i,options:t,copingFieldMap:o}):Oee({currentValues:i,options:t,copingFieldMap:o}),tt.update(a=>({...a,currentValues:i}))};function k0(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(am,"$translator",n),o=()=>q(ue,"$_",n),s=()=>q(tt,"$entryDraft",n);let a=R(e,"keyPath",3,""),c=R(e,"translate",3,!1);const u=_(()=>i().getSourceLanguage),d=_(()=>i().getTargetLanguage);var f=X(),h=D(f);st(h,17,()=>e.otherLocales,br,(p,g)=>{{let m=_(()=>o()(c()?"translate_from_x":"copy_from_x",{values:{locale:Ui(l(g))}})),v=_(()=>!s()?.currentLocales[e.locale]||!s().currentLocales[l(g)]||a()&&!Mn(s().currentValues[l(g)])[a()]||!c()&&a()&&Mn(s().currentValues[l(g)])[a()]===Mn(s().currentValues[e.locale])[a()]||c()&&(!l(u)(e.locale)||!l(d)(l(g))));gt(p,{get label(){return l(m)},get disabled(){return l(v)},onclick:()=>{mN({sourceLocale:l(g),targetLocale:e.locale,keyPath:a(),translate:c()})}})}}),T(t,f),le(),r()}var Ree=j("<section><!></section>");const Fee={hash:"svelte-thyinu",code:"section.svelte-thyinu {padding:var(--field-editor-padding);}section.svelte-thyinu:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}section.svelte-thyinu > * {margin-inline:auto !important;max-width:768px;}section.svelte-thyinu > header {display:flex;align-items:center;margin:0 -8px 8px;height:var(--sui-button-small-height);}section.svelte-thyinu > header h4 {margin-inline:8px 0;font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}section.svelte-thyinu > header .required {margin:2px 0 0 2px;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}"};function vN(t,e){xe(t,Fee);let n=R(e,"children",3,void 0),r=ot(e,["$$slots","$$events","$$legacy","children"]);var i=Ree();pt(i,()=>({role:"group",class:"field",...r}),void 0,void 0,"svelte-thyinu");var o=M(i);Fe(o,()=>n()??Me),T(t,i)}function bN(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(am,"$translator",n),o=()=>q(tt,"$entryDraft",n),s=()=>q(ue,"$_",n);let a=R(e,"size",3,"medium"),c=R(e,"keyPath",3,"");const u=_(()=>i()??{}),d=_(()=>l(u).getSourceLanguage),f=_(()=>l(u).getTargetLanguage),h=_(()=>!o()?.currentLocales[e.locale]||!l(d)(e.locale));var p=X(),g=D(p);{var m=b=>{const y=_(()=>{const[S]=e.otherLocales;return{otherLocale:S}}),w=_(()=>s()("translate_from_x",{values:{locale:Ui(l(y).otherLocale)}}));{const S=E=>{Xe(E,{name:"translate"})};let C=_(()=>l(h)||!o()?.currentLocales[l(y).otherLocale]||!l(f)(l(y).otherLocale));et(b,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(w)},get title(){return l(w)},get disabled(){return l(C)},onclick:()=>{mN({sourceLocale:l(y).otherLocale,targetLocale:e.locale,keyPath:c(),translate:!0})},startIcon:S,$$slots:{startIcon:!0}})}},v=b=>{{const y=C=>{Xe(C,{name:"translate"})},w=C=>{{let E=_(()=>s()("translation_options"));ir(C,{get"aria-label"(){return l(E)},children:($,k)=>{k0($,{get locale(){return e.locale},get otherLocales(){return e.otherLocales},get keyPath(){return c()},translate:!0})},$$slots:{default:!0}})}};let S=_(()=>s()("translate"));Lr(b,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(S)},get disabled(){return l(h)},endIcon:y,popup:w,$$slots:{endIcon:!0,popup:!0}})}};H(g,b=>{e.otherLocales.length===1?b(m):b(v,!1)})}T(t,p),le(),r()}var Dee=j('<div role="alert" class="validation svelte-1rv50nx" aria-live="polite"><div role="none" class="svelte-1rv50nx"><!> <!></div></div>');const Mee={hash:"svelte-1rv50nx",code:".validation.svelte-1rv50nx {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) {display:flex;align-items:center;gap:4px;margin:4px 0;}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) .icon {flex:none;font-size:16px; /* !hardcoded */}"};function S0(t,e){xe(t,Mee);var n=Dee(),r=M(n),i=M(r);Xe(i,{name:"error"});var o=z(i,2);Fe(o,()=>e.children),Z(()=>Te(n,"id",e.id)),T(t,n)}function zee(t,e){ae(e,!0);let n=R(e,"currentValue",15),r=R(e,"required",3,!0),i=R(e,"readonly",3,!1),o=R(e,"invalid",3,!1);ty(t,{get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get checked(){return n()},set checked(s){n(s)}}),le()}var Uee=j("<p> </p>");function jee(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(ue,"$_",n);let o=R(e,"currentValue",3,!1);var s=X(),a=D(s);{var c=u=>{var d=Uee(),f=M(d);Z(h=>ne(f,h),[()=>i()(`boolean.${o()}`)]),T(u,d)};H(a,u=>{typeof o()=="boolean"&&u(c)})}T(t,s),le(),r()}function Bee(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(tt,"$entryDraft",n),{valueStoreKey:o="currentValues"}=Yn("field-editor")??{};let s=R(e,"currentValue",15),a=R(e,"required",3,!0),c=R(e,"readonly",3,!1),u=R(e,"invalid",3,!1),d=oe(""),f=oe("");const h=_(()=>nt(e.fieldConfig.default_language,"")),p=_(()=>nt(e.fieldConfig.allow_language_selection,!0)),g=_(()=>nt(e.fieldConfig.output_code_only,!1)),m=_(()=>nt(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),v=_(()=>Mn(i()?.[o][e.locale])??{}),b=_(()=>`${e.keyPath}.${l(m).code}`),y=_(()=>`${e.keyPath}.${l(m).lang}`),w=()=>{if(l(g))typeof s()!="string"?G(d,""):l(d)!==s()&&G(d,s(),!0);else{const $=l(v)[l(b)],k=l(v)[l(y)]||l(h);typeof $!="string"?G(d,""):l(d)!==$&&G(d,$,!0),typeof k!="string"?G(f,""):l(f)!==k&&G(f,k,!0)}},S=()=>{l(g)?s()!==l(d)&&s(l(d)):i()&&(s({}),l(v)[l(b)]!==l(d)&&It(tt,Ce(i)[o][e.locale][l(b)]=l(d),Ce(i)),l(v)[l(y)]!==l(f)&&It(tt,Ce(i)[o][e.locale][l(y)]=l(f),Ce(i)))};Re(()=>{l(v),Ce(()=>{w()})}),Re(()=>{l(d),l(f),Ce(()=>{S()})});var C=X(),E=D(C);un(E,Lt,null,$=>{var k=X(),x=D(k);Jn(x,()=>JSON.stringify(e.fieldConfig),A=>{qY(A,{get showLanguageSwitcher(){return l(p)},flex:!0,get readonly(){return c()},get required(){return a()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get code(){return l(d)},set code(I){G(d,I,!0)},get lang(){return l(f)},set lang(I){G(f,I,!0)}})}),T($,k)}),T(t,C),le(),r()}var qee=j("<pre> </pre>");function Hee(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(tt,"$entryDraft",n),o=_(()=>nt(e.fieldConfig.default_language,"")),s=_(()=>nt(e.fieldConfig.output_code_only,!1)),a=_(()=>nt(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),c=_(()=>Mn(i()?.currentValues[e.locale])??{}),u=_(()=>`${e.keyPath}.${l(a).code}`),d=_(()=>`${e.keyPath}.${l(a).lang}`),f=_(()=>l(s)?e.currentValue:l(c)[l(u)]),h=_(()=>l(s)?l(o):l(c)[l(d)]);var p=X(),g=D(p);{var m=v=>{var b=qee(),y=M(b);Z(()=>{rn(b,1,y1(l(h)?`language-${l(h)}`:void 0)),ne(y,l(f))}),T(v,b)};H(g,v=>{l(f)&&v(m)})}T(t,p),le(),r()}var Gee=j(" <!>",1),Kee=j('<span role="none" class="value svelte-s59zhj"><!> <!></span>'),Vee=j('<div role="none" class="svelte-s59zhj"><input type="color" class="svelte-s59zhj"/> <!> <!></div>');const Wee={hash:"svelte-s59zhj",code:"div.svelte-s59zhj {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.text-input {width:80px;min-width:0;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.slider {padding:8px;--sui-slider-base-width: 80px;}input.svelte-s59zhj {font-family:var(--sui-textbox-font-family);}"};function Yee(t,e){const n=zn();ae(e,!0),xe(t,Wee);const[r,i]=ve(),o=()=>q(ue,"$_",r);let s=R(e,"currentValue",15),a=R(e,"required",3,!0),c=R(e,"readonly",3,!1),u=R(e,"invalid",3,!1),d=oe(""),f=oe(255);const h=_(()=>nt(e.fieldConfig.allowInput,!1)),p=_(()=>nt(e.fieldConfig.enableAlpha,!1)),g=/^#[0-9a-f]{6}$/,m=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/,v=()=>{if(typeof s()!="string")return;const{rgb:k,a:x="ff"}=s().match(m)?.groups??{};if(k&&l(d)!==k&&G(d,k,!0),k&&l(p)){const A=Number.parseInt(`0x${x}`,16);l(f)!==A&&G(f,A,!0)}},b=()=>{let k=g.test(l(d))?l(d):"";k&&l(p)&&(k+=l(f).toString(16).padStart(2,"0")),s()!==k&&s(k)};Re(()=>{s(),Ce(()=>{v()})}),Re(()=>{l(d),l(f),Ce(()=>{b()})});var y=Vee(),w=M(y),S=z(w,2);{var C=k=>{var x=Kee(),A=M(x);{var I=L=>{Ln(L,{get id(){return`${n}-input`},get invalid(){return u()},get readonly(){return c()},get required(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(d)},set value(F){G(d,F,!0)}})};H(A,L=>{l(h)&&L(I)})}var P=z(A,2);{var O=L=>{var F=Gee(),U=D(F),V=z(U);{let W=_(()=>!l(d)),J=_(()=>o()("opacity"));O9(V,{min:0,max:255,get disabled(){return l(W)},get"aria-label"(){return l(J)},get value(){return l(f)},set value(N){G(f,N,!0)}})}Z(W=>ne(U,`${W??""} `),[()=>o()("opacity")]),T(L,F)};H(P,L=>{l(p)&&L(O)})}T(k,x)};H(S,k=>{(l(h)||l(p))&&k(C)})}var E=z(S,2);{var $=k=>{{let x=_(()=>o()("clear")),A=_(()=>!l(d)),I=_(()=>`${n}-picker ${l(h)?`${n}-input`:""}`);et(k,{variant:"tertiary",get label(){return l(x)},get disabled(){return l(A)},get"aria-controls"(){return l(I)},onclick:()=>{G(d,""),G(f,255)}})}};H(E,k=>{!c()&&!a()&&k($)})}Z(()=>{Te(w,"id",`${n}-picker`),w.readOnly=c(),Te(w,"aria-invalid",u()),Te(w,"aria-readonly",c()),Te(w,"aria-required",a()),Te(w,"aria-labelledby",`${e.fieldId??""}-label`),Te(w,"aria-errormessage",`${e.fieldId??""}-error`)}),th(w,()=>l(d),k=>G(d,k)),T(t,y),le(),i()}var Jee=j('<p><span role="none" class="preview svelte-16cruwo"><span role="none" class="color svelte-16cruwo"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>');const Zee={hash:"svelte-16cruwo",code:".preview.svelte-16cruwo {display:inline-flex;align-items:center;gap:8px;}.preview.svelte-16cruwo .color:where(.svelte-16cruwo) {display:block;width:24px;height:24px;border-radius:24px;}"};function Xee(t,e){ae(e,!0),xe(t,Zee);const n=_(()=>nt(e.fieldConfig.enableAlpha,!1)),r=u=>Number.parseInt(`0x${u}`,16),i=/^#(?<r>[0-9a-f]{2})(?<g>[0-9a-f]{2})(?<b>[0-9a-f]{2})(?<a>[0-9a-f]{2})?$/,o=_(()=>{const{r:u,g:d,b:f,a:h}=e.currentValue?.match(i)?.groups??{};return u?`rgb(${r(u)} ${r(d)} ${r(f)}${l(n)&&h?` / ${Math.round(r(h)/255*100)}%`:""})`:""});var s=X(),a=D(s);{var c=u=>{var d=Jee(),f=M(d),h=M(f);let p;var g=z(h,2),m=M(g),v=z(g,2),b=M(v);Z(y=>{p=Zi(h,"",p,y),ne(m,e.currentValue),ne(b,l(o))},[()=>({"background-color":e.currentValue})]),T(u,d)};H(a,u=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&u(c)})}T(t,s),le()}function Qee(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(tt,"$entryDraft",n),{valueStoreKey:o="currentValues"}=Yn("field-editor")??{};let s=R(e,"currentValue",15),a=R(e,"required",3,!0),c=R(e,"readonly",3,!1),u=R(e,"invalid",3,!1);const d=_(()=>nt(e.fieldConfig.value,"")),f=_(()=>i()?.isIndexFile??!1),h=_(()=>i()?.collectionName??""),p=_(()=>i()?.fileName),g=_(()=>Mn(i()?.[o][e.locale])??{}),m=_(()=>Sc(e.locale)),v=()=>{const[y]=e.keyPath.split(".").splice(-2,1);return y?.match(/^\d+$/)?Number(y):void 0},b=()=>{if(!Object.keys(l(g)).includes(e.keyPath))return;const y=l(d)==="{{index}}"?v()??"":l(d).replaceAll(/{{(.+?)}}/g,(w,S)=>{if(S==="index")return String(v()??"");if(!S.startsWith("fields."))return"";const C=Uc({collectionName:l(h),fileName:l(p),valueMap:l(g),keyPath:S.replace(/^fields\./,""),locale:e.locale,isIndexFile:l(f)});return Array.isArray(C)?l(m).format(C):String(C)});s()!==y&&s(y)};Re(()=>{l(g),Ce(()=>{b()})});{let y=_(()=>String(s()));Ln(t,{get value(){return l(y)},flex:!0,get readonly(){return c()},get required(){return a()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`}})}le(),r()}var ete=j('<p dir="auto"> </p>');function tte(t,e){var n=ete(),r=M(n);Z(()=>{Te(n,"lang",e.locale),ne(r,e.currentValue),n.dir=n.dir}),T(t,n)}var nte=j('<span role="none" class="utc svelte-13u8gbo">UTC</span>'),rte=j('<div role="none" class="svelte-13u8gbo"><input/> <!> <!> <!></div>');const ite={hash:"svelte-13u8gbo",code:"div.svelte-13u8gbo {display:flex;align-items:center;}.utc.svelte-13u8gbo {margin:0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function ote(t,e){ae(e,!0),xe(t,ite);const[n,r]=ve(),i=()=>q(ue,"$_",n);let o=R(e,"currentValue",15),s=R(e,"required",3,!0),a=R(e,"readonly",3,!1),c=R(e,"invalid",3,!1),u=oe("");const d=_(()=>Vs(e.fieldConfig)),f=_(()=>l(d).dateOnly),h=_(()=>l(d).timeOnly),p=_(()=>l(d).utc),g=()=>{const k=h3(o(),e.fieldConfig);k!==void 0&&k!==l(u)&&G(u,k,!0)},m=()=>{const k=PS(l(u),o(),e.fieldConfig);k!==void 0&&k!==o()&&Number(Ec(k,e.fieldConfig))!==Number(Ec(o(),e.fieldConfig))&&o(k)};Re(()=>{o(),Ce(()=>{g()})}),Re(()=>{l(u),Ce(()=>{m()})});var v=rte(),b=M(v),y=z(b,2);{var w=k=>{var x=nte();T(k,x)};H(y,k=>{l(p)&&k(w)})}var S=z(y,2);{var C=k=>{{let x=_(()=>i()(l(f)?"today":"now"));et(k,{variant:"tertiary",get label(){return l(x)},onclick:()=>{const A=IS(e.fieldConfig);G(u,l(p)?A.replace(/:00\.000Z$/,""):A,!0)}})}};H(S,k=>{a()||k(C)})}var E=z(S,2);{var $=k=>{{let x=_(()=>i()("clear")),A=_(()=>!o());et(k,{variant:"tertiary",get label(){return l(x)},get disabled(){return l(A)},onclick:()=>{o("")}})}};H(E,k=>{!a()&&!s()&&k($)})}Z(()=>{Te(b,"type",l(f)?"date":l(h)?"time":"datetime-local"),b.readOnly=a(),Te(b,"aria-readonly",a()),Te(b,"aria-required",s()),Te(b,"aria-invalid",c()),Te(b,"aria-labelledby",`${e.fieldId??""}-label`),Te(b,"aria-errormessage",`${e.fieldId??""}-error`)}),th(b,()=>l(u),k=>G(u,k)),T(t,v),le(),r()}var ste=j('<p dir="auto"> <!></p>');function ate(t,e){ae(e,!0);const n=_(()=>NS({locale:e.locale,fieldConfig:e.fieldConfig,currentValue:e.currentValue}));var r=X(),i=D(r);{var o=s=>{var a=ste(),c=M(a),u=z(c);{var d=f=>{var h=Oe("UTC");T(f,h)};H(u,f=>{e.fieldConfig.picker_utc&&f(d)})}Z(()=>{Te(a,"lang",e.locale),ne(c,`${l(n)??""} `),a.dir=a.dir}),T(s,a)};H(i,s=>{l(n)&&s(o)})}T(t,r),le()}var lte=j('<div role="none"><!></div>');const cte={hash:"svelte-4909d0",code:".wrapper.svelte-4909d0 {display:contents;}.wrapper.svelte-4909d0 .listbox {gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);}.wrapper.svelte-4909d0 .listbox .option button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;}.wrapper.svelte-4909d0 .listbox .option button:focus-visible {outline-color:transparent;}.wrapper.svelte-4909d0 .listbox .option button .preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain;}.wrapper.svelte-4909d0 .listbox .name {min-height:calc(var(--sui-font-size-default) * 2);white-space:normal;line-height:var(--sui-line-height-compact);}.wrapper.svelte-4909d0 .listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;}.wrapper.svelte-4909d0 .listbox.grid .option button {flex-direction:column;justify-content:flex-start;}.wrapper.svelte-4909d0 .listbox.grid .option button .preview {width:100%;height:auto;}.wrapper.svelte-4909d0 .listbox.grid .option button .name {flex:none;margin:4px 0 12px;padding:0 8px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);}.wrapper.svelte-4909d0 .listbox.grid button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}.wrapper.svelte-4909d0 :not(.wrapper.show-title) .listbox.grid .option .name {position:absolute;left:-99999px;}.wrapper.svelte-4909d0 .listbox.list .option button {gap:16px;}.wrapper.svelte-4909d0 .listbox.list .option button .preview {width:64px;}.wrapper.svelte-4909d0 .listbox.list .option button .name {flex:auto;padding-inline:0 8px;}.wrapper.svelte-4909d0 .listbox.list .option button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}"};function _N(t,e){ae(e,!0),xe(t,cte);const[n,r]=ve(),i=()=>q(ue,"$_",n);let o=R(e,"viewType",3,"grid"),s=R(e,"gridId",3,void 0),a=R(e,"showTitle",3,!1),c=R(e,"onChange",3,void 0),u=R(e,"children",3,void 0);var d=lte();let f;var h=M(d);{let p=_(()=>i()("assets_dialog.available_images"));Wc(h,{get id(){return s()},get class(){return o()},get"aria-label"(){return l(p)},onChange:g=>{c()?.(g.detail)},children:(g,m)=>{var v=X(),b=D(v);Fe(b,()=>u()??Me),T(g,v)},$$slots:{default:!0}})}Z(p=>f=rn(d,1,"wrapper svelte-4909d0",null,f,p),[()=>({"show-title":a()})]),T(t,d),le(),r()}var ute=j('<span role="alert"> </span>'),dte=j('<span role="alert"> </span>'),fte=j('<span role="alert"> </span>'),hte=j('<span role="none" class="name"> </span>'),pte=j("<!> <!>",1),gte=j('<div role="none" class="input-outer svelte-ws1n2e"><!></div>'),mte=j('<div role="none" class="input-outer svelte-ws1n2e"><!></div> <div role="none" class="input-outer svelte-ws1n2e"><!></div> <div role="none" class="input-outer svelte-ws1n2e"><!></div>',1),vte=j('<p role="alert" class="svelte-ws1n2e"><!> <!></p> <!> <!>',1),bte=j('<span role="alert"> </span>');const _te={hash:"svelte-ws1n2e",code:"p.svelte-ws1n2e {margin:0 0 8px;}.input-outer.svelte-ws1n2e {width:400px;max-width:100%;text-align:center;}"};function yte(t,e){ae(e,!0),xe(t,_te);const[n,r]=ve(),i=()=>q(ft,"$prefs",n),o=()=>q(ue,"$_",n),s=()=>q(rc,"$selectAssetsView",n),a=()=>q(on,"$isSmallScreen",n);let c=R(e,"kind",3,"image"),u=R(e,"searchTerms",3,""),d=R(e,"gridId",3,void 0),f=R(e,"onSelect",3,void 0);const h=_(()=>nt(e.serviceProps.serviceType,"stock_assets")),p=_(()=>nt(e.serviceProps.serviceId,"")),g=_(()=>nt(e.serviceProps.serviceLabel,"")),m=_(()=>nt(e.serviceProps.hotlinking,!1)),v=_(()=>nt(e.serviceProps.authType,"api_key")),b=_(()=>nt(e.serviceProps.developerURL,"")),y=_(()=>nt(e.serviceProps.apiKeyURL,"")),w=_(()=>e.serviceProps.apiKeyPattern),S=_(()=>e.serviceProps.init),C=_(()=>e.serviceProps.signIn),E=_(()=>e.serviceProps.search),$=Ft({userName:"",password:""});let k=oe(!0),x=oe(!1),A=oe(""),I=oe(""),P=oe(""),O=oe("initial"),L=oe(null),F=oe(void 0),U=0;const V=async(Y="")=>{G(L,null);try{G(L,await l(E)(Y,{kind:c(),apiKey:l(A),userName:l(I),password:l(P)}),!0)}catch(Q){G(F,"search_fetch_failed"),console.error(Q)}},W=async Y=>{const{downloadURL:Q,fileName:ie,credit:ee}=Y;if(l(m)){f()?.({url:Q,credit:ee});return}try{const te=await fetch(Q),{ok:re,status:ce}=te;if(!re)throw new Error(`The response returned with HTTP status ${ce}.`);const he=await te.blob(),pe=new File([he],ie,{type:he.type});f()?.({file:pe,credit:ee})}catch(te){G(F,"image_fetch_failed"),console.error(te)}};qt(()=>{(async()=>(typeof l(S)=="function"&&(G(k,!1),G(k,await l(S)(),!0)),l(k)&&(G(A,i().apiKeys?.[l(p)]??"",!0),(Y=>{var Q=Xo(Y,2);G(I,Q[0],!0),G(P,Q[1],!0)})((i().logins?.[l(p)]??"").split(" ")),G(x,!!l(A)||!!l(P),!0),G(L,null),l(x)&&V())))()}),Re(()=>{u(),window.clearTimeout(U),U=window.setTimeout(()=>{l(x)&&V(u())},1e3)});var J=X(),N=D(J);{var B=Y=>{var Q=X(),ie=D(Q);{var ee=re=>{pr(re,{children:(ce,he)=>{var pe=ute(),me=M(pe);Z(fe=>ne(me,fe),[()=>o()(`assets_dialog.error.${l(F)}`)]),T(ce,pe)},$$slots:{default:!0}})},te=re=>{var ce=X(),he=D(ce);{var pe=fe=>{pr(fe,{children:(ge,_e)=>{var be=dte(),Ne=M(be);Z($e=>ne(Ne,$e),[()=>o()("searching")]),T(ge,be)},$$slots:{default:!0}})},me=fe=>{var ge=X(),_e=D(ge);{var be=$e=>{pr($e,{children:(Ke,je)=>{var Ge=fte(),Ae=M(Ge);Z(Se=>ne(Ae,Se),[()=>o()("no_files_found")]),T(Ke,Ge)},$$slots:{default:!0}})},Ne=$e=>{{let Ke=_(()=>s()?.type);_N($e,{get gridId(){return d()},get viewType(){return l(Ke)},onChange:({value:je})=>{const Ge=l(L)?.find(({id:Ae})=>Ae===je);Ge&&W(Ge)},children:(je,Ge)=>{al(je,{get items(){return l(L)},itemKey:"id",renderItem:(Se,Ue=Me)=>{var Ie=X(),Ve=D(Ie);un(Ve,Lt,null,ye=>{const ke=_(()=>{const{id:Le,previewURL:Qe,description:Ze,kind:Ee}=Ue();return{id:Le,previewURL:Qe,description:Ze,_kind:Ee}});ur(ye,{label:"",get value(){return l(ke).id},checkIcon:Qe=>{},children:(Qe,Ze)=>{var Ee=pte(),ze=D(Ee);Vo(ze,{get kind(){return l(ke)._kind},get src(){return l(ke).previewURL},variant:"tile",crossorigin:"anonymous"});var Je=z(ze,2);{var dt=lt=>{var vt=hte(),zt=M(vt);Z(()=>ne(zt,l(ke).description)),T(lt,vt)};H(Je,lt=>{(!a()||s()?.type==="list")&<(dt)})}T(Qe,Ee)},$$slots:{checkIcon:!0,default:!0}})}),T(Se,Ie)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}};H(_e,$e=>{l(L).length?$e(Ne,!1):$e(be)},!0)}T(fe,ge)};H(he,fe=>{l(L)?fe(me,!1):fe(pe)},!0)}T(re,ce)};H(ie,re=>{l(F)?re(ee):re(te,!1)})}T(Y,Q)},K=Y=>{var Q=X(),ie=D(Q);{var ee=re=>{pr(re,{children:(ce,he)=>{var pe=vte(),me=D(pe),fe=M(me);{var ge=Ge=>{var Ae=X(),Se=D(Ae);cr(Se,()=>Ei.sanitize(o()("prefs.media.stock_photos.description",{values:{service:l(g),homeHref:`href="${l(b)}"`,apiKeyHref:`href="${l(y)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(Ge,Ae)};H(fe,Ge=>{l(h)==="stock_assets"&&Ge(ge)})}var _e=z(fe,2);{var be=Ge=>{var Ae=X(),Se=D(Ae);cr(Se,()=>Ei.sanitize(o()(`cloud_storage.auth.${l(O)}`,{values:{service:l(g)}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(Ge,Ae)};H(_e,Ge=>{l(h)==="cloud_storage"&&Ge(be)})}var Ne=z(me,2);{var $e=Ge=>{var Ae=gte(),Se=M(Ae);{let Ue=_(()=>o()("prefs.media.stock_photos.field_label",{values:{service:l(g)}}));Ln(Se,{flex:!0,spellcheck:"false",get"aria-label"(){return l(Ue)},oninput:Ie=>{const Ve=Ie.target.value.trim();l(w)?.test(Ve)&&(G(A,Ve,!0),G(x,!0),It(ft,Ce(i).apiKeys??={},Ce(i)),It(ft,Ce(i).apiKeys[l(p)]=l(A),Ce(i)),V())}})}T(Ge,Ae)};H(Ne,Ge=>{l(v)==="api_key"&&Ge($e)})}var Ke=z(Ne,2);{var je=Ge=>{var Ae=mte(),Se=D(Ae),Ue=M(Se);{let Le=_(()=>o()("user_name")),Qe=_(()=>l(O)==="requested");Ln(Ue,{flex:!0,spellcheck:"false",get"aria-label"(){return l(Le)},get disabled(){return l(Qe)},get value(){return $.userName},set value(Ze){$.userName=Ze}})}var Ie=z(Se,2),Ve=M(Ie);{let Le=_(()=>o()("password")),Qe=_(()=>l(O)==="requested");gJ(Ve,{get"aria-label"(){return l(Le)},get disabled(){return l(Qe)},get value(){return $.password},set value(Ze){$.password=Ze}})}var ye=z(Ie,2),ke=M(ye);{let Le=_(()=>o()("sign_in")),Qe=_(()=>!$.userName||!$.password||l(O)==="requested");et(ke,{variant:"secondary",get label(){return l(Le)},get disabled(){return l(Qe)},onclick:async()=>{G(O,"requested"),$.userName=$.userName.trim(),$.password=$.password.trim(),await l(C)?.($.userName,$.password)?(G(O,"success"),G(I,$.userName,!0),G(P,$.password,!0),G(x,!0),It(ft,Ce(i).logins??={},Ce(i)),It(ft,Ce(i).logins[l(p)]=[l(I),l(P)].join(" "),Ce(i)),V()):G(O,"error")}})}T(Ge,Ae)};H(Ke,Ge=>{l(v)==="password"&&Ge(je)})}T(ce,pe)},$$slots:{default:!0}})},te=re=>{pr(re,{children:(ce,he)=>{var pe=bte(),me=M(pe);Z(fe=>ne(me,fe),[()=>o()("cloud_storage.invalid")]),T(ce,pe)},$$slots:{default:!0}})};H(ie,re=>{l(k)?re(ee):re(te,!1)},!0)}T(Y,Q)};H(N,Y=>{l(x)?Y(B):Y(K,!1)})}T(t,J),le(),r()}const Cf=t=>(t=t.trim(),t?t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase():""),Cu=({value:t,terms:e})=>Cf(t).includes(e),yN=(t,e=Me)=>{var n=X(),r=D(n);cr(r,()=>Ei.sanitize(e().replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})),T(t,n)};var wte=j('<div role="none" class="unsaved svelte-gwpugb"> </div>'),xte=j('<strong class="svelte-gwpugb"><!></strong>'),kte=j("<!>/",1),Ste=j('<div role="none" class="unsaved svelte-gwpugb"> </div>'),Ete=j('<span role="none" class="name svelte-gwpugb"><!> <!></span>'),Tte=j("<!> <!> <!>",1),Cte=j('<div role="none" class="grid-wrapper svelte-gwpugb"><!></div>'),Ate=j('<span role="none"> </span>');const $te={hash:"svelte-gwpugb",code:".grid-wrapper.svelte-gwpugb {overflow-y:auto;height:100%;}.grid-wrapper.svelte-gwpugb [role=listbox] {background-color:transparent;}.grid-wrapper.svelte-gwpugb [role=listbox].grid [role=option] {position:relative;}.grid-wrapper.svelte-gwpugb [role=listbox].grid .unsaved {position:absolute;inset:4px 4px auto auto;z-index:1;}.grid-wrapper.svelte-gwpugb [role=listbox].list .name {display:flex;gap:8px;align-items:center;justify-content:space-between;}.unsaved.svelte-gwpugb {display:flex;justify-content:center;align-items:center;border-color:var(--sui-info-border-color);border-radius:4px;padding:2px 6px;color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);font-size:var(--sui-font-size-small);}.name.svelte-gwpugb {color:var(--sui-tertiary-foreground-color);}.name.svelte-gwpugb strong:where(.svelte-gwpugb) {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}"};function wN(t,e){ae(e,!0),xe(t,$te);const[n,r]=ve(),i=()=>q(ue,"$_",n),o=()=>q(on,"$isSmallScreen",n);let s=R(e,"assets",19,()=>[]),a=R(e,"selectedResource",15),c=R(e,"viewType",3,"grid"),u=R(e,"searchTerms",3,""),d=R(e,"basePath",3,void 0),f=R(e,"gridId",3,void 0),h=R(e,"checkerboard",3,!1),p=R(e,"onSelect",3,void 0);const g=_(()=>u()?s().filter(({name:w})=>Cf(w).includes(u())):s());var m=X(),v=D(m);{var b=w=>{var S=Cte(),C=M(S);_N(C,{get gridId(){return f()},get viewType(){return c()},showTitle:!0,onChange:({value:E})=>{const $=s().find(({path:k})=>k===E);a({asset:$}),p()?.({asset:$})},children:(E,$)=>{al(E,{get items(){return l(g)},itemKey:"path",renderItem:(x,A=Me)=>{var I=X(),P=D(I);un(P,Lt,null,O=>{const L=_(()=>{const{kind:V,name:W,path:J,unsaved:N,folder:B}=A();return{kind:V,name:W,path:J,unsaved:N,folder:B}}),F=_(()=>d()&&!l(L).folder.entryRelative?tn(l(L).path.replace(d(),"")):l(L).name),U=_(()=>l(F).split("/"));{const V=J=>{};let W=_(()=>pn(A(),a()?.asset));ur(O,{label:"",get value(){return l(L).path},get selected(){return l(W)},checkIcon:V,children:(J,N)=>{var B=Tte(),K=D(B);{var Y=te=>{var re=wte(),ce=M(re);Z(he=>ne(ce,he),[()=>i()("assets_dialog.unsaved")]),T(te,re)};H(K,te=>{c()==="grid"&&l(L).unsaved&&te(Y)})}var Q=z(K,2);Vo(Q,{get kind(){return l(L).kind},get asset(){return A()},variant:"tile",get checkerboard(){return h()}});var ie=z(Q,2);{var ee=te=>{var re=Ete(),ce=M(re);wr(ce,{lines:2,children:(me,fe)=>{var ge=X(),_e=D(ge);st(_e,17,()=>l(U),br,(be,Ne,$e)=>{var Ke=X(),je=D(Ke);{var Ge=Se=>{var Ue=xte(),Ie=M(Ue);yN(Ie,()=>l(Ne)),T(Se,Ue)},Ae=Se=>{var Ue=kte(),Ie=D(Ue);yN(Ie,()=>l(Ne)),T(Se,Ue)};H(je,Se=>{$e===l(U).length-1?Se(Ge):Se(Ae,!1)})}T(be,Ke)}),T(me,ge)},$$slots:{default:!0}});var he=z(ce,2);{var pe=me=>{var fe=Ste(),ge=M(fe);Z(_e=>ne(ge,_e),[()=>i()("assets_dialog.unsaved")]),T(me,fe)};H(he,me=>{c()==="list"&&l(L).unsaved&&me(pe)})}T(te,re)};H(ie,te=>{(!o()||c()==="list")&&te(ee)})}T(J,B)},$$slots:{checkIcon:!0,default:!0}})}}),T(x,I)},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),T(w,S)},y=w=>{pr(w,{children:(S,C)=>{var E=Ate(),$=M(E);Z(k=>ne($,k),[()=>i()("no_files_found")]),T(S,E)},$$slots:{default:!0}})};H(v,w=>{l(g).length?w(b):w(y,!1)})}T(t,m),le(),r()}function Ite(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(rc,"$selectAssetsView",n);let o=R(e,"accept",3,void 0),s=R(e,"assets",19,()=>[]),a=R(e,"selectedResource",15),c=R(e,"searchTerms",3,""),u=R(e,"basePath",3,void 0),d=oe(void 0);Re(()=>{a()||Ce(()=>{l(d)?.reset()})}),bt(kf(t,{get accept(){return o()},get onDrop(){return e.onDrop},children:(f,h)=>{{let p=_(()=>i()?.type);wN(f,{get assets(){return s()},get viewType(){return l(p)},get searchTerms(){return c()},get basePath(){return u()},gridId:"select-assets-grid",checkerboard:!0,get selectedResource(){return a()},set selectedResource(g){a(g)}})}},$$slots:{default:!0}}),f=>G(d,f,!0),()=>l(d)),le(),r()}const lm={},Pte=["en-US","pt-BR","es-ES","ca-ES","de-DE","it-IT","fr-FR","sv-SE","id-ID","pl-PL","ja-JP","zh-TW","zh-CN","ko-KR","th-TH","nl-NL","hu-HU","vi-VN","cs-CZ","da-DK","fi-FI","uk-UA","el-GR","ro-RO","nb-NO","sk-SK","tr-TR","ru-RU"],xN="https://api.pexels.com/v1",Nte={serviceType:"stock_assets",serviceId:"pexels",serviceLabel:"Pexels",serviceURL:"https://www.pexels.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://www.pexels.com/api/",apiKeyURL:"https://www.pexels.com/api/new/",apiKeyPattern:/^[a-zA-Z\d]{56}$/,search:async(t,{apiKey:e})=>{const n={Authorization:e},[r]=se(Wt).toLowerCase().split("-");let i=[];if(t)for(let o=1;o<=2;o+=1){const s=new URLSearchParams({query:t,locale:Pte.find(d=>d.split("-")[0]===r)||"en-US",page:o,per_page:80}),a=await fetch(`${xN}/search?${s.toString()}`,{headers:n});if(!a.ok)return Promise.reject();const{photos:c,next_page:u}=await a.json();if(i.push(...c),!u)break;await Lt(50)}else{const o=new URLSearchParams({per_page:80}),s=await fetch(`${xN}/curated?${o.toString()}`,{headers:n});if(!s.ok)return Promise.reject();i=(await s.json()).photos}return i.map(({id:o,url:s,alt:a,src:{large2x:c,medium:u},photographer:d})=>({id:String(o),description:s.match(/\/photo\/(?<alt>.+?)-\d+\/$/)?.groups?.alt.replace(/-/g," ")??a,previewURL:u,downloadURL:c,fileName:`pexels-${d.split(/\s+/).join("-").toLowerCase()}-${o}.jpg`,kind:"image",credit:`<a href="${s}">Photo by ${d} on Pexels</a>`}))}},Lte=["cs","da","de","en","es","fr","id","it","hu","nl","no","pl","pt","ro","sk","fi","sv","tr","vi","th","bg","ru","el","ja","ko","zh"],Ote="https://pixabay.com/api",Rte={serviceType:"stock_assets",serviceId:"pixabay",serviceLabel:"Pixabay",serviceURL:"https://pixabay.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://pixabay.com/service/about/api/",apiKeyURL:"https://pixabay.com/api/docs/#api_key",apiKeyPattern:/^\d+-[a-f\d]{25}$/,search:async(t,{apiKey:e})=>{const[n]=se(Wt).toLowerCase().split("-"),r=new URLSearchParams({key:e,q:t,lang:Lte.includes(n)?n:"en",image_type:"photo",min_width:1280,editors_choice:!t,safesearch:!0,per_page:150}),i=await fetch(`${Ote}/?${r.toString()}`);return i.ok?(await i.json()).hits.map(({id:s,webformatURL:a,previewURL:c,largeImageURL:u,imageWidth:d,imageHeight:f,pageURL:h,tags:p,user:g})=>({id:String(s),description:p,previewURL:a.replace("_640.",d>f?"_180.":"_340."),downloadURL:u,fileName:c.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${h}">Photo by ${g} on Pixabay`})):Promise.reject()}},Fte=["af","sq","am","ar","hy","as","az","bn","ba","eu","bs","bg","yue","ca","lzh","zh-Hans","zh-Hant","hr","cs","da","prs","dv","nl","en","et","fo","fj","fil","fi","fr","fr-ca","gl","ka","de","el","gu","ht","he","hi","mww","hu","is","id","ikt","iu","iu-Latn","ga","it","ja","kn","kk","km","ko","ku","kmr","ky","lo","lv","lt","mk","mg","ms","ml","mt","mi","mr","mn-Cyrl","mn-Mong","my","ne","nb","or","ps","fa","pl","pt","pt-pt","pa","otq","ro","ru","sm","sr-Cyrl","sr-Latn","sk","sl","so","es","sw","sv","ty","ta","tt","te","th","bo","ti","to","tr","tk","uk","hsb","ur","ug","uz","vi","cy","yua","zu"],kN="https://api.unsplash.com",SN="utm_source=sveltia-cms&utm_medium=referral",cm={pexels:Nte,pixabay:Rte,unsplash:{serviceType:"stock_assets",serviceId:"unsplash",serviceLabel:"Unsplash",serviceURL:"https://unsplash.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://unsplash.com/developers",apiKeyURL:"https://unsplash.com/oauth/applications",apiKeyPattern:/^[a-zA-Z\d-]{40,}$/,search:async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},[r]=se(Wt).toLowerCase().split("-");let i=[];if(t)for(let o=1;o<=5;o+=1){const s=new URLSearchParams({query:t,lang:Fte.includes(r)?r:"en",page:o,per_page:30}),a=await fetch(`${kN}/search/photos?${s.toString()}`,{headers:n});if(!a.ok)return Promise.reject();const{results:c,total_pages:u}=await a.json();if(i.push(...c),u===o)break;await Lt(50)}else{const o=new URLSearchParams({per_page:30}),s=await fetch(`${kN}/photos?${o.toString()}`,{headers:n});if(!s.ok)return Promise.reject();i=await s.json()}return i.map(({id:o,description:s,alt_description:a,urls:{regular:c,thumb:u},user:{username:d,name:f}})=>({id:String(o),description:[s,a].filter(Boolean).join(" — "),previewURL:u,downloadURL:c,fileName:`${f.split(/\s+/).join("-").toLowerCase()}-${o}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${d}?${SN}">${f}</a> on <a href="https://unsplash.com/?${SN}">Unsplash</a>`}))}}},EN=({fieldConfig:t}={})=>{const e=TC({libraryName:"stock_assets",fieldConfig:t}),n=Object.keys(cm),{providers:r}=e;return{providers:Array.isArray(r)?r:n}};var Dte=j("<!> <!>",1),Mte=j("<!> <!>",1),zte=j("<a> </a>"),Ute=j("<!> <!>",1),jte=j("<!> <!> <!>",1),Bte=j('<div role="none" class="filter-tools svelte-1fnz5w0"><!></div>'),qte=j('<div role="none"> </div> <!>',1),Hte=j('<div role="none" class="wrapper svelte-1fnz5w0"><div role="none" class="nav svelte-1fnz5w0"><!> <!></div> <div role="none" class="content-pane svelte-1fnz5w0"><!> <!> <!></div></div>'),Gte=j("<!> <!>",1);const Kte={hash:"svelte-1fnz5w0",code:`.wrapper.svelte-1fnz5w0 {display:flex;gap:16px;height:60dvh;}
|
|
620
|
+
${JSON.stringify(t)}`,dee="anthropic",fee="Anthropic Claude",hee="Anthropic API",pee="https://docs.anthropic.com/en/api/overview",gee="https://console.anthropic.com/settings/keys",mee=/sk-ant-api03-[a-zA-Z0-9-_]{80,}/,vee=["af,ar,be,bg,bn,bs,ca,cs,cy,da,de,el,en,eo,es,et,eu,fa,fi,fr,ga,gl,gu,he,hi,hr,hu,hy,id,is,it,ja","ka,kk,km,kn,ko,ky,la,lt,lv,mk,ml,mn,mr,ms,mt,my,ne,nl,no,pl,pt,ro,ru,si,sk,sl,sq,sr,sv,sw,ta,te","th,tl,tr,uk,ur,uz,vi,zh"].join(",").split(","),im=t=>{const[e]=t.toLowerCase().split(/[-_]/);if(vee.includes(e))return e},bee={serviceId:dee,serviceLabel:fee,apiLabel:hee,developerURL:pee,apiKeyURL:gee,apiKeyPattern:mee,markdownSupported:!0,getSourceLanguage:im,getTargetLanguage:im,translate:async(t,{sourceLocale:e,targetLocale:n,apiKey:r})=>{const i=im(e),o=im(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const s="https://api.anthropic.com/v1/messages",a=dN(i,o),c=fN(t),u={model:"claude-3-5-haiku-latest",max_tokens:4e3,temperature:.3,system:a,messages:[{role:"user",content:c}]};try{const d=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true"},body:JSON.stringify(u)});if(!d.ok){const m=await d.json().catch(()=>({}));throw new Error(`Anthropic API error: ${d.status} ${d.statusText}${m.error?.message?` - ${m.error.message}`:""}`)}const f=await d.json();if(!f.content||!Array.isArray(f.content)||!f.content[0])throw new Error("Invalid response format from Anthropic API.");const h=f.content[0].text.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from Anthropic API.")}if(!p||!Array.isArray(p.translations))throw new Error("Invalid JSON structure in Anthropic API response.");const{translations:g}=p;if(g.length!==t.length){const m=t.length,v=g.length;throw new Error(`Translation count mismatch: expected ${m}, got ${v}`)}return g}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with Anthropic API.")}}},_ee="google",yee="Google Cloud Translation",wee="Cloud Translation API",xee="https://console.cloud.google.com/apis/library/translate.googleapis.com",kee="https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials",See=/AIza[0-9A-Za-z-_]{35}/,hN=["ab,ace,ach,af,ak,alz,am,ar,as,awa,ay,az","ba,ban,bbc,be,bem,bew,bg,bho,bik,bm,bn,br,bs,bts,btx,bua","ca,ceb,cgg,chm,ckb,cnh,co,crh,crs,cs,cv,cy","da,de,din,doi,dov,dv,dz","ee,el,en,eo,es,et,eu","fa,ff,fi,fil,fj,fr,fr-CA,fr-FR,fy","ga,gaa,gd,gl,gn,gom,gu","ha,haw,he,hi,hil,hmn,hr,hrx,ht,hu,hy","id,ig,ilo,is,it,iw","ja,jv,jw","ka,kk,km,kn,ko,kri,ktu,ku,ky","la,lb,lg,li,lij,lmo,ln,lo,lt,ltg,luo,lus,lv","mai,mak,mg,mi,min,mk,ml,mn,mni-Mtei,mr,ms,ms-Arab,mt,my","ne,new,nl,no,nr,nso,nus,ny","oc,om,or","pa,pa-Arab,pag,pam,pap,pl,ps,pt,pt-BR,pt-PT","qu","rn,ro,rom,ru,rw","sa,scn,sd,sg,shn,si,sk,sl,sm,sn,so,sq,sr,ss,st,su,sv,sw,szl","ta,te,tet,tg,th,ti,tk,tl,tn,tr,ts,tt","ug,uk,ur,uz","vi","xh","yi,yo,yua,yue","zh,zh-CN,zh-TW,zu"].join(",").split(","),om=t=>{const e=t.replace(/^([a-z]{2,3})[-_]([a-z]{2,4})$/i,(r,i,o)=>`${i.toLowerCase()}-${o.toUpperCase()}`);if(hN.includes(e))return e;const[n]=e.split("-");if(hN.includes(n))return n},pN={serviceId:_ee,serviceLabel:yee,apiLabel:wee,developerURL:xee,apiKeyURL:kee,apiKeyPattern:See,markdownSupported:!1,getSourceLanguage:om,getTargetLanguage:om,translate:async(t,{sourceLocale:e,targetLocale:n,apiKey:r})=>{const i=om(e),o=om(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const s="https://translation.googleapis.com/language/translate/v2",a={q:t,source:i,target:o,format:"html"};try{const c=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json","X-goog-api-key":r},body:JSON.stringify(a)});if(!c.ok){const d=await c.json().catch(()=>({}));throw new Error(`Google Translate API error: ${c.status} ${c.statusText}${d.error?.message?` - ${d.error.message}`:""}`)}const{data:u}=await c.json();return u.translations.map(d=>d.translatedText)}catch(c){throw c instanceof Error?c:new Error("Failed to translate text with Google Translate API.")}}},Eee="openai",Tee="OpenAI GPT",Cee="OpenAI API",Aee="https://platform.openai.com/docs/overview",$ee="https://platform.openai.com/api-keys",Iee=/sk-[a-zA-Z0-9-_]{40,}/,Pee=["af,ar,be,bg,bn,bs,ca,cs,cy,da,de,el,en,eo,es,et,eu,fa,fi,fr,ga,gl,gu,he,hi,hr,hu,hy,id,is,it,ja","ka,kk,km,kn,ko,ky,la,lt,lv,mk,ml,mn,mr,ms,mt,my,ne,nl,no,pl,pt,ro,ru,si,sk,sl,sq,sr,sv,sw,ta,te","th,tl,tr,uk,ur,uz,vi,zh"].join(",").split(","),sm=t=>{const[e]=t.toLowerCase().split(/[-_]/);if(Pee.includes(e))return e},x0={google:pN,anthropic:bee,openai:{serviceId:Eee,serviceLabel:Tee,apiLabel:Cee,developerURL:Aee,apiKeyURL:$ee,apiKeyPattern:Iee,markdownSupported:!0,getSourceLanguage:sm,getTargetLanguage:sm,translate:async(t,{sourceLocale:e,targetLocale:n,apiKey:r})=>{const i=sm(e),o=sm(n);if(!i)throw new Error("Source locale is not supported.");if(!o)throw new Error("Target locale is not supported.");const s="https://api.openai.com/v1/chat/completions",a=dN(i,o),c=fN(t),u={model:"gpt-4o-mini",messages:[{role:"system",content:a},{role:"user",content:c}],temperature:.3,max_tokens:4e3,response_format:{type:"json_object"}};try{const d=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify(u)});if(!d.ok){const m=await d.json().catch(()=>({}));throw new Error(`OpenAI API error: ${d.status} ${d.statusText}${m.error?.message?` - ${m.error.message}`:""}`)}const f=await d.json();if(!f.choices||!f.choices[0]||!f.choices[0].message)throw new Error("Invalid response format from OpenAI API.");const h=f.choices[0].message.content.trim();let p;try{p=JSON.parse(h)}catch{throw new Error("Failed to parse JSON response from OpenAI API.")}if(!p||!Array.isArray(p.translations))throw new Error("Invalid JSON structure in OpenAI API response.");const{translations:g}=p;if(g.length!==t.length){const m=t.length,v=g.length;throw new Error(`Translation count mismatch: expected ${m}, got ${v}`)}return g}catch(d){throw d instanceof Error?d:new Error("Failed to translate text with OpenAI API.")}}}},am=en([ft],([t])=>{const{defaultTranslationService:e="google"}=t;return x0[e]??pN}),gN=new rm({headingStyle:"atx",bulletListMarker:"-",codeBlockStyle:"fenced"});gN.keep(["span","div"]);const Nee=({draft:t,options:e})=>{const{collectionName:n,fileName:r,currentValues:i,isIndexFile:o}=t,{sourceLocale:s,targetLocale:a,keyPath:c="",translate:u=!1}=e,d=i[s],f={collectionName:n,fileName:r,valueMap:d,isIndexFile:o};return Object.fromEntries(Object.entries(d).map(([h,p])=>{const g=i[a][h],m=mn({...f,keyPath:h}),v=m?.widget??"string";return c&&!h.startsWith(c)||typeof p!="string"||!p||!["markdown","text","string","list"].includes(v)||v==="list"&&(m.field??m.fields)||!u&&p===g||!c&&u&&g?null:[h,{value:p,isMarkdown:v==="markdown"}]}).filter(h=>!!h))},Tf=(t,e,{count:n,sourceLocale:r})=>{ov.set({id:Date.now(),show:!0,status:t,message:e,count:n,sourceLocale:r})},Lee=async({currentValues:t,options:e,copingFieldMap:n})=>{const{serviceId:r,markdownSupported:i,translate:o}=se(am),{sourceLocale:s,targetLocale:a}=e,c=Object.keys(n).length,u=c===1?"one":"many",d=se(ft).apiKeys?.[r]||await new Promise(f=>{Hu.set({show:!0,multiple:c>1,resolve:f})});if(d){Tf("info","translation.started",{count:c,sourceLocale:s});try{const f=await o(Object.entries(n).map(([,{value:h,isMarkdown:p}])=>p&&!i?Et.parse(h):h),{apiKey:d,sourceLocale:s,targetLocale:a});Object.entries(n).forEach(([h,{isMarkdown:p}],g)=>{const m=f[g];t[a][h]=p&&!i?gN.turndown(m):m}),Tf("success",`translation.complete.${u}`,{count:c,sourceLocale:s})}catch(f){Tf("error","translation.error",{count:c,sourceLocale:s}),console.error(f)}}},Oee=({currentValues:t,options:e,copingFieldMap:n})=>{const{sourceLocale:r,targetLocale:i}=e,o=Object.keys(n).length,s=o===1?"one":"many";Object.entries(n).forEach(([a,{value:c}])=>{t[i][a]=c}),Tf("success",`copy.complete.${s}`,{count:o,sourceLocale:r})},mN=async t=>{const{sourceLocale:e,translate:n=!1}=t,r=se(tt),{currentValues:i}=r,o=Nee({draft:r,options:t}),s=Object.keys(o).length;if(!s){Tf("info",`${n?"translation":"copy"}.none`,{count:s,sourceLocale:e});return}n?await Lee({currentValues:i,options:t,copingFieldMap:o}):Oee({currentValues:i,options:t,copingFieldMap:o}),tt.update(a=>({...a,currentValues:i}))};function k0(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(am,"$translator",n),o=()=>q(ue,"$_",n),s=()=>q(tt,"$entryDraft",n);let a=R(e,"keyPath",3,""),c=R(e,"translate",3,!1);const u=_(()=>i().getSourceLanguage),d=_(()=>i().getTargetLanguage);var f=X(),h=D(f);st(h,17,()=>e.otherLocales,br,(p,g)=>{{let m=_(()=>o()(c()?"translate_from_x":"copy_from_x",{values:{locale:Ui(l(g))}})),v=_(()=>!s()?.currentLocales[e.locale]||!s().currentLocales[l(g)]||a()&&!Mn(s().currentValues[l(g)])[a()]||!c()&&a()&&Mn(s().currentValues[l(g)])[a()]===Mn(s().currentValues[e.locale])[a()]||c()&&(!l(u)(e.locale)||!l(d)(l(g))));gt(p,{get label(){return l(m)},get disabled(){return l(v)},onclick:()=>{mN({sourceLocale:l(g),targetLocale:e.locale,keyPath:a(),translate:c()})}})}}),T(t,f),le(),r()}var Ree=j("<section><!></section>");const Fee={hash:"svelte-thyinu",code:"section.svelte-thyinu {padding:var(--field-editor-padding);}section.svelte-thyinu:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}section.svelte-thyinu > * {margin-inline:auto !important;max-width:768px;}section.svelte-thyinu > header {display:flex;align-items:center;margin:0 -8px 8px;height:var(--sui-button-small-height);}section.svelte-thyinu > header h4 {margin-inline:8px 0;font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}section.svelte-thyinu > header .required {margin:2px 0 0 2px;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}"};function vN(t,e){xe(t,Fee);let n=R(e,"children",3,void 0),r=ot(e,["$$slots","$$events","$$legacy","children"]);var i=Ree();pt(i,()=>({role:"group",class:"field",...r}),void 0,void 0,"svelte-thyinu");var o=M(i);Fe(o,()=>n()??Me),T(t,i)}function bN(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(am,"$translator",n),o=()=>q(tt,"$entryDraft",n),s=()=>q(ue,"$_",n);let a=R(e,"size",3,"medium"),c=R(e,"keyPath",3,"");const u=_(()=>i()??{}),d=_(()=>l(u).getSourceLanguage),f=_(()=>l(u).getTargetLanguage),h=_(()=>!o()?.currentLocales[e.locale]||!l(d)(e.locale));var p=X(),g=D(p);{var m=b=>{const y=_(()=>{const[S]=e.otherLocales;return{otherLocale:S}}),w=_(()=>s()("translate_from_x",{values:{locale:Ui(l(y).otherLocale)}}));{const S=E=>{Xe(E,{name:"translate"})};let C=_(()=>l(h)||!o()?.currentLocales[l(y).otherLocale]||!l(f)(l(y).otherLocale));et(b,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(w)},get title(){return l(w)},get disabled(){return l(C)},onclick:()=>{mN({sourceLocale:l(y).otherLocale,targetLocale:e.locale,keyPath:c(),translate:!0})},startIcon:S,$$slots:{startIcon:!0}})}},v=b=>{{const y=C=>{Xe(C,{name:"translate"})},w=C=>{{let E=_(()=>s()("translation_options"));ir(C,{get"aria-label"(){return l(E)},children:($,k)=>{k0($,{get locale(){return e.locale},get otherLocales(){return e.otherLocales},get keyPath(){return c()},translate:!0})},$$slots:{default:!0}})}};let S=_(()=>s()("translate"));Lr(b,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(S)},get disabled(){return l(h)},endIcon:y,popup:w,$$slots:{endIcon:!0,popup:!0}})}};H(g,b=>{e.otherLocales.length===1?b(m):b(v,!1)})}T(t,p),le(),r()}var Dee=j('<div role="alert" class="validation svelte-1rv50nx" aria-live="polite"><div role="none" class="svelte-1rv50nx"><!> <!></div></div>');const Mee={hash:"svelte-1rv50nx",code:".validation.svelte-1rv50nx {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) {display:flex;align-items:center;gap:4px;margin:4px 0;}.validation.svelte-1rv50nx div:where(.svelte-1rv50nx) .icon {flex:none;font-size:16px; /* !hardcoded */}"};function S0(t,e){xe(t,Mee);var n=Dee(),r=M(n),i=M(r);Xe(i,{name:"error"});var o=z(i,2);Fe(o,()=>e.children),Z(()=>Te(n,"id",e.id)),T(t,n)}function zee(t,e){ae(e,!0);let n=R(e,"currentValue",15),r=R(e,"required",3,!0),i=R(e,"readonly",3,!1),o=R(e,"invalid",3,!1);ty(t,{get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get checked(){return n()},set checked(s){n(s)}}),le()}var Uee=j("<p> </p>");function jee(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(ue,"$_",n);let o=R(e,"currentValue",3,!1);var s=X(),a=D(s);{var c=u=>{var d=Uee(),f=M(d);Z(h=>ne(f,h),[()=>i()(`boolean.${o()}`)]),T(u,d)};H(a,u=>{typeof o()=="boolean"&&u(c)})}T(t,s),le(),r()}function Bee(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(tt,"$entryDraft",n),{valueStoreKey:o="currentValues"}=Yn("field-editor")??{};let s=R(e,"currentValue",15),a=R(e,"required",3,!0),c=R(e,"readonly",3,!1),u=R(e,"invalid",3,!1),d=oe(""),f=oe("");const h=_(()=>nt(e.fieldConfig.default_language,"")),p=_(()=>nt(e.fieldConfig.allow_language_selection,!0)),g=_(()=>nt(e.fieldConfig.output_code_only,!1)),m=_(()=>nt(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),v=_(()=>Mn(i()?.[o][e.locale])??{}),b=_(()=>`${e.keyPath}.${l(m).code}`),y=_(()=>`${e.keyPath}.${l(m).lang}`),w=()=>{if(l(g))typeof s()!="string"?G(d,""):l(d)!==s()&&G(d,s(),!0);else{const $=l(v)[l(b)],k=l(v)[l(y)]||l(h);typeof $!="string"?G(d,""):l(d)!==$&&G(d,$,!0),typeof k!="string"?G(f,""):l(f)!==k&&G(f,k,!0)}},S=()=>{l(g)?s()!==l(d)&&s(l(d)):i()&&(s({}),l(v)[l(b)]!==l(d)&&It(tt,Ce(i)[o][e.locale][l(b)]=l(d),Ce(i)),l(v)[l(y)]!==l(f)&&It(tt,Ce(i)[o][e.locale][l(y)]=l(f),Ce(i)))};Re(()=>{l(v),Ce(()=>{w()})}),Re(()=>{l(d),l(f),Ce(()=>{S()})});var C=X(),E=D(C);un(E,Lt,null,$=>{var k=X(),x=D(k);Jn(x,()=>JSON.stringify(e.fieldConfig),A=>{qY(A,{get showLanguageSwitcher(){return l(p)},flex:!0,get readonly(){return c()},get required(){return a()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get code(){return l(d)},set code(I){G(d,I,!0)},get lang(){return l(f)},set lang(I){G(f,I,!0)}})}),T($,k)}),T(t,C),le(),r()}var qee=j("<pre> </pre>");function Hee(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(tt,"$entryDraft",n),o=_(()=>nt(e.fieldConfig.default_language,"")),s=_(()=>nt(e.fieldConfig.output_code_only,!1)),a=_(()=>nt(e.fieldConfig.keys,()=>({code:"code",lang:"lang"}),!0)),c=_(()=>Mn(i()?.currentValues[e.locale])??{}),u=_(()=>`${e.keyPath}.${l(a).code}`),d=_(()=>`${e.keyPath}.${l(a).lang}`),f=_(()=>l(s)?e.currentValue:l(c)[l(u)]),h=_(()=>l(s)?l(o):l(c)[l(d)]);var p=X(),g=D(p);{var m=v=>{var b=qee(),y=M(b);Z(()=>{rn(b,1,y1(l(h)?`language-${l(h)}`:void 0)),ne(y,l(f))}),T(v,b)};H(g,v=>{l(f)&&v(m)})}T(t,p),le(),r()}var Gee=j(" <!>",1),Kee=j('<span role="none" class="value svelte-s59zhj"><!> <!></span>'),Vee=j('<div role="none" class="svelte-s59zhj"><input type="color" class="svelte-s59zhj"/> <!> <!></div>');const Wee={hash:"svelte-s59zhj",code:"div.svelte-s59zhj {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) {display:flex;align-items:center;gap:8px;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.text-input {width:80px;min-width:0;}div.svelte-s59zhj .value:where(.svelte-s59zhj) .sui.slider {padding:8px;--sui-slider-base-width: 80px;}input.svelte-s59zhj {font-family:var(--sui-textbox-font-family);}"};function Yee(t,e){const n=zn();ae(e,!0),xe(t,Wee);const[r,i]=ve(),o=()=>q(ue,"$_",r);let s=R(e,"currentValue",15),a=R(e,"required",3,!0),c=R(e,"readonly",3,!1),u=R(e,"invalid",3,!1),d=oe(""),f=oe(255);const h=_(()=>nt(e.fieldConfig.allowInput,!1)),p=_(()=>nt(e.fieldConfig.enableAlpha,!1)),g=/^#[0-9a-f]{6}$/,m=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/,v=()=>{if(typeof s()!="string")return;const{rgb:k,a:x="ff"}=s().match(m)?.groups??{};if(k&&l(d)!==k&&G(d,k,!0),k&&l(p)){const A=Number.parseInt(`0x${x}`,16);l(f)!==A&&G(f,A,!0)}},b=()=>{let k=g.test(l(d))?l(d):"";k&&l(p)&&(k+=l(f).toString(16).padStart(2,"0")),s()!==k&&s(k)};Re(()=>{s(),Ce(()=>{v()})}),Re(()=>{l(d),l(f),Ce(()=>{b()})});var y=Vee(),w=M(y),S=z(w,2);{var C=k=>{var x=Kee(),A=M(x);{var I=L=>{Ln(L,{get id(){return`${n}-input`},get invalid(){return u()},get readonly(){return c()},get required(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(d)},set value(F){G(d,F,!0)}})};H(A,L=>{l(h)&&L(I)})}var P=z(A,2);{var O=L=>{var F=Gee(),U=D(F),V=z(U);{let W=_(()=>!l(d)),J=_(()=>o()("opacity"));O9(V,{min:0,max:255,get disabled(){return l(W)},get"aria-label"(){return l(J)},get value(){return l(f)},set value(N){G(f,N,!0)}})}Z(W=>ne(U,`${W??""} `),[()=>o()("opacity")]),T(L,F)};H(P,L=>{l(p)&&L(O)})}T(k,x)};H(S,k=>{(l(h)||l(p))&&k(C)})}var E=z(S,2);{var $=k=>{{let x=_(()=>o()("clear")),A=_(()=>!l(d)),I=_(()=>`${n}-picker ${l(h)?`${n}-input`:""}`);et(k,{variant:"tertiary",get label(){return l(x)},get disabled(){return l(A)},get"aria-controls"(){return l(I)},onclick:()=>{G(d,""),G(f,255)}})}};H(E,k=>{!c()&&!a()&&k($)})}Z(()=>{Te(w,"id",`${n}-picker`),w.readOnly=c(),Te(w,"aria-invalid",u()),Te(w,"aria-readonly",c()),Te(w,"aria-required",a()),Te(w,"aria-labelledby",`${e.fieldId??""}-label`),Te(w,"aria-errormessage",`${e.fieldId??""}-error`)}),th(w,()=>l(d),k=>G(d,k)),T(t,y),le(),i()}var Jee=j('<p><span role="none" class="preview svelte-16cruwo"><span role="none" class="color svelte-16cruwo"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>');const Zee={hash:"svelte-16cruwo",code:".preview.svelte-16cruwo {display:inline-flex;align-items:center;gap:8px;}.preview.svelte-16cruwo .color:where(.svelte-16cruwo) {display:block;width:24px;height:24px;border-radius:24px;}"};function Xee(t,e){ae(e,!0),xe(t,Zee);const n=_(()=>nt(e.fieldConfig.enableAlpha,!1)),r=u=>Number.parseInt(`0x${u}`,16),i=/^#(?<r>[0-9a-f]{2})(?<g>[0-9a-f]{2})(?<b>[0-9a-f]{2})(?<a>[0-9a-f]{2})?$/,o=_(()=>{const{r:u,g:d,b:f,a:h}=e.currentValue?.match(i)?.groups??{};return u?`rgb(${r(u)} ${r(d)} ${r(f)}${l(n)&&h?` / ${Math.round(r(h)/255*100)}%`:""})`:""});var s=X(),a=D(s);{var c=u=>{var d=Jee(),f=M(d),h=M(f);let p;var g=z(h,2),m=M(g),v=z(g,2),b=M(v);Z(y=>{p=Zi(h,"",p,y),ne(m,e.currentValue),ne(b,l(o))},[()=>({"background-color":e.currentValue})]),T(u,d)};H(a,u=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&u(c)})}T(t,s),le()}function Qee(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(tt,"$entryDraft",n),{valueStoreKey:o="currentValues"}=Yn("field-editor")??{};let s=R(e,"currentValue",15),a=R(e,"required",3,!0),c=R(e,"readonly",3,!1),u=R(e,"invalid",3,!1);const d=_(()=>nt(e.fieldConfig.value,"")),f=_(()=>i()?.isIndexFile??!1),h=_(()=>i()?.collectionName??""),p=_(()=>i()?.fileName),g=_(()=>Mn(i()?.[o][e.locale])??{}),m=_(()=>Sc(e.locale)),v=()=>{const[y]=e.keyPath.split(".").splice(-2,1);return y?.match(/^\d+$/)?Number(y):void 0},b=()=>{if(!Object.keys(l(g)).includes(e.keyPath))return;const y=l(d)==="{{index}}"?v()??"":l(d).replaceAll(/{{(.+?)}}/g,(w,S)=>{if(S==="index")return String(v()??"");if(!S.startsWith("fields."))return"";const C=Uc({collectionName:l(h),fileName:l(p),valueMap:l(g),keyPath:S.replace(/^fields\./,""),locale:e.locale,isIndexFile:l(f)});return Array.isArray(C)?l(m).format(C):String(C)});s()!==y&&s(y)};Re(()=>{l(g),Ce(()=>{b()})});{let y=_(()=>String(s()));Ln(t,{get value(){return l(y)},flex:!0,get readonly(){return c()},get required(){return a()},get invalid(){return u()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`}})}le(),r()}var ete=j('<p dir="auto"> </p>');function tte(t,e){var n=ete(),r=M(n);Z(()=>{Te(n,"lang",e.locale),ne(r,e.currentValue),n.dir=n.dir}),T(t,n)}var nte=j('<span role="none" class="utc svelte-13u8gbo">UTC</span>'),rte=j('<div role="none" class="svelte-13u8gbo"><input/> <!> <!> <!></div>');const ite={hash:"svelte-13u8gbo",code:"div.svelte-13u8gbo {display:flex;align-items:center;}.utc.svelte-13u8gbo {margin:0 8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}"};function ote(t,e){ae(e,!0),xe(t,ite);const[n,r]=ve(),i=()=>q(ue,"$_",n);let o=R(e,"currentValue",15),s=R(e,"required",3,!0),a=R(e,"readonly",3,!1),c=R(e,"invalid",3,!1),u=oe("");const d=_(()=>Vs(e.fieldConfig)),f=_(()=>l(d).dateOnly),h=_(()=>l(d).timeOnly),p=_(()=>l(d).utc),g=()=>{const k=h3(o(),e.fieldConfig);k!==void 0&&k!==l(u)&&G(u,k,!0)},m=()=>{const k=PS(l(u),o(),e.fieldConfig);k!==void 0&&k!==o()&&Number(Ec(k,e.fieldConfig))!==Number(Ec(o(),e.fieldConfig))&&o(k)};Re(()=>{o(),Ce(()=>{g()})}),Re(()=>{l(u),Ce(()=>{m()})});var v=rte(),b=M(v),y=z(b,2);{var w=k=>{var x=nte();T(k,x)};H(y,k=>{l(p)&&k(w)})}var S=z(y,2);{var C=k=>{{let x=_(()=>i()(l(f)?"today":"now"));et(k,{variant:"tertiary",get label(){return l(x)},onclick:()=>{const A=IS(e.fieldConfig);G(u,l(p)?A.replace(/:00\.000Z$/,""):A,!0)}})}};H(S,k=>{a()||k(C)})}var E=z(S,2);{var $=k=>{{let x=_(()=>i()("clear")),A=_(()=>!o());et(k,{variant:"tertiary",get label(){return l(x)},get disabled(){return l(A)},onclick:()=>{o("")}})}};H(E,k=>{!a()&&!s()&&k($)})}Z(()=>{Te(b,"type",l(f)?"date":l(h)?"time":"datetime-local"),b.readOnly=a(),Te(b,"aria-readonly",a()),Te(b,"aria-required",s()),Te(b,"aria-invalid",c()),Te(b,"aria-labelledby",`${e.fieldId??""}-label`),Te(b,"aria-errormessage",`${e.fieldId??""}-error`)}),th(b,()=>l(u),k=>G(u,k)),T(t,v),le(),r()}var ste=j('<p dir="auto"> <!></p>');function ate(t,e){ae(e,!0);const n=_(()=>NS({locale:e.locale,fieldConfig:e.fieldConfig,currentValue:e.currentValue}));var r=X(),i=D(r);{var o=s=>{var a=ste(),c=M(a),u=z(c);{var d=f=>{var h=Oe("UTC");T(f,h)};H(u,f=>{e.fieldConfig.picker_utc&&f(d)})}Z(()=>{Te(a,"lang",e.locale),ne(c,`${l(n)??""} `),a.dir=a.dir}),T(s,a)};H(i,s=>{l(n)&&s(o)})}T(t,r),le()}var lte=j('<div role="none"><!></div>');const cte={hash:"svelte-4909d0",code:".wrapper.svelte-4909d0 {display:contents;}.wrapper.svelte-4909d0 .listbox {gap:4px;overflow-x:hidden;overflow-y:auto;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);}.wrapper.svelte-4909d0 .listbox .option button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;}.wrapper.svelte-4909d0 .listbox .option button:focus-visible {outline-color:transparent;}.wrapper.svelte-4909d0 .listbox .option button .preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1;object-fit:contain;}.wrapper.svelte-4909d0 .listbox .name {min-height:calc(var(--sui-font-size-default) * 2);white-space:normal;line-height:var(--sui-line-height-compact);}.wrapper.svelte-4909d0 .listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;}.wrapper.svelte-4909d0 .listbox.grid .option button {flex-direction:column;justify-content:flex-start;}.wrapper.svelte-4909d0 .listbox.grid .option button .preview {width:100%;height:auto;}.wrapper.svelte-4909d0 .listbox.grid .option button .name {flex:none;margin:4px 0 12px;padding:0 8px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);}.wrapper.svelte-4909d0 .listbox.grid button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}.wrapper.svelte-4909d0 :not(.wrapper.show-title) .listbox.grid .option .name {position:absolute;left:-99999px;}.wrapper.svelte-4909d0 .listbox.list .option button {gap:16px;}.wrapper.svelte-4909d0 .listbox.list .option button .preview {width:64px;}.wrapper.svelte-4909d0 .listbox.list .option button .name {flex:auto;padding-inline:0 8px;}.wrapper.svelte-4909d0 .listbox.list .option button[aria-selected=true] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}"};function _N(t,e){ae(e,!0),xe(t,cte);const[n,r]=ve(),i=()=>q(ue,"$_",n);let o=R(e,"viewType",3,"grid"),s=R(e,"gridId",3,void 0),a=R(e,"showTitle",3,!1),c=R(e,"onChange",3,void 0),u=R(e,"children",3,void 0);var d=lte();let f;var h=M(d);{let p=_(()=>i()("assets_dialog.available_images"));Wc(h,{get id(){return s()},get class(){return o()},get"aria-label"(){return l(p)},onChange:g=>{c()?.(g.detail)},children:(g,m)=>{var v=X(),b=D(v);Fe(b,()=>u()??Me),T(g,v)},$$slots:{default:!0}})}Z(p=>f=rn(d,1,"wrapper svelte-4909d0",null,f,p),[()=>({"show-title":a()})]),T(t,d),le(),r()}var ute=j('<span role="alert"> </span>'),dte=j('<span role="alert"> </span>'),fte=j('<span role="alert"> </span>'),hte=j('<span role="none" class="name"> </span>'),pte=j("<!> <!>",1),gte=j('<div role="none" class="input-outer svelte-ws1n2e"><!></div>'),mte=j('<div role="none" class="input-outer svelte-ws1n2e"><!></div> <div role="none" class="input-outer svelte-ws1n2e"><!></div> <div role="none" class="input-outer svelte-ws1n2e"><!></div>',1),vte=j('<p role="alert" class="svelte-ws1n2e"><!> <!></p> <!> <!>',1),bte=j('<span role="alert"> </span>');const _te={hash:"svelte-ws1n2e",code:"p.svelte-ws1n2e {margin:0 0 8px;}.input-outer.svelte-ws1n2e {width:400px;max-width:100%;text-align:center;}"};function yte(t,e){ae(e,!0),xe(t,_te);const[n,r]=ve(),i=()=>q(ft,"$prefs",n),o=()=>q(ue,"$_",n),s=()=>q(rc,"$selectAssetsView",n),a=()=>q(on,"$isSmallScreen",n);let c=R(e,"kind",3,"image"),u=R(e,"searchTerms",3,""),d=R(e,"gridId",3,void 0),f=R(e,"onSelect",3,void 0);const h=_(()=>nt(e.serviceProps.serviceType,"stock_assets")),p=_(()=>nt(e.serviceProps.serviceId,"")),g=_(()=>nt(e.serviceProps.serviceLabel,"")),m=_(()=>nt(e.serviceProps.hotlinking,!1)),v=_(()=>nt(e.serviceProps.authType,"api_key")),b=_(()=>nt(e.serviceProps.developerURL,"")),y=_(()=>nt(e.serviceProps.apiKeyURL,"")),w=_(()=>e.serviceProps.apiKeyPattern),S=_(()=>e.serviceProps.init),C=_(()=>e.serviceProps.signIn),E=_(()=>e.serviceProps.search),$=Ft({userName:"",password:""});let k=oe(!0),x=oe(!1),A=oe(""),I=oe(""),P=oe(""),O=oe("initial"),L=oe(null),F=oe(void 0),U=0;const V=async(Y="")=>{G(L,null);try{G(L,await l(E)(Y,{kind:c(),apiKey:l(A),userName:l(I),password:l(P)}),!0)}catch(Q){G(F,"search_fetch_failed"),console.error(Q)}},W=async Y=>{const{downloadURL:Q,fileName:ie,credit:ee}=Y;if(l(m)){f()?.({url:Q,credit:ee});return}try{const te=await fetch(Q),{ok:re,status:ce}=te;if(!re)throw new Error(`The response returned with HTTP status ${ce}.`);const he=await te.blob(),pe=new File([he],ie,{type:he.type});f()?.({file:pe,credit:ee})}catch(te){G(F,"image_fetch_failed"),console.error(te)}};qt(()=>{(async()=>(typeof l(S)=="function"&&(G(k,!1),G(k,await l(S)(),!0)),l(k)&&(G(A,i().apiKeys?.[l(p)]??"",!0),(Y=>{var Q=Xo(Y,2);G(I,Q[0],!0),G(P,Q[1],!0)})((i().logins?.[l(p)]??"").split(" ")),G(x,!!l(A)||!!l(P),!0),G(L,null),l(x)&&V())))()}),Re(()=>{u(),window.clearTimeout(U),U=window.setTimeout(()=>{l(x)&&V(u())},1e3)});var J=X(),N=D(J);{var B=Y=>{var Q=X(),ie=D(Q);{var ee=re=>{pr(re,{children:(ce,he)=>{var pe=ute(),me=M(pe);Z(fe=>ne(me,fe),[()=>o()(`assets_dialog.error.${l(F)}`)]),T(ce,pe)},$$slots:{default:!0}})},te=re=>{var ce=X(),he=D(ce);{var pe=fe=>{pr(fe,{children:(ge,_e)=>{var be=dte(),Ne=M(be);Z($e=>ne(Ne,$e),[()=>o()("searching")]),T(ge,be)},$$slots:{default:!0}})},me=fe=>{var ge=X(),_e=D(ge);{var be=$e=>{pr($e,{children:(Ke,je)=>{var Ge=fte(),Ae=M(Ge);Z(Se=>ne(Ae,Se),[()=>o()("no_files_found")]),T(Ke,Ge)},$$slots:{default:!0}})},Ne=$e=>{{let Ke=_(()=>s()?.type);_N($e,{get gridId(){return d()},get viewType(){return l(Ke)},onChange:({value:je})=>{const Ge=l(L)?.find(({id:Ae})=>Ae===je);Ge&&W(Ge)},children:(je,Ge)=>{al(je,{get items(){return l(L)},itemKey:"id",renderItem:(Se,Ue=Me)=>{var Ie=X(),Ve=D(Ie);un(Ve,Lt,null,ye=>{const ke=_(()=>{const{id:Le,previewURL:Qe,description:Ze,kind:Ee}=Ue();return{id:Le,previewURL:Qe,description:Ze,_kind:Ee}});ur(ye,{label:"",get value(){return l(ke).id},checkIcon:Qe=>{},children:(Qe,Ze)=>{var Ee=pte(),ze=D(Ee);Vo(ze,{get kind(){return l(ke)._kind},get src(){return l(ke).previewURL},variant:"tile",crossorigin:"anonymous"});var Je=z(ze,2);{var dt=lt=>{var vt=hte(),zt=M(vt);Z(()=>ne(zt,l(ke).description)),T(lt,vt)};H(Je,lt=>{(!a()||s()?.type==="list")&<(dt)})}T(Qe,Ee)},$$slots:{checkIcon:!0,default:!0}})}),T(Se,Ie)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}};H(_e,$e=>{l(L).length?$e(Ne,!1):$e(be)},!0)}T(fe,ge)};H(he,fe=>{l(L)?fe(me,!1):fe(pe)},!0)}T(re,ce)};H(ie,re=>{l(F)?re(ee):re(te,!1)})}T(Y,Q)},K=Y=>{var Q=X(),ie=D(Q);{var ee=re=>{pr(re,{children:(ce,he)=>{var pe=vte(),me=D(pe),fe=M(me);{var ge=Ge=>{var Ae=X(),Se=D(Ae);cr(Se,()=>Ei.sanitize(o()("prefs.media.stock_photos.description",{values:{service:l(g),homeHref:`href="${l(b)}"`,apiKeyHref:`href="${l(y)}"`}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(Ge,Ae)};H(fe,Ge=>{l(h)==="stock_assets"&&Ge(ge)})}var _e=z(fe,2);{var be=Ge=>{var Ae=X(),Se=D(Ae);cr(Se,()=>Ei.sanitize(o()(`cloud_storage.auth.${l(O)}`,{values:{service:l(g)}}),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})),T(Ge,Ae)};H(_e,Ge=>{l(h)==="cloud_storage"&&Ge(be)})}var Ne=z(me,2);{var $e=Ge=>{var Ae=gte(),Se=M(Ae);{let Ue=_(()=>o()("prefs.media.stock_photos.field_label",{values:{service:l(g)}}));Ln(Se,{flex:!0,spellcheck:"false",get"aria-label"(){return l(Ue)},oninput:Ie=>{const Ve=Ie.target.value.trim();l(w)?.test(Ve)&&(G(A,Ve,!0),G(x,!0),It(ft,Ce(i).apiKeys??={},Ce(i)),It(ft,Ce(i).apiKeys[l(p)]=l(A),Ce(i)),V())}})}T(Ge,Ae)};H(Ne,Ge=>{l(v)==="api_key"&&Ge($e)})}var Ke=z(Ne,2);{var je=Ge=>{var Ae=mte(),Se=D(Ae),Ue=M(Se);{let Le=_(()=>o()("user_name")),Qe=_(()=>l(O)==="requested");Ln(Ue,{flex:!0,spellcheck:"false",get"aria-label"(){return l(Le)},get disabled(){return l(Qe)},get value(){return $.userName},set value(Ze){$.userName=Ze}})}var Ie=z(Se,2),Ve=M(Ie);{let Le=_(()=>o()("password")),Qe=_(()=>l(O)==="requested");gJ(Ve,{get"aria-label"(){return l(Le)},get disabled(){return l(Qe)},get value(){return $.password},set value(Ze){$.password=Ze}})}var ye=z(Ie,2),ke=M(ye);{let Le=_(()=>o()("sign_in")),Qe=_(()=>!$.userName||!$.password||l(O)==="requested");et(ke,{variant:"secondary",get label(){return l(Le)},get disabled(){return l(Qe)},onclick:async()=>{G(O,"requested"),$.userName=$.userName.trim(),$.password=$.password.trim(),await l(C)?.($.userName,$.password)?(G(O,"success"),G(I,$.userName,!0),G(P,$.password,!0),G(x,!0),It(ft,Ce(i).logins??={},Ce(i)),It(ft,Ce(i).logins[l(p)]=[l(I),l(P)].join(" "),Ce(i)),V()):G(O,"error")}})}T(Ge,Ae)};H(Ke,Ge=>{l(v)==="password"&&Ge(je)})}T(ce,pe)},$$slots:{default:!0}})},te=re=>{pr(re,{children:(ce,he)=>{var pe=bte(),me=M(pe);Z(fe=>ne(me,fe),[()=>o()("cloud_storage.invalid")]),T(ce,pe)},$$slots:{default:!0}})};H(ie,re=>{l(k)?re(ee):re(te,!1)},!0)}T(Y,Q)};H(N,Y=>{l(x)?Y(B):Y(K,!1)})}T(t,J),le(),r()}const Cf=t=>(t=t.trim(),t?t.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLocaleLowerCase():""),Cu=({value:t,terms:e})=>Cf(t).includes(e),yN=(t,e=Me)=>{var n=X(),r=D(n);cr(r,()=>Ei.sanitize(e().replace(/([-_.])/g,"$1<wbr>"),{ALLOWED_TAGS:["wbr"]})),T(t,n)};var wte=j('<div role="none" class="unsaved svelte-gwpugb"> </div>'),xte=j('<strong class="svelte-gwpugb"><!></strong>'),kte=j("<!>/",1),Ste=j('<div role="none" class="unsaved svelte-gwpugb"> </div>'),Ete=j('<span role="none" class="name svelte-gwpugb"><!> <!></span>'),Tte=j("<!> <!> <!>",1),Cte=j('<div role="none" class="grid-wrapper svelte-gwpugb"><!></div>'),Ate=j('<span role="none"> </span>');const $te={hash:"svelte-gwpugb",code:".grid-wrapper.svelte-gwpugb {overflow-y:auto;height:100%;}.grid-wrapper.svelte-gwpugb [role=listbox] {background-color:transparent;}.grid-wrapper.svelte-gwpugb [role=listbox].grid [role=option] {position:relative;}.grid-wrapper.svelte-gwpugb [role=listbox].grid .unsaved {position:absolute;inset:4px 4px auto auto;z-index:1;}.grid-wrapper.svelte-gwpugb [role=listbox].list .name {display:flex;gap:8px;align-items:center;justify-content:space-between;}.unsaved.svelte-gwpugb {display:flex;justify-content:center;align-items:center;border-color:var(--sui-info-border-color);border-radius:4px;padding:2px 6px;color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);font-size:var(--sui-font-size-small);}.name.svelte-gwpugb {color:var(--sui-tertiary-foreground-color);}.name.svelte-gwpugb strong:where(.svelte-gwpugb) {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}"};function wN(t,e){ae(e,!0),xe(t,$te);const[n,r]=ve(),i=()=>q(ue,"$_",n),o=()=>q(on,"$isSmallScreen",n);let s=R(e,"assets",19,()=>[]),a=R(e,"selectedResource",15),c=R(e,"viewType",3,"grid"),u=R(e,"searchTerms",3,""),d=R(e,"basePath",3,void 0),f=R(e,"gridId",3,void 0),h=R(e,"checkerboard",3,!1),p=R(e,"onSelect",3,void 0);const g=_(()=>u()?s().filter(({name:w})=>Cf(w).includes(u())):s());var m=X(),v=D(m);{var b=w=>{var S=Cte(),C=M(S);_N(C,{get gridId(){return f()},get viewType(){return c()},showTitle:!0,onChange:({value:E})=>{const $=s().find(({path:k})=>k===E);a({asset:$}),p()?.({asset:$})},children:(E,$)=>{al(E,{get items(){return l(g)},itemKey:"path",renderItem:(x,A=Me)=>{var I=X(),P=D(I);un(P,Lt,null,O=>{const L=_(()=>{const{kind:V,name:W,path:J,unsaved:N,folder:B}=A();return{kind:V,name:W,path:J,unsaved:N,folder:B}}),F=_(()=>d()&&!l(L).folder.entryRelative?tn(l(L).path.replace(d(),"")):l(L).name),U=_(()=>l(F).split("/"));{const V=J=>{};let W=_(()=>pn(A(),a()?.asset));ur(O,{label:"",get value(){return l(L).path},get selected(){return l(W)},checkIcon:V,children:(J,N)=>{var B=Tte(),K=D(B);{var Y=te=>{var re=wte(),ce=M(re);Z(he=>ne(ce,he),[()=>i()("assets_dialog.unsaved")]),T(te,re)};H(K,te=>{c()==="grid"&&l(L).unsaved&&te(Y)})}var Q=z(K,2);Vo(Q,{get kind(){return l(L).kind},get asset(){return A()},variant:"tile",get checkerboard(){return h()}});var ie=z(Q,2);{var ee=te=>{var re=Ete(),ce=M(re);wr(ce,{lines:2,children:(me,fe)=>{var ge=X(),_e=D(ge);st(_e,17,()=>l(U),br,(be,Ne,$e)=>{var Ke=X(),je=D(Ke);{var Ge=Se=>{var Ue=xte(),Ie=M(Ue);yN(Ie,()=>l(Ne)),T(Se,Ue)},Ae=Se=>{var Ue=kte(),Ie=D(Ue);yN(Ie,()=>l(Ne)),T(Se,Ue)};H(je,Se=>{$e===l(U).length-1?Se(Ge):Se(Ae,!1)})}T(be,Ke)}),T(me,ge)},$$slots:{default:!0}});var he=z(ce,2);{var pe=me=>{var fe=Ste(),ge=M(fe);Z(_e=>ne(ge,_e),[()=>i()("assets_dialog.unsaved")]),T(me,fe)};H(he,me=>{c()==="list"&&l(L).unsaved&&me(pe)})}T(te,re)};H(ie,te=>{(!o()||c()==="list")&&te(ee)})}T(J,B)},$$slots:{checkIcon:!0,default:!0}})}}),T(x,I)},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),T(w,S)},y=w=>{pr(w,{children:(S,C)=>{var E=Ate(),$=M(E);Z(k=>ne($,k),[()=>i()("no_files_found")]),T(S,E)},$$slots:{default:!0}})};H(v,w=>{l(g).length?w(b):w(y,!1)})}T(t,m),le(),r()}function Ite(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(rc,"$selectAssetsView",n);let o=R(e,"accept",3,void 0),s=R(e,"assets",19,()=>[]),a=R(e,"selectedResource",15),c=R(e,"searchTerms",3,""),u=R(e,"basePath",3,void 0),d=oe(void 0);Re(()=>{a()||Ce(()=>{l(d)?.reset()})}),bt(kf(t,{get accept(){return o()},get onDrop(){return e.onDrop},children:(f,h)=>{{let p=_(()=>i()?.type);wN(f,{get assets(){return s()},get viewType(){return l(p)},get searchTerms(){return c()},get basePath(){return u()},gridId:"select-assets-grid",checkerboard:!0,get selectedResource(){return a()},set selectedResource(g){a(g)}})}},$$slots:{default:!0}}),f=>G(d,f,!0),()=>l(d)),le(),r()}const lm={},Pte=["en-US","pt-BR","es-ES","ca-ES","de-DE","it-IT","fr-FR","sv-SE","id-ID","pl-PL","ja-JP","zh-TW","zh-CN","ko-KR","th-TH","nl-NL","hu-HU","vi-VN","cs-CZ","da-DK","fi-FI","uk-UA","el-GR","ro-RO","nb-NO","sk-SK","tr-TR","ru-RU"],xN="https://api.pexels.com/v1",Nte={serviceType:"stock_assets",serviceId:"pexels",serviceLabel:"Pexels",serviceURL:"https://www.pexels.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://www.pexels.com/api/",apiKeyURL:"https://www.pexels.com/api/new/",apiKeyPattern:/^[a-zA-Z\d]{56}$/,search:async(t,{apiKey:e})=>{const n={Authorization:e},[r]=se(Wt).toLowerCase().split("-");let i=[];if(t)for(let o=1;o<=2;o+=1){const s=new URLSearchParams({query:t,locale:Pte.find(d=>d.split("-")[0]===r)||"en-US",page:o,per_page:80}),a=await fetch(`${xN}/search?${s}`,{headers:n});if(!a.ok)return Promise.reject();const{photos:c,next_page:u}=await a.json();if(i.push(...c),!u)break;await Lt(50)}else{const o=new URLSearchParams({per_page:80}),s=await fetch(`${xN}/curated?${o}`,{headers:n});if(!s.ok)return Promise.reject();i=(await s.json()).photos}return i.map(({id:o,url:s,alt:a,src:{large2x:c,medium:u},photographer:d})=>({id:String(o),description:s.match(/\/photo\/(?<alt>.+?)-\d+\/$/)?.groups?.alt.replace(/-/g," ")??a,previewURL:u,downloadURL:c,fileName:`pexels-${d.split(/\s+/).join("-").toLowerCase()}-${o}.jpg`,kind:"image",credit:`<a href="${s}">Photo by ${d} on Pexels</a>`}))}},Lte=["cs","da","de","en","es","fr","id","it","hu","nl","no","pl","pt","ro","sk","fi","sv","tr","vi","th","bg","ru","el","ja","ko","zh"],Ote="https://pixabay.com/api",Rte={serviceType:"stock_assets",serviceId:"pixabay",serviceLabel:"Pixabay",serviceURL:"https://pixabay.com/",showServiceLink:!0,hotlinking:!1,authType:"api_key",developerURL:"https://pixabay.com/service/about/api/",apiKeyURL:"https://pixabay.com/api/docs/#api_key",apiKeyPattern:/^\d+-[a-f\d]{25}$/,search:async(t,{apiKey:e})=>{const[n]=se(Wt).toLowerCase().split("-"),r=new URLSearchParams({key:e,q:t,lang:Lte.includes(n)?n:"en",image_type:"photo",min_width:1280,editors_choice:!t,safesearch:!0,per_page:150}),i=await fetch(`${Ote}/?${r}`);return i.ok?(await i.json()).hits.map(({id:s,webformatURL:a,previewURL:c,largeImageURL:u,imageWidth:d,imageHeight:f,pageURL:h,tags:p,user:g})=>({id:String(s),description:p,previewURL:a.replace("_640.",d>f?"_180.":"_340."),downloadURL:u,fileName:c.split("/").pop().replace("_150.","_1280."),kind:"image",credit:`<a href="${h}">Photo by ${g} on Pixabay`})):Promise.reject()}},Fte=["af","sq","am","ar","hy","as","az","bn","ba","eu","bs","bg","yue","ca","lzh","zh-Hans","zh-Hant","hr","cs","da","prs","dv","nl","en","et","fo","fj","fil","fi","fr","fr-ca","gl","ka","de","el","gu","ht","he","hi","mww","hu","is","id","ikt","iu","iu-Latn","ga","it","ja","kn","kk","km","ko","ku","kmr","ky","lo","lv","lt","mk","mg","ms","ml","mt","mi","mr","mn-Cyrl","mn-Mong","my","ne","nb","or","ps","fa","pl","pt","pt-pt","pa","otq","ro","ru","sm","sr-Cyrl","sr-Latn","sk","sl","so","es","sw","sv","ty","ta","tt","te","th","bo","ti","to","tr","tk","uk","hsb","ur","ug","uz","vi","cy","yua","zu"],kN="https://api.unsplash.com",SN="utm_source=sveltia-cms&utm_medium=referral",cm={pexels:Nte,pixabay:Rte,unsplash:{serviceType:"stock_assets",serviceId:"unsplash",serviceLabel:"Unsplash",serviceURL:"https://unsplash.com/",showServiceLink:!0,hotlinking:!0,authType:"api_key",developerURL:"https://unsplash.com/developers",apiKeyURL:"https://unsplash.com/oauth/applications",apiKeyPattern:/^[a-zA-Z\d-]{40,}$/,search:async(t,{apiKey:e})=>{const n={Authorization:`Client-ID ${e}`},[r]=se(Wt).toLowerCase().split("-");let i=[];if(t)for(let o=1;o<=5;o+=1){const s=new URLSearchParams({query:t,lang:Fte.includes(r)?r:"en",page:o,per_page:30}),a=await fetch(`${kN}/search/photos?${s}`,{headers:n});if(!a.ok)return Promise.reject();const{results:c,total_pages:u}=await a.json();if(i.push(...c),u===o)break;await Lt(50)}else{const o=new URLSearchParams({per_page:30}),s=await fetch(`${kN}/photos?${o}`,{headers:n});if(!s.ok)return Promise.reject();i=await s.json()}return i.map(({id:o,description:s,alt_description:a,urls:{regular:c,thumb:u},user:{username:d,name:f}})=>({id:String(o),description:[s,a].filter(Boolean).join(" — "),previewURL:u,downloadURL:c,fileName:`${f.split(/\s+/).join("-").toLowerCase()}-${o}-unsplash.jpg`,kind:"image",credit:`Photo by <a href="https://unsplash.com/@${d}?${SN}">${f}</a> on <a href="https://unsplash.com/?${SN}">Unsplash</a>`}))}}},EN=({fieldConfig:t}={})=>{const e=TC({libraryName:"stock_assets",fieldConfig:t}),n=Object.keys(cm),{providers:r}=e;return{providers:Array.isArray(r)?r:n}};var Dte=j("<!> <!>",1),Mte=j("<!> <!>",1),zte=j("<a> </a>"),Ute=j("<!> <!>",1),jte=j("<!> <!> <!>",1),Bte=j('<div role="none" class="filter-tools svelte-1fnz5w0"><!></div>'),qte=j('<div role="none"> </div> <!>',1),Hte=j('<div role="none" class="wrapper svelte-1fnz5w0"><div role="none" class="nav svelte-1fnz5w0"><!> <!></div> <div role="none" class="content-pane svelte-1fnz5w0"><!> <!> <!></div></div>'),Gte=j("<!> <!>",1);const Kte={hash:"svelte-1fnz5w0",code:`.wrapper.svelte-1fnz5w0 {display:flex;gap:16px;height:60dvh;}
|
|
621
621
|
@media (width < 768px) {.wrapper.svelte-1fnz5w0 {flex-direction:column;overflow:hidden;height:72dvh;}
|
|
622
622
|
}.wrapper.svelte-1fnz5w0 .nav:where(.svelte-1fnz5w0) {display:flex;gap:4px;}
|
|
623
623
|
@media (width < 768px) {.wrapper.svelte-1fnz5w0 .nav:where(.svelte-1fnz5w0) {flex-direction:column;}
|
|
@@ -632,7 +632,7 @@ td.svelte-5r6rgh {border-width:0;}th.svelte-5r6rgh {padding-block:4px;color:var(
|
|
|
632
632
|
@media (width < 768px) {.wrapper.svelte-14ielax .sui.text-editor {margin:0 calc(var(--field-editor-padding) * -1) calc(var(--field-editor-padding) * -1);width:100dvw;}.wrapper.svelte-14ielax :is(.sui.toolbar, .lexical-root, textarea) {border:0;border-radius:0;}
|
|
633
633
|
}`};function Nre(t,e){ae(e,!0),xe(t,Pre);const[n,r]=ve(),i=()=>q(tt,"$entryDraft",n),{widgetContext:o=void 0}=Yn("field-editor")??{},s=o==="markdown-editor-component";let a=R(e,"currentValue",15),c=R(e,"required",3,!0),u=R(e,"readonly",3,!1),d=R(e,"invalid",3,!1),f=oe(void 0),h=oe(""),p=0;const g=_(()=>nt(e.fieldConfig.modes,()=>[...vre],!0)),m=_(()=>nt(e.fieldConfig.buttons,()=>[..._re],!0)),v=_(()=>nt(e.fieldConfig.editor_components,()=>[...wre,...vp.keys()],!0)),b=_(()=>nt(e.fieldConfig.linked_images,!0)),y=_(()=>nt(e.fieldConfig.minimal,!1)),w=_(()=>l(g).map(F=>bre[F]).filter(Boolean)),S=_(()=>[...l(m),...l(v).includes("code-block")?["code-block"]:[]].map(F=>yre[F]).filter(Boolean)),C=_(()=>s?[]:l(v).map(F=>YT(F==="image"&&l(b)?"linked-image":F)).filter(F=>!!F).map(F=>new $re(F))),E=_(()=>l(C).find(({id:F})=>F==="image"||F==="linked-image")),$=({target:F,images:U})=>{const V=F?.closest("div"),W=kg(V);!l(E)||!V?.matches(".lexical-root")||!W||U.forEach(({file:J,src:N,alt:B=""})=>{J&&(N=URL.createObjectURL(J)),W.update(()=>{iu([l(E).createNode({src:N,alt:B}),xn()])},{onUpdate:async()=>{if(!J)return;await Lt(250),V.querySelector(`img[src="${N}"]`)?.closest(".drop-target")?.dispatchEvent(new CustomEvent("Select",{detail:{files:[J]}}))}})})},k=async F=>{const{target:U,clipboardData:V}=F,W=V?.items;if(!W)return;let J=[];const N=[...W].findIndex(({kind:K,type:Y})=>K==="file"&&$o.includes(Y)),B=[...W].findIndex(({kind:K,type:Y})=>K==="string"&&Y==="text/html");if(N>-1&&B>-1){const K=N>-1?W[N].getAsFile():void 0;if(!K)return;W.clear(),F.stopPropagation();let Y="",Q=K.name;const ie=await new Promise(ee=>{W[B].getAsString(te=>{ee(new DOMParser().parseFromString(te,"text/html").querySelector("img"))})});if(ie&&(Y=ie.alt,/^https?:/.test(ie.src))){const ee=new URL(ie.src).pathname.split("/").pop()??"";(Zb.test(ee)||V6.test(ee))&&(Q=ee)}J=[{file:new File([K],Q,{type:K.type}),alt:Y}]}else J=[...V.files].filter(({type:K})=>$o.includes(K)).map(K=>({file:K}));J.length&&(J=J.map(({file:K,alt:Y},Q)=>{if(K?.name==="image.png"){const{year:ie,month:ee,day:te,hour:re,minute:ce,second:he}=Ha(),pe=J.length>1?`-${Q+1}`:"",me=`${ie}${ee}${te}-${re}${ce}${he}${pe}.png`;K=new File([K],me,{type:K.type})}return{file:K,alt:Y}}),$({target:U,images:J}))},x=async F=>{const{target:U,dataTransfer:V}=F,W=V?.files;let J=[];if(W?.length)J=[...W].filter(({type:N})=>$o.includes(N)).map(N=>({file:N}));else{const N=F.dataTransfer?.getData("text/html");if(N){const B=new DOMParser().parseFromString(N,"text/html").querySelector("img");if(B){const{src:K,alt:Y}=B,Q=K.match(/^data:(?<type>image\/.+?);base64,.+/);let ie;if(Q){const ee=Q.groups?.type??"";if($o.includes(ee))try{const te=await(await fetch(K)).blob(),{year:re,month:ce,day:he,hour:pe,minute:me,second:fe}=Ha(),ge=ee.split("/")[1],_e=`${re}${ce}${he}-${pe}${me}${fe}.${ge}`;ie=new File([te],_e,{type:ee})}catch{return}}J=[{file:ie,src:K,alt:Y}]}}}J.length&&$({target:U,images:J})},A=()=>{const F=typeof a()=="string"?a():"";l(h)!==F&&G(h,F,!0),!(!i()||s)&&(window.clearTimeout(p),p=window.setTimeout(()=>{Object.keys(i()?.extraValues[e.locale]??{}).forEach(U=>{const[V]=U.match($f)??[];V?.startsWith(`${e.keyPath}:`)&&!l(f)?.querySelector(`[data-key-path-prefix="${V}"]`)&&delete i().extraValues[e.locale][U]})},500))},I=()=>{const F=l(h);a()!==F&&a(F)};Re(()=>{a(),Ce(()=>{A()})}),Re(()=>{l(h),Ce(()=>{I()})});var P=Ire();let O;var L=M(P);un(L,Lt,null,F=>{var U=X(),V=D(U);Jn(V,()=>JSON.stringify(e.fieldConfig),W=>{cJ(W,{get lang(){return e.locale},get modes(){return l(w)},get buttons(){return l(S)},get components(){return l(C)},flex:!0,get readonly(){return u()},get required(){return c()},get invalid(){return d()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,onpastecapture:J=>{k(J)},ondrop:J=>{x(J)},get value(){return l(h)},set value(J){G(h,J,!0)}})}),T(F,U)}),bt(P,F=>G(f,F),()=>l(f)),Z(F=>O=rn(P,1,"wrapper svelte-14ielax",null,O,F),[()=>({minimal:l(y)})]),T(t,P),le(),r()}function Lre(){return{useNewRenderer:!0,renderer:{heading(...t){return Et.Renderer.prototype.heading.call(this,...t).replace(/^<(h\d)/,'<$1 dir="auto"')},list(...t){return Et.Renderer.prototype.list.call(this,...t).replace(/^<(ol|ul)/,'<$1 dir="auto"')},paragraph(...t){return Et.Renderer.prototype.paragraph.call(this,...t).replace(/^<p/,'<p dir="auto"')}}}}var Ore=j('<div role="none" class="svelte-1f46x0y"><!></div>');const Rre={hash:"svelte-1f46x0y",code:'[role="document"] div.svelte-1f46x0y :is(h1, h2, h3, h4, h5, h6, p, ul, ol) {margin:1em 0 0;}[role="document"] div.svelte-1f46x0y :is(video, img) {max-width:100%;max-height:100%;}[role="document"] div.svelte-1f46x0y :is(a:has(img)) {display:inline-block;}[role="document"] div.svelte-1f46x0y :is(a:has(img)) img {pointer-events:none;}'};function Fre(t,e){ae(e,!0),xe(t,Rre);const[n,r]=ve(),i=()=>q(tt,"$entryDraft",n);let o=oe("");const s=_(()=>i()?.originalEntry),a=_(()=>i()?.collectionName??""),c=_(()=>i()?.fileName),u=_(()=>nt(e.fieldConfig.sanitize_preview,!1)),d={breaks:!0,async:!0,walkTokens:async g=>{if(g.type==="image"){const m=await Rc({value:g.href,entry:l(s),collectionName:l(a),fileName:l(c)});m&&(g.href=m)}}};Et.use(Lre()),Re(()=>{(async()=>G(o,await Et.parse(e.currentValue??"",d),!0))()});var f=Ore(),h=M(f);{var p=g=>{var m=X(),v=D(m);cr(v,()=>l(u)?Ei.sanitize(l(o)):l(o)),T(g,m)};H(h,g=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&g(p)})}T(t,f),le(),r()}function Dre(t,e){ae(e,!0);let n=R(e,"currentValue",15),r=R(e,"required",3,!0),i=R(e,"readonly",3,!1),o=R(e,"invalid",3,!1),s=oe(void 0),a=oe("");const c=_(()=>nt(e.fieldConfig.value_type,"int")),u=_(()=>e.fieldConfig.min),d=_(()=>e.fieldConfig.max),f=_(()=>nt(e.fieldConfig.step,1)),h=_(()=>l(c)==="int"||l(c)==="float"),p=()=>{if(n()!==void 0){if(l(h)&&l(s)!==n())if(typeof n()=="number")G(s,n(),!0);else if(typeof n()=="string"){const w=n().trim()?Number(n()):NaN;G(s,Number.isNaN(w)?void 0:w,!0)}else G(s,void 0);!l(h)&&l(a)!==n()&&G(a,String(n()),!0)}},g=()=>{let w;l(h)?l(s)===void 0?w=NaN:l(c)==="int"?w=Number.parseInt(l(h)?String(l(s)):l(a),10):w=Number.parseFloat(l(h)?String(l(s)):l(a)):w=l(a),l(h)&&Number.isNaN(w)&&(w=null),n()!==w&&n(w)};Re(()=>{n(),Ce(()=>{p()})}),Re(()=>{l(a),Ce(()=>{g()})}),Re(()=>{l(s),Ce(()=>{g()})});var m=X(),v=D(m);{var b=w=>{fJ(w,{get min(){return l(u)},get max(){return l(d)},get step(){return l(f)},get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(s)},set value(S){G(s,S,!0)}})},y=w=>{Ln(w,{get readonly(){return i()},get required(){return r()},get invalid(){return o()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(a)},set value(S){G(a,S,!0)}})};H(v,w=>{l(h)?w(b):w(y,!1)})}T(t,m),le()}var Mre=j('<p dir="auto"><!></p>');function zre(t,e){ae(e,!0);const n=_(()=>nt(e.fieldConfig.value_type,"int")),r=_(()=>ld(e.locale)),i=_(()=>Intl.NumberFormat(l(r)));var o=X(),s=D(o);{var a=c=>{var u=Mre(),d=M(u);{var f=p=>{var g=Oe();Z(m=>ne(g,m),[()=>l(i).format(Number(e.currentValue))]),T(p,g)},h=p=>{var g=Oe();Z(()=>ne(g,e.currentValue)),T(p,g)};H(d,p=>{l(n)==="int"||l(n)==="float"?p(f):p(h,!1)})}Z(()=>{Te(u,"lang",e.locale),u.dir=u.dir}),T(c,u)};H(s,c=>{e.currentValue!==void 0&&e.currentValue!==null&&e.currentValue!==""&&c(a)})}T(t,o),le()}const UN=t=>{const{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:o,isIndexFile:s}=se(tt),{defaultLocale:a}=(i??r)._i18n,c={...js(t),...js(o[a])},u={collectionName:e,fileName:n,valueMap:c,isIndexFile:s},d=[];return Object.keys(c).forEach(f=>{const h=mn({...u,keyPath:f});if(!h)return;const{widget:p="text",i18n:g=!1}=h;["text","string","markdown"].includes(p)&&[!0,"translate"].includes(g)&&(c[f]=t[f]??""),([!1,"none"].includes(g)||d.some(m=>new RegExp(`^${Kt(m)}\\b`).test(f)))&&(delete c[f],d.push(f))}),c},jN=t=>{tt.update(e=>{const{fields:n,currentLocales:r,currentValues:i,validities:o}=e,s=!r[t];if(s&&!i[t]){const{collectionName:a,fileName:c,originalValues:u}=e,d=Af(n,t);return{...e,currentLocales:{...r,[t]:s},originalValues:{...u,[t]:d},currentValues:{...i,[t]:h0({draft:{collectionName:a,fileName:c},locale:t,target:UN(d)})}}}return{...e,currentLocales:{...r,[t]:s},validities:{...o,[t]:{}}}})},Ure=({collectionName:t,fileName:e,keyPath:n,valueMap:r,isIndexFile:i=!1,locale:o,summaryTemplate:s})=>{const a={collectionName:t,fileName:e,keyPath:"",valueMap:r,isIndexFile:i};return s?s.replaceAll(/{{(.+?)}}/g,(c,u)=>{const[d,...f]=u.split(/\s*\|\s*/);return Uc({...a,keyPath:`${n}.${d.replace(/^fields\./,"")}`,locale:o,transformations:f})}):kC({valueMap:r,locale:o,keyPath:n,keyPathRegex:new RegExp(`^${Kt(n)}\\.`),getFieldArgs:a})};var jre=j('<div role="none" class="summary svelte-v8qxb5"><!></div>'),Bre=j('<div role="group" class="wrapper svelte-v8qxb5"><!> <div role="none" class="item-list"><!></div></div>'),qre=j("<!> <!> <!>",1);const Hre={hash:"svelte-v8qxb5",code:".wrapper.svelte-v8qxb5 {border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.sui.checkbox + .wrapper.svelte-v8qxb5 > .group {margin-top:8px;}.summary.svelte-v8qxb5 {padding:8px;}"};function Gre(t,e){const n=zn();ae(e,!0),xe(t,Hre);const[r,i]=ve(),o=()=>q(tt,"$entryDraft",r),s=()=>q(ue,"$_",r),a=()=>q(on,"$isSmallScreen",r),{widgetContext:c,valueStoreKey:u="currentValues"}=Yn("field-editor")??{};let d=R(e,"required",3,!0),f=oe(void 0);const h=_(()=>e.fieldConfig.name),p=_(()=>nt(e.fieldConfig.i18n,!1)),g=_(()=>e.fieldConfig.collapsed),m=_(()=>e.fieldConfig.summary),v=_(()=>e.fieldConfig.fields),b=_(()=>e.fieldConfig.types),y=_(()=>nt(e.fieldConfig.typeKey,"type")),w=_(()=>o()?.isIndexFile??!1),S=_(()=>o()?.collection),C=_(()=>o()?.collectionName??""),E=_(()=>o()?.collectionFile),$=_(()=>o()?.fileName),k=_(()=>(l(E)??l(S))?._i18n??so),x=_(()=>l(k).defaultLocale),A=_(()=>Mn(o()?.[u][e.locale])??{}),I=_(()=>({collectionName:l(C),fileName:l($),valueMap:l(A),isIndexFile:l(w)})),P=_(()=>Object.entries(l(A)).some(([fe,ge])=>!!fe.startsWith(`${e.keyPath}.`)&&(ge!==null||mn({...l(I),keyPath:fe})?.widget==="object"))),O=_(()=>c==="markdown-editor-component"||e.locale===l(x)||l(p)!==!1),L=_(()=>`${e.keyPath}#`),F=_(()=>o()?.expanderStates?._[l(L)]??!0),U=_(()=>Array.isArray(l(b))),V=_(()=>`${e.keyPath}.${l(y)}`),W=_(()=>l(U)?l(b)?.find(({name:fe})=>fe===l(A)[l(V)]):void 0),J=_(()=>(l(U)?l(W)?.fields:l(v))??[]),N=_(()=>l(U)&&l(W)?.summary||l(m)),B=_(()=>e.locale!==l(x)&&l(p)==="duplicate"),K=()=>{const fe=l(L);Wo({[fe]:FN({key:fe,locale:e.locale,collapsed:l(g)})})},Y=async({type:fe}={})=>{Ye(go,!1),fe&&(Object.keys(o()?.[u]??{}).forEach(be=>{(be===e.locale||l(p)==="duplicate")&&It(tt,Ce(o)[u][be][l(V)]=fe,Ce(o))}),await Na());const ge=Object.fromEntries(Object.entries(Af(l(J),e.locale)).map(([be,Ne])=>[`${e.keyPath}.${be}`,Ne])),_e=e.locale===l(x)?ge:UN(ge);Object.entries(o()?.[u]??{}).forEach(([be,Ne])=>{(be===e.locale||l(p)==="duplicate")&&(It(tt,Ce(o)[u][be]=Object.assign(Ne,js({..._e,...Ne})),Ce(o)),delete o()[u][be][e.keyPath])}),Ye(go,!0)},Q=()=>{Ye(go,!1),Object.entries(o()?.[u]??{}).forEach(([fe,ge])=>{(fe===e.locale||l(p)==="duplicate")&&(Object.keys(ge).forEach(_e=>{_e.startsWith(`${e.keyPath}.`)&&(It(tt,Ce(o)[u][fe][_e]=null,Ce(o)),delete o()?.[u][fe][_e])}),It(tt,Ce(o)[u][fe][e.keyPath]=null,Ce(o)))}),Ye(go,!0)},ie=()=>Ure({...l(I),keyPath:e.keyPath,locale:e.locale,summaryTemplate:l(N)});qt(()=>{K()});var ee=qre(),te=D(ee);{var re=fe=>{{let ge=_(()=>s()("add_x",{values:{name:e.fieldLabel||l(h)}}));Rd(fe,{get label(){return l(ge)},get checked(){return l(P)},get disabled(){return l(B)},onChange:({detail:{checked:_e}})=>{_e?Y():Q()}})}};H(te,fe=>{!l(U)&&!d()&&fe(re)})}var ce=z(te,2);{var he=fe=>{T0(fe,{get disabled(){return l(B)},get fieldConfig(){return e.fieldConfig},addItem:Y})};H(ce,fe=>{l(U)&&!l(P)&&fe(he)})}var pe=z(ce,2);{var me=fe=>{var ge=Bre(),_e=M(ge);{const $e=Ge=>{var Ae=X(),Se=D(Ae);{var Ue=Ie=>{{const Ve=ke=>{Xe(ke,{name:"close"})};let ye=_(()=>s()("remove"));et(Ie,{size:"small",iconic:!0,get disabled(){return l(B)},get"aria-label"(){return l(ye)},onclick:()=>{Q()},startIcon:Ve,$$slots:{startIcon:!0}})}};H(Se,Ie=>{l(U)&&Ie(Ue)})}T(Ge,Ae)};let Ke=_(()=>l(U)?l(W)?.label||l(W)?.name:""),je=_(()=>l(J).length?()=>Wo({[l(L)]:!l(F)}):void 0);AN(_e,{get label(){return l(Ke)},get controlId(){return`object-${n}-item-list`},get expanded(){return l(F)},get toggleExpanded(){return l(je)},endContent:$e,$$slots:{endContent:!0}})}var be=z(_e,2),Ne=M(be);un(Ne,()=>Gc(l(f)),null,$e=>{var Ke=X(),je=D(Ke);{var Ge=Se=>{var Ue=X(),Ie=D(Ue);st(Ie,17,()=>l(J),Ve=>Ve.name,(Ve,ye)=>{mo(Ve,{children:(ke,Le)=>{{let Qe=_(()=>[e.keyPath,l(ye).name].join("."));um(ke,{get keyPath(){return l(Qe)},get locale(){return e.locale},get fieldConfig(){return l(ye)}})}},$$slots:{default:!0}})}),T(Se,Ue)},Ae=Se=>{const Ue=_(ie);var Ie=X(),Ve=D(Ie);{var ye=ke=>{var Le=jre(),Qe=M(Le);{let Ze=_(()=>a()?2:1);wr(Qe,{get lines(){return l(Ze)},children:(Ee,ze)=>{var Je=Oe();Z(()=>ne(Je,l(Ue))),T(Ee,Je)},$$slots:{default:!0}})}Z(()=>Te(Le,"id",`object-${n}-summary`)),T(ke,Le)};H(Ve,ke=>{l(Ue)&&ke(ye)})}T(Se,Ie)};H(je,Se=>{l(F)?Se(Ge):Se(Ae,!1)})}T($e,Ke)}),bt(be,$e=>G(f,$e),()=>l(f)),Z(()=>{Te(ge,"aria-labelledby",l(F)?void 0:`object-${n}-summary`),Te(be,"id",`object-${n}-item-list`)}),T(fe,ge)};H(pe,fe=>{(!(!d()||l(U))||l(P))&&l(O)&&fe(me)})}T(t,ee),le(),i()}function Kre(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(tt,"$entryDraft",n),o=_(()=>e.fieldConfig.fields),s=_(()=>e.fieldConfig.types),a=_(()=>nt(e.fieldConfig.typeKey,"type")),c=_(()=>Mn(i()?.currentValues[e.locale])??{}),u=_(()=>Object.entries(l(c)).some(([y,w])=>!!y.startsWith(`${e.keyPath}.`)&&!!w)),d=_(()=>Array.isArray(l(s))),f=_(()=>`${e.keyPath}.${l(a)}`),h=_(()=>l(d)?l(s)?.find(({name:y})=>y===l(c)[l(f)]):void 0),p=_(()=>l(h)?l(h).label||l(h).name:void 0),g=_(()=>(l(d)?l(h)?.fields:l(o))??[]);var m=X(),v=D(m);{var b=y=>{MN(y,{get label(){return l(p)},children:(w,S)=>{var C=X(),E=D(C);st(E,17,()=>l(g),$=>$.name,($,k)=>{mo($,{children:(x,A)=>{{let I=_(()=>[e.keyPath,l(k).name].join("."));C0(x,{get keyPath(){return l(I)},get locale(){return e.locale},get fieldConfig(){return l(k)}})}},$$slots:{default:!0}})}),T(w,C)},$$slots:{default:!0}})};H(v,y=>{l(u)&&y(b)})}T(t,m),le(),r()}function Vre(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(tt,"$entryDraft",n),{valueStoreKey:o="currentValues"}=Yn("field-editor")??{};let s=R(e,"required",3,!0),a=R(e,"readonly",3,!1),c=R(e,"invalid",3,!1);const u=_(()=>e.fieldConfig.i18n),d=_(()=>e.fieldConfig.max),f=_(()=>nt(e.fieldConfig.dropdown_threshold,5)),h=w=>{i()&&Object.keys(Mn(i()[o])??{}).forEach(S=>{l(u)!=="duplicate"&&S!==e.locale||RN({locale:S,valueStoreKey:o,keyPath:e.keyPath,manipulate:w})})},p=w=>{h(({valueList:S})=>{S.push(w)})},g=w=>{h(({valueList:S})=>{S.splice(S.indexOf(w),1)})};var m=X(),v=D(m);{var b=w=>{S9(w,{get disabled(){return a()},get readonly(){return a()},get required(){return s()},get invalid(){return c()},get options(){return e.options},get values(){return e.currentValue},get max(){return l(d)},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onAddValue:({detail:{value:S}})=>{p(S)},onRemoveValue:({detail:{value:S}})=>{g(S)}})},y=w=>{h7(w,{get"aria-labelledby"(){return`${e.fieldId??""}-label`},children:(S,C)=>{var E=X(),$=D(E);st($,17,()=>e.options,({label:k,value:x})=>x,(k,x)=>{let A=()=>l(x).label,I=()=>l(x).value;{let P=_(()=>e.currentValue.includes(I()));Rd(k,{get label(){return A()},get value(){return I()},get readonly(){return a()},get required(){return s()},get invalid(){return c()},get checked(){return l(P)},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onChange:({detail:{checked:O}})=>{O?p(I()):g(I())}})}}),T(S,E)},$$slots:{default:!0}})};H(v,w=>{e.options.length>l(f)?w(b):w(y,!1)})}T(t,m),le(),r()}function Wre(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(ue,"$_",n);let o=R(e,"currentValue",15),s=R(e,"required",3,!0),a=R(e,"readonly",3,!1),c=R(e,"invalid",3,!1),u=R(e,"options",7);const d=_(()=>nt(e.fieldConfig.dropdown_threshold,5));let f=oe(void 0);Re(()=>{l(f)||G(f,u()[0]?.value!==void 0?typeof u()[0]?.value:"string",!0)}),Re(()=>{!s()&&!u().some(({value:v})=>!v)&&u([{label:i()("unselected_option"),value:l(f)==="number"?null:"",searchValue:""},...u()])});var h=X(),p=D(h);{var g=v=>{ll(v,{get readonly(){return a()},get required(){return s()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return o()},set value(b){o(b)},children:(b,y)=>{var w=X(),S=D(w);st(S,17,u,({label:C,value:E,searchValue:$})=>E,(C,E)=>{let $=()=>l(E).label,k=()=>l(E).value,x=()=>l(E).searchValue;{let A=_(()=>k()===o());ur(C,{get label(){return $()},get value(){return k()},get valueType(){return l(f)},get searchValue(){return x()},get selected(){return l(A)},wrap:!0})}}),T(b,w)},$$slots:{default:!0}})},m=v=>{o9(v,{get readonly(){return a()},get required(){return s()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},onChange:({detail:{value:b}})=>{o(b)},children:(b,y)=>{var w=X(),S=D(w);st(S,17,u,({label:C,value:E})=>E,(C,E)=>{let $=()=>l(E).label,k=()=>l(E).value;{let x=_(()=>k()===o());c9(C,{get label(){return $()},get value(){return k()},get valueType(){return l(f)},get checked(){return l(x)}})}}),T(b,w)},$$slots:{default:!0}})};H(p,v=>{u().length>l(d)?v(g):v(m,!1)})}T(t,h),le(),r()}function BN(t,e){ae(e,!0);let n=R(e,"currentValue",15),r=R(e,"required",3,!0),i=R(e,"readonly",3,!1),o=R(e,"invalid",3,!1),s=R(e,"sortOptions",3,!1);const a=_(()=>e.fieldConfig.options),c=_(()=>e.fieldConfig.multiple),u=_(()=>l(c)?Vre:Wre),d=_(()=>{const p=l(a).map(g=>Xt(g)?g:{label:g,value:g});return s()&&p.sort((g,m)=>ki(g.label,m.label)),p});var f=X(),h=D(f);Jn(h,()=>JSON.stringify(l(d)),p=>{var g=X(),m=D(g);Gn(m,()=>l(u),(v,b)=>{b(v,{get locale(){return e.locale},get keyPath(){return e.keyPath},get fieldId(){return e.fieldId},get fieldConfig(){return e.fieldConfig},get readonly(){return i()},get required(){return r()},get invalid(){return o()},get options(){return l(d)},get currentValue(){return n()},set currentValue(y){n(y)}})}),T(p,g)}),T(t,f),le()}var Yre=j('<div role="none" class="wrapper"><!></div>');function Jre(t,e){ae(e,!0);let n=R(e,"currentValue",15),r=R(e,"required",3,!0),i=R(e,"readonly",3,!1),o=R(e,"invalid",3,!1);const s=_(()=>e.fieldConfig.collection),a=_(()=>e.fieldConfig.file),c=_(()=>l(a)?[o_(l(s),l(a))].filter(h=>!!h):Lo(l(s))),u=_(()=>({...e.fieldConfig,widget:"select",options:x_(e.locale,e.fieldConfig,l(c))}));var d=Yre(),f=M(d);BN(f,{get locale(){return e.locale},get keyPath(){return e.keyPath},get fieldId(){return e.fieldId},get fieldLabel(){return e.fieldLabel},get fieldConfig(){return l(u)},get readonly(){return i()},get required(){return r()},get invalid(){return o()},sortOptions:!0,get currentValue(){return n()},set currentValue(h){n(h)}}),T(t,d),le()}var Zre=j('<p dir="auto"> </p>');function Xre(t,e){ae(e,!0);const n=_(()=>e.fieldConfig.collection),r=_(()=>e.fieldConfig.file),i=_(()=>nt(e.fieldConfig.multiple,!1)),o=_(()=>nt(e.fieldConfig.value_field,"{{slug}}")),s=_(()=>Sc(e.locale)),a=_(()=>l(r)?[o_(l(n),l(r))].filter(p=>!!p):Lo(l(n))),c=_(()=>x_(e.locale,e.fieldConfig,l(a))),u=_(()=>(l(i)?e.currentValue:[e.currentValue]).filter(p=>p!==void 0).map(p=>{const g=l(c).find(m=>m.value===p)?.label;return g&&g!==p?["slug","{{slug}}","{{fields.slug}}"].includes(l(o))?g:`${g} (${p})`:p}));var d=X(),f=D(d);{var h=p=>{var g=Zre(),m=M(g);Z(v=>{Te(g,"lang",e.locale),ne(m,v),g.dir=g.dir},[()=>l(s).format(l(u))]),T(p,g)};H(f,p=>{l(u).length&&p(h)})}T(t,d),le()}var Qre=j('<p dir="auto"> </p>'),eie=j('<p dir="auto"> </p>');function tie(t,e){ae(e,!0);const n=_(()=>e.fieldConfig.options),r=_(()=>e.fieldConfig.multiple),i=_(()=>wS(l(n))),o=_(()=>Sc(e.locale)),s=f=>l(i)&&l(n).find(h=>h.value===f)?.label||String(f);var a=X(),c=D(a);{var u=f=>{var h=Qre(),p=M(h);Z(g=>{Te(h,"lang",e.locale),ne(p,g),h.dir=h.dir},[()=>l(o).format(e.currentValue.map(s).sort())]),T(f,h)},d=f=>{var h=X(),p=D(h);{var g=m=>{var v=eie(),b=M(v);Z(y=>{Te(v,"lang",e.locale),ne(b,y),v.dir=v.dir},[()=>s(e.currentValue)]),T(m,v)};H(p,m=>{e.currentValue!==void 0&&m(g)},!0)}T(f,h)};H(c,f=>{l(r)&&Array.isArray(e.currentValue)&&e.currentValue.length?f(u):f(d,!1)})}T(t,a),le()}const qN=({fieldConfig:t,value:e})=>{const{minlength:n,maxlength:r}=t,i=Number.isInteger(n)&&n<=(r??1/0),o=Number.isInteger(r)&&(n??0)<=r,s=e?[...e.trim()].length:0,a=i&&s<n,c=o&&s>r;return{count:s,hasMin:i,hasMax:o,tooShort:a,tooLong:c,invalid:a||c}};var nie=j('<div class="wrapper svelte-5qs6s0"><!> <span role="none"> </span> <!></div>');const rie={hash:"svelte-5qs6s0",code:".wrapper.svelte-5qs6s0 {flex:none;color:var(--sui-tertiary-foreground-color) !important;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);text-align:right;}.count.invalid.svelte-5qs6s0 {color:var(--sui-error-foreground-color);}.count.svelte-5qs6s0:not(.invalid) {color:var(--sui-success-foreground-color);}"};function HN(t,e){ae(e,!0),xe(t,rie);const[n,r]=ve(),i=()=>q(ue,"$_",n),o=_(()=>e.fieldConfig.minlength),s=_(()=>e.fieldConfig.maxlength),a=_(()=>qN({fieldConfig:e.fieldConfig,value:e.currentValue})),c=_(()=>l(a).count),u=_(()=>l(a).hasMin),d=_(()=>l(a).hasMax),f=_(()=>l(a).invalid);var h=X(),p=D(h);{var g=m=>{var v=nie(),b=M(v);{var y=k=>{var x=Oe();Z(()=>ne(x,`${l(o)??""}
|
|
634
634
|
/ `)),T(k,x)};H(b,k=>{l(u)&&k(y)})}var w=z(b,2);let S;var C=M(w),E=z(w,2);{var $=k=>{var x=Oe();Z(()=>ne(x,` /
|
|
635
|
-
${l(s)??""}`)),T(k,x)};H(E,k=>{l(d)&&k($)})}Z((k,x)=>{Te(v,"aria-label",k),S=rn(w,1,"count svelte-5qs6s0",null,S,x),ne(C,l(c))},[()=>i()(l(u)&&l(d)?l(c)===1?"character_counter.min_max.one":"character_counter.min_max.many":l(u)?l(c)===1?"character_counter.min.one":"character_counter.min.many":l(c)===1?"character_counter.max.one":"character_counter.max.many",{values:{count:l(c),min:l(o),max:l(s)}}),()=>({invalid:l(f)})]),T(m,v)};H(p,m=>{(l(u)||l(d))&&m(g)})}T(t,h),le(),r()}function iie(t,e){ae(e,!0);const[n,r]=ve();let i=R(e,"currentValue",15),o=R(e,"required",3,!0),s=R(e,"readonly",3,!1),a=R(e,"invalid",3,!1);const{extraHint:c}=Yn("field-editor")??{};let u=oe("");const d=_(()=>nt(e.fieldConfig.type,"text")),f=_(()=>nt(e.fieldConfig.prefix,"")),h=_(()=>nt(e.fieldConfig.suffix,"")),p=()=>{let m=typeof i()=="string"?i():"";l(f)&&m.startsWith(l(f))&&(m=m.slice(l(f).length)),l(h)&&m.endsWith(l(h))&&(m=m.slice(0,-l(h).length)),l(u)!==m&&G(u,m,!0)},g=()=>{let m=l(u).trim();m&&(l(f)||l(h))&&(m=`${l(f)}${m}${l(h)}`),i()!==m&&i(m)};Re(()=>{i(),Ce(()=>{p()})}),Re(()=>{l(u),Ce(()=>{g()})}),Re(()=>{c&&Ye(c,HN)}),Ln(t,{get lang(){return e.locale},get type(){return l(d)},get inputmode(){return l(d)},flex:!0,get readonly(){return s()},get required(){return o()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(u)},set value(m){G(u,m,!0)}}),le(),r()}const oie=t=>{if(!lv(t))return!1;const{origin:e,pathname:n,searchParams:r}=new URL(t);return!!((e==="https://www.youtube.com"||e==="https://www.youtube-nocookie.com")&&(n==="/watch"&&r.has("v")||n==="/playlist"&&r.has("list")||n.startsWith("/embed/"))||e==="https://youtu.be"&&n)},sie=t=>{const e="https://www.youtube-nocookie.com",{pathname:n,search:r,searchParams:i}=new URL(t);if(n==="/watch"){const o=new URLSearchParams(i);let s=`${e}/embed/${o.get("v")}`;return o.get("list")&&(o.delete("v"),o.set("listType","playlist"),s+=`?${o
|
|
635
|
+
${l(s)??""}`)),T(k,x)};H(E,k=>{l(d)&&k($)})}Z((k,x)=>{Te(v,"aria-label",k),S=rn(w,1,"count svelte-5qs6s0",null,S,x),ne(C,l(c))},[()=>i()(l(u)&&l(d)?l(c)===1?"character_counter.min_max.one":"character_counter.min_max.many":l(u)?l(c)===1?"character_counter.min.one":"character_counter.min.many":l(c)===1?"character_counter.max.one":"character_counter.max.many",{values:{count:l(c),min:l(o),max:l(s)}}),()=>({invalid:l(f)})]),T(m,v)};H(p,m=>{(l(u)||l(d))&&m(g)})}T(t,h),le(),r()}function iie(t,e){ae(e,!0);const[n,r]=ve();let i=R(e,"currentValue",15),o=R(e,"required",3,!0),s=R(e,"readonly",3,!1),a=R(e,"invalid",3,!1);const{extraHint:c}=Yn("field-editor")??{};let u=oe("");const d=_(()=>nt(e.fieldConfig.type,"text")),f=_(()=>nt(e.fieldConfig.prefix,"")),h=_(()=>nt(e.fieldConfig.suffix,"")),p=()=>{let m=typeof i()=="string"?i():"";l(f)&&m.startsWith(l(f))&&(m=m.slice(l(f).length)),l(h)&&m.endsWith(l(h))&&(m=m.slice(0,-l(h).length)),l(u)!==m&&G(u,m,!0)},g=()=>{let m=l(u).trim();m&&(l(f)||l(h))&&(m=`${l(f)}${m}${l(h)}`),i()!==m&&i(m)};Re(()=>{i(),Ce(()=>{p()})}),Re(()=>{l(u),Ce(()=>{g()})}),Re(()=>{c&&Ye(c,HN)}),Ln(t,{get lang(){return e.locale},get type(){return l(d)},get inputmode(){return l(d)},flex:!0,get readonly(){return s()},get required(){return o()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(u)},set value(m){G(u,m,!0)}}),le(),r()}const oie=t=>{if(!lv(t))return!1;const{origin:e,pathname:n,searchParams:r}=new URL(t);return!!((e==="https://www.youtube.com"||e==="https://www.youtube-nocookie.com")&&(n==="/watch"&&r.has("v")||n==="/playlist"&&r.has("list")||n.startsWith("/embed/"))||e==="https://youtu.be"&&n)},sie=t=>{const e="https://www.youtube-nocookie.com",{pathname:n,search:r,searchParams:i}=new URL(t);if(n==="/watch"){const o=new URLSearchParams(i);let s=`${e}/embed/${o.get("v")}`;return o.get("list")&&(o.delete("v"),o.set("listType","playlist"),s+=`?${o}`),s}return n==="/playlist"?`${e}/embed/videoseries${r}`:n.startsWith("/embed/")?`${e}${n}${r}`:`${e}/embed${n}${r}`};var aie=j('<iframe frameborder="0" allow="autoplay; encrypted-media; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-wmmi2b"></iframe>'),lie=j("<a> </a>"),cie=j('<div role="none"><!></div>');const uie={hash:"svelte-wmmi2b",code:"iframe.svelte-wmmi2b {display:block;margin:0 auto;width:100%;height:auto;aspect-ratio:16/9;}"};function die(t,e){ae(e,!0),xe(t,uie);const[n,r]=ve(),i=()=>q(ue,"$_",n);let o=oe(void 0),s=oe(!0);const a=_(()=>sie(e.url));qt(()=>{window.addEventListener("securitypolicyviolation",({blockedURI:h,violatedDirective:p})=>{h===new URL(l(a)).origin&&p==="frame-src"&&G(s,!1)})});var c=cie(),u=M(c);{var d=h=>{var p=X(),g=D(p);un(g,()=>Gc(l(o)),null,m=>{var v=aie();Z((b,y)=>{Te(v,"src",b),Te(v,"title",y)},[()=>encodeURI(l(a)),()=>i()("youtube_video_player")]),T(m,v)}),T(h,p)},f=h=>{var p=lie(),g=M(p);Z(m=>{Te(p,"href",m),ne(g,e.url)},[()=>encodeURI(e.url)]),T(h,p)};H(u,h=>{l(s)?h(d):h(f,!1)})}bt(c,h=>G(o,h),()=>l(o)),T(t,c),le(),r()}var fie=j("<a> </a>"),hie=j("<a> </a>"),pie=j('<p dir="auto"><!></p>');const gie={hash:"svelte-1dlg8zk",code:".title.svelte-1dlg8zk {font-size:var(--sui-font-size-xxx-large);font-weight:var(--sui-font-weight-bold);}"};function mie(t,e){ae(e,!0),xe(t,gie);const n=_(()=>e.fieldConfig.name),r=_(()=>nt(e.fieldConfig.type,"text"));var i=X(),o=D(i);{var s=a=>{var c=pie();let u;var d=M(c);{var f=p=>{var g=X(),m=D(g);{var v=y=>{die(y,{get url(){return e.currentValue}})},b=y=>{var w=fie(),S=M(w);Z(C=>{Te(w,"href",C),ne(S,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(y,w)};H(m,y=>{oie(e.currentValue)?y(v):y(b,!1)})}T(p,g)},h=p=>{var g=X(),m=D(g);{var v=y=>{var w=hie(),S=M(w);Z(C=>{Te(w,"href",`mailto:${C??""}`),ne(S,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(y,w)},b=y=>{var w=Oe();Z(()=>ne(w,e.currentValue)),T(y,w)};H(m,y=>{l(r)==="email"?y(v):y(b,!1)},!0)}T(p,g)};H(d,p=>{l(r)==="url"||lv(e.currentValue)?p(f):p(h,!1)})}Z(p=>{Te(c,"lang",e.locale),u=rn(c,1,"svelte-1dlg8zk",null,u,p),c.dir=c.dir},[()=>({title:l(n)==="title"})]),T(a,c)};H(o,a=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&a(s)})}T(t,i),le()}function vie(t,e){ae(e,!0);const[n,r]=ve(),{extraHint:i}=Yn("field-editor")??{};let o=R(e,"currentValue",15),s=R(e,"required",3,!0),a=R(e,"readonly",3,!1),c=R(e,"invalid",3,!1),u=oe("");const d=()=>{const h=typeof o()=="string"?o():"";l(u)!==h&&G(u,h,!0)},f=()=>{const h=l(u);o()!==h&&o(h)};Re(()=>{o(),Ce(()=>{d()})}),Re(()=>{l(u),Ce(()=>{f()})}),Re(()=>{i&&Ye(i,HN)}),bf(t,{get lang(){return e.locale},flex:!0,get readonly(){return a()},get required(){return s()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,get value(){return l(u)},set value(h){G(u,h,!0)}}),le(),r()}var bie=j('<p dir="auto" class="svelte-tzbr78"> </p>');const _ie={hash:"svelte-tzbr78",code:"p.svelte-tzbr78 {white-space:pre-wrap;}"};function yie(t,e){ae(e,!0),xe(t,_ie);var n=X(),r=D(n);{var i=o=>{var s=bie(),a=M(s);Z(()=>{Te(s,"lang",e.locale),ne(a,e.currentValue),s.dir=s.dir}),T(o,s)};H(r,o=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&o(i)})}T(t,n),le()}const GN=t=>{const{prefix:e,use_b32_encoding:n}=t,r=n?av():oi();return e?`${e}${r}`:r};function wie(t,e){ae(e,!0);const[n,r]=ve(),i=()=>q(tt,"$entryDraft",n);let o=R(e,"currentValue",15),s=R(e,"required",3,!0),a=R(e,"readonly",3,!0),c=R(e,"invalid",3,!1);const u=_(()=>i()?.collection),d=_(()=>i()?.collectionFile),f=_(()=>(l(d)??l(u))?._i18n??so),h=_(()=>l(f).defaultLocale);qt(()=>{o()||(e.locale===l(h)||[!0,"translate"].includes(e.fieldConfig?.i18n??!1))&&o(GN(e.fieldConfig)),"read_only"in e.fieldConfig&&nh("uuid_read_only")});{let p=_(()=>a()&&e.fieldConfig.read_only!==!1);Ln(t,{flex:!0,get readonly(){return l(p)},get required(){return s()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return o()},set value(g){o(g)}})}le(),r()}var xie=j('<p class="svelte-1e2mlgo"> </p>');const kie={hash:"svelte-1e2mlgo",code:"p.svelte-1e2mlgo {font-family:var(--sui-font-family-monospace);}"};function Sie(t,e){ae(e,!0),xe(t,kie);var n=X(),r=D(n);{var i=o=>{var s=xie(),a=M(s);Z(()=>ne(a,e.currentValue)),T(o,s)};H(r,o=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&o(i)})}T(t,n),le()}const A0={boolean:zee,code:Bee,color:Yee,compute:Qee,datetime:ote,file:TN,image:TN,keyvalue:pne,list:Yne,map:hre,markdown:Nre,number:Dre,object:Gre,relation:Jre,select:BN,string:iie,text:vie,uuid:wie},KN={boolean:jee,code:Hee,color:Xee,compute:tte,datetime:ate,file:CN,image:CN,keyvalue:bne,list:are,map:mre,markdown:Fre,number:zre,object:Kre,relation:Xre,select:tie,string:mie,text:yie,uuid:Sie},VN=({locale:t,isDefaultLocale:e,keyPath:n,getFieldArgs:r,currentValues:i,reset:o=!1})=>{const{valueMap:s={}}=r;Object.entries(s).forEach(([a,c])=>{if(!n||a.startsWith(n)){const u=mn({...r,keyPath:a});(e||[!0,"translate"].includes(u?.i18n??!1))&&(o?delete i[t][a]:i[t][a]=c)}})},Eie=({draft:t,keyPath:e,locale:n})=>{const{collection:r,collectionName:i,collectionFile:o,fileName:s,currentValues:a,originalValues:c,isIndexFile:u}=t,{defaultLocale:d}=(o??r)._i18n,h={keyPath:e,locale:n,isDefaultLocale:n===d,currentValues:a},p={collectionName:i,fileName:s,keyPath:"",isIndexFile:u};VN({...h,getFieldArgs:{...p,valueMap:a[n]},reset:!0}),VN({...h,getFieldArgs:{...p,valueMap:c[n]}})},$0=({locale:t="",keyPath:e=""}={})=>{const n=se(tt),{collection:r,collectionFile:i,currentValues:o}=n,{allLocales:s}=(i??r)._i18n;(t?[t]:s).forEach(c=>{Eie({draft:n,keyPath:e,locale:c})}),tt.update(()=>({...n,currentValues:o}))};var Tie=j('<div class="required">*</div>'),Cie=j("<!> <!>",1),Aie=j('<p class="comment svelte-fi4yum"><!></p>'),$ie=j("<!> <!> <!> <!> <!> <!> <!>",1),Iie=j('<div role="none"> </div>'),Pie=j('<div role="none" class="before-input svelte-fi4yum"><!></div>'),Nie=j('<div role="none" class="prefix svelte-fi4yum"> </div>'),Lie=j('<div role="none" class="suffix svelte-fi4yum"> </div>'),Oie=j('<div role="none" class="after-input svelte-fi4yum"><!></div>'),Rie=j("<!> <!> <!> <!> <!>",1),Fie=j('<p class="hint svelte-fi4yum"><!></p>'),Die=j('<div role="none" class="footer svelte-fi4yum"><!> <!></div>'),Mie=j('<header role="none"><h4 role="none"> </h4> <!> <!> <!> <!></header> <!> <!> <div role="none"><!></div> <!>',1);const zie={hash:"svelte-fi4yum",code:`.widget-wrapper.has-extra-labels.svelte-fi4yum {display:flex;align-items:center;justify-content:flex-start;gap:4px;}.widget-wrapper.svelte-fi4yum :is(input[type=text], textarea) {width:100%;}.widget-wrapper.svelte-fi4yum input:is([type=color], [type=number]) {outline:0;border-width:1px;border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius);height:var(--sui-button-medium-height);color:inherit;background-color:var(--sui-textbox-background-color);}.widget-wrapper.svelte-fi4yum input:is([type=file], [type=checkbox]) {color:inherit;}.widget-wrapper.svelte-fi4yum > div {color:inherit;}.widget-wrapper.svelte-fi4yum input:is([type=date], [type=datetime-local], [type=time]) {outline:0;margin:var(--sui-focus-ring-width);border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius);padding:var(--sui-textbox-singleline-padding);width:auto;height:var(--sui-textbox-height);color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);text-transform:uppercase;}.widget-wrapper.svelte-fi4yum input:is([type=date], [type=datetime-local], [type=time]):disabled {opacity:0.4;}.widget-wrapper.svelte-fi4yum input[aria-invalid=true]:is([type=color],
|
|
636
636
|
[type=date],
|
|
637
637
|
[type=datetime-local],
|
|
638
638
|
[type=time]) {border-color:var(--sui-error-border-color);}.widget-wrapper.svelte-fi4yum input:read-only {-webkit-user-select:text;user-select:text;pointer-events:auto;}.before-input.svelte-fi4yum,
|