var Et=Object.defineProperty;var Ie=n=>{throw TypeError(n)};var At=(n,e,t)=>e in n?Et(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var v=(n,e,t)=>At(n,typeof e!="symbol"?e+"":e,t),_e=(n,e,t)=>e.has(n)||Ie("Cannot "+t);var d=(n,e,t)=>(_e(n,e,"read from private field"),t?t.call(n):e.get(n)),L=(n,e,t)=>e.has(n)?Ie("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),A=(n,e,t,i)=>(_e(n,e,"write to private field"),i?i.call(n,t):e.set(n,t),t),H=(n,e,t)=>(_e(n,e,"access private method"),t);import{s as jt,d as Rt,u as ge,a as Ze,r as re,o as xt,_ as Pt,b as Ct,c as ie,n as St,F as Ot,e as q,f as le,g as ke,w as Me,T as Xe,h as Ve,i as ne,t as Nt,j as Je,k as Lt,l as Be,m as et,p as qt,q as $t,v as It,x as kt,y as tt}from"./1dSkXi3a.js";import{_ as Mt}from"./DlAUqK2U.js";import{loadDatabaseAdapter as Z}from"./BF2QPEks.js";import{r as Xt}from"./BFCngiV1.js";const Vt=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Bt=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",K=[];class Dt{constructor(){v(this,"_data",new J);v(this,"_hash",new J([...Vt]));v(this,"_nDataBytes",0);v(this,"_minBufferSize",0)}finalize(e){e&&this._append(e);const t=this._nDataBytes*8,i=this._data.sigBytes*8;return this._data.words[i>>>5]|=128<<24-i%32,this._data.words[(i+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(i+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){const i=this._hash.words;let r=i[0],s=i[1],o=i[2],a=i[3],p=i[4],l=i[5],h=i[6],g=i[7];for(let u=0;u<64;u++){if(u<16)K[u]=e[t+u]|0;else{const _=K[u-15],x=(_<<25|_>>>7)^(_<<14|_>>>18)^_>>>3,C=K[u-2],E=(C<<15|C>>>17)^(C<<13|C>>>19)^C>>>10;K[u]=x+K[u-7]+E+K[u-16]}const y=p&l^~p&h,m=r&s^r&o^s&o,c=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),f=(p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25),b=g+f+y+Bt[u]+K[u],w=c+m;g=h,h=l,l=p,p=a+b|0,a=o,o=s,s=r,r=b+w|0}i[0]=i[0]+r|0,i[1]=i[1]+s|0,i[2]=i[2]+o|0,i[3]=i[3]+a|0,i[4]=i[4]+p|0,i[5]=i[5]+l|0,i[6]=i[6]+h|0,i[7]=i[7]+g|0}_append(e){typeof e=="string"&&(e=J.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,i=this._data.sigBytes/64;e?i=Math.ceil(i):i=Math.max((i|0)-this._minBufferSize,0);const r=i*16,s=Math.min(r*4,this._data.sigBytes);if(r){for(let o=0;o>>2]|=(t.charCodeAt(s)&255)<<24-s%4*8;return new J(r,i)}toBase64(){const e=[];for(let t=0;t>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,s=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,o=i<<16|r<<8|s;for(let a=0;a<4&&t*8+a*6>>6*(3-a)&63))}return e.join("")}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=i<<24-(this.sigBytes+t)%4*8}else for(let t=0;t>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}}function Ut(n){return new Dt().finalize(n).toBase64()}function Ft(n){return Ut(jt(n))}const Wt={key:0},zt={key:0},Kt={id:"__preview_loader"},Qt=Rt({__name:"ContentPreviewMode",props:{previewToken:{type:String,required:!0},api:{type:String,required:!0},initializePreview:{type:Function,required:!0}},setup(n){const e=n,t=["__nuxt_preview","__preview_enabled"],i=ge(),r=Ze(),s=re(!0),o=re(!1),a=re(!1),p=re("");let l;const h=async()=>{Ve("previewToken").value="",window.sessionStorage.removeItem("previewToken"),window.sessionStorage.removeItem("previewAPI"),await r.replace({query:{preview:void 0}}),window.location.reload()},g=async u=>{await e.initializePreview(u),Ve("previewToken").value&&(a.value=!0,await r.replace({query:{}}),i.callHook("nuxt-content:preview:ready"),window.parent&&window.self!==window.parent&&l.disconnect())};return xt(async()=>{l=(await Pt(()=>import("./Bdwe7WLq.js"),[],import.meta.url)).connect(`${e.api}/preview`,{transports:["websocket","polling"],auth:{token:e.previewToken}});let y;l.on("connect",()=>{y=setTimeout(()=>{a.value||(y=setTimeout(()=>{p.value="Preview sync timed out",a.value=!1},3e4),l.emit("draft:requestSync"))},3e4)});const m=()=>{y&&(clearTimeout(y),y=null)};l.on("draft:sync",async c=>{if(m(),!c){try{l.once("draft:ready",()=>{l.emit("draft:requestSync")}),await $fetch("api/projects/preview/sync",{baseURL:e.api,method:"POST",params:{token:e.previewToken}})}catch(f){switch(m(),f.response.status){case 404:p.value="Preview draft not found",a.value=!1;break;default:p.value="An error occurred while syncing preview",a.value=!1}}return}g(c)}),l.on("draft:unauthorized",()=>{m(),p.value="Unauthorized preview",a.value=!1}),l.on("disconnect",()=>{m()}),document.body.classList.add(...t)}),Ct(()=>{document.body.classList.remove(...t)}),(u,y)=>(ne(),ie("div",null,[s.value?(ne(),ie("div",{key:0,id:"__nuxt_preview",class:St({__preview_ready:a.value,__preview_refreshing:o.value})},[a.value?(ne(),ie(Ot,{key:0},[y[0]||(y[0]=q("svg",{viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[q("path",{d:"M50.0016 71.0999h29.2561c.9293.0001 1.8422-.241 2.6469-.6992.8047-.4582 1.4729-1.1173 1.9373-1.9109.4645-.7936.7088-1.6939.7083-2.6102-.0004-.9162-.2455-1.8163-.7106-2.6095L64.192 29.713c-.4644-.7934-1.1325-1.4523-1.937-1.9105-.8046-.4581-1.7173-.6993-2.6463-.6993-.9291 0-1.8418.2412-2.6463.6993-.8046.4582-1.4726 1.1171-1.937 1.9105l-5.0238 8.5861-9.8224-16.7898c-.4648-.7934-1.1332-1.4522-1.938-1.9102-.8047-.4581-1.7176-.6992-2.6468-.6992-.9292 0-1.842.2411-2.6468.6992-.8048.458-1.4731 1.1168-1.9379 1.9102L6.56062 63.2701c-.46512.7932-.71021 1.6933-.71061 2.6095-.00041.9163.24389 1.8166.70831 2.6102.46443.7936 1.1326 1.4527 1.93732 1.9109.80473.4582 1.71766.6993 2.64686.6992h18.3646c7.2763 0 12.6422-3.1516 16.3345-9.3002l8.9642-15.3081 4.8015-8.1925 14.4099 24.6083H54.8058l-4.8042 8.1925ZM29.2077 62.899l-12.8161-.0028L35.603 30.0869l9.5857 16.4047-6.418 10.9645c-2.4521 3.9894-5.2377 5.4429-9.563 5.4429Z",fill:"currentColor"})],-1)),y[1]||(y[1]=q("span",null,"Preview enabled",-1)),q("button",{onClick:h}," Close ")],64)):le("",!0)],2)):le("",!0),ke(Xe,{name:"preview-loading"},{default:Me(()=>[s.value&&!a.value&&!p.value?(ne(),ie("div",Wt,[y[4]||(y[4]=q("div",{id:"__preview_background"},null,-1)),q("div",{id:"__preview_loader"},[y[2]||(y[2]=q("svg",{id:"__preview_loading_icon",width:"32",height:"32",viewBox:"0 0 24 24"},[q("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 0 0 4.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 0 1-15.357-2m15.357 2H15"})],-1)),y[3]||(y[3]=q("p",null,"Initializing the preview...",-1)),q("button",{onClick:h}," Cancel ")])])):le("",!0)]),_:1}),ke(Xe,{name:"preview-loading"},{default:Me(()=>[p.value?(ne(),ie("div",zt,[y[5]||(y[5]=q("div",{id:"__preview_background"},null,-1)),q("div",Kt,[q("p",null,Nt(p.value),1),q("button",{onClick:h}," Exit preview ")])])):le("",!0)]),_:1})]))}}),Yt=Object.assign(Mt(Qt,[["__scopeId","data-v-fe7b0813"]]),{__name:"ContentPreviewMode"}),Gt=/^[A-Za-z]:\//;function ye(n=""){return n&&n.replace(/\\/g,"/").replace(Gt,e=>e.toUpperCase())}const Zt=/^[/\\]{2}/,Jt=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,it=/^[A-Za-z]:$/,ei=/.(\.[^./]+|\.)$/,ti=/^[/\\]|^[a-zA-Z]:[/\\]/,ii=function(n){if(n.length===0)return".";n=ye(n);const e=n.match(Zt),t=Ae(n),i=n[n.length-1]==="/";return n=ni(n,!t),n.length===0?t?"/":i?"./":".":(i&&(n+="/"),it.test(n)&&(n+="/"),e?t?`//${n}`:`//./${n}`:t&&!Ae(n)?`/${n}`:n)},nt=function(...n){let e="";for(const t of n)if(t)if(e.length>0){const i=e[e.length-1]==="/",r=t[0]==="/";i&&r?e+=t.slice(1):e+=i||r?t:`/${t}`}else e+=t;return ii(e)};function ni(n,e){let t="",i=0,r=-1,s=0,o=null;for(let a=0;a<=n.length;++a){if(a2){const p=t.lastIndexOf("/");p===-1?(t="",i=0):(t=t.slice(0,p),i=t.length-1-t.lastIndexOf("/")),r=a,s=0;continue}else if(t.length>0){t="",i=0,r=a,s=0;continue}}e&&(t+=t.length>0?"/..":"..",i=2)}else t.length>0?t+=`/${n.slice(r+1,a)}`:t=n.slice(r+1,a),i=a-r-1;r=a,s=0}else o==="."&&s!==-1?++s:s=-1}return t}const Ae=function(n){return Jt.test(n)},si=function(n){if(n==="..")return"";const e=ei.exec(ye(n));return e&&e[1]||""},st=function(n){const e=ye(n).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&it.test(e[0])&&(e[0]+="/"),e.join("/")||(Ae(n)?"/":".")},ri=function(n,e){const t=ye(n).split("/");let i="";for(let r=t.length-1;r>=0;r--){const s=t[r];if(s){i=s;break}}return e&&i.endsWith(e)?i.slice(0,-e.length):i},oi=function(n){var r,s;const e=((s=(r=ti.exec(n))==null?void 0:r[0])==null?void 0:s.replace(/\\/g,"/"))||"",t=ri(n),i=si(t);return{root:e,dir:st(n),base:t,ext:i,name:t.slice(0,t.length-i.length)}},B={appConfig:"app.config.ts",appConfigV4:"app/app.config.ts",nuxtConfig:"nuxt.config.ts"};function he(n){return n!=null&&n.startsWith("content/")?n.split("/").slice(1).join("/"):Je(n)}function be(n){const e=he(n);return nt(st(e),oi(e).name)}function ai(n=[],e,t){const i=[...e||[]],r=[...t||[]],s=JSON.parse(JSON.stringify(n));for(const a of i)if(a.new)s.push({path:a.path,parsed:a.parsed});else if(a.oldPath)if(r.splice(r.findIndex(l=>l.path===a.oldPath),1),i.find(l=>l.path===a.oldPath))s.push({path:a.path,parsed:a.parsed});else{const l=s.find(h=>h.path===a.oldPath);l&&(l.path=a.path,a.parsed?l.parsed=a.parsed:a.pathMeta&&["_file","_path","_id","_locale"].forEach(h=>{l.parsed[h]=a.pathMeta[h]}))}else{const p=s.find(l=>l.path===a.path);p?Object.assign(p,{path:a.path,parsed:a.parsed}):s.push({path:a.path,parsed:a.parsed})}for(const a of r)s.splice(s.findIndex(p=>p.path===a.path),1);const o=new Intl.Collator(void 0,{numeric:!0});return s.sort((a,p)=>o.compare(a.path,p.path)),s}const pi=Lt((n,e,t)=>{if(Array.isArray(n[e])&&Array.isArray(t))return n[e]=t,!0}),li=n=>{let e;return t=>(e||(e=n()),e)};function rt(n,e){for(const t in n){const i=e[t];t in e||delete n[t],i!==null&&typeof i=="object"&&rt(n[t],e[t])}}function ot(n,e){for(const t in e){const i=e[t];i!==null&&typeof i=="object"?Array.isArray(i)&&Array.isArray(n[t])?n[t]=i:(n[t]=n[t]||{},ot(n[t],i)):n[t]=i}}function at(n){const[e,...t]=n.include.includes("*")?n.include.split("*"):["",n.include];return{fixed:e||"",dynamic:"*"+t.join("*")}}const pt=(n,e,t)=>{const{fixed:i}=at(t);if(!n.parsed)return;const r=n.parsed._path.substring(i.length),s=nt((t==null?void 0:t.prefix)||"",r),o={id:n.parsed._id,stem:n.parsed._stem,meta:{},extension:n.parsed._extension,path:s},a=e.schema.definitions[e.name].properties;return Object.keys(n.parsed).forEach(p=>{p in a?o[p]=n.parsed[p]:o.meta[p]=n.parsed[p]}),o};function ci(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var we,He;function di(){if(He)return we;He=1,we=n;function n(i,r,s){i instanceof RegExp&&(i=e(i,s)),r instanceof RegExp&&(r=e(r,s));var o=t(i,r,s);return o&&{start:o[0],end:o[1],pre:s.slice(0,o[0]),body:s.slice(o[0]+i.length,o[1]),post:s.slice(o[1]+r.length)}}function e(i,r){var s=r.match(i);return s?s[0]:null}n.range=t;function t(i,r,s){var o,a,p,l,h,g=s.indexOf(i),u=s.indexOf(r,g+1),y=g;if(g>=0&&u>0){if(i===r)return[g,u];for(o=[],p=s.length;y>=0&&!h;)y==g?(o.push(y),g=s.indexOf(i,y+1)):o.length==1?h=[o.pop(),u]:(a=o.pop(),a=0?g:u;o.length&&(h=[p,l])}return h}return we}var ve,De;function hi(){if(De)return ve;De=1;var n=di();ve=h;var e="\0SLASH"+Math.random()+"\0",t="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",r="\0COMMA"+Math.random()+"\0",s="\0PERIOD"+Math.random()+"\0";function o(f){return parseInt(f,10)==f?parseInt(f,10):f.charCodeAt(0)}function a(f){return f.split("\\\\").join(e).split("\\{").join(t).split("\\}").join(i).split("\\,").join(r).split("\\.").join(s)}function p(f){return f.split(e).join("\\").split(t).join("{").split(i).join("}").split(r).join(",").split(s).join(".")}function l(f){if(!f)return[""];var b=[],w=n("{","}",f);if(!w)return f.split(",");var _=w.pre,x=w.body,C=w.post,E=_.split(",");E[E.length-1]+="{"+x+"}";var k=l(C);return C.length&&(E[E.length-1]+=k.shift(),E.push.apply(E,k)),b.push.apply(b,E),b}function h(f){return f?(f.substr(0,2)==="{}"&&(f="\\{\\}"+f.substr(2)),c(a(f),!0).map(p)):[]}function g(f){return"{"+f+"}"}function u(f){return/^-?0\d/.test(f)}function y(f,b){return f<=b}function m(f,b){return f>=b}function c(f,b){var w=[],_=n("{","}",f);if(!_)return[f];var x=_.pre,C=_.post.length?c(_.post,!1):[""];if(/\$$/.test(_.pre))for(var E=0;E=0;if(!pe&&!_t)return _.post.match(/,.*\}/)?(f=_.pre+"{"+_.body+i+_.post,c(f)):[f];var O;if(pe)O=_.body.split(/\.\./);else if(O=l(_.body),O.length===1&&(O=c(O[0],!1).map(g),O.length===1))return C.map(function(Tt){return _.pre+O[0]+Tt});var W;if(pe){var Se=o(O[0]),Oe=o(O[1]),bt=Math.max(O[0].length,O[1].length),Ne=O.length==3?Math.abs(o(O[2])):1,Le=y,wt=Oe0){var $e=new Array(qe+1).join("0");te<0?M="-"+$e+M.slice(1):M=$e+M}}W.push(M)}}else{W=[];for(var z=0;z{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>gi)throw new TypeError("pattern is too long")},yi={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},se=n=>n.replace(/[[\]\\-]/g,"\\$&"),mi=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ue=n=>n.join(""),_i=(n,e)=>{const t=e;if(n.charAt(t)!=="[")throw new Error("not in a brace expression");const i=[],r=[];let s=t+1,o=!1,a=!1,p=!1,l=!1,h=t,g="";e:for(;sg?i.push(se(g)+"-"+se(c)):c===g&&i.push(se(c)),g="",s++;continue}if(n.startsWith("-]",s+1)){i.push(se(c+"-")),s+=2;continue}if(n.startsWith("-",s+1)){g=c,s+=2;continue}i.push(se(c)),s++}if(he?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),bi=new Set(["!","?","+","*","@"]),Fe=n=>bi.has(n),wi="(?!(?:^|/)\\.\\.?(?:$|/))",Te="(?!\\.)",vi=new Set(["[","."]),Ti=new Set(["..","."]),Ei=new Set("().*{}+?[]^$\\!"),Ai=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Pe="[^/]",We=Pe+"*?",ze=Pe+"+?";var P,S,V,T,R,D,Q,U,X,Y,ae,G,lt,F,ce,je,ct;const N=class N{constructor(e,t,i={}){L(this,G);v(this,"type");L(this,P);L(this,S);L(this,V,!1);L(this,T,[]);L(this,R);L(this,D);L(this,Q);L(this,U,!1);L(this,X);L(this,Y);L(this,ae,!1);this.type=e,e&&A(this,S,!0),A(this,R,t),A(this,P,d(this,R)?d(d(this,R),P):this),A(this,X,d(this,P)===this?i:d(d(this,P),X)),A(this,Q,d(this,P)===this?[]:d(d(this,P),Q)),e==="!"&&!d(d(this,P),U)&&d(this,Q).push(this),A(this,D,d(this,R)?d(d(this,R),T).length:0)}get hasMagic(){if(d(this,S)!==void 0)return d(this,S);for(const e of d(this,T))if(typeof e!="string"&&(e.type||e.hasMagic))return A(this,S,!0);return d(this,S)}toString(){return d(this,Y)!==void 0?d(this,Y):this.type?A(this,Y,this.type+"("+d(this,T).map(e=>String(e)).join("|")+")"):A(this,Y,d(this,T).map(e=>String(e)).join(""))}push(...e){for(const t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof N&&d(t,R)===this))throw new Error("invalid part: "+t);d(this,T).push(t)}}toJSON(){var t;const e=this.type===null?d(this,T).slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...d(this,T).map(i=>i.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===d(this,P)||d(d(this,P),U)&&((t=d(this,R))==null?void 0:t.type)==="!")&&e.push({}),e}isStart(){var t;if(d(this,P)===this)return!0;if(!((t=d(this,R))!=null&&t.isStart()))return!1;if(d(this,D)===0)return!0;const e=d(this,R);for(let i=0;i{var _;const[c,f,b,w]=typeof m=="string"?H(_=N,F,ct).call(_,m,d(this,S),l):m.toRegExpSource(e);return A(this,S,d(this,S)||b),A(this,V,d(this,V)||w),c}).join("");let g="";if(this.isStart()&&typeof d(this,T)[0]=="string"&&!(d(this,T).length===1&&Ti.has(d(this,T)[0]))){const c=vi,f=t&&c.has(h.charAt(0))||h.startsWith("\\.")&&c.has(h.charAt(2))||h.startsWith("\\.\\.")&&c.has(h.charAt(4)),b=!t&&!e&&c.has(h.charAt(0));g=f?wi:b?Te:""}let u="";return this.isEnd()&&d(d(this,P),U)&&((p=d(this,R))==null?void 0:p.type)==="!"&&(u="(?:$|\\/)"),[g+h+u,oe(h),A(this,S,!!d(this,S)),d(this,V)]}const i=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:";let s=H(this,G,je).call(this,t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){const l=this.toString();return A(this,T,[l]),this.type=null,A(this,S,void 0),[l,oe(this.toString()),!1,!1]}let o=!i||e||t?"":H(this,G,je).call(this,!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&d(this,ae))a=(this.isStart()&&!t?Te:"")+ze;else{const l=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Te:"")+We+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=r+s+l}return[a,oe(s),A(this,S,!!d(this,S)),d(this,V)]}};P=new WeakMap,S=new WeakMap,V=new WeakMap,T=new WeakMap,R=new WeakMap,D=new WeakMap,Q=new WeakMap,U=new WeakMap,X=new WeakMap,Y=new WeakMap,ae=new WeakMap,G=new WeakSet,lt=function(){if(this!==d(this,P))throw new Error("should only call on root");if(d(this,U))return this;this.toString(),A(this,U,!0);let e;for(;e=d(this,Q).pop();){if(e.type!=="!")continue;let t=e,i=d(t,R);for(;i;){for(let r=d(t,D)+1;!i.type&&r{if(typeof t=="string")throw new Error("string type in extglob ast??");const[i,r,s,o]=t.toRegExpSource(e);return A(this,V,d(this,V)||o),i}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")},ct=function(e,t,i=!1){let r=!1,s="",o=!1;for(let a=0;ae?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");var Ee={};const j=(n,e,t={})=>(fe(e),!t.nocomment&&e.charAt(0)==="#"?!1:new me(e,t).match(n)),Ri=/^\*+([^+@!?\*\[\(]*)$/,xi=n=>e=>!e.startsWith(".")&&e.endsWith(n),Pi=n=>e=>e.endsWith(n),Ci=n=>(n=n.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(n)),Si=n=>(n=n.toLowerCase(),e=>e.toLowerCase().endsWith(n)),Oi=/^\*+\.\*+$/,Ni=n=>!n.startsWith(".")&&n.includes("."),Li=n=>n!=="."&&n!==".."&&n.includes("."),qi=/^\.\*+$/,$i=n=>n!=="."&&n!==".."&&n.startsWith("."),Ii=/^\*+$/,ki=n=>n.length!==0&&!n.startsWith("."),Mi=n=>n.length!==0&&n!=="."&&n!=="..",Xi=/^\?+([^+@!?\*\[\(]*)?$/,Vi=([n,e=""])=>{const t=dt([n]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},Bi=([n,e=""])=>{const t=ht([n]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},Hi=([n,e=""])=>{const t=ht([n]);return e?i=>t(i)&&i.endsWith(e):t},Di=([n,e=""])=>{const t=dt([n]);return e?i=>t(i)&&i.endsWith(e):t},dt=([n])=>{const e=n.length;return t=>t.length===e&&!t.startsWith(".")},ht=([n])=>{const e=n.length;return t=>t.length===e&&t!=="."&&t!==".."},ft=typeof process=="object"&&process?typeof Ee=="object"&&Ee&&Ee.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Ke={win32:{sep:"\\"},posix:{sep:"/"}},Ui=ft==="win32"?Ke.win32.sep:Ke.posix.sep;j.sep=Ui;const I=Symbol("globstar **");j.GLOBSTAR=I;const Fi="[^/]",Wi=Fi+"*?",zi="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Ki="(?:(?!(?:\\/|^)\\.).)*?",Qi=(n,e={})=>t=>j(t,n,e);j.filter=Qi;const $=(n,e={})=>Object.assign({},n,e),Yi=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return j;const e=j;return Object.assign((i,r,s={})=>e(i,r,$(n,s)),{Minimatch:class extends e.Minimatch{constructor(r,s={}){super(r,$(n,s))}static defaults(r){return e.defaults($(n,r)).Minimatch}},AST:class extends e.AST{constructor(r,s,o={}){super(r,s,$(n,o))}static fromGlob(r,s={}){return e.AST.fromGlob(r,$(n,s))}},unescape:(i,r={})=>e.unescape(i,$(n,r)),escape:(i,r={})=>e.escape(i,$(n,r)),filter:(i,r={})=>e.filter(i,$(n,r)),defaults:i=>e.defaults($(n,i)),makeRe:(i,r={})=>e.makeRe(i,$(n,r)),braceExpand:(i,r={})=>e.braceExpand(i,$(n,r)),match:(i,r,s={})=>e.match(i,r,$(n,s)),sep:e.sep,GLOBSTAR:I})};j.defaults=Yi;const ut=(n,e={})=>(fe(n),e.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:ui(n));j.braceExpand=ut;const Gi=(n,e={})=>new me(n,e).makeRe();j.makeRe=Gi;const Zi=(n,e,t={})=>{const i=new me(e,t);return n=n.filter(r=>i.match(r)),i.options.nonull&&!n.length&&n.push(e),n};j.match=Zi;const Qe=/[?*]|[+@!]\(.*?\)|\[|\]/,Ji=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class me{constructor(e,t={}){v(this,"options");v(this,"set");v(this,"pattern");v(this,"windowsPathsNoEscape");v(this,"nonegate");v(this,"negate");v(this,"comment");v(this,"empty");v(this,"preserveMultipleSlashes");v(this,"partial");v(this,"globSet");v(this,"globParts");v(this,"nocase");v(this,"isWindows");v(this,"platform");v(this,"windowsNoMagicRoot");v(this,"regexp");fe(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||ft,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);const i=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let r=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const p=s[0]===""&&s[1]===""&&(s[2]==="?"||!Qe.test(s[2]))&&!Qe.test(s[3]),l=/^[a-z]:/i.test(s[0]);if(p)return[...s.slice(0,4),...s.slice(4).map(h=>this.parse(h))];if(l)return[s[0],...s.slice(1).map(h=>this.parse(h))]}return s.map(p=>this.parse(p))});if(this.debug(this.pattern,r),this.set=r.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let i=-1;for(;(i=t.indexOf("**",i+1))!==-1;){let r=i;for(;t[r+1]==="**";)r++;r!==i&&t.splice(i,r-i)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((i,r)=>{const s=i[i.length-1];return r==="**"&&s==="**"?i:r===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(i.pop(),i):(i.push(r),i)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;rr&&i.splice(r+1,o-r);let a=i[r+1];const p=i[r+2],l=i[r+3];if(a!==".."||!p||p==="."||p===".."||!l||l==="."||l==="..")continue;t=!0,i.splice(r,1);const h=i.slice(0);h[r]="**",e.push(h),r--}if(!this.preserveMultipleSlashes){for(let o=1;ot.length)}partsMatch(e,t,i=!1){let r=0,s=0,o=[],a="";for(;r_?t=t.slice(x):_>x&&(e=e.slice(_)))}}const{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,a=0,p=e.length,l=t.length;o>> no match, partial?`,e,u,t,y),u===p))}let c;if(typeof h=="string"?(c=g===h,this.debug("string match",h,g,c)):(c=h.test(g),this.debug("pattern match",h,g,c)),!c)return!1}if(o===p&&a===l)return!0;if(o===p)return i;if(a===l)return o===p-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return ut(this.pattern,this.options)}parse(e){fe(e);const t=this.options;if(e==="**")return I;if(e==="")return"";let i,r=null;(i=e.match(Ii))?r=t.dot?Mi:ki:(i=e.match(Ri))?r=(t.nocase?t.dot?Si:Ci:t.dot?Pi:xi)(i[1]):(i=e.match(Xi))?r=(t.nocase?t.dot?Bi:Vi:t.dot?Hi:Di)(i):(i=e.match(Oi))?r=t.dot?Li:Ni:(i=e.match(qi))&&(r=$i);const s=ue.fromGlob(e,this.options).toMMPattern();return r&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:r}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,i=t.noglobstar?Wi:t.dot?zi:Ki,r=new Set(t.nocase?["i"]:[]);let s=e.map(p=>{const l=p.map(h=>{if(h instanceof RegExp)for(const g of h.flags.split(""))r.add(g);return typeof h=="string"?Ji(h):h===I?I:h._src});return l.forEach((h,g)=>{const u=l[g+1],y=l[g-1];h!==I||y===I||(y===void 0?u!==void 0&&u!==I?l[g+1]="(?:\\/|"+i+"\\/)?"+u:l[g]=i:u===void 0?l[g-1]=y+"(?:\\/|"+i+")?":u!==I&&(l[g-1]=y+"(?:\\/|\\/"+i+"\\/)"+u,l[g+1]=I))}),l.filter(h=>h!==I).join("/")}).join("|");const[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;const i=this.options;this.isWindows&&(e=e.split("\\").join("/"));const r=this.slashSplit(e);this.debug(this.pattern,"split",r);const s=this.set;this.debug(this.pattern,"set",s);let o=r[r.length-1];if(!o)for(let a=r.length-2;!o&&a>=0;a--)o=r[a];for(let a=0;a{let t;return{collection:Object.values(e).find(r=>{if(!r.source||r.source.length===0)return;const s=he(n);return(s==="/"?["index.yml","index.yaml","index.md","index.json"]:[s]).some(a=>(t=r.source.find(p=>{var l;return j(a,p.include)&&!((l=p.exclude)!=null&&l.some(h=>j(a,h)))}),t))}),matchedSource:t}},tn=(n,e)=>{let t;return{collection:Object.values(e).find(r=>{if(!(!r.source||r.source.length===0))return t=r.source.find(s=>{var h;if(!s.prefix||!n.startsWith(s.prefix))return;if(n==="/"||n===s.prefix){const g=["index.yml","index.yaml","index.md","index.json"];return(n==="/"?g:g.map(y=>Je(Be(s.prefix,y)))).some(y=>r.source.find(m=>{var c;return j(y,m.include)&&!((c=m.exclude)!=null&&c.some(f=>j(y,f)))}))}const o=n.substring(s.prefix.length),{fixed:a}=at(s),p=Be(a,o),l=g=>g.replace(/\.[^/.]+$/,"");return j(p,l(s.include))&&!((h=s.exclude)!=null&&h.some(g=>j(p,l(g))))}),t}),matchedSource:t}};function gt(n,e){const t=sn(n,e);let i=0;return`INSERT INTO ${n.tableName} VALUES (${"?, ".repeat(t.length).slice(0,-2)})`.replace(/\?/g,()=>t[i++])}function nn(n,e,t){const i=yt(n,e),r=gt(n,t);return`${i}; ${r}`}function yt(n,e){return`DELETE FROM ${n.tableName} WHERE stem = '${e}';`}function Ye(n,e,t){return`SELECT * FROM ${n.tableName} WHERE ${e} = '${t}';`}function sn(n,e){const t=[],i=n.schema.definitions[n.name].properties;return en(i).forEach(s=>{const o=i[s],a=o.type,p=o.default!==void 0?o.default:"NULL",l=typeof e[s]<"u"?e[s]:p;n.fields[s]==="json"?t.push(`'${JSON.stringify(l).replace(/'/g,"''")}'`):["string","enum"].includes(a)?t.push(`'${String(l).replace(/\n/g,"\\n").replace(/'/g,"''")}'`):t.push(l)}),t.push(`'${Ft(t)}'`),t}const rn=["https://nuxt.studio","https://dev.nuxt.studio"],ee={content_en:{name:"content_en",pascalName:"ContentEn",tableName:"_content_content_en",source:[{_resolved:!0,prefix:"/en",include:"en/**/*.md",exclude:["en/articles/*.md"],cwd:"/vercel/path0/content"}],type:"page",fields:{id:"string",stem:"string",extension:"string",meta:"json",path:"string",title:"string",description:"string",seo:"json",body:"json",navigation:"json",sitemap:"json",robots:"json",head:"json",schemaOrg:"json",ogImage:"json",date:"string"},schema:{$ref:"#/definitions/content_en",definitions:{content_en:{type:"object",properties:{id:{type:"string"},stem:{type:"string"},extension:{type:"string",enum:["md","yaml","yml","json","csv","xml"]},meta:{type:"object",additionalProperties:{}},path:{type:"string"},title:{type:"string",minLength:1},description:{type:"string",minLength:1},seo:{allOf:[{type:"object",properties:{title:{type:"string"},description:{type:"string"}}},{type:"object",additionalProperties:{}}],default:{}},body:{type:"object",properties:{type:{type:"string"},children:{},toc:{}},required:["type"],additionalProperties:!1},navigation:{anyOf:[{type:"boolean"},{type:"object",properties:{title:{type:"string"},description:{type:"string"},icon:{type:"string"}},required:["title","description","icon"],additionalProperties:!1}],default:!0},sitemap:{type:"object",properties:{loc:{type:"string"},lastmod:{type:"string",format:"date-time"},changefreq:{type:"string",enum:["always","hourly","daily","weekly","monthly","yearly","never"]},priority:{type:"number"},images:{type:"array",items:{type:"object",properties:{loc:{type:"string"},caption:{type:"string"},geo_location:{type:"string"},title:{type:"string"},license:{type:"string"}},required:["loc"],additionalProperties:!1}},videos:{type:"array",items:{type:"object",properties:{content_loc:{type:"string"},player_loc:{type:"string"},duration:{type:"string"},expiration_date:{type:"string",format:"date-time"},rating:{type:"number"},view_count:{type:"number"},publication_date:{type:"string",format:"date-time"},family_friendly:{type:"boolean"},tag:{type:"string"},category:{type:"string"},restriction:{type:"object",properties:{relationship:{type:"string",const:"allow"},value:{type:"string"}},additionalProperties:!1},gallery_loc:{type:"string"},price:{type:"string"},requires_subscription:{type:"boolean"},uploader:{type:"string"}},required:["content_loc"],additionalProperties:!1}}},additionalProperties:!1},robots:{type:["string","boolean"]},head:{type:"object",properties:{meta:{type:"array",items:{anyOf:[{not:{}},{type:"object",additionalProperties:{}}]}},script:{type:"array",items:{anyOf:[{not:{}},{type:"object",additionalProperties:{}}]}}},required:["meta","script"],additionalProperties:!1},schemaOrg:{anyOf:[{type:"object",additionalProperties:{}},{anyOf:[{not:{}},{type:"array",items:{$ref:"#/definitions/content_en/properties/schemaOrg/anyOf/0"}}]}]},ogImage:{type:"object",properties:{url:{type:"string"},component:{type:"string"},props:{type:"object",additionalProperties:{}}},required:["props"],additionalProperties:!1},date:{type:"string",minLength:1}},required:["id","stem","extension","meta","path","title","description","body","date"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},tableDefinition:`CREATE TABLE IF NOT EXISTS _content_content_en (id TEXT PRIMARY KEY, "title" VARCHAR, "body" TEXT, "date" VARCHAR, "description" VARCHAR, "extension" VARCHAR, "head" TEXT, "meta" TEXT, "navigation" TEXT DEFAULT true, "ogImage" TEXT, "path" VARCHAR, "robots" TEXT, "schemaOrg" TEXT, "seo" TEXT DEFAULT '{}', "sitemap" TEXT, "stem" VARCHAR, "__hash__" TEXT UNIQUE);`},content_fr:{name:"content_fr",pascalName:"ContentFr",tableName:"_content_content_fr",source:[{_resolved:!0,prefix:"/fr",include:"fr/**/*.md",exclude:["fr/articles/*.md"],cwd:"/vercel/path0/content"}],type:"page",fields:{id:"string",stem:"string",extension:"string",meta:"json",path:"string",title:"string",description:"string",seo:"json",body:"json",navigation:"json",sitemap:"json",robots:"json",head:"json",schemaOrg:"json",ogImage:"json",date:"string"},schema:{$ref:"#/definitions/content_fr",definitions:{content_fr:{type:"object",properties:{id:{type:"string"},stem:{type:"string"},extension:{type:"string",enum:["md","yaml","yml","json","csv","xml"]},meta:{type:"object",additionalProperties:{}},path:{type:"string"},title:{type:"string",minLength:1},description:{type:"string",minLength:1},seo:{allOf:[{type:"object",properties:{title:{type:"string"},description:{type:"string"}}},{type:"object",additionalProperties:{}}],default:{}},body:{type:"object",properties:{type:{type:"string"},children:{},toc:{}},required:["type"],additionalProperties:!1},navigation:{anyOf:[{type:"boolean"},{type:"object",properties:{title:{type:"string"},description:{type:"string"},icon:{type:"string"}},required:["title","description","icon"],additionalProperties:!1}],default:!0},sitemap:{type:"object",properties:{loc:{type:"string"},lastmod:{type:"string",format:"date-time"},changefreq:{type:"string",enum:["always","hourly","daily","weekly","monthly","yearly","never"]},priority:{type:"number"},images:{type:"array",items:{type:"object",properties:{loc:{type:"string"},caption:{type:"string"},geo_location:{type:"string"},title:{type:"string"},license:{type:"string"}},required:["loc"],additionalProperties:!1}},videos:{type:"array",items:{type:"object",properties:{content_loc:{type:"string"},player_loc:{type:"string"},duration:{type:"string"},expiration_date:{type:"string",format:"date-time"},rating:{type:"number"},view_count:{type:"number"},publication_date:{type:"string",format:"date-time"},family_friendly:{type:"boolean"},tag:{type:"string"},category:{type:"string"},restriction:{type:"object",properties:{relationship:{type:"string",const:"allow"},value:{type:"string"}},additionalProperties:!1},gallery_loc:{type:"string"},price:{type:"string"},requires_subscription:{type:"boolean"},uploader:{type:"string"}},required:["content_loc"],additionalProperties:!1}}},additionalProperties:!1},robots:{type:["string","boolean"]},head:{type:"object",properties:{meta:{type:"array",items:{anyOf:[{not:{}},{type:"object",additionalProperties:{}}]}},script:{type:"array",items:{anyOf:[{not:{}},{type:"object",additionalProperties:{}}]}}},required:["meta","script"],additionalProperties:!1},schemaOrg:{anyOf:[{type:"object",additionalProperties:{}},{anyOf:[{not:{}},{type:"array",items:{$ref:"#/definitions/content_fr/properties/schemaOrg/anyOf/0"}}]}]},ogImage:{type:"object",properties:{url:{type:"string"},component:{type:"string"},props:{type:"object",additionalProperties:{}}},required:["props"],additionalProperties:!1},date:{type:"string",minLength:1}},required:["id","stem","extension","meta","path","title","description","body","date"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},tableDefinition:`CREATE TABLE IF NOT EXISTS _content_content_fr (id TEXT PRIMARY KEY, "title" VARCHAR, "body" TEXT, "date" VARCHAR, "description" VARCHAR, "extension" VARCHAR, "head" TEXT, "meta" TEXT, "navigation" TEXT DEFAULT true, "ogImage" TEXT, "path" VARCHAR, "robots" TEXT, "schemaOrg" TEXT, "seo" TEXT DEFAULT '{}', "sitemap" TEXT, "stem" VARCHAR, "__hash__" TEXT UNIQUE);`},articles_en:{name:"articles_en",pascalName:"ArticlesEn",tableName:"_content_articles_en",source:[{_resolved:!0,prefix:"/en/articles",include:"en/articles/*.md",cwd:"/vercel/path0/content"}],type:"page",fields:{id:"string",stem:"string",extension:"string",meta:"json",path:"string",title:"string",description:"string",seo:"json",body:"json",navigation:"json",sitemap:"json",robots:"json",head:"json",schemaOrg:"json",ogImage:"json",date:"string",image:"string",readingTime:"string",tags:"json"},schema:{$ref:"#/definitions/articles_en",definitions:{articles_en:{type:"object",properties:{id:{type:"string"},stem:{type:"string"},extension:{type:"string",enum:["md","yaml","yml","json","csv","xml"]},meta:{type:"object",additionalProperties:{}},path:{type:"string"},title:{type:"string",minLength:1},description:{type:"string",minLength:1},seo:{allOf:[{type:"object",properties:{title:{type:"string"},description:{type:"string"}}},{type:"object",additionalProperties:{}}],default:{}},body:{type:"object",properties:{type:{type:"string"},children:{},toc:{}},required:["type"],additionalProperties:!1},navigation:{anyOf:[{type:"boolean"},{type:"object",properties:{title:{type:"string"},description:{type:"string"},icon:{type:"string"}},required:["title","description","icon"],additionalProperties:!1}],default:!0},sitemap:{type:"object",properties:{loc:{type:"string"},lastmod:{type:"string",format:"date-time"},changefreq:{type:"string",enum:["always","hourly","daily","weekly","monthly","yearly","never"]},priority:{type:"number"},images:{type:"array",items:{type:"object",properties:{loc:{type:"string"},caption:{type:"string"},geo_location:{type:"string"},title:{type:"string"},license:{type:"string"}},required:["loc"],additionalProperties:!1}},videos:{type:"array",items:{type:"object",properties:{content_loc:{type:"string"},player_loc:{type:"string"},duration:{type:"string"},expiration_date:{type:"string",format:"date-time"},rating:{type:"number"},view_count:{type:"number"},publication_date:{type:"string",format:"date-time"},family_friendly:{type:"boolean"},tag:{type:"string"},category:{type:"string"},restriction:{type:"object",properties:{relationship:{type:"string",const:"allow"},value:{type:"string"}},additionalProperties:!1},gallery_loc:{type:"string"},price:{type:"string"},requires_subscription:{type:"boolean"},uploader:{type:"string"}},required:["content_loc"],additionalProperties:!1}}},additionalProperties:!1},robots:{type:["string","boolean"]},head:{type:"object",properties:{meta:{type:"array",items:{anyOf:[{not:{}},{type:"object",additionalProperties:{}}]}},script:{type:"array",items:{anyOf:[{not:{}},{type:"object",additionalProperties:{}}]}}},required:["meta","script"],additionalProperties:!1},schemaOrg:{anyOf:[{type:"object",additionalProperties:{}},{anyOf:[{not:{}},{type:"array",items:{$ref:"#/definitions/articles_en/properties/schemaOrg/anyOf/0"}}]}]},ogImage:{type:"object",properties:{url:{type:"string"},component:{type:"string"},props:{type:"object",additionalProperties:{}}},required:["props"],additionalProperties:!1},date:{type:"string",minLength:1},image:{type:"string",format:"uri"},readingTime:{type:"string",minLength:1},tags:{type:"array",items:{type:"string",minLength:1}}},required:["id","stem","extension","meta","path","title","description","body","date","image","readingTime","tags"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},tableDefinition:`CREATE TABLE IF NOT EXISTS _content_articles_en (id TEXT PRIMARY KEY, "title" VARCHAR, "body" TEXT, "date" VARCHAR, "description" VARCHAR, "extension" VARCHAR, "head" TEXT, "image" VARCHAR, "meta" TEXT, "navigation" TEXT DEFAULT true, "ogImage" TEXT, "path" VARCHAR, "readingTime" VARCHAR, "robots" TEXT, "schemaOrg" TEXT, "seo" TEXT DEFAULT '{}', "sitemap" TEXT, "stem" VARCHAR, "tags" TEXT, "__hash__" TEXT UNIQUE);`},articles_fr:{name:"articles_fr",pascalName:"ArticlesFr",tableName:"_content_articles_fr",source:[{_resolved:!0,prefix:"/fr/articles",include:"fr/articles/*.md",cwd:"/vercel/path0/content"}],type:"page",fields:{id:"string",stem:"string",extension:"string",meta:"json",path:"string",title:"string",description:"string",seo:"json",body:"json",navigation:"json",sitemap:"json",robots:"json",head:"json",schemaOrg:"json",ogImage:"json",date:"string",image:"string",readingTime:"string",tags:"json"},schema:{$ref:"#/definitions/articles_fr",definitions:{articles_fr:{type:"object",properties:{id:{type:"string"},stem:{type:"string"},extension:{type:"string",enum:["md","yaml","yml","json","csv","xml"]},meta:{type:"object",additionalProperties:{}},path:{type:"string"},title:{type:"string",minLength:1},description:{type:"string",minLength:1},seo:{allOf:[{type:"object",properties:{title:{type:"string"},description:{type:"string"}}},{type:"object",additionalProperties:{}}],default:{}},body:{type:"object",properties:{type:{type:"string"},children:{},toc:{}},required:["type"],additionalProperties:!1},navigation:{anyOf:[{type:"boolean"},{type:"object",properties:{title:{type:"string"},description:{type:"string"},icon:{type:"string"}},required:["title","description","icon"],additionalProperties:!1}],default:!0},sitemap:{type:"object",properties:{loc:{type:"string"},lastmod:{type:"string",format:"date-time"},changefreq:{type:"string",enum:["always","hourly","daily","weekly","monthly","yearly","never"]},priority:{type:"number"},images:{type:"array",items:{type:"object",properties:{loc:{type:"string"},caption:{type:"string"},geo_location:{type:"string"},title:{type:"string"},license:{type:"string"}},required:["loc"],additionalProperties:!1}},videos:{type:"array",items:{type:"object",properties:{content_loc:{type:"string"},player_loc:{type:"string"},duration:{type:"string"},expiration_date:{type:"string",format:"date-time"},rating:{type:"number"},view_count:{type:"number"},publication_date:{type:"string",format:"date-time"},family_friendly:{type:"boolean"},tag:{type:"string"},category:{type:"string"},restriction:{type:"object",properties:{relationship:{type:"string",const:"allow"},value:{type:"string"}},additionalProperties:!1},gallery_loc:{type:"string"},price:{type:"string"},requires_subscription:{type:"boolean"},uploader:{type:"string"}},required:["content_loc"],additionalProperties:!1}}},additionalProperties:!1},robots:{type:["string","boolean"]},head:{type:"object",properties:{meta:{type:"array",items:{anyOf:[{not:{}},{type:"object",additionalProperties:{}}]}},script:{type:"array",items:{anyOf:[{not:{}},{type:"object",additionalProperties:{}}]}}},required:["meta","script"],additionalProperties:!1},schemaOrg:{anyOf:[{type:"object",additionalProperties:{}},{anyOf:[{not:{}},{type:"array",items:{$ref:"#/definitions/articles_fr/properties/schemaOrg/anyOf/0"}}]}]},ogImage:{type:"object",properties:{url:{type:"string"},component:{type:"string"},props:{type:"object",additionalProperties:{}}},required:["props"],additionalProperties:!1},date:{type:"string",minLength:1},image:{type:"string",format:"uri"},readingTime:{type:"string",minLength:1},tags:{type:"array",items:{type:"string",minLength:1}}},required:["id","stem","extension","meta","path","title","description","body","date","image","readingTime","tags"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},tableDefinition:`CREATE TABLE IF NOT EXISTS _content_articles_fr (id TEXT PRIMARY KEY, "title" VARCHAR, "body" TEXT, "date" VARCHAR, "description" VARCHAR, "extension" VARCHAR, "head" TEXT, "image" VARCHAR, "meta" TEXT, "navigation" TEXT DEFAULT true, "ogImage" TEXT, "path" VARCHAR, "readingTime" VARCHAR, "robots" TEXT, "schemaOrg" TEXT, "seo" TEXT DEFAULT '{}', "sitemap" TEXT, "stem" VARCHAR, "tags" TEXT, "__hash__" TEXT UNIQUE);`},projects_en:{name:"projects_en",pascalName:"ProjectsEn",tableName:"_content_projects_en",source:[{_resolved:!0,prefix:"/en/projects",include:"en/projects/*.json",cwd:"/vercel/path0/content"}],type:"data",fields:{id:"string",stem:"string",extension:"string",meta:"json",name:"string",image:"string",link:"string",release:"string",date:"string",featured:"boolean"},schema:{$ref:"#/definitions/projects_en",definitions:{projects_en:{type:"object",properties:{id:{type:"string"},stem:{type:"string"},extension:{type:"string",enum:["md","yaml","yml","json","csv","xml"]},meta:{type:"object",additionalProperties:{}},name:{type:"string",minLength:1},image:{type:"string",format:"uri"},link:{type:"string",format:"uri"},release:{type:"string",minLength:1},date:{type:"string",minLength:1},featured:{type:"boolean"}},required:["id","stem","extension","meta","name","image","link","release","date"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},tableDefinition:'CREATE TABLE IF NOT EXISTS _content_projects_en (id TEXT PRIMARY KEY, "date" VARCHAR, "extension" VARCHAR, "featured" BOOLEAN, "image" VARCHAR, "link" VARCHAR, "meta" TEXT, "name" VARCHAR, "release" VARCHAR, "stem" VARCHAR, "__hash__" TEXT UNIQUE);'},projects_fr:{name:"projects_fr",pascalName:"ProjectsFr",tableName:"_content_projects_fr",source:[{_resolved:!0,prefix:"/fr/projects",include:"fr/projects/*.json",cwd:"/vercel/path0/content"}],type:"data",fields:{id:"string",stem:"string",extension:"string",meta:"json",name:"string",image:"string",link:"string",release:"string",date:"string",featured:"boolean"},schema:{$ref:"#/definitions/projects_fr",definitions:{projects_fr:{type:"object",properties:{id:{type:"string"},stem:{type:"string"},extension:{type:"string",enum:["md","yaml","yml","json","csv","xml"]},meta:{type:"object",additionalProperties:{}},name:{type:"string",minLength:1},image:{type:"string",format:"uri"},link:{type:"string",format:"uri"},release:{type:"string",minLength:1},date:{type:"string",minLength:1},featured:{type:"boolean"}},required:["id","stem","extension","meta","name","image","link","release","date"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},tableDefinition:'CREATE TABLE IF NOT EXISTS _content_projects_fr (id TEXT PRIMARY KEY, "date" VARCHAR, "extension" VARCHAR, "featured" BOOLEAN, "image" VARCHAR, "link" VARCHAR, "meta" TEXT, "name" VARCHAR, "release" VARCHAR, "stem" VARCHAR, "__hash__" TEXT UNIQUE);'},stack:{name:"stack",pascalName:"Stack",tableName:"_content_stack",source:[{_resolved:!0,prefix:"/",include:"stack.json",cwd:"/vercel/path0/content"}],type:"data",fields:{id:"string",stem:"string",extension:"string",meta:"json",items:"json"},schema:{$ref:"#/definitions/stack",definitions:{stack:{type:"object",properties:{id:{type:"string"},stem:{type:"string"},extension:{type:"string",enum:["md","yaml","yml","json","csv","xml"]},meta:{type:"object",additionalProperties:{}},items:{type:"array",items:{type:"object",properties:{name:{type:"string",minLength:1},link:{type:"string",format:"uri"},icon:{type:"string",minLength:1}},required:["name","link","icon"],additionalProperties:!1}}},required:["id","stem","extension","meta","items"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},tableDefinition:'CREATE TABLE IF NOT EXISTS _content_stack (id TEXT PRIMARY KEY, "extension" VARCHAR, "items" TEXT, "meta" TEXT, "stem" VARCHAR, "__hash__" TEXT UNIQUE);'},faq_en:{name:"faq_en",pascalName:"FaqEn",tableName:"_content_faq_en",source:[{_resolved:!0,prefix:"/",include:"en/faq.json",cwd:"/vercel/path0/content"}],type:"data",fields:{id:"string",stem:"string",extension:"string",meta:"json",title:"string",subtitle:"string",faqQuestions:"json"},schema:{$ref:"#/definitions/faq_en",definitions:{faq_en:{type:"object",properties:{id:{type:"string"},stem:{type:"string"},extension:{type:"string",enum:["md","yaml","yml","json","csv","xml"]},meta:{type:"object",additionalProperties:{}},title:{type:"string",minLength:1},subtitle:{type:"string",minLength:1},faqQuestions:{type:"array",items:{type:"object",properties:{title:{type:"string",minLength:1},questions:{type:"array",items:{type:"object",properties:{label:{type:"string",minLength:1},content:{type:"string",minLength:1}},required:["label","content"],additionalProperties:!1}}},required:["title","questions"],additionalProperties:!1}}},required:["id","stem","extension","meta","title","subtitle","faqQuestions"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},tableDefinition:'CREATE TABLE IF NOT EXISTS _content_faq_en (id TEXT PRIMARY KEY, "title" VARCHAR, "extension" VARCHAR, "faqQuestions" TEXT, "meta" TEXT, "stem" VARCHAR, "subtitle" VARCHAR, "__hash__" TEXT UNIQUE);'},faq_fr:{name:"faq_fr",pascalName:"FaqFr",tableName:"_content_faq_fr",source:[{_resolved:!0,prefix:"/",include:"fr/faq.json",cwd:"/vercel/path0/content"}],type:"data",fields:{id:"string",stem:"string",extension:"string",meta:"json",title:"string",subtitle:"string",faqQuestions:"json"},schema:{$ref:"#/definitions/faq_fr",definitions:{faq_fr:{type:"object",properties:{id:{type:"string"},stem:{type:"string"},extension:{type:"string",enum:["md","yaml","yml","json","csv","xml"]},meta:{type:"object",additionalProperties:{}},title:{type:"string",minLength:1},subtitle:{type:"string",minLength:1},faqQuestions:{type:"array",items:{type:"object",properties:{title:{type:"string",minLength:1},questions:{type:"array",items:{type:"object",properties:{label:{type:"string",minLength:1},content:{type:"string",minLength:1}},required:["label","content"],additionalProperties:!1}}},required:["title","questions"],additionalProperties:!1}}},required:["id","stem","extension","meta","title","subtitle","faqQuestions"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},tableDefinition:'CREATE TABLE IF NOT EXISTS _content_faq_fr (id TEXT PRIMARY KEY, "title" VARCHAR, "extension" VARCHAR, "faqQuestions" TEXT, "meta" TEXT, "stem" VARCHAR, "subtitle" VARCHAR, "__hash__" TEXT UNIQUE);'},info:{name:"info",pascalName:"Info",tableName:"_content_info",source:[],type:"data",fields:{},schema:{$ref:"#/definitions/info",definitions:{info:{type:"object",properties:{id:{type:"string"},version:{type:"string"},structureVersion:{type:"string"},ready:{type:"boolean"}},required:["id","version","structureVersion","ready"],additionalProperties:!1}},$schema:"http://json-schema.org/draft-07/schema#"},tableDefinition:'CREATE TABLE IF NOT EXISTS _content_info (id TEXT PRIMARY KEY, "ready" BOOLEAN, "structureVersion" VARCHAR, "version" VARCHAR, "__hash__" TEXT UNIQUE);'}},Re=re(!1),Ge=li(()=>JSON.parse(JSON.stringify(tt()))),on=async n=>{const e=ai(n.files,n.additions,n.deletions),t=e.filter(r=>![B.appConfig,B.appConfigV4,B.nuxtConfig].includes(r.path));for(const r of Object.values(ee))await Z(r.name).exec(r.tableDefinition);for(const r of t)await an(ee,r);const i=e.find(r=>[B.appConfig,B.appConfigV4].includes(r.path));i&&xe(i.parsed),Xt(),Re.value=!0},an=async(n,e)=>{const{collection:t,matchedSource:i}=de(e.path,n);if(!t||!i){console.warn(`Content Preview: collection not found for file: ${e.path}, skipping insertion.`);return}const r=Z(t.name),s=pt(e,t,i),o=gt(t,s);await r.exec(o)},xe=n=>{const e=ge(),t=kt(e,tt);ot(t,pi(n||{},Ge)),n||rt(t,Ge)};function yn(){const n=et().public.preview||{},e=window.sessionStorage.getItem("previewToken"),t=document.createElement("div");t.id="__nuxt_preview_wrapper",document.body.appendChild(t),qt(Yt,{previewToken:e,api:window.sessionStorage.getItem("previewAPI")||(n==null?void 0:n.api),initializePreview:on}).mount(t)}function mn(){const n=ge(),e=et().public.preview;if(!window.parent||window.self===window.parent)return;const t=Ze(),i=$t();window.addEventListener("keydown",s=>{(s.metaKey||s.ctrlKey||s.altKey||s.shiftKey)&&window.parent.postMessage({type:"nuxt-content:preview:keydown",payload:{key:s.key,metaKey:s.metaKey,ctrlKey:s.ctrlKey,shiftKey:s.shiftKey,altKey:s.altKey}},"*")}),window.addEventListener("message",async s=>{var y;if(!Re.value)return;const o=((y=e==null?void 0:e.iframeMessagingAllowedOrigins)==null?void 0:y.split(",").map(m=>m.trim()))||[];if(!["http://localhost:3000",...rn,...o].includes(s.origin))return;const{type:a,payload:p={},navigate:l}=s.data||{};switch(a){case"nuxt-content:editor:file-selected":{await h(p.path);break}case"nuxt-content:editor:file-changed":case"nuxt-content:editor:media-changed":{const{additions:m=[],deletions:c=[]}=p;for(const f of m)await g(f,l);for(const f of c)await u(f.path);pn();break}case"nuxt-content:config:file-changed":{const{additions:m=[],deletions:c=[]}=p,f=m.find(w=>[B.appConfig,B.appConfigV4].includes(w.path));f&&xe(f==null?void 0:f.parsed),c.find(w=>[B.appConfig,B.appConfigV4].includes(w.path))&&xe(void 0)}}async function h(m){if(!m)return;const{collection:c}=de(he(m),ee);if(!c){console.warn(`Content Preview: collection not found for file: ${m}, skipping navigation.`);return}if(c.type!=="page")return;const f=Z(c.name),b=be(m),w=Ye(c,"stem",b),_=await f.first(w);if(!_||!_.path)return;const x=t.resolve(_.path);!x||!x.matched||x.matched.length===0||_.path!==i.path&&t.push(_.path)}async function g(m,c){const{collection:f,matchedSource:b}=de(m.path,ee);if(!f||!b){console.warn(`Content Preview: collection not found for file: ${m.path}, skipping update.`);return}const w=be(m.path),_=pt({path:m.path,parsed:m.parsed},f,b),x=nn(f,w,_);if(await Z(f.name).exec(x),f.type!=="page"||!m.pathRoute)return;const E=It(m.pathRoute);if(c&&E!==i.path){const k=t.resolve(E);if(!k||!k.matched||k.matched.length===0)return;t.push(E)}}async function u(m){const{collection:c}=de(he(m),ee);if(!c){console.warn(`Content Preview: collection not found for file: ${m}, skipping deletion.`);return}const f=be(m),b=yt(c,f);await Z(c.name).exec(b)}});async function r(){if(!Re.value)return;const s=i.path,{collection:o}=tn(s,ee);if(!o||o.type!=="page"){window.sendNavigateMessageInPreview(s,!1);return}const a=Z(o.name),p=Ye(o,"path",s),l=await a.first(p);window.sendNavigateMessageInPreview(s,!!(l!=null&&l.path))}n.hook("page:finish",()=>{r()}),n.hook("nuxt-content:preview:ready",()=>{window.parent.postMessage({type:"nuxt-content:preview:ready"},"*")}),window.sendNavigateMessageInPreview=(s,o)=>{window.parent.postMessage({type:"nuxt-content:preview:navigate",payload:{path:s,navigate:o}},"*")}}async function pn(){await ge().hooks.callHookParallel("app:data:refresh")}export{mn as initIframeCommunication,yn as mountPreviewUI};