@olonjs/core 1.0.83 → 1.0.84
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/index.d.ts +23 -0
- package/dist/olonjs-core.js +5599 -5343
- package/dist/olonjs-core.umd.cjs +58 -58
- package/package.json +1 -1
package/dist/olonjs-core.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Se,
|
|
1
|
+
(function(Se,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("react"),require("react-router-dom"),require("zod"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom","zod","react-dom"],N):(Se=typeof globalThis<"u"?globalThis:Se||self,N(Se.OlonJsCore={},Se.React,Se.ReactRouterDOM,Se.z,Se.ReactDOM))})(this,(function(Se,N,Ke,Pe,ht){"use strict";function Ci(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 E=Ci(N),$r=Ci(ht);function Ei(e,t){return t.header!=null&&e["global-header"]!==!1}const Ae={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",INLINE_FIELD_UPDATE:"jsonpages:inline-field-update",INLINE_FLUSHED:"jsonpages:inline-flushed",REQUEST_SCROLL_TO_SECTION:"jsonpages:request-scroll-to-section",REQUEST_INLINE_FLUSH:"jsonpages:request-inline-flush",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 zc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Wr(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 to={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`,K+=i(N,2),K+=O.magic,K+=i(k,2),K+=i(_,2),K+=i(oe.crc32,4),K+=i(oe.compressedSize,4),K+=i(oe.uncompressedSize,4),K+=i(I.length,2),K+=i(B.length,2),{fileRecord:u.LOCAL_FILE_HEADER+K+I+B,dirRecord:u.CENTRAL_FILE_HEADER+i(ee,2)+K+i(F.length,2)+"\0\0\0\0"+i(P,4)+i(b,4)+I+B+F}}var s=r("../utils"),l=r("../stream/GenericWorker"),c=r("../utf8"),d=r("../crc32"),u=r("../signature");function g(f,w,p,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=p,this.encodeFileName=b,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(g,l),g.prototype.push=function(f){var w=f.meta.percent||0,p=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,l.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:p?(w+100*(p-b-1))/p:100}}))},g.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var w=this.streamFiles&&!f.file.dir;if(w){var p=a(f,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},g.prototype.closedSource=function(f){this.accumulate=!1;var w=this.streamFiles&&!f.file.dir,p=a(f,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),w)this.push({data:(function(b){return u.DATA_DESCRIPTOR+i(b.crc32,4)+i(b.compressedSize,4)+i(b.uncompressedSize,4)})(f),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},g.prototype.flush=function(){for(var f=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var p=this.bytesWritten-f,b=(function(m,x,k,_,S){var O=s.transformTo("string",S(_));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(m,2)+i(m,2)+i(x,4)+i(k,4)+i(O.length,2)+O})(this.dirRecords.length,p,f,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},g.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},g.prototype.registerPrevious=function(f){this._sources.push(f);var w=this;return f.on("data",function(p){w.processChunk(p)}),f.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),f.on("error",function(p){w.error(p)}),this},g.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))},g.prototype.error=function(f){var w=this._sources;if(!l.prototype.error.call(this,f))return!1;for(var p=0;p<w.length;p++)try{w[p].error(f)}catch{}return!0},g.prototype.lock=function(){l.prototype.lock.call(this);for(var f=this._sources,w=0;w<f.length;w++)f[w].lock()},n.exports=g},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,n,o){var i=r("../compressions"),a=r("./ZipFileWorker");o.generateWorker=function(s,l,c){var d=new a(l.streamFiles,c,l.platform,l.encodeFileName),u=0;try{s.forEach(function(g,f){u++;var w=(function(x,k){var _=x||k,S=i[_];if(!S)throw new Error(_+" is not a valid compression method !");return S})(f.options.compression,l.compression),p=f.options.compressionOptions||l.compressionOptions||{},b=f.dir,m=f.date;f._compressWorker(w,p).withStreamInfo("file",{name:g,dir:b,date:m,comment:f.comment||"",unixPermissions:f.unixPermissions,dosPermissions:f.dosPermissions}).pipe(d)}),d.entriesCount=u}catch(g){d.error(g)}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 a=new i;for(var s in this)typeof this[s]!="function"&&(a[s]=this[s]);return a}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(a,s){return new i().loadAsync(a,s)},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"),a=r("./external"),s=r("./utf8"),l=r("./zipEntries"),c=r("./stream/Crc32Probe"),d=r("./nodejsUtils");function u(g){return new a.Promise(function(f,w){var p=g.decompressed.getContentWorker().pipe(new c);p.on("error",function(b){w(b)}).on("end",function(){p.streamInfo.crc32!==g.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):f()}).resume()})}n.exports=function(g,f){var w=this;return f=i.extend(f||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),d.isNode&&d.isStream(g)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",g,!0,f.optimizedBinaryString,f.base64).then(function(p){var b=new l(f);return b.load(p),b}).then(function(p){var b=[a.Promise.resolve(p)],m=p.files;if(f.checkCRC32)for(var x=0;x<m.length;x++)b.push(u(m[x]));return a.Promise.all(b)}).then(function(p){for(var b=p.shift(),m=b.files,x=0;x<m.length;x++){var k=m[x],_=k.fileNameStr,S=i.resolve(k.fileNameStr);w.file(S,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:f.createFolders}),k.dir||(w.file(S).unsafeOriginalName=_)}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"),a=r("../stream/GenericWorker");function s(l,c){a.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}i.inherits(s,a),s.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()})},s.prototype.pause=function(){return!!a.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,n,o){var i=r("readable-stream").Readable;function a(s,l,c){i.call(this,l),this._helper=s;var d=this;s.on("data",function(u,g){d.push(u)||d._helper.pause(),c&&c(g)}).on("error",function(u){d.emit("error",u)}).on("end",function(){d.push(null)})}r("../utils").inherits(a,i),a.prototype._read=function(){this._helper.resume()},n.exports=a},{"../utils":32,"readable-stream":16}],14:[function(r,n,o){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,a){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,a);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,a)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var a=new Buffer(i);return a.fill(0),a},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(S,O,j){var I,R=s.getTypeOf(O),$=s.extend(j||{},d);$.date=$.date||new Date,$.compression!==null&&($.compression=$.compression.toUpperCase()),typeof $.unixPermissions=="string"&&($.unixPermissions=parseInt($.unixPermissions,8)),$.unixPermissions&&16384&$.unixPermissions&&($.dir=!0),$.dosPermissions&&16&$.dosPermissions&&($.dir=!0),$.dir&&(S=m(S)),$.createFolders&&(I=b(S))&&x.call(this,I,!0);var F=R==="string"&&$.binary===!1&&$.base64===!1;j&&j.binary!==void 0||($.binary=!F),(O instanceof u&&O.uncompressedSize===0||$.dir||!O||O.length===0)&&($.base64=!1,$.binary=!0,O="",$.compression="STORE",R="string");var C=null;C=O instanceof u||O instanceof l?O:w.isNode&&w.isStream(O)?new p(S,O):s.prepareContent(S,O,$.binary,$.optimizedBinaryString,$.base64);var M=new g(S,C,$);this.files[S]=M}var a=r("./utf8"),s=r("./utils"),l=r("./stream/GenericWorker"),c=r("./stream/StreamHelper"),d=r("./defaults"),u=r("./compressedObject"),g=r("./zipObject"),f=r("./generate"),w=r("./nodejsUtils"),p=r("./nodejs/NodejsStreamInputAdapter"),b=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var O=S.lastIndexOf("/");return 0<O?S.substring(0,O):""},m=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},x=function(S,O){return O=O!==void 0?O:d.createFolders,S=m(S),this.files[S]||i.call(this,S,null,{dir:!0,createFolders:O}),this.files[S]};function k(S){return Object.prototype.toString.call(S)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(S){var O,j,I;for(O in this.files)I=this.files[O],(j=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&S(j,I)},filter:function(S){var O=[];return this.forEach(function(j,I){S(j,I)&&O.push(I)}),O},file:function(S,O,j){if(arguments.length!==1)return S=this.root+S,i.call(this,S,O,j),this;if(k(S)){var I=S;return this.filter(function($,F){return!F.dir&&I.test($)})}var R=this.files[this.root+S];return R&&!R.dir?R:null},folder:function(S){if(!S)return this;if(k(S))return this.filter(function(R,$){return $.dir&&S.test(R)});var O=this.root+S,j=x.call(this,O),I=this.clone();return I.root=j.name,I},remove:function(S){S=this.root+S;var O=this.files[S];if(O||(S.slice(-1)!=="/"&&(S+="/"),O=this.files[S]),O&&!O.dir)delete this.files[S];else for(var j=this.filter(function(R,$){return $.name.slice(0,S.length)===S}),I=0;I<j.length;I++)delete this.files[j[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(S){var O,j={};try{if((j=s.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.utf8encode})).type=j.type.toLowerCase(),j.compression=j.compression.toUpperCase(),j.type==="binarystring"&&(j.type="string"),!j.type)throw new Error("No output type specified.");s.checkSupport(j.type),j.platform!=="darwin"&&j.platform!=="freebsd"&&j.platform!=="linux"&&j.platform!=="sunos"||(j.platform="UNIX"),j.platform==="win32"&&(j.platform="DOS");var I=j.comment||this.comment||"";O=f.generateWorker(this,j,I)}catch(R){(O=new l("error")).error(R)}return new c(O,j.type||"string",j.mimeType)},generateAsync:function(S,O){return this.generateInternalStream(S).accumulate(O)},generateNodeStream:function(S,O){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(O)}};n.exports=_},{"./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 a(s){i.call(this,s);for(var l=0;l<this.data.length;l++)s[l]=255&s[l]}r("../utils").inherits(a,i),a.prototype.byteAt=function(s){return this.data[this.zero+s]},a.prototype.lastIndexOfSignature=function(s){for(var l=s.charCodeAt(0),c=s.charCodeAt(1),d=s.charCodeAt(2),u=s.charCodeAt(3),g=this.length-4;0<=g;--g)if(this.data[g]===l&&this.data[g+1]===c&&this.data[g+2]===d&&this.data[g+3]===u)return g-this.zero;return-1},a.prototype.readAndCheckSignature=function(s){var l=s.charCodeAt(0),c=s.charCodeAt(1),d=s.charCodeAt(2),u=s.charCodeAt(3),g=this.readData(4);return l===g[0]&&c===g[1]&&d===g[2]&&u===g[3]},a.prototype.readData=function(s){if(this.checkOffset(s),s===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},n.exports=a},{"../utils":32,"./DataReader":18}],18:[function(r,n,o){var i=r("../utils");function a(s){this.data=s,this.length=s.length,this.index=0,this.zero=0}a.prototype={checkOffset:function(s){this.checkIndex(this.index+s)},checkIndex:function(s){if(this.length<this.zero+s||s<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+s+"). Corrupted zip ?")},setIndex:function(s){this.checkIndex(s),this.index=s},skip:function(s){this.setIndex(this.index+s)},byteAt:function(){},readInt:function(s){var l,c=0;for(this.checkOffset(s),l=this.index+s-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=s,c},readString:function(s){return i.transformTo("string",this.readData(s))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var s=this.readInt(4);return new Date(Date.UTC(1980+(s>>25&127),(s>>21&15)-1,s>>16&31,s>>11&31,s>>5&63,(31&s)<<1))}},n.exports=a},{"../utils":32}],19:[function(r,n,o){var i=r("./Uint8ArrayReader");function a(s){i.call(this,s)}r("../utils").inherits(a,i),a.prototype.readData=function(s){this.checkOffset(s);var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},n.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,n,o){var i=r("./DataReader");function a(s){i.call(this,s)}r("../utils").inherits(a,i),a.prototype.byteAt=function(s){return this.data.charCodeAt(this.zero+s)},a.prototype.lastIndexOfSignature=function(s){return this.data.lastIndexOf(s)-this.zero},a.prototype.readAndCheckSignature=function(s){return s===this.readData(4)},a.prototype.readData=function(s){this.checkOffset(s);var l=this.data.slice(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},n.exports=a},{"../utils":32,"./DataReader":18}],21:[function(r,n,o){var i=r("./ArrayReader");function a(s){i.call(this,s)}r("../utils").inherits(a,i),a.prototype.readData=function(s){if(this.checkOffset(s),s===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+s);return this.index+=s,l},n.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(r,n,o){var i=r("../utils"),a=r("../support"),s=r("./ArrayReader"),l=r("./StringReader"),c=r("./NodeBufferReader"),d=r("./Uint8ArrayReader");n.exports=function(u){var g=i.getTypeOf(u);return i.checkSupport(g),g!=="string"||a.uint8array?g==="nodebuffer"?new c(u):a.uint8array?new d(i.transformTo("uint8array",u)):new s(i.transformTo("array",u)):new l(u)}},{"../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"),a=r("../utils");function s(l){i.call(this,"ConvertWorker to "+l),this.destType=l}a.inherits(s,i),s.prototype.processChunk=function(l){this.push({data:a.transformTo(this.destType,l.data),meta:l.meta})},n.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(r,n,o){var i=r("./GenericWorker"),a=r("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(s,i),s.prototype.processChunk=function(l){this.streamInfo.crc32=a(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,n,o){var i=r("../utils"),a=r("./GenericWorker");function s(l){a.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(s,a),s.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}a.prototype.processChunk.call(this,l)},n.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(r,n,o){var i=r("../utils"),a=r("./GenericWorker");function s(l){a.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(s,a),s.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.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=s},{"../utils":32,"./GenericWorker":28}],28:[function(r,n,o){function i(a){this.name=a||"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(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,s){return this._listeners[a].push(s),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,s){if(this._listeners[a])for(var l=0;l<this._listeners[a].length;l++)this._listeners[a][l].call(this,s)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var s=this;return a.on("data",function(l){s.processChunk(l)}),a.on("end",function(){s.end()}),a.on("error",function(l){s.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 a=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,s){return this.extraStreamInfo[a]=s,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},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 a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},n.exports=i},{}],29:[function(r,n,o){var i=r("../utils"),a=r("./ConvertWorker"),s=r("./GenericWorker"),l=r("../base64"),c=r("../support"),d=r("../external"),u=null;if(c.nodestream)try{u=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function g(w,p){return new d.Promise(function(b,m){var x=[],k=w._internalType,_=w._outputType,S=w._mimeType;w.on("data",function(O,j){x.push(O),p&&p(j)}).on("error",function(O){x=[],m(O)}).on("end",function(){try{var O=(function(j,I,R){switch(j){case"blob":return i.newBlob(i.transformTo("arraybuffer",I),R);case"base64":return l.encode(I);default:return i.transformTo(j,I)}})(_,(function(j,I){var R,$=0,F=null,C=0;for(R=0;R<I.length;R++)C+=I[R].length;switch(j){case"string":return I.join("");case"array":return Array.prototype.concat.apply([],I);case"uint8array":for(F=new Uint8Array(C),R=0;R<I.length;R++)F.set(I[R],$),$+=I[R].length;return F;case"nodebuffer":return Buffer.concat(I);default:throw new Error("concat : unsupported type '"+j+"'")}})(k,x),S);b(O)}catch(j){m(j)}x=[]}).resume()})}function f(w,p,b){var m=p;switch(p){case"blob":case"arraybuffer":m="uint8array";break;case"base64":m="string"}try{this._internalType=m,this._outputType=p,this._mimeType=b,i.checkSupport(m),this._worker=w.pipe(new a(m)),w.lock()}catch(x){this._worker=new s("error"),this._worker.error(x)}}f.prototype={accumulate:function(w){return g(this,w)},on:function(w,p){var b=this;return w==="data"?this._worker.on(w,function(m){p.call(b,m.data,m.meta)}):this._worker.on(w,function(){i.delay(p,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 u(this,{objectMode:this._outputType!=="nodebuffer"},w)}},n.exports=f},{"../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 a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(i),o.blob=a.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"),a=r("./support"),s=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 u(){l.call(this,"utf-8 decode"),this.leftOver=null}function g(){l.call(this,"utf-8 encode")}o.utf8encode=function(f){return a.nodebuffer?s.newBufferFrom(f,"utf-8"):(function(w){var p,b,m,x,k,_=w.length,S=0;for(x=0;x<_;x++)(64512&(b=w.charCodeAt(x)))==55296&&x+1<_&&(64512&(m=w.charCodeAt(x+1)))==56320&&(b=65536+(b-55296<<10)+(m-56320),x++),S+=b<128?1:b<2048?2:b<65536?3:4;for(p=a.uint8array?new Uint8Array(S):new Array(S),x=k=0;k<S;x++)(64512&(b=w.charCodeAt(x)))==55296&&x+1<_&&(64512&(m=w.charCodeAt(x+1)))==56320&&(b=65536+(b-55296<<10)+(m-56320),x++),b<128?p[k++]=b:(b<2048?p[k++]=192|b>>>6:(b<65536?p[k++]=224|b>>>12:(p[k++]=240|b>>>18,p[k++]=128|b>>>12&63),p[k++]=128|b>>>6&63),p[k++]=128|63&b);return p})(f)},o.utf8decode=function(f){return a.nodebuffer?i.transformTo("nodebuffer",f).toString("utf-8"):(function(w){var p,b,m,x,k=w.length,_=new Array(2*k);for(p=b=0;p<k;)if((m=w[p++])<128)_[b++]=m;else if(4<(x=c[m]))_[b++]=65533,p+=x-1;else{for(m&=x===2?31:x===3?15:7;1<x&&p<k;)m=m<<6|63&w[p++],x--;1<x?_[b++]=65533:m<65536?_[b++]=m:(m-=65536,_[b++]=55296|m>>10&1023,_[b++]=56320|1023&m)}return _.length!==b&&(_.subarray?_=_.subarray(0,b):_.length=b),i.applyFromCharCode(_)})(f=i.transformTo(a.uint8array?"uint8array":"array",f))},i.inherits(u,l),u.prototype.processChunk=function(f){var w=i.transformTo(a.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var p=w;(w=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),w.set(p,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var b=(function(x,k){var _;for((k=k||x.length)>x.length&&(k=x.length),_=k-1;0<=_&&(192&x[_])==128;)_--;return _<0||_===0?k:_+c[x[_]]>k?_:k})(w),m=w;b!==w.length&&(a.uint8array?(m=w.subarray(0,b),this.leftOver=w.subarray(b,w.length)):(m=w.slice(0,b),this.leftOver=w.slice(b,w.length))),this.push({data:o.utf8decode(m),meta:f.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=u,i.inherits(g,l),g.prototype.processChunk=function(f){this.push({data:o.utf8encode(f.data),meta:f.meta})},o.Utf8EncodeWorker=g},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,n,o){var i=r("./support"),a=r("./base64"),s=r("./nodejsUtils"),l=r("./external");function c(p){return p}function d(p,b){for(var m=0;m<p.length;++m)b[m]=255&p.charCodeAt(m);return b}r("setimmediate"),o.newBlob=function(p,b){o.checkSupport("blob");try{return new Blob([p],{type:b})}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return m.append(p),m.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(p,b,m){var x=[],k=0,_=p.length;if(_<=m)return String.fromCharCode.apply(null,p);for(;k<_;)b==="array"||b==="nodebuffer"?x.push(String.fromCharCode.apply(null,p.slice(k,Math.min(k+m,_)))):x.push(String.fromCharCode.apply(null,p.subarray(k,Math.min(k+m,_)))),k+=m;return x.join("")},stringifyByChar:function(p){for(var b="",m=0;m<p.length;m++)b+=String.fromCharCode(p[m]);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,s.allocBuffer(1)).length===1}catch{return!1}})()}};function g(p){var b=65536,m=o.getTypeOf(p),x=!0;if(m==="uint8array"?x=u.applyCanBeUsed.uint8array:m==="nodebuffer"&&(x=u.applyCanBeUsed.nodebuffer),x)for(;1<b;)try{return u.stringifyByChunk(p,m,b)}catch{b=Math.floor(b/2)}return u.stringifyByChar(p)}function f(p,b){for(var m=0;m<p.length;m++)b[m]=p[m];return b}o.applyFromCharCode=g;var w={};w.string={string:c,array:function(p){return d(p,new Array(p.length))},arraybuffer:function(p){return w.string.uint8array(p).buffer},uint8array:function(p){return d(p,new Uint8Array(p.length))},nodebuffer:function(p){return d(p,s.allocBuffer(p.length))}},w.array={string:g,array:c,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return s.newBufferFrom(p)}},w.arraybuffer={string:function(p){return g(new Uint8Array(p))},array:function(p){return f(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:c,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return s.newBufferFrom(new Uint8Array(p))}},w.uint8array={string:g,array:function(p){return f(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:c,nodebuffer:function(p){return s.newBufferFrom(p)}},w.nodebuffer={string:g,array:function(p){return f(p,new Array(p.length))},arraybuffer:function(p){return w.nodebuffer.uint8array(p).buffer},uint8array:function(p){return f(p,new Uint8Array(p.length))},nodebuffer:c},o.transformTo=function(p,b){if(b=b||"",!p)return b;o.checkSupport(p);var m=o.getTypeOf(b);return w[m][p](b)},o.resolve=function(p){for(var b=p.split("/"),m=[],x=0;x<b.length;x++){var k=b[x];k==="."||k===""&&x!==0&&x!==b.length-1||(k===".."?m.pop():m.push(k))}return m.join("/")},o.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":i.nodebuffer&&s.isBuffer(p)?"nodebuffer":i.uint8array&&p instanceof Uint8Array?"uint8array":i.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(p){if(!i[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(p){var b,m,x="";for(m=0;m<(p||"").length;m++)x+="\\x"+((b=p.charCodeAt(m))<16?"0":"")+b.toString(16).toUpperCase();return x},o.delay=function(p,b,m){setImmediate(function(){p.apply(m||null,b||[])})},o.inherits=function(p,b){function m(){}m.prototype=b.prototype,p.prototype=new m},o.extend=function(){var p,b,m={};for(p=0;p<arguments.length;p++)for(b in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],b)&&m[b]===void 0&&(m[b]=arguments[p][b]);return m},o.prepareContent=function(p,b,m,x,k){return l.Promise.resolve(b).then(function(_){return i.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)&&typeof FileReader<"u"?new l.Promise(function(S,O){var j=new FileReader;j.onload=function(I){S(I.target.result)},j.onerror=function(I){O(I.target.error)},j.readAsArrayBuffer(_)}):_}).then(function(_){var S=o.getTypeOf(_);return S?(S==="arraybuffer"?_=o.transformTo("uint8array",_):S==="string"&&(k?_=a.decode(_):m&&x!==!0&&(_=(function(O){return d(O,i.uint8array?new Uint8Array(O.length):new Array(O.length))})(_))),_):l.Promise.reject(new Error("Can't read the data of '"+p+"'. 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"),a=r("./utils"),s=r("./signature"),l=r("./zipEntry"),c=r("./support");function d(u){this.files=[],this.loadOptions=u}d.prototype={checkSignature:function(u){if(!this.reader.readAndCheckSignature(u)){this.reader.index-=4;var g=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(g)+", expected "+a.pretty(u)+")")}},isSignature:function(u,g){var f=this.reader.index;this.reader.setIndex(u);var w=this.reader.readString(4)===g;return this.reader.setIndex(f),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 u=this.reader.readData(this.zipCommentLength),g=c.uint8array?"uint8array":"array",f=a.transformTo(g,u);this.zipComment=this.loadOptions.decodeFileName(f)},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 u,g,f,w=this.zip64EndOfCentralSize-44;0<w;)u=this.reader.readInt(2),g=this.reader.readInt(4),f=this.reader.readData(g),this.zip64ExtensibleData[u]={id:u,length:g,value:f}},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 u,g;for(u=0;u<this.files.length;u++)g=this.files[u],this.reader.setIndex(g.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),g.readLocalPart(this.reader),g.handleUTF8(),g.processAttributes()},readCentralDir:function(){var u;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(u=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(u);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 u=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(u<0)throw this.isSignature(0,s.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(u);var g=u;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,(u=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(u),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.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(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var f=this.centralDirOffset+this.centralDirSize;this.zip64&&(f+=20,f+=12+this.zip64EndOfCentralSize);var w=g-f;if(0<w)this.isSignature(g,s.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(u){this.reader=i(u)},load:function(u){this.prepareReader(u),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"),a=r("./utils"),s=r("./compressedObject"),l=r("./crc32"),c=r("./utf8"),d=r("./compressions"),u=r("./support");function g(f,w){this.options=f,this.loadOptions=w}g.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(f){var w,p;if(f.skip(22),this.fileNameLength=f.readInt(2),p=f.readInt(2),this.fileName=f.readData(this.fileNameLength),f.skip(p),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 m in d)if(Object.prototype.hasOwnProperty.call(d,m)&&d[m].magic===b)return d[m];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,w,f.readData(this.compressedSize))},readCentralPart:function(f){this.versionMadeBy=f.readInt(2),f.skip(2),this.bitFlag=f.readInt(2),this.compressionMethod=f.readString(2),this.date=f.readDate(),this.crc32=f.readInt(4),this.compressedSize=f.readInt(4),this.uncompressedSize=f.readInt(4);var w=f.readInt(2);if(this.extraFieldsLength=f.readInt(2),this.fileCommentLength=f.readInt(2),this.diskNumberStart=f.readInt(2),this.internalFileAttributes=f.readInt(2),this.externalFileAttributes=f.readInt(4),this.localHeaderOffset=f.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");f.skip(w),this.readExtraFields(f),this.parseZIP64ExtraField(f),this.fileComment=f.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var f=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var w,p,b,m=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4<m;)w=f.readInt(2),p=f.readInt(2),b=f.readData(p),this.extraFields[w]={id:w,length:p,value:b};f.setIndex(m)},handleUTF8:function(){var f=u.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 p=a.transformTo(f,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var m=a.transformTo(f,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(m)}}},findExtraFieldUnicodePath:function(){var f=this.extraFields[28789];if(f){var w=i(f.value);return w.readInt(1)!==1||l(this.fileName)!==w.readInt(4)?null:c.utf8decode(w.readData(f.length-5))}return null},findExtraFieldUnicodeComment:function(){var f=this.extraFields[25461];if(f){var w=i(f.value);return w.readInt(1)!==1||l(this.fileComment)!==w.readInt(4)?null:c.utf8decode(w.readData(f.length-5))}return null}},n.exports=g},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,n,o){function i(w,p,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=p,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var a=r("./stream/StreamHelper"),s=r("./stream/DataWorker"),l=r("./utf8"),c=r("./compressedObject"),d=r("./stream/GenericWorker");i.prototype={internalStream:function(w){var p=null,b="string";try{if(!w)throw new Error("No output type specified.");var m=(b=w.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),p=this._decompressWorker();var x=!this._dataBinary;x&&!m&&(p=p.pipe(new l.Utf8EncodeWorker)),!x&&m&&(p=p.pipe(new l.Utf8DecodeWorker))}catch(k){(p=new d("error")).error(k)}return new a(p,b,"")},async:function(w,p){return this.internalStream(w).accumulate(p)},nodeStream:function(w,p){return this.internalStream(w||"nodebuffer").toNodejsStream(p)},_compressWorker:function(w,p){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,p)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof d?this._data:new s(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],g=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)i.prototype[u[f]]=g;n.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,n,o){(function(i){var a,s,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var c=0,d=new l(w),u=i.document.createTextNode("");d.observe(u,{characterData:!0}),a=function(){u.data=c=++c%2}}else if(i.setImmediate||i.MessageChannel===void 0)a="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var p=i.document.createElement("script");p.onreadystatechange=function(){w(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},i.document.documentElement.appendChild(p)}:function(){setTimeout(w,0)};else{var g=new i.MessageChannel;g.port1.onmessage=w,a=function(){g.port2.postMessage(0)}}var f=[];function w(){var p,b;s=!0;for(var m=f.length;m;){for(b=f,f=[],p=-1;++p<m;)b[p]();m=f.length}s=!1}n.exports=function(p){f.push(p)!==1||s||a()}}).call(this,typeof ht<"u"?ht:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,n,o){var i=r("immediate");function a(){}var s={},l=["REJECTED"],c=["FULFILLED"],d=["PENDING"];function u(m){if(typeof m!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,m!==a&&p(this,m)}function g(m,x,k){this.promise=m,typeof x=="function"&&(this.onFulfilled=x,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function f(m,x,k){i(function(){var _;try{_=x(k)}catch(S){return s.reject(m,S)}_===m?s.reject(m,new TypeError("Cannot resolve promise with itself")):s.resolve(m,_)})}function w(m){var x=m&&m.then;if(m&&(typeof m=="object"||typeof m=="function")&&typeof x=="function")return function(){x.apply(m,arguments)}}function p(m,x){var k=!1;function _(j){k||(k=!0,s.reject(m,j))}function S(j){k||(k=!0,s.resolve(m,j))}var O=b(function(){x(S,_)});O.status==="error"&&_(O.value)}function b(m,x){var k={};try{k.value=m(x),k.status="success"}catch(_){k.status="error",k.value=_}return k}(n.exports=u).prototype.finally=function(m){if(typeof m!="function")return this;var x=this.constructor;return this.then(function(k){return x.resolve(m()).then(function(){return k})},function(k){return x.resolve(m()).then(function(){throw k})})},u.prototype.catch=function(m){return this.then(null,m)},u.prototype.then=function(m,x){if(typeof m!="function"&&this.state===c||typeof x!="function"&&this.state===l)return this;var k=new this.constructor(a);return this.state!==d?f(k,this.state===c?m:x,this.outcome):this.queue.push(new g(k,m,x)),k},g.prototype.callFulfilled=function(m){s.resolve(this.promise,m)},g.prototype.otherCallFulfilled=function(m){f(this.promise,this.onFulfilled,m)},g.prototype.callRejected=function(m){s.reject(this.promise,m)},g.prototype.otherCallRejected=function(m){f(this.promise,this.onRejected,m)},s.resolve=function(m,x){var k=b(w,x);if(k.status==="error")return s.reject(m,k.value);var _=k.value;if(_)p(m,_);else{m.state=c,m.outcome=x;for(var S=-1,O=m.queue.length;++S<O;)m.queue[S].callFulfilled(x)}return m},s.reject=function(m,x){m.state=l,m.outcome=x;for(var k=-1,_=m.queue.length;++k<_;)m.queue[k].callRejected(x);return m},u.resolve=function(m){return m instanceof this?m:s.resolve(new this(a),m)},u.reject=function(m){var x=new this(a);return s.reject(x,m)},u.all=function(m){var x=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=m.length,_=!1;if(!k)return this.resolve([]);for(var S=new Array(k),O=0,j=-1,I=new this(a);++j<k;)R(m[j],j);return I;function R($,F){x.resolve($).then(function(C){S[F]=C,++O!==k||_||(_=!0,s.resolve(I,S))},function(C){_||(_=!0,s.reject(I,C))})}},u.race=function(m){var x=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=m.length,_=!1;if(!k)return this.resolve([]);for(var S=-1,O=new this(a);++S<k;)j=m[S],x.resolve(j).then(function(I){_||(_=!0,s.resolve(O,I))},function(I){_||(_=!0,s.reject(O,I))});var j;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"),a=r("./utils/common"),s=r("./utils/strings"),l=r("./zlib/messages"),c=r("./zlib/zstream"),d=Object.prototype.toString,u=0,g=-1,f=0,w=8;function p(m){if(!(this instanceof p))return new p(m);this.options=a.assign({level:g,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},m||{});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!==u)throw new Error(l[k]);if(x.header&&i.deflateSetHeader(this.strm,x.header),x.dictionary){var _;if(_=typeof x.dictionary=="string"?s.string2buf(x.dictionary):d.call(x.dictionary)==="[object ArrayBuffer]"?new Uint8Array(x.dictionary):x.dictionary,(k=i.deflateSetDictionary(this.strm,_))!==u)throw new Error(l[k]);this._dict_set=!0}}function b(m,x){var k=new p(x);if(k.push(m,!0),k.err)throw k.msg||l[k.err];return k.result}p.prototype.push=function(m,x){var k,_,S=this.strm,O=this.options.chunkSize;if(this.ended)return!1;_=x===~~x?x:x===!0?4:0,typeof m=="string"?S.input=s.string2buf(m):d.call(m)==="[object ArrayBuffer]"?S.input=new Uint8Array(m):S.input=m,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new a.Buf8(O),S.next_out=0,S.avail_out=O),(k=i.deflate(S,_))!==1&&k!==u)return this.onEnd(k),!(this.ended=!0);S.avail_out!==0&&(S.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(s.buf2binstring(a.shrinkBuf(S.output,S.next_out))):this.onData(a.shrinkBuf(S.output,S.next_out)))}while((0<S.avail_in||S.avail_out===0)&&k!==1);return _===4?(k=i.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===u):_!==2||(this.onEnd(u),!(S.avail_out=0))},p.prototype.onData=function(m){this.chunks.push(m)},p.prototype.onEnd=function(m){m===u&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},o.Deflate=p,o.deflate=b,o.deflateRaw=function(m,x){return(x=x||{}).raw=!0,b(m,x)},o.gzip=function(m,x){return(x=x||{}).gzip=!0,b(m,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"),a=r("./utils/common"),s=r("./utils/strings"),l=r("./zlib/constants"),c=r("./zlib/messages"),d=r("./zlib/zstream"),u=r("./zlib/gzheader"),g=Object.prototype.toString;function f(p){if(!(this instanceof f))return new f(p);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},p||{});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)||p&&p.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 m=i.inflateInit2(this.strm,b.windowBits);if(m!==l.Z_OK)throw new Error(c[m]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function w(p,b){var m=new f(b);if(m.push(p,!0),m.err)throw m.msg||c[m.err];return m.result}f.prototype.push=function(p,b){var m,x,k,_,S,O,j=this.strm,I=this.options.chunkSize,R=this.options.dictionary,$=!1;if(this.ended)return!1;x=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof p=="string"?j.input=s.binstring2buf(p):g.call(p)==="[object ArrayBuffer]"?j.input=new Uint8Array(p):j.input=p,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new a.Buf8(I),j.next_out=0,j.avail_out=I),(m=i.inflate(j,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&R&&(O=typeof R=="string"?s.string2buf(R):g.call(R)==="[object ArrayBuffer]"?new Uint8Array(R):R,m=i.inflateSetDictionary(this.strm,O)),m===l.Z_BUF_ERROR&&$===!0&&(m=l.Z_OK,$=!1),m!==l.Z_STREAM_END&&m!==l.Z_OK)return this.onEnd(m),!(this.ended=!0);j.next_out&&(j.avail_out!==0&&m!==l.Z_STREAM_END&&(j.avail_in!==0||x!==l.Z_FINISH&&x!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=s.utf8border(j.output,j.next_out),_=j.next_out-k,S=s.buf2string(j.output,k),j.next_out=_,j.avail_out=I-_,_&&a.arraySet(j.output,j.output,k,_,0),this.onData(S)):this.onData(a.shrinkBuf(j.output,j.next_out)))),j.avail_in===0&&j.avail_out===0&&($=!0)}while((0<j.avail_in||j.avail_out===0)&&m!==l.Z_STREAM_END);return m===l.Z_STREAM_END&&(x=l.Z_FINISH),x===l.Z_FINISH?(m=i.inflateEnd(this.strm),this.onEnd(m),this.ended=!0,m===l.Z_OK):x!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(j.avail_out=0))},f.prototype.onData=function(p){this.chunks.push(p)},f.prototype.onEnd=function(p){p===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},o.Inflate=f,o.inflate=w,o.inflateRaw=function(p,b){return(b=b||{}).raw=!0,w(p,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 u in d)d.hasOwnProperty(u)&&(l[u]=d[u])}}return l},o.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var a={arraySet:function(l,c,d,u,g){if(c.subarray&&l.subarray)l.set(c.subarray(d,d+u),g);else for(var f=0;f<u;f++)l[g+f]=c[d+f]},flattenChunks:function(l){var c,d,u,g,f,w;for(c=u=0,d=l.length;c<d;c++)u+=l[c].length;for(w=new Uint8Array(u),c=g=0,d=l.length;c<d;c++)f=l[c],w.set(f,g),g+=f.length;return w}},s={arraySet:function(l,c,d,u,g){for(var f=0;f<u;f++)l[g+f]=c[d+f]},flattenChunks:function(l){return[].concat.apply([],l)}};o.setTyped=function(l){l?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,a)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,s))},o.setTyped(i)},{}],42:[function(r,n,o){var i=r("./common"),a=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch{a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{s=!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(u,g){if(g<65537&&(u.subarray&&s||!u.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(u,g));for(var f="",w=0;w<g;w++)f+=String.fromCharCode(u[w]);return f}l[254]=l[254]=1,o.string2buf=function(u){var g,f,w,p,b,m=u.length,x=0;for(p=0;p<m;p++)(64512&(f=u.charCodeAt(p)))==55296&&p+1<m&&(64512&(w=u.charCodeAt(p+1)))==56320&&(f=65536+(f-55296<<10)+(w-56320),p++),x+=f<128?1:f<2048?2:f<65536?3:4;for(g=new i.Buf8(x),p=b=0;b<x;p++)(64512&(f=u.charCodeAt(p)))==55296&&p+1<m&&(64512&(w=u.charCodeAt(p+1)))==56320&&(f=65536+(f-55296<<10)+(w-56320),p++),f<128?g[b++]=f:(f<2048?g[b++]=192|f>>>6:(f<65536?g[b++]=224|f>>>12:(g[b++]=240|f>>>18,g[b++]=128|f>>>12&63),g[b++]=128|f>>>6&63),g[b++]=128|63&f);return g},o.buf2binstring=function(u){return d(u,u.length)},o.binstring2buf=function(u){for(var g=new i.Buf8(u.length),f=0,w=g.length;f<w;f++)g[f]=u.charCodeAt(f);return g},o.buf2string=function(u,g){var f,w,p,b,m=g||u.length,x=new Array(2*m);for(f=w=0;f<m;)if((p=u[f++])<128)x[w++]=p;else if(4<(b=l[p]))x[w++]=65533,f+=b-1;else{for(p&=b===2?31:b===3?15:7;1<b&&f<m;)p=p<<6|63&u[f++],b--;1<b?x[w++]=65533:p<65536?x[w++]=p:(p-=65536,x[w++]=55296|p>>10&1023,x[w++]=56320|1023&p)}return d(x,w)},o.utf8border=function(u,g){var f;for((g=g||u.length)>u.length&&(g=u.length),f=g-1;0<=f&&(192&u[f])==128;)f--;return f<0||f===0?g:f+l[u[f]]>g?f:g}},{"./common":41}],43:[function(r,n,o){n.exports=function(i,a,s,l){for(var c=65535&i|0,d=i>>>16&65535|0,u=0;s!==0;){for(s-=u=2e3<s?2e3:s;d=d+(c=c+a[l++]|0)|0,--u;);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 a,s=[],l=0;l<256;l++){a=l;for(var c=0;c<8;c++)a=1&a?3988292384^a>>>1:a>>>1;s[l]=a}return s})();n.exports=function(a,s,l,c){var d=i,u=c+l;a^=-1;for(var g=c;g<u;g++)a=a>>>8^d[255&(a^s[g])];return-1^a}},{}],46:[function(r,n,o){var i,a=r("../utils/common"),s=r("./trees"),l=r("./adler32"),c=r("./crc32"),d=r("./messages"),u=0,g=4,f=0,w=-2,p=-1,b=4,m=2,x=8,k=9,_=286,S=30,O=19,j=2*_+1,I=15,R=3,$=258,F=$+R+1,C=42,M=113,y=1,B=2,re=3,W=4;function H(v,Y){return v.msg=d[Y],Y}function Z(v){return(v<<1)-(4<v?9:0)}function oe(v){for(var Y=v.length;0<=--Y;)v[Y]=0}function N(v){var Y=v.state,V=Y.pending;V>v.avail_out&&(V=v.avail_out),V!==0&&(a.arraySet(v.output,Y.pending_buf,Y.pending_out,V,v.next_out),v.next_out+=V,Y.pending_out+=V,v.total_out+=V,v.avail_out-=V,Y.pending-=V,Y.pending===0&&(Y.pending_out=0))}function P(v,Y){s._tr_flush_block(v,0<=v.block_start?v.block_start:-1,v.strstart-v.block_start,Y),v.block_start=v.strstart,N(v.strm)}function ee(v,Y){v.pending_buf[v.pending++]=Y}function K(v,Y){v.pending_buf[v.pending++]=Y>>>8&255,v.pending_buf[v.pending++]=255&Y}function Q(v,Y){var V,T,A=v.max_chain_length,L=v.strstart,q=v.prev_length,te=v.nice_match,U=v.strstart>v.w_size-F?v.strstart-(v.w_size-F):0,ne=v.window,ce=v.w_mask,ae=v.prev,D=v.strstart+$,G=ne[L+q-1],X=ne[L+q];v.prev_length>=v.good_match&&(A>>=2),te>v.lookahead&&(te=v.lookahead);do if(ne[(V=Y)+q]===X&&ne[V+q-1]===G&&ne[V]===ne[L]&&ne[++V]===ne[L+1]){L+=2,V++;do;while(ne[++L]===ne[++V]&&ne[++L]===ne[++V]&&ne[++L]===ne[++V]&&ne[++L]===ne[++V]&&ne[++L]===ne[++V]&&ne[++L]===ne[++V]&&ne[++L]===ne[++V]&&ne[++L]===ne[++V]&&L<D);if(T=$-(D-L),L=D-$,q<T){if(v.match_start=Y,te<=(q=T))break;G=ne[L+q-1],X=ne[L+q]}}while((Y=ae[Y&ce])>U&&--A!=0);return q<=v.lookahead?q:v.lookahead}function ue(v){var Y,V,T,A,L,q,te,U,ne,ce,ae=v.w_size;do{if(A=v.window_size-v.lookahead-v.strstart,v.strstart>=ae+(ae-F)){for(a.arraySet(v.window,v.window,ae,ae,0),v.match_start-=ae,v.strstart-=ae,v.block_start-=ae,Y=V=v.hash_size;T=v.head[--Y],v.head[Y]=ae<=T?T-ae:0,--V;);for(Y=V=ae;T=v.prev[--Y],v.prev[Y]=ae<=T?T-ae:0,--V;);A+=ae}if(v.strm.avail_in===0)break;if(q=v.strm,te=v.window,U=v.strstart+v.lookahead,ne=A,ce=void 0,ce=q.avail_in,ne<ce&&(ce=ne),V=ce===0?0:(q.avail_in-=ce,a.arraySet(te,q.input,q.next_in,ce,U),q.state.wrap===1?q.adler=l(q.adler,te,ce,U):q.state.wrap===2&&(q.adler=c(q.adler,te,ce,U)),q.next_in+=ce,q.total_in+=ce,ce),v.lookahead+=V,v.lookahead+v.insert>=R)for(L=v.strstart-v.insert,v.ins_h=v.window[L],v.ins_h=(v.ins_h<<v.hash_shift^v.window[L+1])&v.hash_mask;v.insert&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[L+R-1])&v.hash_mask,v.prev[L&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=L,L++,v.insert--,!(v.lookahead+v.insert<R)););}while(v.lookahead<F&&v.strm.avail_in!==0)}function J(v,Y){for(var V,T;;){if(v.lookahead<F){if(ue(v),v.lookahead<F&&Y===u)return y;if(v.lookahead===0)break}if(V=0,v.lookahead>=R&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+R-1])&v.hash_mask,V=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart),V!==0&&v.strstart-V<=v.w_size-F&&(v.match_length=Q(v,V)),v.match_length>=R)if(T=s._tr_tally(v,v.strstart-v.match_start,v.match_length-R),v.lookahead-=v.match_length,v.match_length<=v.max_lazy_match&&v.lookahead>=R){for(v.match_length--;v.strstart++,v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+R-1])&v.hash_mask,V=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart,--v.match_length!=0;);v.strstart++}else v.strstart+=v.match_length,v.match_length=0,v.ins_h=v.window[v.strstart],v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+1])&v.hash_mask;else T=s._tr_tally(v,0,v.window[v.strstart]),v.lookahead--,v.strstart++;if(T&&(P(v,!1),v.strm.avail_out===0))return y}return v.insert=v.strstart<R-1?v.strstart:R-1,Y===g?(P(v,!0),v.strm.avail_out===0?re:W):v.last_lit&&(P(v,!1),v.strm.avail_out===0)?y:B}function se(v,Y){for(var V,T,A;;){if(v.lookahead<F){if(ue(v),v.lookahead<F&&Y===u)return y;if(v.lookahead===0)break}if(V=0,v.lookahead>=R&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+R-1])&v.hash_mask,V=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart),v.prev_length=v.match_length,v.prev_match=v.match_start,v.match_length=R-1,V!==0&&v.prev_length<v.max_lazy_match&&v.strstart-V<=v.w_size-F&&(v.match_length=Q(v,V),v.match_length<=5&&(v.strategy===1||v.match_length===R&&4096<v.strstart-v.match_start)&&(v.match_length=R-1)),v.prev_length>=R&&v.match_length<=v.prev_length){for(A=v.strstart+v.lookahead-R,T=s._tr_tally(v,v.strstart-1-v.prev_match,v.prev_length-R),v.lookahead-=v.prev_length-1,v.prev_length-=2;++v.strstart<=A&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+R-1])&v.hash_mask,V=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart),--v.prev_length!=0;);if(v.match_available=0,v.match_length=R-1,v.strstart++,T&&(P(v,!1),v.strm.avail_out===0))return y}else if(v.match_available){if((T=s._tr_tally(v,0,v.window[v.strstart-1]))&&P(v,!1),v.strstart++,v.lookahead--,v.strm.avail_out===0)return y}else v.match_available=1,v.strstart++,v.lookahead--}return v.match_available&&(T=s._tr_tally(v,0,v.window[v.strstart-1]),v.match_available=0),v.insert=v.strstart<R-1?v.strstart:R-1,Y===g?(P(v,!0),v.strm.avail_out===0?re:W):v.last_lit&&(P(v,!1),v.strm.avail_out===0)?y:B}function de(v,Y,V,T,A){this.good_length=v,this.max_lazy=Y,this.nice_length=V,this.max_chain=T,this.func=A}function ie(){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 a.Buf16(2*j),this.dyn_dtree=new a.Buf16(2*(2*S+1)),this.bl_tree=new a.Buf16(2*(2*O+1)),oe(this.dyn_ltree),oe(this.dyn_dtree),oe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(I+1),this.heap=new a.Buf16(2*_+1),oe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*_+1),oe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function fe(v){var Y;return v&&v.state?(v.total_in=v.total_out=0,v.data_type=m,(Y=v.state).pending=0,Y.pending_out=0,Y.wrap<0&&(Y.wrap=-Y.wrap),Y.status=Y.wrap?C:M,v.adler=Y.wrap===2?0:1,Y.last_flush=u,s._tr_init(Y),f):H(v,w)}function me(v){var Y=fe(v);return Y===f&&(function(V){V.window_size=2*V.w_size,oe(V.head),V.max_lazy_match=i[V.level].max_lazy,V.good_match=i[V.level].good_length,V.nice_match=i[V.level].nice_length,V.max_chain_length=i[V.level].max_chain,V.strstart=0,V.block_start=0,V.lookahead=0,V.insert=0,V.match_length=V.prev_length=R-1,V.match_available=0,V.ins_h=0})(v.state),Y}function ye(v,Y,V,T,A,L){if(!v)return w;var q=1;if(Y===p&&(Y=6),T<0?(q=0,T=-T):15<T&&(q=2,T-=16),A<1||k<A||V!==x||T<8||15<T||Y<0||9<Y||L<0||b<L)return H(v,w);T===8&&(T=9);var te=new ie;return(v.state=te).strm=v,te.wrap=q,te.gzhead=null,te.w_bits=T,te.w_size=1<<te.w_bits,te.w_mask=te.w_size-1,te.hash_bits=A+7,te.hash_size=1<<te.hash_bits,te.hash_mask=te.hash_size-1,te.hash_shift=~~((te.hash_bits+R-1)/R),te.window=new a.Buf8(2*te.w_size),te.head=new a.Buf16(te.hash_size),te.prev=new a.Buf16(te.w_size),te.lit_bufsize=1<<A+6,te.pending_buf_size=4*te.lit_bufsize,te.pending_buf=new a.Buf8(te.pending_buf_size),te.d_buf=1*te.lit_bufsize,te.l_buf=3*te.lit_bufsize,te.level=Y,te.strategy=L,te.method=V,me(v)}i=[new de(0,0,0,0,function(v,Y){var V=65535;for(V>v.pending_buf_size-5&&(V=v.pending_buf_size-5);;){if(v.lookahead<=1){if(ue(v),v.lookahead===0&&Y===u)return y;if(v.lookahead===0)break}v.strstart+=v.lookahead,v.lookahead=0;var T=v.block_start+V;if((v.strstart===0||v.strstart>=T)&&(v.lookahead=v.strstart-T,v.strstart=T,P(v,!1),v.strm.avail_out===0)||v.strstart-v.block_start>=v.w_size-F&&(P(v,!1),v.strm.avail_out===0))return y}return v.insert=0,Y===g?(P(v,!0),v.strm.avail_out===0?re:W):(v.strstart>v.block_start&&(P(v,!1),v.strm.avail_out),y)}),new de(4,4,8,4,J),new de(4,5,16,8,J),new de(4,6,32,32,J),new de(4,4,16,16,se),new de(8,16,32,32,se),new de(8,16,128,128,se),new de(8,32,128,256,se),new de(32,128,258,1024,se),new de(32,258,258,4096,se)],o.deflateInit=function(v,Y){return ye(v,Y,x,15,8,0)},o.deflateInit2=ye,o.deflateReset=me,o.deflateResetKeep=fe,o.deflateSetHeader=function(v,Y){return v&&v.state?v.state.wrap!==2?w:(v.state.gzhead=Y,f):w},o.deflate=function(v,Y){var V,T,A,L;if(!v||!v.state||5<Y||Y<0)return v?H(v,w):w;if(T=v.state,!v.output||!v.input&&v.avail_in!==0||T.status===666&&Y!==g)return H(v,v.avail_out===0?-5:w);if(T.strm=v,V=T.last_flush,T.last_flush=Y,T.status===C)if(T.wrap===2)v.adler=0,ee(T,31),ee(T,139),ee(T,8),T.gzhead?(ee(T,(T.gzhead.text?1:0)+(T.gzhead.hcrc?2:0)+(T.gzhead.extra?4:0)+(T.gzhead.name?8:0)+(T.gzhead.comment?16:0)),ee(T,255&T.gzhead.time),ee(T,T.gzhead.time>>8&255),ee(T,T.gzhead.time>>16&255),ee(T,T.gzhead.time>>24&255),ee(T,T.level===9?2:2<=T.strategy||T.level<2?4:0),ee(T,255&T.gzhead.os),T.gzhead.extra&&T.gzhead.extra.length&&(ee(T,255&T.gzhead.extra.length),ee(T,T.gzhead.extra.length>>8&255)),T.gzhead.hcrc&&(v.adler=c(v.adler,T.pending_buf,T.pending,0)),T.gzindex=0,T.status=69):(ee(T,0),ee(T,0),ee(T,0),ee(T,0),ee(T,0),ee(T,T.level===9?2:2<=T.strategy||T.level<2?4:0),ee(T,3),T.status=M);else{var q=x+(T.w_bits-8<<4)<<8;q|=(2<=T.strategy||T.level<2?0:T.level<6?1:T.level===6?2:3)<<6,T.strstart!==0&&(q|=32),q+=31-q%31,T.status=M,K(T,q),T.strstart!==0&&(K(T,v.adler>>>16),K(T,65535&v.adler)),v.adler=1}if(T.status===69)if(T.gzhead.extra){for(A=T.pending;T.gzindex<(65535&T.gzhead.extra.length)&&(T.pending!==T.pending_buf_size||(T.gzhead.hcrc&&T.pending>A&&(v.adler=c(v.adler,T.pending_buf,T.pending-A,A)),N(v),A=T.pending,T.pending!==T.pending_buf_size));)ee(T,255&T.gzhead.extra[T.gzindex]),T.gzindex++;T.gzhead.hcrc&&T.pending>A&&(v.adler=c(v.adler,T.pending_buf,T.pending-A,A)),T.gzindex===T.gzhead.extra.length&&(T.gzindex=0,T.status=73)}else T.status=73;if(T.status===73)if(T.gzhead.name){A=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>A&&(v.adler=c(v.adler,T.pending_buf,T.pending-A,A)),N(v),A=T.pending,T.pending===T.pending_buf_size)){L=1;break}L=T.gzindex<T.gzhead.name.length?255&T.gzhead.name.charCodeAt(T.gzindex++):0,ee(T,L)}while(L!==0);T.gzhead.hcrc&&T.pending>A&&(v.adler=c(v.adler,T.pending_buf,T.pending-A,A)),L===0&&(T.gzindex=0,T.status=91)}else T.status=91;if(T.status===91)if(T.gzhead.comment){A=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>A&&(v.adler=c(v.adler,T.pending_buf,T.pending-A,A)),N(v),A=T.pending,T.pending===T.pending_buf_size)){L=1;break}L=T.gzindex<T.gzhead.comment.length?255&T.gzhead.comment.charCodeAt(T.gzindex++):0,ee(T,L)}while(L!==0);T.gzhead.hcrc&&T.pending>A&&(v.adler=c(v.adler,T.pending_buf,T.pending-A,A)),L===0&&(T.status=103)}else T.status=103;if(T.status===103&&(T.gzhead.hcrc?(T.pending+2>T.pending_buf_size&&N(v),T.pending+2<=T.pending_buf_size&&(ee(T,255&v.adler),ee(T,v.adler>>8&255),v.adler=0,T.status=M)):T.status=M),T.pending!==0){if(N(v),v.avail_out===0)return T.last_flush=-1,f}else if(v.avail_in===0&&Z(Y)<=Z(V)&&Y!==g)return H(v,-5);if(T.status===666&&v.avail_in!==0)return H(v,-5);if(v.avail_in!==0||T.lookahead!==0||Y!==u&&T.status!==666){var te=T.strategy===2?(function(U,ne){for(var ce;;){if(U.lookahead===0&&(ue(U),U.lookahead===0)){if(ne===u)return y;break}if(U.match_length=0,ce=s._tr_tally(U,0,U.window[U.strstart]),U.lookahead--,U.strstart++,ce&&(P(U,!1),U.strm.avail_out===0))return y}return U.insert=0,ne===g?(P(U,!0),U.strm.avail_out===0?re:W):U.last_lit&&(P(U,!1),U.strm.avail_out===0)?y:B})(T,Y):T.strategy===3?(function(U,ne){for(var ce,ae,D,G,X=U.window;;){if(U.lookahead<=$){if(ue(U),U.lookahead<=$&&ne===u)return y;if(U.lookahead===0)break}if(U.match_length=0,U.lookahead>=R&&0<U.strstart&&(ae=X[D=U.strstart-1])===X[++D]&&ae===X[++D]&&ae===X[++D]){G=U.strstart+$;do;while(ae===X[++D]&&ae===X[++D]&&ae===X[++D]&&ae===X[++D]&&ae===X[++D]&&ae===X[++D]&&ae===X[++D]&&ae===X[++D]&&D<G);U.match_length=$-(G-D),U.match_length>U.lookahead&&(U.match_length=U.lookahead)}if(U.match_length>=R?(ce=s._tr_tally(U,1,U.match_length-R),U.lookahead-=U.match_length,U.strstart+=U.match_length,U.match_length=0):(ce=s._tr_tally(U,0,U.window[U.strstart]),U.lookahead--,U.strstart++),ce&&(P(U,!1),U.strm.avail_out===0))return y}return U.insert=0,ne===g?(P(U,!0),U.strm.avail_out===0?re:W):U.last_lit&&(P(U,!1),U.strm.avail_out===0)?y:B})(T,Y):i[T.level].func(T,Y);if(te!==re&&te!==W||(T.status=666),te===y||te===re)return v.avail_out===0&&(T.last_flush=-1),f;if(te===B&&(Y===1?s._tr_align(T):Y!==5&&(s._tr_stored_block(T,0,0,!1),Y===3&&(oe(T.head),T.lookahead===0&&(T.strstart=0,T.block_start=0,T.insert=0))),N(v),v.avail_out===0))return T.last_flush=-1,f}return Y!==g?f:T.wrap<=0?1:(T.wrap===2?(ee(T,255&v.adler),ee(T,v.adler>>8&255),ee(T,v.adler>>16&255),ee(T,v.adler>>24&255),ee(T,255&v.total_in),ee(T,v.total_in>>8&255),ee(T,v.total_in>>16&255),ee(T,v.total_in>>24&255)):(K(T,v.adler>>>16),K(T,65535&v.adler)),N(v),0<T.wrap&&(T.wrap=-T.wrap),T.pending!==0?f:1)},o.deflateEnd=function(v){var Y;return v&&v.state?(Y=v.state.status)!==C&&Y!==69&&Y!==73&&Y!==91&&Y!==103&&Y!==M&&Y!==666?H(v,w):(v.state=null,Y===M?H(v,-3):f):w},o.deflateSetDictionary=function(v,Y){var V,T,A,L,q,te,U,ne,ce=Y.length;if(!v||!v.state||(L=(V=v.state).wrap)===2||L===1&&V.status!==C||V.lookahead)return w;for(L===1&&(v.adler=l(v.adler,Y,ce,0)),V.wrap=0,ce>=V.w_size&&(L===0&&(oe(V.head),V.strstart=0,V.block_start=0,V.insert=0),ne=new a.Buf8(V.w_size),a.arraySet(ne,Y,ce-V.w_size,V.w_size,0),Y=ne,ce=V.w_size),q=v.avail_in,te=v.next_in,U=v.input,v.avail_in=ce,v.next_in=0,v.input=Y,ue(V);V.lookahead>=R;){for(T=V.strstart,A=V.lookahead-(R-1);V.ins_h=(V.ins_h<<V.hash_shift^V.window[T+R-1])&V.hash_mask,V.prev[T&V.w_mask]=V.head[V.ins_h],V.head[V.ins_h]=T,T++,--A;);V.strstart=T,V.lookahead=R-1,ue(V)}return V.strstart+=V.lookahead,V.block_start=V.strstart,V.insert=V.lookahead,V.lookahead=0,V.match_length=V.prev_length=R-1,V.match_available=0,v.next_in=te,v.input=U,v.avail_in=q,V.wrap=L,f},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,a){var s,l,c,d,u,g,f,w,p,b,m,x,k,_,S,O,j,I,R,$,F,C,M,y,B;s=i.state,l=i.next_in,y=i.input,c=l+(i.avail_in-5),d=i.next_out,B=i.output,u=d-(a-i.avail_out),g=d+(i.avail_out-257),f=s.dmax,w=s.wsize,p=s.whave,b=s.wnext,m=s.window,x=s.hold,k=s.bits,_=s.lencode,S=s.distcode,O=(1<<s.lenbits)-1,j=(1<<s.distbits)-1;e:do{k<15&&(x+=y[l++]<<k,k+=8,x+=y[l++]<<k,k+=8),I=_[x&O];t:for(;;){if(x>>>=R=I>>>24,k-=R,(R=I>>>16&255)===0)B[d++]=65535&I;else{if(!(16&R)){if((64&R)==0){I=_[(65535&I)+(x&(1<<R)-1)];continue t}if(32&R){s.mode=12;break e}i.msg="invalid literal/length code",s.mode=30;break e}$=65535&I,(R&=15)&&(k<R&&(x+=y[l++]<<k,k+=8),$+=x&(1<<R)-1,x>>>=R,k-=R),k<15&&(x+=y[l++]<<k,k+=8,x+=y[l++]<<k,k+=8),I=S[x&j];r:for(;;){if(x>>>=R=I>>>24,k-=R,!(16&(R=I>>>16&255))){if((64&R)==0){I=S[(65535&I)+(x&(1<<R)-1)];continue r}i.msg="invalid distance code",s.mode=30;break e}if(F=65535&I,k<(R&=15)&&(x+=y[l++]<<k,(k+=8)<R&&(x+=y[l++]<<k,k+=8)),f<(F+=x&(1<<R)-1)){i.msg="invalid distance too far back",s.mode=30;break e}if(x>>>=R,k-=R,(R=d-u)<F){if(p<(R=F-R)&&s.sane){i.msg="invalid distance too far back",s.mode=30;break e}if(M=m,(C=0)===b){if(C+=w-R,R<$){for($-=R;B[d++]=m[C++],--R;);C=d-F,M=B}}else if(b<R){if(C+=w+b-R,(R-=b)<$){for($-=R;B[d++]=m[C++],--R;);if(C=0,b<$){for($-=R=b;B[d++]=m[C++],--R;);C=d-F,M=B}}}else if(C+=b-R,R<$){for($-=R;B[d++]=m[C++],--R;);C=d-F,M=B}for(;2<$;)B[d++]=M[C++],B[d++]=M[C++],B[d++]=M[C++],$-=3;$&&(B[d++]=M[C++],1<$&&(B[d++]=M[C++]))}else{for(C=d-F;B[d++]=B[C++],B[d++]=B[C++],B[d++]=B[C++],2<($-=3););$&&(B[d++]=B[C++],1<$&&(B[d++]=B[C++]))}break}}break}}while(l<c&&d<g);l-=$=k>>3,x&=(1<<(k-=$<<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<g?g-d+257:257-(d-g),s.hold=x,s.bits=k}},{}],49:[function(r,n,o){var i=r("../utils/common"),a=r("./adler32"),s=r("./crc32"),l=r("./inffast"),c=r("./inftrees"),d=1,u=2,g=0,f=-2,w=1,p=852,b=592;function m(C){return(C>>>24&255)+(C>>>8&65280)+((65280&C)<<8)+((255&C)<<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(C){var M;return C&&C.state?(M=C.state,C.total_in=C.total_out=M.total=0,C.msg="",M.wrap&&(C.adler=1&M.wrap),M.mode=w,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new i.Buf32(p),M.distcode=M.distdyn=new i.Buf32(b),M.sane=1,M.back=-1,g):f}function _(C){var M;return C&&C.state?((M=C.state).wsize=0,M.whave=0,M.wnext=0,k(C)):f}function S(C,M){var y,B;return C&&C.state?(B=C.state,M<0?(y=0,M=-M):(y=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15<M)?f:(B.window!==null&&B.wbits!==M&&(B.window=null),B.wrap=y,B.wbits=M,_(C))):f}function O(C,M){var y,B;return C?(B=new x,(C.state=B).window=null,(y=S(C,M))!==g&&(C.state=null),y):f}var j,I,R=!0;function $(C){if(R){var M;for(j=new i.Buf32(512),I=new i.Buf32(32),M=0;M<144;)C.lens[M++]=8;for(;M<256;)C.lens[M++]=9;for(;M<280;)C.lens[M++]=7;for(;M<288;)C.lens[M++]=8;for(c(d,C.lens,0,288,j,0,C.work,{bits:9}),M=0;M<32;)C.lens[M++]=5;c(u,C.lens,0,32,I,0,C.work,{bits:5}),R=!1}C.lencode=j,C.lenbits=9,C.distcode=I,C.distbits=5}function F(C,M,y,B){var re,W=C.state;return W.window===null&&(W.wsize=1<<W.wbits,W.wnext=0,W.whave=0,W.window=new i.Buf8(W.wsize)),B>=W.wsize?(i.arraySet(W.window,M,y-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(B<(re=W.wsize-W.wnext)&&(re=B),i.arraySet(W.window,M,y-B,re,W.wnext),(B-=re)?(i.arraySet(W.window,M,y-B,B,0),W.wnext=B,W.whave=W.wsize):(W.wnext+=re,W.wnext===W.wsize&&(W.wnext=0),W.whave<W.wsize&&(W.whave+=re))),0}o.inflateReset=_,o.inflateReset2=S,o.inflateResetKeep=k,o.inflateInit=function(C){return O(C,15)},o.inflateInit2=O,o.inflate=function(C,M){var y,B,re,W,H,Z,oe,N,P,ee,K,Q,ue,J,se,de,ie,fe,me,ye,v,Y,V,T,A=0,L=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(!C||!C.state||!C.output||!C.input&&C.avail_in!==0)return f;(y=C.state).mode===12&&(y.mode=13),H=C.next_out,re=C.output,oe=C.avail_out,W=C.next_in,B=C.input,Z=C.avail_in,N=y.hold,P=y.bits,ee=Z,K=oe,Y=g;e:for(;;)switch(y.mode){case w:if(y.wrap===0){y.mode=13;break}for(;P<16;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}if(2&y.wrap&&N===35615){L[y.check=0]=255&N,L[1]=N>>>8&255,y.check=s(y.check,L,2,0),P=N=0,y.mode=2;break}if(y.flags=0,y.head&&(y.head.done=!1),!(1&y.wrap)||(((255&N)<<8)+(N>>8))%31){C.msg="incorrect header check",y.mode=30;break}if((15&N)!=8){C.msg="unknown compression method",y.mode=30;break}if(P-=4,v=8+(15&(N>>>=4)),y.wbits===0)y.wbits=v;else if(v>y.wbits){C.msg="invalid window size",y.mode=30;break}y.dmax=1<<v,C.adler=y.check=1,y.mode=512&N?10:12,P=N=0;break;case 2:for(;P<16;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}if(y.flags=N,(255&y.flags)!=8){C.msg="unknown compression method",y.mode=30;break}if(57344&y.flags){C.msg="unknown header flags set",y.mode=30;break}y.head&&(y.head.text=N>>8&1),512&y.flags&&(L[0]=255&N,L[1]=N>>>8&255,y.check=s(y.check,L,2,0)),P=N=0,y.mode=3;case 3:for(;P<32;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}y.head&&(y.head.time=N),512&y.flags&&(L[0]=255&N,L[1]=N>>>8&255,L[2]=N>>>16&255,L[3]=N>>>24&255,y.check=s(y.check,L,4,0)),P=N=0,y.mode=4;case 4:for(;P<16;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}y.head&&(y.head.xflags=255&N,y.head.os=N>>8),512&y.flags&&(L[0]=255&N,L[1]=N>>>8&255,y.check=s(y.check,L,2,0)),P=N=0,y.mode=5;case 5:if(1024&y.flags){for(;P<16;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}y.length=N,y.head&&(y.head.extra_len=N),512&y.flags&&(L[0]=255&N,L[1]=N>>>8&255,y.check=s(y.check,L,2,0)),P=N=0}else y.head&&(y.head.extra=null);y.mode=6;case 6:if(1024&y.flags&&(Z<(Q=y.length)&&(Q=Z),Q&&(y.head&&(v=y.head.extra_len-y.length,y.head.extra||(y.head.extra=new Array(y.head.extra_len)),i.arraySet(y.head.extra,B,W,Q,v)),512&y.flags&&(y.check=s(y.check,B,Q,W)),Z-=Q,W+=Q,y.length-=Q),y.length))break e;y.length=0,y.mode=7;case 7:if(2048&y.flags){if(Z===0)break e;for(Q=0;v=B[W+Q++],y.head&&v&&y.length<65536&&(y.head.name+=String.fromCharCode(v)),v&&Q<Z;);if(512&y.flags&&(y.check=s(y.check,B,Q,W)),Z-=Q,W+=Q,v)break e}else y.head&&(y.head.name=null);y.length=0,y.mode=8;case 8:if(4096&y.flags){if(Z===0)break e;for(Q=0;v=B[W+Q++],y.head&&v&&y.length<65536&&(y.head.comment+=String.fromCharCode(v)),v&&Q<Z;);if(512&y.flags&&(y.check=s(y.check,B,Q,W)),Z-=Q,W+=Q,v)break e}else y.head&&(y.head.comment=null);y.mode=9;case 9:if(512&y.flags){for(;P<16;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}if(N!==(65535&y.check)){C.msg="header crc mismatch",y.mode=30;break}P=N=0}y.head&&(y.head.hcrc=y.flags>>9&1,y.head.done=!0),C.adler=y.check=0,y.mode=12;break;case 10:for(;P<32;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}C.adler=y.check=m(N),P=N=0,y.mode=11;case 11:if(y.havedict===0)return C.next_out=H,C.avail_out=oe,C.next_in=W,C.avail_in=Z,y.hold=N,y.bits=P,2;C.adler=y.check=1,y.mode=12;case 12:if(M===5||M===6)break e;case 13:if(y.last){N>>>=7&P,P-=7&P,y.mode=27;break}for(;P<3;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}switch(y.last=1&N,P-=1,3&(N>>>=1)){case 0:y.mode=14;break;case 1:if($(y),y.mode=20,M!==6)break;N>>>=2,P-=2;break e;case 2:y.mode=17;break;case 3:C.msg="invalid block type",y.mode=30}N>>>=2,P-=2;break;case 14:for(N>>>=7&P,P-=7&P;P<32;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}if((65535&N)!=(N>>>16^65535)){C.msg="invalid stored block lengths",y.mode=30;break}if(y.length=65535&N,P=N=0,y.mode=15,M===6)break e;case 15:y.mode=16;case 16:if(Q=y.length){if(Z<Q&&(Q=Z),oe<Q&&(Q=oe),Q===0)break e;i.arraySet(re,B,W,Q,H),Z-=Q,W+=Q,oe-=Q,H+=Q,y.length-=Q;break}y.mode=12;break;case 17:for(;P<14;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}if(y.nlen=257+(31&N),N>>>=5,P-=5,y.ndist=1+(31&N),N>>>=5,P-=5,y.ncode=4+(15&N),N>>>=4,P-=4,286<y.nlen||30<y.ndist){C.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(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}y.lens[q[y.have++]]=7&N,N>>>=3,P-=3}for(;y.have<19;)y.lens[q[y.have++]]=0;if(y.lencode=y.lendyn,y.lenbits=7,V={bits:y.lenbits},Y=c(0,y.lens,0,19,y.lencode,0,y.work,V),y.lenbits=V.bits,Y){C.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(;de=(A=y.lencode[N&(1<<y.lenbits)-1])>>>16&255,ie=65535&A,!((se=A>>>24)<=P);){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}if(ie<16)N>>>=se,P-=se,y.lens[y.have++]=ie;else{if(ie===16){for(T=se+2;P<T;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}if(N>>>=se,P-=se,y.have===0){C.msg="invalid bit length repeat",y.mode=30;break}v=y.lens[y.have-1],Q=3+(3&N),N>>>=2,P-=2}else if(ie===17){for(T=se+3;P<T;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}P-=se,v=0,Q=3+(7&(N>>>=se)),N>>>=3,P-=3}else{for(T=se+7;P<T;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}P-=se,v=0,Q=11+(127&(N>>>=se)),N>>>=7,P-=7}if(y.have+Q>y.nlen+y.ndist){C.msg="invalid bit length repeat",y.mode=30;break}for(;Q--;)y.lens[y.have++]=v}}if(y.mode===30)break;if(y.lens[256]===0){C.msg="invalid code -- missing end-of-block",y.mode=30;break}if(y.lenbits=9,V={bits:y.lenbits},Y=c(d,y.lens,0,y.nlen,y.lencode,0,y.work,V),y.lenbits=V.bits,Y){C.msg="invalid literal/lengths set",y.mode=30;break}if(y.distbits=6,y.distcode=y.distdyn,V={bits:y.distbits},Y=c(u,y.lens,y.nlen,y.ndist,y.distcode,0,y.work,V),y.distbits=V.bits,Y){C.msg="invalid distances set",y.mode=30;break}if(y.mode=20,M===6)break e;case 20:y.mode=21;case 21:if(6<=Z&&258<=oe){C.next_out=H,C.avail_out=oe,C.next_in=W,C.avail_in=Z,y.hold=N,y.bits=P,l(C,K),H=C.next_out,re=C.output,oe=C.avail_out,W=C.next_in,B=C.input,Z=C.avail_in,N=y.hold,P=y.bits,y.mode===12&&(y.back=-1);break}for(y.back=0;de=(A=y.lencode[N&(1<<y.lenbits)-1])>>>16&255,ie=65535&A,!((se=A>>>24)<=P);){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}if(de&&(240&de)==0){for(fe=se,me=de,ye=ie;de=(A=y.lencode[ye+((N&(1<<fe+me)-1)>>fe)])>>>16&255,ie=65535&A,!(fe+(se=A>>>24)<=P);){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}N>>>=fe,P-=fe,y.back+=fe}if(N>>>=se,P-=se,y.back+=se,y.length=ie,de===0){y.mode=26;break}if(32&de){y.back=-1,y.mode=12;break}if(64&de){C.msg="invalid literal/length code",y.mode=30;break}y.extra=15&de,y.mode=22;case 22:if(y.extra){for(T=y.extra;P<T;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}y.length+=N&(1<<y.extra)-1,N>>>=y.extra,P-=y.extra,y.back+=y.extra}y.was=y.length,y.mode=23;case 23:for(;de=(A=y.distcode[N&(1<<y.distbits)-1])>>>16&255,ie=65535&A,!((se=A>>>24)<=P);){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}if((240&de)==0){for(fe=se,me=de,ye=ie;de=(A=y.distcode[ye+((N&(1<<fe+me)-1)>>fe)])>>>16&255,ie=65535&A,!(fe+(se=A>>>24)<=P);){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}N>>>=fe,P-=fe,y.back+=fe}if(N>>>=se,P-=se,y.back+=se,64&de){C.msg="invalid distance code",y.mode=30;break}y.offset=ie,y.extra=15&de,y.mode=24;case 24:if(y.extra){for(T=y.extra;P<T;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}y.offset+=N&(1<<y.extra)-1,N>>>=y.extra,P-=y.extra,y.back+=y.extra}if(y.offset>y.dmax){C.msg="invalid distance too far back",y.mode=30;break}y.mode=25;case 25:if(oe===0)break e;if(Q=K-oe,y.offset>Q){if((Q=y.offset-Q)>y.whave&&y.sane){C.msg="invalid distance too far back",y.mode=30;break}ue=Q>y.wnext?(Q-=y.wnext,y.wsize-Q):y.wnext-Q,Q>y.length&&(Q=y.length),J=y.window}else J=re,ue=H-y.offset,Q=y.length;for(oe<Q&&(Q=oe),oe-=Q,y.length-=Q;re[H++]=J[ue++],--Q;);y.length===0&&(y.mode=21);break;case 26:if(oe===0)break e;re[H++]=y.length,oe--,y.mode=21;break;case 27:if(y.wrap){for(;P<32;){if(Z===0)break e;Z--,N|=B[W++]<<P,P+=8}if(K-=oe,C.total_out+=K,y.total+=K,K&&(C.adler=y.check=y.flags?s(y.check,re,K,H-K):a(y.check,re,K,H-K)),K=oe,(y.flags?N:m(N))!==y.check){C.msg="incorrect data check",y.mode=30;break}P=N=0}y.mode=28;case 28:if(y.wrap&&y.flags){for(;P<32;){if(Z===0)break e;Z--,N+=B[W++]<<P,P+=8}if(N!==(4294967295&y.total)){C.msg="incorrect length check",y.mode=30;break}P=N=0}y.mode=29;case 29:Y=1;break e;case 30:Y=-3;break e;case 31:return-4;case 32:default:return f}return C.next_out=H,C.avail_out=oe,C.next_in=W,C.avail_in=Z,y.hold=N,y.bits=P,(y.wsize||K!==C.avail_out&&y.mode<30&&(y.mode<27||M!==4))&&F(C,C.output,C.next_out,K-C.avail_out)?(y.mode=31,-4):(ee-=C.avail_in,K-=C.avail_out,C.total_in+=ee,C.total_out+=K,y.total+=K,y.wrap&&K&&(C.adler=y.check=y.flags?s(y.check,re,K,C.next_out-K):a(y.check,re,K,C.next_out-K)),C.data_type=y.bits+(y.last?64:0)+(y.mode===12?128:0)+(y.mode===20||y.mode===15?256:0),(ee==0&&K===0||M===4)&&Y===g&&(Y=-5),Y)},o.inflateEnd=function(C){if(!C||!C.state)return f;var M=C.state;return M.window&&(M.window=null),C.state=null,g},o.inflateGetHeader=function(C,M){var y;return C&&C.state?(2&(y=C.state).wrap)==0?f:((y.head=M).done=!1,g):f},o.inflateSetDictionary=function(C,M){var y,B=M.length;return C&&C.state?(y=C.state).wrap!==0&&y.mode!==11?f:y.mode===11&&a(1,M,B,0)!==y.check?-3:F(C,M,B,B)?(y.mode=31,-4):(y.havedict=1,g):f},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"),a=[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],s=[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,u,g,f,w,p,b,m){var x,k,_,S,O,j,I,R,$,F=m.bits,C=0,M=0,y=0,B=0,re=0,W=0,H=0,Z=0,oe=0,N=0,P=null,ee=0,K=new i.Buf16(16),Q=new i.Buf16(16),ue=null,J=0;for(C=0;C<=15;C++)K[C]=0;for(M=0;M<f;M++)K[u[g+M]]++;for(re=F,B=15;1<=B&&K[B]===0;B--);if(B<re&&(re=B),B===0)return w[p++]=20971520,w[p++]=20971520,m.bits=1,0;for(y=1;y<B&&K[y]===0;y++);for(re<y&&(re=y),C=Z=1;C<=15;C++)if(Z<<=1,(Z-=K[C])<0)return-1;if(0<Z&&(d===0||B!==1))return-1;for(Q[1]=0,C=1;C<15;C++)Q[C+1]=Q[C]+K[C];for(M=0;M<f;M++)u[g+M]!==0&&(b[Q[u[g+M]]++]=M);if(j=d===0?(P=ue=b,19):d===1?(P=a,ee-=257,ue=s,J-=257,256):(P=l,ue=c,-1),C=y,O=p,H=M=N=0,_=-1,S=(oe=1<<(W=re))-1,d===1&&852<oe||d===2&&592<oe)return 1;for(;;){for(I=C-H,$=b[M]<j?(R=0,b[M]):b[M]>j?(R=ue[J+b[M]],P[ee+b[M]]):(R=96,0),x=1<<C-H,y=k=1<<W;w[O+(N>>H)+(k-=x)]=I<<24|R<<16|$|0,k!==0;);for(x=1<<C-1;N&x;)x>>=1;if(x!==0?(N&=x-1,N+=x):N=0,M++,--K[C]==0){if(C===B)break;C=u[g+b[M]]}if(re<C&&(N&S)!==_){for(H===0&&(H=re),O+=y,Z=1<<(W=C-H);W+H<B&&!((Z-=K[W+H])<=0);)W++,Z<<=1;if(oe+=1<<W,d===1&&852<oe||d===2&&592<oe)return 1;w[_=N&S]=re<<24|W<<16|O-p|0}}return N!==0&&(w[O+N]=C-H<<24|64<<16|0),m.bits=re,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"),a=0,s=1;function l(A){for(var L=A.length;0<=--L;)A[L]=0}var c=0,d=29,u=256,g=u+1+d,f=30,w=19,p=2*g+1,b=15,m=16,x=7,k=256,_=16,S=17,O=18,j=[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],R=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],F=new Array(2*(g+2));l(F);var C=new Array(2*f);l(C);var M=new Array(512);l(M);var y=new Array(256);l(y);var B=new Array(d);l(B);var re,W,H,Z=new Array(f);function oe(A,L,q,te,U){this.static_tree=A,this.extra_bits=L,this.extra_base=q,this.elems=te,this.max_length=U,this.has_stree=A&&A.length}function N(A,L){this.dyn_tree=A,this.max_code=0,this.stat_desc=L}function P(A){return A<256?M[A]:M[256+(A>>>7)]}function ee(A,L){A.pending_buf[A.pending++]=255&L,A.pending_buf[A.pending++]=L>>>8&255}function K(A,L,q){A.bi_valid>m-q?(A.bi_buf|=L<<A.bi_valid&65535,ee(A,A.bi_buf),A.bi_buf=L>>m-A.bi_valid,A.bi_valid+=q-m):(A.bi_buf|=L<<A.bi_valid&65535,A.bi_valid+=q)}function Q(A,L,q){K(A,q[2*L],q[2*L+1])}function ue(A,L){for(var q=0;q|=1&A,A>>>=1,q<<=1,0<--L;);return q>>>1}function J(A,L,q){var te,U,ne=new Array(b+1),ce=0;for(te=1;te<=b;te++)ne[te]=ce=ce+q[te-1]<<1;for(U=0;U<=L;U++){var ae=A[2*U+1];ae!==0&&(A[2*U]=ue(ne[ae]++,ae))}}function se(A){var L;for(L=0;L<g;L++)A.dyn_ltree[2*L]=0;for(L=0;L<f;L++)A.dyn_dtree[2*L]=0;for(L=0;L<w;L++)A.bl_tree[2*L]=0;A.dyn_ltree[2*k]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0}function de(A){8<A.bi_valid?ee(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 ie(A,L,q,te){var U=2*L,ne=2*q;return A[U]<A[ne]||A[U]===A[ne]&&te[L]<=te[q]}function fe(A,L,q){for(var te=A.heap[q],U=q<<1;U<=A.heap_len&&(U<A.heap_len&&ie(L,A.heap[U+1],A.heap[U],A.depth)&&U++,!ie(L,te,A.heap[U],A.depth));)A.heap[q]=A.heap[U],q=U,U<<=1;A.heap[q]=te}function me(A,L,q){var te,U,ne,ce,ae=0;if(A.last_lit!==0)for(;te=A.pending_buf[A.d_buf+2*ae]<<8|A.pending_buf[A.d_buf+2*ae+1],U=A.pending_buf[A.l_buf+ae],ae++,te===0?Q(A,U,L):(Q(A,(ne=y[U])+u+1,L),(ce=j[ne])!==0&&K(A,U-=B[ne],ce),Q(A,ne=P(--te),q),(ce=I[ne])!==0&&K(A,te-=Z[ne],ce)),ae<A.last_lit;);Q(A,k,L)}function ye(A,L){var q,te,U,ne=L.dyn_tree,ce=L.stat_desc.static_tree,ae=L.stat_desc.has_stree,D=L.stat_desc.elems,G=-1;for(A.heap_len=0,A.heap_max=p,q=0;q<D;q++)ne[2*q]!==0?(A.heap[++A.heap_len]=G=q,A.depth[q]=0):ne[2*q+1]=0;for(;A.heap_len<2;)ne[2*(U=A.heap[++A.heap_len]=G<2?++G:0)]=1,A.depth[U]=0,A.opt_len--,ae&&(A.static_len-=ce[2*U+1]);for(L.max_code=G,q=A.heap_len>>1;1<=q;q--)fe(A,ne,q);for(U=D;q=A.heap[1],A.heap[1]=A.heap[A.heap_len--],fe(A,ne,1),te=A.heap[1],A.heap[--A.heap_max]=q,A.heap[--A.heap_max]=te,ne[2*U]=ne[2*q]+ne[2*te],A.depth[U]=(A.depth[q]>=A.depth[te]?A.depth[q]:A.depth[te])+1,ne[2*q+1]=ne[2*te+1]=U,A.heap[1]=U++,fe(A,ne,1),2<=A.heap_len;);A.heap[--A.heap_max]=A.heap[1],(function(X,le){var be,ge,xe,ke,Ne,ut,Ke=le.dyn_tree,$n=le.max_code,Wn=le.stat_desc.static_tree,ui=le.stat_desc.has_stree,fi=le.stat_desc.extra_bits,Hn=le.stat_desc.extra_base,Te=le.stat_desc.max_length,Re=0;for(ke=0;ke<=b;ke++)X.bl_count[ke]=0;for(Ke[2*X.heap[X.heap_max]+1]=0,be=X.heap_max+1;be<p;be++)Te<(ke=Ke[2*Ke[2*(ge=X.heap[be])+1]+1]+1)&&(ke=Te,Re++),Ke[2*ge+1]=ke,$n<ge||(X.bl_count[ke]++,Ne=0,Hn<=ge&&(Ne=fi[ge-Hn]),ut=Ke[2*ge],X.opt_len+=ut*(ke+Ne),ui&&(X.static_len+=ut*(Wn[2*ge+1]+Ne)));if(Re!==0){do{for(ke=Te-1;X.bl_count[ke]===0;)ke--;X.bl_count[ke]--,X.bl_count[ke+1]+=2,X.bl_count[Te]--,Re-=2}while(0<Re);for(ke=Te;ke!==0;ke--)for(ge=X.bl_count[ke];ge!==0;)$n<(xe=X.heap[--be])||(Ke[2*xe+1]!==ke&&(X.opt_len+=(ke-Ke[2*xe+1])*Ke[2*xe],Ke[2*xe+1]=ke),ge--)}})(A,L),J(ne,G,A.bl_count)}function v(A,L,q){var te,U,ne=-1,ce=L[1],ae=0,D=7,G=4;for(ce===0&&(D=138,G=3),L[2*(q+1)+1]=65535,te=0;te<=q;te++)U=ce,ce=L[2*(te+1)+1],++ae<D&&U===ce||(ae<G?A.bl_tree[2*U]+=ae:U!==0?(U!==ne&&A.bl_tree[2*U]++,A.bl_tree[2*_]++):ae<=10?A.bl_tree[2*S]++:A.bl_tree[2*O]++,ne=U,G=(ae=0)===ce?(D=138,3):U===ce?(D=6,3):(D=7,4))}function Y(A,L,q){var te,U,ne=-1,ce=L[1],ae=0,D=7,G=4;for(ce===0&&(D=138,G=3),te=0;te<=q;te++)if(U=ce,ce=L[2*(te+1)+1],!(++ae<D&&U===ce)){if(ae<G)for(;Q(A,U,A.bl_tree),--ae!=0;);else U!==0?(U!==ne&&(Q(A,U,A.bl_tree),ae--),Q(A,_,A.bl_tree),K(A,ae-3,2)):ae<=10?(Q(A,S,A.bl_tree),K(A,ae-3,3)):(Q(A,O,A.bl_tree),K(A,ae-11,7));ne=U,G=(ae=0)===ce?(D=138,3):U===ce?(D=6,3):(D=7,4)}}l(Z);var V=!1;function T(A,L,q,te){K(A,(c<<1)+(te?1:0),3),(function(U,ne,ce,ae){de(U),ee(U,ce),ee(U,~ce),i.arraySet(U.pending_buf,U.window,ne,ce,U.pending),U.pending+=ce})(A,L,q)}o._tr_init=function(A){V||((function(){var L,q,te,U,ne,ce=new Array(b+1);for(U=te=0;U<d-1;U++)for(B[U]=te,L=0;L<1<<j[U];L++)y[te++]=U;for(y[te-1]=U,U=ne=0;U<16;U++)for(Z[U]=ne,L=0;L<1<<I[U];L++)M[ne++]=U;for(ne>>=7;U<f;U++)for(Z[U]=ne<<7,L=0;L<1<<I[U]-7;L++)M[256+ne++]=U;for(q=0;q<=b;q++)ce[q]=0;for(L=0;L<=143;)F[2*L+1]=8,L++,ce[8]++;for(;L<=255;)F[2*L+1]=9,L++,ce[9]++;for(;L<=279;)F[2*L+1]=7,L++,ce[7]++;for(;L<=287;)F[2*L+1]=8,L++,ce[8]++;for(J(F,g+1,ce),L=0;L<f;L++)C[2*L+1]=5,C[2*L]=ue(L,5);re=new oe(F,j,u+1,g,b),W=new oe(C,I,0,f,b),H=new oe(new Array(0),R,0,w,x)})(),V=!0),A.l_desc=new N(A.dyn_ltree,re),A.d_desc=new N(A.dyn_dtree,W),A.bl_desc=new N(A.bl_tree,H),A.bi_buf=0,A.bi_valid=0,se(A)},o._tr_stored_block=T,o._tr_flush_block=function(A,L,q,te){var U,ne,ce=0;0<A.level?(A.strm.data_type===2&&(A.strm.data_type=(function(ae){var D,G=4093624447;for(D=0;D<=31;D++,G>>>=1)if(1&G&&ae.dyn_ltree[2*D]!==0)return a;if(ae.dyn_ltree[18]!==0||ae.dyn_ltree[20]!==0||ae.dyn_ltree[26]!==0)return s;for(D=32;D<u;D++)if(ae.dyn_ltree[2*D]!==0)return s;return a})(A)),ye(A,A.l_desc),ye(A,A.d_desc),ce=(function(ae){var D;for(v(ae,ae.dyn_ltree,ae.l_desc.max_code),v(ae,ae.dyn_dtree,ae.d_desc.max_code),ye(ae,ae.bl_desc),D=w-1;3<=D&&ae.bl_tree[2*$[D]+1]===0;D--);return ae.opt_len+=3*(D+1)+5+5+4,D})(A),U=A.opt_len+3+7>>>3,(ne=A.static_len+3+7>>>3)<=U&&(U=ne)):U=ne=q+5,q+4<=U&&L!==-1?T(A,L,q,te):A.strategy===4||ne===U?(K(A,2+(te?1:0),3),me(A,F,C)):(K(A,4+(te?1:0),3),(function(ae,D,G,X){var le;for(K(ae,D-257,5),K(ae,G-1,5),K(ae,X-4,4),le=0;le<X;le++)K(ae,ae.bl_tree[2*$[le]+1],3);Y(ae,ae.dyn_ltree,D-1),Y(ae,ae.dyn_dtree,G-1)})(A,A.l_desc.max_code+1,A.d_desc.max_code+1,ce+1),me(A,A.dyn_ltree,A.dyn_dtree)),se(A),te&&de(A)},o._tr_tally=function(A,L,q){return A.pending_buf[A.d_buf+2*A.last_lit]=L>>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&L,A.pending_buf[A.l_buf+A.last_lit]=255&q,A.last_lit++,L===0?A.dyn_ltree[2*q]++:(A.matches++,L--,A.dyn_ltree[2*(y[q]+u+1)]++,A.dyn_dtree[2*P(L)]++),A.last_lit===A.lit_bufsize-1},o._tr_align=function(A){K(A,2,3),Q(A,k,F),(function(L){L.bi_valid===16?(ee(L,L.bi_buf),L.bi_buf=0,L.bi_valid=0):8<=L.bi_valid&&(L.pending_buf[L.pending++]=255&L.bi_buf,L.bi_buf>>=8,L.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(a,s){if(!a.setImmediate){var l,c,d,u,g=1,f={},w=!1,p=a.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(a);b=b&&b.setTimeout?b:a,l={}.toString.call(a.process)==="[object process]"?function(_){process.nextTick(function(){x(_)})}:(function(){if(a.postMessage&&!a.importScripts){var _=!0,S=a.onmessage;return a.onmessage=function(){_=!1},a.postMessage("","*"),a.onmessage=S,_}})()?(u="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",k,!1):a.attachEvent("onmessage",k),function(_){a.postMessage(u+_,"*")}):a.MessageChannel?((d=new MessageChannel).port1.onmessage=function(_){x(_.data)},function(_){d.port2.postMessage(_)}):p&&"onreadystatechange"in p.createElement("script")?(c=p.documentElement,function(_){var S=p.createElement("script");S.onreadystatechange=function(){x(_),S.onreadystatechange=null,c.removeChild(S),S=null},c.appendChild(S)}):function(_){setTimeout(x,0,_)},b.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var S=new Array(arguments.length-1),O=0;O<S.length;O++)S[O]=arguments[O+1];var j={callback:_,args:S};return f[g]=j,l(g),g++},b.clearImmediate=m}function m(_){delete f[_]}function x(_){if(w)setTimeout(x,0,_);else{var S=f[_];if(S){w=!0;try{(function(O){var j=O.callback,I=O.args;switch(I.length){case 0:j();break;case 1:j(I[0]);break;case 2:j(I[0],I[1]);break;case 3:j(I[0],I[1],I[2]);break;default:j.apply(s,I)}})(S)}finally{m(_),w=!1}}}}function k(_){_.source===a&&typeof _.data=="string"&&_.data.indexOf(u)===0&&x(+_.data.slice(u.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof ht<"u"?ht:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Vn)),Vn.exports}var vc=bc();const xc=gc(vc);var Rr={exports:{}},wc=Rr.exports,bi;function yc(){return bi||(bi=1,(function(e,t){(function(r,n){n()})(wc,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,u){var g=new XMLHttpRequest;g.open("GET",c),g.responseType="blob",g.onload=function(){l(g.response,d,u)},g.onerror=function(){console.error("could not download file")},g.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 a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ht=="object"&&ht.global===ht?ht:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(c,d,u){var g=a.URL||a.webkitURL,f=document.createElement("a");d=d||c.name||"download",f.download=d,f.rel="noopener",typeof c=="string"?(f.href=c,f.origin===location.origin?i(f):o(f.href)?n(c,d,u):i(f,f.target="_blank")):(f.href=g.createObjectURL(c),setTimeout(function(){g.revokeObjectURL(f.href)},4e4),setTimeout(function(){i(f)},0))}:"msSaveOrOpenBlob"in navigator?function(c,d,u){if(d=d||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(r(c,u),d);else if(o(c))n(c,d,u);else{var g=document.createElement("a");g.href=c,g.target="_blank",setTimeout(function(){i(g)})}}:function(c,d,u,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),typeof c=="string")return n(c,d,u);var f=c.type==="application/octet-stream",w=/constructor/i.test(a.HTMLElement)||a.safari,p=/CriOS\/[\d]+/.test(navigator.userAgent);if((p||f&&w||s)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var k=b.result;k=p?k:k.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=k:location=k,g=null},b.readAsDataURL(c)}else{var m=a.URL||a.webkitURL,x=m.createObjectURL(c);g?g.location=x:location.href=x,g=null,setTimeout(function(){m.revokeObjectURL(x)},4e4)}});a.saveAs=l.saveAs=l,e.exports=l})})(Rr)),Rr.exports}var vi=yc();const xi=async(e,t)=>{const r=new xc,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`)},wi=(e,t,r)=>{const{pages:n,...o}=e.site,i={page:e.page,site:o,menu:e.menu,theme:e.theme},s=`<script id="jp-baked-state" type="application/json">${JSON.stringify(i)}<\/script>`,l=r.replace("</head>",`${s}</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 kc(){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 _c=(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},Sc=(e,t)=>({classGroupId:e,validator:t}),ki=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Mr="-",_i=[],Cc="arbitrary..",Ec=e=>{const t=zc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Nc(a);const s=a.split(Mr),l=s[0]===""&&s.length>1?1:0;return Si(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=n[a],c=r[a];return l?c?_c(c,l):l:c||_i}return r[a]||_i}}},Si=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],i=r.nextPart.get(o);if(i){const c=Si(e,t+1,i);if(c)return c}const a=r.validators;if(a===null)return;const s=t===0?e.join(Mr):e.slice(t).join(Mr),l=a.length;for(let c=0;c<l;c++){const d=a[c];if(d.validator(s))return d.classGroupId}},Nc=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?Cc+n:void 0})(),zc=e=>{const{theme:t,classGroups:r}=e;return Ac(r,t)},Ac=(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 a=e[i];jc(a,t,r,n)}},jc=(e,t,r,n)=>{if(typeof e=="string"){Tc(e,t,r);return}if(typeof e=="function"){Oc(e,t,r,n);return}Ic(e,t,r,n)},Tc=(e,t,r)=>{const n=e===""?t:Ci(t,e);n.classGroupId=r},Oc=(e,t,r,n)=>{if(Pc(e)){Zn(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Sc(r,e))},Ic=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];Zn(l,Ci(t,s),r,n)}},Ci=(e,t)=>{let r=e;const n=t.split(Mr),o=n.length;for(let i=0;i<o;i++){const a=n[i];let s=r.nextPart.get(a);s||(s=ki(),r.nextPart.set(a,s)),r=s}return r},Pc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Dc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(i,a)=>{r[i]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let a=r[i];if(a!==void 0)return a;if((a=n[i])!==void 0)return o(i,a),a},set(i,a){i in r?r[i]=a:o(i,a)}}},Gn="!",Ei=":",Rc=[],Ni=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Mc=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let a=0,s=0,l=0,c;const d=o.length;for(let p=0;p<d;p++){const b=o[p];if(a===0&&s===0){if(b===Ei){i.push(o.slice(l,p)),l=p+1;continue}if(b==="/"){c=p;continue}}b==="["?a++:b==="]"?a--:b==="("?s++:b===")"&&s--}const u=i.length===0?o:o.slice(l);let g=u,f=!1;u.endsWith(Gn)?(g=u.slice(0,-1),f=!0):u.startsWith(Gn)&&(g=u.slice(1),f=!0);const w=c&&c>l?c-l:void 0;return Ni(i,f,g,w)};if(t){const o=t+Ei,i=n;n=a=>a.startsWith(o)?i(a.slice(o.length)):Ni(Rc,!1,a,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},Lc=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 a=r[i],s=a[0]==="[",l=t.has(a);s||l?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(a)):o.push(a)}return o.length>0&&(o.sort(),n.push(...o)),n}},Fc=e=>({cache:Dc(e.cacheSize),parseClassName:Mc(e),sortModifiers:Lc(e),...Ec(e)}),Bc=/\s+/,Uc=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(Bc);let l="";for(let c=s.length-1;c>=0;c-=1){const d=s[c],{isExternal:u,modifiers:g,hasImportantModifier:f,baseClassName:w,maybePostfixModifierPosition:p}=r(d);if(u){l=d+(l.length>0?" "+l:l);continue}let b=!!p,m=n(b?w.substring(0,p):w);if(!m){if(!b){l=d+(l.length>0?" "+l:l);continue}if(m=n(w),!m){l=d+(l.length>0?" "+l:l);continue}b=!1}const x=g.length===0?"":g.length===1?g[0]:i(g).join(":"),k=f?x+Gn:x,_=k+m;if(a.indexOf(_)>-1)continue;a.push(_);const S=o(m,b);for(let O=0;O<S.length;++O){const j=S[O];a.push(k+j)}l=d+(l.length>0?" "+l:l)}return l},$c=(...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},Wc=(e,...t)=>{let r,n,o,i;const a=l=>{const c=t.reduce((d,u)=>u(d),e());return r=Fc(c),n=r.cache.get,o=r.cache.set,i=s,s(l)},s=l=>{const c=n(l);if(c)return c;const d=Uc(l,r);return o(l,d),d};return i=a,(...l)=>i($c(...l))},Hc=[],Ie=e=>{const t=r=>r[e]||Hc;return t.isThemeGetter=!0,t},Ai=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ji=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Vc=/^\d+\/\d+$/,Zc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gc=/\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$/,Kc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Yc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,It=e=>Vc.test(e),we=e=>!!e&&!Number.isNaN(Number(e)),mt=e=>!!e&&Number.isInteger(Number(e)),Kn=e=>e.endsWith("%")&&we(e.slice(0,-1)),lt=e=>Zc.test(e),Xc=()=>!0,Jc=e=>Gc.test(e)&&!Kc.test(e),Ti=()=>!1,Qc=e=>Yc.test(e),ed=e=>qc.test(e),td=e=>!pe(e)&&!he(e),rd=e=>Pt(e,Ri,Ti),pe=e=>Ai.test(e),Nt=e=>Pt(e,Mi,Jc),Yn=e=>Pt(e,sd,we),Oi=e=>Pt(e,Pi,Ti),nd=e=>Pt(e,Di,ed),Lr=e=>Pt(e,Li,Qc),he=e=>ji.test(e),or=e=>Dt(e,Mi),od=e=>Dt(e,ld),Ii=e=>Dt(e,Pi),id=e=>Dt(e,Ri),ad=e=>Dt(e,Di),Fr=e=>Dt(e,Li,!0),Pt=(e,t,r)=>{const n=Ai.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Dt=(e,t,r=!1)=>{const n=ji.exec(e);return n?n[1]?t(n[1]):r:!1},Pi=e=>e==="position"||e==="percentage",Di=e=>e==="image"||e==="url",Ri=e=>e==="length"||e==="size"||e==="bg-size",Mi=e=>e==="length",sd=e=>e==="number",ld=e=>e==="family-name",Li=e=>e==="shadow",cd=Wc(()=>{const e=Ie("color"),t=Ie("font"),r=Ie("text"),n=Ie("font-weight"),o=Ie("tracking"),i=Ie("leading"),a=Ie("breakpoint"),s=Ie("container"),l=Ie("spacing"),c=Ie("radius"),d=Ie("shadow"),u=Ie("inset-shadow"),g=Ie("text-shadow"),f=Ie("drop-shadow"),w=Ie("blur"),p=Ie("perspective"),b=Ie("aspect"),m=Ie("ease"),x=Ie("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[..._(),he,pe],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],I=()=>[he,pe,l],R=()=>[It,"full","auto",...I()],$=()=>[mt,"none","subgrid",he,pe],F=()=>["auto",{span:["full",mt,he,pe]},mt,he,pe],C=()=>[mt,"auto",he,pe],M=()=>["auto","min","max","fr",he,pe],y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],re=()=>["auto",...I()],W=()=>[It,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],H=()=>[e,he,pe],Z=()=>[..._(),Ii,Oi,{position:[he,pe]}],oe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",id,rd,{size:[he,pe]}],P=()=>[Kn,or,Nt],ee=()=>["","none","full",c,he,pe],K=()=>["",we,or,Nt],Q=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[we,Kn,Ii,Oi],se=()=>["","none",w,he,pe],de=()=>["none",we,he,pe],ie=()=>["none",we,he,pe],fe=()=>[we,he,pe],me=()=>[It,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lt],breakpoint:[lt],color:[Xc],container:[lt],"drop-shadow":[lt],ease:["in","out","in-out"],font:[td],"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",we],text:[lt],"text-shadow":[lt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",It,pe,he,b]}],container:["container"],columns:[{columns:[we,pe,he,s]}],"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:S()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[mt,"auto",he,pe]}],basis:[{basis:[It,"full","auto",s,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[we,It,"auto","initial","none",pe]}],grow:[{grow:["",we,he,pe]}],shrink:[{shrink:["",we,he,pe]}],order:[{order:[mt,"first","last","none",he,pe]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...y(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...y()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":y()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],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:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"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:[{w:[s,"screen",...W()]}],"min-w":[{"min-w":[s,"screen","none",...W()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",r,or,Nt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,he,Yn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Kn,pe]}],"font-family":[{font:[od,pe,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,he,pe]}],"line-clamp":[{"line-clamp":[we,"none",he,Yn]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",he,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[we,"from-font","auto",he,Nt]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[we,"auto",he,pe]}],"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",he,pe]}],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",he,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mt,he,pe],radial:["",he,pe],conic:[mt,he,pe]},ad,nd]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[we,he,pe]}],"outline-w":[{outline:["",we,or,Nt]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",d,Fr,Lr]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",u,Fr,Lr]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[we,Nt]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",g,Fr,Lr]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[we,he,pe]}],"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":[we]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[he,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[we]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,pe]}],filter:[{filter:["","none",he,pe]}],blur:[{blur:se()}],brightness:[{brightness:[we,he,pe]}],contrast:[{contrast:[we,he,pe]}],"drop-shadow":[{"drop-shadow":["","none",f,Fr,Lr]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",we,he,pe]}],"hue-rotate":[{"hue-rotate":[we,he,pe]}],invert:[{invert:["",we,he,pe]}],saturate:[{saturate:[we,he,pe]}],sepia:[{sepia:["",we,he,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",he,pe]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[we,he,pe]}],"backdrop-contrast":[{"backdrop-contrast":[we,he,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",we,he,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[we,he,pe]}],"backdrop-invert":[{"backdrop-invert":["",we,he,pe]}],"backdrop-opacity":[{"backdrop-opacity":[we,he,pe]}],"backdrop-saturate":[{"backdrop-saturate":[we,he,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",we,he,pe]}],"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",he,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[we,"initial",he,pe]}],ease:[{ease:["linear","initial",m,he,pe]}],delay:[{delay:[we,he,pe]}],animate:[{animate:["none",x,he,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,he,pe]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[he,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",he,pe]}],"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",he,pe]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[we,or,Nt,Yn]}],stroke:[{stroke:["none",...H()]}],"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 ve(...e){return cd(kc(e))}var Br={exports:{}},ir={};/**
|
|
11
|
+
*/var Ni;function jc(){return Ni||(Ni=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 Wr=="function"&&Wr;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 p=o[c]={exports:{}};n[c][0].call(p.exports,function(w){var u=n[c][1][w];return s(u||w)},p,p.exports,r,n,o,i)}return o[c].exports}for(var a=typeof Wr=="function"&&Wr,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,p,w,u,g=[],b=0,v=l.length,k=v,_=i.getTypeOf(l)!=="string";b<l.length;)k=v-b,f=_?(c=l[b++],d=b<v?l[b++]:0,b<v?l[b++]:0):(c=l.charCodeAt(b++),d=b<v?l.charCodeAt(b++):0,b<v?l.charCodeAt(b++):0),m=c>>2,p=(3&c)<<4|d>>4,w=1<k?(15&d)<<2|f>>6:64,u=2<k?63&f:64,g.push(a.charAt(m)+a.charAt(p)+a.charAt(w)+a.charAt(u));return g.join("")},o.decode=function(l){var c,d,f,m,p,w,u=0,g=0,b="data:";if(l.substr(0,b.length)===b)throw new Error("Invalid base64 input, it looks like a data url.");var v,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(v=s.uint8array?new Uint8Array(0|k):new Array(0|k);u<l.length;)c=a.indexOf(l.charAt(u++))<<2|(m=a.indexOf(l.charAt(u++)))>>4,d=(15&m)<<4|(p=a.indexOf(l.charAt(u++)))>>2,f=(3&p)<<6|(w=a.indexOf(l.charAt(u++))),v[g++]=c,p!==64&&(v[g++]=d),w!==64&&(v[g++]=f);return v}},{"./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,p,w){this.compressedSize=d,this.uncompressedSize=f,this.crc32=m,this.compression=p,this.compressedContent=w}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 p=s,w=m+f;c^=-1;for(var u=m;u<w;u++)c=c>>>8^p[255&(c^d[u])];return-1^c})(0|l,a,a.length,0):(function(c,d,f,m){var p=s,w=m+f;c^=-1;for(var u=m;u<w;u++)c=c>>>8^p[255&(c^d.charCodeAt(u))];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(p,w){var u,g="";for(u=0;u<w;u++)g+=String.fromCharCode(255&p),p>>>=8;return g}function s(p,w,u,g,b,v){var k,_,S=p.file,O=p.compression,z=v!==c.utf8encode,I=a.transformTo("string",v(S.name)),D=a.transformTo("string",c.utf8encode(S.name)),U=S.comment,H=a.transformTo("string",v(U)),C=a.transformTo("string",c.utf8encode(U)),M=D.length!==S.name.length,y=C.length!==U.length,L="",ee="",F="",$=S.dir,V=S.date,re={crc32:0,compressedSize:0,uncompressedSize:0};w&&!u||(re.crc32=p.crc32,re.compressedSize=p.compressedSize,re.uncompressedSize=p.uncompressedSize);var A=0;w&&(A|=8),z||!M&&!y||(A|=2048);var P=0,Q=0;$&&(P|=16),b==="UNIX"?(Q=798,P|=(function(te,pe){var X=te;return te||(X=pe?16893:33204),(65535&X)<<16})(S.unixPermissions,$)):(Q=20,P|=(function(te){return 63&(te||0)})(S.dosPermissions)),k=V.getUTCHours(),k<<=6,k|=V.getUTCMinutes(),k<<=5,k|=V.getUTCSeconds()/2,_=V.getUTCFullYear()-1980,_<<=4,_|=V.getUTCMonth()+1,_<<=5,_|=V.getUTCDate(),M&&(ee=i(1,1)+i(d(I),4)+D,L+="up"+i(ee.length,2)+ee),y&&(F=i(1,1)+i(d(H),4)+C,L+="uc"+i(F.length,2)+F);var G="";return G+=`
|
|
12
|
+
\0`,G+=i(A,2),G+=O.magic,G+=i(k,2),G+=i(_,2),G+=i(re.crc32,4),G+=i(re.compressedSize,4),G+=i(re.uncompressedSize,4),G+=i(I.length,2),G+=i(L.length,2),{fileRecord:f.LOCAL_FILE_HEADER+G+I+L,dirRecord:f.CENTRAL_FILE_HEADER+i(Q,2)+G+i(H.length,2)+"\0\0\0\0"+i(P,4)+i(g,4)+I+L+H}}var a=r("../utils"),l=r("../stream/GenericWorker"),c=r("../utf8"),d=r("../crc32"),f=r("../signature");function m(p,w,u,g){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=u,this.encodeFileName=g,this.streamFiles=p,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(p){var w=p.meta.percent||0,u=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,l.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:u?(w+100*(u-g-1))/u:100}}))},m.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var w=this.streamFiles&&!p.file.dir;if(w){var u=s(p,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:u.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(p){this.accumulate=!1;var w=this.streamFiles&&!p.file.dir,u=s(p,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(u.dirRecord),w)this.push({data:(function(g){return f.DATA_DESCRIPTOR+i(g.crc32,4)+i(g.compressedSize,4)+i(g.uncompressedSize,4)})(p),meta:{percent:100}});else for(this.push({data:u.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var p=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var u=this.bytesWritten-p,g=(function(b,v,k,_,S){var O=a.transformTo("string",S(_));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(b,2)+i(b,2)+i(v,4)+i(k,4)+i(O.length,2)+O})(this.dirRecords.length,u,p,this.zipComment,this.encodeFileName);this.push({data:g,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(p){this._sources.push(p);var w=this;return p.on("data",function(u){w.processChunk(u)}),p.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),p.on("error",function(u){w.error(u)}),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(p){var w=this._sources;if(!l.prototype.error.call(this,p))return!1;for(var u=0;u<w.length;u++)try{w[u].error(p)}catch{}return!0},m.prototype.lock=function(){l.prototype.lock.call(this);for(var p=this._sources,w=0;w<p.length;w++)p[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,p){f++;var w=(function(v,k){var _=v||k,S=i[_];if(!S)throw new Error(_+" is not a valid compression method !");return S})(p.options.compression,l.compression),u=p.options.compressionOptions||l.compressionOptions||{},g=p.dir,b=p.date;p._compressWorker(w,u).withStreamInfo("file",{name:m,dir:g,date:b,comment:p.comment||"",unixPermissions:p.unixPermissions,dosPermissions:p.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(p,w){var u=m.decompressed.getContentWorker().pipe(new c);u.on("error",function(g){w(g)}).on("end",function(){u.streamInfo.crc32!==m.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):p()}).resume()})}n.exports=function(m,p){var w=this;return p=i.extend(p||{},{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,p.optimizedBinaryString,p.base64).then(function(u){var g=new l(p);return g.load(u),g}).then(function(u){var g=[s.Promise.resolve(u)],b=u.files;if(p.checkCRC32)for(var v=0;v<b.length;v++)g.push(f(b[v]));return s.Promise.all(g)}).then(function(u){for(var g=u.shift(),b=g.files,v=0;v<b.length;v++){var k=b[v],_=k.fileNameStr,S=i.resolve(k.fileNameStr);w.file(S,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:p.createFolders}),k.dir||(w.file(S).unsafeOriginalName=_)}return g.zipComment.length&&(w.comment=g.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(S,O,z){var I,D=a.getTypeOf(O),U=a.extend(z||{},d);U.date=U.date||new Date,U.compression!==null&&(U.compression=U.compression.toUpperCase()),typeof U.unixPermissions=="string"&&(U.unixPermissions=parseInt(U.unixPermissions,8)),U.unixPermissions&&16384&U.unixPermissions&&(U.dir=!0),U.dosPermissions&&16&U.dosPermissions&&(U.dir=!0),U.dir&&(S=b(S)),U.createFolders&&(I=g(S))&&v.call(this,I,!0);var H=D==="string"&&U.binary===!1&&U.base64===!1;z&&z.binary!==void 0||(U.binary=!H),(O instanceof f&&O.uncompressedSize===0||U.dir||!O||O.length===0)&&(U.base64=!1,U.binary=!0,O="",U.compression="STORE",D="string");var C=null;C=O instanceof f||O instanceof l?O:w.isNode&&w.isStream(O)?new u(S,O):a.prepareContent(S,O,U.binary,U.optimizedBinaryString,U.base64);var M=new m(S,C,U);this.files[S]=M}var s=r("./utf8"),a=r("./utils"),l=r("./stream/GenericWorker"),c=r("./stream/StreamHelper"),d=r("./defaults"),f=r("./compressedObject"),m=r("./zipObject"),p=r("./generate"),w=r("./nodejsUtils"),u=r("./nodejs/NodejsStreamInputAdapter"),g=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var O=S.lastIndexOf("/");return 0<O?S.substring(0,O):""},b=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},v=function(S,O){return O=O!==void 0?O:d.createFolders,S=b(S),this.files[S]||i.call(this,S,null,{dir:!0,createFolders:O}),this.files[S]};function k(S){return Object.prototype.toString.call(S)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(S){var O,z,I;for(O in this.files)I=this.files[O],(z=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&S(z,I)},filter:function(S){var O=[];return this.forEach(function(z,I){S(z,I)&&O.push(I)}),O},file:function(S,O,z){if(arguments.length!==1)return S=this.root+S,i.call(this,S,O,z),this;if(k(S)){var I=S;return this.filter(function(U,H){return!H.dir&&I.test(U)})}var D=this.files[this.root+S];return D&&!D.dir?D:null},folder:function(S){if(!S)return this;if(k(S))return this.filter(function(D,U){return U.dir&&S.test(D)});var O=this.root+S,z=v.call(this,O),I=this.clone();return I.root=z.name,I},remove:function(S){S=this.root+S;var O=this.files[S];if(O||(S.slice(-1)!=="/"&&(S+="/"),O=this.files[S]),O&&!O.dir)delete this.files[S];else for(var z=this.filter(function(D,U){return U.name.slice(0,S.length)===S}),I=0;I<z.length;I++)delete this.files[z[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(S){var O,z={};try{if((z=a.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=z.type.toLowerCase(),z.compression=z.compression.toUpperCase(),z.type==="binarystring"&&(z.type="string"),!z.type)throw new Error("No output type specified.");a.checkSupport(z.type),z.platform!=="darwin"&&z.platform!=="freebsd"&&z.platform!=="linux"&&z.platform!=="sunos"||(z.platform="UNIX"),z.platform==="win32"&&(z.platform="DOS");var I=z.comment||this.comment||"";O=p.generateWorker(this,z,I)}catch(D){(O=new l("error")).error(D)}return new c(O,z.type||"string",z.mimeType)},generateAsync:function(S,O){return this.generateInternalStream(S).accumulate(O)},generateNodeStream:function(S,O){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(O)}};n.exports=_},{"./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,u){return new d.Promise(function(g,b){var v=[],k=w._internalType,_=w._outputType,S=w._mimeType;w.on("data",function(O,z){v.push(O),u&&u(z)}).on("error",function(O){v=[],b(O)}).on("end",function(){try{var O=(function(z,I,D){switch(z){case"blob":return i.newBlob(i.transformTo("arraybuffer",I),D);case"base64":return l.encode(I);default:return i.transformTo(z,I)}})(_,(function(z,I){var D,U=0,H=null,C=0;for(D=0;D<I.length;D++)C+=I[D].length;switch(z){case"string":return I.join("");case"array":return Array.prototype.concat.apply([],I);case"uint8array":for(H=new Uint8Array(C),D=0;D<I.length;D++)H.set(I[D],U),U+=I[D].length;return H;case"nodebuffer":return Buffer.concat(I);default:throw new Error("concat : unsupported type '"+z+"'")}})(k,v),S);g(O)}catch(z){b(z)}v=[]}).resume()})}function p(w,u,g){var b=u;switch(u){case"blob":case"arraybuffer":b="uint8array";break;case"base64":b="string"}try{this._internalType=b,this._outputType=u,this._mimeType=g,i.checkSupport(b),this._worker=w.pipe(new s(b)),w.lock()}catch(v){this._worker=new a("error"),this._worker.error(v)}}p.prototype={accumulate:function(w){return m(this,w)},on:function(w,u){var g=this;return w==="data"?this._worker.on(w,function(b){u.call(g,b.data,b.meta)}):this._worker.on(w,function(){i.delay(u,arguments,g)}),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=p},{"../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(p){return s.nodebuffer?a.newBufferFrom(p,"utf-8"):(function(w){var u,g,b,v,k,_=w.length,S=0;for(v=0;v<_;v++)(64512&(g=w.charCodeAt(v)))==55296&&v+1<_&&(64512&(b=w.charCodeAt(v+1)))==56320&&(g=65536+(g-55296<<10)+(b-56320),v++),S+=g<128?1:g<2048?2:g<65536?3:4;for(u=s.uint8array?new Uint8Array(S):new Array(S),v=k=0;k<S;v++)(64512&(g=w.charCodeAt(v)))==55296&&v+1<_&&(64512&(b=w.charCodeAt(v+1)))==56320&&(g=65536+(g-55296<<10)+(b-56320),v++),g<128?u[k++]=g:(g<2048?u[k++]=192|g>>>6:(g<65536?u[k++]=224|g>>>12:(u[k++]=240|g>>>18,u[k++]=128|g>>>12&63),u[k++]=128|g>>>6&63),u[k++]=128|63&g);return u})(p)},o.utf8decode=function(p){return s.nodebuffer?i.transformTo("nodebuffer",p).toString("utf-8"):(function(w){var u,g,b,v,k=w.length,_=new Array(2*k);for(u=g=0;u<k;)if((b=w[u++])<128)_[g++]=b;else if(4<(v=c[b]))_[g++]=65533,u+=v-1;else{for(b&=v===2?31:v===3?15:7;1<v&&u<k;)b=b<<6|63&w[u++],v--;1<v?_[g++]=65533:b<65536?_[g++]=b:(b-=65536,_[g++]=55296|b>>10&1023,_[g++]=56320|1023&b)}return _.length!==g&&(_.subarray?_=_.subarray(0,g):_.length=g),i.applyFromCharCode(_)})(p=i.transformTo(s.uint8array?"uint8array":"array",p))},i.inherits(f,l),f.prototype.processChunk=function(p){var w=i.transformTo(s.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var u=w;(w=new Uint8Array(u.length+this.leftOver.length)).set(this.leftOver,0),w.set(u,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var g=(function(v,k){var _;for((k=k||v.length)>v.length&&(k=v.length),_=k-1;0<=_&&(192&v[_])==128;)_--;return _<0||_===0?k:_+c[v[_]]>k?_:k})(w),b=w;g!==w.length&&(s.uint8array?(b=w.subarray(0,g),this.leftOver=w.subarray(g,w.length)):(b=w.slice(0,g),this.leftOver=w.slice(g,w.length))),this.push({data:o.utf8decode(b),meta:p.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(p){this.push({data:o.utf8encode(p.data),meta:p.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(u){return u}function d(u,g){for(var b=0;b<u.length;++b)g[b]=255&u.charCodeAt(b);return g}r("setimmediate"),o.newBlob=function(u,g){o.checkSupport("blob");try{return new Blob([u],{type:g})}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return b.append(u),b.getBlob(g)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(u,g,b){var v=[],k=0,_=u.length;if(_<=b)return String.fromCharCode.apply(null,u);for(;k<_;)g==="array"||g==="nodebuffer"?v.push(String.fromCharCode.apply(null,u.slice(k,Math.min(k+b,_)))):v.push(String.fromCharCode.apply(null,u.subarray(k,Math.min(k+b,_)))),k+=b;return v.join("")},stringifyByChar:function(u){for(var g="",b=0;b<u.length;b++)g+=String.fromCharCode(u[b]);return g},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function m(u){var g=65536,b=o.getTypeOf(u),v=!0;if(b==="uint8array"?v=f.applyCanBeUsed.uint8array:b==="nodebuffer"&&(v=f.applyCanBeUsed.nodebuffer),v)for(;1<g;)try{return f.stringifyByChunk(u,b,g)}catch{g=Math.floor(g/2)}return f.stringifyByChar(u)}function p(u,g){for(var b=0;b<u.length;b++)g[b]=u[b];return g}o.applyFromCharCode=m;var w={};w.string={string:c,array:function(u){return d(u,new Array(u.length))},arraybuffer:function(u){return w.string.uint8array(u).buffer},uint8array:function(u){return d(u,new Uint8Array(u.length))},nodebuffer:function(u){return d(u,a.allocBuffer(u.length))}},w.array={string:m,array:c,arraybuffer:function(u){return new Uint8Array(u).buffer},uint8array:function(u){return new Uint8Array(u)},nodebuffer:function(u){return a.newBufferFrom(u)}},w.arraybuffer={string:function(u){return m(new Uint8Array(u))},array:function(u){return p(new Uint8Array(u),new Array(u.byteLength))},arraybuffer:c,uint8array:function(u){return new Uint8Array(u)},nodebuffer:function(u){return a.newBufferFrom(new Uint8Array(u))}},w.uint8array={string:m,array:function(u){return p(u,new Array(u.length))},arraybuffer:function(u){return u.buffer},uint8array:c,nodebuffer:function(u){return a.newBufferFrom(u)}},w.nodebuffer={string:m,array:function(u){return p(u,new Array(u.length))},arraybuffer:function(u){return w.nodebuffer.uint8array(u).buffer},uint8array:function(u){return p(u,new Uint8Array(u.length))},nodebuffer:c},o.transformTo=function(u,g){if(g=g||"",!u)return g;o.checkSupport(u);var b=o.getTypeOf(g);return w[b][u](g)},o.resolve=function(u){for(var g=u.split("/"),b=[],v=0;v<g.length;v++){var k=g[v];k==="."||k===""&&v!==0&&v!==g.length-1||(k===".."?b.pop():b.push(k))}return b.join("/")},o.getTypeOf=function(u){return typeof u=="string"?"string":Object.prototype.toString.call(u)==="[object Array]"?"array":i.nodebuffer&&a.isBuffer(u)?"nodebuffer":i.uint8array&&u instanceof Uint8Array?"uint8array":i.arraybuffer&&u instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(u){if(!i[u.toLowerCase()])throw new Error(u+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(u){var g,b,v="";for(b=0;b<(u||"").length;b++)v+="\\x"+((g=u.charCodeAt(b))<16?"0":"")+g.toString(16).toUpperCase();return v},o.delay=function(u,g,b){setImmediate(function(){u.apply(b||null,g||[])})},o.inherits=function(u,g){function b(){}b.prototype=g.prototype,u.prototype=new b},o.extend=function(){var u,g,b={};for(u=0;u<arguments.length;u++)for(g in arguments[u])Object.prototype.hasOwnProperty.call(arguments[u],g)&&b[g]===void 0&&(b[g]=arguments[u][g]);return b},o.prepareContent=function(u,g,b,v,k){return l.Promise.resolve(g).then(function(_){return i.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)&&typeof FileReader<"u"?new l.Promise(function(S,O){var z=new FileReader;z.onload=function(I){S(I.target.result)},z.onerror=function(I){O(I.target.error)},z.readAsArrayBuffer(_)}):_}).then(function(_){var S=o.getTypeOf(_);return S?(S==="arraybuffer"?_=o.transformTo("uint8array",_):S==="string"&&(k?_=s.decode(_):b&&v!==!0&&(_=(function(O){return d(O,i.uint8array?new Uint8Array(O.length):new Array(O.length))})(_))),_):l.Promise.reject(new Error("Can't read the data of '"+u+"'. 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 p=this.reader.index;this.reader.setIndex(f);var w=this.reader.readString(4)===m;return this.reader.setIndex(p),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",p=s.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(p)},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,p,w=this.zip64EndOfCentralSize-44;0<w;)f=this.reader.readInt(2),m=this.reader.readInt(4),p=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:p}},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 p=this.centralDirOffset+this.centralDirSize;this.zip64&&(p+=20,p+=12+this.zip64EndOfCentralSize);var w=m-p;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(p,w){this.options=p,this.loadOptions=w}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(p){var w,u;if(p.skip(22),this.fileNameLength=p.readInt(2),u=p.readInt(2),this.fileName=p.readData(this.fileNameLength),p.skip(u),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(g){for(var b in d)if(Object.prototype.hasOwnProperty.call(d,b)&&d[b].magic===g)return d[b];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,p.readData(this.compressedSize))},readCentralPart:function(p){this.versionMadeBy=p.readInt(2),p.skip(2),this.bitFlag=p.readInt(2),this.compressionMethod=p.readString(2),this.date=p.readDate(),this.crc32=p.readInt(4),this.compressedSize=p.readInt(4),this.uncompressedSize=p.readInt(4);var w=p.readInt(2);if(this.extraFieldsLength=p.readInt(2),this.fileCommentLength=p.readInt(2),this.diskNumberStart=p.readInt(2),this.internalFileAttributes=p.readInt(2),this.externalFileAttributes=p.readInt(4),this.localHeaderOffset=p.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");p.skip(w),this.readExtraFields(p),this.parseZIP64ExtraField(p),this.fileComment=p.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var p=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var w,u,g,b=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4<b;)w=p.readInt(2),u=p.readInt(2),g=p.readData(u),this.extraFields[w]={id:w,length:u,value:g};p.setIndex(b)},handleUTF8:function(){var p=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 u=s.transformTo(p,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(u)}var g=this.findExtraFieldUnicodeComment();if(g!==null)this.fileCommentStr=g;else{var b=s.transformTo(p,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(b)}}},findExtraFieldUnicodePath:function(){var p=this.extraFields[28789];if(p){var w=i(p.value);return w.readInt(1)!==1||l(this.fileName)!==w.readInt(4)?null:c.utf8decode(w.readData(p.length-5))}return null},findExtraFieldUnicodeComment:function(){var p=this.extraFields[25461];if(p){var w=i(p.value);return w.readInt(1)!==1||l(this.fileComment)!==w.readInt(4)?null:c.utf8decode(w.readData(p.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,u,g){this.name=w,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=u,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.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 u=null,g="string";try{if(!w)throw new Error("No output type specified.");var b=(g=w.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),u=this._decompressWorker();var v=!this._dataBinary;v&&!b&&(u=u.pipe(new l.Utf8EncodeWorker)),!v&&b&&(u=u.pipe(new l.Utf8DecodeWorker))}catch(k){(u=new d("error")).error(k)}return new s(u,g,"")},async:function(w,u){return this.internalStream(w).accumulate(u)},nodeStream:function(w,u){return this.internalStream(w||"nodebuffer").toNodejsStream(u)},_compressWorker:function(w,u){if(this._data instanceof c&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(g,w,u)},_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.")},p=0;p<f.length;p++)i.prototype[f[p]]=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 u=i.document.createElement("script");u.onreadystatechange=function(){w(),u.onreadystatechange=null,u.parentNode.removeChild(u),u=null},i.document.documentElement.appendChild(u)}:function(){setTimeout(w,0)};else{var m=new i.MessageChannel;m.port1.onmessage=w,s=function(){m.port2.postMessage(0)}}var p=[];function w(){var u,g;a=!0;for(var b=p.length;b;){for(g=p,p=[],u=-1;++u<b;)g[u]();b=p.length}a=!1}n.exports=function(u){p.push(u)!==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(b){if(typeof b!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,b!==s&&u(this,b)}function m(b,v,k){this.promise=b,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function p(b,v,k){i(function(){var _;try{_=v(k)}catch(S){return a.reject(b,S)}_===b?a.reject(b,new TypeError("Cannot resolve promise with itself")):a.resolve(b,_)})}function w(b){var v=b&&b.then;if(b&&(typeof b=="object"||typeof b=="function")&&typeof v=="function")return function(){v.apply(b,arguments)}}function u(b,v){var k=!1;function _(z){k||(k=!0,a.reject(b,z))}function S(z){k||(k=!0,a.resolve(b,z))}var O=g(function(){v(S,_)});O.status==="error"&&_(O.value)}function g(b,v){var k={};try{k.value=b(v),k.status="success"}catch(_){k.status="error",k.value=_}return k}(n.exports=f).prototype.finally=function(b){if(typeof b!="function")return this;var v=this.constructor;return this.then(function(k){return v.resolve(b()).then(function(){return k})},function(k){return v.resolve(b()).then(function(){throw k})})},f.prototype.catch=function(b){return this.then(null,b)},f.prototype.then=function(b,v){if(typeof b!="function"&&this.state===c||typeof v!="function"&&this.state===l)return this;var k=new this.constructor(s);return this.state!==d?p(k,this.state===c?b:v,this.outcome):this.queue.push(new m(k,b,v)),k},m.prototype.callFulfilled=function(b){a.resolve(this.promise,b)},m.prototype.otherCallFulfilled=function(b){p(this.promise,this.onFulfilled,b)},m.prototype.callRejected=function(b){a.reject(this.promise,b)},m.prototype.otherCallRejected=function(b){p(this.promise,this.onRejected,b)},a.resolve=function(b,v){var k=g(w,v);if(k.status==="error")return a.reject(b,k.value);var _=k.value;if(_)u(b,_);else{b.state=c,b.outcome=v;for(var S=-1,O=b.queue.length;++S<O;)b.queue[S].callFulfilled(v)}return b},a.reject=function(b,v){b.state=l,b.outcome=v;for(var k=-1,_=b.queue.length;++k<_;)b.queue[k].callRejected(v);return b},f.resolve=function(b){return b instanceof this?b:a.resolve(new this(s),b)},f.reject=function(b){var v=new this(s);return a.reject(v,b)},f.all=function(b){var v=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=b.length,_=!1;if(!k)return this.resolve([]);for(var S=new Array(k),O=0,z=-1,I=new this(s);++z<k;)D(b[z],z);return I;function D(U,H){v.resolve(U).then(function(C){S[H]=C,++O!==k||_||(_=!0,a.resolve(I,S))},function(C){_||(_=!0,a.reject(I,C))})}},f.race=function(b){var v=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=b.length,_=!1;if(!k)return this.resolve([]);for(var S=-1,O=new this(s);++S<k;)z=b[S],v.resolve(z).then(function(I){_||(_=!0,a.resolve(O,I))},function(I){_||(_=!0,a.reject(O,I))});var z;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,p=0,w=8;function u(b){if(!(this instanceof u))return new u(b);this.options=s.assign({level:m,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:""},b||{});var v=this.options;v.raw&&0<v.windowBits?v.windowBits=-v.windowBits:v.gzip&&0<v.windowBits&&v.windowBits<16&&(v.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,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(k!==f)throw new Error(l[k]);if(v.header&&i.deflateSetHeader(this.strm,v.header),v.dictionary){var _;if(_=typeof v.dictionary=="string"?a.string2buf(v.dictionary):d.call(v.dictionary)==="[object ArrayBuffer]"?new Uint8Array(v.dictionary):v.dictionary,(k=i.deflateSetDictionary(this.strm,_))!==f)throw new Error(l[k]);this._dict_set=!0}}function g(b,v){var k=new u(v);if(k.push(b,!0),k.err)throw k.msg||l[k.err];return k.result}u.prototype.push=function(b,v){var k,_,S=this.strm,O=this.options.chunkSize;if(this.ended)return!1;_=v===~~v?v:v===!0?4:0,typeof b=="string"?S.input=a.string2buf(b):d.call(b)==="[object ArrayBuffer]"?S.input=new Uint8Array(b):S.input=b,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new s.Buf8(O),S.next_out=0,S.avail_out=O),(k=i.deflate(S,_))!==1&&k!==f)return this.onEnd(k),!(this.ended=!0);S.avail_out!==0&&(S.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(s.shrinkBuf(S.output,S.next_out))):this.onData(s.shrinkBuf(S.output,S.next_out)))}while((0<S.avail_in||S.avail_out===0)&&k!==1);return _===4?(k=i.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===f):_!==2||(this.onEnd(f),!(S.avail_out=0))},u.prototype.onData=function(b){this.chunks.push(b)},u.prototype.onEnd=function(b){b===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg},o.Deflate=u,o.deflate=g,o.deflateRaw=function(b,v){return(v=v||{}).raw=!0,g(b,v)},o.gzip=function(b,v){return(v=v||{}).gzip=!0,g(b,v)}},{"./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 p(u){if(!(this instanceof p))return new p(u);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},u||{});var g=this.options;g.raw&&0<=g.windowBits&&g.windowBits<16&&(g.windowBits=-g.windowBits,g.windowBits===0&&(g.windowBits=-15)),!(0<=g.windowBits&&g.windowBits<16)||u&&u.windowBits||(g.windowBits+=32),15<g.windowBits&&g.windowBits<48&&(15&g.windowBits)==0&&(g.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var b=i.inflateInit2(this.strm,g.windowBits);if(b!==l.Z_OK)throw new Error(c[b]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function w(u,g){var b=new p(g);if(b.push(u,!0),b.err)throw b.msg||c[b.err];return b.result}p.prototype.push=function(u,g){var b,v,k,_,S,O,z=this.strm,I=this.options.chunkSize,D=this.options.dictionary,U=!1;if(this.ended)return!1;v=g===~~g?g:g===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof u=="string"?z.input=a.binstring2buf(u):m.call(u)==="[object ArrayBuffer]"?z.input=new Uint8Array(u):z.input=u,z.next_in=0,z.avail_in=z.input.length;do{if(z.avail_out===0&&(z.output=new s.Buf8(I),z.next_out=0,z.avail_out=I),(b=i.inflate(z,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,b=i.inflateSetDictionary(this.strm,O)),b===l.Z_BUF_ERROR&&U===!0&&(b=l.Z_OK,U=!1),b!==l.Z_STREAM_END&&b!==l.Z_OK)return this.onEnd(b),!(this.ended=!0);z.next_out&&(z.avail_out!==0&&b!==l.Z_STREAM_END&&(z.avail_in!==0||v!==l.Z_FINISH&&v!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=a.utf8border(z.output,z.next_out),_=z.next_out-k,S=a.buf2string(z.output,k),z.next_out=_,z.avail_out=I-_,_&&s.arraySet(z.output,z.output,k,_,0),this.onData(S)):this.onData(s.shrinkBuf(z.output,z.next_out)))),z.avail_in===0&&z.avail_out===0&&(U=!0)}while((0<z.avail_in||z.avail_out===0)&&b!==l.Z_STREAM_END);return b===l.Z_STREAM_END&&(v=l.Z_FINISH),v===l.Z_FINISH?(b=i.inflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===l.Z_OK):v!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(z.avail_out=0))},p.prototype.onData=function(u){this.chunks.push(u)},p.prototype.onEnd=function(u){u===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=u,this.msg=this.strm.msg},o.Inflate=p,o.inflate=w,o.inflateRaw=function(u,g){return(g=g||{}).raw=!0,w(u,g)},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 p=0;p<f;p++)l[m+p]=c[d+p]},flattenChunks:function(l){var c,d,f,m,p,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++)p=l[c],w.set(p,m),m+=p.length;return w}},a={arraySet:function(l,c,d,f,m){for(var p=0;p<f;p++)l[m+p]=c[d+p]},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 p="",w=0;w<m;w++)p+=String.fromCharCode(f[w]);return p}l[254]=l[254]=1,o.string2buf=function(f){var m,p,w,u,g,b=f.length,v=0;for(u=0;u<b;u++)(64512&(p=f.charCodeAt(u)))==55296&&u+1<b&&(64512&(w=f.charCodeAt(u+1)))==56320&&(p=65536+(p-55296<<10)+(w-56320),u++),v+=p<128?1:p<2048?2:p<65536?3:4;for(m=new i.Buf8(v),u=g=0;g<v;u++)(64512&(p=f.charCodeAt(u)))==55296&&u+1<b&&(64512&(w=f.charCodeAt(u+1)))==56320&&(p=65536+(p-55296<<10)+(w-56320),u++),p<128?m[g++]=p:(p<2048?m[g++]=192|p>>>6:(p<65536?m[g++]=224|p>>>12:(m[g++]=240|p>>>18,m[g++]=128|p>>>12&63),m[g++]=128|p>>>6&63),m[g++]=128|63&p);return m},o.buf2binstring=function(f){return d(f,f.length)},o.binstring2buf=function(f){for(var m=new i.Buf8(f.length),p=0,w=m.length;p<w;p++)m[p]=f.charCodeAt(p);return m},o.buf2string=function(f,m){var p,w,u,g,b=m||f.length,v=new Array(2*b);for(p=w=0;p<b;)if((u=f[p++])<128)v[w++]=u;else if(4<(g=l[u]))v[w++]=65533,p+=g-1;else{for(u&=g===2?31:g===3?15:7;1<g&&p<b;)u=u<<6|63&f[p++],g--;1<g?v[w++]=65533:u<65536?v[w++]=u:(u-=65536,v[w++]=55296|u>>10&1023,v[w++]=56320|1023&u)}return d(v,w)},o.utf8border=function(f,m){var p;for((m=m||f.length)>f.length&&(m=f.length),p=m-1;0<=p&&(192&f[p])==128;)p--;return p<0||p===0?m:p+l[f[p]]>m?p: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,p=0,w=-2,u=-1,g=4,b=2,v=8,k=9,_=286,S=30,O=19,z=2*_+1,I=15,D=3,U=258,H=U+D+1,C=42,M=113,y=1,L=2,ee=3,F=4;function $(x,K){return x.msg=d[K],K}function V(x){return(x<<1)-(4<x?9:0)}function re(x){for(var K=x.length;0<=--K;)x[K]=0}function A(x){var K=x.state,W=K.pending;W>x.avail_out&&(W=x.avail_out),W!==0&&(s.arraySet(x.output,K.pending_buf,K.pending_out,W,x.next_out),x.next_out+=W,K.pending_out+=W,x.total_out+=W,x.avail_out-=W,K.pending-=W,K.pending===0&&(K.pending_out=0))}function P(x,K){a._tr_flush_block(x,0<=x.block_start?x.block_start:-1,x.strstart-x.block_start,K),x.block_start=x.strstart,A(x.strm)}function Q(x,K){x.pending_buf[x.pending++]=K}function G(x,K){x.pending_buf[x.pending++]=K>>>8&255,x.pending_buf[x.pending++]=255&K}function te(x,K){var W,T,j=x.max_chain_length,R=x.strstart,q=x.prev_length,J=x.nice_match,B=x.strstart>x.w_size-H?x.strstart-(x.w_size-H):0,ne=x.window,ue=x.w_mask,ie=x.prev,Z=x.strstart+U,ce=ne[R+q-1],le=ne[R+q];x.prev_length>=x.good_match&&(j>>=2),J>x.lookahead&&(J=x.lookahead);do if(ne[(W=K)+q]===le&&ne[W+q-1]===ce&&ne[W]===ne[R]&&ne[++W]===ne[R+1]){R+=2,W++;do;while(ne[++R]===ne[++W]&&ne[++R]===ne[++W]&&ne[++R]===ne[++W]&&ne[++R]===ne[++W]&&ne[++R]===ne[++W]&&ne[++R]===ne[++W]&&ne[++R]===ne[++W]&&ne[++R]===ne[++W]&&R<Z);if(T=U-(Z-R),R=Z-U,q<T){if(x.match_start=K,J<=(q=T))break;ce=ne[R+q-1],le=ne[R+q]}}while((K=ie[K&ue])>B&&--j!=0);return q<=x.lookahead?q:x.lookahead}function pe(x){var K,W,T,j,R,q,J,B,ne,ue,ie=x.w_size;do{if(j=x.window_size-x.lookahead-x.strstart,x.strstart>=ie+(ie-H)){for(s.arraySet(x.window,x.window,ie,ie,0),x.match_start-=ie,x.strstart-=ie,x.block_start-=ie,K=W=x.hash_size;T=x.head[--K],x.head[K]=ie<=T?T-ie:0,--W;);for(K=W=ie;T=x.prev[--K],x.prev[K]=ie<=T?T-ie:0,--W;);j+=ie}if(x.strm.avail_in===0)break;if(q=x.strm,J=x.window,B=x.strstart+x.lookahead,ne=j,ue=void 0,ue=q.avail_in,ne<ue&&(ue=ne),W=ue===0?0:(q.avail_in-=ue,s.arraySet(J,q.input,q.next_in,ue,B),q.state.wrap===1?q.adler=l(q.adler,J,ue,B):q.state.wrap===2&&(q.adler=c(q.adler,J,ue,B)),q.next_in+=ue,q.total_in+=ue,ue),x.lookahead+=W,x.lookahead+x.insert>=D)for(R=x.strstart-x.insert,x.ins_h=x.window[R],x.ins_h=(x.ins_h<<x.hash_shift^x.window[R+1])&x.hash_mask;x.insert&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[R+D-1])&x.hash_mask,x.prev[R&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=R,R++,x.insert--,!(x.lookahead+x.insert<D)););}while(x.lookahead<H&&x.strm.avail_in!==0)}function X(x,K){for(var W,T;;){if(x.lookahead<H){if(pe(x),x.lookahead<H&&K===f)return y;if(x.lookahead===0)break}if(W=0,x.lookahead>=D&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+D-1])&x.hash_mask,W=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart),W!==0&&x.strstart-W<=x.w_size-H&&(x.match_length=te(x,W)),x.match_length>=D)if(T=a._tr_tally(x,x.strstart-x.match_start,x.match_length-D),x.lookahead-=x.match_length,x.match_length<=x.max_lazy_match&&x.lookahead>=D){for(x.match_length--;x.strstart++,x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+D-1])&x.hash_mask,W=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart,--x.match_length!=0;);x.strstart++}else x.strstart+=x.match_length,x.match_length=0,x.ins_h=x.window[x.strstart],x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+1])&x.hash_mask;else T=a._tr_tally(x,0,x.window[x.strstart]),x.lookahead--,x.strstart++;if(T&&(P(x,!1),x.strm.avail_out===0))return y}return x.insert=x.strstart<D-1?x.strstart:D-1,K===m?(P(x,!0),x.strm.avail_out===0?ee:F):x.last_lit&&(P(x,!1),x.strm.avail_out===0)?y:L}function oe(x,K){for(var W,T,j;;){if(x.lookahead<H){if(pe(x),x.lookahead<H&&K===f)return y;if(x.lookahead===0)break}if(W=0,x.lookahead>=D&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+D-1])&x.hash_mask,W=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart),x.prev_length=x.match_length,x.prev_match=x.match_start,x.match_length=D-1,W!==0&&x.prev_length<x.max_lazy_match&&x.strstart-W<=x.w_size-H&&(x.match_length=te(x,W),x.match_length<=5&&(x.strategy===1||x.match_length===D&&4096<x.strstart-x.match_start)&&(x.match_length=D-1)),x.prev_length>=D&&x.match_length<=x.prev_length){for(j=x.strstart+x.lookahead-D,T=a._tr_tally(x,x.strstart-1-x.prev_match,x.prev_length-D),x.lookahead-=x.prev_length-1,x.prev_length-=2;++x.strstart<=j&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+D-1])&x.hash_mask,W=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart),--x.prev_length!=0;);if(x.match_available=0,x.match_length=D-1,x.strstart++,T&&(P(x,!1),x.strm.avail_out===0))return y}else if(x.match_available){if((T=a._tr_tally(x,0,x.window[x.strstart-1]))&&P(x,!1),x.strstart++,x.lookahead--,x.strm.avail_out===0)return y}else x.match_available=1,x.strstart++,x.lookahead--}return x.match_available&&(T=a._tr_tally(x,0,x.window[x.strstart-1]),x.match_available=0),x.insert=x.strstart<D-1?x.strstart:D-1,K===m?(P(x,!0),x.strm.avail_out===0?ee:F):x.last_lit&&(P(x,!1),x.strm.avail_out===0)?y:L}function de(x,K,W,T,j){this.good_length=x,this.max_lazy=K,this.nice_length=W,this.max_chain=T,this.func=j}function se(){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=v,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*z),this.dyn_dtree=new s.Buf16(2*(2*S+1)),this.bl_tree=new s.Buf16(2*(2*O+1)),re(this.dyn_ltree),re(this.dyn_dtree),re(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*_+1),re(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*_+1),re(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 he(x){var K;return x&&x.state?(x.total_in=x.total_out=0,x.data_type=b,(K=x.state).pending=0,K.pending_out=0,K.wrap<0&&(K.wrap=-K.wrap),K.status=K.wrap?C:M,x.adler=K.wrap===2?0:1,K.last_flush=f,a._tr_init(K),p):$(x,w)}function be(x){var K=he(x);return K===p&&(function(W){W.window_size=2*W.w_size,re(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})(x.state),K}function _e(x,K,W,T,j,R){if(!x)return w;var q=1;if(K===u&&(K=6),T<0?(q=0,T=-T):15<T&&(q=2,T-=16),j<1||k<j||W!==v||T<8||15<T||K<0||9<K||R<0||g<R)return $(x,w);T===8&&(T=9);var J=new se;return(x.state=J).strm=x,J.wrap=q,J.gzhead=null,J.w_bits=T,J.w_size=1<<J.w_bits,J.w_mask=J.w_size-1,J.hash_bits=j+7,J.hash_size=1<<J.hash_bits,J.hash_mask=J.hash_size-1,J.hash_shift=~~((J.hash_bits+D-1)/D),J.window=new s.Buf8(2*J.w_size),J.head=new s.Buf16(J.hash_size),J.prev=new s.Buf16(J.w_size),J.lit_bufsize=1<<j+6,J.pending_buf_size=4*J.lit_bufsize,J.pending_buf=new s.Buf8(J.pending_buf_size),J.d_buf=1*J.lit_bufsize,J.l_buf=3*J.lit_bufsize,J.level=K,J.strategy=R,J.method=W,be(x)}i=[new de(0,0,0,0,function(x,K){var W=65535;for(W>x.pending_buf_size-5&&(W=x.pending_buf_size-5);;){if(x.lookahead<=1){if(pe(x),x.lookahead===0&&K===f)return y;if(x.lookahead===0)break}x.strstart+=x.lookahead,x.lookahead=0;var T=x.block_start+W;if((x.strstart===0||x.strstart>=T)&&(x.lookahead=x.strstart-T,x.strstart=T,P(x,!1),x.strm.avail_out===0)||x.strstart-x.block_start>=x.w_size-H&&(P(x,!1),x.strm.avail_out===0))return y}return x.insert=0,K===m?(P(x,!0),x.strm.avail_out===0?ee:F):(x.strstart>x.block_start&&(P(x,!1),x.strm.avail_out),y)}),new de(4,4,8,4,X),new de(4,5,16,8,X),new de(4,6,32,32,X),new de(4,4,16,16,oe),new de(8,16,32,32,oe),new de(8,16,128,128,oe),new de(8,32,128,256,oe),new de(32,128,258,1024,oe),new de(32,258,258,4096,oe)],o.deflateInit=function(x,K){return _e(x,K,v,15,8,0)},o.deflateInit2=_e,o.deflateReset=be,o.deflateResetKeep=he,o.deflateSetHeader=function(x,K){return x&&x.state?x.state.wrap!==2?w:(x.state.gzhead=K,p):w},o.deflate=function(x,K){var W,T,j,R;if(!x||!x.state||5<K||K<0)return x?$(x,w):w;if(T=x.state,!x.output||!x.input&&x.avail_in!==0||T.status===666&&K!==m)return $(x,x.avail_out===0?-5:w);if(T.strm=x,W=T.last_flush,T.last_flush=K,T.status===C)if(T.wrap===2)x.adler=0,Q(T,31),Q(T,139),Q(T,8),T.gzhead?(Q(T,(T.gzhead.text?1:0)+(T.gzhead.hcrc?2:0)+(T.gzhead.extra?4:0)+(T.gzhead.name?8:0)+(T.gzhead.comment?16:0)),Q(T,255&T.gzhead.time),Q(T,T.gzhead.time>>8&255),Q(T,T.gzhead.time>>16&255),Q(T,T.gzhead.time>>24&255),Q(T,T.level===9?2:2<=T.strategy||T.level<2?4:0),Q(T,255&T.gzhead.os),T.gzhead.extra&&T.gzhead.extra.length&&(Q(T,255&T.gzhead.extra.length),Q(T,T.gzhead.extra.length>>8&255)),T.gzhead.hcrc&&(x.adler=c(x.adler,T.pending_buf,T.pending,0)),T.gzindex=0,T.status=69):(Q(T,0),Q(T,0),Q(T,0),Q(T,0),Q(T,0),Q(T,T.level===9?2:2<=T.strategy||T.level<2?4:0),Q(T,3),T.status=M);else{var q=v+(T.w_bits-8<<4)<<8;q|=(2<=T.strategy||T.level<2?0:T.level<6?1:T.level===6?2:3)<<6,T.strstart!==0&&(q|=32),q+=31-q%31,T.status=M,G(T,q),T.strstart!==0&&(G(T,x.adler>>>16),G(T,65535&x.adler)),x.adler=1}if(T.status===69)if(T.gzhead.extra){for(j=T.pending;T.gzindex<(65535&T.gzhead.extra.length)&&(T.pending!==T.pending_buf_size||(T.gzhead.hcrc&&T.pending>j&&(x.adler=c(x.adler,T.pending_buf,T.pending-j,j)),A(x),j=T.pending,T.pending!==T.pending_buf_size));)Q(T,255&T.gzhead.extra[T.gzindex]),T.gzindex++;T.gzhead.hcrc&&T.pending>j&&(x.adler=c(x.adler,T.pending_buf,T.pending-j,j)),T.gzindex===T.gzhead.extra.length&&(T.gzindex=0,T.status=73)}else T.status=73;if(T.status===73)if(T.gzhead.name){j=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>j&&(x.adler=c(x.adler,T.pending_buf,T.pending-j,j)),A(x),j=T.pending,T.pending===T.pending_buf_size)){R=1;break}R=T.gzindex<T.gzhead.name.length?255&T.gzhead.name.charCodeAt(T.gzindex++):0,Q(T,R)}while(R!==0);T.gzhead.hcrc&&T.pending>j&&(x.adler=c(x.adler,T.pending_buf,T.pending-j,j)),R===0&&(T.gzindex=0,T.status=91)}else T.status=91;if(T.status===91)if(T.gzhead.comment){j=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>j&&(x.adler=c(x.adler,T.pending_buf,T.pending-j,j)),A(x),j=T.pending,T.pending===T.pending_buf_size)){R=1;break}R=T.gzindex<T.gzhead.comment.length?255&T.gzhead.comment.charCodeAt(T.gzindex++):0,Q(T,R)}while(R!==0);T.gzhead.hcrc&&T.pending>j&&(x.adler=c(x.adler,T.pending_buf,T.pending-j,j)),R===0&&(T.status=103)}else T.status=103;if(T.status===103&&(T.gzhead.hcrc?(T.pending+2>T.pending_buf_size&&A(x),T.pending+2<=T.pending_buf_size&&(Q(T,255&x.adler),Q(T,x.adler>>8&255),x.adler=0,T.status=M)):T.status=M),T.pending!==0){if(A(x),x.avail_out===0)return T.last_flush=-1,p}else if(x.avail_in===0&&V(K)<=V(W)&&K!==m)return $(x,-5);if(T.status===666&&x.avail_in!==0)return $(x,-5);if(x.avail_in!==0||T.lookahead!==0||K!==f&&T.status!==666){var J=T.strategy===2?(function(B,ne){for(var ue;;){if(B.lookahead===0&&(pe(B),B.lookahead===0)){if(ne===f)return y;break}if(B.match_length=0,ue=a._tr_tally(B,0,B.window[B.strstart]),B.lookahead--,B.strstart++,ue&&(P(B,!1),B.strm.avail_out===0))return y}return B.insert=0,ne===m?(P(B,!0),B.strm.avail_out===0?ee:F):B.last_lit&&(P(B,!1),B.strm.avail_out===0)?y:L})(T,K):T.strategy===3?(function(B,ne){for(var ue,ie,Z,ce,le=B.window;;){if(B.lookahead<=U){if(pe(B),B.lookahead<=U&&ne===f)return y;if(B.lookahead===0)break}if(B.match_length=0,B.lookahead>=D&&0<B.strstart&&(ie=le[Z=B.strstart-1])===le[++Z]&&ie===le[++Z]&&ie===le[++Z]){ce=B.strstart+U;do;while(ie===le[++Z]&&ie===le[++Z]&&ie===le[++Z]&&ie===le[++Z]&&ie===le[++Z]&&ie===le[++Z]&&ie===le[++Z]&&ie===le[++Z]&&Z<ce);B.match_length=U-(ce-Z),B.match_length>B.lookahead&&(B.match_length=B.lookahead)}if(B.match_length>=D?(ue=a._tr_tally(B,1,B.match_length-D),B.lookahead-=B.match_length,B.strstart+=B.match_length,B.match_length=0):(ue=a._tr_tally(B,0,B.window[B.strstart]),B.lookahead--,B.strstart++),ue&&(P(B,!1),B.strm.avail_out===0))return y}return B.insert=0,ne===m?(P(B,!0),B.strm.avail_out===0?ee:F):B.last_lit&&(P(B,!1),B.strm.avail_out===0)?y:L})(T,K):i[T.level].func(T,K);if(J!==ee&&J!==F||(T.status=666),J===y||J===ee)return x.avail_out===0&&(T.last_flush=-1),p;if(J===L&&(K===1?a._tr_align(T):K!==5&&(a._tr_stored_block(T,0,0,!1),K===3&&(re(T.head),T.lookahead===0&&(T.strstart=0,T.block_start=0,T.insert=0))),A(x),x.avail_out===0))return T.last_flush=-1,p}return K!==m?p:T.wrap<=0?1:(T.wrap===2?(Q(T,255&x.adler),Q(T,x.adler>>8&255),Q(T,x.adler>>16&255),Q(T,x.adler>>24&255),Q(T,255&x.total_in),Q(T,x.total_in>>8&255),Q(T,x.total_in>>16&255),Q(T,x.total_in>>24&255)):(G(T,x.adler>>>16),G(T,65535&x.adler)),A(x),0<T.wrap&&(T.wrap=-T.wrap),T.pending!==0?p:1)},o.deflateEnd=function(x){var K;return x&&x.state?(K=x.state.status)!==C&&K!==69&&K!==73&&K!==91&&K!==103&&K!==M&&K!==666?$(x,w):(x.state=null,K===M?$(x,-3):p):w},o.deflateSetDictionary=function(x,K){var W,T,j,R,q,J,B,ne,ue=K.length;if(!x||!x.state||(R=(W=x.state).wrap)===2||R===1&&W.status!==C||W.lookahead)return w;for(R===1&&(x.adler=l(x.adler,K,ue,0)),W.wrap=0,ue>=W.w_size&&(R===0&&(re(W.head),W.strstart=0,W.block_start=0,W.insert=0),ne=new s.Buf8(W.w_size),s.arraySet(ne,K,ue-W.w_size,W.w_size,0),K=ne,ue=W.w_size),q=x.avail_in,J=x.next_in,B=x.input,x.avail_in=ue,x.next_in=0,x.input=K,pe(W);W.lookahead>=D;){for(T=W.strstart,j=W.lookahead-(D-1);W.ins_h=(W.ins_h<<W.hash_shift^W.window[T+D-1])&W.hash_mask,W.prev[T&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=T,T++,--j;);W.strstart=T,W.lookahead=D-1,pe(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,x.next_in=J,x.input=B,x.avail_in=q,W.wrap=R,p},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,p,w,u,g,b,v,k,_,S,O,z,I,D,U,H,C,M,y,L;a=i.state,l=i.next_in,y=i.input,c=l+(i.avail_in-5),d=i.next_out,L=i.output,f=d-(s-i.avail_out),m=d+(i.avail_out-257),p=a.dmax,w=a.wsize,u=a.whave,g=a.wnext,b=a.window,v=a.hold,k=a.bits,_=a.lencode,S=a.distcode,O=(1<<a.lenbits)-1,z=(1<<a.distbits)-1;e:do{k<15&&(v+=y[l++]<<k,k+=8,v+=y[l++]<<k,k+=8),I=_[v&O];t:for(;;){if(v>>>=D=I>>>24,k-=D,(D=I>>>16&255)===0)L[d++]=65535&I;else{if(!(16&D)){if((64&D)==0){I=_[(65535&I)+(v&(1<<D)-1)];continue t}if(32&D){a.mode=12;break e}i.msg="invalid literal/length code",a.mode=30;break e}U=65535&I,(D&=15)&&(k<D&&(v+=y[l++]<<k,k+=8),U+=v&(1<<D)-1,v>>>=D,k-=D),k<15&&(v+=y[l++]<<k,k+=8,v+=y[l++]<<k,k+=8),I=S[v&z];r:for(;;){if(v>>>=D=I>>>24,k-=D,!(16&(D=I>>>16&255))){if((64&D)==0){I=S[(65535&I)+(v&(1<<D)-1)];continue r}i.msg="invalid distance code",a.mode=30;break e}if(H=65535&I,k<(D&=15)&&(v+=y[l++]<<k,(k+=8)<D&&(v+=y[l++]<<k,k+=8)),p<(H+=v&(1<<D)-1)){i.msg="invalid distance too far back",a.mode=30;break e}if(v>>>=D,k-=D,(D=d-f)<H){if(u<(D=H-D)&&a.sane){i.msg="invalid distance too far back",a.mode=30;break e}if(M=b,(C=0)===g){if(C+=w-D,D<U){for(U-=D;L[d++]=b[C++],--D;);C=d-H,M=L}}else if(g<D){if(C+=w+g-D,(D-=g)<U){for(U-=D;L[d++]=b[C++],--D;);if(C=0,g<U){for(U-=D=g;L[d++]=b[C++],--D;);C=d-H,M=L}}}else if(C+=g-D,D<U){for(U-=D;L[d++]=b[C++],--D;);C=d-H,M=L}for(;2<U;)L[d++]=M[C++],L[d++]=M[C++],L[d++]=M[C++],U-=3;U&&(L[d++]=M[C++],1<U&&(L[d++]=M[C++]))}else{for(C=d-H;L[d++]=L[C++],L[d++]=L[C++],L[d++]=L[C++],2<(U-=3););U&&(L[d++]=L[C++],1<U&&(L[d++]=L[C++]))}break}}break}}while(l<c&&d<m);l-=U=k>>3,v&=(1<<(k-=U<<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=v,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,p=-2,w=1,u=852,g=592;function b(C){return(C>>>24&255)+(C>>>8&65280)+((65280&C)<<8)+((255&C)<<24)}function v(){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(C){var M;return C&&C.state?(M=C.state,C.total_in=C.total_out=M.total=0,C.msg="",M.wrap&&(C.adler=1&M.wrap),M.mode=w,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new i.Buf32(u),M.distcode=M.distdyn=new i.Buf32(g),M.sane=1,M.back=-1,m):p}function _(C){var M;return C&&C.state?((M=C.state).wsize=0,M.whave=0,M.wnext=0,k(C)):p}function S(C,M){var y,L;return C&&C.state?(L=C.state,M<0?(y=0,M=-M):(y=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15<M)?p:(L.window!==null&&L.wbits!==M&&(L.window=null),L.wrap=y,L.wbits=M,_(C))):p}function O(C,M){var y,L;return C?(L=new v,(C.state=L).window=null,(y=S(C,M))!==m&&(C.state=null),y):p}var z,I,D=!0;function U(C){if(D){var M;for(z=new i.Buf32(512),I=new i.Buf32(32),M=0;M<144;)C.lens[M++]=8;for(;M<256;)C.lens[M++]=9;for(;M<280;)C.lens[M++]=7;for(;M<288;)C.lens[M++]=8;for(c(d,C.lens,0,288,z,0,C.work,{bits:9}),M=0;M<32;)C.lens[M++]=5;c(f,C.lens,0,32,I,0,C.work,{bits:5}),D=!1}C.lencode=z,C.lenbits=9,C.distcode=I,C.distbits=5}function H(C,M,y,L){var ee,F=C.state;return F.window===null&&(F.wsize=1<<F.wbits,F.wnext=0,F.whave=0,F.window=new i.Buf8(F.wsize)),L>=F.wsize?(i.arraySet(F.window,M,y-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):(L<(ee=F.wsize-F.wnext)&&(ee=L),i.arraySet(F.window,M,y-L,ee,F.wnext),(L-=ee)?(i.arraySet(F.window,M,y-L,L,0),F.wnext=L,F.whave=F.wsize):(F.wnext+=ee,F.wnext===F.wsize&&(F.wnext=0),F.whave<F.wsize&&(F.whave+=ee))),0}o.inflateReset=_,o.inflateReset2=S,o.inflateResetKeep=k,o.inflateInit=function(C){return O(C,15)},o.inflateInit2=O,o.inflate=function(C,M){var y,L,ee,F,$,V,re,A,P,Q,G,te,pe,X,oe,de,se,he,be,_e,x,K,W,T,j=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(!C||!C.state||!C.output||!C.input&&C.avail_in!==0)return p;(y=C.state).mode===12&&(y.mode=13),$=C.next_out,ee=C.output,re=C.avail_out,F=C.next_in,L=C.input,V=C.avail_in,A=y.hold,P=y.bits,Q=V,G=re,K=m;e:for(;;)switch(y.mode){case w:if(y.wrap===0){y.mode=13;break}for(;P<16;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}if(2&y.wrap&&A===35615){R[y.check=0]=255&A,R[1]=A>>>8&255,y.check=a(y.check,R,2,0),P=A=0,y.mode=2;break}if(y.flags=0,y.head&&(y.head.done=!1),!(1&y.wrap)||(((255&A)<<8)+(A>>8))%31){C.msg="incorrect header check",y.mode=30;break}if((15&A)!=8){C.msg="unknown compression method",y.mode=30;break}if(P-=4,x=8+(15&(A>>>=4)),y.wbits===0)y.wbits=x;else if(x>y.wbits){C.msg="invalid window size",y.mode=30;break}y.dmax=1<<x,C.adler=y.check=1,y.mode=512&A?10:12,P=A=0;break;case 2:for(;P<16;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}if(y.flags=A,(255&y.flags)!=8){C.msg="unknown compression method",y.mode=30;break}if(57344&y.flags){C.msg="unknown header flags set",y.mode=30;break}y.head&&(y.head.text=A>>8&1),512&y.flags&&(R[0]=255&A,R[1]=A>>>8&255,y.check=a(y.check,R,2,0)),P=A=0,y.mode=3;case 3:for(;P<32;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}y.head&&(y.head.time=A),512&y.flags&&(R[0]=255&A,R[1]=A>>>8&255,R[2]=A>>>16&255,R[3]=A>>>24&255,y.check=a(y.check,R,4,0)),P=A=0,y.mode=4;case 4:for(;P<16;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}y.head&&(y.head.xflags=255&A,y.head.os=A>>8),512&y.flags&&(R[0]=255&A,R[1]=A>>>8&255,y.check=a(y.check,R,2,0)),P=A=0,y.mode=5;case 5:if(1024&y.flags){for(;P<16;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}y.length=A,y.head&&(y.head.extra_len=A),512&y.flags&&(R[0]=255&A,R[1]=A>>>8&255,y.check=a(y.check,R,2,0)),P=A=0}else y.head&&(y.head.extra=null);y.mode=6;case 6:if(1024&y.flags&&(V<(te=y.length)&&(te=V),te&&(y.head&&(x=y.head.extra_len-y.length,y.head.extra||(y.head.extra=new Array(y.head.extra_len)),i.arraySet(y.head.extra,L,F,te,x)),512&y.flags&&(y.check=a(y.check,L,te,F)),V-=te,F+=te,y.length-=te),y.length))break e;y.length=0,y.mode=7;case 7:if(2048&y.flags){if(V===0)break e;for(te=0;x=L[F+te++],y.head&&x&&y.length<65536&&(y.head.name+=String.fromCharCode(x)),x&&te<V;);if(512&y.flags&&(y.check=a(y.check,L,te,F)),V-=te,F+=te,x)break e}else y.head&&(y.head.name=null);y.length=0,y.mode=8;case 8:if(4096&y.flags){if(V===0)break e;for(te=0;x=L[F+te++],y.head&&x&&y.length<65536&&(y.head.comment+=String.fromCharCode(x)),x&&te<V;);if(512&y.flags&&(y.check=a(y.check,L,te,F)),V-=te,F+=te,x)break e}else y.head&&(y.head.comment=null);y.mode=9;case 9:if(512&y.flags){for(;P<16;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}if(A!==(65535&y.check)){C.msg="header crc mismatch",y.mode=30;break}P=A=0}y.head&&(y.head.hcrc=y.flags>>9&1,y.head.done=!0),C.adler=y.check=0,y.mode=12;break;case 10:for(;P<32;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}C.adler=y.check=b(A),P=A=0,y.mode=11;case 11:if(y.havedict===0)return C.next_out=$,C.avail_out=re,C.next_in=F,C.avail_in=V,y.hold=A,y.bits=P,2;C.adler=y.check=1,y.mode=12;case 12:if(M===5||M===6)break e;case 13:if(y.last){A>>>=7&P,P-=7&P,y.mode=27;break}for(;P<3;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}switch(y.last=1&A,P-=1,3&(A>>>=1)){case 0:y.mode=14;break;case 1:if(U(y),y.mode=20,M!==6)break;A>>>=2,P-=2;break e;case 2:y.mode=17;break;case 3:C.msg="invalid block type",y.mode=30}A>>>=2,P-=2;break;case 14:for(A>>>=7&P,P-=7&P;P<32;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}if((65535&A)!=(A>>>16^65535)){C.msg="invalid stored block lengths",y.mode=30;break}if(y.length=65535&A,P=A=0,y.mode=15,M===6)break e;case 15:y.mode=16;case 16:if(te=y.length){if(V<te&&(te=V),re<te&&(te=re),te===0)break e;i.arraySet(ee,L,F,te,$),V-=te,F+=te,re-=te,$+=te,y.length-=te;break}y.mode=12;break;case 17:for(;P<14;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}if(y.nlen=257+(31&A),A>>>=5,P-=5,y.ndist=1+(31&A),A>>>=5,P-=5,y.ncode=4+(15&A),A>>>=4,P-=4,286<y.nlen||30<y.ndist){C.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(V===0)break e;V--,A+=L[F++]<<P,P+=8}y.lens[q[y.have++]]=7&A,A>>>=3,P-=3}for(;y.have<19;)y.lens[q[y.have++]]=0;if(y.lencode=y.lendyn,y.lenbits=7,W={bits:y.lenbits},K=c(0,y.lens,0,19,y.lencode,0,y.work,W),y.lenbits=W.bits,K){C.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(;de=(j=y.lencode[A&(1<<y.lenbits)-1])>>>16&255,se=65535&j,!((oe=j>>>24)<=P);){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}if(se<16)A>>>=oe,P-=oe,y.lens[y.have++]=se;else{if(se===16){for(T=oe+2;P<T;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}if(A>>>=oe,P-=oe,y.have===0){C.msg="invalid bit length repeat",y.mode=30;break}x=y.lens[y.have-1],te=3+(3&A),A>>>=2,P-=2}else if(se===17){for(T=oe+3;P<T;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}P-=oe,x=0,te=3+(7&(A>>>=oe)),A>>>=3,P-=3}else{for(T=oe+7;P<T;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}P-=oe,x=0,te=11+(127&(A>>>=oe)),A>>>=7,P-=7}if(y.have+te>y.nlen+y.ndist){C.msg="invalid bit length repeat",y.mode=30;break}for(;te--;)y.lens[y.have++]=x}}if(y.mode===30)break;if(y.lens[256]===0){C.msg="invalid code -- missing end-of-block",y.mode=30;break}if(y.lenbits=9,W={bits:y.lenbits},K=c(d,y.lens,0,y.nlen,y.lencode,0,y.work,W),y.lenbits=W.bits,K){C.msg="invalid literal/lengths set",y.mode=30;break}if(y.distbits=6,y.distcode=y.distdyn,W={bits:y.distbits},K=c(f,y.lens,y.nlen,y.ndist,y.distcode,0,y.work,W),y.distbits=W.bits,K){C.msg="invalid distances set",y.mode=30;break}if(y.mode=20,M===6)break e;case 20:y.mode=21;case 21:if(6<=V&&258<=re){C.next_out=$,C.avail_out=re,C.next_in=F,C.avail_in=V,y.hold=A,y.bits=P,l(C,G),$=C.next_out,ee=C.output,re=C.avail_out,F=C.next_in,L=C.input,V=C.avail_in,A=y.hold,P=y.bits,y.mode===12&&(y.back=-1);break}for(y.back=0;de=(j=y.lencode[A&(1<<y.lenbits)-1])>>>16&255,se=65535&j,!((oe=j>>>24)<=P);){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}if(de&&(240&de)==0){for(he=oe,be=de,_e=se;de=(j=y.lencode[_e+((A&(1<<he+be)-1)>>he)])>>>16&255,se=65535&j,!(he+(oe=j>>>24)<=P);){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}A>>>=he,P-=he,y.back+=he}if(A>>>=oe,P-=oe,y.back+=oe,y.length=se,de===0){y.mode=26;break}if(32&de){y.back=-1,y.mode=12;break}if(64&de){C.msg="invalid literal/length code",y.mode=30;break}y.extra=15&de,y.mode=22;case 22:if(y.extra){for(T=y.extra;P<T;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}y.length+=A&(1<<y.extra)-1,A>>>=y.extra,P-=y.extra,y.back+=y.extra}y.was=y.length,y.mode=23;case 23:for(;de=(j=y.distcode[A&(1<<y.distbits)-1])>>>16&255,se=65535&j,!((oe=j>>>24)<=P);){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}if((240&de)==0){for(he=oe,be=de,_e=se;de=(j=y.distcode[_e+((A&(1<<he+be)-1)>>he)])>>>16&255,se=65535&j,!(he+(oe=j>>>24)<=P);){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}A>>>=he,P-=he,y.back+=he}if(A>>>=oe,P-=oe,y.back+=oe,64&de){C.msg="invalid distance code",y.mode=30;break}y.offset=se,y.extra=15&de,y.mode=24;case 24:if(y.extra){for(T=y.extra;P<T;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}y.offset+=A&(1<<y.extra)-1,A>>>=y.extra,P-=y.extra,y.back+=y.extra}if(y.offset>y.dmax){C.msg="invalid distance too far back",y.mode=30;break}y.mode=25;case 25:if(re===0)break e;if(te=G-re,y.offset>te){if((te=y.offset-te)>y.whave&&y.sane){C.msg="invalid distance too far back",y.mode=30;break}pe=te>y.wnext?(te-=y.wnext,y.wsize-te):y.wnext-te,te>y.length&&(te=y.length),X=y.window}else X=ee,pe=$-y.offset,te=y.length;for(re<te&&(te=re),re-=te,y.length-=te;ee[$++]=X[pe++],--te;);y.length===0&&(y.mode=21);break;case 26:if(re===0)break e;ee[$++]=y.length,re--,y.mode=21;break;case 27:if(y.wrap){for(;P<32;){if(V===0)break e;V--,A|=L[F++]<<P,P+=8}if(G-=re,C.total_out+=G,y.total+=G,G&&(C.adler=y.check=y.flags?a(y.check,ee,G,$-G):s(y.check,ee,G,$-G)),G=re,(y.flags?A:b(A))!==y.check){C.msg="incorrect data check",y.mode=30;break}P=A=0}y.mode=28;case 28:if(y.wrap&&y.flags){for(;P<32;){if(V===0)break e;V--,A+=L[F++]<<P,P+=8}if(A!==(4294967295&y.total)){C.msg="incorrect length check",y.mode=30;break}P=A=0}y.mode=29;case 29:K=1;break e;case 30:K=-3;break e;case 31:return-4;case 32:default:return p}return C.next_out=$,C.avail_out=re,C.next_in=F,C.avail_in=V,y.hold=A,y.bits=P,(y.wsize||G!==C.avail_out&&y.mode<30&&(y.mode<27||M!==4))&&H(C,C.output,C.next_out,G-C.avail_out)?(y.mode=31,-4):(Q-=C.avail_in,G-=C.avail_out,C.total_in+=Q,C.total_out+=G,y.total+=G,y.wrap&&G&&(C.adler=y.check=y.flags?a(y.check,ee,G,C.next_out-G):s(y.check,ee,G,C.next_out-G)),C.data_type=y.bits+(y.last?64:0)+(y.mode===12?128:0)+(y.mode===20||y.mode===15?256:0),(Q==0&&G===0||M===4)&&K===m&&(K=-5),K)},o.inflateEnd=function(C){if(!C||!C.state)return p;var M=C.state;return M.window&&(M.window=null),C.state=null,m},o.inflateGetHeader=function(C,M){var y;return C&&C.state?(2&(y=C.state).wrap)==0?p:((y.head=M).done=!1,m):p},o.inflateSetDictionary=function(C,M){var y,L=M.length;return C&&C.state?(y=C.state).wrap!==0&&y.mode!==11?p:y.mode===11&&s(1,M,L,0)!==y.check?-3:H(C,M,L,L)?(y.mode=31,-4):(y.havedict=1,m):p},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,p,w,u,g,b){var v,k,_,S,O,z,I,D,U,H=b.bits,C=0,M=0,y=0,L=0,ee=0,F=0,$=0,V=0,re=0,A=0,P=null,Q=0,G=new i.Buf16(16),te=new i.Buf16(16),pe=null,X=0;for(C=0;C<=15;C++)G[C]=0;for(M=0;M<p;M++)G[f[m+M]]++;for(ee=H,L=15;1<=L&&G[L]===0;L--);if(L<ee&&(ee=L),L===0)return w[u++]=20971520,w[u++]=20971520,b.bits=1,0;for(y=1;y<L&&G[y]===0;y++);for(ee<y&&(ee=y),C=V=1;C<=15;C++)if(V<<=1,(V-=G[C])<0)return-1;if(0<V&&(d===0||L!==1))return-1;for(te[1]=0,C=1;C<15;C++)te[C+1]=te[C]+G[C];for(M=0;M<p;M++)f[m+M]!==0&&(g[te[f[m+M]]++]=M);if(z=d===0?(P=pe=g,19):d===1?(P=s,Q-=257,pe=a,X-=257,256):(P=l,pe=c,-1),C=y,O=u,$=M=A=0,_=-1,S=(re=1<<(F=ee))-1,d===1&&852<re||d===2&&592<re)return 1;for(;;){for(I=C-$,U=g[M]<z?(D=0,g[M]):g[M]>z?(D=pe[X+g[M]],P[Q+g[M]]):(D=96,0),v=1<<C-$,y=k=1<<F;w[O+(A>>$)+(k-=v)]=I<<24|D<<16|U|0,k!==0;);for(v=1<<C-1;A&v;)v>>=1;if(v!==0?(A&=v-1,A+=v):A=0,M++,--G[C]==0){if(C===L)break;C=f[m+g[M]]}if(ee<C&&(A&S)!==_){for($===0&&($=ee),O+=y,V=1<<(F=C-$);F+$<L&&!((V-=G[F+$])<=0);)F++,V<<=1;if(re+=1<<F,d===1&&852<re||d===2&&592<re)return 1;w[_=A&S]=ee<<24|F<<16|O-u|0}}return A!==0&&(w[O+A]=C-$<<24|64<<16|0),b.bits=ee,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(j){for(var R=j.length;0<=--R;)j[R]=0}var c=0,d=29,f=256,m=f+1+d,p=30,w=19,u=2*m+1,g=15,b=16,v=7,k=256,_=16,S=17,O=18,z=[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],U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],H=new Array(2*(m+2));l(H);var C=new Array(2*p);l(C);var M=new Array(512);l(M);var y=new Array(256);l(y);var L=new Array(d);l(L);var ee,F,$,V=new Array(p);function re(j,R,q,J,B){this.static_tree=j,this.extra_bits=R,this.extra_base=q,this.elems=J,this.max_length=B,this.has_stree=j&&j.length}function A(j,R){this.dyn_tree=j,this.max_code=0,this.stat_desc=R}function P(j){return j<256?M[j]:M[256+(j>>>7)]}function Q(j,R){j.pending_buf[j.pending++]=255&R,j.pending_buf[j.pending++]=R>>>8&255}function G(j,R,q){j.bi_valid>b-q?(j.bi_buf|=R<<j.bi_valid&65535,Q(j,j.bi_buf),j.bi_buf=R>>b-j.bi_valid,j.bi_valid+=q-b):(j.bi_buf|=R<<j.bi_valid&65535,j.bi_valid+=q)}function te(j,R,q){G(j,q[2*R],q[2*R+1])}function pe(j,R){for(var q=0;q|=1&j,j>>>=1,q<<=1,0<--R;);return q>>>1}function X(j,R,q){var J,B,ne=new Array(g+1),ue=0;for(J=1;J<=g;J++)ne[J]=ue=ue+q[J-1]<<1;for(B=0;B<=R;B++){var ie=j[2*B+1];ie!==0&&(j[2*B]=pe(ne[ie]++,ie))}}function oe(j){var R;for(R=0;R<m;R++)j.dyn_ltree[2*R]=0;for(R=0;R<p;R++)j.dyn_dtree[2*R]=0;for(R=0;R<w;R++)j.bl_tree[2*R]=0;j.dyn_ltree[2*k]=1,j.opt_len=j.static_len=0,j.last_lit=j.matches=0}function de(j){8<j.bi_valid?Q(j,j.bi_buf):0<j.bi_valid&&(j.pending_buf[j.pending++]=j.bi_buf),j.bi_buf=0,j.bi_valid=0}function se(j,R,q,J){var B=2*R,ne=2*q;return j[B]<j[ne]||j[B]===j[ne]&&J[R]<=J[q]}function he(j,R,q){for(var J=j.heap[q],B=q<<1;B<=j.heap_len&&(B<j.heap_len&&se(R,j.heap[B+1],j.heap[B],j.depth)&&B++,!se(R,J,j.heap[B],j.depth));)j.heap[q]=j.heap[B],q=B,B<<=1;j.heap[q]=J}function be(j,R,q){var J,B,ne,ue,ie=0;if(j.last_lit!==0)for(;J=j.pending_buf[j.d_buf+2*ie]<<8|j.pending_buf[j.d_buf+2*ie+1],B=j.pending_buf[j.l_buf+ie],ie++,J===0?te(j,B,R):(te(j,(ne=y[B])+f+1,R),(ue=z[ne])!==0&&G(j,B-=L[ne],ue),te(j,ne=P(--J),q),(ue=I[ne])!==0&&G(j,J-=V[ne],ue)),ie<j.last_lit;);te(j,k,R)}function _e(j,R){var q,J,B,ne=R.dyn_tree,ue=R.stat_desc.static_tree,ie=R.stat_desc.has_stree,Z=R.stat_desc.elems,ce=-1;for(j.heap_len=0,j.heap_max=u,q=0;q<Z;q++)ne[2*q]!==0?(j.heap[++j.heap_len]=ce=q,j.depth[q]=0):ne[2*q+1]=0;for(;j.heap_len<2;)ne[2*(B=j.heap[++j.heap_len]=ce<2?++ce:0)]=1,j.depth[B]=0,j.opt_len--,ie&&(j.static_len-=ue[2*B+1]);for(R.max_code=ce,q=j.heap_len>>1;1<=q;q--)he(j,ne,q);for(B=Z;q=j.heap[1],j.heap[1]=j.heap[j.heap_len--],he(j,ne,1),J=j.heap[1],j.heap[--j.heap_max]=q,j.heap[--j.heap_max]=J,ne[2*B]=ne[2*q]+ne[2*J],j.depth[B]=(j.depth[q]>=j.depth[J]?j.depth[q]:j.depth[J])+1,ne[2*q+1]=ne[2*J+1]=B,j.heap[1]=B++,he(j,ne,1),2<=j.heap_len;);j.heap[--j.heap_max]=j.heap[1],(function(le,Y){var ae,fe,ve,xe,we,Ee,je=Y.dyn_tree,ft=Y.max_code,Qn=Y.stat_desc.static_tree,ki=Y.stat_desc.has_stree,_i=Y.stat_desc.extra_bits,eo=Y.stat_desc.extra_base,Ie=Y.stat_desc.max_length,Le=0;for(xe=0;xe<=g;xe++)le.bl_count[xe]=0;for(je[2*le.heap[le.heap_max]+1]=0,ae=le.heap_max+1;ae<u;ae++)Ie<(xe=je[2*je[2*(fe=le.heap[ae])+1]+1]+1)&&(xe=Ie,Le++),je[2*fe+1]=xe,ft<fe||(le.bl_count[xe]++,we=0,eo<=fe&&(we=_i[fe-eo]),Ee=je[2*fe],le.opt_len+=Ee*(xe+we),ki&&(le.static_len+=Ee*(Qn[2*fe+1]+we)));if(Le!==0){do{for(xe=Ie-1;le.bl_count[xe]===0;)xe--;le.bl_count[xe]--,le.bl_count[xe+1]+=2,le.bl_count[Ie]--,Le-=2}while(0<Le);for(xe=Ie;xe!==0;xe--)for(fe=le.bl_count[xe];fe!==0;)ft<(ve=le.heap[--ae])||(je[2*ve+1]!==xe&&(le.opt_len+=(xe-je[2*ve+1])*je[2*ve],je[2*ve+1]=xe),fe--)}})(j,R),X(ne,ce,j.bl_count)}function x(j,R,q){var J,B,ne=-1,ue=R[1],ie=0,Z=7,ce=4;for(ue===0&&(Z=138,ce=3),R[2*(q+1)+1]=65535,J=0;J<=q;J++)B=ue,ue=R[2*(J+1)+1],++ie<Z&&B===ue||(ie<ce?j.bl_tree[2*B]+=ie:B!==0?(B!==ne&&j.bl_tree[2*B]++,j.bl_tree[2*_]++):ie<=10?j.bl_tree[2*S]++:j.bl_tree[2*O]++,ne=B,ce=(ie=0)===ue?(Z=138,3):B===ue?(Z=6,3):(Z=7,4))}function K(j,R,q){var J,B,ne=-1,ue=R[1],ie=0,Z=7,ce=4;for(ue===0&&(Z=138,ce=3),J=0;J<=q;J++)if(B=ue,ue=R[2*(J+1)+1],!(++ie<Z&&B===ue)){if(ie<ce)for(;te(j,B,j.bl_tree),--ie!=0;);else B!==0?(B!==ne&&(te(j,B,j.bl_tree),ie--),te(j,_,j.bl_tree),G(j,ie-3,2)):ie<=10?(te(j,S,j.bl_tree),G(j,ie-3,3)):(te(j,O,j.bl_tree),G(j,ie-11,7));ne=B,ce=(ie=0)===ue?(Z=138,3):B===ue?(Z=6,3):(Z=7,4)}}l(V);var W=!1;function T(j,R,q,J){G(j,(c<<1)+(J?1:0),3),(function(B,ne,ue,ie){de(B),Q(B,ue),Q(B,~ue),i.arraySet(B.pending_buf,B.window,ne,ue,B.pending),B.pending+=ue})(j,R,q)}o._tr_init=function(j){W||((function(){var R,q,J,B,ne,ue=new Array(g+1);for(B=J=0;B<d-1;B++)for(L[B]=J,R=0;R<1<<z[B];R++)y[J++]=B;for(y[J-1]=B,B=ne=0;B<16;B++)for(V[B]=ne,R=0;R<1<<I[B];R++)M[ne++]=B;for(ne>>=7;B<p;B++)for(V[B]=ne<<7,R=0;R<1<<I[B]-7;R++)M[256+ne++]=B;for(q=0;q<=g;q++)ue[q]=0;for(R=0;R<=143;)H[2*R+1]=8,R++,ue[8]++;for(;R<=255;)H[2*R+1]=9,R++,ue[9]++;for(;R<=279;)H[2*R+1]=7,R++,ue[7]++;for(;R<=287;)H[2*R+1]=8,R++,ue[8]++;for(X(H,m+1,ue),R=0;R<p;R++)C[2*R+1]=5,C[2*R]=pe(R,5);ee=new re(H,z,f+1,m,g),F=new re(C,I,0,p,g),$=new re(new Array(0),D,0,w,v)})(),W=!0),j.l_desc=new A(j.dyn_ltree,ee),j.d_desc=new A(j.dyn_dtree,F),j.bl_desc=new A(j.bl_tree,$),j.bi_buf=0,j.bi_valid=0,oe(j)},o._tr_stored_block=T,o._tr_flush_block=function(j,R,q,J){var B,ne,ue=0;0<j.level?(j.strm.data_type===2&&(j.strm.data_type=(function(ie){var Z,ce=4093624447;for(Z=0;Z<=31;Z++,ce>>>=1)if(1&ce&&ie.dyn_ltree[2*Z]!==0)return s;if(ie.dyn_ltree[18]!==0||ie.dyn_ltree[20]!==0||ie.dyn_ltree[26]!==0)return a;for(Z=32;Z<f;Z++)if(ie.dyn_ltree[2*Z]!==0)return a;return s})(j)),_e(j,j.l_desc),_e(j,j.d_desc),ue=(function(ie){var Z;for(x(ie,ie.dyn_ltree,ie.l_desc.max_code),x(ie,ie.dyn_dtree,ie.d_desc.max_code),_e(ie,ie.bl_desc),Z=w-1;3<=Z&&ie.bl_tree[2*U[Z]+1]===0;Z--);return ie.opt_len+=3*(Z+1)+5+5+4,Z})(j),B=j.opt_len+3+7>>>3,(ne=j.static_len+3+7>>>3)<=B&&(B=ne)):B=ne=q+5,q+4<=B&&R!==-1?T(j,R,q,J):j.strategy===4||ne===B?(G(j,2+(J?1:0),3),be(j,H,C)):(G(j,4+(J?1:0),3),(function(ie,Z,ce,le){var Y;for(G(ie,Z-257,5),G(ie,ce-1,5),G(ie,le-4,4),Y=0;Y<le;Y++)G(ie,ie.bl_tree[2*U[Y]+1],3);K(ie,ie.dyn_ltree,Z-1),K(ie,ie.dyn_dtree,ce-1)})(j,j.l_desc.max_code+1,j.d_desc.max_code+1,ue+1),be(j,j.dyn_ltree,j.dyn_dtree)),oe(j),J&&de(j)},o._tr_tally=function(j,R,q){return j.pending_buf[j.d_buf+2*j.last_lit]=R>>>8&255,j.pending_buf[j.d_buf+2*j.last_lit+1]=255&R,j.pending_buf[j.l_buf+j.last_lit]=255&q,j.last_lit++,R===0?j.dyn_ltree[2*q]++:(j.matches++,R--,j.dyn_ltree[2*(y[q]+f+1)]++,j.dyn_dtree[2*P(R)]++),j.last_lit===j.lit_bufsize-1},o._tr_align=function(j){G(j,2,3),te(j,k,H),(function(R){R.bi_valid===16?(Q(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)})(j)}},{"../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,p={},w=!1,u=s.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(s);g=g&&g.setTimeout?g:s,l={}.toString.call(s.process)==="[object process]"?function(_){process.nextTick(function(){v(_)})}:(function(){if(s.postMessage&&!s.importScripts){var _=!0,S=s.onmessage;return s.onmessage=function(){_=!1},s.postMessage("","*"),s.onmessage=S,_}})()?(f="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",k,!1):s.attachEvent("onmessage",k),function(_){s.postMessage(f+_,"*")}):s.MessageChannel?((d=new MessageChannel).port1.onmessage=function(_){v(_.data)},function(_){d.port2.postMessage(_)}):u&&"onreadystatechange"in u.createElement("script")?(c=u.documentElement,function(_){var S=u.createElement("script");S.onreadystatechange=function(){v(_),S.onreadystatechange=null,c.removeChild(S),S=null},c.appendChild(S)}):function(_){setTimeout(v,0,_)},g.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var S=new Array(arguments.length-1),O=0;O<S.length;O++)S[O]=arguments[O+1];var z={callback:_,args:S};return p[m]=z,l(m),m++},g.clearImmediate=b}function b(_){delete p[_]}function v(_){if(w)setTimeout(v,0,_);else{var S=p[_];if(S){w=!0;try{(function(O){var z=O.callback,I=O.args;switch(I.length){case 0:z();break;case 1:z(I[0]);break;case 2:z(I[0],I[1]);break;case 3:z(I[0],I[1],I[2]);break;default:z.apply(a,I)}})(S)}finally{b(_),w=!1}}}}function k(_){_.source===s&&typeof _.data=="string"&&_.data.indexOf(f)===0&&v(+_.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)})})(to)),to.exports}var Ac=jc();const Tc=zc(Ac);var Hr={exports:{}},Oc=Hr.exports,zi;function Ic(){return zi||(zi=1,(function(e,t){(function(r,n){n()})(Oc,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,p=document.createElement("a");d=d||c.name||"download",p.download=d,p.rel="noopener",typeof c=="string"?(p.href=c,p.origin===location.origin?i(p):o(p.href)?n(c,d,f):i(p,p.target="_blank")):(p.href=m.createObjectURL(c),setTimeout(function(){m.revokeObjectURL(p.href)},4e4),setTimeout(function(){i(p)},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 p=c.type==="application/octet-stream",w=/constructor/i.test(s.HTMLElement)||s.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||p&&w||a)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var k=g.result;k=u?k:k.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=k:location=k,m=null},g.readAsDataURL(c)}else{var b=s.URL||s.webkitURL,v=b.createObjectURL(c);m?m.location=v:location.href=v,m=null,setTimeout(function(){b.revokeObjectURL(v)},4e4)}});s.saveAs=l.saveAs=l,e.exports=l})})(Hr)),Hr.exports}var ji=Ic();const Ai=async(e,t)=>{const r=new Tc,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"});ji.saveAs(i,`jsonpages-project-${t}-${Date.now()}.zip`)},Ti=(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"});ji.saveAs(c,`${t}.html`)};function Oi(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=Oi(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=Oi(e))&&(n&&(n+=" "),n+=t);return n}const Dc=(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},Rc=(e,t)=>({classGroupId:e,validator:t}),Ii=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Vr="-",Pi=[],Mc="arbitrary..",Lc=e=>{const t=Bc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Fc(s);const a=s.split(Vr),l=a[0]===""&&a.length>1?1:0;return Di(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=n[s],c=r[s];return l?c?Dc(c,l):l:c||Pi}return r[s]||Pi}}},Di=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],i=r.nextPart.get(o);if(i){const c=Di(e,t+1,i);if(c)return c}const s=r.validators;if(s===null)return;const a=t===0?e.join(Vr):e.slice(t).join(Vr),l=s.length;for(let c=0;c<l;c++){const d=s[c];if(d.validator(a))return d.classGroupId}},Fc=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?Mc+n:void 0})(),Bc=e=>{const{theme:t,classGroups:r}=e;return Uc(r,t)},Uc=(e,t)=>{const r=Ii();for(const n in e){const o=e[n];ro(o,r,n,t)}return r},ro=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];$c(s,t,r,n)}},$c=(e,t,r,n)=>{if(typeof e=="string"){Wc(e,t,r);return}if(typeof e=="function"){Hc(e,t,r,n);return}Vc(e,t,r,n)},Wc=(e,t,r)=>{const n=e===""?t:Ri(t,e);n.classGroupId=r},Hc=(e,t,r,n)=>{if(Zc(e)){ro(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Rc(r,e))},Vc=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];ro(l,Ri(t,a),r,n)}},Ri=(e,t)=>{let r=e;const n=t.split(Vr),o=n.length;for(let i=0;i<o;i++){const s=n[i];let a=r.nextPart.get(s);a||(a=Ii(),r.nextPart.set(s,a)),r=a}return r},Zc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Gc=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)}}},no="!",Mi=":",Kc=[],Li=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Yc=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 u=0;u<d;u++){const g=o[u];if(s===0&&a===0){if(g===Mi){i.push(o.slice(l,u)),l=u+1;continue}if(g==="/"){c=u;continue}}g==="["?s++:g==="]"?s--:g==="("?a++:g===")"&&a--}const f=i.length===0?o:o.slice(l);let m=f,p=!1;f.endsWith(no)?(m=f.slice(0,-1),p=!0):f.startsWith(no)&&(m=f.slice(1),p=!0);const w=c&&c>l?c-l:void 0;return Li(i,p,m,w)};if(t){const o=t+Mi,i=n;n=s=>s.startsWith(o)?i(s.slice(o.length)):Li(Kc,!1,s,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},qc=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:Gc(e.cacheSize),parseClassName:Yc(e),sortModifiers:qc(e),...Lc(e)}),Jc=/\s+/,Qc=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(Jc);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:f,modifiers:m,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:u}=r(d);if(f){l=d+(l.length>0?" "+l:l);continue}let g=!!u,b=n(g?w.substring(0,u):w);if(!b){if(!g){l=d+(l.length>0?" "+l:l);continue}if(b=n(w),!b){l=d+(l.length>0?" "+l:l);continue}g=!1}const v=m.length===0?"":m.length===1?m[0]:i(m).join(":"),k=p?v+no:v,_=k+b;if(s.indexOf(_)>-1)continue;s.push(_);const S=o(b,g);for(let O=0;O<S.length;++O){const z=S[O];s.push(k+z)}l=d+(l.length>0?" "+l:l)}return l},ed=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Fi(r))&&(o&&(o+=" "),o+=n);return o},Fi=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Fi(e[n]))&&(r&&(r+=" "),r+=t);return r},td=(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=Qc(l,r);return o(l,d),d};return i=s,(...l)=>i(ed(...l))},rd=[],De=e=>{const t=r=>r[e]||rd;return t.isThemeGetter=!0,t},Bi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ui=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nd=/^\d+\/\d+$/,od=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,id=/\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$/,sd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ad=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ld=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dt=e=>nd.test(e),ke=e=>!!e&&!Number.isNaN(Number(e)),gt=e=>!!e&&Number.isInteger(Number(e)),oo=e=>e.endsWith("%")&&ke(e.slice(0,-1)),ct=e=>od.test(e),cd=()=>!0,dd=e=>id.test(e)&&!sd.test(e),$i=()=>!1,ud=e=>ad.test(e),fd=e=>ld.test(e),pd=e=>!me(e)&&!ge(e),hd=e=>Rt(e,Gi,$i),me=e=>Bi.test(e),zt=e=>Rt(e,Ki,dd),io=e=>Rt(e,xd,ke),Wi=e=>Rt(e,Vi,$i),md=e=>Rt(e,Zi,fd),Zr=e=>Rt(e,Yi,ud),ge=e=>Ui.test(e),lr=e=>Mt(e,Ki),gd=e=>Mt(e,wd),Hi=e=>Mt(e,Vi),bd=e=>Mt(e,Gi),vd=e=>Mt(e,Zi),Gr=e=>Mt(e,Yi,!0),Rt=(e,t,r)=>{const n=Bi.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Mt=(e,t,r=!1)=>{const n=Ui.exec(e);return n?n[1]?t(n[1]):r:!1},Vi=e=>e==="position"||e==="percentage",Zi=e=>e==="image"||e==="url",Gi=e=>e==="length"||e==="size"||e==="bg-size",Ki=e=>e==="length",xd=e=>e==="number",wd=e=>e==="family-name",Yi=e=>e==="shadow",yd=td(()=>{const e=De("color"),t=De("font"),r=De("text"),n=De("font-weight"),o=De("tracking"),i=De("leading"),s=De("breakpoint"),a=De("container"),l=De("spacing"),c=De("radius"),d=De("shadow"),f=De("inset-shadow"),m=De("text-shadow"),p=De("drop-shadow"),w=De("blur"),u=De("perspective"),g=De("aspect"),b=De("ease"),v=De("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[..._(),ge,me],O=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],I=()=>[ge,me,l],D=()=>[Dt,"full","auto",...I()],U=()=>[gt,"none","subgrid",ge,me],H=()=>["auto",{span:["full",gt,ge,me]},gt,ge,me],C=()=>[gt,"auto",ge,me],M=()=>["auto","min","max","fr",ge,me],y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...I()],F=()=>[Dt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],$=()=>[e,ge,me],V=()=>[..._(),Hi,Wi,{position:[ge,me]}],re=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",bd,hd,{size:[ge,me]}],P=()=>[oo,lr,zt],Q=()=>["","none","full",c,ge,me],G=()=>["",ke,lr,zt],te=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[ke,oo,Hi,Wi],oe=()=>["","none",w,ge,me],de=()=>["none",ke,ge,me],se=()=>["none",ke,ge,me],he=()=>[ke,ge,me],be=()=>[Dt,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ct],breakpoint:[ct],color:[cd],container:[ct],"drop-shadow":[ct],ease:["in","out","in-out"],font:[pd],"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",ke],text:[ct],"text-shadow":[ct],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dt,me,ge,g]}],container:["container"],columns:[{columns:[ke,me,ge,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:S()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],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",ge,me]}],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:[ke,Dt,"auto","initial","none",me]}],grow:[{grow:["",ke,ge,me]}],shrink:[{shrink:["",ke,ge,me]}],order:[{order:[gt,"first","last","none",ge,me]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...y(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...y()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":y()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],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:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[a,"screen",...F()]}],"min-w":[{"min-w":[a,"screen","none",...F()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",r,lr,zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ge,io]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",oo,me]}],"font-family":[{font:[gd,me,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,ge,me]}],"line-clamp":[{"line-clamp":[ke,"none",ge,io]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",ge,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",ge,zt]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[ke,"auto",ge,me]}],"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",ge,me]}],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",ge,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gt,ge,me],radial:["",ge,me],conic:[gt,ge,me]},vd,md]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border: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:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,ge,me]}],"outline-w":[{outline:["",ke,lr,zt]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",d,Gr,Zr]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",f,Gr,Zr]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[ke,zt]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",m,Gr,Zr]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[ke,ge,me]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"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":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[ge,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,me]}],filter:[{filter:["","none",ge,me]}],blur:[{blur:oe()}],brightness:[{brightness:[ke,ge,me]}],contrast:[{contrast:[ke,ge,me]}],"drop-shadow":[{"drop-shadow":["","none",p,Gr,Zr]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",ke,ge,me]}],"hue-rotate":[{"hue-rotate":[ke,ge,me]}],invert:[{invert:["",ke,ge,me]}],saturate:[{saturate:[ke,ge,me]}],sepia:[{sepia:["",ke,ge,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,me]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[ke,ge,me]}],"backdrop-contrast":[{"backdrop-contrast":[ke,ge,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,ge,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,ge,me]}],"backdrop-invert":[{"backdrop-invert":["",ke,ge,me]}],"backdrop-opacity":[{"backdrop-opacity":[ke,ge,me]}],"backdrop-saturate":[{"backdrop-saturate":[ke,ge,me]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,ge,me]}],"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",ge,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",ge,me]}],ease:[{ease:["linear","initial",b,ge,me]}],delay:[{delay:[ke,ge,me]}],animate:[{animate:["none",v,ge,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[u,ge,me]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[ge,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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",ge,me]}],"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",ge,me]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[ke,lr,zt,io]}],stroke:[{stroke:["none",...$()]}],"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 ye(...e){return yd(Pc(e))}var Kr={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 qi;function kd(){if(qi)return cr;qi=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,228 +25,228 @@
|
|
|
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 Xi;function _d(){return Xi||(Xi=1,process.env.NODE_ENV!=="production"&&(function(){function e(A){if(A==null)return null;if(typeof A=="function")return A.$$typeof===H?null:A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case g:return"Fragment";case v:return"Profiler";case b:return"StrictMode";case O:return"Suspense";case z:return"SuspenseList";case U:return"Activity"}if(typeof A=="object")switch(typeof A.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),A.$$typeof){case u:return"Portal";case _:return A.displayName||"Context";case k:return(A._context.displayName||"Context")+".Consumer";case S:var P=A.render;return A=A.displayName,A||(A=P.displayName||P.name||"",A=A!==""?"ForwardRef("+A+")":"ForwardRef"),A;case I:return P=A.displayName||null,P!==null?P:e(A.type)||"Memo";case D:P=A._payload,A=A._init;try{return e(A(P))}catch{}}return null}function t(A){return""+A}function r(A){try{t(A);var P=!1}catch{P=!0}if(P){P=console;var Q=P.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&A[Symbol.toStringTag]||A.constructor.name||"Object";return Q.call(P,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),t(A)}}function n(A){if(A===g)return"<>";if(typeof A=="object"&&A!==null&&A.$$typeof===D)return"<...>";try{var P=e(A);return P?"<"+P+">":"<...>"}catch{return"<...>"}}function o(){var A=C.A;return A===null?null:A.getOwner()}function i(){return Error("react-stack-top-frame")}function s(A){if(M.call(A,"key")){var P=Object.getOwnPropertyDescriptor(A,"key").get;if(P&&P.isReactWarning)return!1}return A.key!==void 0}function a(A,P){function Q(){ee||(ee=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",P))}Q.isReactWarning=!0,Object.defineProperty(A,"key",{get:Q,configurable:!0})}function l(){var A=e(this.type);return F[A]||(F[A]=!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.")),A=this.props.ref,A!==void 0?A:null}function c(A,P,Q,G,te,pe){var X=Q.ref;return A={$$typeof:w,type:A,key:P,props:Q,_owner:G},(X!==void 0?X:null)!==null?Object.defineProperty(A,"ref",{enumerable:!1,get:l}):Object.defineProperty(A,"ref",{enumerable:!1,value:null}),A._store={},Object.defineProperty(A._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(A,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(A,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.defineProperty(A,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:pe}),Object.freeze&&(Object.freeze(A.props),Object.freeze(A)),A}function d(A,P,Q,G,te,pe){var X=P.children;if(X!==void 0)if(G)if(y(X)){for(G=0;G<X.length;G++)f(X[G]);Object.freeze&&Object.freeze(X)}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(X);if(M.call(P,"key")){X=e(A);var oe=Object.keys(P).filter(function(se){return se!=="key"});G=0<oe.length?"{key: someKey, "+oe.join(": ..., ")+": ...}":"{key: someKey}",re[X+G]||(oe=0<oe.length?"{"+oe.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,X,oe,X),re[X+G]=!0)}if(X=null,Q!==void 0&&(r(Q),X=""+Q),s(P)&&(r(P.key),X=""+P.key),"key"in P){Q={};for(var de in P)de!=="key"&&(Q[de]=P[de])}else Q=P;return X&&a(Q,typeof A=="function"?A.displayName||A.name||"Unknown":A),c(A,X,Q,o(),te,pe)}function f(A){m(A)?A._store&&(A._store.validated=1):typeof A=="object"&&A!==null&&A.$$typeof===D&&(A._payload.status==="fulfilled"?m(A._payload.value)&&A._payload.value._store&&(A._payload.value._store.validated=1):A._store&&(A._store.validated=1))}function m(A){return typeof A=="object"&&A!==null&&A.$$typeof===w}var p=N,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),_=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),H=Symbol.for("react.client.reference"),C=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,y=Array.isArray,L=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(A){return A()}};var ee,F={},$=p.react_stack_bottom_frame.bind(p,i)(),V=L(n(i)),re={};dr.Fragment=g,dr.jsx=function(A,P,Q){var G=1e4>C.recentlyCreatedOwnerStacks++;return d(A,P,Q,!1,G?Error("react-stack-top-frame"):$,G?L(n(A)):V)},dr.jsxs=function(A,P,Q){var G=1e4>C.recentlyCreatedOwnerStacks++;return d(A,P,Q,!0,G?Error("react-stack-top-frame"):$,G?L(n(A)):V)}})()),dr}var Ji;function Sd(){return Ji||(Ji=1,process.env.NODE_ENV==="production"?Kr.exports=kd():Kr.exports=_d()),Kr.exports}var h=Sd();const Qi=N.createContext(void 0),es=({config:e,children:t})=>h.jsx(Qi.Provider,{value:{registry:e.registry,schemas:e.schemas,tenantId:e.tenantId,assets:e.assets,overlayDisabledSectionTypes:e.overlayDisabledSectionTypes},children:t});function ur(){const e=N.useContext(Qi);if(e===void 0)throw new Error("useConfig must be used within ConfigProvider");return e}const ts=N.createContext(void 0),Yr=({mode:e,children:t})=>(N.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]),h.jsx(ts.Provider,{value:{mode:e},children:t})),rs=()=>{const e=N.useContext(ts);if(e===void 0)throw new Error("useStudio must be used within a StudioProvider");return e};/**
|
|
34
34
|
* @license lucide-react v0.474.0 - ISC
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the ISC license.
|
|
37
37
|
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/const
|
|
38
|
+
*/const Cd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ns=(...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 Ed={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 Nd=N.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:s,...a},l)=>N.createElement("svg",{ref:l,...Ed,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ns("lucide",o),...a},[...s.map(([c,d])=>N.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
|
|
53
|
+
*/const Ne=(e,t)=>{const r=N.forwardRef(({className:n,...o},i)=>N.createElement(Nd,{ref:i,iconNode:t,className:ns(`lucide-${Cd(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 zd=Ne("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 jd=Ne("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 Ad=Ne("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 Td=Ne("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 so=Ne("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 qr=Ne("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 Od=Ne("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 ao=Ne("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 Id=Ne("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 Pd=Ne("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 Dd=Ne("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 Rd=Ne("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 Md=Ne("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.
|
|
122
122
|
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const
|
|
123
|
+
*/const os=Ne("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
124
124
|
* @license lucide-react v0.474.0 - ISC
|
|
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 Xr=Ne("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 lo=Ne("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 is=Ne("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 Ld=Ne("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 Fd=Ne("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 co=Ne("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 ss=Ne("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 Bd=Ne("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 Ud=Ne("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 $d=Ne("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=Ne("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 Hd=Ne("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 Jr=Ne("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 Vd=Ne("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 as=Ne("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=Ne("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 Pd=Ce("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 Dd extends z.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?h.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:[h.jsx(Id,{className:"text-amber-500",size:32}),h.jsxs("div",{className:"space-y-1",children:[h.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),h.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),h.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 Rd=({type:e,scope:t,isSelected:r,sectionId:n,sectionIndex:o=0,totalSections:i=0,onReorder:a})=>{const s=typeof o=="number"&&o>0&&a,l=typeof o=="number"&&o<i-1&&a;return h.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:ve("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:h.jsxs("div",{className:ve("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:[a&&n!=null&&h.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[h.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),s&&a(n,o-1)},disabled:!s,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section up","aria-label":"Move section up",children:h.jsx(Xn,{size:12,strokeWidth:2.5})}),h.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),l&&a(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:h.jsx($r,{size:12,strokeWidth:2.5})})]}),h.jsx("span",{className:"shrink-0",children:e}),h.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),h.jsx("span",{className:"shrink-0",children:t})]})})},lr=({section:e,menu:t,selectedId:r,reorderable:n,sectionIndex:o,totalSections:i,onReorder:a})=>{var x,k;const{mode:s}=Vi(),{registry:l,overlayDisabledSectionTypes:c}=sr(),d=s==="studio",u=d&&r===e.id,g=l[e.type],f=e.type==="header"||e.type==="footer"?"global":"local",w=Array.isArray(c)?c.includes(e.type):!1,p=e.type==="header"&&((x=e.settings)==null?void 0:x.sticky);if(!g)return h.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:[h.jsx("strong",{children:"Missing Component:"})," ",e.type]});const b=()=>{const _=g;return e.type==="header"&&t?h.jsx(_,{data:e.data,settings:e.settings,menu:t}):h.jsx(_,{data:e.data,settings:e.settings})},m=(k=e.data)==null?void 0:k.anchorId;return h.jsxs("div",{id:m||void 0,"data-section-id":d?e.id:void 0,"data-section-type":d?e.type:void 0,"data-section-scope":d?f:void 0,...d&&u?{"data-jp-selected":!0}:{},className:ve("relative w-full",d&&!w&&"group cursor-pointer",d&&p?"sticky top-0 z-[60]":e.type==="header"?"relative":"relative z-0",u&&"z-[70]"),children:[h.jsx("div",{className:e.type==="header"?"relative":"relative z-0",children:h.jsx(Dd,{type:e.type,children:b()})}),d&&!w&&h.jsx(Rd,{type:e.type,scope:f,isSelected:!!u,sectionId:n&&f==="local"?e.id:void 0,sectionIndex:n&&f==="local"?o:void 0,totalSections:n&&f==="local"?i:void 0,onReorder:n&&f==="local"?a:void 0})]})},Md=e=>{z.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])},Ld="application/json",eo=({pageConfig:e,siteConfig:t,menuConfig:r,selectedId:n,onReorder:o,scrollToSectionId:i,onActiveSectionChange:a})=>{var m,x;Md(e.meta);const[s,l]=z.useState(null),c=z.useRef({}),d=z.useRef(a);d.current=a;const u=mi(e,t),g=k=>{var _;(_=d.current)==null||_.call(d,k)};z.useEffect(()=>{if(!i)return;const k=c.current[i];k&&k.scrollIntoView({behavior:"smooth",block:"center"})},[i]),z.useEffect(()=>{if(!d.current)return;const _=[...u&&t.header?[t.header.id]:[],...e.sections.map(I=>I.id),...t.footer?[t.footer.id]:[]],S=new IntersectionObserver(I=>{I.forEach(R=>{var $;if(R.isIntersecting&&R.intersectionRatio>.5){const F=R.target.getAttribute("data-section-id");F&&(($=d.current)==null||$.call(d,F))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let O=!1;const j=requestAnimationFrame(()=>{O||_.forEach(I=>{const R=c.current[I];R&&S.observe(R)})});return()=>{O=!0,cancelAnimationFrame(j),S.disconnect()}},[e.sections,e["global-header"],u,(m=t.header)==null?void 0:m.id,(x=t.footer)==null?void 0:x.id]);const f=(k,_)=>{k.preventDefault(),k.dataTransfer.dropEffect="move",l(_)},w=()=>{l(null)},p=(k,_)=>{if(k.preventDefault(),l(null),!!o)try{const S=k.dataTransfer.getData(Ld),{sectionId:O}=JSON.parse(S);typeof O=="string"&&o(O,_)}catch{}},b=()=>{const k=typeof o=="function",_=e.sections.map((S,O)=>{const j=s===O;return k?h.jsxs("div",{ref:I=>{c.current[S.id]=I},"data-section-id":S.id,style:{position:"relative"},onMouseEnter:()=>g(S.id),children:[h.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:55,pointerEvents:"auto",backgroundColor:j?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:j?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:I=>f(I,O),onDragLeave:w,onDrop:I=>p(I,O)}),h.jsx(lr,{section:S,menu:r.main,selectedId:n,reorderable:!0,sectionIndex:O,totalSections:e.sections.length,onReorder:o})]},S.id):h.jsx("div",{ref:I=>{c.current[S.id]=I},"data-section-id":S.id,onMouseEnter:()=>g(S.id),children:h.jsx(lr,{section:S,menu:r.main,selectedId:n})},S.id)});if(k&&_.length>0){const S=e.sections.length,O=s===S;_.push(h.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,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:j=>f(j,S),onDragLeave:w,onDrop:j=>p(j,S)},"jp-drop-after-last"))}return _};return h.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[u&&t.header!=null&&h.jsx("div",{ref:k=>{c.current[t.header.id]=k},"data-section-id":t.header.id,onMouseEnter:()=>g(t.header.id),children:h.jsx(lr,{section:t.header,menu:r.main,selectedId:n})}),h.jsx("main",{className:"flex-1",children:b()}),t.footer!=null&&h.jsx("div",{ref:k=>{c.current[t.footer.id]=k},"data-section-id":t.footer.id,onMouseEnter:()=>g(t.footer.id),children:h.jsx(lr,{section:t.footer,selectedId:n})})]})},Vr=({mode:e,tenantCss:t,adminCss:r,children:n})=>(z.useLayoutEffect(()=>{const o=`jp-theme-${e}`,i=e==="tenant"?t:r;if(!document.getElementById(o)&&i){const a=document.createElement("style");a.id=o,a.innerHTML=i,document.head.appendChild(a)}return()=>{const a=document.getElementById(o);a&&a.remove()}},[e,t,r]),h.jsx(h.Fragment,{children:n}));function Fd(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return z.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const Zr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Mt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function to(e){return"nodeType"in e}function Fe(e){var t,r;return e?Mt(e)?e:to(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function ro(e){const{Document:t}=Fe(e);return e instanceof t}function cr(e){return Mt(e)?!1:e instanceof Fe(e).HTMLElement}function Xi(e){return e instanceof Fe(e).SVGElement}function Lt(e){return e?Mt(e)?e.document:to(e)?ro(e)?e:cr(e)||Xi(e)?e.ownerDocument:document:document:document}const qe=Zr?z.useLayoutEffect:z.useEffect;function Gr(e){const t=z.useRef(e);return qe(()=>{t.current=e}),z.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 Bd(){const e=z.useRef(null),t=z.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=z.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function dr(e,t){t===void 0&&(t=[e]);const r=z.useRef(e);return qe(()=>{r.current!==e&&(r.current=e)},t),r}function ur(e,t){const r=z.useRef();return z.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function Kr(e){const t=Gr(e),r=z.useRef(null),n=z.useCallback(o=>{o!==r.current&&(t==null||t(o,r.current)),r.current=o},[]);return[r,n]}function Yr(e){const t=z.useRef();return z.useEffect(()=>{t.current=e},[e]),t.current}let no={};function fr(e,t){return z.useMemo(()=>{if(t)return t;const r=no[e]==null?0:no[e]+1;return no[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,a)=>{const s=Object.entries(a);for(const[l,c]of s){const d=i[l];d!=null&&(i[l]=d+e*c)}return i},{...t})}}const Ft=Ji(1),pr=Ji(-1);function Ud(e){return"clientX"in e&&"clientY"in e}function qr(e){if(!e)return!1;const{KeyboardEvent:t}=Fe(e.target);return t&&e instanceof t}function $d(e){if(!e)return!1;const{TouchEvent:t}=Fe(e.target);return t&&e instanceof t}function Xr(e){if($d(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 Ud(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 Wd(e){return e.matches(Qi)?e:e.querySelector(Qi)}const Hd={display:"none"};function Vd(e){let{id:t,value:r}=e;return z.createElement("div",{id:t,style:Hd},r)}function Zd(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 z.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function Gd(){const[e,t]=z.useState("");return{announce:z.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const ea=z.createContext(null);function Kd(e){const t=z.useContext(ea);z.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Yd(){const[e]=z.useState(()=>new Set),t=z.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[z.useCallback(n=>{let{type:o,event:i}=n;e.forEach(a=>{var s;return(s=a[o])==null?void 0:s.call(a,i)})},[e]),t]}const qd={draggable:`
|
|
208
|
+
*/const Zd=Ne("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 Gd extends N.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?h.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:[h.jsx(Vd,{className:"text-amber-500",size:32}),h.jsxs("div",{className:"space-y-1",children:[h.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),h.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),h.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 h.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:ye("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:h.jsxs("div",{className:ye("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&&h.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[h.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:h.jsx(ao,{size:12,strokeWidth:2.5})}),h.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:h.jsx(qr,{size:12,strokeWidth:2.5})})]}),h.jsx("span",{className:"shrink-0",children:e}),h.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),h.jsx("span",{className:"shrink-0",children:t})]})})},fr=({section:e,menu:t,selectedId:r,reorderable:n,sectionIndex:o,totalSections:i,onReorder:s})=>{var v,k;const{mode:a}=rs(),{registry:l,overlayDisabledSectionTypes:c}=ur(),d=a==="studio",f=d&&r===e.id,m=l[e.type],p=e.type==="header"||e.type==="footer"?"global":"local",w=Array.isArray(c)?c.includes(e.type):!1,u=e.type==="header"&&((v=e.settings)==null?void 0:v.sticky);if(!m)return h.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:[h.jsx("strong",{children:"Missing Component:"})," ",e.type]});const g=()=>{const _=m;return e.type==="header"&&t?h.jsx(_,{data:e.data,settings:e.settings,menu:t}):h.jsx(_,{data:e.data,settings:e.settings})},b=(k=e.data)==null?void 0:k.anchorId;return h.jsxs("div",{id:b||void 0,"data-section-id":d?e.id:void 0,"data-section-type":d?e.type:void 0,"data-section-scope":d?p:void 0,...d&&f?{"data-jp-selected":!0}:{},className:ye("relative w-full",d&&!w&&"group cursor-pointer",d&&u?"sticky top-0 z-[60]":e.type==="header"?"relative":"relative z-0",f&&"z-[70]"),children:[h.jsx("div",{className:e.type==="header"?"relative":"relative z-0",children:h.jsx(Gd,{type:e.type,children:g()})}),d&&!w&&h.jsx(Kd,{type:e.type,scope:p,isSelected:!!f,sectionId:n&&p==="local"?e.id:void 0,sectionIndex:n&&p==="local"?o:void 0,totalSections:n&&p==="local"?i:void 0,onReorder:n&&p==="local"?s:void 0})]})},Yd=e=>{N.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])};function pr(e){return typeof e=="object"&&e!==null}function Qr(e){if(!pr(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function qd(e){return pr(e)&&typeof e.$ref=="string"&&e.$ref.trim().length>0}function Xd(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function ls(e,t){if(!t||t==="#")return e;const r=t.startsWith("#")?t.slice(1):t;if(!r||r==="/")return e;let n=e;for(const o of r.replace(/^\//,"").split("/")){const i=Xd(o);if(Array.isArray(n)){const s=Number(i);if(!Number.isInteger(s)||s<0||s>=n.length)return;n=n[s];continue}if(!pr(n)||!(i in n))return;n=n[i]}return n}function Ft(e){const n=e.trim().replace(/\\/g,"/").replace(/^\/+/,"").split("/"),o=[];for(const i of n)if(!(!i||i===".")){if(i===".."){o.length>0&&o.pop();continue}o.push(i)}return o.join("/")}function Jd(e){const t=Ft(e),r=t.lastIndexOf("/");return r===-1?"":t.slice(0,r)}function Qd(e,t){const r=new Set,n=Ft(e);n&&r.add(n);const o=Jd(t),i=Ft(o?`${o}/${e}`:e);return i&&r.add(i),Array.from(r)}function hr(e){return Array.isArray(e)?e.map(t=>hr(t)):Qr(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,hr(r)])):e}function mr(e,t,r){for(const n of t){const o=Ft(n);o&&e.set(o,r)}}function eu({pages:e,siteConfig:t,themeConfig:r,menuConfig:n,refDocuments:o}){const i=new Map;mr(i,["site.json","config/site.json","src/data/config/site.json"],t),mr(i,["theme.json","config/theme.json","src/data/config/theme.json"],r),mr(i,["menu.json","config/menu.json","src/data/config/menu.json"],n);for(const[s,a]of Object.entries(e)){const l=s.replace(/^\/+|\/+$/g,"")||"home";mr(i,[`pages/${l}.json`,`src/data/pages/${l}.json`],a)}for(const[s,a]of Object.entries(o??{}))mr(i,[s],a);return i}function tu(e,t,r){const[n,o=""]=e.split("#"),i=o?`/${o.replace(/^\//,"")}`:"";if(!n){const s=Ft(t),a=r.documents.get(s);if(a===void 0)return null;const l=ls(a,i);return l===void 0?null:{value:l,documentPath:s}}for(const s of Qd(n,t)){const a=r.documents.get(s);if(a===void 0)continue;const l=ls(a,i);if(l!==void 0)return{value:l,documentPath:s}}return null}function jt(e,t,r){if(Array.isArray(e))return e.map(n=>jt(n,t,r));if(!Qr(e))return e;if(qd(e)){const n=`${Ft(t)}::${e.$ref}`;if(r.stack.includes(n))return console.warn("[JsonPages] Circular $ref skipped",e.$ref),hr(e);if(r.cache.has(n)){const l=hr(r.cache.get(n)),c=Object.entries(e).filter(([f])=>f!=="$ref");if(c.length===0)return l;const d=Object.fromEntries(c.map(([f,m])=>[f,jt(m,t,r)]));return Qr(l)?{...l,...d}:l}const o=tu(e.$ref,t,r);if(!o)return console.warn("[JsonPages] Unresolved $ref",e.$ref),Object.fromEntries(Object.entries(e).map(([l,c])=>[l,jt(c,t,r)]));r.stack.push(n);const i=jt(o.value,o.documentPath,r);r.stack.pop(),r.cache.set(n,hr(i));const s=Object.entries(e).filter(([l])=>l!=="$ref");if(s.length===0)return i;const a=Object.fromEntries(s.map(([l,c])=>[l,jt(c,t,r)]));return Qr(i)?{...i,...a}:i}return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,jt(o,t,r)]))}function en(e,t,r){return jt(e,t,{documents:r,cache:new Map,stack:[]})}function uo(e){return pr(e)?typeof e.label=="string"&&typeof e.href=="string":!1}function ru(e){if(!pr(e))return null;const t=e.links;if(Array.isArray(t)&&t.every(uo))return t;const r=e.menu;if(Array.isArray(r)&&r.every(uo))return r;const n=e.menuConfig;return Array.isArray(n)&&n.every(uo)?n:null}function tn(e,t){const r=ru(e);return r||(Array.isArray(t)?t:[])}function rn(e,t){if(e.type==="header")return tn(e.data,t)}function Bt(e){const t=eu(e);return{pages:Object.fromEntries(Object.entries(e.pages).map(([r,n])=>[r,en(n,`pages/${r.replace(/^\/+|\/+$/g,"")||"home"}.json`,t)])),siteConfig:en(e.siteConfig,"config/site.json",t),themeConfig:en(e.themeConfig,"config/theme.json",t),menuConfig:en(e.menuConfig,"config/menu.json",t)}}const nu="application/json",fo=({pageConfig:e,siteConfig:t,menuConfig:r,selectedId:n,onReorder:o,scrollToSectionId:i,onActiveSectionChange:s})=>{var b,v;Yd(e.meta);const[a,l]=N.useState(null),c=N.useRef({}),d=N.useRef(s);d.current=s;const f=Ei(e,t),m=k=>{var _;(_=d.current)==null||_.call(d,k)};N.useEffect(()=>{if(!i)return;const k=c.current[i];k&&k.scrollIntoView({behavior:"smooth",block:"center"})},[i]),N.useEffect(()=>{if(!d.current)return;const _=[...f&&t.header?[t.header.id]:[],...e.sections.map(I=>I.id),...t.footer?[t.footer.id]:[]],S=new IntersectionObserver(I=>{I.forEach(D=>{var U;if(D.isIntersecting&&D.intersectionRatio>.5){const H=D.target.getAttribute("data-section-id");H&&((U=d.current)==null||U.call(d,H))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let O=!1;const z=requestAnimationFrame(()=>{O||_.forEach(I=>{const D=c.current[I];D&&S.observe(D)})});return()=>{O=!0,cancelAnimationFrame(z),S.disconnect()}},[e.sections,e["global-header"],f,(b=t.header)==null?void 0:b.id,(v=t.footer)==null?void 0:v.id]);const p=(k,_)=>{k.preventDefault(),k.dataTransfer.dropEffect="move",l(_)},w=()=>{l(null)},u=(k,_)=>{if(k.preventDefault(),l(null),!!o)try{const S=k.dataTransfer.getData(nu),{sectionId:O}=JSON.parse(S);typeof O=="string"&&o(O,_)}catch{}},g=()=>{const k=typeof o=="function",_=e.sections.map((S,O)=>{const z=a===O;return k?h.jsxs("div",{ref:I=>{c.current[S.id]=I},"data-section-id":S.id,style:{position:"relative"},onMouseEnter:()=>m(S.id),children:[h.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:55,pointerEvents:"auto",backgroundColor:z?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:z?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:I=>p(I,O),onDragLeave:w,onDrop:I=>u(I,O)}),h.jsx(fr,{section:S,menu:rn(S,r.main),selectedId:n,reorderable:!0,sectionIndex:O,totalSections:e.sections.length,onReorder:o})]},S.id):h.jsx("div",{ref:I=>{c.current[S.id]=I},"data-section-id":S.id,onMouseEnter:()=>m(S.id),children:h.jsx(fr,{section:S,menu:rn(S,r.main),selectedId:n})},S.id)});if(k&&_.length>0){const S=e.sections.length,O=a===S;_.push(h.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,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:z=>p(z,S),onDragLeave:w,onDrop:z=>u(z,S)},"jp-drop-after-last"))}return _};return h.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[f&&t.header!=null&&h.jsx("div",{ref:k=>{c.current[t.header.id]=k},"data-section-id":t.header.id,onMouseEnter:()=>m(t.header.id),children:h.jsx(fr,{section:t.header,menu:rn(t.header,r.main),selectedId:n})}),h.jsx("main",{className:"flex-1",children:g()}),t.footer!=null&&h.jsx("div",{ref:k=>{c.current[t.footer.id]=k},"data-section-id":t.footer.id,onMouseEnter:()=>m(t.footer.id),children:h.jsx(fr,{section:t.footer,selectedId:n})})]})},nn=({mode:e,tenantCss:t,adminCss:r,children:n})=>(N.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]),h.jsx(h.Fragment,{children:n}));function ou(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return N.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const on=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ut(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function po(e){return"nodeType"in e}function Ue(e){var t,r;return e?Ut(e)?e:po(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function ho(e){const{Document:t}=Ue(e);return e instanceof t}function gr(e){return Ut(e)?!1:e instanceof Ue(e).HTMLElement}function cs(e){return e instanceof Ue(e).SVGElement}function $t(e){return e?Ut(e)?e.document:po(e)?ho(e)?e:gr(e)||cs(e)?e.ownerDocument:document:document:document}const Xe=on?N.useLayoutEffect:N.useEffect;function sn(e){const t=N.useRef(e);return Xe(()=>{t.current=e}),N.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 iu(){const e=N.useRef(null),t=N.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=N.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function br(e,t){t===void 0&&(t=[e]);const r=N.useRef(e);return Xe(()=>{r.current!==e&&(r.current=e)},t),r}function vr(e,t){const r=N.useRef();return N.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function an(e){const t=sn(e),r=N.useRef(null),n=N.useCallback(o=>{o!==r.current&&(t==null||t(o,r.current)),r.current=o},[]);return[r,n]}function ln(e){const t=N.useRef();return N.useEffect(()=>{t.current=e},[e]),t.current}let mo={};function xr(e,t){return N.useMemo(()=>{if(t)return t;const r=mo[e]==null?0:mo[e]+1;return mo[e]=r,e+"-"+r},[e,t])}function ds(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 Wt=ds(1),wr=ds(-1);function su(e){return"clientX"in e&&"clientY"in e}function cn(e){if(!e)return!1;const{KeyboardEvent:t}=Ue(e.target);return t&&e instanceof t}function au(e){if(!e)return!1;const{TouchEvent:t}=Ue(e.target);return t&&e instanceof t}function dn(e){if(au(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 su(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}}}),us="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function lu(e){return e.matches(us)?e:e.querySelector(us)}const cu={display:"none"};function du(e){let{id:t,value:r}=e;return N.createElement("div",{id:t,style:cu},r)}function uu(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 N.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function fu(){const[e,t]=N.useState("");return{announce:N.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const fs=N.createContext(null);function pu(e){const t=N.useContext(fs);N.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function hu(){const[e]=N.useState(()=>new Set),t=N.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[N.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 mu={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
|
-
`},Xd={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 Jd(e){let{announcements:t=Xd,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=qd}=e;const{announce:i,announcement:a}=Gd(),s=fr("DndLiveRegion"),[l,c]=z.useState(!1);if(z.useEffect(()=>{c(!0)},[]),Kd(z.useMemo(()=>({onDragStart(u){let{active:g}=u;i(t.onDragStart({active:g}))},onDragMove(u){let{active:g,over:f}=u;t.onDragMove&&i(t.onDragMove({active:g,over:f}))},onDragOver(u){let{active:g,over:f}=u;i(t.onDragOver({active:g,over:f}))},onDragEnd(u){let{active:g,over:f}=u;i(t.onDragEnd({active:g,over:f}))},onDragCancel(u){let{active:g,over:f}=u;i(t.onDragCancel({active:g,over:f}))}}),[i,t])),!l)return null;const d=z.createElement(z.Fragment,null,z.createElement(Vd,{id:n,value:o.draggable}),z.createElement(Zd,{id:s,announcement:a}));return r?pt.createPortal(d,r):d}var Pe;(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"})(Pe||(Pe={}));function Jr(){}function oo(e,t){return z.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Qd(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return z.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Xe=Object.freeze({x:0,y:0});function ta(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function eu(e,t){const r=Xr(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 ra(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function tu(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function na(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 oa(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function ia(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 ru=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ia(t,t.left,t.top),i=[];for(const a of n){const{id:s}=a,l=r.get(s);if(l){const c=ta(ia(l),o);i.push({id:s,data:{droppableContainer:a,value:c}})}}return i.sort(ra)},nu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=na(t),i=[];for(const a of n){const{id:s}=a,l=r.get(s);if(l){const c=na(l),d=o.reduce((g,f,w)=>g+ta(c[w],f),0),u=Number((d/4).toFixed(4));i.push({id:s,data:{droppableContainer:a,value:u}})}}return i.sort(ra)};function ou(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),a=o-n,s=i-r;if(n<o&&r<i){const l=t.width*t.height,c=e.width*e.height,d=a*s,u=d/(l+c-d);return Number(u.toFixed(4))}return 0}const iu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const i of n){const{id:a}=i,s=r.get(a);if(s){const l=ou(s,t);l>0&&o.push({id:a,data:{droppableContainer:i,value:l}})}}return o.sort(tu)};function au(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function aa(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Xe}function su(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((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...r})}}const lu=su(1);function sa(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 cu(e,t,r){const n=sa(t);if(!n)return e;const{scaleX:o,scaleY:i,x:a,y:s}=n,l=e.left-a-(1-o)*parseFloat(r),c=e.top-s-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),d=o?e.width/o:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}const du={ignoreTransform:!1};function Bt(e,t){t===void 0&&(t=du);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Fe(e).getComputedStyle(e);c&&(r=cu(r,c,d))}const{top:n,left:o,width:i,height:a,bottom:s,right:l}=r;return{top:n,left:o,width:i,height:a,bottom:s,right:l}}function la(e){return Bt(e,{ignoreTransform:!0})}function uu(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function fu(e,t){return t===void 0&&(t=Fe(e).getComputedStyle(e)),t.position==="fixed"}function pu(e,t){t===void 0&&(t=Fe(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 Qr(e,t){const r=[];function n(o){if(t!=null&&r.length>=t||!o)return r;if(ro(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!cr(o)||Xi(o)||r.includes(o))return r;const i=Fe(e).getComputedStyle(o);return o!==e&&pu(o,i)&&r.push(o),fu(o,i)?r:n(o.parentNode)}return e?n(e):r}function ca(e){const[t]=Qr(e,1);return t??null}function io(e){return!Zr||!e?null:Mt(e)?e:to(e)?ro(e)||e===Lt(e).scrollingElement?window:cr(e)?e:null:null}function da(e){return Mt(e)?e.scrollX:e.scrollLeft}function ua(e){return Mt(e)?e.scrollY:e.scrollTop}function ao(e){return{x:da(e),y:ua(e)}}var De;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(De||(De={}));function fa(e){return!Zr||!e?!1:e===document.scrollingElement}function pa(e){const t={x:0,y:0},r=fa(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,a=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:o,isLeft:i,isBottom:a,isRight:s,maxScroll:n,minScroll:t}}const hu={x:.2,y:.2};function mu(e,t,r,n,o){let{top:i,left:a,right:s,bottom:l}=r;n===void 0&&(n=10),o===void 0&&(o=hu);const{isTop:c,isBottom:d,isLeft:u,isRight:g}=pa(e),f={x:0,y:0},w={x:0,y:0},p={height:t.height*o.y,width:t.width*o.x};return!c&&i<=t.top+p.height?(f.y=De.Backward,w.y=n*Math.abs((t.top+p.height-i)/p.height)):!d&&l>=t.bottom-p.height&&(f.y=De.Forward,w.y=n*Math.abs((t.bottom-p.height-l)/p.height)),!g&&s>=t.right-p.width?(f.x=De.Forward,w.x=n*Math.abs((t.right-p.width-s)/p.width)):!u&&a<=t.left+p.width&&(f.x=De.Backward,w.x=n*Math.abs((t.left+p.width-a)/p.width)),{direction:f,speed:w}}function gu(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:a}=window;return{top:0,left:0,right:i,bottom:a,width:i,height:a}}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 ha(e){return e.reduce((t,r)=>Ft(t,ao(r)),Xe)}function bu(e){return e.reduce((t,r)=>t+da(r),0)}function vu(e){return e.reduce((t,r)=>t+ua(r),0)}function ma(e,t){if(t===void 0&&(t=Bt),!e)return;const{top:r,left:n,bottom:o,right:i}=t(e);ca(e)&&(o<=0||i<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const xu=[["x",["left","right"],bu],["y",["top","bottom"],vu]];class so{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=Qr(r),o=ha(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,a,s]of xu)for(const l of a)Object.defineProperty(this,l,{get:()=>{const c=s(n),d=o[i]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class hr{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 wu(e){const{EventTarget:t}=Fe(e);return e instanceof t?e:Lt(e)}function lo(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 Ge;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ge||(Ge={}));function ga(e){e.preventDefault()}function yu(e){e.stopPropagation()}var _e;(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"})(_e||(_e={}));const ba={start:[_e.Space,_e.Enter],cancel:[_e.Esc],end:[_e.Space,_e.Enter,_e.Tab]},ku=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case _e.Right:return{...r,x:r.x+25};case _e.Left:return{...r,x:r.x-25};case _e.Down:return{...r,y:r.y+25};case _e.Up:return{...r,y:r.y-25}}};class co{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 hr(Lt(r)),this.windowListeners=new hr(Fe(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ge.Resize,this.handleCancel),this.windowListeners.add(Ge.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ge.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&ma(n),r(Xe)}handleKeyDown(t){if(qr(t)){const{active:r,context:n,options:o}=this.props,{keyboardCodes:i=ba,coordinateGetter:a=ku,scrollBehavior:s="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 u=a(t,{active:r,context:n.current,currentCoordinates:d});if(u){const g=pr(u,d),f={x:0,y:0},{scrollableAncestors:w}=n.current;for(const p of w){const b=t.code,{isTop:m,isRight:x,isLeft:k,isBottom:_,maxScroll:S,minScroll:O}=pa(p),j=gu(p),I={x:Math.min(b===_e.Right?j.right-j.width/2:j.right,Math.max(b===_e.Right?j.left:j.left+j.width/2,u.x)),y:Math.min(b===_e.Down?j.bottom-j.height/2:j.bottom,Math.max(b===_e.Down?j.top:j.top+j.height/2,u.y))},R=b===_e.Right&&!x||b===_e.Left&&!k,$=b===_e.Down&&!_||b===_e.Up&&!m;if(R&&I.x!==u.x){const F=p.scrollLeft+g.x,C=b===_e.Right&&F<=S.x||b===_e.Left&&F>=O.x;if(C&&!g.y){p.scrollTo({left:F,behavior:s});return}C?f.x=p.scrollLeft-F:f.x=b===_e.Right?p.scrollLeft-S.x:p.scrollLeft-O.x,f.x&&p.scrollBy({left:-f.x,behavior:s});break}else if($&&I.y!==u.y){const F=p.scrollTop+g.y,C=b===_e.Down&&F<=S.y||b===_e.Up&&F>=O.y;if(C&&!g.x){p.scrollTo({top:F,behavior:s});return}C?f.y=p.scrollTop-F:f.y=b===_e.Down?p.scrollTop-S.y:p.scrollTop-O.y,f.y&&p.scrollBy({top:-f.y,behavior:s});break}}this.handleMove(t,Ft(pr(u,this.referenceCoordinates),f))}}}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()}}co.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=ba,onActivation:o}=t,{active:i}=r;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const s=i.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function va(e){return!!(e&&"distance"in e)}function xa(e){return!!(e&&"delay"in e)}class uo{constructor(t,r,n){var o;n===void 0&&(n=wu(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:a}=i;this.props=t,this.events=r,this.document=Lt(a),this.documentListeners=new hr(this.document),this.listeners=new hr(n),this.windowListeners=new hr(Fe(a)),this.initialCoordinates=(o=Xr(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(Ge.Resize,this.handleCancel),this.windowListeners.add(Ge.DragStart,ga),this.windowListeners.add(Ge.VisibilityChange,this.handleCancel),this.windowListeners.add(Ge.ContextMenu,ga),this.documentListeners.add(Ge.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(xa(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(va(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(Ge.Click,yu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ge.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:o,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!o)return;const l=(r=Xr(t))!=null?r:Xe,c=pr(o,l);if(!n&&s){if(va(s)){if(s.tolerance!=null&&lo(c,s.tolerance))return this.handleCancel();if(lo(c,s.distance))return this.handleStart()}if(xa(s)&&lo(c,s.tolerance))return this.handleCancel();this.handlePending(s,c);return}t.cancelable&&t.preventDefault(),a(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===_e.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const _u={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class fo extends uo{constructor(t){const{event:r}=t,n=Lt(r.target);super(t,_u,n)}}fo.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 Su={move:{name:"mousemove"},end:{name:"mouseup"}};var po;(function(e){e[e.RightClick=2]="RightClick"})(po||(po={}));class Cu extends uo{constructor(t){super(t,Su,Lt(t.event.target))}}Cu.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===po.RightClick?!1:(n==null||n({event:r}),!0)}}];const ho={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class wa extends uo{constructor(t){super(t,ho)}static setup(){return window.addEventListener(ho.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(ho.move.name,t)};function t(){}}}wa.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 mr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(mr||(mr={}));var en;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(en||(en={}));function Eu(e){let{acceleration:t,activator:r=mr.Pointer,canScroll:n,draggingRect:o,enabled:i,interval:a=5,order:s=en.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:u,threshold:g}=e;const f=zu({delta:u,disabled:!i}),[w,p]=Bd(),b=z.useRef({x:0,y:0}),m=z.useRef({x:0,y:0}),x=z.useMemo(()=>{switch(r){case mr.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case mr.DraggableRect:return o}},[r,o,l]),k=z.useRef(null),_=z.useCallback(()=>{const O=k.current;if(!O)return;const j=b.current.x*m.current.x,I=b.current.y*m.current.y;O.scrollBy(j,I)},[]),S=z.useMemo(()=>s===en.TreeOrder?[...c].reverse():c,[s,c]);z.useEffect(()=>{if(!i||!c.length||!x){p();return}for(const O of S){if((n==null?void 0:n(O))===!1)continue;const j=c.indexOf(O),I=d[j];if(!I)continue;const{direction:R,speed:$}=mu(O,I,x,t,g);for(const F of["x","y"])f[F][R[F]]||($[F]=0,R[F]=0);if($.x>0||$.y>0){p(),k.current=O,w(_,a),b.current=$,m.current=R;return}}b.current={x:0,y:0},m.current={x:0,y:0},p()},[t,_,n,p,i,a,JSON.stringify(x),JSON.stringify(f),w,c,S,d,JSON.stringify(g)])}const Nu={x:{[De.Backward]:!1,[De.Forward]:!1},y:{[De.Backward]:!1,[De.Forward]:!1}};function zu(e){let{delta:t,disabled:r}=e;const n=Yr(t);return ur(o=>{if(r||!n||!o)return Nu;const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[De.Backward]:o.x[De.Backward]||i.x===-1,[De.Forward]:o.x[De.Forward]||i.x===1},y:{[De.Backward]:o.y[De.Backward]||i.y===-1,[De.Forward]:o.y[De.Forward]||i.y===1}}},[r,t,n])}function Au(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return ur(o=>{var i;return t==null?null:(i=n??o)!=null?i:null},[n,t])}function ju(e,t){return z.useMemo(()=>e.reduce((r,n)=>{const{sensor:o}=n,i=o.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,n)}));return[...r,...i]},[]),[e,t])}var gr;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(gr||(gr={}));var mo;(function(e){e.Optimized="optimized"})(mo||(mo={}));const ya=new Map;function Tu(e,t){let{dragging:r,dependencies:n,config:o}=t;const[i,a]=z.useState(null),{frequency:s,measure:l,strategy:c}=o,d=z.useRef(e),u=b(),g=dr(u),f=z.useCallback(function(m){m===void 0&&(m=[]),!g.current&&a(x=>x===null?m:x.concat(m.filter(k=>!x.includes(k))))},[g]),w=z.useRef(null),p=ur(m=>{if(u&&!r)return ya;if(!m||m===ya||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 _=k.node.current,S=_?new so(l(_),_):null;k.rect.current=S,S&&x.set(k.id,S)}return x}return m},[e,i,r,u,l]);return z.useEffect(()=>{d.current=e},[e]),z.useEffect(()=>{u||f()},[r,u]),z.useEffect(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),z.useEffect(()=>{u||typeof s!="number"||w.current!==null||(w.current=setTimeout(()=>{f(),w.current=null},s))},[s,u,f,...n]),{droppableRects:p,measureDroppableContainers:f,measuringScheduled:i!=null};function b(){switch(c){case gr.Always:return!1;case gr.BeforeDragging:return r;default:return!r}}}function go(e,t){return ur(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function Ou(e,t){return go(e,t)}function Iu(e){let{callback:t,disabled:r}=e;const n=Gr(t),o=z.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(n)},[n,r]);return z.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function tn(e){let{callback:t,disabled:r}=e;const n=Gr(t),o=z.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(n)},[r]);return z.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Pu(e){return new so(Bt(e),e)}function ka(e,t,r){t===void 0&&(t=Pu);const[n,o]=z.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 a=Iu({callback(l){if(e)for(const c of l){const{type:d,target:u}=c;if(d==="childList"&&u instanceof HTMLElement&&u.contains(e)){i();break}}}}),s=tn({callback:i});return qe(()=>{i(),e?(s==null||s.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),a==null||a.disconnect())},[e]),n}function Du(e){const t=go(e);return aa(e,t)}const _a=[];function Ru(e){const t=z.useRef(e),r=ur(n=>e?n&&n!==_a&&e&&t.current&&e.parentNode===t.current.parentNode?n:Qr(e):_a,[e]);return z.useEffect(()=>{t.current=e},[e]),r}function Mu(e){const[t,r]=z.useState(null),n=z.useRef(e),o=z.useCallback(i=>{const a=io(i.target);a&&r(s=>s?(s.set(a,ao(a)),new Map(s)):null)},[]);return z.useEffect(()=>{const i=n.current;if(e!==i){a(i);const s=e.map(l=>{const c=io(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,ao(c)]):null}).filter(l=>l!=null);r(s.length?new Map(s):null),n.current=e}return()=>{a(e),a(i)};function a(s){s.forEach(l=>{const c=io(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),z.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,a)=>Ft(i,a),Xe):ha(e):Xe,[e,t])}function Sa(e,t){t===void 0&&(t=[]);const r=z.useRef(null);return z.useEffect(()=>{r.current=null},t),z.useEffect(()=>{const n=e!==Xe;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?pr(e,r.current):Xe}function Lu(e){z.useEffect(()=>{if(!Zr)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 Fu(e,t){return z.useMemo(()=>e.reduce((r,n)=>{let{eventName:o,handler:i}=n;return r[o]=a=>{i(a,t)},r},{}),[e,t])}function Ca(e){return z.useMemo(()=>e?uu(e):null,[e])}const Ea=[];function Bu(e,t){t===void 0&&(t=Bt);const[r]=e,n=Ca(r?Fe(r):null),[o,i]=z.useState(Ea);function a(){i(()=>e.length?e.map(l=>fa(l)?n:new so(t(l),l)):Ea)}const s=tn({callback:a});return qe(()=>{s==null||s.disconnect(),a(),e.forEach(l=>s==null?void 0:s.observe(l))},[e]),o}function Na(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return cr(t)?t:e}function Uu(e){let{measure:t}=e;const[r,n]=z.useState(null),o=z.useCallback(c=>{for(const{target:d}of c)if(cr(d)){n(u=>{const g=t(d);return u?{...u,width:g.width,height:g.height}:g});break}},[t]),i=tn({callback:o}),a=z.useCallback(c=>{const d=Na(c);i==null||i.disconnect(),d&&(i==null||i.observe(d)),n(d?t(d):null)},[t,i]),[s,l]=Kr(a);return z.useMemo(()=>({nodeRef:s,rect:r,setRef:l}),[r,s,l])}const $u=[{sensor:fo,options:{}},{sensor:co,options:{}}],Wu={current:{}},rn={draggable:{measure:la},droppable:{measure:la,strategy:gr.WhileDragging,frequency:mo.Optimized},dragOverlay:{measure:Bt}};class br 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 Hu={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new br,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Jr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:rn,measureDroppableContainers:Jr,windowRect:null,measuringScheduled:!1},za={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Jr,draggableNodes:new Map,over:null,measureDroppableContainers:Jr},vr=z.createContext(za),Aa=z.createContext(Hu);function Vu(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new br}}}function Zu(e,t){switch(t.type){case Pe.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Pe.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 Pe.DragEnd:case Pe.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Pe.RegisterDroppable:{const{element:r}=t,{id:n}=r,o=new br(e.droppable.containers);return o.set(n,r),{...e,droppable:{...e.droppable,containers:o}}}case Pe.SetDroppableDisabled:{const{id:r,key:n,disabled:o}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const a=new br(e.droppable.containers);return a.set(r,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Pe.UnregisterDroppable:{const{id:r,key:n}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const i=new br(e.droppable.containers);return i.delete(r),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Gu(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:o}=z.useContext(vr),i=Yr(n),a=Yr(r==null?void 0:r.id);return z.useEffect(()=>{if(!t&&!n&&i&&a!=null){if(!qr(i)||document.activeElement===i.target)return;const s=o.get(a);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[l.current,c.current]){if(!d)continue;const u=Wd(d);if(u){u.focus();break}}})}},[n,t,o,a,i]),null}function ja(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...n}),r):r}function Ku(e){return z.useMemo(()=>({draggable:{...rn.draggable,...e==null?void 0:e.draggable},droppable:{...rn.droppable,...e==null?void 0:e.droppable},dragOverlay:{...rn.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 Yu(e){let{activeNode:t,measure:r,initialRect:n,config:o=!0}=e;const i=z.useRef(!1),{x:a,y:s}=typeof o=="boolean"?{x:o,y:o}:o;qe(()=>{if(!a&&!s||!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),u=aa(d,n);if(a||(u.x=0),s||(u.y=0),i.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const g=ca(c);g&&g.scrollBy({top:u.y,left:u.x})}},[t,a,s,n,r])}const nn=z.createContext({...Xe,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 qu=z.memo(function(t){var r,n,o,i;let{id:a,accessibility:s,autoScroll:l=!0,children:c,sensors:d=$u,collisionDetection:u=iu,measuring:g,modifiers:f,...w}=t;const p=z.useReducer(Zu,void 0,Vu),[b,m]=p,[x,k]=Yd(),[_,S]=z.useState(bt.Uninitialized),O=_===bt.Initialized,{draggable:{active:j,nodes:I,translate:R},droppable:{containers:$}}=b,F=j!=null?I.get(j):null,C=z.useRef({initial:null,translated:null}),M=z.useMemo(()=>{var Te;return j!=null?{id:j,data:(Te=F==null?void 0:F.data)!=null?Te:Wu,rect:C}:null},[j,F]),y=z.useRef(null),[B,re]=z.useState(null),[W,H]=z.useState(null),Z=dr(w,Object.values(w)),oe=fr("DndDescribedBy",a),N=z.useMemo(()=>$.getEnabled(),[$]),P=Ku(g),{droppableRects:ee,measureDroppableContainers:K,measuringScheduled:Q}=Tu(N,{dragging:O,dependencies:[R.x,R.y],config:P.droppable}),ue=Au(I,j),J=z.useMemo(()=>W?Xr(W):null,[W]),se=Hn(),de=Ou(ue,P.draggable.measure);Yu({activeNode:j!=null?I.get(j):null,config:se.layoutShiftCompensation,initialRect:de,measure:P.draggable.measure});const ie=ka(ue,P.draggable.measure,de),fe=ka(ue?ue.parentElement:null),me=z.useRef({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:ee,draggableNodes:I,draggingNode:null,draggingNodeRect:null,droppableContainers:$,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ye=$.getNodeFor((r=me.current.over)==null?void 0:r.id),v=Uu({measure:P.dragOverlay.measure}),Y=(n=v.nodeRef.current)!=null?n:ue,V=O?(o=v.rect)!=null?o:ie:null,T=!!(v.nodeRef.current&&v.rect),A=Du(T?null:ie),L=Ca(Y?Fe(Y):null),q=Ru(O?ye??ue:null),te=Bu(q),U=ja(f,{transform:{x:R.x-A.x,y:R.y-A.y,scaleX:1,scaleY:1},activatorEvent:W,active:M,activeNodeRect:ie,containerNodeRect:fe,draggingNodeRect:V,over:me.current.over,overlayNodeRect:v.rect,scrollableAncestors:q,scrollableAncestorRects:te,windowRect:L}),ne=J?Ft(J,R):null,ce=Mu(q),ae=Sa(ce),D=Sa(ce,[ie]),G=Ft(U,ae),X=V?lu(V,U):null,le=M&&X?u({active:M,collisionRect:X,droppableRects:ee,droppableContainers:N,pointerCoordinates:ne}):null,be=oa(le,"id"),[ge,xe]=z.useState(null),ke=T?U:Ft(U,D),Ne=au(ke,(i=ge==null?void 0:ge.rect)!=null?i:null,ie),ut=z.useRef(null),Ke=z.useCallback((Te,Re)=>{let{sensor:He,options:St}=Re;if(y.current==null)return;const Ye=I.get(y.current);if(!Ye)return;const Ve=Te.nativeEvent,at=new He({active:y.current,activeNode:Ye,event:Ve,options:St,context:me,onAbort(Me){if(!I.get(Me))return;const{onDragAbort:st}=Z.current,ft={id:Me};st==null||st(ft),x({type:"onDragAbort",event:ft})},onPending(Me,Ct,st,ft){if(!I.get(Me))return;const{onDragPending:Or}=Z.current,Et={id:Me,constraint:Ct,initialCoordinates:st,offset:ft};Or==null||Or(Et),x({type:"onDragPending",event:Et})},onStart(Me){const Ct=y.current;if(Ct==null)return;const st=I.get(Ct);if(!st)return;const{onDragStart:ft}=Z.current,Tr={activatorEvent:Ve,active:{id:Ct,data:st.data,rect:C}};pt.unstable_batchedUpdates(()=>{ft==null||ft(Tr),S(bt.Initializing),m({type:Pe.DragStart,initialCoordinates:Me,active:Ct}),x({type:"onDragStart",event:Tr}),re(ut.current),H(Ve)})},onMove(Me){m({type:Pe.DragMove,coordinates:Me})},onEnd:nr(Pe.DragEnd),onCancel:nr(Pe.DragCancel)});ut.current=at;function nr(Me){return async function(){const{active:st,collisions:ft,over:Tr,scrollAdjustedTranslate:Or}=me.current;let Et=null;if(st&&Or){const{cancelDrop:Ir}=Z.current;Et={activatorEvent:Ve,active:st,collisions:ft,delta:Or,over:Tr},Me===Pe.DragEnd&&typeof Ir=="function"&&await Promise.resolve(Ir(Et))&&(Me=Pe.DragCancel)}y.current=null,pt.unstable_batchedUpdates(()=>{m({type:Me}),S(bt.Uninitialized),xe(null),re(null),H(null),ut.current=null;const Ir=Me===Pe.DragEnd?"onDragEnd":"onDragCancel";if(Et){const pi=Z.current[Ir];pi==null||pi(Et),x({type:Ir,event:Et})}})}}},[I]),$n=z.useCallback((Te,Re)=>(He,St)=>{const Ye=He.nativeEvent,Ve=I.get(St);if(y.current!==null||!Ve||Ye.dndKit||Ye.defaultPrevented)return;const at={active:Ve};Te(He,Re.options,at)===!0&&(Ye.dndKit={capturedBy:Re.sensor},y.current=St,Ke(He,Re))},[I,Ke]),Wn=ju(d,$n);Lu(d),qe(()=>{ie&&_===bt.Initializing&&S(bt.Initialized)},[ie,_]),z.useEffect(()=>{const{onDragMove:Te}=Z.current,{active:Re,activatorEvent:He,collisions:St,over:Ye}=me.current;if(!Re||!He)return;const Ve={active:Re,activatorEvent:He,collisions:St,delta:{x:G.x,y:G.y},over:Ye};pt.unstable_batchedUpdates(()=>{Te==null||Te(Ve),x({type:"onDragMove",event:Ve})})},[G.x,G.y]),z.useEffect(()=>{const{active:Te,activatorEvent:Re,collisions:He,droppableContainers:St,scrollAdjustedTranslate:Ye}=me.current;if(!Te||y.current==null||!Re||!Ye)return;const{onDragOver:Ve}=Z.current,at=St.get(be),nr=at&&at.rect.current?{id:at.id,rect:at.rect.current,data:at.data,disabled:at.disabled}:null,Me={active:Te,activatorEvent:Re,collisions:He,delta:{x:Ye.x,y:Ye.y},over:nr};pt.unstable_batchedUpdates(()=>{xe(nr),Ve==null||Ve(Me),x({type:"onDragOver",event:Me})})},[be]),qe(()=>{me.current={activatorEvent:W,active:M,activeNode:ue,collisionRect:X,collisions:le,droppableRects:ee,draggableNodes:I,draggingNode:Y,draggingNodeRect:V,droppableContainers:$,over:ge,scrollableAncestors:q,scrollAdjustedTranslate:G},C.current={initial:V,translated:X}},[M,ue,le,X,I,Y,V,ee,$,ge,q,G]),Eu({...se,delta:R,draggingRect:X,pointerCoordinates:ne,scrollableAncestors:q,scrollableAncestorRects:te});const ui=z.useMemo(()=>({active:M,activeNode:ue,activeNodeRect:ie,activatorEvent:W,collisions:le,containerNodeRect:fe,dragOverlay:v,draggableNodes:I,droppableContainers:$,droppableRects:ee,over:ge,measureDroppableContainers:K,scrollableAncestors:q,scrollableAncestorRects:te,measuringConfiguration:P,measuringScheduled:Q,windowRect:L}),[M,ue,ie,W,le,fe,v,I,$,ee,ge,K,q,te,P,Q,L]),fi=z.useMemo(()=>({activatorEvent:W,activators:Wn,active:M,activeNodeRect:ie,ariaDescribedById:{draggable:oe},dispatch:m,draggableNodes:I,over:ge,measureDroppableContainers:K}),[W,Wn,M,ie,m,oe,I,ge,K]);return z.createElement(ea.Provider,{value:k},z.createElement(vr.Provider,{value:fi},z.createElement(Aa.Provider,{value:ui},z.createElement(nn.Provider,{value:Ne},c)),z.createElement(Gu,{disabled:(s==null?void 0:s.restoreFocus)===!1})),z.createElement(Jd,{...s,hiddenTextDescribedById:oe}));function Hn(){const Te=(B==null?void 0:B.autoScrollEnabled)===!1,Re=typeof l=="object"?l.enabled===!1:l===!1,He=O&&!Te&&!Re;return typeof l=="object"?{...l,enabled:He}:{enabled:He}}}),Xu=z.createContext(null),Ta="button",Ju="Draggable";function Qu(e){let{id:t,data:r,disabled:n=!1,attributes:o}=e;const i=fr(Ju),{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:u,over:g}=z.useContext(vr),{role:f=Ta,roleDescription:w="draggable",tabIndex:p=0}=o??{},b=(l==null?void 0:l.id)===t,m=z.useContext(b?nn:Xu),[x,k]=Kr(),[_,S]=Kr(),O=Fu(a,t),j=dr(r);qe(()=>(u.set(t,{id:t,key:i,node:x,activatorNode:_,data:j}),()=>{const R=u.get(t);R&&R.key===i&&u.delete(t)}),[u,t]);const I=z.useMemo(()=>({role:f,tabIndex:p,"aria-disabled":n,"aria-pressed":b&&f===Ta?!0:void 0,"aria-roledescription":w,"aria-describedby":d.draggable}),[n,f,p,b,w,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:I,isDragging:b,listeners:n?void 0:O,node:x,over:g,setNodeRef:k,setActivatorNodeRef:S,transform:m}}function Oa(){return z.useContext(Aa)}const ef="Droppable",tf={timeout:25};function rf(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:o}=e;const i=fr(ef),{active:a,dispatch:s,over:l,measureDroppableContainers:c}=z.useContext(vr),d=z.useRef({disabled:r}),u=z.useRef(!1),g=z.useRef(null),f=z.useRef(null),{disabled:w,updateMeasurementsFor:p,timeout:b}={...tf,...o},m=dr(p??n),x=z.useCallback(()=>{if(!u.current){u.current=!0;return}f.current!=null&&clearTimeout(f.current),f.current=setTimeout(()=>{c(Array.isArray(m.current)?m.current:[m.current]),f.current=null},b)},[b]),k=tn({callback:x,disabled:w||!a}),_=z.useCallback((I,R)=>{k&&(R&&(k.unobserve(R),u.current=!1),I&&k.observe(I))},[k]),[S,O]=Kr(_),j=dr(t);return z.useEffect(()=>{!k||!S.current||(k.disconnect(),u.current=!1,k.observe(S.current))},[S,k]),z.useEffect(()=>(s({type:Pe.RegisterDroppable,element:{id:n,key:i,disabled:r,node:S,rect:g,data:j}}),()=>s({type:Pe.UnregisterDroppable,key:i,id:n})),[n]),z.useEffect(()=>{r!==d.current.disabled&&(s({type:Pe.SetDroppableDisabled,id:n,key:i,disabled:r}),d.current.disabled=r)},[n,i,r,s]),{active:a,rect:g,isOver:(l==null?void 0:l.id)===n,node:S,over:l,setNodeRef:O}}function nf(e){let{animation:t,children:r}=e;const[n,o]=z.useState(null),[i,a]=z.useState(null),s=Yr(r);return!r&&!n&&s&&o(s),qe(()=>{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]),z.createElement(z.Fragment,null,r,n?z.cloneElement(n,{ref:a}):null)}const of={x:0,y:0,scaleX:1,scaleY:1};function af(e){let{children:t}=e;return z.createElement(vr.Provider,{value:za},z.createElement(nn.Provider,{value:of},t))}const sf={position:"fixed",touchAction:"none"},lf=e=>qr(e)?"transform 250ms ease":void 0,cf=z.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:o,children:i,className:a,rect:s,style:l,transform:c,transition:d=lf}=e;if(!s)return null;const u=o?c:{...c,scaleX:1,scaleY:1},g={...sf,width:s.width,height:s.height,top:s.top,left:s.left,transform:gt.Transform.toString(u),transformOrigin:o&&n?eu(n,s):void 0,transition:typeof d=="function"?d(n):d,...l};return z.createElement(r,{className:a,style:g,ref:t},i)}),df={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:a}=e;if(i!=null&&i.active)for(const[s,l]of Object.entries(i.active))l!==void 0&&(o[s]=r.node.style.getPropertyValue(s),r.node.style.setProperty(s,l));if(i!=null&&i.dragOverlay)for(const[s,l]of Object.entries(i.dragOverlay))l!==void 0&&n.node.style.setProperty(s,l);return a!=null&&a.active&&r.node.classList.add(a.active),a!=null&&a.dragOverlay&&n.node.classList.add(a.dragOverlay),function(){for(const[l,c]of Object.entries(o))r.node.style.setProperty(l,c);a!=null&&a.active&&r.node.classList.remove(a.active)}})({styles:{active:{opacity:"0"}}})};function uf(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:o}=e;return Gr((i,a)=>{if(t===null)return;const s=r.get(i);if(!s)return;const l=s.node.current;if(!l)return;const c=Na(a);if(!c)return;const{transform:d}=Fe(a).getComputedStyle(a),u=sa(d);if(!u)return;const g=typeof t=="function"?t:ff(t);return ma(l,o.draggable.measure),g({active:{id:i,data:s.data,node:l,rect:o.draggable.measure(l)},draggableNodes:r,dragOverlay:{node:a,rect:o.dragOverlay.measure(c)},droppableContainers:n,measuringConfiguration:o,transform:u})})}function ff(e){const{duration:t,easing:r,sideEffects:n,keyframes:o}={...df,...e};return i=>{let{active:a,dragOverlay:s,transform:l,...c}=i;if(!t)return;const d={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},u={scaleX:l.scaleX!==1?a.rect.width*l.scaleX/s.rect.width:1,scaleY:l.scaleY!==1?a.rect.height*l.scaleY/s.rect.height:1},g={x:l.x-d.x,y:l.y-d.y,...u},f=o({...c,active:a,dragOverlay:s,transform:{initial:l,final:g}}),[w]=f,p=f[f.length-1];if(JSON.stringify(w)===JSON.stringify(p))return;const b=n==null?void 0:n({active:a,dragOverlay:s,...c}),m=s.node.animate(f,{duration:t,easing:r,fill:"forwards"});return new Promise(x=>{m.onfinish=()=>{b==null||b(),x()}})}}let Ia=0;function pf(e){return z.useMemo(()=>{if(e!=null)return Ia++,Ia},[e])}const hf=z.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:o,transition:i,modifiers:a,wrapperElement:s="div",className:l,zIndex:c=999}=e;const{activatorEvent:d,active:u,activeNodeRect:g,containerNodeRect:f,draggableNodes:w,droppableContainers:p,dragOverlay:b,over:m,measuringConfiguration:x,scrollableAncestors:k,scrollableAncestorRects:_,windowRect:S}=Oa(),O=z.useContext(nn),j=pf(u==null?void 0:u.id),I=ja(a,{activatorEvent:d,active:u,activeNodeRect:g,containerNodeRect:f,draggingNodeRect:b.rect,over:m,overlayNodeRect:b.rect,scrollableAncestors:k,scrollableAncestorRects:_,transform:O,windowRect:S}),R=go(g),$=uf({config:n,draggableNodes:w,droppableContainers:p,measuringConfiguration:x}),F=R?b.setRef:void 0;return z.createElement(af,null,z.createElement(nf,{animation:$},u&&j?z.createElement(cf,{key:j,id:u.id,ref:F,as:s,activatorEvent:d,adjustScale:t,className:l,transition:i,rect:R,style:{zIndex:c,...o},transform:I},r):null))}),mf=e=>{let{transform:t}=e;return{...t,x:0}};function Pa(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function gf(e,t){return e.reduce((r,n,o)=>{const i=t.get(n);return i&&(r[o]=i),r},Array(e.length))}function on(e){return e!==null&&e>=0}function bf(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 vf(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Da=e=>{let{rects:t,activeIndex:r,overIndex:n,index:o}=e;const i=Pa(t,n,r),a=t[o],s=i[o];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},an={scaleX:1,scaleY:1},xf=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:o,rects:i,overIndex:a}=e;const s=(t=i[r])!=null?t:n;if(!s)return null;if(o===r){const c=i[a];return c?{x:0,y:r<a?c.top+c.height-(s.top+s.height):c.top-s.top,...an}:null}const l=wf(i,o,r);return o>r&&o<=a?{x:0,y:-s.height-l,...an}:o<r&&o>=a?{x:0,y:s.height+l,...an}:{x:0,y:0,...an}};function wf(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 Ra="Sortable",Ma=z.createContext({activeIndex:-1,containerId:Ra,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Da,disabled:{draggable:!1,droppable:!1}});function yf(e){let{children:t,id:r,items:n,strategy:o=Da,disabled:i=!1}=e;const{active:a,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:d}=Oa(),u=fr(Ra,r),g=s.rect!==null,f=z.useMemo(()=>n.map(O=>typeof O=="object"&&"id"in O?O.id:O),[n]),w=a!=null,p=a?f.indexOf(a.id):-1,b=c?f.indexOf(c.id):-1,m=z.useRef(f),x=!bf(f,m.current),k=b!==-1&&p===-1||x,_=vf(i);qe(()=>{x&&w&&d(f)},[x,f,w,d]),z.useEffect(()=>{m.current=f},[f]);const S=z.useMemo(()=>({activeIndex:p,containerId:u,disabled:_,disableTransforms:k,items:f,overIndex:b,useDragOverlay:g,sortedRects:gf(f,l),strategy:o}),[p,u,_.draggable,_.droppable,k,f,b,l,g,o]);return z.createElement(Ma.Provider,{value:S},t)}const kf=e=>{let{id:t,items:r,activeIndex:n,overIndex:o}=e;return Pa(r,n,o).indexOf(t)},_f=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:o,items:i,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;return!c||!n||s!==i&&o===a?!1:r?!0:a!==o&&t===l},Sf={duration:200,easing:"ease"},La="transform",Cf=gt.Transition.toString({property:La,duration:0,easing:"linear"}),Ef={roleDescription:"sortable"};function Nf(e){let{disabled:t,index:r,node:n,rect:o}=e;const[i,a]=z.useState(null),s=z.useRef(r);return qe(()=>{if(!t&&r!==s.current&&n.current){const l=o.current;if(l){const c=Bt(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)&&a(d)}}r!==s.current&&(s.current=r)},[t,r,n,o]),z.useEffect(()=>{i&&a(null)},[i]),i}function zf(e){let{animateLayoutChanges:t=_f,attributes:r,disabled:n,data:o,getNewIndex:i=kf,id:a,strategy:s,resizeObserverConfig:l,transition:c=Sf}=e;const{items:d,containerId:u,activeIndex:g,disabled:f,disableTransforms:w,sortedRects:p,overIndex:b,useDragOverlay:m,strategy:x}=z.useContext(Ma),k=Af(n,f),_=d.indexOf(a),S=z.useMemo(()=>({sortable:{containerId:u,index:_,items:d},...o}),[u,o,_,d]),O=z.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:j,node:I,isOver:R,setNodeRef:$}=rf({id:a,data:S,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...l}}),{active:F,activatorEvent:C,activeNodeRect:M,attributes:y,setNodeRef:B,listeners:re,isDragging:W,over:H,setActivatorNodeRef:Z,transform:oe}=Qu({id:a,data:S,attributes:{...Ef,...r},disabled:k.draggable}),N=Fd($,B),P=!!F,ee=P&&!w&&on(g)&&on(b),K=!m&&W,Q=K&&ee?oe:null,J=ee?Q??(s??x)({rects:p,activeNodeRect:M,activeIndex:g,overIndex:b,index:_}):null,se=on(g)&&on(b)?i({id:a,items:d,activeIndex:g,overIndex:b}):_,de=F==null?void 0:F.id,ie=z.useRef({activeId:de,items:d,newIndex:se,containerId:u}),fe=d!==ie.current.items,me=t({active:F,containerId:u,isDragging:W,isSorting:P,id:a,index:_,items:d,newIndex:ie.current.newIndex,previousItems:ie.current.items,previousContainerId:ie.current.containerId,transition:c,wasDragging:ie.current.activeId!=null}),ye=Nf({disabled:!me,index:_,node:I,rect:j});return z.useEffect(()=>{P&&ie.current.newIndex!==se&&(ie.current.newIndex=se),u!==ie.current.containerId&&(ie.current.containerId=u),d!==ie.current.items&&(ie.current.items=d)},[P,se,u,d]),z.useEffect(()=>{if(de===ie.current.activeId)return;if(de!=null&&ie.current.activeId==null){ie.current.activeId=de;return}const Y=setTimeout(()=>{ie.current.activeId=de},50);return()=>clearTimeout(Y)},[de]),{active:F,activeIndex:g,attributes:y,data:S,rect:j,index:_,newIndex:se,items:d,isOver:R,isSorting:P,isDragging:W,listeners:re,node:I,overIndex:b,over:H,setNodeRef:N,setActivatorNodeRef:Z,setDroppableNodeRef:$,setDraggableNodeRef:B,transform:ye??J,transition:v()};function v(){if(ye||fe&&ie.current.newIndex===_)return Cf;if(!(K&&!qr(C)||!c)&&(P||me))return gt.Transition.toString({...c,property:La})}}function Af(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 sn(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 jf=[_e.Down,_e.Right,_e.Up,_e.Left],Tf=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:o,droppableContainers:i,over:a,scrollableAncestors:s}}=t;if(jf.includes(e.code)){if(e.preventDefault(),!r||!n)return;const l=[];i.getEnabled().forEach(u=>{if(!u||u!=null&&u.disabled)return;const g=o.get(u.id);if(g)switch(e.code){case _e.Down:n.top<g.top&&l.push(u);break;case _e.Up:n.top>g.top&&l.push(u);break;case _e.Left:n.left>g.left&&l.push(u);break;case _e.Right:n.left<g.left&&l.push(u);break}});const c=nu({collisionRect:n,droppableRects:o,droppableContainers:l});let d=oa(c,"id");if(d===(a==null?void 0:a.id)&&c.length>1&&(d=c[1].id),d!=null){const u=i.get(r.id),g=i.get(d),f=g?o.get(g.id):null,w=g==null?void 0:g.node.current;if(w&&f&&u&&g){const b=Qr(w).some((O,j)=>s[j]!==O),m=Fa(u,g),x=Of(u,g),k=b||!m?{x:0,y:0}:{x:x?n.width-f.width:0,y:x?n.height-f.height:0},_={x:f.left,y:f.top};return k.x&&k.y?_:pr(_,k)}}}};function Fa(e,t){return!sn(e)||!sn(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Of(e,t){return!sn(e)||!sn(t)||!Fa(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function bo({className:e,type:t,...r}){return h.jsx("input",{type:t,className:ve("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 If({className:e,...t}){return h.jsx("textarea",{className:ve("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 Pf({className:e,checked:t,onCheckedChange:r,...n}){return h.jsx("input",{type:"checkbox",checked:t,onChange:o=>r==null?void 0:r(o.target.checked),className:ve("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 h.jsx("label",{className:ve("text-sm font-medium leading-none select-none",e),...t})}function Ba(e,[t,r]){return Math.min(r,Math.max(t,e))}function Ee(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 xr(e,t=[]){let r=[];function n(i,a){const s=E.createContext(a),l=r.length;r=[...r,a];const c=u=>{var m;const{scope:g,children:f,...w}=u,p=((m=g==null?void 0:g[e])==null?void 0:m[l])||s,b=E.useMemo(()=>w,Object.values(w));return h.jsx(p.Provider,{value:b,children:f})};c.displayName=i+"Provider";function d(u,g){var p;const f=((p=g==null?void 0:g[e])==null?void 0:p[l])||s,w=E.useContext(f);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${i}\``)}return[c,d]}const o=()=>{const i=r.map(a=>E.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Df(o,...t)]}function Df(...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 a=n.reduce((s,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...s,...u}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Ua(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $a(...e){return t=>{let r=!1;const n=e.map(o=>{const i=Ua(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():Ua(e[o],null)}}}}function je(...e){return E.useCallback($a(...e),e)}function Ut(e){const t=Mf(e),r=E.forwardRef((n,o)=>{const{children:i,...a}=n,s=E.Children.toArray(i),l=s.find(Ff);if(l){const c=l.props.children,d=s.map(u=>u===l?E.Children.count(c)>1?E.Children.only(null):E.isValidElement(c)?c.props.children:null:u);return h.jsx(t,{...a,ref:o,children:E.isValidElement(c)?E.cloneElement(c,void 0,d):null})}return h.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var Rf=Ut("Slot");function Mf(e){const t=E.forwardRef((r,n)=>{const{children:o,...i}=r;if(E.isValidElement(o)){const a=Uf(o),s=Bf(i,o.props);return o.type!==E.Fragment&&(s.ref=n?$a(n,a):a),E.cloneElement(o,s)}return E.Children.count(o)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wa=Symbol("radix.slottable");function Lf(e){const t=({children:r})=>h.jsx(h.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Wa,t}function Ff(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wa}function Bf(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]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function Uf(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 $f(e){const t=e+"CollectionProvider",[r,n]=xr(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:b,children:m}=p,x=z.useRef(null),k=z.useRef(new Map).current;return h.jsx(o,{scope:b,itemMap:k,collectionRef:x,children:m})};a.displayName=t;const s=e+"CollectionSlot",l=Ut(s),c=z.forwardRef((p,b)=>{const{scope:m,children:x}=p,k=i(s,m),_=je(b,k.collectionRef);return h.jsx(l,{ref:_,children:x})});c.displayName=s;const d=e+"CollectionItemSlot",u="data-radix-collection-item",g=Ut(d),f=z.forwardRef((p,b)=>{const{scope:m,children:x,...k}=p,_=z.useRef(null),S=je(b,_),O=i(d,m);return z.useEffect(()=>(O.itemMap.set(_,{ref:_,...k}),()=>void O.itemMap.delete(_))),h.jsx(g,{[u]:"",ref:S,children:x})});f.displayName=d;function w(p){const b=i(e+"CollectionConsumer",p);return z.useCallback(()=>{const x=b.collectionRef.current;if(!x)return[];const k=Array.from(x.querySelectorAll(`[${u}]`));return Array.from(b.itemMap.values()).sort((O,j)=>k.indexOf(O.ref.current)-k.indexOf(j.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},w,n]}var Wf=E.createContext(void 0);function Hf(e){const t=E.useContext(Wf);return e||t||"ltr"}var Vf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=Vf.reduce((e,t)=>{const r=Ut(`Primitive.${t}`),n=E.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Zf(e,t){e&&Pr.flushSync(()=>e.dispatchEvent(t))}function At(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Gf(e,t=globalThis==null?void 0:globalThis.document){const r=At(e);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 Kf="DismissableLayer",vo="dismissableLayer.update",Yf="dismissableLayer.pointerDownOutside",qf="dismissableLayer.focusOutside",Ha,Va=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ln=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=E.useContext(Va),[d,u]=E.useState(null),g=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=E.useState({}),w=je(t,j=>u(j)),p=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),m=p.indexOf(b),x=d?p.indexOf(d):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,_=x>=m,S=Qf(j=>{const I=j.target,R=[...c.branches].some($=>$.contains(I));!_||R||(o==null||o(j),a==null||a(j),j.defaultPrevented||s==null||s())},g),O=ep(j=>{const I=j.target;[...c.branches].some($=>$.contains(I))||(i==null||i(j),a==null||a(j),j.defaultPrevented||s==null||s())},g);return Gf(j=>{x===c.layers.size-1&&(n==null||n(j),!j.defaultPrevented&&s&&(j.preventDefault(),s()))},g),E.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ha=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Za(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Ha)}},[d,g,r,c]),E.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Za())},[d,c]),E.useEffect(()=>{const j=()=>f({});return document.addEventListener(vo,j),()=>document.removeEventListener(vo,j)},[]),h.jsx(Ae.div,{...l,ref:w,style:{pointerEvents:k?_?"auto":"none":void 0,...e.style},onFocusCapture:Ee(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ee(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ee(e.onPointerDownCapture,S.onPointerDownCapture)})});ln.displayName=Kf;var Xf="DismissableLayerBranch",Jf=E.forwardRef((e,t)=>{const r=E.useContext(Va),n=E.useRef(null),o=je(t,n);return E.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),h.jsx(Ae.div,{...e,ref:o})});Jf.displayName=Xf;function Qf(e,t=globalThis==null?void 0:globalThis.document){const r=At(e),n=E.useRef(!1),o=E.useRef(()=>{});return E.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let l=function(){Ga(Yf,r,c,{discrete:!0})};const c={originalEvent:s};s.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},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ep(e,t=globalThis==null?void 0:globalThis.document){const r=At(e),n=E.useRef(!1);return E.useEffect(()=>{const o=i=>{i.target&&!n.current&&Ga(qf,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 Za(){const e=new CustomEvent(vo);document.dispatchEvent(e)}function Ga(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?Zf(o,i):o.dispatchEvent(i)}var xo=0;function Ka(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ya()),document.body.insertAdjacentElement("beforeend",e[1]??Ya()),xo++,()=>{xo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xo--}},[])}function Ya(){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 wo="focusScope.autoFocusOnMount",yo="focusScope.autoFocusOnUnmount",qa={bubbles:!1,cancelable:!0},tp="FocusScope",ko=E.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=E.useState(null),c=At(o),d=At(i),u=E.useRef(null),g=je(t,p=>l(p)),f=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(n){let p=function(k){if(f.paused||!s)return;const _=k.target;s.contains(_)?u.current=_:vt(u.current,{select:!0})},b=function(k){if(f.paused||!s)return;const _=k.relatedTarget;_!==null&&(s.contains(_)||vt(u.current,{select:!0}))},m=function(k){if(document.activeElement===document.body)for(const S of k)S.removedNodes.length>0&&vt(s)};document.addEventListener("focusin",p),document.addEventListener("focusout",b);const x=new MutationObserver(m);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",b),x.disconnect()}}},[n,s,f.paused]),E.useEffect(()=>{if(s){Qa.add(f);const p=document.activeElement;if(!s.contains(p)){const m=new CustomEvent(wo,qa);s.addEventListener(wo,c),s.dispatchEvent(m),m.defaultPrevented||(rp(sp(Xa(s)),{select:!0}),document.activeElement===p&&vt(s))}return()=>{s.removeEventListener(wo,c),setTimeout(()=>{const m=new CustomEvent(yo,qa);s.addEventListener(yo,d),s.dispatchEvent(m),m.defaultPrevented||vt(p??document.body,{select:!0}),s.removeEventListener(yo,d),Qa.remove(f)},0)}}},[s,c,d,f]);const w=E.useCallback(p=>{if(!r&&!n||f.paused)return;const b=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,m=document.activeElement;if(b&&m){const x=p.currentTarget,[k,_]=np(x);k&&_?!p.shiftKey&&m===_?(p.preventDefault(),r&&vt(k,{select:!0})):p.shiftKey&&m===k&&(p.preventDefault(),r&&vt(_,{select:!0})):m===x&&p.preventDefault()}},[r,n,f.paused]);return h.jsx(Ae.div,{tabIndex:-1,...a,ref:g,onKeyDown:w})});ko.displayName=tp;function rp(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(vt(n,{select:t}),document.activeElement!==r)return}function np(e){const t=Xa(e),r=Ja(t,e),n=Ja(t.reverse(),e);return[r,n]}function Xa(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 Ja(e,t){for(const r of e)if(!op(r,{upTo:t}))return r}function op(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 ip(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&&ip(e)&&t&&e.select()}}var Qa=ap();function ap(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=es(e,t),e.unshift(t)},remove(t){var r;e=es(e,t),(r=e[0])==null||r.resume()}}}function es(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function sp(e){return e.filter(t=>t.tagName!=="A")}var Le=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},lp=E[" useId ".trim().toString()]||(()=>{}),cp=0;function wr(e){const[t,r]=E.useState(lp());return Le(()=>{r(n=>n??String(cp++))},[e]),t?`radix-${t}`:""}const dp=["top","right","bottom","left"],xt=Math.min,Ue=Math.max,cn=Math.round,dn=Math.floor,tt=e=>({x:e,y:e}),up={left:"right",right:"left",bottom:"top",top:"bottom"},fp={start:"end",end:"start"};function _o(e,t,r){return Ue(e,xt(t,r))}function ct(e,t){return typeof e=="function"?e(t):e}function dt(e){return e.split("-")[0]}function $t(e){return e.split("-")[1]}function So(e){return e==="x"?"y":"x"}function Co(e){return e==="y"?"height":"width"}const pp=new Set(["top","bottom"]);function rt(e){return pp.has(dt(e))?"y":"x"}function Eo(e){return So(rt(e))}function hp(e,t,r){r===void 0&&(r=!1);const n=$t(e),o=Eo(e),i=Co(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=un(a)),[a,un(a)]}function mp(e){const t=un(e);return[No(e),t,No(t)]}function No(e){return e.replace(/start|end/g,t=>fp[t])}const ts=["left","right"],rs=["right","left"],gp=["top","bottom"],bp=["bottom","top"];function vp(e,t,r){switch(e){case"top":case"bottom":return r?t?rs:ts:t?ts:rs;case"left":case"right":return t?gp:bp;default:return[]}}function xp(e,t,r,n){const o=$t(e);let i=vp(dt(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(No)))),i}function un(e){return e.replace(/left|right|bottom|top/g,t=>up[t])}function wp(e){return{top:0,right:0,bottom:0,left:0,...e}}function ns(e){return typeof e!="number"?wp(e):{top:e,right:e,bottom:e,left:e}}function fn(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 os(e,t,r){let{reference:n,floating:o}=e;const i=rt(t),a=Eo(t),s=Co(a),l=dt(t),c=i==="y",d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,g=n[s]/2-o[s]/2;let f;switch(l){case"top":f={x:d,y:n.y-o.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-o.width,y:u};break;default:f={x:n.x,y:n.y}}switch($t(t)){case"start":f[a]-=g*(r&&c?-1:1);break;case"end":f[a]+=g*(r&&c?-1:1);break}return f}async function yp(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:g=!1,padding:f=0}=ct(t,e),w=ns(f),b=s[g?u==="floating"?"reference":"floating":u],m=fn(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(s.floating)),boundary:c,rootBoundary:d,strategy:l})),x=u==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),_=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},S=fn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:k,strategy:l}):x);return{top:(m.top-S.top+w.top)/_.y,bottom:(S.bottom-m.bottom+w.bottom)/_.y,left:(m.left-S.left+w.left)/_.x,right:(S.right-m.right+w.right)/_.x}}const kp=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=os(c,n,l),g=n,f={},w=0;for(let b=0;b<s.length;b++){var p;const{name:m,fn:x}=s[b],{x:k,y:_,data:S,reset:O}=await x({x:d,y:u,initialPlacement:n,placement:g,strategy:o,middlewareData:f,rects:c,platform:{...a,detectOverflow:(p=a.detectOverflow)!=null?p:yp},elements:{reference:e,floating:t}});d=k??d,u=_??u,f={...f,[m]:{...f[m],...S}},O&&w<=50&&(w++,typeof O=="object"&&(O.placement&&(g=O.placement),O.rects&&(c=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):O.rects),{x:d,y:u}=os(c,g,l)),b=-1)}return{x:d,y:u,placement:g,strategy:o,middlewareData:f}},_p=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=ct(e,t)||{};if(c==null)return{};const u=ns(d),g={x:r,y:n},f=Eo(o),w=Co(f),p=await a.getDimensions(c),b=f==="y",m=b?"top":"left",x=b?"bottom":"right",k=b?"clientHeight":"clientWidth",_=i.reference[w]+i.reference[f]-g[f]-i.floating[w],S=g[f]-i.reference[f],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let j=O?O[k]:0;(!j||!await(a.isElement==null?void 0:a.isElement(O)))&&(j=s.floating[k]||i.floating[w]);const I=_/2-S/2,R=j/2-p[w]/2-1,$=xt(u[m],R),F=xt(u[x],R),C=$,M=j-p[w]-F,y=j/2-p[w]/2+I,B=_o(C,y,M),re=!l.arrow&&$t(o)!=null&&y!==B&&i.reference[w]/2-(y<C?$:F)-p[w]/2<0,W=re?y<C?y-C:y-M:0;return{[f]:g[f]+W,data:{[f]:B,centerOffset:y-B-W,...re&&{alignmentOffset:W}},reset:re}}}),Sp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:g,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:p=!0,...b}=ct(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const m=dt(o),x=rt(s),k=dt(s)===s,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=g||(k||!p?[un(s)]:mp(s)),O=w!=="none";!g&&O&&S.push(...xp(s,p,w,_));const j=[s,...S],I=await l.detectOverflow(t,b),R=[];let $=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&R.push(I[m]),u){const y=hp(o,a,_);R.push(I[y[0]],I[y[1]])}if($=[...$,{placement:o,overflows:R}],!R.every(y=>y<=0)){var F,C;const y=(((F=i.flip)==null?void 0:F.index)||0)+1,B=j[y];if(B&&(!(u==="alignment"?x!==rt(B):!1)||$.every(H=>rt(H.placement)===x?H.overflows[0]>0:!0)))return{data:{index:y,overflows:$},reset:{placement:B}};let re=(C=$.filter(W=>W.overflows[0]<=0).sort((W,H)=>W.overflows[1]-H.overflows[1])[0])==null?void 0:C.placement;if(!re)switch(f){case"bestFit":{var M;const W=(M=$.filter(H=>{if(O){const Z=rt(H.placement);return Z===x||Z==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(Z=>Z>0).reduce((Z,oe)=>Z+oe,0)]).sort((H,Z)=>H[1]-Z[1])[0])==null?void 0:M[0];W&&(re=W);break}case"initialPlacement":re=s;break}if(o!==re)return{reset:{placement:re}}}return{}}}};function is(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function as(e){return dp.some(t=>e[t]>=0)}const Cp=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 a=await n.detectOverflow(t,{...i,elementContext:"reference"}),s=is(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:as(s)}}}case"escaped":{const a=await n.detectOverflow(t,{...i,altBoundary:!0}),s=is(a,r.floating);return{data:{escapedOffsets:s,escaped:as(s)}}}default:return{}}}}},ss=new Set(["left","top"]);async function Ep(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=dt(r),s=$t(r),l=rt(r)==="y",c=ss.has(a)?-1:1,d=i&&l?-1:1,u=ct(t,e);let{mainAxis:g,crossAxis:f,alignmentAxis:w}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof w=="number"&&(f=s==="end"?w*-1:w),l?{x:f*d,y:g*c}:{x:g*c,y:f*d}}const Np=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await Ep(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},zp=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:a=!0,crossAxis:s=!1,limiter:l={fn:m=>{let{x,y:k}=m;return{x,y:k}}},...c}=ct(e,t),d={x:r,y:n},u=await i.detectOverflow(t,c),g=rt(dt(o)),f=So(g);let w=d[f],p=d[g];if(a){const m=f==="y"?"top":"left",x=f==="y"?"bottom":"right",k=w+u[m],_=w-u[x];w=_o(k,w,_)}if(s){const m=g==="y"?"top":"left",x=g==="y"?"bottom":"right",k=p+u[m],_=p-u[x];p=_o(k,p,_)}const b=l.fn({...t,[f]:w,[g]:p});return{...b,data:{x:b.x-r,y:b.y-n,enabled:{[f]:a,[g]:s}}}}}},Ap=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=ct(e,t),d={x:r,y:n},u=rt(o),g=So(u);let f=d[g],w=d[u];const p=ct(s,t),b=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const k=g==="y"?"height":"width",_=i.reference[g]-i.floating[k]+b.mainAxis,S=i.reference[g]+i.reference[k]-b.mainAxis;f<_?f=_:f>S&&(f=S)}if(c){var m,x;const k=g==="y"?"width":"height",_=ss.has(dt(o)),S=i.reference[u]-i.floating[k]+(_&&((m=a.offset)==null?void 0:m[u])||0)+(_?0:b.crossAxis),O=i.reference[u]+i.reference[k]+(_?0:((x=a.offset)==null?void 0:x[u])||0)-(_?b.crossAxis:0);w<S?w=S:w>O&&(w=O)}return{[g]:f,[u]:w}}}},jp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=ct(e,t),d=await a.detectOverflow(t,c),u=dt(o),g=$t(o),f=rt(o)==="y",{width:w,height:p}=i.floating;let b,m;u==="top"||u==="bottom"?(b=u,m=g===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(m=u,b=g==="end"?"top":"bottom");const x=p-d.top-d.bottom,k=w-d.left-d.right,_=xt(p-d[b],x),S=xt(w-d[m],k),O=!t.middlewareData.shift;let j=_,I=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(j=x),O&&!g){const $=Ue(d.left,0),F=Ue(d.right,0),C=Ue(d.top,0),M=Ue(d.bottom,0);f?I=w-2*($!==0||F!==0?$+F:Ue(d.left,d.right)):j=p-2*(C!==0||M!==0?C+M:Ue(d.top,d.bottom))}await l({...t,availableWidth:I,availableHeight:j});const R=await a.getDimensions(s.floating);return w!==R.width||p!==R.height?{reset:{rects:!0}}:{}}}};function pn(){return typeof window<"u"}function Wt(e){return ls(e)?(e.nodeName||"").toLowerCase():"#document"}function $e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(ls(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ls(e){return pn()?e instanceof Node||e instanceof $e(e).Node:!1}function Je(e){return pn()?e instanceof Element||e instanceof $e(e).Element:!1}function ot(e){return pn()?e instanceof HTMLElement||e instanceof $e(e).HTMLElement:!1}function cs(e){return!pn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $e(e).ShadowRoot}const Tp=new Set(["inline","contents"]);function yr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Tp.has(o)}const Op=new Set(["table","td","th"]);function Ip(e){return Op.has(Wt(e))}const Pp=[":popover-open",":modal"];function hn(e){return Pp.some(t=>{try{return e.matches(t)}catch{return!1}})}const Dp=["transform","translate","scale","rotate","perspective"],Rp=["transform","translate","scale","rotate","perspective","filter"],Mp=["paint","layout","strict","content"];function zo(e){const t=Ao(),r=Je(e)?Qe(e):e;return Dp.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)||Rp.some(n=>(r.willChange||"").includes(n))||Mp.some(n=>(r.contain||"").includes(n))}function Lp(e){let t=wt(e);for(;ot(t)&&!Ht(t);){if(zo(t))return t;if(hn(t))return null;t=wt(t)}return null}function Ao(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Fp=new Set(["html","body","#document"]);function Ht(e){return Fp.has(Wt(e))}function Qe(e){return $e(e).getComputedStyle(e)}function mn(e){return Je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wt(e){if(Wt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cs(e)&&e.host||nt(e);return cs(t)?t.host:t}function ds(e){const t=wt(e);return Ht(t)?e.ownerDocument?e.ownerDocument.body:e.body:ot(t)&&yr(t)?t:ds(t)}function kr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=ds(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=$e(o);if(i){const s=jo(a);return t.concat(a,a.visualViewport||[],yr(o)?o:[],s&&r?kr(s):[])}return t.concat(o,kr(o,[],r))}function jo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function us(e){const t=Qe(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ot(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=cn(r)!==i||cn(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function To(e){return Je(e)?e:e.contextElement}function Vt(e){const t=To(e);if(!ot(t))return tt(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=us(t);let a=(i?cn(r.width):r.width)/n,s=(i?cn(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Bp=tt(0);function fs(e){const t=$e(e);return!Ao()||!t.visualViewport?Bp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Up(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==$e(e)?!1:t}function jt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=To(e);let a=tt(1);t&&(n?Je(n)&&(a=Vt(n)):a=Vt(e));const s=Up(i,r,n)?fs(i):tt(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){const g=$e(i),f=n&&Je(n)?$e(n):n;let w=g,p=jo(w);for(;p&&n&&f!==w;){const b=Vt(p),m=p.getBoundingClientRect(),x=Qe(p),k=m.left+(p.clientLeft+parseFloat(x.paddingLeft))*b.x,_=m.top+(p.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,u*=b.y,l+=k,c+=_,w=$e(p),p=jo(w)}}return fn({width:d,height:u,x:l,y:c})}function gn(e,t){const r=mn(e).scrollLeft;return t?t.left+r:jt(nt(e)).left+r}function ps(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-gn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function $p(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",a=nt(n),s=t?hn(t.floating):!1;if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=tt(1);const d=tt(0),u=ot(n);if((u||!u&&!i)&&((Wt(n)!=="body"||yr(a))&&(l=mn(n)),ot(n))){const f=jt(n);c=Vt(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const g=a&&!u&&!i?ps(a,l):tt(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+g.x,y:r.y*c.y-l.scrollTop*c.y+d.y+g.y}}function Wp(e){return Array.from(e.getClientRects())}function Hp(e){const t=nt(e),r=mn(e),n=e.ownerDocument.body,o=Ue(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ue(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+gn(e);const s=-r.scrollTop;return Qe(n).direction==="rtl"&&(a+=Ue(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}const hs=25;function Vp(e,t){const r=$e(e),n=nt(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const d=Ao();(!d||d&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=gn(n);if(c<=0){const d=n.ownerDocument,u=d.body,g=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(n.clientWidth-u.clientWidth-f);w<=hs&&(i-=w)}else c<=hs&&(i+=c);return{width:i,height:a,x:s,y:l}}const Zp=new Set(["absolute","fixed"]);function Gp(e,t){const r=jt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=ot(e)?Vt(e):tt(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:a,height:s,x:l,y:c}}function ms(e,t,r){let n;if(t==="viewport")n=Vp(e,r);else if(t==="document")n=Hp(nt(e));else if(Je(t))n=Gp(t,r);else{const o=fs(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return fn(n)}function gs(e,t){const r=wt(e);return r===t||!Je(r)||Ht(r)?!1:Qe(r).position==="fixed"||gs(r,t)}function Kp(e,t){const r=t.get(e);if(r)return r;let n=kr(e,[],!1).filter(s=>Je(s)&&Wt(s)!=="body"),o=null;const i=Qe(e).position==="fixed";let a=i?wt(e):e;for(;Je(a)&&!Ht(a);){const s=Qe(a),l=zo(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&Zp.has(o.position)||yr(a)&&!l&&gs(e,a))?n=n.filter(d=>d!==a):o=s,a=wt(a)}return t.set(e,n),n}function Yp(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?hn(t)?[]:Kp(t,this._c):[].concat(r),n],s=a[0],l=a.reduce((c,d)=>{const u=ms(t,d,o);return c.top=Ue(u.top,c.top),c.right=xt(u.right,c.right),c.bottom=xt(u.bottom,c.bottom),c.left=Ue(u.left,c.left),c},ms(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function qp(e){const{width:t,height:r}=us(e);return{width:t,height:r}}function Xp(e,t,r){const n=ot(t),o=nt(t),i=r==="fixed",a=jt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=tt(0);function c(){l.x=gn(o)}if(n||!n&&!i)if((Wt(t)!=="body"||yr(o))&&(s=mn(t)),n){const f=jt(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();i&&!n&&o&&c();const d=o&&!n&&!i?ps(o,s):tt(0),u=a.left+s.scrollLeft-l.x-d.x,g=a.top+s.scrollTop-l.y-d.y;return{x:u,y:g,width:a.width,height:a.height}}function Oo(e){return Qe(e).position==="static"}function bs(e,t){if(!ot(e)||Qe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return nt(e)===r&&(r=r.ownerDocument.body),r}function vs(e,t){const r=$e(e);if(hn(e))return r;if(!ot(e)){let o=wt(e);for(;o&&!Ht(o);){if(Je(o)&&!Oo(o))return o;o=wt(o)}return r}let n=bs(e,t);for(;n&&Ip(n)&&Oo(n);)n=bs(n,t);return n&&Ht(n)&&Oo(n)&&!zo(n)?r:n||Lp(e)||r}const Jp=async function(e){const t=this.getOffsetParent||vs,r=this.getDimensions,n=await r(e.floating);return{reference:Xp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Qp(e){return Qe(e).direction==="rtl"}const eh={convertOffsetParentRelativeRectToViewportRelativeRect:$p,getDocumentElement:nt,getClippingRect:Yp,getOffsetParent:vs,getElementRects:Jp,getClientRects:Wp,getDimensions:qp,getScale:Vt,isElement:Je,isRTL:Qp};function xs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function th(e,t){let r=null,n;const o=nt(e);function i(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:g,height:f}=c;if(s||t(),!g||!f)return;const w=dn(u),p=dn(o.clientWidth-(d+g)),b=dn(o.clientHeight-(u+f)),m=dn(d),k={rootMargin:-w+"px "+-p+"px "+-b+"px "+-m+"px",threshold:Ue(0,xt(1,l))||1};let _=!0;function S(O){const j=O[0].intersectionRatio;if(j!==l){if(!_)return a();j?a(!1,j):n=setTimeout(()=>{a(!1,1e-7)},1e3)}j===1&&!xs(c,e.getBoundingClientRect())&&a(),_=!1}try{r=new IntersectionObserver(S,{...k,root:o.ownerDocument})}catch{r=new IntersectionObserver(S,k)}r.observe(e)}return a(!0),i}function rh(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=To(e),d=o||i?[...c?kr(c):[],...kr(t)]:[];d.forEach(m=>{o&&m.addEventListener("scroll",r,{passive:!0}),i&&m.addEventListener("resize",r)});const u=c&&s?th(c,r):null;let g=-1,f=null;a&&(f=new ResizeObserver(m=>{let[x]=m;x&&x.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=f)==null||k.observe(t)})),r()}),c&&!l&&f.observe(c),f.observe(t));let w,p=l?jt(e):null;l&&b();function b(){const m=jt(e);p&&!xs(p,m)&&r(),p=m,w=requestAnimationFrame(b)}return r(),()=>{var m;d.forEach(x=>{o&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),u==null||u(),(m=f)==null||m.disconnect(),f=null,l&&cancelAnimationFrame(w)}}const nh=Np,oh=zp,ih=Sp,ah=jp,sh=Cp,ws=_p,lh=Ap,ch=(e,t,r)=>{const n=new Map,o={platform:eh,...r},i={...o.platform,_c:n};return kp(e,t,{...o,platform:i})};var dh=typeof document<"u",uh=function(){},bn=dh?z.useLayoutEffect:uh;function vn(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(!vn(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)&&!vn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ys(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ks(e,t){const r=ys(e);return Math.round(t*r)/r}function Io(e){const t=E.useRef(e);return bn(()=>{t.current=e}),t}function fh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,u]=E.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,f]=E.useState(n);vn(g,n)||f(n);const[w,p]=E.useState(null),[b,m]=E.useState(null),x=E.useCallback(H=>{H!==O.current&&(O.current=H,p(H))},[]),k=E.useCallback(H=>{H!==j.current&&(j.current=H,m(H))},[]),_=i||w,S=a||b,O=E.useRef(null),j=E.useRef(null),I=E.useRef(d),R=l!=null,$=Io(l),F=Io(o),C=Io(c),M=E.useCallback(()=>{if(!O.current||!j.current)return;const H={placement:t,strategy:r,middleware:g};F.current&&(H.platform=F.current),ch(O.current,j.current,H).then(Z=>{const oe={...Z,isPositioned:C.current!==!1};y.current&&!vn(I.current,oe)&&(I.current=oe,Pr.flushSync(()=>{u(oe)}))})},[g,t,r,F,C]);bn(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,u(H=>({...H,isPositioned:!1})))},[c]);const y=E.useRef(!1);bn(()=>(y.current=!0,()=>{y.current=!1}),[]),bn(()=>{if(_&&(O.current=_),S&&(j.current=S),_&&S){if($.current)return $.current(_,S,M);M()}},[_,S,M,$,R]);const B=E.useMemo(()=>({reference:O,floating:j,setReference:x,setFloating:k}),[x,k]),re=E.useMemo(()=>({reference:_,floating:S}),[_,S]),W=E.useMemo(()=>{const H={position:r,left:0,top:0};if(!re.floating)return H;const Z=ks(re.floating,d.x),oe=ks(re.floating,d.y);return s?{...H,transform:"translate("+Z+"px, "+oe+"px)",...ys(re.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:oe}},[r,s,re.floating,d.x,d.y]);return E.useMemo(()=>({...d,update:M,refs:B,elements:re,floatingStyles:W}),[d,M,B,re,W])}const ph=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?ws({element:n.current,padding:o}).fn(r):{}:n?ws({element:n,padding:o}).fn(r):{}}}},hh=(e,t)=>({...nh(e),options:[e,t]}),mh=(e,t)=>({...oh(e),options:[e,t]}),gh=(e,t)=>({...lh(e),options:[e,t]}),bh=(e,t)=>({...ih(e),options:[e,t]}),vh=(e,t)=>({...ah(e),options:[e,t]}),xh=(e,t)=>({...sh(e),options:[e,t]}),wh=(e,t)=>({...ph(e),options:[e,t]});var yh="Arrow",_s=E.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return h.jsx(Ae.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});_s.displayName=yh;var kh=_s;function _h(e){const[t,r]=E.useState(void 0);return Le(()=>{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 a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Po="Popper",[Ss,Zt]=xr(Po),[Sh,Cs]=Ss(Po),Es=e=>{const{__scopePopper:t,children:r}=e,[n,o]=E.useState(null);return h.jsx(Sh,{scope:t,anchor:n,onAnchorChange:o,children:r})};Es.displayName=Po;var Ns="PopperAnchor",zs=E.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=Cs(Ns,r),a=E.useRef(null),s=je(t,a),l=E.useRef(null);return E.useEffect(()=>{const c=l.current;l.current=(n==null?void 0:n.current)||a.current,c!==l.current&&i.onAnchorChange(l.current)}),n?null:h.jsx(Ae.div,{...o,ref:s})});zs.displayName=Ns;var Do="PopperContent",[Ch,Eh]=Ss(Do),As=E.forwardRef((e,t)=>{var J,se,de,ie,fe,me;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:g=!1,updatePositionStrategy:f="optimized",onPlaced:w,...p}=e,b=Cs(Do,r),[m,x]=E.useState(null),k=je(t,ye=>x(ye)),[_,S]=E.useState(null),O=_h(_),j=(O==null?void 0:O.width)??0,I=(O==null?void 0:O.height)??0,R=n+(i!=="center"?"-"+i:""),$=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},F=Array.isArray(c)?c:[c],C=F.length>0,M={padding:$,boundary:F.filter(zh),altBoundary:C},{refs:y,floatingStyles:B,placement:re,isPositioned:W,middlewareData:H}=fh({strategy:"fixed",placement:R,whileElementsMounted:(...ye)=>rh(...ye,{animationFrame:f==="always"}),elements:{reference:b.anchor},middleware:[hh({mainAxis:o+I,alignmentAxis:a}),l&&mh({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?gh():void 0,...M}),l&&bh({...M}),vh({...M,apply:({elements:ye,rects:v,availableWidth:Y,availableHeight:V})=>{const{width:T,height:A}=v.reference,L=ye.floating.style;L.setProperty("--radix-popper-available-width",`${Y}px`),L.setProperty("--radix-popper-available-height",`${V}px`),L.setProperty("--radix-popper-anchor-width",`${T}px`),L.setProperty("--radix-popper-anchor-height",`${A}px`)}}),_&&wh({element:_,padding:s}),Ah({arrowWidth:j,arrowHeight:I}),g&&xh({strategy:"referenceHidden",...M})]}),[Z,oe]=Os(re),N=At(w);Le(()=>{W&&(N==null||N())},[W,N]);const P=(J=H.arrow)==null?void 0:J.x,ee=(se=H.arrow)==null?void 0:se.y,K=((de=H.arrow)==null?void 0:de.centerOffset)!==0,[Q,ue]=E.useState();return Le(()=>{m&&ue(window.getComputedStyle(m).zIndex)},[m]),h.jsx("div",{ref:y.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:W?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[(ie=H.transformOrigin)==null?void 0:ie.x,(fe=H.transformOrigin)==null?void 0:fe.y].join(" "),...((me=H.hide)==null?void 0:me.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(Ch,{scope:r,placedSide:Z,onArrowChange:S,arrowX:P,arrowY:ee,shouldHideArrow:K,children:h.jsx(Ae.div,{"data-side":Z,"data-align":oe,...p,ref:k,style:{...p.style,animation:W?void 0:"none"}})})})});As.displayName=Do;var js="PopperArrow",Nh={top:"bottom",right:"left",bottom:"top",left:"right"},Ts=E.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=Eh(js,n),a=Nh[i.placedSide];return h.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]: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:h.jsx(kh,{...o,ref:r,style:{...o.style,display:"block"}})})});Ts.displayName=js;function zh(e){return e!==null}var Ah=e=>({name:"transformOrigin",options:e,fn(t){var b,m,x;const{placement:r,rects:n,middlewareData:o}=t,a=((b=o.arrow)==null?void 0:b.centerOffset)!==0,s=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[c,d]=Os(r),u={start:"0%",center:"50%",end:"100%"}[d],g=(((m=o.arrow)==null?void 0:m.x)??0)+s/2,f=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let w="",p="";return c==="bottom"?(w=a?u:`${g}px`,p=`${-l}px`):c==="top"?(w=a?u:`${g}px`,p=`${n.floating.height+l}px`):c==="right"?(w=`${-l}px`,p=a?u:`${f}px`):c==="left"&&(w=`${n.floating.width+l}px`,p=a?u:`${f}px`),{data:{x:w,y:p}}}});function Os(e){const[t,r="center"]=e.split("-");return[t,r]}var Ro=Es,xn=zs,Mo=As,Lo=Ts,jh="Portal",wn=E.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[o,i]=E.useState(!1);Le(()=>i(!0),[]);const a=r||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?pt.createPortal(h.jsx(Ae.div,{...n,ref:t}),a):null});wn.displayName=jh;var Th=E[" useInsertionEffect ".trim().toString()]||Le;function yn({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,a]=Oh({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{const d=E.useRef(e!==void 0);E.useEffect(()=>{const u=d.current;u!==s&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${s?"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=s},[s,n])}const c=E.useCallback(d=>{var u;if(s){const g=Ih(d)?d(e):d;g!==e&&((u=a.current)==null||u.call(a,g))}else i(d)},[s,e,i,a]);return[l,c]}function Oh({defaultProp:e,onChange:t}){const[r,n]=E.useState(e),o=E.useRef(r),i=E.useRef(t);return Th(()=>{i.current=t},[t]),E.useEffect(()=>{var a;o.current!==r&&((a=i.current)==null||a.call(i,r),o.current=r)},[r,o]),[r,n,i]}function Ih(e){return typeof e=="function"}function Ph(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Is=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"}),Dh="VisuallyHidden",Ps=E.forwardRef((e,t)=>h.jsx(Ae.span,{...e,ref:t,style:{...Is,...e.style}}));Ps.displayName=Dh;var Rh=Ps,Mh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Gt=new WeakMap,kn=new WeakMap,_n={},Fo=0,Ds=function(e){return e&&(e.host||Ds(e.parentNode))},Lh=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ds(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})},Fh=function(e,t,r,n){var o=Lh(t,Array.isArray(e)?e:[e]);_n[r]||(_n[r]=new WeakMap);var i=_n[r],a=[],s=new Set,l=new Set(o),c=function(u){!u||s.has(u)||(s.add(u),c(u.parentNode))};o.forEach(c);var d=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(g){if(s.has(g))d(g);else try{var f=g.getAttribute(n),w=f!==null&&f!=="false",p=(Gt.get(g)||0)+1,b=(i.get(g)||0)+1;Gt.set(g,p),i.set(g,b),a.push(g),p===1&&w&&kn.set(g,!0),b===1&&g.setAttribute(r,"true"),w||g.setAttribute(n,"true")}catch(m){console.error("aria-hidden: cannot operate on ",g,m)}})};return d(t),s.clear(),Fo++,function(){a.forEach(function(u){var g=Gt.get(u)-1,f=i.get(u)-1;Gt.set(u,g),i.set(u,f),g||(kn.has(u)||u.removeAttribute(n),kn.delete(u)),f||u.removeAttribute(r)}),Fo--,Fo||(Gt=new WeakMap,Gt=new WeakMap,kn=new WeakMap,_n={})}},Rs=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Mh(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Fh(n,o,r,"aria-hidden")):function(){return null}},it=function(){return it=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},it.apply(this,arguments)};function Ms(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 Bh(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 Sn="right-scroll-bar-position",Cn="width-before-scroll-bar",Uh="with-scroll-bars-hidden",$h="--removed-body-scroll-bar-size";function Bo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Wh(e,t){var r=z.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 Hh=typeof window<"u"?E.useLayoutEffect:E.useEffect,Ls=new WeakMap;function Vh(e,t){var r=Wh(null,function(n){return e.forEach(function(o){return Bo(o,n)})});return Hh(function(){var n=Ls.get(r);if(n){var o=new Set(n),i=new Set(e),a=r.current;o.forEach(function(s){i.has(s)||Bo(s,null)}),i.forEach(function(s){o.has(s)||Bo(s,a)})}Ls.set(r,e)},[e]),r}function Zh(e){return e}function Gh(e,t){t===void 0&&(t=Zh);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 a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),r}}}};return o}function Kh(e){e===void 0&&(e={});var t=Gh(null);return t.options=it({async:!0,ssr:!1},e),t}var Fs=function(e){var t=e.sideCar,r=Ms(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 E.createElement(n,it({},r))};Fs.isSideCarExport=!0;function Yh(e,t){return e.useMedium(t),Fs}var Bs=Kh(),Uo=function(){},En=E.forwardRef(function(e,t){var r=E.useRef(null),n=E.useState({onScrollCapture:Uo,onWheelCapture:Uo,onTouchMoveCapture:Uo}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,g=e.sideCar,f=e.noRelative,w=e.noIsolation,p=e.inert,b=e.allowPinchZoom,m=e.as,x=m===void 0?"div":m,k=e.gapMode,_=Ms(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=g,O=Vh([r,t]),j=it(it({},_),o);return E.createElement(E.Fragment,null,d&&E.createElement(S,{sideCar:Bs,removeScrollBar:c,shards:u,noRelative:f,noIsolation:w,inert:p,setCallbacks:i,allowPinchZoom:!!b,lockRef:r,gapMode:k}),a?E.cloneElement(E.Children.only(s),it(it({},j),{ref:O})):E.createElement(x,it({},j,{className:l,ref:O}),s))});En.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},En.classNames={fullWidth:Cn,zeroRight:Sn};var qh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qh();return t&&e.setAttribute("nonce",t),e}function Jh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Qh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var em=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Xh())&&(Jh(t,r),Qh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tm=function(){var e=em();return function(t,r){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Us=function(){var e=tm(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},rm={left:0,top:0,right:0,gap:0},$o=function(e){return parseInt(e||"",10)||0},nm=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[$o(r),$o(n),$o(o)]},om=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rm;var t=nm(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])}},im=Us(),Kt="data-scroll-locked",am=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
213
|
-
.`.concat(
|
|
212
|
+
`},gu={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 bu(e){let{announcements:t=gu,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=mu}=e;const{announce:i,announcement:s}=fu(),a=xr("DndLiveRegion"),[l,c]=N.useState(!1);if(N.useEffect(()=>{c(!0)},[]),pu(N.useMemo(()=>({onDragStart(f){let{active:m}=f;i(t.onDragStart({active:m}))},onDragMove(f){let{active:m,over:p}=f;t.onDragMove&&i(t.onDragMove({active:m,over:p}))},onDragOver(f){let{active:m,over:p}=f;i(t.onDragOver({active:m,over:p}))},onDragEnd(f){let{active:m,over:p}=f;i(t.onDragEnd({active:m,over:p}))},onDragCancel(f){let{active:m,over:p}=f;i(t.onDragCancel({active:m,over:p}))}}),[i,t])),!l)return null;const d=N.createElement(N.Fragment,null,N.createElement(du,{id:n,value:o.draggable}),N.createElement(uu,{id:a,announcement:s}));return r?ht.createPortal(d,r):d}var Re;(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"})(Re||(Re={}));function un(){}function go(e,t){return N.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function vu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return N.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Je=Object.freeze({x:0,y:0});function ps(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function xu(e,t){const r=dn(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 hs(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function wu(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function ms(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 gs(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function bs(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 yu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=bs(t,t.left,t.top),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const c=ps(bs(l),o);i.push({id:a,data:{droppableContainer:s,value:c}})}}return i.sort(hs)},ku=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ms(t),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const c=ms(l),d=o.reduce((m,p,w)=>m+ps(c[w],p),0),f=Number((d/4).toFixed(4));i.push({id:a,data:{droppableContainer:s,value:f}})}}return i.sort(hs)};function _u(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 Su=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=_u(a,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}})}}return o.sort(wu)};function Cu(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function vs(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Je}function Eu(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 Nu=Eu(1);function xs(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 zu(e,t,r){const n=xs(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 ju={ignoreTransform:!1};function Ht(e,t){t===void 0&&(t=ju);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Ue(e).getComputedStyle(e);c&&(r=zu(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 ws(e){return Ht(e,{ignoreTransform:!0})}function Au(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function Tu(e,t){return t===void 0&&(t=Ue(e).getComputedStyle(e)),t.position==="fixed"}function Ou(e,t){t===void 0&&(t=Ue(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 fn(e,t){const r=[];function n(o){if(t!=null&&r.length>=t||!o)return r;if(ho(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!gr(o)||cs(o)||r.includes(o))return r;const i=Ue(e).getComputedStyle(o);return o!==e&&Ou(o,i)&&r.push(o),Tu(o,i)?r:n(o.parentNode)}return e?n(e):r}function ys(e){const[t]=fn(e,1);return t??null}function bo(e){return!on||!e?null:Ut(e)?e:po(e)?ho(e)||e===$t(e).scrollingElement?window:gr(e)?e:null:null}function ks(e){return Ut(e)?e.scrollX:e.scrollLeft}function _s(e){return Ut(e)?e.scrollY:e.scrollTop}function vo(e){return{x:ks(e),y:_s(e)}}var Me;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Me||(Me={}));function Ss(e){return!on||!e?!1:e===document.scrollingElement}function Cs(e){const t={x:0,y:0},r=Ss(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 Iu={x:.2,y:.2};function Pu(e,t,r,n,o){let{top:i,left:s,right:a,bottom:l}=r;n===void 0&&(n=10),o===void 0&&(o=Iu);const{isTop:c,isBottom:d,isLeft:f,isRight:m}=Cs(e),p={x:0,y:0},w={x:0,y:0},u={height:t.height*o.y,width:t.width*o.x};return!c&&i<=t.top+u.height?(p.y=Me.Backward,w.y=n*Math.abs((t.top+u.height-i)/u.height)):!d&&l>=t.bottom-u.height&&(p.y=Me.Forward,w.y=n*Math.abs((t.bottom-u.height-l)/u.height)),!m&&a>=t.right-u.width?(p.x=Me.Forward,w.x=n*Math.abs((t.right-u.width-a)/u.width)):!f&&s<=t.left+u.width&&(p.x=Me.Backward,w.x=n*Math.abs((t.left+u.width-s)/u.width)),{direction:p,speed:w}}function Du(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 Es(e){return e.reduce((t,r)=>Wt(t,vo(r)),Je)}function Ru(e){return e.reduce((t,r)=>t+ks(r),0)}function Mu(e){return e.reduce((t,r)=>t+_s(r),0)}function Ns(e,t){if(t===void 0&&(t=Ht),!e)return;const{top:r,left:n,bottom:o,right:i}=t(e);ys(e)&&(o<=0||i<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Lu=[["x",["left","right"],Ru],["y",["top","bottom"],Mu]];class xo{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=fn(r),o=Es(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of Lu)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 yr{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 Fu(e){const{EventTarget:t}=Ue(e);return e instanceof t?e:$t(e)}function wo(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 Ye;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ye||(Ye={}));function zs(e){e.preventDefault()}function Bu(e){e.stopPropagation()}var Ce;(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"})(Ce||(Ce={}));const js={start:[Ce.Space,Ce.Enter],cancel:[Ce.Esc],end:[Ce.Space,Ce.Enter,Ce.Tab]},Uu=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case Ce.Right:return{...r,x:r.x+25};case Ce.Left:return{...r,x:r.x-25};case Ce.Down:return{...r,y:r.y+25};case Ce.Up:return{...r,y:r.y-25}}};class yo{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 yr($t(r)),this.windowListeners=new yr(Ue(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ye.Resize,this.handleCancel),this.windowListeners.add(Ye.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ye.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&Ns(n),r(Je)}handleKeyDown(t){if(cn(t)){const{active:r,context:n,options:o}=this.props,{keyboardCodes:i=js,coordinateGetter:s=Uu,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}:Je;this.referenceCoordinates||(this.referenceCoordinates=d);const f=s(t,{active:r,context:n.current,currentCoordinates:d});if(f){const m=wr(f,d),p={x:0,y:0},{scrollableAncestors:w}=n.current;for(const u of w){const g=t.code,{isTop:b,isRight:v,isLeft:k,isBottom:_,maxScroll:S,minScroll:O}=Cs(u),z=Du(u),I={x:Math.min(g===Ce.Right?z.right-z.width/2:z.right,Math.max(g===Ce.Right?z.left:z.left+z.width/2,f.x)),y:Math.min(g===Ce.Down?z.bottom-z.height/2:z.bottom,Math.max(g===Ce.Down?z.top:z.top+z.height/2,f.y))},D=g===Ce.Right&&!v||g===Ce.Left&&!k,U=g===Ce.Down&&!_||g===Ce.Up&&!b;if(D&&I.x!==f.x){const H=u.scrollLeft+m.x,C=g===Ce.Right&&H<=S.x||g===Ce.Left&&H>=O.x;if(C&&!m.y){u.scrollTo({left:H,behavior:a});return}C?p.x=u.scrollLeft-H:p.x=g===Ce.Right?u.scrollLeft-S.x:u.scrollLeft-O.x,p.x&&u.scrollBy({left:-p.x,behavior:a});break}else if(U&&I.y!==f.y){const H=u.scrollTop+m.y,C=g===Ce.Down&&H<=S.y||g===Ce.Up&&H>=O.y;if(C&&!m.x){u.scrollTo({top:H,behavior:a});return}C?p.y=u.scrollTop-H:p.y=g===Ce.Down?u.scrollTop-S.y:u.scrollTop-O.y,p.y&&u.scrollBy({top:-p.y,behavior:a});break}}this.handleMove(t,Wt(wr(f,this.referenceCoordinates),p))}}}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()}}yo.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=js,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 As(e){return!!(e&&"distance"in e)}function Ts(e){return!!(e&&"delay"in e)}class ko{constructor(t,r,n){var o;n===void 0&&(n=Fu(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=$t(s),this.documentListeners=new yr(this.document),this.listeners=new yr(n),this.windowListeners=new yr(Ue(s)),this.initialCoordinates=(o=dn(i))!=null?o:Je,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(Ye.Resize,this.handleCancel),this.windowListeners.add(Ye.DragStart,zs),this.windowListeners.add(Ye.VisibilityChange,this.handleCancel),this.windowListeners.add(Ye.ContextMenu,zs),this.documentListeners.add(Ye.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ts(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(As(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(Ye.Click,Bu,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ye.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=dn(t))!=null?r:Je,c=wr(o,l);if(!n&&a){if(As(a)){if(a.tolerance!=null&&wo(c,a.tolerance))return this.handleCancel();if(wo(c,a.distance))return this.handleStart()}if(Ts(a)&&wo(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===Ce.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const $u={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class _o extends ko{constructor(t){const{event:r}=t,n=$t(r.target);super(t,$u,n)}}_o.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 Wu={move:{name:"mousemove"},end:{name:"mouseup"}};var So;(function(e){e[e.RightClick=2]="RightClick"})(So||(So={}));class Hu extends ko{constructor(t){super(t,Wu,$t(t.event.target))}}Hu.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===So.RightClick?!1:(n==null||n({event:r}),!0)}}];const Co={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Os extends ko{constructor(t){super(t,Co)}static setup(){return window.addEventListener(Co.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Co.move.name,t)};function t(){}}}Os.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 kr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(kr||(kr={}));var pn;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(pn||(pn={}));function Vu(e){let{acceleration:t,activator:r=kr.Pointer,canScroll:n,draggingRect:o,enabled:i,interval:s=5,order:a=pn.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:m}=e;const p=Gu({delta:f,disabled:!i}),[w,u]=iu(),g=N.useRef({x:0,y:0}),b=N.useRef({x:0,y:0}),v=N.useMemo(()=>{switch(r){case kr.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case kr.DraggableRect:return o}},[r,o,l]),k=N.useRef(null),_=N.useCallback(()=>{const O=k.current;if(!O)return;const z=g.current.x*b.current.x,I=g.current.y*b.current.y;O.scrollBy(z,I)},[]),S=N.useMemo(()=>a===pn.TreeOrder?[...c].reverse():c,[a,c]);N.useEffect(()=>{if(!i||!c.length||!v){u();return}for(const O of S){if((n==null?void 0:n(O))===!1)continue;const z=c.indexOf(O),I=d[z];if(!I)continue;const{direction:D,speed:U}=Pu(O,I,v,t,m);for(const H of["x","y"])p[H][D[H]]||(U[H]=0,D[H]=0);if(U.x>0||U.y>0){u(),k.current=O,w(_,s),g.current=U,b.current=D;return}}g.current={x:0,y:0},b.current={x:0,y:0},u()},[t,_,n,u,i,s,JSON.stringify(v),JSON.stringify(p),w,c,S,d,JSON.stringify(m)])}const Zu={x:{[Me.Backward]:!1,[Me.Forward]:!1},y:{[Me.Backward]:!1,[Me.Forward]:!1}};function Gu(e){let{delta:t,disabled:r}=e;const n=ln(t);return vr(o=>{if(r||!n||!o)return Zu;const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Me.Backward]:o.x[Me.Backward]||i.x===-1,[Me.Forward]:o.x[Me.Forward]||i.x===1},y:{[Me.Backward]:o.y[Me.Backward]||i.y===-1,[Me.Forward]:o.y[Me.Forward]||i.y===1}}},[r,t,n])}function Ku(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return vr(o=>{var i;return t==null?null:(i=n??o)!=null?i:null},[n,t])}function Yu(e,t){return N.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 _r;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(_r||(_r={}));var Eo;(function(e){e.Optimized="optimized"})(Eo||(Eo={}));const Is=new Map;function qu(e,t){let{dragging:r,dependencies:n,config:o}=t;const[i,s]=N.useState(null),{frequency:a,measure:l,strategy:c}=o,d=N.useRef(e),f=g(),m=br(f),p=N.useCallback(function(b){b===void 0&&(b=[]),!m.current&&s(v=>v===null?b:v.concat(b.filter(k=>!v.includes(k))))},[m]),w=N.useRef(null),u=vr(b=>{if(f&&!r)return Is;if(!b||b===Is||d.current!==e||i!=null){const v=new Map;for(let k of e){if(!k)continue;if(i&&i.length>0&&!i.includes(k.id)&&k.rect.current){v.set(k.id,k.rect.current);continue}const _=k.node.current,S=_?new xo(l(_),_):null;k.rect.current=S,S&&v.set(k.id,S)}return v}return b},[e,i,r,f,l]);return N.useEffect(()=>{d.current=e},[e]),N.useEffect(()=>{f||p()},[r,f]),N.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),N.useEffect(()=>{f||typeof a!="number"||w.current!==null||(w.current=setTimeout(()=>{p(),w.current=null},a))},[a,f,p,...n]),{droppableRects:u,measureDroppableContainers:p,measuringScheduled:i!=null};function g(){switch(c){case _r.Always:return!1;case _r.BeforeDragging:return r;default:return!r}}}function No(e,t){return vr(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function Xu(e,t){return No(e,t)}function Ju(e){let{callback:t,disabled:r}=e;const n=sn(t),o=N.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(n)},[n,r]);return N.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function hn(e){let{callback:t,disabled:r}=e;const n=sn(t),o=N.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(n)},[r]);return N.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Qu(e){return new xo(Ht(e),e)}function Ps(e,t,r){t===void 0&&(t=Qu);const[n,o]=N.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=Ju({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=hn({callback:i});return Xe(()=>{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 ef(e){const t=No(e);return vs(e,t)}const Ds=[];function tf(e){const t=N.useRef(e),r=vr(n=>e?n&&n!==Ds&&e&&t.current&&e.parentNode===t.current.parentNode?n:fn(e):Ds,[e]);return N.useEffect(()=>{t.current=e},[e]),r}function rf(e){const[t,r]=N.useState(null),n=N.useRef(e),o=N.useCallback(i=>{const s=bo(i.target);s&&r(a=>a?(a.set(s,vo(s)),new Map(a)):null)},[]);return N.useEffect(()=>{const i=n.current;if(e!==i){s(i);const a=e.map(l=>{const c=bo(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,vo(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=bo(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),N.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>Wt(i,s),Je):Es(e):Je,[e,t])}function Rs(e,t){t===void 0&&(t=[]);const r=N.useRef(null);return N.useEffect(()=>{r.current=null},t),N.useEffect(()=>{const n=e!==Je;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?wr(e,r.current):Je}function nf(e){N.useEffect(()=>{if(!on)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 of(e,t){return N.useMemo(()=>e.reduce((r,n)=>{let{eventName:o,handler:i}=n;return r[o]=s=>{i(s,t)},r},{}),[e,t])}function Ms(e){return N.useMemo(()=>e?Au(e):null,[e])}const Ls=[];function sf(e,t){t===void 0&&(t=Ht);const[r]=e,n=Ms(r?Ue(r):null),[o,i]=N.useState(Ls);function s(){i(()=>e.length?e.map(l=>Ss(l)?n:new xo(t(l),l)):Ls)}const a=hn({callback:s});return Xe(()=>{a==null||a.disconnect(),s(),e.forEach(l=>a==null?void 0:a.observe(l))},[e]),o}function Fs(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return gr(t)?t:e}function af(e){let{measure:t}=e;const[r,n]=N.useState(null),o=N.useCallback(c=>{for(const{target:d}of c)if(gr(d)){n(f=>{const m=t(d);return f?{...f,width:m.width,height:m.height}:m});break}},[t]),i=hn({callback:o}),s=N.useCallback(c=>{const d=Fs(c);i==null||i.disconnect(),d&&(i==null||i.observe(d)),n(d?t(d):null)},[t,i]),[a,l]=an(s);return N.useMemo(()=>({nodeRef:a,rect:r,setRef:l}),[r,a,l])}const lf=[{sensor:_o,options:{}},{sensor:yo,options:{}}],cf={current:{}},mn={draggable:{measure:ws},droppable:{measure:ws,strategy:_r.WhileDragging,frequency:Eo.Optimized},dragOverlay:{measure:Ht}};class Sr 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 df={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Sr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:un},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:mn,measureDroppableContainers:un,windowRect:null,measuringScheduled:!1},Bs={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:un,draggableNodes:new Map,over:null,measureDroppableContainers:un},Cr=N.createContext(Bs),Us=N.createContext(df);function uf(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Sr}}}function ff(e,t){switch(t.type){case Re.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Re.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 Re.DragEnd:case Re.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Re.RegisterDroppable:{const{element:r}=t,{id:n}=r,o=new Sr(e.droppable.containers);return o.set(n,r),{...e,droppable:{...e.droppable,containers:o}}}case Re.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 Sr(e.droppable.containers);return s.set(r,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case Re.UnregisterDroppable:{const{id:r,key:n}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const i=new Sr(e.droppable.containers);return i.delete(r),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function pf(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:o}=N.useContext(Cr),i=ln(n),s=ln(r==null?void 0:r.id);return N.useEffect(()=>{if(!t&&!n&&i&&s!=null){if(!cn(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=lu(d);if(f){f.focus();break}}})}},[n,t,o,s,i]),null}function $s(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...n}),r):r}function hf(e){return N.useMemo(()=>({draggable:{...mn.draggable,...e==null?void 0:e.draggable},droppable:{...mn.droppable,...e==null?void 0:e.droppable},dragOverlay:{...mn.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 mf(e){let{activeNode:t,measure:r,initialRect:n,config:o=!0}=e;const i=N.useRef(!1),{x:s,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Xe(()=>{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=vs(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=ys(c);m&&m.scrollBy({top:f.y,left:f.x})}},[t,s,a,n,r])}const gn=N.createContext({...Je,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 gf=N.memo(function(t){var r,n,o,i;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:d=lf,collisionDetection:f=Su,measuring:m,modifiers:p,...w}=t;const u=N.useReducer(ff,void 0,uf),[g,b]=u,[v,k]=hu(),[_,S]=N.useState(vt.Uninitialized),O=_===vt.Initialized,{draggable:{active:z,nodes:I,translate:D},droppable:{containers:U}}=g,H=z!=null?I.get(z):null,C=N.useRef({initial:null,translated:null}),M=N.useMemo(()=>{var Ie;return z!=null?{id:z,data:(Ie=H==null?void 0:H.data)!=null?Ie:cf,rect:C}:null},[z,H]),y=N.useRef(null),[L,ee]=N.useState(null),[F,$]=N.useState(null),V=br(w,Object.values(w)),re=xr("DndDescribedBy",s),A=N.useMemo(()=>U.getEnabled(),[U]),P=hf(m),{droppableRects:Q,measureDroppableContainers:G,measuringScheduled:te}=qu(A,{dragging:O,dependencies:[D.x,D.y],config:P.droppable}),pe=Ku(I,z),X=N.useMemo(()=>F?dn(F):null,[F]),oe=eo(),de=Xu(pe,P.draggable.measure);mf({activeNode:z!=null?I.get(z):null,config:oe.layoutShiftCompensation,initialRect:de,measure:P.draggable.measure});const se=Ps(pe,P.draggable.measure,de),he=Ps(pe?pe.parentElement:null),be=N.useRef({activatorEvent:null,active:null,activeNode:pe,collisionRect:null,collisions:null,droppableRects:Q,draggableNodes:I,draggingNode:null,draggingNodeRect:null,droppableContainers:U,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),_e=U.getNodeFor((r=be.current.over)==null?void 0:r.id),x=af({measure:P.dragOverlay.measure}),K=(n=x.nodeRef.current)!=null?n:pe,W=O?(o=x.rect)!=null?o:se:null,T=!!(x.nodeRef.current&&x.rect),j=ef(T?null:se),R=Ms(K?Ue(K):null),q=tf(O?_e??pe:null),J=sf(q),B=$s(p,{transform:{x:D.x-j.x,y:D.y-j.y,scaleX:1,scaleY:1},activatorEvent:F,active:M,activeNodeRect:se,containerNodeRect:he,draggingNodeRect:W,over:be.current.over,overlayNodeRect:x.rect,scrollableAncestors:q,scrollableAncestorRects:J,windowRect:R}),ne=X?Wt(X,D):null,ue=rf(q),ie=Rs(ue),Z=Rs(ue,[se]),ce=Wt(B,ie),le=W?Nu(W,B):null,Y=M&&le?f({active:M,collisionRect:le,droppableRects:Q,droppableContainers:A,pointerCoordinates:ne}):null,ae=gs(Y,"id"),[fe,ve]=N.useState(null),xe=T?B:Wt(B,Z),we=Cu(xe,(i=fe==null?void 0:fe.rect)!=null?i:null,se),Ee=N.useRef(null),je=N.useCallback((Ie,Le)=>{let{sensor:Ze,options:Ct}=Le;if(y.current==null)return;const qe=I.get(y.current);if(!qe)return;const Ge=Ie.nativeEvent,at=new Ze({active:y.current,activeNode:qe,event:Ge,options:Ct,context:be,onAbort(Fe){if(!I.get(Fe))return;const{onDragAbort:lt}=V.current,pt={id:Fe};lt==null||lt(pt),v({type:"onDragAbort",event:pt})},onPending(Fe,Et,lt,pt){if(!I.get(Fe))return;const{onDragPending:Br}=V.current,Nt={id:Fe,constraint:Et,initialCoordinates:lt,offset:pt};Br==null||Br(Nt),v({type:"onDragPending",event:Nt})},onStart(Fe){const Et=y.current;if(Et==null)return;const lt=I.get(Et);if(!lt)return;const{onDragStart:pt}=V.current,Fr={activatorEvent:Ge,active:{id:Et,data:lt.data,rect:C}};ht.unstable_batchedUpdates(()=>{pt==null||pt(Fr),S(vt.Initializing),b({type:Re.DragStart,initialCoordinates:Fe,active:Et}),v({type:"onDragStart",event:Fr}),ee(Ee.current),$(Ge)})},onMove(Fe){b({type:Re.DragMove,coordinates:Fe})},onEnd:ar(Re.DragEnd),onCancel:ar(Re.DragCancel)});Ee.current=at;function ar(Fe){return async function(){const{active:lt,collisions:pt,over:Fr,scrollAdjustedTranslate:Br}=be.current;let Nt=null;if(lt&&Br){const{cancelDrop:Ur}=V.current;Nt={activatorEvent:Ge,active:lt,collisions:pt,delta:Br,over:Fr},Fe===Re.DragEnd&&typeof Ur=="function"&&await Promise.resolve(Ur(Nt))&&(Fe=Re.DragCancel)}y.current=null,ht.unstable_batchedUpdates(()=>{b({type:Fe}),S(vt.Uninitialized),ve(null),ee(null),$(null),Ee.current=null;const Ur=Fe===Re.DragEnd?"onDragEnd":"onDragCancel";if(Nt){const Si=V.current[Ur];Si==null||Si(Nt),v({type:Ur,event:Nt})}})}}},[I]),ft=N.useCallback((Ie,Le)=>(Ze,Ct)=>{const qe=Ze.nativeEvent,Ge=I.get(Ct);if(y.current!==null||!Ge||qe.dndKit||qe.defaultPrevented)return;const at={active:Ge};Ie(Ze,Le.options,at)===!0&&(qe.dndKit={capturedBy:Le.sensor},y.current=Ct,je(Ze,Le))},[I,je]),Qn=Yu(d,ft);nf(d),Xe(()=>{se&&_===vt.Initializing&&S(vt.Initialized)},[se,_]),N.useEffect(()=>{const{onDragMove:Ie}=V.current,{active:Le,activatorEvent:Ze,collisions:Ct,over:qe}=be.current;if(!Le||!Ze)return;const Ge={active:Le,activatorEvent:Ze,collisions:Ct,delta:{x:ce.x,y:ce.y},over:qe};ht.unstable_batchedUpdates(()=>{Ie==null||Ie(Ge),v({type:"onDragMove",event:Ge})})},[ce.x,ce.y]),N.useEffect(()=>{const{active:Ie,activatorEvent:Le,collisions:Ze,droppableContainers:Ct,scrollAdjustedTranslate:qe}=be.current;if(!Ie||y.current==null||!Le||!qe)return;const{onDragOver:Ge}=V.current,at=Ct.get(ae),ar=at&&at.rect.current?{id:at.id,rect:at.rect.current,data:at.data,disabled:at.disabled}:null,Fe={active:Ie,activatorEvent:Le,collisions:Ze,delta:{x:qe.x,y:qe.y},over:ar};ht.unstable_batchedUpdates(()=>{ve(ar),Ge==null||Ge(Fe),v({type:"onDragOver",event:Fe})})},[ae]),Xe(()=>{be.current={activatorEvent:F,active:M,activeNode:pe,collisionRect:le,collisions:Y,droppableRects:Q,draggableNodes:I,draggingNode:K,draggingNodeRect:W,droppableContainers:U,over:fe,scrollableAncestors:q,scrollAdjustedTranslate:ce},C.current={initial:W,translated:le}},[M,pe,Y,le,I,K,W,Q,U,fe,q,ce]),Vu({...oe,delta:D,draggingRect:le,pointerCoordinates:ne,scrollableAncestors:q,scrollableAncestorRects:J});const ki=N.useMemo(()=>({active:M,activeNode:pe,activeNodeRect:se,activatorEvent:F,collisions:Y,containerNodeRect:he,dragOverlay:x,draggableNodes:I,droppableContainers:U,droppableRects:Q,over:fe,measureDroppableContainers:G,scrollableAncestors:q,scrollableAncestorRects:J,measuringConfiguration:P,measuringScheduled:te,windowRect:R}),[M,pe,se,F,Y,he,x,I,U,Q,fe,G,q,J,P,te,R]),_i=N.useMemo(()=>({activatorEvent:F,activators:Qn,active:M,activeNodeRect:se,ariaDescribedById:{draggable:re},dispatch:b,draggableNodes:I,over:fe,measureDroppableContainers:G}),[F,Qn,M,se,b,re,I,fe,G]);return N.createElement(fs.Provider,{value:k},N.createElement(Cr.Provider,{value:_i},N.createElement(Us.Provider,{value:ki},N.createElement(gn.Provider,{value:we},c)),N.createElement(pf,{disabled:(a==null?void 0:a.restoreFocus)===!1})),N.createElement(bu,{...a,hiddenTextDescribedById:re}));function eo(){const Ie=(L==null?void 0:L.autoScrollEnabled)===!1,Le=typeof l=="object"?l.enabled===!1:l===!1,Ze=O&&!Ie&&!Le;return typeof l=="object"?{...l,enabled:Ze}:{enabled:Ze}}}),bf=N.createContext(null),Ws="button",vf="Draggable";function xf(e){let{id:t,data:r,disabled:n=!1,attributes:o}=e;const i=xr(vf),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:m}=N.useContext(Cr),{role:p=Ws,roleDescription:w="draggable",tabIndex:u=0}=o??{},g=(l==null?void 0:l.id)===t,b=N.useContext(g?gn:bf),[v,k]=an(),[_,S]=an(),O=of(s,t),z=br(r);Xe(()=>(f.set(t,{id:t,key:i,node:v,activatorNode:_,data:z}),()=>{const D=f.get(t);D&&D.key===i&&f.delete(t)}),[f,t]);const I=N.useMemo(()=>({role:p,tabIndex:u,"aria-disabled":n,"aria-pressed":g&&p===Ws?!0:void 0,"aria-roledescription":w,"aria-describedby":d.draggable}),[n,p,u,g,w,d.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:I,isDragging:g,listeners:n?void 0:O,node:v,over:m,setNodeRef:k,setActivatorNodeRef:S,transform:b}}function Hs(){return N.useContext(Us)}const wf="Droppable",yf={timeout:25};function kf(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:o}=e;const i=xr(wf),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=N.useContext(Cr),d=N.useRef({disabled:r}),f=N.useRef(!1),m=N.useRef(null),p=N.useRef(null),{disabled:w,updateMeasurementsFor:u,timeout:g}={...yf,...o},b=br(u??n),v=N.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(b.current)?b.current:[b.current]),p.current=null},g)},[g]),k=hn({callback:v,disabled:w||!s}),_=N.useCallback((I,D)=>{k&&(D&&(k.unobserve(D),f.current=!1),I&&k.observe(I))},[k]),[S,O]=an(_),z=br(t);return N.useEffect(()=>{!k||!S.current||(k.disconnect(),f.current=!1,k.observe(S.current))},[S,k]),N.useEffect(()=>(a({type:Re.RegisterDroppable,element:{id:n,key:i,disabled:r,node:S,rect:m,data:z}}),()=>a({type:Re.UnregisterDroppable,key:i,id:n})),[n]),N.useEffect(()=>{r!==d.current.disabled&&(a({type:Re.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:S,over:l,setNodeRef:O}}function _f(e){let{animation:t,children:r}=e;const[n,o]=N.useState(null),[i,s]=N.useState(null),a=ln(r);return!r&&!n&&a&&o(a),Xe(()=>{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]),N.createElement(N.Fragment,null,r,n?N.cloneElement(n,{ref:s}):null)}const Sf={x:0,y:0,scaleX:1,scaleY:1};function Cf(e){let{children:t}=e;return N.createElement(Cr.Provider,{value:Bs},N.createElement(gn.Provider,{value:Sf},t))}const Ef={position:"fixed",touchAction:"none"},Nf=e=>cn(e)?"transform 250ms ease":void 0,zf=N.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:o,children:i,className:s,rect:a,style:l,transform:c,transition:d=Nf}=e;if(!a)return null;const f=o?c:{...c,scaleX:1,scaleY:1},m={...Ef,width:a.width,height:a.height,top:a.top,left:a.left,transform:bt.Transform.toString(f),transformOrigin:o&&n?xu(n,a):void 0,transition:typeof d=="function"?d(n):d,...l};return N.createElement(r,{className:s,style:m,ref:t},i)}),jf={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 Af(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:o}=e;return sn((i,s)=>{if(t===null)return;const a=r.get(i);if(!a)return;const l=a.node.current;if(!l)return;const c=Fs(s);if(!c)return;const{transform:d}=Ue(s).getComputedStyle(s),f=xs(d);if(!f)return;const m=typeof t=="function"?t:Tf(t);return Ns(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 Tf(e){const{duration:t,easing:r,sideEffects:n,keyframes:o}={...jf,...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},p=o({...c,active:s,dragOverlay:a,transform:{initial:l,final:m}}),[w]=p,u=p[p.length-1];if(JSON.stringify(w)===JSON.stringify(u))return;const g=n==null?void 0:n({active:s,dragOverlay:a,...c}),b=a.node.animate(p,{duration:t,easing:r,fill:"forwards"});return new Promise(v=>{b.onfinish=()=>{g==null||g(),v()}})}}let Vs=0;function Of(e){return N.useMemo(()=>{if(e!=null)return Vs++,Vs},[e])}const If=N.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:p,draggableNodes:w,droppableContainers:u,dragOverlay:g,over:b,measuringConfiguration:v,scrollableAncestors:k,scrollableAncestorRects:_,windowRect:S}=Hs(),O=N.useContext(gn),z=Of(f==null?void 0:f.id),I=$s(s,{activatorEvent:d,active:f,activeNodeRect:m,containerNodeRect:p,draggingNodeRect:g.rect,over:b,overlayNodeRect:g.rect,scrollableAncestors:k,scrollableAncestorRects:_,transform:O,windowRect:S}),D=No(m),U=Af({config:n,draggableNodes:w,droppableContainers:u,measuringConfiguration:v}),H=D?g.setRef:void 0;return N.createElement(Cf,null,N.createElement(_f,{animation:U},f&&z?N.createElement(zf,{key:z,id:f.id,ref:H,as:a,activatorEvent:d,adjustScale:t,className:l,transition:i,rect:D,style:{zIndex:c,...o},transform:I},r):null))}),Pf=e=>{let{transform:t}=e;return{...t,x:0}};function Zs(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function Df(e,t){return e.reduce((r,n,o)=>{const i=t.get(n);return i&&(r[o]=i),r},Array(e.length))}function bn(e){return e!==null&&e>=0}function Rf(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 Mf(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Gs=e=>{let{rects:t,activeIndex:r,overIndex:n,index:o}=e;const i=Zs(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}},vn={scaleX:1,scaleY:1},Lf=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,...vn}:null}const l=Ff(i,o,r);return o>r&&o<=s?{x:0,y:-a.height-l,...vn}:o<r&&o>=s?{x:0,y:a.height+l,...vn}:{x:0,y:0,...vn}};function Ff(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 Ks="Sortable",Ys=N.createContext({activeIndex:-1,containerId:Ks,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Gs,disabled:{draggable:!1,droppable:!1}});function Bf(e){let{children:t,id:r,items:n,strategy:o=Gs,disabled:i=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:d}=Hs(),f=xr(Ks,r),m=a.rect!==null,p=N.useMemo(()=>n.map(O=>typeof O=="object"&&"id"in O?O.id:O),[n]),w=s!=null,u=s?p.indexOf(s.id):-1,g=c?p.indexOf(c.id):-1,b=N.useRef(p),v=!Rf(p,b.current),k=g!==-1&&u===-1||v,_=Mf(i);Xe(()=>{v&&w&&d(p)},[v,p,w,d]),N.useEffect(()=>{b.current=p},[p]);const S=N.useMemo(()=>({activeIndex:u,containerId:f,disabled:_,disableTransforms:k,items:p,overIndex:g,useDragOverlay:m,sortedRects:Df(p,l),strategy:o}),[u,f,_.draggable,_.droppable,k,p,g,l,m,o]);return N.createElement(Ys.Provider,{value:S},t)}const Uf=e=>{let{id:t,items:r,activeIndex:n,overIndex:o}=e;return Zs(r,n,o).indexOf(t)},$f=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},Wf={duration:200,easing:"ease"},qs="transform",Hf=bt.Transition.toString({property:qs,duration:0,easing:"linear"}),Vf={roleDescription:"sortable"};function Zf(e){let{disabled:t,index:r,node:n,rect:o}=e;const[i,s]=N.useState(null),a=N.useRef(r);return Xe(()=>{if(!t&&r!==a.current&&n.current){const l=o.current;if(l){const c=Ht(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]),N.useEffect(()=>{i&&s(null)},[i]),i}function Gf(e){let{animateLayoutChanges:t=$f,attributes:r,disabled:n,data:o,getNewIndex:i=Uf,id:s,strategy:a,resizeObserverConfig:l,transition:c=Wf}=e;const{items:d,containerId:f,activeIndex:m,disabled:p,disableTransforms:w,sortedRects:u,overIndex:g,useDragOverlay:b,strategy:v}=N.useContext(Ys),k=Kf(n,p),_=d.indexOf(s),S=N.useMemo(()=>({sortable:{containerId:f,index:_,items:d},...o}),[f,o,_,d]),O=N.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:z,node:I,isOver:D,setNodeRef:U}=kf({id:s,data:S,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...l}}),{active:H,activatorEvent:C,activeNodeRect:M,attributes:y,setNodeRef:L,listeners:ee,isDragging:F,over:$,setActivatorNodeRef:V,transform:re}=xf({id:s,data:S,attributes:{...Vf,...r},disabled:k.draggable}),A=ou(U,L),P=!!H,Q=P&&!w&&bn(m)&&bn(g),G=!b&&F,te=G&&Q?re:null,X=Q?te??(a??v)({rects:u,activeNodeRect:M,activeIndex:m,overIndex:g,index:_}):null,oe=bn(m)&&bn(g)?i({id:s,items:d,activeIndex:m,overIndex:g}):_,de=H==null?void 0:H.id,se=N.useRef({activeId:de,items:d,newIndex:oe,containerId:f}),he=d!==se.current.items,be=t({active:H,containerId:f,isDragging:F,isSorting:P,id:s,index:_,items:d,newIndex:se.current.newIndex,previousItems:se.current.items,previousContainerId:se.current.containerId,transition:c,wasDragging:se.current.activeId!=null}),_e=Zf({disabled:!be,index:_,node:I,rect:z});return N.useEffect(()=>{P&&se.current.newIndex!==oe&&(se.current.newIndex=oe),f!==se.current.containerId&&(se.current.containerId=f),d!==se.current.items&&(se.current.items=d)},[P,oe,f,d]),N.useEffect(()=>{if(de===se.current.activeId)return;if(de!=null&&se.current.activeId==null){se.current.activeId=de;return}const K=setTimeout(()=>{se.current.activeId=de},50);return()=>clearTimeout(K)},[de]),{active:H,activeIndex:m,attributes:y,data:S,rect:z,index:_,newIndex:oe,items:d,isOver:D,isSorting:P,isDragging:F,listeners:ee,node:I,overIndex:g,over:$,setNodeRef:A,setActivatorNodeRef:V,setDroppableNodeRef:U,setDraggableNodeRef:L,transform:_e??X,transition:x()};function x(){if(_e||he&&se.current.newIndex===_)return Hf;if(!(G&&!cn(C)||!c)&&(P||be))return bt.Transition.toString({...c,property:qs})}}function Kf(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 xn(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 Yf=[Ce.Down,Ce.Right,Ce.Up,Ce.Left],qf=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:a}}=t;if(Yf.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 Ce.Down:n.top<m.top&&l.push(f);break;case Ce.Up:n.top>m.top&&l.push(f);break;case Ce.Left:n.left>m.left&&l.push(f);break;case Ce.Right:n.left<m.left&&l.push(f);break}});const c=ku({collisionRect:n,droppableRects:o,droppableContainers:l});let d=gs(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),p=m?o.get(m.id):null,w=m==null?void 0:m.node.current;if(w&&p&&f&&m){const g=fn(w).some((O,z)=>a[z]!==O),b=Xs(f,m),v=Xf(f,m),k=g||!b?{x:0,y:0}:{x:v?n.width-p.width:0,y:v?n.height-p.height:0},_={x:p.left,y:p.top};return k.x&&k.y?_:wr(_,k)}}}};function Xs(e,t){return!xn(e)||!xn(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Xf(e,t){return!xn(e)||!xn(t)||!Xs(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function zo({className:e,type:t,...r}){return h.jsx("input",{type:t,className:ye("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 Jf({className:e,...t}){return h.jsx("textarea",{className:ye("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 Qf({className:e,checked:t,onCheckedChange:r,...n}){return h.jsx("input",{type:"checkbox",checked:t,onChange:o=>r==null?void 0:r(o.target.checked),className:ye("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...n})}function At({className:e,...t}){return h.jsx("label",{className:ye("text-sm font-medium leading-none select-none",e),...t})}function Js(e,[t,r]){return Math.min(r,Math.max(t,e))}function ze(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 Er(e,t=[]){let r=[];function n(i,s){const a=E.createContext(s),l=r.length;r=[...r,s];const c=f=>{var b;const{scope:m,children:p,...w}=f,u=((b=m==null?void 0:m[e])==null?void 0:b[l])||a,g=E.useMemo(()=>w,Object.values(w));return h.jsx(u.Provider,{value:g,children:p})};c.displayName=i+"Provider";function d(f,m){var u;const p=((u=m==null?void 0:m[e])==null?void 0:u[l])||a,w=E.useContext(p);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=>E.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return E.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[n,ep(o,...t)]}function ep(...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 E.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Qs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ea(...e){return t=>{let r=!1;const n=e.map(o=>{const i=Qs(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():Qs(e[o],null)}}}}function Oe(...e){return E.useCallback(ea(...e),e)}function Vt(e){const t=rp(e),r=E.forwardRef((n,o)=>{const{children:i,...s}=n,a=E.Children.toArray(i),l=a.find(op);if(l){const c=l.props.children,d=a.map(f=>f===l?E.Children.count(c)>1?E.Children.only(null):E.isValidElement(c)?c.props.children:null:f);return h.jsx(t,{...s,ref:o,children:E.isValidElement(c)?E.cloneElement(c,void 0,d):null})}return h.jsx(t,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var tp=Vt("Slot");function rp(e){const t=E.forwardRef((r,n)=>{const{children:o,...i}=r;if(E.isValidElement(o)){const s=sp(o),a=ip(i,o.props);return o.type!==E.Fragment&&(a.ref=n?ea(n,s):s),E.cloneElement(o,a)}return E.Children.count(o)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ta=Symbol("radix.slottable");function np(e){const t=({children:r})=>h.jsx(h.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=ta,t}function op(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ta}function ip(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 sp(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 ap(e){const t=e+"CollectionProvider",[r,n]=Er(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=u=>{const{scope:g,children:b}=u,v=N.useRef(null),k=N.useRef(new Map).current;return h.jsx(o,{scope:g,itemMap:k,collectionRef:v,children:b})};s.displayName=t;const a=e+"CollectionSlot",l=Vt(a),c=N.forwardRef((u,g)=>{const{scope:b,children:v}=u,k=i(a,b),_=Oe(g,k.collectionRef);return h.jsx(l,{ref:_,children:v})});c.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=Vt(d),p=N.forwardRef((u,g)=>{const{scope:b,children:v,...k}=u,_=N.useRef(null),S=Oe(g,_),O=i(d,b);return N.useEffect(()=>(O.itemMap.set(_,{ref:_,...k}),()=>void O.itemMap.delete(_))),h.jsx(m,{[f]:"",ref:S,children:v})});p.displayName=d;function w(u){const g=i(e+"CollectionConsumer",u);return N.useCallback(()=>{const v=g.collectionRef.current;if(!v)return[];const k=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((O,z)=>k.indexOf(O.ref.current)-k.indexOf(z.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:c,ItemSlot:p},w,n]}var lp=E.createContext(void 0);function cp(e){const t=E.useContext(lp);return e||t||"ltr"}var dp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Te=dp.reduce((e,t)=>{const r=Vt(`Primitive.${t}`),n=E.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function up(e,t){e&&$r.flushSync(()=>e.dispatchEvent(t))}function Tt(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function fp(e,t=globalThis==null?void 0:globalThis.document){const r=Tt(e);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 pp="DismissableLayer",jo="dismissableLayer.update",hp="dismissableLayer.pointerDownOutside",mp="dismissableLayer.focusOutside",ra,na=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wn=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=E.useContext(na),[d,f]=E.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=E.useState({}),w=Oe(t,z=>f(z)),u=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=u.indexOf(g),v=d?u.indexOf(d):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,_=v>=b,S=vp(z=>{const I=z.target,D=[...c.branches].some(U=>U.contains(I));!_||D||(o==null||o(z),s==null||s(z),z.defaultPrevented||a==null||a())},m),O=xp(z=>{const I=z.target;[...c.branches].some(U=>U.contains(I))||(i==null||i(z),s==null||s(z),z.defaultPrevented||a==null||a())},m);return fp(z=>{v===c.layers.size-1&&(n==null||n(z),!z.defaultPrevented&&a&&(z.preventDefault(),a()))},m),E.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ra=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),oa(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ra)}},[d,m,r,c]),E.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),oa())},[d,c]),E.useEffect(()=>{const z=()=>p({});return document.addEventListener(jo,z),()=>document.removeEventListener(jo,z)},[]),h.jsx(Te.div,{...l,ref:w,style:{pointerEvents:k?_?"auto":"none":void 0,...e.style},onFocusCapture:ze(e.onFocusCapture,O.onFocusCapture),onBlurCapture:ze(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:ze(e.onPointerDownCapture,S.onPointerDownCapture)})});wn.displayName=pp;var gp="DismissableLayerBranch",bp=E.forwardRef((e,t)=>{const r=E.useContext(na),n=E.useRef(null),o=Oe(t,n);return E.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),h.jsx(Te.div,{...e,ref:o})});bp.displayName=gp;function vp(e,t=globalThis==null?void 0:globalThis.document){const r=Tt(e),n=E.useRef(!1),o=E.useRef(()=>{});return E.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){ia(hp,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 xp(e,t=globalThis==null?void 0:globalThis.document){const r=Tt(e),n=E.useRef(!1);return E.useEffect(()=>{const o=i=>{i.target&&!n.current&&ia(mp,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 oa(){const e=new CustomEvent(jo);document.dispatchEvent(e)}function ia(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?up(o,i):o.dispatchEvent(i)}var Ao=0;function sa(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??aa()),document.body.insertAdjacentElement("beforeend",e[1]??aa()),Ao++,()=>{Ao===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ao--}},[])}function aa(){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 To="focusScope.autoFocusOnMount",Oo="focusScope.autoFocusOnUnmount",la={bubbles:!1,cancelable:!0},wp="FocusScope",Io=E.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=E.useState(null),c=Tt(o),d=Tt(i),f=E.useRef(null),m=Oe(t,u=>l(u)),p=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(n){let u=function(k){if(p.paused||!a)return;const _=k.target;a.contains(_)?f.current=_:xt(f.current,{select:!0})},g=function(k){if(p.paused||!a)return;const _=k.relatedTarget;_!==null&&(a.contains(_)||xt(f.current,{select:!0}))},b=function(k){if(document.activeElement===document.body)for(const S of k)S.removedNodes.length>0&&xt(a)};document.addEventListener("focusin",u),document.addEventListener("focusout",g);const v=new MutationObserver(b);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",g),v.disconnect()}}},[n,a,p.paused]),E.useEffect(()=>{if(a){ua.add(p);const u=document.activeElement;if(!a.contains(u)){const b=new CustomEvent(To,la);a.addEventListener(To,c),a.dispatchEvent(b),b.defaultPrevented||(yp(Ep(ca(a)),{select:!0}),document.activeElement===u&&xt(a))}return()=>{a.removeEventListener(To,c),setTimeout(()=>{const b=new CustomEvent(Oo,la);a.addEventListener(Oo,d),a.dispatchEvent(b),b.defaultPrevented||xt(u??document.body,{select:!0}),a.removeEventListener(Oo,d),ua.remove(p)},0)}}},[a,c,d,p]);const w=E.useCallback(u=>{if(!r&&!n||p.paused)return;const g=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,b=document.activeElement;if(g&&b){const v=u.currentTarget,[k,_]=kp(v);k&&_?!u.shiftKey&&b===_?(u.preventDefault(),r&&xt(k,{select:!0})):u.shiftKey&&b===k&&(u.preventDefault(),r&&xt(_,{select:!0})):b===v&&u.preventDefault()}},[r,n,p.paused]);return h.jsx(Te.div,{tabIndex:-1,...s,ref:m,onKeyDown:w})});Io.displayName=wp;function yp(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(xt(n,{select:t}),document.activeElement!==r)return}function kp(e){const t=ca(e),r=da(t,e),n=da(t.reverse(),e);return[r,n]}function ca(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 da(e,t){for(const r of e)if(!_p(r,{upTo:t}))return r}function _p(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 Sp(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&&Sp(e)&&t&&e.select()}}var ua=Cp();function Cp(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=fa(e,t),e.unshift(t)},remove(t){var r;e=fa(e,t),(r=e[0])==null||r.resume()}}}function fa(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Ep(e){return e.filter(t=>t.tagName!=="A")}var Be=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},Np=E[" useId ".trim().toString()]||(()=>{}),zp=0;function Nr(e){const[t,r]=E.useState(Np());return Be(()=>{r(n=>n??String(zp++))},[e]),t?`radix-${t}`:""}const jp=["top","right","bottom","left"],wt=Math.min,We=Math.max,yn=Math.round,kn=Math.floor,rt=e=>({x:e,y:e}),Ap={left:"right",right:"left",bottom:"top",top:"bottom"},Tp={start:"end",end:"start"};function Po(e,t,r){return We(e,wt(t,r))}function dt(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function Zt(e){return e.split("-")[1]}function Do(e){return e==="x"?"y":"x"}function Ro(e){return e==="y"?"height":"width"}const Op=new Set(["top","bottom"]);function nt(e){return Op.has(ut(e))?"y":"x"}function Mo(e){return Do(nt(e))}function Ip(e,t,r){r===void 0&&(r=!1);const n=Zt(e),o=Mo(e),i=Ro(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=_n(s)),[s,_n(s)]}function Pp(e){const t=_n(e);return[Lo(e),t,Lo(t)]}function Lo(e){return e.replace(/start|end/g,t=>Tp[t])}const pa=["left","right"],ha=["right","left"],Dp=["top","bottom"],Rp=["bottom","top"];function Mp(e,t,r){switch(e){case"top":case"bottom":return r?t?ha:pa:t?pa:ha;case"left":case"right":return t?Dp:Rp;default:return[]}}function Lp(e,t,r,n){const o=Zt(e);let i=Mp(ut(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Lo)))),i}function _n(e){return e.replace(/left|right|bottom|top/g,t=>Ap[t])}function Fp(e){return{top:0,right:0,bottom:0,left:0,...e}}function ma(e){return typeof e!="number"?Fp(e):{top:e,right:e,bottom:e,left:e}}function Sn(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 ga(e,t,r){let{reference:n,floating:o}=e;const i=nt(t),s=Mo(t),a=Ro(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 p;switch(l){case"top":p={x:d,y:n.y-o.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(Zt(t)){case"start":p[s]-=m*(r&&c?-1:1);break;case"end":p[s]+=m*(r&&c?-1:1);break}return p}async function Bp(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:p=0}=dt(t,e),w=ma(p),g=a[m?f==="floating"?"reference":"floating":f],b=Sn(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(g)))==null||r?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),v=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)),_=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},S=Sn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:k,strategy:l}):v);return{top:(b.top-S.top+w.top)/_.y,bottom:(S.bottom-b.bottom+w.bottom)/_.y,left:(b.left-S.left+w.left)/_.x,right:(S.right-b.right+w.right)/_.x}}const Up=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}=ga(c,n,l),m=n,p={},w=0;for(let g=0;g<a.length;g++){var u;const{name:b,fn:v}=a[g],{x:k,y:_,data:S,reset:O}=await v({x:d,y:f,initialPlacement:n,placement:m,strategy:o,middlewareData:p,rects:c,platform:{...s,detectOverflow:(u=s.detectOverflow)!=null?u:Bp},elements:{reference:e,floating:t}});d=k??d,f=_??f,p={...p,[b]:{...p[b],...S}},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}=ga(c,m,l)),g=-1)}return{x:d,y:f,placement:m,strategy:o,middlewareData:p}},$p=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=ma(d),m={x:r,y:n},p=Mo(o),w=Ro(p),u=await s.getDimensions(c),g=p==="y",b=g?"top":"left",v=g?"bottom":"right",k=g?"clientHeight":"clientWidth",_=i.reference[w]+i.reference[p]-m[p]-i.floating[w],S=m[p]-i.reference[p],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let z=O?O[k]:0;(!z||!await(s.isElement==null?void 0:s.isElement(O)))&&(z=a.floating[k]||i.floating[w]);const I=_/2-S/2,D=z/2-u[w]/2-1,U=wt(f[b],D),H=wt(f[v],D),C=U,M=z-u[w]-H,y=z/2-u[w]/2+I,L=Po(C,y,M),ee=!l.arrow&&Zt(o)!=null&&y!==L&&i.reference[w]/2-(y<C?U:H)-u[w]/2<0,F=ee?y<C?y-C:y-M:0;return{[p]:m[p]+F,data:{[p]:L,centerOffset:y-L-F,...ee&&{alignmentOffset:F}},reset:ee}}}),Wp=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:p="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:u=!0,...g}=dt(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const b=ut(o),v=nt(a),k=ut(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=m||(k||!u?[_n(a)]:Pp(a)),O=w!=="none";!m&&O&&S.push(...Lp(a,u,w,_));const z=[a,...S],I=await l.detectOverflow(t,g),D=[];let U=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&D.push(I[b]),f){const y=Ip(o,s,_);D.push(I[y[0]],I[y[1]])}if(U=[...U,{placement:o,overflows:D}],!D.every(y=>y<=0)){var H,C;const y=(((H=i.flip)==null?void 0:H.index)||0)+1,L=z[y];if(L&&(!(f==="alignment"?v!==nt(L):!1)||U.every($=>nt($.placement)===v?$.overflows[0]>0:!0)))return{data:{index:y,overflows:U},reset:{placement:L}};let ee=(C=U.filter(F=>F.overflows[0]<=0).sort((F,$)=>F.overflows[1]-$.overflows[1])[0])==null?void 0:C.placement;if(!ee)switch(p){case"bestFit":{var M;const F=(M=U.filter($=>{if(O){const V=nt($.placement);return V===v||V==="y"}return!0}).map($=>[$.placement,$.overflows.filter(V=>V>0).reduce((V,re)=>V+re,0)]).sort(($,V)=>$[1]-V[1])[0])==null?void 0:M[0];F&&(ee=F);break}case"initialPlacement":ee=a;break}if(o!==ee)return{reset:{placement:ee}}}return{}}}};function ba(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function va(e){return jp.some(t=>e[t]>=0)}const Hp=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=ba(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:va(a)}}}case"escaped":{const s=await n.detectOverflow(t,{...i,altBoundary:!0}),a=ba(s,r.floating);return{data:{escapedOffsets:a,escaped:va(a)}}}default:return{}}}}},xa=new Set(["left","top"]);async function Vp(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=Zt(r),l=nt(r)==="y",c=xa.has(s)?-1:1,d=i&&l?-1:1,f=dt(t,e);let{mainAxis:m,crossAxis:p,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"&&(p=a==="end"?w*-1:w),l?{x:p*d,y:m*c}:{x:m*c,y:p*d}}const Zp=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 Vp(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}}}}},Gp=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:b=>{let{x:v,y:k}=b;return{x:v,y:k}}},...c}=dt(e,t),d={x:r,y:n},f=await i.detectOverflow(t,c),m=nt(ut(o)),p=Do(m);let w=d[p],u=d[m];if(s){const b=p==="y"?"top":"left",v=p==="y"?"bottom":"right",k=w+f[b],_=w-f[v];w=Po(k,w,_)}if(a){const b=m==="y"?"top":"left",v=m==="y"?"bottom":"right",k=u+f[b],_=u-f[v];u=Po(k,u,_)}const g=l.fn({...t,[p]:w,[m]:u});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[p]:s,[m]:a}}}}}},Kp=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=nt(o),m=Do(f);let p=d[m],w=d[f];const u=dt(a,t),g=typeof u=="number"?{mainAxis:u,crossAxis:0}:{mainAxis:0,crossAxis:0,...u};if(l){const k=m==="y"?"height":"width",_=i.reference[m]-i.floating[k]+g.mainAxis,S=i.reference[m]+i.reference[k]-g.mainAxis;p<_?p=_:p>S&&(p=S)}if(c){var b,v;const k=m==="y"?"width":"height",_=xa.has(ut(o)),S=i.reference[f]-i.floating[k]+(_&&((b=s.offset)==null?void 0:b[f])||0)+(_?0:g.crossAxis),O=i.reference[f]+i.reference[k]+(_?0:((v=s.offset)==null?void 0:v[f])||0)-(_?g.crossAxis:0);w<S?w=S:w>O&&(w=O)}return{[m]:p,[f]:w}}}},Yp=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=Zt(o),p=nt(o)==="y",{width:w,height:u}=i.floating;let g,b;f==="top"||f==="bottom"?(g=f,b=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,g=m==="end"?"top":"bottom");const v=u-d.top-d.bottom,k=w-d.left-d.right,_=wt(u-d[g],v),S=wt(w-d[b],k),O=!t.middlewareData.shift;let z=_,I=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=k),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(z=v),O&&!m){const U=We(d.left,0),H=We(d.right,0),C=We(d.top,0),M=We(d.bottom,0);p?I=w-2*(U!==0||H!==0?U+H:We(d.left,d.right)):z=u-2*(C!==0||M!==0?C+M:We(d.top,d.bottom))}await l({...t,availableWidth:I,availableHeight:z});const D=await s.getDimensions(a.floating);return w!==D.width||u!==D.height?{reset:{rects:!0}}:{}}}};function Cn(){return typeof window<"u"}function Gt(e){return wa(e)?(e.nodeName||"").toLowerCase():"#document"}function He(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ot(e){var t;return(t=(wa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wa(e){return Cn()?e instanceof Node||e instanceof He(e).Node:!1}function Qe(e){return Cn()?e instanceof Element||e instanceof He(e).Element:!1}function it(e){return Cn()?e instanceof HTMLElement||e instanceof He(e).HTMLElement:!1}function ya(e){return!Cn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof He(e).ShadowRoot}const qp=new Set(["inline","contents"]);function zr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=et(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!qp.has(o)}const Xp=new Set(["table","td","th"]);function Jp(e){return Xp.has(Gt(e))}const Qp=[":popover-open",":modal"];function En(e){return Qp.some(t=>{try{return e.matches(t)}catch{return!1}})}const eh=["transform","translate","scale","rotate","perspective"],th=["transform","translate","scale","rotate","perspective","filter"],rh=["paint","layout","strict","content"];function Fo(e){const t=Bo(),r=Qe(e)?et(e):e;return eh.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)||th.some(n=>(r.willChange||"").includes(n))||rh.some(n=>(r.contain||"").includes(n))}function nh(e){let t=yt(e);for(;it(t)&&!Kt(t);){if(Fo(t))return t;if(En(t))return null;t=yt(t)}return null}function Bo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const oh=new Set(["html","body","#document"]);function Kt(e){return oh.has(Gt(e))}function et(e){return He(e).getComputedStyle(e)}function Nn(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yt(e){if(Gt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ya(e)&&e.host||ot(e);return ya(t)?t.host:t}function ka(e){const t=yt(e);return Kt(t)?e.ownerDocument?e.ownerDocument.body:e.body:it(t)&&zr(t)?t:ka(t)}function jr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=ka(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=He(o);if(i){const a=Uo(s);return t.concat(s,s.visualViewport||[],zr(o)?o:[],a&&r?jr(a):[])}return t.concat(o,jr(o,[],r))}function Uo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _a(e){const t=et(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=it(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=yn(r)!==i||yn(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function $o(e){return Qe(e)?e:e.contextElement}function Yt(e){const t=$o(e);if(!it(t))return rt(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=_a(t);let s=(i?yn(r.width):r.width)/n,a=(i?yn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const ih=rt(0);function Sa(e){const t=He(e);return!Bo()||!t.visualViewport?ih:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sh(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==He(e)?!1:t}function Ot(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=$o(e);let s=rt(1);t&&(n?Qe(n)&&(s=Yt(n)):s=Yt(e));const a=sh(i,r,n)?Sa(i):rt(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=He(i),p=n&&Qe(n)?He(n):n;let w=m,u=Uo(w);for(;u&&n&&p!==w;){const g=Yt(u),b=u.getBoundingClientRect(),v=et(u),k=b.left+(u.clientLeft+parseFloat(v.paddingLeft))*g.x,_=b.top+(u.clientTop+parseFloat(v.paddingTop))*g.y;l*=g.x,c*=g.y,d*=g.x,f*=g.y,l+=k,c+=_,w=He(u),u=Uo(w)}}return Sn({width:d,height:f,x:l,y:c})}function zn(e,t){const r=Nn(e).scrollLeft;return t?t.left+r:Ot(ot(e)).left+r}function Ca(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-zn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function ah(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=ot(n),a=t?En(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=rt(1);const d=rt(0),f=it(n);if((f||!f&&!i)&&((Gt(n)!=="body"||zr(s))&&(l=Nn(n)),it(n))){const p=Ot(n);c=Yt(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const m=s&&!f&&!i?Ca(s,l):rt(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 lh(e){return Array.from(e.getClientRects())}function ch(e){const t=ot(e),r=Nn(e),n=e.ownerDocument.body,o=We(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=We(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+zn(e);const a=-r.scrollTop;return et(n).direction==="rtl"&&(s+=We(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Ea=25;function dh(e,t){const r=He(e),n=ot(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=Bo();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=zn(n);if(c<=0){const d=n.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,w=Math.abs(n.clientWidth-f.clientWidth-p);w<=Ea&&(i-=w)}else c<=Ea&&(i+=c);return{width:i,height:s,x:a,y:l}}const uh=new Set(["absolute","fixed"]);function fh(e,t){const r=Ot(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=it(e)?Yt(e):rt(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 Na(e,t,r){let n;if(t==="viewport")n=dh(e,r);else if(t==="document")n=ch(ot(e));else if(Qe(t))n=fh(t,r);else{const o=Sa(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Sn(n)}function za(e,t){const r=yt(e);return r===t||!Qe(r)||Kt(r)?!1:et(r).position==="fixed"||za(r,t)}function ph(e,t){const r=t.get(e);if(r)return r;let n=jr(e,[],!1).filter(a=>Qe(a)&&Gt(a)!=="body"),o=null;const i=et(e).position==="fixed";let s=i?yt(e):e;for(;Qe(s)&&!Kt(s);){const a=et(s),l=Fo(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&uh.has(o.position)||zr(s)&&!l&&za(e,s))?n=n.filter(d=>d!==s):o=a,s=yt(s)}return t.set(e,n),n}function hh(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?En(t)?[]:ph(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((c,d)=>{const f=Na(t,d,o);return c.top=We(f.top,c.top),c.right=wt(f.right,c.right),c.bottom=wt(f.bottom,c.bottom),c.left=We(f.left,c.left),c},Na(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mh(e){const{width:t,height:r}=_a(e);return{width:t,height:r}}function gh(e,t,r){const n=it(t),o=ot(t),i=r==="fixed",s=Ot(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=rt(0);function c(){l.x=zn(o)}if(n||!n&&!i)if((Gt(t)!=="body"||zr(o))&&(a=Nn(t)),n){const p=Ot(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!n&&o&&c();const d=o&&!n&&!i?Ca(o,a):rt(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 Wo(e){return et(e).position==="static"}function ja(e,t){if(!it(e)||et(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ot(e)===r&&(r=r.ownerDocument.body),r}function Aa(e,t){const r=He(e);if(En(e))return r;if(!it(e)){let o=yt(e);for(;o&&!Kt(o);){if(Qe(o)&&!Wo(o))return o;o=yt(o)}return r}let n=ja(e,t);for(;n&&Jp(n)&&Wo(n);)n=ja(n,t);return n&&Kt(n)&&Wo(n)&&!Fo(n)?r:n||nh(e)||r}const bh=async function(e){const t=this.getOffsetParent||Aa,r=this.getDimensions,n=await r(e.floating);return{reference:gh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function vh(e){return et(e).direction==="rtl"}const xh={convertOffsetParentRelativeRectToViewportRelativeRect:ah,getDocumentElement:ot,getClippingRect:hh,getOffsetParent:Aa,getElementRects:bh,getClientRects:lh,getDimensions:mh,getScale:Yt,isElement:Qe,isRTL:vh};function Ta(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wh(e,t){let r=null,n;const o=ot(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:p}=c;if(a||t(),!m||!p)return;const w=kn(f),u=kn(o.clientWidth-(d+m)),g=kn(o.clientHeight-(f+p)),b=kn(d),k={rootMargin:-w+"px "+-u+"px "+-g+"px "+-b+"px",threshold:We(0,wt(1,l))||1};let _=!0;function S(O){const z=O[0].intersectionRatio;if(z!==l){if(!_)return s();z?s(!1,z):n=setTimeout(()=>{s(!1,1e-7)},1e3)}z===1&&!Ta(c,e.getBoundingClientRect())&&s(),_=!1}try{r=new IntersectionObserver(S,{...k,root:o.ownerDocument})}catch{r=new IntersectionObserver(S,k)}r.observe(e)}return s(!0),i}function yh(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=$o(e),d=o||i?[...c?jr(c):[],...jr(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const f=c&&a?wh(c,r):null;let m=-1,p=null;s&&(p=new ResizeObserver(b=>{let[v]=b;v&&v.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=p)==null||k.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let w,u=l?Ot(e):null;l&&g();function g(){const b=Ot(e);u&&!Ta(u,b)&&r(),u=b,w=requestAnimationFrame(g)}return r(),()=>{var b;d.forEach(v=>{o&&v.removeEventListener("scroll",r),i&&v.removeEventListener("resize",r)}),f==null||f(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(w)}}const kh=Zp,_h=Gp,Sh=Wp,Ch=Yp,Eh=Hp,Oa=$p,Nh=Kp,zh=(e,t,r)=>{const n=new Map,o={platform:xh,...r},i={...o.platform,_c:n};return Up(e,t,{...o,platform:i})};var jh=typeof document<"u",Ah=function(){},jn=jh?N.useLayoutEffect:Ah;function An(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(!An(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)&&!An(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ia(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pa(e,t){const r=Ia(e);return Math.round(t*r)/r}function Ho(e){const t=E.useRef(e);return jn(()=>{t.current=e}),t}function Th(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]=E.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=E.useState(n);An(m,n)||p(n);const[w,u]=E.useState(null),[g,b]=E.useState(null),v=E.useCallback($=>{$!==O.current&&(O.current=$,u($))},[]),k=E.useCallback($=>{$!==z.current&&(z.current=$,b($))},[]),_=i||w,S=s||g,O=E.useRef(null),z=E.useRef(null),I=E.useRef(d),D=l!=null,U=Ho(l),H=Ho(o),C=Ho(c),M=E.useCallback(()=>{if(!O.current||!z.current)return;const $={placement:t,strategy:r,middleware:m};H.current&&($.platform=H.current),zh(O.current,z.current,$).then(V=>{const re={...V,isPositioned:C.current!==!1};y.current&&!An(I.current,re)&&(I.current=re,$r.flushSync(()=>{f(re)}))})},[m,t,r,H,C]);jn(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[c]);const y=E.useRef(!1);jn(()=>(y.current=!0,()=>{y.current=!1}),[]),jn(()=>{if(_&&(O.current=_),S&&(z.current=S),_&&S){if(U.current)return U.current(_,S,M);M()}},[_,S,M,U,D]);const L=E.useMemo(()=>({reference:O,floating:z,setReference:v,setFloating:k}),[v,k]),ee=E.useMemo(()=>({reference:_,floating:S}),[_,S]),F=E.useMemo(()=>{const $={position:r,left:0,top:0};if(!ee.floating)return $;const V=Pa(ee.floating,d.x),re=Pa(ee.floating,d.y);return a?{...$,transform:"translate("+V+"px, "+re+"px)",...Ia(ee.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:V,top:re}},[r,a,ee.floating,d.x,d.y]);return E.useMemo(()=>({...d,update:M,refs:L,elements:ee,floatingStyles:F}),[d,M,L,ee,F])}const Oh=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?Oa({element:n.current,padding:o}).fn(r):{}:n?Oa({element:n,padding:o}).fn(r):{}}}},Ih=(e,t)=>({...kh(e),options:[e,t]}),Ph=(e,t)=>({..._h(e),options:[e,t]}),Dh=(e,t)=>({...Nh(e),options:[e,t]}),Rh=(e,t)=>({...Sh(e),options:[e,t]}),Mh=(e,t)=>({...Ch(e),options:[e,t]}),Lh=(e,t)=>({...Eh(e),options:[e,t]}),Fh=(e,t)=>({...Oh(e),options:[e,t]});var Bh="Arrow",Da=E.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return h.jsx(Te.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Da.displayName=Bh;var Uh=Da;function $h(e){const[t,r]=E.useState(void 0);return Be(()=>{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 Vo="Popper",[Ra,qt]=Er(Vo),[Wh,Ma]=Ra(Vo),La=e=>{const{__scopePopper:t,children:r}=e,[n,o]=E.useState(null);return h.jsx(Wh,{scope:t,anchor:n,onAnchorChange:o,children:r})};La.displayName=Vo;var Fa="PopperAnchor",Ba=E.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=Ma(Fa,r),s=E.useRef(null),a=Oe(t,s),l=E.useRef(null);return E.useEffect(()=>{const c=l.current;l.current=(n==null?void 0:n.current)||s.current,c!==l.current&&i.onAnchorChange(l.current)}),n?null:h.jsx(Te.div,{...o,ref:a})});Ba.displayName=Fa;var Zo="PopperContent",[Hh,Vh]=Ra(Zo),Ua=E.forwardRef((e,t)=>{var X,oe,de,se,he,be;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:p="optimized",onPlaced:w,...u}=e,g=Ma(Zo,r),[b,v]=E.useState(null),k=Oe(t,_e=>v(_e)),[_,S]=E.useState(null),O=$h(_),z=(O==null?void 0:O.width)??0,I=(O==null?void 0:O.height)??0,D=n+(i!=="center"?"-"+i:""),U=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},H=Array.isArray(c)?c:[c],C=H.length>0,M={padding:U,boundary:H.filter(Gh),altBoundary:C},{refs:y,floatingStyles:L,placement:ee,isPositioned:F,middlewareData:$}=Th({strategy:"fixed",placement:D,whileElementsMounted:(..._e)=>yh(..._e,{animationFrame:p==="always"}),elements:{reference:g.anchor},middleware:[Ih({mainAxis:o+I,alignmentAxis:s}),l&&Ph({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Dh():void 0,...M}),l&&Rh({...M}),Mh({...M,apply:({elements:_e,rects:x,availableWidth:K,availableHeight:W})=>{const{width:T,height:j}=x.reference,R=_e.floating.style;R.setProperty("--radix-popper-available-width",`${K}px`),R.setProperty("--radix-popper-available-height",`${W}px`),R.setProperty("--radix-popper-anchor-width",`${T}px`),R.setProperty("--radix-popper-anchor-height",`${j}px`)}}),_&&Fh({element:_,padding:a}),Kh({arrowWidth:z,arrowHeight:I}),m&&Lh({strategy:"referenceHidden",...M})]}),[V,re]=Ha(ee),A=Tt(w);Be(()=>{F&&(A==null||A())},[F,A]);const P=(X=$.arrow)==null?void 0:X.x,Q=(oe=$.arrow)==null?void 0:oe.y,G=((de=$.arrow)==null?void 0:de.centerOffset)!==0,[te,pe]=E.useState();return Be(()=>{b&&pe(window.getComputedStyle(b).zIndex)},[b]),h.jsx("div",{ref:y.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:F?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[(se=$.transformOrigin)==null?void 0:se.x,(he=$.transformOrigin)==null?void 0:he.y].join(" "),...((be=$.hide)==null?void 0:be.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(Hh,{scope:r,placedSide:V,onArrowChange:S,arrowX:P,arrowY:Q,shouldHideArrow:G,children:h.jsx(Te.div,{"data-side":V,"data-align":re,...u,ref:k,style:{...u.style,animation:F?void 0:"none"}})})})});Ua.displayName=Zo;var $a="PopperArrow",Zh={top:"bottom",right:"left",bottom:"top",left:"right"},Wa=E.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=Vh($a,n),s=Zh[i.placedSide];return h.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:h.jsx(Uh,{...o,ref:r,style:{...o.style,display:"block"}})})});Wa.displayName=$a;function Gh(e){return e!==null}var Kh=e=>({name:"transformOrigin",options:e,fn(t){var g,b,v;const{placement:r,rects:n,middlewareData:o}=t,s=((g=o.arrow)==null?void 0:g.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=Ha(r),f={start:"0%",center:"50%",end:"100%"}[d],m=(((b=o.arrow)==null?void 0:b.x)??0)+a/2,p=(((v=o.arrow)==null?void 0:v.y)??0)+l/2;let w="",u="";return c==="bottom"?(w=s?f:`${m}px`,u=`${-l}px`):c==="top"?(w=s?f:`${m}px`,u=`${n.floating.height+l}px`):c==="right"?(w=`${-l}px`,u=s?f:`${p}px`):c==="left"&&(w=`${n.floating.width+l}px`,u=s?f:`${p}px`),{data:{x:w,y:u}}}});function Ha(e){const[t,r="center"]=e.split("-");return[t,r]}var Go=La,Tn=Ba,Ko=Ua,Yo=Wa,Yh="Portal",On=E.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[o,i]=E.useState(!1);Be(()=>i(!0),[]);const s=r||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?ht.createPortal(h.jsx(Te.div,{...n,ref:t}),s):null});On.displayName=Yh;var qh=E[" useInsertionEffect ".trim().toString()]||Be;function In({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,s]=Xh({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:o;{const d=E.useRef(e!==void 0);E.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=E.useCallback(d=>{var f;if(a){const m=Jh(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 Xh({defaultProp:e,onChange:t}){const[r,n]=E.useState(e),o=E.useRef(r),i=E.useRef(t);return qh(()=>{i.current=t},[t]),E.useEffect(()=>{var s;o.current!==r&&((s=i.current)==null||s.call(i,r),o.current=r)},[r,o]),[r,n,i]}function Jh(e){return typeof e=="function"}function Qh(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Va=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"}),em="VisuallyHidden",Za=E.forwardRef((e,t)=>h.jsx(Te.span,{...e,ref:t,style:{...Va,...e.style}}));Za.displayName=em;var tm=Za,rm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xt=new WeakMap,Pn=new WeakMap,Dn={},qo=0,Ga=function(e){return e&&(e.host||Ga(e.parentNode))},nm=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ga(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})},om=function(e,t,r,n){var o=nm(t,Array.isArray(e)?e:[e]);Dn[r]||(Dn[r]=new WeakMap);var i=Dn[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 p=m.getAttribute(n),w=p!==null&&p!=="false",u=(Xt.get(m)||0)+1,g=(i.get(m)||0)+1;Xt.set(m,u),i.set(m,g),s.push(m),u===1&&w&&Pn.set(m,!0),g===1&&m.setAttribute(r,"true"),w||m.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return d(t),a.clear(),qo++,function(){s.forEach(function(f){var m=Xt.get(f)-1,p=i.get(f)-1;Xt.set(f,m),i.set(f,p),m||(Pn.has(f)||f.removeAttribute(n),Pn.delete(f)),p||f.removeAttribute(r)}),qo--,qo||(Xt=new WeakMap,Xt=new WeakMap,Pn=new WeakMap,Dn={})}},Ka=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=rm(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),om(n,o,r,"aria-hidden")):function(){return null}},st=function(){return st=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},st.apply(this,arguments)};function Ya(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 im(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 Rn="right-scroll-bar-position",Mn="width-before-scroll-bar",sm="with-scroll-bars-hidden",am="--removed-body-scroll-bar-size";function Xo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lm(e,t){var r=N.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 cm=typeof window<"u"?E.useLayoutEffect:E.useEffect,qa=new WeakMap;function dm(e,t){var r=lm(null,function(n){return e.forEach(function(o){return Xo(o,n)})});return cm(function(){var n=qa.get(r);if(n){var o=new Set(n),i=new Set(e),s=r.current;o.forEach(function(a){i.has(a)||Xo(a,null)}),i.forEach(function(a){o.has(a)||Xo(a,s)})}qa.set(r,e)},[e]),r}function um(e){return e}function fm(e,t){t===void 0&&(t=um);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 pm(e){e===void 0&&(e={});var t=fm(null);return t.options=st({async:!0,ssr:!1},e),t}var Xa=function(e){var t=e.sideCar,r=Ya(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 E.createElement(n,st({},r))};Xa.isSideCarExport=!0;function hm(e,t){return e.useMedium(t),Xa}var Ja=pm(),Jo=function(){},Ln=E.forwardRef(function(e,t){var r=E.useRef(null),n=E.useState({onScrollCapture:Jo,onWheelCapture:Jo,onTouchMoveCapture:Jo}),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,p=e.noRelative,w=e.noIsolation,u=e.inert,g=e.allowPinchZoom,b=e.as,v=b===void 0?"div":b,k=e.gapMode,_=Ya(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,O=dm([r,t]),z=st(st({},_),o);return E.createElement(E.Fragment,null,d&&E.createElement(S,{sideCar:Ja,removeScrollBar:c,shards:f,noRelative:p,noIsolation:w,inert:u,setCallbacks:i,allowPinchZoom:!!g,lockRef:r,gapMode:k}),s?E.cloneElement(E.Children.only(a),st(st({},z),{ref:O})):E.createElement(v,st({},z,{className:l,ref:O}),a))});Ln.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ln.classNames={fullWidth:Mn,zeroRight:Rn};var mm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mm();return t&&e.setAttribute("nonce",t),e}function bm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xm=function(){var e=0,t=null;return{add:function(r){e==0&&(t=gm())&&(bm(t,r),vm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wm=function(){var e=xm();return function(t,r){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Qa=function(){var e=wm(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},ym={left:0,top:0,right:0,gap:0},Qo=function(e){return parseInt(e||"",10)||0},km=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[Qo(r),Qo(n),Qo(o)]},_m=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ym;var t=km(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])}},Sm=Qa(),Jt="data-scroll-locked",Cm=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(sm,` {
|
|
214
214
|
overflow: hidden `).concat(n,`;
|
|
215
|
-
padding-right: `).concat(
|
|
215
|
+
padding-right: `).concat(a,"px ").concat(n,`;
|
|
216
216
|
}
|
|
217
|
-
body[`).concat(
|
|
217
|
+
body[`).concat(Jt,`] {
|
|
218
218
|
overflow: hidden `).concat(n,`;
|
|
219
219
|
overscroll-behavior: contain;
|
|
220
220
|
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
221
221
|
padding-left: `.concat(o,`px;
|
|
222
222
|
padding-top: `).concat(i,`px;
|
|
223
|
-
padding-right: `).concat(
|
|
223
|
+
padding-right: `).concat(s,`px;
|
|
224
224
|
margin-left:0;
|
|
225
225
|
margin-top:0;
|
|
226
|
-
margin-right: `).concat(
|
|
227
|
-
`),r==="padding"&&"padding-right: ".concat(
|
|
226
|
+
margin-right: `).concat(a,"px ").concat(n,`;
|
|
227
|
+
`),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
.`).concat(
|
|
231
|
-
right: `).concat(
|
|
230
|
+
.`).concat(Rn,` {
|
|
231
|
+
right: `).concat(a,"px ").concat(n,`;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.`).concat(
|
|
235
|
-
margin-right: `).concat(
|
|
234
|
+
.`).concat(Mn,` {
|
|
235
|
+
margin-right: `).concat(a,"px ").concat(n,`;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
.`).concat(
|
|
238
|
+
.`).concat(Rn," .").concat(Rn,` {
|
|
239
239
|
right: 0 `).concat(n,`;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
.`).concat(
|
|
242
|
+
.`).concat(Mn," .").concat(Mn,` {
|
|
243
243
|
margin-right: 0 `).concat(n,`;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
body[`).concat(
|
|
247
|
-
`).concat(
|
|
246
|
+
body[`).concat(Jt,`] {
|
|
247
|
+
`).concat(am,": ").concat(a,`px;
|
|
248
248
|
}
|
|
249
|
-
`)}
|
|
249
|
+
`)},el=function(){var e=parseInt(document.body.getAttribute(Jt)||"0",10);return isFinite(e)?e:0},Em=function(){E.useEffect(function(){return document.body.setAttribute(Jt,(el()+1).toString()),function(){var e=el()-1;e<=0?document.body.removeAttribute(Jt):document.body.setAttribute(Jt,e.toString())}},[])},Nm=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Em();var i=E.useMemo(function(){return _m(o)},[o]);return E.createElement(Sm,{styles:Cm(i,!t,o,r?"":"!important")})},ei=!1;if(typeof window<"u")try{var Fn=Object.defineProperty({},"passive",{get:function(){return ei=!0,!0}});window.addEventListener("test",Fn,Fn),window.removeEventListener("test",Fn,Fn)}catch{ei=!1}var Qt=ei?{passive:!1}:!1,zm=function(e){return e.tagName==="TEXTAREA"},tl=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!zm(e)&&r[t]==="visible")},jm=function(e){return tl(e,"overflowY")},Am=function(e){return tl(e,"overflowX")},rl=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=nl(e,n);if(o){var i=ol(e,n),s=i[1],a=i[2];if(s>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Tm=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Om=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},nl=function(e,t){return e==="v"?jm(t):Am(t)},ol=function(e,t){return e==="v"?Tm(t):Om(t)},Im=function(e,t){return e==="h"&&t==="rtl"?-1:1},Pm=function(e,t,r,n,o){var i=Im(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 p=ol(e,a),w=p[0],u=p[1],g=p[2],b=u-g-i*w;(w||b)&&nl(e,a)&&(f+=b,m+=w);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}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},Bn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},il=function(e){return[e.deltaX,e.deltaY]},sl=function(e){return e&&"current"in e?e.current:e},Dm=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Rm=function(e){return`
|
|
250
250
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
251
251
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
252
|
-
`)},vm=0,qt=[];function xm(e){var t=E.useRef([]),r=E.useRef([0,0]),n=E.useRef(),o=E.useState(vm++)[0],i=E.useState(Us)[0],a=E.useRef(e);E.useEffect(function(){a.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Bh([e.lockRef.current],(e.shards||[]).map(Ks),!0).filter(Boolean);return p.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=E.useCallback(function(p,b){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var m=zn(p),x=r.current,k="deltaX"in p?p.deltaX:x[0]-m[0],_="deltaY"in p?p.deltaY:x[1]-m[1],S,O=p.target,j=Math.abs(k)>Math.abs(_)?"h":"v";if("touches"in p&&j==="h"&&O.type==="range")return!1;var I=window.getSelection(),R=I&&I.anchorNode,$=R?R===O||R.contains(O):!1;if($)return!1;var F=Hs(j,O);if(!F)return!0;if(F?S=j:(S=j==="v"?"h":"v",F=Hs(j,O)),!F)return!1;if(!n.current&&"changedTouches"in p&&(k||_)&&(n.current=S),!S)return!0;var C=n.current||S;return mm(C,b,p,C==="h"?k:_)},[]),l=E.useCallback(function(p){var b=p;if(!(!qt.length||qt[qt.length-1]!==i)){var m="deltaY"in b?Gs(b):zn(b),x=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&gm(S.delta,m)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var k=(a.current.shards||[]).map(Ks).filter(Boolean).filter(function(S){return S.contains(b.target)}),_=k.length>0?s(b,k[0]):!a.current.noIsolation;_&&b.cancelable&&b.preventDefault()}}},[]),c=E.useCallback(function(p,b,m,x){var k={name:p,delta:b,target:m,should:x,shadowParent:wm(m)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(_){return _!==k})},1)},[]),d=E.useCallback(function(p){r.current=zn(p),n.current=void 0},[]),u=E.useCallback(function(p){c(p.type,Gs(p),p.target,s(p,e.lockRef.current))},[]),g=E.useCallback(function(p){c(p.type,zn(p),p.target,s(p,e.lockRef.current))},[]);E.useEffect(function(){return qt.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:g}),document.addEventListener("wheel",l,Yt),document.addEventListener("touchmove",l,Yt),document.addEventListener("touchstart",d,Yt),function(){qt=qt.filter(function(p){return p!==i}),document.removeEventListener("wheel",l,Yt),document.removeEventListener("touchmove",l,Yt),document.removeEventListener("touchstart",d,Yt)}},[]);var f=e.removeScrollBar,w=e.inert;return E.createElement(E.Fragment,null,w?E.createElement(i,{styles:bm(o)}):null,f?E.createElement(lm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function wm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ym=Yh(Bs,xm);var Ho=E.forwardRef(function(e,t){return E.createElement(En,it({},e,{ref:t,sideCar:ym}))});Ho.classNames=En.classNames;var km=[" ","Enter","ArrowUp","ArrowDown"],_m=[" ","Enter"],Tt="Select",[An,jn,Sm]=$f(Tt),[Xt]=xr(Tt,[Sm,Zt]),Tn=Zt(),[Cm,yt]=Xt(Tt),[Em,Nm]=Xt(Tt),Ys=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:c,name:d,autoComplete:u,disabled:g,required:f,form:w}=e,p=Tn(t),[b,m]=E.useState(null),[x,k]=E.useState(null),[_,S]=E.useState(!1),O=Hf(c),[j,I]=yn({prop:n,defaultProp:o??!1,onChange:i,caller:Tt}),[R,$]=yn({prop:a,defaultProp:s,onChange:l,caller:Tt}),F=E.useRef(null),C=b?w||!!b.closest("form"):!0,[M,y]=E.useState(new Set),B=Array.from(M).map(re=>re.props.value).join(";");return h.jsx(Ro,{...p,children:h.jsxs(Cm,{required:f,scope:t,trigger:b,onTriggerChange:m,valueNode:x,onValueNodeChange:k,valueNodeHasChildren:_,onValueNodeHasChildrenChange:S,contentId:wr(),value:R,onValueChange:$,open:j,onOpenChange:I,dir:O,triggerPointerDownPosRef:F,disabled:g,children:[h.jsx(An.Provider,{scope:t,children:h.jsx(Em,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(re=>{y(W=>new Set(W).add(re))},[]),onNativeOptionRemove:E.useCallback(re=>{y(W=>{const H=new Set(W);return H.delete(re),H})},[]),children:r})}),C?h.jsxs(ml,{"aria-hidden":!0,required:f,tabIndex:-1,name:d,autoComplete:u,value:R,onChange:re=>$(re.target.value),disabled:g,form:w,children:[R===void 0?h.jsx("option",{value:""}):null,Array.from(M)]},B):null]})})};Ys.displayName=Tt;var qs="SelectTrigger",Xs=E.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=Tn(r),a=yt(qs,r),s=a.disabled||n,l=je(t,a.onTriggerChange),c=jn(r),d=E.useRef("touch"),[u,g,f]=bl(p=>{const b=c().filter(k=>!k.disabled),m=b.find(k=>k.value===a.value),x=vl(b,p,m);x!==void 0&&a.onValueChange(x.value)}),w=p=>{s||(a.onOpenChange(!0),f()),p&&(a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return h.jsx(xn,{asChild:!0,...i,children:h.jsx(Ae.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":gl(a.value)?"":void 0,...o,ref:l,onClick:Ee(o.onClick,p=>{p.currentTarget.focus(),d.current!=="mouse"&&w(p)}),onPointerDown:Ee(o.onPointerDown,p=>{d.current=p.pointerType;const b=p.target;b.hasPointerCapture(p.pointerId)&&b.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(w(p),p.preventDefault())}),onKeyDown:Ee(o.onKeyDown,p=>{const b=u.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&g(p.key),!(b&&p.key===" ")&&km.includes(p.key)&&(w(),p.preventDefault())})})})});Xs.displayName=qs;var Js="SelectValue",Qs=E.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...s}=e,l=yt(Js,r),{onValueNodeHasChildrenChange:c}=l,d=i!==void 0,u=je(t,l.onValueNodeChange);return Le(()=>{c(d)},[c,d]),h.jsx(Ae.span,{...s,ref:u,style:{pointerEvents:"none"},children:gl(l.value)?h.jsx(h.Fragment,{children:a}):i})});Qs.displayName=Js;var zm="SelectIcon",el=E.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return h.jsx(Ae.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});el.displayName=zm;var Am="SelectPortal",tl=e=>h.jsx(wn,{asChild:!0,...e});tl.displayName=Am;var Ot="SelectContent",rl=E.forwardRef((e,t)=>{const r=yt(Ot,e.__scopeSelect),[n,o]=E.useState();if(Le(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?Pr.createPortal(h.jsx(nl,{scope:e.__scopeSelect,children:h.jsx(An.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),i):null}return h.jsx(ol,{...e,ref:t})});rl.displayName=Ot;var et=10,[nl,kt]=Xt(Ot),jm="SelectContentImpl",Tm=Ut("SelectContent.RemoveScroll"),ol=E.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:g,collisionPadding:f,sticky:w,hideWhenDetached:p,avoidCollisions:b,...m}=e,x=yt(Ot,r),[k,_]=E.useState(null),[S,O]=E.useState(null),j=je(t,J=>_(J)),[I,R]=E.useState(null),[$,F]=E.useState(null),C=jn(r),[M,y]=E.useState(!1),B=E.useRef(!1);E.useEffect(()=>{if(k)return Rs(k)},[k]),Ka();const re=E.useCallback(J=>{const[se,...de]=C().map(me=>me.ref.current),[ie]=de.slice(-1),fe=document.activeElement;for(const me of J)if(me===fe||(me==null||me.scrollIntoView({block:"nearest"}),me===se&&S&&(S.scrollTop=0),me===ie&&S&&(S.scrollTop=S.scrollHeight),me==null||me.focus(),document.activeElement!==fe))return},[C,S]),W=E.useCallback(()=>re([I,k]),[re,I,k]);E.useEffect(()=>{M&&W()},[M,W]);const{onOpenChange:H,triggerPointerDownPosRef:Z}=x;E.useEffect(()=>{if(k){let J={x:0,y:0};const se=ie=>{var fe,me;J={x:Math.abs(Math.round(ie.pageX)-(((fe=Z.current)==null?void 0:fe.x)??0)),y:Math.abs(Math.round(ie.pageY)-(((me=Z.current)==null?void 0:me.y)??0))}},de=ie=>{J.x<=10&&J.y<=10?ie.preventDefault():k.contains(ie.target)||H(!1),document.removeEventListener("pointermove",se),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",se),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",se),document.removeEventListener("pointerup",de,{capture:!0})}}},[k,H,Z]),E.useEffect(()=>{const J=()=>H(!1);return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[H]);const[oe,N]=bl(J=>{const se=C().filter(fe=>!fe.disabled),de=se.find(fe=>fe.ref.current===document.activeElement),ie=vl(se,J,de);ie&&setTimeout(()=>ie.ref.current.focus())}),P=E.useCallback((J,se,de)=>{const ie=!B.current&&!de;(x.value!==void 0&&x.value===se||ie)&&(R(J),ie&&(B.current=!0))},[x.value]),ee=E.useCallback(()=>k==null?void 0:k.focus(),[k]),K=E.useCallback((J,se,de)=>{const ie=!B.current&&!de;(x.value!==void 0&&x.value===se||ie)&&F(J)},[x.value]),Q=n==="popper"?Vo:il,ue=Q===Vo?{side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:g,collisionPadding:f,sticky:w,hideWhenDetached:p,avoidCollisions:b}:{};return h.jsx(nl,{scope:r,content:k,viewport:S,onViewportChange:O,itemRefCallback:P,selectedItem:I,onItemLeave:ee,itemTextRefCallback:K,focusSelectedItem:W,selectedItemText:$,position:n,isPositioned:M,searchRef:oe,children:h.jsx(Ho,{as:Tm,allowPinchZoom:!0,children:h.jsx(ko,{asChild:!0,trapped:x.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:Ee(o,J=>{var se;(se=x.trigger)==null||se.focus({preventScroll:!0}),J.preventDefault()}),children:h.jsx(ln,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:h.jsx(Q,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:J=>J.preventDefault(),...m,...ue,onPlaced:()=>y(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:Ee(m.onKeyDown,J=>{const se=J.ctrlKey||J.altKey||J.metaKey;if(J.key==="Tab"&&J.preventDefault(),!se&&J.key.length===1&&N(J.key),["ArrowUp","ArrowDown","Home","End"].includes(J.key)){let ie=C().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);if(["ArrowUp","End"].includes(J.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(J.key)){const fe=J.target,me=ie.indexOf(fe);ie=ie.slice(me+1)}setTimeout(()=>re(ie)),J.preventDefault()}})})})})})})});ol.displayName=jm;var Om="SelectItemAlignedPosition",il=E.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=yt(Ot,r),a=kt(Ot,r),[s,l]=E.useState(null),[c,d]=E.useState(null),u=je(t,j=>d(j)),g=jn(r),f=E.useRef(!1),w=E.useRef(!0),{viewport:p,selectedItem:b,selectedItemText:m,focusSelectedItem:x}=a,k=E.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&c&&p&&b&&m){const j=i.trigger.getBoundingClientRect(),I=c.getBoundingClientRect(),R=i.valueNode.getBoundingClientRect(),$=m.getBoundingClientRect();if(i.dir!=="rtl"){const fe=$.left-I.left,me=R.left-fe,ye=j.left-me,v=j.width+ye,Y=Math.max(v,I.width),V=window.innerWidth-et,T=Ba(me,[et,Math.max(et,V-Y)]);s.style.minWidth=v+"px",s.style.left=T+"px"}else{const fe=I.right-$.right,me=window.innerWidth-R.right-fe,ye=window.innerWidth-j.right-me,v=j.width+ye,Y=Math.max(v,I.width),V=window.innerWidth-et,T=Ba(me,[et,Math.max(et,V-Y)]);s.style.minWidth=v+"px",s.style.right=T+"px"}const F=g(),C=window.innerHeight-et*2,M=p.scrollHeight,y=window.getComputedStyle(c),B=parseInt(y.borderTopWidth,10),re=parseInt(y.paddingTop,10),W=parseInt(y.borderBottomWidth,10),H=parseInt(y.paddingBottom,10),Z=B+re+M+H+W,oe=Math.min(b.offsetHeight*5,Z),N=window.getComputedStyle(p),P=parseInt(N.paddingTop,10),ee=parseInt(N.paddingBottom,10),K=j.top+j.height/2-et,Q=C-K,ue=b.offsetHeight/2,J=b.offsetTop+ue,se=B+re+J,de=Z-se;if(se<=K){const fe=F.length>0&&b===F[F.length-1].ref.current;s.style.bottom="0px";const me=c.clientHeight-p.offsetTop-p.offsetHeight,ye=Math.max(Q,ue+(fe?ee:0)+me+W),v=se+ye;s.style.height=v+"px"}else{const fe=F.length>0&&b===F[0].ref.current;s.style.top="0px";const ye=Math.max(K,B+p.offsetTop+(fe?P:0)+ue)+de;s.style.height=ye+"px",p.scrollTop=se-K+p.offsetTop}s.style.margin=`${et}px 0`,s.style.minHeight=oe+"px",s.style.maxHeight=C+"px",n==null||n(),requestAnimationFrame(()=>f.current=!0)}},[g,i.trigger,i.valueNode,s,c,p,b,m,i.dir,n]);Le(()=>k(),[k]);const[_,S]=E.useState();Le(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const O=E.useCallback(j=>{j&&w.current===!0&&(k(),x==null||x(),w.current=!1)},[k,x]);return h.jsx(Pm,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:f,onScrollButtonChange:O,children:h.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:h.jsx(Ae.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});il.displayName=Om;var Im="SelectPopperPosition",Vo=E.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=et,...i}=e,a=Tn(r);return h.jsx(Mo,{...a,...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)"}})});Vo.displayName=Im;var[Pm,Zo]=Xt(Ot,{}),Go="SelectViewport",al=E.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=kt(Go,r),a=Zo(Go,r),s=je(t,i.onViewportChange),l=E.useRef(0);return h.jsxs(h.Fragment,{children:[h.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}),h.jsx(An.Slot,{scope:r,children:h.jsx(Ae.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Ee(o.onScroll,c=>{const d=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:g}=a;if(g!=null&&g.current&&u){const f=Math.abs(l.current-d.scrollTop);if(f>0){const w=window.innerHeight-et*2,p=parseFloat(u.style.minHeight),b=parseFloat(u.style.height),m=Math.max(p,b);if(m<w){const x=m+f,k=Math.min(w,x),_=x-k;u.style.height=k+"px",u.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,u.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});al.displayName=Go;var sl="SelectGroup",[Dm,Rm]=Xt(sl),Mm=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=wr();return h.jsx(Dm,{scope:r,id:o,children:h.jsx(Ae.div,{role:"group","aria-labelledby":o,...n,ref:t})})});Mm.displayName=sl;var ll="SelectLabel",Lm=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Rm(ll,r);return h.jsx(Ae.div,{id:o.id,...n,ref:t})});Lm.displayName=ll;var On="SelectItem",[Fm,cl]=Xt(On),dl=E.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...a}=e,s=yt(On,r),l=kt(On,r),c=s.value===n,[d,u]=E.useState(i??""),[g,f]=E.useState(!1),w=je(t,x=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,x,n,o)}),p=wr(),b=E.useRef("touch"),m=()=>{o||(s.onValueChange(n),s.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 h.jsx(Fm,{scope:r,value:n,disabled:o,textId:p,isSelected:c,onItemTextChange:E.useCallback(x=>{u(k=>k||((x==null?void 0:x.textContent)??"").trim())},[]),children:h.jsx(An.ItemSlot,{scope:r,value:n,disabled:o,textValue:d,children:h.jsx(Ae.div,{role:"option","aria-labelledby":p,"data-highlighted":g?"":void 0,"aria-selected":c&&g,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:w,onFocus:Ee(a.onFocus,()=>f(!0)),onBlur:Ee(a.onBlur,()=>f(!1)),onClick:Ee(a.onClick,()=>{b.current!=="mouse"&&m()}),onPointerUp:Ee(a.onPointerUp,()=>{b.current==="mouse"&&m()}),onPointerDown:Ee(a.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:Ee(a.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:Ee(a.onPointerLeave,x=>{var k;x.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:Ee(a.onKeyDown,x=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&x.key===" "||(_m.includes(x.key)&&m(),x.key===" "&&x.preventDefault())})})})})});dl.displayName=On;var _r="SelectItemText",ul=E.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,a=yt(_r,r),s=kt(_r,r),l=cl(_r,r),c=Nm(_r,r),[d,u]=E.useState(null),g=je(t,m=>u(m),l.onItemTextChange,m=>{var x;return(x=s.itemTextRefCallback)==null?void 0:x.call(s,m,l.value,l.disabled)}),f=d==null?void 0:d.textContent,w=E.useMemo(()=>h.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value),[l.disabled,l.value,f]),{onNativeOptionAdd:p,onNativeOptionRemove:b}=c;return Le(()=>(p(w),()=>b(w)),[p,b,w]),h.jsxs(h.Fragment,{children:[h.jsx(Ae.span,{id:l.textId,...i,ref:g}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Pr.createPortal(i.children,a.valueNode):null]})});ul.displayName=_r;var fl="SelectItemIndicator",pl=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return cl(fl,r).isSelected?h.jsx(Ae.span,{"aria-hidden":!0,...n,ref:t}):null});pl.displayName=fl;var Ko="SelectScrollUpButton",Bm=E.forwardRef((e,t)=>{const r=kt(Ko,e.__scopeSelect),n=Zo(Ko,e.__scopeSelect),[o,i]=E.useState(!1),a=je(t,n.onScrollButtonChange);return Le(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollTop>0;i(c)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),o?h.jsx(hl,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});Bm.displayName=Ko;var Yo="SelectScrollDownButton",Um=E.forwardRef((e,t)=>{const r=kt(Yo,e.__scopeSelect),n=Zo(Yo,e.__scopeSelect),[o,i]=E.useState(!1),a=je(t,n.onScrollButtonChange);return Le(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;i(d)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),o?h.jsx(hl,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});Um.displayName=Yo;var hl=E.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=kt("SelectScrollButton",r),a=E.useRef(null),s=jn(r),l=E.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return E.useEffect(()=>()=>l(),[l]),Le(()=>{var d;const c=s().find(u=>u.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),h.jsx(Ae.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ee(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:Ee(o.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:Ee(o.onPointerLeave,()=>{l()})})}),$m="SelectSeparator",Wm=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return h.jsx(Ae.div,{"aria-hidden":!0,...n,ref:t})});Wm.displayName=$m;var qo="SelectArrow",Hm=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Tn(r),i=yt(qo,r),a=kt(qo,r);return i.open&&a.position==="popper"?h.jsx(Lo,{...o,...n,ref:t}):null});Hm.displayName=qo;var Vm="SelectBubbleInput",ml=E.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=E.useRef(null),i=je(n,o),a=Ph(t);return E.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&d){const u=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(u)}},[a,t]),h.jsx(Ae.select,{...r,style:{...Is,...r.style},ref:i,defaultValue:t})});ml.displayName=Vm;function gl(e){return e===""||e===void 0}function bl(e){const t=At(e),r=E.useRef(""),n=E.useRef(0),o=E.useCallback(a=>{const s=r.current+a;t(s),(function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),i=E.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return E.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 a=Zm(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==r));const l=a.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function Zm(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Gm=Ys,xl=Xs,Km=Qs,Ym=el,qm=tl,wl=rl,Xm=al,yl=dl,Jm=ul,Qm=pl;const eg=Gm,tg=Km,kl=E.forwardRef(({className:e,children:t,...r},n)=>h.jsxs(xl,{ref:n,className:ve("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,h.jsx(Ym,{asChild:!0,children:h.jsx($r,{className:"h-3 w-3 shrink-0 text-zinc-400",strokeWidth:2})})]}));kl.displayName=xl.displayName;const _l=E.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>h.jsx(qm,{children:h.jsx(wl,{ref:o,className:ve("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:h.jsx(Xm,{className:ve("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));_l.displayName=wl.displayName;const Sl=E.forwardRef(({className:e,children:t,...r},n)=>h.jsxs(yl,{ref:n,className:ve("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:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(Qm,{children:h.jsx(qn,{className:"h-3 w-3",strokeWidth:2})})}),h.jsx(Jm,{children:t})]}));Sl.displayName=yl.displayName;const Cl=E.createContext(null);function El(){const e=E.useContext(Cl);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]=E.useState(!1),i=e!==void 0,a=i?e:n,s=E.useCallback(c=>{i||o(c),t==null||t(c)},[i,t]),l=E.useMemo(()=>({open:a,onOpenChange:s}),[a,s]);return h.jsx(Cl.Provider,{value:l,children:r})}function rg({asChild:e,children:t}){const{onOpenChange:r}=El(),n=E.Children.only(t);return e&&E.isValidElement(n)?E.cloneElement(n,{onClick:o=>{var i,a;(a=(i=n.props).onClick)==null||a.call(i,o),r(!0)}}):h.jsx("button",{type:"button",onClick:()=>r(!0),children:t})}function zl({className:e,children:t,preventCloseOnBackdropClick:r,...n}){const{open:o,onOpenChange:i}=El();if(E.useEffect(()=>{const s=l=>{l.key==="Escape"&&i(!1)};return o&&(document.addEventListener("keydown",s),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",s),document.body.style.overflow=""}},[o,i]),!o)return null;const a=s=>{s.preventDefault(),s.stopPropagation()};return pt.createPortal(h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:a,onDrop:a}),h.jsx("div",{role:"dialog","aria-modal":!0,className:ve("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:s=>s.stopPropagation(),...n,children:t})]}),document.body)}function Al({className:e,...t}){return h.jsx("div",{className:ve("flex flex-col gap-1.5 pb-4",e),...t})}function ng({className:e,...t}){return h.jsx("div",{className:ve("flex justify-end gap-2 pt-4",e),...t})}function jl({className:e,...t}){return h.jsx("h2",{className:ve("text-sm font-semibold text-white",e),...t})}function Tl({className:e,...t}){return h.jsx("p",{className:ve("text-xs text-zinc-400",e),...t})}const We=E.forwardRef(({className:e,variant:t="default",size:r="default",asChild:n=!1,...o},i)=>{const a="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",s={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?Rf:"button";return h.jsx(c,{ref:i,type:"button",className:ve(a,s[t],l[r],e),...o})});We.displayName="Button";const og=["library","upload","url"];function ig({library:e,selectedId:t,onSelect:r}){const[n,o]=z.useState(""),[i,a]=z.useState("all"),s=["all",...new Set(e.flatMap(c=>c.tags??[]))],l=e.filter(c=>{const d=i==="all"||(c.tags??[]).includes(i),u=!n||(c.alt??"").toLowerCase().includes(n.toLowerCase());return d&&u});return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"relative",children:[h.jsx(zd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),h.jsx(bo,{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"})]}),h.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.map(c=>h.jsx("button",{type:"button",onClick:()=>a(c),className:ve("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?h.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 h.jsxs("button",{type:"button",onClick:()=>r(d?null:c.id),className:ve("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:[h.jsx("img",{src:c.url,alt:c.alt,loading:"lazy",className:ve("w-full h-full object-cover transition-[filter] duration-150",d?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),h.jsx("div",{className:ve("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:h.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:c.alt})}),d&&h.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:h.jsx(qn,{size:14,className:"text-white"})})]},c.id)})}):h.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 ag({preview:e,onPreviewChange:t,onAssetUpload:r}){const[n,o]=z.useState(!1),i=z.useRef(null),a=z.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 g=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:g==null?void 0:g.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),t({name:d.name,size:d.size,dataUrl:g})}catch{const g=new FileReader;g.onload=f=>{var w;t({name:d.name,size:d.size,dataUrl:(w=f.target)==null?void 0:w.result})},g.readAsDataURL(d)}return}const u=new FileReader;u.onload=g=>{var f;t({name:d.name,size:d.size,dataUrl:(f=g.target)==null?void 0:f.result})},u.readAsDataURL(d)},[t,r]),s=z.useCallback(d=>{var g,f;d.preventDefault(),d.stopPropagation(),o(!1);const u=(f=(g=d.dataTransfer)==null?void 0:g.files)==null?void 0:f[0];u&&a(u)},[a]),l=z.useCallback(d=>{d.preventDefault(),d.stopPropagation(),o(!0)},[]),c=z.useCallback(d=>{var g;const u=(g=d.target.files)==null?void 0:g[0];u&&a(u)},[a]);return h.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:d=>{d.preventDefault(),d.stopPropagation(),o(!1)},onDrop:s,onClick:()=>{var d;return!e&&((d=i.current)==null?void 0:d.click())},className:ve("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?h.jsxs(h.Fragment,{children:[h.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),h.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:[h.jsxs("div",{children:[h.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),h.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),h.jsx(We,{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:h.jsx(Hr,{size:14})})]})]}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:h.jsx(qi,{size:22})}),h.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),h.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),h.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),h.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:c})]})}function sg({urlPreview:e,onUrlPreviewChange:t}){const[r,n]=z.useState(""),[o,i]=z.useState(!1),a=()=>{if(r.trim())try{new URL(r),t(r),i(!1)}catch{i(!0),t(null)}};return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx(zt,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(bo,{value:r,onChange:s=>{n(s.target.value),i(!1)},onKeyDown:s=>s.key==="Enter"&&a(),placeholder:"https://images.unsplash.com/photo-...",className:ve("h-8 text-xs bg-zinc-900/50 border-zinc-800",o&&"border-red-500/50")}),h.jsx(We,{type:"button",variant:"outline",onClick:a,className:"shrink-0 h-8",children:"Anteprima"})]}),o&&h.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?h.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[h.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),t(null)}}),h.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[h.jsx(qn,{size:14,className:"text-emerald-400"}),h.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):o?null:h.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[h.jsx(Ki,{size:32,className:"mb-3 opacity-40"}),h.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const lg=({open:e,onOpenChange:t,onSelect:r})=>{const{assets:n}=sr(),o=(n==null?void 0:n.assetsManifest)??[],[i,a]=z.useState("library"),[s,l]=z.useState(null),[c,d]=z.useState(null),[u,g]=z.useState(null);z.useEffect(()=>{e&&(a("library"),l(null),d(null),g(null))},[e]),z.useEffect(()=>{if(!e||i!=="upload")return;const m=()=>{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",m),()=>window.removeEventListener("beforeunload",m)},[e,i]),z.useEffect(()=>{if(!e||i!=="upload")return;const m=k=>{k.preventDefault()},x={capture:!0};return document.addEventListener("dragover",m,x),document.addEventListener("drop",m,x),window.addEventListener("dragover",m,x),window.addEventListener("drop",m,x),()=>{document.removeEventListener("dragover",m,x),document.removeEventListener("drop",m,x),window.removeEventListener("dragover",m,x),window.removeEventListener("drop",m,x)}},[e,i]);const f=i==="library"&&s!=null||i==="upload"&&c!=null||i==="url"&&u!=null,w=()=>{if(i==="library"&&s){const m=o.find(x=>x.id===s);m&&r({url:m.url,alt:m.alt})}else i==="upload"&&c?r({url:c.dataUrl,alt:c.name}):i==="url"&&u&&r({url:u,alt:""});setTimeout(()=>t(!1),0)},p=i==="library"&&s?"1 immagine selezionata":i==="upload"&&c?c.name:i==="url"&&u?"URL pronto":"Nessuna selezione",b=m=>{m.preventDefault(),m.stopPropagation()};return h.jsx(Nl,{open:e,onOpenChange:t,children:h.jsxs(zl,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:b,onDrop:b,children:[h.jsxs(Al,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:h.jsx(Wr,{size:18})}),h.jsxs("div",{children:[h.jsx(jl,{children:"Image Picker"}),h.jsx(Tl,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),h.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:h.jsx(Rt,{size:18})})]}),h.jsx("div",{className:"flex border-b border-zinc-800",children:og.map(m=>h.jsxs("button",{type:"button",onClick:()=>a(m),className:ve("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===m?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[m==="library"&&h.jsx(Wr,{size:14}),m==="upload"&&h.jsx(qi,{size:14}),m==="url"&&h.jsx(Ki,{size:14}),m==="library"?"Libreria":m==="upload"?"Upload":"URL"]},m))}),h.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&h.jsx(ig,{library:o,selectedId:s,onSelect:l}),i==="upload"&&h.jsx(ag,{preview:c,onPreviewChange:d,onAssetUpload:n==null?void 0:n.onAssetUpload}),i==="url"&&h.jsx(sg,{urlPreview:u,onUrlPreviewChange:g})]}),h.jsxs(ng,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[h.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:p}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(We,{type:"button",variant:"outline",size:"sm",onClick:()=>t(!1),children:"Annulla"}),h.jsx(We,{type:"button",size:"sm",disabled:!f,onClick:w,className:ve(!f&&"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}`},cg=({value:e,onChange:t,label:r="IMAGE",className:n})=>{const{tenantId:o="default"}=sr(),[i,a]=z.useState(!1),[s,l]=z.useState(!1),c=!!(e!=null&&e.url),d=e!=null&&e.url?Ol(e.url,o):"",u=f=>{t(f),a(!1)},g=f=>{f.stopPropagation(),t({url:"",alt:""})};return h.jsxs("div",{className:ve("space-y-1.5",n),children:[h.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),c?h.jsxs("div",{role:"button",tabIndex:0,onClick:()=>a(!0),onKeyDown:f=>f.key==="Enter"&&a(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:ve("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",s&&"ring-blue-500/40"),children:[h.jsx("img",{src:d,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:f=>{f.target.style.display="none"}}),h.jsx("div",{className:ve("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",s?"bg-black/50":"bg-black/0"),children:s&&h.jsxs(h.Fragment,{children:[h.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:[h.jsx(Nd,{size:13}),h.jsx("span",{children:"Cambia"})]}),h.jsx(We,{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:g,children:h.jsx(Hr,{size:13})})]})}),h.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)??""})]}):h.jsxs("button",{type:"button",onClick:()=>a(!0),className:ve("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:[h.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:h.jsx(Wr,{size:18})}),h.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),h.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),h.jsx(lg,{open:i,onOpenChange:a,onSelect:u})]})},Il=[{name:"layers",Icon:Jn},{name:"github",Icon:Cd},{name:"arrow-right",Icon:bd},{name:"box",Icon:xd},{name:"terminal",Icon:Od},{name:"chevron-right",Icon:wd},{name:"menu",Icon:Ed},{name:"x",Icon:Rt},{name:"sparkles",Icon:jd},{name:"zap",Icon:Pd}],In=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),Jt={"ui:text":({label:e,value:t,onChange:r})=>h.jsxs("div",{className:"grid w-full items-center gap-2 mb-4",children:[h.jsx(zt,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:In(e)}),h.jsx(bo,{type:"text",className:"h-9 text-[13px] bg-zinc-900/50 border-zinc-700 focus-visible:ring-blue-600",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:textarea":({label:e,value:t,onChange:r})=>h.jsxs("div",{className:"grid w-full gap-2 mb-4",children:[h.jsx(zt,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:In(e)}),h.jsx(If,{className:"min-h-[96px] text-[13px] bg-zinc-900/50 border-zinc-700 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=[]})=>h.jsxs("div",{className:"grid w-full gap-2 mb-4",children:[h.jsx(zt,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:In(e)}),h.jsxs(eg,{value:t||"",onValueChange:r,children:[h.jsx(kl,{className:"w-full h-9 text-[13px] bg-zinc-900/50 border-zinc-700 focus:ring-blue-600",children:h.jsx(tg,{placeholder:"Select..."})}),h.jsx(_l,{className:"dark",children:n.map(o=>h.jsx(Sl,{value:o,className:"text-[13px]",children:o},o))})]})]}),"ui:checkbox":({label:e,value:t,onChange:r})=>h.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2.5 rounded border border-zinc-700/60 bg-zinc-900/20",children:[h.jsx(Pf,{id:e,checked:!!t,onCheckedChange:n=>r(n===!0)}),h.jsx(zt,{htmlFor:e,className:"text-[13px] font-medium cursor-pointer select-none text-zinc-200",children:In(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 h.jsx("div",{className:"mb-4",children:h.jsx(cg,{label:e,value:n,onChange:o})})},"ui:icon-picker":({label:e,value:t,onChange:r})=>{const[n,o]=z.useState(!1),i=Il.find(a=>a.name===(t||""));return h.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[h.jsx(zt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),h.jsxs(Nl,{open:n,onOpenChange:o,children:[h.jsx(rg,{asChild:!0,children:h.jsx(We,{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?h.jsxs(h.Fragment,{children:[h.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),h.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):h.jsxs(h.Fragment,{children:[h.jsx(Wr,{size:16,className:"text-zinc-500 shrink-0"}),h.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),h.jsxs(zl,{className:"sm:max-w-[280px] p-4",children:[h.jsxs(Al,{children:[h.jsx(jl,{className:"text-sm",children:"Choose icon"}),h.jsx(Tl,{className:"text-xs",children:"Click an icon to select it."})]}),h.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:Il.map(({name:a,Icon:s})=>h.jsx("button",{type:"button",onClick:()=>{r(a),o(!1)},className:ve("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",t===a?"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:a,children:h.jsx(s,{size:20})},a))})]})]})]})}},Xo=e=>{if(e instanceof Oe.z.ZodOptional||e instanceof Oe.z.ZodDefault)return Xo(e._def.innerType);if(e instanceof Oe.z.ZodObject){const t={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(t[r]=Xo(e.shape[r]));return t}return e instanceof Oe.z.ZodArray?[]:e instanceof Oe.z.ZodString?"":e instanceof Oe.z.ZodNumber?0:e instanceof Oe.z.ZodBoolean?!1:e instanceof Oe.z.ZodEnum?e._def.values[0]:null},Pn=e=>e instanceof Oe.z.ZodOptional||e instanceof Oe.z.ZodDefault||e instanceof Oe.z.ZodNullable?Pn(e._def.innerType):e,Pl=e=>{var n;const t=e;if(typeof e.description=="string"&&e.description.length>0)return e.description;if(typeof((n=t._def)==null?void 0:n.description)=="string"&&t._def.description.length>0)return t._def.description;const r=Pn(e);return r!==e?Pl(r):null},Dn=(e,t)=>e&&!t?"opacity-10":"opacity-100",Qt=(e,t)=>e!=null&&t.toLowerCase()===e.toLowerCase(),Jo=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),Sr=({schema:e,data:t,onChange:r,keys:n,expandedItemPath:o,onSidebarExpandedItemChange:i})=>{const a=e.shape,s=n!=null?Object.keys(a).filter(u=>n.includes(u)):Object.keys(a),l=o==null?void 0:o[0],c=(l==null?void 0:l.fieldKey)??null,d=c!=null;return h.jsx("div",{className:"space-y-4",children:s.map(u=>{const g=a[u];if(!g)return null;const f=Pn(g),w=Pl(g)||"ui:text",p=t[u];if(w==="ui:editorial-markdown")return null;if(w==="ui:image-picker"&&f instanceof Oe.z.ZodObject){const _=Qt(c,u),S=Jt["ui:image-picker"]||Jt["ui:text"];return h.jsx("div",{className:`transition-opacity duration-200 ${Dn(d,_)}`,..._?{"data-jp-focused-field":u}:{},children:h.jsx(S,{label:u,value:p,onChange:O=>r({...t,[u]:O})})},u)}if(f instanceof Oe.z.ZodObject){const _=p||{},S=Qt(c,u);return h.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(d,S)}`,...S?{"data-jp-focused-field":u}:{},children:[h.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[h.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),h.jsx("h4",{className:"text-[11px] font-semibold text-zinc-300 tracking-[0.02em]",children:Jo(u)})]}),h.jsx(Sr,{schema:f,data:_,onChange:O=>r({...t,[u]:O}),expandedItemPath:o&&Qt(l==null?void 0:l.fieldKey,u)?o.slice(1):void 0})]},u)}if(f instanceof Oe.z.ZodArray){const _=Array.isArray(p)?p:[],S=Pn(f.element),O=($,F)=>{if(F<0||F>=_.length)return;const C=[..._],[M]=C.splice($,1);C.splice(F,0,M),r({...t,[u]:C})},j=Qt(c,u),R=Qt(l==null?void 0:l.fieldKey,u)?l==null?void 0:l.itemId:void 0;return h.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${Dn(d,j)}`,...j?{"data-jp-focused-field":u}:{},children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("label",{className:"text-[12px] font-semibold text-zinc-300 tracking-[0.01em]",children:[Jo(u)," (",_.length,")"]}),h.jsxs("button",{type:"button",onClick:()=>{const $=Xo(S);r({...t,[u]:[..._,$]})},className:"flex items-center gap-1 px-2.5 py-1.5 bg-blue-600/10 hover:bg-blue-600/20 text-blue-400 rounded text-[11px] font-semibold transition-colors",children:[h.jsx(Qn,{size:12})," Add Item"]})]}),h.jsx("div",{className:"space-y-2",children:_.map(($,F)=>{const C=$,M=C.id||`legacy-${F}`,y=(typeof C.title=="string"?C.title:null)||(typeof C.label=="string"?C.label:null)||(typeof C.name=="string"?C.name:null)||(typeof C.content=="string"?C.content:null)||(typeof C.text=="string"?C.text:null)||`${Jo(u)} #${F+1}`,B=R,re=String(C.id??M),W=B!=null&&String(B)===re,H=W&&o&&o.length>1?o.slice(1):void 0,Z=d&&j&&B!=null&&!W;return h.jsx(dg,{itemId:re,openItemId:B!=null?String(B):void 0,isFaded:Z,index:F,isFirst:F===0,isLast:F===_.length-1,label:y,onExpandedChange:i?oe=>i(oe?{fieldKey:u,itemId:re}:null):void 0,onRemove:()=>{const oe=_.filter((N,P)=>P!==F);r({...t,[u]:oe})},onMoveUp:()=>O(F,F-1),onMoveDown:()=>O(F,F+1),children:S instanceof Oe.z.ZodObject?h.jsx(Sr,{schema:S,data:C||{},expandedItemPath:H,onChange:oe=>{const N=[..._];N[F]=oe,r({...t,[u]:N})}}):h.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},M)})})]},u)}const b=w in Jt?w:"ui:text",m=Jt[b]||Jt["ui:text"],x=f instanceof Oe.z.ZodEnum?f._def.values:void 0,k=Qt(c,u);return h.jsx("div",{className:`transition-opacity duration-200 ${Dn(d,k)}`,...k?{"data-jp-focused-field":u}:{},children:h.jsx(m,{label:u,value:p,options:x,onChange:_=>r({...t,[u]:_})})},u)})})},dg=({itemId:e,openItemId:t,isFaded:r=!1,label:n,onExpandedChange:o,onRemove:i,onMoveUp:a,onMoveDown:s,isFirst:l,isLast:c,children:d})=>{const u=t!=null&&String(t)===String(e),[g,f]=z.useState(u);z.useEffect(()=>{t!=null&&(u&&!g&&f(!0),!u&&g&&f(!1))},[t,u,g]);const w=()=>{const b=!g;f(b),o==null||o(b)},p=u&&g;return h.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...p?{"data-jp-expanded-item":e}:{},children:[h.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[h.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:h.jsxs("button",{type:"button",onClick:w,className:"flex items-center gap-2 text-[12px] font-semibold text-zinc-200 tracking-[0.01em] truncate",children:[g?h.jsx(Xn,{size:12,className:"shrink-0"}):h.jsx($r,{size:12,className:"shrink-0"}),h.jsx("span",{className:"truncate",children:n})]})}),h.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[h.jsx("button",{type:"button",disabled:l,onClick:a,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:h.jsx(vd,{size:12})}),h.jsx("button",{type:"button",disabled:c,onClick:s,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:h.jsx(gd,{size:12})}),h.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),h.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:h.jsx(Hr,{size:12})})]})]}),g&&h.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:d})]})};function ug(e,t){return E.useReducer((r,n)=>t[r][n]??r,e)}var Cr=e=>{const{present:t,children:r}=e,n=fg(t),o=typeof r=="function"?r({present:n.isPresent}):E.Children.only(r),i=je(n.ref,pg(o));return typeof r=="function"||n.isPresent?E.cloneElement(o,{ref:i}):null};Cr.displayName="Presence";function fg(e){const[t,r]=E.useState(),n=E.useRef(null),o=E.useRef(e),i=E.useRef("none"),a=e?"mounted":"unmounted",[s,l]=ug(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=Rn(n.current);i.current=s==="mounted"?c:"none"},[s]),Le(()=>{const c=n.current,d=o.current;if(d!==e){const g=i.current,f=Rn(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&g!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Le(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,u=f=>{const p=Rn(n.current).includes(CSS.escape(f.animationName));if(f.target===t&&p&&(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)})}},g=f=>{f.target===t&&(i.current=Rn(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:E.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Rn(e){return(e==null?void 0:e.animationName)||"none"}function pg(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]=xr("Tooltip",[Zt]),Ln=Zt(),Dl="TooltipProvider",hg=700,Qo="tooltip.open",[mg,ei]=Mn(Dl),Rl=e=>{const{__scopeTooltip:t,delayDuration:r=hg,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,a=E.useRef(!0),s=E.useRef(!1),l=E.useRef(0);return E.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),h.jsx(mg,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:E.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:E.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:E.useCallback(c=>{s.current=c},[]),disableHoverableContent:o,children:i})};Rl.displayName=Dl;var Er="Tooltip",[gg,Nr]=Mn(Er),Ml=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=ei(Er,e.__scopeTooltip),c=Ln(t),[d,u]=E.useState(null),g=wr(),f=E.useRef(0),w=a??l.disableHoverableContent,p=s??l.delayDuration,b=E.useRef(!1),[m,x]=yn({prop:n,defaultProp:o??!1,onChange:j=>{j?(l.onOpen(),document.dispatchEvent(new CustomEvent(Qo))):l.onClose(),i==null||i(j)},caller:Er}),k=E.useMemo(()=>m?b.current?"delayed-open":"instant-open":"closed",[m]),_=E.useCallback(()=>{window.clearTimeout(f.current),f.current=0,b.current=!1,x(!0)},[x]),S=E.useCallback(()=>{window.clearTimeout(f.current),f.current=0,x(!1)},[x]),O=E.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{b.current=!0,x(!0),f.current=0},p)},[p,x]);return E.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),h.jsx(Ro,{...c,children:h.jsx(gg,{scope:t,contentId:g,open:m,stateAttribute:k,trigger:d,onTriggerChange:u,onTriggerEnter:E.useCallback(()=>{l.isOpenDelayedRef.current?O():_()},[l.isOpenDelayedRef,O,_]),onTriggerLeave:E.useCallback(()=>{w?S():(window.clearTimeout(f.current),f.current=0)},[S,w]),onOpen:_,onClose:S,disableHoverableContent:w,children:r})})};Ml.displayName=Er;var ti="TooltipTrigger",Ll=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Nr(ti,r),i=ei(ti,r),a=Ln(r),s=E.useRef(null),l=je(t,s,o.onTriggerChange),c=E.useRef(!1),d=E.useRef(!1),u=E.useCallback(()=>c.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),h.jsx(xn,{asChild:!0,...a,children:h.jsx(Ae.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:Ee(e.onPointerMove,g=>{g.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ee(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Ee(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:Ee(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:Ee(e.onBlur,o.onClose),onClick:Ee(e.onClick,o.onClose)})})});Ll.displayName=ti;var ri="TooltipPortal",[bg,vg]=Mn(ri,{forceMount:void 0}),Fl=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Nr(ri,t);return h.jsx(bg,{scope:t,forceMount:r,children:h.jsx(Cr,{present:r||i.open,children:h.jsx(wn,{asChild:!0,container:o,children:n})})})};Fl.displayName=ri;var er="TooltipContent",Bl=E.forwardRef((e,t)=>{const r=vg(er,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=Nr(er,e.__scopeTooltip);return h.jsx(Cr,{present:n||a.open,children:a.disableHoverableContent?h.jsx(Ul,{side:o,...i,ref:t}):h.jsx(xg,{side:o,...i,ref:t})})}),xg=E.forwardRef((e,t)=>{const r=Nr(er,e.__scopeTooltip),n=ei(er,e.__scopeTooltip),o=E.useRef(null),i=je(t,o),[a,s]=E.useState(null),{trigger:l,onClose:c}=r,d=o.current,{onPointerInTransitChange:u}=n,g=E.useCallback(()=>{s(null),u(!1)},[u]),f=E.useCallback((w,p)=>{const b=w.currentTarget,m={x:w.clientX,y:w.clientY},x=Sg(m,b.getBoundingClientRect()),k=Cg(m,x),_=Eg(p.getBoundingClientRect()),S=zg([...k,..._]);s(S),u(!0)},[u]);return E.useEffect(()=>()=>g(),[g]),E.useEffect(()=>{if(l&&d){const w=b=>f(b,d),p=b=>f(b,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",p)}}},[l,d,f,g]),E.useEffect(()=>{if(a){const w=p=>{const b=p.target,m={x:p.clientX,y:p.clientY},x=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),k=!Ng(m,a);x?g():k&&(g(),c())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,a,c,g]),h.jsx(Ul,{...e,ref:i})}),[wg,yg]=Mn(Er,{isInside:!1}),kg=Lf("TooltipContent"),Ul=E.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Nr(er,r),c=Ln(r),{onClose:d}=l;return E.useEffect(()=>(document.addEventListener(Qo,d),()=>document.removeEventListener(Qo,d)),[d]),E.useEffect(()=>{if(l.trigger){const u=g=>{const f=g.target;f!=null&&f.contains(l.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[l.trigger,d]),h.jsx(ln,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:h.jsxs(Mo,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.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:[h.jsx(kg,{children:n}),h.jsx(wg,{scope:r,isInside:!0,children:h.jsx(Rh,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Bl.displayName=er;var $l="TooltipArrow",_g=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ln(r);return yg($l,r).isInside?null:h.jsx(Lo,{...o,...n,ref:t})});_g.displayName=$l;function Sg(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 Cg(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 Eg(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 Ng(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],l=t[a],c=s.x,d=s.y,u=l.x,g=l.y;d>n!=g>n&&r<(u-c)*(n-d)/(g-d)+c&&(o=!o)}return o}function zg(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),Ag(t)}function Ag(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],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.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],a=r[r.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.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 jg=Rl,Tg=Ml,Og=Ll,Ig=Fl,Wl=Bl;const Pg=jg,zr=Tg,Ar=Og,tr=E.forwardRef(({className:e,sideOffset:t=4,...r},n)=>h.jsx(Ig,{children:h.jsx(Wl,{ref:n,sideOffset:t,className:ve("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})}));tr.displayName=Wl.displayName;var Fn="Popover",[Hl]=xr(Fn,[Zt]),jr=Zt(),[Dg,_t]=Hl(Fn),Vl=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=jr(t),l=E.useRef(null),[c,d]=E.useState(!1),[u,g]=yn({prop:n,defaultProp:o??!1,onChange:i,caller:Fn});return h.jsx(Ro,{...s,children:h.jsx(Dg,{scope:t,contentId:wr(),triggerRef:l,open:u,onOpenChange:g,onOpenToggle:E.useCallback(()=>g(f=>!f),[g]),hasCustomAnchor:c,onCustomAnchorAdd:E.useCallback(()=>d(!0),[]),onCustomAnchorRemove:E.useCallback(()=>d(!1),[]),modal:a,children:r})})};Vl.displayName=Fn;var Zl="PopoverAnchor",Rg=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=_t(Zl,r),i=jr(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=o;return E.useEffect(()=>(a(),()=>s()),[a,s]),h.jsx(xn,{...i,...n,ref:t})});Rg.displayName=Zl;var Gl="PopoverTrigger",Kl=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=_t(Gl,r),i=jr(r),a=je(t,o.triggerRef),s=h.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ql(o.open),...n,ref:a,onClick:Ee(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:h.jsx(xn,{asChild:!0,...i,children:s})});Kl.displayName=Gl;var ni="PopoverPortal",[Mg,Lg]=Hl(ni,{forceMount:void 0}),Yl=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=_t(ni,t);return h.jsx(Mg,{scope:t,forceMount:r,children:h.jsx(Cr,{present:r||i.open,children:h.jsx(wn,{asChild:!0,container:o,children:n})})})};Yl.displayName=ni;var rr="PopoverContent",ql=E.forwardRef((e,t)=>{const r=Lg(rr,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=_t(rr,e.__scopePopover);return h.jsx(Cr,{present:n||i.open,children:i.modal?h.jsx(Bg,{...o,ref:t}):h.jsx(Ug,{...o,ref:t})})});ql.displayName=rr;var Fg=Ut("PopoverContent.RemoveScroll"),Bg=E.forwardRef((e,t)=>{const r=_t(rr,e.__scopePopover),n=E.useRef(null),o=je(t,n),i=E.useRef(!1);return E.useEffect(()=>{const a=n.current;if(a)return Rs(a)},[]),h.jsx(Ho,{as:Fg,allowPinchZoom:!0,children:h.jsx(Xl,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ee(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Ee(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Ee(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),Ug=E.forwardRef((e,t)=>{const r=_t(rr,e.__scopePopover),n=E.useRef(!1),o=E.useRef(!1);return h.jsx(Xl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.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 a=i.target;((c=r.triggerRef.current)==null?void 0:c.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Xl=E.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...u}=e,g=_t(rr,r),f=jr(r);return Ka(),h.jsx(ko,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:h.jsx(ln,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>g.onOpenChange(!1),children:h.jsx(Mo,{"data-state":Ql(g.open),role:"dialog",id:g.contentId,...f,...u,ref:t,style:{...u.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",$g=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=_t(Jl,r);return h.jsx(Ae.button,{type:"button",...n,ref:t,onClick:Ee(e.onClick,()=>o.onOpenChange(!1))})});$g.displayName=Jl;var Wg="PopoverArrow",Hg=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=jr(r);return h.jsx(Lo,{...o,...n,ref:t})});Hg.displayName=Wg;function Ql(e){return e?"open":"closed"}var Vg=Vl,Zg=Kl,Gg=Yl,ec=ql;const Kg=Vg,Yg=Zg,tc=E.forwardRef(({className:e,align:t="start",sideOffset:r=6,...n},o)=>h.jsx(Gg,{children:h.jsx(ec,{ref:o,align:t,sideOffset:r,className:ve("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})}));tc.displayName=ec.displayName;const rc=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"Select page",qg=({pageSlugs:e,currentSlug:t,onPageChange:r,sectionCount:n,onNewPage:o,className:i,currentPageLabel:a})=>{const[s,l]=z.useState(!1),c=a??rc(t),d=u=>{r(u),l(!1)};return h.jsx("div",{className:ve("mx-3 mt-2 mb-2",i),children:h.jsxs(Kg,{open:s,onOpenChange:l,children:[h.jsx(Yg,{asChild:!0,children:h.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-label":`Select page, current: ${c}`,className:ve("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:[h.jsx(Sd,{size:14,className:"shrink-0 text-zinc-500","aria-hidden":!0}),h.jsx("span",{className:"text-xs font-medium flex-1 truncate",children:c}),h.jsx($r,{size:13,className:"shrink-0 text-zinc-500","aria-hidden":!0})]})}),h.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(u=>{const g=u===t,f=rc(u);return h.jsxs("button",{type:"button",role:"option","aria-selected":g,onClick:()=>d(u),className:ve("flex items-center justify-between w-full px-2.5 py-2 rounded-md text-xs transition-colors cursor-pointer",g?"bg-primary/10 text-primary font-semibold":"text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"),children:[h.jsx("span",{children:f}),n!=null&&h.jsxs("span",{className:"text-[10px] text-zinc-600 tabular-nums","aria-hidden":!0,children:[n,"s"]})]},u)}),o!=null&&h.jsx("div",{className:"border-t border-zinc-800 mt-1 pt-1",children:h.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:[h.jsx(Qn,{size:12,"aria-hidden":!0}),h.jsx("span",{children:"New page"})]})})]})]})})},oi=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),nc=new Set(["ui:editorial-markdown"]),oc=e=>e instanceof Oe.z.ZodOptional||e instanceof Oe.z.ZodDefault||e instanceof Oe.z.ZodNullable?oc(e._def.innerType):e,ii=e=>{var i;if(!e)return"";const t=e,r=typeof e.description=="string"?e.description:null;if(r)return r;const n=typeof((i=t._def)==null?void 0:i.description)=="string"?t._def.description:null;if(n)return n;const o=oc(e);return o!==e?ii(o):""},ai=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),Xg={activationConstraint:{distance:8}},Jg={activationConstraint:{delay:200,tolerance:5}};function si({layer:e,opts:t,dragHandleProps:r}){const{isSelected:n,isActive:o,isDragging:i,canDelete:a,onSelect:s,onOpenSettings:l,onDelete:c}=t,d=!!r;return h.jsxs("div",{className:ve("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?h.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:h.jsx(Gi,{size:12,className:"text-zinc-600"})}):h.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 pointer-events-none",children:h.jsx(Gi,{size:12,className:"text-zinc-600/50"})}),h.jsxs("button",{type:"button",onClick:s,className:"flex-1 min-w-0 text-left",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:ve("text-xs font-bold uppercase tracking-[0.06em] truncate",n?"text-primary":"text-zinc-500"),children:e.type}),o&&h.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),h.jsx("span",{className:"text-[11px] text-zinc-600 block truncate leading-snug mt-0.5",children:e.title??`${e.type} section`})]}),h.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[h.jsxs(zr,{children:[h.jsx(Ar,{asChild:!0,children:h.jsx(We,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-zinc-300",onClick:u=>{u.stopPropagation(),l(u)},children:h.jsx(Ad,{size:12})})}),h.jsx(tr,{children:"Settings"})]}),a&&h.jsxs(zr,{children:[h.jsx(Ar,{asChild:!0,children:h.jsx(We,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-destructive",onClick:u=>{u.stopPropagation(),c()},children:h.jsx(Hr,{size:12})})}),h.jsx(tr,{children:"Delete section"})]})]})]})}function Qg({layer:e,opts:t}){const{attributes:r,listeners:n,setNodeRef:o,transform:i,transition:a,isDragging:s}=zf({id:e.id,disabled:!t.canReorder}),l={transform:gt.Transform.toString(i),transition:a};return h.jsx("div",{ref:o,style:l,className:ve(s&&"z-10"),children:h.jsx(si,{layer:e,opts:{...t,isDragging:s},dragHandleProps:t.canReorder?{...r,...n,"aria-roledescription":"elemento trascinabile"}:void 0})})}const ic=({selectedSection:e,pageData:t,allSectionsData:r=[],onUpdate:n,onUpdateSection:o,onClose:i,expandedItemPath:a=null,onReorderSection:s,allLayers:l=[],activeSectionId:c,onRequestScrollToSection:d,onDeleteSection:u,onAddSection:g,hasChanges:f=!1,onSaveToFile:w,onHotSave:p,saveSuccessFeedback:b=!1,hotSaveSuccessFeedback:m=!1,hotSaveInProgress:x=!1,showLegacySave:k=!0,showHotSave:_=!1,onResetToFile:S,showResetToFile:O=!1,pageSlugs:j=[],currentSlug:I="home",onPageChange:R})=>{const{schemas:$}=sr(),[F,C]=z.useState(!0),[M,y]=z.useState(null),[B,re]=z.useState(null),[W,H]=z.useState(null),[Z,oe]=z.useState(null),N=z.useRef(null),P=z.useRef(null),ee=Qd(oo(fo,Xg),oo(wa,Jg),oo(co,{coordinateGetter:Tf})),K=z.useDeferredValue(e),Q=e!=null&&(K==null?void 0:K.id)!==e.id,ue=a&&a.length>0?a:W?[W]:null,J=ue!=null&&ue.length?{fieldKey:ue[ue.length-1].fieldKey,itemId:ue[ue.length-1].itemId}:null,se=z.useRef(a);z.useEffect(()=>{se.current!=null&&a==null&&H(null),se.current=a},[a]),z.useEffect(()=>{(e==null?void 0:e.id)!=null&&C(!1)},[e==null?void 0:e.id]);const de=()=>{const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const G=N.current;G&&G.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(D)},ie=z.useRef(F);z.useEffect(()=>{if(F&&!ie.current){const D=de();return ie.current=F,D}ie.current=F},[F]),z.useEffect(()=>{if(!J)return;const D=N.current;if(!D)return;const G=requestAnimationFrame(()=>{const X=D.querySelector("[data-jp-expanded-item]")??D.querySelector("[data-jp-focused-field]");X&&X.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(G)},[J]);const fe=D=>{C(!1),d==null||d(D)},me=()=>{C(D=>{const G=!D;return G&&de(),G})},ye=(D,G)=>{G.stopPropagation(),r.length>0&&o?oe(D):(C(!1),d==null||d(D))};z.useEffect(()=>{if(Z==null)return;const D=G=>{G.key==="Escape"&&oe(null)};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[Z]);const v=D=>{M===D?(u==null||u(D),y(null)):(y(D),setTimeout(()=>y(null),3e3))},Y=z.useMemo(()=>l.filter(D=>D.scope==="local").map(D=>D.id),[l]),V=!!s&&Y.length>0,T=D=>{re(D.active.id)},A=D=>{re(null);const{active:G,over:X}=D;if(!X||G.id===X.id||!s)return;const le=l.findIndex(xe=>xe.id===G.id),be=l.findIndex(xe=>xe.id===X.id);if(le===-1||be===-1)return;const ge=le<be?be:be-1;s(G.id,ge)},L=e?t.sections.find(D=>D.id===e.id):void 0,q=K?t.sections.find(D=>D.id===K.id):void 0,te=K?$[K.type]:void 0,U=z.useMemo(()=>{if(!te)return!1;const D=te.shape,G=Object.keys(D).filter(X=>!oi.has(X));return G.length===0?!1:G.every(X=>nc.has(ii(D[X])))},[te]);z.useEffect(()=>{(e==null?void 0:e.id)!=null&&U&&C(!0)},[e==null?void 0:e.id,U]);const ne=l.length>0&&(F||!e),ce=I?I.charAt(0).toUpperCase()+I.slice(1):"Select page",ae=z.useMemo(()=>{const D=[];let G=null;for(const X of l){const le=X.type.toUpperCase(),be=G!==null&&(G==="HEADER"&&le!=="HEADER"||G!=="HEADER"&&G!=="FOOTER"&&le==="FOOTER");D.push({layer:X,showSeparatorAbove:be}),G=le}return D},[l]);return h.jsx(Pg,{children:h.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:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{className:"text-sm font-bold text-white",children:"Inspector"}),h.jsx("p",{className:"text-[10px] tracking-[0.06em] text-zinc-600 mt-0.5",children:e?h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-primary font-bold",children:e.type}),h.jsx("span",{className:"text-zinc-700 mx-1.5",children:"|"}),h.jsx("span",{className:"uppercase",children:e.scope})]}):h.jsxs("span",{className:"text-zinc-600",children:[ce," · ",l.length," sections"]})})]}),h.jsx(We,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":"Close Inspector",children:h.jsx(Rt,{size:14})})]}),j.length>0&&R&&h.jsx(qg,{pageSlugs:j,currentSlug:I,onPageChange:R,sectionCount:l.length,currentPageLabel:ce}),l.length>0&&h.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-t border-zinc-800/50",children:[h.jsxs("button",{type:"button",onClick:me,className:"flex items-center gap-2 flex-1 cursor-pointer min-w-0 text-left","aria-expanded":ne,"aria-label":ne?"Collapse Page Layers":"Expand Page Layers",children:[h.jsx(Jn,{size:14,className:"text-zinc-500 shrink-0"}),h.jsx("span",{className:"text-[11px] font-semibold tracking-[0.04em] text-zinc-400",children:"Page Layers"}),h.jsxs("span",{className:"text-[10px] text-zinc-600",children:["(",l.length,")"]}),h.jsx(Xn,{size:13,className:ve("ml-auto text-zinc-600 transition-transform duration-200 shrink-0",!F&&"rotate-180")})]}),g!=null&&h.jsxs(zr,{children:[h.jsx(Ar,{asChild:!0,children:h.jsx(We,{variant:"ghost",size:"icon-sm",className:"text-zinc-500 hover:text-primary",onClick:g,children:h.jsx(Qn,{size:14})})}),h.jsx(tr,{children:"Add section"})]})]}),h.jsx("div",{className:"relative flex-1 min-h-0 min-w-0 flex flex-col overflow-hidden",children:h.jsxs("div",{ref:N,className:"min-h-0 min-w-0 flex-1 overflow-y-auto overflow-x-hidden flex flex-col",role:"region","aria-label":"Inspector content",children:[h.jsx("div",{className:"flex flex-col min-h-0",children:ne&&h.jsxs("div",{className:"py-1",children:[h.jsxs(qu,{sensors:ee,collisionDetection:ru,modifiers:[mf],onDragStart:T,onDragEnd:A,accessibility:{announcements:{onDragStart:()=>"Sezione presa in carico. Usa i tasti freccia per spostare, Spazio per rilasciare.",onDragOver:({over:D})=>D?`Posizione ${Y.indexOf(String(D.id))+1} di ${Y.length}.`:void 0,onDragEnd:({over:D})=>D?"Sezione rilasciata in nuova posizione.":"Riposizionamento annullato.",onDragCancel:()=>"Riposizionamento annullato."}},children:[h.jsx(yf,{items:Y,strategy:xf,children:h.jsx("div",{className:"px-2 space-y-0.5",children:ae.map(({layer:D,showSeparatorAbove:G})=>h.jsxs(z.Fragment,{children:[G&&h.jsx("div",{className:"mx-3 border-t border-zinc-800/60 my-1"}),D.scope==="local"&&V?h.jsx(Qg,{layer:D,opts:{isSelected:(e==null?void 0:e.id)===D.id,isActive:c===D.id,isDragging:!1,canReorder:!0,canDelete:!!u,deleteConfirm:M===D.id,onSelect:()=>fe(D.id),onDelete:()=>v(D.id),onOpenSettings:X=>ye(D.id,X)}}):h.jsx("div",{children:h.jsx(si,{layer:D,opts:{isSelected:(e==null?void 0:e.id)===D.id,isActive:c===D.id,isDragging:!1,canDelete:D.scope==="local"&&!!u,deleteConfirm:M===D.id,onSelect:()=>fe(D.id),onDelete:()=>v(D.id),onOpenSettings:X=>ye(D.id,X)}})})]},D.id))})}),h.jsx(hf,{dropAnimation:{duration:200,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:B?(()=>{const D=l.find(G=>G.id===B);return D?h.jsx("div",{className:"px-2 w-full max-w-[var(--inspector-width,280px)]",children:h.jsx(si,{layer:D,opts:{isSelected:!1,isActive:!1,isDragging:!0,canDelete:!1,deleteConfirm:!1,onSelect:()=>{},onDelete:()=>{},onOpenSettings:()=>{}},dragHandleProps:{"aria-hidden":!0}})}):null})():null})]}),M&&h.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:[h.jsx(yd,{size:12,className:"text-amber-500 shrink-0"}),h.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]})}),J&&L&&(()=>{const D=L.data||{};let G;if(ue&&ue.length>0){let X=D;for(const ge of ue){const xe=X==null?void 0:X[ge.fieldKey];ge.itemId!=null&&Array.isArray(xe)?X=xe.find(Ne=>String(Ne==null?void 0:Ne.id)===String(ge.itemId))??null:X=xe}const le=X||{},be=J.fieldKey;G=(typeof le.name=="string"?le.name:null)??(typeof le.title=="string"?le.title:null)??(typeof le.label=="string"?le.label:null)??ai(be)}else{const X=J.fieldKey;if(J.itemId!=null){const ge=(Array.isArray(D[X])?D[X]:[]).find(xe=>String(xe==null?void 0:xe.id)===String(J.itemId))||{};G=(typeof ge.name=="string"?ge.name:null)??(typeof ge.title=="string"?ge.title:null)??(typeof ge.label=="string"?ge.label:null)??ai(X)}else G=ai(X)}return h.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[h.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),h.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:G})]})})(),h.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&C(!1),children:e?Q?h.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[h.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),h.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),h.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),h.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),h.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):te?(()=>{const G=Object.keys(te.shape).filter(le=>!oi.has(le)&&!nc.has(ii(te.shape[le]))),X=(q==null?void 0:q.data)||{};return G.length===0?h.jsx("p",{className:"text-xs text-zinc-500",children:"Inline editorial section: edit content directly on the canvas."}):h.jsx(Sr,{schema:te,data:X,onChange:le=>n(le),keys:G,expandedItemPath:ue,onSidebarExpandedItemChange:H})})():h.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 ",(K==null?void 0:K.type)??e.type]}):h.jsx("p",{className:"text-xs text-zinc-600 text-center py-10",children:"Select a layer above or on the stage to edit."})})]})}),h.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center justify-between gap-3 opacity-100 shrink-0",children:(k&&w!=null||_&&p!=null||S!=null)&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h.jsx("div",{className:ve("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",f?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),h.jsx("span",{className:ve("text-sm font-medium transition-colors duration-300 truncate",b||m?"text-emerald-400":f?"text-amber-500":"text-zinc-500"),children:b||m?"Saved":f?"Unsaved Changes":"All Changes Saved"})]}),k&&w!=null&&h.jsxs(zr,{children:[h.jsx(Ar,{asChild:!0,children:h.jsxs(We,{size:"default",disabled:!f,className:"h-9 min-w-[156px] px-5 text-sm gap-2 ml-auto",onClick:D=>{D.preventDefault(),D.stopPropagation(),w()},children:[h.jsx(Yi,{size:14}),h.jsx("span",{children:"Save"})]})}),h.jsx(tr,{children:"Save (export JSON)"})]}),_&&p!=null&&h.jsxs(zr,{children:[h.jsx(Ar,{asChild:!0,children:h.jsxs(We,{size:"default",disabled:!f||x,className:"h-9 min-w-[156px] px-5 text-sm gap-2 ml-auto",onClick:D=>{D.preventDefault(),D.stopPropagation(),p()},children:[h.jsx(Yi,{size:14}),h.jsx("span",{children:x?"Saving...":"Hot Save"})]})}),h.jsx(tr,{children:"Hot save to edge"})]}),S!=null&&O&&h.jsx("button",{type:"button",onClick:S,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:h.jsx("span",{children:"Ripristina da file"})})]})}),Z!=null&&r.length>0&&o!=null&&(()=>{const D=r.find(Ne=>Ne.id===Z),G=l.find(Ne=>Ne.id===Z);if(!D)return null;const X=(G==null?void 0:G.scope)==="global"?"global":"local",le=D.type,be=$[le],xe=(be?Object.keys(be.shape):[]).filter(Ne=>oi.has(Ne)),ke=D.data??{};return xe.length===0?h.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:()=>oe(null),children:h.jsxs("div",{ref:P,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:Ne=>Ne.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[h.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",le]}),h.jsx("button",{type:"button",onClick:()=>oe(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:h.jsx(Rt,{size:18})})]}),h.jsx("div",{className:"p-4",children:h.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):h.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:Ne=>Ne.target===Ne.currentTarget&&oe(null),children:h.jsxs("div",{ref:P,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:Ne=>Ne.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[h.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",le]}),h.jsx("button",{type:"button",onClick:()=>oe(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:h.jsx(Rt,{size:18})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:h.jsx(Sr,{schema:be,data:ke,onChange:Ne=>{const ut={...D.data,...Ne};o(Z,X,le,ut)},keys:xe})})]})})})()]})})},ac=({draft:e,globalDraft:t,menuConfig:r,themeConfig:n,slug:o,selectedId:i,scrollToSectionId:a,onScrollRequested:s})=>{const l=z.useRef(null),c=z.useCallback(()=>{var d;(d=l.current)!=null&&d.contentWindow&&l.current.contentWindow.postMessage({type:ze.UPDATE_DRAFTS,draft:e,globalDraft:t,menuConfig:r,themeConfig:n},"*")},[e,t,r,n]);return z.useEffect(()=>{c()},[c]),z.useEffect(()=>{const d=u=>{u.data.type===ze.STAGE_READY&&c()};return window.addEventListener("message",d),()=>window.removeEventListener("message",d)},[c]),z.useEffect(()=>{var d;(d=l.current)!=null&&d.contentWindow&&l.current.contentWindow.postMessage({type:ze.SYNC_SELECTION,selectedId:i},"*")},[i]),z.useEffect(()=>{var d;!a||!((d=l.current)!=null&&d.contentWindow)||(l.current.contentWindow.postMessage({type:ze.REQUEST_SCROLL_TO_SECTION,sectionId:a},"*"),s==null||s())},[a,s]),h.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:h.jsx("iframe",{ref:l,src:`/admin/preview/${o}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},li=new Set;function e0(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function sc(e,t=[],r={}){return Object.entries(e).forEach(([n,o])=>{const i=[...t,e0(n)];if(typeof o=="string"||typeof o=="number"){r[`--theme-${i.join("-")}`]=String(o);return}o&&typeof o=="object"&&!Array.isArray(o)&&sc(o,i,r)}),r}function Be(e,t,r,n){n&&(e[t]=`var(${r})`)}function t0(e){const t=sc(e.tokens),r={...t};return Be(r,"--theme-primary","--theme-colors-primary",t["--theme-colors-primary"]),Be(r,"--theme-secondary","--theme-colors-secondary",t["--theme-colors-secondary"]),Be(r,"--theme-accent","--theme-colors-accent",t["--theme-colors-accent"]),Be(r,"--theme-background","--theme-colors-background",t["--theme-colors-background"]),Be(r,"--theme-surface","--theme-colors-surface",t["--theme-colors-surface"]),Be(r,"--theme-surface-alt","--theme-colors-surface-alt",t["--theme-colors-surface-alt"]),Be(r,"--theme-text","--theme-colors-text",t["--theme-colors-text"]),Be(r,"--theme-text-muted","--theme-colors-text-muted",t["--theme-colors-text-muted"]),Be(r,"--theme-border","--theme-colors-border",t["--theme-colors-border"]),Be(r,"--theme-font-primary","--theme-typography-font-family-primary",t["--theme-typography-font-family-primary"]),Be(r,"--theme-font-mono","--theme-typography-font-family-mono",t["--theme-typography-font-family-mono"]),Be(r,"--theme-font-display","--theme-typography-font-family-display",t["--theme-typography-font-family-display"]),Be(r,"--theme-radius-sm","--theme-border-radius-sm",t["--theme-border-radius-sm"]),Be(r,"--theme-radius-md","--theme-border-radius-md",t["--theme-border-radius-md"]),Be(r,"--theme-radius-lg","--theme-border-radius-lg",t["--theme-border-radius-lg"]),r}const Bn={setTheme:e=>{const t=document.documentElement,r=t0(e);li.forEach(n=>{t.style.removeProperty(n)}),li.clear(),Object.entries(r).forEach(([n,o])=>{t.style.setProperty(n,o),li.add(n)})}};function r0(e,t){if(!t)return e;const r=e[e.length-1];return r&&r.itemId==null&&r.fieldKey===t?e:[...e,{fieldKey:t}]}function lc(e,t){var i,a,s;const r=[];let n=null,o=e;for(;o&&o!==t;){const l=(i=o.getAttribute)==null?void 0:i.call(o,"data-jp-item-id"),c=(a=o.getAttribute)==null?void 0:a.call(o,"data-jp-item-field");if(l&&c&&r.push({fieldKey:c,itemId:l}),n==null){const d=(s=o.getAttribute)==null?void 0:s.call(o,"data-jp-field");d&&(n=d)}o=o.parentElement}return r.reverse(),r0(r,n)}const n0='[data-jp-ignore-select="true"],[data-jp-interactive="true"],.ProseMirror,[contenteditable="true"],button,input,textarea,select,[role="button"],[role="menuitem"]',o0="[data-jp-field],[data-jp-item-id],[data-jp-item-field]",cc=()=>{var p;const[e,t]=z.useState(null),[r,n]=z.useState(null),[o,i]=z.useState({main:[]}),[a,s]=z.useState(null),[l,c]=z.useState(null),[d,u]=z.useState(!1);if(z.useEffect(()=>{const b=m=>{var x;if(!(m.origin!==window.location.origin||m.source!==window.parent)){if(m.data.type===ze.UPDATE_DRAFTS&&(t(m.data.draft),n(m.data.globalDraft),(x=m.data.menuConfig)!=null&&x.main&&i({main:m.data.menuConfig.main}),m.data.themeConfig&&Bn.setTheme(m.data.themeConfig)),m.data.type===ze.SYNC_SELECTION&&s(m.data.selectedId),m.data.type===ze.REQUEST_SCROLL_TO_SECTION&&c(m.data.sectionId??null),m.data.type===ze.REQUEST_INLINE_FLUSH){const k=typeof m.data.requestId=="string"?m.data.requestId:null;window.dispatchEvent(new CustomEvent(ze.REQUEST_INLINE_FLUSH,{detail:{requestId:k}})),setTimeout(()=>{window.parent.postMessage({type:ze.INLINE_FLUSHED,requestId:k},window.location.origin)},0)}m.data.type===ze.REQUEST_CLEAN_HTML&&(u(!0),setTimeout(()=>{const k=document.documentElement.outerHTML;window.parent.postMessage({type:ze.SEND_CLEAN_HTML,html:k},"*"),u(!1)},50))}};return window.addEventListener("message",b),window.parent.postMessage({type:ze.STAGE_READY},"*"),()=>window.removeEventListener("message",b)},[]),z.useEffect(()=>{const b=k=>!!k.closest(o0),m=k=>!!(k.closest('[data-jp-ignore-select="true"]')||k.closest(n0)&&!b(k)||k.closest("a[href]")&&!b(k)),x=k=>{var re,W,H;const _=k.target;if(m(_)){_.closest("a[href]")&&k.preventDefault();return}const S=k.clientX,O=k.clientY;let j=null,I=_;for(;I&&I!==document.body;){const Z=(re=I.getAttribute)==null?void 0:re.call(I,"data-section-id"),oe=(W=I.getAttribute)==null?void 0:W.call(I,"data-section-type"),N=(H=I.getAttribute)==null?void 0:H.call(I,"data-section-scope");if(Z&&oe&&N){j=I;break}I=I.parentElement}if(!j)return;k.preventDefault(),k.stopPropagation();const R=j.getAttribute("data-section-id"),$=j.getAttribute("data-section-type"),F=j.getAttribute("data-section-scope");if(!R||!$||!F)return;const C={id:R,type:$,scope:F};if(_===j){window.parent.postMessage({type:ze.SECTION_SELECT,section:C},"*");return}const M=document.elementFromPoint(S,O)??_;if(!M||!j.contains(M)){window.parent.postMessage({type:ze.SECTION_SELECT,section:C},"*");return}if(M===j){window.parent.postMessage({type:ze.SECTION_SELECT,section:C},"*");return}let y=lc(M,j);if(y.length===0&&M){let Z=null;const oe=N=>{var ee,K;const P=N.getBoundingClientRect();if(P.left<=S&&S<=P.right&&P.top<=O&&O<=P.bottom){for(let Q=0;Q<N.children.length;Q++)oe(N.children[Q]);((ee=N.getAttribute)!=null&&ee.call(N,"data-jp-item-id")||(K=N.getAttribute)!=null&&K.call(N,"data-jp-field"))&&(Z=N)}};oe(M),Z&&(y=lc(Z,j))}const B={type:ze.SECTION_SELECT,section:C};y.length>0&&(B.itemPath=y),window.parent.postMessage(B,"*")};return document.addEventListener("click",x,!0),()=>document.removeEventListener("click",x,!0)},[]),z.useEffect(()=>{if(!l)return;const b=setTimeout(()=>c(null),600);return()=>clearTimeout(b)},[l]),!e||!r)return h.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 g=(p=r.header)==null?void 0:p.data,f=Array.isArray(g==null?void 0:g.links)?{main:g.links}:o,w=b=>{window.parent.postMessage({type:ze.ACTIVE_SECTION_CHANGED,activeSectionId:b},"*")};return h.jsx(Ur,{mode:d?"visitor":"studio",children:h.jsx("div",{className:d?"":"jp-ice-active",children:h.jsx(eo,{pageConfig:e,siteConfig:r,menuConfig:f,selectedId:d?null:a,scrollToSectionId:l,onActiveSectionChange:w})})})};function i0(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const dc=({open:e,onClose:t,sectionTypes:r,sectionTypeLabels:n,onSelect:o})=>{if(z.useEffect(()=>{if(!e)return;const a=s=>{s.key==="Escape"&&t()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[e,t]),!e)return null;const i=a=>(n==null?void 0:n[a])??i0(a);return h.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:[h.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:t,"aria-hidden":"true"}),h.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:[h.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:h.jsx(Jn,{size:18})}),h.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),h.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:h.jsx(Rt,{size:18})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?h.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):h.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(a=>h.jsx("li",{role:"option",children:h.jsxs("button",{type:"button",onClick:()=>{o(a),t()},className:ve("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:[h.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:a}),h.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(a)})]})},a))})}),h.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:h.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},uc=()=>h.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:[h.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),h.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),h.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-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-\\[96px\\]{min-height:96px}.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-\\[156px\\]{min-width:156px}.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-x-hidden{overflow-x: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\\/60{border-color:#3f3f4699}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/60{border-color:color-mix(in oklab,var(--color-zinc-700)60%,transparent)}}.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\\.5{padding:calc(var(--spacing)*2.5)}.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}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.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\\.01em\\]{--tw-tracking:.01em;letter-spacing:.01em}.tracking-\\[0\\.02em\\]{--tw-tracking:.02em;letter-spacing:.02em}.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;--jp-inspector-label-size:11px;--jp-inspector-field-size:13px;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 s0 extends z.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?h.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:[h.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),h.jsx("pre",{style:{maxWidth:"100%",overflow:"auto",padding:16,backgroundColor:"rgba(0,0,0,0.3)",borderRadius:8,fontSize:12,marginTop:8},children:this.state.error.message})]}):this.props.children}}function Un(e){return e.split("/").map(t=>t.trim()).filter(Boolean).join("/")}function fc(e,t=""){const r=Un(t);let o=e.replace(/\/+/g,"/");if(r){const a=`/${r}`;o===a?o="/":o.startsWith(`${a}/`)&&(o=o.slice(a.length))}return Un(o)||"home"}function ci(e,t){const r=Un(t)||"home";return e[r]}function l0(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.label=="string"&&typeof t.href=="string"}function di(e,t){return Array.isArray(e==null?void 0:e.links)&&e.links.every(l0)?e.links:Array.isArray(t)?t:[]}const pc=({pageRegistry:e,siteConfig:t,menuConfig:r,tenantCss:n,adminCss:o,NotFoundComponent:i})=>{const a=Ze.useLocation(),s=fc(a.pathname),[l,c]=z.useState(null);z.useEffect(()=>{const f=document.getElementById("jp-baked-state");if(f!=null&&f.textContent)try{const w=JSON.parse(f.textContent);c(w),Bn.setTheme(w.theme)}catch(w){console.error("Failed to parse baked state",w)}},[]);const d=l?l.page:ci(e,s),u=l?l.site:t,g=l?l.menu:r;return d?h.jsx(Vr,{mode:"tenant",tenantCss:n,adminCss:o,children:h.jsx(Ur,{mode:"visitor",children:h.jsx(eo,{pageConfig:d,siteConfig:u,menuConfig:g})})}):h.jsx(i,{})},hc=({pageRegistry:e,siteConfig:t,menuConfig:r,themeConfig:n,tenantCss:o,adminCss:i,addSectionConfig:a,addableSectionTypes:s,saveToFile:l,hotSave:c,showLegacySave:d=!0,showHotSave:u=!1,exportHTML:g})=>{const f=Ze.useLocation(),w=fc(f.pathname,"admin"),p=Ze.useNavigate(),b=Object.keys(e).sort((D,G)=>D==="home"?-1:G==="home"?1:D.localeCompare(G)),[m,x]=z.useState(null),[k,_]=z.useState(!1),[S,O]=z.useState(!1),[j,I]=z.useState(!1),[R,$]=z.useState(!1),[F,C]=z.useState(()=>{var D;try{const G=JSON.parse(JSON.stringify(t??{}));G.identity||(G.identity={title:"Site"}),G.pages||(G.pages=[]);const X=(D=G.header)==null?void 0:D.data;return X&&(r!=null&&r.main)&&Array.isArray(X.links)&&(X.links=JSON.parse(JSON.stringify(r.main))),G}catch{return{identity:{title:"Site"},pages:[]}}}),[M,y]=z.useState(null),[B,re]=z.useState(null),[W,H]=z.useState(null),[Z,oe]=z.useState(null),[N,P]=z.useState(!1),[ee,K]=z.useState(400),Q=z.useRef(m),ue=z.useRef(F),J=360,se=920;z.useEffect(()=>{Q.current=m},[m]),z.useEffect(()=>{ue.current=F},[F]);const de=z.useCallback(D=>{D.preventDefault();const G=D.currentTarget;G.setPointerCapture(D.pointerId);const X=D.clientX,le=ee,be=xe=>{const ke=X-xe.clientX,Ne=Math.min(se,Math.max(J,le+ke));K(Ne)},ge=()=>{G.releasePointerCapture(D.pointerId),G.removeEventListener("pointermove",be),G.removeEventListener("pointerup",ge),G.removeEventListener("pointercancel",ge),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",G.addEventListener("pointermove",be),G.addEventListener("pointerup",ge),G.addEventListener("pointercancel",ge)},[ee]),ie=m?[...F.header?[{id:F.header.id,type:F.header.type,scope:"global",title:"Header"}]:[],...m.sections.map(D=>{var G,X;return{id:D.id,type:D.type,scope:"local",title:((G=D.data)==null?void 0:G.title)??((X=D.data)==null?void 0:X.titleHighlight)}}),...F.footer?[{id:F.footer.id,type:F.footer.type,scope:"global",title:"Footer"}]:[]]:[];z.useEffect(()=>{const D=ci(e,w);D&&x(JSON.parse(JSON.stringify(D))),y(null),re(null),_(!1)},[w,e]);const fe=z.useCallback(()=>{const D=ci(e,w);D&&x(JSON.parse(JSON.stringify(D))),y(null),re(null),_(!1)},[w,e]),me=z.useCallback((D,G,X)=>{const le=[...X.sections],be=le.findIndex(ke=>ke.id===D);if(be===-1||G<0||G>=le.length)return;const[ge]=le.splice(be,1),xe=G>be?G-1:G;le.splice(Math.min(xe,le.length),0,ge),x({...X,sections:le}),_(!0)},[]),ye=z.useCallback(D=>{var G;if(D.origin===window.location.origin){if(D.data.type===ze.SECTION_SELECT){y(D.data.section);const X=D.data.itemPath;Array.isArray(X)&&X.length>0?re(X.map(le=>({fieldKey:le.fieldKey,...le.itemId!=null?{itemId:String(le.itemId)}:{}}))):re(null)}if(D.data.type===ze.INLINE_FIELD_UPDATE){const X=typeof D.data.sectionId=="string"?D.data.sectionId:null,le=typeof D.data.fieldKey=="string"?D.data.fieldKey:null;X&&le&&(x(be=>{if(!be)return be;const ge={...be,sections:be.sections.map(xe=>xe.id===X?{...xe,data:{...xe.data,[le]:D.data.value}}:xe)};return Q.current=ge,ge}),_(!0))}if(D.data.type===ze.ACTIVE_SECTION_CHANGED&&H(D.data.activeSectionId??null),D.data.type==="jsonpages:section-reorder"&&Q.current){const{sectionId:X,newIndex:le}=D.data;typeof X=="string"&&typeof le=="number"&&le>=0&&me(X,le,Q.current)}if(D.data.type===ze.SEND_CLEAN_HTML){if(!Q.current)return;const X=(G=ue.current.header)==null?void 0:G.data,le={page:Q.current,site:ue.current,menu:{main:di(X,r.main)},theme:n};g(le,w,D.data.html),_(!1)}}},[w,n,me,g]);z.useEffect(()=>(window.addEventListener("message",ye),()=>window.removeEventListener("message",ye)),[ye]);const v=z.useCallback(D=>{const G=ie.find(X=>X.id===D);G&&y({id:G.id,type:G.type,scope:G.scope}),re(null),oe(D)},[ie]),Y=z.useCallback(()=>{oe(null)},[]),V=z.useCallback(D=>{x(G=>G&&{...G,sections:G.sections.filter(X=>X.id!==D)}),_(!0),y(G=>(G==null?void 0:G.id)===D?null:G)},[]),T=D=>{if(!(!M||!m))if(_(!0),M.scope==="global")M.type==="header"&&F.header!=null?C({...F,header:{...F.header,data:D}}):M.type==="footer"&&F.footer!=null&&C({...F,footer:{...F.footer,data:D}});else{const G=m.sections.map(X=>X.id===M.id?{...X,data:D}:X);x({...m,sections:G})}},A=z.useCallback((D,G,X,le)=>{var be,ge;if(_(!0),G==="global")((be=F.header)==null?void 0:be.id)===D?C({...F,header:{...F.header,data:le}}):((ge=F.footer)==null?void 0:ge.id)===D&&C({...F,footer:{...F.footer,data:le}});else if(m){const xe=m.sections.map(ke=>ke.id===D?{...ke,data:le}:ke);x({...m,sections:xe})}},[m,F]),L=()=>{var G;const D=document.querySelector("iframe");(G=D==null?void 0:D.contentWindow)==null||G.postMessage({type:ze.REQUEST_CLEAN_HTML},"*")},q=z.useCallback(async()=>{const D=document.querySelector("iframe");if(!(D!=null&&D.contentWindow))return;const G=crypto.randomUUID();await new Promise(X=>{var ge;let le=!1;const be=xe=>{var ke,Ne;xe.origin===window.location.origin&&((ke=xe.data)==null?void 0:ke.type)===ze.INLINE_FLUSHED&&((Ne=xe.data)==null?void 0:Ne.requestId)===G&&(le=!0,window.removeEventListener("message",be),X())};window.addEventListener("message",be),(ge=D.contentWindow)==null||ge.postMessage({type:ze.REQUEST_INLINE_FLUSH,requestId:G},"*"),window.setTimeout(()=>{le||(window.removeEventListener("message",be),X())},400)})},[]),te=async()=>{var be;if(!l)return;await q();const D=Q.current,G=ue.current;if(!D)return;const X=(be=G.header)==null?void 0:be.data,le={page:D,site:G,menu:{main:di(X,r.main)},theme:n};l(le,w).then(()=>{_(!1),O(!0),typeof window<"u"&&window.setTimeout(()=>O(!1),2500)}).catch(ge=>{console.error("[JsonPages] saveToFile failed",ge);const xe=ge instanceof Error?ge.message:String(ge);alert(`Save to file failed: ${xe}`)})},U=async()=>{var be;if(!c)return;await q();const D=Q.current,G=ue.current;if(!D)return;const X=(be=G.header)==null?void 0:be.data,le={page:D,site:G,menu:{main:di(X,r.main)},theme:n};$(!0),c(le,w).then(()=>{_(!1),I(!0),typeof window<"u"&&window.setTimeout(()=>I(!1),2500)}).catch(ge=>{console.error("[JsonPages] hotSave failed",ge);const xe=ge instanceof Error?ge.message:String(ge);alert(`Hot save failed: ${xe}`)}).finally(()=>{$(!1)})},ne=D=>{var le;if(!m)return;const G=((le=a==null?void 0:a.getDefaultSectionData)==null?void 0:le.call(a,D))??{},X={id:crypto.randomUUID(),type:D,data:G,settings:void 0};x({...m,sections:[...m.sections,X]}),_(!0),y({id:X.id,type:D,scope:"local"})};if(!m)return h.jsx("div",{children:"Loading Studio..."});const ce=(M==null?void 0:M.scope)==="global"?{sections:[F.header,F.footer].filter(D=>D!=null)}:m,ae=[...F.header?[F.header]:[],...m.sections,...F.footer?[F.footer]:[]];return h.jsx(Vr,{mode:"admin",tenantCss:o,adminCss:i,children:h.jsx(Ur,{mode:"studio",children:h.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[h.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[h.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:h.jsx(ac,{draft:m,globalDraft:F,menuConfig:r,themeConfig:n,slug:w,selectedId:M==null?void 0:M.id,scrollToSectionId:Z,onScrollRequested:Y})}),h.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:ee,minWidth:J,maxWidth:se},children:[h.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:de}),h.jsx(ic,{selectedSection:M,pageData:ce,allSectionsData:ae,onUpdate:T,onUpdateSection:A,onClose:()=>{y(null),re(null)},expandedItemPath:B,onReorderSection:m?(D,G)=>me(D,G,m):void 0,allLayers:ie,activeSectionId:W,onRequestScrollToSection:v,onDeleteSection:m?V:void 0,onAddSection:s.length>0?()=>P(!0):void 0,hasChanges:k,onExportHTML:L,onSaveToFile:l!=null?te:void 0,saveSuccessFeedback:S,onHotSave:c!=null?U:void 0,hotSaveSuccessFeedback:j,hotSaveInProgress:R,showLegacySave:d,showHotSave:u,onResetToFile:fe,pageSlugs:b,currentSlug:w,onPageChange:b.length>1?D=>{const G=Un(D);p(G==="home"?"/admin":`/admin/${G}`)}:void 0})]})]}),h.jsx(dc,{open:N,onClose:()=>P(!1),sectionTypes:s,sectionTypeLabels:a==null?void 0:a.sectionTypeLabels,onSelect:ne})]})})})},mc=({tenantCss:e,adminCss:t})=>h.jsx(Vr,{mode:"tenant",tenantCss:e,adminCss:t,children:h.jsx(cc,{})});function c0({config:e}){var b,m,x,k,_,S;const{registry:t={},schemas:r={},pages:n={},siteConfig:o,themeConfig:i,menuConfig:a,themeCss:s,addSection:l,NotFoundComponent:c=uc}=e,d=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(O=>O!=="header"&&O!=="footer"),u={exportJSON:((b=e.persistence)==null?void 0:b.exportJSON)??xi,exportHTML:((m=e.persistence)==null?void 0:m.exportHTML)??wi,saveToFile:(x=e.persistence)==null?void 0:x.saveToFile,hotSave:(k=e.persistence)==null?void 0:k.hotSave,showLegacySave:((_=e.persistence)==null?void 0:_.showLegacySave)??!0,showHotSave:((S=e.persistence)==null?void 0:S.showHotSave)??!1},g=typeof(s==null?void 0:s.tenant)=="string"?s.tenant:"",f=typeof(s==null?void 0:s.admin)=="string"?s.admin:a0,[w,p]=z.useState(!1);return z.useEffect(()=>{try{i!=null&&i.tokens&&Bn.setTheme(i)}catch(O){console.warn("[JsonPages] setTheme failed",O)}p(!0)},[i]),w?h.jsx(s0,{children:h.jsx(Wi,{config:{registry:t,schemas:r,tenantId:e.tenantId??"default",assets:e.assets,overlayDisabledSectionTypes:e.overlayDisabledSectionTypes},children:h.jsx(Ze.BrowserRouter,{children:h.jsxs(Ze.Routes,{children:[h.jsx(Ze.Route,{path:"/",element:h.jsx(pc,{pageRegistry:n,siteConfig:o,menuConfig:a,tenantCss:g,adminCss:f,NotFoundComponent:c})}),h.jsx(Ze.Route,{path:"/*",element:h.jsx(pc,{pageRegistry:n,siteConfig:o,menuConfig:a,tenantCss:g,adminCss:f,NotFoundComponent:c})}),h.jsx(Ze.Route,{path:"/admin",element:h.jsx(hc,{pageRegistry:n,siteConfig:o,menuConfig:a,themeConfig:i,tenantCss:g,adminCss:f,addSectionConfig:l,addableSectionTypes:d,saveToFile:u.saveToFile,hotSave:u.hotSave,showLegacySave:u.showLegacySave,showHotSave:u.showHotSave,exportHTML:u.exportHTML})}),h.jsx(Ze.Route,{path:"/admin/*",element:h.jsx(hc,{pageRegistry:n,siteConfig:o,menuConfig:a,themeConfig:i,tenantCss:g,adminCss:f,addSectionConfig:l,addableSectionTypes:d,saveToFile:u.saveToFile,hotSave:u.hotSave,showLegacySave:u.showLegacySave,showHotSave:u.showHotSave,exportHTML:u.exportHTML})}),h.jsx(Ze.Route,{path:"/admin/preview",element:h.jsx(mc,{tenantCss:g,adminCss:f})}),h.jsx(Ze.Route,{path:"/admin/preview/*",element:h.jsx(mc,{tenantCss:g,adminCss:f})}),h.jsx(Ze.Route,{path:"*",element:h.jsx(c,{})})]})})})}):h.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 d0=({hasChanges:e,onExportJSON:t,onExportHTML:r,onAddSection:n})=>h.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:[h.jsx("div",{className:"flex items-center gap-3",children:n!=null&&h.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:[h.jsx(Td,{size:14}),h.jsx("span",{children:"Add section"})]})}),h.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:h.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.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:[h.jsx(kd,{size:14}),h.jsx("span",{children:"Bake HTML"})]}),h.jsxs("button",{onClick:t,disabled:!e,className:ve("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:[h.jsx(_d,{size:14}),h.jsx("span",{children:"Export JSON"})]})]})]});Se.AddSectionLibrary=dc,Se.AdminSidebar=ic,Se.ConfigProvider=Wi,Se.ControlBar=d0,Se.DefaultNotFound=uc,Se.FormFactory=Sr,Se.InputWidgets=Jt,Se.JsonPagesEngine=c0,Se.PageRenderer=eo,Se.PreviewEntry=cc,Se.STUDIO_EVENTS=ze,Se.SectionRenderer=lr,Se.StudioProvider=Ur,Se.StudioStage=ac,Se.ThemeLoader=Vr,Se.cn=ve,Se.exportBakedHTML=wi,Se.exportProjectJSON=xi,Se.resolveAssetUrl=Ol,Se.shouldRenderSiteGlobalHeader=mi,Se.themeManager=Bn,Se.useConfig=sr,Se.useStudio=Vi,Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"})}));
|
|
252
|
+
`)},Mm=0,er=[];function Lm(e){var t=E.useRef([]),r=E.useRef([0,0]),n=E.useRef(),o=E.useState(Mm++)[0],i=E.useState(Qa)[0],s=E.useRef(e);E.useEffect(function(){s.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var u=im([e.lockRef.current],(e.shards||[]).map(sl),!0).filter(Boolean);return u.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),u.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=E.useCallback(function(u,g){if("touches"in u&&u.touches.length===2||u.type==="wheel"&&u.ctrlKey)return!s.current.allowPinchZoom;var b=Bn(u),v=r.current,k="deltaX"in u?u.deltaX:v[0]-b[0],_="deltaY"in u?u.deltaY:v[1]-b[1],S,O=u.target,z=Math.abs(k)>Math.abs(_)?"h":"v";if("touches"in u&&z==="h"&&O.type==="range")return!1;var I=window.getSelection(),D=I&&I.anchorNode,U=D?D===O||D.contains(O):!1;if(U)return!1;var H=rl(z,O);if(!H)return!0;if(H?S=z:(S=z==="v"?"h":"v",H=rl(z,O)),!H)return!1;if(!n.current&&"changedTouches"in u&&(k||_)&&(n.current=S),!S)return!0;var C=n.current||S;return Pm(C,g,u,C==="h"?k:_)},[]),l=E.useCallback(function(u){var g=u;if(!(!er.length||er[er.length-1]!==i)){var b="deltaY"in g?il(g):Bn(g),v=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&Dm(S.delta,b)})[0];if(v&&v.should){g.cancelable&&g.preventDefault();return}if(!v){var k=(s.current.shards||[]).map(sl).filter(Boolean).filter(function(S){return S.contains(g.target)}),_=k.length>0?a(g,k[0]):!s.current.noIsolation;_&&g.cancelable&&g.preventDefault()}}},[]),c=E.useCallback(function(u,g,b,v){var k={name:u,delta:g,target:b,should:v,shadowParent:Fm(b)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(_){return _!==k})},1)},[]),d=E.useCallback(function(u){r.current=Bn(u),n.current=void 0},[]),f=E.useCallback(function(u){c(u.type,il(u),u.target,a(u,e.lockRef.current))},[]),m=E.useCallback(function(u){c(u.type,Bn(u),u.target,a(u,e.lockRef.current))},[]);E.useEffect(function(){return er.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(){er=er.filter(function(u){return u!==i}),document.removeEventListener("wheel",l,Qt),document.removeEventListener("touchmove",l,Qt),document.removeEventListener("touchstart",d,Qt)}},[]);var p=e.removeScrollBar,w=e.inert;return E.createElement(E.Fragment,null,w?E.createElement(i,{styles:Rm(o)}):null,p?E.createElement(Nm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Fm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Bm=hm(Ja,Lm);var ti=E.forwardRef(function(e,t){return E.createElement(Ln,st({},e,{ref:t,sideCar:Bm}))});ti.classNames=Ln.classNames;var Um=[" ","Enter","ArrowUp","ArrowDown"],$m=[" ","Enter"],It="Select",[Un,$n,Wm]=ap(It),[tr]=Er(It,[Wm,qt]),Wn=qt(),[Hm,kt]=tr(It),[Vm,Zm]=tr(It),al=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:p,form:w}=e,u=Wn(t),[g,b]=E.useState(null),[v,k]=E.useState(null),[_,S]=E.useState(!1),O=cp(c),[z,I]=In({prop:n,defaultProp:o??!1,onChange:i,caller:It}),[D,U]=In({prop:s,defaultProp:a,onChange:l,caller:It}),H=E.useRef(null),C=g?w||!!g.closest("form"):!0,[M,y]=E.useState(new Set),L=Array.from(M).map(ee=>ee.props.value).join(";");return h.jsx(Go,{...u,children:h.jsxs(Hm,{required:p,scope:t,trigger:g,onTriggerChange:b,valueNode:v,onValueNodeChange:k,valueNodeHasChildren:_,onValueNodeHasChildrenChange:S,contentId:Nr(),value:D,onValueChange:U,open:z,onOpenChange:I,dir:O,triggerPointerDownPosRef:H,disabled:m,children:[h.jsx(Un.Provider,{scope:t,children:h.jsx(Vm,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(ee=>{y(F=>new Set(F).add(ee))},[]),onNativeOptionRemove:E.useCallback(ee=>{y(F=>{const $=new Set(F);return $.delete(ee),$})},[]),children:r})}),C?h.jsxs(Nl,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:D,onChange:ee=>U(ee.target.value),disabled:m,form:w,children:[D===void 0?h.jsx("option",{value:""}):null,Array.from(M)]},L):null]})})};al.displayName=It;var ll="SelectTrigger",cl=E.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=Wn(r),s=kt(ll,r),a=s.disabled||n,l=Oe(t,s.onTriggerChange),c=$n(r),d=E.useRef("touch"),[f,m,p]=jl(u=>{const g=c().filter(k=>!k.disabled),b=g.find(k=>k.value===s.value),v=Al(g,u,b);v!==void 0&&s.onValueChange(v.value)}),w=u=>{a||(s.onOpenChange(!0),p()),u&&(s.triggerPointerDownPosRef.current={x:Math.round(u.pageX),y:Math.round(u.pageY)})};return h.jsx(Tn,{asChild:!0,...i,children:h.jsx(Te.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":zl(s.value)?"":void 0,...o,ref:l,onClick:ze(o.onClick,u=>{u.currentTarget.focus(),d.current!=="mouse"&&w(u)}),onPointerDown:ze(o.onPointerDown,u=>{d.current=u.pointerType;const g=u.target;g.hasPointerCapture(u.pointerId)&&g.releasePointerCapture(u.pointerId),u.button===0&&u.ctrlKey===!1&&u.pointerType==="mouse"&&(w(u),u.preventDefault())}),onKeyDown:ze(o.onKeyDown,u=>{const g=f.current!=="";!(u.ctrlKey||u.altKey||u.metaKey)&&u.key.length===1&&m(u.key),!(g&&u.key===" ")&&Um.includes(u.key)&&(w(),u.preventDefault())})})})});cl.displayName=ll;var dl="SelectValue",ul=E.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:s="",...a}=e,l=kt(dl,r),{onValueNodeHasChildrenChange:c}=l,d=i!==void 0,f=Oe(t,l.onValueNodeChange);return Be(()=>{c(d)},[c,d]),h.jsx(Te.span,{...a,ref:f,style:{pointerEvents:"none"},children:zl(l.value)?h.jsx(h.Fragment,{children:s}):i})});ul.displayName=dl;var Gm="SelectIcon",fl=E.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return h.jsx(Te.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});fl.displayName=Gm;var Km="SelectPortal",pl=e=>h.jsx(On,{asChild:!0,...e});pl.displayName=Km;var Pt="SelectContent",hl=E.forwardRef((e,t)=>{const r=kt(Pt,e.__scopeSelect),[n,o]=E.useState();if(Be(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?$r.createPortal(h.jsx(ml,{scope:e.__scopeSelect,children:h.jsx(Un.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),i):null}return h.jsx(gl,{...e,ref:t})});hl.displayName=Pt;var tt=10,[ml,_t]=tr(Pt),Ym="SelectContentImpl",qm=Vt("SelectContent.RemoveScroll"),gl=E.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:p,sticky:w,hideWhenDetached:u,avoidCollisions:g,...b}=e,v=kt(Pt,r),[k,_]=E.useState(null),[S,O]=E.useState(null),z=Oe(t,X=>_(X)),[I,D]=E.useState(null),[U,H]=E.useState(null),C=$n(r),[M,y]=E.useState(!1),L=E.useRef(!1);E.useEffect(()=>{if(k)return Ka(k)},[k]),sa();const ee=E.useCallback(X=>{const[oe,...de]=C().map(be=>be.ref.current),[se]=de.slice(-1),he=document.activeElement;for(const be of X)if(be===he||(be==null||be.scrollIntoView({block:"nearest"}),be===oe&&S&&(S.scrollTop=0),be===se&&S&&(S.scrollTop=S.scrollHeight),be==null||be.focus(),document.activeElement!==he))return},[C,S]),F=E.useCallback(()=>ee([I,k]),[ee,I,k]);E.useEffect(()=>{M&&F()},[M,F]);const{onOpenChange:$,triggerPointerDownPosRef:V}=v;E.useEffect(()=>{if(k){let X={x:0,y:0};const oe=se=>{var he,be;X={x:Math.abs(Math.round(se.pageX)-(((he=V.current)==null?void 0:he.x)??0)),y:Math.abs(Math.round(se.pageY)-(((be=V.current)==null?void 0:be.y)??0))}},de=se=>{X.x<=10&&X.y<=10?se.preventDefault():k.contains(se.target)||$(!1),document.removeEventListener("pointermove",oe),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",de,{capture:!0})}}},[k,$,V]),E.useEffect(()=>{const X=()=>$(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[$]);const[re,A]=jl(X=>{const oe=C().filter(he=>!he.disabled),de=oe.find(he=>he.ref.current===document.activeElement),se=Al(oe,X,de);se&&setTimeout(()=>se.ref.current.focus())}),P=E.useCallback((X,oe,de)=>{const se=!L.current&&!de;(v.value!==void 0&&v.value===oe||se)&&(D(X),se&&(L.current=!0))},[v.value]),Q=E.useCallback(()=>k==null?void 0:k.focus(),[k]),G=E.useCallback((X,oe,de)=>{const se=!L.current&&!de;(v.value!==void 0&&v.value===oe||se)&&H(X)},[v.value]),te=n==="popper"?ri:bl,pe=te===ri?{side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:w,hideWhenDetached:u,avoidCollisions:g}:{};return h.jsx(ml,{scope:r,content:k,viewport:S,onViewportChange:O,itemRefCallback:P,selectedItem:I,onItemLeave:Q,itemTextRefCallback:G,focusSelectedItem:F,selectedItemText:U,position:n,isPositioned:M,searchRef:re,children:h.jsx(ti,{as:qm,allowPinchZoom:!0,children:h.jsx(Io,{asChild:!0,trapped:v.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:ze(o,X=>{var oe;(oe=v.trigger)==null||oe.focus({preventScroll:!0}),X.preventDefault()}),children:h.jsx(wn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:h.jsx(te,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:X=>X.preventDefault(),...b,...pe,onPlaced:()=>y(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:ze(b.onKeyDown,X=>{const oe=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!oe&&X.key.length===1&&A(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let se=C().filter(he=>!he.disabled).map(he=>he.ref.current);if(["ArrowUp","End"].includes(X.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const he=X.target,be=se.indexOf(he);se=se.slice(be+1)}setTimeout(()=>ee(se)),X.preventDefault()}})})})})})})});gl.displayName=Ym;var Xm="SelectItemAlignedPosition",bl=E.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=kt(Pt,r),s=_t(Pt,r),[a,l]=E.useState(null),[c,d]=E.useState(null),f=Oe(t,z=>d(z)),m=$n(r),p=E.useRef(!1),w=E.useRef(!0),{viewport:u,selectedItem:g,selectedItemText:b,focusSelectedItem:v}=s,k=E.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&u&&g&&b){const z=i.trigger.getBoundingClientRect(),I=c.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),U=b.getBoundingClientRect();if(i.dir!=="rtl"){const he=U.left-I.left,be=D.left-he,_e=z.left-be,x=z.width+_e,K=Math.max(x,I.width),W=window.innerWidth-tt,T=Js(be,[tt,Math.max(tt,W-K)]);a.style.minWidth=x+"px",a.style.left=T+"px"}else{const he=I.right-U.right,be=window.innerWidth-D.right-he,_e=window.innerWidth-z.right-be,x=z.width+_e,K=Math.max(x,I.width),W=window.innerWidth-tt,T=Js(be,[tt,Math.max(tt,W-K)]);a.style.minWidth=x+"px",a.style.right=T+"px"}const H=m(),C=window.innerHeight-tt*2,M=u.scrollHeight,y=window.getComputedStyle(c),L=parseInt(y.borderTopWidth,10),ee=parseInt(y.paddingTop,10),F=parseInt(y.borderBottomWidth,10),$=parseInt(y.paddingBottom,10),V=L+ee+M+$+F,re=Math.min(g.offsetHeight*5,V),A=window.getComputedStyle(u),P=parseInt(A.paddingTop,10),Q=parseInt(A.paddingBottom,10),G=z.top+z.height/2-tt,te=C-G,pe=g.offsetHeight/2,X=g.offsetTop+pe,oe=L+ee+X,de=V-oe;if(oe<=G){const he=H.length>0&&g===H[H.length-1].ref.current;a.style.bottom="0px";const be=c.clientHeight-u.offsetTop-u.offsetHeight,_e=Math.max(te,pe+(he?Q:0)+be+F),x=oe+_e;a.style.height=x+"px"}else{const he=H.length>0&&g===H[0].ref.current;a.style.top="0px";const _e=Math.max(G,L+u.offsetTop+(he?P:0)+pe)+de;a.style.height=_e+"px",u.scrollTop=oe-G+u.offsetTop}a.style.margin=`${tt}px 0`,a.style.minHeight=re+"px",a.style.maxHeight=C+"px",n==null||n(),requestAnimationFrame(()=>p.current=!0)}},[m,i.trigger,i.valueNode,a,c,u,g,b,i.dir,n]);Be(()=>k(),[k]);const[_,S]=E.useState();Be(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const O=E.useCallback(z=>{z&&w.current===!0&&(k(),v==null||v(),w.current=!1)},[k,v]);return h.jsx(Qm,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:O,children:h.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:h.jsx(Te.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});bl.displayName=Xm;var Jm="SelectPopperPosition",ri=E.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=tt,...i}=e,s=Wn(r);return h.jsx(Ko,{...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)"}})});ri.displayName=Jm;var[Qm,ni]=tr(Pt,{}),oi="SelectViewport",vl=E.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=_t(oi,r),s=ni(oi,r),a=Oe(t,i.onViewportChange),l=E.useRef(0);return h.jsxs(h.Fragment,{children:[h.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}),h.jsx(Un.Slot,{scope:r,children:h.jsx(Te.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ze(o.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=s;if(m!=null&&m.current&&f){const p=Math.abs(l.current-d.scrollTop);if(p>0){const w=window.innerHeight-tt*2,u=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),b=Math.max(u,g);if(b<w){const v=b+p,k=Math.min(w,v),_=v-k;f.style.height=k+"px",f.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});vl.displayName=oi;var xl="SelectGroup",[eg,tg]=tr(xl),rg=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Nr();return h.jsx(eg,{scope:r,id:o,children:h.jsx(Te.div,{role:"group","aria-labelledby":o,...n,ref:t})})});rg.displayName=xl;var wl="SelectLabel",ng=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=tg(wl,r);return h.jsx(Te.div,{id:o.id,...n,ref:t})});ng.displayName=wl;var Hn="SelectItem",[og,yl]=tr(Hn),kl=E.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...s}=e,a=kt(Hn,r),l=_t(Hn,r),c=a.value===n,[d,f]=E.useState(i??""),[m,p]=E.useState(!1),w=Oe(t,v=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,v,n,o)}),u=Nr(),g=E.useRef("touch"),b=()=>{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 h.jsx(og,{scope:r,value:n,disabled:o,textId:u,isSelected:c,onItemTextChange:E.useCallback(v=>{f(k=>k||((v==null?void 0:v.textContent)??"").trim())},[]),children:h.jsx(Un.ItemSlot,{scope:r,value:n,disabled:o,textValue:d,children:h.jsx(Te.div,{role:"option","aria-labelledby":u,"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:ze(s.onFocus,()=>p(!0)),onBlur:ze(s.onBlur,()=>p(!1)),onClick:ze(s.onClick,()=>{g.current!=="mouse"&&b()}),onPointerUp:ze(s.onPointerUp,()=>{g.current==="mouse"&&b()}),onPointerDown:ze(s.onPointerDown,v=>{g.current=v.pointerType}),onPointerMove:ze(s.onPointerMove,v=>{var k;g.current=v.pointerType,o?(k=l.onItemLeave)==null||k.call(l):g.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ze(s.onPointerLeave,v=>{var k;v.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:ze(s.onKeyDown,v=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&v.key===" "||($m.includes(v.key)&&b(),v.key===" "&&v.preventDefault())})})})})});kl.displayName=Hn;var Ar="SelectItemText",_l=E.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,s=kt(Ar,r),a=_t(Ar,r),l=yl(Ar,r),c=Zm(Ar,r),[d,f]=E.useState(null),m=Oe(t,b=>f(b),l.onItemTextChange,b=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,b,l.value,l.disabled)}),p=d==null?void 0:d.textContent,w=E.useMemo(()=>h.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:u,onNativeOptionRemove:g}=c;return Be(()=>(u(w),()=>g(w)),[u,g,w]),h.jsxs(h.Fragment,{children:[h.jsx(Te.span,{id:l.textId,...i,ref:m}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?$r.createPortal(i.children,s.valueNode):null]})});_l.displayName=Ar;var Sl="SelectItemIndicator",Cl=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return yl(Sl,r).isSelected?h.jsx(Te.span,{"aria-hidden":!0,...n,ref:t}):null});Cl.displayName=Sl;var ii="SelectScrollUpButton",ig=E.forwardRef((e,t)=>{const r=_t(ii,e.__scopeSelect),n=ni(ii,e.__scopeSelect),[o,i]=E.useState(!1),s=Oe(t,n.onScrollButtonChange);return Be(()=>{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?h.jsx(El,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});ig.displayName=ii;var si="SelectScrollDownButton",sg=E.forwardRef((e,t)=>{const r=_t(si,e.__scopeSelect),n=ni(si,e.__scopeSelect),[o,i]=E.useState(!1),s=Oe(t,n.onScrollButtonChange);return Be(()=>{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?h.jsx(El,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});sg.displayName=si;var El=E.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=_t("SelectScrollButton",r),s=E.useRef(null),a=$n(r),l=E.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return E.useEffect(()=>()=>l(),[l]),Be(()=>{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]),h.jsx(Te.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ze(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:ze(o.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:ze(o.onPointerLeave,()=>{l()})})}),ag="SelectSeparator",lg=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return h.jsx(Te.div,{"aria-hidden":!0,...n,ref:t})});lg.displayName=ag;var ai="SelectArrow",cg=E.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Wn(r),i=kt(ai,r),s=_t(ai,r);return i.open&&s.position==="popper"?h.jsx(Yo,{...o,...n,ref:t}):null});cg.displayName=ai;var dg="SelectBubbleInput",Nl=E.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=E.useRef(null),i=Oe(n,o),s=Qh(t);return E.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]),h.jsx(Te.select,{...r,style:{...Va,...r.style},ref:i,defaultValue:t})});Nl.displayName=dg;function zl(e){return e===""||e===void 0}function jl(e){const t=Tt(e),r=E.useRef(""),n=E.useRef(0),o=E.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=E.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function Al(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=ug(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 ug(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var fg=al,Tl=cl,pg=ul,hg=fl,mg=pl,Ol=hl,gg=vl,Il=kl,bg=_l,vg=Cl;const xg=fg,wg=pg,Pl=E.forwardRef(({className:e,children:t,...r},n)=>h.jsxs(Tl,{ref:n,className:ye("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,h.jsx(hg,{asChild:!0,children:h.jsx(qr,{className:"h-3 w-3 shrink-0 text-zinc-400",strokeWidth:2})})]}));Pl.displayName=Tl.displayName;const Dl=E.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>h.jsx(mg,{children:h.jsx(Ol,{ref:o,className:ye("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:h.jsx(gg,{className:ye("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Dl.displayName=Ol.displayName;const Rl=E.forwardRef(({className:e,children:t,...r},n)=>h.jsxs(Il,{ref:n,className:ye("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:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(vg,{children:h.jsx(so,{className:"h-3 w-3",strokeWidth:2})})}),h.jsx(bg,{children:t})]}));Rl.displayName=Il.displayName;const Ml=E.createContext(null);function Ll(){const e=E.useContext(Ml);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function Fl({open:e,onOpenChange:t,children:r}){const[n,o]=E.useState(!1),i=e!==void 0,s=i?e:n,a=E.useCallback(c=>{i||o(c),t==null||t(c)},[i,t]),l=E.useMemo(()=>({open:s,onOpenChange:a}),[s,a]);return h.jsx(Ml.Provider,{value:l,children:r})}function yg({asChild:e,children:t}){const{onOpenChange:r}=Ll(),n=E.Children.only(t);return e&&E.isValidElement(n)?E.cloneElement(n,{onClick:o=>{var i,s;(s=(i=n.props).onClick)==null||s.call(i,o),r(!0)}}):h.jsx("button",{type:"button",onClick:()=>r(!0),children:t})}function Bl({className:e,children:t,preventCloseOnBackdropClick:r,...n}){const{open:o,onOpenChange:i}=Ll();if(E.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(h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:s,onDrop:s}),h.jsx("div",{role:"dialog","aria-modal":!0,className:ye("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 Ul({className:e,...t}){return h.jsx("div",{className:ye("flex flex-col gap-1.5 pb-4",e),...t})}function kg({className:e,...t}){return h.jsx("div",{className:ye("flex justify-end gap-2 pt-4",e),...t})}function $l({className:e,...t}){return h.jsx("h2",{className:ye("text-sm font-semibold text-white",e),...t})}function Wl({className:e,...t}){return h.jsx("p",{className:ye("text-xs text-zinc-400",e),...t})}const Ve=E.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?tp:"button";return h.jsx(c,{ref:i,type:"button",className:ye(s,a[t],l[r],e),...o})});Ve.displayName="Button";const _g=["library","upload","url"];function Sg({library:e,selectedId:t,onSelect:r}){const[n,o]=N.useState(""),[i,s]=N.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 h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"relative",children:[h.jsx(Bd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),h.jsx(zo,{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"})]}),h.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map(c=>h.jsx("button",{type:"button",onClick:()=>s(c),className:ye("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?h.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 h.jsxs("button",{type:"button",onClick:()=>r(d?null:c.id),className:ye("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:[h.jsx("img",{src:c.url,alt:c.alt,loading:"lazy",className:ye("w-full h-full object-cover transition-[filter] duration-150",d?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),h.jsx("div",{className:ye("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:h.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:c.alt})}),d&&h.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:h.jsx(so,{size:14,className:"text-white"})})]},c.id)})}):h.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 Cg({preview:e,onPreviewChange:t,onAssetUpload:r}){const[n,o]=N.useState(!1),i=N.useRef(null),s=N.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=p=>{var w;t({name:d.name,size:d.size,dataUrl:(w=p.target)==null?void 0:w.result})},m.readAsDataURL(d)}return}const f=new FileReader;f.onload=m=>{var p;t({name:d.name,size:d.size,dataUrl:(p=m.target)==null?void 0:p.result})},f.readAsDataURL(d)},[t,r]),a=N.useCallback(d=>{var m,p;d.preventDefault(),d.stopPropagation(),o(!1);const f=(p=(m=d.dataTransfer)==null?void 0:m.files)==null?void 0:p[0];f&&s(f)},[s]),l=N.useCallback(d=>{d.preventDefault(),d.stopPropagation(),o(!0)},[]),c=N.useCallback(d=>{var m;const f=(m=d.target.files)==null?void 0:m[0];f&&s(f)},[s]);return h.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:ye("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?h.jsxs(h.Fragment,{children:[h.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),h.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:[h.jsxs("div",{children:[h.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),h.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),h.jsx(Ve,{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:h.jsx(Jr,{size:14})})]})]}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:h.jsx(as,{size:22})}),h.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),h.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),h.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),h.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:c})]})}function Eg({urlPreview:e,onUrlPreviewChange:t}){const[r,n]=N.useState(""),[o,i]=N.useState(!1),s=()=>{if(r.trim())try{new URL(r),t(r),i(!1)}catch{i(!0),t(null)}};return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx(At,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(zo,{value:r,onChange:a=>{n(a.target.value),i(!1)},onKeyDown:a=>a.key==="Enter"&&s(),placeholder:"https://images.unsplash.com/photo-...",className:ye("h-8 text-xs bg-zinc-900/50 border-zinc-800",o&&"border-red-500/50")}),h.jsx(Ve,{type:"button",variant:"outline",onClick:s,className:"shrink-0 h-8",children:"Anteprima"})]}),o&&h.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?h.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[h.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),t(null)}}),h.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[h.jsx(so,{size:14,className:"text-emerald-400"}),h.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):o?null:h.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[h.jsx(is,{size:32,className:"mb-3 opacity-40"}),h.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const Ng=({open:e,onOpenChange:t,onSelect:r})=>{const{assets:n}=ur(),o=(n==null?void 0:n.assetsManifest)??[],[i,s]=N.useState("library"),[a,l]=N.useState(null),[c,d]=N.useState(null),[f,m]=N.useState(null);N.useEffect(()=>{e&&(s("library"),l(null),d(null),m(null))},[e]),N.useEffect(()=>{if(!e||i!=="upload")return;const b=()=>{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",b),()=>window.removeEventListener("beforeunload",b)},[e,i]),N.useEffect(()=>{if(!e||i!=="upload")return;const b=k=>{k.preventDefault()},v={capture:!0};return document.addEventListener("dragover",b,v),document.addEventListener("drop",b,v),window.addEventListener("dragover",b,v),window.addEventListener("drop",b,v),()=>{document.removeEventListener("dragover",b,v),document.removeEventListener("drop",b,v),window.removeEventListener("dragover",b,v),window.removeEventListener("drop",b,v)}},[e,i]);const p=i==="library"&&a!=null||i==="upload"&&c!=null||i==="url"&&f!=null,w=()=>{if(i==="library"&&a){const b=o.find(v=>v.id===a);b&&r({url:b.url,alt:b.alt})}else i==="upload"&&c?r({url:c.dataUrl,alt:c.name}):i==="url"&&f&&r({url:f,alt:""});setTimeout(()=>t(!1),0)},u=i==="library"&&a?"1 immagine selezionata":i==="upload"&&c?c.name:i==="url"&&f?"URL pronto":"Nessuna selezione",g=b=>{b.preventDefault(),b.stopPropagation()};return h.jsx(Fl,{open:e,onOpenChange:t,children:h.jsxs(Bl,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:g,onDrop:g,children:[h.jsxs(Ul,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:h.jsx(Xr,{size:18})}),h.jsxs("div",{children:[h.jsx($l,{children:"Image Picker"}),h.jsx(Wl,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),h.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:h.jsx(Lt,{size:18})})]}),h.jsx("div",{className:"flex border-b border-zinc-800",children:_g.map(b=>h.jsxs("button",{type:"button",onClick:()=>s(b),className:ye("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===b?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[b==="library"&&h.jsx(Xr,{size:14}),b==="upload"&&h.jsx(as,{size:14}),b==="url"&&h.jsx(is,{size:14}),b==="library"?"Libreria":b==="upload"?"Upload":"URL"]},b))}),h.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&h.jsx(Sg,{library:o,selectedId:a,onSelect:l}),i==="upload"&&h.jsx(Cg,{preview:c,onPreviewChange:d,onAssetUpload:n==null?void 0:n.onAssetUpload}),i==="url"&&h.jsx(Eg,{urlPreview:f,onUrlPreviewChange:m})]}),h.jsxs(kg,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[h.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:u}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Ve,{type:"button",variant:"outline",size:"sm",onClick:()=>t(!1),children:"Annulla"}),h.jsx(Ve,{type:"button",size:"sm",disabled:!p,onClick:w,className:ye(!p&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},Hl=(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}`},zg=({value:e,onChange:t,label:r="IMAGE",className:n})=>{const{tenantId:o="default"}=ur(),[i,s]=N.useState(!1),[a,l]=N.useState(!1),c=!!(e!=null&&e.url),d=e!=null&&e.url?Hl(e.url,o):"",f=p=>{t(p),s(!1)},m=p=>{p.stopPropagation(),t({url:"",alt:""})};return h.jsxs("div",{className:ye("space-y-1.5",n),children:[h.jsx(At,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),c?h.jsxs("div",{role:"button",tabIndex:0,onClick:()=>s(!0),onKeyDown:p=>p.key==="Enter"&&s(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:ye("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",a&&"ring-blue-500/40"),children:[h.jsx("img",{src:d,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:p=>{p.target.style.display="none"}}),h.jsx("div",{className:ye("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",a?"bg-black/50":"bg-black/0"),children:a&&h.jsxs(h.Fragment,{children:[h.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:[h.jsx(Fd,{size:13}),h.jsx("span",{children:"Cambia"})]}),h.jsx(Ve,{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:h.jsx(Jr,{size:13})})]})}),h.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)??""})]}):h.jsxs("button",{type:"button",onClick:()=>s(!0),className:ye("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:[h.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:h.jsx(Xr,{size:18})}),h.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),h.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),h.jsx(Ng,{open:i,onOpenChange:s,onSelect:f})]})},Vl=[{name:"layers",Icon:lo},{name:"github",Icon:Md},{name:"arrow-right",Icon:jd},{name:"box",Icon:Td},{name:"terminal",Icon:Hd},{name:"chevron-right",Icon:Od},{name:"menu",Icon:Ld},{name:"x",Icon:Lt},{name:"sparkles",Icon:$d},{name:"zap",Icon:Zd}],Vn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),rr={"ui:text":({label:e,value:t,onChange:r})=>h.jsxs("div",{className:"grid w-full items-center gap-2 mb-4",children:[h.jsx(At,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:Vn(e)}),h.jsx(zo,{type:"text",className:"h-9 text-[13px] bg-zinc-900/50 border-zinc-700 focus-visible:ring-blue-600",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:textarea":({label:e,value:t,onChange:r})=>h.jsxs("div",{className:"grid w-full gap-2 mb-4",children:[h.jsx(At,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:Vn(e)}),h.jsx(Jf,{className:"min-h-[96px] text-[13px] bg-zinc-900/50 border-zinc-700 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=[]})=>h.jsxs("div",{className:"grid w-full gap-2 mb-4",children:[h.jsx(At,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:Vn(e)}),h.jsxs(xg,{value:t||"",onValueChange:r,children:[h.jsx(Pl,{className:"w-full h-9 text-[13px] bg-zinc-900/50 border-zinc-700 focus:ring-blue-600",children:h.jsx(wg,{placeholder:"Select..."})}),h.jsx(Dl,{className:"dark",children:n.map(o=>h.jsx(Rl,{value:o,className:"text-[13px]",children:o},o))})]})]}),"ui:checkbox":({label:e,value:t,onChange:r})=>h.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2.5 rounded border border-zinc-700/60 bg-zinc-900/20",children:[h.jsx(Qf,{id:e,checked:!!t,onCheckedChange:n=>r(n===!0)}),h.jsx(At,{htmlFor:e,className:"text-[13px] font-medium cursor-pointer select-none text-zinc-200",children:Vn(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 h.jsx("div",{className:"mb-4",children:h.jsx(zg,{label:e,value:n,onChange:o})})},"ui:icon-picker":({label:e,value:t,onChange:r})=>{const[n,o]=N.useState(!1),i=Vl.find(s=>s.name===(t||""));return h.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[h.jsx(At,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),h.jsxs(Fl,{open:n,onOpenChange:o,children:[h.jsx(yg,{asChild:!0,children:h.jsx(Ve,{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?h.jsxs(h.Fragment,{children:[h.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),h.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):h.jsxs(h.Fragment,{children:[h.jsx(Xr,{size:16,className:"text-zinc-500 shrink-0"}),h.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),h.jsxs(Bl,{className:"sm:max-w-[280px] p-4",children:[h.jsxs(Ul,{children:[h.jsx($l,{className:"text-sm",children:"Choose icon"}),h.jsx(Wl,{className:"text-xs",children:"Click an icon to select it."})]}),h.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:Vl.map(({name:s,Icon:a})=>h.jsx("button",{type:"button",onClick:()=>{r(s),o(!1)},className:ye("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:h.jsx(a,{size:20})},s))})]})]})]})}},li=e=>{if(e instanceof Pe.z.ZodOptional||e instanceof Pe.z.ZodDefault)return li(e._def.innerType);if(e instanceof Pe.z.ZodObject){const t={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(t[r]=li(e.shape[r]));return t}return e instanceof Pe.z.ZodArray?[]:e instanceof Pe.z.ZodString?"":e instanceof Pe.z.ZodNumber?0:e instanceof Pe.z.ZodBoolean?!1:e instanceof Pe.z.ZodEnum?e._def.values[0]:null},Zn=e=>e instanceof Pe.z.ZodOptional||e instanceof Pe.z.ZodDefault||e instanceof Pe.z.ZodNullable?Zn(e._def.innerType):e,Zl=e=>{var n;const t=e;if(typeof e.description=="string"&&e.description.length>0)return e.description;if(typeof((n=t._def)==null?void 0:n.description)=="string"&&t._def.description.length>0)return t._def.description;const r=Zn(e);return r!==e?Zl(r):null},Gn=(e,t)=>e&&!t?"opacity-10":"opacity-100",nr=(e,t)=>e!=null&&t.toLowerCase()===e.toLowerCase(),ci=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),Tr=({schema:e,data:t,onChange:r,keys:n,expandedItemPath:o,onSidebarExpandedItemChange:i})=>{const s=e.shape,a=n!=null?Object.keys(s).filter(f=>n.includes(f)):Object.keys(s),l=o==null?void 0:o[0],c=(l==null?void 0:l.fieldKey)??null,d=c!=null;return h.jsx("div",{className:"space-y-4",children:a.map(f=>{const m=s[f];if(!m)return null;const p=Zn(m),w=Zl(m)||"ui:text",u=t[f];if(w==="ui:editorial-markdown")return null;if(w==="ui:image-picker"&&p instanceof Pe.z.ZodObject){const _=nr(c,f),S=rr["ui:image-picker"]||rr["ui:text"];return h.jsx("div",{className:`transition-opacity duration-200 ${Gn(d,_)}`,..._?{"data-jp-focused-field":f}:{},children:h.jsx(S,{label:f,value:u,onChange:O=>r({...t,[f]:O})})},f)}if(p instanceof Pe.z.ZodObject){const _=u||{},S=nr(c,f);return h.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 ${Gn(d,S)}`,...S?{"data-jp-focused-field":f}:{},children:[h.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[h.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),h.jsx("h4",{className:"text-[11px] font-semibold text-zinc-300 tracking-[0.02em]",children:ci(f)})]}),h.jsx(Tr,{schema:p,data:_,onChange:O=>r({...t,[f]:O}),expandedItemPath:o&&nr(l==null?void 0:l.fieldKey,f)?o.slice(1):void 0})]},f)}if(p instanceof Pe.z.ZodArray){const _=Array.isArray(u)?u:[],S=Zn(p.element),O=(U,H)=>{if(H<0||H>=_.length)return;const C=[..._],[M]=C.splice(U,1);C.splice(H,0,M),r({...t,[f]:C})},z=nr(c,f),D=nr(l==null?void 0:l.fieldKey,f)?l==null?void 0:l.itemId:void 0;return h.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${Gn(d,z)}`,...z?{"data-jp-focused-field":f}:{},children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("label",{className:"text-[12px] font-semibold text-zinc-300 tracking-[0.01em]",children:[ci(f)," (",_.length,")"]}),h.jsxs("button",{type:"button",onClick:()=>{const U=li(S);r({...t,[f]:[..._,U]})},className:"flex items-center gap-1 px-2.5 py-1.5 bg-blue-600/10 hover:bg-blue-600/20 text-blue-400 rounded text-[11px] font-semibold transition-colors",children:[h.jsx(co,{size:12})," Add Item"]})]}),h.jsx("div",{className:"space-y-2",children:_.map((U,H)=>{const C=U,M=C.id||`legacy-${H}`,y=(typeof C.title=="string"?C.title:null)||(typeof C.label=="string"?C.label:null)||(typeof C.name=="string"?C.name:null)||(typeof C.content=="string"?C.content:null)||(typeof C.text=="string"?C.text:null)||`${ci(f)} #${H+1}`,L=D,ee=String(C.id??M),F=L!=null&&String(L)===ee,$=F&&o&&o.length>1?o.slice(1):void 0,V=d&&z&&L!=null&&!F;return h.jsx(jg,{itemId:ee,openItemId:L!=null?String(L):void 0,isFaded:V,index:H,isFirst:H===0,isLast:H===_.length-1,label:y,onExpandedChange:i?re=>i(re?{fieldKey:f,itemId:ee}:null):void 0,onRemove:()=>{const re=_.filter((A,P)=>P!==H);r({...t,[f]:re})},onMoveUp:()=>O(H,H-1),onMoveDown:()=>O(H,H+1),children:S instanceof Pe.z.ZodObject?h.jsx(Tr,{schema:S,data:C||{},expandedItemPath:$,onChange:re=>{const A=[..._];A[H]=re,r({...t,[f]:A})}}):h.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},M)})})]},f)}const g=w in rr?w:"ui:text",b=rr[g]||rr["ui:text"],v=p instanceof Pe.z.ZodEnum?p._def.values:void 0,k=nr(c,f);return h.jsx("div",{className:`transition-opacity duration-200 ${Gn(d,k)}`,...k?{"data-jp-focused-field":f}:{},children:h.jsx(b,{label:f,value:u,options:v,onChange:_=>r({...t,[f]:_})})},f)})})},jg=({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,p]=N.useState(f);N.useEffect(()=>{t!=null&&(f&&!m&&p(!0),!f&&m&&p(!1))},[t,f,m]);const w=()=>{const g=!m;p(g),o==null||o(g)},u=f&&m;return h.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...u?{"data-jp-expanded-item":e}:{},children:[h.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[h.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:h.jsxs("button",{type:"button",onClick:w,className:"flex items-center gap-2 text-[12px] font-semibold text-zinc-200 tracking-[0.01em] truncate",children:[m?h.jsx(ao,{size:12,className:"shrink-0"}):h.jsx(qr,{size:12,className:"shrink-0"}),h.jsx("span",{className:"truncate",children:n})]})}),h.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[h.jsx("button",{type:"button",disabled:l,onClick:s,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:h.jsx(Ad,{size:12})}),h.jsx("button",{type:"button",disabled:c,onClick:a,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:h.jsx(zd,{size:12})}),h.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),h.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:h.jsx(Jr,{size:12})})]})]}),m&&h.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:d})]})};function Ag(e,t){return E.useReducer((r,n)=>t[r][n]??r,e)}var Or=e=>{const{present:t,children:r}=e,n=Tg(t),o=typeof r=="function"?r({present:n.isPresent}):E.Children.only(r),i=Oe(n.ref,Og(o));return typeof r=="function"||n.isPresent?E.cloneElement(o,{ref:i}):null};Or.displayName="Presence";function Tg(e){const[t,r]=E.useState(),n=E.useRef(null),o=E.useRef(e),i=E.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Ag(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=Kn(n.current);i.current=a==="mounted"?c:"none"},[a]),Be(()=>{const c=n.current,d=o.current;if(d!==e){const m=i.current,p=Kn(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Be(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=p=>{const u=Kn(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&u&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=p=>{p.target===t&&(i.current=Kn(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:E.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Kn(e){return(e==null?void 0:e.animationName)||"none"}function Og(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[Yn]=Er("Tooltip",[qt]),qn=qt(),Gl="TooltipProvider",Ig=700,di="tooltip.open",[Pg,ui]=Yn(Gl),Kl=e=>{const{__scopeTooltip:t,delayDuration:r=Ig,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,s=E.useRef(!0),a=E.useRef(!1),l=E.useRef(0);return E.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),h.jsx(Pg,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:E.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:E.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:E.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:i})};Kl.displayName=Gl;var Ir="Tooltip",[Dg,Pr]=Yn(Ir),Yl=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=ui(Ir,e.__scopeTooltip),c=qn(t),[d,f]=E.useState(null),m=Nr(),p=E.useRef(0),w=s??l.disableHoverableContent,u=a??l.delayDuration,g=E.useRef(!1),[b,v]=In({prop:n,defaultProp:o??!1,onChange:z=>{z?(l.onOpen(),document.dispatchEvent(new CustomEvent(di))):l.onClose(),i==null||i(z)},caller:Ir}),k=E.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),_=E.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),S=E.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),O=E.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},u)},[u,v]);return E.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),h.jsx(Go,{...c,children:h.jsx(Dg,{scope:t,contentId:m,open:b,stateAttribute:k,trigger:d,onTriggerChange:f,onTriggerEnter:E.useCallback(()=>{l.isOpenDelayedRef.current?O():_()},[l.isOpenDelayedRef,O,_]),onTriggerLeave:E.useCallback(()=>{w?S():(window.clearTimeout(p.current),p.current=0)},[S,w]),onOpen:_,onClose:S,disableHoverableContent:w,children:r})})};Yl.displayName=Ir;var fi="TooltipTrigger",ql=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Pr(fi,r),i=ui(fi,r),s=qn(r),a=E.useRef(null),l=Oe(t,a,o.onTriggerChange),c=E.useRef(!1),d=E.useRef(!1),f=E.useCallback(()=>c.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),h.jsx(Tn,{asChild:!0,...s,children:h.jsx(Te.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:ze(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:ze(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:ze(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ze(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:ze(e.onBlur,o.onClose),onClick:ze(e.onClick,o.onClose)})})});ql.displayName=fi;var pi="TooltipPortal",[Rg,Mg]=Yn(pi,{forceMount:void 0}),Xl=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Pr(pi,t);return h.jsx(Rg,{scope:t,forceMount:r,children:h.jsx(Or,{present:r||i.open,children:h.jsx(On,{asChild:!0,container:o,children:n})})})};Xl.displayName=pi;var or="TooltipContent",Jl=E.forwardRef((e,t)=>{const r=Mg(or,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,s=Pr(or,e.__scopeTooltip);return h.jsx(Or,{present:n||s.open,children:s.disableHoverableContent?h.jsx(Ql,{side:o,...i,ref:t}):h.jsx(Lg,{side:o,...i,ref:t})})}),Lg=E.forwardRef((e,t)=>{const r=Pr(or,e.__scopeTooltip),n=ui(or,e.__scopeTooltip),o=E.useRef(null),i=Oe(t,o),[s,a]=E.useState(null),{trigger:l,onClose:c}=r,d=o.current,{onPointerInTransitChange:f}=n,m=E.useCallback(()=>{a(null),f(!1)},[f]),p=E.useCallback((w,u)=>{const g=w.currentTarget,b={x:w.clientX,y:w.clientY},v=Wg(b,g.getBoundingClientRect()),k=Hg(b,v),_=Vg(u.getBoundingClientRect()),S=Gg([...k,..._]);a(S),f(!0)},[f]);return E.useEffect(()=>()=>m(),[m]),E.useEffect(()=>{if(l&&d){const w=g=>p(g,d),u=g=>p(g,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",u),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",u)}}},[l,d,p,m]),E.useEffect(()=>{if(s){const w=u=>{const g=u.target,b={x:u.clientX,y:u.clientY},v=(l==null?void 0:l.contains(g))||(d==null?void 0:d.contains(g)),k=!Zg(b,s);v?m():k&&(m(),c())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,s,c,m]),h.jsx(Ql,{...e,ref:i})}),[Fg,Bg]=Yn(Ir,{isInside:!1}),Ug=np("TooltipContent"),Ql=E.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=Pr(or,r),c=qn(r),{onClose:d}=l;return E.useEffect(()=>(document.addEventListener(di,d),()=>document.removeEventListener(di,d)),[d]),E.useEffect(()=>{if(l.trigger){const f=m=>{const p=m.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),h.jsx(wn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:h.jsxs(Ko,{"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:[h.jsx(Ug,{children:n}),h.jsx(Fg,{scope:r,isInside:!0,children:h.jsx(tm,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Jl.displayName=or;var ec="TooltipArrow",$g=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=qn(r);return Bg(ec,r).isInside?null:h.jsx(Yo,{...o,...n,ref:t})});$g.displayName=ec;function Wg(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 Hg(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 Vg(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 Zg(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 Gg(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),Kg(t)}function Kg(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 Yg=Kl,qg=Yl,Xg=ql,Jg=Xl,tc=Jl;const Qg=Yg,Dr=qg,Rr=Xg,ir=E.forwardRef(({className:e,sideOffset:t=4,...r},n)=>h.jsx(Jg,{children:h.jsx(tc,{ref:n,sideOffset:t,className:ye("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})}));ir.displayName=tc.displayName;var Xn="Popover",[rc]=Er(Xn,[qt]),Mr=qt(),[e0,St]=rc(Xn),nc=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=Mr(t),l=E.useRef(null),[c,d]=E.useState(!1),[f,m]=In({prop:n,defaultProp:o??!1,onChange:i,caller:Xn});return h.jsx(Go,{...a,children:h.jsx(e0,{scope:t,contentId:Nr(),triggerRef:l,open:f,onOpenChange:m,onOpenToggle:E.useCallback(()=>m(p=>!p),[m]),hasCustomAnchor:c,onCustomAnchorAdd:E.useCallback(()=>d(!0),[]),onCustomAnchorRemove:E.useCallback(()=>d(!1),[]),modal:s,children:r})})};nc.displayName=Xn;var oc="PopoverAnchor",t0=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=St(oc,r),i=Mr(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=o;return E.useEffect(()=>(s(),()=>a()),[s,a]),h.jsx(Tn,{...i,...n,ref:t})});t0.displayName=oc;var ic="PopoverTrigger",sc=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=St(ic,r),i=Mr(r),s=Oe(t,o.triggerRef),a=h.jsx(Te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":uc(o.open),...n,ref:s,onClick:ze(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:h.jsx(Tn,{asChild:!0,...i,children:a})});sc.displayName=ic;var hi="PopoverPortal",[r0,n0]=rc(hi,{forceMount:void 0}),ac=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=St(hi,t);return h.jsx(r0,{scope:t,forceMount:r,children:h.jsx(Or,{present:r||i.open,children:h.jsx(On,{asChild:!0,container:o,children:n})})})};ac.displayName=hi;var sr="PopoverContent",lc=E.forwardRef((e,t)=>{const r=n0(sr,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=St(sr,e.__scopePopover);return h.jsx(Or,{present:n||i.open,children:i.modal?h.jsx(i0,{...o,ref:t}):h.jsx(s0,{...o,ref:t})})});lc.displayName=sr;var o0=Vt("PopoverContent.RemoveScroll"),i0=E.forwardRef((e,t)=>{const r=St(sr,e.__scopePopover),n=E.useRef(null),o=Oe(t,n),i=E.useRef(!1);return E.useEffect(()=>{const s=n.current;if(s)return Ka(s)},[]),h.jsx(ti,{as:o0,allowPinchZoom:!0,children:h.jsx(cc,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ze(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),i.current||(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ze(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:ze(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),s0=E.forwardRef((e,t)=>{const r=St(sr,e.__scopePopover),n=E.useRef(!1),o=E.useRef(!1);return h.jsx(cc,{...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()}})}),cc=E.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(sr,r),p=Mr(r);return sa(),h.jsx(Io,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:h.jsx(wn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>m.onOpenChange(!1),children:h.jsx(Ko,{"data-state":uc(m.open),role:"dialog",id:m.contentId,...p,...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)"}})})})}),dc="PopoverClose",a0=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=St(dc,r);return h.jsx(Te.button,{type:"button",...n,ref:t,onClick:ze(e.onClick,()=>o.onOpenChange(!1))})});a0.displayName=dc;var l0="PopoverArrow",c0=E.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Mr(r);return h.jsx(Yo,{...o,...n,ref:t})});c0.displayName=l0;function uc(e){return e?"open":"closed"}var d0=nc,u0=sc,f0=ac,fc=lc;const p0=d0,h0=u0,pc=E.forwardRef(({className:e,align:t="start",sideOffset:r=6,...n},o)=>h.jsx(f0,{children:h.jsx(fc,{ref:o,align:t,sideOffset:r,className:ye("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})}));pc.displayName=fc.displayName;const hc=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"Select page",m0=({pageSlugs:e,currentSlug:t,onPageChange:r,sectionCount:n,onNewPage:o,className:i,currentPageLabel:s})=>{const[a,l]=N.useState(!1),c=s??hc(t),d=f=>{r(f),l(!1)};return h.jsx("div",{className:ye("mx-3 mt-2 mb-2",i),children:h.jsxs(p0,{open:a,onOpenChange:l,children:[h.jsx(h0,{asChild:!0,children:h.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-label":`Select page, current: ${c}`,className:ye("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:[h.jsx(Rd,{size:14,className:"shrink-0 text-zinc-500","aria-hidden":!0}),h.jsx("span",{className:"text-xs font-medium flex-1 truncate",children:c}),h.jsx(qr,{size:13,className:"shrink-0 text-zinc-500","aria-hidden":!0})]})}),h.jsxs(pc,{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,p=hc(f);return h.jsxs("button",{type:"button",role:"option","aria-selected":m,onClick:()=>d(f),className:ye("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:[h.jsx("span",{children:p}),n!=null&&h.jsxs("span",{className:"text-[10px] text-zinc-600 tabular-nums","aria-hidden":!0,children:[n,"s"]})]},f)}),o!=null&&h.jsx("div",{className:"border-t border-zinc-800 mt-1 pt-1",children:h.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:[h.jsx(co,{size:12,"aria-hidden":!0}),h.jsx("span",{children:"New page"})]})})]})]})})},mi=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),mc=new Set(["ui:editorial-markdown"]),gc=e=>e instanceof Pe.z.ZodOptional||e instanceof Pe.z.ZodDefault||e instanceof Pe.z.ZodNullable?gc(e._def.innerType):e,gi=e=>{var i;if(!e)return"";const t=e,r=typeof e.description=="string"?e.description:null;if(r)return r;const n=typeof((i=t._def)==null?void 0:i.description)=="string"?t._def.description:null;if(n)return n;const o=gc(e);return o!==e?gi(o):""},bi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),g0={activationConstraint:{distance:8}},b0={activationConstraint:{delay:200,tolerance:5}};function vi({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 h.jsxs("div",{className:ye("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?h.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:h.jsx(os,{size:12,className:"text-zinc-600"})}):h.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 pointer-events-none",children:h.jsx(os,{size:12,className:"text-zinc-600/50"})}),h.jsxs("button",{type:"button",onClick:a,className:"flex-1 min-w-0 text-left",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("span",{className:ye("text-xs font-bold uppercase tracking-[0.06em] truncate",n?"text-primary":"text-zinc-500"),children:e.type}),o&&h.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),h.jsx("span",{className:"text-[11px] text-zinc-600 block truncate leading-snug mt-0.5",children:e.title??`${e.type} section`})]}),h.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[h.jsxs(Dr,{children:[h.jsx(Rr,{asChild:!0,children:h.jsx(Ve,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-zinc-300",onClick:f=>{f.stopPropagation(),l(f)},children:h.jsx(Ud,{size:12})})}),h.jsx(ir,{children:"Settings"})]}),s&&h.jsxs(Dr,{children:[h.jsx(Rr,{asChild:!0,children:h.jsx(Ve,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-destructive",onClick:f=>{f.stopPropagation(),c()},children:h.jsx(Jr,{size:12})})}),h.jsx(ir,{children:"Delete section"})]})]})]})}function v0({layer:e,opts:t}){const{attributes:r,listeners:n,setNodeRef:o,transform:i,transition:s,isDragging:a}=Gf({id:e.id,disabled:!t.canReorder}),l={transform:bt.Transform.toString(i),transition:s};return h.jsx("div",{ref:o,style:l,className:ye(a&&"z-10"),children:h.jsx(vi,{layer:e,opts:{...t,isDragging:a},dragHandleProps:t.canReorder?{...r,...n,"aria-roledescription":"elemento trascinabile"}:void 0})})}const bc=({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:p=!1,onSaveToFile:w,onHotSave:u,saveSuccessFeedback:g=!1,hotSaveSuccessFeedback:b=!1,hotSaveInProgress:v=!1,showLegacySave:k=!0,showHotSave:_=!1,onResetToFile:S,showResetToFile:O=!1,pageSlugs:z=[],currentSlug:I="home",onPageChange:D})=>{const{schemas:U}=ur(),[H,C]=N.useState(!0),[M,y]=N.useState(null),[L,ee]=N.useState(null),[F,$]=N.useState(null),[V,re]=N.useState(null),A=N.useRef(null),P=N.useRef(null),Q=vu(go(_o,g0),go(Os,b0),go(yo,{coordinateGetter:qf})),G=N.useDeferredValue(e),te=e!=null&&(G==null?void 0:G.id)!==e.id,pe=s&&s.length>0?s:F?[F]:null,X=pe!=null&&pe.length?{fieldKey:pe[pe.length-1].fieldKey,itemId:pe[pe.length-1].itemId}:null,oe=N.useRef(s);N.useEffect(()=>{oe.current!=null&&s==null&&$(null),oe.current=s},[s]),N.useEffect(()=>{(e==null?void 0:e.id)!=null&&C(!1)},[e==null?void 0:e.id]);const de=()=>{const Z=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const ce=A.current;ce&&ce.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(Z)},se=N.useRef(H);N.useEffect(()=>{if(H&&!se.current){const Z=de();return se.current=H,Z}se.current=H},[H]),N.useEffect(()=>{if(!X)return;const Z=A.current;if(!Z)return;const ce=requestAnimationFrame(()=>{const le=Z.querySelector("[data-jp-expanded-item]")??Z.querySelector("[data-jp-focused-field]");le&&le.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(ce)},[X]);const he=Z=>{C(!1),d==null||d(Z)},be=()=>{C(Z=>{const ce=!Z;return ce&&de(),ce})},_e=(Z,ce)=>{ce.stopPropagation(),r.length>0&&o?re(Z):(C(!1),d==null||d(Z))};N.useEffect(()=>{if(V==null)return;const Z=ce=>{ce.key==="Escape"&&re(null)};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[V]);const x=Z=>{M===Z?(f==null||f(Z),y(null)):(y(Z),setTimeout(()=>y(null),3e3))},K=N.useMemo(()=>l.filter(Z=>Z.scope==="local").map(Z=>Z.id),[l]),W=!!a&&K.length>0,T=Z=>{ee(Z.active.id)},j=Z=>{ee(null);const{active:ce,over:le}=Z;if(!le||ce.id===le.id||!a)return;const Y=l.findIndex(ve=>ve.id===ce.id),ae=l.findIndex(ve=>ve.id===le.id);if(Y===-1||ae===-1)return;const fe=Y<ae?ae:ae-1;a(ce.id,fe)},R=e?t.sections.find(Z=>Z.id===e.id):void 0,q=G?t.sections.find(Z=>Z.id===G.id):void 0,J=G?U[G.type]:void 0,B=N.useMemo(()=>{if(!J)return!1;const Z=J.shape,ce=Object.keys(Z).filter(le=>!mi.has(le));return ce.length===0?!1:ce.every(le=>mc.has(gi(Z[le])))},[J]);N.useEffect(()=>{(e==null?void 0:e.id)!=null&&B&&C(!0)},[e==null?void 0:e.id,B]);const ne=l.length>0&&(H||!e),ue=I?I.charAt(0).toUpperCase()+I.slice(1):"Select page",ie=N.useMemo(()=>{const Z=[];let ce=null;for(const le of l){const Y=le.type.toUpperCase(),ae=ce!==null&&(ce==="HEADER"&&Y!=="HEADER"||ce!=="HEADER"&&ce!=="FOOTER"&&Y==="FOOTER");Z.push({layer:le,showSeparatorAbove:ae}),ce=Y}return Z},[l]);return h.jsx(Qg,{children:h.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:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{className:"text-sm font-bold text-white",children:"Inspector"}),h.jsx("p",{className:"text-[10px] tracking-[0.06em] text-zinc-600 mt-0.5",children:e?h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-primary font-bold",children:e.type}),h.jsx("span",{className:"text-zinc-700 mx-1.5",children:"|"}),h.jsx("span",{className:"uppercase",children:e.scope})]}):h.jsxs("span",{className:"text-zinc-600",children:[ue," · ",l.length," sections"]})})]}),h.jsx(Ve,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":"Close Inspector",children:h.jsx(Lt,{size:14})})]}),z.length>0&&D&&h.jsx(m0,{pageSlugs:z,currentSlug:I,onPageChange:D,sectionCount:l.length,currentPageLabel:ue}),l.length>0&&h.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-t border-zinc-800/50",children:[h.jsxs("button",{type:"button",onClick:be,className:"flex items-center gap-2 flex-1 cursor-pointer min-w-0 text-left","aria-expanded":ne,"aria-label":ne?"Collapse Page Layers":"Expand Page Layers",children:[h.jsx(lo,{size:14,className:"text-zinc-500 shrink-0"}),h.jsx("span",{className:"text-[11px] font-semibold tracking-[0.04em] text-zinc-400",children:"Page Layers"}),h.jsxs("span",{className:"text-[10px] text-zinc-600",children:["(",l.length,")"]}),h.jsx(ao,{size:13,className:ye("ml-auto text-zinc-600 transition-transform duration-200 shrink-0",!H&&"rotate-180")})]}),m!=null&&h.jsxs(Dr,{children:[h.jsx(Rr,{asChild:!0,children:h.jsx(Ve,{variant:"ghost",size:"icon-sm",className:"text-zinc-500 hover:text-primary",onClick:m,children:h.jsx(co,{size:14})})}),h.jsx(ir,{children:"Add section"})]})]}),h.jsx("div",{className:"relative flex-1 min-h-0 min-w-0 flex flex-col overflow-hidden",children:h.jsxs("div",{ref:A,className:"min-h-0 min-w-0 flex-1 overflow-y-auto overflow-x-hidden flex flex-col",role:"region","aria-label":"Inspector content",children:[h.jsx("div",{className:"flex flex-col min-h-0",children:ne&&h.jsxs("div",{className:"py-1",children:[h.jsxs(gf,{sensors:Q,collisionDetection:yu,modifiers:[Pf],onDragStart:T,onDragEnd:j,accessibility:{announcements:{onDragStart:()=>"Sezione presa in carico. Usa i tasti freccia per spostare, Spazio per rilasciare.",onDragOver:({over:Z})=>Z?`Posizione ${K.indexOf(String(Z.id))+1} di ${K.length}.`:void 0,onDragEnd:({over:Z})=>Z?"Sezione rilasciata in nuova posizione.":"Riposizionamento annullato.",onDragCancel:()=>"Riposizionamento annullato."}},children:[h.jsx(Bf,{items:K,strategy:Lf,children:h.jsx("div",{className:"px-2 space-y-0.5",children:ie.map(({layer:Z,showSeparatorAbove:ce})=>h.jsxs(N.Fragment,{children:[ce&&h.jsx("div",{className:"mx-3 border-t border-zinc-800/60 my-1"}),Z.scope==="local"&&W?h.jsx(v0,{layer:Z,opts:{isSelected:(e==null?void 0:e.id)===Z.id,isActive:c===Z.id,isDragging:!1,canReorder:!0,canDelete:!!f,deleteConfirm:M===Z.id,onSelect:()=>he(Z.id),onDelete:()=>x(Z.id),onOpenSettings:le=>_e(Z.id,le)}}):h.jsx("div",{children:h.jsx(vi,{layer:Z,opts:{isSelected:(e==null?void 0:e.id)===Z.id,isActive:c===Z.id,isDragging:!1,canDelete:Z.scope==="local"&&!!f,deleteConfirm:M===Z.id,onSelect:()=>he(Z.id),onDelete:()=>x(Z.id),onOpenSettings:le=>_e(Z.id,le)}})})]},Z.id))})}),h.jsx(If,{dropAnimation:{duration:200,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:L?(()=>{const Z=l.find(ce=>ce.id===L);return Z?h.jsx("div",{className:"px-2 w-full max-w-[var(--inspector-width,280px)]",children:h.jsx(vi,{layer:Z,opts:{isSelected:!1,isActive:!1,isDragging:!0,canDelete:!1,deleteConfirm:!1,onSelect:()=>{},onDelete:()=>{},onOpenSettings:()=>{}},dragHandleProps:{"aria-hidden":!0}})}):null})():null})]}),M&&h.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:[h.jsx(Id,{size:12,className:"text-amber-500 shrink-0"}),h.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]})}),X&&R&&(()=>{const Z=R.data||{};let ce;if(pe&&pe.length>0){let le=Z;for(const fe of pe){const ve=le==null?void 0:le[fe.fieldKey];fe.itemId!=null&&Array.isArray(ve)?le=ve.find(we=>String(we==null?void 0:we.id)===String(fe.itemId))??null:le=ve}const Y=le||{},ae=X.fieldKey;ce=(typeof Y.name=="string"?Y.name:null)??(typeof Y.title=="string"?Y.title:null)??(typeof Y.label=="string"?Y.label:null)??bi(ae)}else{const le=X.fieldKey;if(X.itemId!=null){const fe=(Array.isArray(Z[le])?Z[le]:[]).find(ve=>String(ve==null?void 0:ve.id)===String(X.itemId))||{};ce=(typeof fe.name=="string"?fe.name:null)??(typeof fe.title=="string"?fe.title:null)??(typeof fe.label=="string"?fe.label:null)??bi(le)}else ce=bi(le)}return h.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[h.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),h.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:ce})]})})(),h.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&C(!1),children:e?te?h.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[h.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),h.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),h.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),h.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),h.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):J?(()=>{const ce=Object.keys(J.shape).filter(Y=>!mi.has(Y)&&!mc.has(gi(J.shape[Y]))),le=(q==null?void 0:q.data)||{};return ce.length===0?h.jsx("p",{className:"text-xs text-zinc-500",children:"Inline editorial section: edit content directly on the canvas."}):h.jsx(Tr,{schema:J,data:le,onChange:Y=>n(Y),keys:ce,expandedItemPath:pe,onSidebarExpandedItemChange:$})})():h.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 ",(G==null?void 0:G.type)??e.type]}):h.jsx("p",{className:"text-xs text-zinc-600 text-center py-10",children:"Select a layer above or on the stage to edit."})})]})}),h.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center justify-between gap-3 opacity-100 shrink-0",children:(k&&w!=null||_&&u!=null||S!=null)&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h.jsx("div",{className:ye("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",p?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),h.jsx("span",{className:ye("text-sm font-medium transition-colors duration-300 truncate",g||b?"text-emerald-400":p?"text-amber-500":"text-zinc-500"),children:g||b?"Saved":p?"Unsaved Changes":"All Changes Saved"})]}),k&&w!=null&&h.jsxs(Dr,{children:[h.jsx(Rr,{asChild:!0,children:h.jsxs(Ve,{size:"default",disabled:!p,className:"h-9 min-w-[156px] px-5 text-sm gap-2 ml-auto",onClick:Z=>{Z.preventDefault(),Z.stopPropagation(),w()},children:[h.jsx(ss,{size:14}),h.jsx("span",{children:"Save"})]})}),h.jsx(ir,{children:"Save (export JSON)"})]}),_&&u!=null&&h.jsxs(Dr,{children:[h.jsx(Rr,{asChild:!0,children:h.jsxs(Ve,{size:"default",disabled:!p||v,className:"h-9 min-w-[156px] px-5 text-sm gap-2 ml-auto",onClick:Z=>{Z.preventDefault(),Z.stopPropagation(),u()},children:[h.jsx(ss,{size:14}),h.jsx("span",{children:v?"Saving...":"Hot Save"})]})}),h.jsx(ir,{children:"Hot save to edge"})]}),S!=null&&O&&h.jsx("button",{type:"button",onClick:S,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:h.jsx("span",{children:"Ripristina da file"})})]})}),V!=null&&r.length>0&&o!=null&&(()=>{const Z=r.find(we=>we.id===V),ce=l.find(we=>we.id===V);if(!Z)return null;const le=(ce==null?void 0:ce.scope)==="global"?"global":"local",Y=Z.type,ae=U[Y],ve=(ae?Object.keys(ae.shape):[]).filter(we=>mi.has(we)),xe=Z.data??{};return ve.length===0?h.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:()=>re(null),children:h.jsxs("div",{ref:P,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:we=>we.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[h.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",Y]}),h.jsx("button",{type:"button",onClick:()=>re(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:h.jsx(Lt,{size:18})})]}),h.jsx("div",{className:"p-4",children:h.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):h.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:we=>we.target===we.currentTarget&&re(null),children:h.jsxs("div",{ref:P,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:we=>we.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[h.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",Y]}),h.jsx("button",{type:"button",onClick:()=>re(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:h.jsx(Lt,{size:18})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:h.jsx(Tr,{schema:ae,data:xe,onChange:we=>{const Ee={...Z.data,...we};o(V,le,Y,Ee)},keys:ve})})]})})})()]})})},vc=({draft:e,globalDraft:t,menuConfig:r,themeConfig:n,slug:o,selectedId:i,scrollToSectionId:s,onScrollRequested:a})=>{const l=N.useRef(null),c=N.useCallback(()=>{var d;(d=l.current)!=null&&d.contentWindow&&l.current.contentWindow.postMessage({type:Ae.UPDATE_DRAFTS,draft:e,globalDraft:t,menuConfig:r,themeConfig:n},"*")},[e,t,r,n]);return N.useEffect(()=>{c()},[c]),N.useEffect(()=>{const d=f=>{f.data.type===Ae.STAGE_READY&&c()};return window.addEventListener("message",d),()=>window.removeEventListener("message",d)},[c]),N.useEffect(()=>{var d;(d=l.current)!=null&&d.contentWindow&&l.current.contentWindow.postMessage({type:Ae.SYNC_SELECTION,selectedId:i},"*")},[i]),N.useEffect(()=>{var d;!s||!((d=l.current)!=null&&d.contentWindow)||(l.current.contentWindow.postMessage({type:Ae.REQUEST_SCROLL_TO_SECTION,sectionId:s},"*"),a==null||a())},[s,a]),h.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:h.jsx("iframe",{ref:l,src:`/admin/preview/${o}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},xi=new Set;function x0(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function xc(e,t=[],r={}){return Object.entries(e).forEach(([n,o])=>{const i=[...t,x0(n)];if(typeof o=="string"||typeof o=="number"){r[`--theme-${i.join("-")}`]=String(o);return}o&&typeof o=="object"&&!Array.isArray(o)&&xc(o,i,r)}),r}function $e(e,t,r,n){n&&(e[t]=`var(${r})`)}function w0(e){const t=xc(e.tokens),r={...t};return $e(r,"--theme-primary","--theme-colors-primary",t["--theme-colors-primary"]),$e(r,"--theme-secondary","--theme-colors-secondary",t["--theme-colors-secondary"]),$e(r,"--theme-accent","--theme-colors-accent",t["--theme-colors-accent"]),$e(r,"--theme-background","--theme-colors-background",t["--theme-colors-background"]),$e(r,"--theme-surface","--theme-colors-surface",t["--theme-colors-surface"]),$e(r,"--theme-surface-alt","--theme-colors-surface-alt",t["--theme-colors-surface-alt"]),$e(r,"--theme-text","--theme-colors-text",t["--theme-colors-text"]),$e(r,"--theme-text-muted","--theme-colors-text-muted",t["--theme-colors-text-muted"]),$e(r,"--theme-border","--theme-colors-border",t["--theme-colors-border"]),$e(r,"--theme-font-primary","--theme-typography-font-family-primary",t["--theme-typography-font-family-primary"]),$e(r,"--theme-font-mono","--theme-typography-font-family-mono",t["--theme-typography-font-family-mono"]),$e(r,"--theme-font-display","--theme-typography-font-family-display",t["--theme-typography-font-family-display"]),$e(r,"--theme-radius-sm","--theme-border-radius-sm",t["--theme-border-radius-sm"]),$e(r,"--theme-radius-md","--theme-border-radius-md",t["--theme-border-radius-md"]),$e(r,"--theme-radius-lg","--theme-border-radius-lg",t["--theme-border-radius-lg"]),r}const Lr={setTheme:e=>{const t=document.documentElement,r=w0(e);xi.forEach(n=>{t.style.removeProperty(n)}),xi.clear(),Object.entries(r).forEach(([n,o])=>{t.style.setProperty(n,o),xi.add(n)})}};function y0(e,t){if(!t)return e;const r=e[e.length-1];return r&&r.itemId==null&&r.fieldKey===t?e:[...e,{fieldKey:t}]}function wc(e,t){var i,s,a;const r=[];let n=null,o=e;for(;o&&o!==t;){const l=(i=o.getAttribute)==null?void 0:i.call(o,"data-jp-item-id"),c=(s=o.getAttribute)==null?void 0:s.call(o,"data-jp-item-field");if(l&&c&&r.push({fieldKey:c,itemId:l}),n==null){const d=(a=o.getAttribute)==null?void 0:a.call(o,"data-jp-field");d&&(n=d)}o=o.parentElement}return r.reverse(),y0(r,n)}const k0='[data-jp-ignore-select="true"],[data-jp-interactive="true"],.ProseMirror,[contenteditable="true"],button,input,textarea,select,[role="button"],[role="menuitem"]',_0="[data-jp-field],[data-jp-item-id],[data-jp-item-field]",yc=()=>{var w;const[e,t]=N.useState(null),[r,n]=N.useState(null),[o,i]=N.useState({main:[]}),[s,a]=N.useState(null),[l,c]=N.useState(null),[d,f]=N.useState(!1);if(N.useEffect(()=>{const u=g=>{var b;if(!(g.origin!==window.location.origin||g.source!==window.parent)){if(g.data.type===Ae.UPDATE_DRAFTS&&(t(g.data.draft),n(g.data.globalDraft),(b=g.data.menuConfig)!=null&&b.main&&i({main:g.data.menuConfig.main}),g.data.themeConfig&&Lr.setTheme(g.data.themeConfig)),g.data.type===Ae.SYNC_SELECTION&&a(g.data.selectedId),g.data.type===Ae.REQUEST_SCROLL_TO_SECTION&&c(g.data.sectionId??null),g.data.type===Ae.REQUEST_INLINE_FLUSH){const v=typeof g.data.requestId=="string"?g.data.requestId:null;window.dispatchEvent(new CustomEvent(Ae.REQUEST_INLINE_FLUSH,{detail:{requestId:v}})),setTimeout(()=>{window.parent.postMessage({type:Ae.INLINE_FLUSHED,requestId:v},window.location.origin)},0)}g.data.type===Ae.REQUEST_CLEAN_HTML&&(f(!0),setTimeout(()=>{const v=document.documentElement.outerHTML;window.parent.postMessage({type:Ae.SEND_CLEAN_HTML,html:v},"*"),f(!1)},50))}};return window.addEventListener("message",u),window.parent.postMessage({type:Ae.STAGE_READY},"*"),()=>window.removeEventListener("message",u)},[]),N.useEffect(()=>{const u=v=>!!v.closest(_0),g=v=>!!(v.closest('[data-jp-ignore-select="true"]')||v.closest(k0)&&!u(v)||v.closest("a[href]")&&!u(v)),b=v=>{var L,ee,F;const k=v.target;if(g(k)){k.closest("a[href]")&&v.preventDefault();return}const _=v.clientX,S=v.clientY;let O=null,z=k;for(;z&&z!==document.body;){const $=(L=z.getAttribute)==null?void 0:L.call(z,"data-section-id"),V=(ee=z.getAttribute)==null?void 0:ee.call(z,"data-section-type"),re=(F=z.getAttribute)==null?void 0:F.call(z,"data-section-scope");if($&&V&&re){O=z;break}z=z.parentElement}if(!O)return;v.preventDefault(),v.stopPropagation();const I=O.getAttribute("data-section-id"),D=O.getAttribute("data-section-type"),U=O.getAttribute("data-section-scope");if(!I||!D||!U)return;const H={id:I,type:D,scope:U};if(k===O){window.parent.postMessage({type:Ae.SECTION_SELECT,section:H},"*");return}const C=document.elementFromPoint(_,S)??k;if(!C||!O.contains(C)){window.parent.postMessage({type:Ae.SECTION_SELECT,section:H},"*");return}if(C===O){window.parent.postMessage({type:Ae.SECTION_SELECT,section:H},"*");return}let M=wc(C,O);if(M.length===0&&C){let $=null;const V=re=>{var P,Q;const A=re.getBoundingClientRect();if(A.left<=_&&_<=A.right&&A.top<=S&&S<=A.bottom){for(let G=0;G<re.children.length;G++)V(re.children[G]);((P=re.getAttribute)!=null&&P.call(re,"data-jp-item-id")||(Q=re.getAttribute)!=null&&Q.call(re,"data-jp-field"))&&($=re)}};V(C),$&&(M=wc($,O))}const y={type:Ae.SECTION_SELECT,section:H};M.length>0&&(y.itemPath=M),window.parent.postMessage(y,"*")};return document.addEventListener("click",b,!0),()=>document.removeEventListener("click",b,!0)},[]),N.useEffect(()=>{if(!l)return;const u=setTimeout(()=>c(null),600);return()=>clearTimeout(u)},[l]),!e||!r)return h.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 m={main:tn((w=r.header)==null?void 0:w.data,o.main)},p=u=>{window.parent.postMessage({type:Ae.ACTIVE_SECTION_CHANGED,activeSectionId:u},"*")};return h.jsx(Yr,{mode:d?"visitor":"studio",children:h.jsx("div",{className:d?"":"jp-ice-active",children:h.jsx(fo,{pageConfig:e,siteConfig:r,menuConfig:m,selectedId:d?null:s,scrollToSectionId:l,onActiveSectionChange:p})})})};function S0(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(N.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])??S0(s);return h.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:[h.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:t,"aria-hidden":"true"}),h.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:[h.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:h.jsx(lo,{size:18})}),h.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),h.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:h.jsx(Lt,{size:18})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?h.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):h.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(s=>h.jsx("li",{role:"option",children:h.jsxs("button",{type:"button",onClick:()=>{o(s),t()},className:ye("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:[h.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}),h.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(s)})]})},s))})}),h.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:h.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=()=>h.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:[h.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),h.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),h.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"})]}),C0='/*! 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-\\[96px\\]{min-height:96px}.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-\\[156px\\]{min-width:156px}.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-x-hidden{overflow-x: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\\/60{border-color:#3f3f4699}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/60{border-color:color-mix(in oklab,var(--color-zinc-700)60%,transparent)}}.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\\.5{padding:calc(var(--spacing)*2.5)}.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}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.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\\.01em\\]{--tw-tracking:.01em;letter-spacing:.01em}.tracking-\\[0\\.02em\\]{--tw-tracking:.02em;letter-spacing:.02em}.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;--jp-inspector-label-size:11px;--jp-inspector-field-size:13px;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 E0 extends N.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?h.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:[h.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),h.jsx("pre",{style:{maxWidth:"100%",overflow:"auto",padding:16,backgroundColor:"rgba(0,0,0,0.3)",borderRadius:8,fontSize:12,marginTop:8},children:this.state.error.message})]}):this.props.children}}function Jn(e){return e.split("/").map(t=>t.trim()).filter(Boolean).join("/")}function Sc(e,t=""){const r=Jn(t);let o=e.replace(/\/+/g,"/");if(r){const s=`/${r}`;o===s?o="/":o.startsWith(`${s}/`)&&(o=o.slice(s.length))}return Jn(o)||"home"}function wi(e,t){const r=Jn(t)||"home";return e[r]}function yi(e,t){return tn(e,t)}const Cc=({pageRegistry:e,siteConfig:t,menuConfig:r,themeConfig:n,refDocuments:o,tenantCss:i,adminCss:s,NotFoundComponent:a})=>{const l=Ke.useLocation(),c=Sc(l.pathname),[d,f]=N.useState(null);N.useEffect(()=>{const v=document.getElementById("jp-baked-state");if(v!=null&&v.textContent)try{const k=JSON.parse(v.textContent);f(k),Lr.setTheme(k.theme)}catch(k){console.error("Failed to parse baked state",k)}},[]);const m=d?{[d.page.slug||c]:d.page}:e,p=d?d.site:t,w=d?d.menu:r,u=d?d.theme:n,g=N.useMemo(()=>Bt({pages:m,siteConfig:p,themeConfig:u,menuConfig:w,refDocuments:o}),[m,p,u,w,o]),b=d?g.pages[d.page.slug||c]:wi(g.pages,c);return N.useEffect(()=>{var v;try{(v=g.themeConfig)!=null&&v.tokens&&Lr.setTheme(g.themeConfig)}catch(k){console.warn("[JsonPages] visitor theme resolution failed",k)}},[g.themeConfig]),b?h.jsx(nn,{mode:"tenant",tenantCss:i,adminCss:s,children:h.jsx(Yr,{mode:"visitor",children:h.jsx(fo,{pageConfig:b,siteConfig:g.siteConfig,menuConfig:g.menuConfig})})}):h.jsx(a,{})},Ec=({pageRegistry:e,siteConfig:t,menuConfig:r,themeConfig:n,refDocuments:o,tenantCss:i,adminCss:s,addSectionConfig:a,addableSectionTypes:l,saveToFile:c,hotSave:d,showLegacySave:f=!0,showHotSave:m=!1,exportHTML:p})=>{const w=Ke.useLocation(),u=Sc(w.pathname,"admin"),g=Ke.useNavigate(),b=Object.keys(e).sort((Y,ae)=>Y==="home"?-1:ae==="home"?1:Y.localeCompare(ae)),[v,k]=N.useState(null),[_,S]=N.useState(!1),[O,z]=N.useState(!1),[I,D]=N.useState(!1),[U,H]=N.useState(!1),[C,M]=N.useState(()=>{try{const Y=JSON.parse(JSON.stringify(t??{}));return Y.identity||(Y.identity={title:"Site"}),Y.pages||(Y.pages=[]),Y}catch{return{identity:{title:"Site"},pages:[]}}}),[y,L]=N.useState(null),[ee,F]=N.useState(null),[$,V]=N.useState(null),[re,A]=N.useState(null),[P,Q]=N.useState(!1),[G,te]=N.useState(400),pe=N.useMemo(()=>Bt({pages:v?{[u]:v}:{},siteConfig:C,themeConfig:n,menuConfig:r,refDocuments:o}),[v,C,n,r,o,u]),X=v?pe.pages[u]??v:null,oe=N.useRef(v),de=N.useRef(C),se=360,he=920;N.useEffect(()=>{oe.current=v},[v]),N.useEffect(()=>{de.current=C},[C]);const be=N.useCallback(Y=>{Y.preventDefault();const ae=Y.currentTarget;ae.setPointerCapture(Y.pointerId);const fe=Y.clientX,ve=G,xe=Ee=>{const je=fe-Ee.clientX,ft=Math.min(he,Math.max(se,ve+je));te(ft)},we=()=>{ae.releasePointerCapture(Y.pointerId),ae.removeEventListener("pointermove",xe),ae.removeEventListener("pointerup",we),ae.removeEventListener("pointercancel",we),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",ae.addEventListener("pointermove",xe),ae.addEventListener("pointerup",we),ae.addEventListener("pointercancel",we)},[G]),_e=v?[...C.header?[{id:C.header.id,type:C.header.type,scope:"global",title:"Header"}]:[],...v.sections.map(Y=>{var ae,fe;return{id:Y.id,type:Y.type,scope:"local",title:((ae=Y.data)==null?void 0:ae.title)??((fe=Y.data)==null?void 0:fe.titleHighlight)}}),...C.footer?[{id:C.footer.id,type:C.footer.type,scope:"global",title:"Footer"}]:[]]:[];N.useEffect(()=>{const Y=wi(e,u);Y&&k(JSON.parse(JSON.stringify(Y))),L(null),F(null),S(!1)},[u,e]);const x=N.useCallback(()=>{const Y=wi(e,u);Y&&k(JSON.parse(JSON.stringify(Y))),L(null),F(null),S(!1)},[u,e]),K=N.useCallback((Y,ae,fe)=>{const ve=[...fe.sections],xe=ve.findIndex(je=>je.id===Y);if(xe===-1||ae<0||ae>=ve.length)return;const[we]=ve.splice(xe,1),Ee=ae>xe?ae-1:ae;ve.splice(Math.min(Ee,ve.length),0,we),k({...fe,sections:ve}),S(!0)},[]),W=N.useCallback(Y=>{var ae;if(Y.origin===window.location.origin){if(Y.data.type===Ae.SECTION_SELECT){L(Y.data.section);const fe=Y.data.itemPath;Array.isArray(fe)&&fe.length>0?F(fe.map(ve=>({fieldKey:ve.fieldKey,...ve.itemId!=null?{itemId:String(ve.itemId)}:{}}))):F(null)}if(Y.data.type===Ae.INLINE_FIELD_UPDATE){const fe=typeof Y.data.sectionId=="string"?Y.data.sectionId:null,ve=typeof Y.data.fieldKey=="string"?Y.data.fieldKey:null;fe&&ve&&(k(xe=>{if(!xe)return xe;const we={...xe,sections:xe.sections.map(Ee=>Ee.id===fe?{...Ee,data:{...Ee.data,[ve]:Y.data.value}}:Ee)};return oe.current=we,we}),S(!0))}if(Y.data.type===Ae.ACTIVE_SECTION_CHANGED&&V(Y.data.activeSectionId??null),Y.data.type==="jsonpages:section-reorder"&&oe.current){const{sectionId:fe,newIndex:ve}=Y.data;typeof fe=="string"&&typeof ve=="number"&&ve>=0&&K(fe,ve,oe.current)}if(Y.data.type===Ae.SEND_CLEAN_HTML){if(!oe.current)return;const fe=(ae=pe.siteConfig.header)==null?void 0:ae.data,ve={page:oe.current,site:de.current,menu:{main:yi(fe,r.main)},theme:pe.themeConfig};p(ve,u,Y.data.html),S(!1)}}},[u,K,p,pe.siteConfig,pe.themeConfig,r.main]);N.useEffect(()=>(window.addEventListener("message",W),()=>window.removeEventListener("message",W)),[W]);const T=N.useCallback(Y=>{const ae=_e.find(fe=>fe.id===Y);ae&&L({id:ae.id,type:ae.type,scope:ae.scope}),F(null),A(Y)},[_e]),j=N.useCallback(()=>{A(null)},[]),R=N.useCallback(Y=>{k(ae=>ae&&{...ae,sections:ae.sections.filter(fe=>fe.id!==Y)}),S(!0),L(ae=>(ae==null?void 0:ae.id)===Y?null:ae)},[]),q=Y=>{if(!(!y||!v))if(S(!0),y.scope==="global")y.type==="header"&&C.header!=null?M({...C,header:{...C.header,data:Y}}):y.type==="footer"&&C.footer!=null&&M({...C,footer:{...C.footer,data:Y}});else{const ae=v.sections.map(fe=>fe.id===y.id?{...fe,data:Y}:fe);k({...v,sections:ae})}},J=N.useCallback((Y,ae,fe,ve)=>{var xe,we;if(S(!0),ae==="global")((xe=C.header)==null?void 0:xe.id)===Y?M({...C,header:{...C.header,data:ve}}):((we=C.footer)==null?void 0:we.id)===Y&&M({...C,footer:{...C.footer,data:ve}});else if(v){const Ee=v.sections.map(je=>je.id===Y?{...je,data:ve}:je);k({...v,sections:Ee})}},[v,C]),B=()=>{var ae;const Y=document.querySelector("iframe");(ae=Y==null?void 0:Y.contentWindow)==null||ae.postMessage({type:Ae.REQUEST_CLEAN_HTML},"*")},ne=N.useCallback(async()=>{const Y=document.querySelector("iframe");if(!(Y!=null&&Y.contentWindow))return;const ae=crypto.randomUUID();await new Promise(fe=>{var we;let ve=!1;const xe=Ee=>{var je,ft;Ee.origin===window.location.origin&&((je=Ee.data)==null?void 0:je.type)===Ae.INLINE_FLUSHED&&((ft=Ee.data)==null?void 0:ft.requestId)===ae&&(ve=!0,window.removeEventListener("message",xe),fe())};window.addEventListener("message",xe),(we=Y.contentWindow)==null||we.postMessage({type:Ae.REQUEST_INLINE_FLUSH,requestId:ae},"*"),window.setTimeout(()=>{ve||(window.removeEventListener("message",xe),fe())},400)})},[]),ue=async()=>{var we;if(!c)return;await ne();const Y=oe.current,ae=de.current;if(!Y)return;const fe=Bt({pages:{[u]:Y},siteConfig:ae,themeConfig:n,menuConfig:r,refDocuments:o}),ve=(we=fe.siteConfig.header)==null?void 0:we.data,xe={page:Y,site:ae,menu:{main:yi(ve,r.main)},theme:fe.themeConfig};c(xe,u).then(()=>{S(!1),z(!0),typeof window<"u"&&window.setTimeout(()=>z(!1),2500)}).catch(Ee=>{console.error("[JsonPages] saveToFile failed",Ee);const je=Ee instanceof Error?Ee.message:String(Ee);alert(`Save to file failed: ${je}`)})},ie=async()=>{var we;if(!d)return;await ne();const Y=oe.current,ae=de.current;if(!Y)return;const fe=Bt({pages:{[u]:Y},siteConfig:ae,themeConfig:n,menuConfig:r,refDocuments:o}),ve=(we=fe.siteConfig.header)==null?void 0:we.data,xe={page:Y,site:ae,menu:{main:yi(ve,r.main)},theme:fe.themeConfig};H(!0),d(xe,u).then(()=>{S(!1),D(!0),typeof window<"u"&&window.setTimeout(()=>D(!1),2500)}).catch(Ee=>{console.error("[JsonPages] hotSave failed",Ee);const je=Ee instanceof Error?Ee.message:String(Ee);alert(`Hot save failed: ${je}`)}).finally(()=>{H(!1)})},Z=Y=>{var ve;if(!v)return;const ae=((ve=a==null?void 0:a.getDefaultSectionData)==null?void 0:ve.call(a,Y))??{},fe={id:crypto.randomUUID(),type:Y,data:ae,settings:void 0};k({...v,sections:[...v.sections,fe]}),S(!0),L({id:fe.id,type:Y,scope:"local"})};if(!v)return h.jsx("div",{children:"Loading Studio..."});const ce=(y==null?void 0:y.scope)==="global"?{sections:[C.header,C.footer].filter(Y=>Y!=null)}:v,le=[...C.header?[C.header]:[],...v.sections,...C.footer?[C.footer]:[]];return h.jsx(nn,{mode:"admin",tenantCss:i,adminCss:s,children:h.jsx(Yr,{mode:"studio",children:h.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[h.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[h.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:h.jsx(vc,{draft:X??v,globalDraft:pe.siteConfig,menuConfig:pe.menuConfig,themeConfig:pe.themeConfig,slug:u,selectedId:y==null?void 0:y.id,scrollToSectionId:re,onScrollRequested:j})}),h.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:G,minWidth:se,maxWidth:he},children:[h.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:be}),h.jsx(bc,{selectedSection:y,pageData:ce,allSectionsData:le,onUpdate:q,onUpdateSection:J,onClose:()=>{L(null),F(null)},expandedItemPath:ee,onReorderSection:v?(Y,ae)=>K(Y,ae,v):void 0,allLayers:_e,activeSectionId:$,onRequestScrollToSection:T,onDeleteSection:v?R:void 0,onAddSection:l.length>0?()=>Q(!0):void 0,hasChanges:_,onExportHTML:B,onSaveToFile:c!=null?ue:void 0,saveSuccessFeedback:O,onHotSave:d!=null?ie:void 0,hotSaveSuccessFeedback:I,hotSaveInProgress:U,showLegacySave:f,showHotSave:m,onResetToFile:x,pageSlugs:b,currentSlug:u,onPageChange:b.length>1?Y=>{const ae=Jn(Y);g(ae==="home"?"/admin":`/admin/${ae}`)}:void 0})]})]}),h.jsx(kc,{open:P,onClose:()=>Q(!1),sectionTypes:l,sectionTypeLabels:a==null?void 0:a.sectionTypeLabels,onSelect:Z})]})})})},Nc=({tenantCss:e,adminCss:t})=>h.jsx(nn,{mode:"tenant",tenantCss:e,adminCss:t,children:h.jsx(yc,{})});function N0({config:e}){var v,k,_,S,O,z;const{registry:t={},schemas:r={},pages:n={},siteConfig:o,themeConfig:i,menuConfig:s,refDocuments:a,themeCss:l,addSection:c,NotFoundComponent:d=_c}=e,f=(c==null?void 0:c.addableSectionTypes)??Object.keys(r).filter(I=>I!=="header"&&I!=="footer"),m={exportJSON:((v=e.persistence)==null?void 0:v.exportJSON)??Ai,exportHTML:((k=e.persistence)==null?void 0:k.exportHTML)??Ti,saveToFile:(_=e.persistence)==null?void 0:_.saveToFile,hotSave:(S=e.persistence)==null?void 0:S.hotSave,showLegacySave:((O=e.persistence)==null?void 0:O.showLegacySave)??!0,showHotSave:((z=e.persistence)==null?void 0:z.showHotSave)??!1},p=typeof(l==null?void 0:l.tenant)=="string"?l.tenant:"",w=typeof(l==null?void 0:l.admin)=="string"?l.admin:C0,u=N.useMemo(()=>Bt({pages:n,siteConfig:o,themeConfig:i,menuConfig:s,refDocuments:a}),[n,o,i,s,a]),[g,b]=N.useState(!1);return N.useEffect(()=>{var I;try{(I=u.themeConfig)!=null&&I.tokens&&Lr.setTheme(u.themeConfig)}catch(D){console.warn("[JsonPages] setTheme failed",D)}b(!0)},[u.themeConfig]),g?h.jsx(E0,{children:h.jsx(es,{config:{registry:t,schemas:r,tenantId:e.tenantId??"default",assets:e.assets,overlayDisabledSectionTypes:e.overlayDisabledSectionTypes},children:h.jsx(Ke.BrowserRouter,{children:h.jsxs(Ke.Routes,{children:[h.jsx(Ke.Route,{path:"/",element:h.jsx(Cc,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:u.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,NotFoundComponent:d})}),h.jsx(Ke.Route,{path:"/*",element:h.jsx(Cc,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:u.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,NotFoundComponent:d})}),h.jsx(Ke.Route,{path:"/admin",element:h.jsx(Ec,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:u.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,addSectionConfig:c,addableSectionTypes:f,saveToFile:m.saveToFile,hotSave:m.hotSave,showLegacySave:m.showLegacySave,showHotSave:m.showHotSave,exportHTML:m.exportHTML})}),h.jsx(Ke.Route,{path:"/admin/*",element:h.jsx(Ec,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:u.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,addSectionConfig:c,addableSectionTypes:f,saveToFile:m.saveToFile,hotSave:m.hotSave,showLegacySave:m.showLegacySave,showHotSave:m.showHotSave,exportHTML:m.exportHTML})}),h.jsx(Ke.Route,{path:"/admin/preview",element:h.jsx(Nc,{tenantCss:p,adminCss:w})}),h.jsx(Ke.Route,{path:"/admin/preview/*",element:h.jsx(Nc,{tenantCss:p,adminCss:w})}),h.jsx(Ke.Route,{path:"*",element:h.jsx(d,{})})]})})})}):h.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 z0=({hasChanges:e,onExportJSON:t,onExportHTML:r,onAddSection:n})=>h.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:[h.jsx("div",{className:"flex items-center gap-3",children:n!=null&&h.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:[h.jsx(Wd,{size:14}),h.jsx("span",{children:"Add section"})]})}),h.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:h.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.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:[h.jsx(Pd,{size:14}),h.jsx("span",{children:"Bake HTML"})]}),h.jsxs("button",{onClick:t,disabled:!e,className:ye("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:[h.jsx(Dd,{size:14}),h.jsx("span",{children:"Export JSON"})]})]})]});Se.AddSectionLibrary=kc,Se.AdminSidebar=bc,Se.ConfigProvider=es,Se.ControlBar=z0,Se.DefaultNotFound=_c,Se.FormFactory=Tr,Se.InputWidgets=rr,Se.JsonPagesEngine=N0,Se.PageRenderer=fo,Se.PreviewEntry=yc,Se.STUDIO_EVENTS=Ae,Se.SectionRenderer=fr,Se.StudioProvider=Yr,Se.StudioStage=vc,Se.ThemeLoader=nn,Se.cn=ye,Se.exportBakedHTML=Ti,Se.exportProjectJSON=Ai,Se.resolveAssetUrl=Hl,Se.resolveHeaderMenuItems=tn,Se.resolveRuntimeConfig=Bt,Se.resolveSectionMenuItems=rn,Se.shouldRenderSiteGlobalHeader=Ei,Se.themeManager=Lr,Se.useConfig=ur,Se.useStudio=rs,Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"})}));
|