@jsonpages/core 1.0.40 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jsonpages-core.js +3341 -3307
- package/dist/jsonpages-core.umd.cjs +51 -51
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ye,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-router-dom"),require("react-dom"),require("zod")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom","react-dom","zod"],T):(ye=typeof globalThis<"u"?globalThis:ye||self,T(ye.JsonPagesCore={},ye.React,ye.ReactRouterDOM,ye.ReactDOM,ye.z))})(this,(function(ye,T,
|
|
1
|
+
(function(ye,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-router-dom"),require("react-dom"),require("zod")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom","react-dom","zod"],T):(ye=typeof globalThis<"u"?globalThis:ye||self,T(ye.JsonPagesCore={},ye.React,ye.ReactRouterDOM,ye.ReactDOM,ye.z))})(this,(function(ye,T,Ze,pt,Re){"use strict";function gi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const _=gi(T),Mr=gi(pt),Ce={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 mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ac(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lr(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Gn={exports:{}};/*!
|
|
2
2
|
|
|
3
3
|
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
4
4
|
<http://stuartk.com/jszip>
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
JSZip uses the library pako released under the MIT license :
|
|
10
10
|
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
11
|
-
*/var
|
|
12
|
-
\0`,Z+=i(j,2),Z+=O.magic,Z+=i(k,2),Z+=i(S,2),Z+=i(Q.crc32,4),Z+=i(Q.compressedSize,4),Z+=i(Q.uncompressedSize,4),Z+=i(P.length,2),Z+=i($.length,2),{fileRecord:f.LOCAL_FILE_HEADER+Z+P+$,dirRecord:f.CENTRAL_FILE_HEADER+i(K,2)+Z+i(G.length,2)+"\0\0\0\0"+i(I,4)+i(b,4)+P+$+G}}var a=r("../utils"),l=r("../stream/GenericWorker"),c=r("../utf8"),d=r("../crc32"),f=r("../signature");function m(u,w,h,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=h,this.encodeFileName=b,this.streamFiles=u,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,l),m.prototype.push=function(u){var w=u.meta.percent||0,h=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(u):(this.bytesWritten+=u.data.length,l.prototype.push.call(this,{data:u.data,meta:{currentFile:this.currentFile,percent:h?(w+100*(h-b-1))/h:100}}))},m.prototype.openedSource=function(u){this.currentSourceOffset=this.bytesWritten,this.currentFile=u.file.name;var w=this.streamFiles&&!u.file.dir;if(w){var h=s(u,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:h.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(u){this.accumulate=!1;var w=this.streamFiles&&!u.file.dir,h=s(u,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),w)this.push({data:(function(b){return f.DATA_DESCRIPTOR+i(b.crc32,4)+i(b.compressedSize,4)+i(b.uncompressedSize,4)})(u),meta:{percent:100}});else for(this.push({data:h.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var u=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var h=this.bytesWritten-u,b=(function(v,x,k,S,C){var O=a.transformTo("string",C(S));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(v,2)+i(v,2)+i(x,4)+i(k,4)+i(O.length,2)+O})(this.dirRecords.length,h,u,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(u){this._sources.push(u);var w=this;return u.on("data",function(h){w.processChunk(h)}),u.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),u.on("error",function(h){w.error(h)}),this},m.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},m.prototype.error=function(u){var w=this._sources;if(!l.prototype.error.call(this,u))return!1;for(var h=0;h<w.length;h++)try{w[h].error(u)}catch{}return!0},m.prototype.lock=function(){l.prototype.lock.call(this);for(var u=this._sources,w=0;w<u.length;w++)u[w].lock()},n.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,o){var i=r("../compressions"),s=r("./ZipFileWorker");o.generateWorker=function(a,l,c){var d=new s(l.streamFiles,c,l.platform,l.encodeFileName),f=0;try{a.forEach(function(m,u){f++;var w=(function(x,k){var S=x||k,C=i[S];if(!C)throw new Error(S+" is not a valid compression method !");return C})(u.options.compression,l.compression),h=u.options.compressionOptions||l.compressionOptions||{},b=u.dir,v=u.date;u._compressWorker(w,h).withStreamInfo("file",{name:m,dir:b,date:v,comment:u.comment||"",unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,o){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var s=new i;for(var a in this)typeof this[a]!="function"&&(s[a]=this[a]);return s}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(s,a){return new i().loadAsync(s,a)},i.external=r("./external"),n.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,o){var i=r("./utils"),s=r("./external"),a=r("./utf8"),l=r("./zipEntries"),c=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function f(m){return new s.Promise(function(u,w){var h=m.decompressed.getContentWorker().pipe(new c);h.on("error",function(b){w(b)}).on("end",function(){h.streamInfo.crc32!==m.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):u()}).resume()})}n.exports=function(m,u){var w=this;return u=i.extend(u||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(m)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",m,!0,u.optimizedBinaryString,u.base64).then(function(h){var b=new l(u);return b.load(h),b}).then(function(h){var b=[s.Promise.resolve(h)],v=h.files;if(u.checkCRC32)for(var x=0;x<v.length;x++)b.push(f(v[x]));return s.Promise.all(b)}).then(function(h){for(var b=h.shift(),v=b.files,x=0;x<v.length;x++){var k=v[x],S=k.fileNameStr,C=i.resolve(k.fileNameStr);w.file(C,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:u.createFolders}),k.dir||(w.file(C).unsafeOriginalName=S)}return b.zipComment.length&&(w.comment=b.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,o){var i=r("../utils"),s=r("../stream/GenericWorker");function a(l,c){s.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}i.inherits(a,s),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(d){c.push({data:d,meta:{percent:0}})}).on("error",function(d){c.isPaused?this.generatedError=d:c.error(d)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,o){var i=r("readable-stream").Readable;function s(a,l,c){i.call(this,l),this._helper=a;var d=this;a.on("data",function(f,m){d.push(f)||d._helper.pause(),c&&c(m)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}r("../utils").inherits(s,i),s.prototype._read=function(){this._helper.resume()},n.exports=s},{"../utils":32,"readable-stream":16}],14:[function(r,n,o){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,s);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,s)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var s=new Buffer(i);return s.fill(0),s},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(r,n,o){function i(C,O,N){var P,D=a.getTypeOf(O),W=a.extend(N||{},d);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&&(C=v(C)),W.createFolders&&(P=b(C))&&x.call(this,P,!0);var G=D==="string"&&W.binary===!1&&W.base64===!1;N&&N.binary!==void 0||(W.binary=!G),(O instanceof f&&O.uncompressedSize===0||W.dir||!O||O.length===0)&&(W.base64=!1,W.binary=!0,O="",W.compression="STORE",D="string");var z=null;z=O instanceof f||O instanceof l?O:w.isNode&&w.isStream(O)?new h(C,O):a.prepareContent(C,O,W.binary,W.optimizedBinaryString,W.base64);var L=new m(C,z,W);this.files[C]=L}var s=r("./utf8"),a=r("./utils"),l=r("./stream/GenericWorker"),c=r("./stream/StreamHelper"),d=r("./defaults"),f=r("./compressedObject"),m=r("./zipObject"),u=r("./generate"),w=r("./nodejsUtils"),h=r("./nodejs/NodejsStreamInputAdapter"),b=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var O=C.lastIndexOf("/");return 0<O?C.substring(0,O):""},v=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},x=function(C,O){return O=O!==void 0?O:d.createFolders,C=v(C),this.files[C]||i.call(this,C,null,{dir:!0,createFolders:O}),this.files[C]};function k(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var O,N,P;for(O in this.files)P=this.files[O],(N=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&C(N,P)},filter:function(C){var O=[];return this.forEach(function(N,P){C(N,P)&&O.push(P)}),O},file:function(C,O,N){if(arguments.length!==1)return C=this.root+C,i.call(this,C,O,N),this;if(k(C)){var P=C;return this.filter(function(W,G){return!G.dir&&P.test(W)})}var D=this.files[this.root+C];return D&&!D.dir?D:null},folder:function(C){if(!C)return this;if(k(C))return this.filter(function(D,W){return W.dir&&C.test(D)});var O=this.root+C,N=x.call(this,O),P=this.clone();return P.root=N.name,P},remove:function(C){C=this.root+C;var O=this.files[C];if(O||(C.slice(-1)!=="/"&&(C+="/"),O=this.files[C]),O&&!O.dir)delete this.files[C];else for(var N=this.filter(function(D,W){return W.name.slice(0,C.length)===C}),P=0;P<N.length;P++)delete this.files[N[P].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var O,N={};try{if((N=a.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=N.type.toLowerCase(),N.compression=N.compression.toUpperCase(),N.type==="binarystring"&&(N.type="string"),!N.type)throw new Error("No output type specified.");a.checkSupport(N.type),N.platform!=="darwin"&&N.platform!=="freebsd"&&N.platform!=="linux"&&N.platform!=="sunos"||(N.platform="UNIX"),N.platform==="win32"&&(N.platform="DOS");var P=N.comment||this.comment||"";O=u.generateWorker(this,N,P)}catch(D){(O=new l("error")).error(D)}return new c(O,N.type||"string",N.mimeType)},generateAsync:function(C,O){return this.generateInternalStream(C).accumulate(O)},generateNodeStream:function(C,O){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(O)}};n.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,n,o){n.exports=r("stream")},{stream:void 0}],17:[function(r,n,o){var i=r("./DataReader");function s(a){i.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}r("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data[this.zero+a]},s.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===l&&this.data[m+1]===c&&this.data[m+2]===d&&this.data[m+3]===f)return m-this.zero;return-1},s.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.readData(4);return l===m[0]&&c===m[1]&&d===m[2]&&f===m[3]},s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./DataReader":18}],18:[function(r,n,o){var i=r("../utils");function s(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=s},{"../utils":32}],19:[function(r,n,o){var i=r("./Uint8ArrayReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,o){var i=r("./DataReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},s.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},s.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./DataReader":18}],21:[function(r,n,o){var i=r("./ArrayReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,o){var i=r("../utils"),s=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),c=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(f){var m=i.getTypeOf(f);return i.checkSupport(m),m!=="string"||s.uint8array?m==="nodebuffer"?new c(f):s.uint8array?new d(i.transformTo("uint8array",f)):new a(i.transformTo("array",f)):new l(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,o){var i=r("./GenericWorker"),s=r("../utils");function a(l){i.call(this,"ConvertWorker to "+l),this.destType=l}s.inherits(a,i),a.prototype.processChunk=function(l){this.push({data:s.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,o){var i=r("./GenericWorker"),s=r("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,i),a.prototype.processChunk=function(l){this.streamInfo.crc32=s(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,o){var i=r("../utils"),s=r("./GenericWorker");function a(l){s.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(a,s),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}s.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,o){var i=r("../utils"),s=r("./GenericWorker");function a(l){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){c.dataIsReady=!0,c.data=d,c.max=d&&d.length||0,c.type=i.getTypeOf(d),c.isPaused||c._tickAndRepeat()},function(d){c.error(d)})}i.inherits(a,s),a.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,o){function i(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,a){return this._listeners[s].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,a){if(this._listeners[s])for(var l=0;l<this._listeners[s].length;l++)this._listeners[s][l].call(this,a)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var a=this;return s.on("data",function(l){a.processChunk(l)}),s.on("end",function(){a.end()}),s.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,a){return this.extraStreamInfo[s]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},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 s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},n.exports=i},{}],29:[function(r,n,o){var i=r("../utils"),s=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),c=r("../support"),d=r("../external"),f=null;if(c.nodestream)try{f=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(w,h){return new d.Promise(function(b,v){var x=[],k=w._internalType,S=w._outputType,C=w._mimeType;w.on("data",function(O,N){x.push(O),h&&h(N)}).on("error",function(O){x=[],v(O)}).on("end",function(){try{var O=(function(N,P,D){switch(N){case"blob":return i.newBlob(i.transformTo("arraybuffer",P),D);case"base64":return l.encode(P);default:return i.transformTo(N,P)}})(S,(function(N,P){var D,W=0,G=null,z=0;for(D=0;D<P.length;D++)z+=P[D].length;switch(N){case"string":return P.join("");case"array":return Array.prototype.concat.apply([],P);case"uint8array":for(G=new Uint8Array(z),D=0;D<P.length;D++)G.set(P[D],W),W+=P[D].length;return G;case"nodebuffer":return Buffer.concat(P);default:throw new Error("concat : unsupported type '"+N+"'")}})(k,x),C);b(O)}catch(N){v(N)}x=[]}).resume()})}function u(w,h,b){var v=h;switch(h){case"blob":case"arraybuffer":v="uint8array";break;case"base64":v="string"}try{this._internalType=v,this._outputType=h,this._mimeType=b,i.checkSupport(v),this._worker=w.pipe(new s(v)),w.lock()}catch(x){this._worker=new a("error"),this._worker.error(x)}}u.prototype={accumulate:function(w){return m(this,w)},on:function(w,h){var b=this;return w==="data"?this._worker.on(w,function(v){h.call(b,v.data,v.meta)}):this._worker.on(w,function(){i.delay(h,arguments,b)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},w)}},n.exports=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,n,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var i=new ArrayBuffer(0);try{o.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(i),o.blob=s.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!r("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,o){for(var i=r("./utils"),s=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),c=new Array(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;c[254]=c[254]=1;function f(){l.call(this,"utf-8 decode"),this.leftOver=null}function m(){l.call(this,"utf-8 encode")}o.utf8encode=function(u){return s.nodebuffer?a.newBufferFrom(u,"utf-8"):(function(w){var h,b,v,x,k,S=w.length,C=0;for(x=0;x<S;x++)(64512&(b=w.charCodeAt(x)))==55296&&x+1<S&&(64512&(v=w.charCodeAt(x+1)))==56320&&(b=65536+(b-55296<<10)+(v-56320),x++),C+=b<128?1:b<2048?2:b<65536?3:4;for(h=s.uint8array?new Uint8Array(C):new Array(C),x=k=0;k<C;x++)(64512&(b=w.charCodeAt(x)))==55296&&x+1<S&&(64512&(v=w.charCodeAt(x+1)))==56320&&(b=65536+(b-55296<<10)+(v-56320),x++),b<128?h[k++]=b:(b<2048?h[k++]=192|b>>>6:(b<65536?h[k++]=224|b>>>12:(h[k++]=240|b>>>18,h[k++]=128|b>>>12&63),h[k++]=128|b>>>6&63),h[k++]=128|63&b);return h})(u)},o.utf8decode=function(u){return s.nodebuffer?i.transformTo("nodebuffer",u).toString("utf-8"):(function(w){var h,b,v,x,k=w.length,S=new Array(2*k);for(h=b=0;h<k;)if((v=w[h++])<128)S[b++]=v;else if(4<(x=c[v]))S[b++]=65533,h+=x-1;else{for(v&=x===2?31:x===3?15:7;1<x&&h<k;)v=v<<6|63&w[h++],x--;1<x?S[b++]=65533:v<65536?S[b++]=v:(v-=65536,S[b++]=55296|v>>10&1023,S[b++]=56320|1023&v)}return S.length!==b&&(S.subarray?S=S.subarray(0,b):S.length=b),i.applyFromCharCode(S)})(u=i.transformTo(s.uint8array?"uint8array":"array",u))},i.inherits(f,l),f.prototype.processChunk=function(u){var w=i.transformTo(s.uint8array?"uint8array":"array",u.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var h=w;(w=new Uint8Array(h.length+this.leftOver.length)).set(this.leftOver,0),w.set(h,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var b=(function(x,k){var S;for((k=k||x.length)>x.length&&(k=x.length),S=k-1;0<=S&&(192&x[S])==128;)S--;return S<0||S===0?k:S+c[x[S]]>k?S:k})(w),v=w;b!==w.length&&(s.uint8array?(v=w.subarray(0,b),this.leftOver=w.subarray(b,w.length)):(v=w.slice(0,b),this.leftOver=w.slice(b,w.length))),this.push({data:o.utf8decode(v),meta:u.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=f,i.inherits(m,l),m.prototype.processChunk=function(u){this.push({data:o.utf8encode(u.data),meta:u.meta})},o.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,o){var i=r("./support"),s=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function c(h){return h}function d(h,b){for(var v=0;v<h.length;++v)b[v]=255&h.charCodeAt(v);return b}r("setimmediate"),o.newBlob=function(h,b){o.checkSupport("blob");try{return new Blob([h],{type:b})}catch{try{var v=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return v.append(h),v.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(h,b,v){var x=[],k=0,S=h.length;if(S<=v)return String.fromCharCode.apply(null,h);for(;k<S;)b==="array"||b==="nodebuffer"?x.push(String.fromCharCode.apply(null,h.slice(k,Math.min(k+v,S)))):x.push(String.fromCharCode.apply(null,h.subarray(k,Math.min(k+v,S)))),k+=v;return x.join("")},stringifyByChar:function(h){for(var b="",v=0;v<h.length;v++)b+=String.fromCharCode(h[v]);return b},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function m(h){var b=65536,v=o.getTypeOf(h),x=!0;if(v==="uint8array"?x=f.applyCanBeUsed.uint8array:v==="nodebuffer"&&(x=f.applyCanBeUsed.nodebuffer),x)for(;1<b;)try{return f.stringifyByChunk(h,v,b)}catch{b=Math.floor(b/2)}return f.stringifyByChar(h)}function u(h,b){for(var v=0;v<h.length;v++)b[v]=h[v];return b}o.applyFromCharCode=m;var w={};w.string={string:c,array:function(h){return d(h,new Array(h.length))},arraybuffer:function(h){return w.string.uint8array(h).buffer},uint8array:function(h){return d(h,new Uint8Array(h.length))},nodebuffer:function(h){return d(h,a.allocBuffer(h.length))}},w.array={string:m,array:c,arraybuffer:function(h){return new Uint8Array(h).buffer},uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(h)}},w.arraybuffer={string:function(h){return m(new Uint8Array(h))},array:function(h){return u(new Uint8Array(h),new Array(h.byteLength))},arraybuffer:c,uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(new Uint8Array(h))}},w.uint8array={string:m,array:function(h){return u(h,new Array(h.length))},arraybuffer:function(h){return h.buffer},uint8array:c,nodebuffer:function(h){return a.newBufferFrom(h)}},w.nodebuffer={string:m,array:function(h){return u(h,new Array(h.length))},arraybuffer:function(h){return w.nodebuffer.uint8array(h).buffer},uint8array:function(h){return u(h,new Uint8Array(h.length))},nodebuffer:c},o.transformTo=function(h,b){if(b=b||"",!h)return b;o.checkSupport(h);var v=o.getTypeOf(b);return w[v][h](b)},o.resolve=function(h){for(var b=h.split("/"),v=[],x=0;x<b.length;x++){var k=b[x];k==="."||k===""&&x!==0&&x!==b.length-1||(k===".."?v.pop():v.push(k))}return v.join("/")},o.getTypeOf=function(h){return typeof h=="string"?"string":Object.prototype.toString.call(h)==="[object Array]"?"array":i.nodebuffer&&a.isBuffer(h)?"nodebuffer":i.uint8array&&h instanceof Uint8Array?"uint8array":i.arraybuffer&&h instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(h){if(!i[h.toLowerCase()])throw new Error(h+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(h){var b,v,x="";for(v=0;v<(h||"").length;v++)x+="\\x"+((b=h.charCodeAt(v))<16?"0":"")+b.toString(16).toUpperCase();return x},o.delay=function(h,b,v){setImmediate(function(){h.apply(v||null,b||[])})},o.inherits=function(h,b){function v(){}v.prototype=b.prototype,h.prototype=new v},o.extend=function(){var h,b,v={};for(h=0;h<arguments.length;h++)for(b in arguments[h])Object.prototype.hasOwnProperty.call(arguments[h],b)&&v[b]===void 0&&(v[b]=arguments[h][b]);return v},o.prepareContent=function(h,b,v,x,k){return l.Promise.resolve(b).then(function(S){return i.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new l.Promise(function(C,O){var N=new FileReader;N.onload=function(P){C(P.target.result)},N.onerror=function(P){O(P.target.error)},N.readAsArrayBuffer(S)}):S}).then(function(S){var C=o.getTypeOf(S);return C?(C==="arraybuffer"?S=o.transformTo("uint8array",S):C==="string"&&(k?S=s.decode(S):v&&x!==!0&&(S=(function(O){return d(O,i.uint8array?new Uint8Array(O.length):new Array(O.length))})(S))),S):l.Promise.reject(new Error("Can't read the data of '"+h+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,n,o){var i=r("./reader/readerFor"),s=r("./utils"),a=r("./signature"),l=r("./zipEntry"),c=r("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(m)+", expected "+s.pretty(f)+")")}},isSignature:function(f,m){var u=this.reader.index;this.reader.setIndex(f);var w=this.reader.readString(4)===m;return this.reader.setIndex(u),w},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 f=this.reader.readData(this.zipCommentLength),m=c.uint8array?"uint8array":"array",u=s.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(u)},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 f,m,u,w=this.zip64EndOfCentralSize-44;0<w;)f=this.reader.readInt(2),m=this.reader.readInt(4),u=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:u}},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 f,m;for(f=0;f<this.files.length;f++)m=this.files[f],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);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 f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.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(f);var m=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.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(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var u=this.centralDirOffset+this.centralDirSize;this.zip64&&(u+=20,u+=12+this.zip64EndOfCentralSize);var w=m-u;if(0<w)this.isSignature(m,a.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(f){this.reader=i(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,n,o){var i=r("./reader/readerFor"),s=r("./utils"),a=r("./compressedObject"),l=r("./crc32"),c=r("./utf8"),d=r("./compressions"),f=r("./support");function m(u,w){this.options=u,this.loadOptions=w}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(u){var w,h;if(u.skip(22),this.fileNameLength=u.readInt(2),h=u.readInt(2),this.fileName=u.readData(this.fileNameLength),u.skip(h),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((w=(function(b){for(var v in d)if(Object.prototype.hasOwnProperty.call(d,v)&&d[v].magic===b)return d[v];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,w,u.readData(this.compressedSize))},readCentralPart:function(u){this.versionMadeBy=u.readInt(2),u.skip(2),this.bitFlag=u.readInt(2),this.compressionMethod=u.readString(2),this.date=u.readDate(),this.crc32=u.readInt(4),this.compressedSize=u.readInt(4),this.uncompressedSize=u.readInt(4);var w=u.readInt(2);if(this.extraFieldsLength=u.readInt(2),this.fileCommentLength=u.readInt(2),this.diskNumberStart=u.readInt(2),this.internalFileAttributes=u.readInt(2),this.externalFileAttributes=u.readInt(4),this.localHeaderOffset=u.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");u.skip(w),this.readExtraFields(u),this.parseZIP64ExtraField(u),this.fileComment=u.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var u=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),u==0&&(this.dosPermissions=63&this.externalFileAttributes),u==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var u=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=u.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=u.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=u.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=u.readInt(4))}},readExtraFields:function(u){var w,h,b,v=u.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});u.index+4<v;)w=u.readInt(2),h=u.readInt(2),b=u.readData(h),this.extraFields[w]={id:w,length:h,value:b};u.setIndex(v)},handleUTF8:function(){var u=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var h=s.transformTo(u,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(h)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var v=s.transformTo(u,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(v)}}},findExtraFieldUnicodePath:function(){var u=this.extraFields[28789];if(u){var w=i(u.value);return w.readInt(1)!==1||l(this.fileName)!==w.readInt(4)?null:c.utf8decode(w.readData(u.length-5))}return null},findExtraFieldUnicodeComment:function(){var u=this.extraFields[25461];if(u){var w=i(u.value);return w.readInt(1)!==1||l(this.fileComment)!==w.readInt(4)?null:c.utf8decode(w.readData(u.length-5))}return null}},n.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,o){function i(w,h,b){this.name=w,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=h,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var s=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),l=r("./utf8"),c=r("./compressedObject"),d=r("./stream/GenericWorker");i.prototype={internalStream:function(w){var h=null,b="string";try{if(!w)throw new Error("No output type specified.");var v=(b=w.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),h=this._decompressWorker();var x=!this._dataBinary;x&&!v&&(h=h.pipe(new l.Utf8EncodeWorker)),!x&&v&&(h=h.pipe(new l.Utf8DecodeWorker))}catch(k){(h=new d("error")).error(k)}return new s(h,b,"")},async:function(w,h){return this.internalStream(w).accumulate(h)},nodeStream:function(w,h){return this.internalStream(w||"nodebuffer").toNodejsStream(h)},_compressWorker:function(w,h){if(this._data instanceof c&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(b,w,h)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<f.length;u++)i.prototype[f[u]]=m;n.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,o){(function(i){var s,a,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var c=0,d=new l(w),f=i.document.createTextNode("");d.observe(f,{characterData:!0}),s=function(){f.data=c=++c%2}}else if(i.setImmediate||i.MessageChannel===void 0)s="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var h=i.document.createElement("script");h.onreadystatechange=function(){w(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},i.document.documentElement.appendChild(h)}:function(){setTimeout(w,0)};else{var m=new i.MessageChannel;m.port1.onmessage=w,s=function(){m.port2.postMessage(0)}}var u=[];function w(){var h,b;a=!0;for(var v=u.length;v;){for(b=u,u=[],h=-1;++h<v;)b[h]();v=u.length}a=!1}n.exports=function(h){u.push(h)!==1||a||s()}}).call(this,typeof pt<"u"?pt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,o){var i=r("immediate");function s(){}var a={},l=["REJECTED"],c=["FULFILLED"],d=["PENDING"];function f(v){if(typeof v!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,v!==s&&h(this,v)}function m(v,x,k){this.promise=v,typeof x=="function"&&(this.onFulfilled=x,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function u(v,x,k){i(function(){var S;try{S=x(k)}catch(C){return a.reject(v,C)}S===v?a.reject(v,new TypeError("Cannot resolve promise with itself")):a.resolve(v,S)})}function w(v){var x=v&&v.then;if(v&&(typeof v=="object"||typeof v=="function")&&typeof x=="function")return function(){x.apply(v,arguments)}}function h(v,x){var k=!1;function S(N){k||(k=!0,a.reject(v,N))}function C(N){k||(k=!0,a.resolve(v,N))}var O=b(function(){x(C,S)});O.status==="error"&&S(O.value)}function b(v,x){var k={};try{k.value=v(x),k.status="success"}catch(S){k.status="error",k.value=S}return k}(n.exports=f).prototype.finally=function(v){if(typeof v!="function")return this;var x=this.constructor;return this.then(function(k){return x.resolve(v()).then(function(){return k})},function(k){return x.resolve(v()).then(function(){throw k})})},f.prototype.catch=function(v){return this.then(null,v)},f.prototype.then=function(v,x){if(typeof v!="function"&&this.state===c||typeof x!="function"&&this.state===l)return this;var k=new this.constructor(s);return this.state!==d?u(k,this.state===c?v:x,this.outcome):this.queue.push(new m(k,v,x)),k},m.prototype.callFulfilled=function(v){a.resolve(this.promise,v)},m.prototype.otherCallFulfilled=function(v){u(this.promise,this.onFulfilled,v)},m.prototype.callRejected=function(v){a.reject(this.promise,v)},m.prototype.otherCallRejected=function(v){u(this.promise,this.onRejected,v)},a.resolve=function(v,x){var k=b(w,x);if(k.status==="error")return a.reject(v,k.value);var S=k.value;if(S)h(v,S);else{v.state=c,v.outcome=x;for(var C=-1,O=v.queue.length;++C<O;)v.queue[C].callFulfilled(x)}return v},a.reject=function(v,x){v.state=l,v.outcome=x;for(var k=-1,S=v.queue.length;++k<S;)v.queue[k].callRejected(x);return v},f.resolve=function(v){return v instanceof this?v:a.resolve(new this(s),v)},f.reject=function(v){var x=new this(s);return a.reject(x,v)},f.all=function(v){var x=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=v.length,S=!1;if(!k)return this.resolve([]);for(var C=new Array(k),O=0,N=-1,P=new this(s);++N<k;)D(v[N],N);return P;function D(W,G){x.resolve(W).then(function(z){C[G]=z,++O!==k||S||(S=!0,a.resolve(P,C))},function(z){S||(S=!0,a.reject(P,z))})}},f.race=function(v){var x=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=v.length,S=!1;if(!k)return this.resolve([]);for(var C=-1,O=new this(s);++C<k;)N=v[C],x.resolve(N).then(function(P){S||(S=!0,a.resolve(O,P))},function(P){S||(S=!0,a.reject(O,P))});var N;return O}},{immediate:36}],38:[function(r,n,o){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,o){var i=r("./zlib/deflate"),s=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/messages"),c=r("./zlib/zstream"),d=Object.prototype.toString,f=0,m=-1,u=0,w=8;function h(v){if(!(this instanceof h))return new h(v);this.options=s.assign({level:m,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},v||{});var x=this.options;x.raw&&0<x.windowBits?x.windowBits=-x.windowBits:x.gzip&&0<x.windowBits&&x.windowBits<16&&(x.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var k=i.deflateInit2(this.strm,x.level,x.method,x.windowBits,x.memLevel,x.strategy);if(k!==f)throw new Error(l[k]);if(x.header&&i.deflateSetHeader(this.strm,x.header),x.dictionary){var S;if(S=typeof x.dictionary=="string"?a.string2buf(x.dictionary):d.call(x.dictionary)==="[object ArrayBuffer]"?new Uint8Array(x.dictionary):x.dictionary,(k=i.deflateSetDictionary(this.strm,S))!==f)throw new Error(l[k]);this._dict_set=!0}}function b(v,x){var k=new h(x);if(k.push(v,!0),k.err)throw k.msg||l[k.err];return k.result}h.prototype.push=function(v,x){var k,S,C=this.strm,O=this.options.chunkSize;if(this.ended)return!1;S=x===~~x?x:x===!0?4:0,typeof v=="string"?C.input=a.string2buf(v):d.call(v)==="[object ArrayBuffer]"?C.input=new Uint8Array(v):C.input=v,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new s.Buf8(O),C.next_out=0,C.avail_out=O),(k=i.deflate(C,S))!==1&&k!==f)return this.onEnd(k),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(s.shrinkBuf(C.output,C.next_out))):this.onData(s.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&k!==1);return S===4?(k=i.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===f):S!==2||(this.onEnd(f),!(C.avail_out=0))},h.prototype.onData=function(v){this.chunks.push(v)},h.prototype.onEnd=function(v){v===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=v,this.msg=this.strm.msg},o.Deflate=h,o.deflate=b,o.deflateRaw=function(v,x){return(x=x||{}).raw=!0,b(v,x)},o.gzip=function(v,x){return(x=x||{}).gzip=!0,b(v,x)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,o){var i=r("./zlib/inflate"),s=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/constants"),c=r("./zlib/messages"),d=r("./zlib/zstream"),f=r("./zlib/gzheader"),m=Object.prototype.toString;function u(h){if(!(this instanceof u))return new u(h);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},h||{});var b=this.options;b.raw&&0<=b.windowBits&&b.windowBits<16&&(b.windowBits=-b.windowBits,b.windowBits===0&&(b.windowBits=-15)),!(0<=b.windowBits&&b.windowBits<16)||h&&h.windowBits||(b.windowBits+=32),15<b.windowBits&&b.windowBits<48&&(15&b.windowBits)==0&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var v=i.inflateInit2(this.strm,b.windowBits);if(v!==l.Z_OK)throw new Error(c[v]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function w(h,b){var v=new u(b);if(v.push(h,!0),v.err)throw v.msg||c[v.err];return v.result}u.prototype.push=function(h,b){var v,x,k,S,C,O,N=this.strm,P=this.options.chunkSize,D=this.options.dictionary,W=!1;if(this.ended)return!1;x=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof h=="string"?N.input=a.binstring2buf(h):m.call(h)==="[object ArrayBuffer]"?N.input=new Uint8Array(h):N.input=h,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new s.Buf8(P),N.next_out=0,N.avail_out=P),(v=i.inflate(N,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&D&&(O=typeof D=="string"?a.string2buf(D):m.call(D)==="[object ArrayBuffer]"?new Uint8Array(D):D,v=i.inflateSetDictionary(this.strm,O)),v===l.Z_BUF_ERROR&&W===!0&&(v=l.Z_OK,W=!1),v!==l.Z_STREAM_END&&v!==l.Z_OK)return this.onEnd(v),!(this.ended=!0);N.next_out&&(N.avail_out!==0&&v!==l.Z_STREAM_END&&(N.avail_in!==0||x!==l.Z_FINISH&&x!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=a.utf8border(N.output,N.next_out),S=N.next_out-k,C=a.buf2string(N.output,k),N.next_out=S,N.avail_out=P-S,S&&s.arraySet(N.output,N.output,k,S,0),this.onData(C)):this.onData(s.shrinkBuf(N.output,N.next_out)))),N.avail_in===0&&N.avail_out===0&&(W=!0)}while((0<N.avail_in||N.avail_out===0)&&v!==l.Z_STREAM_END);return v===l.Z_STREAM_END&&(x=l.Z_FINISH),x===l.Z_FINISH?(v=i.inflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===l.Z_OK):x!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(N.avail_out=0))},u.prototype.onData=function(h){this.chunks.push(h)},u.prototype.onEnd=function(h){h===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=h,this.msg=this.strm.msg},o.Inflate=u,o.inflate=w,o.inflateRaw=function(h,b){return(b=b||{}).raw=!0,w(h,b)},o.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,n,o){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";o.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(l[f]=d[f])}}return l},o.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var s={arraySet:function(l,c,d,f,m){if(c.subarray&&l.subarray)l.set(c.subarray(d,d+f),m);else for(var u=0;u<f;u++)l[m+u]=c[d+u]},flattenChunks:function(l){var c,d,f,m,u,w;for(c=f=0,d=l.length;c<d;c++)f+=l[c].length;for(w=new Uint8Array(f),c=m=0,d=l.length;c<d;c++)u=l[c],w.set(u,m),m+=u.length;return w}},a={arraySet:function(l,c,d,f,m){for(var u=0;u<f;u++)l[m+u]=c[d+u]},flattenChunks:function(l){return[].concat.apply([],l)}};o.setTyped=function(l){l?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,s)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,a))},o.setTyped(i)},{}],42:[function(r,n,o){var i=r("./common"),s=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new i.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function d(f,m){if(m<65537&&(f.subarray&&a||!f.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(f,m));for(var u="",w=0;w<m;w++)u+=String.fromCharCode(f[w]);return u}l[254]=l[254]=1,o.string2buf=function(f){var m,u,w,h,b,v=f.length,x=0;for(h=0;h<v;h++)(64512&(u=f.charCodeAt(h)))==55296&&h+1<v&&(64512&(w=f.charCodeAt(h+1)))==56320&&(u=65536+(u-55296<<10)+(w-56320),h++),x+=u<128?1:u<2048?2:u<65536?3:4;for(m=new i.Buf8(x),h=b=0;b<x;h++)(64512&(u=f.charCodeAt(h)))==55296&&h+1<v&&(64512&(w=f.charCodeAt(h+1)))==56320&&(u=65536+(u-55296<<10)+(w-56320),h++),u<128?m[b++]=u:(u<2048?m[b++]=192|u>>>6:(u<65536?m[b++]=224|u>>>12:(m[b++]=240|u>>>18,m[b++]=128|u>>>12&63),m[b++]=128|u>>>6&63),m[b++]=128|63&u);return m},o.buf2binstring=function(f){return d(f,f.length)},o.binstring2buf=function(f){for(var m=new i.Buf8(f.length),u=0,w=m.length;u<w;u++)m[u]=f.charCodeAt(u);return m},o.buf2string=function(f,m){var u,w,h,b,v=m||f.length,x=new Array(2*v);for(u=w=0;u<v;)if((h=f[u++])<128)x[w++]=h;else if(4<(b=l[h]))x[w++]=65533,u+=b-1;else{for(h&=b===2?31:b===3?15:7;1<b&&u<v;)h=h<<6|63&f[u++],b--;1<b?x[w++]=65533:h<65536?x[w++]=h:(h-=65536,x[w++]=55296|h>>10&1023,x[w++]=56320|1023&h)}return d(x,w)},o.utf8border=function(f,m){var u;for((m=m||f.length)>f.length&&(m=f.length),u=m-1;0<=u&&(192&f[u])==128;)u--;return u<0||u===0?m:u+l[f[u]]>m?u:m}},{"./common":41}],43:[function(r,n,o){n.exports=function(i,s,a,l){for(var c=65535&i|0,d=i>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(c=c+s[l++]|0)|0,--f;);c%=65521,d%=65521}return c|d<<16|0}},{}],44:[function(r,n,o){n.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,n,o){var i=(function(){for(var s,a=[],l=0;l<256;l++){s=l;for(var c=0;c<8;c++)s=1&s?3988292384^s>>>1:s>>>1;a[l]=s}return a})();n.exports=function(s,a,l,c){var d=i,f=c+l;s^=-1;for(var m=c;m<f;m++)s=s>>>8^d[255&(s^a[m])];return-1^s}},{}],46:[function(r,n,o){var i,s=r("../utils/common"),a=r("./trees"),l=r("./adler32"),c=r("./crc32"),d=r("./messages"),f=0,m=4,u=0,w=-2,h=-1,b=4,v=2,x=8,k=9,S=286,C=30,O=19,N=2*S+1,P=15,D=3,W=258,G=W+D+1,z=42,L=113,y=1,$=2,X=3,H=4;function V(g,F){return g.msg=d[F],F}function Y(g){return(g<<1)-(4<g?9:0)}function Q(g){for(var F=g.length;0<=--F;)g[F]=0}function j(g){var F=g.state,U=F.pending;U>g.avail_out&&(U=g.avail_out),U!==0&&(s.arraySet(g.output,F.pending_buf,F.pending_out,U,g.next_out),g.next_out+=U,F.pending_out+=U,g.total_out+=U,g.avail_out-=U,F.pending-=U,F.pending===0&&(F.pending_out=0))}function I(g,F){a._tr_flush_block(g,0<=g.block_start?g.block_start:-1,g.strstart-g.block_start,F),g.block_start=g.strstart,j(g.strm)}function K(g,F){g.pending_buf[g.pending++]=F}function Z(g,F){g.pending_buf[g.pending++]=F>>>8&255,g.pending_buf[g.pending++]=255&F}function te(g,F){var U,E,A=g.max_chain_length,R=g.strstart,q=g.prev_length,B=g.nice_match,M=g.strstart>g.w_size-G?g.strstart-(g.w_size-G):0,J=g.window,ne=g.w_mask,re=g.prev,ae=g.strstart+W,he=J[R+q-1],me=J[R+q];g.prev_length>=g.good_match&&(A>>=2),B>g.lookahead&&(B=g.lookahead);do if(J[(U=F)+q]===me&&J[U+q-1]===he&&J[U]===J[R]&&J[++U]===J[R+1]){R+=2,U++;do;while(J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&J[++R]===J[++U]&&R<ae);if(E=W-(ae-R),R=ae-W,q<E){if(g.match_start=F,B<=(q=E))break;he=J[R+q-1],me=J[R+q]}}while((F=re[F&ne])>M&&--A!=0);return q<=g.lookahead?q:g.lookahead}function ue(g){var F,U,E,A,R,q,B,M,J,ne,re=g.w_size;do{if(A=g.window_size-g.lookahead-g.strstart,g.strstart>=re+(re-G)){for(s.arraySet(g.window,g.window,re,re,0),g.match_start-=re,g.strstart-=re,g.block_start-=re,F=U=g.hash_size;E=g.head[--F],g.head[F]=re<=E?E-re:0,--U;);for(F=U=re;E=g.prev[--F],g.prev[F]=re<=E?E-re:0,--U;);A+=re}if(g.strm.avail_in===0)break;if(q=g.strm,B=g.window,M=g.strstart+g.lookahead,J=A,ne=void 0,ne=q.avail_in,J<ne&&(ne=J),U=ne===0?0:(q.avail_in-=ne,s.arraySet(B,q.input,q.next_in,ne,M),q.state.wrap===1?q.adler=l(q.adler,B,ne,M):q.state.wrap===2&&(q.adler=c(q.adler,B,ne,M)),q.next_in+=ne,q.total_in+=ne,ne),g.lookahead+=U,g.lookahead+g.insert>=D)for(R=g.strstart-g.insert,g.ins_h=g.window[R],g.ins_h=(g.ins_h<<g.hash_shift^g.window[R+1])&g.hash_mask;g.insert&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[R+D-1])&g.hash_mask,g.prev[R&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=R,R++,g.insert--,!(g.lookahead+g.insert<D)););}while(g.lookahead<G&&g.strm.avail_in!==0)}function ee(g,F){for(var U,E;;){if(g.lookahead<G){if(ue(g),g.lookahead<G&&F===f)return y;if(g.lookahead===0)break}if(U=0,g.lookahead>=D&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,U=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),U!==0&&g.strstart-U<=g.w_size-G&&(g.match_length=te(g,U)),g.match_length>=D)if(E=a._tr_tally(g,g.strstart-g.match_start,g.match_length-D),g.lookahead-=g.match_length,g.match_length<=g.max_lazy_match&&g.lookahead>=D){for(g.match_length--;g.strstart++,g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,U=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart,--g.match_length!=0;);g.strstart++}else g.strstart+=g.match_length,g.match_length=0,g.ins_h=g.window[g.strstart],g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+1])&g.hash_mask;else E=a._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++;if(E&&(I(g,!1),g.strm.avail_out===0))return y}return g.insert=g.strstart<D-1?g.strstart:D-1,F===m?(I(g,!0),g.strm.avail_out===0?X:H):g.last_lit&&(I(g,!1),g.strm.avail_out===0)?y:$}function ie(g,F){for(var U,E,A;;){if(g.lookahead<G){if(ue(g),g.lookahead<G&&F===f)return y;if(g.lookahead===0)break}if(U=0,g.lookahead>=D&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,U=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),g.prev_length=g.match_length,g.prev_match=g.match_start,g.match_length=D-1,U!==0&&g.prev_length<g.max_lazy_match&&g.strstart-U<=g.w_size-G&&(g.match_length=te(g,U),g.match_length<=5&&(g.strategy===1||g.match_length===D&&4096<g.strstart-g.match_start)&&(g.match_length=D-1)),g.prev_length>=D&&g.match_length<=g.prev_length){for(A=g.strstart+g.lookahead-D,E=a._tr_tally(g,g.strstart-1-g.prev_match,g.prev_length-D),g.lookahead-=g.prev_length-1,g.prev_length-=2;++g.strstart<=A&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,U=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),--g.prev_length!=0;);if(g.match_available=0,g.match_length=D-1,g.strstart++,E&&(I(g,!1),g.strm.avail_out===0))return y}else if(g.match_available){if((E=a._tr_tally(g,0,g.window[g.strstart-1]))&&I(g,!1),g.strstart++,g.lookahead--,g.strm.avail_out===0)return y}else g.match_available=1,g.strstart++,g.lookahead--}return g.match_available&&(E=a._tr_tally(g,0,g.window[g.strstart-1]),g.match_available=0),g.insert=g.strstart<D-1?g.strstart:D-1,F===m?(I(g,!0),g.strm.avail_out===0?X:H):g.last_lit&&(I(g,!1),g.strm.avail_out===0)?y:$}function se(g,F,U,E,A){this.good_length=g,this.max_lazy=F,this.nice_length=U,this.max_chain=E,this.func=A}function oe(){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=x,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 s.Buf16(2*N),this.dyn_dtree=new s.Buf16(2*(2*C+1)),this.bl_tree=new s.Buf16(2*(2*O+1)),Q(this.dyn_ltree),Q(this.dyn_dtree),Q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16(P+1),this.heap=new s.Buf16(2*S+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*S+1),Q(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 le(g){var F;return g&&g.state?(g.total_in=g.total_out=0,g.data_type=v,(F=g.state).pending=0,F.pending_out=0,F.wrap<0&&(F.wrap=-F.wrap),F.status=F.wrap?z:L,g.adler=F.wrap===2?0:1,F.last_flush=f,a._tr_init(F),u):V(g,w)}function fe(g){var F=le(g);return F===u&&(function(U){U.window_size=2*U.w_size,Q(U.head),U.max_lazy_match=i[U.level].max_lazy,U.good_match=i[U.level].good_length,U.nice_match=i[U.level].nice_length,U.max_chain_length=i[U.level].max_chain,U.strstart=0,U.block_start=0,U.lookahead=0,U.insert=0,U.match_length=U.prev_length=D-1,U.match_available=0,U.ins_h=0})(g.state),F}function we(g,F,U,E,A,R){if(!g)return w;var q=1;if(F===h&&(F=6),E<0?(q=0,E=-E):15<E&&(q=2,E-=16),A<1||k<A||U!==x||E<8||15<E||F<0||9<F||R<0||b<R)return V(g,w);E===8&&(E=9);var B=new oe;return(g.state=B).strm=g,B.wrap=q,B.gzhead=null,B.w_bits=E,B.w_size=1<<B.w_bits,B.w_mask=B.w_size-1,B.hash_bits=A+7,B.hash_size=1<<B.hash_bits,B.hash_mask=B.hash_size-1,B.hash_shift=~~((B.hash_bits+D-1)/D),B.window=new s.Buf8(2*B.w_size),B.head=new s.Buf16(B.hash_size),B.prev=new s.Buf16(B.w_size),B.lit_bufsize=1<<A+6,B.pending_buf_size=4*B.lit_bufsize,B.pending_buf=new s.Buf8(B.pending_buf_size),B.d_buf=1*B.lit_bufsize,B.l_buf=3*B.lit_bufsize,B.level=F,B.strategy=R,B.method=U,fe(g)}i=[new se(0,0,0,0,function(g,F){var U=65535;for(U>g.pending_buf_size-5&&(U=g.pending_buf_size-5);;){if(g.lookahead<=1){if(ue(g),g.lookahead===0&&F===f)return y;if(g.lookahead===0)break}g.strstart+=g.lookahead,g.lookahead=0;var E=g.block_start+U;if((g.strstart===0||g.strstart>=E)&&(g.lookahead=g.strstart-E,g.strstart=E,I(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-G&&(I(g,!1),g.strm.avail_out===0))return y}return g.insert=0,F===m?(I(g,!0),g.strm.avail_out===0?X:H):(g.strstart>g.block_start&&(I(g,!1),g.strm.avail_out),y)}),new se(4,4,8,4,ee),new se(4,5,16,8,ee),new se(4,6,32,32,ee),new se(4,4,16,16,ie),new se(8,16,32,32,ie),new se(8,16,128,128,ie),new se(8,32,128,256,ie),new se(32,128,258,1024,ie),new se(32,258,258,4096,ie)],o.deflateInit=function(g,F){return we(g,F,x,15,8,0)},o.deflateInit2=we,o.deflateReset=fe,o.deflateResetKeep=le,o.deflateSetHeader=function(g,F){return g&&g.state?g.state.wrap!==2?w:(g.state.gzhead=F,u):w},o.deflate=function(g,F){var U,E,A,R;if(!g||!g.state||5<F||F<0)return g?V(g,w):w;if(E=g.state,!g.output||!g.input&&g.avail_in!==0||E.status===666&&F!==m)return V(g,g.avail_out===0?-5:w);if(E.strm=g,U=E.last_flush,E.last_flush=F,E.status===z)if(E.wrap===2)g.adler=0,K(E,31),K(E,139),K(E,8),E.gzhead?(K(E,(E.gzhead.text?1:0)+(E.gzhead.hcrc?2:0)+(E.gzhead.extra?4:0)+(E.gzhead.name?8:0)+(E.gzhead.comment?16:0)),K(E,255&E.gzhead.time),K(E,E.gzhead.time>>8&255),K(E,E.gzhead.time>>16&255),K(E,E.gzhead.time>>24&255),K(E,E.level===9?2:2<=E.strategy||E.level<2?4:0),K(E,255&E.gzhead.os),E.gzhead.extra&&E.gzhead.extra.length&&(K(E,255&E.gzhead.extra.length),K(E,E.gzhead.extra.length>>8&255)),E.gzhead.hcrc&&(g.adler=c(g.adler,E.pending_buf,E.pending,0)),E.gzindex=0,E.status=69):(K(E,0),K(E,0),K(E,0),K(E,0),K(E,0),K(E,E.level===9?2:2<=E.strategy||E.level<2?4:0),K(E,3),E.status=L);else{var q=x+(E.w_bits-8<<4)<<8;q|=(2<=E.strategy||E.level<2?0:E.level<6?1:E.level===6?2:3)<<6,E.strstart!==0&&(q|=32),q+=31-q%31,E.status=L,Z(E,q),E.strstart!==0&&(Z(E,g.adler>>>16),Z(E,65535&g.adler)),g.adler=1}if(E.status===69)if(E.gzhead.extra){for(A=E.pending;E.gzindex<(65535&E.gzhead.extra.length)&&(E.pending!==E.pending_buf_size||(E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),j(g),A=E.pending,E.pending!==E.pending_buf_size));)K(E,255&E.gzhead.extra[E.gzindex]),E.gzindex++;E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),E.gzindex===E.gzhead.extra.length&&(E.gzindex=0,E.status=73)}else E.status=73;if(E.status===73)if(E.gzhead.name){A=E.pending;do{if(E.pending===E.pending_buf_size&&(E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),j(g),A=E.pending,E.pending===E.pending_buf_size)){R=1;break}R=E.gzindex<E.gzhead.name.length?255&E.gzhead.name.charCodeAt(E.gzindex++):0,K(E,R)}while(R!==0);E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),R===0&&(E.gzindex=0,E.status=91)}else E.status=91;if(E.status===91)if(E.gzhead.comment){A=E.pending;do{if(E.pending===E.pending_buf_size&&(E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),j(g),A=E.pending,E.pending===E.pending_buf_size)){R=1;break}R=E.gzindex<E.gzhead.comment.length?255&E.gzhead.comment.charCodeAt(E.gzindex++):0,K(E,R)}while(R!==0);E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),R===0&&(E.status=103)}else E.status=103;if(E.status===103&&(E.gzhead.hcrc?(E.pending+2>E.pending_buf_size&&j(g),E.pending+2<=E.pending_buf_size&&(K(E,255&g.adler),K(E,g.adler>>8&255),g.adler=0,E.status=L)):E.status=L),E.pending!==0){if(j(g),g.avail_out===0)return E.last_flush=-1,u}else if(g.avail_in===0&&Y(F)<=Y(U)&&F!==m)return V(g,-5);if(E.status===666&&g.avail_in!==0)return V(g,-5);if(g.avail_in!==0||E.lookahead!==0||F!==f&&E.status!==666){var B=E.strategy===2?(function(M,J){for(var ne;;){if(M.lookahead===0&&(ue(M),M.lookahead===0)){if(J===f)return y;break}if(M.match_length=0,ne=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,ne&&(I(M,!1),M.strm.avail_out===0))return y}return M.insert=0,J===m?(I(M,!0),M.strm.avail_out===0?X:H):M.last_lit&&(I(M,!1),M.strm.avail_out===0)?y:$})(E,F):E.strategy===3?(function(M,J){for(var ne,re,ae,he,me=M.window;;){if(M.lookahead<=W){if(ue(M),M.lookahead<=W&&J===f)return y;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=D&&0<M.strstart&&(re=me[ae=M.strstart-1])===me[++ae]&&re===me[++ae]&&re===me[++ae]){he=M.strstart+W;do;while(re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&ae<he);M.match_length=W-(he-ae),M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=D?(ne=a._tr_tally(M,1,M.match_length-D),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(ne=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),ne&&(I(M,!1),M.strm.avail_out===0))return y}return M.insert=0,J===m?(I(M,!0),M.strm.avail_out===0?X:H):M.last_lit&&(I(M,!1),M.strm.avail_out===0)?y:$})(E,F):i[E.level].func(E,F);if(B!==X&&B!==H||(E.status=666),B===y||B===X)return g.avail_out===0&&(E.last_flush=-1),u;if(B===$&&(F===1?a._tr_align(E):F!==5&&(a._tr_stored_block(E,0,0,!1),F===3&&(Q(E.head),E.lookahead===0&&(E.strstart=0,E.block_start=0,E.insert=0))),j(g),g.avail_out===0))return E.last_flush=-1,u}return F!==m?u:E.wrap<=0?1:(E.wrap===2?(K(E,255&g.adler),K(E,g.adler>>8&255),K(E,g.adler>>16&255),K(E,g.adler>>24&255),K(E,255&g.total_in),K(E,g.total_in>>8&255),K(E,g.total_in>>16&255),K(E,g.total_in>>24&255)):(Z(E,g.adler>>>16),Z(E,65535&g.adler)),j(g),0<E.wrap&&(E.wrap=-E.wrap),E.pending!==0?u:1)},o.deflateEnd=function(g){var F;return g&&g.state?(F=g.state.status)!==z&&F!==69&&F!==73&&F!==91&&F!==103&&F!==L&&F!==666?V(g,w):(g.state=null,F===L?V(g,-3):u):w},o.deflateSetDictionary=function(g,F){var U,E,A,R,q,B,M,J,ne=F.length;if(!g||!g.state||(R=(U=g.state).wrap)===2||R===1&&U.status!==z||U.lookahead)return w;for(R===1&&(g.adler=l(g.adler,F,ne,0)),U.wrap=0,ne>=U.w_size&&(R===0&&(Q(U.head),U.strstart=0,U.block_start=0,U.insert=0),J=new s.Buf8(U.w_size),s.arraySet(J,F,ne-U.w_size,U.w_size,0),F=J,ne=U.w_size),q=g.avail_in,B=g.next_in,M=g.input,g.avail_in=ne,g.next_in=0,g.input=F,ue(U);U.lookahead>=D;){for(E=U.strstart,A=U.lookahead-(D-1);U.ins_h=(U.ins_h<<U.hash_shift^U.window[E+D-1])&U.hash_mask,U.prev[E&U.w_mask]=U.head[U.ins_h],U.head[U.ins_h]=E,E++,--A;);U.strstart=E,U.lookahead=D-1,ue(U)}return U.strstart+=U.lookahead,U.block_start=U.strstart,U.insert=U.lookahead,U.lookahead=0,U.match_length=U.prev_length=D-1,U.match_available=0,g.next_in=B,g.input=M,g.avail_in=q,U.wrap=R,u},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,n,o){n.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,n,o){n.exports=function(i,s){var a,l,c,d,f,m,u,w,h,b,v,x,k,S,C,O,N,P,D,W,G,z,L,y,$;a=i.state,l=i.next_in,y=i.input,c=l+(i.avail_in-5),d=i.next_out,$=i.output,f=d-(s-i.avail_out),m=d+(i.avail_out-257),u=a.dmax,w=a.wsize,h=a.whave,b=a.wnext,v=a.window,x=a.hold,k=a.bits,S=a.lencode,C=a.distcode,O=(1<<a.lenbits)-1,N=(1<<a.distbits)-1;e:do{k<15&&(x+=y[l++]<<k,k+=8,x+=y[l++]<<k,k+=8),P=S[x&O];t:for(;;){if(x>>>=D=P>>>24,k-=D,(D=P>>>16&255)===0)$[d++]=65535&P;else{if(!(16&D)){if((64&D)==0){P=S[(65535&P)+(x&(1<<D)-1)];continue t}if(32&D){a.mode=12;break e}i.msg="invalid literal/length code",a.mode=30;break e}W=65535&P,(D&=15)&&(k<D&&(x+=y[l++]<<k,k+=8),W+=x&(1<<D)-1,x>>>=D,k-=D),k<15&&(x+=y[l++]<<k,k+=8,x+=y[l++]<<k,k+=8),P=C[x&N];r:for(;;){if(x>>>=D=P>>>24,k-=D,!(16&(D=P>>>16&255))){if((64&D)==0){P=C[(65535&P)+(x&(1<<D)-1)];continue r}i.msg="invalid distance code",a.mode=30;break e}if(G=65535&P,k<(D&=15)&&(x+=y[l++]<<k,(k+=8)<D&&(x+=y[l++]<<k,k+=8)),u<(G+=x&(1<<D)-1)){i.msg="invalid distance too far back",a.mode=30;break e}if(x>>>=D,k-=D,(D=d-f)<G){if(h<(D=G-D)&&a.sane){i.msg="invalid distance too far back",a.mode=30;break e}if(L=v,(z=0)===b){if(z+=w-D,D<W){for(W-=D;$[d++]=v[z++],--D;);z=d-G,L=$}}else if(b<D){if(z+=w+b-D,(D-=b)<W){for(W-=D;$[d++]=v[z++],--D;);if(z=0,b<W){for(W-=D=b;$[d++]=v[z++],--D;);z=d-G,L=$}}}else if(z+=b-D,D<W){for(W-=D;$[d++]=v[z++],--D;);z=d-G,L=$}for(;2<W;)$[d++]=L[z++],$[d++]=L[z++],$[d++]=L[z++],W-=3;W&&($[d++]=L[z++],1<W&&($[d++]=L[z++]))}else{for(z=d-G;$[d++]=$[z++],$[d++]=$[z++],$[d++]=$[z++],2<(W-=3););W&&($[d++]=$[z++],1<W&&($[d++]=$[z++]))}break}}break}}while(l<c&&d<m);l-=W=k>>3,x&=(1<<(k-=W<<3))-1,i.next_in=l,i.next_out=d,i.avail_in=l<c?c-l+5:5-(l-c),i.avail_out=d<m?m-d+257:257-(d-m),a.hold=x,a.bits=k}},{}],49:[function(r,n,o){var i=r("../utils/common"),s=r("./adler32"),a=r("./crc32"),l=r("./inffast"),c=r("./inftrees"),d=1,f=2,m=0,u=-2,w=1,h=852,b=592;function v(z){return(z>>>24&255)+(z>>>8&65280)+((65280&z)<<8)+((255&z)<<24)}function x(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(z){var L;return z&&z.state?(L=z.state,z.total_in=z.total_out=L.total=0,z.msg="",L.wrap&&(z.adler=1&L.wrap),L.mode=w,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new i.Buf32(h),L.distcode=L.distdyn=new i.Buf32(b),L.sane=1,L.back=-1,m):u}function S(z){var L;return z&&z.state?((L=z.state).wsize=0,L.whave=0,L.wnext=0,k(z)):u}function C(z,L){var y,$;return z&&z.state?($=z.state,L<0?(y=0,L=-L):(y=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15<L)?u:($.window!==null&&$.wbits!==L&&($.window=null),$.wrap=y,$.wbits=L,S(z))):u}function O(z,L){var y,$;return z?($=new x,(z.state=$).window=null,(y=C(z,L))!==m&&(z.state=null),y):u}var N,P,D=!0;function W(z){if(D){var L;for(N=new i.Buf32(512),P=new i.Buf32(32),L=0;L<144;)z.lens[L++]=8;for(;L<256;)z.lens[L++]=9;for(;L<280;)z.lens[L++]=7;for(;L<288;)z.lens[L++]=8;for(c(d,z.lens,0,288,N,0,z.work,{bits:9}),L=0;L<32;)z.lens[L++]=5;c(f,z.lens,0,32,P,0,z.work,{bits:5}),D=!1}z.lencode=N,z.lenbits=9,z.distcode=P,z.distbits=5}function G(z,L,y,$){var X,H=z.state;return H.window===null&&(H.wsize=1<<H.wbits,H.wnext=0,H.whave=0,H.window=new i.Buf8(H.wsize)),$>=H.wsize?(i.arraySet(H.window,L,y-H.wsize,H.wsize,0),H.wnext=0,H.whave=H.wsize):($<(X=H.wsize-H.wnext)&&(X=$),i.arraySet(H.window,L,y-$,X,H.wnext),($-=X)?(i.arraySet(H.window,L,y-$,$,0),H.wnext=$,H.whave=H.wsize):(H.wnext+=X,H.wnext===H.wsize&&(H.wnext=0),H.whave<H.wsize&&(H.whave+=X))),0}o.inflateReset=S,o.inflateReset2=C,o.inflateResetKeep=k,o.inflateInit=function(z){return O(z,15)},o.inflateInit2=O,o.inflate=function(z,L){var y,$,X,H,V,Y,Q,j,I,K,Z,te,ue,ee,ie,se,oe,le,fe,we,g,F,U,E,A=0,R=new i.Buf8(4),q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!z||!z.state||!z.output||!z.input&&z.avail_in!==0)return u;(y=z.state).mode===12&&(y.mode=13),V=z.next_out,X=z.output,Q=z.avail_out,H=z.next_in,$=z.input,Y=z.avail_in,j=y.hold,I=y.bits,K=Y,Z=Q,F=m;e:for(;;)switch(y.mode){case w:if(y.wrap===0){y.mode=13;break}for(;I<16;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(2&y.wrap&&j===35615){R[y.check=0]=255&j,R[1]=j>>>8&255,y.check=a(y.check,R,2,0),I=j=0,y.mode=2;break}if(y.flags=0,y.head&&(y.head.done=!1),!(1&y.wrap)||(((255&j)<<8)+(j>>8))%31){z.msg="incorrect header check",y.mode=30;break}if((15&j)!=8){z.msg="unknown compression method",y.mode=30;break}if(I-=4,g=8+(15&(j>>>=4)),y.wbits===0)y.wbits=g;else if(g>y.wbits){z.msg="invalid window size",y.mode=30;break}y.dmax=1<<g,z.adler=y.check=1,y.mode=512&j?10:12,I=j=0;break;case 2:for(;I<16;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(y.flags=j,(255&y.flags)!=8){z.msg="unknown compression method",y.mode=30;break}if(57344&y.flags){z.msg="unknown header flags set",y.mode=30;break}y.head&&(y.head.text=j>>8&1),512&y.flags&&(R[0]=255&j,R[1]=j>>>8&255,y.check=a(y.check,R,2,0)),I=j=0,y.mode=3;case 3:for(;I<32;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.head&&(y.head.time=j),512&y.flags&&(R[0]=255&j,R[1]=j>>>8&255,R[2]=j>>>16&255,R[3]=j>>>24&255,y.check=a(y.check,R,4,0)),I=j=0,y.mode=4;case 4:for(;I<16;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.head&&(y.head.xflags=255&j,y.head.os=j>>8),512&y.flags&&(R[0]=255&j,R[1]=j>>>8&255,y.check=a(y.check,R,2,0)),I=j=0,y.mode=5;case 5:if(1024&y.flags){for(;I<16;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.length=j,y.head&&(y.head.extra_len=j),512&y.flags&&(R[0]=255&j,R[1]=j>>>8&255,y.check=a(y.check,R,2,0)),I=j=0}else y.head&&(y.head.extra=null);y.mode=6;case 6:if(1024&y.flags&&(Y<(te=y.length)&&(te=Y),te&&(y.head&&(g=y.head.extra_len-y.length,y.head.extra||(y.head.extra=new Array(y.head.extra_len)),i.arraySet(y.head.extra,$,H,te,g)),512&y.flags&&(y.check=a(y.check,$,te,H)),Y-=te,H+=te,y.length-=te),y.length))break e;y.length=0,y.mode=7;case 7:if(2048&y.flags){if(Y===0)break e;for(te=0;g=$[H+te++],y.head&&g&&y.length<65536&&(y.head.name+=String.fromCharCode(g)),g&&te<Y;);if(512&y.flags&&(y.check=a(y.check,$,te,H)),Y-=te,H+=te,g)break e}else y.head&&(y.head.name=null);y.length=0,y.mode=8;case 8:if(4096&y.flags){if(Y===0)break e;for(te=0;g=$[H+te++],y.head&&g&&y.length<65536&&(y.head.comment+=String.fromCharCode(g)),g&&te<Y;);if(512&y.flags&&(y.check=a(y.check,$,te,H)),Y-=te,H+=te,g)break e}else y.head&&(y.head.comment=null);y.mode=9;case 9:if(512&y.flags){for(;I<16;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(j!==(65535&y.check)){z.msg="header crc mismatch",y.mode=30;break}I=j=0}y.head&&(y.head.hcrc=y.flags>>9&1,y.head.done=!0),z.adler=y.check=0,y.mode=12;break;case 10:for(;I<32;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}z.adler=y.check=v(j),I=j=0,y.mode=11;case 11:if(y.havedict===0)return z.next_out=V,z.avail_out=Q,z.next_in=H,z.avail_in=Y,y.hold=j,y.bits=I,2;z.adler=y.check=1,y.mode=12;case 12:if(L===5||L===6)break e;case 13:if(y.last){j>>>=7&I,I-=7&I,y.mode=27;break}for(;I<3;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}switch(y.last=1&j,I-=1,3&(j>>>=1)){case 0:y.mode=14;break;case 1:if(W(y),y.mode=20,L!==6)break;j>>>=2,I-=2;break e;case 2:y.mode=17;break;case 3:z.msg="invalid block type",y.mode=30}j>>>=2,I-=2;break;case 14:for(j>>>=7&I,I-=7&I;I<32;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if((65535&j)!=(j>>>16^65535)){z.msg="invalid stored block lengths",y.mode=30;break}if(y.length=65535&j,I=j=0,y.mode=15,L===6)break e;case 15:y.mode=16;case 16:if(te=y.length){if(Y<te&&(te=Y),Q<te&&(te=Q),te===0)break e;i.arraySet(X,$,H,te,V),Y-=te,H+=te,Q-=te,V+=te,y.length-=te;break}y.mode=12;break;case 17:for(;I<14;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(y.nlen=257+(31&j),j>>>=5,I-=5,y.ndist=1+(31&j),j>>>=5,I-=5,y.ncode=4+(15&j),j>>>=4,I-=4,286<y.nlen||30<y.ndist){z.msg="too many length or distance symbols",y.mode=30;break}y.have=0,y.mode=18;case 18:for(;y.have<y.ncode;){for(;I<3;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.lens[q[y.have++]]=7&j,j>>>=3,I-=3}for(;y.have<19;)y.lens[q[y.have++]]=0;if(y.lencode=y.lendyn,y.lenbits=7,U={bits:y.lenbits},F=c(0,y.lens,0,19,y.lencode,0,y.work,U),y.lenbits=U.bits,F){z.msg="invalid code lengths set",y.mode=30;break}y.have=0,y.mode=19;case 19:for(;y.have<y.nlen+y.ndist;){for(;se=(A=y.lencode[j&(1<<y.lenbits)-1])>>>16&255,oe=65535&A,!((ie=A>>>24)<=I);){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(oe<16)j>>>=ie,I-=ie,y.lens[y.have++]=oe;else{if(oe===16){for(E=ie+2;I<E;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(j>>>=ie,I-=ie,y.have===0){z.msg="invalid bit length repeat",y.mode=30;break}g=y.lens[y.have-1],te=3+(3&j),j>>>=2,I-=2}else if(oe===17){for(E=ie+3;I<E;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}I-=ie,g=0,te=3+(7&(j>>>=ie)),j>>>=3,I-=3}else{for(E=ie+7;I<E;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}I-=ie,g=0,te=11+(127&(j>>>=ie)),j>>>=7,I-=7}if(y.have+te>y.nlen+y.ndist){z.msg="invalid bit length repeat",y.mode=30;break}for(;te--;)y.lens[y.have++]=g}}if(y.mode===30)break;if(y.lens[256]===0){z.msg="invalid code -- missing end-of-block",y.mode=30;break}if(y.lenbits=9,U={bits:y.lenbits},F=c(d,y.lens,0,y.nlen,y.lencode,0,y.work,U),y.lenbits=U.bits,F){z.msg="invalid literal/lengths set",y.mode=30;break}if(y.distbits=6,y.distcode=y.distdyn,U={bits:y.distbits},F=c(f,y.lens,y.nlen,y.ndist,y.distcode,0,y.work,U),y.distbits=U.bits,F){z.msg="invalid distances set",y.mode=30;break}if(y.mode=20,L===6)break e;case 20:y.mode=21;case 21:if(6<=Y&&258<=Q){z.next_out=V,z.avail_out=Q,z.next_in=H,z.avail_in=Y,y.hold=j,y.bits=I,l(z,Z),V=z.next_out,X=z.output,Q=z.avail_out,H=z.next_in,$=z.input,Y=z.avail_in,j=y.hold,I=y.bits,y.mode===12&&(y.back=-1);break}for(y.back=0;se=(A=y.lencode[j&(1<<y.lenbits)-1])>>>16&255,oe=65535&A,!((ie=A>>>24)<=I);){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(se&&(240&se)==0){for(le=ie,fe=se,we=oe;se=(A=y.lencode[we+((j&(1<<le+fe)-1)>>le)])>>>16&255,oe=65535&A,!(le+(ie=A>>>24)<=I);){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}j>>>=le,I-=le,y.back+=le}if(j>>>=ie,I-=ie,y.back+=ie,y.length=oe,se===0){y.mode=26;break}if(32&se){y.back=-1,y.mode=12;break}if(64&se){z.msg="invalid literal/length code",y.mode=30;break}y.extra=15&se,y.mode=22;case 22:if(y.extra){for(E=y.extra;I<E;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.length+=j&(1<<y.extra)-1,j>>>=y.extra,I-=y.extra,y.back+=y.extra}y.was=y.length,y.mode=23;case 23:for(;se=(A=y.distcode[j&(1<<y.distbits)-1])>>>16&255,oe=65535&A,!((ie=A>>>24)<=I);){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if((240&se)==0){for(le=ie,fe=se,we=oe;se=(A=y.distcode[we+((j&(1<<le+fe)-1)>>le)])>>>16&255,oe=65535&A,!(le+(ie=A>>>24)<=I);){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}j>>>=le,I-=le,y.back+=le}if(j>>>=ie,I-=ie,y.back+=ie,64&se){z.msg="invalid distance code",y.mode=30;break}y.offset=oe,y.extra=15&se,y.mode=24;case 24:if(y.extra){for(E=y.extra;I<E;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}y.offset+=j&(1<<y.extra)-1,j>>>=y.extra,I-=y.extra,y.back+=y.extra}if(y.offset>y.dmax){z.msg="invalid distance too far back",y.mode=30;break}y.mode=25;case 25:if(Q===0)break e;if(te=Z-Q,y.offset>te){if((te=y.offset-te)>y.whave&&y.sane){z.msg="invalid distance too far back",y.mode=30;break}ue=te>y.wnext?(te-=y.wnext,y.wsize-te):y.wnext-te,te>y.length&&(te=y.length),ee=y.window}else ee=X,ue=V-y.offset,te=y.length;for(Q<te&&(te=Q),Q-=te,y.length-=te;X[V++]=ee[ue++],--te;);y.length===0&&(y.mode=21);break;case 26:if(Q===0)break e;X[V++]=y.length,Q--,y.mode=21;break;case 27:if(y.wrap){for(;I<32;){if(Y===0)break e;Y--,j|=$[H++]<<I,I+=8}if(Z-=Q,z.total_out+=Z,y.total+=Z,Z&&(z.adler=y.check=y.flags?a(y.check,X,Z,V-Z):s(y.check,X,Z,V-Z)),Z=Q,(y.flags?j:v(j))!==y.check){z.msg="incorrect data check",y.mode=30;break}I=j=0}y.mode=28;case 28:if(y.wrap&&y.flags){for(;I<32;){if(Y===0)break e;Y--,j+=$[H++]<<I,I+=8}if(j!==(4294967295&y.total)){z.msg="incorrect length check",y.mode=30;break}I=j=0}y.mode=29;case 29:F=1;break e;case 30:F=-3;break e;case 31:return-4;case 32:default:return u}return z.next_out=V,z.avail_out=Q,z.next_in=H,z.avail_in=Y,y.hold=j,y.bits=I,(y.wsize||Z!==z.avail_out&&y.mode<30&&(y.mode<27||L!==4))&&G(z,z.output,z.next_out,Z-z.avail_out)?(y.mode=31,-4):(K-=z.avail_in,Z-=z.avail_out,z.total_in+=K,z.total_out+=Z,y.total+=Z,y.wrap&&Z&&(z.adler=y.check=y.flags?a(y.check,X,Z,z.next_out-Z):s(y.check,X,Z,z.next_out-Z)),z.data_type=y.bits+(y.last?64:0)+(y.mode===12?128:0)+(y.mode===20||y.mode===15?256:0),(K==0&&Z===0||L===4)&&F===m&&(F=-5),F)},o.inflateEnd=function(z){if(!z||!z.state)return u;var L=z.state;return L.window&&(L.window=null),z.state=null,m},o.inflateGetHeader=function(z,L){var y;return z&&z.state?(2&(y=z.state).wrap)==0?u:((y.head=L).done=!1,m):u},o.inflateSetDictionary=function(z,L){var y,$=L.length;return z&&z.state?(y=z.state).wrap!==0&&y.mode!==11?u:y.mode===11&&s(1,L,$,0)!==y.check?-3:G(z,L,$,$)?(y.mode=31,-4):(y.havedict=1,m):u},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,o){var i=r("../utils/common"),s=[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],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[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];n.exports=function(d,f,m,u,w,h,b,v){var x,k,S,C,O,N,P,D,W,G=v.bits,z=0,L=0,y=0,$=0,X=0,H=0,V=0,Y=0,Q=0,j=0,I=null,K=0,Z=new i.Buf16(16),te=new i.Buf16(16),ue=null,ee=0;for(z=0;z<=15;z++)Z[z]=0;for(L=0;L<u;L++)Z[f[m+L]]++;for(X=G,$=15;1<=$&&Z[$]===0;$--);if($<X&&(X=$),$===0)return w[h++]=20971520,w[h++]=20971520,v.bits=1,0;for(y=1;y<$&&Z[y]===0;y++);for(X<y&&(X=y),z=Y=1;z<=15;z++)if(Y<<=1,(Y-=Z[z])<0)return-1;if(0<Y&&(d===0||$!==1))return-1;for(te[1]=0,z=1;z<15;z++)te[z+1]=te[z]+Z[z];for(L=0;L<u;L++)f[m+L]!==0&&(b[te[f[m+L]]++]=L);if(N=d===0?(I=ue=b,19):d===1?(I=s,K-=257,ue=a,ee-=257,256):(I=l,ue=c,-1),z=y,O=h,V=L=j=0,S=-1,C=(Q=1<<(H=X))-1,d===1&&852<Q||d===2&&592<Q)return 1;for(;;){for(P=z-V,W=b[L]<N?(D=0,b[L]):b[L]>N?(D=ue[ee+b[L]],I[K+b[L]]):(D=96,0),x=1<<z-V,y=k=1<<H;w[O+(j>>V)+(k-=x)]=P<<24|D<<16|W|0,k!==0;);for(x=1<<z-1;j&x;)x>>=1;if(x!==0?(j&=x-1,j+=x):j=0,L++,--Z[z]==0){if(z===$)break;z=f[m+b[L]]}if(X<z&&(j&C)!==S){for(V===0&&(V=X),O+=y,Y=1<<(H=z-V);H+V<$&&!((Y-=Z[H+V])<=0);)H++,Y<<=1;if(Q+=1<<H,d===1&&852<Q||d===2&&592<Q)return 1;w[S=j&C]=X<<24|H<<16|O-h|0}}return j!==0&&(w[O+j]=z-V<<24|64<<16|0),v.bits=X,0}},{"../utils/common":41}],51:[function(r,n,o){n.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,n,o){var i=r("../utils/common"),s=0,a=1;function l(A){for(var R=A.length;0<=--R;)A[R]=0}var c=0,d=29,f=256,m=f+1+d,u=30,w=19,h=2*m+1,b=15,v=16,x=7,k=256,S=16,C=17,O=18,N=[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],P=[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],D=[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],G=new Array(2*(m+2));l(G);var z=new Array(2*u);l(z);var L=new Array(512);l(L);var y=new Array(256);l(y);var $=new Array(d);l($);var X,H,V,Y=new Array(u);function Q(A,R,q,B,M){this.static_tree=A,this.extra_bits=R,this.extra_base=q,this.elems=B,this.max_length=M,this.has_stree=A&&A.length}function j(A,R){this.dyn_tree=A,this.max_code=0,this.stat_desc=R}function I(A){return A<256?L[A]:L[256+(A>>>7)]}function K(A,R){A.pending_buf[A.pending++]=255&R,A.pending_buf[A.pending++]=R>>>8&255}function Z(A,R,q){A.bi_valid>v-q?(A.bi_buf|=R<<A.bi_valid&65535,K(A,A.bi_buf),A.bi_buf=R>>v-A.bi_valid,A.bi_valid+=q-v):(A.bi_buf|=R<<A.bi_valid&65535,A.bi_valid+=q)}function te(A,R,q){Z(A,q[2*R],q[2*R+1])}function ue(A,R){for(var q=0;q|=1&A,A>>>=1,q<<=1,0<--R;);return q>>>1}function ee(A,R,q){var B,M,J=new Array(b+1),ne=0;for(B=1;B<=b;B++)J[B]=ne=ne+q[B-1]<<1;for(M=0;M<=R;M++){var re=A[2*M+1];re!==0&&(A[2*M]=ue(J[re]++,re))}}function ie(A){var R;for(R=0;R<m;R++)A.dyn_ltree[2*R]=0;for(R=0;R<u;R++)A.dyn_dtree[2*R]=0;for(R=0;R<w;R++)A.bl_tree[2*R]=0;A.dyn_ltree[2*k]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0}function se(A){8<A.bi_valid?K(A,A.bi_buf):0<A.bi_valid&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0}function oe(A,R,q,B){var M=2*R,J=2*q;return A[M]<A[J]||A[M]===A[J]&&B[R]<=B[q]}function le(A,R,q){for(var B=A.heap[q],M=q<<1;M<=A.heap_len&&(M<A.heap_len&&oe(R,A.heap[M+1],A.heap[M],A.depth)&&M++,!oe(R,B,A.heap[M],A.depth));)A.heap[q]=A.heap[M],q=M,M<<=1;A.heap[q]=B}function fe(A,R,q){var B,M,J,ne,re=0;if(A.last_lit!==0)for(;B=A.pending_buf[A.d_buf+2*re]<<8|A.pending_buf[A.d_buf+2*re+1],M=A.pending_buf[A.l_buf+re],re++,B===0?te(A,M,R):(te(A,(J=y[M])+f+1,R),(ne=N[J])!==0&&Z(A,M-=$[J],ne),te(A,J=I(--B),q),(ne=P[J])!==0&&Z(A,B-=Y[J],ne)),re<A.last_lit;);te(A,k,R)}function we(A,R){var q,B,M,J=R.dyn_tree,ne=R.stat_desc.static_tree,re=R.stat_desc.has_stree,ae=R.stat_desc.elems,he=-1;for(A.heap_len=0,A.heap_max=h,q=0;q<ae;q++)J[2*q]!==0?(A.heap[++A.heap_len]=he=q,A.depth[q]=0):J[2*q+1]=0;for(;A.heap_len<2;)J[2*(M=A.heap[++A.heap_len]=he<2?++he:0)]=1,A.depth[M]=0,A.opt_len--,re&&(A.static_len-=ne[2*M+1]);for(R.max_code=he,q=A.heap_len>>1;1<=q;q--)le(A,J,q);for(M=ae;q=A.heap[1],A.heap[1]=A.heap[A.heap_len--],le(A,J,1),B=A.heap[1],A.heap[--A.heap_max]=q,A.heap[--A.heap_max]=B,J[2*M]=J[2*q]+J[2*B],A.depth[M]=(A.depth[q]>=A.depth[B]?A.depth[q]:A.depth[B])+1,J[2*q+1]=J[2*B+1]=M,A.heap[1]=M++,le(A,J,1),2<=A.heap_len;);A.heap[--A.heap_max]=A.heap[1],(function(me,ve){var it,je,_t,Ee,ir,Pt,Ve=ve.dyn_tree,Vn=ve.max_code,Yn=ve.stat_desc.static_tree,fi=ve.stat_desc.has_stree,hi=ve.stat_desc.extra_bits,Kn=ve.stat_desc.extra_base,Ae=ve.stat_desc.max_length,Oe=0;for(Ee=0;Ee<=b;Ee++)me.bl_count[Ee]=0;for(Ve[2*me.heap[me.heap_max]+1]=0,it=me.heap_max+1;it<h;it++)Ae<(Ee=Ve[2*Ve[2*(je=me.heap[it])+1]+1]+1)&&(Ee=Ae,Oe++),Ve[2*je+1]=Ee,Vn<je||(me.bl_count[Ee]++,ir=0,Kn<=je&&(ir=hi[je-Kn]),Pt=Ve[2*je],me.opt_len+=Pt*(Ee+ir),fi&&(me.static_len+=Pt*(Yn[2*je+1]+ir)));if(Oe!==0){do{for(Ee=Ae-1;me.bl_count[Ee]===0;)Ee--;me.bl_count[Ee]--,me.bl_count[Ee+1]+=2,me.bl_count[Ae]--,Oe-=2}while(0<Oe);for(Ee=Ae;Ee!==0;Ee--)for(je=me.bl_count[Ee];je!==0;)Vn<(_t=me.heap[--it])||(Ve[2*_t+1]!==Ee&&(me.opt_len+=(Ee-Ve[2*_t+1])*Ve[2*_t],Ve[2*_t+1]=Ee),je--)}})(A,R),ee(J,he,A.bl_count)}function g(A,R,q){var B,M,J=-1,ne=R[1],re=0,ae=7,he=4;for(ne===0&&(ae=138,he=3),R[2*(q+1)+1]=65535,B=0;B<=q;B++)M=ne,ne=R[2*(B+1)+1],++re<ae&&M===ne||(re<he?A.bl_tree[2*M]+=re:M!==0?(M!==J&&A.bl_tree[2*M]++,A.bl_tree[2*S]++):re<=10?A.bl_tree[2*C]++:A.bl_tree[2*O]++,J=M,he=(re=0)===ne?(ae=138,3):M===ne?(ae=6,3):(ae=7,4))}function F(A,R,q){var B,M,J=-1,ne=R[1],re=0,ae=7,he=4;for(ne===0&&(ae=138,he=3),B=0;B<=q;B++)if(M=ne,ne=R[2*(B+1)+1],!(++re<ae&&M===ne)){if(re<he)for(;te(A,M,A.bl_tree),--re!=0;);else M!==0?(M!==J&&(te(A,M,A.bl_tree),re--),te(A,S,A.bl_tree),Z(A,re-3,2)):re<=10?(te(A,C,A.bl_tree),Z(A,re-3,3)):(te(A,O,A.bl_tree),Z(A,re-11,7));J=M,he=(re=0)===ne?(ae=138,3):M===ne?(ae=6,3):(ae=7,4)}}l(Y);var U=!1;function E(A,R,q,B){Z(A,(c<<1)+(B?1:0),3),(function(M,J,ne,re){se(M),K(M,ne),K(M,~ne),i.arraySet(M.pending_buf,M.window,J,ne,M.pending),M.pending+=ne})(A,R,q)}o._tr_init=function(A){U||((function(){var R,q,B,M,J,ne=new Array(b+1);for(M=B=0;M<d-1;M++)for($[M]=B,R=0;R<1<<N[M];R++)y[B++]=M;for(y[B-1]=M,M=J=0;M<16;M++)for(Y[M]=J,R=0;R<1<<P[M];R++)L[J++]=M;for(J>>=7;M<u;M++)for(Y[M]=J<<7,R=0;R<1<<P[M]-7;R++)L[256+J++]=M;for(q=0;q<=b;q++)ne[q]=0;for(R=0;R<=143;)G[2*R+1]=8,R++,ne[8]++;for(;R<=255;)G[2*R+1]=9,R++,ne[9]++;for(;R<=279;)G[2*R+1]=7,R++,ne[7]++;for(;R<=287;)G[2*R+1]=8,R++,ne[8]++;for(ee(G,m+1,ne),R=0;R<u;R++)z[2*R+1]=5,z[2*R]=ue(R,5);X=new Q(G,N,f+1,m,b),H=new Q(z,P,0,u,b),V=new Q(new Array(0),D,0,w,x)})(),U=!0),A.l_desc=new j(A.dyn_ltree,X),A.d_desc=new j(A.dyn_dtree,H),A.bl_desc=new j(A.bl_tree,V),A.bi_buf=0,A.bi_valid=0,ie(A)},o._tr_stored_block=E,o._tr_flush_block=function(A,R,q,B){var M,J,ne=0;0<A.level?(A.strm.data_type===2&&(A.strm.data_type=(function(re){var ae,he=4093624447;for(ae=0;ae<=31;ae++,he>>>=1)if(1&he&&re.dyn_ltree[2*ae]!==0)return s;if(re.dyn_ltree[18]!==0||re.dyn_ltree[20]!==0||re.dyn_ltree[26]!==0)return a;for(ae=32;ae<f;ae++)if(re.dyn_ltree[2*ae]!==0)return a;return s})(A)),we(A,A.l_desc),we(A,A.d_desc),ne=(function(re){var ae;for(g(re,re.dyn_ltree,re.l_desc.max_code),g(re,re.dyn_dtree,re.d_desc.max_code),we(re,re.bl_desc),ae=w-1;3<=ae&&re.bl_tree[2*W[ae]+1]===0;ae--);return re.opt_len+=3*(ae+1)+5+5+4,ae})(A),M=A.opt_len+3+7>>>3,(J=A.static_len+3+7>>>3)<=M&&(M=J)):M=J=q+5,q+4<=M&&R!==-1?E(A,R,q,B):A.strategy===4||J===M?(Z(A,2+(B?1:0),3),fe(A,G,z)):(Z(A,4+(B?1:0),3),(function(re,ae,he,me){var ve;for(Z(re,ae-257,5),Z(re,he-1,5),Z(re,me-4,4),ve=0;ve<me;ve++)Z(re,re.bl_tree[2*W[ve]+1],3);F(re,re.dyn_ltree,ae-1),F(re,re.dyn_dtree,he-1)})(A,A.l_desc.max_code+1,A.d_desc.max_code+1,ne+1),fe(A,A.dyn_ltree,A.dyn_dtree)),ie(A),B&&se(A)},o._tr_tally=function(A,R,q){return A.pending_buf[A.d_buf+2*A.last_lit]=R>>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&R,A.pending_buf[A.l_buf+A.last_lit]=255&q,A.last_lit++,R===0?A.dyn_ltree[2*q]++:(A.matches++,R--,A.dyn_ltree[2*(y[q]+f+1)]++,A.dyn_dtree[2*I(R)]++),A.last_lit===A.lit_bufsize-1},o._tr_align=function(A){Z(A,2,3),te(A,k,G),(function(R){R.bi_valid===16?(K(R,R.bi_buf),R.bi_buf=0,R.bi_valid=0):8<=R.bi_valid&&(R.pending_buf[R.pending++]=255&R.bi_buf,R.bi_buf>>=8,R.bi_valid-=8)})(A)}},{"../utils/common":41}],53:[function(r,n,o){n.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,n,o){(function(i){(function(s,a){if(!s.setImmediate){var l,c,d,f,m=1,u={},w=!1,h=s.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(s);b=b&&b.setTimeout?b:s,l={}.toString.call(s.process)==="[object process]"?function(S){process.nextTick(function(){x(S)})}:(function(){if(s.postMessage&&!s.importScripts){var S=!0,C=s.onmessage;return s.onmessage=function(){S=!1},s.postMessage("","*"),s.onmessage=C,S}})()?(f="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",k,!1):s.attachEvent("onmessage",k),function(S){s.postMessage(f+S,"*")}):s.MessageChannel?((d=new MessageChannel).port1.onmessage=function(S){x(S.data)},function(S){d.port2.postMessage(S)}):h&&"onreadystatechange"in h.createElement("script")?(c=h.documentElement,function(S){var C=h.createElement("script");C.onreadystatechange=function(){x(S),C.onreadystatechange=null,c.removeChild(C),C=null},c.appendChild(C)}):function(S){setTimeout(x,0,S)},b.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var C=new Array(arguments.length-1),O=0;O<C.length;O++)C[O]=arguments[O+1];var N={callback:S,args:C};return u[m]=N,l(m),m++},b.clearImmediate=v}function v(S){delete u[S]}function x(S){if(w)setTimeout(x,0,S);else{var C=u[S];if(C){w=!0;try{(function(O){var N=O.callback,P=O.args;switch(P.length){case 0:N();break;case 1:N(P[0]);break;case 2:N(P[0],P[1]);break;case 3:N(P[0],P[1],P[2]);break;default:N.apply(a,P)}})(C)}finally{v(S),w=!1}}}}function k(S){S.source===s&&typeof S.data=="string"&&S.data.indexOf(f)===0&&x(+S.data.slice(f.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof pt<"u"?pt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Gn)),Gn.exports}var Nc=Ac();const zc=Ec(Nc);var Lr={exports:{}},jc=Lr.exports,bi;function Tc(){return bi||(bi=1,(function(e,t){(function(r,n){n()})(jc,function(){function r(c,d){return typeof d>"u"?d={autoBom:!1}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function n(c,d,f){var m=new XMLHttpRequest;m.open("GET",c),m.responseType="blob",m.onload=function(){l(m.response,d,f)},m.onerror=function(){console.error("could not download file")},m.send()}function o(c){var d=new XMLHttpRequest;d.open("HEAD",c,!1);try{d.send()}catch{}return 200<=d.status&&299>=d.status}function i(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(d)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof pt=="object"&&pt.global===pt?pt:void 0,a=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(c,d,f){var m=s.URL||s.webkitURL,u=document.createElement("a");d=d||c.name||"download",u.download=d,u.rel="noopener",typeof c=="string"?(u.href=c,u.origin===location.origin?i(u):o(u.href)?n(c,d,f):i(u,u.target="_blank")):(u.href=m.createObjectURL(c),setTimeout(function(){m.revokeObjectURL(u.href)},4e4),setTimeout(function(){i(u)},0))}:"msSaveOrOpenBlob"in navigator?function(c,d,f){if(d=d||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(r(c,f),d);else if(o(c))n(c,d,f);else{var m=document.createElement("a");m.href=c,m.target="_blank",setTimeout(function(){i(m)})}}:function(c,d,f,m){if(m=m||open("","_blank"),m&&(m.document.title=m.document.body.innerText="downloading..."),typeof c=="string")return n(c,d,f);var u=c.type==="application/octet-stream",w=/constructor/i.test(s.HTMLElement)||s.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||u&&w||a)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var k=b.result;k=h?k:k.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=k:location=k,m=null},b.readAsDataURL(c)}else{var v=s.URL||s.webkitURL,x=v.createObjectURL(c);m?m.location=x:location.href=x,m=null,setTimeout(function(){v.revokeObjectURL(x)},4e4)}});s.saveAs=l.saveAs=l,e.exports=l})})(Lr)),Lr.exports}var vi=Tc();const wi=async(e,t)=>{const r=new zc,n=r.folder("config");n==null||n.file("site.json",JSON.stringify(e.site,null,2)),n==null||n.file("theme.json",JSON.stringify(e.theme,null,2)),n==null||n.file("menu.json",JSON.stringify(e.menu,null,2));const o=r.folder("pages");o==null||o.file(`${t}.json`,JSON.stringify(e.page,null,2));const i=await r.generateAsync({type:"blob"});vi.saveAs(i,`jsonpages-project-${t}-${Date.now()}.zip`)},xi=(e,t,r)=>{const{pages:n,...o}=e.site,i={page:e.page,site:o,menu:e.menu,theme:e.theme},a=`<script id="jp-baked-state" type="application/json">${JSON.stringify(i)}<\/script>`,l=r.replace("</head>",`${a}</head>`),c=new Blob([`<!DOCTYPE html>${l}`],{type:"text/html;charset=utf-8"});vi.saveAs(c,`${t}.html`)};function yi(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=yi(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Oc(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=yi(e))&&(n&&(n+=" "),n+=t);return n}const Pc=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Ic=(e,t)=>({classGroupId:e,validator:t}),ki=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Fr="-",Si=[],Dc="arbitrary..",Rc=e=>{const t=Lc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Mc(s);const a=s.split(Fr),l=a[0]===""&&a.length>1?1:0;return _i(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=n[s],c=r[s];return l?c?Pc(c,l):l:c||Si}return r[s]||Si}}},_i=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],i=r.nextPart.get(o);if(i){const c=_i(e,t+1,i);if(c)return c}const s=r.validators;if(s===null)return;const a=t===0?e.join(Fr):e.slice(t).join(Fr),l=s.length;for(let c=0;c<l;c++){const d=s[c];if(d.validator(a))return d.classGroupId}},Mc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Dc+n:void 0})(),Lc=e=>{const{theme:t,classGroups:r}=e;return Fc(r,t)},Fc=(e,t)=>{const r=ki();for(const n in e){const o=e[n];Zn(o,r,n,t)}return r},Zn=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Bc(s,t,r,n)}},Bc=(e,t,r,n)=>{if(typeof e=="string"){Uc(e,t,r);return}if(typeof e=="function"){Wc(e,t,r,n);return}$c(e,t,r,n)},Uc=(e,t,r)=>{const n=e===""?t:Ci(t,e);n.classGroupId=r},Wc=(e,t,r,n)=>{if(Hc(e)){Zn(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Ic(r,e))},$c=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Zn(l,Ci(t,a),r,n)}},Ci=(e,t)=>{let r=e;const n=t.split(Fr),o=n.length;for(let i=0;i<o;i++){const s=n[i];let a=r.nextPart.get(s);a||(a=ki(),r.nextPart.set(s,a)),r=a}return r},Hc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Vc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(i,s)=>{r[i]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let s=r[i];if(s!==void 0)return s;if((s=n[i])!==void 0)return o(i,s),s},set(i,s){i in r?r[i]=s:o(i,s)}}},Xn="!",Ei=":",Yc=[],Ai=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Kc=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let s=0,a=0,l=0,c;const d=o.length;for(let h=0;h<d;h++){const b=o[h];if(s===0&&a===0){if(b===Ei){i.push(o.slice(l,h)),l=h+1;continue}if(b==="/"){c=h;continue}}b==="["?s++:b==="]"?s--:b==="("?a++:b===")"&&a--}const f=i.length===0?o:o.slice(l);let m=f,u=!1;f.endsWith(Xn)?(m=f.slice(0,-1),u=!0):f.startsWith(Xn)&&(m=f.slice(1),u=!0);const w=c&&c>l?c-l:void 0;return Ai(i,u,m,w)};if(t){const o=t+Ei,i=n;n=s=>s.startsWith(o)?i(s.slice(o.length)):Ai(Yc,!1,s,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},Gc=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const s=r[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(s)):o.push(s)}return o.length>0&&(o.sort(),n.push(...o)),n}},Zc=e=>({cache:Vc(e.cacheSize),parseClassName:Kc(e),sortModifiers:Gc(e),...Rc(e)}),Xc=/\s+/,qc=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(Xc);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:f,modifiers:m,hasImportantModifier:u,baseClassName:w,maybePostfixModifierPosition:h}=r(d);if(f){l=d+(l.length>0?" "+l:l);continue}let b=!!h,v=n(b?w.substring(0,h):w);if(!v){if(!b){l=d+(l.length>0?" "+l:l);continue}if(v=n(w),!v){l=d+(l.length>0?" "+l:l);continue}b=!1}const x=m.length===0?"":m.length===1?m[0]:i(m).join(":"),k=u?x+Xn:x,S=k+v;if(s.indexOf(S)>-1)continue;s.push(S);const C=o(v,b);for(let O=0;O<C.length;++O){const N=C[O];s.push(k+N)}l=d+(l.length>0?" "+l:l)}return l},Jc=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Ni(r))&&(o&&(o+=" "),o+=n);return o},Ni=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Ni(e[n]))&&(r&&(r+=" "),r+=t);return r},Qc=(e,...t)=>{let r,n,o,i;const s=l=>{const c=t.reduce((d,f)=>f(d),e());return r=Zc(c),n=r.cache.get,o=r.cache.set,i=a,a(l)},a=l=>{const c=n(l);if(c)return c;const d=qc(l,r);return o(l,d),d};return i=s,(...l)=>i(Jc(...l))},ed=[],Ne=e=>{const t=r=>r[e]||ed;return t.isThemeGetter=!0,t},zi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ji=/^\((?:(\w[\w-]*):)?(.+)\)$/i,td=/^\d+\/\d+$/,rd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nd=/\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$/,od=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,id=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,It=e=>td.test(e),ge=e=>!!e&&!Number.isNaN(Number(e)),mt=e=>!!e&&Number.isInteger(Number(e)),qn=e=>e.endsWith("%")&&ge(e.slice(0,-1)),lt=e=>rd.test(e),ad=()=>!0,ld=e=>nd.test(e)&&!od.test(e),Ti=()=>!1,cd=e=>id.test(e),dd=e=>sd.test(e),ud=e=>!ce(e)&&!de(e),fd=e=>Dt(e,Ri,Ti),ce=e=>zi.test(e),Nt=e=>Dt(e,Mi,ld),Jn=e=>Dt(e,bd,ge),Oi=e=>Dt(e,Ii,Ti),hd=e=>Dt(e,Di,dd),Br=e=>Dt(e,Li,cd),de=e=>ji.test(e),ar=e=>Rt(e,Mi),pd=e=>Rt(e,vd),Pi=e=>Rt(e,Ii),md=e=>Rt(e,Ri),gd=e=>Rt(e,Di),Ur=e=>Rt(e,Li,!0),Dt=(e,t,r)=>{const n=zi.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Rt=(e,t,r=!1)=>{const n=ji.exec(e);return n?n[1]?t(n[1]):r:!1},Ii=e=>e==="position"||e==="percentage",Di=e=>e==="image"||e==="url",Ri=e=>e==="length"||e==="size"||e==="bg-size",Mi=e=>e==="length",bd=e=>e==="number",vd=e=>e==="family-name",Li=e=>e==="shadow",wd=Qc(()=>{const e=Ne("color"),t=Ne("font"),r=Ne("text"),n=Ne("font-weight"),o=Ne("tracking"),i=Ne("leading"),s=Ne("breakpoint"),a=Ne("container"),l=Ne("spacing"),c=Ne("radius"),d=Ne("shadow"),f=Ne("inset-shadow"),m=Ne("text-shadow"),u=Ne("drop-shadow"),w=Ne("blur"),h=Ne("perspective"),b=Ne("aspect"),v=Ne("ease"),x=Ne("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),de,ce],O=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],P=()=>[de,ce,l],D=()=>[It,"full","auto",...P()],W=()=>[mt,"none","subgrid",de,ce],G=()=>["auto",{span:["full",mt,de,ce]},mt,de,ce],z=()=>[mt,"auto",de,ce],L=()=>["auto","min","max","fr",de,ce],y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],X=()=>["auto",...P()],H=()=>[It,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],V=()=>[e,de,ce],Y=()=>[...S(),Pi,Oi,{position:[de,ce]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",md,fd,{size:[de,ce]}],I=()=>[qn,ar,Nt],K=()=>["","none","full",c,de,ce],Z=()=>["",ge,ar,Nt],te=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[ge,qn,Pi,Oi],ie=()=>["","none",w,de,ce],se=()=>["none",ge,de,ce],oe=()=>["none",ge,de,ce],le=()=>[ge,de,ce],fe=()=>[It,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lt],breakpoint:[lt],color:[ad],container:[lt],"drop-shadow":[lt],ease:["in","out","in-out"],font:[ud],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lt],shadow:[lt],spacing:["px",ge],text:[lt],"text-shadow":[lt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",It,ce,de,b]}],container:["container"],columns:[{columns:[ge,ce,de,a]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[mt,"auto",de,ce]}],basis:[{basis:[It,"full","auto",a,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ge,It,"auto","initial","none",ce]}],grow:[{grow:["",ge,de,ce]}],shrink:[{shrink:["",ge,de,ce]}],order:[{order:[mt,"first","last","none",de,ce]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...y(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...y()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":y()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:X()}],mx:[{mx:X()}],my:[{my:X()}],ms:[{ms:X()}],me:[{me:X()}],mt:[{mt:X()}],mr:[{mr:X()}],mb:[{mb:X()}],ml:[{ml:X()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[a,"screen",...H()]}],"min-w":[{"min-w":[a,"screen","none",...H()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",r,ar,Nt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,de,Jn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qn,ce]}],"font-family":[{font:[pd,ce,t]}],"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:[o,de,ce]}],"line-clamp":[{"line-clamp":[ge,"none",de,Jn]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",de,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",de,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[ge,"from-font","auto",de,Nt]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[ge,"auto",de,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de,ce]}],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",de,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mt,de,ce],radial:["",de,ce],conic:[mt,de,ce]},gd,hd]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],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:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ge,de,ce]}],"outline-w":[{outline:["",ge,ar,Nt]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",d,Ur,Br]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",f,Ur,Br]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[ge,Nt]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",m,Ur,Br]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[ge,de,ce]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[de,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":[ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,ce]}],filter:[{filter:["","none",de,ce]}],blur:[{blur:ie()}],brightness:[{brightness:[ge,de,ce]}],contrast:[{contrast:[ge,de,ce]}],"drop-shadow":[{"drop-shadow":["","none",u,Ur,Br]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",ge,de,ce]}],"hue-rotate":[{"hue-rotate":[ge,de,ce]}],invert:[{invert:["",ge,de,ce]}],saturate:[{saturate:[ge,de,ce]}],sepia:[{sepia:["",ge,de,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",de,ce]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[ge,de,ce]}],"backdrop-contrast":[{"backdrop-contrast":[ge,de,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ge,de,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ge,de,ce]}],"backdrop-invert":[{"backdrop-invert":["",ge,de,ce]}],"backdrop-opacity":[{"backdrop-opacity":[ge,de,ce]}],"backdrop-saturate":[{"backdrop-saturate":[ge,de,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",ge,de,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",de,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ge,"initial",de,ce]}],ease:[{ease:["linear","initial",v,de,ce]}],delay:[{delay:[ge,de,ce]}],animate:[{animate:["none",x,de,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,de,ce]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[de,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",de,ce]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",de,ce]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[ge,ar,Nt,Jn]}],stroke:[{stroke:["none",...V()]}],"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 pe(...e){return wd(Oc(e))}var Wr={exports:{}},lr={};/**
|
|
11
|
+
*/var bi;function Nc(){return bi||(bi=1,(function(e,t){(function(r){e.exports=r()})(function(){return(function r(n,o,i){function s(c,d){if(!o[c]){if(!n[c]){var f=typeof Lr=="function"&&Lr;if(!d&&f)return f(c,!0);if(a)return a(c,!0);var m=new Error("Cannot find module '"+c+"'");throw m.code="MODULE_NOT_FOUND",m}var u=o[c]={exports:{}};n[c][0].call(u.exports,function(x){var h=n[c][1][x];return s(h||x)},u,u.exports,r,n,o,i)}return o[c].exports}for(var a=typeof Lr=="function"&&Lr,l=0;l<i.length;l++)s(i[l]);return s})({1:[function(r,n,o){var i=r("./utils"),s=r("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.encode=function(l){for(var c,d,f,m,u,x,h,b=[],v=0,w=l.length,k=w,S=i.getTypeOf(l)!=="string";v<l.length;)k=w-v,f=S?(c=l[v++],d=v<w?l[v++]:0,v<w?l[v++]:0):(c=l.charCodeAt(v++),d=v<w?l.charCodeAt(v++):0,v<w?l.charCodeAt(v++):0),m=c>>2,u=(3&c)<<4|d>>4,x=1<k?(15&d)<<2|f>>6:64,h=2<k?63&f:64,b.push(a.charAt(m)+a.charAt(u)+a.charAt(x)+a.charAt(h));return b.join("")},o.decode=function(l){var c,d,f,m,u,x,h=0,b=0,v="data:";if(l.substr(0,v.length)===v)throw new Error("Invalid base64 input, it looks like a data url.");var w,k=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&k--,l.charAt(l.length-2)===a.charAt(64)&&k--,k%1!=0)throw new Error("Invalid base64 input, bad content length.");for(w=s.uint8array?new Uint8Array(0|k):new Array(0|k);h<l.length;)c=a.indexOf(l.charAt(h++))<<2|(m=a.indexOf(l.charAt(h++)))>>4,d=(15&m)<<4|(u=a.indexOf(l.charAt(h++)))>>2,f=(3&u)<<6|(x=a.indexOf(l.charAt(h++))),w[b++]=c,u!==64&&(w[b++]=d),x!==64&&(w[b++]=f);return w}},{"./support":30,"./utils":32}],2:[function(r,n,o){var i=r("./external"),s=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function c(d,f,m,u,x){this.compressedSize=d,this.uncompressedSize=f,this.crc32=m,this.compression=u,this.compressedContent=x}c.prototype={getContentWorker:function(){var d=new s(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new s(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(d,f,m){return d.pipe(new a).pipe(new l("uncompressedSize")).pipe(f.compressWorker(m)).pipe(new l("compressedSize")).withStreamInfo("compression",f)},n.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,n,o){var i=r("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},o.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,n,o){var i=r("./utils"),s=(function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l})();n.exports=function(a,l){return a!==void 0&&a.length?i.getTypeOf(a)!=="string"?(function(c,d,f,m){var u=s,x=m+f;c^=-1;for(var h=m;h<x;h++)c=c>>>8^u[255&(c^d[h])];return-1^c})(0|l,a,a.length,0):(function(c,d,f,m){var u=s,x=m+f;c^=-1;for(var h=m;h<x;h++)c=c>>>8^u[255&(c^d.charCodeAt(h))];return-1^c})(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(r,n,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(r,n,o){var i=null;i=typeof Promise<"u"?Promise:r("lie"),n.exports={Promise:i}},{lie:37}],7:[function(r,n,o){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=r("pako"),a=r("./utils"),l=r("./stream/GenericWorker"),c=i?"uint8array":"array";function d(f,m){l.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=m,this.meta={}}o.magic="\b\0",a.inherits(d,l),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(c,f.data),!1)},d.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(m){f.push({data:m,meta:f.meta})}},o.compressWorker=function(f){return new d("Deflate",f)},o.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,n,o){function i(u,x){var h,b="";for(h=0;h<x;h++)b+=String.fromCharCode(255&u),u>>>=8;return b}function s(u,x,h,b,v,w){var k,S,C=u.file,O=u.compression,N=w!==c.utf8encode,I=a.transformTo("string",w(C.name)),D=a.transformTo("string",c.utf8encode(C.name)),L=C.comment,Z=a.transformTo("string",w(L)),j=a.transformTo("string",c.utf8encode(L)),F=D.length!==C.name.length,y=j.length!==L.length,H="",Q="",$="",V=C.dir,Y=C.date,J={crc32:0,compressedSize:0,uncompressedSize:0};x&&!h||(J.crc32=u.crc32,J.compressedSize=u.compressedSize,J.uncompressedSize=u.uncompressedSize);var z=0;x&&(z|=8),N||!F&&!y||(z|=2048);var P=0,K=0;V&&(P|=16),v==="UNIX"?(K=798,P|=(function(te,ue){var ee=te;return te||(ee=ue?16893:33204),(65535&ee)<<16})(C.unixPermissions,V)):(K=20,P|=(function(te){return 63&(te||0)})(C.dosPermissions)),k=Y.getUTCHours(),k<<=6,k|=Y.getUTCMinutes(),k<<=5,k|=Y.getUTCSeconds()/2,S=Y.getUTCFullYear()-1980,S<<=4,S|=Y.getUTCMonth()+1,S<<=5,S|=Y.getUTCDate(),F&&(Q=i(1,1)+i(d(I),4)+D,H+="up"+i(Q.length,2)+Q),y&&($=i(1,1)+i(d(Z),4)+j,H+="uc"+i($.length,2)+$);var G="";return G+=`
|
|
12
|
+
\0`,G+=i(z,2),G+=O.magic,G+=i(k,2),G+=i(S,2),G+=i(J.crc32,4),G+=i(J.compressedSize,4),G+=i(J.uncompressedSize,4),G+=i(I.length,2),G+=i(H.length,2),{fileRecord:f.LOCAL_FILE_HEADER+G+I+H,dirRecord:f.CENTRAL_FILE_HEADER+i(K,2)+G+i(Z.length,2)+"\0\0\0\0"+i(P,4)+i(b,4)+I+H+Z}}var a=r("../utils"),l=r("../stream/GenericWorker"),c=r("../utf8"),d=r("../crc32"),f=r("../signature");function m(u,x,h,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=h,this.encodeFileName=b,this.streamFiles=u,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,l),m.prototype.push=function(u){var x=u.meta.percent||0,h=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(u):(this.bytesWritten+=u.data.length,l.prototype.push.call(this,{data:u.data,meta:{currentFile:this.currentFile,percent:h?(x+100*(h-b-1))/h:100}}))},m.prototype.openedSource=function(u){this.currentSourceOffset=this.bytesWritten,this.currentFile=u.file.name;var x=this.streamFiles&&!u.file.dir;if(x){var h=s(u,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:h.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(u){this.accumulate=!1;var x=this.streamFiles&&!u.file.dir,h=s(u,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),x)this.push({data:(function(b){return f.DATA_DESCRIPTOR+i(b.crc32,4)+i(b.compressedSize,4)+i(b.uncompressedSize,4)})(u),meta:{percent:100}});else for(this.push({data:h.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var u=this.bytesWritten,x=0;x<this.dirRecords.length;x++)this.push({data:this.dirRecords[x],meta:{percent:100}});var h=this.bytesWritten-u,b=(function(v,w,k,S,C){var O=a.transformTo("string",C(S));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(v,2)+i(v,2)+i(w,4)+i(k,4)+i(O.length,2)+O})(this.dirRecords.length,h,u,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(u){this._sources.push(u);var x=this;return u.on("data",function(h){x.processChunk(h)}),u.on("end",function(){x.closedSource(x.previous.streamInfo),x._sources.length?x.prepareNextSource():x.end()}),u.on("error",function(h){x.error(h)}),this},m.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},m.prototype.error=function(u){var x=this._sources;if(!l.prototype.error.call(this,u))return!1;for(var h=0;h<x.length;h++)try{x[h].error(u)}catch{}return!0},m.prototype.lock=function(){l.prototype.lock.call(this);for(var u=this._sources,x=0;x<u.length;x++)u[x].lock()},n.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,o){var i=r("../compressions"),s=r("./ZipFileWorker");o.generateWorker=function(a,l,c){var d=new s(l.streamFiles,c,l.platform,l.encodeFileName),f=0;try{a.forEach(function(m,u){f++;var x=(function(w,k){var S=w||k,C=i[S];if(!C)throw new Error(S+" is not a valid compression method !");return C})(u.options.compression,l.compression),h=u.options.compressionOptions||l.compressionOptions||{},b=u.dir,v=u.date;u._compressWorker(x,h).withStreamInfo("file",{name:m,dir:b,date:v,comment:u.comment||"",unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,n,o){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var s=new i;for(var a in this)typeof this[a]!="function"&&(s[a]=this[a]);return s}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(s,a){return new i().loadAsync(s,a)},i.external=r("./external"),n.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,n,o){var i=r("./utils"),s=r("./external"),a=r("./utf8"),l=r("./zipEntries"),c=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function f(m){return new s.Promise(function(u,x){var h=m.decompressed.getContentWorker().pipe(new c);h.on("error",function(b){x(b)}).on("end",function(){h.streamInfo.crc32!==m.decompressed.crc32?x(new Error("Corrupted zip : CRC32 mismatch")):u()}).resume()})}n.exports=function(m,u){var x=this;return u=i.extend(u||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(m)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",m,!0,u.optimizedBinaryString,u.base64).then(function(h){var b=new l(u);return b.load(h),b}).then(function(h){var b=[s.Promise.resolve(h)],v=h.files;if(u.checkCRC32)for(var w=0;w<v.length;w++)b.push(f(v[w]));return s.Promise.all(b)}).then(function(h){for(var b=h.shift(),v=b.files,w=0;w<v.length;w++){var k=v[w],S=k.fileNameStr,C=i.resolve(k.fileNameStr);x.file(C,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:u.createFolders}),k.dir||(x.file(C).unsafeOriginalName=S)}return b.zipComment.length&&(x.comment=b.zipComment),x})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,n,o){var i=r("../utils"),s=r("../stream/GenericWorker");function a(l,c){s.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}i.inherits(a,s),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(d){c.push({data:d,meta:{percent:0}})}).on("error",function(d){c.isPaused?this.generatedError=d:c.error(d)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,o){var i=r("readable-stream").Readable;function s(a,l,c){i.call(this,l),this._helper=a;var d=this;a.on("data",function(f,m){d.push(f)||d._helper.pause(),c&&c(m)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}r("../utils").inherits(s,i),s.prototype._read=function(){this._helper.resume()},n.exports=s},{"../utils":32,"readable-stream":16}],14:[function(r,n,o){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,s);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,s)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var s=new Buffer(i);return s.fill(0),s},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(r,n,o){function i(C,O,N){var I,D=a.getTypeOf(O),L=a.extend(N||{},d);L.date=L.date||new Date,L.compression!==null&&(L.compression=L.compression.toUpperCase()),typeof L.unixPermissions=="string"&&(L.unixPermissions=parseInt(L.unixPermissions,8)),L.unixPermissions&&16384&L.unixPermissions&&(L.dir=!0),L.dosPermissions&&16&L.dosPermissions&&(L.dir=!0),L.dir&&(C=v(C)),L.createFolders&&(I=b(C))&&w.call(this,I,!0);var Z=D==="string"&&L.binary===!1&&L.base64===!1;N&&N.binary!==void 0||(L.binary=!Z),(O instanceof f&&O.uncompressedSize===0||L.dir||!O||O.length===0)&&(L.base64=!1,L.binary=!0,O="",L.compression="STORE",D="string");var j=null;j=O instanceof f||O instanceof l?O:x.isNode&&x.isStream(O)?new h(C,O):a.prepareContent(C,O,L.binary,L.optimizedBinaryString,L.base64);var F=new m(C,j,L);this.files[C]=F}var s=r("./utf8"),a=r("./utils"),l=r("./stream/GenericWorker"),c=r("./stream/StreamHelper"),d=r("./defaults"),f=r("./compressedObject"),m=r("./zipObject"),u=r("./generate"),x=r("./nodejsUtils"),h=r("./nodejs/NodejsStreamInputAdapter"),b=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var O=C.lastIndexOf("/");return 0<O?C.substring(0,O):""},v=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},w=function(C,O){return O=O!==void 0?O:d.createFolders,C=v(C),this.files[C]||i.call(this,C,null,{dir:!0,createFolders:O}),this.files[C]};function k(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var O,N,I;for(O in this.files)I=this.files[O],(N=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&C(N,I)},filter:function(C){var O=[];return this.forEach(function(N,I){C(N,I)&&O.push(I)}),O},file:function(C,O,N){if(arguments.length!==1)return C=this.root+C,i.call(this,C,O,N),this;if(k(C)){var I=C;return this.filter(function(L,Z){return!Z.dir&&I.test(L)})}var D=this.files[this.root+C];return D&&!D.dir?D:null},folder:function(C){if(!C)return this;if(k(C))return this.filter(function(D,L){return L.dir&&C.test(D)});var O=this.root+C,N=w.call(this,O),I=this.clone();return I.root=N.name,I},remove:function(C){C=this.root+C;var O=this.files[C];if(O||(C.slice(-1)!=="/"&&(C+="/"),O=this.files[C]),O&&!O.dir)delete this.files[C];else for(var N=this.filter(function(D,L){return L.name.slice(0,C.length)===C}),I=0;I<N.length;I++)delete this.files[N[I].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var O,N={};try{if((N=a.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=N.type.toLowerCase(),N.compression=N.compression.toUpperCase(),N.type==="binarystring"&&(N.type="string"),!N.type)throw new Error("No output type specified.");a.checkSupport(N.type),N.platform!=="darwin"&&N.platform!=="freebsd"&&N.platform!=="linux"&&N.platform!=="sunos"||(N.platform="UNIX"),N.platform==="win32"&&(N.platform="DOS");var I=N.comment||this.comment||"";O=u.generateWorker(this,N,I)}catch(D){(O=new l("error")).error(D)}return new c(O,N.type||"string",N.mimeType)},generateAsync:function(C,O){return this.generateInternalStream(C).accumulate(O)},generateNodeStream:function(C,O){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(O)}};n.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,n,o){n.exports=r("stream")},{stream:void 0}],17:[function(r,n,o){var i=r("./DataReader");function s(a){i.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}r("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data[this.zero+a]},s.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===l&&this.data[m+1]===c&&this.data[m+2]===d&&this.data[m+3]===f)return m-this.zero;return-1},s.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.readData(4);return l===m[0]&&c===m[1]&&d===m[2]&&f===m[3]},s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./DataReader":18}],18:[function(r,n,o){var i=r("../utils");function s(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=s},{"../utils":32}],19:[function(r,n,o){var i=r("./Uint8ArrayReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,o){var i=r("./DataReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},s.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},s.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},s.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./DataReader":18}],21:[function(r,n,o){var i=r("./ArrayReader");function s(a){i.call(this,a)}r("../utils").inherits(s,i),s.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,o){var i=r("../utils"),s=r("../support"),a=r("./ArrayReader"),l=r("./StringReader"),c=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(f){var m=i.getTypeOf(f);return i.checkSupport(m),m!=="string"||s.uint8array?m==="nodebuffer"?new c(f):s.uint8array?new d(i.transformTo("uint8array",f)):new a(i.transformTo("array",f)):new l(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,n,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,n,o){var i=r("./GenericWorker"),s=r("../utils");function a(l){i.call(this,"ConvertWorker to "+l),this.destType=l}s.inherits(a,i),a.prototype.processChunk=function(l){this.push({data:s.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,o){var i=r("./GenericWorker"),s=r("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,i),a.prototype.processChunk=function(l){this.streamInfo.crc32=s(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,o){var i=r("../utils"),s=r("./GenericWorker");function a(l){s.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(a,s),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}s.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,o){var i=r("../utils"),s=r("./GenericWorker");function a(l){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){c.dataIsReady=!0,c.data=d,c.max=d&&d.length||0,c.type=i.getTypeOf(d),c.isPaused||c._tickAndRepeat()},function(d){c.error(d)})}i.inherits(a,s),a.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,o){function i(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,a){return this._listeners[s].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,a){if(this._listeners[s])for(var l=0;l<this._listeners[s].length;l++)this._listeners[s][l].call(this,a)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var a=this;return s.on("data",function(l){a.processChunk(l)}),s.on("end",function(){a.end()}),s.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,a){return this.extraStreamInfo[s]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},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 s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},n.exports=i},{}],29:[function(r,n,o){var i=r("../utils"),s=r("./ConvertWorker"),a=r("./GenericWorker"),l=r("../base64"),c=r("../support"),d=r("../external"),f=null;if(c.nodestream)try{f=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(x,h){return new d.Promise(function(b,v){var w=[],k=x._internalType,S=x._outputType,C=x._mimeType;x.on("data",function(O,N){w.push(O),h&&h(N)}).on("error",function(O){w=[],v(O)}).on("end",function(){try{var O=(function(N,I,D){switch(N){case"blob":return i.newBlob(i.transformTo("arraybuffer",I),D);case"base64":return l.encode(I);default:return i.transformTo(N,I)}})(S,(function(N,I){var D,L=0,Z=null,j=0;for(D=0;D<I.length;D++)j+=I[D].length;switch(N){case"string":return I.join("");case"array":return Array.prototype.concat.apply([],I);case"uint8array":for(Z=new Uint8Array(j),D=0;D<I.length;D++)Z.set(I[D],L),L+=I[D].length;return Z;case"nodebuffer":return Buffer.concat(I);default:throw new Error("concat : unsupported type '"+N+"'")}})(k,w),C);b(O)}catch(N){v(N)}w=[]}).resume()})}function u(x,h,b){var v=h;switch(h){case"blob":case"arraybuffer":v="uint8array";break;case"base64":v="string"}try{this._internalType=v,this._outputType=h,this._mimeType=b,i.checkSupport(v),this._worker=x.pipe(new s(v)),x.lock()}catch(w){this._worker=new a("error"),this._worker.error(w)}}u.prototype={accumulate:function(x){return m(this,x)},on:function(x,h){var b=this;return x==="data"?this._worker.on(x,function(v){h.call(b,v.data,v.meta)}):this._worker.on(x,function(){i.delay(h,arguments,b)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(x){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},x)}},n.exports=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,n,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var i=new ArrayBuffer(0);try{o.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(i),o.blob=s.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!r("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(r,n,o){for(var i=r("./utils"),s=r("./support"),a=r("./nodejsUtils"),l=r("./stream/GenericWorker"),c=new Array(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;c[254]=c[254]=1;function f(){l.call(this,"utf-8 decode"),this.leftOver=null}function m(){l.call(this,"utf-8 encode")}o.utf8encode=function(u){return s.nodebuffer?a.newBufferFrom(u,"utf-8"):(function(x){var h,b,v,w,k,S=x.length,C=0;for(w=0;w<S;w++)(64512&(b=x.charCodeAt(w)))==55296&&w+1<S&&(64512&(v=x.charCodeAt(w+1)))==56320&&(b=65536+(b-55296<<10)+(v-56320),w++),C+=b<128?1:b<2048?2:b<65536?3:4;for(h=s.uint8array?new Uint8Array(C):new Array(C),w=k=0;k<C;w++)(64512&(b=x.charCodeAt(w)))==55296&&w+1<S&&(64512&(v=x.charCodeAt(w+1)))==56320&&(b=65536+(b-55296<<10)+(v-56320),w++),b<128?h[k++]=b:(b<2048?h[k++]=192|b>>>6:(b<65536?h[k++]=224|b>>>12:(h[k++]=240|b>>>18,h[k++]=128|b>>>12&63),h[k++]=128|b>>>6&63),h[k++]=128|63&b);return h})(u)},o.utf8decode=function(u){return s.nodebuffer?i.transformTo("nodebuffer",u).toString("utf-8"):(function(x){var h,b,v,w,k=x.length,S=new Array(2*k);for(h=b=0;h<k;)if((v=x[h++])<128)S[b++]=v;else if(4<(w=c[v]))S[b++]=65533,h+=w-1;else{for(v&=w===2?31:w===3?15:7;1<w&&h<k;)v=v<<6|63&x[h++],w--;1<w?S[b++]=65533:v<65536?S[b++]=v:(v-=65536,S[b++]=55296|v>>10&1023,S[b++]=56320|1023&v)}return S.length!==b&&(S.subarray?S=S.subarray(0,b):S.length=b),i.applyFromCharCode(S)})(u=i.transformTo(s.uint8array?"uint8array":"array",u))},i.inherits(f,l),f.prototype.processChunk=function(u){var x=i.transformTo(s.uint8array?"uint8array":"array",u.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var h=x;(x=new Uint8Array(h.length+this.leftOver.length)).set(this.leftOver,0),x.set(h,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var b=(function(w,k){var S;for((k=k||w.length)>w.length&&(k=w.length),S=k-1;0<=S&&(192&w[S])==128;)S--;return S<0||S===0?k:S+c[w[S]]>k?S:k})(x),v=x;b!==x.length&&(s.uint8array?(v=x.subarray(0,b),this.leftOver=x.subarray(b,x.length)):(v=x.slice(0,b),this.leftOver=x.slice(b,x.length))),this.push({data:o.utf8decode(v),meta:u.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=f,i.inherits(m,l),m.prototype.processChunk=function(u){this.push({data:o.utf8encode(u.data),meta:u.meta})},o.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,o){var i=r("./support"),s=r("./base64"),a=r("./nodejsUtils"),l=r("./external");function c(h){return h}function d(h,b){for(var v=0;v<h.length;++v)b[v]=255&h.charCodeAt(v);return b}r("setimmediate"),o.newBlob=function(h,b){o.checkSupport("blob");try{return new Blob([h],{type:b})}catch{try{var v=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return v.append(h),v.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(h,b,v){var w=[],k=0,S=h.length;if(S<=v)return String.fromCharCode.apply(null,h);for(;k<S;)b==="array"||b==="nodebuffer"?w.push(String.fromCharCode.apply(null,h.slice(k,Math.min(k+v,S)))):w.push(String.fromCharCode.apply(null,h.subarray(k,Math.min(k+v,S)))),k+=v;return w.join("")},stringifyByChar:function(h){for(var b="",v=0;v<h.length;v++)b+=String.fromCharCode(h[v]);return b},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function m(h){var b=65536,v=o.getTypeOf(h),w=!0;if(v==="uint8array"?w=f.applyCanBeUsed.uint8array:v==="nodebuffer"&&(w=f.applyCanBeUsed.nodebuffer),w)for(;1<b;)try{return f.stringifyByChunk(h,v,b)}catch{b=Math.floor(b/2)}return f.stringifyByChar(h)}function u(h,b){for(var v=0;v<h.length;v++)b[v]=h[v];return b}o.applyFromCharCode=m;var x={};x.string={string:c,array:function(h){return d(h,new Array(h.length))},arraybuffer:function(h){return x.string.uint8array(h).buffer},uint8array:function(h){return d(h,new Uint8Array(h.length))},nodebuffer:function(h){return d(h,a.allocBuffer(h.length))}},x.array={string:m,array:c,arraybuffer:function(h){return new Uint8Array(h).buffer},uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(h)}},x.arraybuffer={string:function(h){return m(new Uint8Array(h))},array:function(h){return u(new Uint8Array(h),new Array(h.byteLength))},arraybuffer:c,uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(new Uint8Array(h))}},x.uint8array={string:m,array:function(h){return u(h,new Array(h.length))},arraybuffer:function(h){return h.buffer},uint8array:c,nodebuffer:function(h){return a.newBufferFrom(h)}},x.nodebuffer={string:m,array:function(h){return u(h,new Array(h.length))},arraybuffer:function(h){return x.nodebuffer.uint8array(h).buffer},uint8array:function(h){return u(h,new Uint8Array(h.length))},nodebuffer:c},o.transformTo=function(h,b){if(b=b||"",!h)return b;o.checkSupport(h);var v=o.getTypeOf(b);return x[v][h](b)},o.resolve=function(h){for(var b=h.split("/"),v=[],w=0;w<b.length;w++){var k=b[w];k==="."||k===""&&w!==0&&w!==b.length-1||(k===".."?v.pop():v.push(k))}return v.join("/")},o.getTypeOf=function(h){return typeof h=="string"?"string":Object.prototype.toString.call(h)==="[object Array]"?"array":i.nodebuffer&&a.isBuffer(h)?"nodebuffer":i.uint8array&&h instanceof Uint8Array?"uint8array":i.arraybuffer&&h instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(h){if(!i[h.toLowerCase()])throw new Error(h+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(h){var b,v,w="";for(v=0;v<(h||"").length;v++)w+="\\x"+((b=h.charCodeAt(v))<16?"0":"")+b.toString(16).toUpperCase();return w},o.delay=function(h,b,v){setImmediate(function(){h.apply(v||null,b||[])})},o.inherits=function(h,b){function v(){}v.prototype=b.prototype,h.prototype=new v},o.extend=function(){var h,b,v={};for(h=0;h<arguments.length;h++)for(b in arguments[h])Object.prototype.hasOwnProperty.call(arguments[h],b)&&v[b]===void 0&&(v[b]=arguments[h][b]);return v},o.prepareContent=function(h,b,v,w,k){return l.Promise.resolve(b).then(function(S){return i.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new l.Promise(function(C,O){var N=new FileReader;N.onload=function(I){C(I.target.result)},N.onerror=function(I){O(I.target.error)},N.readAsArrayBuffer(S)}):S}).then(function(S){var C=o.getTypeOf(S);return C?(C==="arraybuffer"?S=o.transformTo("uint8array",S):C==="string"&&(k?S=s.decode(S):v&&w!==!0&&(S=(function(O){return d(O,i.uint8array?new Uint8Array(O.length):new Array(O.length))})(S))),S):l.Promise.reject(new Error("Can't read the data of '"+h+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,n,o){var i=r("./reader/readerFor"),s=r("./utils"),a=r("./signature"),l=r("./zipEntry"),c=r("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(m)+", expected "+s.pretty(f)+")")}},isSignature:function(f,m){var u=this.reader.index;this.reader.setIndex(f);var x=this.reader.readString(4)===m;return this.reader.setIndex(u),x},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 f=this.reader.readData(this.zipCommentLength),m=c.uint8array?"uint8array":"array",u=s.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(u)},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 f,m,u,x=this.zip64EndOfCentralSize-44;0<x;)f=this.reader.readInt(2),m=this.reader.readInt(4),u=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:u}},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 f,m;for(f=0;f<this.files.length;f++)m=this.files[f],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);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 f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.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(f);var m=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.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(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var u=this.centralDirOffset+this.centralDirSize;this.zip64&&(u+=20,u+=12+this.zip64EndOfCentralSize);var x=m-u;if(0<x)this.isSignature(m,a.CENTRAL_FILE_HEADER)||(this.reader.zero=x);else if(x<0)throw new Error("Corrupted zip: missing "+Math.abs(x)+" bytes.")},prepareReader:function(f){this.reader=i(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,n,o){var i=r("./reader/readerFor"),s=r("./utils"),a=r("./compressedObject"),l=r("./crc32"),c=r("./utf8"),d=r("./compressions"),f=r("./support");function m(u,x){this.options=u,this.loadOptions=x}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(u){var x,h;if(u.skip(22),this.fileNameLength=u.readInt(2),h=u.readInt(2),this.fileName=u.readData(this.fileNameLength),u.skip(h),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((x=(function(b){for(var v in d)if(Object.prototype.hasOwnProperty.call(d,v)&&d[v].magic===b)return d[v];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,x,u.readData(this.compressedSize))},readCentralPart:function(u){this.versionMadeBy=u.readInt(2),u.skip(2),this.bitFlag=u.readInt(2),this.compressionMethod=u.readString(2),this.date=u.readDate(),this.crc32=u.readInt(4),this.compressedSize=u.readInt(4),this.uncompressedSize=u.readInt(4);var x=u.readInt(2);if(this.extraFieldsLength=u.readInt(2),this.fileCommentLength=u.readInt(2),this.diskNumberStart=u.readInt(2),this.internalFileAttributes=u.readInt(2),this.externalFileAttributes=u.readInt(4),this.localHeaderOffset=u.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");u.skip(x),this.readExtraFields(u),this.parseZIP64ExtraField(u),this.fileComment=u.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var u=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),u==0&&(this.dosPermissions=63&this.externalFileAttributes),u==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var u=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=u.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=u.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=u.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=u.readInt(4))}},readExtraFields:function(u){var x,h,b,v=u.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});u.index+4<v;)x=u.readInt(2),h=u.readInt(2),b=u.readData(h),this.extraFields[x]={id:x,length:h,value:b};u.setIndex(v)},handleUTF8:function(){var u=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var x=this.findExtraFieldUnicodePath();if(x!==null)this.fileNameStr=x;else{var h=s.transformTo(u,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(h)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var v=s.transformTo(u,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(v)}}},findExtraFieldUnicodePath:function(){var u=this.extraFields[28789];if(u){var x=i(u.value);return x.readInt(1)!==1||l(this.fileName)!==x.readInt(4)?null:c.utf8decode(x.readData(u.length-5))}return null},findExtraFieldUnicodeComment:function(){var u=this.extraFields[25461];if(u){var x=i(u.value);return x.readInt(1)!==1||l(this.fileComment)!==x.readInt(4)?null:c.utf8decode(x.readData(u.length-5))}return null}},n.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,o){function i(x,h,b){this.name=x,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=h,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var s=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),l=r("./utf8"),c=r("./compressedObject"),d=r("./stream/GenericWorker");i.prototype={internalStream:function(x){var h=null,b="string";try{if(!x)throw new Error("No output type specified.");var v=(b=x.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),h=this._decompressWorker();var w=!this._dataBinary;w&&!v&&(h=h.pipe(new l.Utf8EncodeWorker)),!w&&v&&(h=h.pipe(new l.Utf8DecodeWorker))}catch(k){(h=new d("error")).error(k)}return new s(h,b,"")},async:function(x,h){return this.internalStream(x).accumulate(h)},nodeStream:function(x,h){return this.internalStream(x||"nodebuffer").toNodejsStream(h)},_compressWorker:function(x,h){if(this._data instanceof c&&this._data.compression.magic===x.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(b,x,h)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<f.length;u++)i.prototype[f[u]]=m;n.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,o){(function(i){var s,a,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var c=0,d=new l(x),f=i.document.createTextNode("");d.observe(f,{characterData:!0}),s=function(){f.data=c=++c%2}}else if(i.setImmediate||i.MessageChannel===void 0)s="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var h=i.document.createElement("script");h.onreadystatechange=function(){x(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},i.document.documentElement.appendChild(h)}:function(){setTimeout(x,0)};else{var m=new i.MessageChannel;m.port1.onmessage=x,s=function(){m.port2.postMessage(0)}}var u=[];function x(){var h,b;a=!0;for(var v=u.length;v;){for(b=u,u=[],h=-1;++h<v;)b[h]();v=u.length}a=!1}n.exports=function(h){u.push(h)!==1||a||s()}}).call(this,typeof mt<"u"?mt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,o){var i=r("immediate");function s(){}var a={},l=["REJECTED"],c=["FULFILLED"],d=["PENDING"];function f(v){if(typeof v!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,v!==s&&h(this,v)}function m(v,w,k){this.promise=v,typeof w=="function"&&(this.onFulfilled=w,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function u(v,w,k){i(function(){var S;try{S=w(k)}catch(C){return a.reject(v,C)}S===v?a.reject(v,new TypeError("Cannot resolve promise with itself")):a.resolve(v,S)})}function x(v){var w=v&&v.then;if(v&&(typeof v=="object"||typeof v=="function")&&typeof w=="function")return function(){w.apply(v,arguments)}}function h(v,w){var k=!1;function S(N){k||(k=!0,a.reject(v,N))}function C(N){k||(k=!0,a.resolve(v,N))}var O=b(function(){w(C,S)});O.status==="error"&&S(O.value)}function b(v,w){var k={};try{k.value=v(w),k.status="success"}catch(S){k.status="error",k.value=S}return k}(n.exports=f).prototype.finally=function(v){if(typeof v!="function")return this;var w=this.constructor;return this.then(function(k){return w.resolve(v()).then(function(){return k})},function(k){return w.resolve(v()).then(function(){throw k})})},f.prototype.catch=function(v){return this.then(null,v)},f.prototype.then=function(v,w){if(typeof v!="function"&&this.state===c||typeof w!="function"&&this.state===l)return this;var k=new this.constructor(s);return this.state!==d?u(k,this.state===c?v:w,this.outcome):this.queue.push(new m(k,v,w)),k},m.prototype.callFulfilled=function(v){a.resolve(this.promise,v)},m.prototype.otherCallFulfilled=function(v){u(this.promise,this.onFulfilled,v)},m.prototype.callRejected=function(v){a.reject(this.promise,v)},m.prototype.otherCallRejected=function(v){u(this.promise,this.onRejected,v)},a.resolve=function(v,w){var k=b(x,w);if(k.status==="error")return a.reject(v,k.value);var S=k.value;if(S)h(v,S);else{v.state=c,v.outcome=w;for(var C=-1,O=v.queue.length;++C<O;)v.queue[C].callFulfilled(w)}return v},a.reject=function(v,w){v.state=l,v.outcome=w;for(var k=-1,S=v.queue.length;++k<S;)v.queue[k].callRejected(w);return v},f.resolve=function(v){return v instanceof this?v:a.resolve(new this(s),v)},f.reject=function(v){var w=new this(s);return a.reject(w,v)},f.all=function(v){var w=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=v.length,S=!1;if(!k)return this.resolve([]);for(var C=new Array(k),O=0,N=-1,I=new this(s);++N<k;)D(v[N],N);return I;function D(L,Z){w.resolve(L).then(function(j){C[Z]=j,++O!==k||S||(S=!0,a.resolve(I,C))},function(j){S||(S=!0,a.reject(I,j))})}},f.race=function(v){var w=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=v.length,S=!1;if(!k)return this.resolve([]);for(var C=-1,O=new this(s);++C<k;)N=v[C],w.resolve(N).then(function(I){S||(S=!0,a.resolve(O,I))},function(I){S||(S=!0,a.reject(O,I))});var N;return O}},{immediate:36}],38:[function(r,n,o){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),n.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,n,o){var i=r("./zlib/deflate"),s=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/messages"),c=r("./zlib/zstream"),d=Object.prototype.toString,f=0,m=-1,u=0,x=8;function h(v){if(!(this instanceof h))return new h(v);this.options=s.assign({level:m,method:x,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},v||{});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 c,this.strm.avail_out=0;var k=i.deflateInit2(this.strm,w.level,w.method,w.windowBits,w.memLevel,w.strategy);if(k!==f)throw new Error(l[k]);if(w.header&&i.deflateSetHeader(this.strm,w.header),w.dictionary){var S;if(S=typeof w.dictionary=="string"?a.string2buf(w.dictionary):d.call(w.dictionary)==="[object ArrayBuffer]"?new Uint8Array(w.dictionary):w.dictionary,(k=i.deflateSetDictionary(this.strm,S))!==f)throw new Error(l[k]);this._dict_set=!0}}function b(v,w){var k=new h(w);if(k.push(v,!0),k.err)throw k.msg||l[k.err];return k.result}h.prototype.push=function(v,w){var k,S,C=this.strm,O=this.options.chunkSize;if(this.ended)return!1;S=w===~~w?w:w===!0?4:0,typeof v=="string"?C.input=a.string2buf(v):d.call(v)==="[object ArrayBuffer]"?C.input=new Uint8Array(v):C.input=v,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new s.Buf8(O),C.next_out=0,C.avail_out=O),(k=i.deflate(C,S))!==1&&k!==f)return this.onEnd(k),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(s.shrinkBuf(C.output,C.next_out))):this.onData(s.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&k!==1);return S===4?(k=i.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===f):S!==2||(this.onEnd(f),!(C.avail_out=0))},h.prototype.onData=function(v){this.chunks.push(v)},h.prototype.onEnd=function(v){v===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=v,this.msg=this.strm.msg},o.Deflate=h,o.deflate=b,o.deflateRaw=function(v,w){return(w=w||{}).raw=!0,b(v,w)},o.gzip=function(v,w){return(w=w||{}).gzip=!0,b(v,w)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,n,o){var i=r("./zlib/inflate"),s=r("./utils/common"),a=r("./utils/strings"),l=r("./zlib/constants"),c=r("./zlib/messages"),d=r("./zlib/zstream"),f=r("./zlib/gzheader"),m=Object.prototype.toString;function u(h){if(!(this instanceof u))return new u(h);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},h||{});var b=this.options;b.raw&&0<=b.windowBits&&b.windowBits<16&&(b.windowBits=-b.windowBits,b.windowBits===0&&(b.windowBits=-15)),!(0<=b.windowBits&&b.windowBits<16)||h&&h.windowBits||(b.windowBits+=32),15<b.windowBits&&b.windowBits<48&&(15&b.windowBits)==0&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var v=i.inflateInit2(this.strm,b.windowBits);if(v!==l.Z_OK)throw new Error(c[v]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function x(h,b){var v=new u(b);if(v.push(h,!0),v.err)throw v.msg||c[v.err];return v.result}u.prototype.push=function(h,b){var v,w,k,S,C,O,N=this.strm,I=this.options.chunkSize,D=this.options.dictionary,L=!1;if(this.ended)return!1;w=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof h=="string"?N.input=a.binstring2buf(h):m.call(h)==="[object ArrayBuffer]"?N.input=new Uint8Array(h):N.input=h,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new s.Buf8(I),N.next_out=0,N.avail_out=I),(v=i.inflate(N,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&D&&(O=typeof D=="string"?a.string2buf(D):m.call(D)==="[object ArrayBuffer]"?new Uint8Array(D):D,v=i.inflateSetDictionary(this.strm,O)),v===l.Z_BUF_ERROR&&L===!0&&(v=l.Z_OK,L=!1),v!==l.Z_STREAM_END&&v!==l.Z_OK)return this.onEnd(v),!(this.ended=!0);N.next_out&&(N.avail_out!==0&&v!==l.Z_STREAM_END&&(N.avail_in!==0||w!==l.Z_FINISH&&w!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=a.utf8border(N.output,N.next_out),S=N.next_out-k,C=a.buf2string(N.output,k),N.next_out=S,N.avail_out=I-S,S&&s.arraySet(N.output,N.output,k,S,0),this.onData(C)):this.onData(s.shrinkBuf(N.output,N.next_out)))),N.avail_in===0&&N.avail_out===0&&(L=!0)}while((0<N.avail_in||N.avail_out===0)&&v!==l.Z_STREAM_END);return v===l.Z_STREAM_END&&(w=l.Z_FINISH),w===l.Z_FINISH?(v=i.inflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===l.Z_OK):w!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(N.avail_out=0))},u.prototype.onData=function(h){this.chunks.push(h)},u.prototype.onEnd=function(h){h===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=h,this.msg=this.strm.msg},o.Inflate=u,o.inflate=x,o.inflateRaw=function(h,b){return(b=b||{}).raw=!0,x(h,b)},o.ungzip=x},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,n,o){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";o.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(l[f]=d[f])}}return l},o.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var s={arraySet:function(l,c,d,f,m){if(c.subarray&&l.subarray)l.set(c.subarray(d,d+f),m);else for(var u=0;u<f;u++)l[m+u]=c[d+u]},flattenChunks:function(l){var c,d,f,m,u,x;for(c=f=0,d=l.length;c<d;c++)f+=l[c].length;for(x=new Uint8Array(f),c=m=0,d=l.length;c<d;c++)u=l[c],x.set(u,m),m+=u.length;return x}},a={arraySet:function(l,c,d,f,m){for(var u=0;u<f;u++)l[m+u]=c[d+u]},flattenChunks:function(l){return[].concat.apply([],l)}};o.setTyped=function(l){l?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,s)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,a))},o.setTyped(i)},{}],42:[function(r,n,o){var i=r("./common"),s=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new i.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function d(f,m){if(m<65537&&(f.subarray&&a||!f.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(f,m));for(var u="",x=0;x<m;x++)u+=String.fromCharCode(f[x]);return u}l[254]=l[254]=1,o.string2buf=function(f){var m,u,x,h,b,v=f.length,w=0;for(h=0;h<v;h++)(64512&(u=f.charCodeAt(h)))==55296&&h+1<v&&(64512&(x=f.charCodeAt(h+1)))==56320&&(u=65536+(u-55296<<10)+(x-56320),h++),w+=u<128?1:u<2048?2:u<65536?3:4;for(m=new i.Buf8(w),h=b=0;b<w;h++)(64512&(u=f.charCodeAt(h)))==55296&&h+1<v&&(64512&(x=f.charCodeAt(h+1)))==56320&&(u=65536+(u-55296<<10)+(x-56320),h++),u<128?m[b++]=u:(u<2048?m[b++]=192|u>>>6:(u<65536?m[b++]=224|u>>>12:(m[b++]=240|u>>>18,m[b++]=128|u>>>12&63),m[b++]=128|u>>>6&63),m[b++]=128|63&u);return m},o.buf2binstring=function(f){return d(f,f.length)},o.binstring2buf=function(f){for(var m=new i.Buf8(f.length),u=0,x=m.length;u<x;u++)m[u]=f.charCodeAt(u);return m},o.buf2string=function(f,m){var u,x,h,b,v=m||f.length,w=new Array(2*v);for(u=x=0;u<v;)if((h=f[u++])<128)w[x++]=h;else if(4<(b=l[h]))w[x++]=65533,u+=b-1;else{for(h&=b===2?31:b===3?15:7;1<b&&u<v;)h=h<<6|63&f[u++],b--;1<b?w[x++]=65533:h<65536?w[x++]=h:(h-=65536,w[x++]=55296|h>>10&1023,w[x++]=56320|1023&h)}return d(w,x)},o.utf8border=function(f,m){var u;for((m=m||f.length)>f.length&&(m=f.length),u=m-1;0<=u&&(192&f[u])==128;)u--;return u<0||u===0?m:u+l[f[u]]>m?u:m}},{"./common":41}],43:[function(r,n,o){n.exports=function(i,s,a,l){for(var c=65535&i|0,d=i>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(c=c+s[l++]|0)|0,--f;);c%=65521,d%=65521}return c|d<<16|0}},{}],44:[function(r,n,o){n.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,n,o){var i=(function(){for(var s,a=[],l=0;l<256;l++){s=l;for(var c=0;c<8;c++)s=1&s?3988292384^s>>>1:s>>>1;a[l]=s}return a})();n.exports=function(s,a,l,c){var d=i,f=c+l;s^=-1;for(var m=c;m<f;m++)s=s>>>8^d[255&(s^a[m])];return-1^s}},{}],46:[function(r,n,o){var i,s=r("../utils/common"),a=r("./trees"),l=r("./adler32"),c=r("./crc32"),d=r("./messages"),f=0,m=4,u=0,x=-2,h=-1,b=4,v=2,w=8,k=9,S=286,C=30,O=19,N=2*S+1,I=15,D=3,L=258,Z=L+D+1,j=42,F=113,y=1,H=2,Q=3,$=4;function V(g,B){return g.msg=d[B],B}function Y(g){return(g<<1)-(4<g?9:0)}function J(g){for(var B=g.length;0<=--B;)g[B]=0}function z(g){var B=g.state,W=B.pending;W>g.avail_out&&(W=g.avail_out),W!==0&&(s.arraySet(g.output,B.pending_buf,B.pending_out,W,g.next_out),g.next_out+=W,B.pending_out+=W,g.total_out+=W,g.avail_out-=W,B.pending-=W,B.pending===0&&(B.pending_out=0))}function P(g,B){a._tr_flush_block(g,0<=g.block_start?g.block_start:-1,g.strstart-g.block_start,B),g.block_start=g.strstart,z(g.strm)}function K(g,B){g.pending_buf[g.pending++]=B}function G(g,B){g.pending_buf[g.pending++]=B>>>8&255,g.pending_buf[g.pending++]=255&B}function te(g,B){var W,E,A=g.max_chain_length,R=g.strstart,X=g.prev_length,U=g.nice_match,M=g.strstart>g.w_size-Z?g.strstart-(g.w_size-Z):0,q=g.window,ne=g.w_mask,re=g.prev,ae=g.strstart+L,he=q[R+X-1],me=q[R+X];g.prev_length>=g.good_match&&(A>>=2),U>g.lookahead&&(U=g.lookahead);do if(q[(W=B)+X]===me&&q[W+X-1]===he&&q[W]===q[R]&&q[++W]===q[R+1]){R+=2,W++;do;while(q[++R]===q[++W]&&q[++R]===q[++W]&&q[++R]===q[++W]&&q[++R]===q[++W]&&q[++R]===q[++W]&&q[++R]===q[++W]&&q[++R]===q[++W]&&q[++R]===q[++W]&&R<ae);if(E=L-(ae-R),R=ae-L,X<E){if(g.match_start=B,U<=(X=E))break;he=q[R+X-1],me=q[R+X]}}while((B=re[B&ne])>M&&--A!=0);return X<=g.lookahead?X:g.lookahead}function ue(g){var B,W,E,A,R,X,U,M,q,ne,re=g.w_size;do{if(A=g.window_size-g.lookahead-g.strstart,g.strstart>=re+(re-Z)){for(s.arraySet(g.window,g.window,re,re,0),g.match_start-=re,g.strstart-=re,g.block_start-=re,B=W=g.hash_size;E=g.head[--B],g.head[B]=re<=E?E-re:0,--W;);for(B=W=re;E=g.prev[--B],g.prev[B]=re<=E?E-re:0,--W;);A+=re}if(g.strm.avail_in===0)break;if(X=g.strm,U=g.window,M=g.strstart+g.lookahead,q=A,ne=void 0,ne=X.avail_in,q<ne&&(ne=q),W=ne===0?0:(X.avail_in-=ne,s.arraySet(U,X.input,X.next_in,ne,M),X.state.wrap===1?X.adler=l(X.adler,U,ne,M):X.state.wrap===2&&(X.adler=c(X.adler,U,ne,M)),X.next_in+=ne,X.total_in+=ne,ne),g.lookahead+=W,g.lookahead+g.insert>=D)for(R=g.strstart-g.insert,g.ins_h=g.window[R],g.ins_h=(g.ins_h<<g.hash_shift^g.window[R+1])&g.hash_mask;g.insert&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[R+D-1])&g.hash_mask,g.prev[R&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=R,R++,g.insert--,!(g.lookahead+g.insert<D)););}while(g.lookahead<Z&&g.strm.avail_in!==0)}function ee(g,B){for(var W,E;;){if(g.lookahead<Z){if(ue(g),g.lookahead<Z&&B===f)return y;if(g.lookahead===0)break}if(W=0,g.lookahead>=D&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,W=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),W!==0&&g.strstart-W<=g.w_size-Z&&(g.match_length=te(g,W)),g.match_length>=D)if(E=a._tr_tally(g,g.strstart-g.match_start,g.match_length-D),g.lookahead-=g.match_length,g.match_length<=g.max_lazy_match&&g.lookahead>=D){for(g.match_length--;g.strstart++,g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,W=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart,--g.match_length!=0;);g.strstart++}else g.strstart+=g.match_length,g.match_length=0,g.ins_h=g.window[g.strstart],g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+1])&g.hash_mask;else E=a._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++;if(E&&(P(g,!1),g.strm.avail_out===0))return y}return g.insert=g.strstart<D-1?g.strstart:D-1,B===m?(P(g,!0),g.strm.avail_out===0?Q:$):g.last_lit&&(P(g,!1),g.strm.avail_out===0)?y:H}function ie(g,B){for(var W,E,A;;){if(g.lookahead<Z){if(ue(g),g.lookahead<Z&&B===f)return y;if(g.lookahead===0)break}if(W=0,g.lookahead>=D&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,W=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),g.prev_length=g.match_length,g.prev_match=g.match_start,g.match_length=D-1,W!==0&&g.prev_length<g.max_lazy_match&&g.strstart-W<=g.w_size-Z&&(g.match_length=te(g,W),g.match_length<=5&&(g.strategy===1||g.match_length===D&&4096<g.strstart-g.match_start)&&(g.match_length=D-1)),g.prev_length>=D&&g.match_length<=g.prev_length){for(A=g.strstart+g.lookahead-D,E=a._tr_tally(g,g.strstart-1-g.prev_match,g.prev_length-D),g.lookahead-=g.prev_length-1,g.prev_length-=2;++g.strstart<=A&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+D-1])&g.hash_mask,W=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),--g.prev_length!=0;);if(g.match_available=0,g.match_length=D-1,g.strstart++,E&&(P(g,!1),g.strm.avail_out===0))return y}else if(g.match_available){if((E=a._tr_tally(g,0,g.window[g.strstart-1]))&&P(g,!1),g.strstart++,g.lookahead--,g.strm.avail_out===0)return y}else g.match_available=1,g.strstart++,g.lookahead--}return g.match_available&&(E=a._tr_tally(g,0,g.window[g.strstart-1]),g.match_available=0),g.insert=g.strstart<D-1?g.strstart:D-1,B===m?(P(g,!0),g.strm.avail_out===0?Q:$):g.last_lit&&(P(g,!1),g.strm.avail_out===0)?y:H}function se(g,B,W,E,A){this.good_length=g,this.max_lazy=B,this.nice_length=W,this.max_chain=E,this.func=A}function oe(){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 s.Buf16(2*N),this.dyn_dtree=new s.Buf16(2*(2*C+1)),this.bl_tree=new s.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 s.Buf16(I+1),this.heap=new s.Buf16(2*S+1),J(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.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 le(g){var B;return g&&g.state?(g.total_in=g.total_out=0,g.data_type=v,(B=g.state).pending=0,B.pending_out=0,B.wrap<0&&(B.wrap=-B.wrap),B.status=B.wrap?j:F,g.adler=B.wrap===2?0:1,B.last_flush=f,a._tr_init(B),u):V(g,x)}function fe(g){var B=le(g);return B===u&&(function(W){W.window_size=2*W.w_size,J(W.head),W.max_lazy_match=i[W.level].max_lazy,W.good_match=i[W.level].good_length,W.nice_match=i[W.level].nice_length,W.max_chain_length=i[W.level].max_chain,W.strstart=0,W.block_start=0,W.lookahead=0,W.insert=0,W.match_length=W.prev_length=D-1,W.match_available=0,W.ins_h=0})(g.state),B}function xe(g,B,W,E,A,R){if(!g)return x;var X=1;if(B===h&&(B=6),E<0?(X=0,E=-E):15<E&&(X=2,E-=16),A<1||k<A||W!==w||E<8||15<E||B<0||9<B||R<0||b<R)return V(g,x);E===8&&(E=9);var U=new oe;return(g.state=U).strm=g,U.wrap=X,U.gzhead=null,U.w_bits=E,U.w_size=1<<U.w_bits,U.w_mask=U.w_size-1,U.hash_bits=A+7,U.hash_size=1<<U.hash_bits,U.hash_mask=U.hash_size-1,U.hash_shift=~~((U.hash_bits+D-1)/D),U.window=new s.Buf8(2*U.w_size),U.head=new s.Buf16(U.hash_size),U.prev=new s.Buf16(U.w_size),U.lit_bufsize=1<<A+6,U.pending_buf_size=4*U.lit_bufsize,U.pending_buf=new s.Buf8(U.pending_buf_size),U.d_buf=1*U.lit_bufsize,U.l_buf=3*U.lit_bufsize,U.level=B,U.strategy=R,U.method=W,fe(g)}i=[new se(0,0,0,0,function(g,B){var W=65535;for(W>g.pending_buf_size-5&&(W=g.pending_buf_size-5);;){if(g.lookahead<=1){if(ue(g),g.lookahead===0&&B===f)return y;if(g.lookahead===0)break}g.strstart+=g.lookahead,g.lookahead=0;var E=g.block_start+W;if((g.strstart===0||g.strstart>=E)&&(g.lookahead=g.strstart-E,g.strstart=E,P(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-Z&&(P(g,!1),g.strm.avail_out===0))return y}return g.insert=0,B===m?(P(g,!0),g.strm.avail_out===0?Q:$):(g.strstart>g.block_start&&(P(g,!1),g.strm.avail_out),y)}),new se(4,4,8,4,ee),new se(4,5,16,8,ee),new se(4,6,32,32,ee),new se(4,4,16,16,ie),new se(8,16,32,32,ie),new se(8,16,128,128,ie),new se(8,32,128,256,ie),new se(32,128,258,1024,ie),new se(32,258,258,4096,ie)],o.deflateInit=function(g,B){return xe(g,B,w,15,8,0)},o.deflateInit2=xe,o.deflateReset=fe,o.deflateResetKeep=le,o.deflateSetHeader=function(g,B){return g&&g.state?g.state.wrap!==2?x:(g.state.gzhead=B,u):x},o.deflate=function(g,B){var W,E,A,R;if(!g||!g.state||5<B||B<0)return g?V(g,x):x;if(E=g.state,!g.output||!g.input&&g.avail_in!==0||E.status===666&&B!==m)return V(g,g.avail_out===0?-5:x);if(E.strm=g,W=E.last_flush,E.last_flush=B,E.status===j)if(E.wrap===2)g.adler=0,K(E,31),K(E,139),K(E,8),E.gzhead?(K(E,(E.gzhead.text?1:0)+(E.gzhead.hcrc?2:0)+(E.gzhead.extra?4:0)+(E.gzhead.name?8:0)+(E.gzhead.comment?16:0)),K(E,255&E.gzhead.time),K(E,E.gzhead.time>>8&255),K(E,E.gzhead.time>>16&255),K(E,E.gzhead.time>>24&255),K(E,E.level===9?2:2<=E.strategy||E.level<2?4:0),K(E,255&E.gzhead.os),E.gzhead.extra&&E.gzhead.extra.length&&(K(E,255&E.gzhead.extra.length),K(E,E.gzhead.extra.length>>8&255)),E.gzhead.hcrc&&(g.adler=c(g.adler,E.pending_buf,E.pending,0)),E.gzindex=0,E.status=69):(K(E,0),K(E,0),K(E,0),K(E,0),K(E,0),K(E,E.level===9?2:2<=E.strategy||E.level<2?4:0),K(E,3),E.status=F);else{var X=w+(E.w_bits-8<<4)<<8;X|=(2<=E.strategy||E.level<2?0:E.level<6?1:E.level===6?2:3)<<6,E.strstart!==0&&(X|=32),X+=31-X%31,E.status=F,G(E,X),E.strstart!==0&&(G(E,g.adler>>>16),G(E,65535&g.adler)),g.adler=1}if(E.status===69)if(E.gzhead.extra){for(A=E.pending;E.gzindex<(65535&E.gzhead.extra.length)&&(E.pending!==E.pending_buf_size||(E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),z(g),A=E.pending,E.pending!==E.pending_buf_size));)K(E,255&E.gzhead.extra[E.gzindex]),E.gzindex++;E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),E.gzindex===E.gzhead.extra.length&&(E.gzindex=0,E.status=73)}else E.status=73;if(E.status===73)if(E.gzhead.name){A=E.pending;do{if(E.pending===E.pending_buf_size&&(E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),z(g),A=E.pending,E.pending===E.pending_buf_size)){R=1;break}R=E.gzindex<E.gzhead.name.length?255&E.gzhead.name.charCodeAt(E.gzindex++):0,K(E,R)}while(R!==0);E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),R===0&&(E.gzindex=0,E.status=91)}else E.status=91;if(E.status===91)if(E.gzhead.comment){A=E.pending;do{if(E.pending===E.pending_buf_size&&(E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),z(g),A=E.pending,E.pending===E.pending_buf_size)){R=1;break}R=E.gzindex<E.gzhead.comment.length?255&E.gzhead.comment.charCodeAt(E.gzindex++):0,K(E,R)}while(R!==0);E.gzhead.hcrc&&E.pending>A&&(g.adler=c(g.adler,E.pending_buf,E.pending-A,A)),R===0&&(E.status=103)}else E.status=103;if(E.status===103&&(E.gzhead.hcrc?(E.pending+2>E.pending_buf_size&&z(g),E.pending+2<=E.pending_buf_size&&(K(E,255&g.adler),K(E,g.adler>>8&255),g.adler=0,E.status=F)):E.status=F),E.pending!==0){if(z(g),g.avail_out===0)return E.last_flush=-1,u}else if(g.avail_in===0&&Y(B)<=Y(W)&&B!==m)return V(g,-5);if(E.status===666&&g.avail_in!==0)return V(g,-5);if(g.avail_in!==0||E.lookahead!==0||B!==f&&E.status!==666){var U=E.strategy===2?(function(M,q){for(var ne;;){if(M.lookahead===0&&(ue(M),M.lookahead===0)){if(q===f)return y;break}if(M.match_length=0,ne=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,ne&&(P(M,!1),M.strm.avail_out===0))return y}return M.insert=0,q===m?(P(M,!0),M.strm.avail_out===0?Q:$):M.last_lit&&(P(M,!1),M.strm.avail_out===0)?y:H})(E,B):E.strategy===3?(function(M,q){for(var ne,re,ae,he,me=M.window;;){if(M.lookahead<=L){if(ue(M),M.lookahead<=L&&q===f)return y;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=D&&0<M.strstart&&(re=me[ae=M.strstart-1])===me[++ae]&&re===me[++ae]&&re===me[++ae]){he=M.strstart+L;do;while(re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&re===me[++ae]&&ae<he);M.match_length=L-(he-ae),M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=D?(ne=a._tr_tally(M,1,M.match_length-D),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(ne=a._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),ne&&(P(M,!1),M.strm.avail_out===0))return y}return M.insert=0,q===m?(P(M,!0),M.strm.avail_out===0?Q:$):M.last_lit&&(P(M,!1),M.strm.avail_out===0)?y:H})(E,B):i[E.level].func(E,B);if(U!==Q&&U!==$||(E.status=666),U===y||U===Q)return g.avail_out===0&&(E.last_flush=-1),u;if(U===H&&(B===1?a._tr_align(E):B!==5&&(a._tr_stored_block(E,0,0,!1),B===3&&(J(E.head),E.lookahead===0&&(E.strstart=0,E.block_start=0,E.insert=0))),z(g),g.avail_out===0))return E.last_flush=-1,u}return B!==m?u:E.wrap<=0?1:(E.wrap===2?(K(E,255&g.adler),K(E,g.adler>>8&255),K(E,g.adler>>16&255),K(E,g.adler>>24&255),K(E,255&g.total_in),K(E,g.total_in>>8&255),K(E,g.total_in>>16&255),K(E,g.total_in>>24&255)):(G(E,g.adler>>>16),G(E,65535&g.adler)),z(g),0<E.wrap&&(E.wrap=-E.wrap),E.pending!==0?u:1)},o.deflateEnd=function(g){var B;return g&&g.state?(B=g.state.status)!==j&&B!==69&&B!==73&&B!==91&&B!==103&&B!==F&&B!==666?V(g,x):(g.state=null,B===F?V(g,-3):u):x},o.deflateSetDictionary=function(g,B){var W,E,A,R,X,U,M,q,ne=B.length;if(!g||!g.state||(R=(W=g.state).wrap)===2||R===1&&W.status!==j||W.lookahead)return x;for(R===1&&(g.adler=l(g.adler,B,ne,0)),W.wrap=0,ne>=W.w_size&&(R===0&&(J(W.head),W.strstart=0,W.block_start=0,W.insert=0),q=new s.Buf8(W.w_size),s.arraySet(q,B,ne-W.w_size,W.w_size,0),B=q,ne=W.w_size),X=g.avail_in,U=g.next_in,M=g.input,g.avail_in=ne,g.next_in=0,g.input=B,ue(W);W.lookahead>=D;){for(E=W.strstart,A=W.lookahead-(D-1);W.ins_h=(W.ins_h<<W.hash_shift^W.window[E+D-1])&W.hash_mask,W.prev[E&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=E,E++,--A;);W.strstart=E,W.lookahead=D-1,ue(W)}return W.strstart+=W.lookahead,W.block_start=W.strstart,W.insert=W.lookahead,W.lookahead=0,W.match_length=W.prev_length=D-1,W.match_available=0,g.next_in=U,g.input=M,g.avail_in=X,W.wrap=R,u},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,n,o){n.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,n,o){n.exports=function(i,s){var a,l,c,d,f,m,u,x,h,b,v,w,k,S,C,O,N,I,D,L,Z,j,F,y,H;a=i.state,l=i.next_in,y=i.input,c=l+(i.avail_in-5),d=i.next_out,H=i.output,f=d-(s-i.avail_out),m=d+(i.avail_out-257),u=a.dmax,x=a.wsize,h=a.whave,b=a.wnext,v=a.window,w=a.hold,k=a.bits,S=a.lencode,C=a.distcode,O=(1<<a.lenbits)-1,N=(1<<a.distbits)-1;e:do{k<15&&(w+=y[l++]<<k,k+=8,w+=y[l++]<<k,k+=8),I=S[w&O];t:for(;;){if(w>>>=D=I>>>24,k-=D,(D=I>>>16&255)===0)H[d++]=65535&I;else{if(!(16&D)){if((64&D)==0){I=S[(65535&I)+(w&(1<<D)-1)];continue t}if(32&D){a.mode=12;break e}i.msg="invalid literal/length code",a.mode=30;break e}L=65535&I,(D&=15)&&(k<D&&(w+=y[l++]<<k,k+=8),L+=w&(1<<D)-1,w>>>=D,k-=D),k<15&&(w+=y[l++]<<k,k+=8,w+=y[l++]<<k,k+=8),I=C[w&N];r:for(;;){if(w>>>=D=I>>>24,k-=D,!(16&(D=I>>>16&255))){if((64&D)==0){I=C[(65535&I)+(w&(1<<D)-1)];continue r}i.msg="invalid distance code",a.mode=30;break e}if(Z=65535&I,k<(D&=15)&&(w+=y[l++]<<k,(k+=8)<D&&(w+=y[l++]<<k,k+=8)),u<(Z+=w&(1<<D)-1)){i.msg="invalid distance too far back",a.mode=30;break e}if(w>>>=D,k-=D,(D=d-f)<Z){if(h<(D=Z-D)&&a.sane){i.msg="invalid distance too far back",a.mode=30;break e}if(F=v,(j=0)===b){if(j+=x-D,D<L){for(L-=D;H[d++]=v[j++],--D;);j=d-Z,F=H}}else if(b<D){if(j+=x+b-D,(D-=b)<L){for(L-=D;H[d++]=v[j++],--D;);if(j=0,b<L){for(L-=D=b;H[d++]=v[j++],--D;);j=d-Z,F=H}}}else if(j+=b-D,D<L){for(L-=D;H[d++]=v[j++],--D;);j=d-Z,F=H}for(;2<L;)H[d++]=F[j++],H[d++]=F[j++],H[d++]=F[j++],L-=3;L&&(H[d++]=F[j++],1<L&&(H[d++]=F[j++]))}else{for(j=d-Z;H[d++]=H[j++],H[d++]=H[j++],H[d++]=H[j++],2<(L-=3););L&&(H[d++]=H[j++],1<L&&(H[d++]=H[j++]))}break}}break}}while(l<c&&d<m);l-=L=k>>3,w&=(1<<(k-=L<<3))-1,i.next_in=l,i.next_out=d,i.avail_in=l<c?c-l+5:5-(l-c),i.avail_out=d<m?m-d+257:257-(d-m),a.hold=w,a.bits=k}},{}],49:[function(r,n,o){var i=r("../utils/common"),s=r("./adler32"),a=r("./crc32"),l=r("./inffast"),c=r("./inftrees"),d=1,f=2,m=0,u=-2,x=1,h=852,b=592;function v(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 i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(j){var F;return j&&j.state?(F=j.state,j.total_in=j.total_out=F.total=0,j.msg="",F.wrap&&(j.adler=1&F.wrap),F.mode=x,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new i.Buf32(h),F.distcode=F.distdyn=new i.Buf32(b),F.sane=1,F.back=-1,m):u}function S(j){var F;return j&&j.state?((F=j.state).wsize=0,F.whave=0,F.wnext=0,k(j)):u}function C(j,F){var y,H;return j&&j.state?(H=j.state,F<0?(y=0,F=-F):(y=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?u:(H.window!==null&&H.wbits!==F&&(H.window=null),H.wrap=y,H.wbits=F,S(j))):u}function O(j,F){var y,H;return j?(H=new w,(j.state=H).window=null,(y=C(j,F))!==m&&(j.state=null),y):u}var N,I,D=!0;function L(j){if(D){var F;for(N=new i.Buf32(512),I=new i.Buf32(32),F=0;F<144;)j.lens[F++]=8;for(;F<256;)j.lens[F++]=9;for(;F<280;)j.lens[F++]=7;for(;F<288;)j.lens[F++]=8;for(c(d,j.lens,0,288,N,0,j.work,{bits:9}),F=0;F<32;)j.lens[F++]=5;c(f,j.lens,0,32,I,0,j.work,{bits:5}),D=!1}j.lencode=N,j.lenbits=9,j.distcode=I,j.distbits=5}function Z(j,F,y,H){var Q,$=j.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new i.Buf8($.wsize)),H>=$.wsize?(i.arraySet($.window,F,y-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):(H<(Q=$.wsize-$.wnext)&&(Q=H),i.arraySet($.window,F,y-H,Q,$.wnext),(H-=Q)?(i.arraySet($.window,F,y-H,H,0),$.wnext=H,$.whave=$.wsize):($.wnext+=Q,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=Q))),0}o.inflateReset=S,o.inflateReset2=C,o.inflateResetKeep=k,o.inflateInit=function(j){return O(j,15)},o.inflateInit2=O,o.inflate=function(j,F){var y,H,Q,$,V,Y,J,z,P,K,G,te,ue,ee,ie,se,oe,le,fe,xe,g,B,W,E,A=0,R=new i.Buf8(4),X=[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 u;(y=j.state).mode===12&&(y.mode=13),V=j.next_out,Q=j.output,J=j.avail_out,$=j.next_in,H=j.input,Y=j.avail_in,z=y.hold,P=y.bits,K=Y,G=J,B=m;e:for(;;)switch(y.mode){case x:if(y.wrap===0){y.mode=13;break}for(;P<16;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}if(2&y.wrap&&z===35615){R[y.check=0]=255&z,R[1]=z>>>8&255,y.check=a(y.check,R,2,0),P=z=0,y.mode=2;break}if(y.flags=0,y.head&&(y.head.done=!1),!(1&y.wrap)||(((255&z)<<8)+(z>>8))%31){j.msg="incorrect header check",y.mode=30;break}if((15&z)!=8){j.msg="unknown compression method",y.mode=30;break}if(P-=4,g=8+(15&(z>>>=4)),y.wbits===0)y.wbits=g;else if(g>y.wbits){j.msg="invalid window size",y.mode=30;break}y.dmax=1<<g,j.adler=y.check=1,y.mode=512&z?10:12,P=z=0;break;case 2:for(;P<16;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}if(y.flags=z,(255&y.flags)!=8){j.msg="unknown compression method",y.mode=30;break}if(57344&y.flags){j.msg="unknown header flags set",y.mode=30;break}y.head&&(y.head.text=z>>8&1),512&y.flags&&(R[0]=255&z,R[1]=z>>>8&255,y.check=a(y.check,R,2,0)),P=z=0,y.mode=3;case 3:for(;P<32;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}y.head&&(y.head.time=z),512&y.flags&&(R[0]=255&z,R[1]=z>>>8&255,R[2]=z>>>16&255,R[3]=z>>>24&255,y.check=a(y.check,R,4,0)),P=z=0,y.mode=4;case 4:for(;P<16;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}y.head&&(y.head.xflags=255&z,y.head.os=z>>8),512&y.flags&&(R[0]=255&z,R[1]=z>>>8&255,y.check=a(y.check,R,2,0)),P=z=0,y.mode=5;case 5:if(1024&y.flags){for(;P<16;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}y.length=z,y.head&&(y.head.extra_len=z),512&y.flags&&(R[0]=255&z,R[1]=z>>>8&255,y.check=a(y.check,R,2,0)),P=z=0}else y.head&&(y.head.extra=null);y.mode=6;case 6:if(1024&y.flags&&(Y<(te=y.length)&&(te=Y),te&&(y.head&&(g=y.head.extra_len-y.length,y.head.extra||(y.head.extra=new Array(y.head.extra_len)),i.arraySet(y.head.extra,H,$,te,g)),512&y.flags&&(y.check=a(y.check,H,te,$)),Y-=te,$+=te,y.length-=te),y.length))break e;y.length=0,y.mode=7;case 7:if(2048&y.flags){if(Y===0)break e;for(te=0;g=H[$+te++],y.head&&g&&y.length<65536&&(y.head.name+=String.fromCharCode(g)),g&&te<Y;);if(512&y.flags&&(y.check=a(y.check,H,te,$)),Y-=te,$+=te,g)break e}else y.head&&(y.head.name=null);y.length=0,y.mode=8;case 8:if(4096&y.flags){if(Y===0)break e;for(te=0;g=H[$+te++],y.head&&g&&y.length<65536&&(y.head.comment+=String.fromCharCode(g)),g&&te<Y;);if(512&y.flags&&(y.check=a(y.check,H,te,$)),Y-=te,$+=te,g)break e}else y.head&&(y.head.comment=null);y.mode=9;case 9:if(512&y.flags){for(;P<16;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}if(z!==(65535&y.check)){j.msg="header crc mismatch",y.mode=30;break}P=z=0}y.head&&(y.head.hcrc=y.flags>>9&1,y.head.done=!0),j.adler=y.check=0,y.mode=12;break;case 10:for(;P<32;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}j.adler=y.check=v(z),P=z=0,y.mode=11;case 11:if(y.havedict===0)return j.next_out=V,j.avail_out=J,j.next_in=$,j.avail_in=Y,y.hold=z,y.bits=P,2;j.adler=y.check=1,y.mode=12;case 12:if(F===5||F===6)break e;case 13:if(y.last){z>>>=7&P,P-=7&P,y.mode=27;break}for(;P<3;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}switch(y.last=1&z,P-=1,3&(z>>>=1)){case 0:y.mode=14;break;case 1:if(L(y),y.mode=20,F!==6)break;z>>>=2,P-=2;break e;case 2:y.mode=17;break;case 3:j.msg="invalid block type",y.mode=30}z>>>=2,P-=2;break;case 14:for(z>>>=7&P,P-=7&P;P<32;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}if((65535&z)!=(z>>>16^65535)){j.msg="invalid stored block lengths",y.mode=30;break}if(y.length=65535&z,P=z=0,y.mode=15,F===6)break e;case 15:y.mode=16;case 16:if(te=y.length){if(Y<te&&(te=Y),J<te&&(te=J),te===0)break e;i.arraySet(Q,H,$,te,V),Y-=te,$+=te,J-=te,V+=te,y.length-=te;break}y.mode=12;break;case 17:for(;P<14;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}if(y.nlen=257+(31&z),z>>>=5,P-=5,y.ndist=1+(31&z),z>>>=5,P-=5,y.ncode=4+(15&z),z>>>=4,P-=4,286<y.nlen||30<y.ndist){j.msg="too many length or distance symbols",y.mode=30;break}y.have=0,y.mode=18;case 18:for(;y.have<y.ncode;){for(;P<3;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}y.lens[X[y.have++]]=7&z,z>>>=3,P-=3}for(;y.have<19;)y.lens[X[y.have++]]=0;if(y.lencode=y.lendyn,y.lenbits=7,W={bits:y.lenbits},B=c(0,y.lens,0,19,y.lencode,0,y.work,W),y.lenbits=W.bits,B){j.msg="invalid code lengths set",y.mode=30;break}y.have=0,y.mode=19;case 19:for(;y.have<y.nlen+y.ndist;){for(;se=(A=y.lencode[z&(1<<y.lenbits)-1])>>>16&255,oe=65535&A,!((ie=A>>>24)<=P);){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}if(oe<16)z>>>=ie,P-=ie,y.lens[y.have++]=oe;else{if(oe===16){for(E=ie+2;P<E;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}if(z>>>=ie,P-=ie,y.have===0){j.msg="invalid bit length repeat",y.mode=30;break}g=y.lens[y.have-1],te=3+(3&z),z>>>=2,P-=2}else if(oe===17){for(E=ie+3;P<E;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}P-=ie,g=0,te=3+(7&(z>>>=ie)),z>>>=3,P-=3}else{for(E=ie+7;P<E;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}P-=ie,g=0,te=11+(127&(z>>>=ie)),z>>>=7,P-=7}if(y.have+te>y.nlen+y.ndist){j.msg="invalid bit length repeat",y.mode=30;break}for(;te--;)y.lens[y.have++]=g}}if(y.mode===30)break;if(y.lens[256]===0){j.msg="invalid code -- missing end-of-block",y.mode=30;break}if(y.lenbits=9,W={bits:y.lenbits},B=c(d,y.lens,0,y.nlen,y.lencode,0,y.work,W),y.lenbits=W.bits,B){j.msg="invalid literal/lengths set",y.mode=30;break}if(y.distbits=6,y.distcode=y.distdyn,W={bits:y.distbits},B=c(f,y.lens,y.nlen,y.ndist,y.distcode,0,y.work,W),y.distbits=W.bits,B){j.msg="invalid distances set",y.mode=30;break}if(y.mode=20,F===6)break e;case 20:y.mode=21;case 21:if(6<=Y&&258<=J){j.next_out=V,j.avail_out=J,j.next_in=$,j.avail_in=Y,y.hold=z,y.bits=P,l(j,G),V=j.next_out,Q=j.output,J=j.avail_out,$=j.next_in,H=j.input,Y=j.avail_in,z=y.hold,P=y.bits,y.mode===12&&(y.back=-1);break}for(y.back=0;se=(A=y.lencode[z&(1<<y.lenbits)-1])>>>16&255,oe=65535&A,!((ie=A>>>24)<=P);){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}if(se&&(240&se)==0){for(le=ie,fe=se,xe=oe;se=(A=y.lencode[xe+((z&(1<<le+fe)-1)>>le)])>>>16&255,oe=65535&A,!(le+(ie=A>>>24)<=P);){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}z>>>=le,P-=le,y.back+=le}if(z>>>=ie,P-=ie,y.back+=ie,y.length=oe,se===0){y.mode=26;break}if(32&se){y.back=-1,y.mode=12;break}if(64&se){j.msg="invalid literal/length code",y.mode=30;break}y.extra=15&se,y.mode=22;case 22:if(y.extra){for(E=y.extra;P<E;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}y.length+=z&(1<<y.extra)-1,z>>>=y.extra,P-=y.extra,y.back+=y.extra}y.was=y.length,y.mode=23;case 23:for(;se=(A=y.distcode[z&(1<<y.distbits)-1])>>>16&255,oe=65535&A,!((ie=A>>>24)<=P);){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}if((240&se)==0){for(le=ie,fe=se,xe=oe;se=(A=y.distcode[xe+((z&(1<<le+fe)-1)>>le)])>>>16&255,oe=65535&A,!(le+(ie=A>>>24)<=P);){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}z>>>=le,P-=le,y.back+=le}if(z>>>=ie,P-=ie,y.back+=ie,64&se){j.msg="invalid distance code",y.mode=30;break}y.offset=oe,y.extra=15&se,y.mode=24;case 24:if(y.extra){for(E=y.extra;P<E;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}y.offset+=z&(1<<y.extra)-1,z>>>=y.extra,P-=y.extra,y.back+=y.extra}if(y.offset>y.dmax){j.msg="invalid distance too far back",y.mode=30;break}y.mode=25;case 25:if(J===0)break e;if(te=G-J,y.offset>te){if((te=y.offset-te)>y.whave&&y.sane){j.msg="invalid distance too far back",y.mode=30;break}ue=te>y.wnext?(te-=y.wnext,y.wsize-te):y.wnext-te,te>y.length&&(te=y.length),ee=y.window}else ee=Q,ue=V-y.offset,te=y.length;for(J<te&&(te=J),J-=te,y.length-=te;Q[V++]=ee[ue++],--te;);y.length===0&&(y.mode=21);break;case 26:if(J===0)break e;Q[V++]=y.length,J--,y.mode=21;break;case 27:if(y.wrap){for(;P<32;){if(Y===0)break e;Y--,z|=H[$++]<<P,P+=8}if(G-=J,j.total_out+=G,y.total+=G,G&&(j.adler=y.check=y.flags?a(y.check,Q,G,V-G):s(y.check,Q,G,V-G)),G=J,(y.flags?z:v(z))!==y.check){j.msg="incorrect data check",y.mode=30;break}P=z=0}y.mode=28;case 28:if(y.wrap&&y.flags){for(;P<32;){if(Y===0)break e;Y--,z+=H[$++]<<P,P+=8}if(z!==(4294967295&y.total)){j.msg="incorrect length check",y.mode=30;break}P=z=0}y.mode=29;case 29:B=1;break e;case 30:B=-3;break e;case 31:return-4;case 32:default:return u}return j.next_out=V,j.avail_out=J,j.next_in=$,j.avail_in=Y,y.hold=z,y.bits=P,(y.wsize||G!==j.avail_out&&y.mode<30&&(y.mode<27||F!==4))&&Z(j,j.output,j.next_out,G-j.avail_out)?(y.mode=31,-4):(K-=j.avail_in,G-=j.avail_out,j.total_in+=K,j.total_out+=G,y.total+=G,y.wrap&&G&&(j.adler=y.check=y.flags?a(y.check,Q,G,j.next_out-G):s(y.check,Q,G,j.next_out-G)),j.data_type=y.bits+(y.last?64:0)+(y.mode===12?128:0)+(y.mode===20||y.mode===15?256:0),(K==0&&G===0||F===4)&&B===m&&(B=-5),B)},o.inflateEnd=function(j){if(!j||!j.state)return u;var F=j.state;return F.window&&(F.window=null),j.state=null,m},o.inflateGetHeader=function(j,F){var y;return j&&j.state?(2&(y=j.state).wrap)==0?u:((y.head=F).done=!1,m):u},o.inflateSetDictionary=function(j,F){var y,H=F.length;return j&&j.state?(y=j.state).wrap!==0&&y.mode!==11?u:y.mode===11&&s(1,F,H,0)!==y.check?-3:Z(j,F,H,H)?(y.mode=31,-4):(y.havedict=1,m):u},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,n,o){var i=r("../utils/common"),s=[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],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[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];n.exports=function(d,f,m,u,x,h,b,v){var w,k,S,C,O,N,I,D,L,Z=v.bits,j=0,F=0,y=0,H=0,Q=0,$=0,V=0,Y=0,J=0,z=0,P=null,K=0,G=new i.Buf16(16),te=new i.Buf16(16),ue=null,ee=0;for(j=0;j<=15;j++)G[j]=0;for(F=0;F<u;F++)G[f[m+F]]++;for(Q=Z,H=15;1<=H&&G[H]===0;H--);if(H<Q&&(Q=H),H===0)return x[h++]=20971520,x[h++]=20971520,v.bits=1,0;for(y=1;y<H&&G[y]===0;y++);for(Q<y&&(Q=y),j=Y=1;j<=15;j++)if(Y<<=1,(Y-=G[j])<0)return-1;if(0<Y&&(d===0||H!==1))return-1;for(te[1]=0,j=1;j<15;j++)te[j+1]=te[j]+G[j];for(F=0;F<u;F++)f[m+F]!==0&&(b[te[f[m+F]]++]=F);if(N=d===0?(P=ue=b,19):d===1?(P=s,K-=257,ue=a,ee-=257,256):(P=l,ue=c,-1),j=y,O=h,V=F=z=0,S=-1,C=(J=1<<($=Q))-1,d===1&&852<J||d===2&&592<J)return 1;for(;;){for(I=j-V,L=b[F]<N?(D=0,b[F]):b[F]>N?(D=ue[ee+b[F]],P[K+b[F]]):(D=96,0),w=1<<j-V,y=k=1<<$;x[O+(z>>V)+(k-=w)]=I<<24|D<<16|L|0,k!==0;);for(w=1<<j-1;z&w;)w>>=1;if(w!==0?(z&=w-1,z+=w):z=0,F++,--G[j]==0){if(j===H)break;j=f[m+b[F]]}if(Q<j&&(z&C)!==S){for(V===0&&(V=Q),O+=y,Y=1<<($=j-V);$+V<H&&!((Y-=G[$+V])<=0);)$++,Y<<=1;if(J+=1<<$,d===1&&852<J||d===2&&592<J)return 1;x[S=z&C]=Q<<24|$<<16|O-h|0}}return z!==0&&(x[O+z]=j-V<<24|64<<16|0),v.bits=Q,0}},{"../utils/common":41}],51:[function(r,n,o){n.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,n,o){var i=r("../utils/common"),s=0,a=1;function l(A){for(var R=A.length;0<=--R;)A[R]=0}var c=0,d=29,f=256,m=f+1+d,u=30,x=19,h=2*m+1,b=15,v=16,w=7,k=256,S=16,C=17,O=18,N=[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],I=[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],D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Z=new Array(2*(m+2));l(Z);var j=new Array(2*u);l(j);var F=new Array(512);l(F);var y=new Array(256);l(y);var H=new Array(d);l(H);var Q,$,V,Y=new Array(u);function J(A,R,X,U,M){this.static_tree=A,this.extra_bits=R,this.extra_base=X,this.elems=U,this.max_length=M,this.has_stree=A&&A.length}function z(A,R){this.dyn_tree=A,this.max_code=0,this.stat_desc=R}function P(A){return A<256?F[A]:F[256+(A>>>7)]}function K(A,R){A.pending_buf[A.pending++]=255&R,A.pending_buf[A.pending++]=R>>>8&255}function G(A,R,X){A.bi_valid>v-X?(A.bi_buf|=R<<A.bi_valid&65535,K(A,A.bi_buf),A.bi_buf=R>>v-A.bi_valid,A.bi_valid+=X-v):(A.bi_buf|=R<<A.bi_valid&65535,A.bi_valid+=X)}function te(A,R,X){G(A,X[2*R],X[2*R+1])}function ue(A,R){for(var X=0;X|=1&A,A>>>=1,X<<=1,0<--R;);return X>>>1}function ee(A,R,X){var U,M,q=new Array(b+1),ne=0;for(U=1;U<=b;U++)q[U]=ne=ne+X[U-1]<<1;for(M=0;M<=R;M++){var re=A[2*M+1];re!==0&&(A[2*M]=ue(q[re]++,re))}}function ie(A){var R;for(R=0;R<m;R++)A.dyn_ltree[2*R]=0;for(R=0;R<u;R++)A.dyn_dtree[2*R]=0;for(R=0;R<x;R++)A.bl_tree[2*R]=0;A.dyn_ltree[2*k]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0}function se(A){8<A.bi_valid?K(A,A.bi_buf):0<A.bi_valid&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0}function oe(A,R,X,U){var M=2*R,q=2*X;return A[M]<A[q]||A[M]===A[q]&&U[R]<=U[X]}function le(A,R,X){for(var U=A.heap[X],M=X<<1;M<=A.heap_len&&(M<A.heap_len&&oe(R,A.heap[M+1],A.heap[M],A.depth)&&M++,!oe(R,U,A.heap[M],A.depth));)A.heap[X]=A.heap[M],X=M,M<<=1;A.heap[X]=U}function fe(A,R,X){var U,M,q,ne,re=0;if(A.last_lit!==0)for(;U=A.pending_buf[A.d_buf+2*re]<<8|A.pending_buf[A.d_buf+2*re+1],M=A.pending_buf[A.l_buf+re],re++,U===0?te(A,M,R):(te(A,(q=y[M])+f+1,R),(ne=N[q])!==0&&G(A,M-=H[q],ne),te(A,q=P(--U),X),(ne=I[q])!==0&&G(A,U-=Y[q],ne)),re<A.last_lit;);te(A,k,R)}function xe(A,R){var X,U,M,q=R.dyn_tree,ne=R.stat_desc.static_tree,re=R.stat_desc.has_stree,ae=R.stat_desc.elems,he=-1;for(A.heap_len=0,A.heap_max=h,X=0;X<ae;X++)q[2*X]!==0?(A.heap[++A.heap_len]=he=X,A.depth[X]=0):q[2*X+1]=0;for(;A.heap_len<2;)q[2*(M=A.heap[++A.heap_len]=he<2?++he:0)]=1,A.depth[M]=0,A.opt_len--,re&&(A.static_len-=ne[2*M+1]);for(R.max_code=he,X=A.heap_len>>1;1<=X;X--)le(A,q,X);for(M=ae;X=A.heap[1],A.heap[1]=A.heap[A.heap_len--],le(A,q,1),U=A.heap[1],A.heap[--A.heap_max]=X,A.heap[--A.heap_max]=U,q[2*M]=q[2*X]+q[2*U],A.depth[M]=(A.depth[X]>=A.depth[U]?A.depth[X]:A.depth[U])+1,q[2*X+1]=q[2*U+1]=M,A.heap[1]=M++,le(A,q,1),2<=A.heap_len;);A.heap[--A.heap_max]=A.heap[1],(function(me,ve){var st,je,Ct,Ee,sr,It,Ye=ve.dyn_tree,Yn=ve.max_code,Kn=ve.stat_desc.static_tree,hi=ve.stat_desc.has_stree,pi=ve.stat_desc.extra_bits,Zn=ve.stat_desc.extra_base,Ae=ve.stat_desc.max_length,Oe=0;for(Ee=0;Ee<=b;Ee++)me.bl_count[Ee]=0;for(Ye[2*me.heap[me.heap_max]+1]=0,st=me.heap_max+1;st<h;st++)Ae<(Ee=Ye[2*Ye[2*(je=me.heap[st])+1]+1]+1)&&(Ee=Ae,Oe++),Ye[2*je+1]=Ee,Yn<je||(me.bl_count[Ee]++,sr=0,Zn<=je&&(sr=pi[je-Zn]),It=Ye[2*je],me.opt_len+=It*(Ee+sr),hi&&(me.static_len+=It*(Kn[2*je+1]+sr)));if(Oe!==0){do{for(Ee=Ae-1;me.bl_count[Ee]===0;)Ee--;me.bl_count[Ee]--,me.bl_count[Ee+1]+=2,me.bl_count[Ae]--,Oe-=2}while(0<Oe);for(Ee=Ae;Ee!==0;Ee--)for(je=me.bl_count[Ee];je!==0;)Yn<(Ct=me.heap[--st])||(Ye[2*Ct+1]!==Ee&&(me.opt_len+=(Ee-Ye[2*Ct+1])*Ye[2*Ct],Ye[2*Ct+1]=Ee),je--)}})(A,R),ee(q,he,A.bl_count)}function g(A,R,X){var U,M,q=-1,ne=R[1],re=0,ae=7,he=4;for(ne===0&&(ae=138,he=3),R[2*(X+1)+1]=65535,U=0;U<=X;U++)M=ne,ne=R[2*(U+1)+1],++re<ae&&M===ne||(re<he?A.bl_tree[2*M]+=re:M!==0?(M!==q&&A.bl_tree[2*M]++,A.bl_tree[2*S]++):re<=10?A.bl_tree[2*C]++:A.bl_tree[2*O]++,q=M,he=(re=0)===ne?(ae=138,3):M===ne?(ae=6,3):(ae=7,4))}function B(A,R,X){var U,M,q=-1,ne=R[1],re=0,ae=7,he=4;for(ne===0&&(ae=138,he=3),U=0;U<=X;U++)if(M=ne,ne=R[2*(U+1)+1],!(++re<ae&&M===ne)){if(re<he)for(;te(A,M,A.bl_tree),--re!=0;);else M!==0?(M!==q&&(te(A,M,A.bl_tree),re--),te(A,S,A.bl_tree),G(A,re-3,2)):re<=10?(te(A,C,A.bl_tree),G(A,re-3,3)):(te(A,O,A.bl_tree),G(A,re-11,7));q=M,he=(re=0)===ne?(ae=138,3):M===ne?(ae=6,3):(ae=7,4)}}l(Y);var W=!1;function E(A,R,X,U){G(A,(c<<1)+(U?1:0),3),(function(M,q,ne,re){se(M),K(M,ne),K(M,~ne),i.arraySet(M.pending_buf,M.window,q,ne,M.pending),M.pending+=ne})(A,R,X)}o._tr_init=function(A){W||((function(){var R,X,U,M,q,ne=new Array(b+1);for(M=U=0;M<d-1;M++)for(H[M]=U,R=0;R<1<<N[M];R++)y[U++]=M;for(y[U-1]=M,M=q=0;M<16;M++)for(Y[M]=q,R=0;R<1<<I[M];R++)F[q++]=M;for(q>>=7;M<u;M++)for(Y[M]=q<<7,R=0;R<1<<I[M]-7;R++)F[256+q++]=M;for(X=0;X<=b;X++)ne[X]=0;for(R=0;R<=143;)Z[2*R+1]=8,R++,ne[8]++;for(;R<=255;)Z[2*R+1]=9,R++,ne[9]++;for(;R<=279;)Z[2*R+1]=7,R++,ne[7]++;for(;R<=287;)Z[2*R+1]=8,R++,ne[8]++;for(ee(Z,m+1,ne),R=0;R<u;R++)j[2*R+1]=5,j[2*R]=ue(R,5);Q=new J(Z,N,f+1,m,b),$=new J(j,I,0,u,b),V=new J(new Array(0),D,0,x,w)})(),W=!0),A.l_desc=new z(A.dyn_ltree,Q),A.d_desc=new z(A.dyn_dtree,$),A.bl_desc=new z(A.bl_tree,V),A.bi_buf=0,A.bi_valid=0,ie(A)},o._tr_stored_block=E,o._tr_flush_block=function(A,R,X,U){var M,q,ne=0;0<A.level?(A.strm.data_type===2&&(A.strm.data_type=(function(re){var ae,he=4093624447;for(ae=0;ae<=31;ae++,he>>>=1)if(1&he&&re.dyn_ltree[2*ae]!==0)return s;if(re.dyn_ltree[18]!==0||re.dyn_ltree[20]!==0||re.dyn_ltree[26]!==0)return a;for(ae=32;ae<f;ae++)if(re.dyn_ltree[2*ae]!==0)return a;return s})(A)),xe(A,A.l_desc),xe(A,A.d_desc),ne=(function(re){var ae;for(g(re,re.dyn_ltree,re.l_desc.max_code),g(re,re.dyn_dtree,re.d_desc.max_code),xe(re,re.bl_desc),ae=x-1;3<=ae&&re.bl_tree[2*L[ae]+1]===0;ae--);return re.opt_len+=3*(ae+1)+5+5+4,ae})(A),M=A.opt_len+3+7>>>3,(q=A.static_len+3+7>>>3)<=M&&(M=q)):M=q=X+5,X+4<=M&&R!==-1?E(A,R,X,U):A.strategy===4||q===M?(G(A,2+(U?1:0),3),fe(A,Z,j)):(G(A,4+(U?1:0),3),(function(re,ae,he,me){var ve;for(G(re,ae-257,5),G(re,he-1,5),G(re,me-4,4),ve=0;ve<me;ve++)G(re,re.bl_tree[2*L[ve]+1],3);B(re,re.dyn_ltree,ae-1),B(re,re.dyn_dtree,he-1)})(A,A.l_desc.max_code+1,A.d_desc.max_code+1,ne+1),fe(A,A.dyn_ltree,A.dyn_dtree)),ie(A),U&&se(A)},o._tr_tally=function(A,R,X){return A.pending_buf[A.d_buf+2*A.last_lit]=R>>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&R,A.pending_buf[A.l_buf+A.last_lit]=255&X,A.last_lit++,R===0?A.dyn_ltree[2*X]++:(A.matches++,R--,A.dyn_ltree[2*(y[X]+f+1)]++,A.dyn_dtree[2*P(R)]++),A.last_lit===A.lit_bufsize-1},o._tr_align=function(A){G(A,2,3),te(A,k,Z),(function(R){R.bi_valid===16?(K(R,R.bi_buf),R.bi_buf=0,R.bi_valid=0):8<=R.bi_valid&&(R.pending_buf[R.pending++]=255&R.bi_buf,R.bi_buf>>=8,R.bi_valid-=8)})(A)}},{"../utils/common":41}],53:[function(r,n,o){n.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,n,o){(function(i){(function(s,a){if(!s.setImmediate){var l,c,d,f,m=1,u={},x=!1,h=s.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(s);b=b&&b.setTimeout?b:s,l={}.toString.call(s.process)==="[object process]"?function(S){process.nextTick(function(){w(S)})}:(function(){if(s.postMessage&&!s.importScripts){var S=!0,C=s.onmessage;return s.onmessage=function(){S=!1},s.postMessage("","*"),s.onmessage=C,S}})()?(f="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",k,!1):s.attachEvent("onmessage",k),function(S){s.postMessage(f+S,"*")}):s.MessageChannel?((d=new MessageChannel).port1.onmessage=function(S){w(S.data)},function(S){d.port2.postMessage(S)}):h&&"onreadystatechange"in h.createElement("script")?(c=h.documentElement,function(S){var C=h.createElement("script");C.onreadystatechange=function(){w(S),C.onreadystatechange=null,c.removeChild(C),C=null},c.appendChild(C)}):function(S){setTimeout(w,0,S)},b.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var C=new Array(arguments.length-1),O=0;O<C.length;O++)C[O]=arguments[O+1];var N={callback:S,args:C};return u[m]=N,l(m),m++},b.clearImmediate=v}function v(S){delete u[S]}function w(S){if(x)setTimeout(w,0,S);else{var C=u[S];if(C){x=!0;try{(function(O){var N=O.callback,I=O.args;switch(I.length){case 0:N();break;case 1:N(I[0]);break;case 2:N(I[0],I[1]);break;case 3:N(I[0],I[1],I[2]);break;default:N.apply(a,I)}})(C)}finally{v(S),x=!1}}}}function k(S){S.source===s&&typeof S.data=="string"&&S.data.indexOf(f)===0&&w(+S.data.slice(f.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof mt<"u"?mt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Gn)),Gn.exports}var zc=Nc();const jc=Ac(zc);var Fr={exports:{}},Tc=Fr.exports,vi;function Oc(){return vi||(vi=1,(function(e,t){(function(r,n){n()})(Tc,function(){function r(c,d){return typeof d>"u"?d={autoBom:!1}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function n(c,d,f){var m=new XMLHttpRequest;m.open("GET",c),m.responseType="blob",m.onload=function(){l(m.response,d,f)},m.onerror=function(){console.error("could not download file")},m.send()}function o(c){var d=new XMLHttpRequest;d.open("HEAD",c,!1);try{d.send()}catch{}return 200<=d.status&&299>=d.status}function i(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(d)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof mt=="object"&&mt.global===mt?mt:void 0,a=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(c,d,f){var m=s.URL||s.webkitURL,u=document.createElement("a");d=d||c.name||"download",u.download=d,u.rel="noopener",typeof c=="string"?(u.href=c,u.origin===location.origin?i(u):o(u.href)?n(c,d,f):i(u,u.target="_blank")):(u.href=m.createObjectURL(c),setTimeout(function(){m.revokeObjectURL(u.href)},4e4),setTimeout(function(){i(u)},0))}:"msSaveOrOpenBlob"in navigator?function(c,d,f){if(d=d||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(r(c,f),d);else if(o(c))n(c,d,f);else{var m=document.createElement("a");m.href=c,m.target="_blank",setTimeout(function(){i(m)})}}:function(c,d,f,m){if(m=m||open("","_blank"),m&&(m.document.title=m.document.body.innerText="downloading..."),typeof c=="string")return n(c,d,f);var u=c.type==="application/octet-stream",x=/constructor/i.test(s.HTMLElement)||s.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||u&&x||a)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var k=b.result;k=h?k:k.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=k:location=k,m=null},b.readAsDataURL(c)}else{var v=s.URL||s.webkitURL,w=v.createObjectURL(c);m?m.location=w:location.href=w,m=null,setTimeout(function(){v.revokeObjectURL(w)},4e4)}});s.saveAs=l.saveAs=l,e.exports=l})})(Fr)),Fr.exports}var xi=Oc();const wi=async(e,t)=>{const r=new jc,n=r.folder("config");n==null||n.file("site.json",JSON.stringify(e.site,null,2)),n==null||n.file("theme.json",JSON.stringify(e.theme,null,2)),n==null||n.file("menu.json",JSON.stringify(e.menu,null,2));const o=r.folder("pages");o==null||o.file(`${t}.json`,JSON.stringify(e.page,null,2));const i=await r.generateAsync({type:"blob"});xi.saveAs(i,`jsonpages-project-${t}-${Date.now()}.zip`)},yi=(e,t,r)=>{const{pages:n,...o}=e.site,i={page:e.page,site:o,menu:e.menu,theme:e.theme},a=`<script id="jp-baked-state" type="application/json">${JSON.stringify(i)}<\/script>`,l=r.replace("</head>",`${a}</head>`),c=new Blob([`<!DOCTYPE html>${l}`],{type:"text/html;charset=utf-8"});xi.saveAs(c,`${t}.html`)};function ki(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=ki(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Pc(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=ki(e))&&(n&&(n+=" "),n+=t);return n}const Ic=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Dc=(e,t)=>({classGroupId:e,validator:t}),Si=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Br="-",_i=[],Rc="arbitrary..",Mc=e=>{const t=Fc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Lc(s);const a=s.split(Br),l=a[0]===""&&a.length>1?1:0;return Ci(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=n[s],c=r[s];return l?c?Ic(c,l):l:c||_i}return r[s]||_i}}},Ci=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],i=r.nextPart.get(o);if(i){const c=Ci(e,t+1,i);if(c)return c}const s=r.validators;if(s===null)return;const a=t===0?e.join(Br):e.slice(t).join(Br),l=s.length;for(let c=0;c<l;c++){const d=s[c];if(d.validator(a))return d.classGroupId}},Lc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Rc+n:void 0})(),Fc=e=>{const{theme:t,classGroups:r}=e;return Bc(r,t)},Bc=(e,t)=>{const r=Si();for(const n in e){const o=e[n];Xn(o,r,n,t)}return r},Xn=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Uc(s,t,r,n)}},Uc=(e,t,r,n)=>{if(typeof e=="string"){Wc(e,t,r);return}if(typeof e=="function"){$c(e,t,r,n);return}Hc(e,t,r,n)},Wc=(e,t,r)=>{const n=e===""?t:Ei(t,e);n.classGroupId=r},$c=(e,t,r,n)=>{if(Vc(e)){Xn(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Dc(r,e))},Hc=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Xn(l,Ei(t,a),r,n)}},Ei=(e,t)=>{let r=e;const n=t.split(Br),o=n.length;for(let i=0;i<o;i++){const s=n[i];let a=r.nextPart.get(s);a||(a=Si(),r.nextPart.set(s,a)),r=a}return r},Vc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Yc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(i,s)=>{r[i]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let s=r[i];if(s!==void 0)return s;if((s=n[i])!==void 0)return o(i,s),s},set(i,s){i in r?r[i]=s:o(i,s)}}},qn="!",Ai=":",Kc=[],Ni=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Zc=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let s=0,a=0,l=0,c;const d=o.length;for(let h=0;h<d;h++){const b=o[h];if(s===0&&a===0){if(b===Ai){i.push(o.slice(l,h)),l=h+1;continue}if(b==="/"){c=h;continue}}b==="["?s++:b==="]"?s--:b==="("?a++:b===")"&&a--}const f=i.length===0?o:o.slice(l);let m=f,u=!1;f.endsWith(qn)?(m=f.slice(0,-1),u=!0):f.startsWith(qn)&&(m=f.slice(1),u=!0);const x=c&&c>l?c-l:void 0;return Ni(i,u,m,x)};if(t){const o=t+Ai,i=n;n=s=>s.startsWith(o)?i(s.slice(o.length)):Ni(Kc,!1,s,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},Gc=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const s=r[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(s)):o.push(s)}return o.length>0&&(o.sort(),n.push(...o)),n}},Xc=e=>({cache:Yc(e.cacheSize),parseClassName:Zc(e),sortModifiers:Gc(e),...Mc(e)}),qc=/\s+/,Jc=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(qc);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:f,modifiers:m,hasImportantModifier:u,baseClassName:x,maybePostfixModifierPosition:h}=r(d);if(f){l=d+(l.length>0?" "+l:l);continue}let b=!!h,v=n(b?x.substring(0,h):x);if(!v){if(!b){l=d+(l.length>0?" "+l:l);continue}if(v=n(x),!v){l=d+(l.length>0?" "+l:l);continue}b=!1}const w=m.length===0?"":m.length===1?m[0]:i(m).join(":"),k=u?w+qn:w,S=k+v;if(s.indexOf(S)>-1)continue;s.push(S);const C=o(v,b);for(let O=0;O<C.length;++O){const N=C[O];s.push(k+N)}l=d+(l.length>0?" "+l:l)}return l},Qc=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=zi(r))&&(o&&(o+=" "),o+=n);return o},zi=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=zi(e[n]))&&(r&&(r+=" "),r+=t);return r},ed=(e,...t)=>{let r,n,o,i;const s=l=>{const c=t.reduce((d,f)=>f(d),e());return r=Xc(c),n=r.cache.get,o=r.cache.set,i=a,a(l)},a=l=>{const c=n(l);if(c)return c;const d=Jc(l,r);return o(l,d),d};return i=s,(...l)=>i(Qc(...l))},td=[],Ne=e=>{const t=r=>r[e]||td;return t.isThemeGetter=!0,t},ji=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ti=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rd=/^\d+\/\d+$/,nd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,od=/\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$/,id=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ad=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dt=e=>rd.test(e),ge=e=>!!e&&!Number.isNaN(Number(e)),gt=e=>!!e&&Number.isInteger(Number(e)),Jn=e=>e.endsWith("%")&&ge(e.slice(0,-1)),ct=e=>nd.test(e),ld=()=>!0,cd=e=>od.test(e)&&!id.test(e),Oi=()=>!1,dd=e=>sd.test(e),ud=e=>ad.test(e),fd=e=>!ce(e)&&!de(e),hd=e=>Rt(e,Mi,Oi),ce=e=>ji.test(e),zt=e=>Rt(e,Li,cd),Qn=e=>Rt(e,vd,ge),Pi=e=>Rt(e,Di,Oi),pd=e=>Rt(e,Ri,ud),Ur=e=>Rt(e,Fi,dd),de=e=>Ti.test(e),lr=e=>Mt(e,Li),md=e=>Mt(e,xd),Ii=e=>Mt(e,Di),gd=e=>Mt(e,Mi),bd=e=>Mt(e,Ri),Wr=e=>Mt(e,Fi,!0),Rt=(e,t,r)=>{const n=ji.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Mt=(e,t,r=!1)=>{const n=Ti.exec(e);return n?n[1]?t(n[1]):r:!1},Di=e=>e==="position"||e==="percentage",Ri=e=>e==="image"||e==="url",Mi=e=>e==="length"||e==="size"||e==="bg-size",Li=e=>e==="length",vd=e=>e==="number",xd=e=>e==="family-name",Fi=e=>e==="shadow",wd=ed(()=>{const e=Ne("color"),t=Ne("font"),r=Ne("text"),n=Ne("font-weight"),o=Ne("tracking"),i=Ne("leading"),s=Ne("breakpoint"),a=Ne("container"),l=Ne("spacing"),c=Ne("radius"),d=Ne("shadow"),f=Ne("inset-shadow"),m=Ne("text-shadow"),u=Ne("drop-shadow"),x=Ne("blur"),h=Ne("perspective"),b=Ne("aspect"),v=Ne("ease"),w=Ne("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),de,ce],O=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],I=()=>[de,ce,l],D=()=>[Dt,"full","auto",...I()],L=()=>[gt,"none","subgrid",de,ce],Z=()=>["auto",{span:["full",gt,de,ce]},gt,de,ce],j=()=>[gt,"auto",de,ce],F=()=>["auto","min","max","fr",de,ce],y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...I()],$=()=>[Dt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],V=()=>[e,de,ce],Y=()=>[...S(),Ii,Pi,{position:[de,ce]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",gd,hd,{size:[de,ce]}],P=()=>[Jn,lr,zt],K=()=>["","none","full",c,de,ce],G=()=>["",ge,lr,zt],te=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[ge,Jn,Ii,Pi],ie=()=>["","none",x,de,ce],se=()=>["none",ge,de,ce],oe=()=>["none",ge,de,ce],le=()=>[ge,de,ce],fe=()=>[Dt,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ct],breakpoint:[ct],color:[ld],container:[ct],"drop-shadow":[ct],ease:["in","out","in-out"],font:[fd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ct],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ct],shadow:[ct],spacing:["px",ge],text:[ct],"text-shadow":[ct],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dt,ce,de,b]}],container:["container"],columns:[{columns:[ge,ce,de,a]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[gt,"auto",de,ce]}],basis:[{basis:[Dt,"full","auto",a,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ge,Dt,"auto","initial","none",ce]}],grow:[{grow:["",ge,de,ce]}],shrink:[{shrink:["",ge,de,ce]}],order:[{order:[gt,"first","last","none",de,ce]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:Z()}],"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":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...y(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...y()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":y()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[a,"screen",...$()]}],"min-w":[{"min-w":[a,"screen","none",...$()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",r,lr,zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,de,Qn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jn,ce]}],"font-family":[{font:[md,ce,t]}],"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:[o,de,ce]}],"line-clamp":[{"line-clamp":[ge,"none",de,Qn]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",de,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",de,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[ge,"from-font","auto",de,zt]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[ge,"auto",de,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de,ce]}],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",de,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gt,de,ce],radial:["",de,ce],conic:[gt,de,ce]},bd,pd]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],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:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ge,de,ce]}],"outline-w":[{outline:["",ge,lr,zt]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",d,Wr,Ur]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",f,Wr,Ur]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[ge,zt]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",m,Wr,Ur]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[ge,de,ce]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[de,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":[ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,ce]}],filter:[{filter:["","none",de,ce]}],blur:[{blur:ie()}],brightness:[{brightness:[ge,de,ce]}],contrast:[{contrast:[ge,de,ce]}],"drop-shadow":[{"drop-shadow":["","none",u,Wr,Ur]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",ge,de,ce]}],"hue-rotate":[{"hue-rotate":[ge,de,ce]}],invert:[{invert:["",ge,de,ce]}],saturate:[{saturate:[ge,de,ce]}],sepia:[{sepia:["",ge,de,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",de,ce]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[ge,de,ce]}],"backdrop-contrast":[{"backdrop-contrast":[ge,de,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ge,de,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ge,de,ce]}],"backdrop-invert":[{"backdrop-invert":["",ge,de,ce]}],"backdrop-opacity":[{"backdrop-opacity":[ge,de,ce]}],"backdrop-saturate":[{"backdrop-saturate":[ge,de,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",ge,de,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",de,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ge,"initial",de,ce]}],ease:[{ease:["linear","initial",v,de,ce]}],delay:[{delay:[ge,de,ce]}],animate:[{animate:["none",w,de,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,de,ce]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[de,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",de,ce]}],"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":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",de,ce]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[ge,lr,zt,Qn]}],stroke:[{stroke:["none",...V()]}],"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 pe(...e){return wd(Pc(e))}var $r={exports:{}},cr={};/**
|
|
13
13
|
* @license React
|
|
14
14
|
* react-jsx-runtime.production.js
|
|
15
15
|
*
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the MIT license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/var
|
|
20
|
+
*/var Bi;function yd(){if(Bi)return cr;Bi=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,i){var s=null;if(i!==void 0&&(s=""+i),o.key!==void 0&&(s=""+o.key),"key"in o){i={};for(var a in o)a!=="key"&&(i[a]=o[a])}else i=o;return o=i.ref,{$$typeof:e,type:n,key:s,ref:o!==void 0?o:null,props:i}}return cr.Fragment=t,cr.jsx=r,cr.jsxs=r,cr}var dr={};/**
|
|
21
21
|
* @license React
|
|
22
22
|
* react-jsx-runtime.development.js
|
|
23
23
|
*
|
|
@@ -25,97 +25,97 @@
|
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the MIT license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/var
|
|
28
|
+
*/var Ui;function kd(){return Ui||(Ui=1,process.env.NODE_ENV!=="production"&&(function(){function e(z){if(z==null)return null;if(typeof z=="function")return z.$$typeof===Z?null:z.displayName||z.name||null;if(typeof z=="string")return z;switch(z){case b:return"Fragment";case w:return"Profiler";case v:return"StrictMode";case O:return"Suspense";case N:return"SuspenseList";case L:return"Activity"}if(typeof z=="object")switch(typeof z.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),z.$$typeof){case h:return"Portal";case S:return z.displayName||"Context";case k:return(z._context.displayName||"Context")+".Consumer";case C:var P=z.render;return z=z.displayName,z||(z=P.displayName||P.name||"",z=z!==""?"ForwardRef("+z+")":"ForwardRef"),z;case I:return P=z.displayName||null,P!==null?P:e(z.type)||"Memo";case D:P=z._payload,z=z._init;try{return e(z(P))}catch{}}return null}function t(z){return""+z}function r(z){try{t(z);var P=!1}catch{P=!0}if(P){P=console;var K=P.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&z[Symbol.toStringTag]||z.constructor.name||"Object";return K.call(P,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),t(z)}}function n(z){if(z===b)return"<>";if(typeof z=="object"&&z!==null&&z.$$typeof===D)return"<...>";try{var P=e(z);return P?"<"+P+">":"<...>"}catch{return"<...>"}}function o(){var z=j.A;return z===null?null:z.getOwner()}function i(){return Error("react-stack-top-frame")}function s(z){if(F.call(z,"key")){var P=Object.getOwnPropertyDescriptor(z,"key").get;if(P&&P.isReactWarning)return!1}return z.key!==void 0}function a(z,P){function K(){Q||(Q=!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)",P))}K.isReactWarning=!0,Object.defineProperty(z,"key",{get:K,configurable:!0})}function l(){var z=e(this.type);return $[z]||($[z]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),z=this.props.ref,z!==void 0?z:null}function c(z,P,K,G,te,ue){var ee=K.ref;return z={$$typeof:x,type:z,key:P,props:K,_owner:G},(ee!==void 0?ee:null)!==null?Object.defineProperty(z,"ref",{enumerable:!1,get:l}):Object.defineProperty(z,"ref",{enumerable:!1,value:null}),z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(z,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(z,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.defineProperty(z,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ue}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z}function d(z,P,K,G,te,ue){var ee=P.children;if(ee!==void 0)if(G)if(y(ee)){for(G=0;G<ee.length;G++)f(ee[G]);Object.freeze&&Object.freeze(ee)}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 f(ee);if(F.call(P,"key")){ee=e(z);var ie=Object.keys(P).filter(function(oe){return oe!=="key"});G=0<ie.length?"{key: someKey, "+ie.join(": ..., ")+": ...}":"{key: someKey}",J[ee+G]||(ie=0<ie.length?"{"+ie.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
29
29
|
let props = %s;
|
|
30
30
|
<%s {...props} />
|
|
31
31
|
React keys must be passed directly to JSX without using spread:
|
|
32
32
|
let props = %s;
|
|
33
|
-
<%s key={someKey} {...props} />`,
|
|
33
|
+
<%s key={someKey} {...props} />`,G,ee,ie,ee),J[ee+G]=!0)}if(ee=null,K!==void 0&&(r(K),ee=""+K),s(P)&&(r(P.key),ee=""+P.key),"key"in P){K={};for(var se in P)se!=="key"&&(K[se]=P[se])}else K=P;return ee&&a(K,typeof z=="function"?z.displayName||z.name||"Unknown":z),c(z,ee,K,o(),te,ue)}function f(z){m(z)?z._store&&(z._store.validated=1):typeof z=="object"&&z!==null&&z.$$typeof===D&&(z._payload.status==="fulfilled"?m(z._payload.value)&&z._payload.value._store&&(z._payload.value._store.validated=1):z._store&&(z._store.validated=1))}function m(z){return typeof z=="object"&&z!==null&&z.$$typeof===x}var u=T,x=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),S=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),j=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,y=Array.isArray,H=console.createTask?console.createTask:function(){return null};u={react_stack_bottom_frame:function(z){return z()}};var Q,$={},V=u.react_stack_bottom_frame.bind(u,i)(),Y=H(n(i)),J={};dr.Fragment=b,dr.jsx=function(z,P,K){var G=1e4>j.recentlyCreatedOwnerStacks++;return d(z,P,K,!1,G?Error("react-stack-top-frame"):V,G?H(n(z)):Y)},dr.jsxs=function(z,P,K){var G=1e4>j.recentlyCreatedOwnerStacks++;return d(z,P,K,!0,G?Error("react-stack-top-frame"):V,G?H(n(z)):Y)}})()),dr}var Wi;function Sd(){return Wi||(Wi=1,process.env.NODE_ENV==="production"?$r.exports=yd():$r.exports=kd()),$r.exports}var p=Sd();const $i=T.createContext(void 0),Hi=({config:e,children:t})=>p.jsx($i.Provider,{value:{registry:e.registry,schemas:e.schemas,tenantId:e.tenantId,assets:e.assets},children:t});function ur(){const e=T.useContext($i);if(e===void 0)throw new Error("useConfig must be used within ConfigProvider");return e}const Vi=T.createContext(void 0),Hr=({mode:e,children:t})=>(T.useEffect(()=>{if(e!=="studio")return;const r=new MutationObserver(n=>{n.forEach(o=>{o.addedNodes.forEach(i=>{i instanceof HTMLElement&&i.hasAttribute("data-radix-portal")&&i.setAttribute("data-jp-studio-portal","true")})})});return r.observe(document.body,{childList:!0}),()=>r.disconnect()},[e]),p.jsx(Vi.Provider,{value:{mode:e},children:t})),Yi=()=>{const e=T.useContext(Vi);if(e===void 0)throw new Error("useStudio must be used within a StudioProvider");return e},Pe={studioStickyHeader:120,studioSelectedSection:130,studioSectionOverlay:140,studioReorderDropZone:150,studioDraggingRow:160,inspectorPanel:300,inspectorResizeHandle:310,adminModal:400,uiDialogBackdrop:450,uiDialogContent:460,uiFloating:480,radixPortal:500};/**
|
|
34
34
|
* @license lucide-react v0.474.0 - ISC
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the ISC license.
|
|
37
37
|
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/const
|
|
38
|
+
*/const _d=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ki=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
39
39
|
* @license lucide-react v0.474.0 - ISC
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the ISC license.
|
|
42
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/var
|
|
43
|
+
*/var Cd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
44
44
|
* @license lucide-react v0.474.0 - ISC
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the ISC license.
|
|
47
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/const
|
|
48
|
+
*/const Ed=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:s,...a},l)=>T.createElement("svg",{ref:l,...Cd,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Ki("lucide",o),...a},[...s.map(([c,d])=>T.createElement(c,d)),...Array.isArray(i)?i:[i]]));/**
|
|
49
49
|
* @license lucide-react v0.474.0 - ISC
|
|
50
50
|
*
|
|
51
51
|
* This source code is licensed under the ISC license.
|
|
52
52
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/const ke=(e,t)=>{const r=T.forwardRef(({className:n,...o},i)=>T.createElement(
|
|
53
|
+
*/const ke=(e,t)=>{const r=T.forwardRef(({className:n,...o},i)=>T.createElement(Ed,{ref:i,iconNode:t,className:Ki(`lucide-${_d(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
54
54
|
* @license lucide-react v0.474.0 - ISC
|
|
55
55
|
*
|
|
56
56
|
* This source code is licensed under the ISC license.
|
|
57
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/const
|
|
58
|
+
*/const Ad=ke("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
59
59
|
* @license lucide-react v0.474.0 - ISC
|
|
60
60
|
*
|
|
61
61
|
* This source code is licensed under the ISC license.
|
|
62
62
|
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/const
|
|
63
|
+
*/const Nd=ke("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
64
64
|
* @license lucide-react v0.474.0 - ISC
|
|
65
65
|
*
|
|
66
66
|
* This source code is licensed under the ISC license.
|
|
67
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/const
|
|
68
|
+
*/const zd=ke("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
69
69
|
* @license lucide-react v0.474.0 - ISC
|
|
70
70
|
*
|
|
71
71
|
* This source code is licensed under the ISC license.
|
|
72
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/const
|
|
73
|
+
*/const jd=ke("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
74
74
|
* @license lucide-react v0.474.0 - ISC
|
|
75
75
|
*
|
|
76
76
|
* This source code is licensed under the ISC license.
|
|
77
77
|
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const
|
|
78
|
+
*/const eo=ke("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
79
79
|
* @license lucide-react v0.474.0 - ISC
|
|
80
80
|
*
|
|
81
81
|
* This source code is licensed under the ISC license.
|
|
82
82
|
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const
|
|
83
|
+
*/const Vr=ke("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
84
84
|
* @license lucide-react v0.474.0 - ISC
|
|
85
85
|
*
|
|
86
86
|
* This source code is licensed under the ISC license.
|
|
87
87
|
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const
|
|
88
|
+
*/const Td=ke("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
89
89
|
* @license lucide-react v0.474.0 - ISC
|
|
90
90
|
*
|
|
91
91
|
* This source code is licensed under the ISC license.
|
|
92
92
|
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const
|
|
93
|
+
*/const to=ke("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
94
94
|
* @license lucide-react v0.474.0 - ISC
|
|
95
95
|
*
|
|
96
96
|
* This source code is licensed under the ISC license.
|
|
97
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const
|
|
98
|
+
*/const Od=ke("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
99
99
|
* @license lucide-react v0.474.0 - ISC
|
|
100
100
|
*
|
|
101
101
|
* This source code is licensed under the ISC license.
|
|
102
102
|
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const
|
|
103
|
+
*/const Zi=ke("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
|
|
104
104
|
* @license lucide-react v0.474.0 - ISC
|
|
105
105
|
*
|
|
106
106
|
* This source code is licensed under the ISC license.
|
|
107
107
|
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const
|
|
108
|
+
*/const Pd=ke("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
|
|
109
109
|
* @license lucide-react v0.474.0 - ISC
|
|
110
110
|
*
|
|
111
111
|
* This source code is licensed under the ISC license.
|
|
112
112
|
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const
|
|
113
|
+
*/const Id=ke("FileText",[["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 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
114
114
|
* @license lucide-react v0.474.0 - ISC
|
|
115
115
|
*
|
|
116
116
|
* This source code is licensed under the ISC license.
|
|
117
117
|
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const
|
|
118
|
+
*/const Dd=ke("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"}]]);/**
|
|
119
119
|
* @license lucide-react v0.474.0 - ISC
|
|
120
120
|
*
|
|
121
121
|
* This source code is licensed under the ISC license.
|
|
@@ -125,96 +125,96 @@ React keys must be passed directly to JSX without using spread:
|
|
|
125
125
|
*
|
|
126
126
|
* This source code is licensed under the ISC license.
|
|
127
127
|
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const
|
|
128
|
+
*/const Yr=ke("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"}]]);/**
|
|
129
129
|
* @license lucide-react v0.474.0 - ISC
|
|
130
130
|
*
|
|
131
131
|
* This source code is licensed under the ISC license.
|
|
132
132
|
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
-
*/const
|
|
133
|
+
*/const ro=ke("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"}]]);/**
|
|
134
134
|
* @license lucide-react v0.474.0 - ISC
|
|
135
135
|
*
|
|
136
136
|
* This source code is licensed under the ISC license.
|
|
137
137
|
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const
|
|
138
|
+
*/const Xi=ke("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
139
139
|
* @license lucide-react v0.474.0 - ISC
|
|
140
140
|
*
|
|
141
141
|
* This source code is licensed under the ISC license.
|
|
142
142
|
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/const
|
|
143
|
+
*/const Rd=ke("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"}]]);/**
|
|
144
144
|
* @license lucide-react v0.474.0 - ISC
|
|
145
145
|
*
|
|
146
146
|
* This source code is licensed under the ISC license.
|
|
147
147
|
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/const
|
|
148
|
+
*/const Md=ke("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
149
149
|
* @license lucide-react v0.474.0 - ISC
|
|
150
150
|
*
|
|
151
151
|
* This source code is licensed under the ISC license.
|
|
152
152
|
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/const
|
|
153
|
+
*/const no=ke("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
154
154
|
* @license lucide-react v0.474.0 - ISC
|
|
155
155
|
*
|
|
156
156
|
* This source code is licensed under the ISC license.
|
|
157
157
|
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const
|
|
158
|
+
*/const Ld=ke("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
159
159
|
* @license lucide-react v0.474.0 - ISC
|
|
160
160
|
*
|
|
161
161
|
* This source code is licensed under the ISC license.
|
|
162
162
|
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/const
|
|
163
|
+
*/const Fd=ke("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
164
164
|
* @license lucide-react v0.474.0 - ISC
|
|
165
165
|
*
|
|
166
166
|
* This source code is licensed under the ISC license.
|
|
167
167
|
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/const
|
|
168
|
+
*/const Bd=ke("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"}]]);/**
|
|
169
169
|
* @license lucide-react v0.474.0 - ISC
|
|
170
170
|
*
|
|
171
171
|
* This source code is licensed under the ISC license.
|
|
172
172
|
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/const
|
|
173
|
+
*/const Ud=ke("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"}]]);/**
|
|
174
174
|
* @license lucide-react v0.474.0 - ISC
|
|
175
175
|
*
|
|
176
176
|
* This source code is licensed under the ISC license.
|
|
177
177
|
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
-
*/const
|
|
178
|
+
*/const Wd=ke("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"}]]);/**
|
|
179
179
|
* @license lucide-react v0.474.0 - ISC
|
|
180
180
|
*
|
|
181
181
|
* This source code is licensed under the ISC license.
|
|
182
182
|
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
-
*/const
|
|
183
|
+
*/const $d=ke("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
184
184
|
* @license lucide-react v0.474.0 - ISC
|
|
185
185
|
*
|
|
186
186
|
* This source code is licensed under the ISC license.
|
|
187
187
|
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/const
|
|
188
|
+
*/const Kr=ke("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"}]]);/**
|
|
189
189
|
* @license lucide-react v0.474.0 - ISC
|
|
190
190
|
*
|
|
191
191
|
* This source code is licensed under the ISC license.
|
|
192
192
|
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/const
|
|
193
|
+
*/const Hd=ke("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"}]]);/**
|
|
194
194
|
* @license lucide-react v0.474.0 - ISC
|
|
195
195
|
*
|
|
196
196
|
* This source code is licensed under the ISC license.
|
|
197
197
|
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/const
|
|
198
|
+
*/const qi=ke("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
199
199
|
* @license lucide-react v0.474.0 - ISC
|
|
200
200
|
*
|
|
201
201
|
* This source code is licensed under the ISC license.
|
|
202
202
|
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
-
*/const
|
|
203
|
+
*/const Lt=ke("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
204
204
|
* @license lucide-react v0.474.0 - ISC
|
|
205
205
|
*
|
|
206
206
|
* This source code is licensed under the ISC license.
|
|
207
207
|
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
-
*/const Hd=ke("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 Vd extends T.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,t,r)}render(){return this.state.hasError?p.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:[p.jsx($d,{className:"text-amber-500",size:32}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),p.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),p.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 Yd=({type:e,scope:t,isSelected:r,sectionId:n,sectionIndex:o=0,totalSections:i=0,onReorder:s})=>{const a=typeof o=="number"&&o>0&&s,l=typeof o=="number"&&o<i-1&&s;return p.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:pe("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:p.jsxs("div",{className:pe("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:[s&&n!=null&&p.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[p.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),a&&s(n,o-1)},disabled:!a,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:p.jsx(eo,{size:12,strokeWidth:2.5})}),p.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),l&&s(n,o+2)},disabled:!l,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section down","aria-label":"Move section down",children:p.jsx(Hr,{size:12,strokeWidth:2.5})})]}),p.jsx("span",{className:"shrink-0",children:e}),p.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),p.jsx("span",{className:"shrink-0",children:t})]})})},ur=({section:e,menu:t,selectedId:r,reorderable:n,sectionIndex:o,totalSections:i,onReorder:s})=>{var v,x;const{mode:a}=Vi(),{registry:l}=dr(),c=a==="studio",d=c&&r===e.id,f=l[e.type],m=e.type==="header"||e.type==="footer"?"global":"local",u=e.type==="header"&&((v=e.settings)==null?void 0:v.sticky);if(!f)return p.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:[p.jsx("strong",{children:"Missing Component:"})," ",e.type]});const w=k=>{var G,z,L,y,$;if(!c)return;k.preventDefault(),k.stopPropagation();const S=k.currentTarget,C=k.clientX,O=k.clientY;if(k.target===S){window.parent.postMessage({type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}},"*");return}const N=document.elementFromPoint(C,O)??k.target;if(!N||!S.contains(N)){window.parent.postMessage({type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}},"*");return}if(N===S){window.parent.postMessage({type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}},"*");return}const P=[];let D=N;for(;D&&D!==S;){const X=(G=D.getAttribute)==null?void 0:G.call(D,"data-jp-item-id"),H=(z=D.getAttribute)==null?void 0:z.call(D,"data-jp-item-field");X&&H&&P.push({fieldKey:H||"items",itemId:X}),D=D.parentElement}if(P.reverse(),P.length===0)for(D=N;D&&D!==S;){const X=(L=D.getAttribute)==null?void 0:L.call(D,"data-jp-field");if(X){P.push({fieldKey:X});break}D=D.parentElement}if(P.length===0&&N){let X=null;const H=V=>{var Q,j;const Y=V.getBoundingClientRect();if(Y.left<=C&&C<=Y.right&&Y.top<=O&&O<=Y.bottom){for(let I=0;I<V.children.length;I++)H(V.children[I]);((Q=V.getAttribute)!=null&&Q.call(V,"data-jp-item-id")||(j=V.getAttribute)!=null&&j.call(V,"data-jp-field"))&&(X=V)}};if(H(N),X){const V=X,Y=(y=V.getAttribute)==null?void 0:y.call(V,"data-jp-item-id"),Q=($=V.getAttribute)==null?void 0:$.call(V,"data-jp-field");Y&&Q?P.push({fieldKey:Q||"items",itemId:Y}):Q&&P.push({fieldKey:Q})}}const W={type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}};if(P.length>0){W.itemPath=P;const X=P[0];X.itemId!=null?(W.itemField=X.fieldKey,W.itemId=X.itemId):W.itemField=X.fieldKey}window.parent.postMessage(W,"*")},h=()=>{const k=f;return e.type==="header"&&t?p.jsx(k,{data:e.data,settings:e.settings,menu:t}):p.jsx(k,{data:e.data,settings:e.settings})},b=(x=e.data)==null?void 0:x.anchorId;return p.jsxs("div",{id:b||void 0,"data-section-id":c?e.id:void 0,"data-section-type":c?e.type:void 0,"data-section-scope":c?m:void 0,...c&&d?{"data-jp-selected":!0}:{},onClickCapture:c?w:void 0,className:pe("relative w-full",c&&"group cursor-pointer",c&&u?"sticky top-0 z-[60]":"relative z-0",d&&"z-[70]"),children:[p.jsx("div",{className:"relative z-0",children:p.jsx(Vd,{type:e.type,children:h()})}),c&&p.jsx(Yd,{type:e.type,scope:m,isSelected:!!d,sectionId:n&&m==="local"?e.id:void 0,sectionIndex:n&&m==="local"?o:void 0,totalSections:n&&m==="local"?i:void 0,onReorder:n&&m==="local"?s:void 0})]})},Kd=e=>{T.useEffect(()=>{document.title=e.title;let t=document.querySelector('meta[name="description"]');t||(t=document.createElement("meta"),t.setAttribute("name","description"),document.head.appendChild(t)),t.setAttribute("content",e.description)},[e.title,e.description])},Gd="application/json",no=({pageConfig:e,siteConfig:t,menuConfig:r,selectedId:n,onReorder:o,scrollToSectionId:i,onActiveSectionChange:s})=>{var b,v;Kd(e.meta);const[a,l]=T.useState(null),c=T.useRef({}),d=T.useRef(s);d.current=s;const f=x=>{var k;(k=d.current)==null||k.call(d,x)};T.useEffect(()=>{if(!i)return;const x=c.current[i];x&&x.scrollIntoView({behavior:"smooth",block:"center"})},[i]),T.useEffect(()=>{if(!d.current)return;const k=[...t.header?[t.header.id]:[],...e.sections.map(N=>N.id),...t.footer?[t.footer.id]:[]],S=new IntersectionObserver(N=>{N.forEach(P=>{var D;if(P.isIntersecting&&P.intersectionRatio>.5){const W=P.target.getAttribute("data-section-id");W&&((D=d.current)==null||D.call(d,W))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let C=!1;const O=requestAnimationFrame(()=>{C||k.forEach(N=>{const P=c.current[N];P&&S.observe(P)})});return()=>{C=!0,cancelAnimationFrame(O),S.disconnect()}},[e.sections,(b=t.header)==null?void 0:b.id,(v=t.footer)==null?void 0:v.id]);const m=(x,k)=>{x.preventDefault(),x.dataTransfer.dropEffect="move",l(k)},u=()=>{l(null)},w=(x,k)=>{if(x.preventDefault(),l(null),!!o)try{const S=x.dataTransfer.getData(Gd),{sectionId:C}=JSON.parse(S);typeof C=="string"&&o(C,k)}catch{}},h=()=>{const x=typeof o=="function",k=e.sections.map((S,C)=>{const O=a===C;return x?p.jsxs("div",{ref:N=>{c.current[S.id]=N},"data-section-id":S.id,style:{position:"relative"},onMouseEnter:()=>f(S.id),children:[p.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:N=>m(N,C),onDragLeave:u,onDrop:N=>w(N,C)}),p.jsx(ur,{section:S,selectedId:n,reorderable:!0,sectionIndex:C,totalSections:e.sections.length,onReorder:o})]},S.id):p.jsx("div",{ref:N=>{c.current[S.id]=N},"data-section-id":S.id,onMouseEnter:()=>f(S.id),children:p.jsx(ur,{section:S,selectedId:n})},S.id)});if(x&&k.length>0){const S=e.sections.length,C=a===S;k.push(p.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:C?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:C?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:O=>m(O,S),onDragLeave:u,onDrop:O=>w(O,S)},"jp-drop-after-last"))}return k};return p.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[t.header!=null&&p.jsx("div",{ref:x=>{c.current[t.header.id]=x},"data-section-id":t.header.id,onMouseEnter:()=>f(t.header.id),children:p.jsx(ur,{section:t.header,menu:r.main,selectedId:n})}),p.jsx("main",{className:"flex-1",children:h()}),t.footer!=null&&p.jsx("div",{ref:x=>{c.current[t.footer.id]=x},"data-section-id":t.footer.id,onMouseEnter:()=>f(t.footer.id),children:p.jsx(ur,{section:t.footer,selectedId:n})})]})},Kr=({mode:e,tenantCss:t,adminCss:r,children:n})=>(T.useLayoutEffect(()=>{const o=`jp-theme-${e}`,i=e==="tenant"?t:r;if(!document.getElementById(o)&&i){const s=document.createElement("style");s.id=o,s.innerHTML=i,document.head.appendChild(s)}return()=>{const s=document.getElementById(o);s&&s.remove()}},[e,t,r]),p.jsx(p.Fragment,{children:n}));function Zd(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return T.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const Gr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Lt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function oo(e){return"nodeType"in e}function Re(e){var t,r;return e?Lt(e)?e:oo(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function io(e){const{Document:t}=Re(e);return e instanceof t}function fr(e){return Lt(e)?!1:e instanceof Re(e).HTMLElement}function qi(e){return e instanceof Re(e).SVGElement}function Ft(e){return e?Lt(e)?e.document:oo(e)?io(e)?e:fr(e)||qi(e)?e.ownerDocument:document:document:document}const Ge=Gr?T.useLayoutEffect:T.useEffect;function Zr(e){const t=T.useRef(e);return Ge(()=>{t.current=e}),T.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function Xd(){const e=T.useRef(null),t=T.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=T.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function hr(e,t){t===void 0&&(t=[e]);const r=T.useRef(e);return Ge(()=>{r.current!==e&&(r.current=e)},t),r}function pr(e,t){const r=T.useRef();return T.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function Xr(e){const t=Zr(e),r=T.useRef(null),n=T.useCallback(o=>{o!==r.current&&(t==null||t(o,r.current)),r.current=o},[]);return[r,n]}function qr(e){const t=T.useRef();return T.useEffect(()=>{t.current=e},[e]),t.current}let so={};function mr(e,t){return T.useMemo(()=>{if(t)return t;const r=so[e]==null?0:so[e]+1;return so[e]=r,e+"-"+r},[e,t])}function Ji(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((i,s)=>{const a=Object.entries(s);for(const[l,c]of a){const d=i[l];d!=null&&(i[l]=d+e*c)}return i},{...t})}}const Bt=Ji(1),gr=Ji(-1);function qd(e){return"clientX"in e&&"clientY"in e}function Jr(e){if(!e)return!1;const{KeyboardEvent:t}=Re(e.target);return t&&e instanceof t}function Jd(e){if(!e)return!1;const{TouchEvent:t}=Re(e.target);return t&&e instanceof t}function Qr(e){if(Jd(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return qd(e)?{x:e.clientX,y:e.clientY}:null}const gt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[gt.Translate.toString(e),gt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),Qi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Qd(e){return e.matches(Qi)?e:e.querySelector(Qi)}const eu={display:"none"};function tu(e){let{id:t,value:r}=e;return T.createElement("div",{id:t,style:eu},r)}function ru(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return T.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function nu(){const[e,t]=T.useState("");return{announce:T.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const es=T.createContext(null);function ou(e){const t=T.useContext(es);T.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function iu(){const[e]=T.useState(()=>new Set),t=T.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[T.useCallback(n=>{let{type:o,event:i}=n;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const su={draggable:`
|
|
208
|
+
*/const Vd=ke("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 Yd extends T.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,t,r)}render(){return this.state.hasError?p.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:[p.jsx(Hd,{className:"text-amber-500",size:32}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),p.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),p.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 Kd=({type:e,scope:t,isSelected:r,sectionId:n,sectionIndex:o=0,totalSections:i=0,onReorder:s})=>{const a=typeof o=="number"&&o>0&&s,l=typeof o=="number"&&o<i-1&&s;return p.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,style:{zIndex:Pe.studioSectionOverlay},className:pe("absolute inset-0 pointer-events-none transition-all duration-200","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:p.jsxs("div",{className:pe("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:[s&&n!=null&&p.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[p.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),a&&s(n,o-1)},disabled:!a,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:p.jsx(to,{size:12,strokeWidth:2.5})}),p.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),l&&s(n,o+2)},disabled:!l,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section down","aria-label":"Move section down",children:p.jsx(Vr,{size:12,strokeWidth:2.5})})]}),p.jsx("span",{className:"shrink-0",children:e}),p.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),p.jsx("span",{className:"shrink-0",children:t})]})})},fr=({section:e,menu:t,selectedId:r,reorderable:n,sectionIndex:o,totalSections:i,onReorder:s})=>{var w,k;const{mode:a}=Yi(),{registry:l}=ur(),c=a==="studio",d=c&&r===e.id,f=l[e.type],m=e.type==="header"||e.type==="footer"?"global":"local",u=e.type==="header"&&((w=e.settings)==null?void 0:w.sticky);if(!f)return p.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:[p.jsx("strong",{children:"Missing Component:"})," ",e.type]});const x=S=>{var j,F,y,H,Q;if(!c)return;S.preventDefault(),S.stopPropagation();const C=S.currentTarget,O=S.clientX,N=S.clientY;if(S.target===C){window.parent.postMessage({type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}},"*");return}const I=document.elementFromPoint(O,N)??S.target;if(!I||!C.contains(I)){window.parent.postMessage({type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}},"*");return}if(I===C){window.parent.postMessage({type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}},"*");return}const D=[];let L=I;for(;L&&L!==C;){const $=(j=L.getAttribute)==null?void 0:j.call(L,"data-jp-item-id"),V=(F=L.getAttribute)==null?void 0:F.call(L,"data-jp-item-field");$&&V&&D.push({fieldKey:V||"items",itemId:$}),L=L.parentElement}if(D.reverse(),D.length===0)for(L=I;L&&L!==C;){const $=(y=L.getAttribute)==null?void 0:y.call(L,"data-jp-field");if($){D.push({fieldKey:$});break}L=L.parentElement}if(D.length===0&&I){let $=null;const V=Y=>{var z,P;const J=Y.getBoundingClientRect();if(J.left<=O&&O<=J.right&&J.top<=N&&N<=J.bottom){for(let K=0;K<Y.children.length;K++)V(Y.children[K]);((z=Y.getAttribute)!=null&&z.call(Y,"data-jp-item-id")||(P=Y.getAttribute)!=null&&P.call(Y,"data-jp-field"))&&($=Y)}};if(V(I),$){const Y=$,J=(H=Y.getAttribute)==null?void 0:H.call(Y,"data-jp-item-id"),z=(Q=Y.getAttribute)==null?void 0:Q.call(Y,"data-jp-field");J&&z?D.push({fieldKey:z||"items",itemId:J}):z&&D.push({fieldKey:z})}}const Z={type:Ce.SECTION_SELECT,section:{id:e.id,type:e.type,scope:m}};if(D.length>0){Z.itemPath=D;const $=D[0];$.itemId!=null?(Z.itemField=$.fieldKey,Z.itemId=$.itemId):Z.itemField=$.fieldKey}window.parent.postMessage(Z,"*")},h=()=>{const S=f;return e.type==="header"&&t?p.jsx(S,{data:e.data,settings:e.settings,menu:t}):p.jsx(S,{data:e.data,settings:e.settings})},b=(k=e.data)==null?void 0:k.anchorId,v=c?d?Pe.studioSelectedSection:u?Pe.studioStickyHeader:void 0:void 0;return p.jsxs("div",{id:b||void 0,"data-section-id":c?e.id:void 0,"data-section-type":c?e.type:void 0,"data-section-scope":c?m:void 0,...c&&d?{"data-jp-selected":!0}:{},onClickCapture:c?x:void 0,style:v!=null?{zIndex:v}:void 0,className:pe("relative w-full",c&&"group cursor-pointer",c&&u&&"sticky top-0"),children:[p.jsx("div",{className:"relative",children:p.jsx(Yd,{type:e.type,children:h()})}),c&&p.jsx(Kd,{type:e.type,scope:m,isSelected:!!d,sectionId:n&&m==="local"?e.id:void 0,sectionIndex:n&&m==="local"?o:void 0,totalSections:n&&m==="local"?i:void 0,onReorder:n&&m==="local"?s:void 0})]})},Zd=e=>{T.useEffect(()=>{document.title=e.title;let t=document.querySelector('meta[name="description"]');t||(t=document.createElement("meta"),t.setAttribute("name","description"),document.head.appendChild(t)),t.setAttribute("content",e.description)},[e.title,e.description])},Gd="application/json",oo=({pageConfig:e,siteConfig:t,menuConfig:r,selectedId:n,onReorder:o,scrollToSectionId:i,onActiveSectionChange:s})=>{var b,v;Zd(e.meta);const[a,l]=T.useState(null),c=T.useRef({}),d=T.useRef(s);d.current=s;const f=w=>{var k;(k=d.current)==null||k.call(d,w)};T.useEffect(()=>{if(!i)return;const w=c.current[i];w&&w.scrollIntoView({behavior:"smooth",block:"center"})},[i]),T.useEffect(()=>{if(!d.current)return;const k=[...t.header?[t.header.id]:[],...e.sections.map(N=>N.id),...t.footer?[t.footer.id]:[]],S=new IntersectionObserver(N=>{N.forEach(I=>{var D;if(I.isIntersecting&&I.intersectionRatio>.5){const L=I.target.getAttribute("data-section-id");L&&((D=d.current)==null||D.call(d,L))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let C=!1;const O=requestAnimationFrame(()=>{C||k.forEach(N=>{const I=c.current[N];I&&S.observe(I)})});return()=>{C=!0,cancelAnimationFrame(O),S.disconnect()}},[e.sections,(b=t.header)==null?void 0:b.id,(v=t.footer)==null?void 0:v.id]);const m=(w,k)=>{w.preventDefault(),w.dataTransfer.dropEffect="move",l(k)},u=()=>{l(null)},x=(w,k)=>{if(w.preventDefault(),l(null),!!o)try{const S=w.dataTransfer.getData(Gd),{sectionId:C}=JSON.parse(S);typeof C=="string"&&o(C,k)}catch{}},h=()=>{const w=typeof o=="function",k=e.sections.map((S,C)=>{const O=a===C;return w?p.jsxs("div",{ref:N=>{c.current[S.id]=N},"data-section-id":S.id,style:{position:"relative"},onMouseEnter:()=>f(S.id),children:[p.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:Pe.studioReorderDropZone,pointerEvents:"auto",backgroundColor:O?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:O?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:N=>m(N,C),onDragLeave:u,onDrop:N=>x(N,C)}),p.jsx(fr,{section:S,selectedId:n,reorderable:!0,sectionIndex:C,totalSections:e.sections.length,onReorder:o})]},S.id):p.jsx("div",{ref:N=>{c.current[S.id]=N},"data-section-id":S.id,onMouseEnter:()=>f(S.id),children:p.jsx(fr,{section:S,selectedId:n})},S.id)});if(w&&k.length>0){const S=e.sections.length,C=a===S;k.push(p.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:Pe.studioReorderDropZone,pointerEvents:"auto",backgroundColor:C?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:C?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:O=>m(O,S),onDragLeave:u,onDrop:O=>x(O,S)},"jp-drop-after-last"))}return k};return p.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[t.header!=null&&p.jsx("div",{ref:w=>{c.current[t.header.id]=w},"data-section-id":t.header.id,onMouseEnter:()=>f(t.header.id),children:p.jsx(fr,{section:t.header,menu:r.main,selectedId:n})}),p.jsx("main",{className:"flex-1",children:h()}),t.footer!=null&&p.jsx("div",{ref:w=>{c.current[t.footer.id]=w},"data-section-id":t.footer.id,onMouseEnter:()=>f(t.footer.id),children:p.jsx(fr,{section:t.footer,selectedId:n})})]})},Zr=({mode:e,tenantCss:t,adminCss:r,children:n})=>(T.useLayoutEffect(()=>{const o=`jp-theme-${e}`,i=e==="tenant"?t:r;if(!document.getElementById(o)&&i){const s=document.createElement("style");s.id=o,s.innerHTML=i,document.head.appendChild(s)}return()=>{const s=document.getElementById(o);s&&s.remove()}},[e,t,r]),p.jsx(p.Fragment,{children:n}));function Xd(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return T.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const Gr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ft(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function io(e){return"nodeType"in e}function Me(e){var t,r;return e?Ft(e)?e:io(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function so(e){const{Document:t}=Me(e);return e instanceof t}function hr(e){return Ft(e)?!1:e instanceof Me(e).HTMLElement}function Ji(e){return e instanceof Me(e).SVGElement}function Bt(e){return e?Ft(e)?e.document:io(e)?so(e)?e:hr(e)||Ji(e)?e.ownerDocument:document:document:document}const Ge=Gr?T.useLayoutEffect:T.useEffect;function Xr(e){const t=T.useRef(e);return Ge(()=>{t.current=e}),T.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function qd(){const e=T.useRef(null),t=T.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=T.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function pr(e,t){t===void 0&&(t=[e]);const r=T.useRef(e);return Ge(()=>{r.current!==e&&(r.current=e)},t),r}function mr(e,t){const r=T.useRef();return T.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function qr(e){const t=Xr(e),r=T.useRef(null),n=T.useCallback(o=>{o!==r.current&&(t==null||t(o,r.current)),r.current=o},[]);return[r,n]}function Jr(e){const t=T.useRef();return T.useEffect(()=>{t.current=e},[e]),t.current}let ao={};function gr(e,t){return T.useMemo(()=>{if(t)return t;const r=ao[e]==null?0:ao[e]+1;return ao[e]=r,e+"-"+r},[e,t])}function Qi(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((i,s)=>{const a=Object.entries(s);for(const[l,c]of a){const d=i[l];d!=null&&(i[l]=d+e*c)}return i},{...t})}}const Ut=Qi(1),br=Qi(-1);function Jd(e){return"clientX"in e&&"clientY"in e}function Qr(e){if(!e)return!1;const{KeyboardEvent:t}=Me(e.target);return t&&e instanceof t}function Qd(e){if(!e)return!1;const{TouchEvent:t}=Me(e.target);return t&&e instanceof t}function en(e){if(Qd(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return Jd(e)?{x:e.clientX,y:e.clientY}:null}const bt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[bt.Translate.toString(e),bt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),es="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function eu(e){return e.matches(es)?e:e.querySelector(es)}const tu={display:"none"};function ru(e){let{id:t,value:r}=e;return T.createElement("div",{id:t,style:tu},r)}function nu(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return T.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function ou(){const[e,t]=T.useState("");return{announce:T.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const ts=T.createContext(null);function iu(e){const t=T.useContext(ts);T.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function su(){const[e]=T.useState(()=>new Set),t=T.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[T.useCallback(n=>{let{type:o,event:i}=n;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const au={draggable:`
|
|
209
209
|
To pick up a draggable item, press the space bar.
|
|
210
210
|
While dragging, use the arrow keys to move the item.
|
|
211
211
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
212
|
-
`},au={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function lu(e){let{announcements:t=au,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=su}=e;const{announce:i,announcement:s}=nu(),a=mr("DndLiveRegion"),[l,c]=T.useState(!1);if(T.useEffect(()=>{c(!0)},[]),ou(T.useMemo(()=>({onDragStart(f){let{active:m}=f;i(t.onDragStart({active:m}))},onDragMove(f){let{active:m,over:u}=f;t.onDragMove&&i(t.onDragMove({active:m,over:u}))},onDragOver(f){let{active:m,over:u}=f;i(t.onDragOver({active:m,over:u}))},onDragEnd(f){let{active:m,over:u}=f;i(t.onDragEnd({active:m,over:u}))},onDragCancel(f){let{active:m,over:u}=f;i(t.onDragCancel({active:m,over:u}))}}),[i,t])),!l)return null;const d=T.createElement(T.Fragment,null,T.createElement(tu,{id:n,value:o.draggable}),T.createElement(ru,{id:a,announcement:s}));return r?ht.createPortal(d,r):d}var ze;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ze||(ze={}));function en(){}function ao(e,t){return T.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function cu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return T.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Ze=Object.freeze({x:0,y:0});function ts(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function du(e,t){const r=Qr(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function rs(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function uu(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function ns(e){let{left:t,top:r,height:n,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+n},{x:t+o,y:r+n}]}function os(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function is(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const fu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=is(t,t.left,t.top),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const c=ts(is(l),o);i.push({id:a,data:{droppableContainer:s,value:c}})}}return i.sort(rs)},hu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ns(t),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const c=ns(l),d=o.reduce((m,u,w)=>m+ts(c[w],u),0),f=Number((d/4).toFixed(4));i.push({id:a,data:{droppableContainer:s,value:f}})}}return i.sort(rs)};function pu(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-n,a=i-r;if(n<o&&r<i){const l=t.width*t.height,c=e.width*e.height,d=s*a,f=d/(l+c-d);return Number(f.toFixed(4))}return 0}const mu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const i of n){const{id:s}=i,a=r.get(s);if(a){const l=pu(a,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}})}}return o.sort(uu)};function gu(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function ss(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ze}function bu(e){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...r})}}const vu=bu(1);function as(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function wu(e,t,r){const n=as(t);if(!n)return e;const{scaleX:o,scaleY:i,x:s,y:a}=n,l=e.left-s-(1-o)*parseFloat(r),c=e.top-a-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),d=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:d,height:f,top:c,right:l+d,bottom:c+f,left:l}}const xu={ignoreTransform:!1};function Ut(e,t){t===void 0&&(t=xu);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Re(e).getComputedStyle(e);c&&(r=wu(r,c,d))}const{top:n,left:o,width:i,height:s,bottom:a,right:l}=r;return{top:n,left:o,width:i,height:s,bottom:a,right:l}}function ls(e){return Ut(e,{ignoreTransform:!0})}function yu(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function ku(e,t){return t===void 0&&(t=Re(e).getComputedStyle(e)),t.position==="fixed"}function Su(e,t){t===void 0&&(t=Re(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?r.test(i):!1})}function tn(e,t){const r=[];function n(o){if(t!=null&&r.length>=t||!o)return r;if(io(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!fr(o)||qi(o)||r.includes(o))return r;const i=Re(e).getComputedStyle(o);return o!==e&&Su(o,i)&&r.push(o),ku(o,i)?r:n(o.parentNode)}return e?n(e):r}function cs(e){const[t]=tn(e,1);return t??null}function lo(e){return!Gr||!e?null:Lt(e)?e:oo(e)?io(e)||e===Ft(e).scrollingElement?window:fr(e)?e:null:null}function ds(e){return Lt(e)?e.scrollX:e.scrollLeft}function us(e){return Lt(e)?e.scrollY:e.scrollTop}function co(e){return{x:ds(e),y:us(e)}}var Te;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Te||(Te={}));function fs(e){return!Gr||!e?!1:e===document.scrollingElement}function hs(e){const t={x:0,y:0},r=fs(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=n.y,a=e.scrollLeft>=n.x;return{isTop:o,isLeft:i,isBottom:s,isRight:a,maxScroll:n,minScroll:t}}const _u={x:.2,y:.2};function Cu(e,t,r,n,o){let{top:i,left:s,right:a,bottom:l}=r;n===void 0&&(n=10),o===void 0&&(o=_u);const{isTop:c,isBottom:d,isLeft:f,isRight:m}=hs(e),u={x:0,y:0},w={x:0,y:0},h={height:t.height*o.y,width:t.width*o.x};return!c&&i<=t.top+h.height?(u.y=Te.Backward,w.y=n*Math.abs((t.top+h.height-i)/h.height)):!d&&l>=t.bottom-h.height&&(u.y=Te.Forward,w.y=n*Math.abs((t.bottom-h.height-l)/h.height)),!m&&a>=t.right-h.width?(u.x=Te.Forward,w.x=n*Math.abs((t.right-h.width-a)/h.width)):!f&&s<=t.left+h.width&&(u.x=Te.Backward,w.x=n*Math.abs((t.left+h.width-s)/h.width)),{direction:u,speed:w}}function Eu(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:r,right:n,bottom:o}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ps(e){return e.reduce((t,r)=>Bt(t,co(r)),Ze)}function Au(e){return e.reduce((t,r)=>t+ds(r),0)}function Nu(e){return e.reduce((t,r)=>t+us(r),0)}function ms(e,t){if(t===void 0&&(t=Ut),!e)return;const{top:r,left:n,bottom:o,right:i}=t(e);cs(e)&&(o<=0||i<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const zu=[["x",["left","right"],Au],["y",["top","bottom"],Nu]];class uo{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=tn(r),o=ps(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of zu)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(n),d=o[i]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class br{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var o;(o=this.target)==null||o.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function ju(e){const{EventTarget:t}=Re(e);return e instanceof t?e:Ft(e)}function fo(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var $e;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})($e||($e={}));function gs(e){e.preventDefault()}function Tu(e){e.stopPropagation()}var xe;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(xe||(xe={}));const bs={start:[xe.Space,xe.Enter],cancel:[xe.Esc],end:[xe.Space,xe.Enter,xe.Tab]},Ou=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case xe.Right:return{...r,x:r.x+25};case xe.Left:return{...r,x:r.x-25};case xe.Down:return{...r,y:r.y+25};case xe.Up:return{...r,y:r.y-25}}};class ho{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new br(Ft(r)),this.windowListeners=new br(Re(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add($e.Resize,this.handleCancel),this.windowListeners.add($e.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add($e.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&ms(n),r(Ze)}handleKeyDown(t){if(Jr(t)){const{active:r,context:n,options:o}=this.props,{keyboardCodes:i=bs,coordinateGetter:s=Ou,scrollBehavior:a="smooth"}=o,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:Ze;this.referenceCoordinates||(this.referenceCoordinates=d);const f=s(t,{active:r,context:n.current,currentCoordinates:d});if(f){const m=gr(f,d),u={x:0,y:0},{scrollableAncestors:w}=n.current;for(const h of w){const b=t.code,{isTop:v,isRight:x,isLeft:k,isBottom:S,maxScroll:C,minScroll:O}=hs(h),N=Eu(h),P={x:Math.min(b===xe.Right?N.right-N.width/2:N.right,Math.max(b===xe.Right?N.left:N.left+N.width/2,f.x)),y:Math.min(b===xe.Down?N.bottom-N.height/2:N.bottom,Math.max(b===xe.Down?N.top:N.top+N.height/2,f.y))},D=b===xe.Right&&!x||b===xe.Left&&!k,W=b===xe.Down&&!S||b===xe.Up&&!v;if(D&&P.x!==f.x){const G=h.scrollLeft+m.x,z=b===xe.Right&&G<=C.x||b===xe.Left&&G>=O.x;if(z&&!m.y){h.scrollTo({left:G,behavior:a});return}z?u.x=h.scrollLeft-G:u.x=b===xe.Right?h.scrollLeft-C.x:h.scrollLeft-O.x,u.x&&h.scrollBy({left:-u.x,behavior:a});break}else if(W&&P.y!==f.y){const G=h.scrollTop+m.y,z=b===xe.Down&&G<=C.y||b===xe.Up&&G>=O.y;if(z&&!m.x){h.scrollTo({top:G,behavior:a});return}z?u.y=h.scrollTop-G:u.y=b===xe.Down?h.scrollTop-C.y:h.scrollTop-O.y,u.y&&h.scrollBy({top:-u.y,behavior:a});break}}this.handleMove(t,Bt(gr(f,this.referenceCoordinates),u))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}ho.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=bs,onActivation:o}=t,{active:i}=r;const{code:s}=e.nativeEvent;if(n.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function vs(e){return!!(e&&"distance"in e)}function ws(e){return!!(e&&"delay"in e)}class po{constructor(t,r,n){var o;n===void 0&&(n=ju(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:i}=t,{target:s}=i;this.props=t,this.events=r,this.document=Ft(s),this.documentListeners=new br(this.document),this.listeners=new br(n),this.windowListeners=new br(Re(s)),this.initialCoordinates=(o=Qr(i))!=null?o:Ze,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add($e.Resize,this.handleCancel),this.windowListeners.add($e.DragStart,gs),this.windowListeners.add($e.VisibilityChange,this.handleCancel),this.windowListeners.add($e.ContextMenu,gs),this.documentListeners.add($e.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ws(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(vs(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:o}=this.props;o(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add($e.Click,Tu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add($e.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!o)return;const l=(r=Qr(t))!=null?r:Ze,c=gr(o,l);if(!n&&a){if(vs(a)){if(a.tolerance!=null&&fo(c,a.tolerance))return this.handleCancel();if(fo(c,a.distance))return this.handleStart()}if(ws(a)&&fo(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===xe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Pu={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class mo extends po{constructor(t){const{event:r}=t,n=Ft(r.target);super(t,Pu,n)}}mo.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const Iu={move:{name:"mousemove"},end:{name:"mouseup"}};var go;(function(e){e[e.RightClick=2]="RightClick"})(go||(go={}));class Du extends po{constructor(t){super(t,Iu,Ft(t.event.target))}}Du.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===go.RightClick?!1:(n==null||n({event:r}),!0)}}];const bo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class xs extends po{constructor(t){super(t,bo)}static setup(){return window.addEventListener(bo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(bo.move.name,t)};function t(){}}}xs.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:o}=r;return o.length>1?!1:(n==null||n({event:r}),!0)}}];var vr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(vr||(vr={}));var rn;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(rn||(rn={}));function Ru(e){let{acceleration:t,activator:r=vr.Pointer,canScroll:n,draggingRect:o,enabled:i,interval:s=5,order:a=rn.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:m}=e;const u=Lu({delta:f,disabled:!i}),[w,h]=Xd(),b=T.useRef({x:0,y:0}),v=T.useRef({x:0,y:0}),x=T.useMemo(()=>{switch(r){case vr.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case vr.DraggableRect:return o}},[r,o,l]),k=T.useRef(null),S=T.useCallback(()=>{const O=k.current;if(!O)return;const N=b.current.x*v.current.x,P=b.current.y*v.current.y;O.scrollBy(N,P)},[]),C=T.useMemo(()=>a===rn.TreeOrder?[...c].reverse():c,[a,c]);T.useEffect(()=>{if(!i||!c.length||!x){h();return}for(const O of C){if((n==null?void 0:n(O))===!1)continue;const N=c.indexOf(O),P=d[N];if(!P)continue;const{direction:D,speed:W}=Cu(O,P,x,t,m);for(const G of["x","y"])u[G][D[G]]||(W[G]=0,D[G]=0);if(W.x>0||W.y>0){h(),k.current=O,w(S,s),b.current=W,v.current=D;return}}b.current={x:0,y:0},v.current={x:0,y:0},h()},[t,S,n,h,i,s,JSON.stringify(x),JSON.stringify(u),w,c,C,d,JSON.stringify(m)])}const Mu={x:{[Te.Backward]:!1,[Te.Forward]:!1},y:{[Te.Backward]:!1,[Te.Forward]:!1}};function Lu(e){let{delta:t,disabled:r}=e;const n=qr(t);return pr(o=>{if(r||!n||!o)return Mu;const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Te.Backward]:o.x[Te.Backward]||i.x===-1,[Te.Forward]:o.x[Te.Forward]||i.x===1},y:{[Te.Backward]:o.y[Te.Backward]||i.y===-1,[Te.Forward]:o.y[Te.Forward]||i.y===1}}},[r,t,n])}function Fu(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return pr(o=>{var i;return t==null?null:(i=n??o)!=null?i:null},[n,t])}function Bu(e,t){return T.useMemo(()=>e.reduce((r,n)=>{const{sensor:o}=n,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,n)}));return[...r,...i]},[]),[e,t])}var wr;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(wr||(wr={}));var vo;(function(e){e.Optimized="optimized"})(vo||(vo={}));const ys=new Map;function Uu(e,t){let{dragging:r,dependencies:n,config:o}=t;const[i,s]=T.useState(null),{frequency:a,measure:l,strategy:c}=o,d=T.useRef(e),f=b(),m=hr(f),u=T.useCallback(function(v){v===void 0&&(v=[]),!m.current&&s(x=>x===null?v:x.concat(v.filter(k=>!x.includes(k))))},[m]),w=T.useRef(null),h=pr(v=>{if(f&&!r)return ys;if(!v||v===ys||d.current!==e||i!=null){const x=new Map;for(let k of e){if(!k)continue;if(i&&i.length>0&&!i.includes(k.id)&&k.rect.current){x.set(k.id,k.rect.current);continue}const S=k.node.current,C=S?new uo(l(S),S):null;k.rect.current=C,C&&x.set(k.id,C)}return x}return v},[e,i,r,f,l]);return T.useEffect(()=>{d.current=e},[e]),T.useEffect(()=>{f||u()},[r,f]),T.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),T.useEffect(()=>{f||typeof a!="number"||w.current!==null||(w.current=setTimeout(()=>{u(),w.current=null},a))},[a,f,u,...n]),{droppableRects:h,measureDroppableContainers:u,measuringScheduled:i!=null};function b(){switch(c){case wr.Always:return!1;case wr.BeforeDragging:return r;default:return!r}}}function wo(e,t){return pr(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function Wu(e,t){return wo(e,t)}function $u(e){let{callback:t,disabled:r}=e;const n=Zr(t),o=T.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(n)},[n,r]);return T.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function nn(e){let{callback:t,disabled:r}=e;const n=Zr(t),o=T.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(n)},[r]);return T.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Hu(e){return new uo(Ut(e),e)}function ks(e,t,r){t===void 0&&(t=Hu);const[n,o]=T.useState(null);function i(){o(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??r)!=null?c:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const s=$u({callback(l){if(e)for(const c of l){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),a=nn({callback:i});return Ge(()=>{i(),e?(a==null||a.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),s==null||s.disconnect())},[e]),n}function Vu(e){const t=wo(e);return ss(e,t)}const Ss=[];function Yu(e){const t=T.useRef(e),r=pr(n=>e?n&&n!==Ss&&e&&t.current&&e.parentNode===t.current.parentNode?n:tn(e):Ss,[e]);return T.useEffect(()=>{t.current=e},[e]),r}function Ku(e){const[t,r]=T.useState(null),n=T.useRef(e),o=T.useCallback(i=>{const s=lo(i.target);s&&r(a=>a?(a.set(s,co(s)),new Map(a)):null)},[]);return T.useEffect(()=>{const i=n.current;if(e!==i){s(i);const a=e.map(l=>{const c=lo(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,co(c)]):null}).filter(l=>l!=null);r(a.length?new Map(a):null),n.current=e}return()=>{s(e),s(i)};function s(a){a.forEach(l=>{const c=lo(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),T.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>Bt(i,s),Ze):ps(e):Ze,[e,t])}function _s(e,t){t===void 0&&(t=[]);const r=T.useRef(null);return T.useEffect(()=>{r.current=null},t),T.useEffect(()=>{const n=e!==Ze;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?gr(e,r.current):Ze}function Gu(e){T.useEffect(()=>{if(!Gr)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function Zu(e,t){return T.useMemo(()=>e.reduce((r,n)=>{let{eventName:o,handler:i}=n;return r[o]=s=>{i(s,t)},r},{}),[e,t])}function Cs(e){return T.useMemo(()=>e?yu(e):null,[e])}const Es=[];function Xu(e,t){t===void 0&&(t=Ut);const[r]=e,n=Cs(r?Re(r):null),[o,i]=T.useState(Es);function s(){i(()=>e.length?e.map(l=>fs(l)?n:new uo(t(l),l)):Es)}const a=nn({callback:s});return Ge(()=>{a==null||a.disconnect(),s(),e.forEach(l=>a==null?void 0:a.observe(l))},[e]),o}function As(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return fr(t)?t:e}function qu(e){let{measure:t}=e;const[r,n]=T.useState(null),o=T.useCallback(c=>{for(const{target:d}of c)if(fr(d)){n(f=>{const m=t(d);return f?{...f,width:m.width,height:m.height}:m});break}},[t]),i=nn({callback:o}),s=T.useCallback(c=>{const d=As(c);i==null||i.disconnect(),d&&(i==null||i.observe(d)),n(d?t(d):null)},[t,i]),[a,l]=Xr(s);return T.useMemo(()=>({nodeRef:a,rect:r,setRef:l}),[r,a,l])}const Ju=[{sensor:mo,options:{}},{sensor:ho,options:{}}],Qu={current:{}},on={draggable:{measure:ls},droppable:{measure:ls,strategy:wr.WhileDragging,frequency:vo.Optimized},dragOverlay:{measure:Ut}};class xr extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const ef={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new xr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:en},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:on,measureDroppableContainers:en,windowRect:null,measuringScheduled:!1},Ns={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:en,draggableNodes:new Map,over:null,measureDroppableContainers:en},yr=T.createContext(Ns),zs=T.createContext(ef);function tf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new xr}}}function rf(e,t){switch(t.type){case ze.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ze.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ze.DragEnd:case ze.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ze.RegisterDroppable:{const{element:r}=t,{id:n}=r,o=new xr(e.droppable.containers);return o.set(n,r),{...e,droppable:{...e.droppable,containers:o}}}case ze.SetDroppableDisabled:{const{id:r,key:n,disabled:o}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const s=new xr(e.droppable.containers);return s.set(r,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case ze.UnregisterDroppable:{const{id:r,key:n}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const i=new xr(e.droppable.containers);return i.delete(r),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function nf(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:o}=T.useContext(yr),i=qr(n),s=qr(r==null?void 0:r.id);return T.useEffect(()=>{if(!t&&!n&&i&&s!=null){if(!Jr(i)||document.activeElement===i.target)return;const a=o.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[l.current,c.current]){if(!d)continue;const f=Qd(d);if(f){f.focus();break}}})}},[n,t,o,s,i]),null}function js(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...n}),r):r}function of(e){return T.useMemo(()=>({draggable:{...on.draggable,...e==null?void 0:e.draggable},droppable:{...on.droppable,...e==null?void 0:e.droppable},dragOverlay:{...on.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function sf(e){let{activeNode:t,measure:r,initialRect:n,config:o=!0}=e;const i=T.useRef(!1),{x:s,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Ge(()=>{if(!s&&!a||!t){i.current=!1;return}if(i.current||!n)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=r(c),f=ss(d,n);if(s||(f.x=0),a||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const m=cs(c);m&&m.scrollBy({top:f.y,left:f.x})}},[t,s,a,n,r])}const sn=T.createContext({...Ze,scaleX:1,scaleY:1});var bt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(bt||(bt={}));const af=T.memo(function(t){var r,n,o,i;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:d=Ju,collisionDetection:f=mu,measuring:m,modifiers:u,...w}=t;const h=T.useReducer(rf,void 0,tf),[b,v]=h,[x,k]=iu(),[S,C]=T.useState(bt.Uninitialized),O=S===bt.Initialized,{draggable:{active:N,nodes:P,translate:D},droppable:{containers:W}}=b,G=N!=null?P.get(N):null,z=T.useRef({initial:null,translated:null}),L=T.useMemo(()=>{var Ae;return N!=null?{id:N,data:(Ae=G==null?void 0:G.data)!=null?Ae:Qu,rect:z}:null},[N,G]),y=T.useRef(null),[$,X]=T.useState(null),[H,V]=T.useState(null),Y=hr(w,Object.values(w)),Q=mr("DndDescribedBy",s),j=T.useMemo(()=>W.getEnabled(),[W]),I=of(m),{droppableRects:K,measureDroppableContainers:Z,measuringScheduled:te}=Uu(j,{dragging:O,dependencies:[D.x,D.y],config:I.droppable}),ue=Fu(P,N),ee=T.useMemo(()=>H?Qr(H):null,[H]),ie=Kn(),se=Wu(ue,I.draggable.measure);sf({activeNode:N!=null?P.get(N):null,config:ie.layoutShiftCompensation,initialRect:se,measure:I.draggable.measure});const oe=ks(ue,I.draggable.measure,se),le=ks(ue?ue.parentElement:null),fe=T.useRef({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:K,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:W,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),we=W.getNodeFor((r=fe.current.over)==null?void 0:r.id),g=qu({measure:I.dragOverlay.measure}),F=(n=g.nodeRef.current)!=null?n:ue,U=O?(o=g.rect)!=null?o:oe:null,E=!!(g.nodeRef.current&&g.rect),A=Vu(E?null:oe),R=Cs(F?Re(F):null),q=Yu(O?we??ue:null),B=Xu(q),M=js(u,{transform:{x:D.x-A.x,y:D.y-A.y,scaleX:1,scaleY:1},activatorEvent:H,active:L,activeNodeRect:oe,containerNodeRect:le,draggingNodeRect:U,over:fe.current.over,overlayNodeRect:g.rect,scrollableAncestors:q,scrollableAncestorRects:B,windowRect:R}),J=ee?Bt(ee,D):null,ne=Ku(q),re=_s(ne),ae=_s(ne,[oe]),he=Bt(M,re),me=U?vu(U,M):null,ve=L&&me?f({active:L,collisionRect:me,droppableRects:K,droppableContainers:j,pointerCoordinates:J}):null,it=os(ve,"id"),[je,_t]=T.useState(null),Ee=E?M:Bt(M,ae),ir=gu(Ee,(i=je==null?void 0:je.rect)!=null?i:null,oe),Pt=T.useRef(null),Ve=T.useCallback((Ae,Oe)=>{let{sensor:Ue,options:Ct}=Oe;if(y.current==null)return;const Ye=P.get(y.current);if(!Ye)return;const We=Ae.nativeEvent,st=new Ue({active:y.current,activeNode:Ye,event:We,options:Ct,context:fe,onAbort(Ie){if(!P.get(Ie))return;const{onDragAbort:at}=Y.current,ft={id:Ie};at==null||at(ft),x({type:"onDragAbort",event:ft})},onPending(Ie,Et,at,ft){if(!P.get(Ie))return;const{onDragPending:Ir}=Y.current,At={id:Ie,constraint:Et,initialCoordinates:at,offset:ft};Ir==null||Ir(At),x({type:"onDragPending",event:At})},onStart(Ie){const Et=y.current;if(Et==null)return;const at=P.get(Et);if(!at)return;const{onDragStart:ft}=Y.current,Pr={activatorEvent:We,active:{id:Et,data:at.data,rect:z}};ht.unstable_batchedUpdates(()=>{ft==null||ft(Pr),C(bt.Initializing),v({type:ze.DragStart,initialCoordinates:Ie,active:Et}),x({type:"onDragStart",event:Pr}),X(Pt.current),V(We)})},onMove(Ie){v({type:ze.DragMove,coordinates:Ie})},onEnd:sr(ze.DragEnd),onCancel:sr(ze.DragCancel)});Pt.current=st;function sr(Ie){return async function(){const{active:at,collisions:ft,over:Pr,scrollAdjustedTranslate:Ir}=fe.current;let At=null;if(at&&Ir){const{cancelDrop:Dr}=Y.current;At={activatorEvent:We,active:at,collisions:ft,delta:Ir,over:Pr},Ie===ze.DragEnd&&typeof Dr=="function"&&await Promise.resolve(Dr(At))&&(Ie=ze.DragCancel)}y.current=null,ht.unstable_batchedUpdates(()=>{v({type:Ie}),C(bt.Uninitialized),_t(null),X(null),V(null),Pt.current=null;const Dr=Ie===ze.DragEnd?"onDragEnd":"onDragCancel";if(At){const pi=Y.current[Dr];pi==null||pi(At),x({type:Dr,event:At})}})}}},[P]),Vn=T.useCallback((Ae,Oe)=>(Ue,Ct)=>{const Ye=Ue.nativeEvent,We=P.get(Ct);if(y.current!==null||!We||Ye.dndKit||Ye.defaultPrevented)return;const st={active:We};Ae(Ue,Oe.options,st)===!0&&(Ye.dndKit={capturedBy:Oe.sensor},y.current=Ct,Ve(Ue,Oe))},[P,Ve]),Yn=Bu(d,Vn);Gu(d),Ge(()=>{oe&&S===bt.Initializing&&C(bt.Initialized)},[oe,S]),T.useEffect(()=>{const{onDragMove:Ae}=Y.current,{active:Oe,activatorEvent:Ue,collisions:Ct,over:Ye}=fe.current;if(!Oe||!Ue)return;const We={active:Oe,activatorEvent:Ue,collisions:Ct,delta:{x:he.x,y:he.y},over:Ye};ht.unstable_batchedUpdates(()=>{Ae==null||Ae(We),x({type:"onDragMove",event:We})})},[he.x,he.y]),T.useEffect(()=>{const{active:Ae,activatorEvent:Oe,collisions:Ue,droppableContainers:Ct,scrollAdjustedTranslate:Ye}=fe.current;if(!Ae||y.current==null||!Oe||!Ye)return;const{onDragOver:We}=Y.current,st=Ct.get(it),sr=st&&st.rect.current?{id:st.id,rect:st.rect.current,data:st.data,disabled:st.disabled}:null,Ie={active:Ae,activatorEvent:Oe,collisions:Ue,delta:{x:Ye.x,y:Ye.y},over:sr};ht.unstable_batchedUpdates(()=>{_t(sr),We==null||We(Ie),x({type:"onDragOver",event:Ie})})},[it]),Ge(()=>{fe.current={activatorEvent:H,active:L,activeNode:ue,collisionRect:me,collisions:ve,droppableRects:K,draggableNodes:P,draggingNode:F,draggingNodeRect:U,droppableContainers:W,over:je,scrollableAncestors:q,scrollAdjustedTranslate:he},z.current={initial:U,translated:me}},[L,ue,ve,me,P,F,U,K,W,je,q,he]),Ru({...ie,delta:D,draggingRect:me,pointerCoordinates:J,scrollableAncestors:q,scrollableAncestorRects:B});const fi=T.useMemo(()=>({active:L,activeNode:ue,activeNodeRect:oe,activatorEvent:H,collisions:ve,containerNodeRect:le,dragOverlay:g,draggableNodes:P,droppableContainers:W,droppableRects:K,over:je,measureDroppableContainers:Z,scrollableAncestors:q,scrollableAncestorRects:B,measuringConfiguration:I,measuringScheduled:te,windowRect:R}),[L,ue,oe,H,ve,le,g,P,W,K,je,Z,q,B,I,te,R]),hi=T.useMemo(()=>({activatorEvent:H,activators:Yn,active:L,activeNodeRect:oe,ariaDescribedById:{draggable:Q},dispatch:v,draggableNodes:P,over:je,measureDroppableContainers:Z}),[H,Yn,L,oe,v,Q,P,je,Z]);return T.createElement(es.Provider,{value:k},T.createElement(yr.Provider,{value:hi},T.createElement(zs.Provider,{value:fi},T.createElement(sn.Provider,{value:ir},c)),T.createElement(nf,{disabled:(a==null?void 0:a.restoreFocus)===!1})),T.createElement(lu,{...a,hiddenTextDescribedById:Q}));function Kn(){const Ae=($==null?void 0:$.autoScrollEnabled)===!1,Oe=typeof l=="object"?l.enabled===!1:l===!1,Ue=O&&!Ae&&!Oe;return typeof l=="object"?{...l,enabled:Ue}:{enabled:Ue}}}),lf=T.createContext(null),Ts="button",cf="Draggable";function df(e){let{id:t,data:r,disabled:n=!1,attributes:o}=e;const i=mr(cf),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:m}=T.useContext(yr),{role:u=Ts,roleDescription:w="draggable",tabIndex:h=0}=o??{},b=(l==null?void 0:l.id)===t,v=T.useContext(b?sn:lf),[x,k]=Xr(),[S,C]=Xr(),O=Zu(s,t),N=hr(r);Ge(()=>(f.set(t,{id:t,key:i,node:x,activatorNode:S,data:N}),()=>{const D=f.get(t);D&&D.key===i&&f.delete(t)}),[f,t]);const P=T.useMemo(()=>({role:u,tabIndex:h,"aria-disabled":n,"aria-pressed":b&&u===Ts?!0:void 0,"aria-roledescription":w,"aria-describedby":d.draggable}),[n,u,h,b,w,d.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:P,isDragging:b,listeners:n?void 0:O,node:x,over:m,setNodeRef:k,setActivatorNodeRef:C,transform:v}}function Os(){return T.useContext(zs)}const uf="Droppable",ff={timeout:25};function hf(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:o}=e;const i=mr(uf),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=T.useContext(yr),d=T.useRef({disabled:r}),f=T.useRef(!1),m=T.useRef(null),u=T.useRef(null),{disabled:w,updateMeasurementsFor:h,timeout:b}={...ff,...o},v=hr(h??n),x=T.useCallback(()=>{if(!f.current){f.current=!0;return}u.current!=null&&clearTimeout(u.current),u.current=setTimeout(()=>{c(Array.isArray(v.current)?v.current:[v.current]),u.current=null},b)},[b]),k=nn({callback:x,disabled:w||!s}),S=T.useCallback((P,D)=>{k&&(D&&(k.unobserve(D),f.current=!1),P&&k.observe(P))},[k]),[C,O]=Xr(S),N=hr(t);return T.useEffect(()=>{!k||!C.current||(k.disconnect(),f.current=!1,k.observe(C.current))},[C,k]),T.useEffect(()=>(a({type:ze.RegisterDroppable,element:{id:n,key:i,disabled:r,node:C,rect:m,data:N}}),()=>a({type:ze.UnregisterDroppable,key:i,id:n})),[n]),T.useEffect(()=>{r!==d.current.disabled&&(a({type:ze.SetDroppableDisabled,id:n,key:i,disabled:r}),d.current.disabled=r)},[n,i,r,a]),{active:s,rect:m,isOver:(l==null?void 0:l.id)===n,node:C,over:l,setNodeRef:O}}function pf(e){let{animation:t,children:r}=e;const[n,o]=T.useState(null),[i,s]=T.useState(null),a=qr(r);return!r&&!n&&a&&o(a),Ge(()=>{if(!i)return;const l=n==null?void 0:n.key,c=n==null?void 0:n.props.id;if(l==null||c==null){o(null);return}Promise.resolve(t(c,i)).then(()=>{o(null)})},[t,n,i]),T.createElement(T.Fragment,null,r,n?T.cloneElement(n,{ref:s}):null)}const mf={x:0,y:0,scaleX:1,scaleY:1};function gf(e){let{children:t}=e;return T.createElement(yr.Provider,{value:Ns},T.createElement(sn.Provider,{value:mf},t))}const bf={position:"fixed",touchAction:"none"},vf=e=>Jr(e)?"transform 250ms ease":void 0,wf=T.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:o,children:i,className:s,rect:a,style:l,transform:c,transition:d=vf}=e;if(!a)return null;const f=o?c:{...c,scaleX:1,scaleY:1},m={...bf,width:a.width,height:a.height,top:a.top,left:a.left,transform:gt.Transform.toString(f),transformOrigin:o&&n?du(n,a):void 0,transition:typeof d=="function"?d(n):d,...l};return T.createElement(r,{className:s,style:m,ref:t},i)}),xf={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:r}}=e;return[{transform:gt.Transform.toString(t)},{transform:gt.Transform.toString(r)}]},sideEffects:(e=>t=>{let{active:r,dragOverlay:n}=t;const o={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[a,l]of Object.entries(i.active))l!==void 0&&(o[a]=r.node.style.getPropertyValue(a),r.node.style.setProperty(a,l));if(i!=null&&i.dragOverlay)for(const[a,l]of Object.entries(i.dragOverlay))l!==void 0&&n.node.style.setProperty(a,l);return s!=null&&s.active&&r.node.classList.add(s.active),s!=null&&s.dragOverlay&&n.node.classList.add(s.dragOverlay),function(){for(const[l,c]of Object.entries(o))r.node.style.setProperty(l,c);s!=null&&s.active&&r.node.classList.remove(s.active)}})({styles:{active:{opacity:"0"}}})};function yf(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:o}=e;return Zr((i,s)=>{if(t===null)return;const a=r.get(i);if(!a)return;const l=a.node.current;if(!l)return;const c=As(s);if(!c)return;const{transform:d}=Re(s).getComputedStyle(s),f=as(d);if(!f)return;const m=typeof t=="function"?t:kf(t);return ms(l,o.draggable.measure),m({active:{id:i,data:a.data,node:l,rect:o.draggable.measure(l)},draggableNodes:r,dragOverlay:{node:s,rect:o.dragOverlay.measure(c)},droppableContainers:n,measuringConfiguration:o,transform:f})})}function kf(e){const{duration:t,easing:r,sideEffects:n,keyframes:o}={...xf,...e};return i=>{let{active:s,dragOverlay:a,transform:l,...c}=i;if(!t)return;const d={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},f={scaleX:l.scaleX!==1?s.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?s.rect.height*l.scaleY/a.rect.height:1},m={x:l.x-d.x,y:l.y-d.y,...f},u=o({...c,active:s,dragOverlay:a,transform:{initial:l,final:m}}),[w]=u,h=u[u.length-1];if(JSON.stringify(w)===JSON.stringify(h))return;const b=n==null?void 0:n({active:s,dragOverlay:a,...c}),v=a.node.animate(u,{duration:t,easing:r,fill:"forwards"});return new Promise(x=>{v.onfinish=()=>{b==null||b(),x()}})}}let Ps=0;function Sf(e){return T.useMemo(()=>{if(e!=null)return Ps++,Ps},[e])}const _f=T.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:o,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:c=999}=e;const{activatorEvent:d,active:f,activeNodeRect:m,containerNodeRect:u,draggableNodes:w,droppableContainers:h,dragOverlay:b,over:v,measuringConfiguration:x,scrollableAncestors:k,scrollableAncestorRects:S,windowRect:C}=Os(),O=T.useContext(sn),N=Sf(f==null?void 0:f.id),P=js(s,{activatorEvent:d,active:f,activeNodeRect:m,containerNodeRect:u,draggingNodeRect:b.rect,over:v,overlayNodeRect:b.rect,scrollableAncestors:k,scrollableAncestorRects:S,transform:O,windowRect:C}),D=wo(m),W=yf({config:n,draggableNodes:w,droppableContainers:h,measuringConfiguration:x}),G=D?b.setRef:void 0;return T.createElement(gf,null,T.createElement(pf,{animation:W},f&&N?T.createElement(wf,{key:N,id:f.id,ref:G,as:a,activatorEvent:d,adjustScale:t,className:l,transition:i,rect:D,style:{zIndex:c,...o},transform:P},r):null))}),Cf=e=>{let{transform:t}=e;return{...t,x:0}};function Is(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function Ef(e,t){return e.reduce((r,n,o)=>{const i=t.get(n);return i&&(r[o]=i),r},Array(e.length))}function an(e){return e!==null&&e>=0}function Af(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Nf(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Ds=e=>{let{rects:t,activeIndex:r,overIndex:n,index:o}=e;const i=Is(t,n,r),s=t[o],a=i[o];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},ln={scaleX:1,scaleY:1},zf=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:o,rects:i,overIndex:s}=e;const a=(t=i[r])!=null?t:n;if(!a)return null;if(o===r){const c=i[s];return c?{x:0,y:r<s?c.top+c.height-(a.top+a.height):c.top-a.top,...ln}:null}const l=jf(i,o,r);return o>r&&o<=s?{x:0,y:-a.height-l,...ln}:o<r&&o>=s?{x:0,y:a.height+l,...ln}:{x:0,y:0,...ln}};function jf(e,t,r){const n=e[t],o=e[t-1],i=e[t+1];return n?r<t?o?n.top-(o.top+o.height):i?i.top-(n.top+n.height):0:i?i.top-(n.top+n.height):o?n.top-(o.top+o.height):0:0}const Rs="Sortable",Ms=T.createContext({activeIndex:-1,containerId:Rs,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ds,disabled:{draggable:!1,droppable:!1}});function Tf(e){let{children:t,id:r,items:n,strategy:o=Ds,disabled:i=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:d}=Os(),f=mr(Rs,r),m=a.rect!==null,u=T.useMemo(()=>n.map(O=>typeof O=="object"&&"id"in O?O.id:O),[n]),w=s!=null,h=s?u.indexOf(s.id):-1,b=c?u.indexOf(c.id):-1,v=T.useRef(u),x=!Af(u,v.current),k=b!==-1&&h===-1||x,S=Nf(i);Ge(()=>{x&&w&&d(u)},[x,u,w,d]),T.useEffect(()=>{v.current=u},[u]);const C=T.useMemo(()=>({activeIndex:h,containerId:f,disabled:S,disableTransforms:k,items:u,overIndex:b,useDragOverlay:m,sortedRects:Ef(u,l),strategy:o}),[h,f,S.draggable,S.droppable,k,u,b,l,m,o]);return T.createElement(Ms.Provider,{value:C},t)}const Of=e=>{let{id:t,items:r,activeIndex:n,overIndex:o}=e;return Is(r,n,o).indexOf(t)},Pf=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:o,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!n||a!==i&&o===s?!1:r?!0:s!==o&&t===l},If={duration:200,easing:"ease"},Ls="transform",Df=gt.Transition.toString({property:Ls,duration:0,easing:"linear"}),Rf={roleDescription:"sortable"};function Mf(e){let{disabled:t,index:r,node:n,rect:o}=e;const[i,s]=T.useState(null),a=T.useRef(r);return Ge(()=>{if(!t&&r!==a.current&&n.current){const l=o.current;if(l){const c=Ut(n.current,{ignoreTransform:!0}),d={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(d.x||d.y)&&s(d)}}r!==a.current&&(a.current=r)},[t,r,n,o]),T.useEffect(()=>{i&&s(null)},[i]),i}function Lf(e){let{animateLayoutChanges:t=Pf,attributes:r,disabled:n,data:o,getNewIndex:i=Of,id:s,strategy:a,resizeObserverConfig:l,transition:c=If}=e;const{items:d,containerId:f,activeIndex:m,disabled:u,disableTransforms:w,sortedRects:h,overIndex:b,useDragOverlay:v,strategy:x}=T.useContext(Ms),k=Ff(n,u),S=d.indexOf(s),C=T.useMemo(()=>({sortable:{containerId:f,index:S,items:d},...o}),[f,o,S,d]),O=T.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:N,node:P,isOver:D,setNodeRef:W}=hf({id:s,data:C,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...l}}),{active:G,activatorEvent:z,activeNodeRect:L,attributes:y,setNodeRef:$,listeners:X,isDragging:H,over:V,setActivatorNodeRef:Y,transform:Q}=df({id:s,data:C,attributes:{...Rf,...r},disabled:k.draggable}),j=Zd(W,$),I=!!G,K=I&&!w&&an(m)&&an(b),Z=!v&&H,te=Z&&K?Q:null,ee=K?te??(a??x)({rects:h,activeNodeRect:L,activeIndex:m,overIndex:b,index:S}):null,ie=an(m)&&an(b)?i({id:s,items:d,activeIndex:m,overIndex:b}):S,se=G==null?void 0:G.id,oe=T.useRef({activeId:se,items:d,newIndex:ie,containerId:f}),le=d!==oe.current.items,fe=t({active:G,containerId:f,isDragging:H,isSorting:I,id:s,index:S,items:d,newIndex:oe.current.newIndex,previousItems:oe.current.items,previousContainerId:oe.current.containerId,transition:c,wasDragging:oe.current.activeId!=null}),we=Mf({disabled:!fe,index:S,node:P,rect:N});return T.useEffect(()=>{I&&oe.current.newIndex!==ie&&(oe.current.newIndex=ie),f!==oe.current.containerId&&(oe.current.containerId=f),d!==oe.current.items&&(oe.current.items=d)},[I,ie,f,d]),T.useEffect(()=>{if(se===oe.current.activeId)return;if(se!=null&&oe.current.activeId==null){oe.current.activeId=se;return}const F=setTimeout(()=>{oe.current.activeId=se},50);return()=>clearTimeout(F)},[se]),{active:G,activeIndex:m,attributes:y,data:C,rect:N,index:S,newIndex:ie,items:d,isOver:D,isSorting:I,isDragging:H,listeners:X,node:P,overIndex:b,over:V,setNodeRef:j,setActivatorNodeRef:Y,setDroppableNodeRef:W,setDraggableNodeRef:$,transform:we??ee,transition:g()};function g(){if(we||le&&oe.current.newIndex===S)return Df;if(!(Z&&!Jr(z)||!c)&&(I||fe))return gt.Transition.toString({...c,property:Ls})}}function Ff(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}function cn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Bf=[xe.Down,xe.Right,xe.Up,xe.Left],Uf=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:a}}=t;if(Bf.includes(e.code)){if(e.preventDefault(),!r||!n)return;const l=[];i.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const m=o.get(f.id);if(m)switch(e.code){case xe.Down:n.top<m.top&&l.push(f);break;case xe.Up:n.top>m.top&&l.push(f);break;case xe.Left:n.left>m.left&&l.push(f);break;case xe.Right:n.left<m.left&&l.push(f);break}});const c=hu({collisionRect:n,droppableRects:o,droppableContainers:l});let d=os(c,"id");if(d===(s==null?void 0:s.id)&&c.length>1&&(d=c[1].id),d!=null){const f=i.get(r.id),m=i.get(d),u=m?o.get(m.id):null,w=m==null?void 0:m.node.current;if(w&&u&&f&&m){const b=tn(w).some((O,N)=>a[N]!==O),v=Fs(f,m),x=Wf(f,m),k=b||!v?{x:0,y:0}:{x:x?n.width-u.width:0,y:x?n.height-u.height:0},S={x:u.left,y:u.top};return k.x&&k.y?S:gr(S,k)}}}};function Fs(e,t){return!cn(e)||!cn(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Wf(e,t){return!cn(e)||!cn(t)||!Fs(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function xo({className:e,type:t,...r}){return p.jsx("input",{type:t,className:pe("h-8 rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-1 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600",e),...r})}function $f({className:e,...t}){return p.jsx("textarea",{className:pe("min-h-16 w-full rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-2 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600 resize-none",e),...t})}function Hf({className:e,checked:t,onCheckedChange:r,...n}){return p.jsx("input",{type:"checkbox",checked:t,onChange:o=>r==null?void 0:r(o.target.checked),className:pe("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...n})}function zt({className:e,...t}){return p.jsx("label",{className:pe("text-sm font-medium leading-none select-none",e),...t})}function yo(e,[t,r]){return Math.min(r,Math.max(t,e))}function be(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Wt(e,t=[]){let r=[];function n(i,s){const a=_.createContext(s),l=r.length;r=[...r,s];const c=f=>{var v;const{scope:m,children:u,...w}=f,h=((v=m==null?void 0:m[e])==null?void 0:v[l])||a,b=_.useMemo(()=>w,Object.values(w));return p.jsx(h.Provider,{value:b,children:u})};c.displayName=i+"Provider";function d(f,m){var h;const u=((h=m==null?void 0:m[e])==null?void 0:h[l])||a,w=_.useContext(u);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,d]}const o=()=>{const i=r.map(s=>_.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return _.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[n,Vf(o,...t)]}function Vf(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=n.reduce((a,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...a,...f}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Bs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Us(...e){return t=>{let r=!1;const n=e.map(o=>{const i=Bs(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():Bs(e[o],null)}}}}function _e(...e){return _.useCallback(Us(...e),e)}function $t(e){const t=Kf(e),r=_.forwardRef((n,o)=>{const{children:i,...s}=n,a=_.Children.toArray(i),l=a.find(Zf);if(l){const c=l.props.children,d=a.map(f=>f===l?_.Children.count(c)>1?_.Children.only(null):_.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...s,ref:o,children:_.isValidElement(c)?_.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var Yf=$t("Slot");function Kf(e){const t=_.forwardRef((r,n)=>{const{children:o,...i}=r;if(_.isValidElement(o)){const s=qf(o),a=Xf(i,o.props);return o.type!==_.Fragment&&(a.ref=n?Us(n,s):s),_.cloneElement(o,a)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ws=Symbol("radix.slottable");function Gf(e){const t=({children:r})=>p.jsx(p.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Ws,t}function Zf(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ws}function Xf(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function qf(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Jf(e){const t=e+"CollectionProvider",[r,n]=Wt(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{const{scope:b,children:v}=h,x=T.useRef(null),k=T.useRef(new Map).current;return p.jsx(o,{scope:b,itemMap:k,collectionRef:x,children:v})};s.displayName=t;const a=e+"CollectionSlot",l=$t(a),c=T.forwardRef((h,b)=>{const{scope:v,children:x}=h,k=i(a,v),S=_e(b,k.collectionRef);return p.jsx(l,{ref:S,children:x})});c.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=$t(d),u=T.forwardRef((h,b)=>{const{scope:v,children:x,...k}=h,S=T.useRef(null),C=_e(b,S),O=i(d,v);return T.useEffect(()=>(O.itemMap.set(S,{ref:S,...k}),()=>void O.itemMap.delete(S))),p.jsx(m,{[f]:"",ref:C,children:x})});u.displayName=d;function w(h){const b=i(e+"CollectionConsumer",h);return T.useCallback(()=>{const x=b.collectionRef.current;if(!x)return[];const k=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((O,N)=>k.indexOf(O.ref.current)-k.indexOf(N.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:c,ItemSlot:u},w,n]}var Qf=_.createContext(void 0);function $s(e){const t=_.useContext(Qf);return e||t||"ltr"}var eh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Se=eh.reduce((e,t)=>{const r=$t(`Primitive.${t}`),n=_.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function th(e,t){e&&Rr.flushSync(()=>e.dispatchEvent(t))}function Me(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function rh(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e);_.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var nh="DismissableLayer",ko="dismissableLayer.update",oh="dismissableLayer.pointerDownOutside",ih="dismissableLayer.focusOutside",Hs,Vs=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dn=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=_.useContext(Vs),[d,f]=_.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,u]=_.useState({}),w=_e(t,N=>f(N)),h=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(b),x=d?h.indexOf(d):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=v,C=lh(N=>{const P=N.target,D=[...c.branches].some(W=>W.contains(P));!S||D||(o==null||o(N),s==null||s(N),N.defaultPrevented||a==null||a())},m),O=ch(N=>{const P=N.target;[...c.branches].some(W=>W.contains(P))||(i==null||i(N),s==null||s(N),N.defaultPrevented||a==null||a())},m);return rh(N=>{x===c.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},m),_.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Hs=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Ys(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Hs)}},[d,m,r,c]),_.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Ys())},[d,c]),_.useEffect(()=>{const N=()=>u({});return document.addEventListener(ko,N),()=>document.removeEventListener(ko,N)},[]),p.jsx(Se.div,{...l,ref:w,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,O.onFocusCapture),onBlurCapture:be(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,C.onPointerDownCapture)})});dn.displayName=nh;var sh="DismissableLayerBranch",ah=_.forwardRef((e,t)=>{const r=_.useContext(Vs),n=_.useRef(null),o=_e(t,n);return _.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),p.jsx(Se.div,{...e,ref:o})});ah.displayName=sh;function lh(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e),n=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Ks(oh,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ch(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e),n=_.useRef(!1);return _.useEffect(()=>{const o=i=>{i.target&&!n.current&&Ks(ih,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ys(){const e=new CustomEvent(ko);document.dispatchEvent(e)}function Ks(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?th(o,i):o.dispatchEvent(i)}var So=0;function Gs(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Zs()),document.body.insertAdjacentElement("beforeend",e[1]??Zs()),So++,()=>{So===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),So--}},[])}function Zs(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var _o="focusScope.autoFocusOnMount",Co="focusScope.autoFocusOnUnmount",Xs={bubbles:!1,cancelable:!0},dh="FocusScope",Eo=_.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=_.useState(null),c=Me(o),d=Me(i),f=_.useRef(null),m=_e(t,h=>l(h)),u=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(n){let h=function(k){if(u.paused||!a)return;const S=k.target;a.contains(S)?f.current=S:vt(f.current,{select:!0})},b=function(k){if(u.paused||!a)return;const S=k.relatedTarget;S!==null&&(a.contains(S)||vt(f.current,{select:!0}))},v=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&vt(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const x=new MutationObserver(v);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),x.disconnect()}}},[n,a,u.paused]),_.useEffect(()=>{if(a){Qs.add(u);const h=document.activeElement;if(!a.contains(h)){const v=new CustomEvent(_o,Xs);a.addEventListener(_o,c),a.dispatchEvent(v),v.defaultPrevented||(uh(gh(qs(a)),{select:!0}),document.activeElement===h&&vt(a))}return()=>{a.removeEventListener(_o,c),setTimeout(()=>{const v=new CustomEvent(Co,Xs);a.addEventListener(Co,d),a.dispatchEvent(v),v.defaultPrevented||vt(h??document.body,{select:!0}),a.removeEventListener(Co,d),Qs.remove(u)},0)}}},[a,c,d,u]);const w=_.useCallback(h=>{if(!r&&!n||u.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(b&&v){const x=h.currentTarget,[k,S]=fh(x);k&&S?!h.shiftKey&&v===S?(h.preventDefault(),r&&vt(k,{select:!0})):h.shiftKey&&v===k&&(h.preventDefault(),r&&vt(S,{select:!0})):v===x&&h.preventDefault()}},[r,n,u.paused]);return p.jsx(Se.div,{tabIndex:-1,...s,ref:m,onKeyDown:w})});Eo.displayName=dh;function uh(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(vt(n,{select:t}),document.activeElement!==r)return}function fh(e){const t=qs(e),r=Js(t,e),n=Js(t.reverse(),e);return[r,n]}function qs(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Js(e,t){for(const r of e)if(!hh(r,{upTo:t}))return r}function hh(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ph(e){return e instanceof HTMLInputElement&&"select"in e}function vt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ph(e)&&t&&e.select()}}var Qs=mh();function mh(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ea(e,t),e.unshift(t)},remove(t){var r;e=ea(e,t),(r=e[0])==null||r.resume()}}}function ea(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function gh(e){return e.filter(t=>t.tagName!=="A")}var Pe=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},bh=_[" useId ".trim().toString()]||(()=>{}),vh=0;function kr(e){const[t,r]=_.useState(bh());return Pe(()=>{r(n=>n??String(vh++))},[e]),t?`radix-${t}`:""}const wh=["top","right","bottom","left"],wt=Math.min,Le=Math.max,un=Math.round,fn=Math.floor,Qe=e=>({x:e,y:e}),xh={left:"right",right:"left",bottom:"top",top:"bottom"},yh={start:"end",end:"start"};function Ao(e,t,r){return Le(e,wt(t,r))}function ct(e,t){return typeof e=="function"?e(t):e}function dt(e){return e.split("-")[0]}function Ht(e){return e.split("-")[1]}function No(e){return e==="x"?"y":"x"}function zo(e){return e==="y"?"height":"width"}const kh=new Set(["top","bottom"]);function et(e){return kh.has(dt(e))?"y":"x"}function jo(e){return No(et(e))}function Sh(e,t,r){r===void 0&&(r=!1);const n=Ht(e),o=jo(e),i=zo(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=hn(s)),[s,hn(s)]}function _h(e){const t=hn(e);return[To(e),t,To(t)]}function To(e){return e.replace(/start|end/g,t=>yh[t])}const ta=["left","right"],ra=["right","left"],Ch=["top","bottom"],Eh=["bottom","top"];function Ah(e,t,r){switch(e){case"top":case"bottom":return r?t?ra:ta:t?ta:ra;case"left":case"right":return t?Ch:Eh;default:return[]}}function Nh(e,t,r,n){const o=Ht(e);let i=Ah(dt(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(To)))),i}function hn(e){return e.replace(/left|right|bottom|top/g,t=>xh[t])}function zh(e){return{top:0,right:0,bottom:0,left:0,...e}}function na(e){return typeof e!="number"?zh(e):{top:e,right:e,bottom:e,left:e}}function pn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function oa(e,t,r){let{reference:n,floating:o}=e;const i=et(t),s=jo(t),a=zo(s),l=dt(t),c=i==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,m=n[a]/2-o[a]/2;let u;switch(l){case"top":u={x:d,y:n.y-o.height};break;case"bottom":u={x:d,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:f};break;case"left":u={x:n.x-o.width,y:f};break;default:u={x:n.x,y:n.y}}switch(Ht(t)){case"start":u[s]-=m*(r&&c?-1:1);break;case"end":u[s]+=m*(r&&c?-1:1);break}return u}async function jh(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:u=0}=ct(t,e),w=na(u),b=a[m?f==="floating"?"reference":"floating":f],v=pn(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),x=f==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},C=pn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:k,strategy:l}):x);return{top:(v.top-C.top+w.top)/S.y,bottom:(C.bottom-v.bottom+w.bottom)/S.y,left:(v.left-C.left+w.left)/S.x,right:(C.right-v.right+w.right)/S.x}}const Th=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=oa(c,n,l),m=n,u={},w=0;for(let b=0;b<a.length;b++){var h;const{name:v,fn:x}=a[b],{x:k,y:S,data:C,reset:O}=await x({x:d,y:f,initialPlacement:n,placement:m,strategy:o,middlewareData:u,rects:c,platform:{...s,detectOverflow:(h=s.detectOverflow)!=null?h:jh},elements:{reference:e,floating:t}});d=k??d,f=S??f,u={...u,[v]:{...u[v],...C}},O&&w<=50&&(w++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(c=O.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:d,y:f}=oa(c,m,l)),b=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:u}},Oh=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=ct(e,t)||{};if(c==null)return{};const f=na(d),m={x:r,y:n},u=jo(o),w=zo(u),h=await s.getDimensions(c),b=u==="y",v=b?"top":"left",x=b?"bottom":"right",k=b?"clientHeight":"clientWidth",S=i.reference[w]+i.reference[u]-m[u]-i.floating[w],C=m[u]-i.reference[u],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let N=O?O[k]:0;(!N||!await(s.isElement==null?void 0:s.isElement(O)))&&(N=a.floating[k]||i.floating[w]);const P=S/2-C/2,D=N/2-h[w]/2-1,W=wt(f[v],D),G=wt(f[x],D),z=W,L=N-h[w]-G,y=N/2-h[w]/2+P,$=Ao(z,y,L),X=!l.arrow&&Ht(o)!=null&&y!==$&&i.reference[w]/2-(y<z?W:G)-h[w]/2<0,H=X?y<z?y-z:y-L:0;return{[u]:m[u]+H,data:{[u]:$,centerOffset:y-$-H,...X&&{alignmentOffset:H}},reset:X}}}),Ph=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:h=!0,...b}=ct(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=dt(o),x=et(a),k=dt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=m||(k||!h?[hn(a)]:_h(a)),O=w!=="none";!m&&O&&C.push(...Nh(a,h,w,S));const N=[a,...C],P=await l.detectOverflow(t,b),D=[];let W=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&D.push(P[v]),f){const y=Sh(o,s,S);D.push(P[y[0]],P[y[1]])}if(W=[...W,{placement:o,overflows:D}],!D.every(y=>y<=0)){var G,z;const y=(((G=i.flip)==null?void 0:G.index)||0)+1,$=N[y];if($&&(!(f==="alignment"?x!==et($):!1)||W.every(V=>et(V.placement)===x?V.overflows[0]>0:!0)))return{data:{index:y,overflows:W},reset:{placement:$}};let X=(z=W.filter(H=>H.overflows[0]<=0).sort((H,V)=>H.overflows[1]-V.overflows[1])[0])==null?void 0:z.placement;if(!X)switch(u){case"bestFit":{var L;const H=(L=W.filter(V=>{if(O){const Y=et(V.placement);return Y===x||Y==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(Y=>Y>0).reduce((Y,Q)=>Y+Q,0)]).sort((V,Y)=>V[1]-Y[1])[0])==null?void 0:L[0];H&&(X=H);break}case"initialPlacement":X=a;break}if(o!==X)return{reset:{placement:X}}}return{}}}};function ia(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sa(e){return wh.some(t=>e[t]>=0)}const Ih=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...i}=ct(e,t);switch(o){case"referenceHidden":{const s=await n.detectOverflow(t,{...i,elementContext:"reference"}),a=ia(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:sa(a)}}}case"escaped":{const s=await n.detectOverflow(t,{...i,altBoundary:!0}),a=ia(s,r.floating);return{data:{escapedOffsets:a,escaped:sa(a)}}}default:return{}}}}},aa=new Set(["left","top"]);async function Dh(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=dt(r),a=Ht(r),l=et(r)==="y",c=aa.has(s)?-1:1,d=i&&l?-1:1,f=ct(t,e);let{mainAxis:m,crossAxis:u,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof w=="number"&&(u=a==="end"?w*-1:w),l?{x:u*d,y:m*c}:{x:m*c,y:u*d}}const Rh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Dh(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Mh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x,y:k}=v;return{x,y:k}}},...c}=ct(e,t),d={x:r,y:n},f=await i.detectOverflow(t,c),m=et(dt(o)),u=No(m);let w=d[u],h=d[m];if(s){const v=u==="y"?"top":"left",x=u==="y"?"bottom":"right",k=w+f[v],S=w-f[x];w=Ao(k,w,S)}if(a){const v=m==="y"?"top":"left",x=m==="y"?"bottom":"right",k=h+f[v],S=h-f[x];h=Ao(k,h,S)}const b=l.fn({...t,[u]:w,[m]:h});return{...b,data:{x:b.x-r,y:b.y-n,enabled:{[u]:s,[m]:a}}}}}},Lh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ct(e,t),d={x:r,y:n},f=et(o),m=No(f);let u=d[m],w=d[f];const h=ct(a,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const k=m==="y"?"height":"width",S=i.reference[m]-i.floating[k]+b.mainAxis,C=i.reference[m]+i.reference[k]-b.mainAxis;u<S?u=S:u>C&&(u=C)}if(c){var v,x;const k=m==="y"?"width":"height",S=aa.has(dt(o)),C=i.reference[f]-i.floating[k]+(S&&((v=s.offset)==null?void 0:v[f])||0)+(S?0:b.crossAxis),O=i.reference[f]+i.reference[k]+(S?0:((x=s.offset)==null?void 0:x[f])||0)-(S?b.crossAxis:0);w<C?w=C:w>O&&(w=O)}return{[m]:u,[f]:w}}}},Fh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=ct(e,t),d=await s.detectOverflow(t,c),f=dt(o),m=Ht(o),u=et(o)==="y",{width:w,height:h}=i.floating;let b,v;f==="top"||f==="bottom"?(b=f,v=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,b=m==="end"?"top":"bottom");const x=h-d.top-d.bottom,k=w-d.left-d.right,S=wt(h-d[b],x),C=wt(w-d[v],k),O=!t.middlewareData.shift;let N=S,P=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=x),O&&!m){const W=Le(d.left,0),G=Le(d.right,0),z=Le(d.top,0),L=Le(d.bottom,0);u?P=w-2*(W!==0||G!==0?W+G:Le(d.left,d.right)):N=h-2*(z!==0||L!==0?z+L:Le(d.top,d.bottom))}await l({...t,availableWidth:P,availableHeight:N});const D=await s.getDimensions(a.floating);return w!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function mn(){return typeof window<"u"}function Vt(e){return la(e)?(e.nodeName||"").toLowerCase():"#document"}function Fe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tt(e){var t;return(t=(la(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function la(e){return mn()?e instanceof Node||e instanceof Fe(e).Node:!1}function Xe(e){return mn()?e instanceof Element||e instanceof Fe(e).Element:!1}function rt(e){return mn()?e instanceof HTMLElement||e instanceof Fe(e).HTMLElement:!1}function ca(e){return!mn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fe(e).ShadowRoot}const Bh=new Set(["inline","contents"]);function Sr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Bh.has(o)}const Uh=new Set(["table","td","th"]);function Wh(e){return Uh.has(Vt(e))}const $h=[":popover-open",":modal"];function gn(e){return $h.some(t=>{try{return e.matches(t)}catch{return!1}})}const Hh=["transform","translate","scale","rotate","perspective"],Vh=["transform","translate","scale","rotate","perspective","filter"],Yh=["paint","layout","strict","content"];function Oo(e){const t=Po(),r=Xe(e)?qe(e):e;return Hh.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Vh.some(n=>(r.willChange||"").includes(n))||Yh.some(n=>(r.contain||"").includes(n))}function Kh(e){let t=xt(e);for(;rt(t)&&!Yt(t);){if(Oo(t))return t;if(gn(t))return null;t=xt(t)}return null}function Po(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Gh=new Set(["html","body","#document"]);function Yt(e){return Gh.has(Vt(e))}function qe(e){return Fe(e).getComputedStyle(e)}function bn(e){return Xe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xt(e){if(Vt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ca(e)&&e.host||tt(e);return ca(t)?t.host:t}function da(e){const t=xt(e);return Yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:rt(t)&&Sr(t)?t:da(t)}function _r(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=da(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=Fe(o);if(i){const a=Io(s);return t.concat(s,s.visualViewport||[],Sr(o)?o:[],a&&r?_r(a):[])}return t.concat(o,_r(o,[],r))}function Io(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ua(e){const t=qe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=rt(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=un(r)!==i||un(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Do(e){return Xe(e)?e:e.contextElement}function Kt(e){const t=Do(e);if(!rt(t))return Qe(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=ua(t);let s=(i?un(r.width):r.width)/n,a=(i?un(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Zh=Qe(0);function fa(e){const t=Fe(e);return!Po()||!t.visualViewport?Zh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xh(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Fe(e)?!1:t}function jt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Do(e);let s=Qe(1);t&&(n?Xe(n)&&(s=Kt(n)):s=Kt(e));const a=Xh(i,r,n)?fa(i):Qe(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(i){const m=Fe(i),u=n&&Xe(n)?Fe(n):n;let w=m,h=Io(w);for(;h&&n&&u!==w;){const b=Kt(h),v=h.getBoundingClientRect(),x=qe(h),k=v.left+(h.clientLeft+parseFloat(x.paddingLeft))*b.x,S=v.top+(h.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,f*=b.y,l+=k,c+=S,w=Fe(h),h=Io(w)}}return pn({width:d,height:f,x:l,y:c})}function vn(e,t){const r=bn(e).scrollLeft;return t?t.left+r:jt(tt(e)).left+r}function ha(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-vn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function qh(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=tt(n),a=t?gn(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Qe(1);const d=Qe(0),f=rt(n);if((f||!f&&!i)&&((Vt(n)!=="body"||Sr(s))&&(l=bn(n)),rt(n))){const u=jt(n);c=Kt(n),d.x=u.x+n.clientLeft,d.y=u.y+n.clientTop}const m=s&&!f&&!i?ha(s,l):Qe(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:r.y*c.y-l.scrollTop*c.y+d.y+m.y}}function Jh(e){return Array.from(e.getClientRects())}function Qh(e){const t=tt(e),r=bn(e),n=e.ownerDocument.body,o=Le(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Le(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+vn(e);const a=-r.scrollTop;return qe(n).direction==="rtl"&&(s+=Le(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const pa=25;function ep(e,t){const r=Fe(e),n=tt(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const d=Po();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=vn(n);if(c<=0){const d=n.ownerDocument,f=d.body,m=getComputedStyle(f),u=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,w=Math.abs(n.clientWidth-f.clientWidth-u);w<=pa&&(i-=w)}else c<=pa&&(i+=c);return{width:i,height:s,x:a,y:l}}const tp=new Set(["absolute","fixed"]);function rp(e,t){const r=jt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=rt(e)?Kt(e):Qe(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:s,height:a,x:l,y:c}}function ma(e,t,r){let n;if(t==="viewport")n=ep(e,r);else if(t==="document")n=Qh(tt(e));else if(Xe(t))n=rp(t,r);else{const o=fa(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return pn(n)}function ga(e,t){const r=xt(e);return r===t||!Xe(r)||Yt(r)?!1:qe(r).position==="fixed"||ga(r,t)}function np(e,t){const r=t.get(e);if(r)return r;let n=_r(e,[],!1).filter(a=>Xe(a)&&Vt(a)!=="body"),o=null;const i=qe(e).position==="fixed";let s=i?xt(e):e;for(;Xe(s)&&!Yt(s);){const a=qe(s),l=Oo(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&tp.has(o.position)||Sr(s)&&!l&&ga(e,s))?n=n.filter(d=>d!==s):o=a,s=xt(s)}return t.set(e,n),n}function op(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?gn(t)?[]:np(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((c,d)=>{const f=ma(t,d,o);return c.top=Le(f.top,c.top),c.right=wt(f.right,c.right),c.bottom=wt(f.bottom,c.bottom),c.left=Le(f.left,c.left),c},ma(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ip(e){const{width:t,height:r}=ua(e);return{width:t,height:r}}function sp(e,t,r){const n=rt(t),o=tt(t),i=r==="fixed",s=jt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Qe(0);function c(){l.x=vn(o)}if(n||!n&&!i)if((Vt(t)!=="body"||Sr(o))&&(a=bn(t)),n){const u=jt(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&c();i&&!n&&o&&c();const d=o&&!n&&!i?ha(o,a):Qe(0),f=s.left+a.scrollLeft-l.x-d.x,m=s.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function Ro(e){return qe(e).position==="static"}function ba(e,t){if(!rt(e)||qe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return tt(e)===r&&(r=r.ownerDocument.body),r}function va(e,t){const r=Fe(e);if(gn(e))return r;if(!rt(e)){let o=xt(e);for(;o&&!Yt(o);){if(Xe(o)&&!Ro(o))return o;o=xt(o)}return r}let n=ba(e,t);for(;n&&Wh(n)&&Ro(n);)n=ba(n,t);return n&&Yt(n)&&Ro(n)&&!Oo(n)?r:n||Kh(e)||r}const ap=async function(e){const t=this.getOffsetParent||va,r=this.getDimensions,n=await r(e.floating);return{reference:sp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function lp(e){return qe(e).direction==="rtl"}const cp={convertOffsetParentRelativeRectToViewportRelativeRect:qh,getDocumentElement:tt,getClippingRect:op,getOffsetParent:va,getElementRects:ap,getClientRects:Jh,getDimensions:ip,getScale:Kt,isElement:Xe,isRTL:lp};function wa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dp(e,t){let r=null,n;const o=tt(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:f,width:m,height:u}=c;if(a||t(),!m||!u)return;const w=fn(f),h=fn(o.clientWidth-(d+m)),b=fn(o.clientHeight-(f+u)),v=fn(d),k={rootMargin:-w+"px "+-h+"px "+-b+"px "+-v+"px",threshold:Le(0,wt(1,l))||1};let S=!0;function C(O){const N=O[0].intersectionRatio;if(N!==l){if(!S)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!wa(c,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(C,{...k,root:o.ownerDocument})}catch{r=new IntersectionObserver(C,k)}r.observe(e)}return s(!0),i}function up(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Do(e),d=o||i?[...c?_r(c):[],..._r(t)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const f=c&&a?dp(c,r):null;let m=-1,u=null;s&&(u=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=u)==null||k.observe(t)})),r()}),c&&!l&&u.observe(c),u.observe(t));let w,h=l?jt(e):null;l&&b();function b(){const v=jt(e);h&&!wa(h,v)&&r(),h=v,w=requestAnimationFrame(b)}return r(),()=>{var v;d.forEach(x=>{o&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),f==null||f(),(v=u)==null||v.disconnect(),u=null,l&&cancelAnimationFrame(w)}}const fp=Rh,hp=Mh,pp=Ph,mp=Fh,gp=Ih,xa=Oh,bp=Lh,vp=(e,t,r)=>{const n=new Map,o={platform:cp,...r},i={...o.platform,_c:n};return Th(e,t,{...o,platform:i})};var wp=typeof document<"u",xp=function(){},wn=wp?T.useLayoutEffect:xp;function xn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!xn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!xn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ya(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ka(e,t){const r=ya(e);return Math.round(t*r)/r}function Mo(e){const t=_.useRef(e);return wn(()=>{t.current=e}),t}function yp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,f]=_.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,u]=_.useState(n);xn(m,n)||u(n);const[w,h]=_.useState(null),[b,v]=_.useState(null),x=_.useCallback(V=>{V!==O.current&&(O.current=V,h(V))},[]),k=_.useCallback(V=>{V!==N.current&&(N.current=V,v(V))},[]),S=i||w,C=s||b,O=_.useRef(null),N=_.useRef(null),P=_.useRef(d),D=l!=null,W=Mo(l),G=Mo(o),z=Mo(c),L=_.useCallback(()=>{if(!O.current||!N.current)return;const V={placement:t,strategy:r,middleware:m};G.current&&(V.platform=G.current),vp(O.current,N.current,V).then(Y=>{const Q={...Y,isPositioned:z.current!==!1};y.current&&!xn(P.current,Q)&&(P.current=Q,Rr.flushSync(()=>{f(Q)}))})},[m,t,r,G,z]);wn(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[c]);const y=_.useRef(!1);wn(()=>(y.current=!0,()=>{y.current=!1}),[]),wn(()=>{if(S&&(O.current=S),C&&(N.current=C),S&&C){if(W.current)return W.current(S,C,L);L()}},[S,C,L,W,D]);const $=_.useMemo(()=>({reference:O,floating:N,setReference:x,setFloating:k}),[x,k]),X=_.useMemo(()=>({reference:S,floating:C}),[S,C]),H=_.useMemo(()=>{const V={position:r,left:0,top:0};if(!X.floating)return V;const Y=ka(X.floating,d.x),Q=ka(X.floating,d.y);return a?{...V,transform:"translate("+Y+"px, "+Q+"px)",...ya(X.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Y,top:Q}},[r,a,X.floating,d.x,d.y]);return _.useMemo(()=>({...d,update:L,refs:$,elements:X,floatingStyles:H}),[d,L,$,X,H])}const kp=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?xa({element:n.current,padding:o}).fn(r):{}:n?xa({element:n,padding:o}).fn(r):{}}}},Sp=(e,t)=>({...fp(e),options:[e,t]}),_p=(e,t)=>({...hp(e),options:[e,t]}),Cp=(e,t)=>({...bp(e),options:[e,t]}),Ep=(e,t)=>({...pp(e),options:[e,t]}),Ap=(e,t)=>({...mp(e),options:[e,t]}),Np=(e,t)=>({...gp(e),options:[e,t]}),zp=(e,t)=>({...kp(e),options:[e,t]});var jp="Arrow",Sa=_.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return p.jsx(Se.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sa.displayName=jp;var Tp=Sa;function Op(e){const[t,r]=_.useState(void 0);return Pe(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;r({width:s,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Lo="Popper",[_a,Gt]=Wt(Lo),[Pp,Ca]=_a(Lo),Ea=e=>{const{__scopePopper:t,children:r}=e,[n,o]=_.useState(null);return p.jsx(Pp,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ea.displayName=Lo;var Aa="PopperAnchor",Na=_.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=Ca(Aa,r),s=_.useRef(null),a=_e(t,s),l=_.useRef(null);return _.useEffect(()=>{const c=l.current;l.current=(n==null?void 0:n.current)||s.current,c!==l.current&&i.onAnchorChange(l.current)}),n?null:p.jsx(Se.div,{...o,ref:a})});Na.displayName=Aa;var Fo="PopperContent",[Ip,Dp]=_a(Fo),za=_.forwardRef((e,t)=>{var ee,ie,se,oe,le,fe;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:u="optimized",onPlaced:w,...h}=e,b=Ca(Fo,r),[v,x]=_.useState(null),k=_e(t,we=>x(we)),[S,C]=_.useState(null),O=Op(S),N=(O==null?void 0:O.width)??0,P=(O==null?void 0:O.height)??0,D=n+(i!=="center"?"-"+i:""),W=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},G=Array.isArray(c)?c:[c],z=G.length>0,L={padding:W,boundary:G.filter(Mp),altBoundary:z},{refs:y,floatingStyles:$,placement:X,isPositioned:H,middlewareData:V}=yp({strategy:"fixed",placement:D,whileElementsMounted:(...we)=>up(...we,{animationFrame:u==="always"}),elements:{reference:b.anchor},middleware:[Sp({mainAxis:o+P,alignmentAxis:s}),l&&_p({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Cp():void 0,...L}),l&&Ep({...L}),Ap({...L,apply:({elements:we,rects:g,availableWidth:F,availableHeight:U})=>{const{width:E,height:A}=g.reference,R=we.floating.style;R.setProperty("--radix-popper-available-width",`${F}px`),R.setProperty("--radix-popper-available-height",`${U}px`),R.setProperty("--radix-popper-anchor-width",`${E}px`),R.setProperty("--radix-popper-anchor-height",`${A}px`)}}),S&&zp({element:S,padding:a}),Lp({arrowWidth:N,arrowHeight:P}),m&&Np({strategy:"referenceHidden",...L})]}),[Y,Q]=Oa(X),j=Me(w);Pe(()=>{H&&(j==null||j())},[H,j]);const I=(ee=V.arrow)==null?void 0:ee.x,K=(ie=V.arrow)==null?void 0:ie.y,Z=((se=V.arrow)==null?void 0:se.centerOffset)!==0,[te,ue]=_.useState();return Pe(()=>{v&&ue(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:y.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:H?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(oe=V.transformOrigin)==null?void 0:oe.x,(le=V.transformOrigin)==null?void 0:le.y].join(" "),...((fe=V.hide)==null?void 0:fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Ip,{scope:r,placedSide:Y,onArrowChange:C,arrowX:I,arrowY:K,shouldHideArrow:Z,children:p.jsx(Se.div,{"data-side":Y,"data-align":Q,...h,ref:k,style:{...h.style,animation:H?void 0:"none"}})})})});za.displayName=Fo;var ja="PopperArrow",Rp={top:"bottom",right:"left",bottom:"top",left:"right"},Ta=_.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=Dp(ja,n),s=Rp[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(Tp,{...o,ref:r,style:{...o.style,display:"block"}})})});Ta.displayName=ja;function Mp(e){return e!==null}var Lp=e=>({name:"transformOrigin",options:e,fn(t){var b,v,x;const{placement:r,rects:n,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=Oa(r),f={start:"0%",center:"50%",end:"100%"}[d],m=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,u=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let w="",h="";return c==="bottom"?(w=s?f:`${m}px`,h=`${-l}px`):c==="top"?(w=s?f:`${m}px`,h=`${n.floating.height+l}px`):c==="right"?(w=`${-l}px`,h=s?f:`${u}px`):c==="left"&&(w=`${n.floating.width+l}px`,h=s?f:`${u}px`),{data:{x:w,y:h}}}});function Oa(e){const[t,r="center"]=e.split("-");return[t,r]}var Bo=Ea,yn=Na,Uo=za,Wo=Ta,Fp="Portal",kn=_.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[o,i]=_.useState(!1);Pe(()=>i(!0),[]);const s=r||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?ht.createPortal(p.jsx(Se.div,{...n,ref:t}),s):null});kn.displayName=Fp;var Bp=_[" useInsertionEffect ".trim().toString()]||Pe;function Sn({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,s]=Up({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:o;{const d=_.useRef(e!==void 0);_.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,n])}const c=_.useCallback(d=>{var f;if(a){const m=Wp(d)?d(e):d;m!==e&&((f=s.current)==null||f.call(s,m))}else i(d)},[a,e,i,s]);return[l,c]}function Up({defaultProp:e,onChange:t}){const[r,n]=_.useState(e),o=_.useRef(r),i=_.useRef(t);return Bp(()=>{i.current=t},[t]),_.useEffect(()=>{var s;o.current!==r&&((s=i.current)==null||s.call(i,r),o.current=r)},[r,o]),[r,n,i]}function Wp(e){return typeof e=="function"}function $p(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Pa=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Hp="VisuallyHidden",Ia=_.forwardRef((e,t)=>p.jsx(Se.span,{...e,ref:t,style:{...Pa,...e.style}}));Ia.displayName=Hp;var Vp=Ia,Yp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zt=new WeakMap,_n=new WeakMap,Cn={},$o=0,Da=function(e){return e&&(e.host||Da(e.parentNode))},Kp=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Da(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Gp=function(e,t,r,n){var o=Kp(t,Array.isArray(e)?e:[e]);Cn[r]||(Cn[r]=new WeakMap);var i=Cn[r],s=[],a=new Set,l=new Set(o),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else try{var u=m.getAttribute(n),w=u!==null&&u!=="false",h=(Zt.get(m)||0)+1,b=(i.get(m)||0)+1;Zt.set(m,h),i.set(m,b),s.push(m),h===1&&w&&_n.set(m,!0),b===1&&m.setAttribute(r,"true"),w||m.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return d(t),a.clear(),$o++,function(){s.forEach(function(f){var m=Zt.get(f)-1,u=i.get(f)-1;Zt.set(f,m),i.set(f,u),m||(_n.has(f)||f.removeAttribute(n),_n.delete(f)),u||f.removeAttribute(r)}),$o--,$o||(Zt=new WeakMap,Zt=new WeakMap,_n=new WeakMap,Cn={})}},Ra=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Yp(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Gp(n,o,r,"aria-hidden")):function(){return null}},nt=function(){return nt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},nt.apply(this,arguments)};function Ma(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Zp(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var En="right-scroll-bar-position",An="width-before-scroll-bar",Xp="with-scroll-bars-hidden",qp="--removed-body-scroll-bar-size";function Ho(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Jp(e,t){var r=T.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Qp=typeof window<"u"?_.useLayoutEffect:_.useEffect,La=new WeakMap;function em(e,t){var r=Jp(null,function(n){return e.forEach(function(o){return Ho(o,n)})});return Qp(function(){var n=La.get(r);if(n){var o=new Set(n),i=new Set(e),s=r.current;o.forEach(function(a){i.has(a)||Ho(a,null)}),i.forEach(function(a){o.has(a)||Ho(a,s)})}La.set(r,e)},[e]),r}function tm(e){return e}function rm(e,t){t===void 0&&(t=tm);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(i),s=r}var l=function(){var d=s;s=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){s.push(d),c()},filter:function(d){return s=s.filter(d),r}}}};return o}function nm(e){e===void 0&&(e={});var t=rm(null);return t.options=nt({async:!0,ssr:!1},e),t}var Fa=function(e){var t=e.sideCar,r=Ma(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return _.createElement(n,nt({},r))};Fa.isSideCarExport=!0;function om(e,t){return e.useMedium(t),Fa}var Ba=nm(),Vo=function(){},Nn=_.forwardRef(function(e,t){var r=_.useRef(null),n=_.useState({onScrollCapture:Vo,onWheelCapture:Vo,onTouchMoveCapture:Vo}),o=n[0],i=n[1],s=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,u=e.noRelative,w=e.noIsolation,h=e.inert,b=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,k=e.gapMode,S=Ma(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,O=em([r,t]),N=nt(nt({},S),o);return _.createElement(_.Fragment,null,d&&_.createElement(C,{sideCar:Ba,removeScrollBar:c,shards:f,noRelative:u,noIsolation:w,inert:h,setCallbacks:i,allowPinchZoom:!!b,lockRef:r,gapMode:k}),s?_.cloneElement(_.Children.only(a),nt(nt({},N),{ref:O})):_.createElement(x,nt({},N,{className:l,ref:O}),a))});Nn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Nn.classNames={fullWidth:An,zeroRight:En};var im=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=im();return t&&e.setAttribute("nonce",t),e}function am(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cm=function(){var e=0,t=null;return{add:function(r){e==0&&(t=sm())&&(am(t,r),lm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dm=function(){var e=cm();return function(t,r){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Ua=function(){var e=dm(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},um={left:0,top:0,right:0,gap:0},Yo=function(e){return parseInt(e||"",10)||0},fm=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Yo(r),Yo(n),Yo(o)]},hm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return um;var t=fm(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},pm=Ua(),Xt="data-scroll-locked",mm=function(e,t,r,n){var o=e.left,i=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
213
|
-
.`.concat(
|
|
212
|
+
`},lu={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function cu(e){let{announcements:t=lu,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=au}=e;const{announce:i,announcement:s}=ou(),a=gr("DndLiveRegion"),[l,c]=T.useState(!1);if(T.useEffect(()=>{c(!0)},[]),iu(T.useMemo(()=>({onDragStart(f){let{active:m}=f;i(t.onDragStart({active:m}))},onDragMove(f){let{active:m,over:u}=f;t.onDragMove&&i(t.onDragMove({active:m,over:u}))},onDragOver(f){let{active:m,over:u}=f;i(t.onDragOver({active:m,over:u}))},onDragEnd(f){let{active:m,over:u}=f;i(t.onDragEnd({active:m,over:u}))},onDragCancel(f){let{active:m,over:u}=f;i(t.onDragCancel({active:m,over:u}))}}),[i,t])),!l)return null;const d=T.createElement(T.Fragment,null,T.createElement(ru,{id:n,value:o.draggable}),T.createElement(nu,{id:a,announcement:s}));return r?pt.createPortal(d,r):d}var ze;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ze||(ze={}));function tn(){}function lo(e,t){return T.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function du(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return T.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Xe=Object.freeze({x:0,y:0});function rs(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function uu(e,t){const r=en(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function ns(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function fu(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function os(e){let{left:t,top:r,height:n,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+n},{x:t+o,y:r+n}]}function is(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function ss(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const hu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ss(t,t.left,t.top),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const c=rs(ss(l),o);i.push({id:a,data:{droppableContainer:s,value:c}})}}return i.sort(ns)},pu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=os(t),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const c=os(l),d=o.reduce((m,u,x)=>m+rs(c[x],u),0),f=Number((d/4).toFixed(4));i.push({id:a,data:{droppableContainer:s,value:f}})}}return i.sort(ns)};function mu(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-n,a=i-r;if(n<o&&r<i){const l=t.width*t.height,c=e.width*e.height,d=s*a,f=d/(l+c-d);return Number(f.toFixed(4))}return 0}const gu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const i of n){const{id:s}=i,a=r.get(s);if(a){const l=mu(a,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}})}}return o.sort(fu)};function bu(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function as(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Xe}function vu(e){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...r})}}const xu=vu(1);function ls(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function wu(e,t,r){const n=ls(t);if(!n)return e;const{scaleX:o,scaleY:i,x:s,y:a}=n,l=e.left-s-(1-o)*parseFloat(r),c=e.top-a-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),d=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:d,height:f,top:c,right:l+d,bottom:c+f,left:l}}const yu={ignoreTransform:!1};function Wt(e,t){t===void 0&&(t=yu);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Me(e).getComputedStyle(e);c&&(r=wu(r,c,d))}const{top:n,left:o,width:i,height:s,bottom:a,right:l}=r;return{top:n,left:o,width:i,height:s,bottom:a,right:l}}function cs(e){return Wt(e,{ignoreTransform:!0})}function ku(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function Su(e,t){return t===void 0&&(t=Me(e).getComputedStyle(e)),t.position==="fixed"}function _u(e,t){t===void 0&&(t=Me(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?r.test(i):!1})}function rn(e,t){const r=[];function n(o){if(t!=null&&r.length>=t||!o)return r;if(so(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!hr(o)||Ji(o)||r.includes(o))return r;const i=Me(e).getComputedStyle(o);return o!==e&&_u(o,i)&&r.push(o),Su(o,i)?r:n(o.parentNode)}return e?n(e):r}function ds(e){const[t]=rn(e,1);return t??null}function co(e){return!Gr||!e?null:Ft(e)?e:io(e)?so(e)||e===Bt(e).scrollingElement?window:hr(e)?e:null:null}function us(e){return Ft(e)?e.scrollX:e.scrollLeft}function fs(e){return Ft(e)?e.scrollY:e.scrollTop}function uo(e){return{x:us(e),y:fs(e)}}var Te;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Te||(Te={}));function hs(e){return!Gr||!e?!1:e===document.scrollingElement}function ps(e){const t={x:0,y:0},r=hs(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=n.y,a=e.scrollLeft>=n.x;return{isTop:o,isLeft:i,isBottom:s,isRight:a,maxScroll:n,minScroll:t}}const Cu={x:.2,y:.2};function Eu(e,t,r,n,o){let{top:i,left:s,right:a,bottom:l}=r;n===void 0&&(n=10),o===void 0&&(o=Cu);const{isTop:c,isBottom:d,isLeft:f,isRight:m}=ps(e),u={x:0,y:0},x={x:0,y:0},h={height:t.height*o.y,width:t.width*o.x};return!c&&i<=t.top+h.height?(u.y=Te.Backward,x.y=n*Math.abs((t.top+h.height-i)/h.height)):!d&&l>=t.bottom-h.height&&(u.y=Te.Forward,x.y=n*Math.abs((t.bottom-h.height-l)/h.height)),!m&&a>=t.right-h.width?(u.x=Te.Forward,x.x=n*Math.abs((t.right-h.width-a)/h.width)):!f&&s<=t.left+h.width&&(u.x=Te.Backward,x.x=n*Math.abs((t.left+h.width-s)/h.width)),{direction:u,speed:x}}function Au(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:r,right:n,bottom:o}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ms(e){return e.reduce((t,r)=>Ut(t,uo(r)),Xe)}function Nu(e){return e.reduce((t,r)=>t+us(r),0)}function zu(e){return e.reduce((t,r)=>t+fs(r),0)}function gs(e,t){if(t===void 0&&(t=Wt),!e)return;const{top:r,left:n,bottom:o,right:i}=t(e);ds(e)&&(o<=0||i<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ju=[["x",["left","right"],Nu],["y",["top","bottom"],zu]];class fo{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=rn(r),o=ms(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of ju)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(n),d=o[i]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class vr{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var o;(o=this.target)==null||o.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function Tu(e){const{EventTarget:t}=Me(e);return e instanceof t?e:Bt(e)}function ho(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var He;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(He||(He={}));function bs(e){e.preventDefault()}function Ou(e){e.stopPropagation()}var we;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(we||(we={}));const vs={start:[we.Space,we.Enter],cancel:[we.Esc],end:[we.Space,we.Enter,we.Tab]},Pu=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case we.Right:return{...r,x:r.x+25};case we.Left:return{...r,x:r.x-25};case we.Down:return{...r,y:r.y+25};case we.Up:return{...r,y:r.y-25}}};class po{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new vr(Bt(r)),this.windowListeners=new vr(Me(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(He.Resize,this.handleCancel),this.windowListeners.add(He.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(He.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&gs(n),r(Xe)}handleKeyDown(t){if(Qr(t)){const{active:r,context:n,options:o}=this.props,{keyboardCodes:i=vs,coordinateGetter:s=Pu,scrollBehavior:a="smooth"}=o,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:Xe;this.referenceCoordinates||(this.referenceCoordinates=d);const f=s(t,{active:r,context:n.current,currentCoordinates:d});if(f){const m=br(f,d),u={x:0,y:0},{scrollableAncestors:x}=n.current;for(const h of x){const b=t.code,{isTop:v,isRight:w,isLeft:k,isBottom:S,maxScroll:C,minScroll:O}=ps(h),N=Au(h),I={x:Math.min(b===we.Right?N.right-N.width/2:N.right,Math.max(b===we.Right?N.left:N.left+N.width/2,f.x)),y:Math.min(b===we.Down?N.bottom-N.height/2:N.bottom,Math.max(b===we.Down?N.top:N.top+N.height/2,f.y))},D=b===we.Right&&!w||b===we.Left&&!k,L=b===we.Down&&!S||b===we.Up&&!v;if(D&&I.x!==f.x){const Z=h.scrollLeft+m.x,j=b===we.Right&&Z<=C.x||b===we.Left&&Z>=O.x;if(j&&!m.y){h.scrollTo({left:Z,behavior:a});return}j?u.x=h.scrollLeft-Z:u.x=b===we.Right?h.scrollLeft-C.x:h.scrollLeft-O.x,u.x&&h.scrollBy({left:-u.x,behavior:a});break}else if(L&&I.y!==f.y){const Z=h.scrollTop+m.y,j=b===we.Down&&Z<=C.y||b===we.Up&&Z>=O.y;if(j&&!m.x){h.scrollTo({top:Z,behavior:a});return}j?u.y=h.scrollTop-Z:u.y=b===we.Down?h.scrollTop-C.y:h.scrollTop-O.y,u.y&&h.scrollBy({top:-u.y,behavior:a});break}}this.handleMove(t,Ut(br(f,this.referenceCoordinates),u))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}po.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=vs,onActivation:o}=t,{active:i}=r;const{code:s}=e.nativeEvent;if(n.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function xs(e){return!!(e&&"distance"in e)}function ws(e){return!!(e&&"delay"in e)}class mo{constructor(t,r,n){var o;n===void 0&&(n=Tu(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:i}=t,{target:s}=i;this.props=t,this.events=r,this.document=Bt(s),this.documentListeners=new vr(this.document),this.listeners=new vr(n),this.windowListeners=new vr(Me(s)),this.initialCoordinates=(o=en(i))!=null?o:Xe,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(He.Resize,this.handleCancel),this.windowListeners.add(He.DragStart,bs),this.windowListeners.add(He.VisibilityChange,this.handleCancel),this.windowListeners.add(He.ContextMenu,bs),this.documentListeners.add(He.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ws(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(xs(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:o}=this.props;o(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(He.Click,Ou,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(He.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!o)return;const l=(r=en(t))!=null?r:Xe,c=br(o,l);if(!n&&a){if(xs(a)){if(a.tolerance!=null&&ho(c,a.tolerance))return this.handleCancel();if(ho(c,a.distance))return this.handleStart()}if(ws(a)&&ho(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===we.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Iu={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class go extends mo{constructor(t){const{event:r}=t,n=Bt(r.target);super(t,Iu,n)}}go.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const Du={move:{name:"mousemove"},end:{name:"mouseup"}};var bo;(function(e){e[e.RightClick=2]="RightClick"})(bo||(bo={}));class Ru extends mo{constructor(t){super(t,Du,Bt(t.event.target))}}Ru.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===bo.RightClick?!1:(n==null||n({event:r}),!0)}}];const vo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ys extends mo{constructor(t){super(t,vo)}static setup(){return window.addEventListener(vo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(vo.move.name,t)};function t(){}}}ys.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:o}=r;return o.length>1?!1:(n==null||n({event:r}),!0)}}];var xr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(xr||(xr={}));var nn;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(nn||(nn={}));function Mu(e){let{acceleration:t,activator:r=xr.Pointer,canScroll:n,draggingRect:o,enabled:i,interval:s=5,order:a=nn.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:m}=e;const u=Fu({delta:f,disabled:!i}),[x,h]=qd(),b=T.useRef({x:0,y:0}),v=T.useRef({x:0,y:0}),w=T.useMemo(()=>{switch(r){case xr.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case xr.DraggableRect:return o}},[r,o,l]),k=T.useRef(null),S=T.useCallback(()=>{const O=k.current;if(!O)return;const N=b.current.x*v.current.x,I=b.current.y*v.current.y;O.scrollBy(N,I)},[]),C=T.useMemo(()=>a===nn.TreeOrder?[...c].reverse():c,[a,c]);T.useEffect(()=>{if(!i||!c.length||!w){h();return}for(const O of C){if((n==null?void 0:n(O))===!1)continue;const N=c.indexOf(O),I=d[N];if(!I)continue;const{direction:D,speed:L}=Eu(O,I,w,t,m);for(const Z of["x","y"])u[Z][D[Z]]||(L[Z]=0,D[Z]=0);if(L.x>0||L.y>0){h(),k.current=O,x(S,s),b.current=L,v.current=D;return}}b.current={x:0,y:0},v.current={x:0,y:0},h()},[t,S,n,h,i,s,JSON.stringify(w),JSON.stringify(u),x,c,C,d,JSON.stringify(m)])}const Lu={x:{[Te.Backward]:!1,[Te.Forward]:!1},y:{[Te.Backward]:!1,[Te.Forward]:!1}};function Fu(e){let{delta:t,disabled:r}=e;const n=Jr(t);return mr(o=>{if(r||!n||!o)return Lu;const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Te.Backward]:o.x[Te.Backward]||i.x===-1,[Te.Forward]:o.x[Te.Forward]||i.x===1},y:{[Te.Backward]:o.y[Te.Backward]||i.y===-1,[Te.Forward]:o.y[Te.Forward]||i.y===1}}},[r,t,n])}function Bu(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return mr(o=>{var i;return t==null?null:(i=n??o)!=null?i:null},[n,t])}function Uu(e,t){return T.useMemo(()=>e.reduce((r,n)=>{const{sensor:o}=n,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,n)}));return[...r,...i]},[]),[e,t])}var wr;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(wr||(wr={}));var xo;(function(e){e.Optimized="optimized"})(xo||(xo={}));const ks=new Map;function Wu(e,t){let{dragging:r,dependencies:n,config:o}=t;const[i,s]=T.useState(null),{frequency:a,measure:l,strategy:c}=o,d=T.useRef(e),f=b(),m=pr(f),u=T.useCallback(function(v){v===void 0&&(v=[]),!m.current&&s(w=>w===null?v:w.concat(v.filter(k=>!w.includes(k))))},[m]),x=T.useRef(null),h=mr(v=>{if(f&&!r)return ks;if(!v||v===ks||d.current!==e||i!=null){const w=new Map;for(let k of e){if(!k)continue;if(i&&i.length>0&&!i.includes(k.id)&&k.rect.current){w.set(k.id,k.rect.current);continue}const S=k.node.current,C=S?new fo(l(S),S):null;k.rect.current=C,C&&w.set(k.id,C)}return w}return v},[e,i,r,f,l]);return T.useEffect(()=>{d.current=e},[e]),T.useEffect(()=>{f||u()},[r,f]),T.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),T.useEffect(()=>{f||typeof a!="number"||x.current!==null||(x.current=setTimeout(()=>{u(),x.current=null},a))},[a,f,u,...n]),{droppableRects:h,measureDroppableContainers:u,measuringScheduled:i!=null};function b(){switch(c){case wr.Always:return!1;case wr.BeforeDragging:return r;default:return!r}}}function wo(e,t){return mr(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function $u(e,t){return wo(e,t)}function Hu(e){let{callback:t,disabled:r}=e;const n=Xr(t),o=T.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(n)},[n,r]);return T.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function on(e){let{callback:t,disabled:r}=e;const n=Xr(t),o=T.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(n)},[r]);return T.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Vu(e){return new fo(Wt(e),e)}function Ss(e,t,r){t===void 0&&(t=Vu);const[n,o]=T.useState(null);function i(){o(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??r)!=null?c:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const s=Hu({callback(l){if(e)for(const c of l){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),a=on({callback:i});return Ge(()=>{i(),e?(a==null||a.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),s==null||s.disconnect())},[e]),n}function Yu(e){const t=wo(e);return as(e,t)}const _s=[];function Ku(e){const t=T.useRef(e),r=mr(n=>e?n&&n!==_s&&e&&t.current&&e.parentNode===t.current.parentNode?n:rn(e):_s,[e]);return T.useEffect(()=>{t.current=e},[e]),r}function Zu(e){const[t,r]=T.useState(null),n=T.useRef(e),o=T.useCallback(i=>{const s=co(i.target);s&&r(a=>a?(a.set(s,uo(s)),new Map(a)):null)},[]);return T.useEffect(()=>{const i=n.current;if(e!==i){s(i);const a=e.map(l=>{const c=co(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,uo(c)]):null}).filter(l=>l!=null);r(a.length?new Map(a):null),n.current=e}return()=>{s(e),s(i)};function s(a){a.forEach(l=>{const c=co(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),T.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>Ut(i,s),Xe):ms(e):Xe,[e,t])}function Cs(e,t){t===void 0&&(t=[]);const r=T.useRef(null);return T.useEffect(()=>{r.current=null},t),T.useEffect(()=>{const n=e!==Xe;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?br(e,r.current):Xe}function Gu(e){T.useEffect(()=>{if(!Gr)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function Xu(e,t){return T.useMemo(()=>e.reduce((r,n)=>{let{eventName:o,handler:i}=n;return r[o]=s=>{i(s,t)},r},{}),[e,t])}function Es(e){return T.useMemo(()=>e?ku(e):null,[e])}const As=[];function qu(e,t){t===void 0&&(t=Wt);const[r]=e,n=Es(r?Me(r):null),[o,i]=T.useState(As);function s(){i(()=>e.length?e.map(l=>hs(l)?n:new fo(t(l),l)):As)}const a=on({callback:s});return Ge(()=>{a==null||a.disconnect(),s(),e.forEach(l=>a==null?void 0:a.observe(l))},[e]),o}function Ns(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return hr(t)?t:e}function Ju(e){let{measure:t}=e;const[r,n]=T.useState(null),o=T.useCallback(c=>{for(const{target:d}of c)if(hr(d)){n(f=>{const m=t(d);return f?{...f,width:m.width,height:m.height}:m});break}},[t]),i=on({callback:o}),s=T.useCallback(c=>{const d=Ns(c);i==null||i.disconnect(),d&&(i==null||i.observe(d)),n(d?t(d):null)},[t,i]),[a,l]=qr(s);return T.useMemo(()=>({nodeRef:a,rect:r,setRef:l}),[r,a,l])}const Qu=[{sensor:go,options:{}},{sensor:po,options:{}}],ef={current:{}},sn={draggable:{measure:cs},droppable:{measure:cs,strategy:wr.WhileDragging,frequency:xo.Optimized},dragOverlay:{measure:Wt}};class yr extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const tf={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new yr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:tn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:sn,measureDroppableContainers:tn,windowRect:null,measuringScheduled:!1},zs={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:tn,draggableNodes:new Map,over:null,measureDroppableContainers:tn},kr=T.createContext(zs),js=T.createContext(tf);function rf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new yr}}}function nf(e,t){switch(t.type){case ze.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ze.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ze.DragEnd:case ze.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ze.RegisterDroppable:{const{element:r}=t,{id:n}=r,o=new yr(e.droppable.containers);return o.set(n,r),{...e,droppable:{...e.droppable,containers:o}}}case ze.SetDroppableDisabled:{const{id:r,key:n,disabled:o}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const s=new yr(e.droppable.containers);return s.set(r,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case ze.UnregisterDroppable:{const{id:r,key:n}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const i=new yr(e.droppable.containers);return i.delete(r),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function of(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:o}=T.useContext(kr),i=Jr(n),s=Jr(r==null?void 0:r.id);return T.useEffect(()=>{if(!t&&!n&&i&&s!=null){if(!Qr(i)||document.activeElement===i.target)return;const a=o.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[l.current,c.current]){if(!d)continue;const f=eu(d);if(f){f.focus();break}}})}},[n,t,o,s,i]),null}function Ts(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...n}),r):r}function sf(e){return T.useMemo(()=>({draggable:{...sn.draggable,...e==null?void 0:e.draggable},droppable:{...sn.droppable,...e==null?void 0:e.droppable},dragOverlay:{...sn.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function af(e){let{activeNode:t,measure:r,initialRect:n,config:o=!0}=e;const i=T.useRef(!1),{x:s,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Ge(()=>{if(!s&&!a||!t){i.current=!1;return}if(i.current||!n)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=r(c),f=as(d,n);if(s||(f.x=0),a||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const m=ds(c);m&&m.scrollBy({top:f.y,left:f.x})}},[t,s,a,n,r])}const an=T.createContext({...Xe,scaleX:1,scaleY:1});var vt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(vt||(vt={}));const lf=T.memo(function(t){var r,n,o,i;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:d=Qu,collisionDetection:f=gu,measuring:m,modifiers:u,...x}=t;const h=T.useReducer(nf,void 0,rf),[b,v]=h,[w,k]=su(),[S,C]=T.useState(vt.Uninitialized),O=S===vt.Initialized,{draggable:{active:N,nodes:I,translate:D},droppable:{containers:L}}=b,Z=N!=null?I.get(N):null,j=T.useRef({initial:null,translated:null}),F=T.useMemo(()=>{var Ae;return N!=null?{id:N,data:(Ae=Z==null?void 0:Z.data)!=null?Ae:ef,rect:j}:null},[N,Z]),y=T.useRef(null),[H,Q]=T.useState(null),[$,V]=T.useState(null),Y=pr(x,Object.values(x)),J=gr("DndDescribedBy",s),z=T.useMemo(()=>L.getEnabled(),[L]),P=sf(m),{droppableRects:K,measureDroppableContainers:G,measuringScheduled:te}=Wu(z,{dragging:O,dependencies:[D.x,D.y],config:P.droppable}),ue=Bu(I,N),ee=T.useMemo(()=>$?en($):null,[$]),ie=Zn(),se=$u(ue,P.draggable.measure);af({activeNode:N!=null?I.get(N):null,config:ie.layoutShiftCompensation,initialRect:se,measure:P.draggable.measure});const oe=Ss(ue,P.draggable.measure,se),le=Ss(ue?ue.parentElement:null),fe=T.useRef({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:K,draggableNodes:I,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),xe=L.getNodeFor((r=fe.current.over)==null?void 0:r.id),g=Ju({measure:P.dragOverlay.measure}),B=(n=g.nodeRef.current)!=null?n:ue,W=O?(o=g.rect)!=null?o:oe:null,E=!!(g.nodeRef.current&&g.rect),A=Yu(E?null:oe),R=Es(B?Me(B):null),X=Ku(O?xe??ue:null),U=qu(X),M=Ts(u,{transform:{x:D.x-A.x,y:D.y-A.y,scaleX:1,scaleY:1},activatorEvent:$,active:F,activeNodeRect:oe,containerNodeRect:le,draggingNodeRect:W,over:fe.current.over,overlayNodeRect:g.rect,scrollableAncestors:X,scrollableAncestorRects:U,windowRect:R}),q=ee?Ut(ee,D):null,ne=Zu(X),re=Cs(ne),ae=Cs(ne,[oe]),he=Ut(M,re),me=W?xu(W,M):null,ve=F&&me?f({active:F,collisionRect:me,droppableRects:K,droppableContainers:z,pointerCoordinates:q}):null,st=is(ve,"id"),[je,Ct]=T.useState(null),Ee=E?M:Ut(M,ae),sr=bu(Ee,(i=je==null?void 0:je.rect)!=null?i:null,oe),It=T.useRef(null),Ye=T.useCallback((Ae,Oe)=>{let{sensor:We,options:Et}=Oe;if(y.current==null)return;const Ke=I.get(y.current);if(!Ke)return;const $e=Ae.nativeEvent,at=new We({active:y.current,activeNode:Ke,event:$e,options:Et,context:fe,onAbort(De){if(!I.get(De))return;const{onDragAbort:lt}=Y.current,ht={id:De};lt==null||lt(ht),w({type:"onDragAbort",event:ht})},onPending(De,At,lt,ht){if(!I.get(De))return;const{onDragPending:Dr}=Y.current,Nt={id:De,constraint:At,initialCoordinates:lt,offset:ht};Dr==null||Dr(Nt),w({type:"onDragPending",event:Nt})},onStart(De){const At=y.current;if(At==null)return;const lt=I.get(At);if(!lt)return;const{onDragStart:ht}=Y.current,Ir={activatorEvent:$e,active:{id:At,data:lt.data,rect:j}};pt.unstable_batchedUpdates(()=>{ht==null||ht(Ir),C(vt.Initializing),v({type:ze.DragStart,initialCoordinates:De,active:At}),w({type:"onDragStart",event:Ir}),Q(It.current),V($e)})},onMove(De){v({type:ze.DragMove,coordinates:De})},onEnd:ar(ze.DragEnd),onCancel:ar(ze.DragCancel)});It.current=at;function ar(De){return async function(){const{active:lt,collisions:ht,over:Ir,scrollAdjustedTranslate:Dr}=fe.current;let Nt=null;if(lt&&Dr){const{cancelDrop:Rr}=Y.current;Nt={activatorEvent:$e,active:lt,collisions:ht,delta:Dr,over:Ir},De===ze.DragEnd&&typeof Rr=="function"&&await Promise.resolve(Rr(Nt))&&(De=ze.DragCancel)}y.current=null,pt.unstable_batchedUpdates(()=>{v({type:De}),C(vt.Uninitialized),Ct(null),Q(null),V(null),It.current=null;const Rr=De===ze.DragEnd?"onDragEnd":"onDragCancel";if(Nt){const mi=Y.current[Rr];mi==null||mi(Nt),w({type:Rr,event:Nt})}})}}},[I]),Yn=T.useCallback((Ae,Oe)=>(We,Et)=>{const Ke=We.nativeEvent,$e=I.get(Et);if(y.current!==null||!$e||Ke.dndKit||Ke.defaultPrevented)return;const at={active:$e};Ae(We,Oe.options,at)===!0&&(Ke.dndKit={capturedBy:Oe.sensor},y.current=Et,Ye(We,Oe))},[I,Ye]),Kn=Uu(d,Yn);Gu(d),Ge(()=>{oe&&S===vt.Initializing&&C(vt.Initialized)},[oe,S]),T.useEffect(()=>{const{onDragMove:Ae}=Y.current,{active:Oe,activatorEvent:We,collisions:Et,over:Ke}=fe.current;if(!Oe||!We)return;const $e={active:Oe,activatorEvent:We,collisions:Et,delta:{x:he.x,y:he.y},over:Ke};pt.unstable_batchedUpdates(()=>{Ae==null||Ae($e),w({type:"onDragMove",event:$e})})},[he.x,he.y]),T.useEffect(()=>{const{active:Ae,activatorEvent:Oe,collisions:We,droppableContainers:Et,scrollAdjustedTranslate:Ke}=fe.current;if(!Ae||y.current==null||!Oe||!Ke)return;const{onDragOver:$e}=Y.current,at=Et.get(st),ar=at&&at.rect.current?{id:at.id,rect:at.rect.current,data:at.data,disabled:at.disabled}:null,De={active:Ae,activatorEvent:Oe,collisions:We,delta:{x:Ke.x,y:Ke.y},over:ar};pt.unstable_batchedUpdates(()=>{Ct(ar),$e==null||$e(De),w({type:"onDragOver",event:De})})},[st]),Ge(()=>{fe.current={activatorEvent:$,active:F,activeNode:ue,collisionRect:me,collisions:ve,droppableRects:K,draggableNodes:I,draggingNode:B,draggingNodeRect:W,droppableContainers:L,over:je,scrollableAncestors:X,scrollAdjustedTranslate:he},j.current={initial:W,translated:me}},[F,ue,ve,me,I,B,W,K,L,je,X,he]),Mu({...ie,delta:D,draggingRect:me,pointerCoordinates:q,scrollableAncestors:X,scrollableAncestorRects:U});const hi=T.useMemo(()=>({active:F,activeNode:ue,activeNodeRect:oe,activatorEvent:$,collisions:ve,containerNodeRect:le,dragOverlay:g,draggableNodes:I,droppableContainers:L,droppableRects:K,over:je,measureDroppableContainers:G,scrollableAncestors:X,scrollableAncestorRects:U,measuringConfiguration:P,measuringScheduled:te,windowRect:R}),[F,ue,oe,$,ve,le,g,I,L,K,je,G,X,U,P,te,R]),pi=T.useMemo(()=>({activatorEvent:$,activators:Kn,active:F,activeNodeRect:oe,ariaDescribedById:{draggable:J},dispatch:v,draggableNodes:I,over:je,measureDroppableContainers:G}),[$,Kn,F,oe,v,J,I,je,G]);return T.createElement(ts.Provider,{value:k},T.createElement(kr.Provider,{value:pi},T.createElement(js.Provider,{value:hi},T.createElement(an.Provider,{value:sr},c)),T.createElement(of,{disabled:(a==null?void 0:a.restoreFocus)===!1})),T.createElement(cu,{...a,hiddenTextDescribedById:J}));function Zn(){const Ae=(H==null?void 0:H.autoScrollEnabled)===!1,Oe=typeof l=="object"?l.enabled===!1:l===!1,We=O&&!Ae&&!Oe;return typeof l=="object"?{...l,enabled:We}:{enabled:We}}}),cf=T.createContext(null),Os="button",df="Draggable";function uf(e){let{id:t,data:r,disabled:n=!1,attributes:o}=e;const i=gr(df),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:m}=T.useContext(kr),{role:u=Os,roleDescription:x="draggable",tabIndex:h=0}=o??{},b=(l==null?void 0:l.id)===t,v=T.useContext(b?an:cf),[w,k]=qr(),[S,C]=qr(),O=Xu(s,t),N=pr(r);Ge(()=>(f.set(t,{id:t,key:i,node:w,activatorNode:S,data:N}),()=>{const D=f.get(t);D&&D.key===i&&f.delete(t)}),[f,t]);const I=T.useMemo(()=>({role:u,tabIndex:h,"aria-disabled":n,"aria-pressed":b&&u===Os?!0:void 0,"aria-roledescription":x,"aria-describedby":d.draggable}),[n,u,h,b,x,d.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:I,isDragging:b,listeners:n?void 0:O,node:w,over:m,setNodeRef:k,setActivatorNodeRef:C,transform:v}}function Ps(){return T.useContext(js)}const ff="Droppable",hf={timeout:25};function pf(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:o}=e;const i=gr(ff),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=T.useContext(kr),d=T.useRef({disabled:r}),f=T.useRef(!1),m=T.useRef(null),u=T.useRef(null),{disabled:x,updateMeasurementsFor:h,timeout:b}={...hf,...o},v=pr(h??n),w=T.useCallback(()=>{if(!f.current){f.current=!0;return}u.current!=null&&clearTimeout(u.current),u.current=setTimeout(()=>{c(Array.isArray(v.current)?v.current:[v.current]),u.current=null},b)},[b]),k=on({callback:w,disabled:x||!s}),S=T.useCallback((I,D)=>{k&&(D&&(k.unobserve(D),f.current=!1),I&&k.observe(I))},[k]),[C,O]=qr(S),N=pr(t);return T.useEffect(()=>{!k||!C.current||(k.disconnect(),f.current=!1,k.observe(C.current))},[C,k]),T.useEffect(()=>(a({type:ze.RegisterDroppable,element:{id:n,key:i,disabled:r,node:C,rect:m,data:N}}),()=>a({type:ze.UnregisterDroppable,key:i,id:n})),[n]),T.useEffect(()=>{r!==d.current.disabled&&(a({type:ze.SetDroppableDisabled,id:n,key:i,disabled:r}),d.current.disabled=r)},[n,i,r,a]),{active:s,rect:m,isOver:(l==null?void 0:l.id)===n,node:C,over:l,setNodeRef:O}}function mf(e){let{animation:t,children:r}=e;const[n,o]=T.useState(null),[i,s]=T.useState(null),a=Jr(r);return!r&&!n&&a&&o(a),Ge(()=>{if(!i)return;const l=n==null?void 0:n.key,c=n==null?void 0:n.props.id;if(l==null||c==null){o(null);return}Promise.resolve(t(c,i)).then(()=>{o(null)})},[t,n,i]),T.createElement(T.Fragment,null,r,n?T.cloneElement(n,{ref:s}):null)}const gf={x:0,y:0,scaleX:1,scaleY:1};function bf(e){let{children:t}=e;return T.createElement(kr.Provider,{value:zs},T.createElement(an.Provider,{value:gf},t))}const vf={position:"fixed",touchAction:"none"},xf=e=>Qr(e)?"transform 250ms ease":void 0,wf=T.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:o,children:i,className:s,rect:a,style:l,transform:c,transition:d=xf}=e;if(!a)return null;const f=o?c:{...c,scaleX:1,scaleY:1},m={...vf,width:a.width,height:a.height,top:a.top,left:a.left,transform:bt.Transform.toString(f),transformOrigin:o&&n?uu(n,a):void 0,transition:typeof d=="function"?d(n):d,...l};return T.createElement(r,{className:s,style:m,ref:t},i)}),yf={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:r}}=e;return[{transform:bt.Transform.toString(t)},{transform:bt.Transform.toString(r)}]},sideEffects:(e=>t=>{let{active:r,dragOverlay:n}=t;const o={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[a,l]of Object.entries(i.active))l!==void 0&&(o[a]=r.node.style.getPropertyValue(a),r.node.style.setProperty(a,l));if(i!=null&&i.dragOverlay)for(const[a,l]of Object.entries(i.dragOverlay))l!==void 0&&n.node.style.setProperty(a,l);return s!=null&&s.active&&r.node.classList.add(s.active),s!=null&&s.dragOverlay&&n.node.classList.add(s.dragOverlay),function(){for(const[l,c]of Object.entries(o))r.node.style.setProperty(l,c);s!=null&&s.active&&r.node.classList.remove(s.active)}})({styles:{active:{opacity:"0"}}})};function kf(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:o}=e;return Xr((i,s)=>{if(t===null)return;const a=r.get(i);if(!a)return;const l=a.node.current;if(!l)return;const c=Ns(s);if(!c)return;const{transform:d}=Me(s).getComputedStyle(s),f=ls(d);if(!f)return;const m=typeof t=="function"?t:Sf(t);return gs(l,o.draggable.measure),m({active:{id:i,data:a.data,node:l,rect:o.draggable.measure(l)},draggableNodes:r,dragOverlay:{node:s,rect:o.dragOverlay.measure(c)},droppableContainers:n,measuringConfiguration:o,transform:f})})}function Sf(e){const{duration:t,easing:r,sideEffects:n,keyframes:o}={...yf,...e};return i=>{let{active:s,dragOverlay:a,transform:l,...c}=i;if(!t)return;const d={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},f={scaleX:l.scaleX!==1?s.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?s.rect.height*l.scaleY/a.rect.height:1},m={x:l.x-d.x,y:l.y-d.y,...f},u=o({...c,active:s,dragOverlay:a,transform:{initial:l,final:m}}),[x]=u,h=u[u.length-1];if(JSON.stringify(x)===JSON.stringify(h))return;const b=n==null?void 0:n({active:s,dragOverlay:a,...c}),v=a.node.animate(u,{duration:t,easing:r,fill:"forwards"});return new Promise(w=>{v.onfinish=()=>{b==null||b(),w()}})}}let Is=0;function _f(e){return T.useMemo(()=>{if(e!=null)return Is++,Is},[e])}const Cf=T.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:o,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:c=999}=e;const{activatorEvent:d,active:f,activeNodeRect:m,containerNodeRect:u,draggableNodes:x,droppableContainers:h,dragOverlay:b,over:v,measuringConfiguration:w,scrollableAncestors:k,scrollableAncestorRects:S,windowRect:C}=Ps(),O=T.useContext(an),N=_f(f==null?void 0:f.id),I=Ts(s,{activatorEvent:d,active:f,activeNodeRect:m,containerNodeRect:u,draggingNodeRect:b.rect,over:v,overlayNodeRect:b.rect,scrollableAncestors:k,scrollableAncestorRects:S,transform:O,windowRect:C}),D=wo(m),L=kf({config:n,draggableNodes:x,droppableContainers:h,measuringConfiguration:w}),Z=D?b.setRef:void 0;return T.createElement(bf,null,T.createElement(mf,{animation:L},f&&N?T.createElement(wf,{key:N,id:f.id,ref:Z,as:a,activatorEvent:d,adjustScale:t,className:l,transition:i,rect:D,style:{zIndex:c,...o},transform:I},r):null))}),Ef=e=>{let{transform:t}=e;return{...t,x:0}};function Ds(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function Af(e,t){return e.reduce((r,n,o)=>{const i=t.get(n);return i&&(r[o]=i),r},Array(e.length))}function ln(e){return e!==null&&e>=0}function Nf(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function zf(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Rs=e=>{let{rects:t,activeIndex:r,overIndex:n,index:o}=e;const i=Ds(t,n,r),s=t[o],a=i[o];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},cn={scaleX:1,scaleY:1},jf=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:o,rects:i,overIndex:s}=e;const a=(t=i[r])!=null?t:n;if(!a)return null;if(o===r){const c=i[s];return c?{x:0,y:r<s?c.top+c.height-(a.top+a.height):c.top-a.top,...cn}:null}const l=Tf(i,o,r);return o>r&&o<=s?{x:0,y:-a.height-l,...cn}:o<r&&o>=s?{x:0,y:a.height+l,...cn}:{x:0,y:0,...cn}};function Tf(e,t,r){const n=e[t],o=e[t-1],i=e[t+1];return n?r<t?o?n.top-(o.top+o.height):i?i.top-(n.top+n.height):0:i?i.top-(n.top+n.height):o?n.top-(o.top+o.height):0:0}const Ms="Sortable",Ls=T.createContext({activeIndex:-1,containerId:Ms,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Rs,disabled:{draggable:!1,droppable:!1}});function Of(e){let{children:t,id:r,items:n,strategy:o=Rs,disabled:i=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:d}=Ps(),f=gr(Ms,r),m=a.rect!==null,u=T.useMemo(()=>n.map(O=>typeof O=="object"&&"id"in O?O.id:O),[n]),x=s!=null,h=s?u.indexOf(s.id):-1,b=c?u.indexOf(c.id):-1,v=T.useRef(u),w=!Nf(u,v.current),k=b!==-1&&h===-1||w,S=zf(i);Ge(()=>{w&&x&&d(u)},[w,u,x,d]),T.useEffect(()=>{v.current=u},[u]);const C=T.useMemo(()=>({activeIndex:h,containerId:f,disabled:S,disableTransforms:k,items:u,overIndex:b,useDragOverlay:m,sortedRects:Af(u,l),strategy:o}),[h,f,S.draggable,S.droppable,k,u,b,l,m,o]);return T.createElement(Ls.Provider,{value:C},t)}const Pf=e=>{let{id:t,items:r,activeIndex:n,overIndex:o}=e;return Ds(r,n,o).indexOf(t)},If=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:o,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!n||a!==i&&o===s?!1:r?!0:s!==o&&t===l},Df={duration:200,easing:"ease"},Fs="transform",Rf=bt.Transition.toString({property:Fs,duration:0,easing:"linear"}),Mf={roleDescription:"sortable"};function Lf(e){let{disabled:t,index:r,node:n,rect:o}=e;const[i,s]=T.useState(null),a=T.useRef(r);return Ge(()=>{if(!t&&r!==a.current&&n.current){const l=o.current;if(l){const c=Wt(n.current,{ignoreTransform:!0}),d={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(d.x||d.y)&&s(d)}}r!==a.current&&(a.current=r)},[t,r,n,o]),T.useEffect(()=>{i&&s(null)},[i]),i}function Ff(e){let{animateLayoutChanges:t=If,attributes:r,disabled:n,data:o,getNewIndex:i=Pf,id:s,strategy:a,resizeObserverConfig:l,transition:c=Df}=e;const{items:d,containerId:f,activeIndex:m,disabled:u,disableTransforms:x,sortedRects:h,overIndex:b,useDragOverlay:v,strategy:w}=T.useContext(Ls),k=Bf(n,u),S=d.indexOf(s),C=T.useMemo(()=>({sortable:{containerId:f,index:S,items:d},...o}),[f,o,S,d]),O=T.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:N,node:I,isOver:D,setNodeRef:L}=pf({id:s,data:C,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...l}}),{active:Z,activatorEvent:j,activeNodeRect:F,attributes:y,setNodeRef:H,listeners:Q,isDragging:$,over:V,setActivatorNodeRef:Y,transform:J}=uf({id:s,data:C,attributes:{...Mf,...r},disabled:k.draggable}),z=Xd(L,H),P=!!Z,K=P&&!x&&ln(m)&&ln(b),G=!v&&$,te=G&&K?J:null,ee=K?te??(a??w)({rects:h,activeNodeRect:F,activeIndex:m,overIndex:b,index:S}):null,ie=ln(m)&&ln(b)?i({id:s,items:d,activeIndex:m,overIndex:b}):S,se=Z==null?void 0:Z.id,oe=T.useRef({activeId:se,items:d,newIndex:ie,containerId:f}),le=d!==oe.current.items,fe=t({active:Z,containerId:f,isDragging:$,isSorting:P,id:s,index:S,items:d,newIndex:oe.current.newIndex,previousItems:oe.current.items,previousContainerId:oe.current.containerId,transition:c,wasDragging:oe.current.activeId!=null}),xe=Lf({disabled:!fe,index:S,node:I,rect:N});return T.useEffect(()=>{P&&oe.current.newIndex!==ie&&(oe.current.newIndex=ie),f!==oe.current.containerId&&(oe.current.containerId=f),d!==oe.current.items&&(oe.current.items=d)},[P,ie,f,d]),T.useEffect(()=>{if(se===oe.current.activeId)return;if(se!=null&&oe.current.activeId==null){oe.current.activeId=se;return}const B=setTimeout(()=>{oe.current.activeId=se},50);return()=>clearTimeout(B)},[se]),{active:Z,activeIndex:m,attributes:y,data:C,rect:N,index:S,newIndex:ie,items:d,isOver:D,isSorting:P,isDragging:$,listeners:Q,node:I,overIndex:b,over:V,setNodeRef:z,setActivatorNodeRef:Y,setDroppableNodeRef:L,setDraggableNodeRef:H,transform:xe??ee,transition:g()};function g(){if(xe||le&&oe.current.newIndex===S)return Rf;if(!(G&&!Qr(j)||!c)&&(P||fe))return bt.Transition.toString({...c,property:Fs})}}function Bf(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}function dn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Uf=[we.Down,we.Right,we.Up,we.Left],Wf=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:a}}=t;if(Uf.includes(e.code)){if(e.preventDefault(),!r||!n)return;const l=[];i.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const m=o.get(f.id);if(m)switch(e.code){case we.Down:n.top<m.top&&l.push(f);break;case we.Up:n.top>m.top&&l.push(f);break;case we.Left:n.left>m.left&&l.push(f);break;case we.Right:n.left<m.left&&l.push(f);break}});const c=pu({collisionRect:n,droppableRects:o,droppableContainers:l});let d=is(c,"id");if(d===(s==null?void 0:s.id)&&c.length>1&&(d=c[1].id),d!=null){const f=i.get(r.id),m=i.get(d),u=m?o.get(m.id):null,x=m==null?void 0:m.node.current;if(x&&u&&f&&m){const b=rn(x).some((O,N)=>a[N]!==O),v=Bs(f,m),w=$f(f,m),k=b||!v?{x:0,y:0}:{x:w?n.width-u.width:0,y:w?n.height-u.height:0},S={x:u.left,y:u.top};return k.x&&k.y?S:br(S,k)}}}};function Bs(e,t){return!dn(e)||!dn(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function $f(e,t){return!dn(e)||!dn(t)||!Bs(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function yo({className:e,type:t,...r}){return p.jsx("input",{type:t,className:pe("h-8 rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-1 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600",e),...r})}function Hf({className:e,...t}){return p.jsx("textarea",{className:pe("min-h-16 w-full rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-2 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600 resize-none",e),...t})}function Vf({className:e,checked:t,onCheckedChange:r,...n}){return p.jsx("input",{type:"checkbox",checked:t,onChange:o=>r==null?void 0:r(o.target.checked),className:pe("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...n})}function jt({className:e,...t}){return p.jsx("label",{className:pe("text-sm font-medium leading-none select-none",e),...t})}function ko(e,[t,r]){return Math.min(r,Math.max(t,e))}function be(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function $t(e,t=[]){let r=[];function n(i,s){const a=_.createContext(s),l=r.length;r=[...r,s];const c=f=>{var v;const{scope:m,children:u,...x}=f,h=((v=m==null?void 0:m[e])==null?void 0:v[l])||a,b=_.useMemo(()=>x,Object.values(x));return p.jsx(h.Provider,{value:b,children:u})};c.displayName=i+"Provider";function d(f,m){var h;const u=((h=m==null?void 0:m[e])==null?void 0:h[l])||a,x=_.useContext(u);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,d]}const o=()=>{const i=r.map(s=>_.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return _.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[n,Yf(o,...t)]}function Yf(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=n.reduce((a,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...a,...f}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Us(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ws(...e){return t=>{let r=!1;const n=e.map(o=>{const i=Us(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():Us(e[o],null)}}}}function _e(...e){return _.useCallback(Ws(...e),e)}function Ht(e){const t=Zf(e),r=_.forwardRef((n,o)=>{const{children:i,...s}=n,a=_.Children.toArray(i),l=a.find(Xf);if(l){const c=l.props.children,d=a.map(f=>f===l?_.Children.count(c)>1?_.Children.only(null):_.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...s,ref:o,children:_.isValidElement(c)?_.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var Kf=Ht("Slot");function Zf(e){const t=_.forwardRef((r,n)=>{const{children:o,...i}=r;if(_.isValidElement(o)){const s=Jf(o),a=qf(i,o.props);return o.type!==_.Fragment&&(a.ref=n?Ws(n,s):s),_.cloneElement(o,a)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $s=Symbol("radix.slottable");function Gf(e){const t=({children:r})=>p.jsx(p.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=$s,t}function Xf(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$s}function qf(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function Jf(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Qf(e){const t=e+"CollectionProvider",[r,n]=$t(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{const{scope:b,children:v}=h,w=T.useRef(null),k=T.useRef(new Map).current;return p.jsx(o,{scope:b,itemMap:k,collectionRef:w,children:v})};s.displayName=t;const a=e+"CollectionSlot",l=Ht(a),c=T.forwardRef((h,b)=>{const{scope:v,children:w}=h,k=i(a,v),S=_e(b,k.collectionRef);return p.jsx(l,{ref:S,children:w})});c.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=Ht(d),u=T.forwardRef((h,b)=>{const{scope:v,children:w,...k}=h,S=T.useRef(null),C=_e(b,S),O=i(d,v);return T.useEffect(()=>(O.itemMap.set(S,{ref:S,...k}),()=>void O.itemMap.delete(S))),p.jsx(m,{[f]:"",ref:C,children:w})});u.displayName=d;function x(h){const b=i(e+"CollectionConsumer",h);return T.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const k=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((O,N)=>k.indexOf(O.ref.current)-k.indexOf(N.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:c,ItemSlot:u},x,n]}var eh=_.createContext(void 0);function Hs(e){const t=_.useContext(eh);return e||t||"ltr"}var th=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Se=th.reduce((e,t)=>{const r=Ht(`Primitive.${t}`),n=_.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function rh(e,t){e&&Mr.flushSync(()=>e.dispatchEvent(t))}function Le(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function nh(e,t=globalThis==null?void 0:globalThis.document){const r=Le(e);_.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var oh="DismissableLayer",So="dismissableLayer.update",ih="dismissableLayer.pointerDownOutside",sh="dismissableLayer.focusOutside",Vs,Ys=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),un=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=_.useContext(Ys),[d,f]=_.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,u]=_.useState({}),x=_e(t,N=>f(N)),h=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(b),w=d?h.indexOf(d):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,S=w>=v,C=ch(N=>{const I=N.target,D=[...c.branches].some(L=>L.contains(I));!S||D||(o==null||o(N),s==null||s(N),N.defaultPrevented||a==null||a())},m),O=dh(N=>{const I=N.target;[...c.branches].some(L=>L.contains(I))||(i==null||i(N),s==null||s(N),N.defaultPrevented||a==null||a())},m);return nh(N=>{w===c.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},m),_.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Vs=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Ks(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Vs)}},[d,m,r,c]),_.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Ks())},[d,c]),_.useEffect(()=>{const N=()=>u({});return document.addEventListener(So,N),()=>document.removeEventListener(So,N)},[]),p.jsx(Se.div,{...l,ref:x,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,O.onFocusCapture),onBlurCapture:be(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,C.onPointerDownCapture)})});un.displayName=oh;var ah="DismissableLayerBranch",lh=_.forwardRef((e,t)=>{const r=_.useContext(Ys),n=_.useRef(null),o=_e(t,n);return _.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),p.jsx(Se.div,{...e,ref:o})});lh.displayName=ah;function ch(e,t=globalThis==null?void 0:globalThis.document){const r=Le(e),n=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){Zs(ih,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function dh(e,t=globalThis==null?void 0:globalThis.document){const r=Le(e),n=_.useRef(!1);return _.useEffect(()=>{const o=i=>{i.target&&!n.current&&Zs(sh,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ks(){const e=new CustomEvent(So);document.dispatchEvent(e)}function Zs(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?rh(o,i):o.dispatchEvent(i)}var _o=0;function Gs(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Xs()),document.body.insertAdjacentElement("beforeend",e[1]??Xs()),_o++,()=>{_o===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_o--}},[])}function Xs(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Co="focusScope.autoFocusOnMount",Eo="focusScope.autoFocusOnUnmount",qs={bubbles:!1,cancelable:!0},uh="FocusScope",Ao=_.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=_.useState(null),c=Le(o),d=Le(i),f=_.useRef(null),m=_e(t,h=>l(h)),u=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(n){let h=function(k){if(u.paused||!a)return;const S=k.target;a.contains(S)?f.current=S:xt(f.current,{select:!0})},b=function(k){if(u.paused||!a)return;const S=k.relatedTarget;S!==null&&(a.contains(S)||xt(f.current,{select:!0}))},v=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&xt(a)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const w=new MutationObserver(v);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),w.disconnect()}}},[n,a,u.paused]),_.useEffect(()=>{if(a){ea.add(u);const h=document.activeElement;if(!a.contains(h)){const v=new CustomEvent(Co,qs);a.addEventListener(Co,c),a.dispatchEvent(v),v.defaultPrevented||(fh(bh(Js(a)),{select:!0}),document.activeElement===h&&xt(a))}return()=>{a.removeEventListener(Co,c),setTimeout(()=>{const v=new CustomEvent(Eo,qs);a.addEventListener(Eo,d),a.dispatchEvent(v),v.defaultPrevented||xt(h??document.body,{select:!0}),a.removeEventListener(Eo,d),ea.remove(u)},0)}}},[a,c,d,u]);const x=_.useCallback(h=>{if(!r&&!n||u.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(b&&v){const w=h.currentTarget,[k,S]=hh(w);k&&S?!h.shiftKey&&v===S?(h.preventDefault(),r&&xt(k,{select:!0})):h.shiftKey&&v===k&&(h.preventDefault(),r&&xt(S,{select:!0})):v===w&&h.preventDefault()}},[r,n,u.paused]);return p.jsx(Se.div,{tabIndex:-1,...s,ref:m,onKeyDown:x})});Ao.displayName=uh;function fh(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(xt(n,{select:t}),document.activeElement!==r)return}function hh(e){const t=Js(e),r=Qs(t,e),n=Qs(t.reverse(),e);return[r,n]}function Js(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Qs(e,t){for(const r of e)if(!ph(r,{upTo:t}))return r}function ph(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function mh(e){return e instanceof HTMLInputElement&&"select"in e}function xt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&mh(e)&&t&&e.select()}}var ea=gh();function gh(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ta(e,t),e.unshift(t)},remove(t){var r;e=ta(e,t),(r=e[0])==null||r.resume()}}}function ta(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function bh(e){return e.filter(t=>t.tagName!=="A")}var Ie=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},vh=_[" useId ".trim().toString()]||(()=>{}),xh=0;function Sr(e){const[t,r]=_.useState(vh());return Ie(()=>{r(n=>n??String(xh++))},[e]),t?`radix-${t}`:""}const wh=["top","right","bottom","left"],wt=Math.min,Fe=Math.max,fn=Math.round,hn=Math.floor,et=e=>({x:e,y:e}),yh={left:"right",right:"left",bottom:"top",top:"bottom"},kh={start:"end",end:"start"};function No(e,t,r){return Fe(e,wt(t,r))}function dt(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function Vt(e){return e.split("-")[1]}function zo(e){return e==="x"?"y":"x"}function jo(e){return e==="y"?"height":"width"}const Sh=new Set(["top","bottom"]);function tt(e){return Sh.has(ut(e))?"y":"x"}function To(e){return zo(tt(e))}function _h(e,t,r){r===void 0&&(r=!1);const n=Vt(e),o=To(e),i=jo(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=pn(s)),[s,pn(s)]}function Ch(e){const t=pn(e);return[Oo(e),t,Oo(t)]}function Oo(e){return e.replace(/start|end/g,t=>kh[t])}const ra=["left","right"],na=["right","left"],Eh=["top","bottom"],Ah=["bottom","top"];function Nh(e,t,r){switch(e){case"top":case"bottom":return r?t?na:ra:t?ra:na;case"left":case"right":return t?Eh:Ah;default:return[]}}function zh(e,t,r,n){const o=Vt(e);let i=Nh(ut(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Oo)))),i}function pn(e){return e.replace(/left|right|bottom|top/g,t=>yh[t])}function jh(e){return{top:0,right:0,bottom:0,left:0,...e}}function oa(e){return typeof e!="number"?jh(e):{top:e,right:e,bottom:e,left:e}}function mn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ia(e,t,r){let{reference:n,floating:o}=e;const i=tt(t),s=To(t),a=jo(s),l=ut(t),c=i==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,m=n[a]/2-o[a]/2;let u;switch(l){case"top":u={x:d,y:n.y-o.height};break;case"bottom":u={x:d,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:f};break;case"left":u={x:n.x-o.width,y:f};break;default:u={x:n.x,y:n.y}}switch(Vt(t)){case"start":u[s]-=m*(r&&c?-1:1);break;case"end":u[s]+=m*(r&&c?-1:1);break}return u}async function Th(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:u=0}=dt(t,e),x=oa(u),b=a[m?f==="floating"?"reference":"floating":f],v=mn(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=f==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},C=mn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:k,strategy:l}):w);return{top:(v.top-C.top+x.top)/S.y,bottom:(C.bottom-v.bottom+x.bottom)/S.y,left:(v.left-C.left+x.left)/S.x,right:(C.right-v.right+x.right)/S.x}}const Oh=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=ia(c,n,l),m=n,u={},x=0;for(let b=0;b<a.length;b++){var h;const{name:v,fn:w}=a[b],{x:k,y:S,data:C,reset:O}=await w({x:d,y:f,initialPlacement:n,placement:m,strategy:o,middlewareData:u,rects:c,platform:{...s,detectOverflow:(h=s.detectOverflow)!=null?h:Th},elements:{reference:e,floating:t}});d=k??d,f=S??f,u={...u,[v]:{...u[v],...C}},O&&x<=50&&(x++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(c=O.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:d,y:f}=ia(c,m,l)),b=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:u}},Ph=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=dt(e,t)||{};if(c==null)return{};const f=oa(d),m={x:r,y:n},u=To(o),x=jo(u),h=await s.getDimensions(c),b=u==="y",v=b?"top":"left",w=b?"bottom":"right",k=b?"clientHeight":"clientWidth",S=i.reference[x]+i.reference[u]-m[u]-i.floating[x],C=m[u]-i.reference[u],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let N=O?O[k]:0;(!N||!await(s.isElement==null?void 0:s.isElement(O)))&&(N=a.floating[k]||i.floating[x]);const I=S/2-C/2,D=N/2-h[x]/2-1,L=wt(f[v],D),Z=wt(f[w],D),j=L,F=N-h[x]-Z,y=N/2-h[x]/2+I,H=No(j,y,F),Q=!l.arrow&&Vt(o)!=null&&y!==H&&i.reference[x]/2-(y<j?L:Z)-h[x]/2<0,$=Q?y<j?y-j:y-F:0;return{[u]:m[u]+$,data:{[u]:H,centerOffset:y-H-$,...Q&&{alignmentOffset:$}},reset:Q}}}),Ih=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...b}=dt(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=ut(o),w=tt(a),k=ut(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=m||(k||!h?[pn(a)]:Ch(a)),O=x!=="none";!m&&O&&C.push(...zh(a,h,x,S));const N=[a,...C],I=await l.detectOverflow(t,b),D=[];let L=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&D.push(I[v]),f){const y=_h(o,s,S);D.push(I[y[0]],I[y[1]])}if(L=[...L,{placement:o,overflows:D}],!D.every(y=>y<=0)){var Z,j;const y=(((Z=i.flip)==null?void 0:Z.index)||0)+1,H=N[y];if(H&&(!(f==="alignment"?w!==tt(H):!1)||L.every(V=>tt(V.placement)===w?V.overflows[0]>0:!0)))return{data:{index:y,overflows:L},reset:{placement:H}};let Q=(j=L.filter($=>$.overflows[0]<=0).sort(($,V)=>$.overflows[1]-V.overflows[1])[0])==null?void 0:j.placement;if(!Q)switch(u){case"bestFit":{var F;const $=(F=L.filter(V=>{if(O){const Y=tt(V.placement);return Y===w||Y==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(Y=>Y>0).reduce((Y,J)=>Y+J,0)]).sort((V,Y)=>V[1]-Y[1])[0])==null?void 0:F[0];$&&(Q=$);break}case"initialPlacement":Q=a;break}if(o!==Q)return{reset:{placement:Q}}}return{}}}};function sa(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function aa(e){return wh.some(t=>e[t]>=0)}const Dh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...i}=dt(e,t);switch(o){case"referenceHidden":{const s=await n.detectOverflow(t,{...i,elementContext:"reference"}),a=sa(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:aa(a)}}}case"escaped":{const s=await n.detectOverflow(t,{...i,altBoundary:!0}),a=sa(s,r.floating);return{data:{escapedOffsets:a,escaped:aa(a)}}}default:return{}}}}},la=new Set(["left","top"]);async function Rh(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=ut(r),a=Vt(r),l=tt(r)==="y",c=la.has(s)?-1:1,d=i&&l?-1:1,f=dt(t,e);let{mainAxis:m,crossAxis:u,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof x=="number"&&(u=a==="end"?x*-1:x),l?{x:u*d,y:m*c}:{x:m*c,y:u*d}}const Mh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Rh(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Lh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:w,y:k}=v;return{x:w,y:k}}},...c}=dt(e,t),d={x:r,y:n},f=await i.detectOverflow(t,c),m=tt(ut(o)),u=zo(m);let x=d[u],h=d[m];if(s){const v=u==="y"?"top":"left",w=u==="y"?"bottom":"right",k=x+f[v],S=x-f[w];x=No(k,x,S)}if(a){const v=m==="y"?"top":"left",w=m==="y"?"bottom":"right",k=h+f[v],S=h-f[w];h=No(k,h,S)}const b=l.fn({...t,[u]:x,[m]:h});return{...b,data:{x:b.x-r,y:b.y-n,enabled:{[u]:s,[m]:a}}}}}},Fh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=dt(e,t),d={x:r,y:n},f=tt(o),m=zo(f);let u=d[m],x=d[f];const h=dt(a,t),b=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const k=m==="y"?"height":"width",S=i.reference[m]-i.floating[k]+b.mainAxis,C=i.reference[m]+i.reference[k]-b.mainAxis;u<S?u=S:u>C&&(u=C)}if(c){var v,w;const k=m==="y"?"width":"height",S=la.has(ut(o)),C=i.reference[f]-i.floating[k]+(S&&((v=s.offset)==null?void 0:v[f])||0)+(S?0:b.crossAxis),O=i.reference[f]+i.reference[k]+(S?0:((w=s.offset)==null?void 0:w[f])||0)-(S?b.crossAxis:0);x<C?x=C:x>O&&(x=O)}return{[m]:u,[f]:x}}}},Bh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=dt(e,t),d=await s.detectOverflow(t,c),f=ut(o),m=Vt(o),u=tt(o)==="y",{width:x,height:h}=i.floating;let b,v;f==="top"||f==="bottom"?(b=f,v=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,b=m==="end"?"top":"bottom");const w=h-d.top-d.bottom,k=x-d.left-d.right,S=wt(h-d[b],w),C=wt(x-d[v],k),O=!t.middlewareData.shift;let N=S,I=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=w),O&&!m){const L=Fe(d.left,0),Z=Fe(d.right,0),j=Fe(d.top,0),F=Fe(d.bottom,0);u?I=x-2*(L!==0||Z!==0?L+Z:Fe(d.left,d.right)):N=h-2*(j!==0||F!==0?j+F:Fe(d.top,d.bottom))}await l({...t,availableWidth:I,availableHeight:N});const D=await s.getDimensions(a.floating);return x!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function gn(){return typeof window<"u"}function Yt(e){return ca(e)?(e.nodeName||"").toLowerCase():"#document"}function Be(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rt(e){var t;return(t=(ca(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ca(e){return gn()?e instanceof Node||e instanceof Be(e).Node:!1}function qe(e){return gn()?e instanceof Element||e instanceof Be(e).Element:!1}function nt(e){return gn()?e instanceof HTMLElement||e instanceof Be(e).HTMLElement:!1}function da(e){return!gn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Be(e).ShadowRoot}const Uh=new Set(["inline","contents"]);function _r(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Je(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Uh.has(o)}const Wh=new Set(["table","td","th"]);function $h(e){return Wh.has(Yt(e))}const Hh=[":popover-open",":modal"];function bn(e){return Hh.some(t=>{try{return e.matches(t)}catch{return!1}})}const Vh=["transform","translate","scale","rotate","perspective"],Yh=["transform","translate","scale","rotate","perspective","filter"],Kh=["paint","layout","strict","content"];function Po(e){const t=Io(),r=qe(e)?Je(e):e;return Vh.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Yh.some(n=>(r.willChange||"").includes(n))||Kh.some(n=>(r.contain||"").includes(n))}function Zh(e){let t=yt(e);for(;nt(t)&&!Kt(t);){if(Po(t))return t;if(bn(t))return null;t=yt(t)}return null}function Io(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Gh=new Set(["html","body","#document"]);function Kt(e){return Gh.has(Yt(e))}function Je(e){return Be(e).getComputedStyle(e)}function vn(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yt(e){if(Yt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||da(e)&&e.host||rt(e);return da(t)?t.host:t}function ua(e){const t=yt(e);return Kt(t)?e.ownerDocument?e.ownerDocument.body:e.body:nt(t)&&_r(t)?t:ua(t)}function Cr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=ua(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=Be(o);if(i){const a=Do(s);return t.concat(s,s.visualViewport||[],_r(o)?o:[],a&&r?Cr(a):[])}return t.concat(o,Cr(o,[],r))}function Do(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fa(e){const t=Je(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=nt(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=fn(r)!==i||fn(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Ro(e){return qe(e)?e:e.contextElement}function Zt(e){const t=Ro(e);if(!nt(t))return et(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=fa(t);let s=(i?fn(r.width):r.width)/n,a=(i?fn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Xh=et(0);function ha(e){const t=Be(e);return!Io()||!t.visualViewport?Xh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qh(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Be(e)?!1:t}function Tt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ro(e);let s=et(1);t&&(n?qe(n)&&(s=Zt(n)):s=Zt(e));const a=qh(i,r,n)?ha(i):et(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(i){const m=Be(i),u=n&&qe(n)?Be(n):n;let x=m,h=Do(x);for(;h&&n&&u!==x;){const b=Zt(h),v=h.getBoundingClientRect(),w=Je(h),k=v.left+(h.clientLeft+parseFloat(w.paddingLeft))*b.x,S=v.top+(h.clientTop+parseFloat(w.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,f*=b.y,l+=k,c+=S,x=Be(h),h=Do(x)}}return mn({width:d,height:f,x:l,y:c})}function xn(e,t){const r=vn(e).scrollLeft;return t?t.left+r:Tt(rt(e)).left+r}function pa(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-xn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Jh(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=rt(n),a=t?bn(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=et(1);const d=et(0),f=nt(n);if((f||!f&&!i)&&((Yt(n)!=="body"||_r(s))&&(l=vn(n)),nt(n))){const u=Tt(n);c=Zt(n),d.x=u.x+n.clientLeft,d.y=u.y+n.clientTop}const m=s&&!f&&!i?pa(s,l):et(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:r.y*c.y-l.scrollTop*c.y+d.y+m.y}}function Qh(e){return Array.from(e.getClientRects())}function ep(e){const t=rt(e),r=vn(e),n=e.ownerDocument.body,o=Fe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Fe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+xn(e);const a=-r.scrollTop;return Je(n).direction==="rtl"&&(s+=Fe(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const ma=25;function tp(e,t){const r=Be(e),n=rt(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const d=Io();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=xn(n);if(c<=0){const d=n.ownerDocument,f=d.body,m=getComputedStyle(f),u=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(n.clientWidth-f.clientWidth-u);x<=ma&&(i-=x)}else c<=ma&&(i+=c);return{width:i,height:s,x:a,y:l}}const rp=new Set(["absolute","fixed"]);function np(e,t){const r=Tt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=nt(e)?Zt(e):et(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:s,height:a,x:l,y:c}}function ga(e,t,r){let n;if(t==="viewport")n=tp(e,r);else if(t==="document")n=ep(rt(e));else if(qe(t))n=np(t,r);else{const o=ha(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return mn(n)}function ba(e,t){const r=yt(e);return r===t||!qe(r)||Kt(r)?!1:Je(r).position==="fixed"||ba(r,t)}function op(e,t){const r=t.get(e);if(r)return r;let n=Cr(e,[],!1).filter(a=>qe(a)&&Yt(a)!=="body"),o=null;const i=Je(e).position==="fixed";let s=i?yt(e):e;for(;qe(s)&&!Kt(s);){const a=Je(s),l=Po(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&rp.has(o.position)||_r(s)&&!l&&ba(e,s))?n=n.filter(d=>d!==s):o=a,s=yt(s)}return t.set(e,n),n}function ip(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?bn(t)?[]:op(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((c,d)=>{const f=ga(t,d,o);return c.top=Fe(f.top,c.top),c.right=wt(f.right,c.right),c.bottom=wt(f.bottom,c.bottom),c.left=Fe(f.left,c.left),c},ga(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function sp(e){const{width:t,height:r}=fa(e);return{width:t,height:r}}function ap(e,t,r){const n=nt(t),o=rt(t),i=r==="fixed",s=Tt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=et(0);function c(){l.x=xn(o)}if(n||!n&&!i)if((Yt(t)!=="body"||_r(o))&&(a=vn(t)),n){const u=Tt(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&c();i&&!n&&o&&c();const d=o&&!n&&!i?pa(o,a):et(0),f=s.left+a.scrollLeft-l.x-d.x,m=s.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function Mo(e){return Je(e).position==="static"}function va(e,t){if(!nt(e)||Je(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return rt(e)===r&&(r=r.ownerDocument.body),r}function xa(e,t){const r=Be(e);if(bn(e))return r;if(!nt(e)){let o=yt(e);for(;o&&!Kt(o);){if(qe(o)&&!Mo(o))return o;o=yt(o)}return r}let n=va(e,t);for(;n&&$h(n)&&Mo(n);)n=va(n,t);return n&&Kt(n)&&Mo(n)&&!Po(n)?r:n||Zh(e)||r}const lp=async function(e){const t=this.getOffsetParent||xa,r=this.getDimensions,n=await r(e.floating);return{reference:ap(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function cp(e){return Je(e).direction==="rtl"}const dp={convertOffsetParentRelativeRectToViewportRelativeRect:Jh,getDocumentElement:rt,getClippingRect:ip,getOffsetParent:xa,getElementRects:lp,getClientRects:Qh,getDimensions:sp,getScale:Zt,isElement:qe,isRTL:cp};function wa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function up(e,t){let r=null,n;const o=rt(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:f,width:m,height:u}=c;if(a||t(),!m||!u)return;const x=hn(f),h=hn(o.clientWidth-(d+m)),b=hn(o.clientHeight-(f+u)),v=hn(d),k={rootMargin:-x+"px "+-h+"px "+-b+"px "+-v+"px",threshold:Fe(0,wt(1,l))||1};let S=!0;function C(O){const N=O[0].intersectionRatio;if(N!==l){if(!S)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!wa(c,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(C,{...k,root:o.ownerDocument})}catch{r=new IntersectionObserver(C,k)}r.observe(e)}return s(!0),i}function fp(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ro(e),d=o||i?[...c?Cr(c):[],...Cr(t)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const f=c&&a?up(c,r):null;let m=-1,u=null;s&&(u=new ResizeObserver(v=>{let[w]=v;w&&w.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=u)==null||k.observe(t)})),r()}),c&&!l&&u.observe(c),u.observe(t));let x,h=l?Tt(e):null;l&&b();function b(){const v=Tt(e);h&&!wa(h,v)&&r(),h=v,x=requestAnimationFrame(b)}return r(),()=>{var v;d.forEach(w=>{o&&w.removeEventListener("scroll",r),i&&w.removeEventListener("resize",r)}),f==null||f(),(v=u)==null||v.disconnect(),u=null,l&&cancelAnimationFrame(x)}}const hp=Mh,pp=Lh,mp=Ih,gp=Bh,bp=Dh,ya=Ph,vp=Fh,xp=(e,t,r)=>{const n=new Map,o={platform:dp,...r},i={...o.platform,_c:n};return Oh(e,t,{...o,platform:i})};var wp=typeof document<"u",yp=function(){},wn=wp?T.useLayoutEffect:yp;function yn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!yn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!yn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ka(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sa(e,t){const r=ka(e);return Math.round(t*r)/r}function Lo(e){const t=_.useRef(e);return wn(()=>{t.current=e}),t}function kp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,f]=_.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,u]=_.useState(n);yn(m,n)||u(n);const[x,h]=_.useState(null),[b,v]=_.useState(null),w=_.useCallback(V=>{V!==O.current&&(O.current=V,h(V))},[]),k=_.useCallback(V=>{V!==N.current&&(N.current=V,v(V))},[]),S=i||x,C=s||b,O=_.useRef(null),N=_.useRef(null),I=_.useRef(d),D=l!=null,L=Lo(l),Z=Lo(o),j=Lo(c),F=_.useCallback(()=>{if(!O.current||!N.current)return;const V={placement:t,strategy:r,middleware:m};Z.current&&(V.platform=Z.current),xp(O.current,N.current,V).then(Y=>{const J={...Y,isPositioned:j.current!==!1};y.current&&!yn(I.current,J)&&(I.current=J,Mr.flushSync(()=>{f(J)}))})},[m,t,r,Z,j]);wn(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[c]);const y=_.useRef(!1);wn(()=>(y.current=!0,()=>{y.current=!1}),[]),wn(()=>{if(S&&(O.current=S),C&&(N.current=C),S&&C){if(L.current)return L.current(S,C,F);F()}},[S,C,F,L,D]);const H=_.useMemo(()=>({reference:O,floating:N,setReference:w,setFloating:k}),[w,k]),Q=_.useMemo(()=>({reference:S,floating:C}),[S,C]),$=_.useMemo(()=>{const V={position:r,left:0,top:0};if(!Q.floating)return V;const Y=Sa(Q.floating,d.x),J=Sa(Q.floating,d.y);return a?{...V,transform:"translate("+Y+"px, "+J+"px)",...ka(Q.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Y,top:J}},[r,a,Q.floating,d.x,d.y]);return _.useMemo(()=>({...d,update:F,refs:H,elements:Q,floatingStyles:$}),[d,F,H,Q,$])}const Sp=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ya({element:n.current,padding:o}).fn(r):{}:n?ya({element:n,padding:o}).fn(r):{}}}},_p=(e,t)=>({...hp(e),options:[e,t]}),Cp=(e,t)=>({...pp(e),options:[e,t]}),Ep=(e,t)=>({...vp(e),options:[e,t]}),Ap=(e,t)=>({...mp(e),options:[e,t]}),Np=(e,t)=>({...gp(e),options:[e,t]}),zp=(e,t)=>({...bp(e),options:[e,t]}),jp=(e,t)=>({...Sp(e),options:[e,t]});var Tp="Arrow",_a=_.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return p.jsx(Se.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});_a.displayName=Tp;var Op=_a;function Pp(e){const[t,r]=_.useState(void 0);return Ie(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;r({width:s,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Fo="Popper",[Ca,Gt]=$t(Fo),[Ip,Ea]=Ca(Fo),Aa=e=>{const{__scopePopper:t,children:r}=e,[n,o]=_.useState(null);return p.jsx(Ip,{scope:t,anchor:n,onAnchorChange:o,children:r})};Aa.displayName=Fo;var Na="PopperAnchor",za=_.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=Ea(Na,r),s=_.useRef(null),a=_e(t,s),l=_.useRef(null);return _.useEffect(()=>{const c=l.current;l.current=(n==null?void 0:n.current)||s.current,c!==l.current&&i.onAnchorChange(l.current)}),n?null:p.jsx(Se.div,{...o,ref:a})});za.displayName=Na;var Bo="PopperContent",[Dp,Rp]=Ca(Bo),ja=_.forwardRef((e,t)=>{var ee,ie,se,oe,le,fe;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:u="optimized",onPlaced:x,...h}=e,b=Ea(Bo,r),[v,w]=_.useState(null),k=_e(t,xe=>w(xe)),[S,C]=_.useState(null),O=Pp(S),N=(O==null?void 0:O.width)??0,I=(O==null?void 0:O.height)??0,D=n+(i!=="center"?"-"+i:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},Z=Array.isArray(c)?c:[c],j=Z.length>0,F={padding:L,boundary:Z.filter(Lp),altBoundary:j},{refs:y,floatingStyles:H,placement:Q,isPositioned:$,middlewareData:V}=kp({strategy:"fixed",placement:D,whileElementsMounted:(...xe)=>fp(...xe,{animationFrame:u==="always"}),elements:{reference:b.anchor},middleware:[_p({mainAxis:o+I,alignmentAxis:s}),l&&Cp({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Ep():void 0,...F}),l&&Ap({...F}),Np({...F,apply:({elements:xe,rects:g,availableWidth:B,availableHeight:W})=>{const{width:E,height:A}=g.reference,R=xe.floating.style;R.setProperty("--radix-popper-available-width",`${B}px`),R.setProperty("--radix-popper-available-height",`${W}px`),R.setProperty("--radix-popper-anchor-width",`${E}px`),R.setProperty("--radix-popper-anchor-height",`${A}px`)}}),S&&jp({element:S,padding:a}),Fp({arrowWidth:N,arrowHeight:I}),m&&zp({strategy:"referenceHidden",...F})]}),[Y,J]=Pa(Q),z=Le(x);Ie(()=>{$&&(z==null||z())},[$,z]);const P=(ee=V.arrow)==null?void 0:ee.x,K=(ie=V.arrow)==null?void 0:ie.y,G=((se=V.arrow)==null?void 0:se.centerOffset)!==0,[te,ue]=_.useState();return Ie(()=>{v&&ue(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:y.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:$?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(oe=V.transformOrigin)==null?void 0:oe.x,(le=V.transformOrigin)==null?void 0:le.y].join(" "),...((fe=V.hide)==null?void 0:fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Dp,{scope:r,placedSide:Y,onArrowChange:C,arrowX:P,arrowY:K,shouldHideArrow:G,children:p.jsx(Se.div,{"data-side":Y,"data-align":J,...h,ref:k,style:{...h.style,animation:$?void 0:"none"}})})})});ja.displayName=Bo;var Ta="PopperArrow",Mp={top:"bottom",right:"left",bottom:"top",left:"right"},Oa=_.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=Rp(Ta,n),s=Mp[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(Op,{...o,ref:r,style:{...o.style,display:"block"}})})});Oa.displayName=Ta;function Lp(e){return e!==null}var Fp=e=>({name:"transformOrigin",options:e,fn(t){var b,v,w;const{placement:r,rects:n,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=Pa(r),f={start:"0%",center:"50%",end:"100%"}[d],m=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,u=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let x="",h="";return c==="bottom"?(x=s?f:`${m}px`,h=`${-l}px`):c==="top"?(x=s?f:`${m}px`,h=`${n.floating.height+l}px`):c==="right"?(x=`${-l}px`,h=s?f:`${u}px`):c==="left"&&(x=`${n.floating.width+l}px`,h=s?f:`${u}px`),{data:{x,y:h}}}});function Pa(e){const[t,r="center"]=e.split("-");return[t,r]}var Uo=Aa,kn=za,Wo=ja,$o=Oa,Bp="Portal",Sn=_.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[o,i]=_.useState(!1);Ie(()=>i(!0),[]);const s=r||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?pt.createPortal(p.jsx(Se.div,{...n,ref:t}),s):null});Sn.displayName=Bp;var Up=_[" useInsertionEffect ".trim().toString()]||Ie;function _n({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,s]=Wp({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:o;{const d=_.useRef(e!==void 0);_.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,n])}const c=_.useCallback(d=>{var f;if(a){const m=$p(d)?d(e):d;m!==e&&((f=s.current)==null||f.call(s,m))}else i(d)},[a,e,i,s]);return[l,c]}function Wp({defaultProp:e,onChange:t}){const[r,n]=_.useState(e),o=_.useRef(r),i=_.useRef(t);return Up(()=>{i.current=t},[t]),_.useEffect(()=>{var s;o.current!==r&&((s=i.current)==null||s.call(i,r),o.current=r)},[r,o]),[r,n,i]}function $p(e){return typeof e=="function"}function Hp(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ia=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Vp="VisuallyHidden",Da=_.forwardRef((e,t)=>p.jsx(Se.span,{...e,ref:t,style:{...Ia,...e.style}}));Da.displayName=Vp;var Yp=Da,Kp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xt=new WeakMap,Cn=new WeakMap,En={},Ho=0,Ra=function(e){return e&&(e.host||Ra(e.parentNode))},Zp=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ra(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Gp=function(e,t,r,n){var o=Zp(t,Array.isArray(e)?e:[e]);En[r]||(En[r]=new WeakMap);var i=En[r],s=[],a=new Set,l=new Set(o),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(m){if(a.has(m))d(m);else try{var u=m.getAttribute(n),x=u!==null&&u!=="false",h=(Xt.get(m)||0)+1,b=(i.get(m)||0)+1;Xt.set(m,h),i.set(m,b),s.push(m),h===1&&x&&Cn.set(m,!0),b===1&&m.setAttribute(r,"true"),x||m.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return d(t),a.clear(),Ho++,function(){s.forEach(function(f){var m=Xt.get(f)-1,u=i.get(f)-1;Xt.set(f,m),i.set(f,u),m||(Cn.has(f)||f.removeAttribute(n),Cn.delete(f)),u||f.removeAttribute(r)}),Ho--,Ho||(Xt=new WeakMap,Xt=new WeakMap,Cn=new WeakMap,En={})}},Ma=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Kp(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Gp(n,o,r,"aria-hidden")):function(){return null}},ot=function(){return ot=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ot.apply(this,arguments)};function La(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Xp(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var An="right-scroll-bar-position",Nn="width-before-scroll-bar",qp="with-scroll-bars-hidden",Jp="--removed-body-scroll-bar-size";function Vo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qp(e,t){var r=T.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var em=typeof window<"u"?_.useLayoutEffect:_.useEffect,Fa=new WeakMap;function tm(e,t){var r=Qp(null,function(n){return e.forEach(function(o){return Vo(o,n)})});return em(function(){var n=Fa.get(r);if(n){var o=new Set(n),i=new Set(e),s=r.current;o.forEach(function(a){i.has(a)||Vo(a,null)}),i.forEach(function(a){o.has(a)||Vo(a,s)})}Fa.set(r,e)},[e]),r}function rm(e){return e}function nm(e,t){t===void 0&&(t=rm);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(i),s=r}var l=function(){var d=s;s=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){s.push(d),c()},filter:function(d){return s=s.filter(d),r}}}};return o}function om(e){e===void 0&&(e={});var t=nm(null);return t.options=ot({async:!0,ssr:!1},e),t}var Ba=function(e){var t=e.sideCar,r=La(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return _.createElement(n,ot({},r))};Ba.isSideCarExport=!0;function im(e,t){return e.useMedium(t),Ba}var Ua=om(),Yo=function(){},zn=_.forwardRef(function(e,t){var r=_.useRef(null),n=_.useState({onScrollCapture:Yo,onWheelCapture:Yo,onTouchMoveCapture:Yo}),o=n[0],i=n[1],s=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,u=e.noRelative,x=e.noIsolation,h=e.inert,b=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,k=e.gapMode,S=La(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,O=tm([r,t]),N=ot(ot({},S),o);return _.createElement(_.Fragment,null,d&&_.createElement(C,{sideCar:Ua,removeScrollBar:c,shards:f,noRelative:u,noIsolation:x,inert:h,setCallbacks:i,allowPinchZoom:!!b,lockRef:r,gapMode:k}),s?_.cloneElement(_.Children.only(a),ot(ot({},N),{ref:O})):_.createElement(w,ot({},N,{className:l,ref:O}),a))});zn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},zn.classNames={fullWidth:Nn,zeroRight:An};var sm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function am(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=sm();return t&&e.setAttribute("nonce",t),e}function lm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function cm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dm=function(){var e=0,t=null;return{add:function(r){e==0&&(t=am())&&(lm(t,r),cm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},um=function(){var e=dm();return function(t,r){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Wa=function(){var e=um(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},fm={left:0,top:0,right:0,gap:0},Ko=function(e){return parseInt(e||"",10)||0},hm=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ko(r),Ko(n),Ko(o)]},pm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fm;var t=hm(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},mm=Wa(),qt="data-scroll-locked",gm=function(e,t,r,n){var o=e.left,i=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
213
|
+
.`.concat(qp,` {
|
|
214
214
|
overflow: hidden `).concat(n,`;
|
|
215
215
|
padding-right: `).concat(a,"px ").concat(n,`;
|
|
216
216
|
}
|
|
217
|
-
body[`).concat(
|
|
217
|
+
body[`).concat(qt,`] {
|
|
218
218
|
overflow: hidden `).concat(n,`;
|
|
219
219
|
overscroll-behavior: contain;
|
|
220
220
|
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
@@ -227,26 +227,26 @@ React keys must be passed directly to JSX without using spread:
|
|
|
227
227
|
`),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
.`).concat(
|
|
230
|
+
.`).concat(An,` {
|
|
231
231
|
right: `).concat(a,"px ").concat(n,`;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.`).concat(
|
|
234
|
+
.`).concat(Nn,` {
|
|
235
235
|
margin-right: `).concat(a,"px ").concat(n,`;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
.`).concat(
|
|
238
|
+
.`).concat(An," .").concat(An,` {
|
|
239
239
|
right: 0 `).concat(n,`;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
.`).concat(
|
|
242
|
+
.`).concat(Nn," .").concat(Nn,` {
|
|
243
243
|
margin-right: 0 `).concat(n,`;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
body[`).concat(
|
|
247
|
-
`).concat(
|
|
246
|
+
body[`).concat(qt,`] {
|
|
247
|
+
`).concat(Jp,": ").concat(a,`px;
|
|
248
248
|
}
|
|
249
|
-
`)}
|
|
249
|
+
`)},$a=function(){var e=parseInt(document.body.getAttribute(qt)||"0",10);return isFinite(e)?e:0},bm=function(){_.useEffect(function(){return document.body.setAttribute(qt,($a()+1).toString()),function(){var e=$a()-1;e<=0?document.body.removeAttribute(qt):document.body.setAttribute(qt,e.toString())}},[])},vm=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;bm();var i=_.useMemo(function(){return pm(o)},[o]);return _.createElement(mm,{styles:gm(i,!t,o,r?"":"!important")})},Zo=!1;if(typeof window<"u")try{var jn=Object.defineProperty({},"passive",{get:function(){return Zo=!0,!0}});window.addEventListener("test",jn,jn),window.removeEventListener("test",jn,jn)}catch{Zo=!1}var Jt=Zo?{passive:!1}:!1,xm=function(e){return e.tagName==="TEXTAREA"},Ha=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!xm(e)&&r[t]==="visible")},wm=function(e){return Ha(e,"overflowY")},ym=function(e){return Ha(e,"overflowX")},Va=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Ya(e,n);if(o){var i=Ka(e,n),s=i[1],a=i[2];if(s>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},km=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Sm=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Ya=function(e,t){return e==="v"?wm(t):ym(t)},Ka=function(e,t){return e==="v"?km(t):Sm(t)},_m=function(e,t){return e==="h"&&t==="rtl"?-1:1},Cm=function(e,t,r,n,o){var i=_m(e,window.getComputedStyle(t).direction),s=i*n,a=r.target,l=t.contains(a),c=!1,d=s>0,f=0,m=0;do{if(!a)break;var u=Ka(e,a),x=u[0],h=u[1],b=u[2],v=h-b-i*x;(x||v)&&Ya(e,a)&&(f+=v,m+=x);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(c=!0),c},Tn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Za=function(e){return[e.deltaX,e.deltaY]},Ga=function(e){return e&&"current"in e?e.current:e},Em=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Am=function(e){return`
|
|
250
250
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
251
251
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
252
|
-
`)},Am=0,Jt=[];function Nm(e){var t=_.useRef([]),r=_.useRef([0,0]),n=_.useRef(),o=_.useState(Am++)[0],i=_.useState(Ua)[0],s=_.useRef(e);_.useEffect(function(){s.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Zp([e.lockRef.current],(e.shards||[]).map(Ga),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=_.useCallback(function(h,b){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!s.current.allowPinchZoom;var v=jn(h),x=r.current,k="deltaX"in h?h.deltaX:x[0]-v[0],S="deltaY"in h?h.deltaY:x[1]-v[1],C,O=h.target,N=Math.abs(k)>Math.abs(S)?"h":"v";if("touches"in h&&N==="h"&&O.type==="range")return!1;var P=window.getSelection(),D=P&&P.anchorNode,W=D?D===O||D.contains(O):!1;if(W)return!1;var G=Ha(N,O);if(!G)return!0;if(G?C=N:(C=N==="v"?"h":"v",G=Ha(N,O)),!G)return!1;if(!n.current&&"changedTouches"in h&&(k||S)&&(n.current=C),!C)return!0;var z=n.current||C;return _m(z,b,h,z==="h"?k:S)},[]),l=_.useCallback(function(h){var b=h;if(!(!Jt.length||Jt[Jt.length-1]!==i)){var v="deltaY"in b?Ka(b):jn(b),x=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&Cm(C.delta,v)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var k=(s.current.shards||[]).map(Ga).filter(Boolean).filter(function(C){return C.contains(b.target)}),S=k.length>0?a(b,k[0]):!s.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),c=_.useCallback(function(h,b,v,x){var k={name:h,delta:b,target:v,should:x,shadowParent:zm(v)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(S){return S!==k})},1)},[]),d=_.useCallback(function(h){r.current=jn(h),n.current=void 0},[]),f=_.useCallback(function(h){c(h.type,Ka(h),h.target,a(h,e.lockRef.current))},[]),m=_.useCallback(function(h){c(h.type,jn(h),h.target,a(h,e.lockRef.current))},[]);_.useEffect(function(){return Jt.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,qt),document.addEventListener("touchmove",l,qt),document.addEventListener("touchstart",d,qt),function(){Jt=Jt.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,qt),document.removeEventListener("touchmove",l,qt),document.removeEventListener("touchstart",d,qt)}},[]);var u=e.removeScrollBar,w=e.inert;return _.createElement(_.Fragment,null,w?_.createElement(i,{styles:Em(o)}):null,u?_.createElement(bm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const jm=om(Ba,Nm);var Go=_.forwardRef(function(e,t){return _.createElement(Nn,nt({},e,{ref:t,sideCar:jm}))});Go.classNames=Nn.classNames;var Tm=[" ","Enter","ArrowUp","ArrowDown"],Om=[" ","Enter"],Tt="Select",[Tn,On,Pm]=Jf(Tt),[Qt]=Wt(Tt,[Pm,Gt]),Pn=Gt(),[Im,yt]=Qt(Tt),[Dm,Rm]=Qt(Tt),Za=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:m,required:u,form:w}=e,h=Pn(t),[b,v]=_.useState(null),[x,k]=_.useState(null),[S,C]=_.useState(!1),O=$s(c),[N,P]=Sn({prop:n,defaultProp:o??!1,onChange:i,caller:Tt}),[D,W]=Sn({prop:s,defaultProp:a,onChange:l,caller:Tt}),G=_.useRef(null),z=b?w||!!b.closest("form"):!0,[L,y]=_.useState(new Set),$=Array.from(L).map(X=>X.props.value).join(";");return p.jsx(Bo,{...h,children:p.jsxs(Im,{required:u,scope:t,trigger:b,onTriggerChange:v,valueNode:x,onValueNodeChange:k,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:kr(),value:D,onValueChange:W,open:N,onOpenChange:P,dir:O,triggerPointerDownPosRef:G,disabled:m,children:[p.jsx(Tn.Provider,{scope:t,children:p.jsx(Dm,{scope:e.__scopeSelect,onNativeOptionAdd:_.useCallback(X=>{y(H=>new Set(H).add(X))},[]),onNativeOptionRemove:_.useCallback(X=>{y(H=>{const V=new Set(H);return V.delete(X),V})},[]),children:r})}),z?p.jsxs(ml,{"aria-hidden":!0,required:u,tabIndex:-1,name:d,autoComplete:f,value:D,onChange:X=>W(X.target.value),disabled:m,form:w,children:[D===void 0?p.jsx("option",{value:""}):null,Array.from(L)]},$):null]})})};Za.displayName=Tt;var Xa="SelectTrigger",qa=_.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=Pn(r),s=yt(Xa,r),a=s.disabled||n,l=_e(t,s.onTriggerChange),c=On(r),d=_.useRef("touch"),[f,m,u]=bl(h=>{const b=c().filter(k=>!k.disabled),v=b.find(k=>k.value===s.value),x=vl(b,h,v);x!==void 0&&s.onValueChange(x.value)}),w=h=>{a||(s.onOpenChange(!0),u()),h&&(s.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return p.jsx(yn,{asChild:!0,...i,children:p.jsx(Se.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":gl(s.value)?"":void 0,...o,ref:l,onClick:be(o.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&w(h)}),onPointerDown:be(o.onPointerDown,h=>{d.current=h.pointerType;const b=h.target;b.hasPointerCapture(h.pointerId)&&b.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(w(h),h.preventDefault())}),onKeyDown:be(o.onKeyDown,h=>{const b=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(b&&h.key===" ")&&Tm.includes(h.key)&&(w(),h.preventDefault())})})})});qa.displayName=Xa;var Ja="SelectValue",Qa=_.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:s="",...a}=e,l=yt(Ja,r),{onValueNodeHasChildrenChange:c}=l,d=i!==void 0,f=_e(t,l.onValueNodeChange);return Pe(()=>{c(d)},[c,d]),p.jsx(Se.span,{...a,ref:f,style:{pointerEvents:"none"},children:gl(l.value)?p.jsx(p.Fragment,{children:s}):i})});Qa.displayName=Ja;var Mm="SelectIcon",el=_.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return p.jsx(Se.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});el.displayName=Mm;var Lm="SelectPortal",tl=e=>p.jsx(kn,{asChild:!0,...e});tl.displayName=Lm;var Ot="SelectContent",rl=_.forwardRef((e,t)=>{const r=yt(Ot,e.__scopeSelect),[n,o]=_.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?Rr.createPortal(p.jsx(nl,{scope:e.__scopeSelect,children:p.jsx(Tn.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),i):null}return p.jsx(ol,{...e,ref:t})});rl.displayName=Ot;var Je=10,[nl,kt]=Qt(Ot),Fm="SelectContentImpl",Bm=$t("SelectContent.RemoveScroll"),ol=_.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:u,sticky:w,hideWhenDetached:h,avoidCollisions:b,...v}=e,x=yt(Ot,r),[k,S]=_.useState(null),[C,O]=_.useState(null),N=_e(t,ee=>S(ee)),[P,D]=_.useState(null),[W,G]=_.useState(null),z=On(r),[L,y]=_.useState(!1),$=_.useRef(!1);_.useEffect(()=>{if(k)return Ra(k)},[k]),Gs();const X=_.useCallback(ee=>{const[ie,...se]=z().map(fe=>fe.ref.current),[oe]=se.slice(-1),le=document.activeElement;for(const fe of ee)if(fe===le||(fe==null||fe.scrollIntoView({block:"nearest"}),fe===ie&&C&&(C.scrollTop=0),fe===oe&&C&&(C.scrollTop=C.scrollHeight),fe==null||fe.focus(),document.activeElement!==le))return},[z,C]),H=_.useCallback(()=>X([P,k]),[X,P,k]);_.useEffect(()=>{L&&H()},[L,H]);const{onOpenChange:V,triggerPointerDownPosRef:Y}=x;_.useEffect(()=>{if(k){let ee={x:0,y:0};const ie=oe=>{var le,fe;ee={x:Math.abs(Math.round(oe.pageX)-(((le=Y.current)==null?void 0:le.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((fe=Y.current)==null?void 0:fe.y)??0))}},se=oe=>{ee.x<=10&&ee.y<=10?oe.preventDefault():k.contains(oe.target)||V(!1),document.removeEventListener("pointermove",ie),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",se,{capture:!0})}}},[k,V,Y]),_.useEffect(()=>{const ee=()=>V(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[V]);const[Q,j]=bl(ee=>{const ie=z().filter(le=>!le.disabled),se=ie.find(le=>le.ref.current===document.activeElement),oe=vl(ie,ee,se);oe&&setTimeout(()=>oe.ref.current.focus())}),I=_.useCallback((ee,ie,se)=>{const oe=!$.current&&!se;(x.value!==void 0&&x.value===ie||oe)&&(D(ee),oe&&($.current=!0))},[x.value]),K=_.useCallback(()=>k==null?void 0:k.focus(),[k]),Z=_.useCallback((ee,ie,se)=>{const oe=!$.current&&!se;(x.value!==void 0&&x.value===ie||oe)&&G(ee)},[x.value]),te=n==="popper"?Zo:il,ue=te===Zo?{side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:u,sticky:w,hideWhenDetached:h,avoidCollisions:b}:{};return p.jsx(nl,{scope:r,content:k,viewport:C,onViewportChange:O,itemRefCallback:I,selectedItem:P,onItemLeave:K,itemTextRefCallback:Z,focusSelectedItem:H,selectedItemText:W,position:n,isPositioned:L,searchRef:Q,children:p.jsx(Go,{as:Bm,allowPinchZoom:!0,children:p.jsx(Eo,{asChild:!0,trapped:x.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:be(o,ee=>{var ie;(ie=x.trigger)==null||ie.focus({preventScroll:!0}),ee.preventDefault()}),children:p.jsx(dn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:p.jsx(te,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ee=>ee.preventDefault(),...v,...ue,onPlaced:()=>y(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:be(v.onKeyDown,ee=>{const ie=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!ie&&ee.key.length===1&&j(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let oe=z().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const le=ee.target,fe=oe.indexOf(le);oe=oe.slice(fe+1)}setTimeout(()=>X(oe)),ee.preventDefault()}})})})})})})});ol.displayName=Fm;var Um="SelectItemAlignedPosition",il=_.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=yt(Ot,r),s=kt(Ot,r),[a,l]=_.useState(null),[c,d]=_.useState(null),f=_e(t,N=>d(N)),m=On(r),u=_.useRef(!1),w=_.useRef(!0),{viewport:h,selectedItem:b,selectedItemText:v,focusSelectedItem:x}=s,k=_.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&h&&b&&v){const N=i.trigger.getBoundingClientRect(),P=c.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),W=v.getBoundingClientRect();if(i.dir!=="rtl"){const le=W.left-P.left,fe=D.left-le,we=N.left-fe,g=N.width+we,F=Math.max(g,P.width),U=window.innerWidth-Je,E=yo(fe,[Je,Math.max(Je,U-F)]);a.style.minWidth=g+"px",a.style.left=E+"px"}else{const le=P.right-W.right,fe=window.innerWidth-D.right-le,we=window.innerWidth-N.right-fe,g=N.width+we,F=Math.max(g,P.width),U=window.innerWidth-Je,E=yo(fe,[Je,Math.max(Je,U-F)]);a.style.minWidth=g+"px",a.style.right=E+"px"}const G=m(),z=window.innerHeight-Je*2,L=h.scrollHeight,y=window.getComputedStyle(c),$=parseInt(y.borderTopWidth,10),X=parseInt(y.paddingTop,10),H=parseInt(y.borderBottomWidth,10),V=parseInt(y.paddingBottom,10),Y=$+X+L+V+H,Q=Math.min(b.offsetHeight*5,Y),j=window.getComputedStyle(h),I=parseInt(j.paddingTop,10),K=parseInt(j.paddingBottom,10),Z=N.top+N.height/2-Je,te=z-Z,ue=b.offsetHeight/2,ee=b.offsetTop+ue,ie=$+X+ee,se=Y-ie;if(ie<=Z){const le=G.length>0&&b===G[G.length-1].ref.current;a.style.bottom="0px";const fe=c.clientHeight-h.offsetTop-h.offsetHeight,we=Math.max(te,ue+(le?K:0)+fe+H),g=ie+we;a.style.height=g+"px"}else{const le=G.length>0&&b===G[0].ref.current;a.style.top="0px";const we=Math.max(Z,$+h.offsetTop+(le?I:0)+ue)+se;a.style.height=we+"px",h.scrollTop=ie-Z+h.offsetTop}a.style.margin=`${Je}px 0`,a.style.minHeight=Q+"px",a.style.maxHeight=z+"px",n==null||n(),requestAnimationFrame(()=>u.current=!0)}},[m,i.trigger,i.valueNode,a,c,h,b,v,i.dir,n]);Pe(()=>k(),[k]);const[S,C]=_.useState();Pe(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const O=_.useCallback(N=>{N&&w.current===!0&&(k(),x==null||x(),w.current=!1)},[k,x]);return p.jsx($m,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:u,onScrollButtonChange:O,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:p.jsx(Se.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});il.displayName=Um;var Wm="SelectPopperPosition",Zo=_.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Je,...i}=e,s=Pn(r);return p.jsx(Uo,{...s,...i,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Zo.displayName=Wm;var[$m,Xo]=Qt(Ot,{}),qo="SelectViewport",sl=_.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=kt(qo,r),s=Xo(qo,r),a=_e(t,i.onViewportChange),l=_.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),p.jsx(Tn.Slot,{scope:r,children:p.jsx(Se.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:be(o.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=s;if(m!=null&&m.current&&f){const u=Math.abs(l.current-d.scrollTop);if(u>0){const w=window.innerHeight-Je*2,h=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),v=Math.max(h,b);if(v<w){const x=v+u,k=Math.min(w,x),S=x-k;f.style.height=k+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});sl.displayName=qo;var al="SelectGroup",[Hm,Vm]=Qt(al),Ym=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=kr();return p.jsx(Hm,{scope:r,id:o,children:p.jsx(Se.div,{role:"group","aria-labelledby":o,...n,ref:t})})});Ym.displayName=al;var ll="SelectLabel",Km=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Vm(ll,r);return p.jsx(Se.div,{id:o.id,...n,ref:t})});Km.displayName=ll;var In="SelectItem",[Gm,cl]=Qt(In),dl=_.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...s}=e,a=yt(In,r),l=kt(In,r),c=a.value===n,[d,f]=_.useState(i??""),[m,u]=_.useState(!1),w=_e(t,x=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,x,n,o)}),h=kr(),b=_.useRef("touch"),v=()=>{o||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(Gm,{scope:r,value:n,disabled:o,textId:h,isSelected:c,onItemTextChange:_.useCallback(x=>{f(k=>k||((x==null?void 0:x.textContent)??"").trim())},[]),children:p.jsx(Tn.ItemSlot,{scope:r,value:n,disabled:o,textValue:d,children:p.jsx(Se.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:w,onFocus:be(s.onFocus,()=>u(!0)),onBlur:be(s.onBlur,()=>u(!1)),onClick:be(s.onClick,()=>{b.current!=="mouse"&&v()}),onPointerUp:be(s.onPointerUp,()=>{b.current==="mouse"&&v()}),onPointerDown:be(s.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:be(s.onPointerMove,x=>{var k;b.current=x.pointerType,o?(k=l.onItemLeave)==null||k.call(l):b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(s.onPointerLeave,x=>{var k;x.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:be(s.onKeyDown,x=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(Om.includes(x.key)&&v(),x.key===" "&&x.preventDefault())})})})})});dl.displayName=In;var Cr="SelectItemText",ul=_.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,s=yt(Cr,r),a=kt(Cr,r),l=cl(Cr,r),c=Rm(Cr,r),[d,f]=_.useState(null),m=_e(t,v=>f(v),l.onItemTextChange,v=>{var x;return(x=a.itemTextRefCallback)==null?void 0:x.call(a,v,l.value,l.disabled)}),u=d==null?void 0:d.textContent,w=_.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:u},l.value),[l.disabled,l.value,u]),{onNativeOptionAdd:h,onNativeOptionRemove:b}=c;return Pe(()=>(h(w),()=>b(w)),[h,b,w]),p.jsxs(p.Fragment,{children:[p.jsx(Se.span,{id:l.textId,...i,ref:m}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Rr.createPortal(i.children,s.valueNode):null]})});ul.displayName=Cr;var fl="SelectItemIndicator",hl=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return cl(fl,r).isSelected?p.jsx(Se.span,{"aria-hidden":!0,...n,ref:t}):null});hl.displayName=fl;var Jo="SelectScrollUpButton",Zm=_.forwardRef((e,t)=>{const r=kt(Jo,e.__scopeSelect),n=Xo(Jo,e.__scopeSelect),[o,i]=_.useState(!1),s=_e(t,n.onScrollButtonChange);return Pe(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?p.jsx(pl,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Zm.displayName=Jo;var Qo="SelectScrollDownButton",Xm=_.forwardRef((e,t)=>{const r=kt(Qo,e.__scopeSelect),n=Xo(Qo,e.__scopeSelect),[o,i]=_.useState(!1),s=_e(t,n.onScrollButtonChange);return Pe(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;i(d)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?p.jsx(pl,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});Xm.displayName=Qo;var pl=_.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=kt("SelectScrollButton",r),s=_.useRef(null),a=On(r),l=_.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return _.useEffect(()=>()=>l(),[l]),Pe(()=>{var d;const c=a().find(f=>f.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),p.jsx(Se.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:be(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:be(o.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:be(o.onPointerLeave,()=>{l()})})}),qm="SelectSeparator",Jm=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return p.jsx(Se.div,{"aria-hidden":!0,...n,ref:t})});Jm.displayName=qm;var ei="SelectArrow",Qm=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Pn(r),i=yt(ei,r),s=kt(ei,r);return i.open&&s.position==="popper"?p.jsx(Wo,{...o,...n,ref:t}):null});Qm.displayName=ei;var eg="SelectBubbleInput",ml=_.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=_.useRef(null),i=_e(n,o),s=$p(t);return _.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&d){const f=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(f)}},[s,t]),p.jsx(Se.select,{...r,style:{...Pa,...r.style},ref:i,defaultValue:t})});ml.displayName=eg;function gl(e){return e===""||e===void 0}function bl(e){const t=Me(e),r=_.useRef(""),n=_.useRef(0),o=_.useCallback(s=>{const a=r.current+s;t(a),(function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(a)},[t]),i=_.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return _.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function vl(e,t,r){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let s=tg(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==r));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function tg(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var rg=Za,wl=qa,ng=Qa,og=el,ig=tl,xl=rl,sg=sl,yl=dl,ag=ul,lg=hl;const cg=rg,dg=ng,kl=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(wl,{ref:n,className:pe("flex h-8 w-full items-center justify-between gap-2 rounded-md border border-zinc-800 bg-black px-3 py-1.5 text-left text-xs font-medium text-white outline-none","hover:bg-zinc-900 focus-visible:ring-2 focus-visible:ring-blue-500/80 focus-visible:ring-inset focus-visible:border-zinc-600","disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:flex [&>span]:items-center [&>span]:gap-2",e),style:{boxShadow:"none",WebkitBoxShadow:"none",MozBoxShadow:"none"},...r,children:[t,p.jsx(og,{asChild:!0,children:p.jsx(Hr,{className:"h-3 w-3 shrink-0 text-zinc-400",strokeWidth:2})})]}));kl.displayName=wl.displayName;const Sl=_.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>p.jsx(ig,{children:p.jsx(xl,{ref:o,className:pe("relative z-[9999] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-zinc-800 bg-zinc-950 text-white shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:p.jsx(sg,{className:pe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Sl.displayName=xl.displayName;const _l=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(yl,{ref:n,className:pe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-xs outline-none","focus:bg-zinc-800 focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(lg,{children:p.jsx(Qn,{className:"h-3 w-3",strokeWidth:2})})}),p.jsx(ag,{children:t})]}));_l.displayName=yl.displayName;const Cl=_.createContext(null);function El(){const e=_.useContext(Cl);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function Al({open:e,onOpenChange:t,children:r}){const[n,o]=_.useState(!1),i=e!==void 0,s=i?e:n,a=_.useCallback(c=>{i||o(c),t==null||t(c)},[i,t]),l=_.useMemo(()=>({open:s,onOpenChange:a}),[s,a]);return p.jsx(Cl.Provider,{value:l,children:r})}function ug({asChild:e,children:t}){const{onOpenChange:r}=El(),n=_.Children.only(t);return e&&_.isValidElement(n)?_.cloneElement(n,{onClick:o=>{var i,s;(s=(i=n.props).onClick)==null||s.call(i,o),r(!0)}}):p.jsx("button",{type:"button",onClick:()=>r(!0),children:t})}function Nl({className:e,children:t,preventCloseOnBackdropClick:r,...n}){const{open:o,onOpenChange:i}=El();if(_.useEffect(()=>{const a=l=>{l.key==="Escape"&&i(!1)};return o&&(document.addEventListener("keydown",a),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow=""}},[o,i]),!o)return null;const s=a=>{a.preventDefault(),a.stopPropagation()};return ht.createPortal(p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:s,onDrop:s}),p.jsx("div",{role:"dialog","aria-modal":!0,className:pe("fixed left-1/2 top-1/2 z-[9999] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-zinc-700 bg-zinc-900 p-4 shadow-xl",e),onClick:a=>a.stopPropagation(),...n,children:t})]}),document.body)}function zl({className:e,...t}){return p.jsx("div",{className:pe("flex flex-col gap-1.5 pb-4",e),...t})}function fg({className:e,...t}){return p.jsx("div",{className:pe("flex justify-end gap-2 pt-4",e),...t})}function jl({className:e,...t}){return p.jsx("h2",{className:pe("text-sm font-semibold text-white",e),...t})}function Tl({className:e,...t}){return p.jsx("p",{className:pe("text-xs text-zinc-400",e),...t})}const Be=_.forwardRef(({className:e,variant:t="default",size:r="default",asChild:n=!1,...o},i)=>{const s="inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0 cursor-pointer",a={default:"bg-primary text-primary-foreground shadow-lg shadow-primary/20 hover:bg-primary/90",outline:"border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",ghost:"text-zinc-500 hover:text-zinc-200 hover:bg-zinc-800",destructive:"bg-destructive/15 text-destructive hover:bg-destructive/25"},l={sm:"h-7 px-2.5 text-[11px]",default:"h-8 px-3 py-1.5 text-xs",lg:"h-9 px-5 text-sm",icon:"h-8 w-8","icon-sm":"h-7 w-7","icon-xs":"h-6 w-6"},c=n?Yf:"button";return p.jsx(c,{ref:i,type:"button",className:pe(s,a[t],l[r],e),...o})});Be.displayName="Button";const hg=["library","upload","url"];function pg({library:e,selectedId:t,onSelect:r}){const[n,o]=T.useState(""),[i,s]=T.useState("all"),a=["all",...new Set(e.flatMap(c=>c.tags??[]))],l=e.filter(c=>{const d=i==="all"||(c.tags??[]).includes(i),f=!n||(c.alt??"").toLowerCase().includes(n.toLowerCase());return d&&f});return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"relative",children:[p.jsx(Ld,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),p.jsx(xo,{value:n,onChange:c=>o(c.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),p.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map(c=>p.jsx("button",{type:"button",onClick:()=>s(c),className:pe("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===c?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-700 text-zinc-500 hover:border-zinc-600 hover:text-zinc-400"),children:c==="all"?"Tutte":c},c))}),l.length>0?p.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(c=>{const d=t===c.id;return p.jsxs("button",{type:"button",onClick:()=>r(d?null:c.id),className:pe("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",d?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[p.jsx("img",{src:c.url,alt:c.alt,loading:"lazy",className:pe("w-full h-full object-cover transition-[filter] duration-150",d?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),p.jsx("div",{className:pe("absolute inset-x-0 bottom-0 px-2 py-1.5","bg-gradient-to-t from-black/70 to-transparent","opacity-0 group-hover:opacity-100 transition-opacity",d&&"opacity-100"),children:p.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:c.alt})}),d&&p.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:p.jsx(Qn,{size:14,className:"text-white"})})]},c.id)})}):p.jsx("div",{className:"text-center py-12 text-zinc-600 text-xs",children:"Nessuna immagine in libreria. Configura assets.assetsManifest nel tenant (es. da public/assets)."})]})}function mg({preview:e,onPreviewChange:t,onAssetUpload:r}){const[n,o]=T.useState(!1),i=T.useRef(null),s=T.useCallback(async d=>{if(fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"handleFile called",data:{fileName:d.name,hasOnAssetUpload:!!r},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!d.type.startsWith("image/"))return;if(r){try{const m=await r(d);fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"onAssetUpload resolved",data:{url:m==null?void 0:m.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),t({name:d.name,size:d.size,dataUrl:m})}catch{const m=new FileReader;m.onload=u=>{var w;t({name:d.name,size:d.size,dataUrl:(w=u.target)==null?void 0:w.result})},m.readAsDataURL(d)}return}const f=new FileReader;f.onload=m=>{var u;t({name:d.name,size:d.size,dataUrl:(u=m.target)==null?void 0:u.result})},f.readAsDataURL(d)},[t,r]),a=T.useCallback(d=>{var m,u;d.preventDefault(),d.stopPropagation(),o(!1);const f=(u=(m=d.dataTransfer)==null?void 0:m.files)==null?void 0:u[0];f&&s(f)},[s]),l=T.useCallback(d=>{d.preventDefault(),d.stopPropagation(),o(!0)},[]),c=T.useCallback(d=>{var m;const f=(m=d.target.files)==null?void 0:m[0];f&&s(f)},[s]);return p.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:d=>{d.preventDefault(),d.stopPropagation(),o(!1)},onDrop:a,onClick:()=>{var d;return!e&&((d=i.current)==null?void 0:d.click())},className:pe("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",n?"border-blue-500/50 bg-blue-500/[0.04]":e?"border-zinc-800 bg-transparent cursor-default":"border-zinc-800 bg-white/[0.01] hover:border-zinc-600 hover:bg-white/[0.02]"),children:[e?p.jsxs(p.Fragment,{children:[p.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),p.jsxs("div",{className:"absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/80 to-transparent p-4 flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),p.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),p.jsx(Be,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:d=>{d.stopPropagation(),t(null)},children:p.jsx(Yr,{size:14})})]})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:p.jsx(Xi,{size:22})}),p.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),p.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),p.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),p.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:c})]})}function gg({urlPreview:e,onUrlPreviewChange:t}){const[r,n]=T.useState(""),[o,i]=T.useState(!1),s=()=>{if(r.trim())try{new URL(r),t(r),i(!1)}catch{i(!0),t(null)}};return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx(zt,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(xo,{value:r,onChange:a=>{n(a.target.value),i(!1)},onKeyDown:a=>a.key==="Enter"&&s(),placeholder:"https://images.unsplash.com/photo-...",className:pe("h-8 text-xs bg-zinc-900/50 border-zinc-800",o&&"border-red-500/50")}),p.jsx(Be,{type:"button",variant:"outline",onClick:s,className:"shrink-0 h-8",children:"Anteprima"})]}),o&&p.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?p.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[p.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),t(null)}}),p.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[p.jsx(Qn,{size:14,className:"text-emerald-400"}),p.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):o?null:p.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[p.jsx(Zi,{size:32,className:"mb-3 opacity-40"}),p.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const bg=({open:e,onOpenChange:t,onSelect:r})=>{const{assets:n}=dr(),o=(n==null?void 0:n.assetsManifest)??[],[i,s]=T.useState("library"),[a,l]=T.useState(null),[c,d]=T.useState(null),[f,m]=T.useState(null);T.useEffect(()=>{e&&(s("library"),l(null),d(null),m(null))},[e]),T.useEffect(()=>{if(!e||i!=="upload")return;const v=()=>{fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:beforeunload",message:"beforeunload fired",data:{},timestamp:Date.now(),hypothesisId:"H1"})}).catch(()=>{})};return window.addEventListener("beforeunload",v),()=>window.removeEventListener("beforeunload",v)},[e,i]),T.useEffect(()=>{if(!e||i!=="upload")return;const v=k=>{k.preventDefault()},x={capture:!0};return document.addEventListener("dragover",v,x),document.addEventListener("drop",v,x),window.addEventListener("dragover",v,x),window.addEventListener("drop",v,x),()=>{document.removeEventListener("dragover",v,x),document.removeEventListener("drop",v,x),window.removeEventListener("dragover",v,x),window.removeEventListener("drop",v,x)}},[e,i]);const u=i==="library"&&a!=null||i==="upload"&&c!=null||i==="url"&&f!=null,w=()=>{if(i==="library"&&a){const v=o.find(x=>x.id===a);v&&r({url:v.url,alt:v.alt})}else i==="upload"&&c?r({url:c.dataUrl,alt:c.name}):i==="url"&&f&&r({url:f,alt:""});setTimeout(()=>t(!1),0)},h=i==="library"&&a?"1 immagine selezionata":i==="upload"&&c?c.name:i==="url"&&f?"URL pronto":"Nessuna selezione",b=v=>{v.preventDefault(),v.stopPropagation()};return p.jsx(Al,{open:e,onOpenChange:t,children:p.jsxs(Nl,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:b,onDrop:b,children:[p.jsxs(zl,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:p.jsx(Vr,{size:18})}),p.jsxs("div",{children:[p.jsx(jl,{children:"Image Picker"}),p.jsx(Tl,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),p.jsx("button",{type:"button",onClick:()=>t(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:p.jsx(Mt,{size:18})})]}),p.jsx("div",{className:"flex border-b border-zinc-800",children:hg.map(v=>p.jsxs("button",{type:"button",onClick:()=>s(v),className:pe("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===v?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[v==="library"&&p.jsx(Vr,{size:14}),v==="upload"&&p.jsx(Xi,{size:14}),v==="url"&&p.jsx(Zi,{size:14}),v==="library"?"Libreria":v==="upload"?"Upload":"URL"]},v))}),p.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&p.jsx(pg,{library:o,selectedId:a,onSelect:l}),i==="upload"&&p.jsx(mg,{preview:c,onPreviewChange:d,onAssetUpload:n==null?void 0:n.onAssetUpload}),i==="url"&&p.jsx(gg,{urlPreview:f,onUrlPreviewChange:m})]}),p.jsxs(fg,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[p.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:h}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(Be,{type:"button",variant:"outline",size:"sm",onClick:()=>t(!1),children:"Annulla"}),p.jsx(Be,{type:"button",size:"sm",disabled:!u,onClick:w,className:pe(!u&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},Ol=(e,t="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("assets/"))return`/${e}`;if(e.startsWith("/uploaded-assets/"))return e;if(!/\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i.test(e))return e.startsWith("/")?e:`/${e}`;const n=e.replace(/^\//,"");return`/assets/${t}/${n}`},vg=({value:e,onChange:t,label:r="IMAGE",className:n})=>{const{tenantId:o="default"}=dr(),[i,s]=T.useState(!1),[a,l]=T.useState(!1),c=!!(e!=null&&e.url),d=e!=null&&e.url?Ol(e.url,o):"",f=u=>{t(u),s(!1)},m=u=>{u.stopPropagation(),t({url:"",alt:""})};return p.jsxs("div",{className:pe("space-y-1.5",n),children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),c?p.jsxs("div",{role:"button",tabIndex:0,onClick:()=>s(!0),onKeyDown:u=>u.key==="Enter"&&s(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:pe("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",a&&"ring-blue-500/40"),children:[p.jsx("img",{src:d,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:u=>{u.target.style.display="none"}}),p.jsx("div",{className:pe("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",a?"bg-black/50":"bg-black/0"),children:a&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-1.5 bg-white/15 backdrop-blur-md rounded-lg px-3.5 py-2 text-white text-xs font-medium",children:[p.jsx(Rd,{size:13}),p.jsx("span",{children:"Cambia"})]}),p.jsx(Be,{type:"button",variant:"ghost",className:"h-8 w-8 p-0 bg-red-500/15 backdrop-blur-md text-red-300 hover:text-red-200 hover:bg-red-500/25",onClick:m,children:p.jsx(Yr,{size:13})})]})}),p.jsx("div",{className:"px-2.5 py-1.5 bg-black/50 text-[10px] text-zinc-500 truncate",children:((e==null?void 0:e.url)??"").length>50?"…"+((e==null?void 0:e.url)??"").slice(-47):(e==null?void 0:e.url)??""})]}):p.jsxs("button",{type:"button",onClick:()=>s(!0),className:pe("w-full rounded-lg border-2 border-dashed border-zinc-800 py-7","flex flex-col items-center gap-2","bg-white/[0.01] transition-all","hover:border-blue-500/30 hover:bg-blue-500/[0.03]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),children:[p.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:p.jsx(Vr,{size:18})}),p.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),p.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),p.jsx(bg,{open:i,onOpenChange:s,onSelect:f})]})},Pl=[{name:"layers",Icon:to},{name:"github",Icon:Id},{name:"arrow-right",Icon:Ad},{name:"box",Icon:zd},{name:"terminal",Icon:Wd},{name:"chevron-right",Icon:jd},{name:"menu",Icon:Dd},{name:"x",Icon:Mt},{name:"sparkles",Icon:Bd},{name:"zap",Icon:Hd}],Er={"ui:text":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"grid w-full items-center gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsx(xo,{type:"text",className:"h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:textarea":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsx($f,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:select":({label:e,value:t,onChange:r,options:n=[]})=>p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsxs(cg,{value:t||"",onValueChange:r,children:[p.jsx(kl,{className:"w-full h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus:ring-blue-600",children:p.jsx(dg,{placeholder:"Select..."})}),p.jsx(Sl,{className:"dark",children:n.map(o=>p.jsx(_l,{value:o,className:"text-[11px]",children:o},o))})]})]}),"ui:checkbox":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2 rounded border border-zinc-800/50 bg-zinc-900/20",children:[p.jsx(Hf,{id:e,checked:!!t,onCheckedChange:n=>r(n===!0)}),p.jsx(zt,{htmlFor:e,className:"text-[11px] font-medium cursor-pointer select-none text-zinc-300",children:e})]}),"ui:image-picker":({label:e,value:t,onChange:r})=>{const n=t!=null&&typeof t=="object"&&"url"in t?{url:String(t.url??""),alt:String(t.alt??"")}:{url:typeof t=="string"?t:"",alt:""},o=i=>{r(i)};return p.jsx("div",{className:"mb-4",children:p.jsx(vg,{label:e,value:n,onChange:o})})},"ui:icon-picker":({label:e,value:t,onChange:r})=>{const[n,o]=T.useState(!1),i=Pl.find(s=>s.name===(t||""));return p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsxs(Al,{open:n,onOpenChange:o,children:[p.jsx(ug,{asChild:!0,children:p.jsx(Be,{variant:"outline",className:"w-full h-9 rounded-md border border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 flex items-center gap-2 text-left",children:i?p.jsxs(p.Fragment,{children:[p.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),p.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):p.jsxs(p.Fragment,{children:[p.jsx(Vr,{size:16,className:"text-zinc-500 shrink-0"}),p.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),p.jsxs(Nl,{className:"sm:max-w-[280px] p-4",children:[p.jsxs(zl,{children:[p.jsx(jl,{className:"text-sm",children:"Choose icon"}),p.jsx(Tl,{className:"text-xs",children:"Click an icon to select it."})]}),p.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:Pl.map(({name:s,Icon:a})=>p.jsx("button",{type:"button",onClick:()=>{r(s),o(!1)},className:pe("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",t===s?"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:s,children:p.jsx(a,{size:20})},s))})]})]})]})}},ti=e=>{if(e instanceof De.z.ZodOptional||e instanceof De.z.ZodDefault)return ti(e._def.innerType);if(e instanceof De.z.ZodObject){const t={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(t[r]=ti(e.shape[r]));return t}return e instanceof De.z.ZodArray?[]:e instanceof De.z.ZodString?"":e instanceof De.z.ZodNumber?0:e instanceof De.z.ZodBoolean?!1:e instanceof De.z.ZodEnum?e._def.values[0]:null},ri=e=>e instanceof De.z.ZodOptional||e instanceof De.z.ZodDefault?ri(e._def.innerType):e,Dn=(e,t)=>e&&!t?"opacity-10":"opacity-100",er=(e,t)=>e!=null&&t.toLowerCase()===e.toLowerCase(),wg=(e,t)=>{if(!e)return;const r=t.toLowerCase(),n=Object.entries(e).find(([o])=>o.toLowerCase()===r);return n==null?void 0:n[1]},Ar=({schema:e,data:t,onChange:r,keys:n,expandedItemPath:o,expandedItemIdByField:i,focusedFieldKey:s,onSidebarExpandedItemChange:a})=>{const l=e.shape,c=n!=null?Object.keys(l).filter(w=>n.includes(w)):Object.keys(l),d=o==null?void 0:o[0],f=(d==null?void 0:d.itemId)!=null?{[d.fieldKey]:d.itemId}:i,m=(d==null?void 0:d.fieldKey)??s??null,u=m!=null;return p.jsx("div",{className:"space-y-4",children:c.map(w=>{const h=l[w];if(!h)return null;const b=ri(h),v=h.description||"ui:text",x=t[w];if(v==="ui:image-picker"&&b instanceof De.z.ZodObject){const O=er(m,w),N=Er["ui:image-picker"]||Er["ui:text"];return p.jsx("div",{className:`transition-opacity duration-200 ${Dn(u,O)}`,...O?{"data-jp-focused-field":w}:{},children:p.jsx(N,{label:w,value:x,onChange:P=>r({...t,[w]:P})})},w)}if(b instanceof De.z.ZodObject){const O=x||{},N=er(m,w);return p.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 ${Dn(u,N)}`,...N?{"data-jp-focused-field":w}:{},children:[p.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[p.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),p.jsx("h4",{className:"text-[10px] font-black uppercase text-zinc-400 tracking-widest",children:w})]}),p.jsx(Ar,{schema:b,data:O,onChange:P=>r({...t,[w]:P}),expandedItemPath:o&&er(d==null?void 0:d.fieldKey,w)?o.slice(1):void 0,expandedItemIdByField:f,focusedFieldKey:m})]},w)}if(b instanceof De.z.ZodArray){const O=Array.isArray(x)?x:[],N=ri(b.element),P=(z,L)=>{if(L<0||L>=O.length)return;const y=[...O],[$]=y.splice(z,1);y.splice(L,0,$),r({...t,[w]:y})},D=er(m,w),W=er(d==null?void 0:d.fieldKey,w)?d==null?void 0:d.itemId:void 0,G=wg(f,w)??W;return p.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${Dn(u,D)}`,...D?{"data-jp-focused-field":w}:{},children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsxs("label",{className:"text-[10px] font-black uppercase text-zinc-500 tracking-widest",children:[w," (",O.length,")"]}),p.jsxs("button",{type:"button",onClick:()=>{const z=ti(N);r({...t,[w]:[...O,z]})},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:[p.jsx(ro,{size:12})," Add Item"]})]}),p.jsx("div",{className:"space-y-2",children:O.map((z,L)=>{const y=z,$=y.id||`legacy-${L}`,X=(typeof y.title=="string"?y.title:null)||(typeof y.label=="string"?y.label:null)||(typeof y.name=="string"?y.name:null)||(typeof y.content=="string"?y.content:null)||(typeof y.text=="string"?y.text:null)||`${w} #${L+1}`,H=G,V=String(y.id??$),Y=H!=null&&String(H)===V,Q=Y&&o&&o.length>1?o.slice(1):void 0,j=u&&D&&H!=null&&!Y;return p.jsx(xg,{itemId:V,openItemId:H!=null?String(H):void 0,isFaded:j,index:L,isFirst:L===0,isLast:L===O.length-1,label:X,onExpandedChange:a?I=>a(I?{fieldKey:w,itemId:V}:null):void 0,onRemove:()=>{const I=O.filter((K,Z)=>Z!==L);r({...t,[w]:I})},onMoveUp:()=>P(L,L-1),onMoveDown:()=>P(L,L+1),children:N instanceof De.z.ZodObject?p.jsx(Ar,{schema:N,data:y||{},expandedItemPath:Q,onChange:I=>{const K=[...O];K[L]=I,r({...t,[w]:K})}}):p.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},$)})})]},w)}const k=Er[v]||Er["ui:text"],S=b instanceof De.z.ZodEnum?b._def.values:void 0,C=er(m,w);return p.jsx("div",{className:`transition-opacity duration-200 ${Dn(u,C)}`,...C?{"data-jp-focused-field":w}:{},children:p.jsx(k,{label:w,value:x,options:S,onChange:O=>r({...t,[w]:O})})},w)})})},xg=({itemId:e,openItemId:t,isFaded:r=!1,label:n,onExpandedChange:o,onRemove:i,onMoveUp:s,onMoveDown:a,isFirst:l,isLast:c,children:d})=>{const f=t!=null&&String(t)===String(e),[m,u]=T.useState(f);T.useEffect(()=>{f&&!m&&u(!0),!f&&m&&u(!1)},[f,m]);const w=()=>{const b=!m;u(b),o==null||o(b)},h=f&&m;return p.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...h?{"data-jp-expanded-item":e}:{},children:[p.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[p.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:p.jsxs("button",{type:"button",onClick:w,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[m?p.jsx(eo,{size:12,className:"shrink-0"}):p.jsx(Hr,{size:12,className:"shrink-0"}),p.jsx("span",{className:"truncate",children:n})]})}),p.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[p.jsx("button",{type:"button",disabled:l,onClick:s,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:p.jsx(Nd,{size:12})}),p.jsx("button",{type:"button",disabled:c,onClick:a,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:p.jsx(Ed,{size:12})}),p.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),p.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:p.jsx(Yr,{size:12})})]})]}),m&&p.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:d})]})};function yg(e,t){return _.useReducer((r,n)=>t[r][n]??r,e)}var ut=e=>{const{present:t,children:r}=e,n=kg(t),o=typeof r=="function"?r({present:n.isPresent}):_.Children.only(r),i=_e(n.ref,Sg(o));return typeof r=="function"||n.isPresent?_.cloneElement(o,{ref:i}):null};ut.displayName="Presence";function kg(e){const[t,r]=_.useState(),n=_.useRef(null),o=_.useRef(e),i=_.useRef("none"),s=e?"mounted":"unmounted",[a,l]=yg(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const c=Rn(n.current);i.current=a==="mounted"?c:"none"},[a]),Pe(()=>{const c=n.current,d=o.current;if(d!==e){const m=i.current,u=Rn(c);e?l("MOUNT"):u==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&m!==u?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Pe(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=u=>{const h=Rn(n.current).includes(CSS.escape(u.animationName));if(u.target===t&&h&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=u=>{u.target===t&&(i.current=Rn(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:_.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Rn(e){return(e==null?void 0:e.animationName)||"none"}function Sg(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var[Mn]=Wt("Tooltip",[Gt]),Ln=Gt(),Il="TooltipProvider",_g=700,ni="tooltip.open",[Cg,oi]=Mn(Il),Dl=e=>{const{__scopeTooltip:t,delayDuration:r=_g,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,s=_.useRef(!0),a=_.useRef(!1),l=_.useRef(0);return _.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(Cg,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:_.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:_.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:i})};Dl.displayName=Il;var Nr="Tooltip",[Eg,zr]=Mn(Nr),Rl=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=oi(Nr,e.__scopeTooltip),c=Ln(t),[d,f]=_.useState(null),m=kr(),u=_.useRef(0),w=s??l.disableHoverableContent,h=a??l.delayDuration,b=_.useRef(!1),[v,x]=Sn({prop:n,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(ni))):l.onClose(),i==null||i(N)},caller:Nr}),k=_.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),S=_.useCallback(()=>{window.clearTimeout(u.current),u.current=0,b.current=!1,x(!0)},[x]),C=_.useCallback(()=>{window.clearTimeout(u.current),u.current=0,x(!1)},[x]),O=_.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>{b.current=!0,x(!0),u.current=0},h)},[h,x]);return _.useEffect(()=>()=>{u.current&&(window.clearTimeout(u.current),u.current=0)},[]),p.jsx(Bo,{...c,children:p.jsx(Eg,{scope:t,contentId:m,open:v,stateAttribute:k,trigger:d,onTriggerChange:f,onTriggerEnter:_.useCallback(()=>{l.isOpenDelayedRef.current?O():S()},[l.isOpenDelayedRef,O,S]),onTriggerLeave:_.useCallback(()=>{w?C():(window.clearTimeout(u.current),u.current=0)},[C,w]),onOpen:S,onClose:C,disableHoverableContent:w,children:r})})};Rl.displayName=Nr;var ii="TooltipTrigger",Ml=_.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=zr(ii,r),i=oi(ii,r),s=Ln(r),a=_.useRef(null),l=_e(t,a,o.onTriggerChange),c=_.useRef(!1),d=_.useRef(!1),f=_.useCallback(()=>c.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(yn,{asChild:!0,...s,children:p.jsx(Se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:be(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:be(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:be(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:be(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:be(e.onBlur,o.onClose),onClick:be(e.onClick,o.onClose)})})});Ml.displayName=ii;var si="TooltipPortal",[Ag,Ng]=Mn(si,{forceMount:void 0}),Ll=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=zr(si,t);return p.jsx(Ag,{scope:t,forceMount:r,children:p.jsx(ut,{present:r||i.open,children:p.jsx(kn,{asChild:!0,container:o,children:n})})})};Ll.displayName=si;var tr="TooltipContent",Fl=_.forwardRef((e,t)=>{const r=Ng(tr,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,s=zr(tr,e.__scopeTooltip);return p.jsx(ut,{present:n||s.open,children:s.disableHoverableContent?p.jsx(Bl,{side:o,...i,ref:t}):p.jsx(zg,{side:o,...i,ref:t})})}),zg=_.forwardRef((e,t)=>{const r=zr(tr,e.__scopeTooltip),n=oi(tr,e.__scopeTooltip),o=_.useRef(null),i=_e(t,o),[s,a]=_.useState(null),{trigger:l,onClose:c}=r,d=o.current,{onPointerInTransitChange:f}=n,m=_.useCallback(()=>{a(null),f(!1)},[f]),u=_.useCallback((w,h)=>{const b=w.currentTarget,v={x:w.clientX,y:w.clientY},x=Ig(v,b.getBoundingClientRect()),k=Dg(v,x),S=Rg(h.getBoundingClientRect()),C=Lg([...k,...S]);a(C),f(!0)},[f]);return _.useEffect(()=>()=>m(),[m]),_.useEffect(()=>{if(l&&d){const w=b=>u(b,d),h=b=>u(b,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",h)}}},[l,d,u,m]),_.useEffect(()=>{if(s){const w=h=>{const b=h.target,v={x:h.clientX,y:h.clientY},x=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),k=!Mg(v,s);x?m():k&&(m(),c())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,s,c,m]),p.jsx(Bl,{...e,ref:i})}),[jg,Tg]=Mn(Nr,{isInside:!1}),Og=Gf("TooltipContent"),Bl=_.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=zr(tr,r),c=Ln(r),{onClose:d}=l;return _.useEffect(()=>(document.addEventListener(ni,d),()=>document.removeEventListener(ni,d)),[d]),_.useEffect(()=>{if(l.trigger){const f=m=>{const u=m.target;u!=null&&u.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),p.jsx(dn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:p.jsxs(Uo,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(Og,{children:n}),p.jsx(jg,{scope:r,isInside:!0,children:p.jsx(Vp,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Fl.displayName=tr;var Ul="TooltipArrow",Pg=_.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ln(r);return Tg(Ul,r).isInside?null:p.jsx(Wo,{...o,...n,ref:t})});Pg.displayName=Ul;function Ig(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Dg(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Rg(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Mg(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],c=a.x,d=a.y,f=l.x,m=l.y;d>n!=m>n&&r<(f-c)*(n-d)/(m-d)+c&&(o=!o)}return o}function Lg(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Fg(t)}function Fg(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Bg=Dl,Ug=Rl,Wg=Ml,$g=Ll,Wl=Fl;const Hg=Bg,jr=Ug,Tr=Wg,rr=_.forwardRef(({className:e,sideOffset:t=4,...r},n)=>p.jsx($g,{children:p.jsx(Wl,{ref:n,sideOffset:t,className:pe("z-50 rounded-md bg-zinc-800 px-2.5 py-1.5 text-[11px] text-zinc-200 shadow-md","animate-in fade-in-0 zoom-in-95",e),...r})}));rr.displayName=Wl.displayName;var Fn="Popover",[$l]=Wt(Fn,[Gt]),Or=Gt(),[Vg,St]=$l(Fn),Hl=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=Or(t),l=_.useRef(null),[c,d]=_.useState(!1),[f,m]=Sn({prop:n,defaultProp:o??!1,onChange:i,caller:Fn});return p.jsx(Bo,{...a,children:p.jsx(Vg,{scope:t,contentId:kr(),triggerRef:l,open:f,onOpenChange:m,onOpenToggle:_.useCallback(()=>m(u=>!u),[m]),hasCustomAnchor:c,onCustomAnchorAdd:_.useCallback(()=>d(!0),[]),onCustomAnchorRemove:_.useCallback(()=>d(!1),[]),modal:s,children:r})})};Hl.displayName=Fn;var Vl="PopoverAnchor",Yg=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=St(Vl,r),i=Or(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=o;return _.useEffect(()=>(s(),()=>a()),[s,a]),p.jsx(yn,{...i,...n,ref:t})});Yg.displayName=Vl;var Yl="PopoverTrigger",Kl=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=St(Yl,r),i=Or(r),s=_e(t,o.triggerRef),a=p.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Jl(o.open),...n,ref:s,onClick:be(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(yn,{asChild:!0,...i,children:a})});Kl.displayName=Yl;var ai="PopoverPortal",[Kg,Gg]=$l(ai,{forceMount:void 0}),Gl=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=St(ai,t);return p.jsx(Kg,{scope:t,forceMount:r,children:p.jsx(ut,{present:r||i.open,children:p.jsx(kn,{asChild:!0,container:o,children:n})})})};Gl.displayName=ai;var nr="PopoverContent",Zl=_.forwardRef((e,t)=>{const r=Gg(nr,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=St(nr,e.__scopePopover);return p.jsx(ut,{present:n||i.open,children:i.modal?p.jsx(Xg,{...o,ref:t}):p.jsx(qg,{...o,ref:t})})});Zl.displayName=nr;var Zg=$t("PopoverContent.RemoveScroll"),Xg=_.forwardRef((e,t)=>{const r=St(nr,e.__scopePopover),n=_.useRef(null),o=_e(t,n),i=_.useRef(!1);return _.useEffect(()=>{const s=n.current;if(s)return Ra(s)},[]),p.jsx(Go,{as:Zg,allowPinchZoom:!0,children:p.jsx(Xl,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),i.current||(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:be(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),qg=_.forwardRef((e,t)=>{const r=St(nr,e.__scopePopover),n=_.useRef(!1),o=_.useRef(!1);return p.jsx(Xl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((c=r.triggerRef.current)==null?void 0:c.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Xl=_.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...f}=e,m=St(nr,r),u=Or(r);return Gs(),p.jsx(Eo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(dn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>m.onOpenChange(!1),children:p.jsx(Uo,{"data-state":Jl(m.open),role:"dialog",id:m.contentId,...u,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ql="PopoverClose",Jg=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=St(ql,r);return p.jsx(Se.button,{type:"button",...n,ref:t,onClick:be(e.onClick,()=>o.onOpenChange(!1))})});Jg.displayName=ql;var Qg="PopoverArrow",e0=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Or(r);return p.jsx(Wo,{...o,...n,ref:t})});e0.displayName=Qg;function Jl(e){return e?"open":"closed"}var t0=Hl,r0=Kl,n0=Gl,Ql=Zl;const o0=t0,i0=r0,ec=_.forwardRef(({className:e,align:t="start",sideOffset:r=6,...n},o)=>p.jsx(n0,{children:p.jsx(Ql,{ref:o,align:t,sideOffset:r,className:pe("z-50 w-[var(--radix-popover-trigger-width)] rounded-lg border border-zinc-700/80 bg-zinc-950 p-1 text-white shadow-xl shadow-black/30","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2",e),...n})}));ec.displayName=Ql.displayName;const tc=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"Select page",s0=({pageSlugs:e,currentSlug:t,onPageChange:r,sectionCount:n,onNewPage:o,className:i,currentPageLabel:s})=>{const[a,l]=T.useState(!1),c=s??tc(t),d=f=>{r(f),l(!1)};return p.jsx("div",{className:pe("mx-3 mt-2 mb-2",i),children:p.jsxs(o0,{open:a,onOpenChange:l,children:[p.jsx(i0,{asChild:!0,children:p.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-label":`Select page, current: ${c}`,className:pe("flex items-center gap-2 w-full pl-3 pr-4 py-2 rounded-lg border text-left transition-all duration-150 cursor-pointer","bg-transparent border-zinc-800 text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800/50 hover:border-zinc-700","data-[state=open]:bg-zinc-950 data-[state=open]:border-zinc-800 data-[state=open]:text-zinc-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-950"),children:[p.jsx(Pd,{size:14,className:"shrink-0 text-zinc-500","aria-hidden":!0}),p.jsx("span",{className:"text-xs font-medium flex-1 truncate",children:c}),p.jsx(Hr,{size:13,className:"shrink-0 text-zinc-500","aria-hidden":!0})]})}),p.jsxs(ec,{align:"start",sideOffset:4,className:"min-w-[var(--radix-popover-trigger-width)] bg-zinc-950 border-zinc-800 p-1",role:"listbox","aria-label":"Page list",children:[e.map(f=>{const m=f===t,u=tc(f);return p.jsxs("button",{type:"button",role:"option","aria-selected":m,onClick:()=>d(f),className:pe("flex items-center justify-between w-full px-2.5 py-2 rounded-md text-xs transition-colors cursor-pointer",m?"bg-primary/10 text-primary font-semibold":"text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"),children:[p.jsx("span",{children:u}),n!=null&&p.jsxs("span",{className:"text-[10px] text-zinc-600 tabular-nums","aria-hidden":!0,children:[n,"s"]})]},f)}),o!=null&&p.jsx("div",{className:"border-t border-zinc-800 mt-1 pt-1",children:p.jsxs("button",{type:"button",onClick:()=>{o(),l(!1)},className:"flex items-center gap-1.5 w-full px-2.5 py-2 rounded-md text-[11px] text-zinc-600 hover:text-zinc-300 hover:bg-zinc-800 transition-colors cursor-pointer","aria-label":"New page",children:[p.jsx(ro,{size:12,"aria-hidden":!0}),p.jsx("span",{children:"New page"})]})})]})]})})};function a0(e,t){return _.useReducer((r,n)=>t[r][n]??r,e)}var li="ScrollArea",[rc]=Wt(li),[l0,He]=rc(li),nc=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,l]=_.useState(null),[c,d]=_.useState(null),[f,m]=_.useState(null),[u,w]=_.useState(null),[h,b]=_.useState(null),[v,x]=_.useState(0),[k,S]=_.useState(0),[C,O]=_.useState(!1),[N,P]=_.useState(!1),D=_e(t,G=>l(G)),W=$s(o);return p.jsx(l0,{scope:r,type:n,dir:W,scrollHideDelay:i,scrollArea:a,viewport:c,onViewportChange:d,content:f,onContentChange:m,scrollbarX:u,onScrollbarXChange:w,scrollbarXEnabled:C,onScrollbarXEnabledChange:O,scrollbarY:h,onScrollbarYChange:b,scrollbarYEnabled:N,onScrollbarYEnabledChange:P,onCornerWidthChange:x,onCornerHeightChange:S,children:p.jsx(Se.div,{dir:W,...s,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});nc.displayName=li;var oc="ScrollAreaViewport",ic=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:o,...i}=e,s=He(oc,r),a=_.useRef(null),l=_e(t,a,s.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(Se.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});ic.displayName=oc;var ot="ScrollAreaScrollbar",sc=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=He(ot,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return _.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?p.jsx(c0,{...n,ref:t,forceMount:r}):o.type==="scroll"?p.jsx(d0,{...n,ref:t,forceMount:r}):o.type==="auto"?p.jsx(ac,{...n,ref:t,forceMount:r}):o.type==="always"?p.jsx(ci,{...n,ref:t}):null});sc.displayName=ot;var c0=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=He(ot,e.__scopeScrollArea),[i,s]=_.useState(!1);return _.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),s(!0)},d=()=>{l=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),p.jsx(ut,{present:r||i,children:p.jsx(ac,{"data-state":i?"visible":"hidden",...n,ref:t})})}),d0=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=He(ot,e.__scopeScrollArea),i=e.orientation==="horizontal",s=$n(()=>l("SCROLL_END"),100),[a,l]=a0("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return _.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay,l]),_.useEffect(()=>{const c=o.viewport,d=i?"scrollLeft":"scrollTop";if(c){let f=c[d];const m=()=>{const u=c[d];f!==u&&(l("SCROLL"),s()),f=u};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[o.viewport,i,l,s]),p.jsx(ut,{present:r||a!=="hidden",children:p.jsx(ci,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:be(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:be(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ac=_.forwardRef((e,t)=>{const r=He(ot,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,s]=_.useState(!1),a=e.orientation==="horizontal",l=$n(()=>{if(r.viewport){const c=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;s(a?c:d)}},10);return or(r.viewport,l),or(r.content,l),p.jsx(ut,{present:n||i,children:p.jsx(ci,{"data-state":i?"visible":"hidden",...o,ref:t})})}),ci=_.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=He(ot,e.__scopeScrollArea),i=_.useRef(null),s=_.useRef(0),[a,l]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=fc(a.viewport,a.content),d={...n,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:m=>i.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function f(m,u){return g0(m,s.current,a,u)}return r==="horizontal"?p.jsx(u0,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollLeft,u=hc(m,a,o.dir);i.current.style.transform=`translate3d(${u}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=f(m,o.dir))}}):r==="vertical"?p.jsx(f0,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollTop,u=hc(m,a);i.current.style.transform=`translate3d(0, ${u}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=f(m))}}):null}),u0=_.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=He(ot,e.__scopeScrollArea),[s,a]=_.useState(),l=_.useRef(null),c=_e(t,l,i.onScrollbarXChange);return _.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(cc,{"data-orientation":"horizontal",...o,ref:c,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Wn(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),mc(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Un(s.paddingLeft),paddingEnd:Un(s.paddingRight)}})}})}),f0=_.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=He(ot,e.__scopeScrollArea),[s,a]=_.useState(),l=_.useRef(null),c=_e(t,l,i.onScrollbarYChange);return _.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(cc,{"data-orientation":"vertical",...o,ref:c,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Wn(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),mc(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Un(s.paddingTop),paddingEnd:Un(s.paddingBottom)}})}})}),[h0,lc]=rc(ot),cc=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:f,...m}=e,u=He(ot,r),[w,h]=_.useState(null),b=_e(t,D=>h(D)),v=_.useRef(null),x=_.useRef(""),k=u.viewport,S=n.content-n.viewport,C=Me(d),O=Me(l),N=$n(f,10);function P(D){if(v.current){const W=D.clientX-v.current.left,G=D.clientY-v.current.top;c({x:W,y:G})}}return _.useEffect(()=>{const D=W=>{const G=W.target;(w==null?void 0:w.contains(G))&&C(W,S)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[k,w,S,C]),_.useEffect(O,[n,O]),or(w,N),or(u.content,N),p.jsx(h0,{scope:r,scrollbar:w,hasThumb:o,onThumbChange:Me(i),onThumbPointerUp:Me(s),onThumbPositionChange:O,onThumbPointerDown:Me(a),children:p.jsx(Se.div,{...m,ref:b,style:{position:"absolute",...m.style},onPointerDown:be(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),v.current=w.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",u.viewport&&(u.viewport.style.scrollBehavior="auto"),P(D))}),onPointerMove:be(e.onPointerMove,P),onPointerUp:be(e.onPointerUp,D=>{const W=D.target;W.hasPointerCapture(D.pointerId)&&W.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=x.current,u.viewport&&(u.viewport.style.scrollBehavior=""),v.current=null})})})}),Bn="ScrollAreaThumb",dc=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=lc(Bn,e.__scopeScrollArea);return p.jsx(ut,{present:r||o.hasThumb,children:p.jsx(p0,{ref:t,...n})})}),p0=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=He(Bn,r),s=lc(Bn,r),{onThumbPositionChange:a}=s,l=_e(t,f=>s.onThumbChange(f)),c=_.useRef(void 0),d=$n(()=>{c.current&&(c.current(),c.current=void 0)},100);return _.useEffect(()=>{const f=i.viewport;if(f){const m=()=>{if(d(),!c.current){const u=b0(f,a);c.current=u,a()}};return a(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[i.viewport,d,a]),p.jsx(Se.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:be(e.onPointerDownCapture,f=>{const u=f.target.getBoundingClientRect(),w=f.clientX-u.left,h=f.clientY-u.top;s.onThumbPointerDown({x:w,y:h})}),onPointerUp:be(e.onPointerUp,s.onThumbPointerUp)})});dc.displayName=Bn;var di="ScrollAreaCorner",uc=_.forwardRef((e,t)=>{const r=He(di,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?p.jsx(m0,{...e,ref:t}):null});uc.displayName=di;var m0=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=He(di,r),[i,s]=_.useState(0),[a,l]=_.useState(0),c=!!(i&&a);return or(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),or(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),s(d)}),c?p.jsx(Se.div,{...n,ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Un(e){return e?parseInt(e,10):0}function fc(e,t){const r=e/t;return isNaN(r)?0:r}function Wn(e){const t=fc(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function g0(e,t,r,n="ltr"){const o=Wn(r),i=o/2,s=t||i,a=o-s,l=r.scrollbar.paddingStart+s,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return pc([l,c],f)(e)}function hc(e,t,r="ltr"){const n=Wn(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,s]:[s*-1,0],c=yo(e,l);return pc([0,s],[0,a])(c)}function pc(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function mc(e,t){return e>0&&e<t}var b0=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=r.left!==i.left,a=r.top!==i.top;(s||a)&&t(),r=i,n=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(n)};function $n(e,t){const r=Me(e),n=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(n.current),[]),_.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function or(e,t){const r=Me(t);Pe(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var gc=nc,v0=ic,w0=sc,x0=dc,y0=uc;const bc=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(gc,{ref:n,className:pe("relative overflow-hidden",e),...r,children:[p.jsx(v0,{className:"h-full w-full rounded-[inherit]",children:t}),p.jsx(w0,{orientation:"vertical",className:"flex touch-none select-none transition-colors h-full w-1.5 border-l border-l-transparent p-px",children:p.jsx(x0,{className:"relative flex-1 rounded-full bg-zinc-700 hover:bg-zinc-600"})}),p.jsx(y0,{})]}));bc.displayName=gc.displayName;const vc=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),k0={activationConstraint:{distance:8}},S0={activationConstraint:{delay:200,tolerance:5}};function ui({layer:e,opts:t,dragHandleProps:r}){const{isSelected:n,isActive:o,isDragging:i,canDelete:s,onSelect:a,onOpenSettings:l,onDelete:c}=t,d=!!r;return p.jsxs("div",{className:pe("group flex items-center gap-2 pl-1 pr-2 py-2.5 rounded-lg text-left transition-all duration-200 cursor-pointer border-l-2",n?"bg-primary/[0.08] border-primary":o?"bg-zinc-800/30 border-emerald-500/60":"border-transparent hover:bg-zinc-800/40",i&&"opacity-50 shadow-lg",d?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[d?p.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-150 cursor-grab touch-none","aria-label":"Trascina per riordinare",...r,children:p.jsx(Gi,{size:12,className:"text-zinc-600"})}):p.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 pointer-events-none",children:p.jsx(Gi,{size:12,className:"text-zinc-600/50"})}),p.jsxs("button",{type:"button",onClick:a,className:"flex-1 min-w-0 text-left",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:pe("text-xs font-bold uppercase tracking-[0.06em] truncate",n?"text-primary":"text-zinc-500"),children:e.type}),o&&p.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),p.jsx("span",{className:"text-[11px] text-zinc-600 block truncate leading-snug mt-0.5",children:e.title??`${e.type} section`})]}),p.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsx(Be,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-zinc-300",onClick:f=>{f.stopPropagation(),l(f)},children:p.jsx(Fd,{size:12})})}),p.jsx(rr,{children:"Settings"})]}),s&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsx(Be,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-destructive",onClick:f=>{f.stopPropagation(),c()},children:p.jsx(Yr,{size:12})})}),p.jsx(rr,{children:"Delete section"})]})]})]})}function _0({layer:e,opts:t}){const{attributes:r,listeners:n,setNodeRef:o,transform:i,transition:s,isDragging:a}=Lf({id:e.id,disabled:!t.canReorder}),l={transform:gt.Transform.toString(i),transition:s};return p.jsx("div",{ref:o,style:l,className:pe(a&&"z-10"),children:p.jsx(ui,{layer:e,opts:{...t,isDragging:a},dragHandleProps:t.canReorder?{...r,...n,"aria-roledescription":"elemento trascinabile"}:void 0})})}const wc=({selectedSection:e,pageData:t,allSectionsData:r=[],onUpdate:n,onUpdateSection:o,onClose:i,expandedItemPath:s=null,onReorderSection:a,allLayers:l=[],activeSectionId:c,onRequestScrollToSection:d,onDeleteSection:f,onAddSection:m,hasChanges:u=!1,onExportHTML:w,onSaveToFile:h,saveSuccessFeedback:b=!1,onResetToFile:v,showResetToFile:x=!1,pageSlugs:k=[],currentSlug:S="home",onPageChange:C})=>{const{schemas:O}=dr(),[N,P]=T.useState(!0),[D,W]=T.useState(null),[G,z]=T.useState(null),[L,y]=T.useState(null),[$,X]=T.useState(null),H=T.useRef(null),V=T.useRef(null),Y=cu(ao(mo,k0),ao(xs,S0),ao(ho,{coordinateGetter:Uf})),Q=T.useDeferredValue(e),j=e!=null&&(Q==null?void 0:Q.id)!==e.id,I=s&&s.length>0?s:L?[L]:null,K=I!=null&&I.length?{fieldKey:I[I.length-1].fieldKey,itemId:I[I.length-1].itemId}:null,Z=T.useRef(s);T.useEffect(()=>{Z.current!=null&&s==null&&y(null),Z.current=s},[s]),T.useEffect(()=>{(e==null?void 0:e.id)!=null&&P(!1)},[e==null?void 0:e.id]);const te=()=>{const B=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const M=H.current;M&&M.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(B)},ue=T.useRef(N);T.useEffect(()=>{if(N&&!ue.current){const B=te();return ue.current=N,B}ue.current=N},[N]),T.useEffect(()=>{if(!K)return;const B=H.current;if(!B)return;const M=requestAnimationFrame(()=>{const J=B.querySelector("[data-jp-expanded-item]")??B.querySelector("[data-jp-focused-field]");J&&J.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(M)},[K]);const ee=B=>{P(!1),d==null||d(B)},ie=()=>{P(B=>{const M=!B;return M&&te(),M})},se=(B,M)=>{M.stopPropagation(),r.length>0&&o?X(B):(P(!1),d==null||d(B))};T.useEffect(()=>{if($==null)return;const B=M=>{M.key==="Escape"&&X(null)};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[$]);const oe=B=>{D===B?(f==null||f(B),W(null)):(W(B),setTimeout(()=>W(null),3e3))},le=T.useMemo(()=>l.filter(B=>B.scope==="local").map(B=>B.id),[l]),fe=!!a&&le.length>0,we=B=>{z(B.active.id)},g=B=>{z(null);const{active:M,over:J}=B;if(!J||M.id===J.id||!a)return;const ne=l.findIndex(he=>he.id===M.id),re=l.findIndex(he=>he.id===J.id);if(ne===-1||re===-1)return;const ae=ne<re?re:re-1;a(M.id,ae)},F=e?t.sections.find(B=>B.id===e.id):void 0,U=Q?t.sections.find(B=>B.id===Q.id):void 0,E=Q?O[Q.type]:void 0,A=l.length>0&&(N||!e),R=S?S.charAt(0).toUpperCase()+S.slice(1):"Select page",q=T.useMemo(()=>{const B=[];let M=null;for(const J of l){const ne=J.type.toUpperCase(),re=M!==null&&(M==="HEADER"&&ne!=="HEADER"||M!=="HEADER"&&M!=="FOOTER"&&ne==="FOOTER");B.push({layer:J,showSeparatorAbove:re}),M=ne}return B},[l]);return p.jsx(Hg,{children:p.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:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("h2",{className:"text-sm font-bold text-white",children:"Inspector"}),p.jsx("p",{className:"text-[10px] tracking-[0.06em] text-zinc-600 mt-0.5",children:e?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-primary font-bold",children:e.type}),p.jsx("span",{className:"text-zinc-700 mx-1.5",children:"|"}),p.jsx("span",{className:"uppercase",children:e.scope})]}):p.jsxs("span",{className:"text-zinc-600",children:[R," · ",l.length," sections"]})})]}),p.jsx(Be,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":"Close Inspector",children:p.jsx(Mt,{size:14})})]}),k.length>0&&C&&p.jsx(s0,{pageSlugs:k,currentSlug:S,onPageChange:C,sectionCount:l.length,currentPageLabel:R}),l.length>0&&p.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-t border-zinc-800/50",children:[p.jsxs("button",{type:"button",onClick:ie,className:"flex items-center gap-2 flex-1 cursor-pointer min-w-0 text-left","aria-expanded":A,"aria-label":A?"Collapse Page Layers":"Expand Page Layers",children:[p.jsx(to,{size:14,className:"text-zinc-500 shrink-0"}),p.jsx("span",{className:"text-[11px] font-semibold tracking-[0.04em] text-zinc-400",children:"Page Layers"}),p.jsxs("span",{className:"text-[10px] text-zinc-600",children:["(",l.length,")"]}),p.jsx(eo,{size:13,className:pe("ml-auto text-zinc-600 transition-transform duration-200 shrink-0",!N&&"rotate-180")})]}),m!=null&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsx(Be,{variant:"ghost",size:"icon-sm",className:"text-zinc-500 hover:text-primary",onClick:m,children:p.jsx(ro,{size:14})})}),p.jsx(rr,{children:"Add section"})]})]}),p.jsxs(bc,{className:"flex-1 min-h-0 flex flex-col",children:[p.jsx("div",{ref:H,className:"flex flex-col min-h-0",children:A&&p.jsxs("div",{className:"py-1",children:[p.jsxs(af,{sensors:Y,collisionDetection:fu,modifiers:[Cf],onDragStart:we,onDragEnd:g,accessibility:{announcements:{onDragStart:()=>"Sezione presa in carico. Usa i tasti freccia per spostare, Spazio per rilasciare.",onDragOver:({over:B})=>B?`Posizione ${le.indexOf(String(B.id))+1} di ${le.length}.`:void 0,onDragEnd:({over:B})=>B?"Sezione rilasciata in nuova posizione.":"Riposizionamento annullato.",onDragCancel:()=>"Riposizionamento annullato."}},children:[p.jsx(Tf,{items:le,strategy:zf,children:p.jsx("div",{className:"px-2 space-y-0.5",children:q.map(({layer:B,showSeparatorAbove:M})=>p.jsxs(T.Fragment,{children:[M&&p.jsx("div",{className:"mx-3 border-t border-zinc-800/60 my-1"}),B.scope==="local"&&fe?p.jsx(_0,{layer:B,opts:{isSelected:(e==null?void 0:e.id)===B.id,isActive:c===B.id,isDragging:!1,canReorder:!0,canDelete:!!f,deleteConfirm:D===B.id,onSelect:()=>ee(B.id),onDelete:()=>oe(B.id),onOpenSettings:J=>se(B.id,J)}}):p.jsx("div",{children:p.jsx(ui,{layer:B,opts:{isSelected:(e==null?void 0:e.id)===B.id,isActive:c===B.id,isDragging:!1,canDelete:B.scope==="local"&&!!f,deleteConfirm:D===B.id,onSelect:()=>ee(B.id),onDelete:()=>oe(B.id),onOpenSettings:J=>se(B.id,J)}})})]},B.id))})}),p.jsx(_f,{dropAnimation:{duration:200,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:G?(()=>{const B=l.find(M=>M.id===G);return B?p.jsx("div",{className:"px-2 w-full max-w-[var(--inspector-width,280px)]",children:p.jsx(ui,{layer:B,opts:{isSelected:!1,isActive:!1,isDragging:!0,canDelete:!1,deleteConfirm:!1,onSelect:()=>{},onDelete:()=>{},onOpenSettings:()=>{}},dragHandleProps:{"aria-hidden":!0}})}):null})():null})]}),D&&p.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 mx-2 rounded-md bg-amber-500/10 border border-amber-500/30",children:[p.jsx(Td,{size:12,className:"text-amber-500 shrink-0"}),p.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]})}),K&&F&&(()=>{const B=F.data||{};let M;if(I&&I.length>0){let J=B;for(const ae of I){const he=J==null?void 0:J[ae.fieldKey];ae.itemId!=null&&Array.isArray(he)?J=he.find(ve=>String(ve==null?void 0:ve.id)===String(ae.itemId))??null:J=he}const ne=J||{},re=K.fieldKey;M=(typeof ne.name=="string"?ne.name:null)??(typeof ne.title=="string"?ne.title:null)??(typeof ne.label=="string"?ne.label:null)??re.charAt(0).toUpperCase()+re.slice(1).replace(/([A-Z])/g," $1").trim()}else{const J=K.fieldKey;if(K.itemId!=null){const ae=(Array.isArray(B[J])?B[J]:[]).find(he=>String(he==null?void 0:he.id)===String(K.itemId))||{};M=(typeof ae.name=="string"?ae.name:null)??(typeof ae.title=="string"?ae.title:null)??(typeof ae.label=="string"?ae.label:null)??J}else M=J.charAt(0).toUpperCase()+J.slice(1).replace(/([A-Z])/g," $1").trim()}return p.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[p.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),p.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:M})]})})(),p.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&P(!1),children:e?j?p.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[p.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):E?(()=>{const M=Object.keys(E.shape).filter(he=>!vc.has(he)),J=(U==null?void 0:U.data)||{};if(M.length===0)return p.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const ne=I==null?void 0:I[0],re=(ne==null?void 0:ne.itemId)!=null?{[ne.fieldKey]:ne.itemId}:(K==null?void 0:K.itemId)!=null?{[K.fieldKey]:K.itemId}:void 0,ae=(ne==null?void 0:ne.fieldKey)??(K==null?void 0:K.fieldKey)??null;return p.jsx(Ar,{schema:E,data:J,onChange:he=>n(he),keys:M,expandedItemPath:I,expandedItemIdByField:re,focusedFieldKey:ae,onSidebarExpandedItemChange:y})})():p.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 ",(Q==null?void 0:Q.type)??e.type]}):p.jsx("p",{className:"text-xs text-zinc-600 text-center py-10",children:"Select a layer above or on the stage to edit."})})]}),p.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center gap-3 opacity-100 flex-wrap shrink-0",children:(w!=null||h!=null||v!=null)&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:pe("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",u?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),p.jsx("span",{className:pe("text-xs font-medium transition-colors duration-300 shrink-0",b?"text-emerald-400":u?"text-amber-500":"text-zinc-500"),children:b?"Salvato":u?"Unsaved Changes":"All Changes Saved"}),w!=null&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsxs(Be,{variant:"outline",size:"sm",className:"gap-1.5",onClick:w,children:[p.jsx(Ki,{size:12}),p.jsx("span",{children:"Bake HTML"})]})}),p.jsx(rr,{children:"Generate static HTML output"})]}),h!=null&&p.jsxs(jr,{children:[p.jsx(Tr,{asChild:!0,children:p.jsxs(Be,{size:"sm",disabled:!u,className:"gap-1.5",onClick:B=>{B.preventDefault(),B.stopPropagation(),h()},children:[p.jsx(Md,{size:12}),p.jsx("span",{children:"Save"})]})}),p.jsx(rr,{children:"Save (export JSON)"})]}),v!=null&&x&&p.jsx("button",{type:"button",onClick:v,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-400 hover:bg-zinc-800 hover:border-zinc-600 hover:text-zinc-300",title:"Ripristina la pagina dal file (elimina le modifiche in memoria)",children:p.jsx("span",{children:"Ripristina da file"})})]})}),$!=null&&r.length>0&&o!=null&&(()=>{const B=r.find(ve=>ve.id===$),M=l.find(ve=>ve.id===$);if(!B)return null;const J=(M==null?void 0:M.scope)==="global"?"global":"local",ne=B.type,re=O[ne],he=(re?Object.keys(re.shape):[]).filter(ve=>vc.has(ve)),me=B.data??{};return he.length===0?p.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:()=>X(null),children:p.jsxs("div",{ref:V,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:ve=>ve.stopPropagation(),children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[p.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",ne]}),p.jsx("button",{type:"button",onClick:()=>X(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:p.jsx(Mt,{size:18})})]}),p.jsx("div",{className:"p-4",children:p.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):p.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:ve=>ve.target===ve.currentTarget&&X(null),children:p.jsxs("div",{ref:V,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:ve=>ve.stopPropagation(),children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[p.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",ne]}),p.jsx("button",{type:"button",onClick:()=>X(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:p.jsx(Mt,{size:18})})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:p.jsx(Ar,{schema:re,data:me,onChange:ve=>{const it={...B.data,...ve};o($,J,ne,it)},keys:he})})]})})})()]})})},xc=({draft:e,globalDraft:t,themeConfig:r,slug:n,selectedId:o,scrollToSectionId:i,onScrollRequested:s})=>{const a=T.useRef(null),l=T.useCallback(()=>{var c;(c=a.current)!=null&&c.contentWindow&&a.current.contentWindow.postMessage({type:Ce.UPDATE_DRAFTS,draft:e,globalDraft:t,themeConfig:r},"*")},[e,t,r]);return T.useEffect(()=>{l()},[l]),T.useEffect(()=>{const c=d=>{d.data.type===Ce.STAGE_READY&&l()};return window.addEventListener("message",c),()=>window.removeEventListener("message",c)},[l]),T.useEffect(()=>{var c;(c=a.current)!=null&&c.contentWindow&&a.current.contentWindow.postMessage({type:Ce.SYNC_SELECTION,selectedId:o},"*")},[o]),T.useEffect(()=>{var c;!i||!((c=a.current)!=null&&c.contentWindow)||(a.current.contentWindow.postMessage({type:Ce.REQUEST_SCROLL_TO_SECTION,sectionId:i},"*"),s==null||s())},[i,s]),p.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:p.jsx("iframe",{ref:a,src:`/admin/preview/${n}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},Hn={setTheme:e=>{const t=document.documentElement,{tokens:r}=e,n={"--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(n).forEach(([o,i])=>{t.style.setProperty(o,i)})}},yc=()=>{var u;const[e,t]=T.useState(null),[r,n]=T.useState(null),[o,i]=T.useState(null),[s,a]=T.useState(null),[l,c]=T.useState(!1);if(T.useEffect(()=>{const w=h=>{h.data.type===Ce.UPDATE_DRAFTS&&(t(h.data.draft),n(h.data.globalDraft),h.data.themeConfig&&Hn.setTheme(h.data.themeConfig)),h.data.type===Ce.SYNC_SELECTION&&i(h.data.selectedId),h.data.type===Ce.REQUEST_SCROLL_TO_SECTION&&a(h.data.sectionId??null),h.data.type===Ce.REQUEST_CLEAN_HTML&&(c(!0),setTimeout(()=>{const b=document.documentElement.outerHTML;window.parent.postMessage({type:Ce.SEND_CLEAN_HTML,html:b},"*"),c(!1)},50))};return window.addEventListener("message",w),window.parent.postMessage({type:Ce.STAGE_READY},"*"),()=>window.removeEventListener("message",w)},[]),T.useEffect(()=>{const w=h=>{var z,L,y,$,X,H,V,Y;const b=h.target,v=h.clientX,x=h.clientY;let k=null,S=b;for(;S&&S!==document.body;){const Q=(z=S.getAttribute)==null?void 0:z.call(S,"data-section-id"),j=(L=S.getAttribute)==null?void 0:L.call(S,"data-section-type"),I=(y=S.getAttribute)==null?void 0:y.call(S,"data-section-scope");if(Q&&j&&I){k=S;break}S=S.parentElement}if(!k)return;h.preventDefault(),h.stopPropagation();const C=k.getAttribute("data-section-id"),O=k.getAttribute("data-section-type"),N=k.getAttribute("data-section-scope");if(!C||!O||!N)return;const P={id:C,type:O,scope:N};if(b===k){window.parent.postMessage({type:Ce.SECTION_SELECT,section:P},"*");return}const D=document.elementFromPoint(v,x)??b;if(!D||!k.contains(D)){window.parent.postMessage({type:Ce.SECTION_SELECT,section:P},"*");return}if(D===k){window.parent.postMessage({type:Ce.SECTION_SELECT,section:P},"*");return}const W=[];for(S=D;S&&S!==k;){const Q=($=S.getAttribute)==null?void 0:$.call(S,"data-jp-item-id"),j=(X=S.getAttribute)==null?void 0:X.call(S,"data-jp-item-field");Q&&j&&W.push({fieldKey:j||"items",itemId:Q}),S=S.parentElement}if(W.reverse(),W.length===0)for(S=D;S&&S!==k;){const Q=(H=S.getAttribute)==null?void 0:H.call(S,"data-jp-field");if(Q){W.push({fieldKey:Q});break}S=S.parentElement}if(W.length===0&&D){let Q=null;const j=I=>{var Z,te;const K=I.getBoundingClientRect();if(K.left<=v&&v<=K.right&&K.top<=x&&x<=K.bottom){for(let ue=0;ue<I.children.length;ue++)j(I.children[ue]);((Z=I.getAttribute)!=null&&Z.call(I,"data-jp-item-id")||(te=I.getAttribute)!=null&&te.call(I,"data-jp-field"))&&(Q=I)}};if(j(D),Q){const I=Q,K=(V=I.getAttribute)==null?void 0:V.call(I,"data-jp-item-id"),Z=(Y=I.getAttribute)==null?void 0:Y.call(I,"data-jp-field");K&&Z?W.push({fieldKey:Z||"items",itemId:K}):Z&&W.push({fieldKey:Z})}}const G={type:Ce.SECTION_SELECT,section:P};if(W.length>0){G.itemPath=W;const Q=W[0];Q.itemId!=null?(G.itemField=Q.fieldKey,G.itemId=Q.itemId):G.itemField=Q.fieldKey}window.parent.postMessage(G,"*")};return document.addEventListener("click",w,!0),()=>document.removeEventListener("click",w,!0)},[]),T.useEffect(()=>{if(!s)return;const w=setTimeout(()=>a(null),600);return()=>clearTimeout(w)},[s]),!e||!r)return p.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 d=(u=r.header)==null?void 0:u.data,f={main:(d==null?void 0:d.links)??[]},m=w=>{window.parent.postMessage({type:Ce.ACTIVE_SECTION_CHANGED,activeSectionId:w},"*")};return p.jsx($r,{mode:l?"visitor":"studio",children:p.jsx("div",{className:l?"":"jp-ice-active",children:p.jsx(no,{pageConfig:e,siteConfig:r,menuConfig:f,selectedId:l?null:o,scrollToSectionId:s,onActiveSectionChange:m})})})};function C0(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const kc=({open:e,onClose:t,sectionTypes:r,sectionTypeLabels:n,onSelect:o})=>{if(T.useEffect(()=>{if(!e)return;const s=a=>{a.key==="Escape"&&t()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e,t]),!e)return null;const i=s=>(n==null?void 0:n[s])??C0(s);return p.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:[p.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:t,"aria-hidden":"true"}),p.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:[p.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:p.jsx(to,{size:18})}),p.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),p.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:p.jsx(Mt,{size:18})})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?p.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):p.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(s=>p.jsx("li",{role:"option",children:p.jsxs("button",{type:"button",onClick:()=>{o(s),t()},className:pe("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:[p.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:s}),p.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(s)})]})},s))})}),p.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:p.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},Sc=()=>p.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:[p.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),p.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),p.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"})]}),E0='/*! 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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-900:oklch(39.6% .141 25.723);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-900:oklch(37.9% .146 265.522);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-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-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-primary:var(--primary);--color-primary-foreground:var(--primary-foreground);--color-destructive:var(--destructive);--color-ring:var(--ring)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-3{left:calc(var(--spacing)*3)}.z-0{z-index:0}.z-10{z-index:10}.z-50,.z-\\[50\\]{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[70\\]{z-index:70}.z-\\[100\\]{z-index:100}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing)*4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-1\\.5{margin-inline:calc(var(--spacing)*1.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-3{margin-inline:calc(var(--spacing)*3)}.my-1{margin-block:calc(var(--spacing)*1)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.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)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-20{height:calc(var(--spacing)*20)}.h-40{height:calc(var(--spacing)*40)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\\[45vh\\]{max-height:45vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[320px\\]{max-height:320px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-\\[18px\\]{min-height:18px}.min-h-\\[80px\\]{min-height:80px}.min-h-\\[240px\\]{min-height:240px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-3\\/4{width:75%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-\\[var\\(--radix-popover-trigger-width\\)\\]{width:var(--radix-popover-trigger-width)}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[var\\(--inspector-width\\,280px\\)\\]{max-width:var(--inspector-width,280px)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[18px\\]{min-width:18px}.min-w-\\[var\\(--radix-popover-trigger-width\\)\\]{min-width:var(--radix-popover-trigger-width)}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3{--tw-translate-x:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-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}.touch-none{touch-action:none}.resize-none{resize:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[inherit\\]{border-radius:inherit}.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-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-emerald-500\\/60{border-color:#00bb7f99}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\\/60{border-color:color-mix(in oklab,var(--color-emerald-500)60%,transparent)}}.border-primary{border-color:var(--color-primary)}.border-red-500\\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-900\\/30{border-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.border-red-900\\/30{border-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\\/80{border-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/80{border-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-zinc-800\\/50{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/50{border-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.border-zinc-800\\/60{border-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/60{border-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.border-l-transparent{border-left-color:#0000}.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{background-color:var(--color-black)}.bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/15{background-color:color-mix(in oklab,var(--color-blue-500)15%,transparent)}}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\\/\\[0\\.04\\]{background-color:#3080ff0a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/\\[0\\.04\\]{background-color:color-mix(in oklab,var(--color-blue-500)4%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\\/10{background-color:#155dfc1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\\/10{background-color:color-mix(in oklab,var(--color-blue-600)10%,transparent)}}.bg-destructive\\/15{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\\/15{background-color:color-mix(in oklab,var(--color-destructive)15%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-primary,.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-primary\\/\\[0\\.08\\]{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/\\[0\\.08\\]{background-color:color-mix(in oklab,var(--color-primary)8%,transparent)}}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-900\\/10{background-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.bg-red-900\\/10{background-color:color-mix(in oklab,var(--color-red-900)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\\/15{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/\\[0\\.01\\]{background-color:#ffffff03}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.01\\]{background-color:color-mix(in oklab,var(--color-white)1%,transparent)}}.bg-white\\/\\[0\\.02\\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-700\\/80{background-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\\/80{background-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\\/30{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/30{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.bg-zinc-800\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-800\\/60{background-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/60{background-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.bg-zinc-800\\/80{background-color:#27272acc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/80{background-color:color-mix(in oklab,var(--color-zinc-800)80%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/20{background-color:#18181b33}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/20{background-color:color-mix(in oklab,var(--color-zinc-900)20%,transparent)}}.bg-zinc-900\\/40{background-color:#18181b66}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/40{background-color:color-mix(in oklab,var(--color-zinc-900)40%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab,var(--color-zinc-900)60%,transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/80{background-color:#09090bcc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/80{background-color:color-mix(in oklab,var(--color-zinc-950)80%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab,red,red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab,var(--color-black)70%,transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.p-px{padding:1px}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-4{padding-right:calc(var(--spacing)*4)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-8{padding-left:calc(var(--spacing)*8)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-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-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\\[0\\.04em\\]{--tw-tracking:.04em;letter-spacing:.04em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.06em\\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.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-destructive{color:var(--color-destructive)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-600\\/50{color:#52525c80}@supports (color:color-mix(in lab,red,red)){.text-zinc-600\\/50{color:color-mix(in oklab,var(--color-zinc-600)50%,transparent)}}.text-zinc-700{color:var(--color-zinc-700)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_8px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black\\/30{--tw-shadow-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.shadow-black\\/30{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)30%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-blue-900\\/20{--tw-shadow-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.shadow-blue-900\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-900)20%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-primary\\/20{--tw-shadow-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.shadow-primary\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-primary)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-blue-500\\/40{--tw-ring-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.ring-blue-500\\/40{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.ring-zinc-800{--tw-ring-color:var(--color-zinc-800)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-zinc-900{--tw-ring-offset-color:var(--color-zinc-900)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.brightness-\\[0\\.6\\]{--tw-brightness:brightness(.6);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.brightness-\\[0\\.85\\]{--tw-brightness:brightness(.85);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-\\[border-color\\,opacity\\]{transition-property:border-color,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:border-dashed:is(:where(.group):hover *){--tw-border-style:dashed;border-style:dashed}.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:brightness-100:is(:where(.group):hover *){--tw-brightness:brightness(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-500\\/30:hover{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/30:hover{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\\:border-blue-500\\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/40:hover{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.hover\\:border-zinc-600:hover{border-color:var(--color-zinc-600)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:#3080ff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-blue-500)3%,transparent)}}.hover\\:bg-blue-600\\/20:hover{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/20:hover{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.hover\\:bg-destructive\\/25:hover{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/25:hover{background-color:color-mix(in oklab,var(--color-destructive)25%,transparent)}}.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-primary\\/90:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary)90%,transparent)}}.hover\\:bg-red-500\\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab,var(--color-red-500)25%,transparent)}}.hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-zinc-600:hover{background-color:var(--color-zinc-600)}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.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\\:bg-zinc-900:hover{background-color:var(--color-zinc-900)}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-destructive:hover{color:var(--color-destructive)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-red-200:hover{color:var(--color-red-200)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:opacity-90:hover{opacity:.9}.hover\\:ring-zinc-600:hover{--tw-ring-color:var(--color-zinc-600)}}.focus\\:bg-zinc-800:focus{background-color:var(--color-zinc-800)}.focus\\:text-white:focus{color:var(--color-white)}.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\\:border-zinc-600:focus-visible{border-color:var(--color-zinc-600)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:#3080ffcc}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)80%,transparent)}}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:var(--color-ring)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-zinc-900:focus-visible{--tw-ring-offset-color:var(--color-zinc-900)}.focus-visible\\:ring-offset-zinc-950:focus-visible{--tw-ring-offset-color:var(--color-zinc-950)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-primary\\/60:active{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.active\\:bg-primary\\/60:active{background-color:color-mix(in oklab,var(--color-primary)60%,transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=open\\]\\:border-zinc-800[data-state=open]{border-color:var(--color-zinc-800)}.data-\\[state\\=open\\]\\:bg-zinc-950[data-state=open]{background-color:var(--color-zinc-950)}.data-\\[state\\=open\\]\\:text-zinc-100[data-state=open]{color:var(--color-zinc-100)}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&\\>span\\]\\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\\[\\&\\>span\\]\\:flex>span{display:flex}.\\[\\&\\>span\\]\\:items-center>span{align-items:center}.\\[\\&\\>span\\]\\:gap-2>span{gap:calc(var(--spacing)*2)}}: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-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';class A0 extends T.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("[JsonPages Engine]",t,r)}render(){return this.state.hasError&&this.state.error?p.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:[p.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),p.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}}const _c=({pageRegistry:e,siteConfig:t,menuConfig:r,tenantCss:n,adminCss:o,NotFoundComponent:i})=>{const{slug:s="home"}=Ke.useParams(),[a,l]=T.useState(null);T.useEffect(()=>{const m=document.getElementById("jp-baked-state");if(m!=null&&m.textContent)try{const u=JSON.parse(m.textContent);l(u),Hn.setTheme(u.theme)}catch(u){console.error("Failed to parse baked state",u)}},[]);const c=a?a.page:e[s],d=a?a.site:t,f=a?a.menu:r;return c?p.jsx(Kr,{mode:"tenant",tenantCss:n,adminCss:o,children:p.jsx($r,{mode:"visitor",children:p.jsx(no,{pageConfig:c,siteConfig:d,menuConfig:f})})}):p.jsx(i,{})},Cc=({pageRegistry:e,siteConfig:t,menuConfig:r,themeConfig:n,tenantCss:o,adminCss:i,addSectionConfig:s,addableSectionTypes:a,saveToFile:l,exportHTML:c})=>{const{slug:d="home"}=Ke.useParams(),f=Ke.useNavigate(),m=Object.keys(e).sort((g,F)=>g==="home"?-1:F==="home"?1:g.localeCompare(F)),[u,w]=T.useState(null),[h,b]=T.useState(!1),[v,x]=T.useState(!1),[k,S]=T.useState(()=>{var g;try{const F=JSON.parse(JSON.stringify(t??{}));F.identity||(F.identity={title:"Site"}),F.pages||(F.pages=[]);const U=(g=F.header)==null?void 0:g.data;return U&&(r!=null&&r.main)&&(U.links=JSON.parse(JSON.stringify(r.main))),F}catch{return{identity:{title:"Site"},pages:[]}}}),[C,O]=T.useState(null),[N,P]=T.useState(null),[D,W]=T.useState(null),[G,z]=T.useState(null),[L,y]=T.useState(!1),[$,X]=T.useState(400),H=360,V=920,Y=T.useCallback(g=>{g.preventDefault();const F=g.currentTarget;F.setPointerCapture(g.pointerId);const U=g.clientX,E=$,A=q=>{const B=U-q.clientX,M=Math.min(V,Math.max(H,E+B));X(M)},R=()=>{F.releasePointerCapture(g.pointerId),F.removeEventListener("pointermove",A),F.removeEventListener("pointerup",R),F.removeEventListener("pointercancel",R),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",F.addEventListener("pointermove",A),F.addEventListener("pointerup",R),F.addEventListener("pointercancel",R)},[$]),Q=u?[...k.header?[{id:k.header.id,type:k.header.type,scope:"global",title:"Header"}]:[],...u.sections.map(g=>{var F,U;return{id:g.id,type:g.type,scope:"local",title:((F=g.data)==null?void 0:F.title)??((U=g.data)==null?void 0:U.titleHighlight)}}),...k.footer?[{id:k.footer.id,type:k.footer.type,scope:"global",title:"Footer"}]:[]]:[];T.useEffect(()=>{const g=e[d];g&&w(JSON.parse(JSON.stringify(g))),O(null),P(null),b(!1)},[d,e]);const j=T.useCallback(()=>{const g=e[d];g&&w(JSON.parse(JSON.stringify(g))),O(null),P(null),b(!1)},[d,e]),I=T.useCallback((g,F,U)=>{const E=[...U.sections],A=E.findIndex(B=>B.id===g);if(A===-1||F<0||F>=E.length)return;const[R]=E.splice(A,1),q=F>A?F-1:F;E.splice(Math.min(q,E.length),0,R),w({...U,sections:E}),b(!0)},[]),K=T.useCallback(g=>{var F;if(g.origin===window.location.origin){if(g.data.type===Ce.SECTION_SELECT){O(g.data.section);const U=g.data.itemPath;if(Array.isArray(U)&&U.length>0)P(U.map(E=>({fieldKey:E.fieldKey,...E.itemId!=null?{itemId:String(E.itemId)}:{}})));else{const E=g.data.itemField,A=g.data.itemId;P(typeof E=="string"?[{fieldKey:E,...A!=null?{itemId:String(A)}:{}}]:null)}}if(g.data.type===Ce.ACTIVE_SECTION_CHANGED&&W(g.data.activeSectionId??null),g.data.type==="jsonpages:section-reorder"&&u){const{sectionId:U,newIndex:E}=g.data;typeof U=="string"&&typeof E=="number"&&E>=0&&I(U,E,u)}if(g.data.type===Ce.SEND_CLEAN_HTML){if(!u)return;const U=(F=k.header)==null?void 0:F.data,E={page:u,site:k,menu:{main:(U==null?void 0:U.links)??[]},theme:n};c(E,d,g.data.html),b(!1)}}},[u,k,d,n,I,c]);T.useEffect(()=>(window.addEventListener("message",K),()=>window.removeEventListener("message",K)),[K]);const Z=T.useCallback(g=>{const F=Q.find(U=>U.id===g);F&&O({id:F.id,type:F.type,scope:F.scope}),P(null),z(g)},[Q]),te=T.useCallback(()=>{z(null)},[]),ue=T.useCallback(g=>{w(F=>F&&{...F,sections:F.sections.filter(U=>U.id!==g)}),b(!0),O(F=>(F==null?void 0:F.id)===g?null:F)},[]),ee=g=>{if(!(!C||!u))if(b(!0),C.scope==="global")C.type==="header"&&k.header!=null?S({...k,header:{...k.header,data:g}}):C.type==="footer"&&k.footer!=null&&S({...k,footer:{...k.footer,data:g}});else{const F=u.sections.map(U=>U.id===C.id?{...U,data:g}:U);w({...u,sections:F})}},ie=T.useCallback((g,F,U,E)=>{var A,R;if(b(!0),F==="global")((A=k.header)==null?void 0:A.id)===g?S({...k,header:{...k.header,data:E}}):((R=k.footer)==null?void 0:R.id)===g&&S({...k,footer:{...k.footer,data:E}});else if(u){const q=u.sections.map(B=>B.id===g?{...B,data:E}:B);w({...u,sections:q})}},[u,k]),se=()=>{var F;const g=document.querySelector("iframe");(F=g==null?void 0:g.contentWindow)==null||F.postMessage({type:Ce.REQUEST_CLEAN_HTML},"*")},oe=()=>{var U;if(!u||!l)return;const g=(U=k.header)==null?void 0:U.data,F={page:u,site:k,menu:{main:(g==null?void 0:g.links)??[]},theme:n};l(F,d).then(()=>{b(!1),x(!0)}).catch(E=>{console.error("[JsonPages] saveToFile failed",E);const A=E instanceof Error?E.message:String(E);alert(`Save to file failed: ${A}`)})},le=g=>{var E;if(!u)return;const F=((E=s==null?void 0:s.getDefaultSectionData)==null?void 0:E.call(s,g))??{},U={id:crypto.randomUUID(),type:g,data:F,settings:void 0};w({...u,sections:[...u.sections,U]}),b(!0),O({id:U.id,type:g,scope:"local"})};if(!u)return p.jsx("div",{children:"Loading Studio..."});const fe=(C==null?void 0:C.scope)==="global"?{sections:[k.header,k.footer].filter(g=>g!=null)}:u,we=[...k.header?[k.header]:[],...u.sections,...k.footer?[k.footer]:[]];return p.jsx(Kr,{mode:"admin",tenantCss:o,adminCss:i,children:p.jsx($r,{mode:"studio",children:p.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[p.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[p.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:p.jsx(xc,{draft:u,globalDraft:k,themeConfig:n,slug:d,selectedId:C==null?void 0:C.id,scrollToSectionId:G,onScrollRequested:te})}),p.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:$,minWidth:H,maxWidth:V},children:[p.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:Y}),p.jsx(wc,{selectedSection:C,pageData:fe,allSectionsData:we,onUpdate:ee,onUpdateSection:ie,onClose:()=>{O(null),P(null)},expandedItemPath:N,onReorderSection:u?(g,F)=>I(g,F,u):void 0,allLayers:Q,activeSectionId:D,onRequestScrollToSection:Z,onDeleteSection:u?ue:void 0,onAddSection:a.length>0?()=>y(!0):void 0,hasChanges:h,onExportHTML:se,onSaveToFile:l!=null?oe:void 0,saveSuccessFeedback:v,onResetToFile:j,pageSlugs:m,currentSlug:d,onPageChange:m.length>1?g=>f(`/admin/${g}`):void 0})]})]}),p.jsx(kc,{open:L,onClose:()=>y(!1),sectionTypes:a,sectionTypeLabels:s==null?void 0:s.sectionTypeLabels,onSelect:le})]})})})},N0=({tenantCss:e,adminCss:t})=>p.jsx(Kr,{mode:"tenant",tenantCss:e,adminCss:t,children:p.jsx(yc,{})});function z0({config:e}){var b,v,x;const{registry:t={},schemas:r={},pages:n={},siteConfig:o,themeConfig:i,menuConfig:s,themeCss:a,addSection:l,NotFoundComponent:c=Sc}=e,d=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(k=>k!=="header"&&k!=="footer"),f={exportJSON:((b=e.persistence)==null?void 0:b.exportJSON)??wi,exportHTML:((v=e.persistence)==null?void 0:v.exportHTML)??xi,saveToFile:(x=e.persistence)==null?void 0:x.saveToFile},m=typeof(a==null?void 0:a.tenant)=="string"?a.tenant:"",u=typeof(a==null?void 0:a.admin)=="string"?a.admin:E0,[w,h]=T.useState(!1);return T.useEffect(()=>{try{i!=null&&i.tokens&&Hn.setTheme(i)}catch(k){console.warn("[JsonPages] setTheme failed",k)}h(!0)},[i]),w?p.jsx(A0,{children:p.jsx($i,{config:{registry:t,schemas:r,tenantId:e.tenantId??"default",assets:e.assets},children:p.jsx(Ke.BrowserRouter,{children:p.jsxs(Ke.Routes,{children:[p.jsx(Ke.Route,{path:"/",element:p.jsx(_c,{pageRegistry:n,siteConfig:o,menuConfig:s,tenantCss:m,adminCss:u,NotFoundComponent:c})}),p.jsx(Ke.Route,{path:"/:slug",element:p.jsx(_c,{pageRegistry:n,siteConfig:o,menuConfig:s,tenantCss:m,adminCss:u,NotFoundComponent:c})}),p.jsx(Ke.Route,{path:"/admin",element:p.jsx(Cc,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:i,tenantCss:m,adminCss:u,addSectionConfig:l,addableSectionTypes:d,saveToFile:f.saveToFile,exportHTML:f.exportHTML})}),p.jsx(Ke.Route,{path:"/admin/:slug",element:p.jsx(Cc,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:i,tenantCss:m,adminCss:u,addSectionConfig:l,addableSectionTypes:d,saveToFile:f.saveToFile,exportHTML:f.exportHTML})}),p.jsx(Ke.Route,{path:"/admin/preview/:slug",element:p.jsx(N0,{tenantCss:m,adminCss:u})}),p.jsx(Ke.Route,{path:"*",element:p.jsx(c,{})})]})})})}):p.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 j0=({hasChanges:e,onExportJSON:t,onExportHTML:r,onAddSection:n})=>p.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:[p.jsx("div",{className:"flex items-center gap-3",children:n!=null&&p.jsxs("button",{type:"button",onClick:n,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:[p.jsx(Ud,{size:14}),p.jsx("span",{children:"Add section"})]})}),p.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:p.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium transition-all border bg-zinc-900 border-zinc-700 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[p.jsx(Ki,{size:14}),p.jsx("span",{children:"Bake HTML"})]}),p.jsxs("button",{onClick:t,disabled:!e,className:pe("flex items-center gap-2 px-4 py-1.5 rounded-md text-xs font-bold transition-all shadow-lg",e?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[p.jsx(Od,{size:14}),p.jsx("span",{children:"Export JSON"})]})]})]});ye.AddSectionLibrary=kc,ye.AdminSidebar=wc,ye.ConfigProvider=$i,ye.ControlBar=j0,ye.DefaultNotFound=Sc,ye.FormFactory=Ar,ye.InputWidgets=Er,ye.JsonPagesEngine=z0,ye.PageRenderer=no,ye.PreviewEntry=yc,ye.STUDIO_EVENTS=Ce,ye.SectionRenderer=ur,ye.StudioProvider=$r,ye.StudioStage=xc,ye.ThemeLoader=Kr,ye.cn=pe,ye.exportBakedHTML=xi,ye.exportProjectJSON=wi,ye.resolveAssetUrl=Ol,ye.themeManager=Hn,ye.useConfig=dr,ye.useStudio=Vi,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})}));
|
|
252
|
+
`)},Nm=0,Qt=[];function zm(e){var t=_.useRef([]),r=_.useRef([0,0]),n=_.useRef(),o=_.useState(Nm++)[0],i=_.useState(Wa)[0],s=_.useRef(e);_.useEffect(function(){s.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Xp([e.lockRef.current],(e.shards||[]).map(Ga),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=_.useCallback(function(h,b){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!s.current.allowPinchZoom;var v=Tn(h),w=r.current,k="deltaX"in h?h.deltaX:w[0]-v[0],S="deltaY"in h?h.deltaY:w[1]-v[1],C,O=h.target,N=Math.abs(k)>Math.abs(S)?"h":"v";if("touches"in h&&N==="h"&&O.type==="range")return!1;var I=window.getSelection(),D=I&&I.anchorNode,L=D?D===O||D.contains(O):!1;if(L)return!1;var Z=Va(N,O);if(!Z)return!0;if(Z?C=N:(C=N==="v"?"h":"v",Z=Va(N,O)),!Z)return!1;if(!n.current&&"changedTouches"in h&&(k||S)&&(n.current=C),!C)return!0;var j=n.current||C;return Cm(j,b,h,j==="h"?k:S)},[]),l=_.useCallback(function(h){var b=h;if(!(!Qt.length||Qt[Qt.length-1]!==i)){var v="deltaY"in b?Za(b):Tn(b),w=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&Em(C.delta,v)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var k=(s.current.shards||[]).map(Ga).filter(Boolean).filter(function(C){return C.contains(b.target)}),S=k.length>0?a(b,k[0]):!s.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),c=_.useCallback(function(h,b,v,w){var k={name:h,delta:b,target:v,should:w,shadowParent:jm(v)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(S){return S!==k})},1)},[]),d=_.useCallback(function(h){r.current=Tn(h),n.current=void 0},[]),f=_.useCallback(function(h){c(h.type,Za(h),h.target,a(h,e.lockRef.current))},[]),m=_.useCallback(function(h){c(h.type,Tn(h),h.target,a(h,e.lockRef.current))},[]);_.useEffect(function(){return Qt.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Jt),document.addEventListener("touchmove",l,Jt),document.addEventListener("touchstart",d,Jt),function(){Qt=Qt.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,Jt),document.removeEventListener("touchmove",l,Jt),document.removeEventListener("touchstart",d,Jt)}},[]);var u=e.removeScrollBar,x=e.inert;return _.createElement(_.Fragment,null,x?_.createElement(i,{styles:Am(o)}):null,u?_.createElement(vm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function jm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Tm=im(Ua,zm);var Go=_.forwardRef(function(e,t){return _.createElement(zn,ot({},e,{ref:t,sideCar:Tm}))});Go.classNames=zn.classNames;var Om=[" ","Enter","ArrowUp","ArrowDown"],Pm=[" ","Enter"],Ot="Select",[On,Pn,Im]=Qf(Ot),[er]=$t(Ot,[Im,Gt]),In=Gt(),[Dm,kt]=er(Ot),[Rm,Mm]=er(Ot),Xa=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:m,required:u,form:x}=e,h=In(t),[b,v]=_.useState(null),[w,k]=_.useState(null),[S,C]=_.useState(!1),O=Hs(c),[N,I]=_n({prop:n,defaultProp:o??!1,onChange:i,caller:Ot}),[D,L]=_n({prop:s,defaultProp:a,onChange:l,caller:Ot}),Z=_.useRef(null),j=b?x||!!b.closest("form"):!0,[F,y]=_.useState(new Set),H=Array.from(F).map(Q=>Q.props.value).join(";");return p.jsx(Uo,{...h,children:p.jsxs(Dm,{required:u,scope:t,trigger:b,onTriggerChange:v,valueNode:w,onValueNodeChange:k,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Sr(),value:D,onValueChange:L,open:N,onOpenChange:I,dir:O,triggerPointerDownPosRef:Z,disabled:m,children:[p.jsx(On.Provider,{scope:t,children:p.jsx(Rm,{scope:e.__scopeSelect,onNativeOptionAdd:_.useCallback(Q=>{y($=>new Set($).add(Q))},[]),onNativeOptionRemove:_.useCallback(Q=>{y($=>{const V=new Set($);return V.delete(Q),V})},[]),children:r})}),j?p.jsxs(gl,{"aria-hidden":!0,required:u,tabIndex:-1,name:d,autoComplete:f,value:D,onChange:Q=>L(Q.target.value),disabled:m,form:x,children:[D===void 0?p.jsx("option",{value:""}):null,Array.from(F)]},H):null]})})};Xa.displayName=Ot;var qa="SelectTrigger",Ja=_.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=In(r),s=kt(qa,r),a=s.disabled||n,l=_e(t,s.onTriggerChange),c=Pn(r),d=_.useRef("touch"),[f,m,u]=vl(h=>{const b=c().filter(k=>!k.disabled),v=b.find(k=>k.value===s.value),w=xl(b,h,v);w!==void 0&&s.onValueChange(w.value)}),x=h=>{a||(s.onOpenChange(!0),u()),h&&(s.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return p.jsx(kn,{asChild:!0,...i,children:p.jsx(Se.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":bl(s.value)?"":void 0,...o,ref:l,onClick:be(o.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&x(h)}),onPointerDown:be(o.onPointerDown,h=>{d.current=h.pointerType;const b=h.target;b.hasPointerCapture(h.pointerId)&&b.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(x(h),h.preventDefault())}),onKeyDown:be(o.onKeyDown,h=>{const b=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(b&&h.key===" ")&&Om.includes(h.key)&&(x(),h.preventDefault())})})})});Ja.displayName=qa;var Qa="SelectValue",el=_.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:s="",...a}=e,l=kt(Qa,r),{onValueNodeHasChildrenChange:c}=l,d=i!==void 0,f=_e(t,l.onValueNodeChange);return Ie(()=>{c(d)},[c,d]),p.jsx(Se.span,{...a,ref:f,style:{pointerEvents:"none"},children:bl(l.value)?p.jsx(p.Fragment,{children:s}):i})});el.displayName=Qa;var Lm="SelectIcon",tl=_.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return p.jsx(Se.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});tl.displayName=Lm;var Fm="SelectPortal",rl=e=>p.jsx(Sn,{asChild:!0,...e});rl.displayName=Fm;var Pt="SelectContent",nl=_.forwardRef((e,t)=>{const r=kt(Pt,e.__scopeSelect),[n,o]=_.useState();if(Ie(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?Mr.createPortal(p.jsx(ol,{scope:e.__scopeSelect,children:p.jsx(On.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),i):null}return p.jsx(il,{...e,ref:t})});nl.displayName=Pt;var Qe=10,[ol,St]=er(Pt),Bm="SelectContentImpl",Um=Ht("SelectContent.RemoveScroll"),il=_.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:u,sticky:x,hideWhenDetached:h,avoidCollisions:b,...v}=e,w=kt(Pt,r),[k,S]=_.useState(null),[C,O]=_.useState(null),N=_e(t,ee=>S(ee)),[I,D]=_.useState(null),[L,Z]=_.useState(null),j=Pn(r),[F,y]=_.useState(!1),H=_.useRef(!1);_.useEffect(()=>{if(k)return Ma(k)},[k]),Gs();const Q=_.useCallback(ee=>{const[ie,...se]=j().map(fe=>fe.ref.current),[oe]=se.slice(-1),le=document.activeElement;for(const fe of ee)if(fe===le||(fe==null||fe.scrollIntoView({block:"nearest"}),fe===ie&&C&&(C.scrollTop=0),fe===oe&&C&&(C.scrollTop=C.scrollHeight),fe==null||fe.focus(),document.activeElement!==le))return},[j,C]),$=_.useCallback(()=>Q([I,k]),[Q,I,k]);_.useEffect(()=>{F&&$()},[F,$]);const{onOpenChange:V,triggerPointerDownPosRef:Y}=w;_.useEffect(()=>{if(k){let ee={x:0,y:0};const ie=oe=>{var le,fe;ee={x:Math.abs(Math.round(oe.pageX)-(((le=Y.current)==null?void 0:le.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((fe=Y.current)==null?void 0:fe.y)??0))}},se=oe=>{ee.x<=10&&ee.y<=10?oe.preventDefault():k.contains(oe.target)||V(!1),document.removeEventListener("pointermove",ie),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",se,{capture:!0})}}},[k,V,Y]),_.useEffect(()=>{const ee=()=>V(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[V]);const[J,z]=vl(ee=>{const ie=j().filter(le=>!le.disabled),se=ie.find(le=>le.ref.current===document.activeElement),oe=xl(ie,ee,se);oe&&setTimeout(()=>oe.ref.current.focus())}),P=_.useCallback((ee,ie,se)=>{const oe=!H.current&&!se;(w.value!==void 0&&w.value===ie||oe)&&(D(ee),oe&&(H.current=!0))},[w.value]),K=_.useCallback(()=>k==null?void 0:k.focus(),[k]),G=_.useCallback((ee,ie,se)=>{const oe=!H.current&&!se;(w.value!==void 0&&w.value===ie||oe)&&Z(ee)},[w.value]),te=n==="popper"?Xo:sl,ue=te===Xo?{side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:u,sticky:x,hideWhenDetached:h,avoidCollisions:b}:{};return p.jsx(ol,{scope:r,content:k,viewport:C,onViewportChange:O,itemRefCallback:P,selectedItem:I,onItemLeave:K,itemTextRefCallback:G,focusSelectedItem:$,selectedItemText:L,position:n,isPositioned:F,searchRef:J,children:p.jsx(Go,{as:Um,allowPinchZoom:!0,children:p.jsx(Ao,{asChild:!0,trapped:w.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:be(o,ee=>{var ie;(ie=w.trigger)==null||ie.focus({preventScroll:!0}),ee.preventDefault()}),children:p.jsx(un,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:p.jsx(te,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:ee=>ee.preventDefault(),...v,...ue,onPlaced:()=>y(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:be(v.onKeyDown,ee=>{const ie=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!ie&&ee.key.length===1&&z(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let oe=j().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const le=ee.target,fe=oe.indexOf(le);oe=oe.slice(fe+1)}setTimeout(()=>Q(oe)),ee.preventDefault()}})})})})})})});il.displayName=Bm;var Wm="SelectItemAlignedPosition",sl=_.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=kt(Pt,r),s=St(Pt,r),[a,l]=_.useState(null),[c,d]=_.useState(null),f=_e(t,N=>d(N)),m=Pn(r),u=_.useRef(!1),x=_.useRef(!0),{viewport:h,selectedItem:b,selectedItemText:v,focusSelectedItem:w}=s,k=_.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&h&&b&&v){const N=i.trigger.getBoundingClientRect(),I=c.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),L=v.getBoundingClientRect();if(i.dir!=="rtl"){const le=L.left-I.left,fe=D.left-le,xe=N.left-fe,g=N.width+xe,B=Math.max(g,I.width),W=window.innerWidth-Qe,E=ko(fe,[Qe,Math.max(Qe,W-B)]);a.style.minWidth=g+"px",a.style.left=E+"px"}else{const le=I.right-L.right,fe=window.innerWidth-D.right-le,xe=window.innerWidth-N.right-fe,g=N.width+xe,B=Math.max(g,I.width),W=window.innerWidth-Qe,E=ko(fe,[Qe,Math.max(Qe,W-B)]);a.style.minWidth=g+"px",a.style.right=E+"px"}const Z=m(),j=window.innerHeight-Qe*2,F=h.scrollHeight,y=window.getComputedStyle(c),H=parseInt(y.borderTopWidth,10),Q=parseInt(y.paddingTop,10),$=parseInt(y.borderBottomWidth,10),V=parseInt(y.paddingBottom,10),Y=H+Q+F+V+$,J=Math.min(b.offsetHeight*5,Y),z=window.getComputedStyle(h),P=parseInt(z.paddingTop,10),K=parseInt(z.paddingBottom,10),G=N.top+N.height/2-Qe,te=j-G,ue=b.offsetHeight/2,ee=b.offsetTop+ue,ie=H+Q+ee,se=Y-ie;if(ie<=G){const le=Z.length>0&&b===Z[Z.length-1].ref.current;a.style.bottom="0px";const fe=c.clientHeight-h.offsetTop-h.offsetHeight,xe=Math.max(te,ue+(le?K:0)+fe+$),g=ie+xe;a.style.height=g+"px"}else{const le=Z.length>0&&b===Z[0].ref.current;a.style.top="0px";const xe=Math.max(G,H+h.offsetTop+(le?P:0)+ue)+se;a.style.height=xe+"px",h.scrollTop=ie-G+h.offsetTop}a.style.margin=`${Qe}px 0`,a.style.minHeight=J+"px",a.style.maxHeight=j+"px",n==null||n(),requestAnimationFrame(()=>u.current=!0)}},[m,i.trigger,i.valueNode,a,c,h,b,v,i.dir,n]);Ie(()=>k(),[k]);const[S,C]=_.useState();Ie(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const O=_.useCallback(N=>{N&&x.current===!0&&(k(),w==null||w(),x.current=!1)},[k,w]);return p.jsx(Hm,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:u,onScrollButtonChange:O,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:p.jsx(Se.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});sl.displayName=Wm;var $m="SelectPopperPosition",Xo=_.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Qe,...i}=e,s=In(r);return p.jsx(Wo,{...s,...i,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Xo.displayName=$m;var[Hm,qo]=er(Pt,{}),Jo="SelectViewport",al=_.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=St(Jo,r),s=qo(Jo,r),a=_e(t,i.onViewportChange),l=_.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),p.jsx(On.Slot,{scope:r,children:p.jsx(Se.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:be(o.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=s;if(m!=null&&m.current&&f){const u=Math.abs(l.current-d.scrollTop);if(u>0){const x=window.innerHeight-Qe*2,h=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),v=Math.max(h,b);if(v<x){const w=v+u,k=Math.min(x,w),S=w-k;f.style.height=k+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});al.displayName=Jo;var ll="SelectGroup",[Vm,Ym]=er(ll),Km=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Sr();return p.jsx(Vm,{scope:r,id:o,children:p.jsx(Se.div,{role:"group","aria-labelledby":o,...n,ref:t})})});Km.displayName=ll;var cl="SelectLabel",Zm=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Ym(cl,r);return p.jsx(Se.div,{id:o.id,...n,ref:t})});Zm.displayName=cl;var Dn="SelectItem",[Gm,dl]=er(Dn),ul=_.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...s}=e,a=kt(Dn,r),l=St(Dn,r),c=a.value===n,[d,f]=_.useState(i??""),[m,u]=_.useState(!1),x=_e(t,w=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,w,n,o)}),h=Sr(),b=_.useRef("touch"),v=()=>{o||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(Gm,{scope:r,value:n,disabled:o,textId:h,isSelected:c,onItemTextChange:_.useCallback(w=>{f(k=>k||((w==null?void 0:w.textContent)??"").trim())},[]),children:p.jsx(On.ItemSlot,{scope:r,value:n,disabled:o,textValue:d,children:p.jsx(Se.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:x,onFocus:be(s.onFocus,()=>u(!0)),onBlur:be(s.onBlur,()=>u(!1)),onClick:be(s.onClick,()=>{b.current!=="mouse"&&v()}),onPointerUp:be(s.onPointerUp,()=>{b.current==="mouse"&&v()}),onPointerDown:be(s.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:be(s.onPointerMove,w=>{var k;b.current=w.pointerType,o?(k=l.onItemLeave)==null||k.call(l):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(s.onPointerLeave,w=>{var k;w.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:be(s.onKeyDown,w=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(Pm.includes(w.key)&&v(),w.key===" "&&w.preventDefault())})})})})});ul.displayName=Dn;var Er="SelectItemText",fl=_.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,s=kt(Er,r),a=St(Er,r),l=dl(Er,r),c=Mm(Er,r),[d,f]=_.useState(null),m=_e(t,v=>f(v),l.onItemTextChange,v=>{var w;return(w=a.itemTextRefCallback)==null?void 0:w.call(a,v,l.value,l.disabled)}),u=d==null?void 0:d.textContent,x=_.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:u},l.value),[l.disabled,l.value,u]),{onNativeOptionAdd:h,onNativeOptionRemove:b}=c;return Ie(()=>(h(x),()=>b(x)),[h,b,x]),p.jsxs(p.Fragment,{children:[p.jsx(Se.span,{id:l.textId,...i,ref:m}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Mr.createPortal(i.children,s.valueNode):null]})});fl.displayName=Er;var hl="SelectItemIndicator",pl=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return dl(hl,r).isSelected?p.jsx(Se.span,{"aria-hidden":!0,...n,ref:t}):null});pl.displayName=hl;var Qo="SelectScrollUpButton",Xm=_.forwardRef((e,t)=>{const r=St(Qo,e.__scopeSelect),n=qo(Qo,e.__scopeSelect),[o,i]=_.useState(!1),s=_e(t,n.onScrollButtonChange);return Ie(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?p.jsx(ml,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Xm.displayName=Qo;var ei="SelectScrollDownButton",qm=_.forwardRef((e,t)=>{const r=St(ei,e.__scopeSelect),n=qo(ei,e.__scopeSelect),[o,i]=_.useState(!1),s=_e(t,n.onScrollButtonChange);return Ie(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;i(d)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?p.jsx(ml,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});qm.displayName=ei;var ml=_.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=St("SelectScrollButton",r),s=_.useRef(null),a=Pn(r),l=_.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return _.useEffect(()=>()=>l(),[l]),Ie(()=>{var d;const c=a().find(f=>f.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),p.jsx(Se.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:be(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:be(o.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:be(o.onPointerLeave,()=>{l()})})}),Jm="SelectSeparator",Qm=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return p.jsx(Se.div,{"aria-hidden":!0,...n,ref:t})});Qm.displayName=Jm;var ti="SelectArrow",eg=_.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=In(r),i=kt(ti,r),s=St(ti,r);return i.open&&s.position==="popper"?p.jsx($o,{...o,...n,ref:t}):null});eg.displayName=ti;var tg="SelectBubbleInput",gl=_.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=_.useRef(null),i=_e(n,o),s=Hp(t);return _.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&d){const f=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(f)}},[s,t]),p.jsx(Se.select,{...r,style:{...Ia,...r.style},ref:i,defaultValue:t})});gl.displayName=tg;function bl(e){return e===""||e===void 0}function vl(e){const t=Le(e),r=_.useRef(""),n=_.useRef(0),o=_.useCallback(s=>{const a=r.current+s;t(a),(function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(a)},[t]),i=_.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return _.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function xl(e,t,r){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let s=rg(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==r));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function rg(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var ng=Xa,wl=Ja,og=el,ig=tl,sg=rl,yl=nl,ag=al,kl=ul,lg=fl,cg=pl;const dg=ng,ug=og,Sl=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(wl,{ref:n,className:pe("flex h-8 w-full items-center justify-between gap-2 rounded-md border border-zinc-800 bg-black px-3 py-1.5 text-left text-xs font-medium text-white outline-none","hover:bg-zinc-900 focus-visible:ring-2 focus-visible:ring-blue-500/80 focus-visible:ring-inset focus-visible:border-zinc-600","disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:flex [&>span]:items-center [&>span]:gap-2",e),style:{boxShadow:"none",WebkitBoxShadow:"none",MozBoxShadow:"none"},...r,children:[t,p.jsx(ig,{asChild:!0,children:p.jsx(Vr,{className:"h-3 w-3 shrink-0 text-zinc-400",strokeWidth:2})})]}));Sl.displayName=wl.displayName;const _l=_.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>p.jsx(sg,{children:p.jsx(yl,{ref:o,className:pe("relative max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-zinc-800 bg-zinc-950 text-white shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),style:{zIndex:Pe.radixPortal},position:r,...n,children:p.jsx(ag,{className:pe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));_l.displayName=yl.displayName;const Cl=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(kl,{ref:n,className:pe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-xs outline-none","focus:bg-zinc-800 focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(cg,{children:p.jsx(eo,{className:"h-3 w-3",strokeWidth:2})})}),p.jsx(lg,{children:t})]}));Cl.displayName=kl.displayName;const El=_.createContext(null);function Al(){const e=_.useContext(El);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function Nl({open:e,onOpenChange:t,children:r}){const[n,o]=_.useState(!1),i=e!==void 0,s=i?e:n,a=_.useCallback(c=>{i||o(c),t==null||t(c)},[i,t]),l=_.useMemo(()=>({open:s,onOpenChange:a}),[s,a]);return p.jsx(El.Provider,{value:l,children:r})}function fg({asChild:e,children:t}){const{onOpenChange:r}=Al(),n=_.Children.only(t);return e&&_.isValidElement(n)?_.cloneElement(n,{onClick:o=>{var i,s;(s=(i=n.props).onClick)==null||s.call(i,o),r(!0)}}):p.jsx("button",{type:"button",onClick:()=>r(!0),children:t})}function zl({className:e,children:t,preventCloseOnBackdropClick:r,...n}){const{open:o,onOpenChange:i}=Al();if(_.useEffect(()=>{const a=l=>{l.key==="Escape"&&i(!1)};return o&&(document.addEventListener("keydown",a),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow=""}},[o,i]),!o)return null;const s=a=>{a.preventDefault(),a.stopPropagation()};return pt.createPortal(p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 bg-black/60",style:{zIndex:Pe.uiDialogBackdrop},"aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:s,onDrop:s}),p.jsx("div",{role:"dialog","aria-modal":!0,className:pe("fixed left-1/2 top-1/2 w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-zinc-700 bg-zinc-900 p-4 shadow-xl",e),style:{zIndex:Pe.uiDialogContent},onClick:a=>a.stopPropagation(),...n,children:t})]}),document.body)}function jl({className:e,...t}){return p.jsx("div",{className:pe("flex flex-col gap-1.5 pb-4",e),...t})}function hg({className:e,...t}){return p.jsx("div",{className:pe("flex justify-end gap-2 pt-4",e),...t})}function Tl({className:e,...t}){return p.jsx("h2",{className:pe("text-sm font-semibold text-white",e),...t})}function Ol({className:e,...t}){return p.jsx("p",{className:pe("text-xs text-zinc-400",e),...t})}const Ue=_.forwardRef(({className:e,variant:t="default",size:r="default",asChild:n=!1,...o},i)=>{const s="inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0 cursor-pointer",a={default:"bg-primary text-primary-foreground shadow-lg shadow-primary/20 hover:bg-primary/90",outline:"border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",ghost:"text-zinc-500 hover:text-zinc-200 hover:bg-zinc-800",destructive:"bg-destructive/15 text-destructive hover:bg-destructive/25"},l={sm:"h-7 px-2.5 text-[11px]",default:"h-8 px-3 py-1.5 text-xs",lg:"h-9 px-5 text-sm",icon:"h-8 w-8","icon-sm":"h-7 w-7","icon-xs":"h-6 w-6"},c=n?Kf:"button";return p.jsx(c,{ref:i,type:"button",className:pe(s,a[t],l[r],e),...o})});Ue.displayName="Button";const pg=["library","upload","url"];function mg({library:e,selectedId:t,onSelect:r}){const[n,o]=T.useState(""),[i,s]=T.useState("all"),a=["all",...new Set(e.flatMap(c=>c.tags??[]))],l=e.filter(c=>{const d=i==="all"||(c.tags??[]).includes(i),f=!n||(c.alt??"").toLowerCase().includes(n.toLowerCase());return d&&f});return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"relative",children:[p.jsx(Fd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),p.jsx(yo,{value:n,onChange:c=>o(c.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),p.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map(c=>p.jsx("button",{type:"button",onClick:()=>s(c),className:pe("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===c?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-700 text-zinc-500 hover:border-zinc-600 hover:text-zinc-400"),children:c==="all"?"Tutte":c},c))}),l.length>0?p.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(c=>{const d=t===c.id;return p.jsxs("button",{type:"button",onClick:()=>r(d?null:c.id),className:pe("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",d?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[p.jsx("img",{src:c.url,alt:c.alt,loading:"lazy",className:pe("w-full h-full object-cover transition-[filter] duration-150",d?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),p.jsx("div",{className:pe("absolute inset-x-0 bottom-0 px-2 py-1.5","bg-gradient-to-t from-black/70 to-transparent","opacity-0 group-hover:opacity-100 transition-opacity",d&&"opacity-100"),children:p.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:c.alt})}),d&&p.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:p.jsx(eo,{size:14,className:"text-white"})})]},c.id)})}):p.jsx("div",{className:"text-center py-12 text-zinc-600 text-xs",children:"Nessuna immagine in libreria. Configura assets.assetsManifest nel tenant (es. da public/assets)."})]})}function gg({preview:e,onPreviewChange:t,onAssetUpload:r}){const[n,o]=T.useState(!1),i=T.useRef(null),s=T.useCallback(async d=>{if(fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"handleFile called",data:{fileName:d.name,hasOnAssetUpload:!!r},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!d.type.startsWith("image/"))return;if(r){try{const m=await r(d);fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"onAssetUpload resolved",data:{url:m==null?void 0:m.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),t({name:d.name,size:d.size,dataUrl:m})}catch{const m=new FileReader;m.onload=u=>{var x;t({name:d.name,size:d.size,dataUrl:(x=u.target)==null?void 0:x.result})},m.readAsDataURL(d)}return}const f=new FileReader;f.onload=m=>{var u;t({name:d.name,size:d.size,dataUrl:(u=m.target)==null?void 0:u.result})},f.readAsDataURL(d)},[t,r]),a=T.useCallback(d=>{var m,u;d.preventDefault(),d.stopPropagation(),o(!1);const f=(u=(m=d.dataTransfer)==null?void 0:m.files)==null?void 0:u[0];f&&s(f)},[s]),l=T.useCallback(d=>{d.preventDefault(),d.stopPropagation(),o(!0)},[]),c=T.useCallback(d=>{var m;const f=(m=d.target.files)==null?void 0:m[0];f&&s(f)},[s]);return p.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:d=>{d.preventDefault(),d.stopPropagation(),o(!1)},onDrop:a,onClick:()=>{var d;return!e&&((d=i.current)==null?void 0:d.click())},className:pe("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",n?"border-blue-500/50 bg-blue-500/[0.04]":e?"border-zinc-800 bg-transparent cursor-default":"border-zinc-800 bg-white/[0.01] hover:border-zinc-600 hover:bg-white/[0.02]"),children:[e?p.jsxs(p.Fragment,{children:[p.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),p.jsxs("div",{className:"absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/80 to-transparent p-4 flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),p.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),p.jsx(Ue,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:d=>{d.stopPropagation(),t(null)},children:p.jsx(Kr,{size:14})})]})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:p.jsx(qi,{size:22})}),p.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),p.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),p.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),p.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:c})]})}function bg({urlPreview:e,onUrlPreviewChange:t}){const[r,n]=T.useState(""),[o,i]=T.useState(!1),s=()=>{if(r.trim())try{new URL(r),t(r),i(!1)}catch{i(!0),t(null)}};return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx(jt,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(yo,{value:r,onChange:a=>{n(a.target.value),i(!1)},onKeyDown:a=>a.key==="Enter"&&s(),placeholder:"https://images.unsplash.com/photo-...",className:pe("h-8 text-xs bg-zinc-900/50 border-zinc-800",o&&"border-red-500/50")}),p.jsx(Ue,{type:"button",variant:"outline",onClick:s,className:"shrink-0 h-8",children:"Anteprima"})]}),o&&p.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?p.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[p.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),t(null)}}),p.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[p.jsx(eo,{size:14,className:"text-emerald-400"}),p.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):o?null:p.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[p.jsx(Xi,{size:32,className:"mb-3 opacity-40"}),p.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const vg=({open:e,onOpenChange:t,onSelect:r})=>{const{assets:n}=ur(),o=(n==null?void 0:n.assetsManifest)??[],[i,s]=T.useState("library"),[a,l]=T.useState(null),[c,d]=T.useState(null),[f,m]=T.useState(null);T.useEffect(()=>{e&&(s("library"),l(null),d(null),m(null))},[e]),T.useEffect(()=>{if(!e||i!=="upload")return;const v=()=>{fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:beforeunload",message:"beforeunload fired",data:{},timestamp:Date.now(),hypothesisId:"H1"})}).catch(()=>{})};return window.addEventListener("beforeunload",v),()=>window.removeEventListener("beforeunload",v)},[e,i]),T.useEffect(()=>{if(!e||i!=="upload")return;const v=k=>{k.preventDefault()},w={capture:!0};return document.addEventListener("dragover",v,w),document.addEventListener("drop",v,w),window.addEventListener("dragover",v,w),window.addEventListener("drop",v,w),()=>{document.removeEventListener("dragover",v,w),document.removeEventListener("drop",v,w),window.removeEventListener("dragover",v,w),window.removeEventListener("drop",v,w)}},[e,i]);const u=i==="library"&&a!=null||i==="upload"&&c!=null||i==="url"&&f!=null,x=()=>{if(i==="library"&&a){const v=o.find(w=>w.id===a);v&&r({url:v.url,alt:v.alt})}else i==="upload"&&c?r({url:c.dataUrl,alt:c.name}):i==="url"&&f&&r({url:f,alt:""});setTimeout(()=>t(!1),0)},h=i==="library"&&a?"1 immagine selezionata":i==="upload"&&c?c.name:i==="url"&&f?"URL pronto":"Nessuna selezione",b=v=>{v.preventDefault(),v.stopPropagation()};return p.jsx(Nl,{open:e,onOpenChange:t,children:p.jsxs(zl,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:b,onDrop:b,children:[p.jsxs(jl,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:p.jsx(Yr,{size:18})}),p.jsxs("div",{children:[p.jsx(Tl,{children:"Image Picker"}),p.jsx(Ol,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),p.jsx("button",{type:"button",onClick:()=>t(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:p.jsx(Lt,{size:18})})]}),p.jsx("div",{className:"flex border-b border-zinc-800",children:pg.map(v=>p.jsxs("button",{type:"button",onClick:()=>s(v),className:pe("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===v?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[v==="library"&&p.jsx(Yr,{size:14}),v==="upload"&&p.jsx(qi,{size:14}),v==="url"&&p.jsx(Xi,{size:14}),v==="library"?"Libreria":v==="upload"?"Upload":"URL"]},v))}),p.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&p.jsx(mg,{library:o,selectedId:a,onSelect:l}),i==="upload"&&p.jsx(gg,{preview:c,onPreviewChange:d,onAssetUpload:n==null?void 0:n.onAssetUpload}),i==="url"&&p.jsx(bg,{urlPreview:f,onUrlPreviewChange:m})]}),p.jsxs(hg,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[p.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:h}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(Ue,{type:"button",variant:"outline",size:"sm",onClick:()=>t(!1),children:"Annulla"}),p.jsx(Ue,{type:"button",size:"sm",disabled:!u,onClick:x,className:pe(!u&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},Pl=(e,t="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("assets/"))return`/${e}`;if(e.startsWith("/uploaded-assets/"))return e;if(!/\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i.test(e))return e.startsWith("/")?e:`/${e}`;const n=e.replace(/^\//,"");return`/assets/${t}/${n}`},xg=({value:e,onChange:t,label:r="IMAGE",className:n})=>{const{tenantId:o="default"}=ur(),[i,s]=T.useState(!1),[a,l]=T.useState(!1),c=!!(e!=null&&e.url),d=e!=null&&e.url?Pl(e.url,o):"",f=u=>{t(u),s(!1)},m=u=>{u.stopPropagation(),t({url:"",alt:""})};return p.jsxs("div",{className:pe("space-y-1.5",n),children:[p.jsx(jt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),c?p.jsxs("div",{role:"button",tabIndex:0,onClick:()=>s(!0),onKeyDown:u=>u.key==="Enter"&&s(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:pe("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",a&&"ring-blue-500/40"),children:[p.jsx("img",{src:d,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:u=>{u.target.style.display="none"}}),p.jsx("div",{className:pe("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",a?"bg-black/50":"bg-black/0"),children:a&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-1.5 bg-white/15 backdrop-blur-md rounded-lg px-3.5 py-2 text-white text-xs font-medium",children:[p.jsx(Md,{size:13}),p.jsx("span",{children:"Cambia"})]}),p.jsx(Ue,{type:"button",variant:"ghost",className:"h-8 w-8 p-0 bg-red-500/15 backdrop-blur-md text-red-300 hover:text-red-200 hover:bg-red-500/25",onClick:m,children:p.jsx(Kr,{size:13})})]})}),p.jsx("div",{className:"px-2.5 py-1.5 bg-black/50 text-[10px] text-zinc-500 truncate",children:((e==null?void 0:e.url)??"").length>50?"…"+((e==null?void 0:e.url)??"").slice(-47):(e==null?void 0:e.url)??""})]}):p.jsxs("button",{type:"button",onClick:()=>s(!0),className:pe("w-full rounded-lg border-2 border-dashed border-zinc-800 py-7","flex flex-col items-center gap-2","bg-white/[0.01] transition-all","hover:border-blue-500/30 hover:bg-blue-500/[0.03]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),children:[p.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:p.jsx(Yr,{size:18})}),p.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),p.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),p.jsx(vg,{open:i,onOpenChange:s,onSelect:f})]})},Il=[{name:"layers",Icon:ro},{name:"github",Icon:Dd},{name:"arrow-right",Icon:Nd},{name:"box",Icon:jd},{name:"terminal",Icon:$d},{name:"chevron-right",Icon:Td},{name:"menu",Icon:Rd},{name:"x",Icon:Lt},{name:"sparkles",Icon:Ud},{name:"zap",Icon:Vd}],Ar={"ui:text":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"grid w-full items-center gap-1.5 mb-4",children:[p.jsx(jt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsx(yo,{type:"text",className:"h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:textarea":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(jt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsx(Hf,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:select":({label:e,value:t,onChange:r,options:n=[]})=>p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(jt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsxs(dg,{value:t||"",onValueChange:r,children:[p.jsx(Sl,{className:"w-full h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus:ring-blue-600",children:p.jsx(ug,{placeholder:"Select..."})}),p.jsx(_l,{className:"dark",children:n.map(o=>p.jsx(Cl,{value:o,className:"text-[11px]",children:o},o))})]})]}),"ui:checkbox":({label:e,value:t,onChange:r})=>p.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2 rounded border border-zinc-800/50 bg-zinc-900/20",children:[p.jsx(Vf,{id:e,checked:!!t,onCheckedChange:n=>r(n===!0)}),p.jsx(jt,{htmlFor:e,className:"text-[11px] font-medium cursor-pointer select-none text-zinc-300",children:e})]}),"ui:image-picker":({label:e,value:t,onChange:r})=>{const n=t!=null&&typeof t=="object"&&"url"in t?{url:String(t.url??""),alt:String(t.alt??"")}:{url:typeof t=="string"?t:"",alt:""},o=i=>{r(i)};return p.jsx("div",{className:"mb-4",children:p.jsx(xg,{label:e,value:n,onChange:o})})},"ui:icon-picker":({label:e,value:t,onChange:r})=>{const[n,o]=T.useState(!1),i=Il.find(s=>s.name===(t||""));return p.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[p.jsx(jt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),p.jsxs(Nl,{open:n,onOpenChange:o,children:[p.jsx(fg,{asChild:!0,children:p.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:i?p.jsxs(p.Fragment,{children:[p.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),p.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):p.jsxs(p.Fragment,{children:[p.jsx(Yr,{size:16,className:"text-zinc-500 shrink-0"}),p.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),p.jsxs(zl,{className:"sm:max-w-[280px] p-4",children:[p.jsxs(jl,{children:[p.jsx(Tl,{className:"text-sm",children:"Choose icon"}),p.jsx(Ol,{className:"text-xs",children:"Click an icon to select it."})]}),p.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:Il.map(({name:s,Icon:a})=>p.jsx("button",{type:"button",onClick:()=>{r(s),o(!1)},className:pe("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",t===s?"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:s,children:p.jsx(a,{size:20})},s))})]})]})]})}},ri=e=>{if(e instanceof Re.z.ZodOptional||e instanceof Re.z.ZodDefault)return ri(e._def.innerType);if(e instanceof Re.z.ZodObject){const t={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(t[r]=ri(e.shape[r]));return t}return e instanceof Re.z.ZodArray?[]:e instanceof Re.z.ZodString?"":e instanceof Re.z.ZodNumber?0:e instanceof Re.z.ZodBoolean?!1:e instanceof Re.z.ZodEnum?e._def.values[0]:null},ni=e=>e instanceof Re.z.ZodOptional||e instanceof Re.z.ZodDefault?ni(e._def.innerType):e,Rn=(e,t)=>e&&!t?"opacity-10":"opacity-100",tr=(e,t)=>e!=null&&t.toLowerCase()===e.toLowerCase(),wg=(e,t)=>{if(!e)return;const r=t.toLowerCase(),n=Object.entries(e).find(([o])=>o.toLowerCase()===r);return n==null?void 0:n[1]},Nr=({schema:e,data:t,onChange:r,keys:n,expandedItemPath:o,expandedItemIdByField:i,focusedFieldKey:s,onSidebarExpandedItemChange:a})=>{const l=e.shape,c=n!=null?Object.keys(l).filter(x=>n.includes(x)):Object.keys(l),d=o==null?void 0:o[0],f=(d==null?void 0:d.itemId)!=null?{[d.fieldKey]:d.itemId}:i,m=(d==null?void 0:d.fieldKey)??s??null,u=m!=null;return p.jsx("div",{className:"space-y-4",children:c.map(x=>{const h=l[x];if(!h)return null;const b=ni(h),v=h.description||"ui:text",w=t[x];if(v==="ui:image-picker"&&b instanceof Re.z.ZodObject){const O=tr(m,x),N=Ar["ui:image-picker"]||Ar["ui:text"];return p.jsx("div",{className:`transition-opacity duration-200 ${Rn(u,O)}`,...O?{"data-jp-focused-field":x}:{},children:p.jsx(N,{label:x,value:w,onChange:I=>r({...t,[x]:I})})},x)}if(b instanceof Re.z.ZodObject){const O=w||{},N=tr(m,x);return p.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 ${Rn(u,N)}`,...N?{"data-jp-focused-field":x}:{},children:[p.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[p.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),p.jsx("h4",{className:"text-[10px] font-black uppercase text-zinc-400 tracking-widest",children:x})]}),p.jsx(Nr,{schema:b,data:O,onChange:I=>r({...t,[x]:I}),expandedItemPath:o&&tr(d==null?void 0:d.fieldKey,x)?o.slice(1):void 0,expandedItemIdByField:f,focusedFieldKey:m})]},x)}if(b instanceof Re.z.ZodArray){const O=Array.isArray(w)?w:[],N=ni(b.element),I=(j,F)=>{if(F<0||F>=O.length)return;const y=[...O],[H]=y.splice(j,1);y.splice(F,0,H),r({...t,[x]:y})},D=tr(m,x),L=tr(d==null?void 0:d.fieldKey,x)?d==null?void 0:d.itemId:void 0,Z=wg(f,x)??L;return p.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${Rn(u,D)}`,...D?{"data-jp-focused-field":x}:{},children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsxs("label",{className:"text-[10px] font-black uppercase text-zinc-500 tracking-widest",children:[x," (",O.length,")"]}),p.jsxs("button",{type:"button",onClick:()=>{const j=ri(N);r({...t,[x]:[...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:[p.jsx(no,{size:12})," Add Item"]})]}),p.jsx("div",{className:"space-y-2",children:O.map((j,F)=>{const y=j,H=y.id||`legacy-${F}`,Q=(typeof y.title=="string"?y.title:null)||(typeof y.label=="string"?y.label:null)||(typeof y.name=="string"?y.name:null)||(typeof y.content=="string"?y.content:null)||(typeof y.text=="string"?y.text:null)||`${x} #${F+1}`,$=Z,V=String(y.id??H),Y=$!=null&&String($)===V,J=Y&&o&&o.length>1?o.slice(1):void 0,z=u&&D&&$!=null&&!Y;return p.jsx(yg,{itemId:V,openItemId:$!=null?String($):void 0,isFaded:z,index:F,isFirst:F===0,isLast:F===O.length-1,label:Q,onExpandedChange:a?P=>a(P?{fieldKey:x,itemId:V}:null):void 0,onRemove:()=>{const P=O.filter((K,G)=>G!==F);r({...t,[x]:P})},onMoveUp:()=>I(F,F-1),onMoveDown:()=>I(F,F+1),children:N instanceof Re.z.ZodObject?p.jsx(Nr,{schema:N,data:y||{},expandedItemPath:J,onChange:P=>{const K=[...O];K[F]=P,r({...t,[x]:K})}}):p.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},H)})})]},x)}const k=Ar[v]||Ar["ui:text"],S=b instanceof Re.z.ZodEnum?b._def.values:void 0,C=tr(m,x);return p.jsx("div",{className:`transition-opacity duration-200 ${Rn(u,C)}`,...C?{"data-jp-focused-field":x}:{},children:p.jsx(k,{label:x,value:w,options:S,onChange:O=>r({...t,[x]:O})})},x)})})},yg=({itemId:e,openItemId:t,isFaded:r=!1,label:n,onExpandedChange:o,onRemove:i,onMoveUp:s,onMoveDown:a,isFirst:l,isLast:c,children:d})=>{const f=t!=null&&String(t)===String(e),[m,u]=T.useState(f);T.useEffect(()=>{f&&!m&&u(!0),!f&&m&&u(!1)},[f,m]);const x=()=>{const b=!m;u(b),o==null||o(b)},h=f&&m;return p.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...h?{"data-jp-expanded-item":e}:{},children:[p.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[p.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:p.jsxs("button",{type:"button",onClick:x,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[m?p.jsx(to,{size:12,className:"shrink-0"}):p.jsx(Vr,{size:12,className:"shrink-0"}),p.jsx("span",{className:"truncate",children:n})]})}),p.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[p.jsx("button",{type:"button",disabled:l,onClick:s,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:p.jsx(zd,{size:12})}),p.jsx("button",{type:"button",disabled:c,onClick:a,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:p.jsx(Ad,{size:12})}),p.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),p.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:p.jsx(Kr,{size:12})})]})]}),m&&p.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:d})]})};function kg(e,t){return _.useReducer((r,n)=>t[r][n]??r,e)}var ft=e=>{const{present:t,children:r}=e,n=Sg(t),o=typeof r=="function"?r({present:n.isPresent}):_.Children.only(r),i=_e(n.ref,_g(o));return typeof r=="function"||n.isPresent?_.cloneElement(o,{ref:i}):null};ft.displayName="Presence";function Sg(e){const[t,r]=_.useState(),n=_.useRef(null),o=_.useRef(e),i=_.useRef("none"),s=e?"mounted":"unmounted",[a,l]=kg(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const c=Mn(n.current);i.current=a==="mounted"?c:"none"},[a]),Ie(()=>{const c=n.current,d=o.current;if(d!==e){const m=i.current,u=Mn(c);e?l("MOUNT"):u==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&m!==u?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ie(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=u=>{const h=Mn(n.current).includes(CSS.escape(u.animationName));if(u.target===t&&h&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=u=>{u.target===t&&(i.current=Mn(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:_.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Mn(e){return(e==null?void 0:e.animationName)||"none"}function _g(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var[Ln]=$t("Tooltip",[Gt]),Fn=Gt(),Dl="TooltipProvider",Cg=700,oi="tooltip.open",[Eg,ii]=Ln(Dl),Rl=e=>{const{__scopeTooltip:t,delayDuration:r=Cg,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,s=_.useRef(!0),a=_.useRef(!1),l=_.useRef(0);return _.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(Eg,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:_.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:_.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:i})};Rl.displayName=Dl;var zr="Tooltip",[Ag,jr]=Ln(zr),Ml=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=ii(zr,e.__scopeTooltip),c=Fn(t),[d,f]=_.useState(null),m=Sr(),u=_.useRef(0),x=s??l.disableHoverableContent,h=a??l.delayDuration,b=_.useRef(!1),[v,w]=_n({prop:n,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(oi))):l.onClose(),i==null||i(N)},caller:zr}),k=_.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),S=_.useCallback(()=>{window.clearTimeout(u.current),u.current=0,b.current=!1,w(!0)},[w]),C=_.useCallback(()=>{window.clearTimeout(u.current),u.current=0,w(!1)},[w]),O=_.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>{b.current=!0,w(!0),u.current=0},h)},[h,w]);return _.useEffect(()=>()=>{u.current&&(window.clearTimeout(u.current),u.current=0)},[]),p.jsx(Uo,{...c,children:p.jsx(Ag,{scope:t,contentId:m,open:v,stateAttribute:k,trigger:d,onTriggerChange:f,onTriggerEnter:_.useCallback(()=>{l.isOpenDelayedRef.current?O():S()},[l.isOpenDelayedRef,O,S]),onTriggerLeave:_.useCallback(()=>{x?C():(window.clearTimeout(u.current),u.current=0)},[C,x]),onOpen:S,onClose:C,disableHoverableContent:x,children:r})})};Ml.displayName=zr;var si="TooltipTrigger",Ll=_.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=jr(si,r),i=ii(si,r),s=Fn(r),a=_.useRef(null),l=_e(t,a,o.onTriggerChange),c=_.useRef(!1),d=_.useRef(!1),f=_.useCallback(()=>c.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(kn,{asChild:!0,...s,children:p.jsx(Se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:be(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:be(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:be(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:be(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:be(e.onBlur,o.onClose),onClick:be(e.onClick,o.onClose)})})});Ll.displayName=si;var ai="TooltipPortal",[Ng,zg]=Ln(ai,{forceMount:void 0}),Fl=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=jr(ai,t);return p.jsx(Ng,{scope:t,forceMount:r,children:p.jsx(ft,{present:r||i.open,children:p.jsx(Sn,{asChild:!0,container:o,children:n})})})};Fl.displayName=ai;var rr="TooltipContent",Bl=_.forwardRef((e,t)=>{const r=zg(rr,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,s=jr(rr,e.__scopeTooltip);return p.jsx(ft,{present:n||s.open,children:s.disableHoverableContent?p.jsx(Ul,{side:o,...i,ref:t}):p.jsx(jg,{side:o,...i,ref:t})})}),jg=_.forwardRef((e,t)=>{const r=jr(rr,e.__scopeTooltip),n=ii(rr,e.__scopeTooltip),o=_.useRef(null),i=_e(t,o),[s,a]=_.useState(null),{trigger:l,onClose:c}=r,d=o.current,{onPointerInTransitChange:f}=n,m=_.useCallback(()=>{a(null),f(!1)},[f]),u=_.useCallback((x,h)=>{const b=x.currentTarget,v={x:x.clientX,y:x.clientY},w=Dg(v,b.getBoundingClientRect()),k=Rg(v,w),S=Mg(h.getBoundingClientRect()),C=Fg([...k,...S]);a(C),f(!0)},[f]);return _.useEffect(()=>()=>m(),[m]),_.useEffect(()=>{if(l&&d){const x=b=>u(b,d),h=b=>u(b,l);return l.addEventListener("pointerleave",x),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",h)}}},[l,d,u,m]),_.useEffect(()=>{if(s){const x=h=>{const b=h.target,v={x:h.clientX,y:h.clientY},w=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),k=!Lg(v,s);w?m():k&&(m(),c())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,d,s,c,m]),p.jsx(Ul,{...e,ref:i})}),[Tg,Og]=Ln(zr,{isInside:!1}),Pg=Gf("TooltipContent"),Ul=_.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=jr(rr,r),c=Fn(r),{onClose:d}=l;return _.useEffect(()=>(document.addEventListener(oi,d),()=>document.removeEventListener(oi,d)),[d]),_.useEffect(()=>{if(l.trigger){const f=m=>{const u=m.target;u!=null&&u.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),p.jsx(un,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:p.jsxs(Wo,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(Pg,{children:n}),p.jsx(Tg,{scope:r,isInside:!0,children:p.jsx(Yp,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Bl.displayName=rr;var Wl="TooltipArrow",Ig=_.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Fn(r);return Og(Wl,r).isInside?null:p.jsx($o,{...o,...n,ref:t})});Ig.displayName=Wl;function Dg(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Rg(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Mg(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Lg(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],c=a.x,d=a.y,f=l.x,m=l.y;d>n!=m>n&&r<(f-c)*(n-d)/(m-d)+c&&(o=!o)}return o}function Fg(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Bg(t)}function Bg(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Ug=Rl,Wg=Ml,$g=Ll,Hg=Fl,$l=Bl;const Vg=Ug,Tr=Wg,Or=$g,nr=_.forwardRef(({className:e,sideOffset:t=4,...r},n)=>p.jsx(Hg,{children:p.jsx($l,{ref:n,sideOffset:t,className:pe("rounded-md bg-zinc-800 px-2.5 py-1.5 text-[11px] text-zinc-200 shadow-md","animate-in fade-in-0 zoom-in-95",e),style:{zIndex:Pe.uiFloating},...r})}));nr.displayName=$l.displayName;var Bn="Popover",[Hl]=$t(Bn,[Gt]),Pr=Gt(),[Yg,_t]=Hl(Bn),Vl=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=Pr(t),l=_.useRef(null),[c,d]=_.useState(!1),[f,m]=_n({prop:n,defaultProp:o??!1,onChange:i,caller:Bn});return p.jsx(Uo,{...a,children:p.jsx(Yg,{scope:t,contentId:Sr(),triggerRef:l,open:f,onOpenChange:m,onOpenToggle:_.useCallback(()=>m(u=>!u),[m]),hasCustomAnchor:c,onCustomAnchorAdd:_.useCallback(()=>d(!0),[]),onCustomAnchorRemove:_.useCallback(()=>d(!1),[]),modal:s,children:r})})};Vl.displayName=Bn;var Yl="PopoverAnchor",Kg=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=_t(Yl,r),i=Pr(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=o;return _.useEffect(()=>(s(),()=>a()),[s,a]),p.jsx(kn,{...i,...n,ref:t})});Kg.displayName=Yl;var Kl="PopoverTrigger",Zl=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=_t(Kl,r),i=Pr(r),s=_e(t,o.triggerRef),a=p.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ql(o.open),...n,ref:s,onClick:be(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(kn,{asChild:!0,...i,children:a})});Zl.displayName=Kl;var li="PopoverPortal",[Zg,Gg]=Hl(li,{forceMount:void 0}),Gl=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=_t(li,t);return p.jsx(Zg,{scope:t,forceMount:r,children:p.jsx(ft,{present:r||i.open,children:p.jsx(Sn,{asChild:!0,container:o,children:n})})})};Gl.displayName=li;var or="PopoverContent",Xl=_.forwardRef((e,t)=>{const r=Gg(or,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=_t(or,e.__scopePopover);return p.jsx(ft,{present:n||i.open,children:i.modal?p.jsx(qg,{...o,ref:t}):p.jsx(Jg,{...o,ref:t})})});Xl.displayName=or;var Xg=Ht("PopoverContent.RemoveScroll"),qg=_.forwardRef((e,t)=>{const r=_t(or,e.__scopePopover),n=_.useRef(null),o=_e(t,n),i=_.useRef(!1);return _.useEffect(()=>{const s=n.current;if(s)return Ma(s)},[]),p.jsx(Go,{as:Xg,allowPinchZoom:!0,children:p.jsx(ql,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),i.current||(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:be(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Jg=_.forwardRef((e,t)=>{const r=_t(or,e.__scopePopover),n=_.useRef(!1),o=_.useRef(!1);return p.jsx(ql,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((c=r.triggerRef.current)==null?void 0:c.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),ql=_.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...f}=e,m=_t(or,r),u=Pr(r);return Gs(),p.jsx(Ao,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(un,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>m.onOpenChange(!1),children:p.jsx(Wo,{"data-state":Ql(m.open),role:"dialog",id:m.contentId,...u,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Jl="PopoverClose",Qg=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=_t(Jl,r);return p.jsx(Se.button,{type:"button",...n,ref:t,onClick:be(e.onClick,()=>o.onOpenChange(!1))})});Qg.displayName=Jl;var e0="PopoverArrow",t0=_.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Pr(r);return p.jsx($o,{...o,...n,ref:t})});t0.displayName=e0;function Ql(e){return e?"open":"closed"}var r0=Vl,n0=Zl,o0=Gl,ec=Xl;const i0=r0,s0=n0,tc=_.forwardRef(({className:e,align:t="start",sideOffset:r=6,...n},o)=>p.jsx(o0,{children:p.jsx(ec,{ref:o,align:t,sideOffset:r,className:pe("w-[var(--radix-popover-trigger-width)] rounded-lg border border-zinc-700/80 bg-zinc-950 p-1 text-white shadow-xl shadow-black/30","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2",e),style:{zIndex:Pe.uiFloating},...n})}));tc.displayName=ec.displayName;const rc=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"Select page",a0=({pageSlugs:e,currentSlug:t,onPageChange:r,sectionCount:n,onNewPage:o,className:i,currentPageLabel:s})=>{const[a,l]=T.useState(!1),c=s??rc(t),d=f=>{r(f),l(!1)};return p.jsx("div",{className:pe("mx-3 mt-2 mb-2",i),children:p.jsxs(i0,{open:a,onOpenChange:l,children:[p.jsx(s0,{asChild:!0,children:p.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-label":`Select page, current: ${c}`,className:pe("flex items-center gap-2 w-full pl-3 pr-4 py-2 rounded-lg border text-left transition-all duration-150 cursor-pointer","bg-transparent border-zinc-800 text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800/50 hover:border-zinc-700","data-[state=open]:bg-zinc-950 data-[state=open]:border-zinc-800 data-[state=open]:text-zinc-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-950"),children:[p.jsx(Id,{size:14,className:"shrink-0 text-zinc-500","aria-hidden":!0}),p.jsx("span",{className:"text-xs font-medium flex-1 truncate",children:c}),p.jsx(Vr,{size:13,className:"shrink-0 text-zinc-500","aria-hidden":!0})]})}),p.jsxs(tc,{align:"start",sideOffset:4,className:"min-w-[var(--radix-popover-trigger-width)] bg-zinc-950 border-zinc-800 p-1",role:"listbox","aria-label":"Page list",children:[e.map(f=>{const m=f===t,u=rc(f);return p.jsxs("button",{type:"button",role:"option","aria-selected":m,onClick:()=>d(f),className:pe("flex items-center justify-between w-full px-2.5 py-2 rounded-md text-xs transition-colors cursor-pointer",m?"bg-primary/10 text-primary font-semibold":"text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"),children:[p.jsx("span",{children:u}),n!=null&&p.jsxs("span",{className:"text-[10px] text-zinc-600 tabular-nums","aria-hidden":!0,children:[n,"s"]})]},f)}),o!=null&&p.jsx("div",{className:"border-t border-zinc-800 mt-1 pt-1",children:p.jsxs("button",{type:"button",onClick:()=>{o(),l(!1)},className:"flex items-center gap-1.5 w-full px-2.5 py-2 rounded-md text-[11px] text-zinc-600 hover:text-zinc-300 hover:bg-zinc-800 transition-colors cursor-pointer","aria-label":"New page",children:[p.jsx(no,{size:12,"aria-hidden":!0}),p.jsx("span",{children:"New page"})]})})]})]})})};function l0(e,t){return _.useReducer((r,n)=>t[r][n]??r,e)}var ci="ScrollArea",[nc]=$t(ci),[c0,Ve]=nc(ci),oc=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,l]=_.useState(null),[c,d]=_.useState(null),[f,m]=_.useState(null),[u,x]=_.useState(null),[h,b]=_.useState(null),[v,w]=_.useState(0),[k,S]=_.useState(0),[C,O]=_.useState(!1),[N,I]=_.useState(!1),D=_e(t,Z=>l(Z)),L=Hs(o);return p.jsx(c0,{scope:r,type:n,dir:L,scrollHideDelay:i,scrollArea:a,viewport:c,onViewportChange:d,content:f,onContentChange:m,scrollbarX:u,onScrollbarXChange:x,scrollbarXEnabled:C,onScrollbarXEnabledChange:O,scrollbarY:h,onScrollbarYChange:b,scrollbarYEnabled:N,onScrollbarYEnabledChange:I,onCornerWidthChange:w,onCornerHeightChange:S,children:p.jsx(Se.div,{dir:L,...s,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});oc.displayName=ci;var ic="ScrollAreaViewport",sc=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:o,...i}=e,s=Ve(ic,r),a=_.useRef(null),l=_e(t,a,s.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(Se.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});sc.displayName=ic;var it="ScrollAreaScrollbar",ac=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Ve(it,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return _.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?p.jsx(d0,{...n,ref:t,forceMount:r}):o.type==="scroll"?p.jsx(u0,{...n,ref:t,forceMount:r}):o.type==="auto"?p.jsx(lc,{...n,ref:t,forceMount:r}):o.type==="always"?p.jsx(di,{...n,ref:t}):null});ac.displayName=it;var d0=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Ve(it,e.__scopeScrollArea),[i,s]=_.useState(!1);return _.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),s(!0)},d=()=>{l=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),p.jsx(ft,{present:r||i,children:p.jsx(lc,{"data-state":i?"visible":"hidden",...n,ref:t})})}),u0=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Ve(it,e.__scopeScrollArea),i=e.orientation==="horizontal",s=Hn(()=>l("SCROLL_END"),100),[a,l]=l0("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return _.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay,l]),_.useEffect(()=>{const c=o.viewport,d=i?"scrollLeft":"scrollTop";if(c){let f=c[d];const m=()=>{const u=c[d];f!==u&&(l("SCROLL"),s()),f=u};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[o.viewport,i,l,s]),p.jsx(ft,{present:r||a!=="hidden",children:p.jsx(di,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:be(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:be(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),lc=_.forwardRef((e,t)=>{const r=Ve(it,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,s]=_.useState(!1),a=e.orientation==="horizontal",l=Hn(()=>{if(r.viewport){const c=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;s(a?c:d)}},10);return ir(r.viewport,l),ir(r.content,l),p.jsx(ft,{present:n||i,children:p.jsx(di,{"data-state":i?"visible":"hidden",...o,ref:t})})}),di=_.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=Ve(it,e.__scopeScrollArea),i=_.useRef(null),s=_.useRef(0),[a,l]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=hc(a.viewport,a.content),d={...n,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:m=>i.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function f(m,u){return b0(m,s.current,a,u)}return r==="horizontal"?p.jsx(f0,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollLeft,u=pc(m,a,o.dir);i.current.style.transform=`translate3d(${u}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=f(m,o.dir))}}):r==="vertical"?p.jsx(h0,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollTop,u=pc(m,a);i.current.style.transform=`translate3d(0, ${u}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=f(m))}}):null}),f0=_.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=Ve(it,e.__scopeScrollArea),[s,a]=_.useState(),l=_.useRef(null),c=_e(t,l,i.onScrollbarXChange);return _.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(dc,{"data-orientation":"horizontal",...o,ref:c,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":$n(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),gc(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Wn(s.paddingLeft),paddingEnd:Wn(s.paddingRight)}})}})}),h0=_.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=Ve(it,e.__scopeScrollArea),[s,a]=_.useState(),l=_.useRef(null),c=_e(t,l,i.onScrollbarYChange);return _.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(dc,{"data-orientation":"vertical",...o,ref:c,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":$n(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),gc(m,f)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Wn(s.paddingTop),paddingEnd:Wn(s.paddingBottom)}})}})}),[p0,cc]=nc(it),dc=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:f,...m}=e,u=Ve(it,r),[x,h]=_.useState(null),b=_e(t,D=>h(D)),v=_.useRef(null),w=_.useRef(""),k=u.viewport,S=n.content-n.viewport,C=Le(d),O=Le(l),N=Hn(f,10);function I(D){if(v.current){const L=D.clientX-v.current.left,Z=D.clientY-v.current.top;c({x:L,y:Z})}}return _.useEffect(()=>{const D=L=>{const Z=L.target;(x==null?void 0:x.contains(Z))&&C(L,S)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[k,x,S,C]),_.useEffect(O,[n,O]),ir(x,N),ir(u.content,N),p.jsx(p0,{scope:r,scrollbar:x,hasThumb:o,onThumbChange:Le(i),onThumbPointerUp:Le(s),onThumbPositionChange:O,onThumbPointerDown:Le(a),children:p.jsx(Se.div,{...m,ref:b,style:{position:"absolute",...m.style},onPointerDown:be(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),v.current=x.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",u.viewport&&(u.viewport.style.scrollBehavior="auto"),I(D))}),onPointerMove:be(e.onPointerMove,I),onPointerUp:be(e.onPointerUp,D=>{const L=D.target;L.hasPointerCapture(D.pointerId)&&L.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=w.current,u.viewport&&(u.viewport.style.scrollBehavior=""),v.current=null})})})}),Un="ScrollAreaThumb",uc=_.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=cc(Un,e.__scopeScrollArea);return p.jsx(ft,{present:r||o.hasThumb,children:p.jsx(m0,{ref:t,...n})})}),m0=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=Ve(Un,r),s=cc(Un,r),{onThumbPositionChange:a}=s,l=_e(t,f=>s.onThumbChange(f)),c=_.useRef(void 0),d=Hn(()=>{c.current&&(c.current(),c.current=void 0)},100);return _.useEffect(()=>{const f=i.viewport;if(f){const m=()=>{if(d(),!c.current){const u=v0(f,a);c.current=u,a()}};return a(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[i.viewport,d,a]),p.jsx(Se.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:be(e.onPointerDownCapture,f=>{const u=f.target.getBoundingClientRect(),x=f.clientX-u.left,h=f.clientY-u.top;s.onThumbPointerDown({x,y:h})}),onPointerUp:be(e.onPointerUp,s.onThumbPointerUp)})});uc.displayName=Un;var ui="ScrollAreaCorner",fc=_.forwardRef((e,t)=>{const r=Ve(ui,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?p.jsx(g0,{...e,ref:t}):null});fc.displayName=ui;var g0=_.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=Ve(ui,r),[i,s]=_.useState(0),[a,l]=_.useState(0),c=!!(i&&a);return ir(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),ir(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),s(d)}),c?p.jsx(Se.div,{...n,ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Wn(e){return e?parseInt(e,10):0}function hc(e,t){const r=e/t;return isNaN(r)?0:r}function $n(e){const t=hc(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function b0(e,t,r,n="ltr"){const o=$n(r),i=o/2,s=t||i,a=o-s,l=r.scrollbar.paddingStart+s,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return mc([l,c],f)(e)}function pc(e,t,r="ltr"){const n=$n(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,s]:[s*-1,0],c=ko(e,l);return mc([0,s],[0,a])(c)}function mc(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function gc(e,t){return e>0&&e<t}var v0=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=r.left!==i.left,a=r.top!==i.top;(s||a)&&t(),r=i,n=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(n)};function Hn(e,t){const r=Le(e),n=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(n.current),[]),_.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ir(e,t){const r=Le(t);Ie(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var bc=oc,x0=sc,w0=ac,y0=uc,k0=fc;const vc=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(bc,{ref:n,className:pe("relative overflow-hidden",e),...r,children:[p.jsx(x0,{className:"h-full w-full rounded-[inherit]",children:t}),p.jsx(w0,{orientation:"vertical",className:"flex touch-none select-none transition-colors h-full w-1.5 border-l border-l-transparent p-px",children:p.jsx(y0,{className:"relative flex-1 rounded-full bg-zinc-700 hover:bg-zinc-600"})}),p.jsx(k0,{})]}));vc.displayName=bc.displayName;const xc=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),S0={activationConstraint:{distance:8}},_0={activationConstraint:{delay:200,tolerance:5}};function fi({layer:e,opts:t,dragHandleProps:r}){const{isSelected:n,isActive:o,isDragging:i,canDelete:s,onSelect:a,onOpenSettings:l,onDelete:c}=t,d=!!r;return p.jsxs("div",{className:pe("group flex items-center gap-2 pl-1 pr-2 py-2.5 rounded-lg text-left transition-all duration-200 cursor-pointer border-l-2",n?"bg-primary/[0.08] border-primary":o?"bg-zinc-800/30 border-emerald-500/60":"border-transparent hover:bg-zinc-800/40",i&&"opacity-50 shadow-lg",d?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[d?p.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-150 cursor-grab touch-none","aria-label":"Trascina per riordinare",...r,children:p.jsx(Gi,{size:12,className:"text-zinc-600"})}):p.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 pointer-events-none",children:p.jsx(Gi,{size:12,className:"text-zinc-600/50"})}),p.jsxs("button",{type:"button",onClick:a,className:"flex-1 min-w-0 text-left",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:pe("text-xs font-bold uppercase tracking-[0.06em] truncate",n?"text-primary":"text-zinc-500"),children:e.type}),o&&p.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),p.jsx("span",{className:"text-[11px] text-zinc-600 block truncate leading-snug mt-0.5",children:e.title??`${e.type} section`})]}),p.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[p.jsxs(Tr,{children:[p.jsx(Or,{asChild:!0,children:p.jsx(Ue,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-zinc-300",onClick:f=>{f.stopPropagation(),l(f)},children:p.jsx(Bd,{size:12})})}),p.jsx(nr,{children:"Settings"})]}),s&&p.jsxs(Tr,{children:[p.jsx(Or,{asChild:!0,children:p.jsx(Ue,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-destructive",onClick:f=>{f.stopPropagation(),c()},children:p.jsx(Kr,{size:12})})}),p.jsx(nr,{children:"Delete section"})]})]})]})}function C0({layer:e,opts:t}){const{attributes:r,listeners:n,setNodeRef:o,transform:i,transition:s,isDragging:a}=Ff({id:e.id,disabled:!t.canReorder}),l={transform:bt.Transform.toString(i),transition:s};return p.jsx("div",{ref:o,style:{...l,zIndex:a?Pe.studioDraggingRow:void 0},children:p.jsx(fi,{layer:e,opts:{...t,isDragging:a},dragHandleProps:t.canReorder?{...r,...n,"aria-roledescription":"elemento trascinabile"}:void 0})})}const wc=({selectedSection:e,pageData:t,allSectionsData:r=[],onUpdate:n,onUpdateSection:o,onClose:i,expandedItemPath:s=null,onReorderSection:a,allLayers:l=[],activeSectionId:c,onRequestScrollToSection:d,onDeleteSection:f,onAddSection:m,hasChanges:u=!1,onExportHTML:x,onSaveToFile:h,saveSuccessFeedback:b=!1,onResetToFile:v,showResetToFile:w=!1,pageSlugs:k=[],currentSlug:S="home",onPageChange:C})=>{const{schemas:O}=ur(),[N,I]=T.useState(!0),[D,L]=T.useState(null),[Z,j]=T.useState(null),[F,y]=T.useState(null),[H,Q]=T.useState(null),$=T.useRef(null),V=T.useRef(null),Y=du(lo(go,S0),lo(ys,_0),lo(po,{coordinateGetter:Wf})),J=T.useDeferredValue(e),z=e!=null&&(J==null?void 0:J.id)!==e.id,P=s&&s.length>0?s:F?[F]:null,K=P!=null&&P.length?{fieldKey:P[P.length-1].fieldKey,itemId:P[P.length-1].itemId}:null,G=T.useRef(s);T.useEffect(()=>{G.current!=null&&s==null&&y(null),G.current=s},[s]),T.useEffect(()=>{(e==null?void 0:e.id)!=null&&I(!1)},[e==null?void 0:e.id]);const te=()=>{const U=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const M=$.current;M&&M.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(U)},ue=T.useRef(N);T.useEffect(()=>{if(N&&!ue.current){const U=te();return ue.current=N,U}ue.current=N},[N]),T.useEffect(()=>{if(!K)return;const U=$.current;if(!U)return;const M=requestAnimationFrame(()=>{const q=U.querySelector("[data-jp-expanded-item]")??U.querySelector("[data-jp-focused-field]");q&&q.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(M)},[K]);const ee=U=>{I(!1),d==null||d(U)},ie=()=>{I(U=>{const M=!U;return M&&te(),M})},se=(U,M)=>{M.stopPropagation(),r.length>0&&o?Q(U):(I(!1),d==null||d(U))};T.useEffect(()=>{if(H==null)return;const U=M=>{M.key==="Escape"&&Q(null)};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[H]);const oe=U=>{D===U?(f==null||f(U),L(null)):(L(U),setTimeout(()=>L(null),3e3))},le=T.useMemo(()=>l.filter(U=>U.scope==="local").map(U=>U.id),[l]),fe=!!a&&le.length>0,xe=U=>{j(U.active.id)},g=U=>{j(null);const{active:M,over:q}=U;if(!q||M.id===q.id||!a)return;const ne=l.findIndex(he=>he.id===M.id),re=l.findIndex(he=>he.id===q.id);if(ne===-1||re===-1)return;const ae=ne<re?re:re-1;a(M.id,ae)},B=e?t.sections.find(U=>U.id===e.id):void 0,W=J?t.sections.find(U=>U.id===J.id):void 0,E=J?O[J.type]:void 0,A=l.length>0&&(N||!e),R=S?S.charAt(0).toUpperCase()+S.slice(1):"Select page",X=T.useMemo(()=>{const U=[];let M=null;for(const q of l){const ne=q.type.toUpperCase(),re=M!==null&&(M==="HEADER"&&ne!=="HEADER"||M!=="HEADER"&&M!=="FOOTER"&&ne==="FOOTER");U.push({layer:q,showSeparatorAbove:re}),M=ne}return U},[l]);return p.jsx(Vg,{children:p.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:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("h2",{className:"text-sm font-bold text-white",children:"Inspector"}),p.jsx("p",{className:"text-[10px] tracking-[0.06em] text-zinc-600 mt-0.5",children:e?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"text-primary font-bold",children:e.type}),p.jsx("span",{className:"text-zinc-700 mx-1.5",children:"|"}),p.jsx("span",{className:"uppercase",children:e.scope})]}):p.jsxs("span",{className:"text-zinc-600",children:[R," · ",l.length," sections"]})})]}),p.jsx(Ue,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":"Close Inspector",children:p.jsx(Lt,{size:14})})]}),k.length>0&&C&&p.jsx(a0,{pageSlugs:k,currentSlug:S,onPageChange:C,sectionCount:l.length,currentPageLabel:R}),l.length>0&&p.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-t border-zinc-800/50",children:[p.jsxs("button",{type:"button",onClick:ie,className:"flex items-center gap-2 flex-1 cursor-pointer min-w-0 text-left","aria-expanded":A,"aria-label":A?"Collapse Page Layers":"Expand Page Layers",children:[p.jsx(ro,{size:14,className:"text-zinc-500 shrink-0"}),p.jsx("span",{className:"text-[11px] font-semibold tracking-[0.04em] text-zinc-400",children:"Page Layers"}),p.jsxs("span",{className:"text-[10px] text-zinc-600",children:["(",l.length,")"]}),p.jsx(to,{size:13,className:pe("ml-auto text-zinc-600 transition-transform duration-200 shrink-0",!N&&"rotate-180")})]}),m!=null&&p.jsxs(Tr,{children:[p.jsx(Or,{asChild:!0,children:p.jsx(Ue,{variant:"ghost",size:"icon-sm",className:"text-zinc-500 hover:text-primary",onClick:m,children:p.jsx(no,{size:14})})}),p.jsx(nr,{children:"Add section"})]})]}),p.jsxs(vc,{className:"flex-1 min-h-0 flex flex-col",children:[p.jsx("div",{ref:$,className:"flex flex-col min-h-0",children:A&&p.jsxs("div",{className:"py-1",children:[p.jsxs(lf,{sensors:Y,collisionDetection:hu,modifiers:[Ef],onDragStart:xe,onDragEnd:g,accessibility:{announcements:{onDragStart:()=>"Sezione presa in carico. Usa i tasti freccia per spostare, Spazio per rilasciare.",onDragOver:({over:U})=>U?`Posizione ${le.indexOf(String(U.id))+1} di ${le.length}.`:void 0,onDragEnd:({over:U})=>U?"Sezione rilasciata in nuova posizione.":"Riposizionamento annullato.",onDragCancel:()=>"Riposizionamento annullato."}},children:[p.jsx(Of,{items:le,strategy:jf,children:p.jsx("div",{className:"px-2 space-y-0.5",children:X.map(({layer:U,showSeparatorAbove:M})=>p.jsxs(T.Fragment,{children:[M&&p.jsx("div",{className:"mx-3 border-t border-zinc-800/60 my-1"}),U.scope==="local"&&fe?p.jsx(C0,{layer:U,opts:{isSelected:(e==null?void 0:e.id)===U.id,isActive:c===U.id,isDragging:!1,canReorder:!0,canDelete:!!f,deleteConfirm:D===U.id,onSelect:()=>ee(U.id),onDelete:()=>oe(U.id),onOpenSettings:q=>se(U.id,q)}}):p.jsx("div",{children:p.jsx(fi,{layer:U,opts:{isSelected:(e==null?void 0:e.id)===U.id,isActive:c===U.id,isDragging:!1,canDelete:U.scope==="local"&&!!f,deleteConfirm:D===U.id,onSelect:()=>ee(U.id),onDelete:()=>oe(U.id),onOpenSettings:q=>se(U.id,q)}})})]},U.id))})}),p.jsx(Cf,{dropAnimation:{duration:200,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:Z?(()=>{const U=l.find(M=>M.id===Z);return U?p.jsx("div",{className:"px-2 w-full max-w-[var(--inspector-width,280px)]",children:p.jsx(fi,{layer:U,opts:{isSelected:!1,isActive:!1,isDragging:!0,canDelete:!1,deleteConfirm:!1,onSelect:()=>{},onDelete:()=>{},onOpenSettings:()=>{}},dragHandleProps:{"aria-hidden":!0}})}):null})():null})]}),D&&p.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 mx-2 rounded-md bg-amber-500/10 border border-amber-500/30",children:[p.jsx(Od,{size:12,className:"text-amber-500 shrink-0"}),p.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]})}),K&&B&&(()=>{const U=B.data||{};let M;if(P&&P.length>0){let q=U;for(const ae of P){const he=q==null?void 0:q[ae.fieldKey];ae.itemId!=null&&Array.isArray(he)?q=he.find(ve=>String(ve==null?void 0:ve.id)===String(ae.itemId))??null:q=he}const ne=q||{},re=K.fieldKey;M=(typeof ne.name=="string"?ne.name:null)??(typeof ne.title=="string"?ne.title:null)??(typeof ne.label=="string"?ne.label:null)??re.charAt(0).toUpperCase()+re.slice(1).replace(/([A-Z])/g," $1").trim()}else{const q=K.fieldKey;if(K.itemId!=null){const ae=(Array.isArray(U[q])?U[q]:[]).find(he=>String(he==null?void 0:he.id)===String(K.itemId))||{};M=(typeof ae.name=="string"?ae.name:null)??(typeof ae.title=="string"?ae.title:null)??(typeof ae.label=="string"?ae.label:null)??q}else M=q.charAt(0).toUpperCase()+q.slice(1).replace(/([A-Z])/g," $1").trim()}return p.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[p.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),p.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:M})]})})(),p.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&I(!1),children:e?z?p.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[p.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),p.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):E?(()=>{const M=Object.keys(E.shape).filter(he=>!xc.has(he)),q=(W==null?void 0:W.data)||{};if(M.length===0)return p.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const ne=P==null?void 0:P[0],re=(ne==null?void 0:ne.itemId)!=null?{[ne.fieldKey]:ne.itemId}:(K==null?void 0:K.itemId)!=null?{[K.fieldKey]:K.itemId}:void 0,ae=(ne==null?void 0:ne.fieldKey)??(K==null?void 0:K.fieldKey)??null;return p.jsx(Nr,{schema:E,data:q,onChange:he=>n(he),keys:M,expandedItemPath:P,expandedItemIdByField:re,focusedFieldKey:ae,onSidebarExpandedItemChange:y})})():p.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 ",(J==null?void 0:J.type)??e.type]}):p.jsx("p",{className:"text-xs text-zinc-600 text-center py-10",children:"Select a layer above or on the stage to edit."})})]}),p.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center gap-3 opacity-100 flex-wrap shrink-0",children:(x!=null||h!=null||v!=null)&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:pe("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",u?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),p.jsx("span",{className:pe("text-xs font-medium transition-colors duration-300 shrink-0",b?"text-emerald-400":u?"text-amber-500":"text-zinc-500"),children:b?"Salvato":u?"Unsaved Changes":"All Changes Saved"}),x!=null&&p.jsxs(Tr,{children:[p.jsx(Or,{asChild:!0,children:p.jsxs(Ue,{variant:"outline",size:"sm",className:"gap-1.5",onClick:x,children:[p.jsx(Zi,{size:12}),p.jsx("span",{children:"Bake HTML"})]})}),p.jsx(nr,{children:"Generate static HTML output"})]}),h!=null&&p.jsxs(Tr,{children:[p.jsx(Or,{asChild:!0,children:p.jsxs(Ue,{size:"sm",disabled:!u,className:"gap-1.5",onClick:U=>{U.preventDefault(),U.stopPropagation(),h()},children:[p.jsx(Ld,{size:12}),p.jsx("span",{children:"Save"})]})}),p.jsx(nr,{children:"Save (export JSON)"})]}),v!=null&&w&&p.jsx("button",{type:"button",onClick:v,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-400 hover:bg-zinc-800 hover:border-zinc-600 hover:text-zinc-300",title:"Ripristina la pagina dal file (elimina le modifiche in memoria)",children:p.jsx("span",{children:"Ripristina da file"})})]})}),H!=null&&r.length>0&&o!=null&&(()=>{const U=r.find(ve=>ve.id===H),M=l.find(ve=>ve.id===H);if(!U)return null;const q=(M==null?void 0:M.scope)==="global"?"global":"local",ne=U.type,re=O[ne],he=(re?Object.keys(re.shape):[]).filter(ve=>xc.has(ve)),me=U.data??{};return he.length===0?p.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-black/60 p-4",style:{zIndex:Pe.adminModal},role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:()=>Q(null),children:p.jsxs("div",{ref:V,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:ve=>ve.stopPropagation(),children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[p.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",ne]}),p.jsx("button",{type:"button",onClick:()=>Q(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:p.jsx(Lt,{size:18})})]}),p.jsx("div",{className:"p-4",children:p.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):p.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-black/60 p-4",style:{zIndex:Pe.adminModal},role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:ve=>ve.target===ve.currentTarget&&Q(null),children:p.jsxs("div",{ref:V,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:ve=>ve.stopPropagation(),children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[p.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",ne]}),p.jsx("button",{type:"button",onClick:()=>Q(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:p.jsx(Lt,{size:18})})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:p.jsx(Nr,{schema:re,data:me,onChange:ve=>{const st={...U.data,...ve};o(H,q,ne,st)},keys:he})})]})})})()]})})},yc=({draft:e,globalDraft:t,themeConfig:r,slug:n,selectedId:o,scrollToSectionId:i,onScrollRequested:s})=>{const a=T.useRef(null),l=T.useCallback(()=>{var c;(c=a.current)!=null&&c.contentWindow&&a.current.contentWindow.postMessage({type:Ce.UPDATE_DRAFTS,draft:e,globalDraft:t,themeConfig:r},"*")},[e,t,r]);return T.useEffect(()=>{l()},[l]),T.useEffect(()=>{const c=d=>{d.data.type===Ce.STAGE_READY&&l()};return window.addEventListener("message",c),()=>window.removeEventListener("message",c)},[l]),T.useEffect(()=>{var c;(c=a.current)!=null&&c.contentWindow&&a.current.contentWindow.postMessage({type:Ce.SYNC_SELECTION,selectedId:o},"*")},[o]),T.useEffect(()=>{var c;!i||!((c=a.current)!=null&&c.contentWindow)||(a.current.contentWindow.postMessage({type:Ce.REQUEST_SCROLL_TO_SECTION,sectionId:i},"*"),s==null||s())},[i,s]),p.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:p.jsx("iframe",{ref:a,src:`/admin/preview/${n}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},Vn={setTheme:e=>{const t=document.documentElement,{tokens:r}=e,n={"--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(n).forEach(([o,i])=>{t.style.setProperty(o,i)})}},kc=()=>{var u;const[e,t]=T.useState(null),[r,n]=T.useState(null),[o,i]=T.useState(null),[s,a]=T.useState(null),[l,c]=T.useState(!1);if(T.useEffect(()=>{const x=h=>{h.data.type===Ce.UPDATE_DRAFTS&&(t(h.data.draft),n(h.data.globalDraft),h.data.themeConfig&&Vn.setTheme(h.data.themeConfig)),h.data.type===Ce.SYNC_SELECTION&&i(h.data.selectedId),h.data.type===Ce.REQUEST_SCROLL_TO_SECTION&&a(h.data.sectionId??null),h.data.type===Ce.REQUEST_CLEAN_HTML&&(c(!0),setTimeout(()=>{const b=document.documentElement.outerHTML;window.parent.postMessage({type:Ce.SEND_CLEAN_HTML,html:b},"*"),c(!1)},50))};return window.addEventListener("message",x),window.parent.postMessage({type:Ce.STAGE_READY},"*"),()=>window.removeEventListener("message",x)},[]),T.useEffect(()=>{const x=h=>{var j,F,y,H,Q,$,V,Y;const b=h.target,v=h.clientX,w=h.clientY;let k=null,S=b;for(;S&&S!==document.body;){const J=(j=S.getAttribute)==null?void 0:j.call(S,"data-section-id"),z=(F=S.getAttribute)==null?void 0:F.call(S,"data-section-type"),P=(y=S.getAttribute)==null?void 0:y.call(S,"data-section-scope");if(J&&z&&P){k=S;break}S=S.parentElement}if(!k)return;h.preventDefault(),h.stopPropagation();const C=k.getAttribute("data-section-id"),O=k.getAttribute("data-section-type"),N=k.getAttribute("data-section-scope");if(!C||!O||!N)return;const I={id:C,type:O,scope:N};if(b===k){window.parent.postMessage({type:Ce.SECTION_SELECT,section:I},"*");return}const D=document.elementFromPoint(v,w)??b;if(!D||!k.contains(D)){window.parent.postMessage({type:Ce.SECTION_SELECT,section:I},"*");return}if(D===k){window.parent.postMessage({type:Ce.SECTION_SELECT,section:I},"*");return}const L=[];for(S=D;S&&S!==k;){const J=(H=S.getAttribute)==null?void 0:H.call(S,"data-jp-item-id"),z=(Q=S.getAttribute)==null?void 0:Q.call(S,"data-jp-item-field");J&&z&&L.push({fieldKey:z||"items",itemId:J}),S=S.parentElement}if(L.reverse(),L.length===0)for(S=D;S&&S!==k;){const J=($=S.getAttribute)==null?void 0:$.call(S,"data-jp-field");if(J){L.push({fieldKey:J});break}S=S.parentElement}if(L.length===0&&D){let J=null;const z=P=>{var G,te;const K=P.getBoundingClientRect();if(K.left<=v&&v<=K.right&&K.top<=w&&w<=K.bottom){for(let ue=0;ue<P.children.length;ue++)z(P.children[ue]);((G=P.getAttribute)!=null&&G.call(P,"data-jp-item-id")||(te=P.getAttribute)!=null&&te.call(P,"data-jp-field"))&&(J=P)}};if(z(D),J){const P=J,K=(V=P.getAttribute)==null?void 0:V.call(P,"data-jp-item-id"),G=(Y=P.getAttribute)==null?void 0:Y.call(P,"data-jp-field");K&&G?L.push({fieldKey:G||"items",itemId:K}):G&&L.push({fieldKey:G})}}const Z={type:Ce.SECTION_SELECT,section:I};if(L.length>0){Z.itemPath=L;const J=L[0];J.itemId!=null?(Z.itemField=J.fieldKey,Z.itemId=J.itemId):Z.itemField=J.fieldKey}window.parent.postMessage(Z,"*")};return document.addEventListener("click",x,!0),()=>document.removeEventListener("click",x,!0)},[]),T.useEffect(()=>{if(!s)return;const x=setTimeout(()=>a(null),600);return()=>clearTimeout(x)},[s]),!e||!r)return p.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 d=(u=r.header)==null?void 0:u.data,f={main:(d==null?void 0:d.links)??[]},m=x=>{window.parent.postMessage({type:Ce.ACTIVE_SECTION_CHANGED,activeSectionId:x},"*")};return p.jsx(Hr,{mode:l?"visitor":"studio",children:p.jsx("div",{className:l?"":"jp-ice-active",children:p.jsx(oo,{pageConfig:e,siteConfig:r,menuConfig:f,selectedId:l?null:o,scrollToSectionId:s,onActiveSectionChange:m})})})};function E0(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const Sc=({open:e,onClose:t,sectionTypes:r,sectionTypeLabels:n,onSelect:o})=>{if(T.useEffect(()=>{if(!e)return;const s=a=>{a.key==="Escape"&&t()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e,t]),!e)return null;const i=s=>(n==null?void 0:n[s])??E0(s);return p.jsxs("div",{className:"fixed inset-0 flex items-center justify-center p-4",style:{zIndex:Pe.adminModal},role:"dialog","aria-modal":"true","aria-labelledby":"jp-add-section-title",children:[p.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:t,"aria-hidden":"true"}),p.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:[p.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:p.jsx(ro,{size:18})}),p.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),p.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:p.jsx(Lt,{size:18})})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?p.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):p.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(s=>p.jsx("li",{role:"option",children:p.jsxs("button",{type:"button",onClick:()=>{o(s),t()},className:pe("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:[p.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:s}),p.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(s)})]})},s))})}),p.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:p.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},_c=()=>p.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:[p.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),p.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),p.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"})]}),A0='/*! 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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-900:oklch(39.6% .141 25.723);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-900:oklch(37.9% .146 265.522);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-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-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-primary:var(--primary);--color-primary-foreground:var(--primary-foreground);--color-destructive:var(--destructive);--color-ring:var(--ring)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-3{left:calc(var(--spacing)*3)}.z-50{z-index:50}.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)}.mx-1\\.5{margin-inline:calc(var(--spacing)*1.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-3{margin-inline:calc(var(--spacing)*3)}.my-1{margin-block:calc(var(--spacing)*1)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.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)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-20{height:calc(var(--spacing)*20)}.h-40{height:calc(var(--spacing)*40)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\\[45vh\\]{max-height:45vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[320px\\]{max-height:320px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-\\[18px\\]{min-height:18px}.min-h-\\[80px\\]{min-height:80px}.min-h-\\[240px\\]{min-height:240px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-3\\/4{width:75%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-\\[var\\(--radix-popover-trigger-width\\)\\]{width:var(--radix-popover-trigger-width)}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[var\\(--inspector-width\\,280px\\)\\]{max-width:var(--inspector-width,280px)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[18px\\]{min-width:18px}.min-w-\\[var\\(--radix-popover-trigger-width\\)\\]{min-width:var(--radix-popover-trigger-width)}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3{--tw-translate-x:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-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}.touch-none{touch-action:none}.resize-none{resize:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[inherit\\]{border-radius:inherit}.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-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-emerald-500\\/60{border-color:#00bb7f99}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\\/60{border-color:color-mix(in oklab,var(--color-emerald-500)60%,transparent)}}.border-primary{border-color:var(--color-primary)}.border-red-500\\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-900\\/30{border-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.border-red-900\\/30{border-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\\/80{border-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/80{border-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-zinc-800\\/50{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/50{border-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.border-zinc-800\\/60{border-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/60{border-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.border-l-transparent{border-left-color:#0000}.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{background-color:var(--color-black)}.bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/15{background-color:color-mix(in oklab,var(--color-blue-500)15%,transparent)}}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\\/\\[0\\.04\\]{background-color:#3080ff0a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/\\[0\\.04\\]{background-color:color-mix(in oklab,var(--color-blue-500)4%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\\/10{background-color:#155dfc1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\\/10{background-color:color-mix(in oklab,var(--color-blue-600)10%,transparent)}}.bg-destructive\\/15{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\\/15{background-color:color-mix(in oklab,var(--color-destructive)15%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-primary,.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-primary\\/\\[0\\.08\\]{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/\\[0\\.08\\]{background-color:color-mix(in oklab,var(--color-primary)8%,transparent)}}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-900\\/10{background-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.bg-red-900\\/10{background-color:color-mix(in oklab,var(--color-red-900)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\\/15{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/\\[0\\.01\\]{background-color:#ffffff03}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.01\\]{background-color:color-mix(in oklab,var(--color-white)1%,transparent)}}.bg-white\\/\\[0\\.02\\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-700\\/80{background-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\\/80{background-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\\/30{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/30{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.bg-zinc-800\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-800\\/60{background-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/60{background-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.bg-zinc-800\\/80{background-color:#27272acc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/80{background-color:color-mix(in oklab,var(--color-zinc-800)80%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/20{background-color:#18181b33}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/20{background-color:color-mix(in oklab,var(--color-zinc-900)20%,transparent)}}.bg-zinc-900\\/40{background-color:#18181b66}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/40{background-color:color-mix(in oklab,var(--color-zinc-900)40%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab,var(--color-zinc-900)60%,transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/80{background-color:#09090bcc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/80{background-color:color-mix(in oklab,var(--color-zinc-950)80%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab,red,red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab,var(--color-black)70%,transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.p-px{padding:1px}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-4{padding-right:calc(var(--spacing)*4)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-8{padding-left:calc(var(--spacing)*8)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-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-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\\[0\\.04em\\]{--tw-tracking:.04em;letter-spacing:.04em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.06em\\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.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-destructive{color:var(--color-destructive)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-600\\/50{color:#52525c80}@supports (color:color-mix(in lab,red,red)){.text-zinc-600\\/50{color:color-mix(in oklab,var(--color-zinc-600)50%,transparent)}}.text-zinc-700{color:var(--color-zinc-700)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_8px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black\\/30{--tw-shadow-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.shadow-black\\/30{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)30%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-blue-900\\/20{--tw-shadow-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.shadow-blue-900\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-900)20%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-primary\\/20{--tw-shadow-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.shadow-primary\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-primary)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-blue-500\\/40{--tw-ring-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.ring-blue-500\\/40{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.ring-zinc-800{--tw-ring-color:var(--color-zinc-800)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-zinc-900{--tw-ring-offset-color:var(--color-zinc-900)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.brightness-\\[0\\.6\\]{--tw-brightness:brightness(.6);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.brightness-\\[0\\.85\\]{--tw-brightness:brightness(.85);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-\\[border-color\\,opacity\\]{transition-property:border-color,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:border-dashed:is(:where(.group):hover *){--tw-border-style:dashed;border-style:dashed}.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:brightness-100:is(:where(.group):hover *){--tw-brightness:brightness(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-500\\/30:hover{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/30:hover{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\\:border-blue-500\\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/40:hover{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.hover\\:border-zinc-600:hover{border-color:var(--color-zinc-600)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:#3080ff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-blue-500)3%,transparent)}}.hover\\:bg-blue-600\\/20:hover{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/20:hover{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.hover\\:bg-destructive\\/25:hover{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/25:hover{background-color:color-mix(in oklab,var(--color-destructive)25%,transparent)}}.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-primary\\/90:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary)90%,transparent)}}.hover\\:bg-red-500\\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab,var(--color-red-500)25%,transparent)}}.hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-zinc-600:hover{background-color:var(--color-zinc-600)}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.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\\:bg-zinc-900:hover{background-color:var(--color-zinc-900)}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-destructive:hover{color:var(--color-destructive)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-red-200:hover{color:var(--color-red-200)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:opacity-90:hover{opacity:.9}.hover\\:ring-zinc-600:hover{--tw-ring-color:var(--color-zinc-600)}}.focus\\:bg-zinc-800:focus{background-color:var(--color-zinc-800)}.focus\\:text-white:focus{color:var(--color-white)}.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\\:border-zinc-600:focus-visible{border-color:var(--color-zinc-600)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:#3080ffcc}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)80%,transparent)}}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:var(--color-ring)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-zinc-900:focus-visible{--tw-ring-offset-color:var(--color-zinc-900)}.focus-visible\\:ring-offset-zinc-950:focus-visible{--tw-ring-offset-color:var(--color-zinc-950)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-primary\\/60:active{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.active\\:bg-primary\\/60:active{background-color:color-mix(in oklab,var(--color-primary)60%,transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=open\\]\\:border-zinc-800[data-state=open]{border-color:var(--color-zinc-800)}.data-\\[state\\=open\\]\\:bg-zinc-950[data-state=open]{background-color:var(--color-zinc-950)}.data-\\[state\\=open\\]\\:text-zinc-100[data-state=open]{color:var(--color-zinc-100)}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&\\>span\\]\\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\\[\\&\\>span\\]\\:flex>span{display:flex}.\\[\\&\\>span\\]\\:items-center>span{align-items:center}.\\[\\&\\>span\\]\\:gap-2>span{gap:calc(var(--spacing)*2)}}:root{--jp-layer-radix-portal:500;--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:var(--jp-layer-radix-portal)!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-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';class N0 extends T.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("[JsonPages Engine]",t,r)}render(){return this.state.hasError&&this.state.error?p.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:[p.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),p.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}}const Cc=({pageRegistry:e,siteConfig:t,menuConfig:r,tenantCss:n,adminCss:o,NotFoundComponent:i})=>{const{slug:s="home"}=Ze.useParams(),[a,l]=T.useState(null);T.useEffect(()=>{const m=document.getElementById("jp-baked-state");if(m!=null&&m.textContent)try{const u=JSON.parse(m.textContent);l(u),Vn.setTheme(u.theme)}catch(u){console.error("Failed to parse baked state",u)}},[]);const c=a?a.page:e[s],d=a?a.site:t,f=a?a.menu:r;return c?p.jsx(Zr,{mode:"tenant",tenantCss:n,adminCss:o,children:p.jsx(Hr,{mode:"visitor",children:p.jsx(oo,{pageConfig:c,siteConfig:d,menuConfig:f})})}):p.jsx(i,{})},Ec=({pageRegistry:e,siteConfig:t,menuConfig:r,themeConfig:n,tenantCss:o,adminCss:i,addSectionConfig:s,addableSectionTypes:a,saveToFile:l,exportHTML:c})=>{const{slug:d="home"}=Ze.useParams(),f=Ze.useNavigate(),m=Object.keys(e).sort((g,B)=>g==="home"?-1:B==="home"?1:g.localeCompare(B)),[u,x]=T.useState(null),[h,b]=T.useState(!1),[v,w]=T.useState(!1),[k,S]=T.useState(()=>{var g;try{const B=JSON.parse(JSON.stringify(t??{}));B.identity||(B.identity={title:"Site"}),B.pages||(B.pages=[]);const W=(g=B.header)==null?void 0:g.data;return W&&(r!=null&&r.main)&&(W.links=JSON.parse(JSON.stringify(r.main))),B}catch{return{identity:{title:"Site"},pages:[]}}}),[C,O]=T.useState(null),[N,I]=T.useState(null),[D,L]=T.useState(null),[Z,j]=T.useState(null),[F,y]=T.useState(!1),[H,Q]=T.useState(400),$=360,V=920,Y=T.useCallback(g=>{g.preventDefault();const B=g.currentTarget;B.setPointerCapture(g.pointerId);const W=g.clientX,E=H,A=X=>{const U=W-X.clientX,M=Math.min(V,Math.max($,E+U));Q(M)},R=()=>{B.releasePointerCapture(g.pointerId),B.removeEventListener("pointermove",A),B.removeEventListener("pointerup",R),B.removeEventListener("pointercancel",R),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",B.addEventListener("pointermove",A),B.addEventListener("pointerup",R),B.addEventListener("pointercancel",R)},[H]),J=u?[...k.header?[{id:k.header.id,type:k.header.type,scope:"global",title:"Header"}]:[],...u.sections.map(g=>{var B,W;return{id:g.id,type:g.type,scope:"local",title:((B=g.data)==null?void 0:B.title)??((W=g.data)==null?void 0:W.titleHighlight)}}),...k.footer?[{id:k.footer.id,type:k.footer.type,scope:"global",title:"Footer"}]:[]]:[];T.useEffect(()=>{const g=document.documentElement,B=g.style.getPropertyValue("--jp-layer-radix-portal");return g.style.setProperty("--jp-layer-radix-portal",String(Pe.radixPortal)),()=>{B?g.style.setProperty("--jp-layer-radix-portal",B):g.style.removeProperty("--jp-layer-radix-portal")}},[]),T.useEffect(()=>{const g=e[d];g&&x(JSON.parse(JSON.stringify(g))),O(null),I(null),b(!1)},[d,e]);const z=T.useCallback(()=>{const g=e[d];g&&x(JSON.parse(JSON.stringify(g))),O(null),I(null),b(!1)},[d,e]),P=T.useCallback((g,B,W)=>{const E=[...W.sections],A=E.findIndex(U=>U.id===g);if(A===-1||B<0||B>=E.length)return;const[R]=E.splice(A,1),X=B>A?B-1:B;E.splice(Math.min(X,E.length),0,R),x({...W,sections:E}),b(!0)},[]),K=T.useCallback(g=>{var B;if(g.origin===window.location.origin){if(g.data.type===Ce.SECTION_SELECT){O(g.data.section);const W=g.data.itemPath;if(Array.isArray(W)&&W.length>0)I(W.map(E=>({fieldKey:E.fieldKey,...E.itemId!=null?{itemId:String(E.itemId)}:{}})));else{const E=g.data.itemField,A=g.data.itemId;I(typeof E=="string"?[{fieldKey:E,...A!=null?{itemId:String(A)}:{}}]:null)}}if(g.data.type===Ce.ACTIVE_SECTION_CHANGED&&L(g.data.activeSectionId??null),g.data.type==="jsonpages:section-reorder"&&u){const{sectionId:W,newIndex:E}=g.data;typeof W=="string"&&typeof E=="number"&&E>=0&&P(W,E,u)}if(g.data.type===Ce.SEND_CLEAN_HTML){if(!u)return;const W=(B=k.header)==null?void 0:B.data,E={page:u,site:k,menu:{main:(W==null?void 0:W.links)??[]},theme:n};c(E,d,g.data.html),b(!1)}}},[u,k,d,n,P,c]);T.useEffect(()=>(window.addEventListener("message",K),()=>window.removeEventListener("message",K)),[K]);const G=T.useCallback(g=>{const B=J.find(W=>W.id===g);B&&O({id:B.id,type:B.type,scope:B.scope}),I(null),j(g)},[J]),te=T.useCallback(()=>{j(null)},[]),ue=T.useCallback(g=>{x(B=>B&&{...B,sections:B.sections.filter(W=>W.id!==g)}),b(!0),O(B=>(B==null?void 0:B.id)===g?null:B)},[]),ee=g=>{if(!(!C||!u))if(b(!0),C.scope==="global")C.type==="header"&&k.header!=null?S({...k,header:{...k.header,data:g}}):C.type==="footer"&&k.footer!=null&&S({...k,footer:{...k.footer,data:g}});else{const B=u.sections.map(W=>W.id===C.id?{...W,data:g}:W);x({...u,sections:B})}},ie=T.useCallback((g,B,W,E)=>{var A,R;if(b(!0),B==="global")((A=k.header)==null?void 0:A.id)===g?S({...k,header:{...k.header,data:E}}):((R=k.footer)==null?void 0:R.id)===g&&S({...k,footer:{...k.footer,data:E}});else if(u){const X=u.sections.map(U=>U.id===g?{...U,data:E}:U);x({...u,sections:X})}},[u,k]),se=()=>{var B;const g=document.querySelector("iframe");(B=g==null?void 0:g.contentWindow)==null||B.postMessage({type:Ce.REQUEST_CLEAN_HTML},"*")},oe=()=>{var W;if(!u||!l)return;const g=(W=k.header)==null?void 0:W.data,B={page:u,site:k,menu:{main:(g==null?void 0:g.links)??[]},theme:n};l(B,d).then(()=>{b(!1),w(!0)}).catch(E=>{console.error("[JsonPages] saveToFile failed",E);const A=E instanceof Error?E.message:String(E);alert(`Save to file failed: ${A}`)})},le=g=>{var E;if(!u)return;const B=((E=s==null?void 0:s.getDefaultSectionData)==null?void 0:E.call(s,g))??{},W={id:crypto.randomUUID(),type:g,data:B,settings:void 0};x({...u,sections:[...u.sections,W]}),b(!0),O({id:W.id,type:g,scope:"local"})};if(!u)return p.jsx("div",{children:"Loading Studio..."});const fe=(C==null?void 0:C.scope)==="global"?{sections:[k.header,k.footer].filter(g=>g!=null)}:u,xe=[...k.header?[k.header]:[],...u.sections,...k.footer?[k.footer]:[]];return p.jsx(Zr,{mode:"admin",tenantCss:o,adminCss:i,children:p.jsx(Hr,{mode:"studio",children:p.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[p.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[p.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:p.jsx(yc,{draft:u,globalDraft:k,themeConfig:n,slug:d,selectedId:C==null?void 0:C.id,scrollToSectionId:Z,onScrollRequested:te})}),p.jsxs("div",{className:"flex shrink-0 relative h-full",style:{width:H,minWidth:$,maxWidth:V,zIndex:Pe.inspectorPanel},children:[p.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:Pe.inspectorResizeHandle},onPointerDown:Y}),p.jsx(wc,{selectedSection:C,pageData:fe,allSectionsData:xe,onUpdate:ee,onUpdateSection:ie,onClose:()=>{O(null),I(null)},expandedItemPath:N,onReorderSection:u?(g,B)=>P(g,B,u):void 0,allLayers:J,activeSectionId:D,onRequestScrollToSection:G,onDeleteSection:u?ue:void 0,onAddSection:a.length>0?()=>y(!0):void 0,hasChanges:h,onExportHTML:se,onSaveToFile:l!=null?oe:void 0,saveSuccessFeedback:v,onResetToFile:z,pageSlugs:m,currentSlug:d,onPageChange:m.length>1?g=>f(`/admin/${g}`):void 0})]})]}),p.jsx(Sc,{open:F,onClose:()=>y(!1),sectionTypes:a,sectionTypeLabels:s==null?void 0:s.sectionTypeLabels,onSelect:le})]})})})},z0=({tenantCss:e,adminCss:t})=>p.jsx(Zr,{mode:"tenant",tenantCss:e,adminCss:t,children:p.jsx(kc,{})});function j0({config:e}){var b,v,w;const{registry:t={},schemas:r={},pages:n={},siteConfig:o,themeConfig:i,menuConfig:s,themeCss:a,addSection:l,NotFoundComponent:c=_c}=e,d=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(k=>k!=="header"&&k!=="footer"),f={exportJSON:((b=e.persistence)==null?void 0:b.exportJSON)??wi,exportHTML:((v=e.persistence)==null?void 0:v.exportHTML)??yi,saveToFile:(w=e.persistence)==null?void 0:w.saveToFile},m=typeof(a==null?void 0:a.tenant)=="string"?a.tenant:"",u=typeof(a==null?void 0:a.admin)=="string"?a.admin:A0,[x,h]=T.useState(!1);return T.useEffect(()=>{try{i!=null&&i.tokens&&Vn.setTheme(i)}catch(k){console.warn("[JsonPages] setTheme failed",k)}h(!0)},[i]),x?p.jsx(N0,{children:p.jsx(Hi,{config:{registry:t,schemas:r,tenantId:e.tenantId??"default",assets:e.assets},children:p.jsx(Ze.BrowserRouter,{children:p.jsxs(Ze.Routes,{children:[p.jsx(Ze.Route,{path:"/",element:p.jsx(Cc,{pageRegistry:n,siteConfig:o,menuConfig:s,tenantCss:m,adminCss:u,NotFoundComponent:c})}),p.jsx(Ze.Route,{path:"/:slug",element:p.jsx(Cc,{pageRegistry:n,siteConfig:o,menuConfig:s,tenantCss:m,adminCss:u,NotFoundComponent:c})}),p.jsx(Ze.Route,{path:"/admin",element:p.jsx(Ec,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:i,tenantCss:m,adminCss:u,addSectionConfig:l,addableSectionTypes:d,saveToFile:f.saveToFile,exportHTML:f.exportHTML})}),p.jsx(Ze.Route,{path:"/admin/:slug",element:p.jsx(Ec,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:i,tenantCss:m,adminCss:u,addSectionConfig:l,addableSectionTypes:d,saveToFile:f.saveToFile,exportHTML:f.exportHTML})}),p.jsx(Ze.Route,{path:"/admin/preview/:slug",element:p.jsx(z0,{tenantCss:m,adminCss:u})}),p.jsx(Ze.Route,{path:"*",element:p.jsx(c,{})})]})})})}):p.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 T0=({hasChanges:e,onExportJSON:t,onExportHTML:r,onAddSection:n})=>p.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:[p.jsx("div",{className:"flex items-center gap-3",children:n!=null&&p.jsxs("button",{type:"button",onClick:n,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:[p.jsx(Wd,{size:14}),p.jsx("span",{children:"Add section"})]})}),p.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:p.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium transition-all border bg-zinc-900 border-zinc-700 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[p.jsx(Zi,{size:14}),p.jsx("span",{children:"Bake HTML"})]}),p.jsxs("button",{onClick:t,disabled:!e,className:pe("flex items-center gap-2 px-4 py-1.5 rounded-md text-xs font-bold transition-all shadow-lg",e?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[p.jsx(Pd,{size:14}),p.jsx("span",{children:"Export JSON"})]})]})]});ye.AddSectionLibrary=Sc,ye.AdminSidebar=wc,ye.ConfigProvider=Hi,ye.ControlBar=T0,ye.DefaultNotFound=_c,ye.FormFactory=Nr,ye.InputWidgets=Ar,ye.JsonPagesEngine=j0,ye.PageRenderer=oo,ye.PreviewEntry=kc,ye.STUDIO_EVENTS=Ce,ye.SectionRenderer=fr,ye.StudioProvider=Hr,ye.StudioStage=yc,ye.ThemeLoader=Zr,ye.cn=pe,ye.exportBakedHTML=yi,ye.exportProjectJSON=wi,ye.resolveAssetUrl=Pl,ye.themeManager=Vn,ye.useConfig=ur,ye.useStudio=Yi,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})}));
|