@jsonpages/core 1.0.0

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.
@@ -0,0 +1,173 @@
1
+ (function(fe,X){typeof exports=="object"&&typeof module<"u"?X(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"],X):(fe=typeof globalThis<"u"?globalThis:fe||self,X(fe.JsonPagesCore={},fe.React,fe.ReactRouterDOM,fe.z,fe.ReactDOM))})(this,(function(fe,X,je,_e,Sr){"use strict";function Cr(t){const z=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const p=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(z,r,p.get?p:{enumerable:!0,get:()=>t[r]})}}return z.default=t,Object.freeze(z)}const he=Cr(X),be={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 Ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ve(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var it={exports:{}};/*!
2
+
3
+ JSZip v3.10.1 - A JavaScript class for generating and reading zip files
4
+ <http://stuartk.com/jszip>
5
+
6
+ (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
7
+ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
8
+
9
+ JSZip uses the library pako released under the MIT license :
10
+ https://github.com/nodeca/pako/blob/main/LICENSE
11
+ */var zt;function Ar(){return zt||(zt=1,(function(t,z){(function(r){t.exports=r()})(function(){return(function r(p,d,a){function n(h,b){if(!d[h]){if(!p[h]){var v=typeof Ve=="function"&&Ve;if(!b&&v)return v(h,!0);if(o)return o(h,!0);var y=new Error("Cannot find module '"+h+"'");throw y.code="MODULE_NOT_FOUND",y}var c=d[h]={exports:{}};p[h][0].call(c.exports,function(g){var l=p[h][1][g];return n(l||g)},c,c.exports,r,p,d,a)}return d[h].exports}for(var o=typeof Ve=="function"&&Ve,s=0;s<a.length;s++)n(a[s]);return n})({1:[function(r,p,d){var a=r("./utils"),n=r("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.encode=function(s){for(var h,b,v,y,c,g,l,m=[],f=0,w=s.length,E=w,S=a.getTypeOf(s)!=="string";f<s.length;)E=w-f,v=S?(h=s[f++],b=f<w?s[f++]:0,f<w?s[f++]:0):(h=s.charCodeAt(f++),b=f<w?s.charCodeAt(f++):0,f<w?s.charCodeAt(f++):0),y=h>>2,c=(3&h)<<4|b>>4,g=1<E?(15&b)<<2|v>>6:64,l=2<E?63&v:64,m.push(o.charAt(y)+o.charAt(c)+o.charAt(g)+o.charAt(l));return m.join("")},d.decode=function(s){var h,b,v,y,c,g,l=0,m=0,f="data:";if(s.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var w,E=3*(s=s.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(s.charAt(s.length-1)===o.charAt(64)&&E--,s.charAt(s.length-2)===o.charAt(64)&&E--,E%1!=0)throw new Error("Invalid base64 input, bad content length.");for(w=n.uint8array?new Uint8Array(0|E):new Array(0|E);l<s.length;)h=o.indexOf(s.charAt(l++))<<2|(y=o.indexOf(s.charAt(l++)))>>4,b=(15&y)<<4|(c=o.indexOf(s.charAt(l++)))>>2,v=(3&c)<<6|(g=o.indexOf(s.charAt(l++))),w[m++]=h,c!==64&&(w[m++]=b),g!==64&&(w[m++]=v);return w}},{"./support":30,"./utils":32}],2:[function(r,p,d){var a=r("./external"),n=r("./stream/DataWorker"),o=r("./stream/Crc32Probe"),s=r("./stream/DataLengthProbe");function h(b,v,y,c,g){this.compressedSize=b,this.uncompressedSize=v,this.crc32=y,this.compression=c,this.compressedContent=g}h.prototype={getContentWorker:function(){var b=new n(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),v=this;return b.on("end",function(){if(this.streamInfo.data_length!==v.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),b},getCompressedWorker:function(){return new n(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(b,v,y){return b.pipe(new o).pipe(new s("uncompressedSize")).pipe(v.compressWorker(y)).pipe(new s("compressedSize")).withStreamInfo("compression",v)},p.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,p,d){var a=r("./stream/GenericWorker");d.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},d.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,p,d){var a=r("./utils"),n=(function(){for(var o,s=[],h=0;h<256;h++){o=h;for(var b=0;b<8;b++)o=1&o?3988292384^o>>>1:o>>>1;s[h]=o}return s})();p.exports=function(o,s){return o!==void 0&&o.length?a.getTypeOf(o)!=="string"?(function(h,b,v,y){var c=n,g=y+v;h^=-1;for(var l=y;l<g;l++)h=h>>>8^c[255&(h^b[l])];return-1^h})(0|s,o,o.length,0):(function(h,b,v,y){var c=n,g=y+v;h^=-1;for(var l=y;l<g;l++)h=h>>>8^c[255&(h^b.charCodeAt(l))];return-1^h})(0|s,o,o.length,0):0}},{"./utils":32}],5:[function(r,p,d){d.base64=!1,d.binary=!1,d.dir=!1,d.createFolders=!0,d.date=null,d.compression=null,d.compressionOptions=null,d.comment=null,d.unixPermissions=null,d.dosPermissions=null},{}],6:[function(r,p,d){var a=null;a=typeof Promise<"u"?Promise:r("lie"),p.exports={Promise:a}},{lie:37}],7:[function(r,p,d){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",n=r("pako"),o=r("./utils"),s=r("./stream/GenericWorker"),h=a?"uint8array":"array";function b(v,y){s.call(this,"FlateWorker/"+v),this._pako=null,this._pakoAction=v,this._pakoOptions=y,this.meta={}}d.magic="\b\0",o.inherits(b,s),b.prototype.processChunk=function(v){this.meta=v.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(h,v.data),!1)},b.prototype.flush=function(){s.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},b.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},b.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var v=this;this._pako.onData=function(y){v.push({data:y,meta:v.meta})}},d.compressWorker=function(v){return new b("Deflate",v)},d.uncompressWorker=function(){return new b("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,p,d){function a(c,g){var l,m="";for(l=0;l<g;l++)m+=String.fromCharCode(255&c),c>>>=8;return m}function n(c,g,l,m,f,w){var E,S,A=c.file,O=c.compression,L=w!==h.utf8encode,R=o.transformTo("string",w(A.name)),T=o.transformTo("string",h.utf8encode(A.name)),W=A.comment,Q=o.transformTo("string",w(W)),j=o.transformTo("string",h.utf8encode(W)),B=T.length!==A.name.length,i=j.length!==W.length,U="",ee="",$="",Z=A.dir,V=A.date,J={crc32:0,compressedSize:0,uncompressedSize:0};g&&!l||(J.crc32=c.crc32,J.compressedSize=c.compressedSize,J.uncompressedSize=c.uncompressedSize);var _=0;g&&(_|=8),L||!B&&!i||(_|=2048);var C=0,K=0;Z&&(C|=16),f==="UNIX"?(K=798,C|=(function(Y,ce){var oe=Y;return Y||(oe=ce?16893:33204),(65535&oe)<<16})(A.unixPermissions,Z)):(K=20,C|=(function(Y){return 63&(Y||0)})(A.dosPermissions)),E=V.getUTCHours(),E<<=6,E|=V.getUTCMinutes(),E<<=5,E|=V.getUTCSeconds()/2,S=V.getUTCFullYear()-1980,S<<=4,S|=V.getUTCMonth()+1,S<<=5,S|=V.getUTCDate(),B&&(ee=a(1,1)+a(b(R),4)+T,U+="up"+a(ee.length,2)+ee),i&&($=a(1,1)+a(b(Q),4)+j,U+="uc"+a($.length,2)+$);var H="";return H+=`
12
+ \0`,H+=a(_,2),H+=O.magic,H+=a(E,2),H+=a(S,2),H+=a(J.crc32,4),H+=a(J.compressedSize,4),H+=a(J.uncompressedSize,4),H+=a(R.length,2),H+=a(U.length,2),{fileRecord:v.LOCAL_FILE_HEADER+H+R+U,dirRecord:v.CENTRAL_FILE_HEADER+a(K,2)+H+a(Q.length,2)+"\0\0\0\0"+a(C,4)+a(m,4)+R+U+Q}}var o=r("../utils"),s=r("../stream/GenericWorker"),h=r("../utf8"),b=r("../crc32"),v=r("../signature");function y(c,g,l,m){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=l,this.encodeFileName=m,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(y,s),y.prototype.push=function(c){var g=c.meta.percent||0,l=this.entriesCount,m=this._sources.length;this.accumulate?this.contentBuffer.push(c):(this.bytesWritten+=c.data.length,s.prototype.push.call(this,{data:c.data,meta:{currentFile:this.currentFile,percent:l?(g+100*(l-m-1))/l:100}}))},y.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var g=this.streamFiles&&!c.file.dir;if(g){var l=n(c,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:l.fileRecord,meta:{percent:0}})}else this.accumulate=!0},y.prototype.closedSource=function(c){this.accumulate=!1;var g=this.streamFiles&&!c.file.dir,l=n(c,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(l.dirRecord),g)this.push({data:(function(m){return v.DATA_DESCRIPTOR+a(m.crc32,4)+a(m.compressedSize,4)+a(m.uncompressedSize,4)})(c),meta:{percent:100}});else for(this.push({data:l.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},y.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 l=this.bytesWritten-c,m=(function(f,w,E,S,A){var O=o.transformTo("string",A(S));return v.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(f,2)+a(f,2)+a(w,4)+a(E,4)+a(O.length,2)+O})(this.dirRecords.length,l,c,this.zipComment,this.encodeFileName);this.push({data:m,meta:{percent:100}})},y.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},y.prototype.registerPrevious=function(c){this._sources.push(c);var g=this;return c.on("data",function(l){g.processChunk(l)}),c.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),c.on("error",function(l){g.error(l)}),this},y.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},y.prototype.error=function(c){var g=this._sources;if(!s.prototype.error.call(this,c))return!1;for(var l=0;l<g.length;l++)try{g[l].error(c)}catch{}return!0},y.prototype.lock=function(){s.prototype.lock.call(this);for(var c=this._sources,g=0;g<c.length;g++)c[g].lock()},p.exports=y},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,p,d){var a=r("../compressions"),n=r("./ZipFileWorker");d.generateWorker=function(o,s,h){var b=new n(s.streamFiles,h,s.platform,s.encodeFileName),v=0;try{o.forEach(function(y,c){v++;var g=(function(w,E){var S=w||E,A=a[S];if(!A)throw new Error(S+" is not a valid compression method !");return A})(c.options.compression,s.compression),l=c.options.compressionOptions||s.compressionOptions||{},m=c.dir,f=c.date;c._compressWorker(g,l).withStreamInfo("file",{name:y,dir:m,date:f,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(b)}),b.entriesCount=v}catch(y){b.error(y)}return b}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,p,d){function a(){if(!(this instanceof a))return new a;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 n=new a;for(var o in this)typeof this[o]!="function"&&(n[o]=this[o]);return n}}(a.prototype=r("./object")).loadAsync=r("./load"),a.support=r("./support"),a.defaults=r("./defaults"),a.version="3.10.1",a.loadAsync=function(n,o){return new a().loadAsync(n,o)},a.external=r("./external"),p.exports=a},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,p,d){var a=r("./utils"),n=r("./external"),o=r("./utf8"),s=r("./zipEntries"),h=r("./stream/Crc32Probe"),b=r("./nodejsUtils");function v(y){return new n.Promise(function(c,g){var l=y.decompressed.getContentWorker().pipe(new h);l.on("error",function(m){g(m)}).on("end",function(){l.streamInfo.crc32!==y.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}p.exports=function(y,c){var g=this;return c=a.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),b.isNode&&b.isStream(y)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",y,!0,c.optimizedBinaryString,c.base64).then(function(l){var m=new s(c);return m.load(l),m}).then(function(l){var m=[n.Promise.resolve(l)],f=l.files;if(c.checkCRC32)for(var w=0;w<f.length;w++)m.push(v(f[w]));return n.Promise.all(m)}).then(function(l){for(var m=l.shift(),f=m.files,w=0;w<f.length;w++){var E=f[w],S=E.fileNameStr,A=a.resolve(E.fileNameStr);g.file(A,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(A).unsafeOriginalName=S)}return m.zipComment.length&&(g.comment=m.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,p,d){var a=r("../utils"),n=r("../stream/GenericWorker");function o(s,h){n.call(this,"Nodejs stream input adapter for "+s),this._upstreamEnded=!1,this._bindStream(h)}a.inherits(o,n),o.prototype._bindStream=function(s){var h=this;(this._stream=s).pause(),s.on("data",function(b){h.push({data:b,meta:{percent:0}})}).on("error",function(b){h.isPaused?this.generatedError=b:h.error(b)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},o.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},p.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,p,d){var a=r("readable-stream").Readable;function n(o,s,h){a.call(this,s),this._helper=o;var b=this;o.on("data",function(v,y){b.push(v)||b._helper.pause(),h&&h(y)}).on("error",function(v){b.emit("error",v)}).on("end",function(){b.push(null)})}r("../utils").inherits(n,a),n.prototype._read=function(){this._helper.resume()},p.exports=n},{"../utils":32,"readable-stream":16}],14:[function(r,p,d){p.exports={isNode:typeof Buffer<"u",newBufferFrom:function(a,n){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(a,n);if(typeof a=="number")throw new Error('The "data" argument must not be a number');return new Buffer(a,n)},allocBuffer:function(a){if(Buffer.alloc)return Buffer.alloc(a);var n=new Buffer(a);return n.fill(0),n},isBuffer:function(a){return Buffer.isBuffer(a)},isStream:function(a){return a&&typeof a.on=="function"&&typeof a.pause=="function"&&typeof a.resume=="function"}}},{}],15:[function(r,p,d){function a(A,O,L){var R,T=o.getTypeOf(O),W=o.extend(L||{},b);W.date=W.date||new Date,W.compression!==null&&(W.compression=W.compression.toUpperCase()),typeof W.unixPermissions=="string"&&(W.unixPermissions=parseInt(W.unixPermissions,8)),W.unixPermissions&&16384&W.unixPermissions&&(W.dir=!0),W.dosPermissions&&16&W.dosPermissions&&(W.dir=!0),W.dir&&(A=f(A)),W.createFolders&&(R=m(A))&&w.call(this,R,!0);var Q=T==="string"&&W.binary===!1&&W.base64===!1;L&&L.binary!==void 0||(W.binary=!Q),(O instanceof v&&O.uncompressedSize===0||W.dir||!O||O.length===0)&&(W.base64=!1,W.binary=!0,O="",W.compression="STORE",T="string");var j=null;j=O instanceof v||O instanceof s?O:g.isNode&&g.isStream(O)?new l(A,O):o.prepareContent(A,O,W.binary,W.optimizedBinaryString,W.base64);var B=new y(A,j,W);this.files[A]=B}var n=r("./utf8"),o=r("./utils"),s=r("./stream/GenericWorker"),h=r("./stream/StreamHelper"),b=r("./defaults"),v=r("./compressedObject"),y=r("./zipObject"),c=r("./generate"),g=r("./nodejsUtils"),l=r("./nodejs/NodejsStreamInputAdapter"),m=function(A){A.slice(-1)==="/"&&(A=A.substring(0,A.length-1));var O=A.lastIndexOf("/");return 0<O?A.substring(0,O):""},f=function(A){return A.slice(-1)!=="/"&&(A+="/"),A},w=function(A,O){return O=O!==void 0?O:b.createFolders,A=f(A),this.files[A]||a.call(this,A,null,{dir:!0,createFolders:O}),this.files[A]};function E(A){return Object.prototype.toString.call(A)==="[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(A){var O,L,R;for(O in this.files)R=this.files[O],(L=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&A(L,R)},filter:function(A){var O=[];return this.forEach(function(L,R){A(L,R)&&O.push(R)}),O},file:function(A,O,L){if(arguments.length!==1)return A=this.root+A,a.call(this,A,O,L),this;if(E(A)){var R=A;return this.filter(function(W,Q){return!Q.dir&&R.test(W)})}var T=this.files[this.root+A];return T&&!T.dir?T:null},folder:function(A){if(!A)return this;if(E(A))return this.filter(function(T,W){return W.dir&&A.test(T)});var O=this.root+A,L=w.call(this,O),R=this.clone();return R.root=L.name,R},remove:function(A){A=this.root+A;var O=this.files[A];if(O||(A.slice(-1)!=="/"&&(A+="/"),O=this.files[A]),O&&!O.dir)delete this.files[A];else for(var L=this.filter(function(T,W){return W.name.slice(0,A.length)===A}),R=0;R<L.length;R++)delete this.files[L[R].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(A){var O,L={};try{if((L=o.extend(A||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.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.");o.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 R=L.comment||this.comment||"";O=c.generateWorker(this,L,R)}catch(T){(O=new s("error")).error(T)}return new h(O,L.type||"string",L.mimeType)},generateAsync:function(A,O){return this.generateInternalStream(A).accumulate(O)},generateNodeStream:function(A,O){return(A=A||{}).type||(A.type="nodebuffer"),this.generateInternalStream(A).toNodejsStream(O)}};p.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,p,d){p.exports=r("stream")},{stream:void 0}],17:[function(r,p,d){var a=r("./DataReader");function n(o){a.call(this,o);for(var s=0;s<this.data.length;s++)o[s]=255&o[s]}r("../utils").inherits(n,a),n.prototype.byteAt=function(o){return this.data[this.zero+o]},n.prototype.lastIndexOfSignature=function(o){for(var s=o.charCodeAt(0),h=o.charCodeAt(1),b=o.charCodeAt(2),v=o.charCodeAt(3),y=this.length-4;0<=y;--y)if(this.data[y]===s&&this.data[y+1]===h&&this.data[y+2]===b&&this.data[y+3]===v)return y-this.zero;return-1},n.prototype.readAndCheckSignature=function(o){var s=o.charCodeAt(0),h=o.charCodeAt(1),b=o.charCodeAt(2),v=o.charCodeAt(3),y=this.readData(4);return s===y[0]&&h===y[1]&&b===y[2]&&v===y[3]},n.prototype.readData=function(o){if(this.checkOffset(o),o===0)return[];var s=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,s},p.exports=n},{"../utils":32,"./DataReader":18}],18:[function(r,p,d){var a=r("../utils");function n(o){this.data=o,this.length=o.length,this.index=0,this.zero=0}n.prototype={checkOffset:function(o){this.checkIndex(this.index+o)},checkIndex:function(o){if(this.length<this.zero+o||o<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+o+"). Corrupted zip ?")},setIndex:function(o){this.checkIndex(o),this.index=o},skip:function(o){this.setIndex(this.index+o)},byteAt:function(){},readInt:function(o){var s,h=0;for(this.checkOffset(o),s=this.index+o-1;s>=this.index;s--)h=(h<<8)+this.byteAt(s);return this.index+=o,h},readString:function(o){return a.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},p.exports=n},{"../utils":32}],19:[function(r,p,d){var a=r("./Uint8ArrayReader");function n(o){a.call(this,o)}r("../utils").inherits(n,a),n.prototype.readData=function(o){this.checkOffset(o);var s=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,s},p.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,p,d){var a=r("./DataReader");function n(o){a.call(this,o)}r("../utils").inherits(n,a),n.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},n.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},n.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},n.prototype.readData=function(o){this.checkOffset(o);var s=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,s},p.exports=n},{"../utils":32,"./DataReader":18}],21:[function(r,p,d){var a=r("./ArrayReader");function n(o){a.call(this,o)}r("../utils").inherits(n,a),n.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var s=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,s},p.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(r,p,d){var a=r("../utils"),n=r("../support"),o=r("./ArrayReader"),s=r("./StringReader"),h=r("./NodeBufferReader"),b=r("./Uint8ArrayReader");p.exports=function(v){var y=a.getTypeOf(v);return a.checkSupport(y),y!=="string"||n.uint8array?y==="nodebuffer"?new h(v):n.uint8array?new b(a.transformTo("uint8array",v)):new o(a.transformTo("array",v)):new s(v)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,p,d){d.LOCAL_FILE_HEADER="PK",d.CENTRAL_FILE_HEADER="PK",d.CENTRAL_DIRECTORY_END="PK",d.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",d.ZIP64_CENTRAL_DIRECTORY_END="PK",d.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,p,d){var a=r("./GenericWorker"),n=r("../utils");function o(s){a.call(this,"ConvertWorker to "+s),this.destType=s}n.inherits(o,a),o.prototype.processChunk=function(s){this.push({data:n.transformTo(this.destType,s.data),meta:s.meta})},p.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(r,p,d){var a=r("./GenericWorker"),n=r("../crc32");function o(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(o,a),o.prototype.processChunk=function(s){this.streamInfo.crc32=n(s.data,this.streamInfo.crc32||0),this.push(s)},p.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,p,d){var a=r("../utils"),n=r("./GenericWorker");function o(s){n.call(this,"DataLengthProbe for "+s),this.propName=s,this.withStreamInfo(s,0)}a.inherits(o,n),o.prototype.processChunk=function(s){if(s){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+s.data.length}n.prototype.processChunk.call(this,s)},p.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(r,p,d){var a=r("../utils"),n=r("./GenericWorker");function o(s){n.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,s.then(function(b){h.dataIsReady=!0,h.data=b,h.max=b&&b.length||0,h.type=a.getTypeOf(b),h.isPaused||h._tickAndRepeat()},function(b){h.error(b)})}a.inherits(o,n),o.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var s=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":s=this.data.substring(this.index,h);break;case"uint8array":s=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":s=this.data.slice(this.index,h)}return this.index=h,this.push({data:s,meta:{percent:this.max?this.index/this.max*100:0}})},p.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(r,p,d){function a(n){this.name=n||"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}a.prototype={push:function(n){this.emit("data",n)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(n){this.emit("error",n)}return!0},error:function(n){return!this.isFinished&&(this.isPaused?this.generatedError=n:(this.isFinished=!0,this.emit("error",n),this.previous&&this.previous.error(n),this.cleanUp()),!0)},on:function(n,o){return this._listeners[n].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(n,o){if(this._listeners[n])for(var s=0;s<this._listeners[n].length;s++)this._listeners[n][s].call(this,o)},pipe:function(n){return n.registerPrevious(this)},registerPrevious:function(n){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=n.streamInfo,this.mergeStreamInfo(),this.previous=n;var o=this;return n.on("data",function(s){o.processChunk(s)}),n.on("end",function(){o.end()}),n.on("error",function(s){o.error(s)}),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 n=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),n=!0),this.previous&&this.previous.resume(),!n},flush:function(){},processChunk:function(n){this.push(n)},withStreamInfo:function(n,o){return this.extraStreamInfo[n]=o,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var n in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,n)&&(this.streamInfo[n]=this.extraStreamInfo[n])},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 n="Worker "+this.name;return this.previous?this.previous+" -> "+n:n}},p.exports=a},{}],29:[function(r,p,d){var a=r("../utils"),n=r("./ConvertWorker"),o=r("./GenericWorker"),s=r("../base64"),h=r("../support"),b=r("../external"),v=null;if(h.nodestream)try{v=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function y(g,l){return new b.Promise(function(m,f){var w=[],E=g._internalType,S=g._outputType,A=g._mimeType;g.on("data",function(O,L){w.push(O),l&&l(L)}).on("error",function(O){w=[],f(O)}).on("end",function(){try{var O=(function(L,R,T){switch(L){case"blob":return a.newBlob(a.transformTo("arraybuffer",R),T);case"base64":return s.encode(R);default:return a.transformTo(L,R)}})(S,(function(L,R){var T,W=0,Q=null,j=0;for(T=0;T<R.length;T++)j+=R[T].length;switch(L){case"string":return R.join("");case"array":return Array.prototype.concat.apply([],R);case"uint8array":for(Q=new Uint8Array(j),T=0;T<R.length;T++)Q.set(R[T],W),W+=R[T].length;return Q;case"nodebuffer":return Buffer.concat(R);default:throw new Error("concat : unsupported type '"+L+"'")}})(E,w),A);m(O)}catch(L){f(L)}w=[]}).resume()})}function c(g,l,m){var f=l;switch(l){case"blob":case"arraybuffer":f="uint8array";break;case"base64":f="string"}try{this._internalType=f,this._outputType=l,this._mimeType=m,a.checkSupport(f),this._worker=g.pipe(new n(f)),g.lock()}catch(w){this._worker=new o("error"),this._worker.error(w)}}c.prototype={accumulate:function(g){return y(this,g)},on:function(g,l){var m=this;return g==="data"?this._worker.on(g,function(f){l.call(m,f.data,f.meta)}):this._worker.on(g,function(){a.delay(l,arguments,m)}),this},resume:function(){return a.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(a.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)}},p.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,p,d){if(d.base64=!0,d.array=!0,d.string=!0,d.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",d.nodebuffer=typeof Buffer<"u",d.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")d.blob=!1;else{var a=new ArrayBuffer(0);try{d.blob=new Blob([a],{type:"application/zip"}).size===0}catch{try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(a),d.blob=n.getBlob("application/zip").size===0}catch{d.blob=!1}}}try{d.nodestream=!!r("readable-stream").Readable}catch{d.nodestream=!1}},{"readable-stream":16}],31:[function(r,p,d){for(var a=r("./utils"),n=r("./support"),o=r("./nodejsUtils"),s=r("./stream/GenericWorker"),h=new Array(256),b=0;b<256;b++)h[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;h[254]=h[254]=1;function v(){s.call(this,"utf-8 decode"),this.leftOver=null}function y(){s.call(this,"utf-8 encode")}d.utf8encode=function(c){return n.nodebuffer?o.newBufferFrom(c,"utf-8"):(function(g){var l,m,f,w,E,S=g.length,A=0;for(w=0;w<S;w++)(64512&(m=g.charCodeAt(w)))==55296&&w+1<S&&(64512&(f=g.charCodeAt(w+1)))==56320&&(m=65536+(m-55296<<10)+(f-56320),w++),A+=m<128?1:m<2048?2:m<65536?3:4;for(l=n.uint8array?new Uint8Array(A):new Array(A),w=E=0;E<A;w++)(64512&(m=g.charCodeAt(w)))==55296&&w+1<S&&(64512&(f=g.charCodeAt(w+1)))==56320&&(m=65536+(m-55296<<10)+(f-56320),w++),m<128?l[E++]=m:(m<2048?l[E++]=192|m>>>6:(m<65536?l[E++]=224|m>>>12:(l[E++]=240|m>>>18,l[E++]=128|m>>>12&63),l[E++]=128|m>>>6&63),l[E++]=128|63&m);return l})(c)},d.utf8decode=function(c){return n.nodebuffer?a.transformTo("nodebuffer",c).toString("utf-8"):(function(g){var l,m,f,w,E=g.length,S=new Array(2*E);for(l=m=0;l<E;)if((f=g[l++])<128)S[m++]=f;else if(4<(w=h[f]))S[m++]=65533,l+=w-1;else{for(f&=w===2?31:w===3?15:7;1<w&&l<E;)f=f<<6|63&g[l++],w--;1<w?S[m++]=65533:f<65536?S[m++]=f:(f-=65536,S[m++]=55296|f>>10&1023,S[m++]=56320|1023&f)}return S.length!==m&&(S.subarray?S=S.subarray(0,m):S.length=m),a.applyFromCharCode(S)})(c=a.transformTo(n.uint8array?"uint8array":"array",c))},a.inherits(v,s),v.prototype.processChunk=function(c){var g=a.transformTo(n.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(n.uint8array){var l=g;(g=new Uint8Array(l.length+this.leftOver.length)).set(this.leftOver,0),g.set(l,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var m=(function(w,E){var S;for((E=E||w.length)>w.length&&(E=w.length),S=E-1;0<=S&&(192&w[S])==128;)S--;return S<0||S===0?E:S+h[w[S]]>E?S:E})(g),f=g;m!==g.length&&(n.uint8array?(f=g.subarray(0,m),this.leftOver=g.subarray(m,g.length)):(f=g.slice(0,m),this.leftOver=g.slice(m,g.length))),this.push({data:d.utf8decode(f),meta:c.meta})},v.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:d.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},d.Utf8DecodeWorker=v,a.inherits(y,s),y.prototype.processChunk=function(c){this.push({data:d.utf8encode(c.data),meta:c.meta})},d.Utf8EncodeWorker=y},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,p,d){var a=r("./support"),n=r("./base64"),o=r("./nodejsUtils"),s=r("./external");function h(l){return l}function b(l,m){for(var f=0;f<l.length;++f)m[f]=255&l.charCodeAt(f);return m}r("setimmediate"),d.newBlob=function(l,m){d.checkSupport("blob");try{return new Blob([l],{type:m})}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return f.append(l),f.getBlob(m)}catch{throw new Error("Bug : can't construct the Blob.")}}};var v={stringifyByChunk:function(l,m,f){var w=[],E=0,S=l.length;if(S<=f)return String.fromCharCode.apply(null,l);for(;E<S;)m==="array"||m==="nodebuffer"?w.push(String.fromCharCode.apply(null,l.slice(E,Math.min(E+f,S)))):w.push(String.fromCharCode.apply(null,l.subarray(E,Math.min(E+f,S)))),E+=f;return w.join("")},stringifyByChar:function(l){for(var m="",f=0;f<l.length;f++)m+=String.fromCharCode(l[f]);return m},applyCanBeUsed:{uint8array:(function(){try{return a.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return a.nodebuffer&&String.fromCharCode.apply(null,o.allocBuffer(1)).length===1}catch{return!1}})()}};function y(l){var m=65536,f=d.getTypeOf(l),w=!0;if(f==="uint8array"?w=v.applyCanBeUsed.uint8array:f==="nodebuffer"&&(w=v.applyCanBeUsed.nodebuffer),w)for(;1<m;)try{return v.stringifyByChunk(l,f,m)}catch{m=Math.floor(m/2)}return v.stringifyByChar(l)}function c(l,m){for(var f=0;f<l.length;f++)m[f]=l[f];return m}d.applyFromCharCode=y;var g={};g.string={string:h,array:function(l){return b(l,new Array(l.length))},arraybuffer:function(l){return g.string.uint8array(l).buffer},uint8array:function(l){return b(l,new Uint8Array(l.length))},nodebuffer:function(l){return b(l,o.allocBuffer(l.length))}},g.array={string:y,array:h,arraybuffer:function(l){return new Uint8Array(l).buffer},uint8array:function(l){return new Uint8Array(l)},nodebuffer:function(l){return o.newBufferFrom(l)}},g.arraybuffer={string:function(l){return y(new Uint8Array(l))},array:function(l){return c(new Uint8Array(l),new Array(l.byteLength))},arraybuffer:h,uint8array:function(l){return new Uint8Array(l)},nodebuffer:function(l){return o.newBufferFrom(new Uint8Array(l))}},g.uint8array={string:y,array:function(l){return c(l,new Array(l.length))},arraybuffer:function(l){return l.buffer},uint8array:h,nodebuffer:function(l){return o.newBufferFrom(l)}},g.nodebuffer={string:y,array:function(l){return c(l,new Array(l.length))},arraybuffer:function(l){return g.nodebuffer.uint8array(l).buffer},uint8array:function(l){return c(l,new Uint8Array(l.length))},nodebuffer:h},d.transformTo=function(l,m){if(m=m||"",!l)return m;d.checkSupport(l);var f=d.getTypeOf(m);return g[f][l](m)},d.resolve=function(l){for(var m=l.split("/"),f=[],w=0;w<m.length;w++){var E=m[w];E==="."||E===""&&w!==0&&w!==m.length-1||(E===".."?f.pop():f.push(E))}return f.join("/")},d.getTypeOf=function(l){return typeof l=="string"?"string":Object.prototype.toString.call(l)==="[object Array]"?"array":a.nodebuffer&&o.isBuffer(l)?"nodebuffer":a.uint8array&&l instanceof Uint8Array?"uint8array":a.arraybuffer&&l instanceof ArrayBuffer?"arraybuffer":void 0},d.checkSupport=function(l){if(!a[l.toLowerCase()])throw new Error(l+" is not supported by this platform")},d.MAX_VALUE_16BITS=65535,d.MAX_VALUE_32BITS=-1,d.pretty=function(l){var m,f,w="";for(f=0;f<(l||"").length;f++)w+="\\x"+((m=l.charCodeAt(f))<16?"0":"")+m.toString(16).toUpperCase();return w},d.delay=function(l,m,f){setImmediate(function(){l.apply(f||null,m||[])})},d.inherits=function(l,m){function f(){}f.prototype=m.prototype,l.prototype=new f},d.extend=function(){var l,m,f={};for(l=0;l<arguments.length;l++)for(m in arguments[l])Object.prototype.hasOwnProperty.call(arguments[l],m)&&f[m]===void 0&&(f[m]=arguments[l][m]);return f},d.prepareContent=function(l,m,f,w,E){return s.Promise.resolve(m).then(function(S){return a.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new s.Promise(function(A,O){var L=new FileReader;L.onload=function(R){A(R.target.result)},L.onerror=function(R){O(R.target.error)},L.readAsArrayBuffer(S)}):S}).then(function(S){var A=d.getTypeOf(S);return A?(A==="arraybuffer"?S=d.transformTo("uint8array",S):A==="string"&&(E?S=n.decode(S):f&&w!==!0&&(S=(function(O){return b(O,a.uint8array?new Uint8Array(O.length):new Array(O.length))})(S))),S):s.Promise.reject(new Error("Can't read the data of '"+l+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,p,d){var a=r("./reader/readerFor"),n=r("./utils"),o=r("./signature"),s=r("./zipEntry"),h=r("./support");function b(v){this.files=[],this.loadOptions=v}b.prototype={checkSignature:function(v){if(!this.reader.readAndCheckSignature(v)){this.reader.index-=4;var y=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(y)+", expected "+n.pretty(v)+")")}},isSignature:function(v,y){var c=this.reader.index;this.reader.setIndex(v);var g=this.reader.readString(4)===y;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),y=h.uint8array?"uint8array":"array",c=n.transformTo(y,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,y,c,g=this.zip64EndOfCentralSize-44;0<g;)v=this.reader.readInt(2),y=this.reader.readInt(4),c=this.reader.readData(y),this.zip64ExtensibleData[v]={id:v,length:y,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,y;for(v=0;v<this.files.length;v++)y=this.files[v],this.reader.setIndex(y.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),y.readLocalPart(this.reader),y.handleUTF8(),y.processAttributes()},readCentralDir:function(){var v;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(v=new s({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(o.CENTRAL_DIRECTORY_END);if(v<0)throw this.isSignature(0,o.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 y=v;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=!0,(v=this.reader.lastIndexOfSignature(o.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(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.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(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var c=this.centralDirOffset+this.centralDirSize;this.zip64&&(c+=20,c+=12+this.zip64EndOfCentralSize);var g=y-c;if(0<g)this.isSignature(y,o.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=a(v)},load:function(v){this.prepareReader(v),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},p.exports=b},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,p,d){var a=r("./reader/readerFor"),n=r("./utils"),o=r("./compressedObject"),s=r("./crc32"),h=r("./utf8"),b=r("./compressions"),v=r("./support");function y(c,g){this.options=c,this.loadOptions=g}y.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(c){var g,l;if(c.skip(22),this.fileNameLength=c.readInt(2),l=c.readInt(2),this.fileName=c.readData(this.fileNameLength),c.skip(l),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(m){for(var f in b)if(Object.prototype.hasOwnProperty.call(b,f)&&b[f].magic===m)return b[f];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+n.pretty(this.compressionMethod)+" unknown (inner file : "+n.transformTo("string",this.fileName)+")");this.decompressed=new o(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=a(this.extraFields[1].value);this.uncompressedSize===n.MAX_VALUE_32BITS&&(this.uncompressedSize=c.readInt(8)),this.compressedSize===n.MAX_VALUE_32BITS&&(this.compressedSize=c.readInt(8)),this.localHeaderOffset===n.MAX_VALUE_32BITS&&(this.localHeaderOffset=c.readInt(8)),this.diskNumberStart===n.MAX_VALUE_32BITS&&(this.diskNumberStart=c.readInt(4))}},readExtraFields:function(c){var g,l,m,f=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<f;)g=c.readInt(2),l=c.readInt(2),m=c.readData(l),this.extraFields[g]={id:g,length:l,value:m};c.setIndex(f)},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 l=n.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(l)}var m=this.findExtraFieldUnicodeComment();if(m!==null)this.fileCommentStr=m;else{var f=n.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(f)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var g=a(c.value);return g.readInt(1)!==1||s(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=a(c.value);return g.readInt(1)!==1||s(this.fileComment)!==g.readInt(4)?null:h.utf8decode(g.readData(c.length-5))}return null}},p.exports=y},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,p,d){function a(g,l,m){this.name=g,this.dir=m.dir,this.date=m.date,this.comment=m.comment,this.unixPermissions=m.unixPermissions,this.dosPermissions=m.dosPermissions,this._data=l,this._dataBinary=m.binary,this.options={compression:m.compression,compressionOptions:m.compressionOptions}}var n=r("./stream/StreamHelper"),o=r("./stream/DataWorker"),s=r("./utf8"),h=r("./compressedObject"),b=r("./stream/GenericWorker");a.prototype={internalStream:function(g){var l=null,m="string";try{if(!g)throw new Error("No output type specified.");var f=(m=g.toLowerCase())==="string"||m==="text";m!=="binarystring"&&m!=="text"||(m="string"),l=this._decompressWorker();var w=!this._dataBinary;w&&!f&&(l=l.pipe(new s.Utf8EncodeWorker)),!w&&f&&(l=l.pipe(new s.Utf8DecodeWorker))}catch(E){(l=new b("error")).error(E)}return new n(l,m,"")},async:function(g,l){return this.internalStream(g).accumulate(l)},nodeStream:function(g,l){return this.internalStream(g||"nodebuffer").toNodejsStream(l)},_compressWorker:function(g,l){if(this._data instanceof h&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var m=this._decompressWorker();return this._dataBinary||(m=m.pipe(new s.Utf8EncodeWorker)),h.createWorkerFrom(m,g,l)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof b?this._data:new o(this._data)}};for(var v=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],y=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<v.length;c++)a.prototype[v[c]]=y;p.exports=a},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,p,d){(function(a){var n,o,s=a.MutationObserver||a.WebKitMutationObserver;if(s){var h=0,b=new s(g),v=a.document.createTextNode("");b.observe(v,{characterData:!0}),n=function(){v.data=h=++h%2}}else if(a.setImmediate||a.MessageChannel===void 0)n="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var l=a.document.createElement("script");l.onreadystatechange=function(){g(),l.onreadystatechange=null,l.parentNode.removeChild(l),l=null},a.document.documentElement.appendChild(l)}:function(){setTimeout(g,0)};else{var y=new a.MessageChannel;y.port1.onmessage=g,n=function(){y.port2.postMessage(0)}}var c=[];function g(){var l,m;o=!0;for(var f=c.length;f;){for(m=c,c=[],l=-1;++l<f;)m[l]();f=c.length}o=!1}p.exports=function(l){c.push(l)!==1||o||n()}}).call(this,typeof Ne<"u"?Ne:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,p,d){var a=r("immediate");function n(){}var o={},s=["REJECTED"],h=["FULFILLED"],b=["PENDING"];function v(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,f!==n&&l(this,f)}function y(f,w,E){this.promise=f,typeof w=="function"&&(this.onFulfilled=w,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}function c(f,w,E){a(function(){var S;try{S=w(E)}catch(A){return o.reject(f,A)}S===f?o.reject(f,new TypeError("Cannot resolve promise with itself")):o.resolve(f,S)})}function g(f){var w=f&&f.then;if(f&&(typeof f=="object"||typeof f=="function")&&typeof w=="function")return function(){w.apply(f,arguments)}}function l(f,w){var E=!1;function S(L){E||(E=!0,o.reject(f,L))}function A(L){E||(E=!0,o.resolve(f,L))}var O=m(function(){w(A,S)});O.status==="error"&&S(O.value)}function m(f,w){var E={};try{E.value=f(w),E.status="success"}catch(S){E.status="error",E.value=S}return E}(p.exports=v).prototype.finally=function(f){if(typeof f!="function")return this;var w=this.constructor;return this.then(function(E){return w.resolve(f()).then(function(){return E})},function(E){return w.resolve(f()).then(function(){throw E})})},v.prototype.catch=function(f){return this.then(null,f)},v.prototype.then=function(f,w){if(typeof f!="function"&&this.state===h||typeof w!="function"&&this.state===s)return this;var E=new this.constructor(n);return this.state!==b?c(E,this.state===h?f:w,this.outcome):this.queue.push(new y(E,f,w)),E},y.prototype.callFulfilled=function(f){o.resolve(this.promise,f)},y.prototype.otherCallFulfilled=function(f){c(this.promise,this.onFulfilled,f)},y.prototype.callRejected=function(f){o.reject(this.promise,f)},y.prototype.otherCallRejected=function(f){c(this.promise,this.onRejected,f)},o.resolve=function(f,w){var E=m(g,w);if(E.status==="error")return o.reject(f,E.value);var S=E.value;if(S)l(f,S);else{f.state=h,f.outcome=w;for(var A=-1,O=f.queue.length;++A<O;)f.queue[A].callFulfilled(w)}return f},o.reject=function(f,w){f.state=s,f.outcome=w;for(var E=-1,S=f.queue.length;++E<S;)f.queue[E].callRejected(w);return f},v.resolve=function(f){return f instanceof this?f:o.resolve(new this(n),f)},v.reject=function(f){var w=new this(n);return o.reject(w,f)},v.all=function(f){var w=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=f.length,S=!1;if(!E)return this.resolve([]);for(var A=new Array(E),O=0,L=-1,R=new this(n);++L<E;)T(f[L],L);return R;function T(W,Q){w.resolve(W).then(function(j){A[Q]=j,++O!==E||S||(S=!0,o.resolve(R,A))},function(j){S||(S=!0,o.reject(R,j))})}},v.race=function(f){var w=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=f.length,S=!1;if(!E)return this.resolve([]);for(var A=-1,O=new this(n);++A<E;)L=f[A],w.resolve(L).then(function(R){S||(S=!0,o.resolve(O,R))},function(R){S||(S=!0,o.reject(O,R))});var L;return O}},{immediate:36}],38:[function(r,p,d){var a={};(0,r("./lib/utils/common").assign)(a,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),p.exports=a},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,p,d){var a=r("./zlib/deflate"),n=r("./utils/common"),o=r("./utils/strings"),s=r("./zlib/messages"),h=r("./zlib/zstream"),b=Object.prototype.toString,v=0,y=-1,c=0,g=8;function l(f){if(!(this instanceof l))return new l(f);this.options=n.assign({level:y,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},f||{});var w=this.options;w.raw&&0<w.windowBits?w.windowBits=-w.windowBits:w.gzip&&0<w.windowBits&&w.windowBits<16&&(w.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var E=a.deflateInit2(this.strm,w.level,w.method,w.windowBits,w.memLevel,w.strategy);if(E!==v)throw new Error(s[E]);if(w.header&&a.deflateSetHeader(this.strm,w.header),w.dictionary){var S;if(S=typeof w.dictionary=="string"?o.string2buf(w.dictionary):b.call(w.dictionary)==="[object ArrayBuffer]"?new Uint8Array(w.dictionary):w.dictionary,(E=a.deflateSetDictionary(this.strm,S))!==v)throw new Error(s[E]);this._dict_set=!0}}function m(f,w){var E=new l(w);if(E.push(f,!0),E.err)throw E.msg||s[E.err];return E.result}l.prototype.push=function(f,w){var E,S,A=this.strm,O=this.options.chunkSize;if(this.ended)return!1;S=w===~~w?w:w===!0?4:0,typeof f=="string"?A.input=o.string2buf(f):b.call(f)==="[object ArrayBuffer]"?A.input=new Uint8Array(f):A.input=f,A.next_in=0,A.avail_in=A.input.length;do{if(A.avail_out===0&&(A.output=new n.Buf8(O),A.next_out=0,A.avail_out=O),(E=a.deflate(A,S))!==1&&E!==v)return this.onEnd(E),!(this.ended=!0);A.avail_out!==0&&(A.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(o.buf2binstring(n.shrinkBuf(A.output,A.next_out))):this.onData(n.shrinkBuf(A.output,A.next_out)))}while((0<A.avail_in||A.avail_out===0)&&E!==1);return S===4?(E=a.deflateEnd(this.strm),this.onEnd(E),this.ended=!0,E===v):S!==2||(this.onEnd(v),!(A.avail_out=0))},l.prototype.onData=function(f){this.chunks.push(f)},l.prototype.onEnd=function(f){f===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},d.Deflate=l,d.deflate=m,d.deflateRaw=function(f,w){return(w=w||{}).raw=!0,m(f,w)},d.gzip=function(f,w){return(w=w||{}).gzip=!0,m(f,w)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,p,d){var a=r("./zlib/inflate"),n=r("./utils/common"),o=r("./utils/strings"),s=r("./zlib/constants"),h=r("./zlib/messages"),b=r("./zlib/zstream"),v=r("./zlib/gzheader"),y=Object.prototype.toString;function c(l){if(!(this instanceof c))return new c(l);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},l||{});var m=this.options;m.raw&&0<=m.windowBits&&m.windowBits<16&&(m.windowBits=-m.windowBits,m.windowBits===0&&(m.windowBits=-15)),!(0<=m.windowBits&&m.windowBits<16)||l&&l.windowBits||(m.windowBits+=32),15<m.windowBits&&m.windowBits<48&&(15&m.windowBits)==0&&(m.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new b,this.strm.avail_out=0;var f=a.inflateInit2(this.strm,m.windowBits);if(f!==s.Z_OK)throw new Error(h[f]);this.header=new v,a.inflateGetHeader(this.strm,this.header)}function g(l,m){var f=new c(m);if(f.push(l,!0),f.err)throw f.msg||h[f.err];return f.result}c.prototype.push=function(l,m){var f,w,E,S,A,O,L=this.strm,R=this.options.chunkSize,T=this.options.dictionary,W=!1;if(this.ended)return!1;w=m===~~m?m:m===!0?s.Z_FINISH:s.Z_NO_FLUSH,typeof l=="string"?L.input=o.binstring2buf(l):y.call(l)==="[object ArrayBuffer]"?L.input=new Uint8Array(l):L.input=l,L.next_in=0,L.avail_in=L.input.length;do{if(L.avail_out===0&&(L.output=new n.Buf8(R),L.next_out=0,L.avail_out=R),(f=a.inflate(L,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&T&&(O=typeof T=="string"?o.string2buf(T):y.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,f=a.inflateSetDictionary(this.strm,O)),f===s.Z_BUF_ERROR&&W===!0&&(f=s.Z_OK,W=!1),f!==s.Z_STREAM_END&&f!==s.Z_OK)return this.onEnd(f),!(this.ended=!0);L.next_out&&(L.avail_out!==0&&f!==s.Z_STREAM_END&&(L.avail_in!==0||w!==s.Z_FINISH&&w!==s.Z_SYNC_FLUSH)||(this.options.to==="string"?(E=o.utf8border(L.output,L.next_out),S=L.next_out-E,A=o.buf2string(L.output,E),L.next_out=S,L.avail_out=R-S,S&&n.arraySet(L.output,L.output,E,S,0),this.onData(A)):this.onData(n.shrinkBuf(L.output,L.next_out)))),L.avail_in===0&&L.avail_out===0&&(W=!0)}while((0<L.avail_in||L.avail_out===0)&&f!==s.Z_STREAM_END);return f===s.Z_STREAM_END&&(w=s.Z_FINISH),w===s.Z_FINISH?(f=a.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===s.Z_OK):w!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(L.avail_out=0))},c.prototype.onData=function(l){this.chunks.push(l)},c.prototype.onEnd=function(l){l===s.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=l,this.msg=this.strm.msg},d.Inflate=c,d.inflate=g,d.inflateRaw=function(l,m){return(m=m||{}).raw=!0,g(l,m)},d.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,p,d){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";d.assign=function(s){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var b=h.shift();if(b){if(typeof b!="object")throw new TypeError(b+"must be non-object");for(var v in b)b.hasOwnProperty(v)&&(s[v]=b[v])}}return s},d.shrinkBuf=function(s,h){return s.length===h?s:s.subarray?s.subarray(0,h):(s.length=h,s)};var n={arraySet:function(s,h,b,v,y){if(h.subarray&&s.subarray)s.set(h.subarray(b,b+v),y);else for(var c=0;c<v;c++)s[y+c]=h[b+c]},flattenChunks:function(s){var h,b,v,y,c,g;for(h=v=0,b=s.length;h<b;h++)v+=s[h].length;for(g=new Uint8Array(v),h=y=0,b=s.length;h<b;h++)c=s[h],g.set(c,y),y+=c.length;return g}},o={arraySet:function(s,h,b,v,y){for(var c=0;c<v;c++)s[y+c]=h[b+c]},flattenChunks:function(s){return[].concat.apply([],s)}};d.setTyped=function(s){s?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,n)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,o))},d.setTyped(a)},{}],42:[function(r,p,d){var a=r("./common"),n=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch{n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{o=!1}for(var s=new a.Buf8(256),h=0;h<256;h++)s[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function b(v,y){if(y<65537&&(v.subarray&&o||!v.subarray&&n))return String.fromCharCode.apply(null,a.shrinkBuf(v,y));for(var c="",g=0;g<y;g++)c+=String.fromCharCode(v[g]);return c}s[254]=s[254]=1,d.string2buf=function(v){var y,c,g,l,m,f=v.length,w=0;for(l=0;l<f;l++)(64512&(c=v.charCodeAt(l)))==55296&&l+1<f&&(64512&(g=v.charCodeAt(l+1)))==56320&&(c=65536+(c-55296<<10)+(g-56320),l++),w+=c<128?1:c<2048?2:c<65536?3:4;for(y=new a.Buf8(w),l=m=0;m<w;l++)(64512&(c=v.charCodeAt(l)))==55296&&l+1<f&&(64512&(g=v.charCodeAt(l+1)))==56320&&(c=65536+(c-55296<<10)+(g-56320),l++),c<128?y[m++]=c:(c<2048?y[m++]=192|c>>>6:(c<65536?y[m++]=224|c>>>12:(y[m++]=240|c>>>18,y[m++]=128|c>>>12&63),y[m++]=128|c>>>6&63),y[m++]=128|63&c);return y},d.buf2binstring=function(v){return b(v,v.length)},d.binstring2buf=function(v){for(var y=new a.Buf8(v.length),c=0,g=y.length;c<g;c++)y[c]=v.charCodeAt(c);return y},d.buf2string=function(v,y){var c,g,l,m,f=y||v.length,w=new Array(2*f);for(c=g=0;c<f;)if((l=v[c++])<128)w[g++]=l;else if(4<(m=s[l]))w[g++]=65533,c+=m-1;else{for(l&=m===2?31:m===3?15:7;1<m&&c<f;)l=l<<6|63&v[c++],m--;1<m?w[g++]=65533:l<65536?w[g++]=l:(l-=65536,w[g++]=55296|l>>10&1023,w[g++]=56320|1023&l)}return b(w,g)},d.utf8border=function(v,y){var c;for((y=y||v.length)>v.length&&(y=v.length),c=y-1;0<=c&&(192&v[c])==128;)c--;return c<0||c===0?y:c+s[v[c]]>y?c:y}},{"./common":41}],43:[function(r,p,d){p.exports=function(a,n,o,s){for(var h=65535&a|0,b=a>>>16&65535|0,v=0;o!==0;){for(o-=v=2e3<o?2e3:o;b=b+(h=h+n[s++]|0)|0,--v;);h%=65521,b%=65521}return h|b<<16|0}},{}],44:[function(r,p,d){p.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,p,d){var a=(function(){for(var n,o=[],s=0;s<256;s++){n=s;for(var h=0;h<8;h++)n=1&n?3988292384^n>>>1:n>>>1;o[s]=n}return o})();p.exports=function(n,o,s,h){var b=a,v=h+s;n^=-1;for(var y=h;y<v;y++)n=n>>>8^b[255&(n^o[y])];return-1^n}},{}],46:[function(r,p,d){var a,n=r("../utils/common"),o=r("./trees"),s=r("./adler32"),h=r("./crc32"),b=r("./messages"),v=0,y=4,c=0,g=-2,l=-1,m=4,f=2,w=8,E=9,S=286,A=30,O=19,L=2*S+1,R=15,T=3,W=258,Q=W+T+1,j=42,B=113,i=1,U=2,ee=3,$=4;function Z(e,M){return e.msg=b[M],M}function V(e){return(e<<1)-(4<e?9:0)}function J(e){for(var M=e.length;0<=--M;)e[M]=0}function _(e){var M=e.state,F=M.pending;F>e.avail_out&&(F=e.avail_out),F!==0&&(n.arraySet(e.output,M.pending_buf,M.pending_out,F,e.next_out),e.next_out+=F,M.pending_out+=F,e.total_out+=F,e.avail_out-=F,M.pending-=F,M.pending===0&&(M.pending_out=0))}function C(e,M){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,M),e.block_start=e.strstart,_(e.strm)}function K(e,M){e.pending_buf[e.pending++]=M}function H(e,M){e.pending_buf[e.pending++]=M>>>8&255,e.pending_buf[e.pending++]=255&M}function Y(e,M){var F,k,x=e.max_chain_length,I=e.strstart,D=e.prev_length,P=e.nice_match,N=e.strstart>e.w_size-Q?e.strstart-(e.w_size-Q):0,G=e.window,te=e.w_mask,q=e.prev,ie=e.strstart+W,ue=G[I+D-1],de=G[I+D];e.prev_length>=e.good_match&&(x>>=2),P>e.lookahead&&(P=e.lookahead);do if(G[(F=M)+D]===de&&G[F+D-1]===ue&&G[F]===G[I]&&G[++F]===G[I+1]){I+=2,F++;do;while(G[++I]===G[++F]&&G[++I]===G[++F]&&G[++I]===G[++F]&&G[++I]===G[++F]&&G[++I]===G[++F]&&G[++I]===G[++F]&&G[++I]===G[++F]&&G[++I]===G[++F]&&I<ie);if(k=W-(ie-I),I=ie-W,D<k){if(e.match_start=M,P<=(D=k))break;ue=G[I+D-1],de=G[I+D]}}while((M=q[M&te])>N&&--x!=0);return D<=e.lookahead?D:e.lookahead}function ce(e){var M,F,k,x,I,D,P,N,G,te,q=e.w_size;do{if(x=e.window_size-e.lookahead-e.strstart,e.strstart>=q+(q-Q)){for(n.arraySet(e.window,e.window,q,q,0),e.match_start-=q,e.strstart-=q,e.block_start-=q,M=F=e.hash_size;k=e.head[--M],e.head[M]=q<=k?k-q:0,--F;);for(M=F=q;k=e.prev[--M],e.prev[M]=q<=k?k-q:0,--F;);x+=q}if(e.strm.avail_in===0)break;if(D=e.strm,P=e.window,N=e.strstart+e.lookahead,G=x,te=void 0,te=D.avail_in,G<te&&(te=G),F=te===0?0:(D.avail_in-=te,n.arraySet(P,D.input,D.next_in,te,N),D.state.wrap===1?D.adler=s(D.adler,P,te,N):D.state.wrap===2&&(D.adler=h(D.adler,P,te,N)),D.next_in+=te,D.total_in+=te,te),e.lookahead+=F,e.lookahead+e.insert>=T)for(I=e.strstart-e.insert,e.ins_h=e.window[I],e.ins_h=(e.ins_h<<e.hash_shift^e.window[I+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[I+T-1])&e.hash_mask,e.prev[I&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=I,I++,e.insert--,!(e.lookahead+e.insert<T)););}while(e.lookahead<Q&&e.strm.avail_in!==0)}function oe(e,M){for(var F,k;;){if(e.lookahead<Q){if(ce(e),e.lookahead<Q&&M===v)return i;if(e.lookahead===0)break}if(F=0,e.lookahead>=T&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),F!==0&&e.strstart-F<=e.w_size-Q&&(e.match_length=Y(e,F)),e.match_length>=T)if(k=o._tr_tally(e,e.strstart-e.match_start,e.match_length-T),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=T){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,--e.match_length!=0;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else k=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(k&&(C(e,!1),e.strm.avail_out===0))return i}return e.insert=e.strstart<T-1?e.strstart:T-1,M===y?(C(e,!0),e.strm.avail_out===0?ee:$):e.last_lit&&(C(e,!1),e.strm.avail_out===0)?i:U}function ae(e,M){for(var F,k,x;;){if(e.lookahead<Q){if(ce(e),e.lookahead<Q&&M===v)return i;if(e.lookahead===0)break}if(F=0,e.lookahead>=T&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=T-1,F!==0&&e.prev_length<e.max_lazy_match&&e.strstart-F<=e.w_size-Q&&(e.match_length=Y(e,F),e.match_length<=5&&(e.strategy===1||e.match_length===T&&4096<e.strstart-e.match_start)&&(e.match_length=T-1)),e.prev_length>=T&&e.match_length<=e.prev_length){for(x=e.strstart+e.lookahead-T,k=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-T),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=x&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+T-1])&e.hash_mask,F=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),--e.prev_length!=0;);if(e.match_available=0,e.match_length=T-1,e.strstart++,k&&(C(e,!1),e.strm.avail_out===0))return i}else if(e.match_available){if((k=o._tr_tally(e,0,e.window[e.strstart-1]))&&C(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return i}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(k=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<T-1?e.strstart:T-1,M===y?(C(e,!0),e.strm.avail_out===0?ee:$):e.last_lit&&(C(e,!1),e.strm.avail_out===0)?i:U}function se(e,M,F,k,x){this.good_length=e,this.max_lazy=M,this.nice_length=F,this.max_chain=k,this.func=x}function me(){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=w,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 n.Buf16(2*L),this.dyn_dtree=new n.Buf16(2*(2*A+1)),this.bl_tree=new n.Buf16(2*(2*O+1)),J(this.dyn_ltree),J(this.dyn_dtree),J(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(R+1),this.heap=new n.Buf16(2*S+1),J(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(2*S+1),J(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 pe(e){var M;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=f,(M=e.state).pending=0,M.pending_out=0,M.wrap<0&&(M.wrap=-M.wrap),M.status=M.wrap?j:B,e.adler=M.wrap===2?0:1,M.last_flush=v,o._tr_init(M),c):Z(e,g)}function xe(e){var M=pe(e);return M===c&&(function(F){F.window_size=2*F.w_size,J(F.head),F.max_lazy_match=a[F.level].max_lazy,F.good_match=a[F.level].good_length,F.nice_match=a[F.level].nice_length,F.max_chain_length=a[F.level].max_chain,F.strstart=0,F.block_start=0,F.lookahead=0,F.insert=0,F.match_length=F.prev_length=T-1,F.match_available=0,F.ins_h=0})(e.state),M}function ke(e,M,F,k,x,I){if(!e)return g;var D=1;if(M===l&&(M=6),k<0?(D=0,k=-k):15<k&&(D=2,k-=16),x<1||E<x||F!==w||k<8||15<k||M<0||9<M||I<0||m<I)return Z(e,g);k===8&&(k=9);var P=new me;return(e.state=P).strm=e,P.wrap=D,P.gzhead=null,P.w_bits=k,P.w_size=1<<P.w_bits,P.w_mask=P.w_size-1,P.hash_bits=x+7,P.hash_size=1<<P.hash_bits,P.hash_mask=P.hash_size-1,P.hash_shift=~~((P.hash_bits+T-1)/T),P.window=new n.Buf8(2*P.w_size),P.head=new n.Buf16(P.hash_size),P.prev=new n.Buf16(P.w_size),P.lit_bufsize=1<<x+6,P.pending_buf_size=4*P.lit_bufsize,P.pending_buf=new n.Buf8(P.pending_buf_size),P.d_buf=1*P.lit_bufsize,P.l_buf=3*P.lit_bufsize,P.level=M,P.strategy=I,P.method=F,xe(e)}a=[new se(0,0,0,0,function(e,M){var F=65535;for(F>e.pending_buf_size-5&&(F=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ce(e),e.lookahead===0&&M===v)return i;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var k=e.block_start+F;if((e.strstart===0||e.strstart>=k)&&(e.lookahead=e.strstart-k,e.strstart=k,C(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Q&&(C(e,!1),e.strm.avail_out===0))return i}return e.insert=0,M===y?(C(e,!0),e.strm.avail_out===0?ee:$):(e.strstart>e.block_start&&(C(e,!1),e.strm.avail_out),i)}),new se(4,4,8,4,oe),new se(4,5,16,8,oe),new se(4,6,32,32,oe),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)],d.deflateInit=function(e,M){return ke(e,M,w,15,8,0)},d.deflateInit2=ke,d.deflateReset=xe,d.deflateResetKeep=pe,d.deflateSetHeader=function(e,M){return e&&e.state?e.state.wrap!==2?g:(e.state.gzhead=M,c):g},d.deflate=function(e,M){var F,k,x,I;if(!e||!e.state||5<M||M<0)return e?Z(e,g):g;if(k=e.state,!e.output||!e.input&&e.avail_in!==0||k.status===666&&M!==y)return Z(e,e.avail_out===0?-5:g);if(k.strm=e,F=k.last_flush,k.last_flush=M,k.status===j)if(k.wrap===2)e.adler=0,K(k,31),K(k,139),K(k,8),k.gzhead?(K(k,(k.gzhead.text?1:0)+(k.gzhead.hcrc?2:0)+(k.gzhead.extra?4:0)+(k.gzhead.name?8:0)+(k.gzhead.comment?16:0)),K(k,255&k.gzhead.time),K(k,k.gzhead.time>>8&255),K(k,k.gzhead.time>>16&255),K(k,k.gzhead.time>>24&255),K(k,k.level===9?2:2<=k.strategy||k.level<2?4:0),K(k,255&k.gzhead.os),k.gzhead.extra&&k.gzhead.extra.length&&(K(k,255&k.gzhead.extra.length),K(k,k.gzhead.extra.length>>8&255)),k.gzhead.hcrc&&(e.adler=h(e.adler,k.pending_buf,k.pending,0)),k.gzindex=0,k.status=69):(K(k,0),K(k,0),K(k,0),K(k,0),K(k,0),K(k,k.level===9?2:2<=k.strategy||k.level<2?4:0),K(k,3),k.status=B);else{var D=w+(k.w_bits-8<<4)<<8;D|=(2<=k.strategy||k.level<2?0:k.level<6?1:k.level===6?2:3)<<6,k.strstart!==0&&(D|=32),D+=31-D%31,k.status=B,H(k,D),k.strstart!==0&&(H(k,e.adler>>>16),H(k,65535&e.adler)),e.adler=1}if(k.status===69)if(k.gzhead.extra){for(x=k.pending;k.gzindex<(65535&k.gzhead.extra.length)&&(k.pending!==k.pending_buf_size||(k.gzhead.hcrc&&k.pending>x&&(e.adler=h(e.adler,k.pending_buf,k.pending-x,x)),_(e),x=k.pending,k.pending!==k.pending_buf_size));)K(k,255&k.gzhead.extra[k.gzindex]),k.gzindex++;k.gzhead.hcrc&&k.pending>x&&(e.adler=h(e.adler,k.pending_buf,k.pending-x,x)),k.gzindex===k.gzhead.extra.length&&(k.gzindex=0,k.status=73)}else k.status=73;if(k.status===73)if(k.gzhead.name){x=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>x&&(e.adler=h(e.adler,k.pending_buf,k.pending-x,x)),_(e),x=k.pending,k.pending===k.pending_buf_size)){I=1;break}I=k.gzindex<k.gzhead.name.length?255&k.gzhead.name.charCodeAt(k.gzindex++):0,K(k,I)}while(I!==0);k.gzhead.hcrc&&k.pending>x&&(e.adler=h(e.adler,k.pending_buf,k.pending-x,x)),I===0&&(k.gzindex=0,k.status=91)}else k.status=91;if(k.status===91)if(k.gzhead.comment){x=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>x&&(e.adler=h(e.adler,k.pending_buf,k.pending-x,x)),_(e),x=k.pending,k.pending===k.pending_buf_size)){I=1;break}I=k.gzindex<k.gzhead.comment.length?255&k.gzhead.comment.charCodeAt(k.gzindex++):0,K(k,I)}while(I!==0);k.gzhead.hcrc&&k.pending>x&&(e.adler=h(e.adler,k.pending_buf,k.pending-x,x)),I===0&&(k.status=103)}else k.status=103;if(k.status===103&&(k.gzhead.hcrc?(k.pending+2>k.pending_buf_size&&_(e),k.pending+2<=k.pending_buf_size&&(K(k,255&e.adler),K(k,e.adler>>8&255),e.adler=0,k.status=B)):k.status=B),k.pending!==0){if(_(e),e.avail_out===0)return k.last_flush=-1,c}else if(e.avail_in===0&&V(M)<=V(F)&&M!==y)return Z(e,-5);if(k.status===666&&e.avail_in!==0)return Z(e,-5);if(e.avail_in!==0||k.lookahead!==0||M!==v&&k.status!==666){var P=k.strategy===2?(function(N,G){for(var te;;){if(N.lookahead===0&&(ce(N),N.lookahead===0)){if(G===v)return i;break}if(N.match_length=0,te=o._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++,te&&(C(N,!1),N.strm.avail_out===0))return i}return N.insert=0,G===y?(C(N,!0),N.strm.avail_out===0?ee:$):N.last_lit&&(C(N,!1),N.strm.avail_out===0)?i:U})(k,M):k.strategy===3?(function(N,G){for(var te,q,ie,ue,de=N.window;;){if(N.lookahead<=W){if(ce(N),N.lookahead<=W&&G===v)return i;if(N.lookahead===0)break}if(N.match_length=0,N.lookahead>=T&&0<N.strstart&&(q=de[ie=N.strstart-1])===de[++ie]&&q===de[++ie]&&q===de[++ie]){ue=N.strstart+W;do;while(q===de[++ie]&&q===de[++ie]&&q===de[++ie]&&q===de[++ie]&&q===de[++ie]&&q===de[++ie]&&q===de[++ie]&&q===de[++ie]&&ie<ue);N.match_length=W-(ue-ie),N.match_length>N.lookahead&&(N.match_length=N.lookahead)}if(N.match_length>=T?(te=o._tr_tally(N,1,N.match_length-T),N.lookahead-=N.match_length,N.strstart+=N.match_length,N.match_length=0):(te=o._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++),te&&(C(N,!1),N.strm.avail_out===0))return i}return N.insert=0,G===y?(C(N,!0),N.strm.avail_out===0?ee:$):N.last_lit&&(C(N,!1),N.strm.avail_out===0)?i:U})(k,M):a[k.level].func(k,M);if(P!==ee&&P!==$||(k.status=666),P===i||P===ee)return e.avail_out===0&&(k.last_flush=-1),c;if(P===U&&(M===1?o._tr_align(k):M!==5&&(o._tr_stored_block(k,0,0,!1),M===3&&(J(k.head),k.lookahead===0&&(k.strstart=0,k.block_start=0,k.insert=0))),_(e),e.avail_out===0))return k.last_flush=-1,c}return M!==y?c:k.wrap<=0?1:(k.wrap===2?(K(k,255&e.adler),K(k,e.adler>>8&255),K(k,e.adler>>16&255),K(k,e.adler>>24&255),K(k,255&e.total_in),K(k,e.total_in>>8&255),K(k,e.total_in>>16&255),K(k,e.total_in>>24&255)):(H(k,e.adler>>>16),H(k,65535&e.adler)),_(e),0<k.wrap&&(k.wrap=-k.wrap),k.pending!==0?c:1)},d.deflateEnd=function(e){var M;return e&&e.state?(M=e.state.status)!==j&&M!==69&&M!==73&&M!==91&&M!==103&&M!==B&&M!==666?Z(e,g):(e.state=null,M===B?Z(e,-3):c):g},d.deflateSetDictionary=function(e,M){var F,k,x,I,D,P,N,G,te=M.length;if(!e||!e.state||(I=(F=e.state).wrap)===2||I===1&&F.status!==j||F.lookahead)return g;for(I===1&&(e.adler=s(e.adler,M,te,0)),F.wrap=0,te>=F.w_size&&(I===0&&(J(F.head),F.strstart=0,F.block_start=0,F.insert=0),G=new n.Buf8(F.w_size),n.arraySet(G,M,te-F.w_size,F.w_size,0),M=G,te=F.w_size),D=e.avail_in,P=e.next_in,N=e.input,e.avail_in=te,e.next_in=0,e.input=M,ce(F);F.lookahead>=T;){for(k=F.strstart,x=F.lookahead-(T-1);F.ins_h=(F.ins_h<<F.hash_shift^F.window[k+T-1])&F.hash_mask,F.prev[k&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=k,k++,--x;);F.strstart=k,F.lookahead=T-1,ce(F)}return F.strstart+=F.lookahead,F.block_start=F.strstart,F.insert=F.lookahead,F.lookahead=0,F.match_length=F.prev_length=T-1,F.match_available=0,e.next_in=P,e.input=N,e.avail_in=D,F.wrap=I,c},d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,p,d){p.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,p,d){p.exports=function(a,n){var o,s,h,b,v,y,c,g,l,m,f,w,E,S,A,O,L,R,T,W,Q,j,B,i,U;o=a.state,s=a.next_in,i=a.input,h=s+(a.avail_in-5),b=a.next_out,U=a.output,v=b-(n-a.avail_out),y=b+(a.avail_out-257),c=o.dmax,g=o.wsize,l=o.whave,m=o.wnext,f=o.window,w=o.hold,E=o.bits,S=o.lencode,A=o.distcode,O=(1<<o.lenbits)-1,L=(1<<o.distbits)-1;e:do{E<15&&(w+=i[s++]<<E,E+=8,w+=i[s++]<<E,E+=8),R=S[w&O];t:for(;;){if(w>>>=T=R>>>24,E-=T,(T=R>>>16&255)===0)U[b++]=65535&R;else{if(!(16&T)){if((64&T)==0){R=S[(65535&R)+(w&(1<<T)-1)];continue t}if(32&T){o.mode=12;break e}a.msg="invalid literal/length code",o.mode=30;break e}W=65535&R,(T&=15)&&(E<T&&(w+=i[s++]<<E,E+=8),W+=w&(1<<T)-1,w>>>=T,E-=T),E<15&&(w+=i[s++]<<E,E+=8,w+=i[s++]<<E,E+=8),R=A[w&L];r:for(;;){if(w>>>=T=R>>>24,E-=T,!(16&(T=R>>>16&255))){if((64&T)==0){R=A[(65535&R)+(w&(1<<T)-1)];continue r}a.msg="invalid distance code",o.mode=30;break e}if(Q=65535&R,E<(T&=15)&&(w+=i[s++]<<E,(E+=8)<T&&(w+=i[s++]<<E,E+=8)),c<(Q+=w&(1<<T)-1)){a.msg="invalid distance too far back",o.mode=30;break e}if(w>>>=T,E-=T,(T=b-v)<Q){if(l<(T=Q-T)&&o.sane){a.msg="invalid distance too far back",o.mode=30;break e}if(B=f,(j=0)===m){if(j+=g-T,T<W){for(W-=T;U[b++]=f[j++],--T;);j=b-Q,B=U}}else if(m<T){if(j+=g+m-T,(T-=m)<W){for(W-=T;U[b++]=f[j++],--T;);if(j=0,m<W){for(W-=T=m;U[b++]=f[j++],--T;);j=b-Q,B=U}}}else if(j+=m-T,T<W){for(W-=T;U[b++]=f[j++],--T;);j=b-Q,B=U}for(;2<W;)U[b++]=B[j++],U[b++]=B[j++],U[b++]=B[j++],W-=3;W&&(U[b++]=B[j++],1<W&&(U[b++]=B[j++]))}else{for(j=b-Q;U[b++]=U[j++],U[b++]=U[j++],U[b++]=U[j++],2<(W-=3););W&&(U[b++]=U[j++],1<W&&(U[b++]=U[j++]))}break}}break}}while(s<h&&b<y);s-=W=E>>3,w&=(1<<(E-=W<<3))-1,a.next_in=s,a.next_out=b,a.avail_in=s<h?h-s+5:5-(s-h),a.avail_out=b<y?y-b+257:257-(b-y),o.hold=w,o.bits=E}},{}],49:[function(r,p,d){var a=r("../utils/common"),n=r("./adler32"),o=r("./crc32"),s=r("./inffast"),h=r("./inftrees"),b=1,v=2,y=0,c=-2,g=1,l=852,m=592;function f(j){return(j>>>24&255)+(j>>>8&65280)+((65280&j)<<8)+((255&j)<<24)}function w(){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 a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function E(j){var B;return j&&j.state?(B=j.state,j.total_in=j.total_out=B.total=0,j.msg="",B.wrap&&(j.adler=1&B.wrap),B.mode=g,B.last=0,B.havedict=0,B.dmax=32768,B.head=null,B.hold=0,B.bits=0,B.lencode=B.lendyn=new a.Buf32(l),B.distcode=B.distdyn=new a.Buf32(m),B.sane=1,B.back=-1,y):c}function S(j){var B;return j&&j.state?((B=j.state).wsize=0,B.whave=0,B.wnext=0,E(j)):c}function A(j,B){var i,U;return j&&j.state?(U=j.state,B<0?(i=0,B=-B):(i=1+(B>>4),B<48&&(B&=15)),B&&(B<8||15<B)?c:(U.window!==null&&U.wbits!==B&&(U.window=null),U.wrap=i,U.wbits=B,S(j))):c}function O(j,B){var i,U;return j?(U=new w,(j.state=U).window=null,(i=A(j,B))!==y&&(j.state=null),i):c}var L,R,T=!0;function W(j){if(T){var B;for(L=new a.Buf32(512),R=new a.Buf32(32),B=0;B<144;)j.lens[B++]=8;for(;B<256;)j.lens[B++]=9;for(;B<280;)j.lens[B++]=7;for(;B<288;)j.lens[B++]=8;for(h(b,j.lens,0,288,L,0,j.work,{bits:9}),B=0;B<32;)j.lens[B++]=5;h(v,j.lens,0,32,R,0,j.work,{bits:5}),T=!1}j.lencode=L,j.lenbits=9,j.distcode=R,j.distbits=5}function Q(j,B,i,U){var ee,$=j.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new a.Buf8($.wsize)),U>=$.wsize?(a.arraySet($.window,B,i-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):(U<(ee=$.wsize-$.wnext)&&(ee=U),a.arraySet($.window,B,i-U,ee,$.wnext),(U-=ee)?(a.arraySet($.window,B,i-U,U,0),$.wnext=U,$.whave=$.wsize):($.wnext+=ee,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=ee))),0}d.inflateReset=S,d.inflateReset2=A,d.inflateResetKeep=E,d.inflateInit=function(j){return O(j,15)},d.inflateInit2=O,d.inflate=function(j,B){var i,U,ee,$,Z,V,J,_,C,K,H,Y,ce,oe,ae,se,me,pe,xe,ke,e,M,F,k,x=0,I=new a.Buf8(4),D=[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;(i=j.state).mode===12&&(i.mode=13),Z=j.next_out,ee=j.output,J=j.avail_out,$=j.next_in,U=j.input,V=j.avail_in,_=i.hold,C=i.bits,K=V,H=J,M=y;e:for(;;)switch(i.mode){case g:if(i.wrap===0){i.mode=13;break}for(;C<16;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}if(2&i.wrap&&_===35615){I[i.check=0]=255&_,I[1]=_>>>8&255,i.check=o(i.check,I,2,0),C=_=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&_)<<8)+(_>>8))%31){j.msg="incorrect header check",i.mode=30;break}if((15&_)!=8){j.msg="unknown compression method",i.mode=30;break}if(C-=4,e=8+(15&(_>>>=4)),i.wbits===0)i.wbits=e;else if(e>i.wbits){j.msg="invalid window size",i.mode=30;break}i.dmax=1<<e,j.adler=i.check=1,i.mode=512&_?10:12,C=_=0;break;case 2:for(;C<16;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}if(i.flags=_,(255&i.flags)!=8){j.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){j.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=_>>8&1),512&i.flags&&(I[0]=255&_,I[1]=_>>>8&255,i.check=o(i.check,I,2,0)),C=_=0,i.mode=3;case 3:for(;C<32;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}i.head&&(i.head.time=_),512&i.flags&&(I[0]=255&_,I[1]=_>>>8&255,I[2]=_>>>16&255,I[3]=_>>>24&255,i.check=o(i.check,I,4,0)),C=_=0,i.mode=4;case 4:for(;C<16;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}i.head&&(i.head.xflags=255&_,i.head.os=_>>8),512&i.flags&&(I[0]=255&_,I[1]=_>>>8&255,i.check=o(i.check,I,2,0)),C=_=0,i.mode=5;case 5:if(1024&i.flags){for(;C<16;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}i.length=_,i.head&&(i.head.extra_len=_),512&i.flags&&(I[0]=255&_,I[1]=_>>>8&255,i.check=o(i.check,I,2,0)),C=_=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(V<(Y=i.length)&&(Y=V),Y&&(i.head&&(e=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),a.arraySet(i.head.extra,U,$,Y,e)),512&i.flags&&(i.check=o(i.check,U,Y,$)),V-=Y,$+=Y,i.length-=Y),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(V===0)break e;for(Y=0;e=U[$+Y++],i.head&&e&&i.length<65536&&(i.head.name+=String.fromCharCode(e)),e&&Y<V;);if(512&i.flags&&(i.check=o(i.check,U,Y,$)),V-=Y,$+=Y,e)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(V===0)break e;for(Y=0;e=U[$+Y++],i.head&&e&&i.length<65536&&(i.head.comment+=String.fromCharCode(e)),e&&Y<V;);if(512&i.flags&&(i.check=o(i.check,U,Y,$)),V-=Y,$+=Y,e)break e}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;C<16;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}if(_!==(65535&i.check)){j.msg="header crc mismatch",i.mode=30;break}C=_=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),j.adler=i.check=0,i.mode=12;break;case 10:for(;C<32;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}j.adler=i.check=f(_),C=_=0,i.mode=11;case 11:if(i.havedict===0)return j.next_out=Z,j.avail_out=J,j.next_in=$,j.avail_in=V,i.hold=_,i.bits=C,2;j.adler=i.check=1,i.mode=12;case 12:if(B===5||B===6)break e;case 13:if(i.last){_>>>=7&C,C-=7&C,i.mode=27;break}for(;C<3;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}switch(i.last=1&_,C-=1,3&(_>>>=1)){case 0:i.mode=14;break;case 1:if(W(i),i.mode=20,B!==6)break;_>>>=2,C-=2;break e;case 2:i.mode=17;break;case 3:j.msg="invalid block type",i.mode=30}_>>>=2,C-=2;break;case 14:for(_>>>=7&C,C-=7&C;C<32;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}if((65535&_)!=(_>>>16^65535)){j.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&_,C=_=0,i.mode=15,B===6)break e;case 15:i.mode=16;case 16:if(Y=i.length){if(V<Y&&(Y=V),J<Y&&(Y=J),Y===0)break e;a.arraySet(ee,U,$,Y,Z),V-=Y,$+=Y,J-=Y,Z+=Y,i.length-=Y;break}i.mode=12;break;case 17:for(;C<14;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}if(i.nlen=257+(31&_),_>>>=5,C-=5,i.ndist=1+(31&_),_>>>=5,C-=5,i.ncode=4+(15&_),_>>>=4,C-=4,286<i.nlen||30<i.ndist){j.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;C<3;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}i.lens[D[i.have++]]=7&_,_>>>=3,C-=3}for(;i.have<19;)i.lens[D[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,F={bits:i.lenbits},M=h(0,i.lens,0,19,i.lencode,0,i.work,F),i.lenbits=F.bits,M){j.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;se=(x=i.lencode[_&(1<<i.lenbits)-1])>>>16&255,me=65535&x,!((ae=x>>>24)<=C);){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}if(me<16)_>>>=ae,C-=ae,i.lens[i.have++]=me;else{if(me===16){for(k=ae+2;C<k;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}if(_>>>=ae,C-=ae,i.have===0){j.msg="invalid bit length repeat",i.mode=30;break}e=i.lens[i.have-1],Y=3+(3&_),_>>>=2,C-=2}else if(me===17){for(k=ae+3;C<k;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}C-=ae,e=0,Y=3+(7&(_>>>=ae)),_>>>=3,C-=3}else{for(k=ae+7;C<k;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}C-=ae,e=0,Y=11+(127&(_>>>=ae)),_>>>=7,C-=7}if(i.have+Y>i.nlen+i.ndist){j.msg="invalid bit length repeat",i.mode=30;break}for(;Y--;)i.lens[i.have++]=e}}if(i.mode===30)break;if(i.lens[256]===0){j.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,F={bits:i.lenbits},M=h(b,i.lens,0,i.nlen,i.lencode,0,i.work,F),i.lenbits=F.bits,M){j.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,F={bits:i.distbits},M=h(v,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,F),i.distbits=F.bits,M){j.msg="invalid distances set",i.mode=30;break}if(i.mode=20,B===6)break e;case 20:i.mode=21;case 21:if(6<=V&&258<=J){j.next_out=Z,j.avail_out=J,j.next_in=$,j.avail_in=V,i.hold=_,i.bits=C,s(j,H),Z=j.next_out,ee=j.output,J=j.avail_out,$=j.next_in,U=j.input,V=j.avail_in,_=i.hold,C=i.bits,i.mode===12&&(i.back=-1);break}for(i.back=0;se=(x=i.lencode[_&(1<<i.lenbits)-1])>>>16&255,me=65535&x,!((ae=x>>>24)<=C);){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}if(se&&(240&se)==0){for(pe=ae,xe=se,ke=me;se=(x=i.lencode[ke+((_&(1<<pe+xe)-1)>>pe)])>>>16&255,me=65535&x,!(pe+(ae=x>>>24)<=C);){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}_>>>=pe,C-=pe,i.back+=pe}if(_>>>=ae,C-=ae,i.back+=ae,i.length=me,se===0){i.mode=26;break}if(32&se){i.back=-1,i.mode=12;break}if(64&se){j.msg="invalid literal/length code",i.mode=30;break}i.extra=15&se,i.mode=22;case 22:if(i.extra){for(k=i.extra;C<k;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}i.length+=_&(1<<i.extra)-1,_>>>=i.extra,C-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;se=(x=i.distcode[_&(1<<i.distbits)-1])>>>16&255,me=65535&x,!((ae=x>>>24)<=C);){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}if((240&se)==0){for(pe=ae,xe=se,ke=me;se=(x=i.distcode[ke+((_&(1<<pe+xe)-1)>>pe)])>>>16&255,me=65535&x,!(pe+(ae=x>>>24)<=C);){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}_>>>=pe,C-=pe,i.back+=pe}if(_>>>=ae,C-=ae,i.back+=ae,64&se){j.msg="invalid distance code",i.mode=30;break}i.offset=me,i.extra=15&se,i.mode=24;case 24:if(i.extra){for(k=i.extra;C<k;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}i.offset+=_&(1<<i.extra)-1,_>>>=i.extra,C-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){j.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(J===0)break e;if(Y=H-J,i.offset>Y){if((Y=i.offset-Y)>i.whave&&i.sane){j.msg="invalid distance too far back",i.mode=30;break}ce=Y>i.wnext?(Y-=i.wnext,i.wsize-Y):i.wnext-Y,Y>i.length&&(Y=i.length),oe=i.window}else oe=ee,ce=Z-i.offset,Y=i.length;for(J<Y&&(Y=J),J-=Y,i.length-=Y;ee[Z++]=oe[ce++],--Y;);i.length===0&&(i.mode=21);break;case 26:if(J===0)break e;ee[Z++]=i.length,J--,i.mode=21;break;case 27:if(i.wrap){for(;C<32;){if(V===0)break e;V--,_|=U[$++]<<C,C+=8}if(H-=J,j.total_out+=H,i.total+=H,H&&(j.adler=i.check=i.flags?o(i.check,ee,H,Z-H):n(i.check,ee,H,Z-H)),H=J,(i.flags?_:f(_))!==i.check){j.msg="incorrect data check",i.mode=30;break}C=_=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;C<32;){if(V===0)break e;V--,_+=U[$++]<<C,C+=8}if(_!==(4294967295&i.total)){j.msg="incorrect length check",i.mode=30;break}C=_=0}i.mode=29;case 29:M=1;break e;case 30:M=-3;break e;case 31:return-4;case 32:default:return c}return j.next_out=Z,j.avail_out=J,j.next_in=$,j.avail_in=V,i.hold=_,i.bits=C,(i.wsize||H!==j.avail_out&&i.mode<30&&(i.mode<27||B!==4))&&Q(j,j.output,j.next_out,H-j.avail_out)?(i.mode=31,-4):(K-=j.avail_in,H-=j.avail_out,j.total_in+=K,j.total_out+=H,i.total+=H,i.wrap&&H&&(j.adler=i.check=i.flags?o(i.check,ee,H,j.next_out-H):n(i.check,ee,H,j.next_out-H)),j.data_type=i.bits+(i.last?64:0)+(i.mode===12?128:0)+(i.mode===20||i.mode===15?256:0),(K==0&&H===0||B===4)&&M===y&&(M=-5),M)},d.inflateEnd=function(j){if(!j||!j.state)return c;var B=j.state;return B.window&&(B.window=null),j.state=null,y},d.inflateGetHeader=function(j,B){var i;return j&&j.state?(2&(i=j.state).wrap)==0?c:((i.head=B).done=!1,y):c},d.inflateSetDictionary=function(j,B){var i,U=B.length;return j&&j.state?(i=j.state).wrap!==0&&i.mode!==11?c:i.mode===11&&n(1,B,U,0)!==i.check?-3:Q(j,B,U,U)?(i.mode=31,-4):(i.havedict=1,y):c},d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,p,d){var a=r("../utils/common"),n=[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],o=[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],s=[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];p.exports=function(b,v,y,c,g,l,m,f){var w,E,S,A,O,L,R,T,W,Q=f.bits,j=0,B=0,i=0,U=0,ee=0,$=0,Z=0,V=0,J=0,_=0,C=null,K=0,H=new a.Buf16(16),Y=new a.Buf16(16),ce=null,oe=0;for(j=0;j<=15;j++)H[j]=0;for(B=0;B<c;B++)H[v[y+B]]++;for(ee=Q,U=15;1<=U&&H[U]===0;U--);if(U<ee&&(ee=U),U===0)return g[l++]=20971520,g[l++]=20971520,f.bits=1,0;for(i=1;i<U&&H[i]===0;i++);for(ee<i&&(ee=i),j=V=1;j<=15;j++)if(V<<=1,(V-=H[j])<0)return-1;if(0<V&&(b===0||U!==1))return-1;for(Y[1]=0,j=1;j<15;j++)Y[j+1]=Y[j]+H[j];for(B=0;B<c;B++)v[y+B]!==0&&(m[Y[v[y+B]]++]=B);if(L=b===0?(C=ce=m,19):b===1?(C=n,K-=257,ce=o,oe-=257,256):(C=s,ce=h,-1),j=i,O=l,Z=B=_=0,S=-1,A=(J=1<<($=ee))-1,b===1&&852<J||b===2&&592<J)return 1;for(;;){for(R=j-Z,W=m[B]<L?(T=0,m[B]):m[B]>L?(T=ce[oe+m[B]],C[K+m[B]]):(T=96,0),w=1<<j-Z,i=E=1<<$;g[O+(_>>Z)+(E-=w)]=R<<24|T<<16|W|0,E!==0;);for(w=1<<j-1;_&w;)w>>=1;if(w!==0?(_&=w-1,_+=w):_=0,B++,--H[j]==0){if(j===U)break;j=v[y+m[B]]}if(ee<j&&(_&A)!==S){for(Z===0&&(Z=ee),O+=i,V=1<<($=j-Z);$+Z<U&&!((V-=H[$+Z])<=0);)$++,V<<=1;if(J+=1<<$,b===1&&852<J||b===2&&592<J)return 1;g[S=_&A]=ee<<24|$<<16|O-l|0}}return _!==0&&(g[O+_]=j-Z<<24|64<<16|0),f.bits=ee,0}},{"../utils/common":41}],51:[function(r,p,d){p.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,p,d){var a=r("../utils/common"),n=0,o=1;function s(x){for(var I=x.length;0<=--I;)x[I]=0}var h=0,b=29,v=256,y=v+1+b,c=30,g=19,l=2*y+1,m=15,f=16,w=7,E=256,S=16,A=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],R=[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],W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Q=new Array(2*(y+2));s(Q);var j=new Array(2*c);s(j);var B=new Array(512);s(B);var i=new Array(256);s(i);var U=new Array(b);s(U);var ee,$,Z,V=new Array(c);function J(x,I,D,P,N){this.static_tree=x,this.extra_bits=I,this.extra_base=D,this.elems=P,this.max_length=N,this.has_stree=x&&x.length}function _(x,I){this.dyn_tree=x,this.max_code=0,this.stat_desc=I}function C(x){return x<256?B[x]:B[256+(x>>>7)]}function K(x,I){x.pending_buf[x.pending++]=255&I,x.pending_buf[x.pending++]=I>>>8&255}function H(x,I,D){x.bi_valid>f-D?(x.bi_buf|=I<<x.bi_valid&65535,K(x,x.bi_buf),x.bi_buf=I>>f-x.bi_valid,x.bi_valid+=D-f):(x.bi_buf|=I<<x.bi_valid&65535,x.bi_valid+=D)}function Y(x,I,D){H(x,D[2*I],D[2*I+1])}function ce(x,I){for(var D=0;D|=1&x,x>>>=1,D<<=1,0<--I;);return D>>>1}function oe(x,I,D){var P,N,G=new Array(m+1),te=0;for(P=1;P<=m;P++)G[P]=te=te+D[P-1]<<1;for(N=0;N<=I;N++){var q=x[2*N+1];q!==0&&(x[2*N]=ce(G[q]++,q))}}function ae(x){var I;for(I=0;I<y;I++)x.dyn_ltree[2*I]=0;for(I=0;I<c;I++)x.dyn_dtree[2*I]=0;for(I=0;I<g;I++)x.bl_tree[2*I]=0;x.dyn_ltree[2*E]=1,x.opt_len=x.static_len=0,x.last_lit=x.matches=0}function se(x){8<x.bi_valid?K(x,x.bi_buf):0<x.bi_valid&&(x.pending_buf[x.pending++]=x.bi_buf),x.bi_buf=0,x.bi_valid=0}function me(x,I,D,P){var N=2*I,G=2*D;return x[N]<x[G]||x[N]===x[G]&&P[I]<=P[D]}function pe(x,I,D){for(var P=x.heap[D],N=D<<1;N<=x.heap_len&&(N<x.heap_len&&me(I,x.heap[N+1],x.heap[N],x.depth)&&N++,!me(I,P,x.heap[N],x.depth));)x.heap[D]=x.heap[N],D=N,N<<=1;x.heap[D]=P}function xe(x,I,D){var P,N,G,te,q=0;if(x.last_lit!==0)for(;P=x.pending_buf[x.d_buf+2*q]<<8|x.pending_buf[x.d_buf+2*q+1],N=x.pending_buf[x.l_buf+q],q++,P===0?Y(x,N,I):(Y(x,(G=i[N])+v+1,I),(te=L[G])!==0&&H(x,N-=U[G],te),Y(x,G=C(--P),D),(te=R[G])!==0&&H(x,P-=V[G],te)),q<x.last_lit;);Y(x,E,I)}function ke(x,I){var D,P,N,G=I.dyn_tree,te=I.stat_desc.static_tree,q=I.stat_desc.has_stree,ie=I.stat_desc.elems,ue=-1;for(x.heap_len=0,x.heap_max=l,D=0;D<ie;D++)G[2*D]!==0?(x.heap[++x.heap_len]=ue=D,x.depth[D]=0):G[2*D+1]=0;for(;x.heap_len<2;)G[2*(N=x.heap[++x.heap_len]=ue<2?++ue:0)]=1,x.depth[N]=0,x.opt_len--,q&&(x.static_len-=te[2*N+1]);for(I.max_code=ue,D=x.heap_len>>1;1<=D;D--)pe(x,G,D);for(N=ie;D=x.heap[1],x.heap[1]=x.heap[x.heap_len--],pe(x,G,1),P=x.heap[1],x.heap[--x.heap_max]=D,x.heap[--x.heap_max]=P,G[2*N]=G[2*D]+G[2*P],x.depth[N]=(x.depth[D]>=x.depth[P]?x.depth[D]:x.depth[P])+1,G[2*D+1]=G[2*P+1]=N,x.heap[1]=N++,pe(x,G,1),2<=x.heap_len;);x.heap[--x.heap_max]=x.heap[1],(function(de,ze){var Ze,Ee,Ge,ye,nt,_t,Ce=ze.dyn_tree,jr=ze.max_code,ao=ze.stat_desc.static_tree,so=ze.stat_desc.has_stree,lo=ze.stat_desc.extra_bits,Er=ze.stat_desc.extra_base,He=ze.stat_desc.max_length,ot=0;for(ye=0;ye<=m;ye++)de.bl_count[ye]=0;for(Ce[2*de.heap[de.heap_max]+1]=0,Ze=de.heap_max+1;Ze<l;Ze++)He<(ye=Ce[2*Ce[2*(Ee=de.heap[Ze])+1]+1]+1)&&(ye=He,ot++),Ce[2*Ee+1]=ye,jr<Ee||(de.bl_count[ye]++,nt=0,Er<=Ee&&(nt=lo[Ee-Er]),_t=Ce[2*Ee],de.opt_len+=_t*(ye+nt),so&&(de.static_len+=_t*(ao[2*Ee+1]+nt)));if(ot!==0){do{for(ye=He-1;de.bl_count[ye]===0;)ye--;de.bl_count[ye]--,de.bl_count[ye+1]+=2,de.bl_count[He]--,ot-=2}while(0<ot);for(ye=He;ye!==0;ye--)for(Ee=de.bl_count[ye];Ee!==0;)jr<(Ge=de.heap[--Ze])||(Ce[2*Ge+1]!==ye&&(de.opt_len+=(ye-Ce[2*Ge+1])*Ce[2*Ge],Ce[2*Ge+1]=ye),Ee--)}})(x,I),oe(G,ue,x.bl_count)}function e(x,I,D){var P,N,G=-1,te=I[1],q=0,ie=7,ue=4;for(te===0&&(ie=138,ue=3),I[2*(D+1)+1]=65535,P=0;P<=D;P++)N=te,te=I[2*(P+1)+1],++q<ie&&N===te||(q<ue?x.bl_tree[2*N]+=q:N!==0?(N!==G&&x.bl_tree[2*N]++,x.bl_tree[2*S]++):q<=10?x.bl_tree[2*A]++:x.bl_tree[2*O]++,G=N,ue=(q=0)===te?(ie=138,3):N===te?(ie=6,3):(ie=7,4))}function M(x,I,D){var P,N,G=-1,te=I[1],q=0,ie=7,ue=4;for(te===0&&(ie=138,ue=3),P=0;P<=D;P++)if(N=te,te=I[2*(P+1)+1],!(++q<ie&&N===te)){if(q<ue)for(;Y(x,N,x.bl_tree),--q!=0;);else N!==0?(N!==G&&(Y(x,N,x.bl_tree),q--),Y(x,S,x.bl_tree),H(x,q-3,2)):q<=10?(Y(x,A,x.bl_tree),H(x,q-3,3)):(Y(x,O,x.bl_tree),H(x,q-11,7));G=N,ue=(q=0)===te?(ie=138,3):N===te?(ie=6,3):(ie=7,4)}}s(V);var F=!1;function k(x,I,D,P){H(x,(h<<1)+(P?1:0),3),(function(N,G,te,q){se(N),K(N,te),K(N,~te),a.arraySet(N.pending_buf,N.window,G,te,N.pending),N.pending+=te})(x,I,D)}d._tr_init=function(x){F||((function(){var I,D,P,N,G,te=new Array(m+1);for(N=P=0;N<b-1;N++)for(U[N]=P,I=0;I<1<<L[N];I++)i[P++]=N;for(i[P-1]=N,N=G=0;N<16;N++)for(V[N]=G,I=0;I<1<<R[N];I++)B[G++]=N;for(G>>=7;N<c;N++)for(V[N]=G<<7,I=0;I<1<<R[N]-7;I++)B[256+G++]=N;for(D=0;D<=m;D++)te[D]=0;for(I=0;I<=143;)Q[2*I+1]=8,I++,te[8]++;for(;I<=255;)Q[2*I+1]=9,I++,te[9]++;for(;I<=279;)Q[2*I+1]=7,I++,te[7]++;for(;I<=287;)Q[2*I+1]=8,I++,te[8]++;for(oe(Q,y+1,te),I=0;I<c;I++)j[2*I+1]=5,j[2*I]=ce(I,5);ee=new J(Q,L,v+1,y,m),$=new J(j,R,0,c,m),Z=new J(new Array(0),T,0,g,w)})(),F=!0),x.l_desc=new _(x.dyn_ltree,ee),x.d_desc=new _(x.dyn_dtree,$),x.bl_desc=new _(x.bl_tree,Z),x.bi_buf=0,x.bi_valid=0,ae(x)},d._tr_stored_block=k,d._tr_flush_block=function(x,I,D,P){var N,G,te=0;0<x.level?(x.strm.data_type===2&&(x.strm.data_type=(function(q){var ie,ue=4093624447;for(ie=0;ie<=31;ie++,ue>>>=1)if(1&ue&&q.dyn_ltree[2*ie]!==0)return n;if(q.dyn_ltree[18]!==0||q.dyn_ltree[20]!==0||q.dyn_ltree[26]!==0)return o;for(ie=32;ie<v;ie++)if(q.dyn_ltree[2*ie]!==0)return o;return n})(x)),ke(x,x.l_desc),ke(x,x.d_desc),te=(function(q){var ie;for(e(q,q.dyn_ltree,q.l_desc.max_code),e(q,q.dyn_dtree,q.d_desc.max_code),ke(q,q.bl_desc),ie=g-1;3<=ie&&q.bl_tree[2*W[ie]+1]===0;ie--);return q.opt_len+=3*(ie+1)+5+5+4,ie})(x),N=x.opt_len+3+7>>>3,(G=x.static_len+3+7>>>3)<=N&&(N=G)):N=G=D+5,D+4<=N&&I!==-1?k(x,I,D,P):x.strategy===4||G===N?(H(x,2+(P?1:0),3),xe(x,Q,j)):(H(x,4+(P?1:0),3),(function(q,ie,ue,de){var ze;for(H(q,ie-257,5),H(q,ue-1,5),H(q,de-4,4),ze=0;ze<de;ze++)H(q,q.bl_tree[2*W[ze]+1],3);M(q,q.dyn_ltree,ie-1),M(q,q.dyn_dtree,ue-1)})(x,x.l_desc.max_code+1,x.d_desc.max_code+1,te+1),xe(x,x.dyn_ltree,x.dyn_dtree)),ae(x),P&&se(x)},d._tr_tally=function(x,I,D){return x.pending_buf[x.d_buf+2*x.last_lit]=I>>>8&255,x.pending_buf[x.d_buf+2*x.last_lit+1]=255&I,x.pending_buf[x.l_buf+x.last_lit]=255&D,x.last_lit++,I===0?x.dyn_ltree[2*D]++:(x.matches++,I--,x.dyn_ltree[2*(i[D]+v+1)]++,x.dyn_dtree[2*C(I)]++),x.last_lit===x.lit_bufsize-1},d._tr_align=function(x){H(x,2,3),Y(x,E,Q),(function(I){I.bi_valid===16?(K(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)})(x)}},{"../utils/common":41}],53:[function(r,p,d){p.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,p,d){(function(a){(function(n,o){if(!n.setImmediate){var s,h,b,v,y=1,c={},g=!1,l=n.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(n);m=m&&m.setTimeout?m:n,s={}.toString.call(n.process)==="[object process]"?function(S){process.nextTick(function(){w(S)})}:(function(){if(n.postMessage&&!n.importScripts){var S=!0,A=n.onmessage;return n.onmessage=function(){S=!1},n.postMessage("","*"),n.onmessage=A,S}})()?(v="setImmediate$"+Math.random()+"$",n.addEventListener?n.addEventListener("message",E,!1):n.attachEvent("onmessage",E),function(S){n.postMessage(v+S,"*")}):n.MessageChannel?((b=new MessageChannel).port1.onmessage=function(S){w(S.data)},function(S){b.port2.postMessage(S)}):l&&"onreadystatechange"in l.createElement("script")?(h=l.documentElement,function(S){var A=l.createElement("script");A.onreadystatechange=function(){w(S),A.onreadystatechange=null,h.removeChild(A),A=null},h.appendChild(A)}):function(S){setTimeout(w,0,S)},m.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var A=new Array(arguments.length-1),O=0;O<A.length;O++)A[O]=arguments[O+1];var L={callback:S,args:A};return c[y]=L,s(y),y++},m.clearImmediate=f}function f(S){delete c[S]}function w(S){if(g)setTimeout(w,0,S);else{var A=c[S];if(A){g=!0;try{(function(O){var L=O.callback,R=O.args;switch(R.length){case 0:L();break;case 1:L(R[0]);break;case 2:L(R[0],R[1]);break;case 3:L(R[0],R[1],R[2]);break;default:L.apply(o,R)}})(A)}finally{f(S),g=!1}}}}function E(S){S.source===n&&typeof S.data=="string"&&S.data.indexOf(v)===0&&w(+S.data.slice(v.length))}})(typeof self>"u"?a===void 0?this:a:self)}).call(this,typeof Ne<"u"?Ne:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(it)),it.exports}var Ir=Ar();const Tr=Nr(Ir);var Ke={exports:{}},Or=Ke.exports,jt;function Dr(){return jt||(jt=1,(function(t,z){(function(r,p){p()})(Or,function(){function r(h,b){return typeof b>"u"?b={autoBom:!1}:typeof b!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.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 p(h,b,v){var y=new XMLHttpRequest;y.open("GET",h),y.responseType="blob",y.onload=function(){s(y.response,b,v)},y.onerror=function(){console.error("could not download file")},y.send()}function d(h){var b=new XMLHttpRequest;b.open("HEAD",h,!1);try{b.send()}catch{}return 200<=b.status&&299>=b.status}function a(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(b)}}var n=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ne=="object"&&Ne.global===Ne?Ne:void 0,o=n.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=n.saveAs||(typeof window!="object"||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(h,b,v){var y=n.URL||n.webkitURL,c=document.createElement("a");b=b||h.name||"download",c.download=b,c.rel="noopener",typeof h=="string"?(c.href=h,c.origin===location.origin?a(c):d(c.href)?p(h,b,v):a(c,c.target="_blank")):(c.href=y.createObjectURL(h),setTimeout(function(){y.revokeObjectURL(c.href)},4e4),setTimeout(function(){a(c)},0))}:"msSaveOrOpenBlob"in navigator?function(h,b,v){if(b=b||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(r(h,v),b);else if(d(h))p(h,b,v);else{var y=document.createElement("a");y.href=h,y.target="_blank",setTimeout(function(){a(y)})}}:function(h,b,v,y){if(y=y||open("","_blank"),y&&(y.document.title=y.document.body.innerText="downloading..."),typeof h=="string")return p(h,b,v);var c=h.type==="application/octet-stream",g=/constructor/i.test(n.HTMLElement)||n.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||c&&g||o)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var E=m.result;E=l?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),y?y.location.href=E:location=E,y=null},m.readAsDataURL(h)}else{var f=n.URL||n.webkitURL,w=f.createObjectURL(h);y?y.location=w:location.href=w,y=null,setTimeout(function(){f.revokeObjectURL(w)},4e4)}});n.saveAs=s.saveAs=s,t.exports=s})})(Ke)),Ke.exports}var Et=Dr();const St=async(t,z)=>{const r=new Tr,p=r.folder("config");p==null||p.file("site.json",JSON.stringify(t.site,null,2)),p==null||p.file("theme.json",JSON.stringify(t.theme,null,2)),p==null||p.file("menu.json",JSON.stringify(t.menu,null,2));const d=r.folder("pages");d==null||d.file(`${z}.json`,JSON.stringify(t.page,null,2));const a=await r.generateAsync({type:"blob"});Et.saveAs(a,`jsonpages-project-${z}-${Date.now()}.zip`)},Ct=(t,z,r)=>{const{pages:p,...d}=t.site,a={page:t.page,site:d,menu:t.menu,theme:t.theme},o=`<script id="jp-baked-state" type="application/json">${JSON.stringify(a)}<\/script>`,s=r.replace("</head>",`${o}</head>`),h=new Blob([`<!DOCTYPE html>${s}`],{type:"text/html;charset=utf-8"});Et.saveAs(h,`${z}.html`)};function Nt(t){var z,r,p="";if(typeof t=="string"||typeof t=="number")p+=t;else if(typeof t=="object")if(Array.isArray(t)){var d=t.length;for(z=0;z<d;z++)t[z]&&(r=Nt(t[z]))&&(p&&(p+=" "),p+=r)}else for(r in t)t[r]&&(p&&(p+=" "),p+=r);return p}function Rr(){for(var t,z,r=0,p="",d=arguments.length;r<d;r++)(t=arguments[r])&&(z=Nt(t))&&(p&&(p+=" "),p+=z);return p}const Lr=(t,z)=>{const r=new Array(t.length+z.length);for(let p=0;p<t.length;p++)r[p]=t[p];for(let p=0;p<z.length;p++)r[t.length+p]=z[p];return r},Pr=(t,z)=>({classGroupId:t,validator:z}),At=(t=new Map,z=null,r)=>({nextPart:t,validators:z,classGroupId:r}),Ye="-",It=[],Fr="arbitrary..",Br=t=>{const z=Ur(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:p}=t;return{getClassGroupId:n=>{if(n.startsWith("[")&&n.endsWith("]"))return Mr(n);const o=n.split(Ye),s=o[0]===""&&o.length>1?1:0;return Tt(o,s,z)},getConflictingClassGroupIds:(n,o)=>{if(o){const s=p[n],h=r[n];return s?h?Lr(h,s):s:h||It}return r[n]||It}}},Tt=(t,z,r)=>{if(t.length-z===0)return r.classGroupId;const d=t[z],a=r.nextPart.get(d);if(a){const h=Tt(t,z+1,a);if(h)return h}const n=r.validators;if(n===null)return;const o=z===0?t.join(Ye):t.slice(z).join(Ye),s=n.length;for(let h=0;h<s;h++){const b=n[h];if(b.validator(o))return b.classGroupId}},Mr=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const z=t.slice(1,-1),r=z.indexOf(":"),p=z.slice(0,r);return p?Fr+p:void 0})(),Ur=t=>{const{theme:z,classGroups:r}=t;return Wr(r,z)},Wr=(t,z)=>{const r=At();for(const p in t){const d=t[p];at(d,r,p,z)}return r},at=(t,z,r,p)=>{const d=t.length;for(let a=0;a<d;a++){const n=t[a];$r(n,z,r,p)}},$r=(t,z,r,p)=>{if(typeof t=="string"){Zr(t,z,r);return}if(typeof t=="function"){Gr(t,z,r,p);return}Hr(t,z,r,p)},Zr=(t,z,r)=>{const p=t===""?z:Ot(z,t);p.classGroupId=r},Gr=(t,z,r,p)=>{if(Vr(t)){at(t(p),z,r,p);return}z.validators===null&&(z.validators=[]),z.validators.push(Pr(r,t))},Hr=(t,z,r,p)=>{const d=Object.entries(t),a=d.length;for(let n=0;n<a;n++){const[o,s]=d[n];at(s,Ot(z,o),r,p)}},Ot=(t,z)=>{let r=t;const p=z.split(Ye),d=p.length;for(let a=0;a<d;a++){const n=p[a];let o=r.nextPart.get(n);o||(o=At(),r.nextPart.set(n,o)),r=o}return r},Vr=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Kr=t=>{if(t<1)return{get:()=>{},set:()=>{}};let z=0,r=Object.create(null),p=Object.create(null);const d=(a,n)=>{r[a]=n,z++,z>t&&(z=0,p=r,r=Object.create(null))};return{get(a){let n=r[a];if(n!==void 0)return n;if((n=p[a])!==void 0)return d(a,n),n},set(a,n){a in r?r[a]=n:d(a,n)}}},st="!",Dt=":",Yr=[],Rt=(t,z,r,p,d)=>({modifiers:t,hasImportantModifier:z,baseClassName:r,maybePostfixModifierPosition:p,isExternal:d}),qr=t=>{const{prefix:z,experimentalParseClassName:r}=t;let p=d=>{const a=[];let n=0,o=0,s=0,h;const b=d.length;for(let l=0;l<b;l++){const m=d[l];if(n===0&&o===0){if(m===Dt){a.push(d.slice(s,l)),s=l+1;continue}if(m==="/"){h=l;continue}}m==="["?n++:m==="]"?n--:m==="("?o++:m===")"&&o--}const v=a.length===0?d:d.slice(s);let y=v,c=!1;v.endsWith(st)?(y=v.slice(0,-1),c=!0):v.startsWith(st)&&(y=v.slice(1),c=!0);const g=h&&h>s?h-s:void 0;return Rt(a,c,y,g)};if(z){const d=z+Dt,a=p;p=n=>n.startsWith(d)?a(n.slice(d.length)):Rt(Yr,!1,n,void 0,!0)}if(r){const d=p;p=a=>r({className:a,parseClassName:d})}return p},Jr=t=>{const z=new Map;return t.orderSensitiveModifiers.forEach((r,p)=>{z.set(r,1e6+p)}),r=>{const p=[];let d=[];for(let a=0;a<r.length;a++){const n=r[a],o=n[0]==="[",s=z.has(n);o||s?(d.length>0&&(d.sort(),p.push(...d),d=[]),p.push(n)):d.push(n)}return d.length>0&&(d.sort(),p.push(...d)),p}},Xr=t=>({cache:Kr(t.cacheSize),parseClassName:qr(t),sortModifiers:Jr(t),...Br(t)}),Qr=/\s+/,en=(t,z)=>{const{parseClassName:r,getClassGroupId:p,getConflictingClassGroupIds:d,sortModifiers:a}=z,n=[],o=t.trim().split(Qr);let s="";for(let h=o.length-1;h>=0;h-=1){const b=o[h],{isExternal:v,modifiers:y,hasImportantModifier:c,baseClassName:g,maybePostfixModifierPosition:l}=r(b);if(v){s=b+(s.length>0?" "+s:s);continue}let m=!!l,f=p(m?g.substring(0,l):g);if(!f){if(!m){s=b+(s.length>0?" "+s:s);continue}if(f=p(g),!f){s=b+(s.length>0?" "+s:s);continue}m=!1}const w=y.length===0?"":y.length===1?y[0]:a(y).join(":"),E=c?w+st:w,S=E+f;if(n.indexOf(S)>-1)continue;n.push(S);const A=d(f,m);for(let O=0;O<A.length;++O){const L=A[O];n.push(E+L)}s=b+(s.length>0?" "+s:s)}return s},tn=(...t)=>{let z=0,r,p,d="";for(;z<t.length;)(r=t[z++])&&(p=Lt(r))&&(d&&(d+=" "),d+=p);return d},Lt=t=>{if(typeof t=="string")return t;let z,r="";for(let p=0;p<t.length;p++)t[p]&&(z=Lt(t[p]))&&(r&&(r+=" "),r+=z);return r},rn=(t,...z)=>{let r,p,d,a;const n=s=>{const h=z.reduce((b,v)=>v(b),t());return r=Xr(h),p=r.cache.get,d=r.cache.set,a=o,o(s)},o=s=>{const h=p(s);if(h)return h;const b=en(s,r);return d(s,b),b};return a=n,(...s)=>a(tn(...s))},nn=[],we=t=>{const z=r=>r[t]||nn;return z.isThemeGetter=!0,z},Pt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ft=/^\((?:(\w[\w-]*):)?(.+)\)$/i,on=/^\d+\/\d+$/,an=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sn=/\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$/,ln=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Oe=t=>on.test(t),le=t=>!!t&&!Number.isNaN(Number(t)),Ae=t=>!!t&&Number.isInteger(Number(t)),lt=t=>t.endsWith("%")&&le(t.slice(0,-1)),Se=t=>an.test(t),un=()=>!0,hn=t=>sn.test(t)&&!ln.test(t),Bt=()=>!1,fn=t=>cn.test(t),pn=t=>dn.test(t),mn=t=>!re(t)&&!ne(t),gn=t=>De(t,Zt,Bt),re=t=>Pt.test(t),Ie=t=>De(t,Gt,hn),ct=t=>De(t,wn,le),Mt=t=>De(t,Wt,Bt),bn=t=>De(t,$t,pn),qe=t=>De(t,Ht,fn),ne=t=>Ft.test(t),Le=t=>Re(t,Gt),vn=t=>Re(t,kn),Ut=t=>Re(t,Wt),xn=t=>Re(t,Zt),yn=t=>Re(t,$t),Je=t=>Re(t,Ht,!0),De=(t,z,r)=>{const p=Pt.exec(t);return p?p[1]?z(p[1]):r(p[2]):!1},Re=(t,z,r=!1)=>{const p=Ft.exec(t);return p?p[1]?z(p[1]):r:!1},Wt=t=>t==="position"||t==="percentage",$t=t=>t==="image"||t==="url",Zt=t=>t==="length"||t==="size"||t==="bg-size",Gt=t=>t==="length",wn=t=>t==="number",kn=t=>t==="family-name",Ht=t=>t==="shadow",_n=rn(()=>{const t=we("color"),z=we("font"),r=we("text"),p=we("font-weight"),d=we("tracking"),a=we("leading"),n=we("breakpoint"),o=we("container"),s=we("spacing"),h=we("radius"),b=we("shadow"),v=we("inset-shadow"),y=we("text-shadow"),c=we("drop-shadow"),g=we("blur"),l=we("perspective"),m=we("aspect"),f=we("ease"),w=we("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"],A=()=>[...S(),ne,re],O=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],R=()=>[ne,re,s],T=()=>[Oe,"full","auto",...R()],W=()=>[Ae,"none","subgrid",ne,re],Q=()=>["auto",{span:["full",Ae,ne,re]},Ae,ne,re],j=()=>[Ae,"auto",ne,re],B=()=>["auto","min","max","fr",ne,re],i=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...R()],$=()=>[Oe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],Z=()=>[t,ne,re],V=()=>[...S(),Ut,Mt,{position:[ne,re]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",xn,gn,{size:[ne,re]}],C=()=>[lt,Le,Ie],K=()=>["","none","full",h,ne,re],H=()=>["",le,Le,Ie],Y=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[le,lt,Ut,Mt],ae=()=>["","none",g,ne,re],se=()=>["none",le,ne,re],me=()=>["none",le,ne,re],pe=()=>[le,ne,re],xe=()=>[Oe,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Se],breakpoint:[Se],color:[un],container:[Se],"drop-shadow":[Se],ease:["in","out","in-out"],font:[mn],"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",le],text:[Se],"text-shadow":[Se],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Oe,re,ne,m]}],container:["container"],columns:[{columns:[le,re,ne,o]}],"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:A()}],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:[Ae,"auto",ne,re]}],basis:[{basis:[Oe,"full","auto",o,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[le,Oe,"auto","initial","none",re]}],grow:[{grow:["",le,ne,re]}],shrink:[{shrink:["",le,ne,re]}],order:[{order:[Ae,"first","last","none",ne,re]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:Q()}],"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":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...i(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...i()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":i()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[o,"screen",...$()]}],"min-w":[{"min-w":[o,"screen","none",...$()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[n]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",r,Le,Ie]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[p,ne,ct]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",lt,re]}],"font-family":[{font:[vn,re,z]}],"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:[d,ne,re]}],"line-clamp":[{"line-clamp":[le,"none",ne,ct]}],leading:[{leading:[a,...R()]}],"list-image":[{"list-image":["none",ne,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[le,"from-font","auto",ne,Ie]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[le,"auto",ne,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,re]}],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",ne,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ae,ne,re],radial:["",ne,re],conic:[Ae,ne,re]},yn,bn]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:C()}],"gradient-via-pos":[{via:C()}],"gradient-to-pos":[{to:C()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[le,ne,re]}],"outline-w":[{outline:["",le,Le,Ie]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",b,Je,qe]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",v,Je,qe]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[le,Ie]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",y,Je,qe]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[le,ne,re]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"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":[le]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[ne,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"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":[le]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,re]}],filter:[{filter:["","none",ne,re]}],blur:[{blur:ae()}],brightness:[{brightness:[le,ne,re]}],contrast:[{contrast:[le,ne,re]}],"drop-shadow":[{"drop-shadow":["","none",c,Je,qe]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",le,ne,re]}],"hue-rotate":[{"hue-rotate":[le,ne,re]}],invert:[{invert:["",le,ne,re]}],saturate:[{saturate:[le,ne,re]}],sepia:[{sepia:["",le,ne,re]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,re]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[le,ne,re]}],"backdrop-contrast":[{"backdrop-contrast":[le,ne,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",le,ne,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[le,ne,re]}],"backdrop-invert":[{"backdrop-invert":["",le,ne,re]}],"backdrop-opacity":[{"backdrop-opacity":[le,ne,re]}],"backdrop-saturate":[{"backdrop-saturate":[le,ne,re]}],"backdrop-sepia":[{"backdrop-sepia":["",le,ne,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[le,"initial",ne,re]}],ease:[{ease:["linear","initial",f,ne,re]}],delay:[{delay:[le,ne,re]}],animate:[{animate:["none",w,ne,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[l,ne,re]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[ne,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"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",ne,re]}],"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":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",ne,re]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[le,Le,Ie,ct]}],stroke:[{stroke:["none",...Z()]}],"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 ge(...t){return _n(Rr(t))}var Xe={exports:{}},Pe={};/**
13
+ * @license React
14
+ * react-jsx-runtime.production.js
15
+ *
16
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */var Vt;function zn(){if(Vt)return Pe;Vt=1;var t=Symbol.for("react.transitional.element"),z=Symbol.for("react.fragment");function r(p,d,a){var n=null;if(a!==void 0&&(n=""+a),d.key!==void 0&&(n=""+d.key),"key"in d){a={};for(var o in d)o!=="key"&&(a[o]=d[o])}else a=d;return d=a.ref,{$$typeof:t,type:p,key:n,ref:d!==void 0?d:null,props:a}}return Pe.Fragment=z,Pe.jsx=r,Pe.jsxs=r,Pe}var Fe={};/**
21
+ * @license React
22
+ * react-jsx-runtime.development.js
23
+ *
24
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
25
+ *
26
+ * This source code is licensed under the MIT license found in the
27
+ * LICENSE file in the root directory of this source tree.
28
+ */var Kt;function jn(){return Kt||(Kt=1,process.env.NODE_ENV!=="production"&&(function(){function t(_){if(_==null)return null;if(typeof _=="function")return _.$$typeof===Q?null:_.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case m:return"Fragment";case w:return"Profiler";case f:return"StrictMode";case O:return"Suspense";case L:return"SuspenseList";case W:return"Activity"}if(typeof _=="object")switch(typeof _.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),_.$$typeof){case l:return"Portal";case S:return _.displayName||"Context";case E:return(_._context.displayName||"Context")+".Consumer";case A:var C=_.render;return _=_.displayName,_||(_=C.displayName||C.name||"",_=_!==""?"ForwardRef("+_+")":"ForwardRef"),_;case R:return C=_.displayName||null,C!==null?C:t(_.type)||"Memo";case T:C=_._payload,_=_._init;try{return t(_(C))}catch{}}return null}function z(_){return""+_}function r(_){try{z(_);var C=!1}catch{C=!0}if(C){C=console;var K=C.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&_[Symbol.toStringTag]||_.constructor.name||"Object";return K.call(C,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),z(_)}}function p(_){if(_===m)return"<>";if(typeof _=="object"&&_!==null&&_.$$typeof===T)return"<...>";try{var C=t(_);return C?"<"+C+">":"<...>"}catch{return"<...>"}}function d(){var _=j.A;return _===null?null:_.getOwner()}function a(){return Error("react-stack-top-frame")}function n(_){if(B.call(_,"key")){var C=Object.getOwnPropertyDescriptor(_,"key").get;if(C&&C.isReactWarning)return!1}return _.key!==void 0}function o(_,C){function K(){ee||(ee=!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)",C))}K.isReactWarning=!0,Object.defineProperty(_,"key",{get:K,configurable:!0})}function s(){var _=t(this.type);return $[_]||($[_]=!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.")),_=this.props.ref,_!==void 0?_:null}function h(_,C,K,H,Y,ce){var oe=K.ref;return _={$$typeof:g,type:_,key:C,props:K,_owner:H},(oe!==void 0?oe:null)!==null?Object.defineProperty(_,"ref",{enumerable:!1,get:s}):Object.defineProperty(_,"ref",{enumerable:!1,value:null}),_._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(_,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(_,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.defineProperty(_,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ce}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_}function b(_,C,K,H,Y,ce){var oe=C.children;if(oe!==void 0)if(H)if(i(oe)){for(H=0;H<oe.length;H++)v(oe[H]);Object.freeze&&Object.freeze(oe)}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(oe);if(B.call(C,"key")){oe=t(_);var ae=Object.keys(C).filter(function(me){return me!=="key"});H=0<ae.length?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}",J[oe+H]||(ae=0<ae.length?"{"+ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
29
+ let props = %s;
30
+ <%s {...props} />
31
+ React keys must be passed directly to JSX without using spread:
32
+ let props = %s;
33
+ <%s key={someKey} {...props} />`,H,oe,ae,oe),J[oe+H]=!0)}if(oe=null,K!==void 0&&(r(K),oe=""+K),n(C)&&(r(C.key),oe=""+C.key),"key"in C){K={};for(var se in C)se!=="key"&&(K[se]=C[se])}else K=C;return oe&&o(K,typeof _=="function"?_.displayName||_.name||"Unknown":_),h(_,oe,K,d(),Y,ce)}function v(_){y(_)?_._store&&(_._store.validated=1):typeof _=="object"&&_!==null&&_.$$typeof===T&&(_._payload.status==="fulfilled"?y(_._payload.value)&&_._payload.value._store&&(_._payload.value._store.validated=1):_._store&&(_._store.validated=1))}function y(_){return typeof _=="object"&&_!==null&&_.$$typeof===g}var c=X,g=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),S=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),Q=Symbol.for("react.client.reference"),j=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,i=Array.isArray,U=console.createTask?console.createTask:function(){return null};c={react_stack_bottom_frame:function(_){return _()}};var ee,$={},Z=c.react_stack_bottom_frame.bind(c,a)(),V=U(p(a)),J={};Fe.Fragment=m,Fe.jsx=function(_,C,K){var H=1e4>j.recentlyCreatedOwnerStacks++;return b(_,C,K,!1,H?Error("react-stack-top-frame"):Z,H?U(p(_)):V)},Fe.jsxs=function(_,C,K){var H=1e4>j.recentlyCreatedOwnerStacks++;return b(_,C,K,!0,H?Error("react-stack-top-frame"):Z,H?U(p(_)):V)}})()),Fe}var Yt;function En(){return Yt||(Yt=1,process.env.NODE_ENV==="production"?Xe.exports=zn():Xe.exports=jn()),Xe.exports}var u=En();const qt=X.createContext(void 0),Jt=({config:t,children:z})=>u.jsx(qt.Provider,{value:{registry:t.registry,schemas:t.schemas,tenantId:t.tenantId},children:z});function Qe(){const t=X.useContext(qt);if(t===void 0)throw new Error("useConfig must be used within ConfigProvider");return t}const Xt=X.createContext(void 0),et=({mode:t,children:z})=>(X.useEffect(()=>{if(t!=="studio")return;const r=new MutationObserver(p=>{p.forEach(d=>{d.addedNodes.forEach(a=>{a instanceof HTMLElement&&a.hasAttribute("data-radix-portal")&&a.setAttribute("data-jp-studio-portal","true")})})});return r.observe(document.body,{childList:!0}),()=>r.disconnect()},[t]),u.jsx(Xt.Provider,{value:{mode:t},children:z})),Qt=()=>{const t=X.useContext(Xt);if(t===void 0)throw new Error("useStudio must be used within a StudioProvider");return t};/**
34
+ * @license lucide-react v0.474.0 - ISC
35
+ *
36
+ * This source code is licensed under the ISC license.
37
+ * See the LICENSE file in the root directory of this source tree.
38
+ */const Sn=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),er=(...t)=>t.filter((z,r,p)=>!!z&&z.trim()!==""&&p.indexOf(z)===r).join(" ").trim();/**
39
+ * @license lucide-react v0.474.0 - ISC
40
+ *
41
+ * This source code is licensed under the ISC license.
42
+ * See the LICENSE file in the root directory of this source tree.
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
+ * @license lucide-react v0.474.0 - ISC
45
+ *
46
+ * This source code is licensed under the ISC license.
47
+ * See the LICENSE file in the root directory of this source tree.
48
+ */const Nn=X.forwardRef(({color:t="currentColor",size:z=24,strokeWidth:r=2,absoluteStrokeWidth:p,className:d="",children:a,iconNode:n,...o},s)=>X.createElement("svg",{ref:s,...Cn,width:z,height:z,stroke:t,strokeWidth:p?Number(r)*24/Number(z):r,className:er("lucide",d),...o},[...n.map(([h,b])=>X.createElement(h,b)),...Array.isArray(a)?a:[a]]));/**
49
+ * @license lucide-react v0.474.0 - ISC
50
+ *
51
+ * This source code is licensed under the ISC license.
52
+ * See the LICENSE file in the root directory of this source tree.
53
+ */const ve=(t,z)=>{const r=X.forwardRef(({className:p,...d},a)=>X.createElement(Nn,{ref:a,iconNode:z,className:er(`lucide-${Sn(t)}`,p),...d}));return r.displayName=`${t}`,r};/**
54
+ * @license lucide-react v0.474.0 - ISC
55
+ *
56
+ * This source code is licensed under the ISC license.
57
+ * See the LICENSE file in the root directory of this source tree.
58
+ */const An=ve("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
59
+ * @license lucide-react v0.474.0 - ISC
60
+ *
61
+ * This source code is licensed under the ISC license.
62
+ * See the LICENSE file in the root directory of this source tree.
63
+ */const In=ve("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
64
+ * @license lucide-react v0.474.0 - ISC
65
+ *
66
+ * This source code is licensed under the ISC license.
67
+ * See the LICENSE file in the root directory of this source tree.
68
+ */const Tn=ve("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
69
+ * @license lucide-react v0.474.0 - ISC
70
+ *
71
+ * This source code is licensed under the ISC license.
72
+ * See the LICENSE file in the root directory of this source tree.
73
+ */const On=ve("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
+ * @license lucide-react v0.474.0 - ISC
75
+ *
76
+ * This source code is licensed under the ISC license.
77
+ * See the LICENSE file in the root directory of this source tree.
78
+ */const dt=ve("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
79
+ * @license lucide-react v0.474.0 - ISC
80
+ *
81
+ * This source code is licensed under the ISC license.
82
+ * See the LICENSE file in the root directory of this source tree.
83
+ */const Dn=ve("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
84
+ * @license lucide-react v0.474.0 - ISC
85
+ *
86
+ * This source code is licensed under the ISC license.
87
+ * See the LICENSE file in the root directory of this source tree.
88
+ */const ut=ve("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
89
+ * @license lucide-react v0.474.0 - ISC
90
+ *
91
+ * This source code is licensed under the ISC license.
92
+ * See the LICENSE file in the root directory of this source tree.
93
+ */const Rn=ve("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"}]]);/**
94
+ * @license lucide-react v0.474.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */const tr=ve("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"}]]);/**
99
+ * @license lucide-react v0.474.0 - ISC
100
+ *
101
+ * This source code is licensed under the ISC license.
102
+ * See the LICENSE file in the root directory of this source tree.
103
+ */const rr=ve("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"}]]);/**
104
+ * @license lucide-react v0.474.0 - ISC
105
+ *
106
+ * This source code is licensed under the ISC license.
107
+ * See the LICENSE file in the root directory of this source tree.
108
+ */const Ln=ve("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
109
+ * @license lucide-react v0.474.0 - ISC
110
+ *
111
+ * This source code is licensed under the ISC license.
112
+ * See the LICENSE file in the root directory of this source tree.
113
+ */const ht=ve("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
114
+ * @license lucide-react v0.474.0 - ISC
115
+ *
116
+ * This source code is licensed under the ISC license.
117
+ * See the LICENSE file in the root directory of this source tree.
118
+ */const nr=ve("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
119
+ * @license lucide-react v0.474.0 - ISC
120
+ *
121
+ * This source code is licensed under the ISC license.
122
+ * See the LICENSE file in the root directory of this source tree.
123
+ */const ft=ve("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
124
+ * @license lucide-react v0.474.0 - ISC
125
+ *
126
+ * This source code is licensed under the ISC license.
127
+ * See the LICENSE file in the root directory of this source tree.
128
+ */const Pn=ve("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
129
+ * @license lucide-react v0.474.0 - ISC
130
+ *
131
+ * This source code is licensed under the ISC license.
132
+ * See the LICENSE file in the root directory of this source tree.
133
+ */const or=ve("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
134
+ * @license lucide-react v0.474.0 - ISC
135
+ *
136
+ * This source code is licensed under the ISC license.
137
+ * See the LICENSE file in the root directory of this source tree.
138
+ */const ir=ve("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"}]]);/**
139
+ * @license lucide-react v0.474.0 - ISC
140
+ *
141
+ * This source code is licensed under the ISC license.
142
+ * See the LICENSE file in the root directory of this source tree.
143
+ */const Fn=ve("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"}]]);/**
144
+ * @license lucide-react v0.474.0 - ISC
145
+ *
146
+ * This source code is licensed under the ISC license.
147
+ * See the LICENSE file in the root directory of this source tree.
148
+ */const Bn=ve("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"}]]);/**
149
+ * @license lucide-react v0.474.0 - ISC
150
+ *
151
+ * This source code is licensed under the ISC license.
152
+ * See the LICENSE file in the root directory of this source tree.
153
+ */const Mn=ve("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
154
+ * @license lucide-react v0.474.0 - ISC
155
+ *
156
+ * This source code is licensed under the ISC license.
157
+ * See the LICENSE file in the root directory of this source tree.
158
+ */const ar=ve("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
159
+ * @license lucide-react v0.474.0 - ISC
160
+ *
161
+ * This source code is licensed under the ISC license.
162
+ * See the LICENSE file in the root directory of this source tree.
163
+ */const Un=ve("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"}]]);/**
164
+ * @license lucide-react v0.474.0 - ISC
165
+ *
166
+ * This source code is licensed under the ISC license.
167
+ * See the LICENSE file in the root directory of this source tree.
168
+ */const Be=ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
169
+ * @license lucide-react v0.474.0 - ISC
170
+ *
171
+ * This source code is licensed under the ISC license.
172
+ * See the LICENSE file in the root directory of this source tree.
173
+ */const Wn=ve("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 $n extends X.Component{constructor(z){super(z),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(z,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,z,r)}render(){return this.state.hasError?u.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:[u.jsx(Un,{className:"text-amber-500",size:32}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),u.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),u.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 Zn=({type:t,scope:z,isSelected:r,sectionId:p,sectionIndex:d=0,totalSections:a=0,onReorder:n})=>{const o=typeof d=="number"&&d>0&&n,s=typeof d=="number"&&d<a-1&&n;return u.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:ge("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:u.jsxs("div",{className:ge("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:[n&&p!=null&&u.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[u.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),o&&n(p,d-1)},disabled:!o,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:u.jsx(ut,{size:12,strokeWidth:2.5})}),u.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),s&&n(p,d+2)},disabled:!s,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:u.jsx(dt,{size:12,strokeWidth:2.5})})]}),u.jsx("span",{className:"shrink-0",children:t}),u.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),u.jsx("span",{className:"shrink-0",children:z})]})})},Me=({section:t,menu:z,selectedId:r,reorderable:p,sectionIndex:d,totalSections:a,onReorder:n})=>{var f,w;const{mode:o}=Qt(),{registry:s}=Qe(),h=o==="studio",b=h&&r===t.id,v=s[t.type],y=t.type==="header"||t.type==="footer"?"global":"local",c=t.type==="header"&&((f=t.settings)==null?void 0:f.sticky);if(!v)return u.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:[u.jsx("strong",{children:"Missing Component:"})," ",t.type]});const g=E=>{var Q,j,B,i,U;if(!h)return;E.preventDefault(),E.stopPropagation();const S=E.currentTarget,A=E.clientX,O=E.clientY;if(E.target===S){window.parent.postMessage({type:be.SECTION_SELECT,section:{id:t.id,type:t.type,scope:y}},"*");return}const L=document.elementFromPoint(A,O)??E.target;if(!L||!S.contains(L)){window.parent.postMessage({type:be.SECTION_SELECT,section:{id:t.id,type:t.type,scope:y}},"*");return}if(L===S){window.parent.postMessage({type:be.SECTION_SELECT,section:{id:t.id,type:t.type,scope:y}},"*");return}const R=[];let T=L;for(;T&&T!==S;){const ee=(Q=T.getAttribute)==null?void 0:Q.call(T,"data-jp-item-id"),$=(j=T.getAttribute)==null?void 0:j.call(T,"data-jp-item-field");ee&&$&&R.push({fieldKey:$||"items",itemId:ee}),T=T.parentElement}if(R.reverse(),R.length===0)for(T=L;T&&T!==S;){const ee=(B=T.getAttribute)==null?void 0:B.call(T,"data-jp-field");if(ee){R.push({fieldKey:ee});break}T=T.parentElement}if(R.length===0&&L){let ee=null;const $=Z=>{var J,_;const V=Z.getBoundingClientRect();if(V.left<=A&&A<=V.right&&V.top<=O&&O<=V.bottom){for(let C=0;C<Z.children.length;C++)$(Z.children[C]);((J=Z.getAttribute)!=null&&J.call(Z,"data-jp-item-id")||(_=Z.getAttribute)!=null&&_.call(Z,"data-jp-field"))&&(ee=Z)}};if($(L),ee){const Z=ee,V=(i=Z.getAttribute)==null?void 0:i.call(Z,"data-jp-item-id"),J=(U=Z.getAttribute)==null?void 0:U.call(Z,"data-jp-field");V&&J?R.push({fieldKey:J||"items",itemId:V}):J&&R.push({fieldKey:J})}}const W={type:be.SECTION_SELECT,section:{id:t.id,type:t.type,scope:y}};if(R.length>0){W.itemPath=R;const ee=R[0];ee.itemId!=null?(W.itemField=ee.fieldKey,W.itemId=ee.itemId):W.itemField=ee.fieldKey}window.parent.postMessage(W,"*")},l=()=>{const E=v;return t.type==="header"&&z?u.jsx(E,{data:t.data,settings:t.settings,menu:z}):u.jsx(E,{data:t.data,settings:t.settings})},m=(w=t.data)==null?void 0:w.anchorId;return u.jsxs("div",{id:m||void 0,"data-section-id":h?t.id:void 0,"data-section-type":h?t.type:void 0,"data-section-scope":h?y:void 0,...h&&b?{"data-jp-selected":!0}:{},onClickCapture:h?g:void 0,className:ge("relative w-full",h&&"group cursor-pointer",h&&c?"sticky top-0 z-[60]":"relative z-0",b&&"z-[70]"),children:[u.jsx("div",{className:"relative z-0",children:u.jsx($n,{type:t.type,children:l()})}),h&&u.jsx(Zn,{type:t.type,scope:y,isSelected:!!b,sectionId:p&&y==="local"?t.id:void 0,sectionIndex:p&&y==="local"?d:void 0,totalSections:p&&y==="local"?a:void 0,onReorder:p&&y==="local"?n:void 0})]})},Gn=t=>{X.useEffect(()=>{document.title=t.title;let z=document.querySelector('meta[name="description"]');z||(z=document.createElement("meta"),z.setAttribute("name","description"),document.head.appendChild(z)),z.setAttribute("content",t.description)},[t.title,t.description])},Hn="application/json",pt=({pageConfig:t,siteConfig:z,menuConfig:r,selectedId:p,onReorder:d,scrollToSectionId:a,onActiveSectionChange:n})=>{var m,f;Gn(t.meta);const[o,s]=X.useState(null),h=X.useRef({}),b=X.useRef(n);b.current=n;const v=w=>{var E;(E=b.current)==null||E.call(b,w)};X.useEffect(()=>{if(!a)return;const w=h.current[a];w&&w.scrollIntoView({behavior:"smooth",block:"center"})},[a]),X.useEffect(()=>{if(!b.current)return;const E=[...z.header?[z.header.id]:[],...t.sections.map(L=>L.id),...z.footer?[z.footer.id]:[]],S=new IntersectionObserver(L=>{L.forEach(R=>{var T;if(R.isIntersecting&&R.intersectionRatio>.5){const W=R.target.getAttribute("data-section-id");W&&((T=b.current)==null||T.call(b,W))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let A=!1;const O=requestAnimationFrame(()=>{A||E.forEach(L=>{const R=h.current[L];R&&S.observe(R)})});return()=>{A=!0,cancelAnimationFrame(O),S.disconnect()}},[t.sections,(m=z.header)==null?void 0:m.id,(f=z.footer)==null?void 0:f.id]);const y=(w,E)=>{w.preventDefault(),w.dataTransfer.dropEffect="move",s(E)},c=()=>{s(null)},g=(w,E)=>{if(w.preventDefault(),s(null),!!d)try{const S=w.dataTransfer.getData(Hn),{sectionId:A}=JSON.parse(S);typeof A=="string"&&d(A,E)}catch{}},l=()=>{const w=typeof d=="function",E=t.sections.map((S,A)=>{const O=o===A;return w?u.jsxs("div",{ref:L=>{h.current[S.id]=L},"data-section-id":S.id,style:{position:"relative"},onMouseEnter:()=>v(S.id),children:[u.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=>y(L,A),onDragLeave:c,onDrop:L=>g(L,A)}),u.jsx(Me,{section:S,selectedId:p,reorderable:!0,sectionIndex:A,totalSections:t.sections.length,onReorder:d})]},S.id):u.jsx("div",{ref:L=>{h.current[S.id]=L},"data-section-id":S.id,onMouseEnter:()=>v(S.id),children:u.jsx(Me,{section:S,selectedId:p})},S.id)});if(w&&E.length>0){const S=t.sections.length,A=o===S;E.push(u.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:A?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:A?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:O=>y(O,S),onDragLeave:c,onDrop:O=>g(O,S)},"jp-drop-after-last"))}return E};return u.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[z.header!=null&&u.jsx("div",{ref:w=>{h.current[z.header.id]=w},"data-section-id":z.header.id,onMouseEnter:()=>v(z.header.id),children:u.jsx(Me,{section:z.header,menu:r.main,selectedId:p})}),u.jsx("main",{className:"flex-1",children:l()}),z.footer!=null&&u.jsx("div",{ref:w=>{h.current[z.footer.id]=w},"data-section-id":z.footer.id,onMouseEnter:()=>v(z.footer.id),children:u.jsx(Me,{section:z.footer,selectedId:p})})]})},tt=({mode:t,tenantCss:z,adminCss:r,children:p})=>(X.useLayoutEffect(()=>{const d=`jp-theme-${t}`,a=t==="tenant"?z:r;if(!document.getElementById(d)&&a){const n=document.createElement("style");n.id=d,n.innerHTML=a,document.head.appendChild(n)}return()=>{const n=document.getElementById(d);n&&n.remove()}},[t,z,r]),u.jsx(u.Fragment,{children:p}));function sr({className:t,type:z,...r}){return u.jsx("input",{type:z,className:ge("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",t),...r})}function Vn({className:t,...z}){return u.jsx("textarea",{className:ge("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",t),...z})}function Kn({className:t,checked:z,onCheckedChange:r,...p}){return u.jsx("input",{type:"checkbox",checked:z,onChange:d=>r==null?void 0:r(d.target.checked),className:ge("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",t),...p})}function Te({className:t,...z}){return u.jsx("label",{className:ge("text-sm font-medium leading-none select-none",t),...z})}const lr=he.createContext(null);function Yn(){const t=he.useContext(lr);if(!t)throw new Error("Select components must be used within Select");return t}function qn({value:t,onValueChange:z,children:r}){const p=t??"",d=he.Children.toArray(r).find(v=>he.isValidElement(v)&&v.type===bt),a=he.Children.toArray(r).find(v=>he.isValidElement(v)&&v.type===mt),n=d&&he.isValidElement(d)?d.props.children:void 0,o=a&&he.isValidElement(a)?a.props.children:void 0,s=he.useMemo(()=>!d||!he.isValidElement(d)?[]:he.Children.toArray(d.props.children).filter(v=>he.isValidElement(v)&&v.props.value!==void 0).map(v=>({value:v.props.value,label:v.props.children??v.props.value})),[d,n]),h=he.useMemo(()=>{if(!a||!he.isValidElement(a))return"";const v=he.Children.toArray(a.props.children).find(y=>he.isValidElement(y)&&y.type===gt);return v&&he.isValidElement(v)?v.props.placeholder??"":""},[a,o]),b=he.useMemo(()=>({value:p,onValueChange:v=>z==null?void 0:z(v),options:s,placeholder:h}),[p,z,s,h]);return u.jsx(lr.Provider,{value:b,children:a})}function mt({className:t,children:z,...r}){const{value:p,onValueChange:d,options:a,placeholder:n}=Yn();return u.jsxs("div",{className:ge("relative",t),...r,children:[u.jsxs("select",{value:p,onChange:o=>d(o.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:[n?u.jsx("option",{value:"",children:n}):null,a.map(o=>u.jsx("option",{value:o.value,children:String(o.label)},o.value))]}),z]})}function gt(t){return null}function bt({className:t,children:z}){return u.jsx("div",{className:ge("hidden",t),"aria-hidden":!0,children:z})}function cr({className:t,value:z,children:r}){return u.jsx("div",{"data-value":z,className:t,"aria-hidden":!0,children:r})}mt.displayName="SelectTrigger",gt.displayName="SelectValue",bt.displayName="SelectContent",cr.displayName="SelectItem";const dr=he.createContext(null);function vt(){const t=he.useContext(dr);if(!t)throw new Error("Dialog components must be used within Dialog");return t}function ur({open:t,onOpenChange:z,children:r}){const[p,d]=he.useState(!1),a=t!==void 0,n=a?t:p,o=he.useCallback(h=>{a||d(h),z==null||z(h)},[a,z]),s=he.useMemo(()=>({open:n,onOpenChange:o}),[n,o]);return u.jsx(dr.Provider,{value:s,children:r})}function hr({asChild:t,children:z}){const{onOpenChange:r}=vt(),p=he.Children.only(z);return t&&he.isValidElement(p)?he.cloneElement(p,{onClick:d=>{var a,n;(n=(a=p.props).onClick)==null||n.call(a,d),r(!0)}}):u.jsx("button",{type:"button",onClick:()=>r(!0),children:z})}function fr({className:t,children:z,...r}){const{open:p,onOpenChange:d}=vt();return he.useEffect(()=>{const a=n=>{n.key==="Escape"&&d(!1)};return p&&(document.addEventListener("keydown",a),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow=""}},[p,d]),p?Sr.createPortal(u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>d(!1)}),u.jsx("div",{role:"dialog","aria-modal":!0,className:ge("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",t),onClick:a=>a.stopPropagation(),...r,children:z})]}),document.body):null}function pr({className:t,...z}){return u.jsx("div",{className:ge("flex flex-col gap-1.5 pb-4",t),...z})}function Jn({className:t,...z}){return u.jsx("div",{className:ge("flex justify-end gap-2 pt-4",t),...z})}function mr({className:t,...z}){return u.jsx("h2",{className:ge("text-sm font-semibold text-white",t),...z})}function gr({className:t,...z}){return u.jsx("p",{className:ge("text-xs text-zinc-400",t),...z})}function Xn({asChild:t,children:z}){const{onOpenChange:r}=vt(),p=he.Children.only(z);return t&&he.isValidElement(p)?he.cloneElement(p,{onClick:d=>{var a,n;(n=(a=p.props).onClick)==null||n.call(a,d),r(!1)}}):u.jsx("button",{type:"button",onClick:()=>r(!1),children:z})}const Ue=he.forwardRef(({className:t,variant:z="default",asChild:r,children:p,...d},a)=>{const n="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 disabled:pointer-events-none disabled:opacity-50",o={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"};if(r&&he.isValidElement(p)){const s=p,h=ge(n,o[z],s.props.className,t);return he.cloneElement(s,{className:h})}return u.jsx("button",{ref:a,type:"button",className:ge(n,o[z],t),...d,children:p})});Ue.displayName="Button";const br=(t,z="default")=>{if(t.startsWith("http")||t.startsWith("data:")||t.startsWith("#"))return t;const r=t.includes("assets/")||t.startsWith("assets/"),p=/\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i.test(t);if(!r&&!p)return t.startsWith("/")?t:`/${t}`;const d=t.replace(/^\//,"").replace(/^assets\//,"");return`/assets/${z}/${d}`},vr=[{name:"layers",Icon:ft},{name:"github",Icon:Ln},{name:"arrow-right",Icon:In},{name:"box",Icon:On},{name:"terminal",Icon:Mn},{name:"chevron-right",Icon:Dn},{name:"menu",Icon:Pn},{name:"x",Icon:Be},{name:"sparkles",Icon:Fn},{name:"zap",Icon:Wn}],xt={"ui:text":({label:t,value:z,onChange:r})=>u.jsxs("div",{className:"grid w-full items-center gap-1.5 mb-4",children:[u.jsx(Te,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:t}),u.jsx(sr,{type:"text",className:"h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600",value:z||"",onChange:p=>r(p.target.value)})]}),"ui:textarea":({label:t,value:z,onChange:r})=>u.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[u.jsx(Te,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:t}),u.jsx(Vn,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:z||"",onChange:p=>r(p.target.value)})]}),"ui:select":({label:t,value:z,onChange:r,options:p=[]})=>u.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[u.jsx(Te,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:t}),u.jsxs(qn,{value:z||"",onValueChange:r,children:[u.jsx(mt,{className:"w-full h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus:ring-blue-600",children:u.jsx(gt,{placeholder:"Select..."})}),u.jsx(bt,{className:"dark",children:p.map(d=>u.jsx(cr,{value:d,className:"text-[11px]",children:d},d))})]})]}),"ui:checkbox":({label:t,value:z,onChange:r})=>u.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2 rounded border border-zinc-800/50 bg-zinc-900/20",children:[u.jsx(Kn,{id:t,checked:!!z,onCheckedChange:p=>r(p===!0)}),u.jsx(Te,{htmlFor:t,className:"text-[11px] font-medium cursor-pointer select-none text-zinc-300",children:t})]}),"ui:image-picker":({label:t,value:z,onChange:r})=>{const{tenantId:p="default"}=Qe(),[d,a]=X.useState(!1),[n,o]=X.useState(z||""),s=z?br(z,p):"",h=v=>{a(v),v&&o(z||"")},b=()=>{const v=n.trim();r(v||""),a(!1)};return u.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[u.jsx(Te,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:t}),u.jsxs(ur,{open:d,onOpenChange:h,children:[u.jsx(hr,{asChild:!0,children:u.jsxs(Ue,{variant:"outline",className:"w-full h-20 rounded-md border border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 flex flex-col items-center justify-center gap-1 text-zinc-500",children:[s?u.jsx("img",{src:s,alt:"",className:"max-h-14 max-w-full object-contain rounded",onError:v=>{v.target.style.display="none"}}):u.jsx(nr,{className:"h-8 w-8"}),u.jsx("span",{className:"text-[10px] font-medium",children:"Choose image"})]})}),u.jsxs(fr,{className:"sm:max-w-md",children:[u.jsxs(pr,{children:[u.jsx(mr,{children:"Image path"}),u.jsx(gr,{children:"Enter the asset path (e.g. images/hero.jpg). It will be resolved via resolveAssetUrl."})]}),u.jsxs("div",{className:"grid gap-2 py-2",children:[u.jsx(Te,{htmlFor:"image-path",className:"text-xs",children:"Path"}),u.jsx(sr,{id:"image-path",value:n,onChange:v=>o(v.target.value),placeholder:"images/photo.jpg",className:"h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),u.jsxs(Jn,{children:[u.jsx(Xn,{asChild:!0,children:u.jsx(Ue,{variant:"outline",type:"button",children:"Cancel"})}),u.jsx(Ue,{type:"button",onClick:b,children:"Apply"})]})]})]})]})},"ui:icon-picker":({label:t,value:z,onChange:r})=>{const[p,d]=X.useState(!1),a=vr.find(n=>n.name===(z||""));return u.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[u.jsx(Te,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:t}),u.jsxs(ur,{open:p,onOpenChange:d,children:[u.jsx(hr,{asChild:!0,children:u.jsx(Ue,{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:a?u.jsxs(u.Fragment,{children:[u.jsx(a.Icon,{size:16,className:"text-zinc-400 shrink-0"}),u.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:a.name})]}):u.jsxs(u.Fragment,{children:[u.jsx(nr,{size:16,className:"text-zinc-500 shrink-0"}),u.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),u.jsxs(fr,{className:"sm:max-w-[280px] p-4",children:[u.jsxs(pr,{children:[u.jsx(mr,{className:"text-sm",children:"Choose icon"}),u.jsx(gr,{className:"text-xs",children:"Click an icon to select it."})]}),u.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:vr.map(({name:n,Icon:o})=>u.jsx("button",{type:"button",onClick:()=>{r(n),d(!1)},className:ge("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",z===n?"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:n,children:u.jsx(o,{size:20})},n))})]})]})]})}},yt=t=>{if(t instanceof _e.z.ZodOptional||t instanceof _e.z.ZodDefault)return yt(t._def.innerType);if(t instanceof _e.z.ZodObject){const z={id:crypto.randomUUID()};for(const r in t.shape)r!=="id"&&(z[r]=yt(t.shape[r]));return z}return t instanceof _e.z.ZodArray?[]:t instanceof _e.z.ZodString?"":t instanceof _e.z.ZodNumber?0:t instanceof _e.z.ZodBoolean?!1:t instanceof _e.z.ZodEnum?t._def.values[0]:null},wt=t=>t instanceof _e.z.ZodOptional||t instanceof _e.z.ZodDefault?wt(t._def.innerType):t,kt=(t,z)=>t&&!z?"opacity-10":"opacity-100",We=(t,z)=>t!=null&&z.toLowerCase()===t.toLowerCase(),Qn=(t,z)=>{if(!t)return;const r=z.toLowerCase(),p=Object.entries(t).find(([d])=>d.toLowerCase()===r);return p==null?void 0:p[1]},$e=({schema:t,data:z,onChange:r,keys:p,expandedItemPath:d,expandedItemIdByField:a,focusedFieldKey:n,onSidebarExpandedItemChange:o})=>{const s=t.shape,h=p!=null?Object.keys(s).filter(g=>p.includes(g)):Object.keys(s),b=d==null?void 0:d[0],v=(b==null?void 0:b.itemId)!=null?{[b.fieldKey]:b.itemId}:a,y=(b==null?void 0:b.fieldKey)??n??null,c=y!=null;return u.jsx("div",{className:"space-y-4",children:h.map(g=>{const l=s[g];if(!l)return null;const m=wt(l),f=l.description||"ui:text",w=z[g];if(m instanceof _e.z.ZodObject){const O=w||{},L=We(y,g);return u.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 ${kt(c,L)}`,...L?{"data-jp-focused-field":g}:{},children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),u.jsx("h4",{className:"text-[10px] font-black uppercase text-zinc-400 tracking-widest",children:g})]}),u.jsx($e,{schema:m,data:O,onChange:R=>r({...z,[g]:R}),expandedItemPath:d&&We(b==null?void 0:b.fieldKey,g)?d.slice(1):void 0,expandedItemIdByField:v,focusedFieldKey:y})]},g)}if(m instanceof _e.z.ZodArray){const O=Array.isArray(w)?w:[],L=wt(m.element),R=(j,B)=>{if(B<0||B>=O.length)return;const i=[...O],[U]=i.splice(j,1);i.splice(B,0,U),r({...z,[g]:i})},T=We(y,g),W=We(b==null?void 0:b.fieldKey,g)?b==null?void 0:b.itemId:void 0,Q=Qn(v,g)??W;return u.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${kt(c,T)}`,...T?{"data-jp-focused-field":g}:{},children:[u.jsxs("div",{className:"flex items-center justify-between mb-3",children:[u.jsxs("label",{className:"text-[10px] font-black uppercase text-zinc-500 tracking-widest",children:[g," (",O.length,")"]}),u.jsxs("button",{type:"button",onClick:()=>{const j=yt(L);r({...z,[g]:[...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:[u.jsx(or,{size:12})," Add Item"]})]}),u.jsx("div",{className:"space-y-2",children:O.map((j,B)=>{const i=j,U=i.id||`legacy-${B}`,ee=(typeof i.title=="string"?i.title:null)||(typeof i.label=="string"?i.label:null)||(typeof i.name=="string"?i.name:null)||(typeof i.content=="string"?i.content:null)||(typeof i.text=="string"?i.text:null)||`${g} #${B+1}`,$=Q,Z=String(i.id??U),V=$!=null&&String($)===Z,J=V&&d&&d.length>1?d.slice(1):void 0,_=c&&T&&$!=null&&!V;return u.jsx(eo,{itemId:Z,openItemId:$!=null?String($):void 0,isFaded:_,index:B,isFirst:B===0,isLast:B===O.length-1,label:ee,onExpandedChange:o?C=>o(C?{fieldKey:g,itemId:Z}:null):void 0,onRemove:()=>{const C=O.filter((K,H)=>H!==B);r({...z,[g]:C})},onMoveUp:()=>R(B,B-1),onMoveDown:()=>R(B,B+1),children:L instanceof _e.z.ZodObject?u.jsx($e,{schema:L,data:i||{},expandedItemPath:J,onChange:C=>{const K=[...O];K[B]=C,r({...z,[g]:K})}}):u.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},U)})})]},g)}const E=xt[f]||xt["ui:text"],S=m instanceof _e.z.ZodEnum?m._def.values:void 0,A=We(y,g);return u.jsx("div",{className:`transition-opacity duration-200 ${kt(c,A)}`,...A?{"data-jp-focused-field":g}:{},children:u.jsx(E,{label:g,value:w,options:S,onChange:O=>r({...z,[g]:O})})},g)})})},eo=({itemId:t,openItemId:z,isFaded:r=!1,label:p,onExpandedChange:d,onRemove:a,onMoveUp:n,onMoveDown:o,isFirst:s,isLast:h,children:b})=>{const v=z!=null&&String(z)===String(t),[y,c]=X.useState(v);X.useEffect(()=>{v&&!y&&c(!0),!v&&y&&c(!1)},[v,y]);const g=()=>{const m=!y;c(m),d==null||d(m)},l=v&&y;return u.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...l?{"data-jp-expanded-item":t}:{},children:[u.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[u.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:u.jsxs("button",{type:"button",onClick:g,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[y?u.jsx(ut,{size:12,className:"shrink-0"}):u.jsx(dt,{size:12,className:"shrink-0"}),u.jsx("span",{className:"truncate",children:p})]})}),u.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[u.jsx("button",{type:"button",disabled:s,onClick:n,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:u.jsx(Tn,{size:12})}),u.jsx("button",{type:"button",disabled:h,onClick:o,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:u.jsx(An,{size:12})}),u.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),u.jsx("button",{type:"button",onClick:a,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:u.jsx(ar,{size:12})})]})]}),y&&u.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:b})]})},xr=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),yr=({selectedSection:t,pageData:z,allSectionsData:r=[],onUpdate:p,onUpdateSection:d,onClose:a,expandedItemPath:n=null,onReorderSection:o,allLayers:s=[],activeSectionId:h,onRequestScrollToSection:b,onDeleteSection:v,onAddSection:y,hasChanges:c=!1,onExportHTML:g,onExportJSON:l})=>{const{schemas:m}=Qe(),[f,w]=X.useState(!0),[E,S]=X.useState(null),[A,O]=X.useState(null),[L,R]=X.useState(null),[T,W]=X.useState(null),[Q,j]=X.useState(null),B=X.useRef(null),i=X.useRef(null),U=X.useDeferredValue(t),ee=t!=null&&(U==null?void 0:U.id)!==t.id,$=n&&n.length>0?n:T?[T]:null,Z=$!=null&&$.length?{fieldKey:$[$.length-1].fieldKey,itemId:$[$.length-1].itemId}:null,V=X.useRef(n);X.useEffect(()=>{V.current!=null&&n==null&&W(null),V.current=n},[n]),X.useEffect(()=>{(t==null?void 0:t.id)!=null&&w(!1)},[t==null?void 0:t.id]);const J=()=>{const e=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const M=B.current;M&&M.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(e)},_=X.useRef(f);X.useEffect(()=>{if(f&&!_.current){const e=J();return _.current=f,e}_.current=f},[f]),X.useEffect(()=>{if(!Z)return;const e=B.current;if(!e)return;const M=requestAnimationFrame(()=>{const F=e.querySelector("[data-jp-expanded-item]")??e.querySelector("[data-jp-focused-field]");F&&F.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(M)},[Z]);const C=e=>{w(!1),b==null||b(e)},K=()=>{w(!0),J()},H=()=>{w(e=>!e),J()},Y=(e,M)=>{M.stopPropagation(),r.length>0&&d?j(e):(w(!1),b==null||b(e))};X.useEffect(()=>{if(Q==null)return;const e=M=>{M.key==="Escape"&&j(null)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[Q]);const ce=e=>{E===e?(v==null||v(e),S(null)):(S(e),setTimeout(()=>S(null),3e3))},oe=(e,M)=>{O(M),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("application/json",JSON.stringify({sectionId:M}))},ae=(e,M)=>{e.preventDefault(),A!==M&&R(M)},se=(e,M)=>{if(e.preventDefault(),O(null),R(null),!A||A===M||!o)return;const F=s.filter(I=>I.scope==="local"),k=F.findIndex(I=>I.id===A),x=F.findIndex(I=>I.id===M);k===-1||x===-1||o(A,x)},me=t?z.sections.find(e=>e.id===t.id):void 0,pe=U?z.sections.find(e=>e.id===U.id):void 0,xe=U?m[U.type]:void 0,ke=s.length>0&&(f||!t);return u.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:[u.jsxs("div",{className:"sticky top-0 z-10 flex flex-col shrink-0 bg-zinc-950 border-b border-zinc-800",children:[u.jsxs("div",{className:"py-2 px-3 flex justify-between items-center bg-zinc-900/50",children:[u.jsx("div",{className:"flex items-center gap-2 min-w-0",children:u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-bold text-white leading-tight",children:"Inspector"}),u.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider flex items-center gap-1.5 leading-tight mt-0.5",children:t?u.jsxs(u.Fragment,{children:[o&&t.scope==="local"&&u.jsx("span",{className:"text-zinc-500 shrink-0",title:"Reorder section on page",children:u.jsx(ht,{size:12,strokeWidth:2})}),u.jsx("span",{className:"text-blue-400",children:t.type}),u.jsx("span",{className:"text-zinc-600",children:"|"}),u.jsx("span",{className:"text-zinc-500",children:t.scope})]}):u.jsx("span",{className:"text-zinc-500",children:"Waiting for Selection..."})})]})}),u.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y!=null&&u.jsxs("button",{type:"button",onClick:y,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:[u.jsx(or,{size:16}),u.jsx("span",{className:"text-xs font-medium",children:"Add section"})]}),u.jsx("button",{type:"button",onClick:a,className:"p-1 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors",title:"Close Inspector","aria-label":"Close Inspector",children:u.jsx(Be,{size:16})})]})]}),s.length>0&&u.jsxs("div",{className:"bg-zinc-900/20 opacity-100",children:[u.jsxs("div",{className:"flex items-center justify-between py-3 px-4 hover:bg-zinc-800/30 transition-colors",children:[u.jsxs("button",{type:"button",onClick:K,className:"flex-1 flex items-center gap-2 text-left min-w-0",children:[u.jsx(ft,{size:14,className:"text-primary shrink-0"}),u.jsx("span",{className:"text-xs font-bold text-white",children:"Page Layers"}),u.jsxs("span",{className:"text-[10px] text-zinc-500",children:["(",s.length,")"]})]}),u.jsx("button",{type:"button",onClick:H,className:"p-0.5 rounded text-zinc-500 hover:text-white transition-colors shrink-0","aria-label":ke?"Collapse Page Layers":"Expand Page Layers",children:ke?u.jsx(ut,{size:14}):u.jsx(dt,{size:14})})]}),!ke&&t&&(()=>{const e=s.find(F=>F.id===t.id);if(!e)return null;const M=h===t.id;return u.jsxs("div",{className:"px-3 py-2 flex items-center gap-2 bg-primary/10 border-t border-zinc-800/50",children:[u.jsx(ht,{size:12,className:"text-primary shrink-0"}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-primary truncate flex items-center gap-1",children:[e.type,M&&u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),u.jsx("p",{className:"text-xs text-white font-medium truncate",children:e.title??`${e.type} section`})]}),u.jsx("button",{type:"button",onClick:F=>Y(e.id,F),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${e.type}`,"aria-label":`Open settings for ${e.type} section`,children:u.jsx(ir,{size:12})})]})})()]})]}),u.jsxs("div",{ref:B,className:"flex-1 min-h-0 overflow-y-auto flex flex-col custom-scrollbar",children:[ke&&u.jsxs("div",{className:"border-b border-zinc-800 bg-zinc-900/20 px-3 pb-3 pt-1",children:[s.map(e=>{const M=(t==null?void 0:t.id)===e.id,F=h===e.id,k=A===e.id,x=L===e.id,I=e.scope==="local"&&v,P=e.scope==="local"&&!!o;return u.jsxs("div",{draggable:P,onDragStart:N=>P&&oe(N,e.id),onDragOver:N=>P&&ae(N,e.id),onDragLeave:()=>R(null),onDrop:N=>P&&se(N,e.id),onDragEnd:()=>{O(null),R(null)},className:ge("flex items-center gap-2 py-2.5 px-2 rounded-sm border-t transition-colors",x&&"border-t-2 border-dashed border-primary bg-primary/5",!x&&M&&"border-primary/30 bg-primary/10",!x&&!M&&"border-zinc-800/90 hover:bg-zinc-800/40",k&&"opacity-40",P?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[u.jsx(ht,{size:12,className:`shrink-0 ${M?"text-primary":"text-zinc-500"}`}),u.jsxs("button",{type:"button",onClick:()=>C(e.id),className:"flex-1 min-w-0 text-left",children:[u.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-zinc-400 truncate flex items-center gap-1",children:[e.type,F&&u.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),u.jsx("p",{className:`text-xs truncate ${M?"text-white font-medium":"text-zinc-500"}`,children:e.title??`${e.type} section`})]}),u.jsx("button",{type:"button",onClick:N=>Y(e.id,N),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${e.type}`,"aria-label":`Open settings for ${e.type} section`,children:u.jsx(ir,{size:12})}),I&&u.jsx("button",{type:"button",onClick:N=>{N.stopPropagation(),ce(e.id)},className:`p-1 rounded shrink-0 ${E===e.id?"bg-red-500/20 text-red-400":"text-zinc-500 hover:text-red-400"}`,title:"Delete section",children:u.jsx(ar,{size:12})})]},e.id)}),E&&u.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:[u.jsx(Rn,{size:12,className:"text-amber-500 shrink-0"}),u.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]}),Z&&me&&(()=>{const e=me.data||{};let M;if($&&$.length>0){let F=e;for(const I of $){const D=F==null?void 0:F[I.fieldKey];I.itemId!=null&&Array.isArray(D)?F=D.find(N=>String(N==null?void 0:N.id)===String(I.itemId))??null:F=D}const k=F||{},x=Z.fieldKey;M=(typeof k.name=="string"?k.name:null)??(typeof k.title=="string"?k.title:null)??(typeof k.label=="string"?k.label:null)??x.charAt(0).toUpperCase()+x.slice(1).replace(/([A-Z])/g," $1").trim()}else{const F=Z.fieldKey;if(Z.itemId!=null){const I=(Array.isArray(e[F])?e[F]:[]).find(D=>String(D==null?void 0:D.id)===String(Z.itemId))||{};M=(typeof I.name=="string"?I.name:null)??(typeof I.title=="string"?I.title:null)??(typeof I.label=="string"?I.label:null)??F}else M=F.charAt(0).toUpperCase()+F.slice(1).replace(/([A-Z])/g," $1").trim()}return u.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[u.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),u.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:M})]})})(),u.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>t!=null&&w(!1),children:t?ee?u.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[u.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),u.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),u.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),u.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),u.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):xe?(()=>{const M=Object.keys(xe.shape).filter(D=>!xr.has(D)),F=(pe==null?void 0:pe.data)||{};if(M.length===0)return u.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const k=$==null?void 0:$[0],x=(k==null?void 0:k.itemId)!=null?{[k.fieldKey]:k.itemId}:(Z==null?void 0:Z.itemId)!=null?{[Z.fieldKey]:Z.itemId}:void 0,I=(k==null?void 0:k.fieldKey)??(Z==null?void 0:Z.fieldKey)??null;return u.jsx($e,{schema:xe,data:F,onChange:D=>p(D),keys:M,expandedItemPath:$,expandedItemIdByField:x,focusedFieldKey:I,onSidebarExpandedItemChange:W})})():u.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 ",(U==null?void 0:U.type)??t.type]}):u.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"Select a layer above or on the stage to edit."})})]}),u.jsxs("div",{className:"p-4 border-t border-zinc-800 bg-zinc-900/50 flex flex-col gap-2 opacity-100",children:[(g!=null||l!=null)&&u.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[u.jsx("div",{className:ge("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")}),u.jsx("span",{className:ge("text-xs font-medium transition-colors duration-300",c?"text-amber-500":"text-zinc-500"),children:c?"Unsaved Changes":"All Changes Saved"})]}),(g!=null||l!=null)&&u.jsxs("div",{className:"flex items-stretch gap-0 rounded-md overflow-hidden border border-zinc-800",children:[g!=null&&u.jsxs("button",{type:"button",onClick:g,disabled:!c,className:ge("flex-1 flex items-center justify-center gap-2 px-3 py-2.5 text-xs font-medium transition-all min-w-0",c?"opacity-100 bg-zinc-900 text-zinc-200 hover:bg-zinc-800":"opacity-100 bg-transparent text-zinc-600 cursor-not-allowed"),children:[u.jsx(tr,{size:14,className:"shrink-0"}),u.jsx("span",{children:"Bake HTML"})]}),g!=null&&l!=null&&u.jsx("div",{className:"w-px bg-zinc-700 shrink-0","aria-hidden":!0}),l!=null&&u.jsxs("button",{type:"button",onClick:l,disabled:!c,className:ge("flex-1 flex items-center justify-center gap-2 px-3 py-2.5 text-xs font-bold transition-all min-w-0",c?"opacity-100 bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"opacity-100 bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[u.jsx(rr,{size:14,className:"shrink-0"}),u.jsx("span",{children:"Export JSON"})]})]})]}),Q!=null&&r.length>0&&d!=null&&(()=>{const e=r.find(N=>N.id===Q),M=s.find(N=>N.id===Q);if(!e)return null;const F=(M==null?void 0:M.scope)==="global"?"global":"local",k=e.type,x=m[k],D=(x?Object.keys(x.shape):[]).filter(N=>xr.has(N)),P=e.data??{};return D.length===0?u.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:()=>j(null),children:u.jsxs("div",{ref:i,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:N=>N.stopPropagation(),children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[u.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",k]}),u.jsx("button",{type:"button",onClick:()=>j(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:u.jsx(Be,{size:18})})]}),u.jsx("div",{className:"p-4",children:u.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):u.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:N=>N.target===N.currentTarget&&j(null),children:u.jsxs("div",{ref:i,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:N=>N.stopPropagation(),children:[u.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[u.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",k]}),u.jsx("button",{type:"button",onClick:()=>j(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:u.jsx(Be,{size:18})})]}),u.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:u.jsx($e,{schema:x,data:P,onChange:N=>{const G={...e.data,...N};d(Q,F,k,G)},keys:D})})]})})})()]})},wr=({draft:t,globalDraft:z,themeConfig:r,slug:p,selectedId:d,scrollToSectionId:a,onScrollRequested:n})=>{const o=X.useRef(null),s=X.useCallback(()=>{var h;(h=o.current)!=null&&h.contentWindow&&o.current.contentWindow.postMessage({type:be.UPDATE_DRAFTS,draft:t,globalDraft:z,themeConfig:r},"*")},[t,z,r]);return X.useEffect(()=>{s()},[s]),X.useEffect(()=>{const h=b=>{b.data.type===be.STAGE_READY&&s()};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[s]),X.useEffect(()=>{var h;(h=o.current)!=null&&h.contentWindow&&o.current.contentWindow.postMessage({type:be.SYNC_SELECTION,selectedId:d},"*")},[d]),X.useEffect(()=>{var h;!a||!((h=o.current)!=null&&h.contentWindow)||(o.current.contentWindow.postMessage({type:be.REQUEST_SCROLL_TO_SECTION,sectionId:a},"*"),n==null||n())},[a,n]),u.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:u.jsx("iframe",{ref:o,src:`/admin/preview/${p}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},rt={setTheme:t=>{const z=document.documentElement,{tokens:r}=t,p={"--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(p).forEach(([d,a])=>{z.style.setProperty(d,a)})}},kr=()=>{var c;const[t,z]=X.useState(null),[r,p]=X.useState(null),[d,a]=X.useState(null),[n,o]=X.useState(null),[s,h]=X.useState(!1);if(X.useEffect(()=>{const g=l=>{l.data.type===be.UPDATE_DRAFTS&&(z(l.data.draft),p(l.data.globalDraft),l.data.themeConfig&&rt.setTheme(l.data.themeConfig)),l.data.type===be.SYNC_SELECTION&&a(l.data.selectedId),l.data.type===be.REQUEST_SCROLL_TO_SECTION&&o(l.data.sectionId??null),l.data.type===be.REQUEST_CLEAN_HTML&&(h(!0),setTimeout(()=>{const m=document.documentElement.outerHTML;window.parent.postMessage({type:be.SEND_CLEAN_HTML,html:m},"*"),h(!1)},50))};return window.addEventListener("message",g),window.parent.postMessage({type:be.STAGE_READY},"*"),()=>window.removeEventListener("message",g)},[]),X.useEffect(()=>{const g=l=>{var j,B,i,U,ee,$,Z,V;const m=l.target,f=l.clientX,w=l.clientY;let E=null,S=m;for(;S&&S!==document.body;){const J=(j=S.getAttribute)==null?void 0:j.call(S,"data-section-id"),_=(B=S.getAttribute)==null?void 0:B.call(S,"data-section-type"),C=(i=S.getAttribute)==null?void 0:i.call(S,"data-section-scope");if(J&&_&&C){E=S;break}S=S.parentElement}if(!E)return;l.preventDefault(),l.stopPropagation();const A=E.getAttribute("data-section-id"),O=E.getAttribute("data-section-type"),L=E.getAttribute("data-section-scope");if(!A||!O||!L)return;const R={id:A,type:O,scope:L};if(m===E){window.parent.postMessage({type:be.SECTION_SELECT,section:R},"*");return}const T=document.elementFromPoint(f,w)??m;if(!T||!E.contains(T)){window.parent.postMessage({type:be.SECTION_SELECT,section:R},"*");return}if(T===E){window.parent.postMessage({type:be.SECTION_SELECT,section:R},"*");return}const W=[];for(S=T;S&&S!==E;){const J=(U=S.getAttribute)==null?void 0:U.call(S,"data-jp-item-id"),_=(ee=S.getAttribute)==null?void 0:ee.call(S,"data-jp-item-field");J&&_&&W.push({fieldKey:_||"items",itemId:J}),S=S.parentElement}if(W.reverse(),W.length===0)for(S=T;S&&S!==E;){const J=($=S.getAttribute)==null?void 0:$.call(S,"data-jp-field");if(J){W.push({fieldKey:J});break}S=S.parentElement}if(W.length===0&&T){let J=null;const _=C=>{var H,Y;const K=C.getBoundingClientRect();if(K.left<=f&&f<=K.right&&K.top<=w&&w<=K.bottom){for(let ce=0;ce<C.children.length;ce++)_(C.children[ce]);((H=C.getAttribute)!=null&&H.call(C,"data-jp-item-id")||(Y=C.getAttribute)!=null&&Y.call(C,"data-jp-field"))&&(J=C)}};if(_(T),J){const C=J,K=(Z=C.getAttribute)==null?void 0:Z.call(C,"data-jp-item-id"),H=(V=C.getAttribute)==null?void 0:V.call(C,"data-jp-field");K&&H?W.push({fieldKey:H||"items",itemId:K}):H&&W.push({fieldKey:H})}}const Q={type:be.SECTION_SELECT,section:R};if(W.length>0){Q.itemPath=W;const J=W[0];J.itemId!=null?(Q.itemField=J.fieldKey,Q.itemId=J.itemId):Q.itemField=J.fieldKey}window.parent.postMessage(Q,"*")};return document.addEventListener("click",g,!0),()=>document.removeEventListener("click",g,!0)},[]),X.useEffect(()=>{if(!n)return;const g=setTimeout(()=>o(null),600);return()=>clearTimeout(g)},[n]),!t||!r)return u.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 b=(c=r.header)==null?void 0:c.data,v={main:(b==null?void 0:b.links)??[]},y=g=>{window.parent.postMessage({type:be.ACTIVE_SECTION_CHANGED,activeSectionId:g},"*")};return u.jsx(et,{mode:s?"visitor":"studio",children:u.jsx("div",{className:s?"":"jp-ice-active",children:u.jsx(pt,{pageConfig:t,siteConfig:r,menuConfig:v,selectedId:s?null:d,scrollToSectionId:n,onActiveSectionChange:y})})})};function to(t){return t.split("-").map(z=>z.charAt(0).toUpperCase()+z.slice(1).toLowerCase()).join(" ")}const _r=({open:t,onClose:z,sectionTypes:r,sectionTypeLabels:p,onSelect:d})=>{if(X.useEffect(()=>{if(!t)return;const n=o=>{o.key==="Escape"&&z()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[t,z]),!t)return null;const a=n=>(p==null?void 0:p[n])??to(n);return u.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:[u.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:z,"aria-hidden":"true"}),u.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:[u.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:u.jsx(ft,{size:18})}),u.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),u.jsx("button",{type:"button",onClick:z,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:u.jsx(Be,{size:18})})]}),u.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?u.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):u.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(n=>u.jsx("li",{role:"option",children:u.jsxs("button",{type:"button",onClick:()=>{d(n),z()},className:ge("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:[u.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:n}),u.jsx("span",{className:"text-sm font-medium text-zinc-200",children:a(n)})]})},n))})}),u.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:u.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},zr=()=>u.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:[u.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),u.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),u.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"})]}),ro='/*! 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-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-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-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-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;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--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;--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)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.right-0{right:calc(var(--spacing)*0)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.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)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.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)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.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-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-14{height:calc(var(--spacing)*14)}.h-20{height:calc(var(--spacing)*20)}.h-full{height:100%}.h-screen{height:100vh}.max-h-14{max-height:calc(var(--spacing)*14)}.max-h-\\[85vh\\]{max-height:85vh}.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-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\\/4{width:75%}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.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-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-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.items-center{align-items:center}.items-stretch{align-items:stretch}.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-3{gap:calc(var(--spacing)*3)}: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-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-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.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-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-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-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\\/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\\/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\\/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-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\\/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\\/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-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-\\[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}.p-0\\.5{padding:calc(var(--spacing)*.5)}.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-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-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-8{padding-block:calc(var(--spacing)*8)}.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)}.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-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-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-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.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-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-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)}.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)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.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-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))}.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}.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-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-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-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-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\\:opacity-90:hover{opacity:.9}}.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-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.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\\: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}.sm\\:max-w-md{max-width:var(--container-md)}}}: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-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-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 no extends X.Component{constructor(z){super(z),this.state={hasError:!1,error:null}}static getDerivedStateFromError(z){return{hasError:!0,error:z}}componentDidCatch(z,r){console.error("[JsonPages Engine]",z,r)}render(){return this.state.hasError&&this.state.error?u.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:[u.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),u.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 oo({config:t}){var E,S;const{registry:z={},schemas:r={},pages:p={},siteConfig:d,themeConfig:a,menuConfig:n,themeCss:o,addSection:s,NotFoundComponent:h=zr}=t,b=(s==null?void 0:s.addableSectionTypes)??Object.keys(r).filter(A=>A!=="header"&&A!=="footer"),v={exportJSON:((E=t.persistence)==null?void 0:E.exportJSON)??St,exportHTML:((S=t.persistence)==null?void 0:S.exportHTML)??Ct},y=typeof(o==null?void 0:o.tenant)=="string"?o.tenant:"",c=typeof(o==null?void 0:o.admin)=="string"?o.admin:ro,[g,l]=X.useState(!1);X.useEffect(()=>{try{a!=null&&a.tokens&&rt.setTheme(a)}catch(A){console.warn("[JsonPages] setTheme failed",A)}l(!0)},[a]);const m=()=>{const{slug:A="home"}=je.useParams(),[O,L]=X.useState(null);X.useEffect(()=>{const Q=document.getElementById("jp-baked-state");if(Q!=null&&Q.textContent)try{const j=JSON.parse(Q.textContent);L(j),rt.setTheme(j.theme)}catch(j){console.error("Failed to parse baked state",j)}},[]);const R=O?O.page:p[A],T=O?O.site:d,W=O?O.menu:n;return R?u.jsx(tt,{mode:"tenant",tenantCss:y,adminCss:c,children:u.jsx(et,{mode:"visitor",children:u.jsx(pt,{pageConfig:R,siteConfig:T,menuConfig:W})})}):u.jsx(h,{})},f=()=>{const{slug:A="home"}=je.useParams(),[O,L]=X.useState(null),[R,T]=X.useState(!1),[W,Q]=X.useState(()=>{var D;try{const P=JSON.parse(JSON.stringify(d??{}));P.identity||(P.identity={title:"Site"}),P.pages||(P.pages=[]);const N=(D=P.header)==null?void 0:D.data;return N&&(n!=null&&n.main)&&(N.links=JSON.parse(JSON.stringify(n.main))),P}catch{return{identity:{title:"Site"},pages:[]}}}),[j,B]=X.useState(null),[i,U]=X.useState(null),[ee,$]=X.useState(null),[Z,V]=X.useState(null),[J,_]=X.useState(!1),[C,K]=X.useState(320),H=240,Y=720,ce=X.useCallback(D=>{D.preventDefault();const P=D.currentTarget;P.setPointerCapture(D.pointerId);const N=D.clientX,G=C,te=ie=>{const ue=N-ie.clientX,de=Math.min(Y,Math.max(H,G+ue));K(de)},q=()=>{P.releasePointerCapture(D.pointerId),P.removeEventListener("pointermove",te),P.removeEventListener("pointerup",q),P.removeEventListener("pointercancel",q),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",P.addEventListener("pointermove",te),P.addEventListener("pointerup",q),P.addEventListener("pointercancel",q)},[C]),oe=O?[...W.header?[{id:W.header.id,type:W.header.type,scope:"global",title:"Header"}]:[],...O.sections.map(D=>{var P,N;return{id:D.id,type:D.type,scope:"local",title:((P=D.data)==null?void 0:P.title)??((N=D.data)==null?void 0:N.titleHighlight)}}),...W.footer?[{id:W.footer.id,type:W.footer.type,scope:"global",title:"Footer"}]:[]]:[];X.useEffect(()=>{const D=p[A];D&&L(JSON.parse(JSON.stringify(D))),B(null),U(null),T(!1)},[A,p]);const ae=X.useCallback((D,P,N)=>{const G=[...N.sections],te=G.findIndex(ue=>ue.id===D);if(te===-1||P<0||P>=G.length)return;const[q]=G.splice(te,1),ie=P>te?P-1:P;G.splice(Math.min(ie,G.length),0,q),L({...N,sections:G}),T(!0)},[]),se=X.useCallback(D=>{var P;if(D.origin===window.location.origin){if(D.data.type===be.SECTION_SELECT){B(D.data.section);const N=D.data.itemPath;if(Array.isArray(N)&&N.length>0)U(N.map(G=>({fieldKey:G.fieldKey,...G.itemId!=null?{itemId:String(G.itemId)}:{}})));else{const G=D.data.itemField,te=D.data.itemId;U(typeof G=="string"?[{fieldKey:G,...te!=null?{itemId:String(te)}:{}}]:null)}}if(D.data.type===be.ACTIVE_SECTION_CHANGED&&$(D.data.activeSectionId??null),D.data.type==="jsonpages:section-reorder"&&O){const{sectionId:N,newIndex:G}=D.data;typeof N=="string"&&typeof G=="number"&&G>=0&&ae(N,G,O)}if(D.data.type===be.SEND_CLEAN_HTML){if(!O)return;const N=(P=W.header)==null?void 0:P.data,G={page:O,site:W,menu:{main:(N==null?void 0:N.links)??[]},theme:a};v.exportHTML(G,A,D.data.html),T(!1)}}},[O,W,A,a,ae]);X.useEffect(()=>(window.addEventListener("message",se),()=>window.removeEventListener("message",se)),[se]);const me=X.useCallback(D=>{const P=oe.find(N=>N.id===D);P&&B({id:P.id,type:P.type,scope:P.scope}),U(null),V(D)},[oe]),pe=X.useCallback(()=>{V(null)},[]),xe=X.useCallback(D=>{L(P=>P&&{...P,sections:P.sections.filter(N=>N.id!==D)}),T(!0),B(P=>(P==null?void 0:P.id)===D?null:P)},[]),ke=D=>{if(!(!j||!O))if(T(!0),j.scope==="global")j.type==="header"&&W.header!=null?Q({...W,header:{...W.header,data:D}}):j.type==="footer"&&W.footer!=null&&Q({...W,footer:{...W.footer,data:D}});else{const P=O.sections.map(N=>N.id===j.id?{...N,data:D}:N);L({...O,sections:P})}},e=X.useCallback((D,P,N,G)=>{var te,q;if(T(!0),P==="global")((te=W.header)==null?void 0:te.id)===D?Q({...W,header:{...W.header,data:G}}):((q=W.footer)==null?void 0:q.id)===D&&Q({...W,footer:{...W.footer,data:G}});else if(O){const ie=O.sections.map(ue=>ue.id===D?{...ue,data:G}:ue);L({...O,sections:ie})}},[O,W]),M=()=>{var P;const D=document.querySelector("iframe");(P=D==null?void 0:D.contentWindow)==null||P.postMessage({type:be.REQUEST_CLEAN_HTML},"*")},F=()=>{var N;if(!O)return;const D=(N=W.header)==null?void 0:N.data,P={page:O,site:W,menu:{main:(D==null?void 0:D.links)??[]},theme:a};v.exportJSON(P,A),T(!1)},k=D=>{var G;if(!O)return;const P=((G=s==null?void 0:s.getDefaultSectionData)==null?void 0:G.call(s,D))??{},N={id:crypto.randomUUID(),type:D,data:P,settings:void 0};L({...O,sections:[...O.sections,N]}),T(!0),B({id:N.id,type:D,scope:"local"})};if(!O)return u.jsx("div",{children:"Loading Studio..."});const x=(j==null?void 0:j.scope)==="global"?{sections:[W.header,W.footer].filter(D=>D!=null)}:O,I=[...W.header?[W.header]:[],...O.sections,...W.footer?[W.footer]:[]];return u.jsx(tt,{mode:"admin",tenantCss:y,adminCss:c,children:u.jsx(et,{mode:"studio",children:u.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[u.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[u.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:u.jsx(wr,{draft:O,globalDraft:W,themeConfig:a,slug:A,selectedId:j==null?void 0:j.id,scrollToSectionId:Z,onScrollRequested:pe})}),u.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:C,minWidth:H,maxWidth:Y},children:[u.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:ce}),u.jsx(yr,{selectedSection:j,pageData:x,allSectionsData:I,onUpdate:ke,onUpdateSection:e,onClose:()=>{B(null),U(null)},expandedItemPath:i,onReorderSection:O?(D,P)=>ae(D,P,O):void 0,allLayers:oe,activeSectionId:ee,onRequestScrollToSection:me,onDeleteSection:O?xe:void 0,onAddSection:b.length>0?()=>_(!0):void 0,hasChanges:R,onExportHTML:M,onExportJSON:F})]})]}),u.jsx(_r,{open:J,onClose:()=>_(!1),sectionTypes:b,sectionTypeLabels:s==null?void 0:s.sectionTypeLabels,onSelect:k})]})})})},w=()=>u.jsx(tt,{mode:"tenant",tenantCss:y,adminCss:c,children:u.jsx(kr,{})});return g?u.jsx(no,{children:u.jsx(Jt,{config:{registry:z,schemas:r,tenantId:t.tenantId??"default"},children:u.jsx(je.BrowserRouter,{children:u.jsxs(je.Routes,{children:[u.jsx(je.Route,{path:"/",element:u.jsx(m,{})}),u.jsx(je.Route,{path:"/:slug",element:u.jsx(m,{})}),u.jsx(je.Route,{path:"/admin",element:u.jsx(f,{})}),u.jsx(je.Route,{path:"/admin/:slug",element:u.jsx(f,{})}),u.jsx(je.Route,{path:"/admin/preview/:slug",element:u.jsx(w,{})}),u.jsx(je.Route,{path:"*",element:u.jsx(h,{})})]})})})}):u.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 io=({hasChanges:t,onExportJSON:z,onExportHTML:r,onAddSection:p})=>u.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:[u.jsx("div",{className:"flex items-center gap-3",children:p!=null&&u.jsxs("button",{type:"button",onClick:p,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:[u.jsx(Bn,{size:14}),u.jsx("span",{children:"Add section"})]})}),u.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:u.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("button",{onClick:r,disabled:!t,className:ge("flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium transition-all border",t?"bg-zinc-900 border-zinc-700 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600":"bg-transparent border-transparent text-zinc-600 cursor-not-allowed"),children:[u.jsx(tr,{size:14}),u.jsx("span",{children:"Bake HTML"})]}),u.jsxs("button",{onClick:z,disabled:!t,className:ge("flex items-center gap-2 px-4 py-1.5 rounded-md text-xs font-bold transition-all shadow-lg",t?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[u.jsx(rr,{size:14}),u.jsx("span",{children:"Export JSON"})]})]})]});fe.AddSectionLibrary=_r,fe.AdminSidebar=yr,fe.ConfigProvider=Jt,fe.ControlBar=io,fe.DefaultNotFound=zr,fe.FormFactory=$e,fe.InputWidgets=xt,fe.JsonPagesEngine=oo,fe.PageRenderer=pt,fe.PreviewEntry=kr,fe.STUDIO_EVENTS=be,fe.SectionRenderer=Me,fe.StudioProvider=et,fe.StudioStage=wr,fe.ThemeLoader=tt,fe.cn=ge,fe.exportBakedHTML=Ct,fe.exportProjectJSON=St,fe.resolveAssetUrl=br,fe.themeManager=rt,fe.useConfig=Qe,fe.useStudio=Qt,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})}));