@jsonpages/core 1.0.12 → 1.0.15

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.
@@ -1,4 +1,4 @@
1
- (function(pe,Y){typeof exports=="object"&&typeof module<"u"?Y(exports,require("react"),require("react-router-dom"),require("zod"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom","zod","react-dom"],Y):(pe=typeof globalThis<"u"?globalThis:pe||self,Y(pe.JsonPagesCore={},pe.React,pe.ReactRouterDOM,pe.z,pe.ReactDOM))})(this,(function(pe,Y,Ne,ze,Cr){"use strict";function Ar(e){const _=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const m=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(_,r,m.get?m:{enumerable:!0,get:()=>e[r]})}}return _.default=e,Object.freeze(_)}const me=Ar(Y),ve={UPDATE_DRAFTS:"jsonpages:update-drafts",SYNC_SELECTION:"jsonpages:sync-selection",REQUEST_CLEAN_HTML:"jsonpages:request-clean-html",SEND_CLEAN_HTML:"jsonpages:send-clean-html",SECTION_SELECT:"jsonpages:section-select",REQUEST_SCROLL_TO_SECTION:"jsonpages:request-scroll-to-section",ACTIVE_SECTION_CHANGED:"jsonpages:active-section-changed",STAGE_READY:"jsonpages:stage-ready"};var Ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Je(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ct={exports:{}};/*!
1
+ (function(pe,q){typeof exports=="object"&&typeof module<"u"?q(exports,require("react"),require("react-router-dom"),require("zod"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom","zod","react-dom"],q):(pe=typeof globalThis<"u"?globalThis:pe||self,q(pe.JsonPagesCore={},pe.React,pe.ReactRouterDOM,pe.z,pe.ReactDOM))})(this,(function(pe,q,Se,je,Nr){"use strict";function Cr(e){const _=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const m=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(_,r,m.get?m:{enumerable:!0,get:()=>e[r]})}}return _.default=e,Object.freeze(_)}const me=Cr(q),ve={UPDATE_DRAFTS:"jsonpages:update-drafts",SYNC_SELECTION:"jsonpages:sync-selection",REQUEST_CLEAN_HTML:"jsonpages:request-clean-html",SEND_CLEAN_HTML:"jsonpages:send-clean-html",SECTION_SELECT:"jsonpages:section-select",REQUEST_SCROLL_TO_SECTION:"jsonpages:request-scroll-to-section",ACTIVE_SECTION_CHANGED:"jsonpages:active-section-changed",STAGE_READY:"jsonpages:stage-ready"};var Ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Je(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ct={exports:{}};/*!
2
2
 
3
3
  JSZip v3.10.1 - A JavaScript class for generating and reading zip files
4
4
  <http://stuartk.com/jszip>
@@ -8,8 +8,8 @@
8
8
 
9
9
  JSZip uses the library pako released under the MIT license :
10
10
  https://github.com/nodeca/pako/blob/main/LICENSE
11
- */var Nt;function Tr(){return Nt||(Nt=1,(function(e,_){(function(r){e.exports=r()})(function(){return(function r(m,u,i){function o(h,f){if(!u[h]){if(!m[h]){var v=typeof Je=="function"&&Je;if(!f&&v)return v(h,!0);if(n)return n(h,!0);var x=new Error("Cannot find module '"+h+"'");throw x.code="MODULE_NOT_FOUND",x}var c=u[h]={exports:{}};m[h][0].call(c.exports,function(g){var d=m[h][1][g];return o(d||g)},c,c.exports,r,m,u,i)}return u[h].exports}for(var n=typeof Je=="function"&&Je,l=0;l<i.length;l++)o(i[l]);return o})({1:[function(r,m,u){var i=r("./utils"),o=r("./support"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(l){for(var h,f,v,x,c,g,d,b=[],p=0,k=l.length,E=k,N=i.getTypeOf(l)!=="string";p<l.length;)E=k-p,v=N?(h=l[p++],f=p<k?l[p++]:0,p<k?l[p++]:0):(h=l.charCodeAt(p++),f=p<k?l.charCodeAt(p++):0,p<k?l.charCodeAt(p++):0),x=h>>2,c=(3&h)<<4|f>>4,g=1<E?(15&f)<<2|v>>6:64,d=2<E?63&v:64,b.push(n.charAt(x)+n.charAt(c)+n.charAt(g)+n.charAt(d));return b.join("")},u.decode=function(l){var h,f,v,x,c,g,d=0,b=0,p="data:";if(l.substr(0,p.length)===p)throw new Error("Invalid base64 input, it looks like a data url.");var k,E=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===n.charAt(64)&&E--,l.charAt(l.length-2)===n.charAt(64)&&E--,E%1!=0)throw new Error("Invalid base64 input, bad content length.");for(k=o.uint8array?new Uint8Array(0|E):new Array(0|E);d<l.length;)h=n.indexOf(l.charAt(d++))<<2|(x=n.indexOf(l.charAt(d++)))>>4,f=(15&x)<<4|(c=n.indexOf(l.charAt(d++)))>>2,v=(3&c)<<6|(g=n.indexOf(l.charAt(d++))),k[b++]=h,c!==64&&(k[b++]=f),g!==64&&(k[b++]=v);return k}},{"./support":30,"./utils":32}],2:[function(r,m,u){var i=r("./external"),o=r("./stream/DataWorker"),n=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function h(f,v,x,c,g){this.compressedSize=f,this.uncompressedSize=v,this.crc32=x,this.compression=c,this.compressedContent=g}h.prototype={getContentWorker:function(){var f=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),v=this;return f.on("end",function(){if(this.streamInfo.data_length!==v.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(f,v,x){return f.pipe(new n).pipe(new l("uncompressedSize")).pipe(v.compressWorker(x)).pipe(new l("compressedSize")).withStreamInfo("compression",v)},m.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,m,u){var i=r("./stream/GenericWorker");u.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},u.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,m,u){var i=r("./utils"),o=(function(){for(var n,l=[],h=0;h<256;h++){n=h;for(var f=0;f<8;f++)n=1&n?3988292384^n>>>1:n>>>1;l[h]=n}return l})();m.exports=function(n,l){return n!==void 0&&n.length?i.getTypeOf(n)!=="string"?(function(h,f,v,x){var c=o,g=x+v;h^=-1;for(var d=x;d<g;d++)h=h>>>8^c[255&(h^f[d])];return-1^h})(0|l,n,n.length,0):(function(h,f,v,x){var c=o,g=x+v;h^=-1;for(var d=x;d<g;d++)h=h>>>8^c[255&(h^f.charCodeAt(d))];return-1^h})(0|l,n,n.length,0):0}},{"./utils":32}],5:[function(r,m,u){u.base64=!1,u.binary=!1,u.dir=!1,u.createFolders=!0,u.date=null,u.compression=null,u.compressionOptions=null,u.comment=null,u.unixPermissions=null,u.dosPermissions=null},{}],6:[function(r,m,u){var i=null;i=typeof Promise<"u"?Promise:r("lie"),m.exports={Promise:i}},{lie:37}],7:[function(r,m,u){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=r("pako"),n=r("./utils"),l=r("./stream/GenericWorker"),h=i?"uint8array":"array";function f(v,x){l.call(this,"FlateWorker/"+v),this._pako=null,this._pakoAction=v,this._pakoOptions=x,this.meta={}}u.magic="\b\0",n.inherits(f,l),f.prototype.processChunk=function(v){this.meta=v.meta,this._pako===null&&this._createPako(),this._pako.push(n.transformTo(h,v.data),!1)},f.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var v=this;this._pako.onData=function(x){v.push({data:x,meta:v.meta})}},u.compressWorker=function(v){return new f("Deflate",v)},u.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,m,u){function i(c,g){var d,b="";for(d=0;d<g;d++)b+=String.fromCharCode(255&c),c>>>=8;return b}function o(c,g,d,b,p,k){var E,N,C=c.file,T=c.compression,L=k!==h.utf8encode,D=n.transformTo("string",k(C.name)),O=n.transformTo("string",h.utf8encode(C.name)),B=C.comment,re=n.transformTo("string",k(B)),j=n.transformTo("string",h.utf8encode(B)),R=O.length!==C.name.length,s=j.length!==B.length,U="",te="",Z="",W=C.dir,J=C.date,X={crc32:0,compressedSize:0,uncompressedSize:0};g&&!d||(X.crc32=c.crc32,X.compressedSize=c.compressedSize,X.uncompressedSize=c.uncompressedSize);var z=0;g&&(z|=8),L||!R&&!s||(z|=2048);var S=0,q=0;W&&(S|=16),p==="UNIX"?(q=798,S|=(function(Q,he){var ie=Q;return Q||(ie=he?16893:33204),(65535&ie)<<16})(C.unixPermissions,W)):(q=20,S|=(function(Q){return 63&(Q||0)})(C.dosPermissions)),E=J.getUTCHours(),E<<=6,E|=J.getUTCMinutes(),E<<=5,E|=J.getUTCSeconds()/2,N=J.getUTCFullYear()-1980,N<<=4,N|=J.getUTCMonth()+1,N<<=5,N|=J.getUTCDate(),R&&(te=i(1,1)+i(f(D),4)+O,U+="up"+i(te.length,2)+te),s&&(Z=i(1,1)+i(f(re),4)+j,U+="uc"+i(Z.length,2)+Z);var K="";return K+=`
12
- \0`,K+=i(z,2),K+=T.magic,K+=i(E,2),K+=i(N,2),K+=i(X.crc32,4),K+=i(X.compressedSize,4),K+=i(X.uncompressedSize,4),K+=i(D.length,2),K+=i(U.length,2),{fileRecord:v.LOCAL_FILE_HEADER+K+D+U,dirRecord:v.CENTRAL_FILE_HEADER+i(q,2)+K+i(re.length,2)+"\0\0\0\0"+i(S,4)+i(b,4)+D+U+re}}var n=r("../utils"),l=r("../stream/GenericWorker"),h=r("../utf8"),f=r("../crc32"),v=r("../signature");function x(c,g,d,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=d,this.encodeFileName=b,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(x,l),x.prototype.push=function(c){var g=c.meta.percent||0,d=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(c):(this.bytesWritten+=c.data.length,l.prototype.push.call(this,{data:c.data,meta:{currentFile:this.currentFile,percent:d?(g+100*(d-b-1))/d:100}}))},x.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var g=this.streamFiles&&!c.file.dir;if(g){var d=o(c,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:d.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(c){this.accumulate=!1;var g=this.streamFiles&&!c.file.dir,d=o(c,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(d.dirRecord),g)this.push({data:(function(b){return v.DATA_DESCRIPTOR+i(b.crc32,4)+i(b.compressedSize,4)+i(b.uncompressedSize,4)})(c),meta:{percent:100}});else for(this.push({data:d.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},x.prototype.flush=function(){for(var c=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var d=this.bytesWritten-c,b=(function(p,k,E,N,C){var T=n.transformTo("string",C(N));return v.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(p,2)+i(p,2)+i(k,4)+i(E,4)+i(T.length,2)+T})(this.dirRecords.length,d,c,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},x.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},x.prototype.registerPrevious=function(c){this._sources.push(c);var g=this;return c.on("data",function(d){g.processChunk(d)}),c.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),c.on("error",function(d){g.error(d)}),this},x.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},x.prototype.error=function(c){var g=this._sources;if(!l.prototype.error.call(this,c))return!1;for(var d=0;d<g.length;d++)try{g[d].error(c)}catch{}return!0},x.prototype.lock=function(){l.prototype.lock.call(this);for(var c=this._sources,g=0;g<c.length;g++)c[g].lock()},m.exports=x},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,m,u){var i=r("../compressions"),o=r("./ZipFileWorker");u.generateWorker=function(n,l,h){var f=new o(l.streamFiles,h,l.platform,l.encodeFileName),v=0;try{n.forEach(function(x,c){v++;var g=(function(k,E){var N=k||E,C=i[N];if(!C)throw new Error(N+" is not a valid compression method !");return C})(c.options.compression,l.compression),d=c.options.compressionOptions||l.compressionOptions||{},b=c.dir,p=c.date;c._compressWorker(g,d).withStreamInfo("file",{name:x,dir:b,date:p,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(f)}),f.entriesCount=v}catch(x){f.error(x)}return f}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,m,u){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new i;for(var n in this)typeof this[n]!="function"&&(o[n]=this[n]);return o}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(o,n){return new i().loadAsync(o,n)},i.external=r("./external"),m.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,m,u){var i=r("./utils"),o=r("./external"),n=r("./utf8"),l=r("./zipEntries"),h=r("./stream/Crc32Probe"),f=r("./nodejsUtils");function v(x){return new o.Promise(function(c,g){var d=x.decompressed.getContentWorker().pipe(new h);d.on("error",function(b){g(b)}).on("end",function(){d.streamInfo.crc32!==x.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}m.exports=function(x,c){var g=this;return c=i.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),f.isNode&&f.isStream(x)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",x,!0,c.optimizedBinaryString,c.base64).then(function(d){var b=new l(c);return b.load(d),b}).then(function(d){var b=[o.Promise.resolve(d)],p=d.files;if(c.checkCRC32)for(var k=0;k<p.length;k++)b.push(v(p[k]));return o.Promise.all(b)}).then(function(d){for(var b=d.shift(),p=b.files,k=0;k<p.length;k++){var E=p[k],N=E.fileNameStr,C=i.resolve(E.fileNameStr);g.file(C,E.decompressed,{binary:!0,optimizedBinaryString:!0,date:E.date,dir:E.dir,comment:E.fileCommentStr.length?E.fileCommentStr:null,unixPermissions:E.unixPermissions,dosPermissions:E.dosPermissions,createFolders:c.createFolders}),E.dir||(g.file(C).unsafeOriginalName=N)}return b.zipComment.length&&(g.comment=b.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,m,u){var i=r("../utils"),o=r("../stream/GenericWorker");function n(l,h){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(h)}i.inherits(n,o),n.prototype._bindStream=function(l){var h=this;(this._stream=l).pause(),l.on("data",function(f){h.push({data:f,meta:{percent:0}})}).on("error",function(f){h.isPaused?this.generatedError=f:h.error(f)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},n.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},n.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},m.exports=n},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,m,u){var i=r("readable-stream").Readable;function o(n,l,h){i.call(this,l),this._helper=n;var f=this;n.on("data",function(v,x){f.push(v)||f._helper.pause(),h&&h(x)}).on("error",function(v){f.emit("error",v)}).on("end",function(){f.push(null)})}r("../utils").inherits(o,i),o.prototype._read=function(){this._helper.resume()},m.exports=o},{"../utils":32,"readable-stream":16}],14:[function(r,m,u){m.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,o);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,o)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var o=new Buffer(i);return o.fill(0),o},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(r,m,u){function i(C,T,L){var D,O=n.getTypeOf(T),B=n.extend(L||{},f);B.date=B.date||new Date,B.compression!==null&&(B.compression=B.compression.toUpperCase()),typeof B.unixPermissions=="string"&&(B.unixPermissions=parseInt(B.unixPermissions,8)),B.unixPermissions&&16384&B.unixPermissions&&(B.dir=!0),B.dosPermissions&&16&B.dosPermissions&&(B.dir=!0),B.dir&&(C=p(C)),B.createFolders&&(D=b(C))&&k.call(this,D,!0);var re=O==="string"&&B.binary===!1&&B.base64===!1;L&&L.binary!==void 0||(B.binary=!re),(T instanceof v&&T.uncompressedSize===0||B.dir||!T||T.length===0)&&(B.base64=!1,B.binary=!0,T="",B.compression="STORE",O="string");var j=null;j=T instanceof v||T instanceof l?T:g.isNode&&g.isStream(T)?new d(C,T):n.prepareContent(C,T,B.binary,B.optimizedBinaryString,B.base64);var R=new x(C,j,B);this.files[C]=R}var o=r("./utf8"),n=r("./utils"),l=r("./stream/GenericWorker"),h=r("./stream/StreamHelper"),f=r("./defaults"),v=r("./compressedObject"),x=r("./zipObject"),c=r("./generate"),g=r("./nodejsUtils"),d=r("./nodejs/NodejsStreamInputAdapter"),b=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var T=C.lastIndexOf("/");return 0<T?C.substring(0,T):""},p=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},k=function(C,T){return T=T!==void 0?T:f.createFolders,C=p(C),this.files[C]||i.call(this,C,null,{dir:!0,createFolders:T}),this.files[C]};function E(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var N={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var T,L,D;for(T in this.files)D=this.files[T],(L=T.slice(this.root.length,T.length))&&T.slice(0,this.root.length)===this.root&&C(L,D)},filter:function(C){var T=[];return this.forEach(function(L,D){C(L,D)&&T.push(D)}),T},file:function(C,T,L){if(arguments.length!==1)return C=this.root+C,i.call(this,C,T,L),this;if(E(C)){var D=C;return this.filter(function(B,re){return!re.dir&&D.test(B)})}var O=this.files[this.root+C];return O&&!O.dir?O:null},folder:function(C){if(!C)return this;if(E(C))return this.filter(function(O,B){return B.dir&&C.test(O)});var T=this.root+C,L=k.call(this,T),D=this.clone();return D.root=L.name,D},remove:function(C){C=this.root+C;var T=this.files[C];if(T||(C.slice(-1)!=="/"&&(C+="/"),T=this.files[C]),T&&!T.dir)delete this.files[C];else for(var L=this.filter(function(O,B){return B.name.slice(0,C.length)===C}),D=0;D<L.length;D++)delete this.files[L[D].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var T,L={};try{if((L=n.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=L.type.toLowerCase(),L.compression=L.compression.toUpperCase(),L.type==="binarystring"&&(L.type="string"),!L.type)throw new Error("No output type specified.");n.checkSupport(L.type),L.platform!=="darwin"&&L.platform!=="freebsd"&&L.platform!=="linux"&&L.platform!=="sunos"||(L.platform="UNIX"),L.platform==="win32"&&(L.platform="DOS");var D=L.comment||this.comment||"";T=c.generateWorker(this,L,D)}catch(O){(T=new l("error")).error(O)}return new h(T,L.type||"string",L.mimeType)},generateAsync:function(C,T){return this.generateInternalStream(C).accumulate(T)},generateNodeStream:function(C,T){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(T)}};m.exports=N},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,m,u){m.exports=r("stream")},{stream:void 0}],17:[function(r,m,u){var i=r("./DataReader");function o(n){i.call(this,n);for(var l=0;l<this.data.length;l++)n[l]=255&n[l]}r("../utils").inherits(o,i),o.prototype.byteAt=function(n){return this.data[this.zero+n]},o.prototype.lastIndexOfSignature=function(n){for(var l=n.charCodeAt(0),h=n.charCodeAt(1),f=n.charCodeAt(2),v=n.charCodeAt(3),x=this.length-4;0<=x;--x)if(this.data[x]===l&&this.data[x+1]===h&&this.data[x+2]===f&&this.data[x+3]===v)return x-this.zero;return-1},o.prototype.readAndCheckSignature=function(n){var l=n.charCodeAt(0),h=n.charCodeAt(1),f=n.charCodeAt(2),v=n.charCodeAt(3),x=this.readData(4);return l===x[0]&&h===x[1]&&f===x[2]&&v===x[3]},o.prototype.readData=function(n){if(this.checkOffset(n),n===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./DataReader":18}],18:[function(r,m,u){var i=r("../utils");function o(n){this.data=n,this.length=n.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(n){this.checkIndex(this.index+n)},checkIndex:function(n){if(this.length<this.zero+n||n<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+n+"). Corrupted zip ?")},setIndex:function(n){this.checkIndex(n),this.index=n},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(n){var l,h=0;for(this.checkOffset(n),l=this.index+n-1;l>=this.index;l--)h=(h<<8)+this.byteAt(l);return this.index+=n,h},readString:function(n){return i.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}},m.exports=o},{"../utils":32}],19:[function(r,m,u){var i=r("./Uint8ArrayReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,m,u){var i=r("./DataReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},o.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},o.prototype.readAndCheckSignature=function(n){return n===this.readData(4)},o.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./DataReader":18}],21:[function(r,m,u){var i=r("./ArrayReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(r,m,u){var i=r("../utils"),o=r("../support"),n=r("./ArrayReader"),l=r("./StringReader"),h=r("./NodeBufferReader"),f=r("./Uint8ArrayReader");m.exports=function(v){var x=i.getTypeOf(v);return i.checkSupport(x),x!=="string"||o.uint8array?x==="nodebuffer"?new h(v):o.uint8array?new f(i.transformTo("uint8array",v)):new n(i.transformTo("array",v)):new l(v)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,m,u){u.LOCAL_FILE_HEADER="PK",u.CENTRAL_FILE_HEADER="PK",u.CENTRAL_DIRECTORY_END="PK",u.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",u.ZIP64_CENTRAL_DIRECTORY_END="PK",u.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,m,u){var i=r("./GenericWorker"),o=r("../utils");function n(l){i.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(n,i),n.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},m.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(r,m,u){var i=r("./GenericWorker"),o=r("../crc32");function n(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(n,i),n.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},m.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,m,u){var i=r("../utils"),o=r("./GenericWorker");function n(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(n,o),n.prototype.processChunk=function(l){if(l){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+l.data.length}o.prototype.processChunk.call(this,l)},m.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(r,m,u){var i=r("../utils"),o=r("./GenericWorker");function n(l){o.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){h.dataIsReady=!0,h.data=f,h.max=f&&f.length||0,h.type=i.getTypeOf(f),h.isPaused||h._tickAndRepeat()},function(f){h.error(f)})}i.inherits(n,o),n.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,h);break;case"uint8array":l=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":l=this.data.slice(this.index,h)}return this.index=h,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},m.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(r,m,u){function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,n){return this._listeners[o].push(n),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,n){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,n)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var n=this;return o.on("data",function(l){n.processChunk(l)}),o.on("end",function(){n.end()}),o.on("error",function(l){n.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,n){return this.extraStreamInfo[o]=n,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},m.exports=i},{}],29:[function(r,m,u){var i=r("../utils"),o=r("./ConvertWorker"),n=r("./GenericWorker"),l=r("../base64"),h=r("../support"),f=r("../external"),v=null;if(h.nodestream)try{v=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function x(g,d){return new f.Promise(function(b,p){var k=[],E=g._internalType,N=g._outputType,C=g._mimeType;g.on("data",function(T,L){k.push(T),d&&d(L)}).on("error",function(T){k=[],p(T)}).on("end",function(){try{var T=(function(L,D,O){switch(L){case"blob":return i.newBlob(i.transformTo("arraybuffer",D),O);case"base64":return l.encode(D);default:return i.transformTo(L,D)}})(N,(function(L,D){var O,B=0,re=null,j=0;for(O=0;O<D.length;O++)j+=D[O].length;switch(L){case"string":return D.join("");case"array":return Array.prototype.concat.apply([],D);case"uint8array":for(re=new Uint8Array(j),O=0;O<D.length;O++)re.set(D[O],B),B+=D[O].length;return re;case"nodebuffer":return Buffer.concat(D);default:throw new Error("concat : unsupported type '"+L+"'")}})(E,k),C);b(T)}catch(L){p(L)}k=[]}).resume()})}function c(g,d,b){var p=d;switch(d){case"blob":case"arraybuffer":p="uint8array";break;case"base64":p="string"}try{this._internalType=p,this._outputType=d,this._mimeType=b,i.checkSupport(p),this._worker=g.pipe(new o(p)),g.lock()}catch(k){this._worker=new n("error"),this._worker.error(k)}}c.prototype={accumulate:function(g){return x(this,g)},on:function(g,d){var b=this;return g==="data"?this._worker.on(g,function(p){d.call(b,p.data,p.meta)}):this._worker.on(g,function(){i.delay(d,arguments,b)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new v(this,{objectMode:this._outputType!=="nodebuffer"},g)}},m.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,m,u){if(u.base64=!0,u.array=!0,u.string=!0,u.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",u.nodebuffer=typeof Buffer<"u",u.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")u.blob=!1;else{var i=new ArrayBuffer(0);try{u.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),u.blob=o.getBlob("application/zip").size===0}catch{u.blob=!1}}}try{u.nodestream=!!r("readable-stream").Readable}catch{u.nodestream=!1}},{"readable-stream":16}],31:[function(r,m,u){for(var i=r("./utils"),o=r("./support"),n=r("./nodejsUtils"),l=r("./stream/GenericWorker"),h=new Array(256),f=0;f<256;f++)h[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;h[254]=h[254]=1;function v(){l.call(this,"utf-8 decode"),this.leftOver=null}function x(){l.call(this,"utf-8 encode")}u.utf8encode=function(c){return o.nodebuffer?n.newBufferFrom(c,"utf-8"):(function(g){var d,b,p,k,E,N=g.length,C=0;for(k=0;k<N;k++)(64512&(b=g.charCodeAt(k)))==55296&&k+1<N&&(64512&(p=g.charCodeAt(k+1)))==56320&&(b=65536+(b-55296<<10)+(p-56320),k++),C+=b<128?1:b<2048?2:b<65536?3:4;for(d=o.uint8array?new Uint8Array(C):new Array(C),k=E=0;E<C;k++)(64512&(b=g.charCodeAt(k)))==55296&&k+1<N&&(64512&(p=g.charCodeAt(k+1)))==56320&&(b=65536+(b-55296<<10)+(p-56320),k++),b<128?d[E++]=b:(b<2048?d[E++]=192|b>>>6:(b<65536?d[E++]=224|b>>>12:(d[E++]=240|b>>>18,d[E++]=128|b>>>12&63),d[E++]=128|b>>>6&63),d[E++]=128|63&b);return d})(c)},u.utf8decode=function(c){return o.nodebuffer?i.transformTo("nodebuffer",c).toString("utf-8"):(function(g){var d,b,p,k,E=g.length,N=new Array(2*E);for(d=b=0;d<E;)if((p=g[d++])<128)N[b++]=p;else if(4<(k=h[p]))N[b++]=65533,d+=k-1;else{for(p&=k===2?31:k===3?15:7;1<k&&d<E;)p=p<<6|63&g[d++],k--;1<k?N[b++]=65533:p<65536?N[b++]=p:(p-=65536,N[b++]=55296|p>>10&1023,N[b++]=56320|1023&p)}return N.length!==b&&(N.subarray?N=N.subarray(0,b):N.length=b),i.applyFromCharCode(N)})(c=i.transformTo(o.uint8array?"uint8array":"array",c))},i.inherits(v,l),v.prototype.processChunk=function(c){var g=i.transformTo(o.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var d=g;(g=new Uint8Array(d.length+this.leftOver.length)).set(this.leftOver,0),g.set(d,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var b=(function(k,E){var N;for((E=E||k.length)>k.length&&(E=k.length),N=E-1;0<=N&&(192&k[N])==128;)N--;return N<0||N===0?E:N+h[k[N]]>E?N:E})(g),p=g;b!==g.length&&(o.uint8array?(p=g.subarray(0,b),this.leftOver=g.subarray(b,g.length)):(p=g.slice(0,b),this.leftOver=g.slice(b,g.length))),this.push({data:u.utf8decode(p),meta:c.meta})},v.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=v,i.inherits(x,l),x.prototype.processChunk=function(c){this.push({data:u.utf8encode(c.data),meta:c.meta})},u.Utf8EncodeWorker=x},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,m,u){var i=r("./support"),o=r("./base64"),n=r("./nodejsUtils"),l=r("./external");function h(d){return d}function f(d,b){for(var p=0;p<d.length;++p)b[p]=255&d.charCodeAt(p);return b}r("setimmediate"),u.newBlob=function(d,b){u.checkSupport("blob");try{return new Blob([d],{type:b})}catch{try{var p=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return p.append(d),p.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var v={stringifyByChunk:function(d,b,p){var k=[],E=0,N=d.length;if(N<=p)return String.fromCharCode.apply(null,d);for(;E<N;)b==="array"||b==="nodebuffer"?k.push(String.fromCharCode.apply(null,d.slice(E,Math.min(E+p,N)))):k.push(String.fromCharCode.apply(null,d.subarray(E,Math.min(E+p,N)))),E+=p;return k.join("")},stringifyByChar:function(d){for(var b="",p=0;p<d.length;p++)b+=String.fromCharCode(d[p]);return b},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,n.allocBuffer(1)).length===1}catch{return!1}})()}};function x(d){var b=65536,p=u.getTypeOf(d),k=!0;if(p==="uint8array"?k=v.applyCanBeUsed.uint8array:p==="nodebuffer"&&(k=v.applyCanBeUsed.nodebuffer),k)for(;1<b;)try{return v.stringifyByChunk(d,p,b)}catch{b=Math.floor(b/2)}return v.stringifyByChar(d)}function c(d,b){for(var p=0;p<d.length;p++)b[p]=d[p];return b}u.applyFromCharCode=x;var g={};g.string={string:h,array:function(d){return f(d,new Array(d.length))},arraybuffer:function(d){return g.string.uint8array(d).buffer},uint8array:function(d){return f(d,new Uint8Array(d.length))},nodebuffer:function(d){return f(d,n.allocBuffer(d.length))}},g.array={string:x,array:h,arraybuffer:function(d){return new Uint8Array(d).buffer},uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(d)}},g.arraybuffer={string:function(d){return x(new Uint8Array(d))},array:function(d){return c(new Uint8Array(d),new Array(d.byteLength))},arraybuffer:h,uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(new Uint8Array(d))}},g.uint8array={string:x,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return d.buffer},uint8array:h,nodebuffer:function(d){return n.newBufferFrom(d)}},g.nodebuffer={string:x,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return g.nodebuffer.uint8array(d).buffer},uint8array:function(d){return c(d,new Uint8Array(d.length))},nodebuffer:h},u.transformTo=function(d,b){if(b=b||"",!d)return b;u.checkSupport(d);var p=u.getTypeOf(b);return g[p][d](b)},u.resolve=function(d){for(var b=d.split("/"),p=[],k=0;k<b.length;k++){var E=b[k];E==="."||E===""&&k!==0&&k!==b.length-1||(E===".."?p.pop():p.push(E))}return p.join("/")},u.getTypeOf=function(d){return typeof d=="string"?"string":Object.prototype.toString.call(d)==="[object Array]"?"array":i.nodebuffer&&n.isBuffer(d)?"nodebuffer":i.uint8array&&d instanceof Uint8Array?"uint8array":i.arraybuffer&&d instanceof ArrayBuffer?"arraybuffer":void 0},u.checkSupport=function(d){if(!i[d.toLowerCase()])throw new Error(d+" is not supported by this platform")},u.MAX_VALUE_16BITS=65535,u.MAX_VALUE_32BITS=-1,u.pretty=function(d){var b,p,k="";for(p=0;p<(d||"").length;p++)k+="\\x"+((b=d.charCodeAt(p))<16?"0":"")+b.toString(16).toUpperCase();return k},u.delay=function(d,b,p){setImmediate(function(){d.apply(p||null,b||[])})},u.inherits=function(d,b){function p(){}p.prototype=b.prototype,d.prototype=new p},u.extend=function(){var d,b,p={};for(d=0;d<arguments.length;d++)for(b in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],b)&&p[b]===void 0&&(p[b]=arguments[d][b]);return p},u.prepareContent=function(d,b,p,k,E){return l.Promise.resolve(b).then(function(N){return i.blob&&(N instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(N))!==-1)&&typeof FileReader<"u"?new l.Promise(function(C,T){var L=new FileReader;L.onload=function(D){C(D.target.result)},L.onerror=function(D){T(D.target.error)},L.readAsArrayBuffer(N)}):N}).then(function(N){var C=u.getTypeOf(N);return C?(C==="arraybuffer"?N=u.transformTo("uint8array",N):C==="string"&&(E?N=o.decode(N):p&&k!==!0&&(N=(function(T){return f(T,i.uint8array?new Uint8Array(T.length):new Array(T.length))})(N))),N):l.Promise.reject(new Error("Can't read the data of '"+d+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,m,u){var i=r("./reader/readerFor"),o=r("./utils"),n=r("./signature"),l=r("./zipEntry"),h=r("./support");function f(v){this.files=[],this.loadOptions=v}f.prototype={checkSignature:function(v){if(!this.reader.readAndCheckSignature(v)){this.reader.index-=4;var x=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(x)+", expected "+o.pretty(v)+")")}},isSignature:function(v,x){var c=this.reader.index;this.reader.setIndex(v);var g=this.reader.readString(4)===x;return this.reader.setIndex(c),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var v=this.reader.readData(this.zipCommentLength),x=h.uint8array?"uint8array":"array",c=o.transformTo(x,v);this.zipComment=this.loadOptions.decodeFileName(c)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var v,x,c,g=this.zip64EndOfCentralSize-44;0<g;)v=this.reader.readInt(2),x=this.reader.readInt(4),c=this.reader.readData(x),this.zip64ExtensibleData[v]={id:v,length:x,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var v,x;for(v=0;v<this.files.length;v++)x=this.files[v],this.reader.setIndex(x.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),x.readLocalPart(this.reader),x.handleUTF8(),x.processAttributes()},readCentralDir:function(){var v;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.CENTRAL_FILE_HEADER);)(v=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(v);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var v=this.reader.lastIndexOfSignature(n.CENTRAL_DIRECTORY_END);if(v<0)throw this.isSignature(0,n.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(v);var x=v;if(this.checkSignature(n.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(v=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(v),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,n.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var c=this.centralDirOffset+this.centralDirSize;this.zip64&&(c+=20,c+=12+this.zip64EndOfCentralSize);var g=x-c;if(0<g)this.isSignature(x,n.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(v){this.reader=i(v)},load:function(v){this.prepareReader(v),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},m.exports=f},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,m,u){var i=r("./reader/readerFor"),o=r("./utils"),n=r("./compressedObject"),l=r("./crc32"),h=r("./utf8"),f=r("./compressions"),v=r("./support");function x(c,g){this.options=c,this.loadOptions=g}x.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(c){var g,d;if(c.skip(22),this.fileNameLength=c.readInt(2),d=c.readInt(2),this.fileName=c.readData(this.fileNameLength),c.skip(d),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=(function(b){for(var p in f)if(Object.prototype.hasOwnProperty.call(f,p)&&f[p].magic===b)return f[p];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,g,c.readData(this.compressedSize))},readCentralPart:function(c){this.versionMadeBy=c.readInt(2),c.skip(2),this.bitFlag=c.readInt(2),this.compressionMethod=c.readString(2),this.date=c.readDate(),this.crc32=c.readInt(4),this.compressedSize=c.readInt(4),this.uncompressedSize=c.readInt(4);var g=c.readInt(2);if(this.extraFieldsLength=c.readInt(2),this.fileCommentLength=c.readInt(2),this.diskNumberStart=c.readInt(2),this.internalFileAttributes=c.readInt(2),this.externalFileAttributes=c.readInt(4),this.localHeaderOffset=c.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");c.skip(g),this.readExtraFields(c),this.parseZIP64ExtraField(c),this.fileComment=c.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var c=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),c==0&&(this.dosPermissions=63&this.externalFileAttributes),c==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var c=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=c.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=c.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=c.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=c.readInt(4))}},readExtraFields:function(c){var g,d,b,p=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<p;)g=c.readInt(2),d=c.readInt(2),b=c.readData(d),this.extraFields[g]={id:g,length:d,value:b};c.setIndex(p)},handleUTF8:function(){var c=v.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var d=o.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(d)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var p=o.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(p)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var g=i(c.value);return g.readInt(1)!==1||l(this.fileName)!==g.readInt(4)?null:h.utf8decode(g.readData(c.length-5))}return null},findExtraFieldUnicodeComment:function(){var c=this.extraFields[25461];if(c){var g=i(c.value);return g.readInt(1)!==1||l(this.fileComment)!==g.readInt(4)?null:h.utf8decode(g.readData(c.length-5))}return null}},m.exports=x},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,m,u){function i(g,d,b){this.name=g,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=d,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var o=r("./stream/StreamHelper"),n=r("./stream/DataWorker"),l=r("./utf8"),h=r("./compressedObject"),f=r("./stream/GenericWorker");i.prototype={internalStream:function(g){var d=null,b="string";try{if(!g)throw new Error("No output type specified.");var p=(b=g.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),d=this._decompressWorker();var k=!this._dataBinary;k&&!p&&(d=d.pipe(new l.Utf8EncodeWorker)),!k&&p&&(d=d.pipe(new l.Utf8DecodeWorker))}catch(E){(d=new f("error")).error(E)}return new o(d,b,"")},async:function(g,d){return this.internalStream(g).accumulate(d)},nodeStream:function(g,d){return this.internalStream(g||"nodebuffer").toNodejsStream(d)},_compressWorker:function(g,d){if(this._data instanceof h&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new l.Utf8EncodeWorker)),h.createWorkerFrom(b,g,d)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof f?this._data:new n(this._data)}};for(var v=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],x=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<v.length;c++)i.prototype[v[c]]=x;m.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,m,u){(function(i){var o,n,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var h=0,f=new l(g),v=i.document.createTextNode("");f.observe(v,{characterData:!0}),o=function(){v.data=h=++h%2}}else if(i.setImmediate||i.MessageChannel===void 0)o="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var d=i.document.createElement("script");d.onreadystatechange=function(){g(),d.onreadystatechange=null,d.parentNode.removeChild(d),d=null},i.document.documentElement.appendChild(d)}:function(){setTimeout(g,0)};else{var x=new i.MessageChannel;x.port1.onmessage=g,o=function(){x.port2.postMessage(0)}}var c=[];function g(){var d,b;n=!0;for(var p=c.length;p;){for(b=c,c=[],d=-1;++d<p;)b[d]();p=c.length}n=!1}m.exports=function(d){c.push(d)!==1||n||o()}}).call(this,typeof Ae<"u"?Ae:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,m,u){var i=r("immediate");function o(){}var n={},l=["REJECTED"],h=["FULFILLED"],f=["PENDING"];function v(p){if(typeof p!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,p!==o&&d(this,p)}function x(p,k,E){this.promise=p,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}function c(p,k,E){i(function(){var N;try{N=k(E)}catch(C){return n.reject(p,C)}N===p?n.reject(p,new TypeError("Cannot resolve promise with itself")):n.resolve(p,N)})}function g(p){var k=p&&p.then;if(p&&(typeof p=="object"||typeof p=="function")&&typeof k=="function")return function(){k.apply(p,arguments)}}function d(p,k){var E=!1;function N(L){E||(E=!0,n.reject(p,L))}function C(L){E||(E=!0,n.resolve(p,L))}var T=b(function(){k(C,N)});T.status==="error"&&N(T.value)}function b(p,k){var E={};try{E.value=p(k),E.status="success"}catch(N){E.status="error",E.value=N}return E}(m.exports=v).prototype.finally=function(p){if(typeof p!="function")return this;var k=this.constructor;return this.then(function(E){return k.resolve(p()).then(function(){return E})},function(E){return k.resolve(p()).then(function(){throw E})})},v.prototype.catch=function(p){return this.then(null,p)},v.prototype.then=function(p,k){if(typeof p!="function"&&this.state===h||typeof k!="function"&&this.state===l)return this;var E=new this.constructor(o);return this.state!==f?c(E,this.state===h?p:k,this.outcome):this.queue.push(new x(E,p,k)),E},x.prototype.callFulfilled=function(p){n.resolve(this.promise,p)},x.prototype.otherCallFulfilled=function(p){c(this.promise,this.onFulfilled,p)},x.prototype.callRejected=function(p){n.reject(this.promise,p)},x.prototype.otherCallRejected=function(p){c(this.promise,this.onRejected,p)},n.resolve=function(p,k){var E=b(g,k);if(E.status==="error")return n.reject(p,E.value);var N=E.value;if(N)d(p,N);else{p.state=h,p.outcome=k;for(var C=-1,T=p.queue.length;++C<T;)p.queue[C].callFulfilled(k)}return p},n.reject=function(p,k){p.state=l,p.outcome=k;for(var E=-1,N=p.queue.length;++E<N;)p.queue[E].callRejected(k);return p},v.resolve=function(p){return p instanceof this?p:n.resolve(new this(o),p)},v.reject=function(p){var k=new this(o);return n.reject(k,p)},v.all=function(p){var k=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=p.length,N=!1;if(!E)return this.resolve([]);for(var C=new Array(E),T=0,L=-1,D=new this(o);++L<E;)O(p[L],L);return D;function O(B,re){k.resolve(B).then(function(j){C[re]=j,++T!==E||N||(N=!0,n.resolve(D,C))},function(j){N||(N=!0,n.reject(D,j))})}},v.race=function(p){var k=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=p.length,N=!1;if(!E)return this.resolve([]);for(var C=-1,T=new this(o);++C<E;)L=p[C],k.resolve(L).then(function(D){N||(N=!0,n.resolve(T,D))},function(D){N||(N=!0,n.reject(T,D))});var L;return T}},{immediate:36}],38:[function(r,m,u){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),m.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,m,u){var i=r("./zlib/deflate"),o=r("./utils/common"),n=r("./utils/strings"),l=r("./zlib/messages"),h=r("./zlib/zstream"),f=Object.prototype.toString,v=0,x=-1,c=0,g=8;function d(p){if(!(this instanceof d))return new d(p);this.options=o.assign({level:x,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},p||{});var k=this.options;k.raw&&0<k.windowBits?k.windowBits=-k.windowBits:k.gzip&&0<k.windowBits&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var E=i.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(E!==v)throw new Error(l[E]);if(k.header&&i.deflateSetHeader(this.strm,k.header),k.dictionary){var N;if(N=typeof k.dictionary=="string"?n.string2buf(k.dictionary):f.call(k.dictionary)==="[object ArrayBuffer]"?new Uint8Array(k.dictionary):k.dictionary,(E=i.deflateSetDictionary(this.strm,N))!==v)throw new Error(l[E]);this._dict_set=!0}}function b(p,k){var E=new d(k);if(E.push(p,!0),E.err)throw E.msg||l[E.err];return E.result}d.prototype.push=function(p,k){var E,N,C=this.strm,T=this.options.chunkSize;if(this.ended)return!1;N=k===~~k?k:k===!0?4:0,typeof p=="string"?C.input=n.string2buf(p):f.call(p)==="[object ArrayBuffer]"?C.input=new Uint8Array(p):C.input=p,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new o.Buf8(T),C.next_out=0,C.avail_out=T),(E=i.deflate(C,N))!==1&&E!==v)return this.onEnd(E),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||N!==4&&N!==2)||(this.options.to==="string"?this.onData(n.buf2binstring(o.shrinkBuf(C.output,C.next_out))):this.onData(o.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&E!==1);return N===4?(E=i.deflateEnd(this.strm),this.onEnd(E),this.ended=!0,E===v):N!==2||(this.onEnd(v),!(C.avail_out=0))},d.prototype.onData=function(p){this.chunks.push(p)},d.prototype.onEnd=function(p){p===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},u.Deflate=d,u.deflate=b,u.deflateRaw=function(p,k){return(k=k||{}).raw=!0,b(p,k)},u.gzip=function(p,k){return(k=k||{}).gzip=!0,b(p,k)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,m,u){var i=r("./zlib/inflate"),o=r("./utils/common"),n=r("./utils/strings"),l=r("./zlib/constants"),h=r("./zlib/messages"),f=r("./zlib/zstream"),v=r("./zlib/gzheader"),x=Object.prototype.toString;function c(d){if(!(this instanceof c))return new c(d);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},d||{});var b=this.options;b.raw&&0<=b.windowBits&&b.windowBits<16&&(b.windowBits=-b.windowBits,b.windowBits===0&&(b.windowBits=-15)),!(0<=b.windowBits&&b.windowBits<16)||d&&d.windowBits||(b.windowBits+=32),15<b.windowBits&&b.windowBits<48&&(15&b.windowBits)==0&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var p=i.inflateInit2(this.strm,b.windowBits);if(p!==l.Z_OK)throw new Error(h[p]);this.header=new v,i.inflateGetHeader(this.strm,this.header)}function g(d,b){var p=new c(b);if(p.push(d,!0),p.err)throw p.msg||h[p.err];return p.result}c.prototype.push=function(d,b){var p,k,E,N,C,T,L=this.strm,D=this.options.chunkSize,O=this.options.dictionary,B=!1;if(this.ended)return!1;k=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof d=="string"?L.input=n.binstring2buf(d):x.call(d)==="[object ArrayBuffer]"?L.input=new Uint8Array(d):L.input=d,L.next_in=0,L.avail_in=L.input.length;do{if(L.avail_out===0&&(L.output=new o.Buf8(D),L.next_out=0,L.avail_out=D),(p=i.inflate(L,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&O&&(T=typeof O=="string"?n.string2buf(O):x.call(O)==="[object ArrayBuffer]"?new Uint8Array(O):O,p=i.inflateSetDictionary(this.strm,T)),p===l.Z_BUF_ERROR&&B===!0&&(p=l.Z_OK,B=!1),p!==l.Z_STREAM_END&&p!==l.Z_OK)return this.onEnd(p),!(this.ended=!0);L.next_out&&(L.avail_out!==0&&p!==l.Z_STREAM_END&&(L.avail_in!==0||k!==l.Z_FINISH&&k!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(E=n.utf8border(L.output,L.next_out),N=L.next_out-E,C=n.buf2string(L.output,E),L.next_out=N,L.avail_out=D-N,N&&o.arraySet(L.output,L.output,E,N,0),this.onData(C)):this.onData(o.shrinkBuf(L.output,L.next_out)))),L.avail_in===0&&L.avail_out===0&&(B=!0)}while((0<L.avail_in||L.avail_out===0)&&p!==l.Z_STREAM_END);return p===l.Z_STREAM_END&&(k=l.Z_FINISH),k===l.Z_FINISH?(p=i.inflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===l.Z_OK):k!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(L.avail_out=0))},c.prototype.onData=function(d){this.chunks.push(d)},c.prototype.onEnd=function(d){d===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=d,this.msg=this.strm.msg},u.Inflate=c,u.inflate=g,u.inflateRaw=function(d,b){return(b=b||{}).raw=!0,g(d,b)},u.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,m,u){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.assign=function(l){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var f=h.shift();if(f){if(typeof f!="object")throw new TypeError(f+"must be non-object");for(var v in f)f.hasOwnProperty(v)&&(l[v]=f[v])}}return l},u.shrinkBuf=function(l,h){return l.length===h?l:l.subarray?l.subarray(0,h):(l.length=h,l)};var o={arraySet:function(l,h,f,v,x){if(h.subarray&&l.subarray)l.set(h.subarray(f,f+v),x);else for(var c=0;c<v;c++)l[x+c]=h[f+c]},flattenChunks:function(l){var h,f,v,x,c,g;for(h=v=0,f=l.length;h<f;h++)v+=l[h].length;for(g=new Uint8Array(v),h=x=0,f=l.length;h<f;h++)c=l[h],g.set(c,x),x+=c.length;return g}},n={arraySet:function(l,h,f,v,x){for(var c=0;c<v;c++)l[x+c]=h[f+c]},flattenChunks:function(l){return[].concat.apply([],l)}};u.setTyped=function(l){l?(u.Buf8=Uint8Array,u.Buf16=Uint16Array,u.Buf32=Int32Array,u.assign(u,o)):(u.Buf8=Array,u.Buf16=Array,u.Buf32=Array,u.assign(u,n))},u.setTyped(i)},{}],42:[function(r,m,u){var i=r("./common"),o=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var l=new i.Buf8(256),h=0;h<256;h++)l[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function f(v,x){if(x<65537&&(v.subarray&&n||!v.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(v,x));for(var c="",g=0;g<x;g++)c+=String.fromCharCode(v[g]);return c}l[254]=l[254]=1,u.string2buf=function(v){var x,c,g,d,b,p=v.length,k=0;for(d=0;d<p;d++)(64512&(c=v.charCodeAt(d)))==55296&&d+1<p&&(64512&(g=v.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(g-56320),d++),k+=c<128?1:c<2048?2:c<65536?3:4;for(x=new i.Buf8(k),d=b=0;b<k;d++)(64512&(c=v.charCodeAt(d)))==55296&&d+1<p&&(64512&(g=v.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(g-56320),d++),c<128?x[b++]=c:(c<2048?x[b++]=192|c>>>6:(c<65536?x[b++]=224|c>>>12:(x[b++]=240|c>>>18,x[b++]=128|c>>>12&63),x[b++]=128|c>>>6&63),x[b++]=128|63&c);return x},u.buf2binstring=function(v){return f(v,v.length)},u.binstring2buf=function(v){for(var x=new i.Buf8(v.length),c=0,g=x.length;c<g;c++)x[c]=v.charCodeAt(c);return x},u.buf2string=function(v,x){var c,g,d,b,p=x||v.length,k=new Array(2*p);for(c=g=0;c<p;)if((d=v[c++])<128)k[g++]=d;else if(4<(b=l[d]))k[g++]=65533,c+=b-1;else{for(d&=b===2?31:b===3?15:7;1<b&&c<p;)d=d<<6|63&v[c++],b--;1<b?k[g++]=65533:d<65536?k[g++]=d:(d-=65536,k[g++]=55296|d>>10&1023,k[g++]=56320|1023&d)}return f(k,g)},u.utf8border=function(v,x){var c;for((x=x||v.length)>v.length&&(x=v.length),c=x-1;0<=c&&(192&v[c])==128;)c--;return c<0||c===0?x:c+l[v[c]]>x?c:x}},{"./common":41}],43:[function(r,m,u){m.exports=function(i,o,n,l){for(var h=65535&i|0,f=i>>>16&65535|0,v=0;n!==0;){for(n-=v=2e3<n?2e3:n;f=f+(h=h+o[l++]|0)|0,--v;);h%=65521,f%=65521}return h|f<<16|0}},{}],44:[function(r,m,u){m.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,m,u){var i=(function(){for(var o,n=[],l=0;l<256;l++){o=l;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;n[l]=o}return n})();m.exports=function(o,n,l,h){var f=i,v=h+l;o^=-1;for(var x=h;x<v;x++)o=o>>>8^f[255&(o^n[x])];return-1^o}},{}],46:[function(r,m,u){var i,o=r("../utils/common"),n=r("./trees"),l=r("./adler32"),h=r("./crc32"),f=r("./messages"),v=0,x=4,c=0,g=-2,d=-1,b=4,p=2,k=8,E=9,N=286,C=30,T=19,L=2*N+1,D=15,O=3,B=258,re=B+O+1,j=42,R=113,s=1,U=2,te=3,Z=4;function W(t,V){return t.msg=f[V],V}function J(t){return(t<<1)-(4<t?9:0)}function X(t){for(var V=t.length;0<=--V;)t[V]=0}function z(t){var V=t.state,A=V.pending;A>t.avail_out&&(A=t.avail_out),A!==0&&(o.arraySet(t.output,V.pending_buf,V.pending_out,A,t.next_out),t.next_out+=A,V.pending_out+=A,t.total_out+=A,t.avail_out-=A,V.pending-=A,V.pending===0&&(V.pending_out=0))}function S(t,V){n._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,V),t.block_start=t.strstart,z(t.strm)}function q(t,V){t.pending_buf[t.pending++]=V}function K(t,V){t.pending_buf[t.pending++]=V>>>8&255,t.pending_buf[t.pending++]=255&V}function Q(t,V){var A,y,w=t.max_chain_length,I=t.strstart,H=t.prev_length,G=t.nice_match,P=t.strstart>t.w_size-re?t.strstart-(t.w_size-re):0,F=t.window,M=t.w_mask,$=t.prev,ee=t.strstart+B,de=F[I+H-1],le=F[I+H];t.prev_length>=t.good_match&&(w>>=2),G>t.lookahead&&(G=t.lookahead);do if(F[(A=V)+H]===le&&F[A+H-1]===de&&F[A]===F[I]&&F[++A]===F[I+1]){I+=2,A++;do;while(F[++I]===F[++A]&&F[++I]===F[++A]&&F[++I]===F[++A]&&F[++I]===F[++A]&&F[++I]===F[++A]&&F[++I]===F[++A]&&F[++I]===F[++A]&&F[++I]===F[++A]&&I<ee);if(y=B-(ee-I),I=ee-B,H<y){if(t.match_start=V,G<=(H=y))break;de=F[I+H-1],le=F[I+H]}}while((V=$[V&M])>P&&--w!=0);return H<=t.lookahead?H:t.lookahead}function he(t){var V,A,y,w,I,H,G,P,F,M,$=t.w_size;do{if(w=t.window_size-t.lookahead-t.strstart,t.strstart>=$+($-re)){for(o.arraySet(t.window,t.window,$,$,0),t.match_start-=$,t.strstart-=$,t.block_start-=$,V=A=t.hash_size;y=t.head[--V],t.head[V]=$<=y?y-$:0,--A;);for(V=A=$;y=t.prev[--V],t.prev[V]=$<=y?y-$:0,--A;);w+=$}if(t.strm.avail_in===0)break;if(H=t.strm,G=t.window,P=t.strstart+t.lookahead,F=w,M=void 0,M=H.avail_in,F<M&&(M=F),A=M===0?0:(H.avail_in-=M,o.arraySet(G,H.input,H.next_in,M,P),H.state.wrap===1?H.adler=l(H.adler,G,M,P):H.state.wrap===2&&(H.adler=h(H.adler,G,M,P)),H.next_in+=M,H.total_in+=M,M),t.lookahead+=A,t.lookahead+t.insert>=O)for(I=t.strstart-t.insert,t.ins_h=t.window[I],t.ins_h=(t.ins_h<<t.hash_shift^t.window[I+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[I+O-1])&t.hash_mask,t.prev[I&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=I,I++,t.insert--,!(t.lookahead+t.insert<O)););}while(t.lookahead<re&&t.strm.avail_in!==0)}function ie(t,V){for(var A,y;;){if(t.lookahead<re){if(he(t),t.lookahead<re&&V===v)return s;if(t.lookahead===0)break}if(A=0,t.lookahead>=O&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+O-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),A!==0&&t.strstart-A<=t.w_size-re&&(t.match_length=Q(t,A)),t.match_length>=O)if(y=n._tr_tally(t,t.strstart-t.match_start,t.match_length-O),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=O){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+O-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,--t.match_length!=0;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else y=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(y&&(S(t,!1),t.strm.avail_out===0))return s}return t.insert=t.strstart<O-1?t.strstart:O-1,V===x?(S(t,!0),t.strm.avail_out===0?te:Z):t.last_lit&&(S(t,!1),t.strm.avail_out===0)?s:U}function ae(t,V){for(var A,y,w;;){if(t.lookahead<re){if(he(t),t.lookahead<re&&V===v)return s;if(t.lookahead===0)break}if(A=0,t.lookahead>=O&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+O-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=O-1,A!==0&&t.prev_length<t.max_lazy_match&&t.strstart-A<=t.w_size-re&&(t.match_length=Q(t,A),t.match_length<=5&&(t.strategy===1||t.match_length===O&&4096<t.strstart-t.match_start)&&(t.match_length=O-1)),t.prev_length>=O&&t.match_length<=t.prev_length){for(w=t.strstart+t.lookahead-O,y=n._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-O),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=w&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+O-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),--t.prev_length!=0;);if(t.match_available=0,t.match_length=O-1,t.strstart++,y&&(S(t,!1),t.strm.avail_out===0))return s}else if(t.match_available){if((y=n._tr_tally(t,0,t.window[t.strstart-1]))&&S(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return s}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(y=n._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<O-1?t.strstart:O-1,V===x?(S(t,!0),t.strm.avail_out===0?te:Z):t.last_lit&&(S(t,!1),t.strm.avail_out===0)?s:U}function se(t,V,A,y,w){this.good_length=t,this.max_lazy=V,this.nice_length=A,this.max_chain=y,this.func=w}function fe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=k,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*L),this.dyn_dtree=new o.Buf16(2*(2*C+1)),this.bl_tree=new o.Buf16(2*(2*T+1)),X(this.dyn_ltree),X(this.dyn_dtree),X(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(D+1),this.heap=new o.Buf16(2*N+1),X(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*N+1),X(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ge(t){var V;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=p,(V=t.state).pending=0,V.pending_out=0,V.wrap<0&&(V.wrap=-V.wrap),V.status=V.wrap?j:R,t.adler=V.wrap===2?0:1,V.last_flush=v,n._tr_init(V),c):W(t,g)}function we(t){var V=ge(t);return V===c&&(function(A){A.window_size=2*A.w_size,X(A.head),A.max_lazy_match=i[A.level].max_lazy,A.good_match=i[A.level].good_length,A.nice_match=i[A.level].nice_length,A.max_chain_length=i[A.level].max_chain,A.strstart=0,A.block_start=0,A.lookahead=0,A.insert=0,A.match_length=A.prev_length=O-1,A.match_available=0,A.ins_h=0})(t.state),V}function _e(t,V,A,y,w,I){if(!t)return g;var H=1;if(V===d&&(V=6),y<0?(H=0,y=-y):15<y&&(H=2,y-=16),w<1||E<w||A!==k||y<8||15<y||V<0||9<V||I<0||b<I)return W(t,g);y===8&&(y=9);var G=new fe;return(t.state=G).strm=t,G.wrap=H,G.gzhead=null,G.w_bits=y,G.w_size=1<<G.w_bits,G.w_mask=G.w_size-1,G.hash_bits=w+7,G.hash_size=1<<G.hash_bits,G.hash_mask=G.hash_size-1,G.hash_shift=~~((G.hash_bits+O-1)/O),G.window=new o.Buf8(2*G.w_size),G.head=new o.Buf16(G.hash_size),G.prev=new o.Buf16(G.w_size),G.lit_bufsize=1<<w+6,G.pending_buf_size=4*G.lit_bufsize,G.pending_buf=new o.Buf8(G.pending_buf_size),G.d_buf=1*G.lit_bufsize,G.l_buf=3*G.lit_bufsize,G.level=V,G.strategy=I,G.method=A,we(t)}i=[new se(0,0,0,0,function(t,V){var A=65535;for(A>t.pending_buf_size-5&&(A=t.pending_buf_size-5);;){if(t.lookahead<=1){if(he(t),t.lookahead===0&&V===v)return s;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var y=t.block_start+A;if((t.strstart===0||t.strstart>=y)&&(t.lookahead=t.strstart-y,t.strstart=y,S(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-re&&(S(t,!1),t.strm.avail_out===0))return s}return t.insert=0,V===x?(S(t,!0),t.strm.avail_out===0?te:Z):(t.strstart>t.block_start&&(S(t,!1),t.strm.avail_out),s)}),new se(4,4,8,4,ie),new se(4,5,16,8,ie),new se(4,6,32,32,ie),new se(4,4,16,16,ae),new se(8,16,32,32,ae),new se(8,16,128,128,ae),new se(8,32,128,256,ae),new se(32,128,258,1024,ae),new se(32,258,258,4096,ae)],u.deflateInit=function(t,V){return _e(t,V,k,15,8,0)},u.deflateInit2=_e,u.deflateReset=we,u.deflateResetKeep=ge,u.deflateSetHeader=function(t,V){return t&&t.state?t.state.wrap!==2?g:(t.state.gzhead=V,c):g},u.deflate=function(t,V){var A,y,w,I;if(!t||!t.state||5<V||V<0)return t?W(t,g):g;if(y=t.state,!t.output||!t.input&&t.avail_in!==0||y.status===666&&V!==x)return W(t,t.avail_out===0?-5:g);if(y.strm=t,A=y.last_flush,y.last_flush=V,y.status===j)if(y.wrap===2)t.adler=0,q(y,31),q(y,139),q(y,8),y.gzhead?(q(y,(y.gzhead.text?1:0)+(y.gzhead.hcrc?2:0)+(y.gzhead.extra?4:0)+(y.gzhead.name?8:0)+(y.gzhead.comment?16:0)),q(y,255&y.gzhead.time),q(y,y.gzhead.time>>8&255),q(y,y.gzhead.time>>16&255),q(y,y.gzhead.time>>24&255),q(y,y.level===9?2:2<=y.strategy||y.level<2?4:0),q(y,255&y.gzhead.os),y.gzhead.extra&&y.gzhead.extra.length&&(q(y,255&y.gzhead.extra.length),q(y,y.gzhead.extra.length>>8&255)),y.gzhead.hcrc&&(t.adler=h(t.adler,y.pending_buf,y.pending,0)),y.gzindex=0,y.status=69):(q(y,0),q(y,0),q(y,0),q(y,0),q(y,0),q(y,y.level===9?2:2<=y.strategy||y.level<2?4:0),q(y,3),y.status=R);else{var H=k+(y.w_bits-8<<4)<<8;H|=(2<=y.strategy||y.level<2?0:y.level<6?1:y.level===6?2:3)<<6,y.strstart!==0&&(H|=32),H+=31-H%31,y.status=R,K(y,H),y.strstart!==0&&(K(y,t.adler>>>16),K(y,65535&t.adler)),t.adler=1}if(y.status===69)if(y.gzhead.extra){for(w=y.pending;y.gzindex<(65535&y.gzhead.extra.length)&&(y.pending!==y.pending_buf_size||(y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),z(t),w=y.pending,y.pending!==y.pending_buf_size));)q(y,255&y.gzhead.extra[y.gzindex]),y.gzindex++;y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),y.gzindex===y.gzhead.extra.length&&(y.gzindex=0,y.status=73)}else y.status=73;if(y.status===73)if(y.gzhead.name){w=y.pending;do{if(y.pending===y.pending_buf_size&&(y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),z(t),w=y.pending,y.pending===y.pending_buf_size)){I=1;break}I=y.gzindex<y.gzhead.name.length?255&y.gzhead.name.charCodeAt(y.gzindex++):0,q(y,I)}while(I!==0);y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),I===0&&(y.gzindex=0,y.status=91)}else y.status=91;if(y.status===91)if(y.gzhead.comment){w=y.pending;do{if(y.pending===y.pending_buf_size&&(y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),z(t),w=y.pending,y.pending===y.pending_buf_size)){I=1;break}I=y.gzindex<y.gzhead.comment.length?255&y.gzhead.comment.charCodeAt(y.gzindex++):0,q(y,I)}while(I!==0);y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),I===0&&(y.status=103)}else y.status=103;if(y.status===103&&(y.gzhead.hcrc?(y.pending+2>y.pending_buf_size&&z(t),y.pending+2<=y.pending_buf_size&&(q(y,255&t.adler),q(y,t.adler>>8&255),t.adler=0,y.status=R)):y.status=R),y.pending!==0){if(z(t),t.avail_out===0)return y.last_flush=-1,c}else if(t.avail_in===0&&J(V)<=J(A)&&V!==x)return W(t,-5);if(y.status===666&&t.avail_in!==0)return W(t,-5);if(t.avail_in!==0||y.lookahead!==0||V!==v&&y.status!==666){var G=y.strategy===2?(function(P,F){for(var M;;){if(P.lookahead===0&&(he(P),P.lookahead===0)){if(F===v)return s;break}if(P.match_length=0,M=n._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++,M&&(S(P,!1),P.strm.avail_out===0))return s}return P.insert=0,F===x?(S(P,!0),P.strm.avail_out===0?te:Z):P.last_lit&&(S(P,!1),P.strm.avail_out===0)?s:U})(y,V):y.strategy===3?(function(P,F){for(var M,$,ee,de,le=P.window;;){if(P.lookahead<=B){if(he(P),P.lookahead<=B&&F===v)return s;if(P.lookahead===0)break}if(P.match_length=0,P.lookahead>=O&&0<P.strstart&&($=le[ee=P.strstart-1])===le[++ee]&&$===le[++ee]&&$===le[++ee]){de=P.strstart+B;do;while($===le[++ee]&&$===le[++ee]&&$===le[++ee]&&$===le[++ee]&&$===le[++ee]&&$===le[++ee]&&$===le[++ee]&&$===le[++ee]&&ee<de);P.match_length=B-(de-ee),P.match_length>P.lookahead&&(P.match_length=P.lookahead)}if(P.match_length>=O?(M=n._tr_tally(P,1,P.match_length-O),P.lookahead-=P.match_length,P.strstart+=P.match_length,P.match_length=0):(M=n._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++),M&&(S(P,!1),P.strm.avail_out===0))return s}return P.insert=0,F===x?(S(P,!0),P.strm.avail_out===0?te:Z):P.last_lit&&(S(P,!1),P.strm.avail_out===0)?s:U})(y,V):i[y.level].func(y,V);if(G!==te&&G!==Z||(y.status=666),G===s||G===te)return t.avail_out===0&&(y.last_flush=-1),c;if(G===U&&(V===1?n._tr_align(y):V!==5&&(n._tr_stored_block(y,0,0,!1),V===3&&(X(y.head),y.lookahead===0&&(y.strstart=0,y.block_start=0,y.insert=0))),z(t),t.avail_out===0))return y.last_flush=-1,c}return V!==x?c:y.wrap<=0?1:(y.wrap===2?(q(y,255&t.adler),q(y,t.adler>>8&255),q(y,t.adler>>16&255),q(y,t.adler>>24&255),q(y,255&t.total_in),q(y,t.total_in>>8&255),q(y,t.total_in>>16&255),q(y,t.total_in>>24&255)):(K(y,t.adler>>>16),K(y,65535&t.adler)),z(t),0<y.wrap&&(y.wrap=-y.wrap),y.pending!==0?c:1)},u.deflateEnd=function(t){var V;return t&&t.state?(V=t.state.status)!==j&&V!==69&&V!==73&&V!==91&&V!==103&&V!==R&&V!==666?W(t,g):(t.state=null,V===R?W(t,-3):c):g},u.deflateSetDictionary=function(t,V){var A,y,w,I,H,G,P,F,M=V.length;if(!t||!t.state||(I=(A=t.state).wrap)===2||I===1&&A.status!==j||A.lookahead)return g;for(I===1&&(t.adler=l(t.adler,V,M,0)),A.wrap=0,M>=A.w_size&&(I===0&&(X(A.head),A.strstart=0,A.block_start=0,A.insert=0),F=new o.Buf8(A.w_size),o.arraySet(F,V,M-A.w_size,A.w_size,0),V=F,M=A.w_size),H=t.avail_in,G=t.next_in,P=t.input,t.avail_in=M,t.next_in=0,t.input=V,he(A);A.lookahead>=O;){for(y=A.strstart,w=A.lookahead-(O-1);A.ins_h=(A.ins_h<<A.hash_shift^A.window[y+O-1])&A.hash_mask,A.prev[y&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=y,y++,--w;);A.strstart=y,A.lookahead=O-1,he(A)}return A.strstart+=A.lookahead,A.block_start=A.strstart,A.insert=A.lookahead,A.lookahead=0,A.match_length=A.prev_length=O-1,A.match_available=0,t.next_in=G,t.input=P,t.avail_in=H,A.wrap=I,c},u.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,m,u){m.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r,m,u){m.exports=function(i,o){var n,l,h,f,v,x,c,g,d,b,p,k,E,N,C,T,L,D,O,B,re,j,R,s,U;n=i.state,l=i.next_in,s=i.input,h=l+(i.avail_in-5),f=i.next_out,U=i.output,v=f-(o-i.avail_out),x=f+(i.avail_out-257),c=n.dmax,g=n.wsize,d=n.whave,b=n.wnext,p=n.window,k=n.hold,E=n.bits,N=n.lencode,C=n.distcode,T=(1<<n.lenbits)-1,L=(1<<n.distbits)-1;e:do{E<15&&(k+=s[l++]<<E,E+=8,k+=s[l++]<<E,E+=8),D=N[k&T];t:for(;;){if(k>>>=O=D>>>24,E-=O,(O=D>>>16&255)===0)U[f++]=65535&D;else{if(!(16&O)){if((64&O)==0){D=N[(65535&D)+(k&(1<<O)-1)];continue t}if(32&O){n.mode=12;break e}i.msg="invalid literal/length code",n.mode=30;break e}B=65535&D,(O&=15)&&(E<O&&(k+=s[l++]<<E,E+=8),B+=k&(1<<O)-1,k>>>=O,E-=O),E<15&&(k+=s[l++]<<E,E+=8,k+=s[l++]<<E,E+=8),D=C[k&L];r:for(;;){if(k>>>=O=D>>>24,E-=O,!(16&(O=D>>>16&255))){if((64&O)==0){D=C[(65535&D)+(k&(1<<O)-1)];continue r}i.msg="invalid distance code",n.mode=30;break e}if(re=65535&D,E<(O&=15)&&(k+=s[l++]<<E,(E+=8)<O&&(k+=s[l++]<<E,E+=8)),c<(re+=k&(1<<O)-1)){i.msg="invalid distance too far back",n.mode=30;break e}if(k>>>=O,E-=O,(O=f-v)<re){if(d<(O=re-O)&&n.sane){i.msg="invalid distance too far back",n.mode=30;break e}if(R=p,(j=0)===b){if(j+=g-O,O<B){for(B-=O;U[f++]=p[j++],--O;);j=f-re,R=U}}else if(b<O){if(j+=g+b-O,(O-=b)<B){for(B-=O;U[f++]=p[j++],--O;);if(j=0,b<B){for(B-=O=b;U[f++]=p[j++],--O;);j=f-re,R=U}}}else if(j+=b-O,O<B){for(B-=O;U[f++]=p[j++],--O;);j=f-re,R=U}for(;2<B;)U[f++]=R[j++],U[f++]=R[j++],U[f++]=R[j++],B-=3;B&&(U[f++]=R[j++],1<B&&(U[f++]=R[j++]))}else{for(j=f-re;U[f++]=U[j++],U[f++]=U[j++],U[f++]=U[j++],2<(B-=3););B&&(U[f++]=U[j++],1<B&&(U[f++]=U[j++]))}break}}break}}while(l<h&&f<x);l-=B=E>>3,k&=(1<<(E-=B<<3))-1,i.next_in=l,i.next_out=f,i.avail_in=l<h?h-l+5:5-(l-h),i.avail_out=f<x?x-f+257:257-(f-x),n.hold=k,n.bits=E}},{}],49:[function(r,m,u){var i=r("../utils/common"),o=r("./adler32"),n=r("./crc32"),l=r("./inffast"),h=r("./inftrees"),f=1,v=2,x=0,c=-2,g=1,d=852,b=592;function p(j){return(j>>>24&255)+(j>>>8&65280)+((65280&j)<<8)+((255&j)<<24)}function k(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function E(j){var R;return j&&j.state?(R=j.state,j.total_in=j.total_out=R.total=0,j.msg="",R.wrap&&(j.adler=1&R.wrap),R.mode=g,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new i.Buf32(d),R.distcode=R.distdyn=new i.Buf32(b),R.sane=1,R.back=-1,x):c}function N(j){var R;return j&&j.state?((R=j.state).wsize=0,R.whave=0,R.wnext=0,E(j)):c}function C(j,R){var s,U;return j&&j.state?(U=j.state,R<0?(s=0,R=-R):(s=1+(R>>4),R<48&&(R&=15)),R&&(R<8||15<R)?c:(U.window!==null&&U.wbits!==R&&(U.window=null),U.wrap=s,U.wbits=R,N(j))):c}function T(j,R){var s,U;return j?(U=new k,(j.state=U).window=null,(s=C(j,R))!==x&&(j.state=null),s):c}var L,D,O=!0;function B(j){if(O){var R;for(L=new i.Buf32(512),D=new i.Buf32(32),R=0;R<144;)j.lens[R++]=8;for(;R<256;)j.lens[R++]=9;for(;R<280;)j.lens[R++]=7;for(;R<288;)j.lens[R++]=8;for(h(f,j.lens,0,288,L,0,j.work,{bits:9}),R=0;R<32;)j.lens[R++]=5;h(v,j.lens,0,32,D,0,j.work,{bits:5}),O=!1}j.lencode=L,j.lenbits=9,j.distcode=D,j.distbits=5}function re(j,R,s,U){var te,Z=j.state;return Z.window===null&&(Z.wsize=1<<Z.wbits,Z.wnext=0,Z.whave=0,Z.window=new i.Buf8(Z.wsize)),U>=Z.wsize?(i.arraySet(Z.window,R,s-Z.wsize,Z.wsize,0),Z.wnext=0,Z.whave=Z.wsize):(U<(te=Z.wsize-Z.wnext)&&(te=U),i.arraySet(Z.window,R,s-U,te,Z.wnext),(U-=te)?(i.arraySet(Z.window,R,s-U,U,0),Z.wnext=U,Z.whave=Z.wsize):(Z.wnext+=te,Z.wnext===Z.wsize&&(Z.wnext=0),Z.whave<Z.wsize&&(Z.whave+=te))),0}u.inflateReset=N,u.inflateReset2=C,u.inflateResetKeep=E,u.inflateInit=function(j){return T(j,15)},u.inflateInit2=T,u.inflate=function(j,R){var s,U,te,Z,W,J,X,z,S,q,K,Q,he,ie,ae,se,fe,ge,we,_e,t,V,A,y,w=0,I=new i.Buf8(4),H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!j||!j.state||!j.output||!j.input&&j.avail_in!==0)return c;(s=j.state).mode===12&&(s.mode=13),W=j.next_out,te=j.output,X=j.avail_out,Z=j.next_in,U=j.input,J=j.avail_in,z=s.hold,S=s.bits,q=J,K=X,V=x;e:for(;;)switch(s.mode){case g:if(s.wrap===0){s.mode=13;break}for(;S<16;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}if(2&s.wrap&&z===35615){I[s.check=0]=255&z,I[1]=z>>>8&255,s.check=n(s.check,I,2,0),S=z=0,s.mode=2;break}if(s.flags=0,s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&z)<<8)+(z>>8))%31){j.msg="incorrect header check",s.mode=30;break}if((15&z)!=8){j.msg="unknown compression method",s.mode=30;break}if(S-=4,t=8+(15&(z>>>=4)),s.wbits===0)s.wbits=t;else if(t>s.wbits){j.msg="invalid window size",s.mode=30;break}s.dmax=1<<t,j.adler=s.check=1,s.mode=512&z?10:12,S=z=0;break;case 2:for(;S<16;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}if(s.flags=z,(255&s.flags)!=8){j.msg="unknown compression method",s.mode=30;break}if(57344&s.flags){j.msg="unknown header flags set",s.mode=30;break}s.head&&(s.head.text=z>>8&1),512&s.flags&&(I[0]=255&z,I[1]=z>>>8&255,s.check=n(s.check,I,2,0)),S=z=0,s.mode=3;case 3:for(;S<32;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}s.head&&(s.head.time=z),512&s.flags&&(I[0]=255&z,I[1]=z>>>8&255,I[2]=z>>>16&255,I[3]=z>>>24&255,s.check=n(s.check,I,4,0)),S=z=0,s.mode=4;case 4:for(;S<16;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}s.head&&(s.head.xflags=255&z,s.head.os=z>>8),512&s.flags&&(I[0]=255&z,I[1]=z>>>8&255,s.check=n(s.check,I,2,0)),S=z=0,s.mode=5;case 5:if(1024&s.flags){for(;S<16;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}s.length=z,s.head&&(s.head.extra_len=z),512&s.flags&&(I[0]=255&z,I[1]=z>>>8&255,s.check=n(s.check,I,2,0)),S=z=0}else s.head&&(s.head.extra=null);s.mode=6;case 6:if(1024&s.flags&&(J<(Q=s.length)&&(Q=J),Q&&(s.head&&(t=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Array(s.head.extra_len)),i.arraySet(s.head.extra,U,Z,Q,t)),512&s.flags&&(s.check=n(s.check,U,Q,Z)),J-=Q,Z+=Q,s.length-=Q),s.length))break e;s.length=0,s.mode=7;case 7:if(2048&s.flags){if(J===0)break e;for(Q=0;t=U[Z+Q++],s.head&&t&&s.length<65536&&(s.head.name+=String.fromCharCode(t)),t&&Q<J;);if(512&s.flags&&(s.check=n(s.check,U,Q,Z)),J-=Q,Z+=Q,t)break e}else s.head&&(s.head.name=null);s.length=0,s.mode=8;case 8:if(4096&s.flags){if(J===0)break e;for(Q=0;t=U[Z+Q++],s.head&&t&&s.length<65536&&(s.head.comment+=String.fromCharCode(t)),t&&Q<J;);if(512&s.flags&&(s.check=n(s.check,U,Q,Z)),J-=Q,Z+=Q,t)break e}else s.head&&(s.head.comment=null);s.mode=9;case 9:if(512&s.flags){for(;S<16;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}if(z!==(65535&s.check)){j.msg="header crc mismatch",s.mode=30;break}S=z=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),j.adler=s.check=0,s.mode=12;break;case 10:for(;S<32;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}j.adler=s.check=p(z),S=z=0,s.mode=11;case 11:if(s.havedict===0)return j.next_out=W,j.avail_out=X,j.next_in=Z,j.avail_in=J,s.hold=z,s.bits=S,2;j.adler=s.check=1,s.mode=12;case 12:if(R===5||R===6)break e;case 13:if(s.last){z>>>=7&S,S-=7&S,s.mode=27;break}for(;S<3;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}switch(s.last=1&z,S-=1,3&(z>>>=1)){case 0:s.mode=14;break;case 1:if(B(s),s.mode=20,R!==6)break;z>>>=2,S-=2;break e;case 2:s.mode=17;break;case 3:j.msg="invalid block type",s.mode=30}z>>>=2,S-=2;break;case 14:for(z>>>=7&S,S-=7&S;S<32;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}if((65535&z)!=(z>>>16^65535)){j.msg="invalid stored block lengths",s.mode=30;break}if(s.length=65535&z,S=z=0,s.mode=15,R===6)break e;case 15:s.mode=16;case 16:if(Q=s.length){if(J<Q&&(Q=J),X<Q&&(Q=X),Q===0)break e;i.arraySet(te,U,Z,Q,W),J-=Q,Z+=Q,X-=Q,W+=Q,s.length-=Q;break}s.mode=12;break;case 17:for(;S<14;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}if(s.nlen=257+(31&z),z>>>=5,S-=5,s.ndist=1+(31&z),z>>>=5,S-=5,s.ncode=4+(15&z),z>>>=4,S-=4,286<s.nlen||30<s.ndist){j.msg="too many length or distance symbols",s.mode=30;break}s.have=0,s.mode=18;case 18:for(;s.have<s.ncode;){for(;S<3;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}s.lens[H[s.have++]]=7&z,z>>>=3,S-=3}for(;s.have<19;)s.lens[H[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,A={bits:s.lenbits},V=h(0,s.lens,0,19,s.lencode,0,s.work,A),s.lenbits=A.bits,V){j.msg="invalid code lengths set",s.mode=30;break}s.have=0,s.mode=19;case 19:for(;s.have<s.nlen+s.ndist;){for(;se=(w=s.lencode[z&(1<<s.lenbits)-1])>>>16&255,fe=65535&w,!((ae=w>>>24)<=S);){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}if(fe<16)z>>>=ae,S-=ae,s.lens[s.have++]=fe;else{if(fe===16){for(y=ae+2;S<y;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}if(z>>>=ae,S-=ae,s.have===0){j.msg="invalid bit length repeat",s.mode=30;break}t=s.lens[s.have-1],Q=3+(3&z),z>>>=2,S-=2}else if(fe===17){for(y=ae+3;S<y;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}S-=ae,t=0,Q=3+(7&(z>>>=ae)),z>>>=3,S-=3}else{for(y=ae+7;S<y;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}S-=ae,t=0,Q=11+(127&(z>>>=ae)),z>>>=7,S-=7}if(s.have+Q>s.nlen+s.ndist){j.msg="invalid bit length repeat",s.mode=30;break}for(;Q--;)s.lens[s.have++]=t}}if(s.mode===30)break;if(s.lens[256]===0){j.msg="invalid code -- missing end-of-block",s.mode=30;break}if(s.lenbits=9,A={bits:s.lenbits},V=h(f,s.lens,0,s.nlen,s.lencode,0,s.work,A),s.lenbits=A.bits,V){j.msg="invalid literal/lengths set",s.mode=30;break}if(s.distbits=6,s.distcode=s.distdyn,A={bits:s.distbits},V=h(v,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,A),s.distbits=A.bits,V){j.msg="invalid distances set",s.mode=30;break}if(s.mode=20,R===6)break e;case 20:s.mode=21;case 21:if(6<=J&&258<=X){j.next_out=W,j.avail_out=X,j.next_in=Z,j.avail_in=J,s.hold=z,s.bits=S,l(j,K),W=j.next_out,te=j.output,X=j.avail_out,Z=j.next_in,U=j.input,J=j.avail_in,z=s.hold,S=s.bits,s.mode===12&&(s.back=-1);break}for(s.back=0;se=(w=s.lencode[z&(1<<s.lenbits)-1])>>>16&255,fe=65535&w,!((ae=w>>>24)<=S);){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}if(se&&(240&se)==0){for(ge=ae,we=se,_e=fe;se=(w=s.lencode[_e+((z&(1<<ge+we)-1)>>ge)])>>>16&255,fe=65535&w,!(ge+(ae=w>>>24)<=S);){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}z>>>=ge,S-=ge,s.back+=ge}if(z>>>=ae,S-=ae,s.back+=ae,s.length=fe,se===0){s.mode=26;break}if(32&se){s.back=-1,s.mode=12;break}if(64&se){j.msg="invalid literal/length code",s.mode=30;break}s.extra=15&se,s.mode=22;case 22:if(s.extra){for(y=s.extra;S<y;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}s.length+=z&(1<<s.extra)-1,z>>>=s.extra,S-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=23;case 23:for(;se=(w=s.distcode[z&(1<<s.distbits)-1])>>>16&255,fe=65535&w,!((ae=w>>>24)<=S);){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}if((240&se)==0){for(ge=ae,we=se,_e=fe;se=(w=s.distcode[_e+((z&(1<<ge+we)-1)>>ge)])>>>16&255,fe=65535&w,!(ge+(ae=w>>>24)<=S);){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}z>>>=ge,S-=ge,s.back+=ge}if(z>>>=ae,S-=ae,s.back+=ae,64&se){j.msg="invalid distance code",s.mode=30;break}s.offset=fe,s.extra=15&se,s.mode=24;case 24:if(s.extra){for(y=s.extra;S<y;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}s.offset+=z&(1<<s.extra)-1,z>>>=s.extra,S-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){j.msg="invalid distance too far back",s.mode=30;break}s.mode=25;case 25:if(X===0)break e;if(Q=K-X,s.offset>Q){if((Q=s.offset-Q)>s.whave&&s.sane){j.msg="invalid distance too far back",s.mode=30;break}he=Q>s.wnext?(Q-=s.wnext,s.wsize-Q):s.wnext-Q,Q>s.length&&(Q=s.length),ie=s.window}else ie=te,he=W-s.offset,Q=s.length;for(X<Q&&(Q=X),X-=Q,s.length-=Q;te[W++]=ie[he++],--Q;);s.length===0&&(s.mode=21);break;case 26:if(X===0)break e;te[W++]=s.length,X--,s.mode=21;break;case 27:if(s.wrap){for(;S<32;){if(J===0)break e;J--,z|=U[Z++]<<S,S+=8}if(K-=X,j.total_out+=K,s.total+=K,K&&(j.adler=s.check=s.flags?n(s.check,te,K,W-K):o(s.check,te,K,W-K)),K=X,(s.flags?z:p(z))!==s.check){j.msg="incorrect data check",s.mode=30;break}S=z=0}s.mode=28;case 28:if(s.wrap&&s.flags){for(;S<32;){if(J===0)break e;J--,z+=U[Z++]<<S,S+=8}if(z!==(4294967295&s.total)){j.msg="incorrect length check",s.mode=30;break}S=z=0}s.mode=29;case 29:V=1;break e;case 30:V=-3;break e;case 31:return-4;case 32:default:return c}return j.next_out=W,j.avail_out=X,j.next_in=Z,j.avail_in=J,s.hold=z,s.bits=S,(s.wsize||K!==j.avail_out&&s.mode<30&&(s.mode<27||R!==4))&&re(j,j.output,j.next_out,K-j.avail_out)?(s.mode=31,-4):(q-=j.avail_in,K-=j.avail_out,j.total_in+=q,j.total_out+=K,s.total+=K,s.wrap&&K&&(j.adler=s.check=s.flags?n(s.check,te,K,j.next_out-K):o(s.check,te,K,j.next_out-K)),j.data_type=s.bits+(s.last?64:0)+(s.mode===12?128:0)+(s.mode===20||s.mode===15?256:0),(q==0&&K===0||R===4)&&V===x&&(V=-5),V)},u.inflateEnd=function(j){if(!j||!j.state)return c;var R=j.state;return R.window&&(R.window=null),j.state=null,x},u.inflateGetHeader=function(j,R){var s;return j&&j.state?(2&(s=j.state).wrap)==0?c:((s.head=R).done=!1,x):c},u.inflateSetDictionary=function(j,R){var s,U=R.length;return j&&j.state?(s=j.state).wrap!==0&&s.mode!==11?c:s.mode===11&&o(1,R,U,0)!==s.check?-3:re(j,R,U,U)?(s.mode=31,-4):(s.havedict=1,x):c},u.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,m,u){var i=r("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];m.exports=function(f,v,x,c,g,d,b,p){var k,E,N,C,T,L,D,O,B,re=p.bits,j=0,R=0,s=0,U=0,te=0,Z=0,W=0,J=0,X=0,z=0,S=null,q=0,K=new i.Buf16(16),Q=new i.Buf16(16),he=null,ie=0;for(j=0;j<=15;j++)K[j]=0;for(R=0;R<c;R++)K[v[x+R]]++;for(te=re,U=15;1<=U&&K[U]===0;U--);if(U<te&&(te=U),U===0)return g[d++]=20971520,g[d++]=20971520,p.bits=1,0;for(s=1;s<U&&K[s]===0;s++);for(te<s&&(te=s),j=J=1;j<=15;j++)if(J<<=1,(J-=K[j])<0)return-1;if(0<J&&(f===0||U!==1))return-1;for(Q[1]=0,j=1;j<15;j++)Q[j+1]=Q[j]+K[j];for(R=0;R<c;R++)v[x+R]!==0&&(b[Q[v[x+R]]++]=R);if(L=f===0?(S=he=b,19):f===1?(S=o,q-=257,he=n,ie-=257,256):(S=l,he=h,-1),j=s,T=d,W=R=z=0,N=-1,C=(X=1<<(Z=te))-1,f===1&&852<X||f===2&&592<X)return 1;for(;;){for(D=j-W,B=b[R]<L?(O=0,b[R]):b[R]>L?(O=he[ie+b[R]],S[q+b[R]]):(O=96,0),k=1<<j-W,s=E=1<<Z;g[T+(z>>W)+(E-=k)]=D<<24|O<<16|B|0,E!==0;);for(k=1<<j-1;z&k;)k>>=1;if(k!==0?(z&=k-1,z+=k):z=0,R++,--K[j]==0){if(j===U)break;j=v[x+b[R]]}if(te<j&&(z&C)!==N){for(W===0&&(W=te),T+=s,J=1<<(Z=j-W);Z+W<U&&!((J-=K[Z+W])<=0);)Z++,J<<=1;if(X+=1<<Z,f===1&&852<X||f===2&&592<X)return 1;g[N=z&C]=te<<24|Z<<16|T-d|0}}return z!==0&&(g[T+z]=j-W<<24|64<<16|0),p.bits=te,0}},{"../utils/common":41}],51:[function(r,m,u){m.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r,m,u){var i=r("../utils/common"),o=0,n=1;function l(w){for(var I=w.length;0<=--I;)w[I]=0}var h=0,f=29,v=256,x=v+1+f,c=30,g=19,d=2*x+1,b=15,p=16,k=7,E=256,N=16,C=17,T=18,L=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],re=new Array(2*(x+2));l(re);var j=new Array(2*c);l(j);var R=new Array(512);l(R);var s=new Array(256);l(s);var U=new Array(f);l(U);var te,Z,W,J=new Array(c);function X(w,I,H,G,P){this.static_tree=w,this.extra_bits=I,this.extra_base=H,this.elems=G,this.max_length=P,this.has_stree=w&&w.length}function z(w,I){this.dyn_tree=w,this.max_code=0,this.stat_desc=I}function S(w){return w<256?R[w]:R[256+(w>>>7)]}function q(w,I){w.pending_buf[w.pending++]=255&I,w.pending_buf[w.pending++]=I>>>8&255}function K(w,I,H){w.bi_valid>p-H?(w.bi_buf|=I<<w.bi_valid&65535,q(w,w.bi_buf),w.bi_buf=I>>p-w.bi_valid,w.bi_valid+=H-p):(w.bi_buf|=I<<w.bi_valid&65535,w.bi_valid+=H)}function Q(w,I,H){K(w,H[2*I],H[2*I+1])}function he(w,I){for(var H=0;H|=1&w,w>>>=1,H<<=1,0<--I;);return H>>>1}function ie(w,I,H){var G,P,F=new Array(b+1),M=0;for(G=1;G<=b;G++)F[G]=M=M+H[G-1]<<1;for(P=0;P<=I;P++){var $=w[2*P+1];$!==0&&(w[2*P]=he(F[$]++,$))}}function ae(w){var I;for(I=0;I<x;I++)w.dyn_ltree[2*I]=0;for(I=0;I<c;I++)w.dyn_dtree[2*I]=0;for(I=0;I<g;I++)w.bl_tree[2*I]=0;w.dyn_ltree[2*E]=1,w.opt_len=w.static_len=0,w.last_lit=w.matches=0}function se(w){8<w.bi_valid?q(w,w.bi_buf):0<w.bi_valid&&(w.pending_buf[w.pending++]=w.bi_buf),w.bi_buf=0,w.bi_valid=0}function fe(w,I,H,G){var P=2*I,F=2*H;return w[P]<w[F]||w[P]===w[F]&&G[I]<=G[H]}function ge(w,I,H){for(var G=w.heap[H],P=H<<1;P<=w.heap_len&&(P<w.heap_len&&fe(I,w.heap[P+1],w.heap[P],w.depth)&&P++,!fe(I,G,w.heap[P],w.depth));)w.heap[H]=w.heap[P],H=P,P<<=1;w.heap[H]=G}function we(w,I,H){var G,P,F,M,$=0;if(w.last_lit!==0)for(;G=w.pending_buf[w.d_buf+2*$]<<8|w.pending_buf[w.d_buf+2*$+1],P=w.pending_buf[w.l_buf+$],$++,G===0?Q(w,P,I):(Q(w,(F=s[P])+v+1,I),(M=L[F])!==0&&K(w,P-=U[F],M),Q(w,F=S(--G),H),(M=D[F])!==0&&K(w,G-=J[F],M)),$<w.last_lit;);Q(w,E,I)}function _e(w,I){var H,G,P,F=I.dyn_tree,M=I.stat_desc.static_tree,$=I.stat_desc.has_stree,ee=I.stat_desc.elems,de=-1;for(w.heap_len=0,w.heap_max=d,H=0;H<ee;H++)F[2*H]!==0?(w.heap[++w.heap_len]=de=H,w.depth[H]=0):F[2*H+1]=0;for(;w.heap_len<2;)F[2*(P=w.heap[++w.heap_len]=de<2?++de:0)]=1,w.depth[P]=0,w.opt_len--,$&&(w.static_len-=M[2*P+1]);for(I.max_code=de,H=w.heap_len>>1;1<=H;H--)ge(w,F,H);for(P=ee;H=w.heap[1],w.heap[1]=w.heap[w.heap_len--],ge(w,F,1),G=w.heap[1],w.heap[--w.heap_max]=H,w.heap[--w.heap_max]=G,F[2*P]=F[2*H]+F[2*G],w.depth[P]=(w.depth[H]>=w.depth[G]?w.depth[H]:w.depth[G])+1,F[2*H+1]=F[2*G+1]=P,w.heap[1]=P++,ge(w,F,1),2<=w.heap_len;);w.heap[--w.heap_max]=w.heap[1],(function(le,ke){var je,Ee,Ve,xe,st,Et,Ce=ke.dyn_tree,Nr=ke.max_code,go=ke.stat_desc.static_tree,vo=ke.stat_desc.has_stree,xo=ke.stat_desc.extra_bits,Sr=ke.stat_desc.extra_base,Ke=ke.stat_desc.max_length,lt=0;for(xe=0;xe<=b;xe++)le.bl_count[xe]=0;for(Ce[2*le.heap[le.heap_max]+1]=0,je=le.heap_max+1;je<d;je++)Ke<(xe=Ce[2*Ce[2*(Ee=le.heap[je])+1]+1]+1)&&(xe=Ke,lt++),Ce[2*Ee+1]=xe,Nr<Ee||(le.bl_count[xe]++,st=0,Sr<=Ee&&(st=xo[Ee-Sr]),Et=Ce[2*Ee],le.opt_len+=Et*(xe+st),vo&&(le.static_len+=Et*(go[2*Ee+1]+st)));if(lt!==0){do{for(xe=Ke-1;le.bl_count[xe]===0;)xe--;le.bl_count[xe]--,le.bl_count[xe+1]+=2,le.bl_count[Ke]--,lt-=2}while(0<lt);for(xe=Ke;xe!==0;xe--)for(Ee=le.bl_count[xe];Ee!==0;)Nr<(Ve=le.heap[--je])||(Ce[2*Ve+1]!==xe&&(le.opt_len+=(xe-Ce[2*Ve+1])*Ce[2*Ve],Ce[2*Ve+1]=xe),Ee--)}})(w,I),ie(F,de,w.bl_count)}function t(w,I,H){var G,P,F=-1,M=I[1],$=0,ee=7,de=4;for(M===0&&(ee=138,de=3),I[2*(H+1)+1]=65535,G=0;G<=H;G++)P=M,M=I[2*(G+1)+1],++$<ee&&P===M||($<de?w.bl_tree[2*P]+=$:P!==0?(P!==F&&w.bl_tree[2*P]++,w.bl_tree[2*N]++):$<=10?w.bl_tree[2*C]++:w.bl_tree[2*T]++,F=P,de=($=0)===M?(ee=138,3):P===M?(ee=6,3):(ee=7,4))}function V(w,I,H){var G,P,F=-1,M=I[1],$=0,ee=7,de=4;for(M===0&&(ee=138,de=3),G=0;G<=H;G++)if(P=M,M=I[2*(G+1)+1],!(++$<ee&&P===M)){if($<de)for(;Q(w,P,w.bl_tree),--$!=0;);else P!==0?(P!==F&&(Q(w,P,w.bl_tree),$--),Q(w,N,w.bl_tree),K(w,$-3,2)):$<=10?(Q(w,C,w.bl_tree),K(w,$-3,3)):(Q(w,T,w.bl_tree),K(w,$-11,7));F=P,de=($=0)===M?(ee=138,3):P===M?(ee=6,3):(ee=7,4)}}l(J);var A=!1;function y(w,I,H,G){K(w,(h<<1)+(G?1:0),3),(function(P,F,M,$){se(P),q(P,M),q(P,~M),i.arraySet(P.pending_buf,P.window,F,M,P.pending),P.pending+=M})(w,I,H)}u._tr_init=function(w){A||((function(){var I,H,G,P,F,M=new Array(b+1);for(P=G=0;P<f-1;P++)for(U[P]=G,I=0;I<1<<L[P];I++)s[G++]=P;for(s[G-1]=P,P=F=0;P<16;P++)for(J[P]=F,I=0;I<1<<D[P];I++)R[F++]=P;for(F>>=7;P<c;P++)for(J[P]=F<<7,I=0;I<1<<D[P]-7;I++)R[256+F++]=P;for(H=0;H<=b;H++)M[H]=0;for(I=0;I<=143;)re[2*I+1]=8,I++,M[8]++;for(;I<=255;)re[2*I+1]=9,I++,M[9]++;for(;I<=279;)re[2*I+1]=7,I++,M[7]++;for(;I<=287;)re[2*I+1]=8,I++,M[8]++;for(ie(re,x+1,M),I=0;I<c;I++)j[2*I+1]=5,j[2*I]=he(I,5);te=new X(re,L,v+1,x,b),Z=new X(j,D,0,c,b),W=new X(new Array(0),O,0,g,k)})(),A=!0),w.l_desc=new z(w.dyn_ltree,te),w.d_desc=new z(w.dyn_dtree,Z),w.bl_desc=new z(w.bl_tree,W),w.bi_buf=0,w.bi_valid=0,ae(w)},u._tr_stored_block=y,u._tr_flush_block=function(w,I,H,G){var P,F,M=0;0<w.level?(w.strm.data_type===2&&(w.strm.data_type=(function($){var ee,de=4093624447;for(ee=0;ee<=31;ee++,de>>>=1)if(1&de&&$.dyn_ltree[2*ee]!==0)return o;if($.dyn_ltree[18]!==0||$.dyn_ltree[20]!==0||$.dyn_ltree[26]!==0)return n;for(ee=32;ee<v;ee++)if($.dyn_ltree[2*ee]!==0)return n;return o})(w)),_e(w,w.l_desc),_e(w,w.d_desc),M=(function($){var ee;for(t($,$.dyn_ltree,$.l_desc.max_code),t($,$.dyn_dtree,$.d_desc.max_code),_e($,$.bl_desc),ee=g-1;3<=ee&&$.bl_tree[2*B[ee]+1]===0;ee--);return $.opt_len+=3*(ee+1)+5+5+4,ee})(w),P=w.opt_len+3+7>>>3,(F=w.static_len+3+7>>>3)<=P&&(P=F)):P=F=H+5,H+4<=P&&I!==-1?y(w,I,H,G):w.strategy===4||F===P?(K(w,2+(G?1:0),3),we(w,re,j)):(K(w,4+(G?1:0),3),(function($,ee,de,le){var ke;for(K($,ee-257,5),K($,de-1,5),K($,le-4,4),ke=0;ke<le;ke++)K($,$.bl_tree[2*B[ke]+1],3);V($,$.dyn_ltree,ee-1),V($,$.dyn_dtree,de-1)})(w,w.l_desc.max_code+1,w.d_desc.max_code+1,M+1),we(w,w.dyn_ltree,w.dyn_dtree)),ae(w),G&&se(w)},u._tr_tally=function(w,I,H){return w.pending_buf[w.d_buf+2*w.last_lit]=I>>>8&255,w.pending_buf[w.d_buf+2*w.last_lit+1]=255&I,w.pending_buf[w.l_buf+w.last_lit]=255&H,w.last_lit++,I===0?w.dyn_ltree[2*H]++:(w.matches++,I--,w.dyn_ltree[2*(s[H]+v+1)]++,w.dyn_dtree[2*S(I)]++),w.last_lit===w.lit_bufsize-1},u._tr_align=function(w){K(w,2,3),Q(w,E,re),(function(I){I.bi_valid===16?(q(I,I.bi_buf),I.bi_buf=0,I.bi_valid=0):8<=I.bi_valid&&(I.pending_buf[I.pending++]=255&I.bi_buf,I.bi_buf>>=8,I.bi_valid-=8)})(w)}},{"../utils/common":41}],53:[function(r,m,u){m.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,m,u){(function(i){(function(o,n){if(!o.setImmediate){var l,h,f,v,x=1,c={},g=!1,d=o.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(o);b=b&&b.setTimeout?b:o,l={}.toString.call(o.process)==="[object process]"?function(N){process.nextTick(function(){k(N)})}:(function(){if(o.postMessage&&!o.importScripts){var N=!0,C=o.onmessage;return o.onmessage=function(){N=!1},o.postMessage("","*"),o.onmessage=C,N}})()?(v="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",E,!1):o.attachEvent("onmessage",E),function(N){o.postMessage(v+N,"*")}):o.MessageChannel?((f=new MessageChannel).port1.onmessage=function(N){k(N.data)},function(N){f.port2.postMessage(N)}):d&&"onreadystatechange"in d.createElement("script")?(h=d.documentElement,function(N){var C=d.createElement("script");C.onreadystatechange=function(){k(N),C.onreadystatechange=null,h.removeChild(C),C=null},h.appendChild(C)}):function(N){setTimeout(k,0,N)},b.setImmediate=function(N){typeof N!="function"&&(N=new Function(""+N));for(var C=new Array(arguments.length-1),T=0;T<C.length;T++)C[T]=arguments[T+1];var L={callback:N,args:C};return c[x]=L,l(x),x++},b.clearImmediate=p}function p(N){delete c[N]}function k(N){if(g)setTimeout(k,0,N);else{var C=c[N];if(C){g=!0;try{(function(T){var L=T.callback,D=T.args;switch(D.length){case 0:L();break;case 1:L(D[0]);break;case 2:L(D[0],D[1]);break;case 3:L(D[0],D[1],D[2]);break;default:L.apply(n,D)}})(C)}finally{p(N),g=!1}}}}function E(N){N.source===o&&typeof N.data=="string"&&N.data.indexOf(v)===0&&k(+N.data.slice(v.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof Ae<"u"?Ae:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ct)),ct.exports}var Or=Tr();const Dr=Ir(Or);var qe={exports:{}},Lr=qe.exports,St;function Pr(){return St||(St=1,(function(e,_){(function(r,m){m()})(Lr,function(){function r(h,f){return typeof f>"u"?f={autoBom:!1}:typeof f!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function m(h,f,v){var x=new XMLHttpRequest;x.open("GET",h),x.responseType="blob",x.onload=function(){l(x.response,f,v)},x.onerror=function(){console.error("could not download file")},x.send()}function u(h){var f=new XMLHttpRequest;f.open("HEAD",h,!1);try{f.send()}catch{}return 200<=f.status&&299>=f.status}function i(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(f)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ae=="object"&&Ae.global===Ae?Ae:void 0,n=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!n?function(h,f,v){var x=o.URL||o.webkitURL,c=document.createElement("a");f=f||h.name||"download",c.download=f,c.rel="noopener",typeof h=="string"?(c.href=h,c.origin===location.origin?i(c):u(c.href)?m(h,f,v):i(c,c.target="_blank")):(c.href=x.createObjectURL(h),setTimeout(function(){x.revokeObjectURL(c.href)},4e4),setTimeout(function(){i(c)},0))}:"msSaveOrOpenBlob"in navigator?function(h,f,v){if(f=f||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(r(h,v),f);else if(u(h))m(h,f,v);else{var x=document.createElement("a");x.href=h,x.target="_blank",setTimeout(function(){i(x)})}}:function(h,f,v,x){if(x=x||open("","_blank"),x&&(x.document.title=x.document.body.innerText="downloading..."),typeof h=="string")return m(h,f,v);var c=h.type==="application/octet-stream",g=/constructor/i.test(o.HTMLElement)||o.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||c&&g||n)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var E=b.result;E=d?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),x?x.location.href=E:location=E,x=null},b.readAsDataURL(h)}else{var p=o.URL||o.webkitURL,k=p.createObjectURL(h);x?x.location=k:location.href=k,x=null,setTimeout(function(){p.revokeObjectURL(k)},4e4)}});o.saveAs=l.saveAs=l,e.exports=l})})(qe)),qe.exports}var Ct=Pr();const At=async(e,_)=>{const r=new Dr,m=r.folder("config");m==null||m.file("site.json",JSON.stringify(e.site,null,2)),m==null||m.file("theme.json",JSON.stringify(e.theme,null,2)),m==null||m.file("menu.json",JSON.stringify(e.menu,null,2));const u=r.folder("pages");u==null||u.file(`${_}.json`,JSON.stringify(e.page,null,2));const i=await r.generateAsync({type:"blob"});Ct.saveAs(i,`jsonpages-project-${_}-${Date.now()}.zip`)},It=(e,_,r)=>{const{pages:m,...u}=e.site,i={page:e.page,site:u,menu:e.menu,theme:e.theme},n=`<script id="jp-baked-state" type="application/json">${JSON.stringify(i)}<\/script>`,l=r.replace("</head>",`${n}</head>`),h=new Blob([`<!DOCTYPE html>${l}`],{type:"text/html;charset=utf-8"});Ct.saveAs(h,`${_}.html`)};function Tt(e){var _,r,m="";if(typeof e=="string"||typeof e=="number")m+=e;else if(typeof e=="object")if(Array.isArray(e)){var u=e.length;for(_=0;_<u;_++)e[_]&&(r=Tt(e[_]))&&(m&&(m+=" "),m+=r)}else for(r in e)e[r]&&(m&&(m+=" "),m+=r);return m}function Fr(){for(var e,_,r=0,m="",u=arguments.length;r<u;r++)(e=arguments[r])&&(_=Tt(e))&&(m&&(m+=" "),m+=_);return m}const Rr=(e,_)=>{const r=new Array(e.length+_.length);for(let m=0;m<e.length;m++)r[m]=e[m];for(let m=0;m<_.length;m++)r[e.length+m]=_[m];return r},Mr=(e,_)=>({classGroupId:e,validator:_}),Ot=(e=new Map,_=null,r)=>({nextPart:e,validators:_,classGroupId:r}),Ye="-",Dt=[],Br="arbitrary..",Ur=e=>{const _=$r(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:m}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Wr(o);const n=o.split(Ye),l=n[0]===""&&n.length>1?1:0;return Lt(n,l,_)},getConflictingClassGroupIds:(o,n)=>{if(n){const l=m[o],h=r[o];return l?h?Rr(h,l):l:h||Dt}return r[o]||Dt}}},Lt=(e,_,r)=>{if(e.length-_===0)return r.classGroupId;const u=e[_],i=r.nextPart.get(u);if(i){const h=Lt(e,_+1,i);if(h)return h}const o=r.validators;if(o===null)return;const n=_===0?e.join(Ye):e.slice(_).join(Ye),l=o.length;for(let h=0;h<l;h++){const f=o[h];if(f.validator(n))return f.classGroupId}},Wr=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const _=e.slice(1,-1),r=_.indexOf(":"),m=_.slice(0,r);return m?Br+m:void 0})(),$r=e=>{const{theme:_,classGroups:r}=e;return Zr(r,_)},Zr=(e,_)=>{const r=Ot();for(const m in e){const u=e[m];dt(u,r,m,_)}return r},dt=(e,_,r,m)=>{const u=e.length;for(let i=0;i<u;i++){const o=e[i];Hr(o,_,r,m)}},Hr=(e,_,r,m)=>{if(typeof e=="string"){Gr(e,_,r);return}if(typeof e=="function"){Vr(e,_,r,m);return}Kr(e,_,r,m)},Gr=(e,_,r)=>{const m=e===""?_:Pt(_,e);m.classGroupId=r},Vr=(e,_,r,m)=>{if(Jr(e)){dt(e(m),_,r,m);return}_.validators===null&&(_.validators=[]),_.validators.push(Mr(r,e))},Kr=(e,_,r,m)=>{const u=Object.entries(e),i=u.length;for(let o=0;o<i;o++){const[n,l]=u[o];dt(l,Pt(_,n),r,m)}},Pt=(e,_)=>{let r=e;const m=_.split(Ye),u=m.length;for(let i=0;i<u;i++){const o=m[i];let n=r.nextPart.get(o);n||(n=Ot(),r.nextPart.set(o,n)),r=n}return r},Jr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let _=0,r=Object.create(null),m=Object.create(null);const u=(i,o)=>{r[i]=o,_++,_>e&&(_=0,m=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=m[i])!==void 0)return u(i,o),o},set(i,o){i in r?r[i]=o:u(i,o)}}},ut="!",Ft=":",Yr=[],Rt=(e,_,r,m,u)=>({modifiers:e,hasImportantModifier:_,baseClassName:r,maybePostfixModifierPosition:m,isExternal:u}),Xr=e=>{const{prefix:_,experimentalParseClassName:r}=e;let m=u=>{const i=[];let o=0,n=0,l=0,h;const f=u.length;for(let d=0;d<f;d++){const b=u[d];if(o===0&&n===0){if(b===Ft){i.push(u.slice(l,d)),l=d+1;continue}if(b==="/"){h=d;continue}}b==="["?o++:b==="]"?o--:b==="("?n++:b===")"&&n--}const v=i.length===0?u:u.slice(l);let x=v,c=!1;v.endsWith(ut)?(x=v.slice(0,-1),c=!0):v.startsWith(ut)&&(x=v.slice(1),c=!0);const g=h&&h>l?h-l:void 0;return Rt(i,c,x,g)};if(_){const u=_+Ft,i=m;m=o=>o.startsWith(u)?i(o.slice(u.length)):Rt(Yr,!1,o,void 0,!0)}if(r){const u=m;m=i=>r({className:i,parseClassName:u})}return m},Qr=e=>{const _=new Map;return e.orderSensitiveModifiers.forEach((r,m)=>{_.set(r,1e6+m)}),r=>{const m=[];let u=[];for(let i=0;i<r.length;i++){const o=r[i],n=o[0]==="[",l=_.has(o);n||l?(u.length>0&&(u.sort(),m.push(...u),u=[]),m.push(o)):u.push(o)}return u.length>0&&(u.sort(),m.push(...u)),m}},en=e=>({cache:qr(e.cacheSize),parseClassName:Xr(e),sortModifiers:Qr(e),...Ur(e)}),tn=/\s+/,rn=(e,_)=>{const{parseClassName:r,getClassGroupId:m,getConflictingClassGroupIds:u,sortModifiers:i}=_,o=[],n=e.trim().split(tn);let l="";for(let h=n.length-1;h>=0;h-=1){const f=n[h],{isExternal:v,modifiers:x,hasImportantModifier:c,baseClassName:g,maybePostfixModifierPosition:d}=r(f);if(v){l=f+(l.length>0?" "+l:l);continue}let b=!!d,p=m(b?g.substring(0,d):g);if(!p){if(!b){l=f+(l.length>0?" "+l:l);continue}if(p=m(g),!p){l=f+(l.length>0?" "+l:l);continue}b=!1}const k=x.length===0?"":x.length===1?x[0]:i(x).join(":"),E=c?k+ut:k,N=E+p;if(o.indexOf(N)>-1)continue;o.push(N);const C=u(p,b);for(let T=0;T<C.length;++T){const L=C[T];o.push(E+L)}l=f+(l.length>0?" "+l:l)}return l},nn=(...e)=>{let _=0,r,m,u="";for(;_<e.length;)(r=e[_++])&&(m=Mt(r))&&(u&&(u+=" "),u+=m);return u},Mt=e=>{if(typeof e=="string")return e;let _,r="";for(let m=0;m<e.length;m++)e[m]&&(_=Mt(e[m]))&&(r&&(r+=" "),r+=_);return r},on=(e,..._)=>{let r,m,u,i;const o=l=>{const h=_.reduce((f,v)=>v(f),e());return r=en(h),m=r.cache.get,u=r.cache.set,i=n,n(l)},n=l=>{const h=m(l);if(h)return h;const f=rn(l,r);return u(l,f),f};return i=o,(...l)=>i(nn(...l))},an=[],ye=e=>{const _=r=>r[e]||an;return _.isThemeGetter=!0,_},Bt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ut=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sn=/^\d+\/\d+$/,ln=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,un=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>sn.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),Ie=e=>!!e&&Number.isInteger(Number(e)),ht=e=>e.endsWith("%")&&ce(e.slice(0,-1)),Se=e=>ln.test(e),pn=()=>!0,fn=e=>cn.test(e)&&!dn.test(e),Wt=()=>!1,mn=e=>un.test(e),bn=e=>hn.test(e),gn=e=>!ne(e)&&!oe(e),vn=e=>Pe(e,Vt,Wt),ne=e=>Bt.test(e),Te=e=>Pe(e,Kt,fn),pt=e=>Pe(e,_n,ce),$t=e=>Pe(e,Ht,Wt),xn=e=>Pe(e,Gt,bn),Xe=e=>Pe(e,Jt,mn),oe=e=>Ut.test(e),Be=e=>Fe(e,Kt),wn=e=>Fe(e,zn),Zt=e=>Fe(e,Ht),yn=e=>Fe(e,Vt),kn=e=>Fe(e,Gt),Qe=e=>Fe(e,Jt,!0),Pe=(e,_,r)=>{const m=Bt.exec(e);return m?m[1]?_(m[1]):r(m[2]):!1},Fe=(e,_,r=!1)=>{const m=Ut.exec(e);return m?m[1]?_(m[1]):r:!1},Ht=e=>e==="position"||e==="percentage",Gt=e=>e==="image"||e==="url",Vt=e=>e==="length"||e==="size"||e==="bg-size",Kt=e=>e==="length",_n=e=>e==="number",zn=e=>e==="family-name",Jt=e=>e==="shadow",jn=on(()=>{const e=ye("color"),_=ye("font"),r=ye("text"),m=ye("font-weight"),u=ye("tracking"),i=ye("leading"),o=ye("breakpoint"),n=ye("container"),l=ye("spacing"),h=ye("radius"),f=ye("shadow"),v=ye("inset-shadow"),x=ye("text-shadow"),c=ye("drop-shadow"),g=ye("blur"),d=ye("perspective"),b=ye("aspect"),p=ye("ease"),k=ye("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...N(),oe,ne],T=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],D=()=>[oe,ne,l],O=()=>[Le,"full","auto",...D()],B=()=>[Ie,"none","subgrid",oe,ne],re=()=>["auto",{span:["full",Ie,oe,ne]},Ie,oe,ne],j=()=>[Ie,"auto",oe,ne],R=()=>["auto","min","max","fr",oe,ne],s=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],te=()=>["auto",...D()],Z=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],W=()=>[e,oe,ne],J=()=>[...N(),Zt,$t,{position:[oe,ne]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",yn,vn,{size:[oe,ne]}],S=()=>[ht,Be,Te],q=()=>["","none","full",h,oe,ne],K=()=>["",ce,Be,Te],Q=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[ce,ht,Zt,$t],ae=()=>["","none",g,oe,ne],se=()=>["none",ce,oe,ne],fe=()=>["none",ce,oe,ne],ge=()=>[ce,oe,ne],we=()=>[Le,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Se],breakpoint:[Se],color:[pn],container:[Se],"drop-shadow":[Se],ease:["in","out","in-out"],font:[gn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Se],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Se],shadow:[Se],spacing:["px",ce],text:[Se],"text-shadow":[Se],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Le,ne,oe,b]}],container:["container"],columns:[{columns:[ce,ne,oe,n]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",oe,ne]}],basis:[{basis:[Le,"full","auto",n,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,Le,"auto","initial","none",ne]}],grow:[{grow:["",ce,oe,ne]}],shrink:[{shrink:["",ce,oe,ne]}],order:[{order:[Ie,"first","last","none",oe,ne]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...s(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...s()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":s()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:te()}],mx:[{mx:te()}],my:[{my:te()}],ms:[{ms:te()}],me:[{me:te()}],mt:[{mt:te()}],mr:[{mr:te()}],mb:[{mb:te()}],ml:[{ml:te()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[n,"screen",...Z()]}],"min-w":[{"min-w":[n,"screen","none",...Z()]}],"max-w":[{"max-w":[n,"screen","none","prose",{screen:[o]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",r,Be,Te]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[m,oe,pt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ht,ne]}],"font-family":[{font:[wn,ne,_]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,oe,ne]}],"line-clamp":[{"line-clamp":[ce,"none",oe,pt]}],leading:[{leading:[i,...D()]}],"list-image":[{"list-image":["none",oe,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",oe,Te]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[ce,"auto",oe,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oe,ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ie,oe,ne],radial:["",oe,ne],conic:[Ie,oe,ne]},kn,xn]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:S()}],"gradient-via-pos":[{via:S()}],"gradient-to-pos":[{to:S()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,oe,ne]}],"outline-w":[{outline:["",ce,Be,Te]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",f,Qe,Xe]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",v,Qe,Xe]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[ce,Te]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",x,Qe,Xe]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[ce,oe,ne]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[oe,ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,ne]}],filter:[{filter:["","none",oe,ne]}],blur:[{blur:ae()}],brightness:[{brightness:[ce,oe,ne]}],contrast:[{contrast:[ce,oe,ne]}],"drop-shadow":[{"drop-shadow":["","none",c,Qe,Xe]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",ce,oe,ne]}],"hue-rotate":[{"hue-rotate":[ce,oe,ne]}],invert:[{invert:["",ce,oe,ne]}],saturate:[{saturate:[ce,oe,ne]}],sepia:[{sepia:["",ce,oe,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,ne]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[ce,oe,ne]}],"backdrop-contrast":[{"backdrop-contrast":[ce,oe,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,oe,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,oe,ne]}],"backdrop-invert":[{"backdrop-invert":["",ce,oe,ne]}],"backdrop-opacity":[{"backdrop-opacity":[ce,oe,ne]}],"backdrop-saturate":[{"backdrop-saturate":[ce,oe,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,oe,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",oe,ne]}],ease:[{ease:["linear","initial",p,oe,ne]}],delay:[{delay:[ce,oe,ne]}],animate:[{animate:["none",k,oe,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[d,oe,ne]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":["scale-3d"],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[oe,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:we()}],"translate-x":[{"translate-x":we()}],"translate-y":[{"translate-y":we()}],"translate-z":[{"translate-z":we()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",oe,ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe,ne]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[ce,Be,Te,pt]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function ue(...e){return jn(Fr(e))}var et={exports:{}},Ue={};/**
11
+ */var Et;function Ir(){return Et||(Et=1,(function(e,_){(function(r){e.exports=r()})(function(){return(function r(m,u,i){function o(h,f){if(!u[h]){if(!m[h]){var x=typeof Je=="function"&&Je;if(!f&&x)return x(h,!0);if(n)return n(h,!0);var v=new Error("Cannot find module '"+h+"'");throw v.code="MODULE_NOT_FOUND",v}var c=u[h]={exports:{}};m[h][0].call(c.exports,function(b){var d=m[h][1][b];return o(d||b)},c,c.exports,r,m,u,i)}return u[h].exports}for(var n=typeof Je=="function"&&Je,l=0;l<i.length;l++)o(i[l]);return o})({1:[function(r,m,u){var i=r("./utils"),o=r("./support"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(l){for(var h,f,x,v,c,b,d,g=[],p=0,k=l.length,E=k,S=i.getTypeOf(l)!=="string";p<l.length;)E=k-p,x=S?(h=l[p++],f=p<k?l[p++]:0,p<k?l[p++]:0):(h=l.charCodeAt(p++),f=p<k?l.charCodeAt(p++):0,p<k?l.charCodeAt(p++):0),v=h>>2,c=(3&h)<<4|f>>4,b=1<E?(15&f)<<2|x>>6:64,d=2<E?63&x:64,g.push(n.charAt(v)+n.charAt(c)+n.charAt(b)+n.charAt(d));return g.join("")},u.decode=function(l){var h,f,x,v,c,b,d=0,g=0,p="data:";if(l.substr(0,p.length)===p)throw new Error("Invalid base64 input, it looks like a data url.");var k,E=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===n.charAt(64)&&E--,l.charAt(l.length-2)===n.charAt(64)&&E--,E%1!=0)throw new Error("Invalid base64 input, bad content length.");for(k=o.uint8array?new Uint8Array(0|E):new Array(0|E);d<l.length;)h=n.indexOf(l.charAt(d++))<<2|(v=n.indexOf(l.charAt(d++)))>>4,f=(15&v)<<4|(c=n.indexOf(l.charAt(d++)))>>2,x=(3&c)<<6|(b=n.indexOf(l.charAt(d++))),k[g++]=h,c!==64&&(k[g++]=f),b!==64&&(k[g++]=x);return k}},{"./support":30,"./utils":32}],2:[function(r,m,u){var i=r("./external"),o=r("./stream/DataWorker"),n=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function h(f,x,v,c,b){this.compressedSize=f,this.uncompressedSize=x,this.crc32=v,this.compression=c,this.compressedContent=b}h.prototype={getContentWorker:function(){var f=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),x=this;return f.on("end",function(){if(this.streamInfo.data_length!==x.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(f,x,v){return f.pipe(new n).pipe(new l("uncompressedSize")).pipe(x.compressWorker(v)).pipe(new l("compressedSize")).withStreamInfo("compression",x)},m.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,m,u){var i=r("./stream/GenericWorker");u.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},u.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,m,u){var i=r("./utils"),o=(function(){for(var n,l=[],h=0;h<256;h++){n=h;for(var f=0;f<8;f++)n=1&n?3988292384^n>>>1:n>>>1;l[h]=n}return l})();m.exports=function(n,l){return n!==void 0&&n.length?i.getTypeOf(n)!=="string"?(function(h,f,x,v){var c=o,b=v+x;h^=-1;for(var d=v;d<b;d++)h=h>>>8^c[255&(h^f[d])];return-1^h})(0|l,n,n.length,0):(function(h,f,x,v){var c=o,b=v+x;h^=-1;for(var d=v;d<b;d++)h=h>>>8^c[255&(h^f.charCodeAt(d))];return-1^h})(0|l,n,n.length,0):0}},{"./utils":32}],5:[function(r,m,u){u.base64=!1,u.binary=!1,u.dir=!1,u.createFolders=!0,u.date=null,u.compression=null,u.compressionOptions=null,u.comment=null,u.unixPermissions=null,u.dosPermissions=null},{}],6:[function(r,m,u){var i=null;i=typeof Promise<"u"?Promise:r("lie"),m.exports={Promise:i}},{lie:37}],7:[function(r,m,u){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=r("pako"),n=r("./utils"),l=r("./stream/GenericWorker"),h=i?"uint8array":"array";function f(x,v){l.call(this,"FlateWorker/"+x),this._pako=null,this._pakoAction=x,this._pakoOptions=v,this.meta={}}u.magic="\b\0",n.inherits(f,l),f.prototype.processChunk=function(x){this.meta=x.meta,this._pako===null&&this._createPako(),this._pako.push(n.transformTo(h,x.data),!1)},f.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var x=this;this._pako.onData=function(v){x.push({data:v,meta:x.meta})}},u.compressWorker=function(x){return new f("Deflate",x)},u.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,m,u){function i(c,b){var d,g="";for(d=0;d<b;d++)g+=String.fromCharCode(255&c),c>>>=8;return g}function o(c,b,d,g,p,k){var E,S,C=c.file,O=c.compression,L=k!==h.utf8encode,D=n.transformTo("string",k(C.name)),T=n.transformTo("string",h.utf8encode(C.name)),V=C.comment,re=n.transformTo("string",k(V)),j=n.transformTo("string",h.utf8encode(V)),R=T.length!==C.name.length,a=j.length!==V.length,M="",te="",U="",W=C.dir,K=C.date,X={crc32:0,compressedSize:0,uncompressedSize:0};b&&!d||(X.crc32=c.crc32,X.compressedSize=c.compressedSize,X.uncompressedSize=c.uncompressedSize);var z=0;b&&(z|=8),L||!R&&!a||(z|=2048);var N=0,J=0;W&&(N|=16),p==="UNIX"?(J=798,N|=(function(Q,ue){var ie=Q;return Q||(ie=ue?16893:33204),(65535&ie)<<16})(C.unixPermissions,W)):(J=20,N|=(function(Q){return 63&(Q||0)})(C.dosPermissions)),E=K.getUTCHours(),E<<=6,E|=K.getUTCMinutes(),E<<=5,E|=K.getUTCSeconds()/2,S=K.getUTCFullYear()-1980,S<<=4,S|=K.getUTCMonth()+1,S<<=5,S|=K.getUTCDate(),R&&(te=i(1,1)+i(f(D),4)+T,M+="up"+i(te.length,2)+te),a&&(U=i(1,1)+i(f(re),4)+j,M+="uc"+i(U.length,2)+U);var G="";return G+=`
12
+ \0`,G+=i(z,2),G+=O.magic,G+=i(E,2),G+=i(S,2),G+=i(X.crc32,4),G+=i(X.compressedSize,4),G+=i(X.uncompressedSize,4),G+=i(D.length,2),G+=i(M.length,2),{fileRecord:x.LOCAL_FILE_HEADER+G+D+M,dirRecord:x.CENTRAL_FILE_HEADER+i(J,2)+G+i(re.length,2)+"\0\0\0\0"+i(N,4)+i(g,4)+D+M+re}}var n=r("../utils"),l=r("../stream/GenericWorker"),h=r("../utf8"),f=r("../crc32"),x=r("../signature");function v(c,b,d,g){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=d,this.encodeFileName=g,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(v,l),v.prototype.push=function(c){var b=c.meta.percent||0,d=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(c):(this.bytesWritten+=c.data.length,l.prototype.push.call(this,{data:c.data,meta:{currentFile:this.currentFile,percent:d?(b+100*(d-g-1))/d:100}}))},v.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var b=this.streamFiles&&!c.file.dir;if(b){var d=o(c,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:d.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(c){this.accumulate=!1;var b=this.streamFiles&&!c.file.dir,d=o(c,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(d.dirRecord),b)this.push({data:(function(g){return x.DATA_DESCRIPTOR+i(g.crc32,4)+i(g.compressedSize,4)+i(g.uncompressedSize,4)})(c),meta:{percent:100}});else for(this.push({data:d.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},v.prototype.flush=function(){for(var c=this.bytesWritten,b=0;b<this.dirRecords.length;b++)this.push({data:this.dirRecords[b],meta:{percent:100}});var d=this.bytesWritten-c,g=(function(p,k,E,S,C){var O=n.transformTo("string",C(S));return x.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(p,2)+i(p,2)+i(k,4)+i(E,4)+i(O.length,2)+O})(this.dirRecords.length,d,c,this.zipComment,this.encodeFileName);this.push({data:g,meta:{percent:100}})},v.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},v.prototype.registerPrevious=function(c){this._sources.push(c);var b=this;return c.on("data",function(d){b.processChunk(d)}),c.on("end",function(){b.closedSource(b.previous.streamInfo),b._sources.length?b.prepareNextSource():b.end()}),c.on("error",function(d){b.error(d)}),this},v.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},v.prototype.error=function(c){var b=this._sources;if(!l.prototype.error.call(this,c))return!1;for(var d=0;d<b.length;d++)try{b[d].error(c)}catch{}return!0},v.prototype.lock=function(){l.prototype.lock.call(this);for(var c=this._sources,b=0;b<c.length;b++)c[b].lock()},m.exports=v},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,m,u){var i=r("../compressions"),o=r("./ZipFileWorker");u.generateWorker=function(n,l,h){var f=new o(l.streamFiles,h,l.platform,l.encodeFileName),x=0;try{n.forEach(function(v,c){x++;var b=(function(k,E){var S=k||E,C=i[S];if(!C)throw new Error(S+" is not a valid compression method !");return C})(c.options.compression,l.compression),d=c.options.compressionOptions||l.compressionOptions||{},g=c.dir,p=c.date;c._compressWorker(b,d).withStreamInfo("file",{name:v,dir:g,date:p,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(f)}),f.entriesCount=x}catch(v){f.error(v)}return f}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,m,u){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new i;for(var n in this)typeof this[n]!="function"&&(o[n]=this[n]);return o}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(o,n){return new i().loadAsync(o,n)},i.external=r("./external"),m.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,m,u){var i=r("./utils"),o=r("./external"),n=r("./utf8"),l=r("./zipEntries"),h=r("./stream/Crc32Probe"),f=r("./nodejsUtils");function x(v){return new o.Promise(function(c,b){var d=v.decompressed.getContentWorker().pipe(new h);d.on("error",function(g){b(g)}).on("end",function(){d.streamInfo.crc32!==v.decompressed.crc32?b(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}m.exports=function(v,c){var b=this;return c=i.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),f.isNode&&f.isStream(v)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",v,!0,c.optimizedBinaryString,c.base64).then(function(d){var g=new l(c);return g.load(d),g}).then(function(d){var g=[o.Promise.resolve(d)],p=d.files;if(c.checkCRC32)for(var k=0;k<p.length;k++)g.push(x(p[k]));return o.Promise.all(g)}).then(function(d){for(var g=d.shift(),p=g.files,k=0;k<p.length;k++){var E=p[k],S=E.fileNameStr,C=i.resolve(E.fileNameStr);b.file(C,E.decompressed,{binary:!0,optimizedBinaryString:!0,date:E.date,dir:E.dir,comment:E.fileCommentStr.length?E.fileCommentStr:null,unixPermissions:E.unixPermissions,dosPermissions:E.dosPermissions,createFolders:c.createFolders}),E.dir||(b.file(C).unsafeOriginalName=S)}return g.zipComment.length&&(b.comment=g.zipComment),b})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,m,u){var i=r("../utils"),o=r("../stream/GenericWorker");function n(l,h){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(h)}i.inherits(n,o),n.prototype._bindStream=function(l){var h=this;(this._stream=l).pause(),l.on("data",function(f){h.push({data:f,meta:{percent:0}})}).on("error",function(f){h.isPaused?this.generatedError=f:h.error(f)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},n.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},n.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},m.exports=n},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,m,u){var i=r("readable-stream").Readable;function o(n,l,h){i.call(this,l),this._helper=n;var f=this;n.on("data",function(x,v){f.push(x)||f._helper.pause(),h&&h(v)}).on("error",function(x){f.emit("error",x)}).on("end",function(){f.push(null)})}r("../utils").inherits(o,i),o.prototype._read=function(){this._helper.resume()},m.exports=o},{"../utils":32,"readable-stream":16}],14:[function(r,m,u){m.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,o);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,o)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var o=new Buffer(i);return o.fill(0),o},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(r,m,u){function i(C,O,L){var D,T=n.getTypeOf(O),V=n.extend(L||{},f);V.date=V.date||new Date,V.compression!==null&&(V.compression=V.compression.toUpperCase()),typeof V.unixPermissions=="string"&&(V.unixPermissions=parseInt(V.unixPermissions,8)),V.unixPermissions&&16384&V.unixPermissions&&(V.dir=!0),V.dosPermissions&&16&V.dosPermissions&&(V.dir=!0),V.dir&&(C=p(C)),V.createFolders&&(D=g(C))&&k.call(this,D,!0);var re=T==="string"&&V.binary===!1&&V.base64===!1;L&&L.binary!==void 0||(V.binary=!re),(O instanceof x&&O.uncompressedSize===0||V.dir||!O||O.length===0)&&(V.base64=!1,V.binary=!0,O="",V.compression="STORE",T="string");var j=null;j=O instanceof x||O instanceof l?O:b.isNode&&b.isStream(O)?new d(C,O):n.prepareContent(C,O,V.binary,V.optimizedBinaryString,V.base64);var R=new v(C,j,V);this.files[C]=R}var o=r("./utf8"),n=r("./utils"),l=r("./stream/GenericWorker"),h=r("./stream/StreamHelper"),f=r("./defaults"),x=r("./compressedObject"),v=r("./zipObject"),c=r("./generate"),b=r("./nodejsUtils"),d=r("./nodejs/NodejsStreamInputAdapter"),g=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var O=C.lastIndexOf("/");return 0<O?C.substring(0,O):""},p=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},k=function(C,O){return O=O!==void 0?O:f.createFolders,C=p(C),this.files[C]||i.call(this,C,null,{dir:!0,createFolders:O}),this.files[C]};function E(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var O,L,D;for(O in this.files)D=this.files[O],(L=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&C(L,D)},filter:function(C){var O=[];return this.forEach(function(L,D){C(L,D)&&O.push(D)}),O},file:function(C,O,L){if(arguments.length!==1)return C=this.root+C,i.call(this,C,O,L),this;if(E(C)){var D=C;return this.filter(function(V,re){return!re.dir&&D.test(V)})}var T=this.files[this.root+C];return T&&!T.dir?T:null},folder:function(C){if(!C)return this;if(E(C))return this.filter(function(T,V){return V.dir&&C.test(T)});var O=this.root+C,L=k.call(this,O),D=this.clone();return D.root=L.name,D},remove:function(C){C=this.root+C;var O=this.files[C];if(O||(C.slice(-1)!=="/"&&(C+="/"),O=this.files[C]),O&&!O.dir)delete this.files[C];else for(var L=this.filter(function(T,V){return V.name.slice(0,C.length)===C}),D=0;D<L.length;D++)delete this.files[L[D].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var O,L={};try{if((L=n.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=L.type.toLowerCase(),L.compression=L.compression.toUpperCase(),L.type==="binarystring"&&(L.type="string"),!L.type)throw new Error("No output type specified.");n.checkSupport(L.type),L.platform!=="darwin"&&L.platform!=="freebsd"&&L.platform!=="linux"&&L.platform!=="sunos"||(L.platform="UNIX"),L.platform==="win32"&&(L.platform="DOS");var D=L.comment||this.comment||"";O=c.generateWorker(this,L,D)}catch(T){(O=new l("error")).error(T)}return new h(O,L.type||"string",L.mimeType)},generateAsync:function(C,O){return this.generateInternalStream(C).accumulate(O)},generateNodeStream:function(C,O){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(O)}};m.exports=S},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,m,u){m.exports=r("stream")},{stream:void 0}],17:[function(r,m,u){var i=r("./DataReader");function o(n){i.call(this,n);for(var l=0;l<this.data.length;l++)n[l]=255&n[l]}r("../utils").inherits(o,i),o.prototype.byteAt=function(n){return this.data[this.zero+n]},o.prototype.lastIndexOfSignature=function(n){for(var l=n.charCodeAt(0),h=n.charCodeAt(1),f=n.charCodeAt(2),x=n.charCodeAt(3),v=this.length-4;0<=v;--v)if(this.data[v]===l&&this.data[v+1]===h&&this.data[v+2]===f&&this.data[v+3]===x)return v-this.zero;return-1},o.prototype.readAndCheckSignature=function(n){var l=n.charCodeAt(0),h=n.charCodeAt(1),f=n.charCodeAt(2),x=n.charCodeAt(3),v=this.readData(4);return l===v[0]&&h===v[1]&&f===v[2]&&x===v[3]},o.prototype.readData=function(n){if(this.checkOffset(n),n===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./DataReader":18}],18:[function(r,m,u){var i=r("../utils");function o(n){this.data=n,this.length=n.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(n){this.checkIndex(this.index+n)},checkIndex:function(n){if(this.length<this.zero+n||n<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+n+"). Corrupted zip ?")},setIndex:function(n){this.checkIndex(n),this.index=n},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(n){var l,h=0;for(this.checkOffset(n),l=this.index+n-1;l>=this.index;l--)h=(h<<8)+this.byteAt(l);return this.index+=n,h},readString:function(n){return i.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}},m.exports=o},{"../utils":32}],19:[function(r,m,u){var i=r("./Uint8ArrayReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,m,u){var i=r("./DataReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},o.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},o.prototype.readAndCheckSignature=function(n){return n===this.readData(4)},o.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./DataReader":18}],21:[function(r,m,u){var i=r("./ArrayReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(r,m,u){var i=r("../utils"),o=r("../support"),n=r("./ArrayReader"),l=r("./StringReader"),h=r("./NodeBufferReader"),f=r("./Uint8ArrayReader");m.exports=function(x){var v=i.getTypeOf(x);return i.checkSupport(v),v!=="string"||o.uint8array?v==="nodebuffer"?new h(x):o.uint8array?new f(i.transformTo("uint8array",x)):new n(i.transformTo("array",x)):new l(x)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,m,u){u.LOCAL_FILE_HEADER="PK",u.CENTRAL_FILE_HEADER="PK",u.CENTRAL_DIRECTORY_END="PK",u.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",u.ZIP64_CENTRAL_DIRECTORY_END="PK",u.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,m,u){var i=r("./GenericWorker"),o=r("../utils");function n(l){i.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(n,i),n.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},m.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(r,m,u){var i=r("./GenericWorker"),o=r("../crc32");function n(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(n,i),n.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},m.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,m,u){var i=r("../utils"),o=r("./GenericWorker");function n(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(n,o),n.prototype.processChunk=function(l){if(l){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+l.data.length}o.prototype.processChunk.call(this,l)},m.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(r,m,u){var i=r("../utils"),o=r("./GenericWorker");function n(l){o.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){h.dataIsReady=!0,h.data=f,h.max=f&&f.length||0,h.type=i.getTypeOf(f),h.isPaused||h._tickAndRepeat()},function(f){h.error(f)})}i.inherits(n,o),n.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,h);break;case"uint8array":l=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":l=this.data.slice(this.index,h)}return this.index=h,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},m.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(r,m,u){function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,n){return this._listeners[o].push(n),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,n){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,n)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var n=this;return o.on("data",function(l){n.processChunk(l)}),o.on("end",function(){n.end()}),o.on("error",function(l){n.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,n){return this.extraStreamInfo[o]=n,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},m.exports=i},{}],29:[function(r,m,u){var i=r("../utils"),o=r("./ConvertWorker"),n=r("./GenericWorker"),l=r("../base64"),h=r("../support"),f=r("../external"),x=null;if(h.nodestream)try{x=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function v(b,d){return new f.Promise(function(g,p){var k=[],E=b._internalType,S=b._outputType,C=b._mimeType;b.on("data",function(O,L){k.push(O),d&&d(L)}).on("error",function(O){k=[],p(O)}).on("end",function(){try{var O=(function(L,D,T){switch(L){case"blob":return i.newBlob(i.transformTo("arraybuffer",D),T);case"base64":return l.encode(D);default:return i.transformTo(L,D)}})(S,(function(L,D){var T,V=0,re=null,j=0;for(T=0;T<D.length;T++)j+=D[T].length;switch(L){case"string":return D.join("");case"array":return Array.prototype.concat.apply([],D);case"uint8array":for(re=new Uint8Array(j),T=0;T<D.length;T++)re.set(D[T],V),V+=D[T].length;return re;case"nodebuffer":return Buffer.concat(D);default:throw new Error("concat : unsupported type '"+L+"'")}})(E,k),C);g(O)}catch(L){p(L)}k=[]}).resume()})}function c(b,d,g){var p=d;switch(d){case"blob":case"arraybuffer":p="uint8array";break;case"base64":p="string"}try{this._internalType=p,this._outputType=d,this._mimeType=g,i.checkSupport(p),this._worker=b.pipe(new o(p)),b.lock()}catch(k){this._worker=new n("error"),this._worker.error(k)}}c.prototype={accumulate:function(b){return v(this,b)},on:function(b,d){var g=this;return b==="data"?this._worker.on(b,function(p){d.call(g,p.data,p.meta)}):this._worker.on(b,function(){i.delay(d,arguments,g)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(b){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new x(this,{objectMode:this._outputType!=="nodebuffer"},b)}},m.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,m,u){if(u.base64=!0,u.array=!0,u.string=!0,u.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",u.nodebuffer=typeof Buffer<"u",u.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")u.blob=!1;else{var i=new ArrayBuffer(0);try{u.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),u.blob=o.getBlob("application/zip").size===0}catch{u.blob=!1}}}try{u.nodestream=!!r("readable-stream").Readable}catch{u.nodestream=!1}},{"readable-stream":16}],31:[function(r,m,u){for(var i=r("./utils"),o=r("./support"),n=r("./nodejsUtils"),l=r("./stream/GenericWorker"),h=new Array(256),f=0;f<256;f++)h[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;h[254]=h[254]=1;function x(){l.call(this,"utf-8 decode"),this.leftOver=null}function v(){l.call(this,"utf-8 encode")}u.utf8encode=function(c){return o.nodebuffer?n.newBufferFrom(c,"utf-8"):(function(b){var d,g,p,k,E,S=b.length,C=0;for(k=0;k<S;k++)(64512&(g=b.charCodeAt(k)))==55296&&k+1<S&&(64512&(p=b.charCodeAt(k+1)))==56320&&(g=65536+(g-55296<<10)+(p-56320),k++),C+=g<128?1:g<2048?2:g<65536?3:4;for(d=o.uint8array?new Uint8Array(C):new Array(C),k=E=0;E<C;k++)(64512&(g=b.charCodeAt(k)))==55296&&k+1<S&&(64512&(p=b.charCodeAt(k+1)))==56320&&(g=65536+(g-55296<<10)+(p-56320),k++),g<128?d[E++]=g:(g<2048?d[E++]=192|g>>>6:(g<65536?d[E++]=224|g>>>12:(d[E++]=240|g>>>18,d[E++]=128|g>>>12&63),d[E++]=128|g>>>6&63),d[E++]=128|63&g);return d})(c)},u.utf8decode=function(c){return o.nodebuffer?i.transformTo("nodebuffer",c).toString("utf-8"):(function(b){var d,g,p,k,E=b.length,S=new Array(2*E);for(d=g=0;d<E;)if((p=b[d++])<128)S[g++]=p;else if(4<(k=h[p]))S[g++]=65533,d+=k-1;else{for(p&=k===2?31:k===3?15:7;1<k&&d<E;)p=p<<6|63&b[d++],k--;1<k?S[g++]=65533:p<65536?S[g++]=p:(p-=65536,S[g++]=55296|p>>10&1023,S[g++]=56320|1023&p)}return S.length!==g&&(S.subarray?S=S.subarray(0,g):S.length=g),i.applyFromCharCode(S)})(c=i.transformTo(o.uint8array?"uint8array":"array",c))},i.inherits(x,l),x.prototype.processChunk=function(c){var b=i.transformTo(o.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var d=b;(b=new Uint8Array(d.length+this.leftOver.length)).set(this.leftOver,0),b.set(d,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var g=(function(k,E){var S;for((E=E||k.length)>k.length&&(E=k.length),S=E-1;0<=S&&(192&k[S])==128;)S--;return S<0||S===0?E:S+h[k[S]]>E?S:E})(b),p=b;g!==b.length&&(o.uint8array?(p=b.subarray(0,g),this.leftOver=b.subarray(g,b.length)):(p=b.slice(0,g),this.leftOver=b.slice(g,b.length))),this.push({data:u.utf8decode(p),meta:c.meta})},x.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=x,i.inherits(v,l),v.prototype.processChunk=function(c){this.push({data:u.utf8encode(c.data),meta:c.meta})},u.Utf8EncodeWorker=v},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,m,u){var i=r("./support"),o=r("./base64"),n=r("./nodejsUtils"),l=r("./external");function h(d){return d}function f(d,g){for(var p=0;p<d.length;++p)g[p]=255&d.charCodeAt(p);return g}r("setimmediate"),u.newBlob=function(d,g){u.checkSupport("blob");try{return new Blob([d],{type:g})}catch{try{var p=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return p.append(d),p.getBlob(g)}catch{throw new Error("Bug : can't construct the Blob.")}}};var x={stringifyByChunk:function(d,g,p){var k=[],E=0,S=d.length;if(S<=p)return String.fromCharCode.apply(null,d);for(;E<S;)g==="array"||g==="nodebuffer"?k.push(String.fromCharCode.apply(null,d.slice(E,Math.min(E+p,S)))):k.push(String.fromCharCode.apply(null,d.subarray(E,Math.min(E+p,S)))),E+=p;return k.join("")},stringifyByChar:function(d){for(var g="",p=0;p<d.length;p++)g+=String.fromCharCode(d[p]);return g},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,n.allocBuffer(1)).length===1}catch{return!1}})()}};function v(d){var g=65536,p=u.getTypeOf(d),k=!0;if(p==="uint8array"?k=x.applyCanBeUsed.uint8array:p==="nodebuffer"&&(k=x.applyCanBeUsed.nodebuffer),k)for(;1<g;)try{return x.stringifyByChunk(d,p,g)}catch{g=Math.floor(g/2)}return x.stringifyByChar(d)}function c(d,g){for(var p=0;p<d.length;p++)g[p]=d[p];return g}u.applyFromCharCode=v;var b={};b.string={string:h,array:function(d){return f(d,new Array(d.length))},arraybuffer:function(d){return b.string.uint8array(d).buffer},uint8array:function(d){return f(d,new Uint8Array(d.length))},nodebuffer:function(d){return f(d,n.allocBuffer(d.length))}},b.array={string:v,array:h,arraybuffer:function(d){return new Uint8Array(d).buffer},uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(d)}},b.arraybuffer={string:function(d){return v(new Uint8Array(d))},array:function(d){return c(new Uint8Array(d),new Array(d.byteLength))},arraybuffer:h,uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(new Uint8Array(d))}},b.uint8array={string:v,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return d.buffer},uint8array:h,nodebuffer:function(d){return n.newBufferFrom(d)}},b.nodebuffer={string:v,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return b.nodebuffer.uint8array(d).buffer},uint8array:function(d){return c(d,new Uint8Array(d.length))},nodebuffer:h},u.transformTo=function(d,g){if(g=g||"",!d)return g;u.checkSupport(d);var p=u.getTypeOf(g);return b[p][d](g)},u.resolve=function(d){for(var g=d.split("/"),p=[],k=0;k<g.length;k++){var E=g[k];E==="."||E===""&&k!==0&&k!==g.length-1||(E===".."?p.pop():p.push(E))}return p.join("/")},u.getTypeOf=function(d){return typeof d=="string"?"string":Object.prototype.toString.call(d)==="[object Array]"?"array":i.nodebuffer&&n.isBuffer(d)?"nodebuffer":i.uint8array&&d instanceof Uint8Array?"uint8array":i.arraybuffer&&d instanceof ArrayBuffer?"arraybuffer":void 0},u.checkSupport=function(d){if(!i[d.toLowerCase()])throw new Error(d+" is not supported by this platform")},u.MAX_VALUE_16BITS=65535,u.MAX_VALUE_32BITS=-1,u.pretty=function(d){var g,p,k="";for(p=0;p<(d||"").length;p++)k+="\\x"+((g=d.charCodeAt(p))<16?"0":"")+g.toString(16).toUpperCase();return k},u.delay=function(d,g,p){setImmediate(function(){d.apply(p||null,g||[])})},u.inherits=function(d,g){function p(){}p.prototype=g.prototype,d.prototype=new p},u.extend=function(){var d,g,p={};for(d=0;d<arguments.length;d++)for(g in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],g)&&p[g]===void 0&&(p[g]=arguments[d][g]);return p},u.prepareContent=function(d,g,p,k,E){return l.Promise.resolve(g).then(function(S){return i.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new l.Promise(function(C,O){var L=new FileReader;L.onload=function(D){C(D.target.result)},L.onerror=function(D){O(D.target.error)},L.readAsArrayBuffer(S)}):S}).then(function(S){var C=u.getTypeOf(S);return C?(C==="arraybuffer"?S=u.transformTo("uint8array",S):C==="string"&&(E?S=o.decode(S):p&&k!==!0&&(S=(function(O){return f(O,i.uint8array?new Uint8Array(O.length):new Array(O.length))})(S))),S):l.Promise.reject(new Error("Can't read the data of '"+d+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,m,u){var i=r("./reader/readerFor"),o=r("./utils"),n=r("./signature"),l=r("./zipEntry"),h=r("./support");function f(x){this.files=[],this.loadOptions=x}f.prototype={checkSignature:function(x){if(!this.reader.readAndCheckSignature(x)){this.reader.index-=4;var v=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(v)+", expected "+o.pretty(x)+")")}},isSignature:function(x,v){var c=this.reader.index;this.reader.setIndex(x);var b=this.reader.readString(4)===v;return this.reader.setIndex(c),b},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var x=this.reader.readData(this.zipCommentLength),v=h.uint8array?"uint8array":"array",c=o.transformTo(v,x);this.zipComment=this.loadOptions.decodeFileName(c)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var x,v,c,b=this.zip64EndOfCentralSize-44;0<b;)x=this.reader.readInt(2),v=this.reader.readInt(4),c=this.reader.readData(v),this.zip64ExtensibleData[x]={id:x,length:v,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var x,v;for(x=0;x<this.files.length;x++)v=this.files[x],this.reader.setIndex(v.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),v.readLocalPart(this.reader),v.handleUTF8(),v.processAttributes()},readCentralDir:function(){var x;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.CENTRAL_FILE_HEADER);)(x=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(x);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var x=this.reader.lastIndexOfSignature(n.CENTRAL_DIRECTORY_END);if(x<0)throw this.isSignature(0,n.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(x);var v=x;if(this.checkSignature(n.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(x=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(x),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,n.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var c=this.centralDirOffset+this.centralDirSize;this.zip64&&(c+=20,c+=12+this.zip64EndOfCentralSize);var b=v-c;if(0<b)this.isSignature(v,n.CENTRAL_FILE_HEADER)||(this.reader.zero=b);else if(b<0)throw new Error("Corrupted zip: missing "+Math.abs(b)+" bytes.")},prepareReader:function(x){this.reader=i(x)},load:function(x){this.prepareReader(x),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},m.exports=f},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,m,u){var i=r("./reader/readerFor"),o=r("./utils"),n=r("./compressedObject"),l=r("./crc32"),h=r("./utf8"),f=r("./compressions"),x=r("./support");function v(c,b){this.options=c,this.loadOptions=b}v.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(c){var b,d;if(c.skip(22),this.fileNameLength=c.readInt(2),d=c.readInt(2),this.fileName=c.readData(this.fileNameLength),c.skip(d),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((b=(function(g){for(var p in f)if(Object.prototype.hasOwnProperty.call(f,p)&&f[p].magic===g)return f[p];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,b,c.readData(this.compressedSize))},readCentralPart:function(c){this.versionMadeBy=c.readInt(2),c.skip(2),this.bitFlag=c.readInt(2),this.compressionMethod=c.readString(2),this.date=c.readDate(),this.crc32=c.readInt(4),this.compressedSize=c.readInt(4),this.uncompressedSize=c.readInt(4);var b=c.readInt(2);if(this.extraFieldsLength=c.readInt(2),this.fileCommentLength=c.readInt(2),this.diskNumberStart=c.readInt(2),this.internalFileAttributes=c.readInt(2),this.externalFileAttributes=c.readInt(4),this.localHeaderOffset=c.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");c.skip(b),this.readExtraFields(c),this.parseZIP64ExtraField(c),this.fileComment=c.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var c=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),c==0&&(this.dosPermissions=63&this.externalFileAttributes),c==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var c=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=c.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=c.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=c.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=c.readInt(4))}},readExtraFields:function(c){var b,d,g,p=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<p;)b=c.readInt(2),d=c.readInt(2),g=c.readData(d),this.extraFields[b]={id:b,length:d,value:g};c.setIndex(p)},handleUTF8:function(){var c=x.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var b=this.findExtraFieldUnicodePath();if(b!==null)this.fileNameStr=b;else{var d=o.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(d)}var g=this.findExtraFieldUnicodeComment();if(g!==null)this.fileCommentStr=g;else{var p=o.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(p)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var b=i(c.value);return b.readInt(1)!==1||l(this.fileName)!==b.readInt(4)?null:h.utf8decode(b.readData(c.length-5))}return null},findExtraFieldUnicodeComment:function(){var c=this.extraFields[25461];if(c){var b=i(c.value);return b.readInt(1)!==1||l(this.fileComment)!==b.readInt(4)?null:h.utf8decode(b.readData(c.length-5))}return null}},m.exports=v},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,m,u){function i(b,d,g){this.name=b,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=d,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.compressionOptions}}var o=r("./stream/StreamHelper"),n=r("./stream/DataWorker"),l=r("./utf8"),h=r("./compressedObject"),f=r("./stream/GenericWorker");i.prototype={internalStream:function(b){var d=null,g="string";try{if(!b)throw new Error("No output type specified.");var p=(g=b.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),d=this._decompressWorker();var k=!this._dataBinary;k&&!p&&(d=d.pipe(new l.Utf8EncodeWorker)),!k&&p&&(d=d.pipe(new l.Utf8DecodeWorker))}catch(E){(d=new f("error")).error(E)}return new o(d,g,"")},async:function(b,d){return this.internalStream(b).accumulate(d)},nodeStream:function(b,d){return this.internalStream(b||"nodebuffer").toNodejsStream(d)},_compressWorker:function(b,d){if(this._data instanceof h&&this._data.compression.magic===b.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new l.Utf8EncodeWorker)),h.createWorkerFrom(g,b,d)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof f?this._data:new n(this._data)}};for(var x=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],v=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<x.length;c++)i.prototype[x[c]]=v;m.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,m,u){(function(i){var o,n,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var h=0,f=new l(b),x=i.document.createTextNode("");f.observe(x,{characterData:!0}),o=function(){x.data=h=++h%2}}else if(i.setImmediate||i.MessageChannel===void 0)o="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var d=i.document.createElement("script");d.onreadystatechange=function(){b(),d.onreadystatechange=null,d.parentNode.removeChild(d),d=null},i.document.documentElement.appendChild(d)}:function(){setTimeout(b,0)};else{var v=new i.MessageChannel;v.port1.onmessage=b,o=function(){v.port2.postMessage(0)}}var c=[];function b(){var d,g;n=!0;for(var p=c.length;p;){for(g=c,c=[],d=-1;++d<p;)g[d]();p=c.length}n=!1}m.exports=function(d){c.push(d)!==1||n||o()}}).call(this,typeof Ae<"u"?Ae:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,m,u){var i=r("immediate");function o(){}var n={},l=["REJECTED"],h=["FULFILLED"],f=["PENDING"];function x(p){if(typeof p!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,p!==o&&d(this,p)}function v(p,k,E){this.promise=p,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}function c(p,k,E){i(function(){var S;try{S=k(E)}catch(C){return n.reject(p,C)}S===p?n.reject(p,new TypeError("Cannot resolve promise with itself")):n.resolve(p,S)})}function b(p){var k=p&&p.then;if(p&&(typeof p=="object"||typeof p=="function")&&typeof k=="function")return function(){k.apply(p,arguments)}}function d(p,k){var E=!1;function S(L){E||(E=!0,n.reject(p,L))}function C(L){E||(E=!0,n.resolve(p,L))}var O=g(function(){k(C,S)});O.status==="error"&&S(O.value)}function g(p,k){var E={};try{E.value=p(k),E.status="success"}catch(S){E.status="error",E.value=S}return E}(m.exports=x).prototype.finally=function(p){if(typeof p!="function")return this;var k=this.constructor;return this.then(function(E){return k.resolve(p()).then(function(){return E})},function(E){return k.resolve(p()).then(function(){throw E})})},x.prototype.catch=function(p){return this.then(null,p)},x.prototype.then=function(p,k){if(typeof p!="function"&&this.state===h||typeof k!="function"&&this.state===l)return this;var E=new this.constructor(o);return this.state!==f?c(E,this.state===h?p:k,this.outcome):this.queue.push(new v(E,p,k)),E},v.prototype.callFulfilled=function(p){n.resolve(this.promise,p)},v.prototype.otherCallFulfilled=function(p){c(this.promise,this.onFulfilled,p)},v.prototype.callRejected=function(p){n.reject(this.promise,p)},v.prototype.otherCallRejected=function(p){c(this.promise,this.onRejected,p)},n.resolve=function(p,k){var E=g(b,k);if(E.status==="error")return n.reject(p,E.value);var S=E.value;if(S)d(p,S);else{p.state=h,p.outcome=k;for(var C=-1,O=p.queue.length;++C<O;)p.queue[C].callFulfilled(k)}return p},n.reject=function(p,k){p.state=l,p.outcome=k;for(var E=-1,S=p.queue.length;++E<S;)p.queue[E].callRejected(k);return p},x.resolve=function(p){return p instanceof this?p:n.resolve(new this(o),p)},x.reject=function(p){var k=new this(o);return n.reject(k,p)},x.all=function(p){var k=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=p.length,S=!1;if(!E)return this.resolve([]);for(var C=new Array(E),O=0,L=-1,D=new this(o);++L<E;)T(p[L],L);return D;function T(V,re){k.resolve(V).then(function(j){C[re]=j,++O!==E||S||(S=!0,n.resolve(D,C))},function(j){S||(S=!0,n.reject(D,j))})}},x.race=function(p){var k=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=p.length,S=!1;if(!E)return this.resolve([]);for(var C=-1,O=new this(o);++C<E;)L=p[C],k.resolve(L).then(function(D){S||(S=!0,n.resolve(O,D))},function(D){S||(S=!0,n.reject(O,D))});var L;return O}},{immediate:36}],38:[function(r,m,u){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),m.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,m,u){var i=r("./zlib/deflate"),o=r("./utils/common"),n=r("./utils/strings"),l=r("./zlib/messages"),h=r("./zlib/zstream"),f=Object.prototype.toString,x=0,v=-1,c=0,b=8;function d(p){if(!(this instanceof d))return new d(p);this.options=o.assign({level:v,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},p||{});var k=this.options;k.raw&&0<k.windowBits?k.windowBits=-k.windowBits:k.gzip&&0<k.windowBits&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var E=i.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(E!==x)throw new Error(l[E]);if(k.header&&i.deflateSetHeader(this.strm,k.header),k.dictionary){var S;if(S=typeof k.dictionary=="string"?n.string2buf(k.dictionary):f.call(k.dictionary)==="[object ArrayBuffer]"?new Uint8Array(k.dictionary):k.dictionary,(E=i.deflateSetDictionary(this.strm,S))!==x)throw new Error(l[E]);this._dict_set=!0}}function g(p,k){var E=new d(k);if(E.push(p,!0),E.err)throw E.msg||l[E.err];return E.result}d.prototype.push=function(p,k){var E,S,C=this.strm,O=this.options.chunkSize;if(this.ended)return!1;S=k===~~k?k:k===!0?4:0,typeof p=="string"?C.input=n.string2buf(p):f.call(p)==="[object ArrayBuffer]"?C.input=new Uint8Array(p):C.input=p,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new o.Buf8(O),C.next_out=0,C.avail_out=O),(E=i.deflate(C,S))!==1&&E!==x)return this.onEnd(E),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(n.buf2binstring(o.shrinkBuf(C.output,C.next_out))):this.onData(o.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&E!==1);return S===4?(E=i.deflateEnd(this.strm),this.onEnd(E),this.ended=!0,E===x):S!==2||(this.onEnd(x),!(C.avail_out=0))},d.prototype.onData=function(p){this.chunks.push(p)},d.prototype.onEnd=function(p){p===x&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},u.Deflate=d,u.deflate=g,u.deflateRaw=function(p,k){return(k=k||{}).raw=!0,g(p,k)},u.gzip=function(p,k){return(k=k||{}).gzip=!0,g(p,k)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,m,u){var i=r("./zlib/inflate"),o=r("./utils/common"),n=r("./utils/strings"),l=r("./zlib/constants"),h=r("./zlib/messages"),f=r("./zlib/zstream"),x=r("./zlib/gzheader"),v=Object.prototype.toString;function c(d){if(!(this instanceof c))return new c(d);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},d||{});var g=this.options;g.raw&&0<=g.windowBits&&g.windowBits<16&&(g.windowBits=-g.windowBits,g.windowBits===0&&(g.windowBits=-15)),!(0<=g.windowBits&&g.windowBits<16)||d&&d.windowBits||(g.windowBits+=32),15<g.windowBits&&g.windowBits<48&&(15&g.windowBits)==0&&(g.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var p=i.inflateInit2(this.strm,g.windowBits);if(p!==l.Z_OK)throw new Error(h[p]);this.header=new x,i.inflateGetHeader(this.strm,this.header)}function b(d,g){var p=new c(g);if(p.push(d,!0),p.err)throw p.msg||h[p.err];return p.result}c.prototype.push=function(d,g){var p,k,E,S,C,O,L=this.strm,D=this.options.chunkSize,T=this.options.dictionary,V=!1;if(this.ended)return!1;k=g===~~g?g:g===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof d=="string"?L.input=n.binstring2buf(d):v.call(d)==="[object ArrayBuffer]"?L.input=new Uint8Array(d):L.input=d,L.next_in=0,L.avail_in=L.input.length;do{if(L.avail_out===0&&(L.output=new o.Buf8(D),L.next_out=0,L.avail_out=D),(p=i.inflate(L,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&T&&(O=typeof T=="string"?n.string2buf(T):v.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,p=i.inflateSetDictionary(this.strm,O)),p===l.Z_BUF_ERROR&&V===!0&&(p=l.Z_OK,V=!1),p!==l.Z_STREAM_END&&p!==l.Z_OK)return this.onEnd(p),!(this.ended=!0);L.next_out&&(L.avail_out!==0&&p!==l.Z_STREAM_END&&(L.avail_in!==0||k!==l.Z_FINISH&&k!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(E=n.utf8border(L.output,L.next_out),S=L.next_out-E,C=n.buf2string(L.output,E),L.next_out=S,L.avail_out=D-S,S&&o.arraySet(L.output,L.output,E,S,0),this.onData(C)):this.onData(o.shrinkBuf(L.output,L.next_out)))),L.avail_in===0&&L.avail_out===0&&(V=!0)}while((0<L.avail_in||L.avail_out===0)&&p!==l.Z_STREAM_END);return p===l.Z_STREAM_END&&(k=l.Z_FINISH),k===l.Z_FINISH?(p=i.inflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===l.Z_OK):k!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(L.avail_out=0))},c.prototype.onData=function(d){this.chunks.push(d)},c.prototype.onEnd=function(d){d===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=d,this.msg=this.strm.msg},u.Inflate=c,u.inflate=b,u.inflateRaw=function(d,g){return(g=g||{}).raw=!0,b(d,g)},u.ungzip=b},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,m,u){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.assign=function(l){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var f=h.shift();if(f){if(typeof f!="object")throw new TypeError(f+"must be non-object");for(var x in f)f.hasOwnProperty(x)&&(l[x]=f[x])}}return l},u.shrinkBuf=function(l,h){return l.length===h?l:l.subarray?l.subarray(0,h):(l.length=h,l)};var o={arraySet:function(l,h,f,x,v){if(h.subarray&&l.subarray)l.set(h.subarray(f,f+x),v);else for(var c=0;c<x;c++)l[v+c]=h[f+c]},flattenChunks:function(l){var h,f,x,v,c,b;for(h=x=0,f=l.length;h<f;h++)x+=l[h].length;for(b=new Uint8Array(x),h=v=0,f=l.length;h<f;h++)c=l[h],b.set(c,v),v+=c.length;return b}},n={arraySet:function(l,h,f,x,v){for(var c=0;c<x;c++)l[v+c]=h[f+c]},flattenChunks:function(l){return[].concat.apply([],l)}};u.setTyped=function(l){l?(u.Buf8=Uint8Array,u.Buf16=Uint16Array,u.Buf32=Int32Array,u.assign(u,o)):(u.Buf8=Array,u.Buf16=Array,u.Buf32=Array,u.assign(u,n))},u.setTyped(i)},{}],42:[function(r,m,u){var i=r("./common"),o=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var l=new i.Buf8(256),h=0;h<256;h++)l[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function f(x,v){if(v<65537&&(x.subarray&&n||!x.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(x,v));for(var c="",b=0;b<v;b++)c+=String.fromCharCode(x[b]);return c}l[254]=l[254]=1,u.string2buf=function(x){var v,c,b,d,g,p=x.length,k=0;for(d=0;d<p;d++)(64512&(c=x.charCodeAt(d)))==55296&&d+1<p&&(64512&(b=x.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(b-56320),d++),k+=c<128?1:c<2048?2:c<65536?3:4;for(v=new i.Buf8(k),d=g=0;g<k;d++)(64512&(c=x.charCodeAt(d)))==55296&&d+1<p&&(64512&(b=x.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(b-56320),d++),c<128?v[g++]=c:(c<2048?v[g++]=192|c>>>6:(c<65536?v[g++]=224|c>>>12:(v[g++]=240|c>>>18,v[g++]=128|c>>>12&63),v[g++]=128|c>>>6&63),v[g++]=128|63&c);return v},u.buf2binstring=function(x){return f(x,x.length)},u.binstring2buf=function(x){for(var v=new i.Buf8(x.length),c=0,b=v.length;c<b;c++)v[c]=x.charCodeAt(c);return v},u.buf2string=function(x,v){var c,b,d,g,p=v||x.length,k=new Array(2*p);for(c=b=0;c<p;)if((d=x[c++])<128)k[b++]=d;else if(4<(g=l[d]))k[b++]=65533,c+=g-1;else{for(d&=g===2?31:g===3?15:7;1<g&&c<p;)d=d<<6|63&x[c++],g--;1<g?k[b++]=65533:d<65536?k[b++]=d:(d-=65536,k[b++]=55296|d>>10&1023,k[b++]=56320|1023&d)}return f(k,b)},u.utf8border=function(x,v){var c;for((v=v||x.length)>x.length&&(v=x.length),c=v-1;0<=c&&(192&x[c])==128;)c--;return c<0||c===0?v:c+l[x[c]]>v?c:v}},{"./common":41}],43:[function(r,m,u){m.exports=function(i,o,n,l){for(var h=65535&i|0,f=i>>>16&65535|0,x=0;n!==0;){for(n-=x=2e3<n?2e3:n;f=f+(h=h+o[l++]|0)|0,--x;);h%=65521,f%=65521}return h|f<<16|0}},{}],44:[function(r,m,u){m.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,m,u){var i=(function(){for(var o,n=[],l=0;l<256;l++){o=l;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;n[l]=o}return n})();m.exports=function(o,n,l,h){var f=i,x=h+l;o^=-1;for(var v=h;v<x;v++)o=o>>>8^f[255&(o^n[v])];return-1^o}},{}],46:[function(r,m,u){var i,o=r("../utils/common"),n=r("./trees"),l=r("./adler32"),h=r("./crc32"),f=r("./messages"),x=0,v=4,c=0,b=-2,d=-1,g=4,p=2,k=8,E=9,S=286,C=30,O=19,L=2*S+1,D=15,T=3,V=258,re=V+T+1,j=42,R=113,a=1,M=2,te=3,U=4;function W(t,H){return t.msg=f[H],H}function K(t){return(t<<1)-(4<t?9:0)}function X(t){for(var H=t.length;0<=--H;)t[H]=0}function z(t){var H=t.state,A=H.pending;A>t.avail_out&&(A=t.avail_out),A!==0&&(o.arraySet(t.output,H.pending_buf,H.pending_out,A,t.next_out),t.next_out+=A,H.pending_out+=A,t.total_out+=A,t.avail_out-=A,H.pending-=A,H.pending===0&&(H.pending_out=0))}function N(t,H){n._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,H),t.block_start=t.strstart,z(t.strm)}function J(t,H){t.pending_buf[t.pending++]=H}function G(t,H){t.pending_buf[t.pending++]=H>>>8&255,t.pending_buf[t.pending++]=255&H}function Q(t,H){var A,y,w=t.max_chain_length,I=t.strstart,$=t.prev_length,Z=t.nice_match,P=t.strstart>t.w_size-re?t.strstart-(t.w_size-re):0,Y=t.window,F=t.w_mask,B=t.prev,ee=t.strstart+V,ae=Y[I+$-1],se=Y[I+$];t.prev_length>=t.good_match&&(w>>=2),Z>t.lookahead&&(Z=t.lookahead);do if(Y[(A=H)+$]===se&&Y[A+$-1]===ae&&Y[A]===Y[I]&&Y[++A]===Y[I+1]){I+=2,A++;do;while(Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&I<ee);if(y=V-(ee-I),I=ee-V,$<y){if(t.match_start=H,Z<=($=y))break;ae=Y[I+$-1],se=Y[I+$]}}while((H=B[H&F])>P&&--w!=0);return $<=t.lookahead?$:t.lookahead}function ue(t){var H,A,y,w,I,$,Z,P,Y,F,B=t.w_size;do{if(w=t.window_size-t.lookahead-t.strstart,t.strstart>=B+(B-re)){for(o.arraySet(t.window,t.window,B,B,0),t.match_start-=B,t.strstart-=B,t.block_start-=B,H=A=t.hash_size;y=t.head[--H],t.head[H]=B<=y?y-B:0,--A;);for(H=A=B;y=t.prev[--H],t.prev[H]=B<=y?y-B:0,--A;);w+=B}if(t.strm.avail_in===0)break;if($=t.strm,Z=t.window,P=t.strstart+t.lookahead,Y=w,F=void 0,F=$.avail_in,Y<F&&(F=Y),A=F===0?0:($.avail_in-=F,o.arraySet(Z,$.input,$.next_in,F,P),$.state.wrap===1?$.adler=l($.adler,Z,F,P):$.state.wrap===2&&($.adler=h($.adler,Z,F,P)),$.next_in+=F,$.total_in+=F,F),t.lookahead+=A,t.lookahead+t.insert>=T)for(I=t.strstart-t.insert,t.ins_h=t.window[I],t.ins_h=(t.ins_h<<t.hash_shift^t.window[I+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[I+T-1])&t.hash_mask,t.prev[I&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=I,I++,t.insert--,!(t.lookahead+t.insert<T)););}while(t.lookahead<re&&t.strm.avail_in!==0)}function ie(t,H){for(var A,y;;){if(t.lookahead<re){if(ue(t),t.lookahead<re&&H===x)return a;if(t.lookahead===0)break}if(A=0,t.lookahead>=T&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),A!==0&&t.strstart-A<=t.w_size-re&&(t.match_length=Q(t,A)),t.match_length>=T)if(y=n._tr_tally(t,t.strstart-t.match_start,t.match_length-T),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=T){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,--t.match_length!=0;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else y=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(y&&(N(t,!1),t.strm.avail_out===0))return a}return t.insert=t.strstart<T-1?t.strstart:T-1,H===v?(N(t,!0),t.strm.avail_out===0?te:U):t.last_lit&&(N(t,!1),t.strm.avail_out===0)?a:M}function le(t,H){for(var A,y,w;;){if(t.lookahead<re){if(ue(t),t.lookahead<re&&H===x)return a;if(t.lookahead===0)break}if(A=0,t.lookahead>=T&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=T-1,A!==0&&t.prev_length<t.max_lazy_match&&t.strstart-A<=t.w_size-re&&(t.match_length=Q(t,A),t.match_length<=5&&(t.strategy===1||t.match_length===T&&4096<t.strstart-t.match_start)&&(t.match_length=T-1)),t.prev_length>=T&&t.match_length<=t.prev_length){for(w=t.strstart+t.lookahead-T,y=n._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-T),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=w&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),--t.prev_length!=0;);if(t.match_available=0,t.match_length=T-1,t.strstart++,y&&(N(t,!1),t.strm.avail_out===0))return a}else if(t.match_available){if((y=n._tr_tally(t,0,t.window[t.strstart-1]))&&N(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return a}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(y=n._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<T-1?t.strstart:T-1,H===v?(N(t,!0),t.strm.avail_out===0?te:U):t.last_lit&&(N(t,!1),t.strm.avail_out===0)?a:M}function ce(t,H,A,y,w){this.good_length=t,this.max_lazy=H,this.nice_length=A,this.max_chain=y,this.func=w}function ge(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=k,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*L),this.dyn_dtree=new o.Buf16(2*(2*C+1)),this.bl_tree=new o.Buf16(2*(2*O+1)),X(this.dyn_ltree),X(this.dyn_dtree),X(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(D+1),this.heap=new o.Buf16(2*S+1),X(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*S+1),X(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function fe(t){var H;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=p,(H=t.state).pending=0,H.pending_out=0,H.wrap<0&&(H.wrap=-H.wrap),H.status=H.wrap?j:R,t.adler=H.wrap===2?0:1,H.last_flush=x,n._tr_init(H),c):W(t,b)}function we(t){var H=fe(t);return H===c&&(function(A){A.window_size=2*A.w_size,X(A.head),A.max_lazy_match=i[A.level].max_lazy,A.good_match=i[A.level].good_length,A.nice_match=i[A.level].nice_length,A.max_chain_length=i[A.level].max_chain,A.strstart=0,A.block_start=0,A.lookahead=0,A.insert=0,A.match_length=A.prev_length=T-1,A.match_available=0,A.ins_h=0})(t.state),H}function ze(t,H,A,y,w,I){if(!t)return b;var $=1;if(H===d&&(H=6),y<0?($=0,y=-y):15<y&&($=2,y-=16),w<1||E<w||A!==k||y<8||15<y||H<0||9<H||I<0||g<I)return W(t,b);y===8&&(y=9);var Z=new ge;return(t.state=Z).strm=t,Z.wrap=$,Z.gzhead=null,Z.w_bits=y,Z.w_size=1<<Z.w_bits,Z.w_mask=Z.w_size-1,Z.hash_bits=w+7,Z.hash_size=1<<Z.hash_bits,Z.hash_mask=Z.hash_size-1,Z.hash_shift=~~((Z.hash_bits+T-1)/T),Z.window=new o.Buf8(2*Z.w_size),Z.head=new o.Buf16(Z.hash_size),Z.prev=new o.Buf16(Z.w_size),Z.lit_bufsize=1<<w+6,Z.pending_buf_size=4*Z.lit_bufsize,Z.pending_buf=new o.Buf8(Z.pending_buf_size),Z.d_buf=1*Z.lit_bufsize,Z.l_buf=3*Z.lit_bufsize,Z.level=H,Z.strategy=I,Z.method=A,we(t)}i=[new ce(0,0,0,0,function(t,H){var A=65535;for(A>t.pending_buf_size-5&&(A=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ue(t),t.lookahead===0&&H===x)return a;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var y=t.block_start+A;if((t.strstart===0||t.strstart>=y)&&(t.lookahead=t.strstart-y,t.strstart=y,N(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-re&&(N(t,!1),t.strm.avail_out===0))return a}return t.insert=0,H===v?(N(t,!0),t.strm.avail_out===0?te:U):(t.strstart>t.block_start&&(N(t,!1),t.strm.avail_out),a)}),new ce(4,4,8,4,ie),new ce(4,5,16,8,ie),new ce(4,6,32,32,ie),new ce(4,4,16,16,le),new ce(8,16,32,32,le),new ce(8,16,128,128,le),new ce(8,32,128,256,le),new ce(32,128,258,1024,le),new ce(32,258,258,4096,le)],u.deflateInit=function(t,H){return ze(t,H,k,15,8,0)},u.deflateInit2=ze,u.deflateReset=we,u.deflateResetKeep=fe,u.deflateSetHeader=function(t,H){return t&&t.state?t.state.wrap!==2?b:(t.state.gzhead=H,c):b},u.deflate=function(t,H){var A,y,w,I;if(!t||!t.state||5<H||H<0)return t?W(t,b):b;if(y=t.state,!t.output||!t.input&&t.avail_in!==0||y.status===666&&H!==v)return W(t,t.avail_out===0?-5:b);if(y.strm=t,A=y.last_flush,y.last_flush=H,y.status===j)if(y.wrap===2)t.adler=0,J(y,31),J(y,139),J(y,8),y.gzhead?(J(y,(y.gzhead.text?1:0)+(y.gzhead.hcrc?2:0)+(y.gzhead.extra?4:0)+(y.gzhead.name?8:0)+(y.gzhead.comment?16:0)),J(y,255&y.gzhead.time),J(y,y.gzhead.time>>8&255),J(y,y.gzhead.time>>16&255),J(y,y.gzhead.time>>24&255),J(y,y.level===9?2:2<=y.strategy||y.level<2?4:0),J(y,255&y.gzhead.os),y.gzhead.extra&&y.gzhead.extra.length&&(J(y,255&y.gzhead.extra.length),J(y,y.gzhead.extra.length>>8&255)),y.gzhead.hcrc&&(t.adler=h(t.adler,y.pending_buf,y.pending,0)),y.gzindex=0,y.status=69):(J(y,0),J(y,0),J(y,0),J(y,0),J(y,0),J(y,y.level===9?2:2<=y.strategy||y.level<2?4:0),J(y,3),y.status=R);else{var $=k+(y.w_bits-8<<4)<<8;$|=(2<=y.strategy||y.level<2?0:y.level<6?1:y.level===6?2:3)<<6,y.strstart!==0&&($|=32),$+=31-$%31,y.status=R,G(y,$),y.strstart!==0&&(G(y,t.adler>>>16),G(y,65535&t.adler)),t.adler=1}if(y.status===69)if(y.gzhead.extra){for(w=y.pending;y.gzindex<(65535&y.gzhead.extra.length)&&(y.pending!==y.pending_buf_size||(y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),z(t),w=y.pending,y.pending!==y.pending_buf_size));)J(y,255&y.gzhead.extra[y.gzindex]),y.gzindex++;y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),y.gzindex===y.gzhead.extra.length&&(y.gzindex=0,y.status=73)}else y.status=73;if(y.status===73)if(y.gzhead.name){w=y.pending;do{if(y.pending===y.pending_buf_size&&(y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),z(t),w=y.pending,y.pending===y.pending_buf_size)){I=1;break}I=y.gzindex<y.gzhead.name.length?255&y.gzhead.name.charCodeAt(y.gzindex++):0,J(y,I)}while(I!==0);y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),I===0&&(y.gzindex=0,y.status=91)}else y.status=91;if(y.status===91)if(y.gzhead.comment){w=y.pending;do{if(y.pending===y.pending_buf_size&&(y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),z(t),w=y.pending,y.pending===y.pending_buf_size)){I=1;break}I=y.gzindex<y.gzhead.comment.length?255&y.gzhead.comment.charCodeAt(y.gzindex++):0,J(y,I)}while(I!==0);y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),I===0&&(y.status=103)}else y.status=103;if(y.status===103&&(y.gzhead.hcrc?(y.pending+2>y.pending_buf_size&&z(t),y.pending+2<=y.pending_buf_size&&(J(y,255&t.adler),J(y,t.adler>>8&255),t.adler=0,y.status=R)):y.status=R),y.pending!==0){if(z(t),t.avail_out===0)return y.last_flush=-1,c}else if(t.avail_in===0&&K(H)<=K(A)&&H!==v)return W(t,-5);if(y.status===666&&t.avail_in!==0)return W(t,-5);if(t.avail_in!==0||y.lookahead!==0||H!==x&&y.status!==666){var Z=y.strategy===2?(function(P,Y){for(var F;;){if(P.lookahead===0&&(ue(P),P.lookahead===0)){if(Y===x)return a;break}if(P.match_length=0,F=n._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++,F&&(N(P,!1),P.strm.avail_out===0))return a}return P.insert=0,Y===v?(N(P,!0),P.strm.avail_out===0?te:U):P.last_lit&&(N(P,!1),P.strm.avail_out===0)?a:M})(y,H):y.strategy===3?(function(P,Y){for(var F,B,ee,ae,se=P.window;;){if(P.lookahead<=V){if(ue(P),P.lookahead<=V&&Y===x)return a;if(P.lookahead===0)break}if(P.match_length=0,P.lookahead>=T&&0<P.strstart&&(B=se[ee=P.strstart-1])===se[++ee]&&B===se[++ee]&&B===se[++ee]){ae=P.strstart+V;do;while(B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&ee<ae);P.match_length=V-(ae-ee),P.match_length>P.lookahead&&(P.match_length=P.lookahead)}if(P.match_length>=T?(F=n._tr_tally(P,1,P.match_length-T),P.lookahead-=P.match_length,P.strstart+=P.match_length,P.match_length=0):(F=n._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++),F&&(N(P,!1),P.strm.avail_out===0))return a}return P.insert=0,Y===v?(N(P,!0),P.strm.avail_out===0?te:U):P.last_lit&&(N(P,!1),P.strm.avail_out===0)?a:M})(y,H):i[y.level].func(y,H);if(Z!==te&&Z!==U||(y.status=666),Z===a||Z===te)return t.avail_out===0&&(y.last_flush=-1),c;if(Z===M&&(H===1?n._tr_align(y):H!==5&&(n._tr_stored_block(y,0,0,!1),H===3&&(X(y.head),y.lookahead===0&&(y.strstart=0,y.block_start=0,y.insert=0))),z(t),t.avail_out===0))return y.last_flush=-1,c}return H!==v?c:y.wrap<=0?1:(y.wrap===2?(J(y,255&t.adler),J(y,t.adler>>8&255),J(y,t.adler>>16&255),J(y,t.adler>>24&255),J(y,255&t.total_in),J(y,t.total_in>>8&255),J(y,t.total_in>>16&255),J(y,t.total_in>>24&255)):(G(y,t.adler>>>16),G(y,65535&t.adler)),z(t),0<y.wrap&&(y.wrap=-y.wrap),y.pending!==0?c:1)},u.deflateEnd=function(t){var H;return t&&t.state?(H=t.state.status)!==j&&H!==69&&H!==73&&H!==91&&H!==103&&H!==R&&H!==666?W(t,b):(t.state=null,H===R?W(t,-3):c):b},u.deflateSetDictionary=function(t,H){var A,y,w,I,$,Z,P,Y,F=H.length;if(!t||!t.state||(I=(A=t.state).wrap)===2||I===1&&A.status!==j||A.lookahead)return b;for(I===1&&(t.adler=l(t.adler,H,F,0)),A.wrap=0,F>=A.w_size&&(I===0&&(X(A.head),A.strstart=0,A.block_start=0,A.insert=0),Y=new o.Buf8(A.w_size),o.arraySet(Y,H,F-A.w_size,A.w_size,0),H=Y,F=A.w_size),$=t.avail_in,Z=t.next_in,P=t.input,t.avail_in=F,t.next_in=0,t.input=H,ue(A);A.lookahead>=T;){for(y=A.strstart,w=A.lookahead-(T-1);A.ins_h=(A.ins_h<<A.hash_shift^A.window[y+T-1])&A.hash_mask,A.prev[y&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=y,y++,--w;);A.strstart=y,A.lookahead=T-1,ue(A)}return A.strstart+=A.lookahead,A.block_start=A.strstart,A.insert=A.lookahead,A.lookahead=0,A.match_length=A.prev_length=T-1,A.match_available=0,t.next_in=Z,t.input=P,t.avail_in=$,A.wrap=I,c},u.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,m,u){m.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r,m,u){m.exports=function(i,o){var n,l,h,f,x,v,c,b,d,g,p,k,E,S,C,O,L,D,T,V,re,j,R,a,M;n=i.state,l=i.next_in,a=i.input,h=l+(i.avail_in-5),f=i.next_out,M=i.output,x=f-(o-i.avail_out),v=f+(i.avail_out-257),c=n.dmax,b=n.wsize,d=n.whave,g=n.wnext,p=n.window,k=n.hold,E=n.bits,S=n.lencode,C=n.distcode,O=(1<<n.lenbits)-1,L=(1<<n.distbits)-1;e:do{E<15&&(k+=a[l++]<<E,E+=8,k+=a[l++]<<E,E+=8),D=S[k&O];t:for(;;){if(k>>>=T=D>>>24,E-=T,(T=D>>>16&255)===0)M[f++]=65535&D;else{if(!(16&T)){if((64&T)==0){D=S[(65535&D)+(k&(1<<T)-1)];continue t}if(32&T){n.mode=12;break e}i.msg="invalid literal/length code",n.mode=30;break e}V=65535&D,(T&=15)&&(E<T&&(k+=a[l++]<<E,E+=8),V+=k&(1<<T)-1,k>>>=T,E-=T),E<15&&(k+=a[l++]<<E,E+=8,k+=a[l++]<<E,E+=8),D=C[k&L];r:for(;;){if(k>>>=T=D>>>24,E-=T,!(16&(T=D>>>16&255))){if((64&T)==0){D=C[(65535&D)+(k&(1<<T)-1)];continue r}i.msg="invalid distance code",n.mode=30;break e}if(re=65535&D,E<(T&=15)&&(k+=a[l++]<<E,(E+=8)<T&&(k+=a[l++]<<E,E+=8)),c<(re+=k&(1<<T)-1)){i.msg="invalid distance too far back",n.mode=30;break e}if(k>>>=T,E-=T,(T=f-x)<re){if(d<(T=re-T)&&n.sane){i.msg="invalid distance too far back",n.mode=30;break e}if(R=p,(j=0)===g){if(j+=b-T,T<V){for(V-=T;M[f++]=p[j++],--T;);j=f-re,R=M}}else if(g<T){if(j+=b+g-T,(T-=g)<V){for(V-=T;M[f++]=p[j++],--T;);if(j=0,g<V){for(V-=T=g;M[f++]=p[j++],--T;);j=f-re,R=M}}}else if(j+=g-T,T<V){for(V-=T;M[f++]=p[j++],--T;);j=f-re,R=M}for(;2<V;)M[f++]=R[j++],M[f++]=R[j++],M[f++]=R[j++],V-=3;V&&(M[f++]=R[j++],1<V&&(M[f++]=R[j++]))}else{for(j=f-re;M[f++]=M[j++],M[f++]=M[j++],M[f++]=M[j++],2<(V-=3););V&&(M[f++]=M[j++],1<V&&(M[f++]=M[j++]))}break}}break}}while(l<h&&f<v);l-=V=E>>3,k&=(1<<(E-=V<<3))-1,i.next_in=l,i.next_out=f,i.avail_in=l<h?h-l+5:5-(l-h),i.avail_out=f<v?v-f+257:257-(f-v),n.hold=k,n.bits=E}},{}],49:[function(r,m,u){var i=r("../utils/common"),o=r("./adler32"),n=r("./crc32"),l=r("./inffast"),h=r("./inftrees"),f=1,x=2,v=0,c=-2,b=1,d=852,g=592;function p(j){return(j>>>24&255)+(j>>>8&65280)+((65280&j)<<8)+((255&j)<<24)}function k(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function E(j){var R;return j&&j.state?(R=j.state,j.total_in=j.total_out=R.total=0,j.msg="",R.wrap&&(j.adler=1&R.wrap),R.mode=b,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new i.Buf32(d),R.distcode=R.distdyn=new i.Buf32(g),R.sane=1,R.back=-1,v):c}function S(j){var R;return j&&j.state?((R=j.state).wsize=0,R.whave=0,R.wnext=0,E(j)):c}function C(j,R){var a,M;return j&&j.state?(M=j.state,R<0?(a=0,R=-R):(a=1+(R>>4),R<48&&(R&=15)),R&&(R<8||15<R)?c:(M.window!==null&&M.wbits!==R&&(M.window=null),M.wrap=a,M.wbits=R,S(j))):c}function O(j,R){var a,M;return j?(M=new k,(j.state=M).window=null,(a=C(j,R))!==v&&(j.state=null),a):c}var L,D,T=!0;function V(j){if(T){var R;for(L=new i.Buf32(512),D=new i.Buf32(32),R=0;R<144;)j.lens[R++]=8;for(;R<256;)j.lens[R++]=9;for(;R<280;)j.lens[R++]=7;for(;R<288;)j.lens[R++]=8;for(h(f,j.lens,0,288,L,0,j.work,{bits:9}),R=0;R<32;)j.lens[R++]=5;h(x,j.lens,0,32,D,0,j.work,{bits:5}),T=!1}j.lencode=L,j.lenbits=9,j.distcode=D,j.distbits=5}function re(j,R,a,M){var te,U=j.state;return U.window===null&&(U.wsize=1<<U.wbits,U.wnext=0,U.whave=0,U.window=new i.Buf8(U.wsize)),M>=U.wsize?(i.arraySet(U.window,R,a-U.wsize,U.wsize,0),U.wnext=0,U.whave=U.wsize):(M<(te=U.wsize-U.wnext)&&(te=M),i.arraySet(U.window,R,a-M,te,U.wnext),(M-=te)?(i.arraySet(U.window,R,a-M,M,0),U.wnext=M,U.whave=U.wsize):(U.wnext+=te,U.wnext===U.wsize&&(U.wnext=0),U.whave<U.wsize&&(U.whave+=te))),0}u.inflateReset=S,u.inflateReset2=C,u.inflateResetKeep=E,u.inflateInit=function(j){return O(j,15)},u.inflateInit2=O,u.inflate=function(j,R){var a,M,te,U,W,K,X,z,N,J,G,Q,ue,ie,le,ce,ge,fe,we,ze,t,H,A,y,w=0,I=new i.Buf8(4),$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!j||!j.state||!j.output||!j.input&&j.avail_in!==0)return c;(a=j.state).mode===12&&(a.mode=13),W=j.next_out,te=j.output,X=j.avail_out,U=j.next_in,M=j.input,K=j.avail_in,z=a.hold,N=a.bits,J=K,G=X,H=v;e:for(;;)switch(a.mode){case b:if(a.wrap===0){a.mode=13;break}for(;N<16;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(2&a.wrap&&z===35615){I[a.check=0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0),N=z=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&z)<<8)+(z>>8))%31){j.msg="incorrect header check",a.mode=30;break}if((15&z)!=8){j.msg="unknown compression method",a.mode=30;break}if(N-=4,t=8+(15&(z>>>=4)),a.wbits===0)a.wbits=t;else if(t>a.wbits){j.msg="invalid window size",a.mode=30;break}a.dmax=1<<t,j.adler=a.check=1,a.mode=512&z?10:12,N=z=0;break;case 2:for(;N<16;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(a.flags=z,(255&a.flags)!=8){j.msg="unknown compression method",a.mode=30;break}if(57344&a.flags){j.msg="unknown header flags set",a.mode=30;break}a.head&&(a.head.text=z>>8&1),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0)),N=z=0,a.mode=3;case 3:for(;N<32;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.head&&(a.head.time=z),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,I[2]=z>>>16&255,I[3]=z>>>24&255,a.check=n(a.check,I,4,0)),N=z=0,a.mode=4;case 4:for(;N<16;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.head&&(a.head.xflags=255&z,a.head.os=z>>8),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0)),N=z=0,a.mode=5;case 5:if(1024&a.flags){for(;N<16;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.length=z,a.head&&(a.head.extra_len=z),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0)),N=z=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(K<(Q=a.length)&&(Q=K),Q&&(a.head&&(t=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),i.arraySet(a.head.extra,M,U,Q,t)),512&a.flags&&(a.check=n(a.check,M,Q,U)),K-=Q,U+=Q,a.length-=Q),a.length))break e;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(K===0)break e;for(Q=0;t=M[U+Q++],a.head&&t&&a.length<65536&&(a.head.name+=String.fromCharCode(t)),t&&Q<K;);if(512&a.flags&&(a.check=n(a.check,M,Q,U)),K-=Q,U+=Q,t)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=8;case 8:if(4096&a.flags){if(K===0)break e;for(Q=0;t=M[U+Q++],a.head&&t&&a.length<65536&&(a.head.comment+=String.fromCharCode(t)),t&&Q<K;);if(512&a.flags&&(a.check=n(a.check,M,Q,U)),K-=Q,U+=Q,t)break e}else a.head&&(a.head.comment=null);a.mode=9;case 9:if(512&a.flags){for(;N<16;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(z!==(65535&a.check)){j.msg="header crc mismatch",a.mode=30;break}N=z=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),j.adler=a.check=0,a.mode=12;break;case 10:for(;N<32;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}j.adler=a.check=p(z),N=z=0,a.mode=11;case 11:if(a.havedict===0)return j.next_out=W,j.avail_out=X,j.next_in=U,j.avail_in=K,a.hold=z,a.bits=N,2;j.adler=a.check=1,a.mode=12;case 12:if(R===5||R===6)break e;case 13:if(a.last){z>>>=7&N,N-=7&N,a.mode=27;break}for(;N<3;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}switch(a.last=1&z,N-=1,3&(z>>>=1)){case 0:a.mode=14;break;case 1:if(V(a),a.mode=20,R!==6)break;z>>>=2,N-=2;break e;case 2:a.mode=17;break;case 3:j.msg="invalid block type",a.mode=30}z>>>=2,N-=2;break;case 14:for(z>>>=7&N,N-=7&N;N<32;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if((65535&z)!=(z>>>16^65535)){j.msg="invalid stored block lengths",a.mode=30;break}if(a.length=65535&z,N=z=0,a.mode=15,R===6)break e;case 15:a.mode=16;case 16:if(Q=a.length){if(K<Q&&(Q=K),X<Q&&(Q=X),Q===0)break e;i.arraySet(te,M,U,Q,W),K-=Q,U+=Q,X-=Q,W+=Q,a.length-=Q;break}a.mode=12;break;case 17:for(;N<14;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(a.nlen=257+(31&z),z>>>=5,N-=5,a.ndist=1+(31&z),z>>>=5,N-=5,a.ncode=4+(15&z),z>>>=4,N-=4,286<a.nlen||30<a.ndist){j.msg="too many length or distance symbols",a.mode=30;break}a.have=0,a.mode=18;case 18:for(;a.have<a.ncode;){for(;N<3;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.lens[$[a.have++]]=7&z,z>>>=3,N-=3}for(;a.have<19;)a.lens[$[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,A={bits:a.lenbits},H=h(0,a.lens,0,19,a.lencode,0,a.work,A),a.lenbits=A.bits,H){j.msg="invalid code lengths set",a.mode=30;break}a.have=0,a.mode=19;case 19:for(;a.have<a.nlen+a.ndist;){for(;ce=(w=a.lencode[z&(1<<a.lenbits)-1])>>>16&255,ge=65535&w,!((le=w>>>24)<=N);){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(ge<16)z>>>=le,N-=le,a.lens[a.have++]=ge;else{if(ge===16){for(y=le+2;N<y;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(z>>>=le,N-=le,a.have===0){j.msg="invalid bit length repeat",a.mode=30;break}t=a.lens[a.have-1],Q=3+(3&z),z>>>=2,N-=2}else if(ge===17){for(y=le+3;N<y;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}N-=le,t=0,Q=3+(7&(z>>>=le)),z>>>=3,N-=3}else{for(y=le+7;N<y;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}N-=le,t=0,Q=11+(127&(z>>>=le)),z>>>=7,N-=7}if(a.have+Q>a.nlen+a.ndist){j.msg="invalid bit length repeat",a.mode=30;break}for(;Q--;)a.lens[a.have++]=t}}if(a.mode===30)break;if(a.lens[256]===0){j.msg="invalid code -- missing end-of-block",a.mode=30;break}if(a.lenbits=9,A={bits:a.lenbits},H=h(f,a.lens,0,a.nlen,a.lencode,0,a.work,A),a.lenbits=A.bits,H){j.msg="invalid literal/lengths set",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,A={bits:a.distbits},H=h(x,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,A),a.distbits=A.bits,H){j.msg="invalid distances set",a.mode=30;break}if(a.mode=20,R===6)break e;case 20:a.mode=21;case 21:if(6<=K&&258<=X){j.next_out=W,j.avail_out=X,j.next_in=U,j.avail_in=K,a.hold=z,a.bits=N,l(j,G),W=j.next_out,te=j.output,X=j.avail_out,U=j.next_in,M=j.input,K=j.avail_in,z=a.hold,N=a.bits,a.mode===12&&(a.back=-1);break}for(a.back=0;ce=(w=a.lencode[z&(1<<a.lenbits)-1])>>>16&255,ge=65535&w,!((le=w>>>24)<=N);){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(ce&&(240&ce)==0){for(fe=le,we=ce,ze=ge;ce=(w=a.lencode[ze+((z&(1<<fe+we)-1)>>fe)])>>>16&255,ge=65535&w,!(fe+(le=w>>>24)<=N);){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}z>>>=fe,N-=fe,a.back+=fe}if(z>>>=le,N-=le,a.back+=le,a.length=ge,ce===0){a.mode=26;break}if(32&ce){a.back=-1,a.mode=12;break}if(64&ce){j.msg="invalid literal/length code",a.mode=30;break}a.extra=15&ce,a.mode=22;case 22:if(a.extra){for(y=a.extra;N<y;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.length+=z&(1<<a.extra)-1,z>>>=a.extra,N-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;ce=(w=a.distcode[z&(1<<a.distbits)-1])>>>16&255,ge=65535&w,!((le=w>>>24)<=N);){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if((240&ce)==0){for(fe=le,we=ce,ze=ge;ce=(w=a.distcode[ze+((z&(1<<fe+we)-1)>>fe)])>>>16&255,ge=65535&w,!(fe+(le=w>>>24)<=N);){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}z>>>=fe,N-=fe,a.back+=fe}if(z>>>=le,N-=le,a.back+=le,64&ce){j.msg="invalid distance code",a.mode=30;break}a.offset=ge,a.extra=15&ce,a.mode=24;case 24:if(a.extra){for(y=a.extra;N<y;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.offset+=z&(1<<a.extra)-1,z>>>=a.extra,N-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){j.msg="invalid distance too far back",a.mode=30;break}a.mode=25;case 25:if(X===0)break e;if(Q=G-X,a.offset>Q){if((Q=a.offset-Q)>a.whave&&a.sane){j.msg="invalid distance too far back",a.mode=30;break}ue=Q>a.wnext?(Q-=a.wnext,a.wsize-Q):a.wnext-Q,Q>a.length&&(Q=a.length),ie=a.window}else ie=te,ue=W-a.offset,Q=a.length;for(X<Q&&(Q=X),X-=Q,a.length-=Q;te[W++]=ie[ue++],--Q;);a.length===0&&(a.mode=21);break;case 26:if(X===0)break e;te[W++]=a.length,X--,a.mode=21;break;case 27:if(a.wrap){for(;N<32;){if(K===0)break e;K--,z|=M[U++]<<N,N+=8}if(G-=X,j.total_out+=G,a.total+=G,G&&(j.adler=a.check=a.flags?n(a.check,te,G,W-G):o(a.check,te,G,W-G)),G=X,(a.flags?z:p(z))!==a.check){j.msg="incorrect data check",a.mode=30;break}N=z=0}a.mode=28;case 28:if(a.wrap&&a.flags){for(;N<32;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(z!==(4294967295&a.total)){j.msg="incorrect length check",a.mode=30;break}N=z=0}a.mode=29;case 29:H=1;break e;case 30:H=-3;break e;case 31:return-4;case 32:default:return c}return j.next_out=W,j.avail_out=X,j.next_in=U,j.avail_in=K,a.hold=z,a.bits=N,(a.wsize||G!==j.avail_out&&a.mode<30&&(a.mode<27||R!==4))&&re(j,j.output,j.next_out,G-j.avail_out)?(a.mode=31,-4):(J-=j.avail_in,G-=j.avail_out,j.total_in+=J,j.total_out+=G,a.total+=G,a.wrap&&G&&(j.adler=a.check=a.flags?n(a.check,te,G,j.next_out-G):o(a.check,te,G,j.next_out-G)),j.data_type=a.bits+(a.last?64:0)+(a.mode===12?128:0)+(a.mode===20||a.mode===15?256:0),(J==0&&G===0||R===4)&&H===v&&(H=-5),H)},u.inflateEnd=function(j){if(!j||!j.state)return c;var R=j.state;return R.window&&(R.window=null),j.state=null,v},u.inflateGetHeader=function(j,R){var a;return j&&j.state?(2&(a=j.state).wrap)==0?c:((a.head=R).done=!1,v):c},u.inflateSetDictionary=function(j,R){var a,M=R.length;return j&&j.state?(a=j.state).wrap!==0&&a.mode!==11?c:a.mode===11&&o(1,R,M,0)!==a.check?-3:re(j,R,M,M)?(a.mode=31,-4):(a.havedict=1,v):c},u.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,m,u){var i=r("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];m.exports=function(f,x,v,c,b,d,g,p){var k,E,S,C,O,L,D,T,V,re=p.bits,j=0,R=0,a=0,M=0,te=0,U=0,W=0,K=0,X=0,z=0,N=null,J=0,G=new i.Buf16(16),Q=new i.Buf16(16),ue=null,ie=0;for(j=0;j<=15;j++)G[j]=0;for(R=0;R<c;R++)G[x[v+R]]++;for(te=re,M=15;1<=M&&G[M]===0;M--);if(M<te&&(te=M),M===0)return b[d++]=20971520,b[d++]=20971520,p.bits=1,0;for(a=1;a<M&&G[a]===0;a++);for(te<a&&(te=a),j=K=1;j<=15;j++)if(K<<=1,(K-=G[j])<0)return-1;if(0<K&&(f===0||M!==1))return-1;for(Q[1]=0,j=1;j<15;j++)Q[j+1]=Q[j]+G[j];for(R=0;R<c;R++)x[v+R]!==0&&(g[Q[x[v+R]]++]=R);if(L=f===0?(N=ue=g,19):f===1?(N=o,J-=257,ue=n,ie-=257,256):(N=l,ue=h,-1),j=a,O=d,W=R=z=0,S=-1,C=(X=1<<(U=te))-1,f===1&&852<X||f===2&&592<X)return 1;for(;;){for(D=j-W,V=g[R]<L?(T=0,g[R]):g[R]>L?(T=ue[ie+g[R]],N[J+g[R]]):(T=96,0),k=1<<j-W,a=E=1<<U;b[O+(z>>W)+(E-=k)]=D<<24|T<<16|V|0,E!==0;);for(k=1<<j-1;z&k;)k>>=1;if(k!==0?(z&=k-1,z+=k):z=0,R++,--G[j]==0){if(j===M)break;j=x[v+g[R]]}if(te<j&&(z&C)!==S){for(W===0&&(W=te),O+=a,K=1<<(U=j-W);U+W<M&&!((K-=G[U+W])<=0);)U++,K<<=1;if(X+=1<<U,f===1&&852<X||f===2&&592<X)return 1;b[S=z&C]=te<<24|U<<16|O-d|0}}return z!==0&&(b[O+z]=j-W<<24|64<<16|0),p.bits=te,0}},{"../utils/common":41}],51:[function(r,m,u){m.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r,m,u){var i=r("../utils/common"),o=0,n=1;function l(w){for(var I=w.length;0<=--I;)w[I]=0}var h=0,f=29,x=256,v=x+1+f,c=30,b=19,d=2*v+1,g=15,p=16,k=7,E=256,S=16,C=17,O=18,L=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],re=new Array(2*(v+2));l(re);var j=new Array(2*c);l(j);var R=new Array(512);l(R);var a=new Array(256);l(a);var M=new Array(f);l(M);var te,U,W,K=new Array(c);function X(w,I,$,Z,P){this.static_tree=w,this.extra_bits=I,this.extra_base=$,this.elems=Z,this.max_length=P,this.has_stree=w&&w.length}function z(w,I){this.dyn_tree=w,this.max_code=0,this.stat_desc=I}function N(w){return w<256?R[w]:R[256+(w>>>7)]}function J(w,I){w.pending_buf[w.pending++]=255&I,w.pending_buf[w.pending++]=I>>>8&255}function G(w,I,$){w.bi_valid>p-$?(w.bi_buf|=I<<w.bi_valid&65535,J(w,w.bi_buf),w.bi_buf=I>>p-w.bi_valid,w.bi_valid+=$-p):(w.bi_buf|=I<<w.bi_valid&65535,w.bi_valid+=$)}function Q(w,I,$){G(w,$[2*I],$[2*I+1])}function ue(w,I){for(var $=0;$|=1&w,w>>>=1,$<<=1,0<--I;);return $>>>1}function ie(w,I,$){var Z,P,Y=new Array(g+1),F=0;for(Z=1;Z<=g;Z++)Y[Z]=F=F+$[Z-1]<<1;for(P=0;P<=I;P++){var B=w[2*P+1];B!==0&&(w[2*P]=ue(Y[B]++,B))}}function le(w){var I;for(I=0;I<v;I++)w.dyn_ltree[2*I]=0;for(I=0;I<c;I++)w.dyn_dtree[2*I]=0;for(I=0;I<b;I++)w.bl_tree[2*I]=0;w.dyn_ltree[2*E]=1,w.opt_len=w.static_len=0,w.last_lit=w.matches=0}function ce(w){8<w.bi_valid?J(w,w.bi_buf):0<w.bi_valid&&(w.pending_buf[w.pending++]=w.bi_buf),w.bi_buf=0,w.bi_valid=0}function ge(w,I,$,Z){var P=2*I,Y=2*$;return w[P]<w[Y]||w[P]===w[Y]&&Z[I]<=Z[$]}function fe(w,I,$){for(var Z=w.heap[$],P=$<<1;P<=w.heap_len&&(P<w.heap_len&&ge(I,w.heap[P+1],w.heap[P],w.depth)&&P++,!ge(I,Z,w.heap[P],w.depth));)w.heap[$]=w.heap[P],$=P,P<<=1;w.heap[$]=Z}function we(w,I,$){var Z,P,Y,F,B=0;if(w.last_lit!==0)for(;Z=w.pending_buf[w.d_buf+2*B]<<8|w.pending_buf[w.d_buf+2*B+1],P=w.pending_buf[w.l_buf+B],B++,Z===0?Q(w,P,I):(Q(w,(Y=a[P])+x+1,I),(F=L[Y])!==0&&G(w,P-=M[Y],F),Q(w,Y=N(--Z),$),(F=D[Y])!==0&&G(w,Z-=K[Y],F)),B<w.last_lit;);Q(w,E,I)}function ze(w,I){var $,Z,P,Y=I.dyn_tree,F=I.stat_desc.static_tree,B=I.stat_desc.has_stree,ee=I.stat_desc.elems,ae=-1;for(w.heap_len=0,w.heap_max=d,$=0;$<ee;$++)Y[2*$]!==0?(w.heap[++w.heap_len]=ae=$,w.depth[$]=0):Y[2*$+1]=0;for(;w.heap_len<2;)Y[2*(P=w.heap[++w.heap_len]=ae<2?++ae:0)]=1,w.depth[P]=0,w.opt_len--,B&&(w.static_len-=F[2*P+1]);for(I.max_code=ae,$=w.heap_len>>1;1<=$;$--)fe(w,Y,$);for(P=ee;$=w.heap[1],w.heap[1]=w.heap[w.heap_len--],fe(w,Y,1),Z=w.heap[1],w.heap[--w.heap_max]=$,w.heap[--w.heap_max]=Z,Y[2*P]=Y[2*$]+Y[2*Z],w.depth[P]=(w.depth[$]>=w.depth[Z]?w.depth[$]:w.depth[Z])+1,Y[2*$+1]=Y[2*Z+1]=P,w.heap[1]=P++,fe(w,Y,1),2<=w.heap_len;);w.heap[--w.heap_max]=w.heap[1],(function(se,xe){var Ee,_e,Le,ye,st,jt,Ce=xe.dyn_tree,Er=xe.max_code,vo=xe.stat_desc.static_tree,xo=xe.stat_desc.has_stree,wo=xe.stat_desc.extra_bits,Sr=xe.stat_desc.extra_base,Ke=xe.stat_desc.max_length,lt=0;for(ye=0;ye<=g;ye++)se.bl_count[ye]=0;for(Ce[2*se.heap[se.heap_max]+1]=0,Ee=se.heap_max+1;Ee<d;Ee++)Ke<(ye=Ce[2*Ce[2*(_e=se.heap[Ee])+1]+1]+1)&&(ye=Ke,lt++),Ce[2*_e+1]=ye,Er<_e||(se.bl_count[ye]++,st=0,Sr<=_e&&(st=wo[_e-Sr]),jt=Ce[2*_e],se.opt_len+=jt*(ye+st),xo&&(se.static_len+=jt*(vo[2*_e+1]+st)));if(lt!==0){do{for(ye=Ke-1;se.bl_count[ye]===0;)ye--;se.bl_count[ye]--,se.bl_count[ye+1]+=2,se.bl_count[Ke]--,lt-=2}while(0<lt);for(ye=Ke;ye!==0;ye--)for(_e=se.bl_count[ye];_e!==0;)Er<(Le=se.heap[--Ee])||(Ce[2*Le+1]!==ye&&(se.opt_len+=(ye-Ce[2*Le+1])*Ce[2*Le],Ce[2*Le+1]=ye),_e--)}})(w,I),ie(Y,ae,w.bl_count)}function t(w,I,$){var Z,P,Y=-1,F=I[1],B=0,ee=7,ae=4;for(F===0&&(ee=138,ae=3),I[2*($+1)+1]=65535,Z=0;Z<=$;Z++)P=F,F=I[2*(Z+1)+1],++B<ee&&P===F||(B<ae?w.bl_tree[2*P]+=B:P!==0?(P!==Y&&w.bl_tree[2*P]++,w.bl_tree[2*S]++):B<=10?w.bl_tree[2*C]++:w.bl_tree[2*O]++,Y=P,ae=(B=0)===F?(ee=138,3):P===F?(ee=6,3):(ee=7,4))}function H(w,I,$){var Z,P,Y=-1,F=I[1],B=0,ee=7,ae=4;for(F===0&&(ee=138,ae=3),Z=0;Z<=$;Z++)if(P=F,F=I[2*(Z+1)+1],!(++B<ee&&P===F)){if(B<ae)for(;Q(w,P,w.bl_tree),--B!=0;);else P!==0?(P!==Y&&(Q(w,P,w.bl_tree),B--),Q(w,S,w.bl_tree),G(w,B-3,2)):B<=10?(Q(w,C,w.bl_tree),G(w,B-3,3)):(Q(w,O,w.bl_tree),G(w,B-11,7));Y=P,ae=(B=0)===F?(ee=138,3):P===F?(ee=6,3):(ee=7,4)}}l(K);var A=!1;function y(w,I,$,Z){G(w,(h<<1)+(Z?1:0),3),(function(P,Y,F,B){ce(P),J(P,F),J(P,~F),i.arraySet(P.pending_buf,P.window,Y,F,P.pending),P.pending+=F})(w,I,$)}u._tr_init=function(w){A||((function(){var I,$,Z,P,Y,F=new Array(g+1);for(P=Z=0;P<f-1;P++)for(M[P]=Z,I=0;I<1<<L[P];I++)a[Z++]=P;for(a[Z-1]=P,P=Y=0;P<16;P++)for(K[P]=Y,I=0;I<1<<D[P];I++)R[Y++]=P;for(Y>>=7;P<c;P++)for(K[P]=Y<<7,I=0;I<1<<D[P]-7;I++)R[256+Y++]=P;for($=0;$<=g;$++)F[$]=0;for(I=0;I<=143;)re[2*I+1]=8,I++,F[8]++;for(;I<=255;)re[2*I+1]=9,I++,F[9]++;for(;I<=279;)re[2*I+1]=7,I++,F[7]++;for(;I<=287;)re[2*I+1]=8,I++,F[8]++;for(ie(re,v+1,F),I=0;I<c;I++)j[2*I+1]=5,j[2*I]=ue(I,5);te=new X(re,L,x+1,v,g),U=new X(j,D,0,c,g),W=new X(new Array(0),T,0,b,k)})(),A=!0),w.l_desc=new z(w.dyn_ltree,te),w.d_desc=new z(w.dyn_dtree,U),w.bl_desc=new z(w.bl_tree,W),w.bi_buf=0,w.bi_valid=0,le(w)},u._tr_stored_block=y,u._tr_flush_block=function(w,I,$,Z){var P,Y,F=0;0<w.level?(w.strm.data_type===2&&(w.strm.data_type=(function(B){var ee,ae=4093624447;for(ee=0;ee<=31;ee++,ae>>>=1)if(1&ae&&B.dyn_ltree[2*ee]!==0)return o;if(B.dyn_ltree[18]!==0||B.dyn_ltree[20]!==0||B.dyn_ltree[26]!==0)return n;for(ee=32;ee<x;ee++)if(B.dyn_ltree[2*ee]!==0)return n;return o})(w)),ze(w,w.l_desc),ze(w,w.d_desc),F=(function(B){var ee;for(t(B,B.dyn_ltree,B.l_desc.max_code),t(B,B.dyn_dtree,B.d_desc.max_code),ze(B,B.bl_desc),ee=b-1;3<=ee&&B.bl_tree[2*V[ee]+1]===0;ee--);return B.opt_len+=3*(ee+1)+5+5+4,ee})(w),P=w.opt_len+3+7>>>3,(Y=w.static_len+3+7>>>3)<=P&&(P=Y)):P=Y=$+5,$+4<=P&&I!==-1?y(w,I,$,Z):w.strategy===4||Y===P?(G(w,2+(Z?1:0),3),we(w,re,j)):(G(w,4+(Z?1:0),3),(function(B,ee,ae,se){var xe;for(G(B,ee-257,5),G(B,ae-1,5),G(B,se-4,4),xe=0;xe<se;xe++)G(B,B.bl_tree[2*V[xe]+1],3);H(B,B.dyn_ltree,ee-1),H(B,B.dyn_dtree,ae-1)})(w,w.l_desc.max_code+1,w.d_desc.max_code+1,F+1),we(w,w.dyn_ltree,w.dyn_dtree)),le(w),Z&&ce(w)},u._tr_tally=function(w,I,$){return w.pending_buf[w.d_buf+2*w.last_lit]=I>>>8&255,w.pending_buf[w.d_buf+2*w.last_lit+1]=255&I,w.pending_buf[w.l_buf+w.last_lit]=255&$,w.last_lit++,I===0?w.dyn_ltree[2*$]++:(w.matches++,I--,w.dyn_ltree[2*(a[$]+x+1)]++,w.dyn_dtree[2*N(I)]++),w.last_lit===w.lit_bufsize-1},u._tr_align=function(w){G(w,2,3),Q(w,E,re),(function(I){I.bi_valid===16?(J(I,I.bi_buf),I.bi_buf=0,I.bi_valid=0):8<=I.bi_valid&&(I.pending_buf[I.pending++]=255&I.bi_buf,I.bi_buf>>=8,I.bi_valid-=8)})(w)}},{"../utils/common":41}],53:[function(r,m,u){m.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,m,u){(function(i){(function(o,n){if(!o.setImmediate){var l,h,f,x,v=1,c={},b=!1,d=o.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(o);g=g&&g.setTimeout?g:o,l={}.toString.call(o.process)==="[object process]"?function(S){process.nextTick(function(){k(S)})}:(function(){if(o.postMessage&&!o.importScripts){var S=!0,C=o.onmessage;return o.onmessage=function(){S=!1},o.postMessage("","*"),o.onmessage=C,S}})()?(x="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",E,!1):o.attachEvent("onmessage",E),function(S){o.postMessage(x+S,"*")}):o.MessageChannel?((f=new MessageChannel).port1.onmessage=function(S){k(S.data)},function(S){f.port2.postMessage(S)}):d&&"onreadystatechange"in d.createElement("script")?(h=d.documentElement,function(S){var C=d.createElement("script");C.onreadystatechange=function(){k(S),C.onreadystatechange=null,h.removeChild(C),C=null},h.appendChild(C)}):function(S){setTimeout(k,0,S)},g.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var C=new Array(arguments.length-1),O=0;O<C.length;O++)C[O]=arguments[O+1];var L={callback:S,args:C};return c[v]=L,l(v),v++},g.clearImmediate=p}function p(S){delete c[S]}function k(S){if(b)setTimeout(k,0,S);else{var C=c[S];if(C){b=!0;try{(function(O){var L=O.callback,D=O.args;switch(D.length){case 0:L();break;case 1:L(D[0]);break;case 2:L(D[0],D[1]);break;case 3:L(D[0],D[1],D[2]);break;default:L.apply(n,D)}})(C)}finally{p(S),b=!1}}}}function E(S){S.source===o&&typeof S.data=="string"&&S.data.indexOf(x)===0&&k(+S.data.slice(x.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof Ae<"u"?Ae:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ct)),ct.exports}var Tr=Ir();const Or=Ar(Tr);var qe={exports:{}},Dr=qe.exports,St;function Lr(){return St||(St=1,(function(e,_){(function(r,m){m()})(Dr,function(){function r(h,f){return typeof f>"u"?f={autoBom:!1}:typeof f!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function m(h,f,x){var v=new XMLHttpRequest;v.open("GET",h),v.responseType="blob",v.onload=function(){l(v.response,f,x)},v.onerror=function(){console.error("could not download file")},v.send()}function u(h){var f=new XMLHttpRequest;f.open("HEAD",h,!1);try{f.send()}catch{}return 200<=f.status&&299>=f.status}function i(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(f)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ae=="object"&&Ae.global===Ae?Ae:void 0,n=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!n?function(h,f,x){var v=o.URL||o.webkitURL,c=document.createElement("a");f=f||h.name||"download",c.download=f,c.rel="noopener",typeof h=="string"?(c.href=h,c.origin===location.origin?i(c):u(c.href)?m(h,f,x):i(c,c.target="_blank")):(c.href=v.createObjectURL(h),setTimeout(function(){v.revokeObjectURL(c.href)},4e4),setTimeout(function(){i(c)},0))}:"msSaveOrOpenBlob"in navigator?function(h,f,x){if(f=f||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(r(h,x),f);else if(u(h))m(h,f,x);else{var v=document.createElement("a");v.href=h,v.target="_blank",setTimeout(function(){i(v)})}}:function(h,f,x,v){if(v=v||open("","_blank"),v&&(v.document.title=v.document.body.innerText="downloading..."),typeof h=="string")return m(h,f,x);var c=h.type==="application/octet-stream",b=/constructor/i.test(o.HTMLElement)||o.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||c&&b||n)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var E=g.result;E=d?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),v?v.location.href=E:location=E,v=null},g.readAsDataURL(h)}else{var p=o.URL||o.webkitURL,k=p.createObjectURL(h);v?v.location=k:location.href=k,v=null,setTimeout(function(){p.revokeObjectURL(k)},4e4)}});o.saveAs=l.saveAs=l,e.exports=l})})(qe)),qe.exports}var Nt=Lr();const Ct=async(e,_)=>{const r=new Or,m=r.folder("config");m==null||m.file("site.json",JSON.stringify(e.site,null,2)),m==null||m.file("theme.json",JSON.stringify(e.theme,null,2)),m==null||m.file("menu.json",JSON.stringify(e.menu,null,2));const u=r.folder("pages");u==null||u.file(`${_}.json`,JSON.stringify(e.page,null,2));const i=await r.generateAsync({type:"blob"});Nt.saveAs(i,`jsonpages-project-${_}-${Date.now()}.zip`)},At=(e,_,r)=>{const{pages:m,...u}=e.site,i={page:e.page,site:u,menu:e.menu,theme:e.theme},n=`<script id="jp-baked-state" type="application/json">${JSON.stringify(i)}<\/script>`,l=r.replace("</head>",`${n}</head>`),h=new Blob([`<!DOCTYPE html>${l}`],{type:"text/html;charset=utf-8"});Nt.saveAs(h,`${_}.html`)};function It(e){var _,r,m="";if(typeof e=="string"||typeof e=="number")m+=e;else if(typeof e=="object")if(Array.isArray(e)){var u=e.length;for(_=0;_<u;_++)e[_]&&(r=It(e[_]))&&(m&&(m+=" "),m+=r)}else for(r in e)e[r]&&(m&&(m+=" "),m+=r);return m}function Pr(){for(var e,_,r=0,m="",u=arguments.length;r<u;r++)(e=arguments[r])&&(_=It(e))&&(m&&(m+=" "),m+=_);return m}const Fr=(e,_)=>{const r=new Array(e.length+_.length);for(let m=0;m<e.length;m++)r[m]=e[m];for(let m=0;m<_.length;m++)r[e.length+m]=_[m];return r},Rr=(e,_)=>({classGroupId:e,validator:_}),Tt=(e=new Map,_=null,r)=>({nextPart:e,validators:_,classGroupId:r}),Ye="-",Ot=[],Mr="arbitrary..",Br=e=>{const _=Wr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:m}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Ur(o);const n=o.split(Ye),l=n[0]===""&&n.length>1?1:0;return Dt(n,l,_)},getConflictingClassGroupIds:(o,n)=>{if(n){const l=m[o],h=r[o];return l?h?Fr(h,l):l:h||Ot}return r[o]||Ot}}},Dt=(e,_,r)=>{if(e.length-_===0)return r.classGroupId;const u=e[_],i=r.nextPart.get(u);if(i){const h=Dt(e,_+1,i);if(h)return h}const o=r.validators;if(o===null)return;const n=_===0?e.join(Ye):e.slice(_).join(Ye),l=o.length;for(let h=0;h<l;h++){const f=o[h];if(f.validator(n))return f.classGroupId}},Ur=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const _=e.slice(1,-1),r=_.indexOf(":"),m=_.slice(0,r);return m?Mr+m:void 0})(),Wr=e=>{const{theme:_,classGroups:r}=e;return $r(r,_)},$r=(e,_)=>{const r=Tt();for(const m in e){const u=e[m];dt(u,r,m,_)}return r},dt=(e,_,r,m)=>{const u=e.length;for(let i=0;i<u;i++){const o=e[i];Zr(o,_,r,m)}},Zr=(e,_,r,m)=>{if(typeof e=="string"){Hr(e,_,r);return}if(typeof e=="function"){Gr(e,_,r,m);return}Vr(e,_,r,m)},Hr=(e,_,r)=>{const m=e===""?_:Lt(_,e);m.classGroupId=r},Gr=(e,_,r,m)=>{if(Kr(e)){dt(e(m),_,r,m);return}_.validators===null&&(_.validators=[]),_.validators.push(Rr(r,e))},Vr=(e,_,r,m)=>{const u=Object.entries(e),i=u.length;for(let o=0;o<i;o++){const[n,l]=u[o];dt(l,Lt(_,n),r,m)}},Lt=(e,_)=>{let r=e;const m=_.split(Ye),u=m.length;for(let i=0;i<u;i++){const o=m[i];let n=r.nextPart.get(o);n||(n=Tt(),r.nextPart.set(o,n)),r=n}return r},Kr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Jr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let _=0,r=Object.create(null),m=Object.create(null);const u=(i,o)=>{r[i]=o,_++,_>e&&(_=0,m=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=m[i])!==void 0)return u(i,o),o},set(i,o){i in r?r[i]=o:u(i,o)}}},ut="!",Pt=":",qr=[],Ft=(e,_,r,m,u)=>({modifiers:e,hasImportantModifier:_,baseClassName:r,maybePostfixModifierPosition:m,isExternal:u}),Yr=e=>{const{prefix:_,experimentalParseClassName:r}=e;let m=u=>{const i=[];let o=0,n=0,l=0,h;const f=u.length;for(let d=0;d<f;d++){const g=u[d];if(o===0&&n===0){if(g===Pt){i.push(u.slice(l,d)),l=d+1;continue}if(g==="/"){h=d;continue}}g==="["?o++:g==="]"?o--:g==="("?n++:g===")"&&n--}const x=i.length===0?u:u.slice(l);let v=x,c=!1;x.endsWith(ut)?(v=x.slice(0,-1),c=!0):x.startsWith(ut)&&(v=x.slice(1),c=!0);const b=h&&h>l?h-l:void 0;return Ft(i,c,v,b)};if(_){const u=_+Pt,i=m;m=o=>o.startsWith(u)?i(o.slice(u.length)):Ft(qr,!1,o,void 0,!0)}if(r){const u=m;m=i=>r({className:i,parseClassName:u})}return m},Xr=e=>{const _=new Map;return e.orderSensitiveModifiers.forEach((r,m)=>{_.set(r,1e6+m)}),r=>{const m=[];let u=[];for(let i=0;i<r.length;i++){const o=r[i],n=o[0]==="[",l=_.has(o);n||l?(u.length>0&&(u.sort(),m.push(...u),u=[]),m.push(o)):u.push(o)}return u.length>0&&(u.sort(),m.push(...u)),m}},Qr=e=>({cache:Jr(e.cacheSize),parseClassName:Yr(e),sortModifiers:Xr(e),...Br(e)}),en=/\s+/,tn=(e,_)=>{const{parseClassName:r,getClassGroupId:m,getConflictingClassGroupIds:u,sortModifiers:i}=_,o=[],n=e.trim().split(en);let l="";for(let h=n.length-1;h>=0;h-=1){const f=n[h],{isExternal:x,modifiers:v,hasImportantModifier:c,baseClassName:b,maybePostfixModifierPosition:d}=r(f);if(x){l=f+(l.length>0?" "+l:l);continue}let g=!!d,p=m(g?b.substring(0,d):b);if(!p){if(!g){l=f+(l.length>0?" "+l:l);continue}if(p=m(b),!p){l=f+(l.length>0?" "+l:l);continue}g=!1}const k=v.length===0?"":v.length===1?v[0]:i(v).join(":"),E=c?k+ut:k,S=E+p;if(o.indexOf(S)>-1)continue;o.push(S);const C=u(p,g);for(let O=0;O<C.length;++O){const L=C[O];o.push(E+L)}l=f+(l.length>0?" "+l:l)}return l},rn=(...e)=>{let _=0,r,m,u="";for(;_<e.length;)(r=e[_++])&&(m=Rt(r))&&(u&&(u+=" "),u+=m);return u},Rt=e=>{if(typeof e=="string")return e;let _,r="";for(let m=0;m<e.length;m++)e[m]&&(_=Rt(e[m]))&&(r&&(r+=" "),r+=_);return r},nn=(e,..._)=>{let r,m,u,i;const o=l=>{const h=_.reduce((f,x)=>x(f),e());return r=Qr(h),m=r.cache.get,u=r.cache.set,i=n,n(l)},n=l=>{const h=m(l);if(h)return h;const f=tn(l,r);return u(l,f),f};return i=o,(...l)=>i(rn(...l))},on=[],ke=e=>{const _=r=>r[e]||on;return _.isThemeGetter=!0,_},Mt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,an=/^\d+\/\d+$/,sn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ln=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,un=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pe=e=>an.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),Ie=e=>!!e&&Number.isInteger(Number(e)),ht=e=>e.endsWith("%")&&de(e.slice(0,-1)),Ne=e=>sn.test(e),hn=()=>!0,pn=e=>ln.test(e)&&!cn.test(e),Ut=()=>!1,fn=e=>dn.test(e),mn=e=>un.test(e),bn=e=>!ne(e)&&!oe(e),gn=e=>Fe(e,Gt,Ut),ne=e=>Mt.test(e),Te=e=>Fe(e,Vt,pn),pt=e=>Fe(e,kn,de),Wt=e=>Fe(e,Zt,Ut),vn=e=>Fe(e,Ht,mn),Xe=e=>Fe(e,Kt,fn),oe=e=>Bt.test(e),Ue=e=>Re(e,Vt),xn=e=>Re(e,_n),$t=e=>Re(e,Zt),wn=e=>Re(e,Gt),yn=e=>Re(e,Ht),Qe=e=>Re(e,Kt,!0),Fe=(e,_,r)=>{const m=Mt.exec(e);return m?m[1]?_(m[1]):r(m[2]):!1},Re=(e,_,r=!1)=>{const m=Bt.exec(e);return m?m[1]?_(m[1]):r:!1},Zt=e=>e==="position"||e==="percentage",Ht=e=>e==="image"||e==="url",Gt=e=>e==="length"||e==="size"||e==="bg-size",Vt=e=>e==="length",kn=e=>e==="number",_n=e=>e==="family-name",Kt=e=>e==="shadow",zn=nn(()=>{const e=ke("color"),_=ke("font"),r=ke("text"),m=ke("font-weight"),u=ke("tracking"),i=ke("leading"),o=ke("breakpoint"),n=ke("container"),l=ke("spacing"),h=ke("radius"),f=ke("shadow"),x=ke("inset-shadow"),v=ke("text-shadow"),c=ke("drop-shadow"),b=ke("blur"),d=ke("perspective"),g=ke("aspect"),p=ke("ease"),k=ke("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),oe,ne],O=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],D=()=>[oe,ne,l],T=()=>[Pe,"full","auto",...D()],V=()=>[Ie,"none","subgrid",oe,ne],re=()=>["auto",{span:["full",Ie,oe,ne]},Ie,oe,ne],j=()=>[Ie,"auto",oe,ne],R=()=>["auto","min","max","fr",oe,ne],a=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],te=()=>["auto",...D()],U=()=>[Pe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],W=()=>[e,oe,ne],K=()=>[...S(),$t,Wt,{position:[oe,ne]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",wn,gn,{size:[oe,ne]}],N=()=>[ht,Ue,Te],J=()=>["","none","full",h,oe,ne],G=()=>["",de,Ue,Te],Q=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[de,ht,$t,Wt],le=()=>["","none",b,oe,ne],ce=()=>["none",de,oe,ne],ge=()=>["none",de,oe,ne],fe=()=>[de,oe,ne],we=()=>[Pe,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ne],breakpoint:[Ne],color:[hn],container:[Ne],"drop-shadow":[Ne],ease:["in","out","in-out"],font:[bn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ne],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ne],shadow:[Ne],spacing:["px",de],text:[Ne],"text-shadow":[Ne],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pe,ne,oe,g]}],container:["container"],columns:[{columns:[de,ne,oe,n]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",oe,ne]}],basis:[{basis:[Pe,"full","auto",n,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,Pe,"auto","initial","none",ne]}],grow:[{grow:["",de,oe,ne]}],shrink:[{shrink:["",de,oe,ne]}],order:[{order:[Ie,"first","last","none",oe,ne]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...a(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...a()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":a()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:te()}],mx:[{mx:te()}],my:[{my:te()}],ms:[{ms:te()}],me:[{me:te()}],mt:[{mt:te()}],mr:[{mr:te()}],mb:[{mb:te()}],ml:[{ml:te()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[n,"screen",...U()]}],"min-w":[{"min-w":[n,"screen","none",...U()]}],"max-w":[{"max-w":[n,"screen","none","prose",{screen:[o]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",r,Ue,Te]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[m,oe,pt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ht,ne]}],"font-family":[{font:[xn,ne,_]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,oe,ne]}],"line-clamp":[{"line-clamp":[de,"none",oe,pt]}],leading:[{leading:[i,...D()]}],"list-image":[{"list-image":["none",oe,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",oe,Te]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[de,"auto",oe,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oe,ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:K()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ie,oe,ne],radial:["",oe,ne],conic:[Ie,oe,ne]},yn,vn]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,oe,ne]}],"outline-w":[{outline:["",de,Ue,Te]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",f,Qe,Xe]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",x,Qe,Xe]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[de,Te]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",v,Qe,Xe]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[de,oe,ne]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[oe,ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:K()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,ne]}],filter:[{filter:["","none",oe,ne]}],blur:[{blur:le()}],brightness:[{brightness:[de,oe,ne]}],contrast:[{contrast:[de,oe,ne]}],"drop-shadow":[{"drop-shadow":["","none",c,Qe,Xe]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",de,oe,ne]}],"hue-rotate":[{"hue-rotate":[de,oe,ne]}],invert:[{invert:["",de,oe,ne]}],saturate:[{saturate:[de,oe,ne]}],sepia:[{sepia:["",de,oe,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,ne]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[de,oe,ne]}],"backdrop-contrast":[{"backdrop-contrast":[de,oe,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,oe,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,oe,ne]}],"backdrop-invert":[{"backdrop-invert":["",de,oe,ne]}],"backdrop-opacity":[{"backdrop-opacity":[de,oe,ne]}],"backdrop-saturate":[{"backdrop-saturate":[de,oe,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",de,oe,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[de,"initial",oe,ne]}],ease:[{ease:["linear","initial",p,oe,ne]}],delay:[{delay:[de,oe,ne]}],animate:[{animate:["none",k,oe,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[d,oe,ne]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[oe,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:we()}],"translate-x":[{"translate-x":we()}],"translate-y":[{"translate-y":we()}],"translate-z":[{"translate-z":we()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",oe,ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe,ne]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[de,Ue,Te,pt]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function he(...e){return zn(Pr(e))}var et={exports:{}},We={};/**
13
13
  * @license React
14
14
  * react-jsx-runtime.production.js
15
15
  *
@@ -17,7 +17,7 @@
17
17
  *
18
18
  * This source code is licensed under the MIT license found in the
19
19
  * LICENSE file in the root directory of this source tree.
20
- */var qt;function En(){if(qt)return Ue;qt=1;var e=Symbol.for("react.transitional.element"),_=Symbol.for("react.fragment");function r(m,u,i){var o=null;if(i!==void 0&&(o=""+i),u.key!==void 0&&(o=""+u.key),"key"in u){i={};for(var n in u)n!=="key"&&(i[n]=u[n])}else i=u;return u=i.ref,{$$typeof:e,type:m,key:o,ref:u!==void 0?u:null,props:i}}return Ue.Fragment=_,Ue.jsx=r,Ue.jsxs=r,Ue}var We={};/**
20
+ */var Jt;function jn(){if(Jt)return We;Jt=1;var e=Symbol.for("react.transitional.element"),_=Symbol.for("react.fragment");function r(m,u,i){var o=null;if(i!==void 0&&(o=""+i),u.key!==void 0&&(o=""+u.key),"key"in u){i={};for(var n in u)n!=="key"&&(i[n]=u[n])}else i=u;return u=i.ref,{$$typeof:e,type:m,key:o,ref:u!==void 0?u:null,props:i}}return We.Fragment=_,We.jsx=r,We.jsxs=r,We}var $e={};/**
21
21
  * @license React
22
22
  * react-jsx-runtime.development.js
23
23
  *
@@ -25,57 +25,57 @@
25
25
  *
26
26
  * This source code is licensed under the MIT license found in the
27
27
  * LICENSE file in the root directory of this source tree.
28
- */var Yt;function Nn(){return Yt||(Yt=1,process.env.NODE_ENV!=="production"&&(function(){function e(z){if(z==null)return null;if(typeof z=="function")return z.$$typeof===re?null:z.displayName||z.name||null;if(typeof z=="string")return z;switch(z){case b:return"Fragment";case k:return"Profiler";case p:return"StrictMode";case T:return"Suspense";case L:return"SuspenseList";case B:return"Activity"}if(typeof z=="object")switch(typeof z.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),z.$$typeof){case d:return"Portal";case N:return z.displayName||"Context";case E:return(z._context.displayName||"Context")+".Consumer";case C:var S=z.render;return z=z.displayName,z||(z=S.displayName||S.name||"",z=z!==""?"ForwardRef("+z+")":"ForwardRef"),z;case D:return S=z.displayName||null,S!==null?S:e(z.type)||"Memo";case O:S=z._payload,z=z._init;try{return e(z(S))}catch{}}return null}function _(z){return""+z}function r(z){try{_(z);var S=!1}catch{S=!0}if(S){S=console;var q=S.error,K=typeof Symbol=="function"&&Symbol.toStringTag&&z[Symbol.toStringTag]||z.constructor.name||"Object";return q.call(S,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",K),_(z)}}function m(z){if(z===b)return"<>";if(typeof z=="object"&&z!==null&&z.$$typeof===O)return"<...>";try{var S=e(z);return S?"<"+S+">":"<...>"}catch{return"<...>"}}function u(){var z=j.A;return z===null?null:z.getOwner()}function i(){return Error("react-stack-top-frame")}function o(z){if(R.call(z,"key")){var S=Object.getOwnPropertyDescriptor(z,"key").get;if(S&&S.isReactWarning)return!1}return z.key!==void 0}function n(z,S){function q(){te||(te=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",S))}q.isReactWarning=!0,Object.defineProperty(z,"key",{get:q,configurable:!0})}function l(){var z=e(this.type);return Z[z]||(Z[z]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),z=this.props.ref,z!==void 0?z:null}function h(z,S,q,K,Q,he){var ie=q.ref;return z={$$typeof:g,type:z,key:S,props:q,_owner:K},(ie!==void 0?ie:null)!==null?Object.defineProperty(z,"ref",{enumerable:!1,get:l}):Object.defineProperty(z,"ref",{enumerable:!1,value:null}),z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(z,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(z,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(z,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:he}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z}function f(z,S,q,K,Q,he){var ie=S.children;if(ie!==void 0)if(K)if(s(ie)){for(K=0;K<ie.length;K++)v(ie[K]);Object.freeze&&Object.freeze(ie)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else v(ie);if(R.call(S,"key")){ie=e(z);var ae=Object.keys(S).filter(function(fe){return fe!=="key"});K=0<ae.length?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}",X[ie+K]||(ae=0<ae.length?"{"+ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
28
+ */var qt;function En(){return qt||(qt=1,process.env.NODE_ENV!=="production"&&(function(){function e(z){if(z==null)return null;if(typeof z=="function")return z.$$typeof===re?null:z.displayName||z.name||null;if(typeof z=="string")return z;switch(z){case g:return"Fragment";case k:return"Profiler";case p:return"StrictMode";case O:return"Suspense";case L:return"SuspenseList";case V:return"Activity"}if(typeof z=="object")switch(typeof z.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),z.$$typeof){case d:return"Portal";case S:return z.displayName||"Context";case E:return(z._context.displayName||"Context")+".Consumer";case C:var N=z.render;return z=z.displayName,z||(z=N.displayName||N.name||"",z=z!==""?"ForwardRef("+z+")":"ForwardRef"),z;case D:return N=z.displayName||null,N!==null?N:e(z.type)||"Memo";case T:N=z._payload,z=z._init;try{return e(z(N))}catch{}}return null}function _(z){return""+z}function r(z){try{_(z);var N=!1}catch{N=!0}if(N){N=console;var J=N.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&z[Symbol.toStringTag]||z.constructor.name||"Object";return J.call(N,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),_(z)}}function m(z){if(z===g)return"<>";if(typeof z=="object"&&z!==null&&z.$$typeof===T)return"<...>";try{var N=e(z);return N?"<"+N+">":"<...>"}catch{return"<...>"}}function u(){var z=j.A;return z===null?null:z.getOwner()}function i(){return Error("react-stack-top-frame")}function o(z){if(R.call(z,"key")){var N=Object.getOwnPropertyDescriptor(z,"key").get;if(N&&N.isReactWarning)return!1}return z.key!==void 0}function n(z,N){function J(){te||(te=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",N))}J.isReactWarning=!0,Object.defineProperty(z,"key",{get:J,configurable:!0})}function l(){var z=e(this.type);return U[z]||(U[z]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),z=this.props.ref,z!==void 0?z:null}function h(z,N,J,G,Q,ue){var ie=J.ref;return z={$$typeof:b,type:z,key:N,props:J,_owner:G},(ie!==void 0?ie:null)!==null?Object.defineProperty(z,"ref",{enumerable:!1,get:l}):Object.defineProperty(z,"ref",{enumerable:!1,value:null}),z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(z,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(z,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(z,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ue}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z}function f(z,N,J,G,Q,ue){var ie=N.children;if(ie!==void 0)if(G)if(a(ie)){for(G=0;G<ie.length;G++)x(ie[G]);Object.freeze&&Object.freeze(ie)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(ie);if(R.call(N,"key")){ie=e(z);var le=Object.keys(N).filter(function(ge){return ge!=="key"});G=0<le.length?"{key: someKey, "+le.join(": ..., ")+": ...}":"{key: someKey}",X[ie+G]||(le=0<le.length?"{"+le.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
29
29
  let props = %s;
30
30
  <%s {...props} />
31
31
  React keys must be passed directly to JSX without using spread:
32
32
  let props = %s;
33
- <%s key={someKey} {...props} />`,K,ie,ae,ie),X[ie+K]=!0)}if(ie=null,q!==void 0&&(r(q),ie=""+q),o(S)&&(r(S.key),ie=""+S.key),"key"in S){q={};for(var se in S)se!=="key"&&(q[se]=S[se])}else q=S;return ie&&n(q,typeof z=="function"?z.displayName||z.name||"Unknown":z),h(z,ie,q,u(),Q,he)}function v(z){x(z)?z._store&&(z._store.validated=1):typeof z=="object"&&z!==null&&z.$$typeof===O&&(z._payload.status==="fulfilled"?x(z._payload.value)&&z._payload.value._store&&(z._payload.value._store.validated=1):z._store&&(z._store.validated=1))}function x(z){return typeof z=="object"&&z!==null&&z.$$typeof===g}var c=Y,g=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),N=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),re=Symbol.for("react.client.reference"),j=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=Object.prototype.hasOwnProperty,s=Array.isArray,U=console.createTask?console.createTask:function(){return null};c={react_stack_bottom_frame:function(z){return z()}};var te,Z={},W=c.react_stack_bottom_frame.bind(c,i)(),J=U(m(i)),X={};We.Fragment=b,We.jsx=function(z,S,q){var K=1e4>j.recentlyCreatedOwnerStacks++;return f(z,S,q,!1,K?Error("react-stack-top-frame"):W,K?U(m(z)):J)},We.jsxs=function(z,S,q){var K=1e4>j.recentlyCreatedOwnerStacks++;return f(z,S,q,!0,K?Error("react-stack-top-frame"):W,K?U(m(z)):J)}})()),We}var Xt;function Sn(){return Xt||(Xt=1,process.env.NODE_ENV==="production"?et.exports=En():et.exports=Nn()),et.exports}var a=Sn();const Qt=Y.createContext(void 0),er=({config:e,children:_})=>a.jsx(Qt.Provider,{value:{registry:e.registry,schemas:e.schemas,tenantId:e.tenantId,assets:e.assets},children:_});function $e(){const e=Y.useContext(Qt);if(e===void 0)throw new Error("useConfig must be used within ConfigProvider");return e}const tr=Y.createContext(void 0),tt=({mode:e,children:_})=>(Y.useEffect(()=>{if(e!=="studio")return;const r=new MutationObserver(m=>{m.forEach(u=>{u.addedNodes.forEach(i=>{i instanceof HTMLElement&&i.hasAttribute("data-radix-portal")&&i.setAttribute("data-jp-studio-portal","true")})})});return r.observe(document.body,{childList:!0}),()=>r.disconnect()},[e]),a.jsx(tr.Provider,{value:{mode:e},children:_})),rr=()=>{const e=Y.useContext(tr);if(e===void 0)throw new Error("useStudio must be used within a StudioProvider");return e};/**
33
+ <%s key={someKey} {...props} />`,G,ie,le,ie),X[ie+G]=!0)}if(ie=null,J!==void 0&&(r(J),ie=""+J),o(N)&&(r(N.key),ie=""+N.key),"key"in N){J={};for(var ce in N)ce!=="key"&&(J[ce]=N[ce])}else J=N;return ie&&n(J,typeof z=="function"?z.displayName||z.name||"Unknown":z),h(z,ie,J,u(),Q,ue)}function x(z){v(z)?z._store&&(z._store.validated=1):typeof z=="object"&&z!==null&&z.$$typeof===T&&(z._payload.status==="fulfilled"?v(z._payload.value)&&z._payload.value._store&&(z._payload.value._store.validated=1):z._store&&(z._store.validated=1))}function v(z){return typeof z=="object"&&z!==null&&z.$$typeof===b}var c=q,b=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),S=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),re=Symbol.for("react.client.reference"),j=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=Object.prototype.hasOwnProperty,a=Array.isArray,M=console.createTask?console.createTask:function(){return null};c={react_stack_bottom_frame:function(z){return z()}};var te,U={},W=c.react_stack_bottom_frame.bind(c,i)(),K=M(m(i)),X={};$e.Fragment=g,$e.jsx=function(z,N,J){var G=1e4>j.recentlyCreatedOwnerStacks++;return f(z,N,J,!1,G?Error("react-stack-top-frame"):W,G?M(m(z)):K)},$e.jsxs=function(z,N,J){var G=1e4>j.recentlyCreatedOwnerStacks++;return f(z,N,J,!0,G?Error("react-stack-top-frame"):W,G?M(m(z)):K)}})()),$e}var Yt;function Sn(){return Yt||(Yt=1,process.env.NODE_ENV==="production"?et.exports=jn():et.exports=En()),et.exports}var s=Sn();const Xt=q.createContext(void 0),Qt=({config:e,children:_})=>s.jsx(Xt.Provider,{value:{registry:e.registry,schemas:e.schemas,tenantId:e.tenantId,assets:e.assets},children:_});function Ze(){const e=q.useContext(Xt);if(e===void 0)throw new Error("useConfig must be used within ConfigProvider");return e}const er=q.createContext(void 0),tt=({mode:e,children:_})=>(q.useEffect(()=>{if(e!=="studio")return;const r=new MutationObserver(m=>{m.forEach(u=>{u.addedNodes.forEach(i=>{i instanceof HTMLElement&&i.hasAttribute("data-radix-portal")&&i.setAttribute("data-jp-studio-portal","true")})})});return r.observe(document.body,{childList:!0}),()=>r.disconnect()},[e]),s.jsx(er.Provider,{value:{mode:e},children:_})),tr=()=>{const e=q.useContext(er);if(e===void 0)throw new Error("useStudio must be used within a StudioProvider");return e};/**
34
34
  * @license lucide-react v0.474.0 - ISC
35
35
  *
36
36
  * This source code is licensed under the ISC license.
37
37
  * See the LICENSE file in the root directory of this source tree.
38
- */const Cn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nr=(...e)=>e.filter((_,r,m)=>!!_&&_.trim()!==""&&m.indexOf(_)===r).join(" ").trim();/**
38
+ */const Nn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rr=(...e)=>e.filter((_,r,m)=>!!_&&_.trim()!==""&&m.indexOf(_)===r).join(" ").trim();/**
39
39
  * @license lucide-react v0.474.0 - ISC
40
40
  *
41
41
  * This source code is licensed under the ISC license.
42
42
  * See the LICENSE file in the root directory of this source tree.
43
- */var An={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
43
+ */var Cn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
44
44
  * @license lucide-react v0.474.0 - ISC
45
45
  *
46
46
  * This source code is licensed under the ISC license.
47
47
  * See the LICENSE file in the root directory of this source tree.
48
- */const In=Y.forwardRef(({color:e="currentColor",size:_=24,strokeWidth:r=2,absoluteStrokeWidth:m,className:u="",children:i,iconNode:o,...n},l)=>Y.createElement("svg",{ref:l,...An,width:_,height:_,stroke:e,strokeWidth:m?Number(r)*24/Number(_):r,className:nr("lucide",u),...n},[...o.map(([h,f])=>Y.createElement(h,f)),...Array.isArray(i)?i:[i]]));/**
48
+ */const An=q.forwardRef(({color:e="currentColor",size:_=24,strokeWidth:r=2,absoluteStrokeWidth:m,className:u="",children:i,iconNode:o,...n},l)=>q.createElement("svg",{ref:l,...Cn,width:_,height:_,stroke:e,strokeWidth:m?Number(r)*24/Number(_):r,className:rr("lucide",u),...n},[...o.map(([h,f])=>q.createElement(h,f)),...Array.isArray(i)?i:[i]]));/**
49
49
  * @license lucide-react v0.474.0 - ISC
50
50
  *
51
51
  * This source code is licensed under the ISC license.
52
52
  * See the LICENSE file in the root directory of this source tree.
53
- */const be=(e,_)=>{const r=Y.forwardRef(({className:m,...u},i)=>Y.createElement(In,{ref:i,iconNode:_,className:nr(`lucide-${Cn(e)}`,m),...u}));return r.displayName=`${e}`,r};/**
53
+ */const be=(e,_)=>{const r=q.forwardRef(({className:m,...u},i)=>q.createElement(An,{ref:i,iconNode:_,className:rr(`lucide-${Nn(e)}`,m),...u}));return r.displayName=`${e}`,r};/**
54
54
  * @license lucide-react v0.474.0 - ISC
55
55
  *
56
56
  * This source code is licensed under the ISC license.
57
57
  * See the LICENSE file in the root directory of this source tree.
58
- */const Tn=be("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
58
+ */const In=be("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
59
59
  * @license lucide-react v0.474.0 - ISC
60
60
  *
61
61
  * This source code is licensed under the ISC license.
62
62
  * See the LICENSE file in the root directory of this source tree.
63
- */const On=be("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
63
+ */const Tn=be("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
64
64
  * @license lucide-react v0.474.0 - ISC
65
65
  *
66
66
  * This source code is licensed under the ISC license.
67
67
  * See the LICENSE file in the root directory of this source tree.
68
- */const Dn=be("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
68
+ */const On=be("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
69
69
  * @license lucide-react v0.474.0 - ISC
70
70
  *
71
71
  * This source code is licensed under the ISC license.
72
72
  * See the LICENSE file in the root directory of this source tree.
73
- */const Ln=be("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
73
+ */const Dn=be("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
74
74
  * @license lucide-react v0.474.0 - ISC
75
75
  *
76
76
  * This source code is licensed under the ISC license.
77
77
  * See the LICENSE file in the root directory of this source tree.
78
- */const or=be("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
78
+ */const nr=be("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
79
79
  * @license lucide-react v0.474.0 - ISC
80
80
  *
81
81
  * This source code is licensed under the ISC license.
@@ -85,7 +85,7 @@ React keys must be passed directly to JSX without using spread:
85
85
  *
86
86
  * This source code is licensed under the ISC license.
87
87
  * See the LICENSE file in the root directory of this source tree.
88
- */const Pn=be("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
88
+ */const Ln=be("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
89
89
  * @license lucide-react v0.474.0 - ISC
90
90
  *
91
91
  * This source code is licensed under the ISC license.
@@ -95,17 +95,17 @@ React keys must be passed directly to JSX without using spread:
95
95
  *
96
96
  * This source code is licensed under the ISC license.
97
97
  * See the LICENSE file in the root directory of this source tree.
98
- */const Fn=be("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
98
+ */const Pn=be("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
99
99
  * @license lucide-react v0.474.0 - ISC
100
100
  *
101
101
  * This source code is licensed under the ISC license.
102
102
  * See the LICENSE file in the root directory of this source tree.
103
- */const ir=be("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
103
+ */const or=be("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
104
104
  * @license lucide-react v0.474.0 - ISC
105
105
  *
106
106
  * This source code is licensed under the ISC license.
107
107
  * See the LICENSE file in the root directory of this source tree.
108
- */const ar=be("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
108
+ */const Fn=be("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
109
109
  * @license lucide-react v0.474.0 - ISC
110
110
  *
111
111
  * This source code is licensed under the ISC license.
@@ -130,7 +130,7 @@ React keys must be passed directly to JSX without using spread:
130
130
  *
131
131
  * This source code is licensed under the ISC license.
132
132
  * See the LICENSE file in the root directory of this source tree.
133
- */const sr=be("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
133
+ */const ir=be("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
134
134
  * @license lucide-react v0.474.0 - ISC
135
135
  *
136
136
  * This source code is licensed under the ISC license.
@@ -145,32 +145,37 @@ React keys must be passed directly to JSX without using spread:
145
145
  *
146
146
  * This source code is licensed under the ISC license.
147
147
  * See the LICENSE file in the root directory of this source tree.
148
- */const lr=be("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
148
+ */const ar=be("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
149
149
  * @license lucide-react v0.474.0 - ISC
150
150
  *
151
151
  * This source code is licensed under the ISC license.
152
152
  * See the LICENSE file in the root directory of this source tree.
153
- */const Un=be("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
153
+ */const Un=be("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
154
154
  * @license lucide-react v0.474.0 - ISC
155
155
  *
156
156
  * This source code is licensed under the ISC license.
157
157
  * See the LICENSE file in the root directory of this source tree.
158
- */const cr=be("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
158
+ */const Wn=be("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
159
159
  * @license lucide-react v0.474.0 - ISC
160
160
  *
161
161
  * This source code is licensed under the ISC license.
162
162
  * See the LICENSE file in the root directory of this source tree.
163
- */const Wn=be("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
163
+ */const sr=be("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
164
164
  * @license lucide-react v0.474.0 - ISC
165
165
  *
166
166
  * This source code is licensed under the ISC license.
167
167
  * See the LICENSE file in the root directory of this source tree.
168
- */const $n=be("SquarePlus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
168
+ */const $n=be("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
169
169
  * @license lucide-react v0.474.0 - ISC
170
170
  *
171
171
  * This source code is licensed under the ISC license.
172
172
  * See the LICENSE file in the root directory of this source tree.
173
- */const Zn=be("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
173
+ */const Zn=be("SquarePlus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
174
+ * @license lucide-react v0.474.0 - ISC
175
+ *
176
+ * This source code is licensed under the ISC license.
177
+ * See the LICENSE file in the root directory of this source tree.
178
+ */const Hn=be("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
174
179
  * @license lucide-react v0.474.0 - ISC
175
180
  *
176
181
  * This source code is licensed under the ISC license.
@@ -180,19 +185,19 @@ React keys must be passed directly to JSX without using spread:
180
185
  *
181
186
  * This source code is licensed under the ISC license.
182
187
  * See the LICENSE file in the root directory of this source tree.
183
- */const Hn=be("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
188
+ */const Gn=be("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
184
189
  * @license lucide-react v0.474.0 - ISC
185
190
  *
186
191
  * This source code is licensed under the ISC license.
187
192
  * See the LICENSE file in the root directory of this source tree.
188
- */const vt=be("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
193
+ */const lr=be("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
189
194
  * @license lucide-react v0.474.0 - ISC
190
195
  *
191
196
  * This source code is licensed under the ISC license.
192
197
  * See the LICENSE file in the root directory of this source tree.
193
- */const Re=be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
198
+ */const Me=be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
194
199
  * @license lucide-react v0.474.0 - ISC
195
200
  *
196
201
  * This source code is licensed under the ISC license.
197
202
  * See the LICENSE file in the root directory of this source tree.
198
- */const Gn=be("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);class Vn extends Y.Component{constructor(_){super(_),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(_,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,_,r)}render(){return this.state.hasError?a.jsxs("div",{className:"p-8 m-4 bg-amber-500/5 border-2 border-dashed border-amber-500/20 rounded-xl flex flex-col items-center text-center gap-3",children:[a.jsx(Hn,{className:"text-amber-500",size:32}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),a.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),a.jsx("p",{className:"text-xs text-zinc-400 max-w-[280px] leading-relaxed",children:"This section failed to render. Check the console for details or verify the JSON data structure."})]}):this.props.children}}const Kn=({type:e,scope:_,isSelected:r,sectionId:m,sectionIndex:u=0,totalSections:i=0,onReorder:o})=>{const n=typeof u=="number"&&u>0&&o,l=typeof u=="number"&&u<i-1&&o;return a.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:ue("absolute inset-0 pointer-events-none transition-all duration-200 z-[50]","border-2 border-transparent group-hover:border-blue-400/50 group-hover:border-dashed",r&&"border-2 border-blue-600 border-solid bg-blue-500/5"),children:a.jsxs("div",{className:ue("absolute top-0 right-0 flex flex-nowrap items-center gap-1 pl-1 pr-2 py-1 text-[9px] font-black uppercase tracking-widest transition-opacity pointer-events-auto","bg-blue-600 text-white",r||"group-hover:opacity-100 opacity-0"),children:[o&&m!=null&&a.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[a.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),n&&o(m,u-1)},disabled:!n,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section up","aria-label":"Move section up",children:a.jsx(mt,{size:12,strokeWidth:2.5})}),a.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),l&&o(m,u+2)},disabled:!l,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section down","aria-label":"Move section down",children:a.jsx(ft,{size:12,strokeWidth:2.5})})]}),a.jsx("span",{className:"shrink-0",children:e}),a.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),a.jsx("span",{className:"shrink-0",children:_})]})})},Ze=({section:e,menu:_,selectedId:r,reorderable:m,sectionIndex:u,totalSections:i,onReorder:o})=>{var p,k;const{mode:n}=rr(),{registry:l}=$e(),h=n==="studio",f=h&&r===e.id,v=l[e.type],x=e.type==="header"||e.type==="footer"?"global":"local",c=e.type==="header"&&((p=e.settings)==null?void 0:p.sticky);if(!v)return a.jsxs("div",{className:"p-6 m-4 bg-red-500/10 text-red-400 border border-red-500/20 rounded-lg text-sm font-mono",children:[a.jsx("strong",{children:"Missing Component:"})," ",e.type]});const g=E=>{var re,j,R,s,U;if(!h)return;E.preventDefault(),E.stopPropagation();const N=E.currentTarget,C=E.clientX,T=E.clientY;if(E.target===N){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}const L=document.elementFromPoint(C,T)??E.target;if(!L||!N.contains(L)){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}if(L===N){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}const D=[];let O=L;for(;O&&O!==N;){const te=(re=O.getAttribute)==null?void 0:re.call(O,"data-jp-item-id"),Z=(j=O.getAttribute)==null?void 0:j.call(O,"data-jp-item-field");te&&Z&&D.push({fieldKey:Z||"items",itemId:te}),O=O.parentElement}if(D.reverse(),D.length===0)for(O=L;O&&O!==N;){const te=(R=O.getAttribute)==null?void 0:R.call(O,"data-jp-field");if(te){D.push({fieldKey:te});break}O=O.parentElement}if(D.length===0&&L){let te=null;const Z=W=>{var X,z;const J=W.getBoundingClientRect();if(J.left<=C&&C<=J.right&&J.top<=T&&T<=J.bottom){for(let S=0;S<W.children.length;S++)Z(W.children[S]);((X=W.getAttribute)!=null&&X.call(W,"data-jp-item-id")||(z=W.getAttribute)!=null&&z.call(W,"data-jp-field"))&&(te=W)}};if(Z(L),te){const W=te,J=(s=W.getAttribute)==null?void 0:s.call(W,"data-jp-item-id"),X=(U=W.getAttribute)==null?void 0:U.call(W,"data-jp-field");J&&X?D.push({fieldKey:X||"items",itemId:J}):X&&D.push({fieldKey:X})}}const B={type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}};if(D.length>0){B.itemPath=D;const te=D[0];te.itemId!=null?(B.itemField=te.fieldKey,B.itemId=te.itemId):B.itemField=te.fieldKey}window.parent.postMessage(B,"*")},d=()=>{const E=v;return e.type==="header"&&_?a.jsx(E,{data:e.data,settings:e.settings,menu:_}):a.jsx(E,{data:e.data,settings:e.settings})},b=(k=e.data)==null?void 0:k.anchorId;return a.jsxs("div",{id:b||void 0,"data-section-id":h?e.id:void 0,"data-section-type":h?e.type:void 0,"data-section-scope":h?x:void 0,...h&&f?{"data-jp-selected":!0}:{},onClickCapture:h?g:void 0,className:ue("relative w-full",h&&"group cursor-pointer",h&&c?"sticky top-0 z-[60]":"relative z-0",f&&"z-[70]"),children:[a.jsx("div",{className:"relative z-0",children:a.jsx(Vn,{type:e.type,children:d()})}),h&&a.jsx(Kn,{type:e.type,scope:x,isSelected:!!f,sectionId:m&&x==="local"?e.id:void 0,sectionIndex:m&&x==="local"?u:void 0,totalSections:m&&x==="local"?i:void 0,onReorder:m&&x==="local"?o:void 0})]})},Jn=e=>{Y.useEffect(()=>{document.title=e.title;let _=document.querySelector('meta[name="description"]');_||(_=document.createElement("meta"),_.setAttribute("name","description"),document.head.appendChild(_)),_.setAttribute("content",e.description)},[e.title,e.description])},qn="application/json",xt=({pageConfig:e,siteConfig:_,menuConfig:r,selectedId:m,onReorder:u,scrollToSectionId:i,onActiveSectionChange:o})=>{var b,p;Jn(e.meta);const[n,l]=Y.useState(null),h=Y.useRef({}),f=Y.useRef(o);f.current=o;const v=k=>{var E;(E=f.current)==null||E.call(f,k)};Y.useEffect(()=>{if(!i)return;const k=h.current[i];k&&k.scrollIntoView({behavior:"smooth",block:"center"})},[i]),Y.useEffect(()=>{if(!f.current)return;const E=[..._.header?[_.header.id]:[],...e.sections.map(L=>L.id),..._.footer?[_.footer.id]:[]],N=new IntersectionObserver(L=>{L.forEach(D=>{var O;if(D.isIntersecting&&D.intersectionRatio>.5){const B=D.target.getAttribute("data-section-id");B&&((O=f.current)==null||O.call(f,B))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let C=!1;const T=requestAnimationFrame(()=>{C||E.forEach(L=>{const D=h.current[L];D&&N.observe(D)})});return()=>{C=!0,cancelAnimationFrame(T),N.disconnect()}},[e.sections,(b=_.header)==null?void 0:b.id,(p=_.footer)==null?void 0:p.id]);const x=(k,E)=>{k.preventDefault(),k.dataTransfer.dropEffect="move",l(E)},c=()=>{l(null)},g=(k,E)=>{if(k.preventDefault(),l(null),!!u)try{const N=k.dataTransfer.getData(qn),{sectionId:C}=JSON.parse(N);typeof C=="string"&&u(C,E)}catch{}},d=()=>{const k=typeof u=="function",E=e.sections.map((N,C)=>{const T=n===C;return k?a.jsxs("div",{ref:L=>{h.current[N.id]=L},"data-section-id":N.id,style:{position:"relative"},onMouseEnter:()=>v(N.id),children:[a.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:55,pointerEvents:"auto",backgroundColor:T?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:T?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:L=>x(L,C),onDragLeave:c,onDrop:L=>g(L,C)}),a.jsx(Ze,{section:N,selectedId:m,reorderable:!0,sectionIndex:C,totalSections:e.sections.length,onReorder:u})]},N.id):a.jsx("div",{ref:L=>{h.current[N.id]=L},"data-section-id":N.id,onMouseEnter:()=>v(N.id),children:a.jsx(Ze,{section:N,selectedId:m})},N.id)});if(k&&E.length>0){const N=e.sections.length,C=n===N;E.push(a.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:C?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:C?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:T=>x(T,N),onDragLeave:c,onDrop:T=>g(T,N)},"jp-drop-after-last"))}return E};return a.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[_.header!=null&&a.jsx("div",{ref:k=>{h.current[_.header.id]=k},"data-section-id":_.header.id,onMouseEnter:()=>v(_.header.id),children:a.jsx(Ze,{section:_.header,menu:r.main,selectedId:m})}),a.jsx("main",{className:"flex-1",children:d()}),_.footer!=null&&a.jsx("div",{ref:k=>{h.current[_.footer.id]=k},"data-section-id":_.footer.id,onMouseEnter:()=>v(_.footer.id),children:a.jsx(Ze,{section:_.footer,selectedId:m})})]})},ot=({mode:e,tenantCss:_,adminCss:r,children:m})=>(Y.useLayoutEffect(()=>{const u=`jp-theme-${e}`,i=e==="tenant"?_:r;if(!document.getElementById(u)&&i){const o=document.createElement("style");o.id=u,o.innerHTML=i,document.head.appendChild(o)}return()=>{const o=document.getElementById(u);o&&o.remove()}},[e,_,r]),a.jsx(a.Fragment,{children:m}));function wt({className:e,type:_,...r}){return a.jsx("input",{type:_,className:ue("h-8 rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-1 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600",e),...r})}function Yn({className:e,..._}){return a.jsx("textarea",{className:ue("min-h-16 w-full rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-2 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600 resize-none",e),..._})}function Xn({className:e,checked:_,onCheckedChange:r,...m}){return a.jsx("input",{type:"checkbox",checked:_,onChange:u=>r==null?void 0:r(u.target.checked),className:ue("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...m})}function Oe({className:e,..._}){return a.jsx("label",{className:ue("text-sm font-medium leading-none select-none",e),..._})}const dr=me.createContext(null);function Qn(){const e=me.useContext(dr);if(!e)throw new Error("Select components must be used within Select");return e}function eo({value:e,onValueChange:_,children:r}){const m=e??"",u=me.Children.toArray(r).find(v=>me.isValidElement(v)&&v.type===_t),i=me.Children.toArray(r).find(v=>me.isValidElement(v)&&v.type===yt),o=u&&me.isValidElement(u)?u.props.children:void 0,n=i&&me.isValidElement(i)?i.props.children:void 0,l=me.useMemo(()=>!u||!me.isValidElement(u)?[]:me.Children.toArray(u.props.children).filter(v=>me.isValidElement(v)&&v.props.value!==void 0).map(v=>({value:v.props.value,label:v.props.children??v.props.value})),[u,o]),h=me.useMemo(()=>{if(!i||!me.isValidElement(i))return"";const v=me.Children.toArray(i.props.children).find(x=>me.isValidElement(x)&&x.type===kt);return v&&me.isValidElement(v)?v.props.placeholder??"":""},[i,n]),f=me.useMemo(()=>({value:m,onValueChange:v=>_==null?void 0:_(v),options:l,placeholder:h}),[m,_,l,h]);return a.jsx(dr.Provider,{value:f,children:i})}function yt({className:e,children:_,...r}){const{value:m,onValueChange:u,options:i,placeholder:o}=Qn();return a.jsxs("div",{className:ue("relative",e),...r,children:[a.jsxs("select",{value:m,onChange:n=>u(n.target.value),className:"w-full h-7 rounded border border-zinc-800 bg-zinc-900/50 text-[11px] text-left px-2 pr-6 appearance-none bg-no-repeat bg-[length:12px] bg-[right_0.25rem_center] focus:ring-2 focus:ring-blue-600 focus:outline-none",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23717171' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")`},children:[o?a.jsx("option",{value:"",children:o}):null,i.map(n=>a.jsx("option",{value:n.value,children:String(n.label)},n.value))]}),_]})}function kt(e){return null}function _t({className:e,children:_}){return a.jsx("div",{className:ue("hidden",e),"aria-hidden":!0,children:_})}function ur({className:e,value:_,children:r}){return a.jsx("div",{"data-value":_,className:e,"aria-hidden":!0,children:r})}yt.displayName="SelectTrigger",kt.displayName="SelectValue",_t.displayName="SelectContent",ur.displayName="SelectItem";const hr=me.createContext(null);function pr(){const e=me.useContext(hr);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function fr({open:e,onOpenChange:_,children:r}){const[m,u]=me.useState(!1),i=e!==void 0,o=i?e:m,n=me.useCallback(h=>{i||u(h),_==null||_(h)},[i,_]),l=me.useMemo(()=>({open:o,onOpenChange:n}),[o,n]);return a.jsx(hr.Provider,{value:l,children:r})}function to({asChild:e,children:_}){const{onOpenChange:r}=pr(),m=me.Children.only(_);return e&&me.isValidElement(m)?me.cloneElement(m,{onClick:u=>{var i,o;(o=(i=m.props).onClick)==null||o.call(i,u),r(!0)}}):a.jsx("button",{type:"button",onClick:()=>r(!0),children:_})}function mr({className:e,children:_,preventCloseOnBackdropClick:r,...m}){const{open:u,onOpenChange:i}=pr();if(me.useEffect(()=>{const n=l=>{l.key==="Escape"&&i(!1)};return u&&(document.addEventListener("keydown",n),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",n),document.body.style.overflow=""}},[u,i]),!u)return null;const o=n=>{n.preventDefault(),n.stopPropagation()};return Cr.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:o,onDrop:o}),a.jsx("div",{role:"dialog","aria-modal":!0,className:ue("fixed left-1/2 top-1/2 z-[9999] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-zinc-700 bg-zinc-900 p-4 shadow-xl",e),onClick:n=>n.stopPropagation(),...m,children:_})]}),document.body)}function br({className:e,..._}){return a.jsx("div",{className:ue("flex flex-col gap-1.5 pb-4",e),..._})}function ro({className:e,..._}){return a.jsx("div",{className:ue("flex justify-end gap-2 pt-4",e),..._})}function gr({className:e,..._}){return a.jsx("h2",{className:ue("text-sm font-semibold text-white",e),..._})}function vr({className:e,..._}){return a.jsx("p",{className:ue("text-xs text-zinc-400",e),..._})}const De=me.forwardRef(({className:e,variant:_="default",size:r="default",asChild:m,children:u,...i},o)=>{const n="inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 disabled:pointer-events-none disabled:opacity-50",l={default:"bg-blue-600 text-white hover:bg-blue-700",outline:"border border-zinc-700 bg-transparent hover:bg-zinc-800",ghost:"hover:bg-zinc-800"},h={sm:"h-7 px-2.5 text-xs",default:"h-9 px-4 text-sm",lg:"h-10 px-6 text-base"};if(m&&me.isValidElement(u)){const f=u,v=ue(n,l[_],h[r],f.props.className,e);return me.cloneElement(f,{className:v})}return a.jsx("button",{ref:o,type:"button",className:ue(n,l[_],h[r],e),...i,children:u})});De.displayName="Button";const no=["library","upload","url"];function oo({library:e,selectedId:_,onSelect:r}){const[m,u]=Y.useState(""),[i,o]=Y.useState("all"),n=["all",...new Set(e.flatMap(h=>h.tags??[]))],l=e.filter(h=>{const f=i==="all"||(h.tags??[]).includes(i),v=!m||(h.alt??"").toLowerCase().includes(m.toLowerCase());return f&&v});return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"relative",children:[a.jsx(Un,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),a.jsx(wt,{value:m,onChange:h=>u(h.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(h=>a.jsx("button",{type:"button",onClick:()=>o(h),className:ue("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===h?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-700 text-zinc-500 hover:border-zinc-600 hover:text-zinc-400"),children:h==="all"?"Tutte":h},h))}),l.length>0?a.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(h=>{const f=_===h.id;return a.jsxs("button",{type:"button",onClick:()=>r(f?null:h.id),className:ue("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",f?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[a.jsx("img",{src:h.url,alt:h.alt,loading:"lazy",className:ue("w-full h-full object-cover transition-[filter] duration-150",f?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),a.jsx("div",{className:ue("absolute inset-x-0 bottom-0 px-2 py-1.5","bg-gradient-to-t from-black/70 to-transparent","opacity-0 group-hover:opacity-100 transition-opacity",f&&"opacity-100"),children:a.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:h.alt})}),f&&a.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:a.jsx(or,{size:14,className:"text-white"})})]},h.id)})}):a.jsx("div",{className:"text-center py-12 text-zinc-600 text-xs",children:"Nessuna immagine in libreria. Configura assets.assetsManifest nel tenant (es. da public/assets)."})]})}function io({preview:e,onPreviewChange:_,onAssetUpload:r}){const[m,u]=Y.useState(!1),i=Y.useRef(null),o=Y.useCallback(async f=>{if(fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"handleFile called",data:{fileName:f.name,hasOnAssetUpload:!!r},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!f.type.startsWith("image/"))return;if(r){try{const x=await r(f);fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"onAssetUpload resolved",data:{url:x==null?void 0:x.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),_({name:f.name,size:f.size,dataUrl:x})}catch{const x=new FileReader;x.onload=c=>{var g;_({name:f.name,size:f.size,dataUrl:(g=c.target)==null?void 0:g.result})},x.readAsDataURL(f)}return}const v=new FileReader;v.onload=x=>{var c;_({name:f.name,size:f.size,dataUrl:(c=x.target)==null?void 0:c.result})},v.readAsDataURL(f)},[_,r]),n=Y.useCallback(f=>{var x,c;f.preventDefault(),f.stopPropagation(),u(!1);const v=(c=(x=f.dataTransfer)==null?void 0:x.files)==null?void 0:c[0];v&&o(v)},[o]),l=Y.useCallback(f=>{f.preventDefault(),f.stopPropagation(),u(!0)},[]),h=Y.useCallback(f=>{var x;const v=(x=f.target.files)==null?void 0:x[0];v&&o(v)},[o]);return a.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:f=>{f.preventDefault(),f.stopPropagation(),u(!1)},onDrop:n,onClick:()=>{var f;return!e&&((f=i.current)==null?void 0:f.click())},className:ue("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",m?"border-blue-500/50 bg-blue-500/[0.04]":e?"border-zinc-800 bg-transparent cursor-default":"border-zinc-800 bg-white/[0.01] hover:border-zinc-600 hover:bg-white/[0.02]"),children:[e?a.jsxs(a.Fragment,{children:[a.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),a.jsxs("div",{className:"absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/80 to-transparent p-4 flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),a.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),a.jsx(De,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:f=>{f.stopPropagation(),_(null)},children:a.jsx(nt,{size:14})})]})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:a.jsx(vt,{size:22})}),a.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),a.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),a.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),a.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:h})]})}function ao({urlPreview:e,onUrlPreviewChange:_}){const[r,m]=Y.useState(""),[u,i]=Y.useState(!1),o=()=>{if(r.trim())try{new URL(r),_(r),i(!1)}catch{i(!0),_(null)}};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(Oe,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(wt,{value:r,onChange:n=>{m(n.target.value),i(!1)},onKeyDown:n=>n.key==="Enter"&&o(),placeholder:"https://images.unsplash.com/photo-...",className:ue("h-8 text-xs bg-zinc-900/50 border-zinc-800",u&&"border-red-500/50")}),a.jsx(De,{type:"button",variant:"outline",onClick:o,className:"shrink-0 h-8",children:"Anteprima"})]}),u&&a.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?a.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[a.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),_(null)}}),a.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[a.jsx(or,{size:14,className:"text-emerald-400"}),a.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):u?null:a.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[a.jsx(sr,{size:32,className:"mb-3 opacity-40"}),a.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const so=({open:e,onOpenChange:_,onSelect:r})=>{const{assets:m}=$e(),u=(m==null?void 0:m.assetsManifest)??[],[i,o]=Y.useState("library"),[n,l]=Y.useState(null),[h,f]=Y.useState(null),[v,x]=Y.useState(null);Y.useEffect(()=>{e&&(o("library"),l(null),f(null),x(null))},[e]),Y.useEffect(()=>{if(!e||i!=="upload")return;const p=()=>{fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:beforeunload",message:"beforeunload fired",data:{},timestamp:Date.now(),hypothesisId:"H1"})}).catch(()=>{})};return window.addEventListener("beforeunload",p),()=>window.removeEventListener("beforeunload",p)},[e,i]),Y.useEffect(()=>{if(!e||i!=="upload")return;const p=E=>{E.preventDefault()},k={capture:!0};return document.addEventListener("dragover",p,k),document.addEventListener("drop",p,k),window.addEventListener("dragover",p,k),window.addEventListener("drop",p,k),()=>{document.removeEventListener("dragover",p,k),document.removeEventListener("drop",p,k),window.removeEventListener("dragover",p,k),window.removeEventListener("drop",p,k)}},[e,i]);const c=i==="library"&&n!=null||i==="upload"&&h!=null||i==="url"&&v!=null,g=()=>{if(i==="library"&&n){const p=u.find(k=>k.id===n);p&&r({url:p.url,alt:p.alt})}else i==="upload"&&h?r({url:h.dataUrl,alt:h.name}):i==="url"&&v&&r({url:v,alt:""});setTimeout(()=>_(!1),0)},d=i==="library"&&n?"1 immagine selezionata":i==="upload"&&h?h.name:i==="url"&&v?"URL pronto":"Nessuna selezione",b=p=>{p.preventDefault(),p.stopPropagation()};return a.jsx(fr,{open:e,onOpenChange:_,children:a.jsxs(mr,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:b,onDrop:b,children:[a.jsxs(br,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:a.jsx(rt,{size:18})}),a.jsxs("div",{children:[a.jsx(gr,{children:"Image Picker"}),a.jsx(vr,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),a.jsx("button",{type:"button",onClick:()=>_(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:a.jsx(Re,{size:18})})]}),a.jsx("div",{className:"flex border-b border-zinc-800",children:no.map(p=>a.jsxs("button",{type:"button",onClick:()=>o(p),className:ue("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===p?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[p==="library"&&a.jsx(rt,{size:14}),p==="upload"&&a.jsx(vt,{size:14}),p==="url"&&a.jsx(sr,{size:14}),p==="library"?"Libreria":p==="upload"?"Upload":"URL"]},p))}),a.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&a.jsx(oo,{library:u,selectedId:n,onSelect:l}),i==="upload"&&a.jsx(io,{preview:h,onPreviewChange:f,onAssetUpload:m==null?void 0:m.onAssetUpload}),i==="url"&&a.jsx(ao,{urlPreview:v,onUrlPreviewChange:x})]}),a.jsxs(ro,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[a.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:d}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(De,{type:"button",variant:"outline",size:"sm",onClick:()=>_(!1),children:"Annulla"}),a.jsx(De,{type:"button",size:"sm",disabled:!c,onClick:g,className:ue(!c&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},xr=(e,_="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("assets/"))return`/${e}`;if(e.startsWith("/uploaded-assets/"))return e;if(!/\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i.test(e))return e.startsWith("/")?e:`/${e}`;const m=e.replace(/^\//,"");return`/assets/${_}/${m}`},lo=({value:e,onChange:_,label:r="IMAGE",className:m})=>{const{tenantId:u="default"}=$e(),[i,o]=Y.useState(!1),[n,l]=Y.useState(!1),h=!!(e!=null&&e.url),f=e!=null&&e.url?xr(e.url,u):"",v=c=>{_(c),o(!1)},x=c=>{c.stopPropagation(),_({url:"",alt:""})};return a.jsxs("div",{className:ue("space-y-1.5",m),children:[a.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),h?a.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(!0),onKeyDown:c=>c.key==="Enter"&&o(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:ue("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",n&&"ring-blue-500/40"),children:[a.jsx("img",{src:f,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:c=>{c.target.style.display="none"}}),a.jsx("div",{className:ue("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",n?"bg-black/50":"bg-black/0"),children:n&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center gap-1.5 bg-white/15 backdrop-blur-md rounded-lg px-3.5 py-2 text-white text-xs font-medium",children:[a.jsx(Bn,{size:13}),a.jsx("span",{children:"Cambia"})]}),a.jsx(De,{type:"button",variant:"ghost",className:"h-8 w-8 p-0 bg-red-500/15 backdrop-blur-md text-red-300 hover:text-red-200 hover:bg-red-500/25",onClick:x,children:a.jsx(nt,{size:13})})]})}),a.jsx("div",{className:"px-2.5 py-1.5 bg-black/50 text-[10px] text-zinc-500 truncate",children:((e==null?void 0:e.url)??"").length>50?"…"+((e==null?void 0:e.url)??"").slice(-47):(e==null?void 0:e.url)??""})]}):a.jsxs("button",{type:"button",onClick:()=>o(!0),className:ue("w-full rounded-lg border-2 border-dashed border-zinc-800 py-7","flex flex-col items-center gap-2","bg-white/[0.01] transition-all","hover:border-blue-500/30 hover:bg-blue-500/[0.03]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),children:[a.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:a.jsx(rt,{size:18})}),a.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),a.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),a.jsx(so,{open:i,onOpenChange:o,onSelect:v})]})},wr=[{name:"layers",Icon:gt},{name:"github",Icon:Rn},{name:"arrow-right",Icon:On},{name:"box",Icon:Ln},{name:"terminal",Icon:Zn},{name:"chevron-right",Icon:Pn},{name:"menu",Icon:Mn},{name:"x",Icon:Re},{name:"sparkles",Icon:Wn},{name:"zap",Icon:Gn}],He={"ui:text":({label:e,value:_,onChange:r})=>a.jsxs("div",{className:"grid w-full items-center gap-1.5 mb-4",children:[a.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),a.jsx(wt,{type:"text",className:"h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600",value:_||"",onChange:m=>r(m.target.value)})]}),"ui:textarea":({label:e,value:_,onChange:r})=>a.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[a.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),a.jsx(Yn,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:_||"",onChange:m=>r(m.target.value)})]}),"ui:select":({label:e,value:_,onChange:r,options:m=[]})=>a.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[a.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),a.jsxs(eo,{value:_||"",onValueChange:r,children:[a.jsx(yt,{className:"w-full h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus:ring-blue-600",children:a.jsx(kt,{placeholder:"Select..."})}),a.jsx(_t,{className:"dark",children:m.map(u=>a.jsx(ur,{value:u,className:"text-[11px]",children:u},u))})]})]}),"ui:checkbox":({label:e,value:_,onChange:r})=>a.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2 rounded border border-zinc-800/50 bg-zinc-900/20",children:[a.jsx(Xn,{id:e,checked:!!_,onCheckedChange:m=>r(m===!0)}),a.jsx(Oe,{htmlFor:e,className:"text-[11px] font-medium cursor-pointer select-none text-zinc-300",children:e})]}),"ui:image-picker":({label:e,value:_,onChange:r})=>{const m=_!=null&&typeof _=="object"&&"url"in _?{url:String(_.url??""),alt:String(_.alt??"")}:{url:typeof _=="string"?_:"",alt:""},u=i=>{r(i)};return a.jsx("div",{className:"mb-4",children:a.jsx(lo,{label:e,value:m,onChange:u})})},"ui:icon-picker":({label:e,value:_,onChange:r})=>{const[m,u]=Y.useState(!1),i=wr.find(o=>o.name===(_||""));return a.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[a.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),a.jsxs(fr,{open:m,onOpenChange:u,children:[a.jsx(to,{asChild:!0,children:a.jsx(De,{variant:"outline",className:"w-full h-9 rounded-md border border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 flex items-center gap-2 text-left",children:i?a.jsxs(a.Fragment,{children:[a.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),a.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):a.jsxs(a.Fragment,{children:[a.jsx(rt,{size:16,className:"text-zinc-500 shrink-0"}),a.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),a.jsxs(mr,{className:"sm:max-w-[280px] p-4",children:[a.jsxs(br,{children:[a.jsx(gr,{className:"text-sm",children:"Choose icon"}),a.jsx(vr,{className:"text-xs",children:"Click an icon to select it."})]}),a.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:wr.map(({name:o,Icon:n})=>a.jsx("button",{type:"button",onClick:()=>{r(o),u(!1)},className:ue("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",_===o?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 text-zinc-400 hover:text-zinc-200"),title:o,children:a.jsx(n,{size:20})},o))})]})]})]})}},zt=e=>{if(e instanceof ze.z.ZodOptional||e instanceof ze.z.ZodDefault)return zt(e._def.innerType);if(e instanceof ze.z.ZodObject){const _={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(_[r]=zt(e.shape[r]));return _}return e instanceof ze.z.ZodArray?[]:e instanceof ze.z.ZodString?"":e instanceof ze.z.ZodNumber?0:e instanceof ze.z.ZodBoolean?!1:e instanceof ze.z.ZodEnum?e._def.values[0]:null},jt=e=>e instanceof ze.z.ZodOptional||e instanceof ze.z.ZodDefault?jt(e._def.innerType):e,it=(e,_)=>e&&!_?"opacity-10":"opacity-100",Me=(e,_)=>e!=null&&_.toLowerCase()===e.toLowerCase(),co=(e,_)=>{if(!e)return;const r=_.toLowerCase(),m=Object.entries(e).find(([u])=>u.toLowerCase()===r);return m==null?void 0:m[1]},Ge=({schema:e,data:_,onChange:r,keys:m,expandedItemPath:u,expandedItemIdByField:i,focusedFieldKey:o,onSidebarExpandedItemChange:n})=>{const l=e.shape,h=m!=null?Object.keys(l).filter(g=>m.includes(g)):Object.keys(l),f=u==null?void 0:u[0],v=(f==null?void 0:f.itemId)!=null?{[f.fieldKey]:f.itemId}:i,x=(f==null?void 0:f.fieldKey)??o??null,c=x!=null;return a.jsx("div",{className:"space-y-4",children:h.map(g=>{const d=l[g];if(!d)return null;const b=jt(d),p=d.description||"ui:text",k=_[g];if(p==="ui:image-picker"&&b instanceof ze.z.ZodObject){const T=Me(x,g),L=He["ui:image-picker"]||He["ui:text"];return a.jsx("div",{className:`transition-opacity duration-200 ${it(c,T)}`,...T?{"data-jp-focused-field":g}:{},children:a.jsx(L,{label:g,value:k,onChange:D=>r({..._,[g]:D})})},g)}if(b instanceof ze.z.ZodObject){const T=k||{},L=Me(x,g);return a.jsxs("div",{className:`group/obj mb-6 p-4 border border-zinc-800 rounded-lg bg-zinc-900/20 hover:border-zinc-700 transition-[border-color,opacity] duration-200 ${it(c,L)}`,...L?{"data-jp-focused-field":g}:{},children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),a.jsx("h4",{className:"text-[10px] font-black uppercase text-zinc-400 tracking-widest",children:g})]}),a.jsx(Ge,{schema:b,data:T,onChange:D=>r({..._,[g]:D}),expandedItemPath:u&&Me(f==null?void 0:f.fieldKey,g)?u.slice(1):void 0,expandedItemIdByField:v,focusedFieldKey:x})]},g)}if(b instanceof ze.z.ZodArray){const T=Array.isArray(k)?k:[],L=jt(b.element),D=(j,R)=>{if(R<0||R>=T.length)return;const s=[...T],[U]=s.splice(j,1);s.splice(R,0,U),r({..._,[g]:s})},O=Me(x,g),B=Me(f==null?void 0:f.fieldKey,g)?f==null?void 0:f.itemId:void 0,re=co(v,g)??B;return a.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${it(c,O)}`,...O?{"data-jp-focused-field":g}:{},children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs("label",{className:"text-[10px] font-black uppercase text-zinc-500 tracking-widest",children:[g," (",T.length,")"]}),a.jsxs("button",{type:"button",onClick:()=>{const j=zt(L);r({..._,[g]:[...T,j]})},className:"flex items-center gap-1 px-2 py-1 bg-blue-600/10 hover:bg-blue-600/20 text-blue-500 rounded text-[10px] font-bold transition-colors",children:[a.jsx(lr,{size:12})," Add Item"]})]}),a.jsx("div",{className:"space-y-2",children:T.map((j,R)=>{const s=j,U=s.id||`legacy-${R}`,te=(typeof s.title=="string"?s.title:null)||(typeof s.label=="string"?s.label:null)||(typeof s.name=="string"?s.name:null)||(typeof s.content=="string"?s.content:null)||(typeof s.text=="string"?s.text:null)||`${g} #${R+1}`,Z=re,W=String(s.id??U),J=Z!=null&&String(Z)===W,X=J&&u&&u.length>1?u.slice(1):void 0,z=c&&O&&Z!=null&&!J;return a.jsx(uo,{itemId:W,openItemId:Z!=null?String(Z):void 0,isFaded:z,index:R,isFirst:R===0,isLast:R===T.length-1,label:te,onExpandedChange:n?S=>n(S?{fieldKey:g,itemId:W}:null):void 0,onRemove:()=>{const S=T.filter((q,K)=>K!==R);r({..._,[g]:S})},onMoveUp:()=>D(R,R-1),onMoveDown:()=>D(R,R+1),children:L instanceof ze.z.ZodObject?a.jsx(Ge,{schema:L,data:s||{},expandedItemPath:X,onChange:S=>{const q=[...T];q[R]=S,r({..._,[g]:q})}}):a.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},U)})})]},g)}const E=He[p]||He["ui:text"],N=b instanceof ze.z.ZodEnum?b._def.values:void 0,C=Me(x,g);return a.jsx("div",{className:`transition-opacity duration-200 ${it(c,C)}`,...C?{"data-jp-focused-field":g}:{},children:a.jsx(E,{label:g,value:k,options:N,onChange:T=>r({..._,[g]:T})})},g)})})},uo=({itemId:e,openItemId:_,isFaded:r=!1,label:m,onExpandedChange:u,onRemove:i,onMoveUp:o,onMoveDown:n,isFirst:l,isLast:h,children:f})=>{const v=_!=null&&String(_)===String(e),[x,c]=Y.useState(v);Y.useEffect(()=>{v&&!x&&c(!0),!v&&x&&c(!1)},[v,x]);const g=()=>{const b=!x;c(b),u==null||u(b)},d=v&&x;return a.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...d?{"data-jp-expanded-item":e}:{},children:[a.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[a.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:a.jsxs("button",{type:"button",onClick:g,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[x?a.jsx(mt,{size:12,className:"shrink-0"}):a.jsx(ft,{size:12,className:"shrink-0"}),a.jsx("span",{className:"truncate",children:m})]})}),a.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[a.jsx("button",{type:"button",disabled:l,onClick:o,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:a.jsx(Dn,{size:12})}),a.jsx("button",{type:"button",disabled:h,onClick:n,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:a.jsx(Tn,{size:12})}),a.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),a.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:a.jsx(nt,{size:12})})]})]}),x&&a.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:f})]})},yr=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),kr=({selectedSection:e,pageData:_,allSectionsData:r=[],onUpdate:m,onUpdateSection:u,onClose:i,expandedItemPath:o=null,onReorderSection:n,allLayers:l=[],activeSectionId:h,onRequestScrollToSection:f,onDeleteSection:v,onAddSection:x,hasChanges:c=!1,onExportHTML:g,onExportJSON:d,onSaveToRepo:b,onResetToFile:p,showResetToFile:k=!1})=>{const{schemas:E}=$e(),[N,C]=Y.useState(!0),[T,L]=Y.useState(null),[D,O]=Y.useState(null),[B,re]=Y.useState(null),[j,R]=Y.useState(null),[s,U]=Y.useState(null),te=Y.useRef(null),Z=Y.useRef(null),W=Y.useDeferredValue(e),J=e!=null&&(W==null?void 0:W.id)!==e.id,X=o&&o.length>0?o:j?[j]:null,z=X!=null&&X.length?{fieldKey:X[X.length-1].fieldKey,itemId:X[X.length-1].itemId}:null,S=Y.useRef(o);Y.useEffect(()=>{S.current!=null&&o==null&&R(null),S.current=o},[o]),Y.useEffect(()=>{(e==null?void 0:e.id)!=null&&C(!1)},[e==null?void 0:e.id]);const q=()=>{const A=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const y=te.current;y&&y.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(A)},K=Y.useRef(N);Y.useEffect(()=>{if(N&&!K.current){const A=q();return K.current=N,A}K.current=N},[N]),Y.useEffect(()=>{if(!z)return;const A=te.current;if(!A)return;const y=requestAnimationFrame(()=>{const w=A.querySelector("[data-jp-expanded-item]")??A.querySelector("[data-jp-focused-field]");w&&w.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(y)},[z]);const Q=A=>{C(!1),f==null||f(A)},he=()=>{C(A=>{const y=!A;return y&&q(),y})},ie=(A,y)=>{y.stopPropagation(),r.length>0&&u?U(A):(C(!1),f==null||f(A))};Y.useEffect(()=>{if(s==null)return;const A=y=>{y.key==="Escape"&&U(null)};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[s]);const ae=A=>{T===A?(v==null||v(A),L(null)):(L(A),setTimeout(()=>L(null),3e3))},se=(A,y)=>{O(y),A.dataTransfer.effectAllowed="move",A.dataTransfer.setData("application/json",JSON.stringify({sectionId:y}))},fe=(A,y)=>{A.preventDefault(),D!==y&&re(y)},ge=(A,y)=>{if(A.preventDefault(),O(null),re(null),!D||D===y||!n)return;const w=l.filter(G=>G.scope==="local"),I=w.findIndex(G=>G.id===D),H=w.findIndex(G=>G.id===y);I===-1||H===-1||n(D,H)},we=e?_.sections.find(A=>A.id===e.id):void 0,_e=W?_.sections.find(A=>A.id===W.id):void 0,t=W?E[W.type]:void 0,V=l.length>0&&(N||!e);return a.jsxs("aside",{className:"relative w-full h-full bg-zinc-950 border-l border-zinc-800 flex flex-col shadow-2xl shrink-0 min-w-0 animate-in slide-in-from-right duration-300",children:[a.jsxs("div",{className:"sticky top-0 z-10 flex flex-col shrink-0 bg-zinc-950 border-b border-zinc-800",children:[a.jsxs("div",{className:"py-2 px-3 flex justify-between items-center bg-zinc-900/50",children:[a.jsx("div",{className:"flex items-center gap-2 min-w-0",children:a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-bold text-white leading-tight",children:"Inspector"}),a.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider flex items-center gap-1.5 leading-tight mt-0.5",children:e?a.jsxs(a.Fragment,{children:[n&&e.scope==="local"&&a.jsx("span",{className:"text-zinc-500 shrink-0",title:"Reorder section on page",children:a.jsx(bt,{size:12,strokeWidth:2})}),a.jsx("span",{className:"text-blue-400",children:e.type}),a.jsx("span",{className:"text-zinc-600",children:"|"}),a.jsx("span",{className:"text-zinc-500",children:e.scope})]}):a.jsx("span",{className:"text-zinc-500",children:"Waiting for Selection..."})})]})}),a.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[x!=null&&a.jsxs("button",{type:"button",onClick:x,className:"flex items-center gap-1.5 text-zinc-500 hover:text-white transition-colors p-1 hover:bg-zinc-800 rounded",title:"Add section","aria-label":"Add section",children:[a.jsx(lr,{size:16}),a.jsx("span",{className:"text-xs font-medium",children:"Add section"})]}),a.jsx("button",{type:"button",onClick:i,className:"p-1 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors",title:"Close Inspector","aria-label":"Close Inspector",children:a.jsx(Re,{size:16})})]})]}),l.length>0&&a.jsxs("div",{className:"bg-zinc-900/20 opacity-100",children:[a.jsxs("button",{type:"button",onClick:he,className:"w-full flex items-center justify-between py-3 px-4 hover:bg-zinc-800/30 transition-colors cursor-pointer text-left rounded-none border-0 bg-transparent","aria-expanded":V,"aria-label":V?"Collapse Page Layers":"Expand Page Layers",children:[a.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[a.jsx(gt,{size:14,className:"text-primary shrink-0"}),a.jsx("span",{className:"text-xs font-bold text-white",children:"Page Layers"}),a.jsxs("span",{className:"text-[10px] text-zinc-500",children:["(",l.length,")"]})]}),a.jsx("span",{className:"text-zinc-500 shrink-0 pointer-events-none","aria-hidden":!0,children:V?a.jsx(mt,{size:14}):a.jsx(ft,{size:14})})]}),!V&&e&&(()=>{const A=l.find(w=>w.id===e.id);if(!A)return null;const y=h===e.id;return a.jsxs("div",{className:"px-3 py-2 flex items-center gap-2 bg-primary/10 border-t border-zinc-800/50",children:[a.jsx(bt,{size:12,className:"text-primary shrink-0"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-primary truncate flex items-center gap-1",children:[A.type,y&&a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),a.jsx("p",{className:"text-xs text-white font-medium truncate",children:A.title??`${A.type} section`})]}),a.jsx("button",{type:"button",onClick:w=>ie(A.id,w),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${A.type}`,"aria-label":`Open settings for ${A.type} section`,children:a.jsx(cr,{size:12})})]})})()]})]}),a.jsxs("div",{ref:te,className:"flex-1 min-h-0 overflow-y-auto flex flex-col custom-scrollbar",children:[V&&a.jsxs("div",{className:"border-b border-zinc-800 bg-zinc-900/20 px-3 pb-3 pt-1",children:[l.map(A=>{const y=(e==null?void 0:e.id)===A.id,w=h===A.id,I=D===A.id,H=B===A.id,G=A.scope==="local"&&v,F=A.scope==="local"&&!!n;return a.jsxs("div",{draggable:F,onDragStart:M=>F&&se(M,A.id),onDragOver:M=>F&&fe(M,A.id),onDragLeave:()=>re(null),onDrop:M=>F&&ge(M,A.id),onDragEnd:()=>{O(null),re(null)},className:ue("flex items-center gap-2 py-2.5 px-2 rounded-sm border-t transition-colors",H&&"border-t-2 border-dashed border-primary bg-primary/5",!H&&y&&"border-primary/30 bg-primary/10",!H&&!y&&"border-zinc-800/90 hover:bg-zinc-800/40",I&&"opacity-40",F?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[a.jsx(bt,{size:12,className:`shrink-0 ${y?"text-primary":"text-zinc-500"}`}),a.jsxs("button",{type:"button",onClick:()=>Q(A.id),className:"flex-1 min-w-0 text-left",children:[a.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-zinc-400 truncate flex items-center gap-1",children:[A.type,w&&a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),a.jsx("p",{className:`text-xs truncate ${y?"text-white font-medium":"text-zinc-500"}`,children:A.title??`${A.type} section`})]}),a.jsx("button",{type:"button",onClick:M=>ie(A.id,M),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${A.type}`,"aria-label":`Open settings for ${A.type} section`,children:a.jsx(cr,{size:12})}),G&&a.jsx("button",{type:"button",onClick:M=>{M.stopPropagation(),ae(A.id)},className:`p-1 rounded shrink-0 ${T===A.id?"bg-red-500/20 text-red-400":"text-zinc-500 hover:text-red-400"}`,title:"Delete section",children:a.jsx(nt,{size:12})})]},A.id)}),T&&a.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 rounded-md bg-amber-500/10 border border-amber-500/30",children:[a.jsx(Fn,{size:12,className:"text-amber-500 shrink-0"}),a.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]}),z&&we&&(()=>{const A=we.data||{};let y;if(X&&X.length>0){let w=A;for(const G of X){const P=w==null?void 0:w[G.fieldKey];G.itemId!=null&&Array.isArray(P)?w=P.find(M=>String(M==null?void 0:M.id)===String(G.itemId))??null:w=P}const I=w||{},H=z.fieldKey;y=(typeof I.name=="string"?I.name:null)??(typeof I.title=="string"?I.title:null)??(typeof I.label=="string"?I.label:null)??H.charAt(0).toUpperCase()+H.slice(1).replace(/([A-Z])/g," $1").trim()}else{const w=z.fieldKey;if(z.itemId!=null){const G=(Array.isArray(A[w])?A[w]:[]).find(P=>String(P==null?void 0:P.id)===String(z.itemId))||{};y=(typeof G.name=="string"?G.name:null)??(typeof G.title=="string"?G.title:null)??(typeof G.label=="string"?G.label:null)??w}else y=w.charAt(0).toUpperCase()+w.slice(1).replace(/([A-Z])/g," $1").trim()}return a.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[a.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),a.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:y})]})})(),a.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&C(!1),children:e?J?a.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[a.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),a.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),a.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),a.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),a.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):t?(()=>{const y=Object.keys(t.shape).filter(P=>!yr.has(P)),w=(_e==null?void 0:_e.data)||{};if(y.length===0)return a.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const I=X==null?void 0:X[0],H=(I==null?void 0:I.itemId)!=null?{[I.fieldKey]:I.itemId}:(z==null?void 0:z.itemId)!=null?{[z.fieldKey]:z.itemId}:void 0,G=(I==null?void 0:I.fieldKey)??(z==null?void 0:z.fieldKey)??null;return a.jsx(Ge,{schema:t,data:w,onChange:P=>m(P),keys:y,expandedItemPath:X,expandedItemIdByField:H,focusedFieldKey:G,onSidebarExpandedItemChange:R})})():a.jsxs("div",{className:"text-xs text-red-400 p-4 border border-dashed border-red-900/30 rounded bg-red-900/10",children:["No schema found for ",(W==null?void 0:W.type)??e.type]}):a.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"Select a layer above or on the stage to edit."})})]}),a.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center gap-3 opacity-100 flex-wrap",children:(g!=null||d!=null||b!=null||p!=null)&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:ue("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",c?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),a.jsx("span",{className:ue("text-xs font-medium transition-colors duration-300 shrink-0",c?"text-amber-500":"text-zinc-500"),children:c?"Unsaved Changes":"All Changes Saved"}),g!=null&&a.jsxs("button",{type:"button",onClick:g,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[a.jsx(ir,{size:12,className:"shrink-0"}),a.jsx("span",{children:"HTML"})]}),d!=null&&a.jsxs("button",{type:"button",onClick:d,disabled:!c,className:ue("shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all",c?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[a.jsx(ar,{size:12,className:"shrink-0"}),a.jsx("span",{children:"JSON"})]}),b!=null&&a.jsxs("button",{type:"button",onClick:b,disabled:!c,title:"Salva modifiche nel repository (commit e push)",className:ue("shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all",c?"bg-emerald-600 text-white hover:bg-emerald-500 shadow-emerald-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[a.jsx(vt,{size:12,className:"shrink-0"}),a.jsx("span",{children:"Salva su repo"})]}),p!=null&&k&&a.jsx("button",{type:"button",onClick:p,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-400 hover:bg-zinc-800 hover:border-zinc-600 hover:text-zinc-300",title:"Ripristina la pagina dal file (elimina le modifiche in memoria)",children:a.jsx("span",{children:"Ripristina da file"})})]})}),s!=null&&r.length>0&&u!=null&&(()=>{const A=r.find(M=>M.id===s),y=l.find(M=>M.id===s);if(!A)return null;const w=(y==null?void 0:y.scope)==="global"?"global":"local",I=A.type,H=E[I],P=(H?Object.keys(H.shape):[]).filter(M=>yr.has(M)),F=A.data??{};return P.length===0?a.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:()=>U(null),children:a.jsxs("div",{ref:Z,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:M=>M.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[a.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",I]}),a.jsx("button",{type:"button",onClick:()=>U(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:a.jsx(Re,{size:18})})]}),a.jsx("div",{className:"p-4",children:a.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):a.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:M=>M.target===M.currentTarget&&U(null),children:a.jsxs("div",{ref:Z,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full max-h-[85vh] flex flex-col overflow-hidden",onClick:M=>M.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[a.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",I]}),a.jsx("button",{type:"button",onClick:()=>U(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:a.jsx(Re,{size:18})})]}),a.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:a.jsx(Ge,{schema:H,data:F,onChange:M=>{const $={...A.data,...M};u(s,w,I,$)},keys:P})})]})})})()]})},_r=({draft:e,globalDraft:_,themeConfig:r,slug:m,selectedId:u,scrollToSectionId:i,onScrollRequested:o})=>{const n=Y.useRef(null),l=Y.useCallback(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.UPDATE_DRAFTS,draft:e,globalDraft:_,themeConfig:r},"*")},[e,_,r]);return Y.useEffect(()=>{l()},[l]),Y.useEffect(()=>{const h=f=>{f.data.type===ve.STAGE_READY&&l()};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[l]),Y.useEffect(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.SYNC_SELECTION,selectedId:u},"*")},[u]),Y.useEffect(()=>{var h;!i||!((h=n.current)!=null&&h.contentWindow)||(n.current.contentWindow.postMessage({type:ve.REQUEST_SCROLL_TO_SECTION,sectionId:i},"*"),o==null||o())},[i,o]),a.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:a.jsx("iframe",{ref:n,src:`/admin/preview/${m}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},at={setTheme:e=>{const _=document.documentElement,{tokens:r}=e,m={"--theme-primary":r.colors.primary,"--theme-secondary":r.colors.secondary,"--theme-accent":r.colors.accent,"--theme-background":r.colors.background,"--theme-surface":r.colors.surface,"--theme-surface-alt":r.colors.surfaceAlt,"--theme-text":r.colors.text,"--theme-text-muted":r.colors.textMuted,"--theme-border":r.colors.border,"--theme-font-primary":r.typography.fontFamily.primary,"--theme-font-mono":r.typography.fontFamily.mono,"--theme-radius-sm":r.borderRadius.sm,"--theme-radius-md":r.borderRadius.md,"--theme-radius-lg":r.borderRadius.lg};Object.entries(m).forEach(([u,i])=>{_.style.setProperty(u,i)})}},zr=()=>{var c;const[e,_]=Y.useState(null),[r,m]=Y.useState(null),[u,i]=Y.useState(null),[o,n]=Y.useState(null),[l,h]=Y.useState(!1);if(Y.useEffect(()=>{const g=d=>{d.data.type===ve.UPDATE_DRAFTS&&(_(d.data.draft),m(d.data.globalDraft),d.data.themeConfig&&at.setTheme(d.data.themeConfig)),d.data.type===ve.SYNC_SELECTION&&i(d.data.selectedId),d.data.type===ve.REQUEST_SCROLL_TO_SECTION&&n(d.data.sectionId??null),d.data.type===ve.REQUEST_CLEAN_HTML&&(h(!0),setTimeout(()=>{const b=document.documentElement.outerHTML;window.parent.postMessage({type:ve.SEND_CLEAN_HTML,html:b},"*"),h(!1)},50))};return window.addEventListener("message",g),window.parent.postMessage({type:ve.STAGE_READY},"*"),()=>window.removeEventListener("message",g)},[]),Y.useEffect(()=>{const g=d=>{var j,R,s,U,te,Z,W,J;const b=d.target,p=d.clientX,k=d.clientY;let E=null,N=b;for(;N&&N!==document.body;){const X=(j=N.getAttribute)==null?void 0:j.call(N,"data-section-id"),z=(R=N.getAttribute)==null?void 0:R.call(N,"data-section-type"),S=(s=N.getAttribute)==null?void 0:s.call(N,"data-section-scope");if(X&&z&&S){E=N;break}N=N.parentElement}if(!E)return;d.preventDefault(),d.stopPropagation();const C=E.getAttribute("data-section-id"),T=E.getAttribute("data-section-type"),L=E.getAttribute("data-section-scope");if(!C||!T||!L)return;const D={id:C,type:T,scope:L};if(b===E){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}const O=document.elementFromPoint(p,k)??b;if(!O||!E.contains(O)){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}if(O===E){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}const B=[];for(N=O;N&&N!==E;){const X=(U=N.getAttribute)==null?void 0:U.call(N,"data-jp-item-id"),z=(te=N.getAttribute)==null?void 0:te.call(N,"data-jp-item-field");X&&z&&B.push({fieldKey:z||"items",itemId:X}),N=N.parentElement}if(B.reverse(),B.length===0)for(N=O;N&&N!==E;){const X=(Z=N.getAttribute)==null?void 0:Z.call(N,"data-jp-field");if(X){B.push({fieldKey:X});break}N=N.parentElement}if(B.length===0&&O){let X=null;const z=S=>{var K,Q;const q=S.getBoundingClientRect();if(q.left<=p&&p<=q.right&&q.top<=k&&k<=q.bottom){for(let he=0;he<S.children.length;he++)z(S.children[he]);((K=S.getAttribute)!=null&&K.call(S,"data-jp-item-id")||(Q=S.getAttribute)!=null&&Q.call(S,"data-jp-field"))&&(X=S)}};if(z(O),X){const S=X,q=(W=S.getAttribute)==null?void 0:W.call(S,"data-jp-item-id"),K=(J=S.getAttribute)==null?void 0:J.call(S,"data-jp-field");q&&K?B.push({fieldKey:K||"items",itemId:q}):K&&B.push({fieldKey:K})}}const re={type:ve.SECTION_SELECT,section:D};if(B.length>0){re.itemPath=B;const X=B[0];X.itemId!=null?(re.itemField=X.fieldKey,re.itemId=X.itemId):re.itemField=X.fieldKey}window.parent.postMessage(re,"*")};return document.addEventListener("click",g,!0),()=>document.removeEventListener("click",g,!0)},[]),Y.useEffect(()=>{if(!o)return;const g=setTimeout(()=>n(null),600);return()=>clearTimeout(g)},[o]),!e||!r)return a.jsx("div",{className:"flex items-center justify-center h-screen w-full bg-zinc-950 text-zinc-500 font-mono text-xs uppercase tracking-widest animate-pulse",children:"Waiting for Studio Signal..."});const f=(c=r.header)==null?void 0:c.data,v={main:(f==null?void 0:f.links)??[]},x=g=>{window.parent.postMessage({type:ve.ACTIVE_SECTION_CHANGED,activeSectionId:g},"*")};return a.jsx(tt,{mode:l?"visitor":"studio",children:a.jsx("div",{className:l?"":"jp-ice-active",children:a.jsx(xt,{pageConfig:e,siteConfig:r,menuConfig:v,selectedId:l?null:u,scrollToSectionId:o,onActiveSectionChange:x})})})};function ho(e){return e.split("-").map(_=>_.charAt(0).toUpperCase()+_.slice(1).toLowerCase()).join(" ")}const jr=({open:e,onClose:_,sectionTypes:r,sectionTypeLabels:m,onSelect:u})=>{if(Y.useEffect(()=>{if(!e)return;const o=n=>{n.key==="Escape"&&_()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,_]),!e)return null;const i=o=>(m==null?void 0:m[o])??ho(o);return a.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"jp-add-section-title",children:[a.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:_,"aria-hidden":"true"}),a.jsxs("div",{className:"relative w-full max-w-md max-h-[85vh] flex flex-col rounded-xl border border-zinc-700 bg-zinc-900 shadow-2xl overflow-hidden",children:[a.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:a.jsx(gt,{size:18})}),a.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),a.jsx("button",{type:"button",onClick:_,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:a.jsx(Re,{size:18})})]}),a.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?a.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):a.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(o=>a.jsx("li",{role:"option",children:a.jsxs("button",{type:"button",onClick:()=>{u(o),_()},className:ue("w-full flex items-center gap-3 px-4 py-3 rounded-lg text-left","border border-zinc-700/80 bg-zinc-800/50","hover:border-blue-500/40 hover:bg-zinc-800 transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:ring-offset-2 focus:ring-offset-zinc-900"),children:[a.jsx("span",{className:"flex items-center justify-center w-9 h-9 rounded-md bg-zinc-700/80 text-zinc-400 text-xs font-mono shrink-0",children:o}),a.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(o)})]})},o))})}),a.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:a.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},Er=()=>a.jsxs("div",{style:{"--local-bg":"var(--color-background)","--local-text":"var(--color-text)","--local-text-muted":"var(--color-text-muted)","--local-primary":"var(--color-primary)","--local-radius-md":"var(--radius-md)"},className:"min-h-screen flex flex-col items-center justify-center bg-[var(--local-bg)] px-6",children:[a.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),a.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),a.jsx("a",{href:"/",className:"inline-flex items-center gap-2 px-6 py-3 rounded-[var(--local-radius-md)] bg-[var(--local-primary)] text-[var(--local-bg)] font-semibold text-sm hover:opacity-90 transition-opacity",children:"Back to Home"})]}),po='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-900:oklch(39.6% .141 25.723);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-900:oklch(37.8% .077 168.94);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-primary:var(--primary)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-3{left:calc(var(--spacing)*3)}.z-0{z-index:0}.z-10{z-index:10}.z-50,.z-\\[50\\]{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[70\\]{z-index:70}.z-\\[100\\]{z-index:100}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing)*4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-20{height:calc(var(--spacing)*20)}.h-40{height:calc(var(--spacing)*40)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[45vh\\]{max-height:45vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[320px\\]{max-height:320px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-\\[18px\\]{min-height:18px}.min-h-\\[80px\\]{min-height:80px}.min-h-\\[240px\\]{min-height:240px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\/4{width:75%}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[280px\\]{max-width:280px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[18px\\]{min-width:18px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3{--tw-translate-x:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-pulse{animation:var(--animate-pulse)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[var\\(--local-radius-md\\)\\]{border-radius:var(--local-radius-md)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-primary,.border-primary\\/30{border-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\\/30{border-color:color-mix(in oklab,var(--color-primary)30%,transparent)}}.border-red-500\\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-900\\/30{border-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.border-red-900\\/30{border-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\\/80{border-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/80{border-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-zinc-800\\/50{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/50{border-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.border-zinc-800\\/90{border-color:#27272ae6}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/90{border-color:color-mix(in oklab,var(--color-zinc-800)90%,transparent)}}.bg-\\[var\\(--color-background\\)\\]{background-color:var(--color-background)}.bg-\\[var\\(--local-bg\\)\\]{background-color:var(--local-bg)}.bg-\\[var\\(--local-primary\\)\\]{background-color:var(--local-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/5{background-color:color-mix(in oklab,var(--color-amber-500)5%,transparent)}}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-background{background-color:var(--color-background)}.bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/15{background-color:color-mix(in oklab,var(--color-blue-500)15%,transparent)}}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\\/\\[0\\.04\\]{background-color:#3080ff0a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/\\[0\\.04\\]{background-color:color-mix(in oklab,var(--color-blue-500)4%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\\/10{background-color:#155dfc1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\\/10{background-color:color-mix(in oklab,var(--color-blue-600)10%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-primary\\/5{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--color-primary)5%,transparent)}}.bg-primary\\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-500\\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-red-900\\/10{background-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.bg-red-900\\/10{background-color:color-mix(in oklab,var(--color-red-900)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\\/15{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/\\[0\\.01\\]{background-color:#ffffff03}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.01\\]{background-color:color-mix(in oklab,var(--color-white)1%,transparent)}}.bg-white\\/\\[0\\.02\\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-700\\/80{background-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\\/80{background-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-800\\/60{background-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/60{background-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.bg-zinc-800\\/80{background-color:#27272acc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/80{background-color:color-mix(in oklab,var(--color-zinc-800)80%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/20{background-color:#18181b33}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/20{background-color:color-mix(in oklab,var(--color-zinc-900)20%,transparent)}}.bg-zinc-900\\/40{background-color:#18181b66}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/40{background-color:color-mix(in oklab,var(--color-zinc-900)40%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab,var(--color-zinc-900)60%,transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/80{background-color:#09090bcc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/80{background-color:color-mix(in oklab,var(--color-zinc-950)80%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab,red,red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab,var(--color-black)70%,transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-\\[length\\:12px\\]{background-size:12px}.bg-\\[right_0\\.25rem_center\\]{background-position:right .25rem center}.bg-no-repeat{background-repeat:no-repeat}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-6{padding-right:calc(var(--spacing)*6)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-\\[var\\(--local-bg\\)\\]{color:var(--local-bg)}.text-\\[var\\(--local-text\\)\\]{color:var(--local-text)}.text-\\[var\\(--local-text-muted\\)\\]{color:var(--local-text-muted)}.text-amber-200{color:var(--color-amber-200)}.text-amber-500{color:var(--color-amber-500)}.text-amber-500\\/70{color:#f99c00b3}@supports (color:color-mix(in lab,red,red)){.text-amber-500\\/70{color:color-mix(in oklab,var(--color-amber-500)70%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_8px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-blue-900\\/20{--tw-shadow-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.shadow-blue-900\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-900)20%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-emerald-900\\/20{--tw-shadow-color:#004e3b33}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-900\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-emerald-900)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-blue-500\\/40{--tw-ring-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.ring-blue-500\\/40{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.ring-zinc-800{--tw-ring-color:var(--color-zinc-800)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-zinc-900{--tw-ring-offset-color:var(--color-zinc-900)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.brightness-\\[0\\.6\\]{--tw-brightness:brightness(.6);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.brightness-\\[0\\.85\\]{--tw-brightness:brightness(.85);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-\\[border-color\\,opacity\\]{transition-property:border-color,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:border-dashed:is(:where(.group):hover *){--tw-border-style:dashed;border-style:dashed}.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:brightness-100:is(:where(.group):hover *){--tw-brightness:brightness(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-500\\/30:hover{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/30:hover{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\\:border-blue-500\\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/40:hover{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.hover\\:border-zinc-600:hover{border-color:var(--color-zinc-600)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:#3080ff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-blue-500)3%,transparent)}}.hover\\:bg-blue-600\\/20:hover{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/20:hover{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\\:bg-primary\\/40:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/40:hover{background-color:color-mix(in oklab,var(--color-primary)40%,transparent)}}.hover\\:bg-red-500\\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab,var(--color-red-500)25%,transparent)}}.hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\\:bg-zinc-800\\/30:hover{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/30:hover{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.hover\\:bg-zinc-800\\/40:hover{background-color:#27272a66}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/40:hover{background-color:color-mix(in oklab,var(--color-zinc-800)40%,transparent)}}.hover\\:bg-zinc-800\\/50:hover{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/50:hover{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-red-200:hover{color:var(--color-red-200)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:opacity-90:hover{opacity:.9}.hover\\:ring-zinc-600:hover{--tw-ring-color:var(--color-zinc-600)}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.focus\\:ring-blue-600:focus{--tw-ring-color:var(--color-blue-600)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-zinc-900:focus{--tw-ring-offset-color:var(--color-zinc-900)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-zinc-900:focus-visible{--tw-ring-offset-color:var(--color-zinc-900)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-primary\\/60:active{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.active\\:bg-primary\\/60:active{background-color:color-mix(in oklab,var(--color-primary)60%,transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}}:root{--background:oklch(14.1% .005 285.823);--foreground:oklch(98.5% 0 0);--card:oklch(21% .006 285.885);--card-foreground:oklch(98.5% 0 0);--popover:oklch(21% .006 285.885);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(42% .18 266);--primary-foreground:oklch(97% .014 254.604);--secondary:oklch(27.4% .006 286.033);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(27.4% .006 286.033);--muted-foreground:oklch(70.5% .015 286.067);--accent:oklch(42% .18 266);--accent-foreground:oklch(97% .014 254.604);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(97% .014 254.604);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.2% .016 285.938);--radius:.5rem;font-family:ui-sans-serif,system-ui,sans-serif}[data-radix-portal]{z-index:9999!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';class fo extends Y.Component{constructor(_){super(_),this.state={hasError:!1,error:null}}static getDerivedStateFromError(_){return{hasError:!0,error:_}}componentDidCatch(_,r){console.error("[JsonPages Engine]",_,r)}render(){return this.state.hasError&&this.state.error?a.jsxs("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:24,backgroundColor:"#0f172a",color:"#e2e8f0",fontFamily:"ui-sans-serif, system-ui, sans-serif"},children:[a.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),a.jsx("pre",{style:{maxWidth:"100%",overflow:"auto",padding:16,backgroundColor:"rgba(0,0,0,0.3)",borderRadius:8,fontSize:12,marginTop:8},children:this.state.error.message})]}):this.props.children}}function mo({config:e}){var E,N;const{registry:_={},schemas:r={},pages:m={},siteConfig:u,themeConfig:i,menuConfig:o,themeCss:n,addSection:l,NotFoundComponent:h=Er}=e,f=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(C=>C!=="header"&&C!=="footer"),v={exportJSON:((E=e.persistence)==null?void 0:E.exportJSON)??At,exportHTML:((N=e.persistence)==null?void 0:N.exportHTML)??It},x=typeof(n==null?void 0:n.tenant)=="string"?n.tenant:"",c=typeof(n==null?void 0:n.admin)=="string"?n.admin:po,[g,d]=Y.useState(!1);Y.useEffect(()=>{try{i!=null&&i.tokens&&at.setTheme(i)}catch(C){console.warn("[JsonPages] setTheme failed",C)}d(!0)},[i]);const b=()=>{const{slug:C="home"}=Ne.useParams(),[T,L]=Y.useState(null);Y.useEffect(()=>{const re=document.getElementById("jp-baked-state");if(re!=null&&re.textContent)try{const j=JSON.parse(re.textContent);L(j),at.setTheme(j.theme)}catch(j){console.error("Failed to parse baked state",j)}},[]);const D=T?T.page:m[C],O=T?T.site:u,B=T?T.menu:o;return D?a.jsx(ot,{mode:"tenant",tenantCss:x,adminCss:c,children:a.jsx(tt,{mode:"visitor",children:a.jsx(xt,{pageConfig:D,siteConfig:O,menuConfig:B})})}):a.jsx(h,{})},p=()=>{var P;const{slug:C="home"}=Ne.useParams(),[T,L]=Y.useState(null),[D,O]=Y.useState(!1),[B,re]=Y.useState(()=>{var F;try{const M=JSON.parse(JSON.stringify(u??{}));M.identity||(M.identity={title:"Site"}),M.pages||(M.pages=[]);const $=(F=M.header)==null?void 0:F.data;return $&&(o!=null&&o.main)&&($.links=JSON.parse(JSON.stringify(o.main))),M}catch{return{identity:{title:"Site"},pages:[]}}}),[j,R]=Y.useState(null),[s,U]=Y.useState(null),[te,Z]=Y.useState(null),[W,J]=Y.useState(null),[X,z]=Y.useState(!1),[S,q]=Y.useState(400),K=360,Q=920,he=Y.useCallback(F=>{F.preventDefault();const M=F.currentTarget;M.setPointerCapture(F.pointerId);const $=F.clientX,ee=S,de=ke=>{const je=$-ke.clientX,Ee=Math.min(Q,Math.max(K,ee+je));q(Ee)},le=()=>{M.releasePointerCapture(F.pointerId),M.removeEventListener("pointermove",de),M.removeEventListener("pointerup",le),M.removeEventListener("pointercancel",le),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",M.addEventListener("pointermove",de),M.addEventListener("pointerup",le),M.addEventListener("pointercancel",le)},[S]),ie=T?[...B.header?[{id:B.header.id,type:B.header.type,scope:"global",title:"Header"}]:[],...T.sections.map(F=>{var M,$;return{id:F.id,type:F.type,scope:"local",title:((M=F.data)==null?void 0:M.title)??(($=F.data)==null?void 0:$.titleHighlight)}}),...B.footer?[{id:B.footer.id,type:B.footer.type,scope:"global",title:"Footer"}]:[]]:[];Y.useEffect(()=>{const F=m[C];F&&L(JSON.parse(JSON.stringify(F))),R(null),U(null),O(!1)},[C,m]);const ae=Y.useCallback(()=>{const F=m[C];F&&L(JSON.parse(JSON.stringify(F))),R(null),U(null),O(!1)},[C,m]),se=Y.useCallback((F,M,$)=>{const ee=[...$.sections],de=ee.findIndex(je=>je.id===F);if(de===-1||M<0||M>=ee.length)return;const[le]=ee.splice(de,1),ke=M>de?M-1:M;ee.splice(Math.min(ke,ee.length),0,le),L({...$,sections:ee}),O(!0)},[]),fe=Y.useCallback(F=>{var M;if(F.origin===window.location.origin){if(F.data.type===ve.SECTION_SELECT){R(F.data.section);const $=F.data.itemPath;if(Array.isArray($)&&$.length>0)U($.map(ee=>({fieldKey:ee.fieldKey,...ee.itemId!=null?{itemId:String(ee.itemId)}:{}})));else{const ee=F.data.itemField,de=F.data.itemId;U(typeof ee=="string"?[{fieldKey:ee,...de!=null?{itemId:String(de)}:{}}]:null)}}if(F.data.type===ve.ACTIVE_SECTION_CHANGED&&Z(F.data.activeSectionId??null),F.data.type==="jsonpages:section-reorder"&&T){const{sectionId:$,newIndex:ee}=F.data;typeof $=="string"&&typeof ee=="number"&&ee>=0&&se($,ee,T)}if(F.data.type===ve.SEND_CLEAN_HTML){if(!T)return;const $=(M=B.header)==null?void 0:M.data,ee={page:T,site:B,menu:{main:($==null?void 0:$.links)??[]},theme:i};v.exportHTML(ee,C,F.data.html),O(!1)}}},[T,B,C,i,se]);Y.useEffect(()=>(window.addEventListener("message",fe),()=>window.removeEventListener("message",fe)),[fe]);const ge=Y.useCallback(F=>{const M=ie.find($=>$.id===F);M&&R({id:M.id,type:M.type,scope:M.scope}),U(null),J(F)},[ie]),we=Y.useCallback(()=>{J(null)},[]),_e=Y.useCallback(F=>{L(M=>M&&{...M,sections:M.sections.filter($=>$.id!==F)}),O(!0),R(M=>(M==null?void 0:M.id)===F?null:M)},[]),t=F=>{if(!(!j||!T))if(O(!0),j.scope==="global")j.type==="header"&&B.header!=null?re({...B,header:{...B.header,data:F}}):j.type==="footer"&&B.footer!=null&&re({...B,footer:{...B.footer,data:F}});else{const M=T.sections.map($=>$.id===j.id?{...$,data:F}:$);L({...T,sections:M})}},V=Y.useCallback((F,M,$,ee)=>{var de,le;if(O(!0),M==="global")((de=B.header)==null?void 0:de.id)===F?re({...B,header:{...B.header,data:ee}}):((le=B.footer)==null?void 0:le.id)===F&&re({...B,footer:{...B.footer,data:ee}});else if(T){const ke=T.sections.map(je=>je.id===F?{...je,data:ee}:je);L({...T,sections:ke})}},[T,B]),A=()=>{var M;const F=document.querySelector("iframe");(M=F==null?void 0:F.contentWindow)==null||M.postMessage({type:ve.REQUEST_CLEAN_HTML},"*")},y=()=>{var $;if(!T)return;const F=($=B.header)==null?void 0:$.data,M={page:T,site:B,menu:{main:(F==null?void 0:F.links)??[]},theme:i};v.exportJSON(M,C),O(!1)},w=()=>{var $,ee;if(!T||!(($=e.persistence)!=null&&$.saveToRepo))return;const F=(ee=B.header)==null?void 0:ee.data,M={page:T,site:B,menu:{main:(F==null?void 0:F.links)??[]},theme:i};e.persistence.saveToRepo(M,C).then(()=>O(!1))},I=F=>{var ee;if(!T)return;const M=((ee=l==null?void 0:l.getDefaultSectionData)==null?void 0:ee.call(l,F))??{},$={id:crypto.randomUUID(),type:F,data:M,settings:void 0};L({...T,sections:[...T.sections,$]}),O(!0),R({id:$.id,type:F,scope:"local"})};if(!T)return a.jsx("div",{children:"Loading Studio..."});const H=(j==null?void 0:j.scope)==="global"?{sections:[B.header,B.footer].filter(F=>F!=null)}:T,G=[...B.header?[B.header]:[],...T.sections,...B.footer?[B.footer]:[]];return a.jsx(ot,{mode:"admin",tenantCss:x,adminCss:c,children:a.jsx(tt,{mode:"studio",children:a.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[a.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[a.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:a.jsx(_r,{draft:T,globalDraft:B,themeConfig:i,slug:C,selectedId:j==null?void 0:j.id,scrollToSectionId:W,onScrollRequested:we})}),a.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:S,minWidth:K,maxWidth:Q},children:[a.jsx("div",{role:"separator","aria-label":"Resize inspector",className:"absolute left-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-primary/40 active:bg-primary/60 transition-colors shrink-0",style:{zIndex:9999},onPointerDown:he}),a.jsx(kr,{selectedSection:j,pageData:H,allSectionsData:G,onUpdate:t,onUpdateSection:V,onClose:()=>{R(null),U(null)},expandedItemPath:s,onReorderSection:T?(F,M)=>se(F,M,T):void 0,allLayers:ie,activeSectionId:te,onRequestScrollToSection:ge,onDeleteSection:T?_e:void 0,onAddSection:f.length>0?()=>z(!0):void 0,hasChanges:D,onExportHTML:A,onExportJSON:y,onSaveToRepo:((P=e.persistence)==null?void 0:P.saveToRepo)!=null?w:void 0,onResetToFile:ae})]})]}),a.jsx(jr,{open:X,onClose:()=>z(!1),sectionTypes:f,sectionTypeLabels:l==null?void 0:l.sectionTypeLabels,onSelect:I})]})})})},k=()=>a.jsx(ot,{mode:"tenant",tenantCss:x,adminCss:c,children:a.jsx(zr,{})});return g?a.jsx(fo,{children:a.jsx(er,{config:{registry:_,schemas:r,tenantId:e.tenantId??"default",assets:e.assets},children:a.jsx(Ne.BrowserRouter,{children:a.jsxs(Ne.Routes,{children:[a.jsx(Ne.Route,{path:"/",element:a.jsx(b,{})}),a.jsx(Ne.Route,{path:"/:slug",element:a.jsx(b,{})}),a.jsx(Ne.Route,{path:"/admin",element:a.jsx(p,{})}),a.jsx(Ne.Route,{path:"/admin/:slug",element:a.jsx(p,{})}),a.jsx(Ne.Route,{path:"/admin/preview/:slug",element:a.jsx(k,{})}),a.jsx(Ne.Route,{path:"*",element:a.jsx(h,{})})]})})})}):a.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#0f172a",color:"#94a3b8",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontSize:14},children:"Loading…"})}const bo=({hasChanges:e,onExportJSON:_,onExportHTML:r,onAddSection:m})=>a.jsxs("div",{className:"h-14 border-b border-zinc-800 bg-zinc-950 flex items-center justify-between px-6 shrink-0 z-50 relative",children:[a.jsx("div",{className:"flex items-center gap-3",children:m!=null&&a.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600 transition-colors",title:"Add section","aria-label":"Add section",children:[a.jsx($n,{size:14}),a.jsx("span",{children:"Add section"})]})}),a.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:a.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium transition-all border bg-zinc-900 border-zinc-700 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[a.jsx(ir,{size:14}),a.jsx("span",{children:"Bake HTML"})]}),a.jsxs("button",{onClick:_,disabled:!e,className:ue("flex items-center gap-2 px-4 py-1.5 rounded-md text-xs font-bold transition-all shadow-lg",e?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[a.jsx(ar,{size:14}),a.jsx("span",{children:"Export JSON"})]})]})]});pe.AddSectionLibrary=jr,pe.AdminSidebar=kr,pe.ConfigProvider=er,pe.ControlBar=bo,pe.DefaultNotFound=Er,pe.FormFactory=Ge,pe.InputWidgets=He,pe.JsonPagesEngine=mo,pe.PageRenderer=xt,pe.PreviewEntry=zr,pe.STUDIO_EVENTS=ve,pe.SectionRenderer=Ze,pe.StudioProvider=tt,pe.StudioStage=_r,pe.ThemeLoader=ot,pe.cn=ue,pe.exportBakedHTML=It,pe.exportProjectJSON=At,pe.resolveAssetUrl=xr,pe.themeManager=at,pe.useConfig=$e,pe.useStudio=rr,Object.defineProperty(pe,Symbol.toStringTag,{value:"Module"})}));
203
+ */const Vn=be("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);class Kn extends q.Component{constructor(_){super(_),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(_,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,_,r)}render(){return this.state.hasError?s.jsxs("div",{className:"p-8 m-4 bg-amber-500/5 border-2 border-dashed border-amber-500/20 rounded-xl flex flex-col items-center text-center gap-3",children:[s.jsx(Gn,{className:"text-amber-500",size:32}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),s.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),s.jsx("p",{className:"text-xs text-zinc-400 max-w-[280px] leading-relaxed",children:"This section failed to render. Check the console for details or verify the JSON data structure."})]}):this.props.children}}const Jn=({type:e,scope:_,isSelected:r,sectionId:m,sectionIndex:u=0,totalSections:i=0,onReorder:o})=>{const n=typeof u=="number"&&u>0&&o,l=typeof u=="number"&&u<i-1&&o;return s.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:he("absolute inset-0 pointer-events-none transition-all duration-200 z-[50]","border-2 border-transparent group-hover:border-blue-400/50 group-hover:border-dashed",r&&"border-2 border-blue-600 border-solid bg-blue-500/5"),children:s.jsxs("div",{className:he("absolute top-0 right-0 flex flex-nowrap items-center gap-1 pl-1 pr-2 py-1 text-[9px] font-black uppercase tracking-widest transition-opacity pointer-events-auto","bg-blue-600 text-white",r||"group-hover:opacity-100 opacity-0"),children:[o&&m!=null&&s.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[s.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),n&&o(m,u-1)},disabled:!n,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section up","aria-label":"Move section up",children:s.jsx(mt,{size:12,strokeWidth:2.5})}),s.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),l&&o(m,u+2)},disabled:!l,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section down","aria-label":"Move section down",children:s.jsx(ft,{size:12,strokeWidth:2.5})})]}),s.jsx("span",{className:"shrink-0",children:e}),s.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),s.jsx("span",{className:"shrink-0",children:_})]})})},He=({section:e,menu:_,selectedId:r,reorderable:m,sectionIndex:u,totalSections:i,onReorder:o})=>{var p,k;const{mode:n}=tr(),{registry:l}=Ze(),h=n==="studio",f=h&&r===e.id,x=l[e.type],v=e.type==="header"||e.type==="footer"?"global":"local",c=e.type==="header"&&((p=e.settings)==null?void 0:p.sticky);if(!x)return s.jsxs("div",{className:"p-6 m-4 bg-red-500/10 text-red-400 border border-red-500/20 rounded-lg text-sm font-mono",children:[s.jsx("strong",{children:"Missing Component:"})," ",e.type]});const b=E=>{var re,j,R,a,M;if(!h)return;E.preventDefault(),E.stopPropagation();const S=E.currentTarget,C=E.clientX,O=E.clientY;if(E.target===S){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:v}},"*");return}const L=document.elementFromPoint(C,O)??E.target;if(!L||!S.contains(L)){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:v}},"*");return}if(L===S){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:v}},"*");return}const D=[];let T=L;for(;T&&T!==S;){const te=(re=T.getAttribute)==null?void 0:re.call(T,"data-jp-item-id"),U=(j=T.getAttribute)==null?void 0:j.call(T,"data-jp-item-field");te&&U&&D.push({fieldKey:U||"items",itemId:te}),T=T.parentElement}if(D.reverse(),D.length===0)for(T=L;T&&T!==S;){const te=(R=T.getAttribute)==null?void 0:R.call(T,"data-jp-field");if(te){D.push({fieldKey:te});break}T=T.parentElement}if(D.length===0&&L){let te=null;const U=W=>{var X,z;const K=W.getBoundingClientRect();if(K.left<=C&&C<=K.right&&K.top<=O&&O<=K.bottom){for(let N=0;N<W.children.length;N++)U(W.children[N]);((X=W.getAttribute)!=null&&X.call(W,"data-jp-item-id")||(z=W.getAttribute)!=null&&z.call(W,"data-jp-field"))&&(te=W)}};if(U(L),te){const W=te,K=(a=W.getAttribute)==null?void 0:a.call(W,"data-jp-item-id"),X=(M=W.getAttribute)==null?void 0:M.call(W,"data-jp-field");K&&X?D.push({fieldKey:X||"items",itemId:K}):X&&D.push({fieldKey:X})}}const V={type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:v}};if(D.length>0){V.itemPath=D;const te=D[0];te.itemId!=null?(V.itemField=te.fieldKey,V.itemId=te.itemId):V.itemField=te.fieldKey}window.parent.postMessage(V,"*")},d=()=>{const E=x;return e.type==="header"&&_?s.jsx(E,{data:e.data,settings:e.settings,menu:_}):s.jsx(E,{data:e.data,settings:e.settings})},g=(k=e.data)==null?void 0:k.anchorId;return s.jsxs("div",{id:g||void 0,"data-section-id":h?e.id:void 0,"data-section-type":h?e.type:void 0,"data-section-scope":h?v:void 0,...h&&f?{"data-jp-selected":!0}:{},onClickCapture:h?b:void 0,className:he("relative w-full",h&&"group cursor-pointer",h&&c?"sticky top-0 z-[60]":"relative z-0",f&&"z-[70]"),children:[s.jsx("div",{className:"relative z-0",children:s.jsx(Kn,{type:e.type,children:d()})}),h&&s.jsx(Jn,{type:e.type,scope:v,isSelected:!!f,sectionId:m&&v==="local"?e.id:void 0,sectionIndex:m&&v==="local"?u:void 0,totalSections:m&&v==="local"?i:void 0,onReorder:m&&v==="local"?o:void 0})]})},qn=e=>{q.useEffect(()=>{document.title=e.title;let _=document.querySelector('meta[name="description"]');_||(_=document.createElement("meta"),_.setAttribute("name","description"),document.head.appendChild(_)),_.setAttribute("content",e.description)},[e.title,e.description])},Yn="application/json",vt=({pageConfig:e,siteConfig:_,menuConfig:r,selectedId:m,onReorder:u,scrollToSectionId:i,onActiveSectionChange:o})=>{var g,p;qn(e.meta);const[n,l]=q.useState(null),h=q.useRef({}),f=q.useRef(o);f.current=o;const x=k=>{var E;(E=f.current)==null||E.call(f,k)};q.useEffect(()=>{if(!i)return;const k=h.current[i];k&&k.scrollIntoView({behavior:"smooth",block:"center"})},[i]),q.useEffect(()=>{if(!f.current)return;const E=[..._.header?[_.header.id]:[],...e.sections.map(L=>L.id),..._.footer?[_.footer.id]:[]],S=new IntersectionObserver(L=>{L.forEach(D=>{var T;if(D.isIntersecting&&D.intersectionRatio>.5){const V=D.target.getAttribute("data-section-id");V&&((T=f.current)==null||T.call(f,V))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let C=!1;const O=requestAnimationFrame(()=>{C||E.forEach(L=>{const D=h.current[L];D&&S.observe(D)})});return()=>{C=!0,cancelAnimationFrame(O),S.disconnect()}},[e.sections,(g=_.header)==null?void 0:g.id,(p=_.footer)==null?void 0:p.id]);const v=(k,E)=>{k.preventDefault(),k.dataTransfer.dropEffect="move",l(E)},c=()=>{l(null)},b=(k,E)=>{if(k.preventDefault(),l(null),!!u)try{const S=k.dataTransfer.getData(Yn),{sectionId:C}=JSON.parse(S);typeof C=="string"&&u(C,E)}catch{}},d=()=>{const k=typeof u=="function",E=e.sections.map((S,C)=>{const O=n===C;return k?s.jsxs("div",{ref:L=>{h.current[S.id]=L},"data-section-id":S.id,style:{position:"relative"},onMouseEnter:()=>x(S.id),children:[s.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:55,pointerEvents:"auto",backgroundColor:O?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:O?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:L=>v(L,C),onDragLeave:c,onDrop:L=>b(L,C)}),s.jsx(He,{section:S,selectedId:m,reorderable:!0,sectionIndex:C,totalSections:e.sections.length,onReorder:u})]},S.id):s.jsx("div",{ref:L=>{h.current[S.id]=L},"data-section-id":S.id,onMouseEnter:()=>x(S.id),children:s.jsx(He,{section:S,selectedId:m})},S.id)});if(k&&E.length>0){const S=e.sections.length,C=n===S;E.push(s.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:C?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:C?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:O=>v(O,S),onDragLeave:c,onDrop:O=>b(O,S)},"jp-drop-after-last"))}return E};return s.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[_.header!=null&&s.jsx("div",{ref:k=>{h.current[_.header.id]=k},"data-section-id":_.header.id,onMouseEnter:()=>x(_.header.id),children:s.jsx(He,{section:_.header,menu:r.main,selectedId:m})}),s.jsx("main",{className:"flex-1",children:d()}),_.footer!=null&&s.jsx("div",{ref:k=>{h.current[_.footer.id]=k},"data-section-id":_.footer.id,onMouseEnter:()=>x(_.footer.id),children:s.jsx(He,{section:_.footer,selectedId:m})})]})},ot=({mode:e,tenantCss:_,adminCss:r,children:m})=>(q.useLayoutEffect(()=>{const u=`jp-theme-${e}`,i=e==="tenant"?_:r;if(!document.getElementById(u)&&i){const o=document.createElement("style");o.id=u,o.innerHTML=i,document.head.appendChild(o)}return()=>{const o=document.getElementById(u);o&&o.remove()}},[e,_,r]),s.jsx(s.Fragment,{children:m}));function xt({className:e,type:_,...r}){return s.jsx("input",{type:_,className:he("h-8 rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-1 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600",e),...r})}function Xn({className:e,..._}){return s.jsx("textarea",{className:he("min-h-16 w-full rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-2 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600 resize-none",e),..._})}function Qn({className:e,checked:_,onCheckedChange:r,...m}){return s.jsx("input",{type:"checkbox",checked:_,onChange:u=>r==null?void 0:r(u.target.checked),className:he("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...m})}function Oe({className:e,..._}){return s.jsx("label",{className:he("text-sm font-medium leading-none select-none",e),..._})}const cr=me.createContext(null);function eo(){const e=me.useContext(cr);if(!e)throw new Error("Select components must be used within Select");return e}function to({value:e,onValueChange:_,children:r}){const m=e??"",u=me.Children.toArray(r).find(x=>me.isValidElement(x)&&x.type===kt),i=me.Children.toArray(r).find(x=>me.isValidElement(x)&&x.type===wt),o=u&&me.isValidElement(u)?u.props.children:void 0,n=i&&me.isValidElement(i)?i.props.children:void 0,l=me.useMemo(()=>!u||!me.isValidElement(u)?[]:me.Children.toArray(u.props.children).filter(x=>me.isValidElement(x)&&x.props.value!==void 0).map(x=>({value:x.props.value,label:x.props.children??x.props.value})),[u,o]),h=me.useMemo(()=>{if(!i||!me.isValidElement(i))return"";const x=me.Children.toArray(i.props.children).find(v=>me.isValidElement(v)&&v.type===yt);return x&&me.isValidElement(x)?x.props.placeholder??"":""},[i,n]),f=me.useMemo(()=>({value:m,onValueChange:x=>_==null?void 0:_(x),options:l,placeholder:h}),[m,_,l,h]);return s.jsx(cr.Provider,{value:f,children:i})}function wt({className:e,children:_,...r}){const{value:m,onValueChange:u,options:i,placeholder:o}=eo();return s.jsxs("div",{className:he("relative",e),...r,children:[s.jsxs("select",{value:m,onChange:n=>u(n.target.value),className:"w-full h-7 rounded border border-zinc-800 bg-zinc-900/50 text-[11px] text-left px-2 pr-6 appearance-none bg-no-repeat bg-[length:12px] bg-[right_0.25rem_center] focus:ring-2 focus:ring-blue-600 focus:outline-none",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23717171' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")`},children:[o?s.jsx("option",{value:"",children:o}):null,i.map(n=>s.jsx("option",{value:n.value,children:String(n.label)},n.value))]}),_]})}function yt(e){return null}function kt({className:e,children:_}){return s.jsx("div",{className:he("hidden",e),"aria-hidden":!0,children:_})}function dr({className:e,value:_,children:r}){return s.jsx("div",{"data-value":_,className:e,"aria-hidden":!0,children:r})}wt.displayName="SelectTrigger",yt.displayName="SelectValue",kt.displayName="SelectContent",dr.displayName="SelectItem";const ur=me.createContext(null);function hr(){const e=me.useContext(ur);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function pr({open:e,onOpenChange:_,children:r}){const[m,u]=me.useState(!1),i=e!==void 0,o=i?e:m,n=me.useCallback(h=>{i||u(h),_==null||_(h)},[i,_]),l=me.useMemo(()=>({open:o,onOpenChange:n}),[o,n]);return s.jsx(ur.Provider,{value:l,children:r})}function ro({asChild:e,children:_}){const{onOpenChange:r}=hr(),m=me.Children.only(_);return e&&me.isValidElement(m)?me.cloneElement(m,{onClick:u=>{var i,o;(o=(i=m.props).onClick)==null||o.call(i,u),r(!0)}}):s.jsx("button",{type:"button",onClick:()=>r(!0),children:_})}function fr({className:e,children:_,preventCloseOnBackdropClick:r,...m}){const{open:u,onOpenChange:i}=hr();if(me.useEffect(()=>{const n=l=>{l.key==="Escape"&&i(!1)};return u&&(document.addEventListener("keydown",n),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",n),document.body.style.overflow=""}},[u,i]),!u)return null;const o=n=>{n.preventDefault(),n.stopPropagation()};return Nr.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:o,onDrop:o}),s.jsx("div",{role:"dialog","aria-modal":!0,className:he("fixed left-1/2 top-1/2 z-[9999] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-zinc-700 bg-zinc-900 p-4 shadow-xl",e),onClick:n=>n.stopPropagation(),...m,children:_})]}),document.body)}function mr({className:e,..._}){return s.jsx("div",{className:he("flex flex-col gap-1.5 pb-4",e),..._})}function no({className:e,..._}){return s.jsx("div",{className:he("flex justify-end gap-2 pt-4",e),..._})}function br({className:e,..._}){return s.jsx("h2",{className:he("text-sm font-semibold text-white",e),..._})}function gr({className:e,..._}){return s.jsx("p",{className:he("text-xs text-zinc-400",e),..._})}const De=me.forwardRef(({className:e,variant:_="default",size:r="default",asChild:m,children:u,...i},o)=>{const n="inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 disabled:pointer-events-none disabled:opacity-50",l={default:"bg-blue-600 text-white hover:bg-blue-700",outline:"border border-zinc-700 bg-transparent hover:bg-zinc-800",ghost:"hover:bg-zinc-800"},h={sm:"h-7 px-2.5 text-xs",default:"h-9 px-4 text-sm",lg:"h-10 px-6 text-base"};if(m&&me.isValidElement(u)){const f=u,x=he(n,l[_],h[r],f.props.className,e);return me.cloneElement(f,{className:x})}return s.jsx("button",{ref:o,type:"button",className:he(n,l[_],h[r],e),...i,children:u})});De.displayName="Button";const oo=["library","upload","url"];function io({library:e,selectedId:_,onSelect:r}){const[m,u]=q.useState(""),[i,o]=q.useState("all"),n=["all",...new Set(e.flatMap(h=>h.tags??[]))],l=e.filter(h=>{const f=i==="all"||(h.tags??[]).includes(i),x=!m||(h.alt??"").toLowerCase().includes(m.toLowerCase());return f&&x});return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Wn,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),s.jsx(xt,{value:m,onChange:h=>u(h.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(h=>s.jsx("button",{type:"button",onClick:()=>o(h),className:he("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===h?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-700 text-zinc-500 hover:border-zinc-600 hover:text-zinc-400"),children:h==="all"?"Tutte":h},h))}),l.length>0?s.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(h=>{const f=_===h.id;return s.jsxs("button",{type:"button",onClick:()=>r(f?null:h.id),className:he("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",f?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[s.jsx("img",{src:h.url,alt:h.alt,loading:"lazy",className:he("w-full h-full object-cover transition-[filter] duration-150",f?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),s.jsx("div",{className:he("absolute inset-x-0 bottom-0 px-2 py-1.5","bg-gradient-to-t from-black/70 to-transparent","opacity-0 group-hover:opacity-100 transition-opacity",f&&"opacity-100"),children:s.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:h.alt})}),f&&s.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:s.jsx(nr,{size:14,className:"text-white"})})]},h.id)})}):s.jsx("div",{className:"text-center py-12 text-zinc-600 text-xs",children:"Nessuna immagine in libreria. Configura assets.assetsManifest nel tenant (es. da public/assets)."})]})}function ao({preview:e,onPreviewChange:_,onAssetUpload:r}){const[m,u]=q.useState(!1),i=q.useRef(null),o=q.useCallback(async f=>{if(fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"handleFile called",data:{fileName:f.name,hasOnAssetUpload:!!r},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!f.type.startsWith("image/"))return;if(r){try{const v=await r(f);fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"onAssetUpload resolved",data:{url:v==null?void 0:v.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),_({name:f.name,size:f.size,dataUrl:v})}catch{const v=new FileReader;v.onload=c=>{var b;_({name:f.name,size:f.size,dataUrl:(b=c.target)==null?void 0:b.result})},v.readAsDataURL(f)}return}const x=new FileReader;x.onload=v=>{var c;_({name:f.name,size:f.size,dataUrl:(c=v.target)==null?void 0:c.result})},x.readAsDataURL(f)},[_,r]),n=q.useCallback(f=>{var v,c;f.preventDefault(),f.stopPropagation(),u(!1);const x=(c=(v=f.dataTransfer)==null?void 0:v.files)==null?void 0:c[0];x&&o(x)},[o]),l=q.useCallback(f=>{f.preventDefault(),f.stopPropagation(),u(!0)},[]),h=q.useCallback(f=>{var v;const x=(v=f.target.files)==null?void 0:v[0];x&&o(x)},[o]);return s.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:f=>{f.preventDefault(),f.stopPropagation(),u(!1)},onDrop:n,onClick:()=>{var f;return!e&&((f=i.current)==null?void 0:f.click())},className:he("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",m?"border-blue-500/50 bg-blue-500/[0.04]":e?"border-zinc-800 bg-transparent cursor-default":"border-zinc-800 bg-white/[0.01] hover:border-zinc-600 hover:bg-white/[0.02]"),children:[e?s.jsxs(s.Fragment,{children:[s.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),s.jsxs("div",{className:"absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/80 to-transparent p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),s.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),s.jsx(De,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:f=>{f.stopPropagation(),_(null)},children:s.jsx(nt,{size:14})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:s.jsx(lr,{size:22})}),s.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),s.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),s.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),s.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:h})]})}function so({urlPreview:e,onUrlPreviewChange:_}){const[r,m]=q.useState(""),[u,i]=q.useState(!1),o=()=>{if(r.trim())try{new URL(r),_(r),i(!1)}catch{i(!0),_(null)}};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(Oe,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(xt,{value:r,onChange:n=>{m(n.target.value),i(!1)},onKeyDown:n=>n.key==="Enter"&&o(),placeholder:"https://images.unsplash.com/photo-...",className:he("h-8 text-xs bg-zinc-900/50 border-zinc-800",u&&"border-red-500/50")}),s.jsx(De,{type:"button",variant:"outline",onClick:o,className:"shrink-0 h-8",children:"Anteprima"})]}),u&&s.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?s.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[s.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),_(null)}}),s.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[s.jsx(nr,{size:14,className:"text-emerald-400"}),s.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):u?null:s.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[s.jsx(ir,{size:32,className:"mb-3 opacity-40"}),s.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const lo=({open:e,onOpenChange:_,onSelect:r})=>{const{assets:m}=Ze(),u=(m==null?void 0:m.assetsManifest)??[],[i,o]=q.useState("library"),[n,l]=q.useState(null),[h,f]=q.useState(null),[x,v]=q.useState(null);q.useEffect(()=>{e&&(o("library"),l(null),f(null),v(null))},[e]),q.useEffect(()=>{if(!e||i!=="upload")return;const p=()=>{fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:beforeunload",message:"beforeunload fired",data:{},timestamp:Date.now(),hypothesisId:"H1"})}).catch(()=>{})};return window.addEventListener("beforeunload",p),()=>window.removeEventListener("beforeunload",p)},[e,i]),q.useEffect(()=>{if(!e||i!=="upload")return;const p=E=>{E.preventDefault()},k={capture:!0};return document.addEventListener("dragover",p,k),document.addEventListener("drop",p,k),window.addEventListener("dragover",p,k),window.addEventListener("drop",p,k),()=>{document.removeEventListener("dragover",p,k),document.removeEventListener("drop",p,k),window.removeEventListener("dragover",p,k),window.removeEventListener("drop",p,k)}},[e,i]);const c=i==="library"&&n!=null||i==="upload"&&h!=null||i==="url"&&x!=null,b=()=>{if(i==="library"&&n){const p=u.find(k=>k.id===n);p&&r({url:p.url,alt:p.alt})}else i==="upload"&&h?r({url:h.dataUrl,alt:h.name}):i==="url"&&x&&r({url:x,alt:""});setTimeout(()=>_(!1),0)},d=i==="library"&&n?"1 immagine selezionata":i==="upload"&&h?h.name:i==="url"&&x?"URL pronto":"Nessuna selezione",g=p=>{p.preventDefault(),p.stopPropagation()};return s.jsx(pr,{open:e,onOpenChange:_,children:s.jsxs(fr,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:g,onDrop:g,children:[s.jsxs(mr,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:s.jsx(rt,{size:18})}),s.jsxs("div",{children:[s.jsx(br,{children:"Image Picker"}),s.jsx(gr,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),s.jsx("button",{type:"button",onClick:()=>_(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:s.jsx(Me,{size:18})})]}),s.jsx("div",{className:"flex border-b border-zinc-800",children:oo.map(p=>s.jsxs("button",{type:"button",onClick:()=>o(p),className:he("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===p?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[p==="library"&&s.jsx(rt,{size:14}),p==="upload"&&s.jsx(lr,{size:14}),p==="url"&&s.jsx(ir,{size:14}),p==="library"?"Libreria":p==="upload"?"Upload":"URL"]},p))}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&s.jsx(io,{library:u,selectedId:n,onSelect:l}),i==="upload"&&s.jsx(ao,{preview:h,onPreviewChange:f,onAssetUpload:m==null?void 0:m.onAssetUpload}),i==="url"&&s.jsx(so,{urlPreview:x,onUrlPreviewChange:v})]}),s.jsxs(no,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[s.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:d}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(De,{type:"button",variant:"outline",size:"sm",onClick:()=>_(!1),children:"Annulla"}),s.jsx(De,{type:"button",size:"sm",disabled:!c,onClick:b,className:he(!c&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},vr=(e,_="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("assets/"))return`/${e}`;if(e.startsWith("/uploaded-assets/"))return e;if(!/\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i.test(e))return e.startsWith("/")?e:`/${e}`;const m=e.replace(/^\//,"");return`/assets/${_}/${m}`},co=({value:e,onChange:_,label:r="IMAGE",className:m})=>{const{tenantId:u="default"}=Ze(),[i,o]=q.useState(!1),[n,l]=q.useState(!1),h=!!(e!=null&&e.url),f=e!=null&&e.url?vr(e.url,u):"",x=c=>{_(c),o(!1)},v=c=>{c.stopPropagation(),_({url:"",alt:""})};return s.jsxs("div",{className:he("space-y-1.5",m),children:[s.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),h?s.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(!0),onKeyDown:c=>c.key==="Enter"&&o(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:he("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",n&&"ring-blue-500/40"),children:[s.jsx("img",{src:f,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:c=>{c.target.style.display="none"}}),s.jsx("div",{className:he("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",n?"bg-black/50":"bg-black/0"),children:n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-1.5 bg-white/15 backdrop-blur-md rounded-lg px-3.5 py-2 text-white text-xs font-medium",children:[s.jsx(Bn,{size:13}),s.jsx("span",{children:"Cambia"})]}),s.jsx(De,{type:"button",variant:"ghost",className:"h-8 w-8 p-0 bg-red-500/15 backdrop-blur-md text-red-300 hover:text-red-200 hover:bg-red-500/25",onClick:v,children:s.jsx(nt,{size:13})})]})}),s.jsx("div",{className:"px-2.5 py-1.5 bg-black/50 text-[10px] text-zinc-500 truncate",children:((e==null?void 0:e.url)??"").length>50?"…"+((e==null?void 0:e.url)??"").slice(-47):(e==null?void 0:e.url)??""})]}):s.jsxs("button",{type:"button",onClick:()=>o(!0),className:he("w-full rounded-lg border-2 border-dashed border-zinc-800 py-7","flex flex-col items-center gap-2","bg-white/[0.01] transition-all","hover:border-blue-500/30 hover:bg-blue-500/[0.03]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),children:[s.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:s.jsx(rt,{size:18})}),s.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),s.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),s.jsx(lo,{open:i,onOpenChange:o,onSelect:x})]})},xr=[{name:"layers",Icon:gt},{name:"github",Icon:Rn},{name:"arrow-right",Icon:Tn},{name:"box",Icon:Dn},{name:"terminal",Icon:Hn},{name:"chevron-right",Icon:Ln},{name:"menu",Icon:Mn},{name:"x",Icon:Me},{name:"sparkles",Icon:$n},{name:"zap",Icon:Vn}],Ge={"ui:text":({label:e,value:_,onChange:r})=>s.jsxs("div",{className:"grid w-full items-center gap-1.5 mb-4",children:[s.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsx(xt,{type:"text",className:"h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600",value:_||"",onChange:m=>r(m.target.value)})]}),"ui:textarea":({label:e,value:_,onChange:r})=>s.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[s.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsx(Xn,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:_||"",onChange:m=>r(m.target.value)})]}),"ui:select":({label:e,value:_,onChange:r,options:m=[]})=>s.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[s.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsxs(to,{value:_||"",onValueChange:r,children:[s.jsx(wt,{className:"w-full h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus:ring-blue-600",children:s.jsx(yt,{placeholder:"Select..."})}),s.jsx(kt,{className:"dark",children:m.map(u=>s.jsx(dr,{value:u,className:"text-[11px]",children:u},u))})]})]}),"ui:checkbox":({label:e,value:_,onChange:r})=>s.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2 rounded border border-zinc-800/50 bg-zinc-900/20",children:[s.jsx(Qn,{id:e,checked:!!_,onCheckedChange:m=>r(m===!0)}),s.jsx(Oe,{htmlFor:e,className:"text-[11px] font-medium cursor-pointer select-none text-zinc-300",children:e})]}),"ui:image-picker":({label:e,value:_,onChange:r})=>{const m=_!=null&&typeof _=="object"&&"url"in _?{url:String(_.url??""),alt:String(_.alt??"")}:{url:typeof _=="string"?_:"",alt:""},u=i=>{r(i)};return s.jsx("div",{className:"mb-4",children:s.jsx(co,{label:e,value:m,onChange:u})})},"ui:icon-picker":({label:e,value:_,onChange:r})=>{const[m,u]=q.useState(!1),i=xr.find(o=>o.name===(_||""));return s.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[s.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsxs(pr,{open:m,onOpenChange:u,children:[s.jsx(ro,{asChild:!0,children:s.jsx(De,{variant:"outline",className:"w-full h-9 rounded-md border border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 flex items-center gap-2 text-left",children:i?s.jsxs(s.Fragment,{children:[s.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),s.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):s.jsxs(s.Fragment,{children:[s.jsx(rt,{size:16,className:"text-zinc-500 shrink-0"}),s.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),s.jsxs(fr,{className:"sm:max-w-[280px] p-4",children:[s.jsxs(mr,{children:[s.jsx(br,{className:"text-sm",children:"Choose icon"}),s.jsx(gr,{className:"text-xs",children:"Click an icon to select it."})]}),s.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:xr.map(({name:o,Icon:n})=>s.jsx("button",{type:"button",onClick:()=>{r(o),u(!1)},className:he("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",_===o?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 text-zinc-400 hover:text-zinc-200"),title:o,children:s.jsx(n,{size:20})},o))})]})]})]})}},_t=e=>{if(e instanceof je.z.ZodOptional||e instanceof je.z.ZodDefault)return _t(e._def.innerType);if(e instanceof je.z.ZodObject){const _={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(_[r]=_t(e.shape[r]));return _}return e instanceof je.z.ZodArray?[]:e instanceof je.z.ZodString?"":e instanceof je.z.ZodNumber?0:e instanceof je.z.ZodBoolean?!1:e instanceof je.z.ZodEnum?e._def.values[0]:null},zt=e=>e instanceof je.z.ZodOptional||e instanceof je.z.ZodDefault?zt(e._def.innerType):e,it=(e,_)=>e&&!_?"opacity-10":"opacity-100",Be=(e,_)=>e!=null&&_.toLowerCase()===e.toLowerCase(),uo=(e,_)=>{if(!e)return;const r=_.toLowerCase(),m=Object.entries(e).find(([u])=>u.toLowerCase()===r);return m==null?void 0:m[1]},Ve=({schema:e,data:_,onChange:r,keys:m,expandedItemPath:u,expandedItemIdByField:i,focusedFieldKey:o,onSidebarExpandedItemChange:n})=>{const l=e.shape,h=m!=null?Object.keys(l).filter(b=>m.includes(b)):Object.keys(l),f=u==null?void 0:u[0],x=(f==null?void 0:f.itemId)!=null?{[f.fieldKey]:f.itemId}:i,v=(f==null?void 0:f.fieldKey)??o??null,c=v!=null;return s.jsx("div",{className:"space-y-4",children:h.map(b=>{const d=l[b];if(!d)return null;const g=zt(d),p=d.description||"ui:text",k=_[b];if(p==="ui:image-picker"&&g instanceof je.z.ZodObject){const O=Be(v,b),L=Ge["ui:image-picker"]||Ge["ui:text"];return s.jsx("div",{className:`transition-opacity duration-200 ${it(c,O)}`,...O?{"data-jp-focused-field":b}:{},children:s.jsx(L,{label:b,value:k,onChange:D=>r({..._,[b]:D})})},b)}if(g instanceof je.z.ZodObject){const O=k||{},L=Be(v,b);return s.jsxs("div",{className:`group/obj mb-6 p-4 border border-zinc-800 rounded-lg bg-zinc-900/20 hover:border-zinc-700 transition-[border-color,opacity] duration-200 ${it(c,L)}`,...L?{"data-jp-focused-field":b}:{},children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),s.jsx("h4",{className:"text-[10px] font-black uppercase text-zinc-400 tracking-widest",children:b})]}),s.jsx(Ve,{schema:g,data:O,onChange:D=>r({..._,[b]:D}),expandedItemPath:u&&Be(f==null?void 0:f.fieldKey,b)?u.slice(1):void 0,expandedItemIdByField:x,focusedFieldKey:v})]},b)}if(g instanceof je.z.ZodArray){const O=Array.isArray(k)?k:[],L=zt(g.element),D=(j,R)=>{if(R<0||R>=O.length)return;const a=[...O],[M]=a.splice(j,1);a.splice(R,0,M),r({..._,[b]:a})},T=Be(v,b),V=Be(f==null?void 0:f.fieldKey,b)?f==null?void 0:f.itemId:void 0,re=uo(x,b)??V;return s.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${it(c,T)}`,...T?{"data-jp-focused-field":b}:{},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("label",{className:"text-[10px] font-black uppercase text-zinc-500 tracking-widest",children:[b," (",O.length,")"]}),s.jsxs("button",{type:"button",onClick:()=>{const j=_t(L);r({..._,[b]:[...O,j]})},className:"flex items-center gap-1 px-2 py-1 bg-blue-600/10 hover:bg-blue-600/20 text-blue-500 rounded text-[10px] font-bold transition-colors",children:[s.jsx(ar,{size:12})," Add Item"]})]}),s.jsx("div",{className:"space-y-2",children:O.map((j,R)=>{const a=j,M=a.id||`legacy-${R}`,te=(typeof a.title=="string"?a.title:null)||(typeof a.label=="string"?a.label:null)||(typeof a.name=="string"?a.name:null)||(typeof a.content=="string"?a.content:null)||(typeof a.text=="string"?a.text:null)||`${b} #${R+1}`,U=re,W=String(a.id??M),K=U!=null&&String(U)===W,X=K&&u&&u.length>1?u.slice(1):void 0,z=c&&T&&U!=null&&!K;return s.jsx(ho,{itemId:W,openItemId:U!=null?String(U):void 0,isFaded:z,index:R,isFirst:R===0,isLast:R===O.length-1,label:te,onExpandedChange:n?N=>n(N?{fieldKey:b,itemId:W}:null):void 0,onRemove:()=>{const N=O.filter((J,G)=>G!==R);r({..._,[b]:N})},onMoveUp:()=>D(R,R-1),onMoveDown:()=>D(R,R+1),children:L instanceof je.z.ZodObject?s.jsx(Ve,{schema:L,data:a||{},expandedItemPath:X,onChange:N=>{const J=[...O];J[R]=N,r({..._,[b]:J})}}):s.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},M)})})]},b)}const E=Ge[p]||Ge["ui:text"],S=g instanceof je.z.ZodEnum?g._def.values:void 0,C=Be(v,b);return s.jsx("div",{className:`transition-opacity duration-200 ${it(c,C)}`,...C?{"data-jp-focused-field":b}:{},children:s.jsx(E,{label:b,value:k,options:S,onChange:O=>r({..._,[b]:O})})},b)})})},ho=({itemId:e,openItemId:_,isFaded:r=!1,label:m,onExpandedChange:u,onRemove:i,onMoveUp:o,onMoveDown:n,isFirst:l,isLast:h,children:f})=>{const x=_!=null&&String(_)===String(e),[v,c]=q.useState(x);q.useEffect(()=>{x&&!v&&c(!0),!x&&v&&c(!1)},[x,v]);const b=()=>{const g=!v;c(g),u==null||u(g)},d=x&&v;return s.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...d?{"data-jp-expanded-item":e}:{},children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsxs("button",{type:"button",onClick:b,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[v?s.jsx(mt,{size:12,className:"shrink-0"}):s.jsx(ft,{size:12,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:m})]})}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[s.jsx("button",{type:"button",disabled:l,onClick:o,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:s.jsx(On,{size:12})}),s.jsx("button",{type:"button",disabled:h,onClick:n,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:s.jsx(In,{size:12})}),s.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),s.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:s.jsx(nt,{size:12})})]})]}),v&&s.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:f})]})},wr=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),yr=({selectedSection:e,pageData:_,allSectionsData:r=[],onUpdate:m,onUpdateSection:u,onClose:i,expandedItemPath:o=null,onReorderSection:n,allLayers:l=[],activeSectionId:h,onRequestScrollToSection:f,onDeleteSection:x,onAddSection:v,hasChanges:c=!1,onExportHTML:b,onSaveToFile:d,saveSuccessFeedback:g=!1,onResetToFile:p,showResetToFile:k=!1})=>{const{schemas:E}=Ze(),[S,C]=q.useState(!0),[O,L]=q.useState(null),[D,T]=q.useState(null),[V,re]=q.useState(null),[j,R]=q.useState(null),[a,M]=q.useState(null),te=q.useRef(null),U=q.useRef(null),W=q.useDeferredValue(e),K=e!=null&&(W==null?void 0:W.id)!==e.id,X=o&&o.length>0?o:j?[j]:null,z=X!=null&&X.length?{fieldKey:X[X.length-1].fieldKey,itemId:X[X.length-1].itemId}:null,N=q.useRef(o);q.useEffect(()=>{N.current!=null&&o==null&&R(null),N.current=o},[o]),q.useEffect(()=>{(e==null?void 0:e.id)!=null&&C(!1)},[e==null?void 0:e.id]);const J=()=>{const A=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const y=te.current;y&&y.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(A)},G=q.useRef(S);q.useEffect(()=>{if(S&&!G.current){const A=J();return G.current=S,A}G.current=S},[S]),q.useEffect(()=>{if(!z)return;const A=te.current;if(!A)return;const y=requestAnimationFrame(()=>{const w=A.querySelector("[data-jp-expanded-item]")??A.querySelector("[data-jp-focused-field]");w&&w.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(y)},[z]);const Q=A=>{C(!1),f==null||f(A)},ue=()=>{C(A=>{const y=!A;return y&&J(),y})},ie=(A,y)=>{y.stopPropagation(),r.length>0&&u?M(A):(C(!1),f==null||f(A))};q.useEffect(()=>{if(a==null)return;const A=y=>{y.key==="Escape"&&M(null)};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[a]);const le=A=>{O===A?(x==null||x(A),L(null)):(L(A),setTimeout(()=>L(null),3e3))},ce=(A,y)=>{T(y),A.dataTransfer.effectAllowed="move",A.dataTransfer.setData("application/json",JSON.stringify({sectionId:y}))},ge=(A,y)=>{A.preventDefault(),D!==y&&re(y)},fe=(A,y)=>{if(A.preventDefault(),T(null),re(null),!D||D===y||!n)return;const w=l.filter(Z=>Z.scope==="local"),I=w.findIndex(Z=>Z.id===D),$=w.findIndex(Z=>Z.id===y);I===-1||$===-1||n(D,$)},we=e?_.sections.find(A=>A.id===e.id):void 0,ze=W?_.sections.find(A=>A.id===W.id):void 0,t=W?E[W.type]:void 0,H=l.length>0&&(S||!e);return s.jsxs("aside",{className:"relative w-full h-full bg-zinc-950 border-l border-zinc-800 flex flex-col shadow-2xl shrink-0 min-w-0 animate-in slide-in-from-right duration-300",children:[s.jsxs("div",{className:"sticky top-0 z-10 flex flex-col shrink-0 bg-zinc-950 border-b border-zinc-800",children:[s.jsxs("div",{className:"py-2 px-3 flex justify-between items-center bg-zinc-900/50",children:[s.jsx("div",{className:"flex items-center gap-2 min-w-0",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold text-white leading-tight",children:"Inspector"}),s.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider flex items-center gap-1.5 leading-tight mt-0.5",children:e?s.jsxs(s.Fragment,{children:[n&&e.scope==="local"&&s.jsx("span",{className:"text-zinc-500 shrink-0",title:"Reorder section on page",children:s.jsx(bt,{size:12,strokeWidth:2})}),s.jsx("span",{className:"text-blue-400",children:e.type}),s.jsx("span",{className:"text-zinc-600",children:"|"}),s.jsx("span",{className:"text-zinc-500",children:e.scope})]}):s.jsx("span",{className:"text-zinc-500",children:"Waiting for Selection..."})})]})}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[v!=null&&s.jsxs("button",{type:"button",onClick:v,className:"flex items-center gap-1.5 text-zinc-500 hover:text-white transition-colors p-1 hover:bg-zinc-800 rounded",title:"Add section","aria-label":"Add section",children:[s.jsx(ar,{size:16}),s.jsx("span",{className:"text-xs font-medium",children:"Add section"})]}),s.jsx("button",{type:"button",onClick:i,className:"p-1 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors",title:"Close Inspector","aria-label":"Close Inspector",children:s.jsx(Me,{size:16})})]})]}),l.length>0&&s.jsxs("div",{className:"bg-zinc-900/20 opacity-100",children:[s.jsxs("button",{type:"button",onClick:ue,className:"w-full flex items-center justify-between py-3 px-4 hover:bg-zinc-800/30 transition-colors cursor-pointer text-left rounded-none border-0 bg-transparent","aria-expanded":H,"aria-label":H?"Collapse Page Layers":"Expand Page Layers",children:[s.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(gt,{size:14,className:"text-primary shrink-0"}),s.jsx("span",{className:"text-xs font-bold text-white",children:"Page Layers"}),s.jsxs("span",{className:"text-[10px] text-zinc-500",children:["(",l.length,")"]})]}),s.jsx("span",{className:"text-zinc-500 shrink-0 pointer-events-none","aria-hidden":!0,children:H?s.jsx(mt,{size:14}):s.jsx(ft,{size:14})})]}),!H&&e&&(()=>{const A=l.find(w=>w.id===e.id);if(!A)return null;const y=h===e.id;return s.jsxs("div",{className:"px-3 py-2 flex items-center gap-2 bg-primary/10 border-t border-zinc-800/50",children:[s.jsx(bt,{size:12,className:"text-primary shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-primary truncate flex items-center gap-1",children:[A.type,y&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),s.jsx("p",{className:"text-xs text-white font-medium truncate",children:A.title??`${A.type} section`})]}),s.jsx("button",{type:"button",onClick:w=>ie(A.id,w),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${A.type}`,"aria-label":`Open settings for ${A.type} section`,children:s.jsx(sr,{size:12})})]})})()]})]}),s.jsxs("div",{ref:te,className:"flex-1 min-h-0 overflow-y-auto flex flex-col custom-scrollbar",children:[H&&s.jsxs("div",{className:"border-b border-zinc-800 bg-zinc-900/20 px-3 pb-3 pt-1",children:[l.map(A=>{const y=(e==null?void 0:e.id)===A.id,w=h===A.id,I=D===A.id,$=V===A.id,Z=A.scope==="local"&&x,Y=A.scope==="local"&&!!n;return s.jsxs("div",{draggable:Y,onDragStart:F=>Y&&ce(F,A.id),onDragOver:F=>Y&&ge(F,A.id),onDragLeave:()=>re(null),onDrop:F=>Y&&fe(F,A.id),onDragEnd:()=>{T(null),re(null)},className:he("flex items-center gap-2 py-2.5 px-2 rounded-sm border-t transition-colors",$&&"border-t-2 border-dashed border-primary bg-primary/5",!$&&y&&"border-primary/30 bg-primary/10",!$&&!y&&"border-zinc-800/90 hover:bg-zinc-800/40",I&&"opacity-40",Y?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[s.jsx(bt,{size:12,className:`shrink-0 ${y?"text-primary":"text-zinc-500"}`}),s.jsxs("button",{type:"button",onClick:()=>Q(A.id),className:"flex-1 min-w-0 text-left",children:[s.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-zinc-400 truncate flex items-center gap-1",children:[A.type,w&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),s.jsx("p",{className:`text-xs truncate ${y?"text-white font-medium":"text-zinc-500"}`,children:A.title??`${A.type} section`})]}),s.jsx("button",{type:"button",onClick:F=>ie(A.id,F),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${A.type}`,"aria-label":`Open settings for ${A.type} section`,children:s.jsx(sr,{size:12})}),Z&&s.jsx("button",{type:"button",onClick:F=>{F.stopPropagation(),le(A.id)},className:`p-1 rounded shrink-0 ${O===A.id?"bg-red-500/20 text-red-400":"text-zinc-500 hover:text-red-400"}`,title:"Delete section",children:s.jsx(nt,{size:12})})]},A.id)}),O&&s.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 rounded-md bg-amber-500/10 border border-amber-500/30",children:[s.jsx(Pn,{size:12,className:"text-amber-500 shrink-0"}),s.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]}),z&&we&&(()=>{const A=we.data||{};let y;if(X&&X.length>0){let w=A;for(const Z of X){const P=w==null?void 0:w[Z.fieldKey];Z.itemId!=null&&Array.isArray(P)?w=P.find(F=>String(F==null?void 0:F.id)===String(Z.itemId))??null:w=P}const I=w||{},$=z.fieldKey;y=(typeof I.name=="string"?I.name:null)??(typeof I.title=="string"?I.title:null)??(typeof I.label=="string"?I.label:null)??$.charAt(0).toUpperCase()+$.slice(1).replace(/([A-Z])/g," $1").trim()}else{const w=z.fieldKey;if(z.itemId!=null){const Z=(Array.isArray(A[w])?A[w]:[]).find(P=>String(P==null?void 0:P.id)===String(z.itemId))||{};y=(typeof Z.name=="string"?Z.name:null)??(typeof Z.title=="string"?Z.title:null)??(typeof Z.label=="string"?Z.label:null)??w}else y=w.charAt(0).toUpperCase()+w.slice(1).replace(/([A-Z])/g," $1").trim()}return s.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),s.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:y})]})})(),s.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&C(!1),children:e?K?s.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[s.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),s.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),s.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),s.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),s.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):t?(()=>{const y=Object.keys(t.shape).filter(P=>!wr.has(P)),w=(ze==null?void 0:ze.data)||{};if(y.length===0)return s.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const I=X==null?void 0:X[0],$=(I==null?void 0:I.itemId)!=null?{[I.fieldKey]:I.itemId}:(z==null?void 0:z.itemId)!=null?{[z.fieldKey]:z.itemId}:void 0,Z=(I==null?void 0:I.fieldKey)??(z==null?void 0:z.fieldKey)??null;return s.jsx(Ve,{schema:t,data:w,onChange:P=>m(P),keys:y,expandedItemPath:X,expandedItemIdByField:$,focusedFieldKey:Z,onSidebarExpandedItemChange:R})})():s.jsxs("div",{className:"text-xs text-red-400 p-4 border border-dashed border-red-900/30 rounded bg-red-900/10",children:["No schema found for ",(W==null?void 0:W.type)??e.type]}):s.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"Select a layer above or on the stage to edit."})})]}),s.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center gap-3 opacity-100 flex-wrap",children:(b!=null||d!=null||p!=null)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:he("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",c?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),s.jsx("span",{className:he("text-xs font-medium transition-colors duration-300 shrink-0",g?"text-emerald-400":c?"text-amber-500":"text-zinc-500"),children:g?"Salvato":c?"Unsaved Changes":"All Changes Saved"}),b!=null&&s.jsxs("button",{type:"button",onClick:b,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[s.jsx(or,{size:12,className:"shrink-0"}),s.jsx("span",{children:"HTML"})]}),d!=null&&s.jsxs("button",{type:"button",onClick:A=>{A.preventDefault(),A.stopPropagation(),d()},disabled:!c,className:he("shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all",c?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),title:"Salva le modifiche sui file JSON del repo",children:[s.jsx(Un,{size:12,className:"shrink-0"}),s.jsx("span",{children:"Save"})]}),p!=null&&k&&s.jsx("button",{type:"button",onClick:p,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-400 hover:bg-zinc-800 hover:border-zinc-600 hover:text-zinc-300",title:"Ripristina la pagina dal file (elimina le modifiche in memoria)",children:s.jsx("span",{children:"Ripristina da file"})})]})}),a!=null&&r.length>0&&u!=null&&(()=>{const A=r.find(F=>F.id===a),y=l.find(F=>F.id===a);if(!A)return null;const w=(y==null?void 0:y.scope)==="global"?"global":"local",I=A.type,$=E[I],P=($?Object.keys($.shape):[]).filter(F=>wr.has(F)),Y=A.data??{};return P.length===0?s.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:()=>M(null),children:s.jsxs("div",{ref:U,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:F=>F.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[s.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",I]}),s.jsx("button",{type:"button",onClick:()=>M(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:s.jsx(Me,{size:18})})]}),s.jsx("div",{className:"p-4",children:s.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):s.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:F=>F.target===F.currentTarget&&M(null),children:s.jsxs("div",{ref:U,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full max-h-[85vh] flex flex-col overflow-hidden",onClick:F=>F.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[s.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",I]}),s.jsx("button",{type:"button",onClick:()=>M(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:s.jsx(Me,{size:18})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:s.jsx(Ve,{schema:$,data:Y,onChange:F=>{const B={...A.data,...F};u(a,w,I,B)},keys:P})})]})})})()]})},kr=({draft:e,globalDraft:_,themeConfig:r,slug:m,selectedId:u,scrollToSectionId:i,onScrollRequested:o})=>{const n=q.useRef(null),l=q.useCallback(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.UPDATE_DRAFTS,draft:e,globalDraft:_,themeConfig:r},"*")},[e,_,r]);return q.useEffect(()=>{l()},[l]),q.useEffect(()=>{const h=f=>{f.data.type===ve.STAGE_READY&&l()};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[l]),q.useEffect(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.SYNC_SELECTION,selectedId:u},"*")},[u]),q.useEffect(()=>{var h;!i||!((h=n.current)!=null&&h.contentWindow)||(n.current.contentWindow.postMessage({type:ve.REQUEST_SCROLL_TO_SECTION,sectionId:i},"*"),o==null||o())},[i,o]),s.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:s.jsx("iframe",{ref:n,src:`/admin/preview/${m}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},at={setTheme:e=>{const _=document.documentElement,{tokens:r}=e,m={"--theme-primary":r.colors.primary,"--theme-secondary":r.colors.secondary,"--theme-accent":r.colors.accent,"--theme-background":r.colors.background,"--theme-surface":r.colors.surface,"--theme-surface-alt":r.colors.surfaceAlt,"--theme-text":r.colors.text,"--theme-text-muted":r.colors.textMuted,"--theme-border":r.colors.border,"--theme-font-primary":r.typography.fontFamily.primary,"--theme-font-mono":r.typography.fontFamily.mono,"--theme-radius-sm":r.borderRadius.sm,"--theme-radius-md":r.borderRadius.md,"--theme-radius-lg":r.borderRadius.lg};Object.entries(m).forEach(([u,i])=>{_.style.setProperty(u,i)})}},_r=()=>{var c;const[e,_]=q.useState(null),[r,m]=q.useState(null),[u,i]=q.useState(null),[o,n]=q.useState(null),[l,h]=q.useState(!1);if(q.useEffect(()=>{const b=d=>{d.data.type===ve.UPDATE_DRAFTS&&(_(d.data.draft),m(d.data.globalDraft),d.data.themeConfig&&at.setTheme(d.data.themeConfig)),d.data.type===ve.SYNC_SELECTION&&i(d.data.selectedId),d.data.type===ve.REQUEST_SCROLL_TO_SECTION&&n(d.data.sectionId??null),d.data.type===ve.REQUEST_CLEAN_HTML&&(h(!0),setTimeout(()=>{const g=document.documentElement.outerHTML;window.parent.postMessage({type:ve.SEND_CLEAN_HTML,html:g},"*"),h(!1)},50))};return window.addEventListener("message",b),window.parent.postMessage({type:ve.STAGE_READY},"*"),()=>window.removeEventListener("message",b)},[]),q.useEffect(()=>{const b=d=>{var j,R,a,M,te,U,W,K;const g=d.target,p=d.clientX,k=d.clientY;let E=null,S=g;for(;S&&S!==document.body;){const X=(j=S.getAttribute)==null?void 0:j.call(S,"data-section-id"),z=(R=S.getAttribute)==null?void 0:R.call(S,"data-section-type"),N=(a=S.getAttribute)==null?void 0:a.call(S,"data-section-scope");if(X&&z&&N){E=S;break}S=S.parentElement}if(!E)return;d.preventDefault(),d.stopPropagation();const C=E.getAttribute("data-section-id"),O=E.getAttribute("data-section-type"),L=E.getAttribute("data-section-scope");if(!C||!O||!L)return;const D={id:C,type:O,scope:L};if(g===E){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}const T=document.elementFromPoint(p,k)??g;if(!T||!E.contains(T)){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}if(T===E){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}const V=[];for(S=T;S&&S!==E;){const X=(M=S.getAttribute)==null?void 0:M.call(S,"data-jp-item-id"),z=(te=S.getAttribute)==null?void 0:te.call(S,"data-jp-item-field");X&&z&&V.push({fieldKey:z||"items",itemId:X}),S=S.parentElement}if(V.reverse(),V.length===0)for(S=T;S&&S!==E;){const X=(U=S.getAttribute)==null?void 0:U.call(S,"data-jp-field");if(X){V.push({fieldKey:X});break}S=S.parentElement}if(V.length===0&&T){let X=null;const z=N=>{var G,Q;const J=N.getBoundingClientRect();if(J.left<=p&&p<=J.right&&J.top<=k&&k<=J.bottom){for(let ue=0;ue<N.children.length;ue++)z(N.children[ue]);((G=N.getAttribute)!=null&&G.call(N,"data-jp-item-id")||(Q=N.getAttribute)!=null&&Q.call(N,"data-jp-field"))&&(X=N)}};if(z(T),X){const N=X,J=(W=N.getAttribute)==null?void 0:W.call(N,"data-jp-item-id"),G=(K=N.getAttribute)==null?void 0:K.call(N,"data-jp-field");J&&G?V.push({fieldKey:G||"items",itemId:J}):G&&V.push({fieldKey:G})}}const re={type:ve.SECTION_SELECT,section:D};if(V.length>0){re.itemPath=V;const X=V[0];X.itemId!=null?(re.itemField=X.fieldKey,re.itemId=X.itemId):re.itemField=X.fieldKey}window.parent.postMessage(re,"*")};return document.addEventListener("click",b,!0),()=>document.removeEventListener("click",b,!0)},[]),q.useEffect(()=>{if(!o)return;const b=setTimeout(()=>n(null),600);return()=>clearTimeout(b)},[o]),!e||!r)return s.jsx("div",{className:"flex items-center justify-center h-screen w-full bg-zinc-950 text-zinc-500 font-mono text-xs uppercase tracking-widest animate-pulse",children:"Waiting for Studio Signal..."});const f=(c=r.header)==null?void 0:c.data,x={main:(f==null?void 0:f.links)??[]},v=b=>{window.parent.postMessage({type:ve.ACTIVE_SECTION_CHANGED,activeSectionId:b},"*")};return s.jsx(tt,{mode:l?"visitor":"studio",children:s.jsx("div",{className:l?"":"jp-ice-active",children:s.jsx(vt,{pageConfig:e,siteConfig:r,menuConfig:x,selectedId:l?null:u,scrollToSectionId:o,onActiveSectionChange:v})})})};function po(e){return e.split("-").map(_=>_.charAt(0).toUpperCase()+_.slice(1).toLowerCase()).join(" ")}const zr=({open:e,onClose:_,sectionTypes:r,sectionTypeLabels:m,onSelect:u})=>{if(q.useEffect(()=>{if(!e)return;const o=n=>{n.key==="Escape"&&_()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,_]),!e)return null;const i=o=>(m==null?void 0:m[o])??po(o);return s.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"jp-add-section-title",children:[s.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:_,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md max-h-[85vh] flex flex-col rounded-xl border border-zinc-700 bg-zinc-900 shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:s.jsx(gt,{size:18})}),s.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),s.jsx("button",{type:"button",onClick:_,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:s.jsx(Me,{size:18})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?s.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):s.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(o=>s.jsx("li",{role:"option",children:s.jsxs("button",{type:"button",onClick:()=>{u(o),_()},className:he("w-full flex items-center gap-3 px-4 py-3 rounded-lg text-left","border border-zinc-700/80 bg-zinc-800/50","hover:border-blue-500/40 hover:bg-zinc-800 transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:ring-offset-2 focus:ring-offset-zinc-900"),children:[s.jsx("span",{className:"flex items-center justify-center w-9 h-9 rounded-md bg-zinc-700/80 text-zinc-400 text-xs font-mono shrink-0",children:o}),s.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(o)})]})},o))})}),s.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:s.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},jr=()=>s.jsxs("div",{style:{"--local-bg":"var(--color-background)","--local-text":"var(--color-text)","--local-text-muted":"var(--color-text-muted)","--local-primary":"var(--color-primary)","--local-radius-md":"var(--radius-md)"},className:"min-h-screen flex flex-col items-center justify-center bg-[var(--local-bg)] px-6",children:[s.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),s.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),s.jsx("a",{href:"/",className:"inline-flex items-center gap-2 px-6 py-3 rounded-[var(--local-radius-md)] bg-[var(--local-primary)] text-[var(--local-bg)] font-semibold text-sm hover:opacity-90 transition-opacity",children:"Back to Home"})]}),fo='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-900:oklch(39.6% .141 25.723);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-primary:var(--primary)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-3{left:calc(var(--spacing)*3)}.z-0{z-index:0}.z-10{z-index:10}.z-50,.z-\\[50\\]{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[70\\]{z-index:70}.z-\\[100\\]{z-index:100}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing)*4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-20{height:calc(var(--spacing)*20)}.h-40{height:calc(var(--spacing)*40)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[45vh\\]{max-height:45vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[320px\\]{max-height:320px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-\\[18px\\]{min-height:18px}.min-h-\\[80px\\]{min-height:80px}.min-h-\\[240px\\]{min-height:240px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\/4{width:75%}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[280px\\]{max-width:280px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[18px\\]{min-width:18px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3{--tw-translate-x:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-pulse{animation:var(--animate-pulse)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[var\\(--local-radius-md\\)\\]{border-radius:var(--local-radius-md)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-primary,.border-primary\\/30{border-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\\/30{border-color:color-mix(in oklab,var(--color-primary)30%,transparent)}}.border-red-500\\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-900\\/30{border-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.border-red-900\\/30{border-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\\/80{border-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/80{border-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-zinc-800\\/50{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/50{border-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.border-zinc-800\\/90{border-color:#27272ae6}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/90{border-color:color-mix(in oklab,var(--color-zinc-800)90%,transparent)}}.bg-\\[var\\(--color-background\\)\\]{background-color:var(--color-background)}.bg-\\[var\\(--local-bg\\)\\]{background-color:var(--local-bg)}.bg-\\[var\\(--local-primary\\)\\]{background-color:var(--local-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/5{background-color:color-mix(in oklab,var(--color-amber-500)5%,transparent)}}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-background{background-color:var(--color-background)}.bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/15{background-color:color-mix(in oklab,var(--color-blue-500)15%,transparent)}}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\\/\\[0\\.04\\]{background-color:#3080ff0a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/\\[0\\.04\\]{background-color:color-mix(in oklab,var(--color-blue-500)4%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\\/10{background-color:#155dfc1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\\/10{background-color:color-mix(in oklab,var(--color-blue-600)10%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-primary\\/5{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--color-primary)5%,transparent)}}.bg-primary\\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-500\\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-red-900\\/10{background-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.bg-red-900\\/10{background-color:color-mix(in oklab,var(--color-red-900)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\\/15{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/\\[0\\.01\\]{background-color:#ffffff03}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.01\\]{background-color:color-mix(in oklab,var(--color-white)1%,transparent)}}.bg-white\\/\\[0\\.02\\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-700\\/80{background-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\\/80{background-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-800\\/60{background-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/60{background-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.bg-zinc-800\\/80{background-color:#27272acc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/80{background-color:color-mix(in oklab,var(--color-zinc-800)80%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/20{background-color:#18181b33}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/20{background-color:color-mix(in oklab,var(--color-zinc-900)20%,transparent)}}.bg-zinc-900\\/40{background-color:#18181b66}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/40{background-color:color-mix(in oklab,var(--color-zinc-900)40%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab,var(--color-zinc-900)60%,transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/80{background-color:#09090bcc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/80{background-color:color-mix(in oklab,var(--color-zinc-950)80%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab,red,red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab,var(--color-black)70%,transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-\\[length\\:12px\\]{background-size:12px}.bg-\\[right_0\\.25rem_center\\]{background-position:right .25rem center}.bg-no-repeat{background-repeat:no-repeat}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-6{padding-right:calc(var(--spacing)*6)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-\\[var\\(--local-bg\\)\\]{color:var(--local-bg)}.text-\\[var\\(--local-text\\)\\]{color:var(--local-text)}.text-\\[var\\(--local-text-muted\\)\\]{color:var(--local-text-muted)}.text-amber-200{color:var(--color-amber-200)}.text-amber-500{color:var(--color-amber-500)}.text-amber-500\\/70{color:#f99c00b3}@supports (color:color-mix(in lab,red,red)){.text-amber-500\\/70{color:color-mix(in oklab,var(--color-amber-500)70%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_8px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-blue-900\\/20{--tw-shadow-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.shadow-blue-900\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-900)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-blue-500\\/40{--tw-ring-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.ring-blue-500\\/40{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.ring-zinc-800{--tw-ring-color:var(--color-zinc-800)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-zinc-900{--tw-ring-offset-color:var(--color-zinc-900)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.brightness-\\[0\\.6\\]{--tw-brightness:brightness(.6);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.brightness-\\[0\\.85\\]{--tw-brightness:brightness(.85);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-\\[border-color\\,opacity\\]{transition-property:border-color,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:border-dashed:is(:where(.group):hover *){--tw-border-style:dashed;border-style:dashed}.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:brightness-100:is(:where(.group):hover *){--tw-brightness:brightness(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-500\\/30:hover{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/30:hover{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\\:border-blue-500\\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/40:hover{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.hover\\:border-zinc-600:hover{border-color:var(--color-zinc-600)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:#3080ff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-blue-500)3%,transparent)}}.hover\\:bg-blue-600\\/20:hover{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/20:hover{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-primary\\/40:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/40:hover{background-color:color-mix(in oklab,var(--color-primary)40%,transparent)}}.hover\\:bg-red-500\\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab,var(--color-red-500)25%,transparent)}}.hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\\:bg-zinc-800\\/30:hover{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/30:hover{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.hover\\:bg-zinc-800\\/40:hover{background-color:#27272a66}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/40:hover{background-color:color-mix(in oklab,var(--color-zinc-800)40%,transparent)}}.hover\\:bg-zinc-800\\/50:hover{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/50:hover{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-red-200:hover{color:var(--color-red-200)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:opacity-90:hover{opacity:.9}.hover\\:ring-zinc-600:hover{--tw-ring-color:var(--color-zinc-600)}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.focus\\:ring-blue-600:focus{--tw-ring-color:var(--color-blue-600)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-zinc-900:focus{--tw-ring-offset-color:var(--color-zinc-900)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-zinc-900:focus-visible{--tw-ring-offset-color:var(--color-zinc-900)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-primary\\/60:active{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.active\\:bg-primary\\/60:active{background-color:color-mix(in oklab,var(--color-primary)60%,transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}}:root{--background:oklch(14.1% .005 285.823);--foreground:oklch(98.5% 0 0);--card:oklch(21% .006 285.885);--card-foreground:oklch(98.5% 0 0);--popover:oklch(21% .006 285.885);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(42% .18 266);--primary-foreground:oklch(97% .014 254.604);--secondary:oklch(27.4% .006 286.033);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(27.4% .006 286.033);--muted-foreground:oklch(70.5% .015 286.067);--accent:oklch(42% .18 266);--accent-foreground:oklch(97% .014 254.604);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(97% .014 254.604);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.2% .016 285.938);--radius:.5rem;font-family:ui-sans-serif,system-ui,sans-serif}[data-radix-portal]{z-index:9999!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';class mo extends q.Component{constructor(_){super(_),this.state={hasError:!1,error:null}}static getDerivedStateFromError(_){return{hasError:!0,error:_}}componentDidCatch(_,r){console.error("[JsonPages Engine]",_,r)}render(){return this.state.hasError&&this.state.error?s.jsxs("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:24,backgroundColor:"#0f172a",color:"#e2e8f0",fontFamily:"ui-sans-serif, system-ui, sans-serif"},children:[s.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),s.jsx("pre",{style:{maxWidth:"100%",overflow:"auto",padding:16,backgroundColor:"rgba(0,0,0,0.3)",borderRadius:8,fontSize:12,marginTop:8},children:this.state.error.message})]}):this.props.children}}function bo({config:e}){var E,S;const{registry:_={},schemas:r={},pages:m={},siteConfig:u,themeConfig:i,menuConfig:o,themeCss:n,addSection:l,NotFoundComponent:h=jr}=e,f=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(C=>C!=="header"&&C!=="footer"),x={exportJSON:((E=e.persistence)==null?void 0:E.exportJSON)??Ct,exportHTML:((S=e.persistence)==null?void 0:S.exportHTML)??At},v=typeof(n==null?void 0:n.tenant)=="string"?n.tenant:"",c=typeof(n==null?void 0:n.admin)=="string"?n.admin:fo,[b,d]=q.useState(!1);q.useEffect(()=>{try{i!=null&&i.tokens&&at.setTheme(i)}catch(C){console.warn("[JsonPages] setTheme failed",C)}d(!0)},[i]);const g=()=>{const{slug:C="home"}=Se.useParams(),[O,L]=q.useState(null);q.useEffect(()=>{const re=document.getElementById("jp-baked-state");if(re!=null&&re.textContent)try{const j=JSON.parse(re.textContent);L(j),at.setTheme(j.theme)}catch(j){console.error("Failed to parse baked state",j)}},[]);const D=O?O.page:m[C],T=O?O.site:u,V=O?O.menu:o;return D?s.jsx(ot,{mode:"tenant",tenantCss:v,adminCss:c,children:s.jsx(tt,{mode:"visitor",children:s.jsx(vt,{pageConfig:D,siteConfig:T,menuConfig:V})})}):s.jsx(h,{})},p=()=>{var Y;const{slug:C="home"}=Se.useParams(),[O,L]=q.useState(null),[D,T]=q.useState(!1),[V,re]=q.useState(!1),[j,R]=q.useState(()=>{var F;try{const B=JSON.parse(JSON.stringify(u??{}));B.identity||(B.identity={title:"Site"}),B.pages||(B.pages=[]);const ee=(F=B.header)==null?void 0:F.data;return ee&&(o!=null&&o.main)&&(ee.links=JSON.parse(JSON.stringify(o.main))),B}catch{return{identity:{title:"Site"},pages:[]}}}),[a,M]=q.useState(null),[te,U]=q.useState(null),[W,K]=q.useState(null),[X,z]=q.useState(null),[N,J]=q.useState(!1),[G,Q]=q.useState(400),ue=360,ie=920,le=q.useCallback(F=>{F.preventDefault();const B=F.currentTarget;B.setPointerCapture(F.pointerId);const ee=F.clientX,ae=G,se=Ee=>{const _e=ee-Ee.clientX,Le=Math.min(ie,Math.max(ue,ae+_e));Q(Le)},xe=()=>{B.releasePointerCapture(F.pointerId),B.removeEventListener("pointermove",se),B.removeEventListener("pointerup",xe),B.removeEventListener("pointercancel",xe),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",B.addEventListener("pointermove",se),B.addEventListener("pointerup",xe),B.addEventListener("pointercancel",xe)},[G]),ce=O?[...j.header?[{id:j.header.id,type:j.header.type,scope:"global",title:"Header"}]:[],...O.sections.map(F=>{var B,ee;return{id:F.id,type:F.type,scope:"local",title:((B=F.data)==null?void 0:B.title)??((ee=F.data)==null?void 0:ee.titleHighlight)}}),...j.footer?[{id:j.footer.id,type:j.footer.type,scope:"global",title:"Footer"}]:[]]:[];q.useEffect(()=>{const F=m[C];F&&L(JSON.parse(JSON.stringify(F))),M(null),U(null),T(!1)},[C,m]);const ge=q.useCallback(()=>{const F=m[C];F&&L(JSON.parse(JSON.stringify(F))),M(null),U(null),T(!1)},[C,m]),fe=q.useCallback((F,B,ee)=>{const ae=[...ee.sections],se=ae.findIndex(_e=>_e.id===F);if(se===-1||B<0||B>=ae.length)return;const[xe]=ae.splice(se,1),Ee=B>se?B-1:B;ae.splice(Math.min(Ee,ae.length),0,xe),L({...ee,sections:ae}),T(!0)},[]),we=q.useCallback(F=>{var B;if(F.origin===window.location.origin){if(F.data.type===ve.SECTION_SELECT){M(F.data.section);const ee=F.data.itemPath;if(Array.isArray(ee)&&ee.length>0)U(ee.map(ae=>({fieldKey:ae.fieldKey,...ae.itemId!=null?{itemId:String(ae.itemId)}:{}})));else{const ae=F.data.itemField,se=F.data.itemId;U(typeof ae=="string"?[{fieldKey:ae,...se!=null?{itemId:String(se)}:{}}]:null)}}if(F.data.type===ve.ACTIVE_SECTION_CHANGED&&K(F.data.activeSectionId??null),F.data.type==="jsonpages:section-reorder"&&O){const{sectionId:ee,newIndex:ae}=F.data;typeof ee=="string"&&typeof ae=="number"&&ae>=0&&fe(ee,ae,O)}if(F.data.type===ve.SEND_CLEAN_HTML){if(!O)return;const ee=(B=j.header)==null?void 0:B.data,ae={page:O,site:j,menu:{main:(ee==null?void 0:ee.links)??[]},theme:i};x.exportHTML(ae,C,F.data.html),T(!1)}}},[O,j,C,i,fe]);q.useEffect(()=>(window.addEventListener("message",we),()=>window.removeEventListener("message",we)),[we]);const ze=q.useCallback(F=>{const B=ce.find(ee=>ee.id===F);B&&M({id:B.id,type:B.type,scope:B.scope}),U(null),z(F)},[ce]),t=q.useCallback(()=>{z(null)},[]),H=q.useCallback(F=>{L(B=>B&&{...B,sections:B.sections.filter(ee=>ee.id!==F)}),T(!0),M(B=>(B==null?void 0:B.id)===F?null:B)},[]),A=F=>{if(!(!a||!O))if(T(!0),a.scope==="global")a.type==="header"&&j.header!=null?R({...j,header:{...j.header,data:F}}):a.type==="footer"&&j.footer!=null&&R({...j,footer:{...j.footer,data:F}});else{const B=O.sections.map(ee=>ee.id===a.id?{...ee,data:F}:ee);L({...O,sections:B})}},y=q.useCallback((F,B,ee,ae)=>{var se,xe;if(T(!0),B==="global")((se=j.header)==null?void 0:se.id)===F?R({...j,header:{...j.header,data:ae}}):((xe=j.footer)==null?void 0:xe.id)===F&&R({...j,footer:{...j.footer,data:ae}});else if(O){const Ee=O.sections.map(_e=>_e.id===F?{..._e,data:ae}:_e);L({...O,sections:Ee})}},[O,j]),w=()=>{var B;const F=document.querySelector("iframe");(B=F==null?void 0:F.contentWindow)==null||B.postMessage({type:ve.REQUEST_CLEAN_HTML},"*")},I=()=>{var ee,ae;if(!O||!((ee=e.persistence)!=null&&ee.saveToFile))return;const F=(ae=j.header)==null?void 0:ae.data,B={page:O,site:j,menu:{main:(F==null?void 0:F.links)??[]},theme:i};e.persistence.saveToFile(B,C).then(()=>{T(!1),re(!0),window.setTimeout(()=>window.location.reload(),1e3)}).catch(se=>{console.error("[JsonPages] saveToFile failed",se);const xe=se instanceof Error?se.message:String(se);alert(`Save to file failed: ${xe}`)})},$=F=>{var ae;if(!O)return;const B=((ae=l==null?void 0:l.getDefaultSectionData)==null?void 0:ae.call(l,F))??{},ee={id:crypto.randomUUID(),type:F,data:B,settings:void 0};L({...O,sections:[...O.sections,ee]}),T(!0),M({id:ee.id,type:F,scope:"local"})};if(!O)return s.jsx("div",{children:"Loading Studio..."});const Z=(a==null?void 0:a.scope)==="global"?{sections:[j.header,j.footer].filter(F=>F!=null)}:O,P=[...j.header?[j.header]:[],...O.sections,...j.footer?[j.footer]:[]];return s.jsx(ot,{mode:"admin",tenantCss:v,adminCss:c,children:s.jsx(tt,{mode:"studio",children:s.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[s.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:s.jsx(kr,{draft:O,globalDraft:j,themeConfig:i,slug:C,selectedId:a==null?void 0:a.id,scrollToSectionId:X,onScrollRequested:t})}),s.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:G,minWidth:ue,maxWidth:ie},children:[s.jsx("div",{role:"separator","aria-label":"Resize inspector",className:"absolute left-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-primary/40 active:bg-primary/60 transition-colors shrink-0",style:{zIndex:9999},onPointerDown:le}),s.jsx(yr,{selectedSection:a,pageData:Z,allSectionsData:P,onUpdate:A,onUpdateSection:y,onClose:()=>{M(null),U(null)},expandedItemPath:te,onReorderSection:O?(F,B)=>fe(F,B,O):void 0,allLayers:ce,activeSectionId:W,onRequestScrollToSection:ze,onDeleteSection:O?H:void 0,onAddSection:f.length>0?()=>J(!0):void 0,hasChanges:D,onExportHTML:w,onSaveToFile:((Y=e.persistence)==null?void 0:Y.saveToFile)!=null?I:void 0,saveSuccessFeedback:V,onResetToFile:ge})]})]}),s.jsx(zr,{open:N,onClose:()=>J(!1),sectionTypes:f,sectionTypeLabels:l==null?void 0:l.sectionTypeLabels,onSelect:$})]})})})},k=()=>s.jsx(ot,{mode:"tenant",tenantCss:v,adminCss:c,children:s.jsx(_r,{})});return b?s.jsx(mo,{children:s.jsx(Qt,{config:{registry:_,schemas:r,tenantId:e.tenantId??"default",assets:e.assets},children:s.jsx(Se.BrowserRouter,{children:s.jsxs(Se.Routes,{children:[s.jsx(Se.Route,{path:"/",element:s.jsx(g,{})}),s.jsx(Se.Route,{path:"/:slug",element:s.jsx(g,{})}),s.jsx(Se.Route,{path:"/admin",element:s.jsx(p,{})}),s.jsx(Se.Route,{path:"/admin/:slug",element:s.jsx(p,{})}),s.jsx(Se.Route,{path:"/admin/preview/:slug",element:s.jsx(k,{})}),s.jsx(Se.Route,{path:"*",element:s.jsx(h,{})})]})})})}):s.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#0f172a",color:"#94a3b8",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontSize:14},children:"Loading…"})}const go=({hasChanges:e,onExportJSON:_,onExportHTML:r,onAddSection:m})=>s.jsxs("div",{className:"h-14 border-b border-zinc-800 bg-zinc-950 flex items-center justify-between px-6 shrink-0 z-50 relative",children:[s.jsx("div",{className:"flex items-center gap-3",children:m!=null&&s.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600 transition-colors",title:"Add section","aria-label":"Add section",children:[s.jsx(Zn,{size:14}),s.jsx("span",{children:"Add section"})]})}),s.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:s.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium transition-all border bg-zinc-900 border-zinc-700 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[s.jsx(or,{size:14}),s.jsx("span",{children:"Bake HTML"})]}),s.jsxs("button",{onClick:_,disabled:!e,className:he("flex items-center gap-2 px-4 py-1.5 rounded-md text-xs font-bold transition-all shadow-lg",e?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[s.jsx(Fn,{size:14}),s.jsx("span",{children:"Export JSON"})]})]})]});pe.AddSectionLibrary=zr,pe.AdminSidebar=yr,pe.ConfigProvider=Qt,pe.ControlBar=go,pe.DefaultNotFound=jr,pe.FormFactory=Ve,pe.InputWidgets=Ge,pe.JsonPagesEngine=bo,pe.PageRenderer=vt,pe.PreviewEntry=_r,pe.STUDIO_EVENTS=ve,pe.SectionRenderer=He,pe.StudioProvider=tt,pe.StudioStage=kr,pe.ThemeLoader=ot,pe.cn=he,pe.exportBakedHTML=At,pe.exportProjectJSON=Ct,pe.resolveAssetUrl=vr,pe.themeManager=at,pe.useConfig=Ze,pe.useStudio=tr,Object.defineProperty(pe,Symbol.toStringTag,{value:"Module"})}));