iobroker.vis-2-widgets-inventwo 0.3.5 → 0.3.6

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.
Files changed (58) hide show
  1. package/README.md +3 -0
  2. package/io-package.json +14 -14
  3. package/package.json +1 -1
  4. package/widgets/vis-2-widgets-inventwo/assets/InventwoGeneric-CD9vu_cc.js +2 -0
  5. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetCheckbox-CoqgwpTy.js +2 -0
  6. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetSlider-DqUrwpd0.js +2 -0
  7. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetSwitch-D66oqkdK.js +2 -0
  8. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetTable-_LSfYw4B.js +2 -0
  9. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetUniversal-ChknruIC.js +12 -0
  10. package/widgets/vis-2-widgets-inventwo/assets/_commonjsHelpers-BujWM7Y5.js +2 -0
  11. package/widgets/vis-2-widgets-inventwo/assets/createSvgIcon-CxCg16Xx.js +2 -0
  12. package/widgets/vis-2-widgets-inventwo/assets/defaultTheme-DL-wasCI.js +17 -0
  13. package/widgets/vis-2-widgets-inventwo/assets/hostInit-CXLMYJ8s.js +3 -0
  14. package/widgets/vis-2-widgets-inventwo/assets/index-B7Dbx8oC.js +10 -0
  15. package/widgets/vis-2-widgets-inventwo/assets/index-BD-FQvN5.js +2 -0
  16. package/widgets/vis-2-widgets-inventwo/assets/{index-f8cx2lwt.js → index-CSZW0DpR.js} +3 -2
  17. package/widgets/vis-2-widgets-inventwo/assets/index-CZmEcmpB.js +2 -0
  18. package/widgets/vis-2-widgets-inventwo/assets/{index-C-Jo2qj7.js → index-CaPX8dkd.js} +3 -2
  19. package/widgets/vis-2-widgets-inventwo/assets/index-CheqdL9m.js +2 -0
  20. package/widgets/vis-2-widgets-inventwo/assets/{index-DE3vXMUF.js → index-CtldE_Jt.js} +10 -9
  21. package/widgets/vis-2-widgets-inventwo/assets/jsx-runtime-Dt7ToRAj.js +10 -0
  22. package/widgets/vis-2-widgets-inventwo/assets/preload-helper-47hLtgXP.js +2 -0
  23. package/widgets/vis-2-widgets-inventwo/assets/styled-B53MEpUW.js +8 -0
  24. package/widgets/vis-2-widgets-inventwo/assets/tableRowClasses-BB2m7w67.js +2 -0
  25. package/widgets/vis-2-widgets-inventwo/assets/translations-eYsfgiMl.js +2 -0
  26. package/widgets/vis-2-widgets-inventwo/assets/tslib.es6-bbV-5QUe.js +2 -0
  27. package/widgets/vis-2-widgets-inventwo/assets/useTheme-D6kRSJ_1.js +2 -0
  28. package/widgets/vis-2-widgets-inventwo/assets/virtualExposes-BGZiKeMG.js +3 -0
  29. package/widgets/vis-2-widgets-inventwo/assets/vis2Inventwo__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DabLVWRI.js +2 -0
  30. package/widgets/vis-2-widgets-inventwo/assets/vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-CwpbEbbN.js +2 -0
  31. package/widgets/vis-2-widgets-inventwo/assets/vis2Inventwo__loadShare__react__loadShare__-CvH99W-I.js +2 -0
  32. package/widgets/vis-2-widgets-inventwo/assets/{vis2Inventwo__mf_v__runtimeInit__mf_v__-2uL955SU.js → vis2Inventwo__mf_v__runtimeInit__mf_v__-C3oMM7wE.js} +5 -4
  33. package/widgets/vis-2-widgets-inventwo/customWidgets.js +3 -2
  34. package/widgets/vis-2-widgets-inventwo/assets/InventwoGeneric-D4TSslP6.js +0 -1
  35. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetCheckbox-DX3ORFGc.js +0 -1
  36. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetSlider-ejvLhAV-.js +0 -1
  37. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetSwitch-CdAAoW2d.js +0 -1
  38. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetTable-t3jwKHkf.js +0 -1
  39. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetUniversal-slNNWeZP.js +0 -11
  40. package/widgets/vis-2-widgets-inventwo/assets/_commonjsHelpers-B_uApUQq.js +0 -1
  41. package/widgets/vis-2-widgets-inventwo/assets/createSvgIcon-BVtBa_de.js +0 -1
  42. package/widgets/vis-2-widgets-inventwo/assets/defaultTheme-B9IKJkvV.js +0 -16
  43. package/widgets/vis-2-widgets-inventwo/assets/hostInit-D8zJ8suC.js +0 -2
  44. package/widgets/vis-2-widgets-inventwo/assets/index-DGue0Sbd.js +0 -1
  45. package/widgets/vis-2-widgets-inventwo/assets/index-DZzhxPZw.js +0 -1
  46. package/widgets/vis-2-widgets-inventwo/assets/index-efZo-HwM.js +0 -9
  47. package/widgets/vis-2-widgets-inventwo/assets/index-mWZaEsQk.js +0 -1
  48. package/widgets/vis-2-widgets-inventwo/assets/jsx-runtime-C86LZJaJ.js +0 -9
  49. package/widgets/vis-2-widgets-inventwo/assets/preload-helper-CmmR0tKU.js +0 -1
  50. package/widgets/vis-2-widgets-inventwo/assets/styled-Ddrjhtlo.js +0 -7
  51. package/widgets/vis-2-widgets-inventwo/assets/tableRowClasses-Bn_tNoU4.js +0 -1
  52. package/widgets/vis-2-widgets-inventwo/assets/translations-TYtjXUYG.js +0 -1
  53. package/widgets/vis-2-widgets-inventwo/assets/tslib.es6-CltSRlLN.js +0 -1
  54. package/widgets/vis-2-widgets-inventwo/assets/useTheme-3EfQxciw.js +0 -1
  55. package/widgets/vis-2-widgets-inventwo/assets/virtualExposes-CjNsq_w1.js +0 -2
  56. package/widgets/vis-2-widgets-inventwo/assets/vis2Inventwo__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-XKEVvtpv.js +0 -1
  57. package/widgets/vis-2-widgets-inventwo/assets/vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-BhIpvxbF.js +0 -1
  58. package/widgets/vis-2-widgets-inventwo/assets/vis2Inventwo__loadShare__react__loadShare__-BOPtvDwW.js +0 -1
@@ -1,18 +1,19 @@
1
- import{O as qe,M as jc,A as dc,I as yc}from"./defaultTheme-B9IKJkvV.js";import{v as _,R as M}from"./vis2Inventwo__loadShare__react__loadShare__-BOPtvDwW.js";import{v as j}from"./vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-BhIpvxbF.js";import{v as O,a as fi}from"./tslib.es6-CltSRlLN.js";import{c as ks,g as EL}from"./_commonjsHelpers-B_uApUQq.js";import{P as S,b as _L}from"./useTheme-3EfQxciw.js";import"./vis2Inventwo__mf_v__runtimeInit__mf_v__-2uL955SU.js";(function(){if(!window.inventwoDebugLog){let t=function(r,s){const o=Array.from(s).map(n=>{if(typeof n=="object"&&n!==null)try{return JSON.stringify(n)}catch{return"[object]"}return String(n)}).join(" ");mylog.push({type:r,msg:o})};window.inventwoDebugLog=!0;const i={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let e=!1;["log","warn","error","debug"].forEach(function(r){console[r]=function(...s){t(r,s),i[r].apply(console,s)}}),setInterval(function(){const r=Ba(".mylog");if(!r||e)return;e=!0;const s=mylog.splice(0,mylog.length);s.forEach(o=>{r.append(Ba("<div>").addClass(o.type).text("["+o.type+"] "+o.msg))}),s.length&&r.scrollTop(r[0].scrollHeight),e=!1},1e3)}})();const dn=11/23/100;function Tc(i){const e={r:0,g:0,b:0};if(i.length===7)e.r=parseInt(i.substring(1,3),16),e.g=parseInt(i.substring(3,5),16),e.b=parseInt(i.substring(5,7),16);else if(i.length===4){const t=i[1],r=i[2],s=i[3];e.r=parseInt(t+t,16),e.g=parseInt(r+r,16),e.b=parseInt(s+s,16)}return e}function SL(i){return`#${Math.round(i.r).toString(16)}${Math.round(i.g).toString(16)}${Math.round(i.b).toString(16)}`}function kL(i,e,t){const r=Tc(i),s=Tc(e);return r.r+=s.r*(.05+dn*(t-1)),r.g+=s.g*(.05+dn*(t-1)),r.b+=s.b*(.05+dn*(t-1)),SL(r)}function Dc(i,e){const t={};for(let r=1;r<=24;r++)t[`elevation${r}`]={backgroundColor:kL(i,e,r)};return t}function vL(i,e){var n,a,c,l,N,u,g,L,d,y,D;let t,r;i==="dark"?(r={MuiAppBar:{colorDefault:{backgroundColor:"#272727"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[200],"&:hover":{color:qe[100]}}},MuiPaper:Dc("#121212","#fff")},t={name:i,palette:{mode:"dark",background:{paper:"#121212",default:"#121212"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):i==="blue"?(r={MuiAppBar:{colorDefault:{backgroundColor:"#3399CC"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[400],"&:hover":{color:qe[300]}}}},t={name:i,palette:{mode:"dark",background:{paper:"#151d21",default:"#151d21"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):i==="colored"?(r={MuiAppBar:{colorDefault:{backgroundColor:"#2a3135"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[200],"&:hover":{color:qe[100]}}},MuiPaper:Dc("#151d21","#fff")},t={name:i,palette:{mode:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#96fc96"}}):i==="PT"?(r={MuiAppBar:{colorDefault:{backgroundColor:"#0F99DE"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[400],"&:hover":{color:qe[300]}}}},t={name:i,palette:{mode:"light",primary:{main:"#0F99DE"},secondary:{main:"#88A536"},expert:"#BD1B24"}}):i==="DX"?(r={MuiAppBar:{colorDefault:{backgroundColor:"#a9a9a9"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[400],"&:hover":{color:qe[300]}}}},t={name:i,palette:{mode:"light",primary:{main:"#F5F5F7"},secondary:{main:"#a9a9a9"},expert:"#BD1B24",text:{primary:"#007AFE",secondary:"#007AFE",disabled:"#007AFEAA"}}}):(r={MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[400],"&:hover":{color:qe[300]}}}},t={name:i,palette:{mode:"light",primary:{main:"#3399CC",dark:"#256c97",light:"#76d0fd"},secondary:{main:"#164477"},expert:"#14bb00"}}),t.toolbar={height:48},t.saveToolbar={background:(a=(n=t.palette)==null?void 0:n.primary)==null?void 0:a.main,button:{borderRadius:3,height:32}},t.palette&&(t.palette.grey={main:jc[300],dark:jc[400]});const s=dc(t),o=s.palette;return dc(s,{...e||void 0,components:{...r,MuiButton:{variants:[{props:{variant:"contained",color:"grey"},style:{backgroundColor:(c=o.grey)==null?void 0:c[300],color:o.getContrastText&&((l=o.grey)!=null&&l[300])?o.getContrastText(o.grey[300]):void 0}},{props:{variant:"outlined",color:"grey"},style:{color:(N=o.text)==null?void 0:N.primary,borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)","&.Mui-disabled":{border:`1px solid ${(u=o.action)==null?void 0:u.disabledBackground}`},"&:hover":{borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)",backgroundColor:yc(((g=o.text)==null?void 0:g.primary)||"",((L=o.action)==null?void 0:L.hoverOpacity)||.04)}}},{props:{variant:"text",color:"grey"},style:{color:(d=o.text)==null?void 0:d.primary,"&:hover":{backgroundColor:yc(((y=o.text)==null?void 0:y.primary)||"",((D=o.action)==null?void 0:D.hoverOpacity)||.04)}}}]},...(e==null?void 0:e.components)||void 0}})}function bL(){let i,e;const t=new Promise((r,s)=>{i=r,e=s});return t.resolve=i,t.reject=e,t}function ea(i){return(i==null?void 0:i.rows.map(e=>e.value).filter(e=>!!e))??[]}function _t(i){return i!=null&&i.startsWith("system.host.")||(i=`system.host.${i}`),i}function $r(i){return i!=null&&i.startsWith("system.host.")&&(i=i.substring(12)),i}function hc(i){return new Promise(e=>{setTimeout(e,i)})}function vs(i){i=(i||"").toString();const e=i[0]==="*",t=i[i.length-1]==="*";return i=i.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"),(e?"":"^")+i+(t?"":"$")}var Dt;(function(i){i[i.CONNECTING=0]="CONNECTING",i[i.CONNECTED=1]="CONNECTED",i[i.OBJECTS_LOADED=2]="OBJECTS_LOADED",i[i.READY=3]="READY"})(Dt||(Dt={}));var Se;(function(i){i.PERMISSION_ERROR="permissionError",i.NOT_CONNECTED="notConnectedError",i.TIMEOUT="timeout",i.NOT_ADMIN="Allowed only in admin",i.NOT_SUPPORTED="Not supported"})(Se||(Se={}));const Eke=Se.PERMISSION_ERROR;Se.NOT_CONNECTED;const YL=["material","echarts","vis"];class Oe{constructor(e){this.props=this.applyDefaultProps(e),this.connId=`${this.props.name?`${this.props.name}-`:""}${Math.round(Math.random()*1e6).toString().padStart(6,"0")}`,this.waitForSocketLib().then(()=>this.startSocket()).catch(t=>{alert(`Socket connection could not be initialized: ${t}`)})}applyDefaultProps(e){return{...e,protocol:e.protocol||window.location.protocol,host:e.host||window.location.hostname,port:e.port||(window.location.port==="3000"?8081:window.location.port),ioTimeout:Math.max(e.ioTimeout||2e4,2e4),cmdTimeout:Math.max(e.cmdTimeout||5e3,5e3),admin5only:e.admin5only||!1,autoSubscribes:e.autoSubscribes??[],autoSubscribeLog:e.autoSubscribeLog??!1,doNotLoadACL:e.doNotLoadACL??!0,doNotLoadAllObjects:e.doNotLoadAllObjects??!0}}props;connId;lastAccessToken=null;ignoreState="";connected=!1;subscribed=!1;firstConnect=!0;waitForRestart=!1;loaded=!1;simStates={};statesSubscribes={};filesSubscribes={};objectsSubscribes={};objects={};states={};acl=null;isSecure=!1;onReadyDone=!1;onConnectionHandlers=[];onLogHandlers=[];onCmdStdoutHandler;onCmdStderrHandler;onCmdExitHandler;onError(e){(this.props.onError??console.error)(e)}_socket;_waitForSocketPromise;_waitForFirstConnectionPromise=bL();_instanceSubscriptions={};_promises={};_authTimer=null;_refreshTimer=null;_systemConfig;get systemConfig(){return this._systemConfig}systemLang="en";static isWeb(){return window.socketUrl!==void 0}waitForSocketLib(){return this._waitForSocketPromise?this._waitForSocketPromise:(this._waitForSocketPromise=new Promise(async(e,t)=>{if(typeof window.io>"u"&&typeof window.iob>"u")if(typeof window.registerSocketOnLoad=="function")window.registerSocketOnLoad(()=>e());else{for(let r=1;r<=30;r++){if(window.io||window.iob)return e();await hc(100)}t(new Error("Socket library could not be loaded!"))}else e()}),this._waitForSocketPromise)}async startSocket(){if(this._socket)return;let e=this.props.host,t=this.props.port,r=(this.props.protocol||window.location.protocol).replace(":",""),s=window.location.pathname;if(window.location.hostname==="iobroker.net"||window.location.hostname==="iobroker.pro")s="";else{if(window.socketUrl){const a=new URL(window.socketUrl);e=a.hostname,t=a.port,r=a.protocol.replace(":","")}const n=s.lastIndexOf("/");if(n!==-1&&(s=s.substring(0,n+1)),Oe.isWeb()){const a=s.split("/");a.length>2&&(a.pop(),a.pop(),YL.includes(a[a.length-1])&&a.pop(),s=a.join("/"),s.endsWith("/")||(s+="/"))}}const o=t?`${r}://${e}:${t}`:`${r}://${e}`;return this._socket=(window.io||window.iob).connect(o,{path:s.endsWith("/")?`${s}socket.io`:`${s}/socket.io`,query:"ws=true",name:this.props.name,timeout:this.props.ioTimeout,uuid:this.props.uuid,token:this.props.token}),this._socket.on("connect",n=>{window.addEventListener("storage",this.onAccessTokenUpdated);const a=Oe.readTokens();if(a&&!a.owner){const c=Date.now();this.saveTokens({access_token:a.access_token,refresh_token:a.refresh_token,expires_in:Math.round((a.expires_in.getTime()-c)/1e3),refresh_token_expires_in:Math.round((a.refresh_token_expires_in.getTime()-c)/1e3),token_type:"Bearer"},a.stayLoggedIn)}this.onReadyDone=!1,n!==!0?(this.connected=!0,setTimeout(()=>this.getVersion().then(c=>{const[l,N,u]=c.version.split(".");parseInt(l,10)*1e4+parseInt(N,10)*100+parseInt(u,10)<40102?(this._authTimer=null,this.onPreConnect(!1,!1)):this._socket.emit("authenticate",(L,d)=>this.onPreConnect(L,d))}).catch(c=>this.onError({message:c.toString(),operation:"getVersion"})),500)):this._socket.emit("authenticate",(c,l)=>{this.onPreConnect(c,l)})}),this._socket.on("reconnect",()=>{var n,a;this.onReadyDone=!1,(a=(n=this.props).onProgress)==null||a.call(n,Dt.READY),this.connected=!0,this.waitForRestart?window.location.reload():(this._subscribe(!0),this.onConnectionHandlers.forEach(c=>c(!0)))}),this._socket.on("disconnect",()=>{var n,a;this.onReadyDone=!1,this.connected=!1,this.subscribed=!1,(a=(n=this.props).onProgress)==null||a.call(n,Dt.CONNECTING),this.onConnectionHandlers.forEach(c=>c(!1))}),this._socket.on("reauthenticate",()=>this.authenticate()),this._socket.on("log",n=>{var a,c;(c=(a=this.props).onLog)==null||c.call(a,n),this.onLogHandlers.forEach(l=>l(n))}),this._socket.on("error",n=>{let a;n==null?a="":typeof n.toString=="function"?a=n.toString():(a=JSON.stringify(n),console.error(`Received strange error: ${a}`)),a.includes("User not authorized")?this.authenticate():a.includes("websocket error")?(console.error(`Socket Error => reload: ${n}`),window.location.reload()):console.error(`Socket Error: ${n}`)}),this._socket.on("connect_error",n=>console.error(`Connect error: ${n}`)),this._socket.on("permissionError",n=>this.onError({message:"no permission",operation:n.operation,type:n.type,id:n.id||""})),this._socket.on("objectChange",(n,a)=>{setTimeout(()=>this.objectChange(n,a),0)}),this._socket.on("stateChange",(n,a)=>{setTimeout(()=>this.stateChange(n,a),0)}),this._socket.on("im",(n,a,c)=>{setTimeout(()=>this.instanceMessage(n,a,c),0)}),this._socket.on("fileChange",(n,a,c)=>{setTimeout(()=>this.fileChange(n,a,c),0)}),this._socket.on("cmdStdout",(n,a)=>{var c;(c=this.onCmdStdoutHandler)==null||c.call(this,n,a)}),this._socket.on("cmdStderr",(n,a)=>{var c;(c=this.onCmdStderrHandler)==null||c.call(this,n,a)}),this._socket.on("cmdExit",(n,a)=>{var c;(c=this.onCmdExitHandler)==null||c.call(this,n,a)}),Promise.resolve()}onPreConnect(e,t){var r,s;this._authTimer&&(clearTimeout(this._authTimer),this._authTimer=null),this.connected=!0,this.isSecure=t,this.waitForRestart?window.location.reload():(this.firstConnect?this.loadData().catch(o=>console.error(`Cannot load data: ${o}`)):(s=(r=this.props).onProgress)==null||s.call(r,Dt.READY),this._subscribe(!0),this.onConnectionHandlers.forEach(o=>o(!0)),this.checkAccessTokenExpire()),this._waitForFirstConnectionPromise.resolve()}static readTokens(){let e=window.sessionStorage.getItem("iob_tokens");const t=!e;if(e||(e=window.localStorage.getItem("iob_tokens")),!e)return null;const[r,s,o,n,a]=e.split(";"),c=new Date(s);return c.getTime()<Date.now()?null:{refresh_token:r,refresh_token_expires_in:c,access_token:o,expires_in:new Date(n),owner:a,stayLoggedIn:t}}static saveTokensStatic(e,t,r){const s=`${e.refresh_token};${new Date(Date.now()+e.refresh_token_expires_in*1e3).toISOString()};${e.access_token};${new Date(Date.now()+e.expires_in*1e3).toISOString()}${r?`;${r}`:""}`;t?window.localStorage.setItem("iob_tokens",s):window.sessionStorage.setItem("iob_tokens",s)}saveTokens(e,t){Oe.saveTokensStatic(e,t,this.connId)}static deleteTokensStatic(){window.localStorage.removeItem("iob_tokens"),window.sessionStorage.removeItem("iob_tokens")}deleteTokens(e,t){const r=Oe.readTokens();r&&(t?Oe.deleteTokensStatic():r.stayLoggedIn===e&&r.owner===this.connId&&(r.stayLoggedIn?window.localStorage.removeItem("iob_tokens"):window.sessionStorage.removeItem("iob_tokens")))}onAccessTokenUpdated=e=>{if(e.key==="iob_tokens"){const t=Oe.readTokens();t&&(console.log(`Tab ${this.connId} received updated token: ${t.access_token}`),this.updateTokenExpiration(t.access_token))}};updateTokenExpiration(e){this.lastAccessToken!==e&&(this.lastAccessToken=e,this._socket.emit("updateTokenExpiration",e,(t,r)=>{t?(console.error(`[UPDATE/${new Date().toISOString()}] cannot say to server about new token: ${t}`),window.location.reload()):r?console.log(`[UPDATE/${new Date().toISOString()}] server accepted new token: ${e}`):(console.error(`[UPDATE/${new Date().toISOString()}] cannot say to server about new token`),window.location.reload())})),this.checkAccessTokenExpire()}refreshTokens(e,t){if(!e){console.log(`[REFRESH/${new Date().toISOString()}] No token structure found => reloading the page`),setTimeout(()=>window.location.reload(),500);return}t||!e.owner||e.owner===this.connId?(console.log(`[REFRESH/${new Date().toISOString()}] claim ownership of the token`),this.acquireTokenLock()?(console.log(`[REFRESH/${new Date().toISOString()}] refreshing token`),fetch("./oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`grant_type=refresh_token&refresh_token=${e.refresh_token}&client_id=ioBroker&stayloggedin=${e.stayLoggedIn}`}).then(r=>{if(r.ok)return r.json();throw new Error("Cannot refresh access token")}).then(r=>{if(r.access_token)console.log(`[REFRESH/${new Date().toISOString()}] received new token: ${r.access_token}`),this.saveTokens(r,e.stayLoggedIn),this.releaseTokenLock(),this.updateTokenExpiration(r.access_token);else throw new Error("Cannot get access token")}).catch(r=>{console.warn(`[REFRESH/${new Date().toISOString()}] cannot refresh token: ${r}`),this.releaseTokenLock(),this.deleteTokens(e.stayLoggedIn),console.error(r),window.location.reload()})):(console.log(`[REFRESH/${new Date().toISOString()}] Someone else is updating the token, so wait for the next check`),this.checkAccessTokenExpire())):this.lastAccessToken!==e.access_token&&this.updateTokenExpiration(e.access_token)}acquireTokenLock(){const e=Date.now(),t=localStorage.getItem("iob_token_semaphore");if(t)try{const s=JSON.parse(t);if(e<s.expiry)return!1}catch{}const r={connId:this.connId,expiry:e+10*1e3};return localStorage.setItem("iob_token_semaphore",JSON.stringify(r)),!0}releaseTokenLock(){const e=localStorage.getItem("iob_token_semaphore");if(e)try{JSON.parse(e).connId===this.connId&&localStorage.removeItem("iob_token_semaphore")}catch{localStorage.removeItem("iob_token_semaphore")}}checkAccessTokenExpire(){if(this._refreshTimer&&(clearTimeout(this._refreshTimer),this._refreshTimer=null),this.isSecure){const e=Oe.readTokens();if(e){const t=e.expires_in.getTime();if(t<Date.now()+3e4){const r=t<Date.now()+5500;console.log(`[TOKEN/${new Date().toISOString()}] Updating refresh token ${e.access_token}`),e.refresh_token?e.owner===this.connId||r?(e.owner===this.connId?console.log(`[TOKEN/${new Date().toISOString()}] We are the owner of the token`):console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token, but we will take ownership`),this.props.tokenTimeoutHandler?(console.log(`[TOKEN/${new Date().toISOString()}] Asking GUI if we should prolong the token`),this.props.tokenTimeoutHandler(t).then(s=>{s?(console.log(`[TOKEN/${new Date().toISOString()}] Token will be prolonged`),this.refreshTokens(e,r)):(console.log(`[TOKEN/${new Date().toISOString()}] Token will not be prolonged. Reloading the page`),setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now()))})):(console.log(`[TOKEN/${new Date().toISOString()}] No tokenTimeoutHandler defined. Prolonging the token`),this.refreshTokens(e,r))):this.lastAccessToken!==e.access_token?(console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token, but we will inform the server about new token`),this.refreshTokens(e)):(console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token and the token did not change. Check in 3 seconds if the owner updated the token`),this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},3e3)):(console.log(`[TOKEN/${new Date().toISOString()}] We do not have a refresh token, so we need to reauthenticate`),setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now()))}else this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},t-Date.now()-3e4>12e4?12e4:t-Date.now()-3e4)}}}static isCloud(){return window.location.hostname.includes("amazonaws.com")||window.location.hostname.includes("iobroker.in")?!0:typeof window.socketUrl>"u"?!1:window.socketUrl.includes("iobroker.in")||window.socketUrl.includes("amazonaws")}isConnected(){return this.connected}waitForFirstConnection(){return this._waitForFirstConnectionPromise}async getUserPermissions(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getUserPermissions",(r,s)=>{r?t(r):e(s||null)})}})}async loadData(){if(this.loaded)return;const e=10;for(let t=1;t<=e;t++){if(this.doLoadData().catch(r=>console.error(`Cannot load data: ${r}`)),this.loaded)return;await hc(Oe.isCloud()?5e3:1e3)}}async doLoadData(){var e,t,r,s,o,n,a,c,l;if(!this.loaded){if(!this.props.doNotLoadACL)try{this.acl=await this.getUserPermissions()}catch(N){this.onError(`Cannot read user permissions: ${N}`);return}try{this.props.admin5only&&!Oe.isWeb()&&(!window.vendorPrefix||window.vendorPrefix==="@@vendorPrefix@@")?this._systemConfig=await this.getCompactSystemConfig():this._systemConfig=await this.getSystemConfig()}catch(N){this.onError(`Cannot read system config: ${N}`);return}this._systemConfig&&(this.systemLang=(e=this._systemConfig.common)==null?void 0:e.language,this.systemLang||(this.systemLang=window.navigator.userLanguage||window.navigator.language,/^(en|de|ru|pt|nl|fr|it|es|pl|uk)-?/.test(this.systemLang)?this.systemLang=this.systemLang.substring(0,2):/^(en|de|ru|pt|nl|fr|it|es|pl|uk|zh-cn)$/.test(this.systemLang)||(this.systemLang="en"),this._systemConfig.common.language=this.systemLang)),(r=(t=this.props).onLanguage)==null||r.call(t,this.systemLang),this.loaded=!0,(o=(s=this.props).onProgress)==null||o.call(s,Dt.CONNECTED),this.firstConnect=!1,this.props.doNotLoadAllObjects?this.props.admin5only?this.objects={}:this.objects={"system.config":this._systemConfig}:this.objects=await this.getObjects(),(a=(n=this.props).onProgress)==null||a.call(n,Dt.READY),this.onReadyDone||(this.onReadyDone=!0,(l=(c=this.props).onReady)==null||l.call(c,this.objects))}}authenticate(){window.location.search.includes("&href=")?window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}`:window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${encodeURIComponent(window.location.search+window.location.hash)}`}async subscribeState(...e){let t,r,s;e.length===3?[t,r,s]=e:([t,s]=e,r=!1);let o;if(Array.isArray(t)?o=t:o=[t],typeof s!="function")throw new Error("The state change handler must be a function!");const n=[];for(let a=0;a<o.length;a++){const c=o[a];this.statesSubscribes[c]?!this.statesSubscribes[c].cbs.includes(s)&&this.statesSubscribes[c].cbs.push(s):(this.statesSubscribes[c]={reg:new RegExp(vs(c)),cbs:[s]},t!==this.ignoreState&&n.push(c))}if(this.connected)if(n.length&&this._socket.emit("subscribe",n),r){let a;for(let c=0;c<o.length;c++){try{a=await this.getBinaryState(o[c])}catch(l){console.error(`Cannot getBinaryState "${o[c]}": ${JSON.stringify(l)}`),a=void 0}a!=null&&s(o[c],a)}}else if(o.find(a=>a.includes("*"))){let a;for(let c=0;c<o.length;c++){try{a=await this.getForeignStates(o[c])}catch(l){console.error(`Cannot getForeignStates "${o[c]}": ${JSON.stringify(l)}`);return}if(a)for(const[l,N]of Object.entries(a)){const u=s(l,N);u instanceof Promise&&u.catch(g=>console.error(`Cannot call state change handler: ${g}`))}}}else try{const a=await(Oe.isWeb()?this.getStates(o):this.getForeignStates(o));if(a)for(const[c,l]of Object.entries(a)){const N=s(c,l);N instanceof Promise&&N.catch(u=>console.error(`Cannot call state change handler: ${u}`))}}catch(a){console.error(`Cannot getState "${o.join(", ")}": ${a.message}`);return}}async subscribeStateAsync(e,t){return this.subscribeState(e,t)}unsubscribeState(e,t){var o;let r;Array.isArray(e)?r=e:r=[e];const s=[];for(let n=0;n<r.length;n++){const a=r[n];if(this.statesSubscribes[a]){const c=this.statesSubscribes[a];if(t){const l=c.cbs.indexOf(t);l!==-1&&c.cbs.splice(l,1)}else c.cbs=[];(o=c.cbs)!=null&&o.length||(delete this.statesSubscribes[a],a!==this.ignoreState&&s.push(a))}}this.connected&&s.length&&this._socket.emit("unsubscribe",r)}subscribeObject(e,t){let r;if(Array.isArray(e)?r=e:r=[e],typeof t!="function")throw new Error("The object change handler must be a function!");const s=[];for(let o=0;o<r.length;o++){const n=r[o];this.objectsSubscribes[n]?!this.objectsSubscribes[n].cbs.includes(t)&&this.objectsSubscribes[n].cbs.push(t):(this.objectsSubscribes[n]={reg:new RegExp(vs(n)),cbs:[t]},s.push(n))}return this.connected&&s.length&&this._socket.emit("subscribeObjects",s),Promise.resolve()}unsubscribeObject(e,t){var o;let r;Array.isArray(e)?r=e:r=[e];const s=[];for(let n=0;n<r.length;n++){const a=r[n];if(this.objectsSubscribes[a]){const c=this.objectsSubscribes[a];if(t){const l=c.cbs.indexOf(t);l!==-1&&c.cbs.splice(l,1)}else c.cbs=[];(o=c.cbs)!=null&&o.length||(delete this.objectsSubscribes[a],s.push(a))}}return this.connected&&s.length&&this._socket.emit("unsubscribeObjects",s),Promise.resolve()}objectChange(e,t){var o,n;let r;this.objects[e]&&(r={_id:e,type:this.objects[e].type});let s=!1;t?(t._rev&&this.objects[e]&&(this.objects[e]._rev=t._rev),(!this.objects[e]||JSON.stringify(this.objects[e])!==JSON.stringify(t))&&(this.objects[e]=t,s=!0)):this.objects[e]&&(delete this.objects[e],s=!0);for(const[a,c]of Object.entries(this.objectsSubscribes))(a===e||c.reg.test(e))&&c.cbs.forEach(l=>{try{const N=l(e,t,r);N instanceof Promise&&N.catch(u=>console.error(`Cannot call object change handler: ${u}`))}catch(N){console.error(`Error by callback of objectChange: ${N}`)}});if(s){const a=(n=(o=this.props).onObjectChange)==null?void 0:n.call(o,e,t);a instanceof Promise&&a.catch(c=>console.error(`Cannot call object change handler: ${c}`))}}stateChange(e,t){for(const r of Object.values(this.statesSubscribes))if(r.reg.test(e))for(const s of r.cbs)try{const o=s(e,t??null);o instanceof Promise&&o.catch(n=>console.error(`Cannot call state change handler: ${n}`))}catch(o){console.error(`Error by callback of stateChanged: ${o}`)}}instanceMessage(e,t,r){var s;(s=this._instanceSubscriptions[t])==null||s.forEach(o=>{if(o.messageType===e){const n=o.callback(r,t,e);n instanceof Promise&&n.catch(a=>console.error(`Cannot call instance message handler: ${a}`))}})}fileChange(e,t,r){for(const s of Object.values(this.filesSubscribes))if(s.regId.test(e)&&s.regFilePattern.test(t))for(const o of s.cbs)try{o(e,t,r)}catch(n){console.error(`Error by callback of fileChange: ${n}`)}}async subscribeFiles(e,t,r){if(typeof r!="function")throw new Error("The state change handler must be a function!");let s;Array.isArray(t)?s=t:s=[t];const o=[];for(let n=0;n<s.length;n++){const a=s[n],c=`${e}$%$${a}`;this.filesSubscribes[c]?!this.filesSubscribes[c].cbs.includes(r)&&this.filesSubscribes[c].cbs.push(r):(this.filesSubscribes[c]={regId:new RegExp(vs(e)),regFilePattern:new RegExp(vs(a)),cbs:[r]},o.push(a))}return this.connected&&o.length&&this._socket.emit("subscribeFiles",e,o),Promise.resolve()}unsubscribeFiles(e,t,r){var n;let s;Array.isArray(t)?s=t:s=[t];const o=[];for(let a=0;a<s.length;a++){const c=s[a],l=`${e}$%$${c}`;if(this.filesSubscribes[l]){const N=this.filesSubscribes[l];if(r){const u=N.cbs.indexOf(r);u!==-1&&N.cbs.splice(u,1)}else N.cbs=[];(n=N.cbs)!=null&&n.length||(delete this.filesSubscribes[l],o.push(c))}}this.connected&&o.length&&this._socket.emit("unsubscribeFiles",e,o)}async request({cacheKey:e,forceUpdate:t,commandTimeout:r,onTimeout:s,requireAdmin:o,requireFeatures:n,executor:a}){if(o&&Oe.isWeb())return Promise.reject(new Error(Se.NOT_ADMIN));if(e&&!t&&e in this._promises)return this._promises[e];if(!this.connected)return Promise.reject(new Error(Se.NOT_CONNECTED));if(n!=null&&n.length){for(const l of n)if(!await this.checkFeatureSupported(l))throw new Error(Se.NOT_SUPPORTED)}const c=new Promise(async(l,N)=>{const u={elapsed:!1,clearTimeout:()=>{}};let g;r!==!1&&(g=setTimeout(()=>{u.elapsed=!0,s==null||s(),e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(Se.TIMEOUT))},r??this.props.cmdTimeout),u.clearTimeout=()=>{clearTimeout(g)});try{await a(l,N,u)}catch(L){e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(L.toString()))}});return e&&(this._promises[e]=c),c}resetCache(e,t){t?Object.keys(this._promises).filter(r=>r.startsWith(e)).forEach(r=>{delete this._promises[r]}):delete this._promises[e]}getStates(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getStates",e,(s,o)=>{this.states=o??{},s?r(s):t(this.states)})}})}getState(e){return this.request({commandTimeout:!1,executor:(t,r)=>{if(e&&e===this.ignoreState){t(this.simStates[e]||{val:null,ack:!0});return}this._socket.emit("getState",e,(s,o)=>{s?r(s):t(o)})}})}getBinaryState(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getBinaryState",e,(s,o)=>{s?r(s):t(o)})}})}setBinaryState(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("setBinaryState",e,t,o=>{o?s(o):r()})}})}setState(e,t,r){return typeof r=="boolean"&&(t={val:t,ack:r}),this.request({commandTimeout:!1,executor:(s,o)=>{if(e&&e===this.ignoreState){let n;if(typeof r=="boolean"||typeof t=="object"&&t.val!==void 0?n=t:n={val:t,ack:!1,ts:Date.now(),lc:Date.now(),from:"system.adapter.vis.0"},this.simStates[e]=n,this.statesSubscribes[e])for(const a of this.statesSubscribes[e].cbs)try{const c=a(e,n);c instanceof Promise&&c.catch(l=>console.error(`Cannot call state change handler: ${l}`))}catch(c){console.error(`Error by callback of stateChanged: ${c}`)}s();return}this._socket.emit("setState",e,t,n=>{n?o(n):s()})}})}getObjects(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{if(!e&&this.objects){r(this.objects);return}this._socket.emit(Oe.isWeb()?"getObjects":"getAllObjects",(o,n)=>{var a,c;t||(c=(a=this.props).onProgress)==null||c.call(a,Dt.OBJECTS_LOADED),o?s(o):(this.objects=n??{},r(this.objects))})}})}getObjectsById(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjects",e,(s,o)=>{s?r(s):t(o)})}})}_subscribe(e){var t,r;if(e&&!this.subscribed){this.subscribed=!0,(t=this.props.autoSubscribes)!=null&&t.length&&this._socket.emit("subscribeObjects",this.props.autoSubscribes);const s=Object.keys(this.objectsSubscribes);s.length&&this._socket.emit("subscribeObjects",s),Object.keys(this.objectsSubscribes).forEach(o=>this._socket.emit("subscribeObjects",o)),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!0),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("subscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,a]=o.split("$%$");this._socket.emit("subscribeFiles",n,a)})}else if(!e&&this.subscribed){this.subscribed=!1,(r=this.props.autoSubscribes)!=null&&r.length&&this._socket.emit("unsubscribeObjects",this.props.autoSubscribes);const s=Object.keys(this.objectsSubscribes);s.length&&this._socket.emit("unsubscribeObjects",s),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!1),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("unsubscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,a]=o.split("$%$");this._socket.emit("unsubscribeFiles",n,a)})}}requireLog(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("requireLog",e,s=>{s?r(s):t()})}})}delObject(e,t=!1){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("delObject",e,{maintenance:t},o=>{o?s(o):r()})}})}delObjects(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("delObjects",e,{maintenance:t},o=>{o?s(o):r()})}})}setObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("setObject",e,t,o=>{o?s(o):r()})}})):Promise.reject(new Error("Null object is not allowed"))}getObject(e){return this.request({commandTimeout:!1,executor:(t,r)=>{if(e&&e===this.ignoreState){t({_id:this.ignoreState,type:"state",common:{name:"ignored state",type:"mixed"}});return}this._socket.emit("getObject",e,(s,o)=>{s?r(s):t(o)})}})}sendTo(e,t,r){return this.request({commandTimeout:!1,executor:s=>{this._socket.emit("sendTo",e,t,r,o=>{s(o)})}})}extendObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("extendObject",e,t,o=>{o?s(o):r()})}})):Promise.reject(new Error("Null object is not allowed"))}registerLogHandler(e){this.onLogHandlers.includes(e)||this.onLogHandlers.push(e)}unregisterLogHandler(e){const t=this.onLogHandlers.indexOf(e);t!==-1&&this.onLogHandlers.splice(t,1)}registerConnectionHandler(e){this.onConnectionHandlers.includes(e)||this.onConnectionHandlers.push(e)}unregisterConnectionHandler(e){const t=this.onConnectionHandlers.indexOf(e);t!==-1&&this.onConnectionHandlers.splice(t,1)}registerCmdStdoutHandler(e){this.onCmdStdoutHandler=e}unregisterCmdStdoutHandler(){this.onCmdStdoutHandler=void 0}registerCmdStderrHandler(e){this.onCmdStderrHandler=e}unregisterCmdStderrHandler(){this.onCmdStderrHandler=void 0}registerCmdExitHandler(e){this.onCmdExitHandler=e}unregisterCmdExitHandler(){this.onCmdExitHandler=void 0}getEnums(e,t){return this.request({cacheKey:`enums_${e||"all"}`,forceUpdate:t,commandTimeout:!1,executor:(r,s)=>{this._socket.emit("getObjectView","system","enum",{startkey:`enum.${e||""}`,endkey:e?`enum.${e}.香`:"enum.香"},(o,n)=>{if(o)s(o);else{const a={};if(n)for(let c=0;c<n.rows.length;c++)e&&n.rows[c].id===`enum.${e}`||(a[n.rows[c].id]=n.rows[c].value);r(a)}})}})}getObjectView(e,t,r){return this.getObjectViewCustom("system",r,e,t)}getObjectViewSystem(e,t,r){return this.getObjectViewCustom("system",e,t,r)}getObjectViewCustom(e,t,r,s){return this.request({commandTimeout:!1,executor:(o,n)=>{r=r||"",s=s||"香",this._socket.emit("getObjectView",e,t,{startkey:r,endkey:s},(a,c)=>{if(a)n(a);else{const l={};if(c&&c.rows)for(let N=0;N<c.rows.length;N++)l[c.rows[N].id]=c.rows[N].value;o(l)}})}})}readMetaItems(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","meta",{startkey:"",endkey:"香"},(r,s)=>{var o;r?t(r):e((o=s.rows)==null?void 0:o.map(n=>n.value).filter(n=>!!n))})}})}readDir(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("readDir",e,t,(o,n)=>{o?s(o):r(n)})}})}readFile(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit(r?"readFile64":"readFile",e,t,(n,a,c)=>{n?o(n):s({file:a,mimeType:c})})}})}writeFile64(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{if(typeof r=="string")this._socket.emit("writeFile",e,t,r,n=>{n?o(n):s()});else{const n=btoa(new Uint8Array(r).reduce((a,c)=>a+String.fromCharCode(c),""));this._socket.emit("writeFile64",e,t,n,a=>{a?o(a):s()})}}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("deleteFile",e,t,o=>{o?s(o):r()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("deleteFolder",e,t,o=>{o?s(o):r()})}})}rename(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit("rename",e,t,r,n=>{n?o(n):s()})}})}renameFile(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit("renameFile",e,t,r,n=>{n?o(n):s()})}})}cmdExec(e,t,r,s){return this.request({commandTimeout:s,executor:(o,n,a)=>{e=_t(e),this._socket.emit("cmdExec",e,r,t,c=>{a.elapsed||(a.clearTimeout(),c?n(c):o())})}})}getSystemConfig(e){return this.request({cacheKey:"systemConfig",forceUpdate:e,commandTimeout:!1,executor:async t=>{let r=await this.getObject("system.config");r??={},r.common??={},r.native??={},t(r)}})}getCompactSystemConfig(e){return this.request({cacheKey:"systemConfigCommon",forceUpdate:e,commandTimeout:!1,requireAdmin:!0,executor:(t,r)=>{this._socket.emit("getCompactSystemConfig",(s,o)=>{s?r(s):(o??={},o.common??={},o.native??={},t(o))})}})}getForeignStates(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getForeignStates",e||"*",(s,o)=>{s?r(s):t(o??{})})}})}getForeignObjects(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("getForeignObjects",e||"*",t,(o,n)=>{o?s(o):r(n)})}})}setSystemConfig(e){return this.setObject("system.config",e)}getRawSocket(){return this._socket}getHistory(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("getHistory",e,t,(o,n)=>{o?s(o):r(n)})}})}getHistoryEx(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("getHistory",e,t,(o,n,a,c)=>{o?s(o):r({values:n,sessionId:c,step:a})})}})}getIpAddresses(e,t){return e=_t(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async r=>{const s=await this.getObject(e);r((s==null?void 0:s.common.address)??[])}})}getVersion(e){return this.request({cacheKey:"version",forceUpdate:e,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getVersion",(s,o,n)=>{s&&!o&&typeof s=="string"&&s.match(/\d+\.\d+\.\d+/)?t({version:s,serverName:"socketio"}):s?r(s):t({version:o,serverName:n})})}})}getWebServerName(){return this.request({cacheKey:"webName",commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getAdapterName",(r,s)=>{r?t(r):e(s)})}})}fileExists(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("fileExists",e,t,(o,n)=>{o?s(o):r(!!n)})}})}getCurrentUser(){return this.request({commandTimeout:!1,executor:e=>{this._socket.emit("authEnabled",(t,r)=>{e(r)})}})}getUuid(){return this.request({cacheKey:"uuid",commandTimeout:!1,executor:async e=>{var r;const t=await this.getObject("system.meta.uuid");e((r=t==null?void 0:t.native)==null?void 0:r.uuid)}})}checkFeatureSupported(e,t){return this.request({cacheKey:`supportedFeatures_${e}`,forceUpdate:t,commandTimeout:!1,executor:(r,s)=>{this._socket.emit("checkFeatureSupported",e,(o,n)=>{o?s(o):r(n)})}})}getAdapterInstances(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`instances_${e}`,forceUpdate:t,commandTimeout:!1,executor:async r=>{const s=e?`system.adapter.${e}.`:"system.adapter.",o=`${s}香`,n=await this.getObjectViewSystem("instance",s,o),a=Object.values(n);r(e?a.filter(c=>c.common.name===e):a)}})}getAdapters(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`adapter_${e}`,forceUpdate:t,commandTimeout:!1,executor:async r=>{const s=await this.getObjectViewSystem("adapter",`system.adapter.${e||""}`,`system.adapter.${e||"香"}`),o=Object.values(s);r(e?o.filter(n=>n.common.name===e):o)}})}getGroups(e){return this.request({cacheKey:"groups",forceUpdate:e,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjectView","system","group",{startkey:"system.group.",endkey:"system.group.香"},(s,o)=>{s?r(s):t(ea(o))})}})}logout(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("logout",r=>{r?t(r):e(null)})}})}subscribeOnInstance(e,t,r,s){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("clientSubscribe",e,t,r,(a,c)=>{a?n(a):c&&(c.error?n(c.error):(e.startsWith("system.adapter.")||(e=`system.adapter.${e}`),this._instanceSubscriptions[e]=this._instanceSubscriptions[e]||[],this._instanceSubscriptions[e].find(l=>l.messageType===t&&l.callback===s)||this._instanceSubscriptions[e].push({messageType:t,callback:s}),o(c)))})}})}unsubscribeFromInstance(e,t,r){var n;e.startsWith("system.adapter.")||(e=`system.adapter.${e}`);let s;const o=[];do{s=!1;const a=(n=this._instanceSubscriptions[e])==null?void 0:n.findIndex(c=>(!t||c.messageType===t)&&(!r||c.callback===r));if(a!=null&&a!==-1){s=!0;const c=this._instanceSubscriptions[e][a].messageType;this._instanceSubscriptions[e].splice(a,1),this._instanceSubscriptions[e].length||delete this._instanceSubscriptions[e],this._instanceSubscriptions[e]&&this._instanceSubscriptions[e].find(N=>N.messageType===c)||o.push(this.request({commandTimeout:!1,executor:(N,u)=>{this._socket.emit("clientUnsubscribe",e,t,(g,L)=>g?u(g):N(L))}}))}}while(s&&(!r||!t));return o.length?Promise.all(o).then(a=>!!a.find(c=>c)):Promise.resolve(!1)}log(e,t){return e?this.request({commandTimeout:!1,executor:r=>(this._socket.emit("log",e,t),r(null))}):Promise.resolve(null)}setStateToIgnore(e){this.ignoreState=e}}function QL(i,e){if(!e)return;let t;if(e.length<700&&(e.indexOf("/")!==-1||e.indexOf("\\")!==-1))if(i.toLowerCase().includes("private"))t="private";else if(e.toLowerCase().includes("private"))t="private";else if(i.toLowerCase().includes("public"))t="public";else if(e.toLowerCase().includes("public"))t="public";else if(i.toLowerCase().includes("chain"))t="chained";else if(e.toLowerCase().includes("chain"))t="chained";else return;else t=e.substring(0,26)==="-----BEGIN RSA PRIVATE KEY"||e.substring(0,22)==="-----BEGIN PRIVATE KEY"?"private":"public",t==="public"&&e.split("-----END CERTIFICATE-----").filter(s=>s.replace(/\r\n|\r|\n/,"").trim()).length>1&&(t="chained");return{name:i,type:t}}function UL(i){var r,s,o,n;const e=[{name:"[IPv4] 0.0.0.0 - Listen on all IPs",address:"0.0.0.0",family:"ipv4"}],t=[{name:"[IPv6] :: - Listen on all IPs",address:"::",family:"ipv6"}];if((s=(r=i.native)==null?void 0:r.hardware)!=null&&s.networkInterfaces){const a=(n=(o=i.native)==null?void 0:o.hardware)==null?void 0:n.networkInterfaces;Object.keys(a).forEach(c=>{a[c].forEach(l=>{l.family!=="IPv6"?e.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv4"}):t.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv6"})})})}return{IPs4:e,IPs6:t}}class _ke extends Oe{constructor(e){super(e)}request(e){return super.request({requireAdmin:!0,...e})}getCertificates(e){return this.request({cacheKey:"cert",forceUpdate:e,commandTimeout:!1,executor:async t=>{var s;const r=await this.getObject("system.certificates");(s=r==null?void 0:r.native)!=null&&s.certificates?t(Object.entries(r.native.certificates).map(([o,n])=>QL(o,n)).filter(o=>!!o)):t([])}})}getLogs(e,t=200){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendToHost",e,"getLogs",t||200,s=>{r(s)})}})}upgradeAdapterWithWebserver(e,t){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendToHost",e,"upgradeAdapterWithWebserver",t,s=>{r(s)})}})}upgradeController(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit("sendToHost",e,"upgradeController",{version:t,adminInstance:r},n=>{const a=n;a.error?o(a.error):s(a.result)})}})}updateLicenses(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("updateLicenses",e,t,(o,n)=>{o?s(o):r(n)})}})}upgradeOsPackages(e,t,r){return this.request({commandTimeout:!1,executor:s=>{this._socket.emit("sendToHost",e,"upgradeOsPackages",{packages:t,restart:!!r},o=>{s(o)})}})}getLogsFiles(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("readLogs",e,(s,o)=>{s&&r(s),t(o)})}})}delLogs(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("sendToHost",e,"delLogs",null,s=>{s&&r(s),t()})}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("deleteFile",e,t,o=>{o&&s(o),r()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("deleteFolder",e,t,o=>{o&&s(o),r()})}})}rename(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit("rename",e,t,r,n=>{n&&o(n),s()})}})}renameFile(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit("renameFile",e,t,r,n=>{n&&o(n),s()})}})}getHosts(e){return this.request({cacheKey:"hosts",forceUpdate:e,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjectView","system","host",{startkey:"system.host.",endkey:"system.host.香"},(s,o)=>{s?r(s):t(ea(o))})}})}getUsers(e){return this.request({cacheKey:"users",forceUpdate:e,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjectView","system","user",{startkey:"system.user.",endkey:"system.user.香"},(s,o)=>{s?r(s):t(ea(o))})}})}renameGroup(e,t,r){return this.request({commandTimeout:!1,executor:async s=>{const o=await this.getGroups(!0),n=o.filter(c=>c._id.startsWith(`${e}.`));for(const c of n){const l=c._id,N=t+c._id.substring(e.length);c._id=N,await this.setObject(N,c),await this.delObject(l)}const a=o.find(c=>c._id===e);if(a){const c=a._id;a._id=t,r!==void 0&&(a.common??={},a.common.name=r),await this.setObject(t,a),await this.delObject(c)}s()}})}getHostInfo(e,t,r){return e=_t(e),this.request({cacheKey:`hostInfo_${e}`,forceUpdate:t,commandTimeout:r,executor:(s,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfo",null,a=>{n.elapsed||(n.clearTimeout(),a===Se.PERMISSION_ERROR?o('May not read "getHostInfo"'):a?s(a):o('Cannot read "getHostInfo"'))})}})}getHostInfoShort(e,t,r){return e=_t(e),this.request({cacheKey:`hostInfoShort_${e}`,forceUpdate:t,commandTimeout:r,executor:(s,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfoShort",null,a=>{n.elapsed||(n.clearTimeout(),a===Se.PERMISSION_ERROR?o('May not read "getHostInfoShort"'):a?s(a):o('Cannot read "getHostInfoShort"'))})}})}getRepository(e,t,r,s){return this.request({cacheKey:`repository_${e}`,forceUpdate:r,commandTimeout:s,executor:(o,n,a)=>{this._socket.emit("sendToHost",e,"getRepository",t,c=>{a.elapsed||(a.clearTimeout(),c===Se.PERMISSION_ERROR?n('May not read "getRepository"'):c?o(c):n('Cannot read "getRepository"'))})}})}getInstalled(e,t,r){return e=_t(e),this.request({cacheKey:`installed_${e}`,forceUpdate:t,commandTimeout:r,executor:(s,o,n)=>{this._socket.emit("sendToHost",e,"getInstalled",null,a=>{n.elapsed||(n.clearTimeout(),a===Se.PERMISSION_ERROR?o('May not read "getInstalled"'):a?s(a):o('Cannot read "getInstalled"'))})}})}cmdExec(e,t,r,s){return this.request({commandTimeout:s,executor:(o,n,a)=>{e=_t(e),this._socket.emit("cmdExec",e,r,t,c=>{a.elapsed||(a.clearTimeout(),c&&n(c),o())})}})}readBaseSettings(e){return e=$r(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(t,r,s)=>{this._socket.emit("sendToHost",e,"readBaseSettings",null,o=>{s.elapsed||(s.clearTimeout(),o===Se.PERMISSION_ERROR?r('May not read "BaseSettings"'):o?o.error?r(new Error(o.error)):t(o):r('Cannot read "BaseSettings"'))})}})}writeBaseSettings(e,t){return e=$r(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(r,s,o)=>{this._socket.emit("sendToHost",e,"writeBaseSettings",t,n=>{o.elapsed||(o.clearTimeout(),n===Se.PERMISSION_ERROR?s('May not write "BaseSettings"'):n?r(n):s('Cannot write "BaseSettings"'))})}})}restartController(e){return e=$r(e),this.request({executor:(t,r,s)=>{this._socket.emit("sendToHost",e,"restartController",null,()=>{s.elapsed||(s.clearTimeout(),t(!0))})}})}getDiagData(e,t){return e=$r(e),this.request({executor:(r,s,o)=>{this._socket.emit("sendToHost",e,"getDiagData",t,n=>{o.elapsed||(o.clearTimeout(),r(n||null))})}})}changePassword(e,t){return this.request({executor:(r,s,o)=>{this._socket.emit("changePassword",e,t,n=>{o.elapsed||(o.clearTimeout(),n&&s(n),r())})}})}getIpAddresses(e,t){return e=_t(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async r=>{const s=await this.getObject(e);r((s==null?void 0:s.common.address)??[])}})}getHostByIp(e,t){return e=$r(e),this.request({cacheKey:`rIPs_${e}`,forceUpdate:t,executor:(r,s,o)=>{this._socket.emit("getHostByIp",e,(n,a)=>{if(o.elapsed)return;o.clearTimeout();const{IPs4:c,IPs6:l}=UL(a);r([...c,...l])})}})}encrypt(e){return this.request({executor:(t,r,s)=>{this._socket.emit("encrypt",e,(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}decrypt(e){return this.request({executor:(t,r,s)=>{this._socket.emit("decrypt",e,(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}chmodFile(e,t,r){return this.request({executor:(s,o,n)=>{this._socket.emit("chmodFile",e,t,r,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),s(c))})}})}chownFile(e,t,r){return this.request({executor:(s,o,n)=>{this._socket.emit("chownFile",e,t,r,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),s(c))})}})}getNotifications(e,t){return this.request({executor:(r,s,o)=>{this._socket.emit("sendToHost",e,"getNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),r(n))})}})}clearNotifications(e,t){return this.request({executor:(r,s,o)=>{this._socket.emit("sendToHost",e,"clearNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),r(n))})}})}getIsEasyModeStrict(){return this.request({executor:(e,t,r)=>{this._socket.emit("getIsEasyModeStrict",(s,o)=>{r.elapsed||(r.clearTimeout(),s&&t(s),e(!!o))})}})}getEasyMode(){return this.request({executor:(e,t,r)=>{this._socket.emit("getEasyMode",(s,o)=>{r.elapsed||(r.clearTimeout(),s?t(new Error(s)):e(o))})}})}getRatings(e){return this.request({executor:(t,r,s)=>{this._socket.emit("getRatings",!!e,(o,n)=>{s.elapsed||(s.clearTimeout(),o?r(new Error(o)):t(n))})}})}getCurrentSession(e){const t=new AbortController;return this.request({commandTimeout:e||5e3,onTimeout:()=>{t.abort()},executor:async(r,s,o)=>{try{const n=await fetch("./session",{signal:t.signal});if(o.elapsed)return;o.clearTimeout();const a=await n.json();r(a)}catch(n){s(`getCurrentSession: ${n}`)}}})}getCurrentInstance(){return this.request({cacheKey:"currentInstance",executor:(e,t,r)=>{this._socket.emit("getCurrentInstance",(s,o)=>{r.elapsed||(r.clearTimeout(),s?t(s):e(o))})}})}getAdapterInstances(e,t){let r;return typeof e=="boolean"?(t=e,r=""):r=e||"",this.request({cacheKey:`instances_${r}`,forceUpdate:t,executor:(s,o,n)=>{this._socket.emit("getAdapterInstances",r,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),s(c))})}})}getAdapters(e,t){let r;return typeof e=="boolean"?(t=e,r=""):r=e||"",this.request({cacheKey:`adapter_${r}`,forceUpdate:t,executor:(s,o,n)=>{this._socket.emit("getAdapters",r,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),s(c))})}})}getCompactAdapters(e){return this.request({cacheKey:"compactAdapters",forceUpdate:e,executor:(t,r,s)=>{this._socket.emit("getCompactAdapters",(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}getAdaptersResetCache(e){e=e??"",this.resetCache(`adapter_${e}`),this.resetCache("compactAdapters")}getCompactInstances(e){return this.request({cacheKey:"compactInstances",forceUpdate:e,executor:(t,r,s)=>{this._socket.emit("getCompactInstances",(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}getAdapterInstancesResetCache(e){e=e??"",this.resetCache(`instances_${e}`),this.resetCache("compactInstances")}getCompactInstalled(e,t,r){return e=_t(e),this.request({cacheKey:`installedCompact_${e}`,forceUpdate:t,commandTimeout:r,executor:(s,o,n)=>{this._socket.emit("getCompactInstalled",e,a=>{n.elapsed||(n.clearTimeout(),a===Se.PERMISSION_ERROR?o('May not read "getCompactInstalled"'):a?s(a):o('Cannot read "getCompactInstalled"'))})}})}getInstalledResetCache(e){e?(this.resetCache(`installedCompact_${e}`),this.resetCache(`installed_${e}`)):(this.resetCache("installedCompact_",!0),this.resetCache("installed_",!0))}getCompactRepository(e,t,r){return e=_t(e),this.request({cacheKey:`repositoryCompact_${e}`,forceUpdate:t,commandTimeout:r,executor:(s,o,n)=>{this._socket.emit("getCompactRepository",e,a=>{n.elapsed||(n.clearTimeout(),a===Se.PERMISSION_ERROR?o('May not read "getCompactRepository"'):a?s(a):o('Cannot read "getCompactRepository"'))})}})}getRepositoryResetCache(e){e?(this.resetCache(`repositoryCompact_${e}`),this.resetCache(`repository_${e}`)):(this.resetCache("repositoryCompact_",!0),this.resetCache("repository_",!0))}getCompactHosts(e){return this.request({cacheKey:"hostsCompact",forceUpdate:e,executor:(t,r,s)=>{this._socket.emit("getCompactHosts",(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}getCompactSystemRepositories(e){return this.request({cacheKey:"repositoriesCompact",forceUpdate:e,executor:(t,r,s)=>{this._socket.emit("getCompactSystemRepositories",(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}}const ee=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Me=globalThis,pi="9.45.0";function ko(){return vo(Me),Me}function vo(i){const e=i.__SENTRY__=i.__SENTRY__||{};return e.version=e.version||pi,e[pi]=e[pi]||{}}function ys(i,e,t=Me){const r=t.__SENTRY__=t.__SENTRY__||{},s=r[pi]=r[pi]||{};return s[i]||(s[i]=e())}const $L=["debug","info","warn","error","log","assert","trace"],PL="Sentry Logger ",uo={};function hr(i){if(!("console"in Me))return i();const e=Me.console,t={},r=Object.keys(uo);r.forEach(s=>{const o=uo[s];t[s]=e[s],e[s]=o});try{return i()}finally{r.forEach(s=>{e[s]=t[s]})}}function RL(){rM().enabled=!0}function WL(){rM().enabled=!1}function l0(){return rM().enabled}function BL(...i){iM("log",...i)}function FL(...i){iM("warn",...i)}function JL(...i){iM("error",...i)}function iM(i,...e){ee&&l0()&&hr(()=>{Me.console[i](`${PL}[${i}]:`,...e)})}function rM(){return ee?ys("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const X={enable:RL,disable:WL,isEnabled:l0,log:BL,warn:FL,error:JL},N0=50,zi="?",pc=/\(error: (.*)\)/,zc=/captureMessage|captureException/;function g0(...i){const e=i.sort((t,r)=>t[0]-r[0]).map(t=>t[1]);return(t,r=0,s=0)=>{const o=[],n=t.split(`
1
+ import{O as qe,M as jc,A as dc,I as yc}from"./defaultTheme-DL-wasCI.js";import{v as _,R as M}from"./vis2Inventwo__loadShare__react__loadShare__-CvH99W-I.js";import{v as j}from"./vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-CwpbEbbN.js";import{v as O,a as fi}from"./tslib.es6-bbV-5QUe.js";import{c as ks,g as EL}from"./_commonjsHelpers-BujWM7Y5.js";import{P as S,b as _L}from"./useTheme-D6kRSJ_1.js";import"./vis2Inventwo__mf_v__runtimeInit__mf_v__-C3oMM7wE.js";(function(){if(!window.inventwoDebugLog){let t=function(r,s,o){const n=Array.from(s).map(a=>{if(typeof a=="object"&&a!==null)try{return JSON.stringify(a)}catch{return"[object]"}return String(a)}).join(" ");mylog.push({type:r,msg:n,location:o})};window.inventwoDebugLog=!0;const i={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let e=!1;["log","warn","error","debug"].forEach(function(r){console[r]=function(...s){let o="";try{const n=new Error().stack;if(n){const a=n.split(`
2
+ `),c=a[2]||a[1];c&&(o=c.trim())}}catch{}t(r,s,o),i[r].apply(console,s)}}),setInterval(function(){const r=Ba(".mylog");if(!r||e)return;e=!0;const s=mylog.splice(0,mylog.length);s.forEach(o=>{r.append(Ba("<div>").addClass(o.type).text("["+o.type+"] "+o.msg+(o.location?" @ "+o.location:"")))}),s.length&&r.scrollTop(r[0].scrollHeight),e=!1},1e3)}})();const dn=11/23/100;function Tc(i){const e={r:0,g:0,b:0};if(i.length===7)e.r=parseInt(i.substring(1,3),16),e.g=parseInt(i.substring(3,5),16),e.b=parseInt(i.substring(5,7),16);else if(i.length===4){const t=i[1],r=i[2],s=i[3];e.r=parseInt(t+t,16),e.g=parseInt(r+r,16),e.b=parseInt(s+s,16)}return e}function SL(i){return`#${Math.round(i.r).toString(16)}${Math.round(i.g).toString(16)}${Math.round(i.b).toString(16)}`}function kL(i,e,t){const r=Tc(i),s=Tc(e);return r.r+=s.r*(.05+dn*(t-1)),r.g+=s.g*(.05+dn*(t-1)),r.b+=s.b*(.05+dn*(t-1)),SL(r)}function Dc(i,e){const t={};for(let r=1;r<=24;r++)t[`elevation${r}`]={backgroundColor:kL(i,e,r)};return t}function vL(i,e){var n,a,c,l,N,u,g,L,d,y,D;let t,r;i==="dark"?(r={MuiAppBar:{colorDefault:{backgroundColor:"#272727"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[200],"&:hover":{color:qe[100]}}},MuiPaper:Dc("#121212","#fff")},t={name:i,palette:{mode:"dark",background:{paper:"#121212",default:"#121212"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):i==="blue"?(r={MuiAppBar:{colorDefault:{backgroundColor:"#3399CC"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[400],"&:hover":{color:qe[300]}}}},t={name:i,palette:{mode:"dark",background:{paper:"#151d21",default:"#151d21"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):i==="colored"?(r={MuiAppBar:{colorDefault:{backgroundColor:"#2a3135"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[200],"&:hover":{color:qe[100]}}},MuiPaper:Dc("#151d21","#fff")},t={name:i,palette:{mode:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#96fc96"}}):i==="PT"?(r={MuiAppBar:{colorDefault:{backgroundColor:"#0F99DE"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[400],"&:hover":{color:qe[300]}}}},t={name:i,palette:{mode:"light",primary:{main:"#0F99DE"},secondary:{main:"#88A536"},expert:"#BD1B24"}}):i==="DX"?(r={MuiAppBar:{colorDefault:{backgroundColor:"#a9a9a9"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[400],"&:hover":{color:qe[300]}}}},t={name:i,palette:{mode:"light",primary:{main:"#F5F5F7"},secondary:{main:"#a9a9a9"},expert:"#BD1B24",text:{primary:"#007AFE",secondary:"#007AFE",disabled:"#007AFEAA"}}}):(r={MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:qe[400],"&:hover":{color:qe[300]}}}},t={name:i,palette:{mode:"light",primary:{main:"#3399CC",dark:"#256c97",light:"#76d0fd"},secondary:{main:"#164477"},expert:"#14bb00"}}),t.toolbar={height:48},t.saveToolbar={background:(a=(n=t.palette)==null?void 0:n.primary)==null?void 0:a.main,button:{borderRadius:3,height:32}},t.palette&&(t.palette.grey={main:jc[300],dark:jc[400]});const s=dc(t),o=s.palette;return dc(s,{...e||void 0,components:{...r,MuiButton:{variants:[{props:{variant:"contained",color:"grey"},style:{backgroundColor:(c=o.grey)==null?void 0:c[300],color:o.getContrastText&&((l=o.grey)!=null&&l[300])?o.getContrastText(o.grey[300]):void 0}},{props:{variant:"outlined",color:"grey"},style:{color:(N=o.text)==null?void 0:N.primary,borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)","&.Mui-disabled":{border:`1px solid ${(u=o.action)==null?void 0:u.disabledBackground}`},"&:hover":{borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)",backgroundColor:yc(((g=o.text)==null?void 0:g.primary)||"",((L=o.action)==null?void 0:L.hoverOpacity)||.04)}}},{props:{variant:"text",color:"grey"},style:{color:(d=o.text)==null?void 0:d.primary,"&:hover":{backgroundColor:yc(((y=o.text)==null?void 0:y.primary)||"",((D=o.action)==null?void 0:D.hoverOpacity)||.04)}}}]},...(e==null?void 0:e.components)||void 0}})}function bL(){let i,e;const t=new Promise((r,s)=>{i=r,e=s});return t.resolve=i,t.reject=e,t}function ea(i){return(i==null?void 0:i.rows.map(e=>e.value).filter(e=>!!e))??[]}function _t(i){return i!=null&&i.startsWith("system.host.")||(i=`system.host.${i}`),i}function $r(i){return i!=null&&i.startsWith("system.host.")&&(i=i.substring(12)),i}function hc(i){return new Promise(e=>{setTimeout(e,i)})}function vs(i){i=(i||"").toString();const e=i[0]==="*",t=i[i.length-1]==="*";return i=i.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"),(e?"":"^")+i+(t?"":"$")}var Dt;(function(i){i[i.CONNECTING=0]="CONNECTING",i[i.CONNECTED=1]="CONNECTED",i[i.OBJECTS_LOADED=2]="OBJECTS_LOADED",i[i.READY=3]="READY"})(Dt||(Dt={}));var Se;(function(i){i.PERMISSION_ERROR="permissionError",i.NOT_CONNECTED="notConnectedError",i.TIMEOUT="timeout",i.NOT_ADMIN="Allowed only in admin",i.NOT_SUPPORTED="Not supported"})(Se||(Se={}));const Eke=Se.PERMISSION_ERROR;Se.NOT_CONNECTED;const YL=["material","echarts","vis"];class Oe{constructor(e){this.props=this.applyDefaultProps(e),this.connId=`${this.props.name?`${this.props.name}-`:""}${Math.round(Math.random()*1e6).toString().padStart(6,"0")}`,this.waitForSocketLib().then(()=>this.startSocket()).catch(t=>{alert(`Socket connection could not be initialized: ${t}`)})}applyDefaultProps(e){return{...e,protocol:e.protocol||window.location.protocol,host:e.host||window.location.hostname,port:e.port||(window.location.port==="3000"?8081:window.location.port),ioTimeout:Math.max(e.ioTimeout||2e4,2e4),cmdTimeout:Math.max(e.cmdTimeout||5e3,5e3),admin5only:e.admin5only||!1,autoSubscribes:e.autoSubscribes??[],autoSubscribeLog:e.autoSubscribeLog??!1,doNotLoadACL:e.doNotLoadACL??!0,doNotLoadAllObjects:e.doNotLoadAllObjects??!0}}props;connId;lastAccessToken=null;ignoreState="";connected=!1;subscribed=!1;firstConnect=!0;waitForRestart=!1;loaded=!1;simStates={};statesSubscribes={};filesSubscribes={};objectsSubscribes={};objects={};states={};acl=null;isSecure=!1;onReadyDone=!1;onConnectionHandlers=[];onLogHandlers=[];onCmdStdoutHandler;onCmdStderrHandler;onCmdExitHandler;onError(e){(this.props.onError??console.error)(e)}_socket;_waitForSocketPromise;_waitForFirstConnectionPromise=bL();_instanceSubscriptions={};_promises={};_authTimer=null;_refreshTimer=null;_systemConfig;get systemConfig(){return this._systemConfig}systemLang="en";static isWeb(){return window.socketUrl!==void 0}waitForSocketLib(){return this._waitForSocketPromise?this._waitForSocketPromise:(this._waitForSocketPromise=new Promise(async(e,t)=>{if(typeof window.io>"u"&&typeof window.iob>"u")if(typeof window.registerSocketOnLoad=="function")window.registerSocketOnLoad(()=>e());else{for(let r=1;r<=30;r++){if(window.io||window.iob)return e();await hc(100)}t(new Error("Socket library could not be loaded!"))}else e()}),this._waitForSocketPromise)}async startSocket(){if(this._socket)return;let e=this.props.host,t=this.props.port,r=(this.props.protocol||window.location.protocol).replace(":",""),s=window.location.pathname;if(window.location.hostname==="iobroker.net"||window.location.hostname==="iobroker.pro")s="";else{if(window.socketUrl){const a=new URL(window.socketUrl);e=a.hostname,t=a.port,r=a.protocol.replace(":","")}const n=s.lastIndexOf("/");if(n!==-1&&(s=s.substring(0,n+1)),Oe.isWeb()){const a=s.split("/");a.length>2&&(a.pop(),a.pop(),YL.includes(a[a.length-1])&&a.pop(),s=a.join("/"),s.endsWith("/")||(s+="/"))}}const o=t?`${r}://${e}:${t}`:`${r}://${e}`;return this._socket=(window.io||window.iob).connect(o,{path:s.endsWith("/")?`${s}socket.io`:`${s}/socket.io`,query:"ws=true",name:this.props.name,timeout:this.props.ioTimeout,uuid:this.props.uuid,token:this.props.token}),this._socket.on("connect",n=>{window.addEventListener("storage",this.onAccessTokenUpdated);const a=Oe.readTokens();if(a&&!a.owner){const c=Date.now();this.saveTokens({access_token:a.access_token,refresh_token:a.refresh_token,expires_in:Math.round((a.expires_in.getTime()-c)/1e3),refresh_token_expires_in:Math.round((a.refresh_token_expires_in.getTime()-c)/1e3),token_type:"Bearer"},a.stayLoggedIn)}this.onReadyDone=!1,n!==!0?(this.connected=!0,setTimeout(()=>this.getVersion().then(c=>{const[l,N,u]=c.version.split(".");parseInt(l,10)*1e4+parseInt(N,10)*100+parseInt(u,10)<40102?(this._authTimer=null,this.onPreConnect(!1,!1)):this._socket.emit("authenticate",(L,d)=>this.onPreConnect(L,d))}).catch(c=>this.onError({message:c.toString(),operation:"getVersion"})),500)):this._socket.emit("authenticate",(c,l)=>{this.onPreConnect(c,l)})}),this._socket.on("reconnect",()=>{var n,a;this.onReadyDone=!1,(a=(n=this.props).onProgress)==null||a.call(n,Dt.READY),this.connected=!0,this.waitForRestart?window.location.reload():(this._subscribe(!0),this.onConnectionHandlers.forEach(c=>c(!0)))}),this._socket.on("disconnect",()=>{var n,a;this.onReadyDone=!1,this.connected=!1,this.subscribed=!1,(a=(n=this.props).onProgress)==null||a.call(n,Dt.CONNECTING),this.onConnectionHandlers.forEach(c=>c(!1))}),this._socket.on("reauthenticate",()=>this.authenticate()),this._socket.on("log",n=>{var a,c;(c=(a=this.props).onLog)==null||c.call(a,n),this.onLogHandlers.forEach(l=>l(n))}),this._socket.on("error",n=>{let a;n==null?a="":typeof n.toString=="function"?a=n.toString():(a=JSON.stringify(n),console.error(`Received strange error: ${a}`)),a.includes("User not authorized")?this.authenticate():a.includes("websocket error")?(console.error(`Socket Error => reload: ${n}`),window.location.reload()):console.error(`Socket Error: ${n}`)}),this._socket.on("connect_error",n=>console.error(`Connect error: ${n}`)),this._socket.on("permissionError",n=>this.onError({message:"no permission",operation:n.operation,type:n.type,id:n.id||""})),this._socket.on("objectChange",(n,a)=>{setTimeout(()=>this.objectChange(n,a),0)}),this._socket.on("stateChange",(n,a)=>{setTimeout(()=>this.stateChange(n,a),0)}),this._socket.on("im",(n,a,c)=>{setTimeout(()=>this.instanceMessage(n,a,c),0)}),this._socket.on("fileChange",(n,a,c)=>{setTimeout(()=>this.fileChange(n,a,c),0)}),this._socket.on("cmdStdout",(n,a)=>{var c;(c=this.onCmdStdoutHandler)==null||c.call(this,n,a)}),this._socket.on("cmdStderr",(n,a)=>{var c;(c=this.onCmdStderrHandler)==null||c.call(this,n,a)}),this._socket.on("cmdExit",(n,a)=>{var c;(c=this.onCmdExitHandler)==null||c.call(this,n,a)}),Promise.resolve()}onPreConnect(e,t){var r,s;this._authTimer&&(clearTimeout(this._authTimer),this._authTimer=null),this.connected=!0,this.isSecure=t,this.waitForRestart?window.location.reload():(this.firstConnect?this.loadData().catch(o=>console.error(`Cannot load data: ${o}`)):(s=(r=this.props).onProgress)==null||s.call(r,Dt.READY),this._subscribe(!0),this.onConnectionHandlers.forEach(o=>o(!0)),this.checkAccessTokenExpire()),this._waitForFirstConnectionPromise.resolve()}static readTokens(){let e=window.sessionStorage.getItem("iob_tokens");const t=!e;if(e||(e=window.localStorage.getItem("iob_tokens")),!e)return null;const[r,s,o,n,a]=e.split(";"),c=new Date(s);return c.getTime()<Date.now()?null:{refresh_token:r,refresh_token_expires_in:c,access_token:o,expires_in:new Date(n),owner:a,stayLoggedIn:t}}static saveTokensStatic(e,t,r){const s=`${e.refresh_token};${new Date(Date.now()+e.refresh_token_expires_in*1e3).toISOString()};${e.access_token};${new Date(Date.now()+e.expires_in*1e3).toISOString()}${r?`;${r}`:""}`;t?window.localStorage.setItem("iob_tokens",s):window.sessionStorage.setItem("iob_tokens",s)}saveTokens(e,t){Oe.saveTokensStatic(e,t,this.connId)}static deleteTokensStatic(){window.localStorage.removeItem("iob_tokens"),window.sessionStorage.removeItem("iob_tokens")}deleteTokens(e,t){const r=Oe.readTokens();r&&(t?Oe.deleteTokensStatic():r.stayLoggedIn===e&&r.owner===this.connId&&(r.stayLoggedIn?window.localStorage.removeItem("iob_tokens"):window.sessionStorage.removeItem("iob_tokens")))}onAccessTokenUpdated=e=>{if(e.key==="iob_tokens"){const t=Oe.readTokens();t&&(console.log(`Tab ${this.connId} received updated token: ${t.access_token}`),this.updateTokenExpiration(t.access_token))}};updateTokenExpiration(e){this.lastAccessToken!==e&&(this.lastAccessToken=e,this._socket.emit("updateTokenExpiration",e,(t,r)=>{t?(console.error(`[UPDATE/${new Date().toISOString()}] cannot say to server about new token: ${t}`),window.location.reload()):r?console.log(`[UPDATE/${new Date().toISOString()}] server accepted new token: ${e}`):(console.error(`[UPDATE/${new Date().toISOString()}] cannot say to server about new token`),window.location.reload())})),this.checkAccessTokenExpire()}refreshTokens(e,t){if(!e){console.log(`[REFRESH/${new Date().toISOString()}] No token structure found => reloading the page`),setTimeout(()=>window.location.reload(),500);return}t||!e.owner||e.owner===this.connId?(console.log(`[REFRESH/${new Date().toISOString()}] claim ownership of the token`),this.acquireTokenLock()?(console.log(`[REFRESH/${new Date().toISOString()}] refreshing token`),fetch("./oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`grant_type=refresh_token&refresh_token=${e.refresh_token}&client_id=ioBroker&stayloggedin=${e.stayLoggedIn}`}).then(r=>{if(r.ok)return r.json();throw new Error("Cannot refresh access token")}).then(r=>{if(r.access_token)console.log(`[REFRESH/${new Date().toISOString()}] received new token: ${r.access_token}`),this.saveTokens(r,e.stayLoggedIn),this.releaseTokenLock(),this.updateTokenExpiration(r.access_token);else throw new Error("Cannot get access token")}).catch(r=>{console.warn(`[REFRESH/${new Date().toISOString()}] cannot refresh token: ${r}`),this.releaseTokenLock(),this.deleteTokens(e.stayLoggedIn),console.error(r),window.location.reload()})):(console.log(`[REFRESH/${new Date().toISOString()}] Someone else is updating the token, so wait for the next check`),this.checkAccessTokenExpire())):this.lastAccessToken!==e.access_token&&this.updateTokenExpiration(e.access_token)}acquireTokenLock(){const e=Date.now(),t=localStorage.getItem("iob_token_semaphore");if(t)try{const s=JSON.parse(t);if(e<s.expiry)return!1}catch{}const r={connId:this.connId,expiry:e+10*1e3};return localStorage.setItem("iob_token_semaphore",JSON.stringify(r)),!0}releaseTokenLock(){const e=localStorage.getItem("iob_token_semaphore");if(e)try{JSON.parse(e).connId===this.connId&&localStorage.removeItem("iob_token_semaphore")}catch{localStorage.removeItem("iob_token_semaphore")}}checkAccessTokenExpire(){if(this._refreshTimer&&(clearTimeout(this._refreshTimer),this._refreshTimer=null),this.isSecure){const e=Oe.readTokens();if(e){const t=e.expires_in.getTime();if(t<Date.now()+3e4){const r=t<Date.now()+5500;console.log(`[TOKEN/${new Date().toISOString()}] Updating refresh token ${e.access_token}`),e.refresh_token?e.owner===this.connId||r?(e.owner===this.connId?console.log(`[TOKEN/${new Date().toISOString()}] We are the owner of the token`):console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token, but we will take ownership`),this.props.tokenTimeoutHandler?(console.log(`[TOKEN/${new Date().toISOString()}] Asking GUI if we should prolong the token`),this.props.tokenTimeoutHandler(t).then(s=>{s?(console.log(`[TOKEN/${new Date().toISOString()}] Token will be prolonged`),this.refreshTokens(e,r)):(console.log(`[TOKEN/${new Date().toISOString()}] Token will not be prolonged. Reloading the page`),setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now()))})):(console.log(`[TOKEN/${new Date().toISOString()}] No tokenTimeoutHandler defined. Prolonging the token`),this.refreshTokens(e,r))):this.lastAccessToken!==e.access_token?(console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token, but we will inform the server about new token`),this.refreshTokens(e)):(console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token and the token did not change. Check in 3 seconds if the owner updated the token`),this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},3e3)):(console.log(`[TOKEN/${new Date().toISOString()}] We do not have a refresh token, so we need to reauthenticate`),setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now()))}else this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},t-Date.now()-3e4>12e4?12e4:t-Date.now()-3e4)}}}static isCloud(){return window.location.hostname.includes("amazonaws.com")||window.location.hostname.includes("iobroker.in")?!0:typeof window.socketUrl>"u"?!1:window.socketUrl.includes("iobroker.in")||window.socketUrl.includes("amazonaws")}isConnected(){return this.connected}waitForFirstConnection(){return this._waitForFirstConnectionPromise}async getUserPermissions(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getUserPermissions",(r,s)=>{r?t(r):e(s||null)})}})}async loadData(){if(this.loaded)return;const e=10;for(let t=1;t<=e;t++){if(this.doLoadData().catch(r=>console.error(`Cannot load data: ${r}`)),this.loaded)return;await hc(Oe.isCloud()?5e3:1e3)}}async doLoadData(){var e,t,r,s,o,n,a,c,l;if(!this.loaded){if(!this.props.doNotLoadACL)try{this.acl=await this.getUserPermissions()}catch(N){this.onError(`Cannot read user permissions: ${N}`);return}try{this.props.admin5only&&!Oe.isWeb()&&(!window.vendorPrefix||window.vendorPrefix==="@@vendorPrefix@@")?this._systemConfig=await this.getCompactSystemConfig():this._systemConfig=await this.getSystemConfig()}catch(N){this.onError(`Cannot read system config: ${N}`);return}this._systemConfig&&(this.systemLang=(e=this._systemConfig.common)==null?void 0:e.language,this.systemLang||(this.systemLang=window.navigator.userLanguage||window.navigator.language,/^(en|de|ru|pt|nl|fr|it|es|pl|uk)-?/.test(this.systemLang)?this.systemLang=this.systemLang.substring(0,2):/^(en|de|ru|pt|nl|fr|it|es|pl|uk|zh-cn)$/.test(this.systemLang)||(this.systemLang="en"),this._systemConfig.common.language=this.systemLang)),(r=(t=this.props).onLanguage)==null||r.call(t,this.systemLang),this.loaded=!0,(o=(s=this.props).onProgress)==null||o.call(s,Dt.CONNECTED),this.firstConnect=!1,this.props.doNotLoadAllObjects?this.props.admin5only?this.objects={}:this.objects={"system.config":this._systemConfig}:this.objects=await this.getObjects(),(a=(n=this.props).onProgress)==null||a.call(n,Dt.READY),this.onReadyDone||(this.onReadyDone=!0,(l=(c=this.props).onReady)==null||l.call(c,this.objects))}}authenticate(){window.location.search.includes("&href=")?window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}`:window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${encodeURIComponent(window.location.search+window.location.hash)}`}async subscribeState(...e){let t,r,s;e.length===3?[t,r,s]=e:([t,s]=e,r=!1);let o;if(Array.isArray(t)?o=t:o=[t],typeof s!="function")throw new Error("The state change handler must be a function!");const n=[];for(let a=0;a<o.length;a++){const c=o[a];this.statesSubscribes[c]?!this.statesSubscribes[c].cbs.includes(s)&&this.statesSubscribes[c].cbs.push(s):(this.statesSubscribes[c]={reg:new RegExp(vs(c)),cbs:[s]},t!==this.ignoreState&&n.push(c))}if(this.connected)if(n.length&&this._socket.emit("subscribe",n),r){let a;for(let c=0;c<o.length;c++){try{a=await this.getBinaryState(o[c])}catch(l){console.error(`Cannot getBinaryState "${o[c]}": ${JSON.stringify(l)}`),a=void 0}a!=null&&s(o[c],a)}}else if(o.find(a=>a.includes("*"))){let a;for(let c=0;c<o.length;c++){try{a=await this.getForeignStates(o[c])}catch(l){console.error(`Cannot getForeignStates "${o[c]}": ${JSON.stringify(l)}`);return}if(a)for(const[l,N]of Object.entries(a)){const u=s(l,N);u instanceof Promise&&u.catch(g=>console.error(`Cannot call state change handler: ${g}`))}}}else try{const a=await(Oe.isWeb()?this.getStates(o):this.getForeignStates(o));if(a)for(const[c,l]of Object.entries(a)){const N=s(c,l);N instanceof Promise&&N.catch(u=>console.error(`Cannot call state change handler: ${u}`))}}catch(a){console.error(`Cannot getState "${o.join(", ")}": ${a.message}`);return}}async subscribeStateAsync(e,t){return this.subscribeState(e,t)}unsubscribeState(e,t){var o;let r;Array.isArray(e)?r=e:r=[e];const s=[];for(let n=0;n<r.length;n++){const a=r[n];if(this.statesSubscribes[a]){const c=this.statesSubscribes[a];if(t){const l=c.cbs.indexOf(t);l!==-1&&c.cbs.splice(l,1)}else c.cbs=[];(o=c.cbs)!=null&&o.length||(delete this.statesSubscribes[a],a!==this.ignoreState&&s.push(a))}}this.connected&&s.length&&this._socket.emit("unsubscribe",r)}subscribeObject(e,t){let r;if(Array.isArray(e)?r=e:r=[e],typeof t!="function")throw new Error("The object change handler must be a function!");const s=[];for(let o=0;o<r.length;o++){const n=r[o];this.objectsSubscribes[n]?!this.objectsSubscribes[n].cbs.includes(t)&&this.objectsSubscribes[n].cbs.push(t):(this.objectsSubscribes[n]={reg:new RegExp(vs(n)),cbs:[t]},s.push(n))}return this.connected&&s.length&&this._socket.emit("subscribeObjects",s),Promise.resolve()}unsubscribeObject(e,t){var o;let r;Array.isArray(e)?r=e:r=[e];const s=[];for(let n=0;n<r.length;n++){const a=r[n];if(this.objectsSubscribes[a]){const c=this.objectsSubscribes[a];if(t){const l=c.cbs.indexOf(t);l!==-1&&c.cbs.splice(l,1)}else c.cbs=[];(o=c.cbs)!=null&&o.length||(delete this.objectsSubscribes[a],s.push(a))}}return this.connected&&s.length&&this._socket.emit("unsubscribeObjects",s),Promise.resolve()}objectChange(e,t){var o,n;let r;this.objects[e]&&(r={_id:e,type:this.objects[e].type});let s=!1;t?(t._rev&&this.objects[e]&&(this.objects[e]._rev=t._rev),(!this.objects[e]||JSON.stringify(this.objects[e])!==JSON.stringify(t))&&(this.objects[e]=t,s=!0)):this.objects[e]&&(delete this.objects[e],s=!0);for(const[a,c]of Object.entries(this.objectsSubscribes))(a===e||c.reg.test(e))&&c.cbs.forEach(l=>{try{const N=l(e,t,r);N instanceof Promise&&N.catch(u=>console.error(`Cannot call object change handler: ${u}`))}catch(N){console.error(`Error by callback of objectChange: ${N}`)}});if(s){const a=(n=(o=this.props).onObjectChange)==null?void 0:n.call(o,e,t);a instanceof Promise&&a.catch(c=>console.error(`Cannot call object change handler: ${c}`))}}stateChange(e,t){for(const r of Object.values(this.statesSubscribes))if(r.reg.test(e))for(const s of r.cbs)try{const o=s(e,t??null);o instanceof Promise&&o.catch(n=>console.error(`Cannot call state change handler: ${n}`))}catch(o){console.error(`Error by callback of stateChanged: ${o}`)}}instanceMessage(e,t,r){var s;(s=this._instanceSubscriptions[t])==null||s.forEach(o=>{if(o.messageType===e){const n=o.callback(r,t,e);n instanceof Promise&&n.catch(a=>console.error(`Cannot call instance message handler: ${a}`))}})}fileChange(e,t,r){for(const s of Object.values(this.filesSubscribes))if(s.regId.test(e)&&s.regFilePattern.test(t))for(const o of s.cbs)try{o(e,t,r)}catch(n){console.error(`Error by callback of fileChange: ${n}`)}}async subscribeFiles(e,t,r){if(typeof r!="function")throw new Error("The state change handler must be a function!");let s;Array.isArray(t)?s=t:s=[t];const o=[];for(let n=0;n<s.length;n++){const a=s[n],c=`${e}$%$${a}`;this.filesSubscribes[c]?!this.filesSubscribes[c].cbs.includes(r)&&this.filesSubscribes[c].cbs.push(r):(this.filesSubscribes[c]={regId:new RegExp(vs(e)),regFilePattern:new RegExp(vs(a)),cbs:[r]},o.push(a))}return this.connected&&o.length&&this._socket.emit("subscribeFiles",e,o),Promise.resolve()}unsubscribeFiles(e,t,r){var n;let s;Array.isArray(t)?s=t:s=[t];const o=[];for(let a=0;a<s.length;a++){const c=s[a],l=`${e}$%$${c}`;if(this.filesSubscribes[l]){const N=this.filesSubscribes[l];if(r){const u=N.cbs.indexOf(r);u!==-1&&N.cbs.splice(u,1)}else N.cbs=[];(n=N.cbs)!=null&&n.length||(delete this.filesSubscribes[l],o.push(c))}}this.connected&&o.length&&this._socket.emit("unsubscribeFiles",e,o)}async request({cacheKey:e,forceUpdate:t,commandTimeout:r,onTimeout:s,requireAdmin:o,requireFeatures:n,executor:a}){if(o&&Oe.isWeb())return Promise.reject(new Error(Se.NOT_ADMIN));if(e&&!t&&e in this._promises)return this._promises[e];if(!this.connected)return Promise.reject(new Error(Se.NOT_CONNECTED));if(n!=null&&n.length){for(const l of n)if(!await this.checkFeatureSupported(l))throw new Error(Se.NOT_SUPPORTED)}const c=new Promise(async(l,N)=>{const u={elapsed:!1,clearTimeout:()=>{}};let g;r!==!1&&(g=setTimeout(()=>{u.elapsed=!0,s==null||s(),e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(Se.TIMEOUT))},r??this.props.cmdTimeout),u.clearTimeout=()=>{clearTimeout(g)});try{await a(l,N,u)}catch(L){e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(L.toString()))}});return e&&(this._promises[e]=c),c}resetCache(e,t){t?Object.keys(this._promises).filter(r=>r.startsWith(e)).forEach(r=>{delete this._promises[r]}):delete this._promises[e]}getStates(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getStates",e,(s,o)=>{this.states=o??{},s?r(s):t(this.states)})}})}getState(e){return this.request({commandTimeout:!1,executor:(t,r)=>{if(e&&e===this.ignoreState){t(this.simStates[e]||{val:null,ack:!0});return}this._socket.emit("getState",e,(s,o)=>{s?r(s):t(o)})}})}getBinaryState(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getBinaryState",e,(s,o)=>{s?r(s):t(o)})}})}setBinaryState(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("setBinaryState",e,t,o=>{o?s(o):r()})}})}setState(e,t,r){return typeof r=="boolean"&&(t={val:t,ack:r}),this.request({commandTimeout:!1,executor:(s,o)=>{if(e&&e===this.ignoreState){let n;if(typeof r=="boolean"||typeof t=="object"&&t.val!==void 0?n=t:n={val:t,ack:!1,ts:Date.now(),lc:Date.now(),from:"system.adapter.vis.0"},this.simStates[e]=n,this.statesSubscribes[e])for(const a of this.statesSubscribes[e].cbs)try{const c=a(e,n);c instanceof Promise&&c.catch(l=>console.error(`Cannot call state change handler: ${l}`))}catch(c){console.error(`Error by callback of stateChanged: ${c}`)}s();return}this._socket.emit("setState",e,t,n=>{n?o(n):s()})}})}getObjects(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{if(!e&&this.objects){r(this.objects);return}this._socket.emit(Oe.isWeb()?"getObjects":"getAllObjects",(o,n)=>{var a,c;t||(c=(a=this.props).onProgress)==null||c.call(a,Dt.OBJECTS_LOADED),o?s(o):(this.objects=n??{},r(this.objects))})}})}getObjectsById(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjects",e,(s,o)=>{s?r(s):t(o)})}})}_subscribe(e){var t,r;if(e&&!this.subscribed){this.subscribed=!0,(t=this.props.autoSubscribes)!=null&&t.length&&this._socket.emit("subscribeObjects",this.props.autoSubscribes);const s=Object.keys(this.objectsSubscribes);s.length&&this._socket.emit("subscribeObjects",s),Object.keys(this.objectsSubscribes).forEach(o=>this._socket.emit("subscribeObjects",o)),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!0),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("subscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,a]=o.split("$%$");this._socket.emit("subscribeFiles",n,a)})}else if(!e&&this.subscribed){this.subscribed=!1,(r=this.props.autoSubscribes)!=null&&r.length&&this._socket.emit("unsubscribeObjects",this.props.autoSubscribes);const s=Object.keys(this.objectsSubscribes);s.length&&this._socket.emit("unsubscribeObjects",s),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!1),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("unsubscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,a]=o.split("$%$");this._socket.emit("unsubscribeFiles",n,a)})}}requireLog(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("requireLog",e,s=>{s?r(s):t()})}})}delObject(e,t=!1){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("delObject",e,{maintenance:t},o=>{o?s(o):r()})}})}delObjects(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("delObjects",e,{maintenance:t},o=>{o?s(o):r()})}})}setObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("setObject",e,t,o=>{o?s(o):r()})}})):Promise.reject(new Error("Null object is not allowed"))}getObject(e){return this.request({commandTimeout:!1,executor:(t,r)=>{if(e&&e===this.ignoreState){t({_id:this.ignoreState,type:"state",common:{name:"ignored state",type:"mixed"}});return}this._socket.emit("getObject",e,(s,o)=>{s?r(s):t(o)})}})}sendTo(e,t,r){return this.request({commandTimeout:!1,executor:s=>{this._socket.emit("sendTo",e,t,r,o=>{s(o)})}})}extendObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("extendObject",e,t,o=>{o?s(o):r()})}})):Promise.reject(new Error("Null object is not allowed"))}registerLogHandler(e){this.onLogHandlers.includes(e)||this.onLogHandlers.push(e)}unregisterLogHandler(e){const t=this.onLogHandlers.indexOf(e);t!==-1&&this.onLogHandlers.splice(t,1)}registerConnectionHandler(e){this.onConnectionHandlers.includes(e)||this.onConnectionHandlers.push(e)}unregisterConnectionHandler(e){const t=this.onConnectionHandlers.indexOf(e);t!==-1&&this.onConnectionHandlers.splice(t,1)}registerCmdStdoutHandler(e){this.onCmdStdoutHandler=e}unregisterCmdStdoutHandler(){this.onCmdStdoutHandler=void 0}registerCmdStderrHandler(e){this.onCmdStderrHandler=e}unregisterCmdStderrHandler(){this.onCmdStderrHandler=void 0}registerCmdExitHandler(e){this.onCmdExitHandler=e}unregisterCmdExitHandler(){this.onCmdExitHandler=void 0}getEnums(e,t){return this.request({cacheKey:`enums_${e||"all"}`,forceUpdate:t,commandTimeout:!1,executor:(r,s)=>{this._socket.emit("getObjectView","system","enum",{startkey:`enum.${e||""}`,endkey:e?`enum.${e}.香`:"enum.香"},(o,n)=>{if(o)s(o);else{const a={};if(n)for(let c=0;c<n.rows.length;c++)e&&n.rows[c].id===`enum.${e}`||(a[n.rows[c].id]=n.rows[c].value);r(a)}})}})}getObjectView(e,t,r){return this.getObjectViewCustom("system",r,e,t)}getObjectViewSystem(e,t,r){return this.getObjectViewCustom("system",e,t,r)}getObjectViewCustom(e,t,r,s){return this.request({commandTimeout:!1,executor:(o,n)=>{r=r||"",s=s||"香",this._socket.emit("getObjectView",e,t,{startkey:r,endkey:s},(a,c)=>{if(a)n(a);else{const l={};if(c&&c.rows)for(let N=0;N<c.rows.length;N++)l[c.rows[N].id]=c.rows[N].value;o(l)}})}})}readMetaItems(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","meta",{startkey:"",endkey:"香"},(r,s)=>{var o;r?t(r):e((o=s.rows)==null?void 0:o.map(n=>n.value).filter(n=>!!n))})}})}readDir(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("readDir",e,t,(o,n)=>{o?s(o):r(n)})}})}readFile(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit(r?"readFile64":"readFile",e,t,(n,a,c)=>{n?o(n):s({file:a,mimeType:c})})}})}writeFile64(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{if(typeof r=="string")this._socket.emit("writeFile",e,t,r,n=>{n?o(n):s()});else{const n=btoa(new Uint8Array(r).reduce((a,c)=>a+String.fromCharCode(c),""));this._socket.emit("writeFile64",e,t,n,a=>{a?o(a):s()})}}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("deleteFile",e,t,o=>{o?s(o):r()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("deleteFolder",e,t,o=>{o?s(o):r()})}})}rename(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit("rename",e,t,r,n=>{n?o(n):s()})}})}renameFile(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit("renameFile",e,t,r,n=>{n?o(n):s()})}})}cmdExec(e,t,r,s){return this.request({commandTimeout:s,executor:(o,n,a)=>{e=_t(e),this._socket.emit("cmdExec",e,r,t,c=>{a.elapsed||(a.clearTimeout(),c?n(c):o())})}})}getSystemConfig(e){return this.request({cacheKey:"systemConfig",forceUpdate:e,commandTimeout:!1,executor:async t=>{let r=await this.getObject("system.config");r??={},r.common??={},r.native??={},t(r)}})}getCompactSystemConfig(e){return this.request({cacheKey:"systemConfigCommon",forceUpdate:e,commandTimeout:!1,requireAdmin:!0,executor:(t,r)=>{this._socket.emit("getCompactSystemConfig",(s,o)=>{s?r(s):(o??={},o.common??={},o.native??={},t(o))})}})}getForeignStates(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getForeignStates",e||"*",(s,o)=>{s?r(s):t(o??{})})}})}getForeignObjects(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("getForeignObjects",e||"*",t,(o,n)=>{o?s(o):r(n)})}})}setSystemConfig(e){return this.setObject("system.config",e)}getRawSocket(){return this._socket}getHistory(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("getHistory",e,t,(o,n)=>{o?s(o):r(n)})}})}getHistoryEx(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("getHistory",e,t,(o,n,a,c)=>{o?s(o):r({values:n,sessionId:c,step:a})})}})}getIpAddresses(e,t){return e=_t(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async r=>{const s=await this.getObject(e);r((s==null?void 0:s.common.address)??[])}})}getVersion(e){return this.request({cacheKey:"version",forceUpdate:e,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getVersion",(s,o,n)=>{s&&!o&&typeof s=="string"&&s.match(/\d+\.\d+\.\d+/)?t({version:s,serverName:"socketio"}):s?r(s):t({version:o,serverName:n})})}})}getWebServerName(){return this.request({cacheKey:"webName",commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getAdapterName",(r,s)=>{r?t(r):e(s)})}})}fileExists(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("fileExists",e,t,(o,n)=>{o?s(o):r(!!n)})}})}getCurrentUser(){return this.request({commandTimeout:!1,executor:e=>{this._socket.emit("authEnabled",(t,r)=>{e(r)})}})}getUuid(){return this.request({cacheKey:"uuid",commandTimeout:!1,executor:async e=>{var r;const t=await this.getObject("system.meta.uuid");e((r=t==null?void 0:t.native)==null?void 0:r.uuid)}})}checkFeatureSupported(e,t){return this.request({cacheKey:`supportedFeatures_${e}`,forceUpdate:t,commandTimeout:!1,executor:(r,s)=>{this._socket.emit("checkFeatureSupported",e,(o,n)=>{o?s(o):r(n)})}})}getAdapterInstances(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`instances_${e}`,forceUpdate:t,commandTimeout:!1,executor:async r=>{const s=e?`system.adapter.${e}.`:"system.adapter.",o=`${s}香`,n=await this.getObjectViewSystem("instance",s,o),a=Object.values(n);r(e?a.filter(c=>c.common.name===e):a)}})}getAdapters(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`adapter_${e}`,forceUpdate:t,commandTimeout:!1,executor:async r=>{const s=await this.getObjectViewSystem("adapter",`system.adapter.${e||""}`,`system.adapter.${e||"香"}`),o=Object.values(s);r(e?o.filter(n=>n.common.name===e):o)}})}getGroups(e){return this.request({cacheKey:"groups",forceUpdate:e,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjectView","system","group",{startkey:"system.group.",endkey:"system.group.香"},(s,o)=>{s?r(s):t(ea(o))})}})}logout(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("logout",r=>{r?t(r):e(null)})}})}subscribeOnInstance(e,t,r,s){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("clientSubscribe",e,t,r,(a,c)=>{a?n(a):c&&(c.error?n(c.error):(e.startsWith("system.adapter.")||(e=`system.adapter.${e}`),this._instanceSubscriptions[e]=this._instanceSubscriptions[e]||[],this._instanceSubscriptions[e].find(l=>l.messageType===t&&l.callback===s)||this._instanceSubscriptions[e].push({messageType:t,callback:s}),o(c)))})}})}unsubscribeFromInstance(e,t,r){var n;e.startsWith("system.adapter.")||(e=`system.adapter.${e}`);let s;const o=[];do{s=!1;const a=(n=this._instanceSubscriptions[e])==null?void 0:n.findIndex(c=>(!t||c.messageType===t)&&(!r||c.callback===r));if(a!=null&&a!==-1){s=!0;const c=this._instanceSubscriptions[e][a].messageType;this._instanceSubscriptions[e].splice(a,1),this._instanceSubscriptions[e].length||delete this._instanceSubscriptions[e],this._instanceSubscriptions[e]&&this._instanceSubscriptions[e].find(N=>N.messageType===c)||o.push(this.request({commandTimeout:!1,executor:(N,u)=>{this._socket.emit("clientUnsubscribe",e,t,(g,L)=>g?u(g):N(L))}}))}}while(s&&(!r||!t));return o.length?Promise.all(o).then(a=>!!a.find(c=>c)):Promise.resolve(!1)}log(e,t){return e?this.request({commandTimeout:!1,executor:r=>(this._socket.emit("log",e,t),r(null))}):Promise.resolve(null)}setStateToIgnore(e){this.ignoreState=e}}function QL(i,e){if(!e)return;let t;if(e.length<700&&(e.indexOf("/")!==-1||e.indexOf("\\")!==-1))if(i.toLowerCase().includes("private"))t="private";else if(e.toLowerCase().includes("private"))t="private";else if(i.toLowerCase().includes("public"))t="public";else if(e.toLowerCase().includes("public"))t="public";else if(i.toLowerCase().includes("chain"))t="chained";else if(e.toLowerCase().includes("chain"))t="chained";else return;else t=e.substring(0,26)==="-----BEGIN RSA PRIVATE KEY"||e.substring(0,22)==="-----BEGIN PRIVATE KEY"?"private":"public",t==="public"&&e.split("-----END CERTIFICATE-----").filter(s=>s.replace(/\r\n|\r|\n/,"").trim()).length>1&&(t="chained");return{name:i,type:t}}function UL(i){var r,s,o,n;const e=[{name:"[IPv4] 0.0.0.0 - Listen on all IPs",address:"0.0.0.0",family:"ipv4"}],t=[{name:"[IPv6] :: - Listen on all IPs",address:"::",family:"ipv6"}];if((s=(r=i.native)==null?void 0:r.hardware)!=null&&s.networkInterfaces){const a=(n=(o=i.native)==null?void 0:o.hardware)==null?void 0:n.networkInterfaces;Object.keys(a).forEach(c=>{a[c].forEach(l=>{l.family!=="IPv6"?e.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv4"}):t.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv6"})})})}return{IPs4:e,IPs6:t}}class _ke extends Oe{constructor(e){super(e)}request(e){return super.request({requireAdmin:!0,...e})}getCertificates(e){return this.request({cacheKey:"cert",forceUpdate:e,commandTimeout:!1,executor:async t=>{var s;const r=await this.getObject("system.certificates");(s=r==null?void 0:r.native)!=null&&s.certificates?t(Object.entries(r.native.certificates).map(([o,n])=>QL(o,n)).filter(o=>!!o)):t([])}})}getLogs(e,t=200){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendToHost",e,"getLogs",t||200,s=>{r(s)})}})}upgradeAdapterWithWebserver(e,t){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendToHost",e,"upgradeAdapterWithWebserver",t,s=>{r(s)})}})}upgradeController(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit("sendToHost",e,"upgradeController",{version:t,adminInstance:r},n=>{const a=n;a.error?o(a.error):s(a.result)})}})}updateLicenses(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("updateLicenses",e,t,(o,n)=>{o?s(o):r(n)})}})}upgradeOsPackages(e,t,r){return this.request({commandTimeout:!1,executor:s=>{this._socket.emit("sendToHost",e,"upgradeOsPackages",{packages:t,restart:!!r},o=>{s(o)})}})}getLogsFiles(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("readLogs",e,(s,o)=>{s&&r(s),t(o)})}})}delLogs(e){return this.request({commandTimeout:!1,executor:(t,r)=>{this._socket.emit("sendToHost",e,"delLogs",null,s=>{s&&r(s),t()})}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("deleteFile",e,t,o=>{o&&s(o),r()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(r,s)=>{this._socket.emit("deleteFolder",e,t,o=>{o&&s(o),r()})}})}rename(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit("rename",e,t,r,n=>{n&&o(n),s()})}})}renameFile(e,t,r){return this.request({commandTimeout:!1,executor:(s,o)=>{this._socket.emit("renameFile",e,t,r,n=>{n&&o(n),s()})}})}getHosts(e){return this.request({cacheKey:"hosts",forceUpdate:e,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjectView","system","host",{startkey:"system.host.",endkey:"system.host.香"},(s,o)=>{s?r(s):t(ea(o))})}})}getUsers(e){return this.request({cacheKey:"users",forceUpdate:e,commandTimeout:!1,executor:(t,r)=>{this._socket.emit("getObjectView","system","user",{startkey:"system.user.",endkey:"system.user.香"},(s,o)=>{s?r(s):t(ea(o))})}})}renameGroup(e,t,r){return this.request({commandTimeout:!1,executor:async s=>{const o=await this.getGroups(!0),n=o.filter(c=>c._id.startsWith(`${e}.`));for(const c of n){const l=c._id,N=t+c._id.substring(e.length);c._id=N,await this.setObject(N,c),await this.delObject(l)}const a=o.find(c=>c._id===e);if(a){const c=a._id;a._id=t,r!==void 0&&(a.common??={},a.common.name=r),await this.setObject(t,a),await this.delObject(c)}s()}})}getHostInfo(e,t,r){return e=_t(e),this.request({cacheKey:`hostInfo_${e}`,forceUpdate:t,commandTimeout:r,executor:(s,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfo",null,a=>{n.elapsed||(n.clearTimeout(),a===Se.PERMISSION_ERROR?o('May not read "getHostInfo"'):a?s(a):o('Cannot read "getHostInfo"'))})}})}getHostInfoShort(e,t,r){return e=_t(e),this.request({cacheKey:`hostInfoShort_${e}`,forceUpdate:t,commandTimeout:r,executor:(s,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfoShort",null,a=>{n.elapsed||(n.clearTimeout(),a===Se.PERMISSION_ERROR?o('May not read "getHostInfoShort"'):a?s(a):o('Cannot read "getHostInfoShort"'))})}})}getRepository(e,t,r,s){return this.request({cacheKey:`repository_${e}`,forceUpdate:r,commandTimeout:s,executor:(o,n,a)=>{this._socket.emit("sendToHost",e,"getRepository",t,c=>{a.elapsed||(a.clearTimeout(),c===Se.PERMISSION_ERROR?n('May not read "getRepository"'):c?o(c):n('Cannot read "getRepository"'))})}})}getInstalled(e,t,r){return e=_t(e),this.request({cacheKey:`installed_${e}`,forceUpdate:t,commandTimeout:r,executor:(s,o,n)=>{this._socket.emit("sendToHost",e,"getInstalled",null,a=>{n.elapsed||(n.clearTimeout(),a===Se.PERMISSION_ERROR?o('May not read "getInstalled"'):a?s(a):o('Cannot read "getInstalled"'))})}})}cmdExec(e,t,r,s){return this.request({commandTimeout:s,executor:(o,n,a)=>{e=_t(e),this._socket.emit("cmdExec",e,r,t,c=>{a.elapsed||(a.clearTimeout(),c&&n(c),o())})}})}readBaseSettings(e){return e=$r(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(t,r,s)=>{this._socket.emit("sendToHost",e,"readBaseSettings",null,o=>{s.elapsed||(s.clearTimeout(),o===Se.PERMISSION_ERROR?r('May not read "BaseSettings"'):o?o.error?r(new Error(o.error)):t(o):r('Cannot read "BaseSettings"'))})}})}writeBaseSettings(e,t){return e=$r(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(r,s,o)=>{this._socket.emit("sendToHost",e,"writeBaseSettings",t,n=>{o.elapsed||(o.clearTimeout(),n===Se.PERMISSION_ERROR?s('May not write "BaseSettings"'):n?r(n):s('Cannot write "BaseSettings"'))})}})}restartController(e){return e=$r(e),this.request({executor:(t,r,s)=>{this._socket.emit("sendToHost",e,"restartController",null,()=>{s.elapsed||(s.clearTimeout(),t(!0))})}})}getDiagData(e,t){return e=$r(e),this.request({executor:(r,s,o)=>{this._socket.emit("sendToHost",e,"getDiagData",t,n=>{o.elapsed||(o.clearTimeout(),r(n||null))})}})}changePassword(e,t){return this.request({executor:(r,s,o)=>{this._socket.emit("changePassword",e,t,n=>{o.elapsed||(o.clearTimeout(),n&&s(n),r())})}})}getIpAddresses(e,t){return e=_t(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async r=>{const s=await this.getObject(e);r((s==null?void 0:s.common.address)??[])}})}getHostByIp(e,t){return e=$r(e),this.request({cacheKey:`rIPs_${e}`,forceUpdate:t,executor:(r,s,o)=>{this._socket.emit("getHostByIp",e,(n,a)=>{if(o.elapsed)return;o.clearTimeout();const{IPs4:c,IPs6:l}=UL(a);r([...c,...l])})}})}encrypt(e){return this.request({executor:(t,r,s)=>{this._socket.emit("encrypt",e,(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}decrypt(e){return this.request({executor:(t,r,s)=>{this._socket.emit("decrypt",e,(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}chmodFile(e,t,r){return this.request({executor:(s,o,n)=>{this._socket.emit("chmodFile",e,t,r,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),s(c))})}})}chownFile(e,t,r){return this.request({executor:(s,o,n)=>{this._socket.emit("chownFile",e,t,r,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),s(c))})}})}getNotifications(e,t){return this.request({executor:(r,s,o)=>{this._socket.emit("sendToHost",e,"getNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),r(n))})}})}clearNotifications(e,t){return this.request({executor:(r,s,o)=>{this._socket.emit("sendToHost",e,"clearNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),r(n))})}})}getIsEasyModeStrict(){return this.request({executor:(e,t,r)=>{this._socket.emit("getIsEasyModeStrict",(s,o)=>{r.elapsed||(r.clearTimeout(),s&&t(s),e(!!o))})}})}getEasyMode(){return this.request({executor:(e,t,r)=>{this._socket.emit("getEasyMode",(s,o)=>{r.elapsed||(r.clearTimeout(),s?t(new Error(s)):e(o))})}})}getRatings(e){return this.request({executor:(t,r,s)=>{this._socket.emit("getRatings",!!e,(o,n)=>{s.elapsed||(s.clearTimeout(),o?r(new Error(o)):t(n))})}})}getCurrentSession(e){const t=new AbortController;return this.request({commandTimeout:e||5e3,onTimeout:()=>{t.abort()},executor:async(r,s,o)=>{try{const n=await fetch("./session",{signal:t.signal});if(o.elapsed)return;o.clearTimeout();const a=await n.json();r(a)}catch(n){s(`getCurrentSession: ${n}`)}}})}getCurrentInstance(){return this.request({cacheKey:"currentInstance",executor:(e,t,r)=>{this._socket.emit("getCurrentInstance",(s,o)=>{r.elapsed||(r.clearTimeout(),s?t(s):e(o))})}})}getAdapterInstances(e,t){let r;return typeof e=="boolean"?(t=e,r=""):r=e||"",this.request({cacheKey:`instances_${r}`,forceUpdate:t,executor:(s,o,n)=>{this._socket.emit("getAdapterInstances",r,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),s(c))})}})}getAdapters(e,t){let r;return typeof e=="boolean"?(t=e,r=""):r=e||"",this.request({cacheKey:`adapter_${r}`,forceUpdate:t,executor:(s,o,n)=>{this._socket.emit("getAdapters",r,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),s(c))})}})}getCompactAdapters(e){return this.request({cacheKey:"compactAdapters",forceUpdate:e,executor:(t,r,s)=>{this._socket.emit("getCompactAdapters",(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}getAdaptersResetCache(e){e=e??"",this.resetCache(`adapter_${e}`),this.resetCache("compactAdapters")}getCompactInstances(e){return this.request({cacheKey:"compactInstances",forceUpdate:e,executor:(t,r,s)=>{this._socket.emit("getCompactInstances",(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}getAdapterInstancesResetCache(e){e=e??"",this.resetCache(`instances_${e}`),this.resetCache("compactInstances")}getCompactInstalled(e,t,r){return e=_t(e),this.request({cacheKey:`installedCompact_${e}`,forceUpdate:t,commandTimeout:r,executor:(s,o,n)=>{this._socket.emit("getCompactInstalled",e,a=>{n.elapsed||(n.clearTimeout(),a===Se.PERMISSION_ERROR?o('May not read "getCompactInstalled"'):a?s(a):o('Cannot read "getCompactInstalled"'))})}})}getInstalledResetCache(e){e?(this.resetCache(`installedCompact_${e}`),this.resetCache(`installed_${e}`)):(this.resetCache("installedCompact_",!0),this.resetCache("installed_",!0))}getCompactRepository(e,t,r){return e=_t(e),this.request({cacheKey:`repositoryCompact_${e}`,forceUpdate:t,commandTimeout:r,executor:(s,o,n)=>{this._socket.emit("getCompactRepository",e,a=>{n.elapsed||(n.clearTimeout(),a===Se.PERMISSION_ERROR?o('May not read "getCompactRepository"'):a?s(a):o('Cannot read "getCompactRepository"'))})}})}getRepositoryResetCache(e){e?(this.resetCache(`repositoryCompact_${e}`),this.resetCache(`repository_${e}`)):(this.resetCache("repositoryCompact_",!0),this.resetCache("repository_",!0))}getCompactHosts(e){return this.request({cacheKey:"hostsCompact",forceUpdate:e,executor:(t,r,s)=>{this._socket.emit("getCompactHosts",(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}getCompactSystemRepositories(e){return this.request({cacheKey:"repositoriesCompact",forceUpdate:e,executor:(t,r,s)=>{this._socket.emit("getCompactSystemRepositories",(o,n)=>{s.elapsed||(s.clearTimeout(),o&&r(o),t(n))})}})}}const ee=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Me=globalThis,pi="9.46.0";function ko(){return vo(Me),Me}function vo(i){const e=i.__SENTRY__=i.__SENTRY__||{};return e.version=e.version||pi,e[pi]=e[pi]||{}}function ys(i,e,t=Me){const r=t.__SENTRY__=t.__SENTRY__||{},s=r[pi]=r[pi]||{};return s[i]||(s[i]=e())}const $L=["debug","info","warn","error","log","assert","trace"],PL="Sentry Logger ",uo={};function hr(i){if(!("console"in Me))return i();const e=Me.console,t={},r=Object.keys(uo);r.forEach(s=>{const o=uo[s];t[s]=e[s],e[s]=o});try{return i()}finally{r.forEach(s=>{e[s]=t[s]})}}function RL(){rM().enabled=!0}function WL(){rM().enabled=!1}function l0(){return rM().enabled}function BL(...i){iM("log",...i)}function FL(...i){iM("warn",...i)}function JL(...i){iM("error",...i)}function iM(i,...e){ee&&l0()&&hr(()=>{Me.console[i](`${PL}[${i}]:`,...e)})}function rM(){return ee?ys("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const X={enable:RL,disable:WL,isEnabled:l0,log:BL,warn:FL,error:JL},N0=50,zi="?",pc=/\(error: (.*)\)/,zc=/captureMessage|captureException/;function g0(...i){const e=i.sort((t,r)=>t[0]-r[0]).map(t=>t[1]);return(t,r=0,s=0)=>{const o=[],n=t.split(`
2
3
  `);for(let a=r;a<n.length;a++){const c=n[a];if(c.length>1024)continue;const l=pc.test(c)?c.replace(pc,"$1"):c;if(!l.match(/\S*Error: /)){for(const N of e){const u=N(l);if(u){o.push(u);break}}if(o.length>=N0+s)break}}return HL(o.slice(s))}}function GL(i){return Array.isArray(i)?g0(...i):i}function HL(i){if(!i.length)return[];const e=Array.from(i);return/sentryWrapped/.test(bs(e).function||"")&&e.pop(),e.reverse(),zc.test(bs(e).function||"")&&(e.pop(),zc.test(bs(e).function||"")&&e.pop()),e.slice(0,N0).map(t=>({...t,filename:t.filename||bs(e).filename,function:t.function||zi}))}function bs(i){return i[i.length-1]||{}}const yn="<anonymous>";function ti(i){try{return!i||typeof i!="function"?yn:i.name||yn}catch{return yn}}function wc(i){const e=i.exception;if(e){const t=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&t.push(...r.stacktrace.frames)}),t}catch{return}}}const ro={},Cc={};function xi(i,e){ro[i]=ro[i]||[],ro[i].push(e)}function Oi(i,e){if(!Cc[i]){Cc[i]=!0;try{e()}catch(t){ee&&X.error(`Error while instrumenting ${i}`,t)}}}function ut(i,e){const t=i&&ro[i];if(t)for(const r of t)try{r(e)}catch(s){ee&&X.error(`Error while triggering instrumentation handler.
3
4
  Type: ${i}
4
5
  Name: ${ti(r)}
5
6
  Error:`,s)}}let Tn=null;function VL(i){const e="error";xi(e,i),Oi(e,ZL)}function ZL(){Tn=Me.onerror,Me.onerror=function(i,e,t,r,s){return ut("error",{column:r,error:s,line:t,msg:i,url:e}),Tn?Tn.apply(this,arguments):!1},Me.onerror.__SENTRY_INSTRUMENTED__=!0}let Dn=null;function XL(i){const e="unhandledrejection";xi(e,i),Oi(e,KL)}function KL(){Dn=Me.onunhandledrejection,Me.onunhandledrejection=function(i){return ut("unhandledrejection",i),Dn?Dn.apply(this,arguments):!0},Me.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const L0=Object.prototype.toString;function sM(i){switch(L0.call(i)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ii(i,Error)}}function pr(i,e){return L0.call(i)===`[object ${e}]`}function j0(i){return pr(i,"ErrorEvent")}function Ic(i){return pr(i,"DOMError")}function qL(i){return pr(i,"DOMException")}function kt(i){return pr(i,"String")}function oM(i){return typeof i=="object"&&i!==null&&"__sentry_template_string__"in i&&"__sentry_template_values__"in i}function nM(i){return i===null||oM(i)||typeof i!="object"&&typeof i!="function"}function as(i){return pr(i,"Object")}function bo(i){return typeof Event<"u"&&ii(i,Event)}function ej(i){return typeof Element<"u"&&ii(i,Element)}function tj(i){return pr(i,"RegExp")}function Yo(i){return!!(i!=null&&i.then&&typeof i.then=="function")}function ij(i){return as(i)&&"nativeEvent"in i&&"preventDefault"in i&&"stopPropagation"in i}function ii(i,e){try{return i instanceof e}catch{return!1}}function d0(i){return!!(typeof i=="object"&&i!==null&&(i.__isVue||i._isVue))}function rj(i){return typeof Request<"u"&&ii(i,Request)}const aM=Me,sj=80;function y0(i,e={}){if(!i)return"<unknown>";try{let t=i;const r=5,s=[];let o=0,n=0;const a=" > ",c=a.length;let l;const N=Array.isArray(e)?e:e.keyAttrs,u=!Array.isArray(e)&&e.maxStringLength||sj;for(;t&&o++<r&&(l=oj(t,N),!(l==="html"||o>1&&n+s.length*c+l.length>=u));)s.push(l),n+=l.length,t=t.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function oj(i,e){const t=i,r=[];if(!(t!=null&&t.tagName))return"";if(aM.HTMLElement&&t instanceof HTMLElement&&t.dataset){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}r.push(t.tagName.toLowerCase());const s=e!=null&&e.length?e.filter(n=>t.getAttribute(n)).map(n=>[n,t.getAttribute(n)]):null;if(s!=null&&s.length)s.forEach(n=>{r.push(`[${n[0]}="${n[1]}"]`)});else{t.id&&r.push(`#${t.id}`);const n=t.className;if(n&&kt(n)){const a=n.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const n of o){const a=t.getAttribute(n);a&&r.push(`[${n}="${a}"]`)}return r.join("")}function MM(){try{return aM.document.location.href}catch{return""}}function nj(i){if(!aM.HTMLElement)return null;let e=i;const t=5;for(let r=0;r<t;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}function lo(i,e=0){return typeof i!="string"||e===0||i.length<=e?i:`${i.slice(0,e)}...`}function mc(i,e){if(!Array.isArray(i))return"";const t=[];for(let r=0;r<i.length;r++){const s=i[r];try{d0(s)?t.push("[VueViewModel]"):t.push(String(s))}catch{t.push("[value cannot be serialized]")}}return t.join(e)}function aj(i,e,t=!1){return kt(i)?tj(e)?e.test(i):kt(e)?t?i===e:i.includes(e):!1:!1}function Qo(i,e=[],t=!1){return e.some(r=>aj(i,r,t))}function Xe(i,e,t){if(!(e in i))return;const r=i[e];if(typeof r!="function")return;const s=t(r);typeof s=="function"&&T0(s,r);try{i[e]=s}catch{ee&&X.log(`Failed to replace method "${e}" in object`,i)}}function wi(i,e,t){try{Object.defineProperty(i,e,{value:t,writable:!0,configurable:!0})}catch{ee&&X.log(`Failed to add non-enumerable property "${e}" to object`,i)}}function T0(i,e){try{const t=e.prototype||{};i.prototype=e.prototype=t,wi(i,"__sentry_original__",e)}catch{}}function cM(i){return i.__sentry_original__}function D0(i){if(sM(i))return{message:i.message,name:i.name,stack:i.stack,...fc(i)};if(bo(i)){const e={type:i.type,target:Ac(i.target),currentTarget:Ac(i.currentTarget),...fc(i)};return typeof CustomEvent<"u"&&ii(i,CustomEvent)&&(e.detail=i.detail),e}else return i}function Ac(i){try{return ej(i)?y0(i):Object.prototype.toString.call(i)}catch{return"<unknown>"}}function fc(i){if(typeof i=="object"&&i!==null){const e={};for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e}else return{}}function Mj(i,e=40){const t=Object.keys(D0(i));t.sort();const r=t[0];if(!r)return"[object has no keys]";if(r.length>=e)return lo(r,e);for(let s=t.length;s>0;s--){const o=t.slice(0,s).join(", ");if(!(o.length>e))return s===t.length?o:lo(o,e)}return""}function cj(){const i=Me;return i.crypto||i.msCrypto}function rt(i=cj()){let e=()=>Math.random()*16;try{if(i!=null&&i.randomUUID)return i.randomUUID().replace(/-/g,"");i!=null&&i.getRandomValues&&(e=()=>{const t=new Uint8Array(1);return i.getRandomValues(t),t[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,t=>(t^(e()&15)>>t/4).toString(16))}function h0(i){var e,t;return(t=(e=i.exception)==null?void 0:e.values)==null?void 0:t[0]}function Ti(i){const{message:e,event_id:t}=i;if(e)return e;const r=h0(i);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||t||"<unknown>":t||"<unknown>"}function ta(i,e,t){const r=i.exception=i.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=e||""),o.type||(o.type="Error")}function jr(i,e){const t=h0(i);if(!t)return;const r={type:"generic",handled:!0},s=t.mechanism;if(t.mechanism={...r,...s,...e},e&&"data"in e){const o={...s==null?void 0:s.data,...e.data};t.mechanism.data=o}}function xc(i){if(uj(i))return!0;try{wi(i,"__sentry_captured__",!0)}catch{}return!1}function uj(i){try{return i.__sentry_captured__}catch{}}const p0=1e3;function Ts(){return Date.now()/p0}function lj(){const{performance:i}=Me;if(!(i!=null&&i.now)||!i.timeOrigin)return Ts;const e=i.timeOrigin;return()=>(e+i.now())/p0}let Oc;function vt(){return(Oc??(Oc=lj()))()}function Nj(i){const e=vt(),t={sid:rt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Lj(t)};return i&&dr(t,i),t}function dr(i,e={}){if(e.user&&(!i.ipAddress&&e.user.ip_address&&(i.ipAddress=e.user.ip_address),!i.did&&!e.did&&(i.did=e.user.id||e.user.email||e.user.username)),i.timestamp=e.timestamp||vt(),e.abnormal_mechanism&&(i.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(i.ignoreDuration=e.ignoreDuration),e.sid&&(i.sid=e.sid.length===32?e.sid:rt()),e.init!==void 0&&(i.init=e.init),!i.did&&e.did&&(i.did=`${e.did}`),typeof e.started=="number"&&(i.started=e.started),i.ignoreDuration)i.duration=void 0;else if(typeof e.duration=="number")i.duration=e.duration;else{const t=i.timestamp-i.started;i.duration=t>=0?t:0}e.release&&(i.release=e.release),e.environment&&(i.environment=e.environment),!i.ipAddress&&e.ipAddress&&(i.ipAddress=e.ipAddress),!i.userAgent&&e.userAgent&&(i.userAgent=e.userAgent),typeof e.errors=="number"&&(i.errors=e.errors),e.status&&(i.status=e.status)}function gj(i,e){let t={};i.status==="ok"&&(t={status:"exited"}),dr(i,t)}function Lj(i){return{sid:`${i.sid}`,init:i.init,started:new Date(i.started*1e3).toISOString(),timestamp:new Date(i.timestamp*1e3).toISOString(),status:i.status,errors:i.errors,did:typeof i.did=="number"||typeof i.did=="string"?`${i.did}`:void 0,duration:i.duration,abnormal_mechanism:i.abnormal_mechanism,attrs:{release:i.release,environment:i.environment,ip_address:i.ipAddress,user_agent:i.userAgent}}}function Ds(i,e,t=2){if(!e||typeof e!="object"||t<=0)return e;if(i&&Object.keys(e).length===0)return i;const r={...i};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Ds(r[s],e[s],t-1));return r}function Ec(){return rt()}function z0(){return rt().substring(16)}const ia="_sentrySpan";function _c(i,e){e?wi(i,ia,e):delete i[ia]}function Sc(i){return i[ia]}const jj=100;class bt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ec(),sampleRand:Math.random()}}clone(){const e=new bt;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,_c(e,Sc(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&dr(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t=typeof e=="function"?e(this):e,r=t instanceof bt?t.getScopeData():as(t)?e:void 0,{tags:s,extra:o,user:n,contexts:a,level:c,fingerprint:l=[],propagationContext:N}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},n&&Object.keys(n).length&&(this._user=n),c&&(this._level=c),l.length&&(this._fingerprint=l),N&&(this._propagationContext=N),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,_c(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ec(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){var o;const r=typeof t=="number"?t:jj;if(r<=0)return this;const s={timestamp:Ts(),...e,message:e.message?lo(e.message,2048):e.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(o=this._client)==null||o.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Sc(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Ds(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const r=(t==null?void 0:t.event_id)||rt();if(!this._client)return ee&&X.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...t,event_id:r},this),r}captureMessage(e,t,r){const s=(r==null?void 0:r.event_id)||rt();if(!this._client)return ee&&X.warn("No client configured on scope - will not capture message!"),s;const o=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...r,event_id:s},this),s}captureEvent(e,t){const r=(t==null?void 0:t.event_id)||rt();return this._client?(this._client.captureEvent(e,{...t,event_id:r},this),r):(ee&&X.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function dj(){return ys("defaultCurrentScope",()=>new bt)}function yj(){return ys("defaultIsolationScope",()=>new bt)}class Tj{constructor(e,t){let r;e?r=e:r=new bt;let s;t?s=t:s=new bt,this._stack=[{scope:r}],this._isolationScope=s}withScope(e){const t=this._pushScope();let r;try{r=e(t)}catch(s){throw this._popScope(),s}return Yo(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function yr(){const i=ko(),e=vo(i);return e.stack=e.stack||new Tj(dj(),yj())}function Dj(i){return yr().withScope(i)}function hj(i,e){const t=yr();return t.withScope(()=>(t.getStackTop().scope=i,e(i)))}function kc(i){return yr().withScope(()=>i(yr().getIsolationScope()))}function pj(){return{withIsolationScope:kc,withScope:Dj,withSetScope:hj,withSetIsolationScope:(i,e)=>kc(e),getCurrentScope:()=>yr().getScope(),getIsolationScope:()=>yr().getIsolationScope()}}function uM(i){const e=vo(i);return e.acs?e.acs:pj()}function Yt(){const i=ko();return uM(i).getCurrentScope()}function hs(){const i=ko();return uM(i).getIsolationScope()}function zj(){return ys("globalScope",()=>new bt)}function wj(...i){const e=ko(),t=uM(e);if(i.length===2){const[r,s]=i;return r?t.withSetScope(r,s):t.withScope(s)}return t.withScope(i[0])}function $e(){return Yt().getClient()}function Cj(i){const e=i.getPropagationContext(),{traceId:t,parentSpanId:r,propagationSpanId:s}=e,o={trace_id:t,span_id:s||z0()};return r&&(o.parent_span_id=r),o}const Ij="sentry.source",mj="sentry.sample_rate",Aj="sentry.previous_trace_sample_rate",fj="sentry.op",xj="sentry.origin",w0="sentry.profile_id",C0="sentry.exclusive_time",Oj=0,Ej=1,_j="_sentryScope",Sj="_sentryIsolationScope";function I0(i){return{scope:i[_j],isolationScope:i[Sj]}}const kj="sentry-",vj=/^sentry-/;function bj(i){const e=Yj(i);if(!e)return;const t=Object.entries(e).reduce((r,[s,o])=>{if(s.match(vj)){const n=s.slice(kj.length);r[n]=o}return r},{});if(Object.keys(t).length>0)return t}function Yj(i){if(!(!i||!kt(i)&&!Array.isArray(i)))return Array.isArray(i)?i.reduce((e,t)=>{const r=vc(t);return Object.entries(r).forEach(([s,o])=>{e[s]=o}),e},{}):vc(i)}function vc(i){return i.split(",").map(e=>e.split("=").map(t=>{try{return decodeURIComponent(t.trim())}catch{return}})).reduce((e,[t,r])=>(t&&r&&(e[t]=r),e),{})}function Qj(i){if(typeof i=="boolean")return Number(i);const e=typeof i=="string"?parseFloat(i):i;if(!(typeof e!="number"||isNaN(e)||e<0||e>1))return e}const m0=1;let bc=!1;function Uj(i){const{spanId:e,traceId:t,isRemote:r}=i.spanContext(),s=r?e:lM(i).parent_span_id,o=I0(i).scope,n=r?(o==null?void 0:o.getPropagationContext().propagationSpanId)||z0():e;return{parent_span_id:s,span_id:n,trace_id:t}}function $j(i){if(i&&i.length>0)return i.map(({context:{spanId:e,traceId:t,traceFlags:r,...s},attributes:o})=>({span_id:e,trace_id:t,sampled:r===m0,attributes:o,...s}))}function Yc(i){return typeof i=="number"?Qc(i):Array.isArray(i)?i[0]+i[1]/1e9:i instanceof Date?Qc(i.getTime()):vt()}function Qc(i){return i>9999999999?i/1e3:i}function lM(i){var r;if(Rj(i))return i.getSpanJSON();const{spanId:e,traceId:t}=i.spanContext();if(Pj(i)){const{attributes:s,startTime:o,name:n,endTime:a,status:c,links:l}=i,N="parentSpanId"in i?i.parentSpanId:"parentSpanContext"in i?(r=i.parentSpanContext)==null?void 0:r.spanId:void 0;return{span_id:e,trace_id:t,data:s,description:n,parent_span_id:N,start_timestamp:Yc(o),timestamp:Yc(a)||void 0,status:Bj(c),op:s[fj],origin:s[xj],links:$j(l)}}return{span_id:e,trace_id:t,start_timestamp:0,data:{}}}function Pj(i){const e=i;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function Rj(i){return typeof i.getSpanJSON=="function"}function Wj(i){const{traceFlags:e}=i.spanContext();return e===m0}function Bj(i){if(!(!i||i.code===Oj))return i.code===Ej?"ok":i.message||"unknown_error"}const Fj="_sentryRootSpan";function A0(i){return i[Fj]||i}function Uc(){bc||(hr(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),bc=!0)}function Jj(i){var t;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=i||((t=$e())==null?void 0:t.getOptions());return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}const NM="production",Gj=/^o(\d+)\./,Hj=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Vj(i){return i==="http"||i==="https"}function Uo(i,e=!1){const{host:t,path:r,pass:s,port:o,projectId:n,protocol:a,publicKey:c}=i;return`${a}://${c}${e&&s?`:${s}`:""}@${t}${o?`:${o}`:""}/${r&&`${r}/`}${n}`}function Zj(i){const e=Hj.exec(i);if(!e){hr(()=>{console.error(`Invalid Sentry Dsn: ${i}`)});return}const[t,r,s="",o="",n="",a=""]=e.slice(1);let c="",l=a;const N=l.split("/");if(N.length>1&&(c=N.slice(0,-1).join("/"),l=N.pop()),l){const u=l.match(/^\d+/);u&&(l=u[0])}return f0({host:o,pass:s,path:c,projectId:l,port:n,protocol:t,publicKey:r})}function f0(i){return{protocol:i.protocol,publicKey:i.publicKey||"",pass:i.pass||"",host:i.host,port:i.port||"",path:i.path||"",projectId:i.projectId}}function Xj(i){if(!ee)return!0;const{port:e,projectId:t,protocol:r}=i;return["protocol","publicKey","host","projectId"].find(n=>i[n]?!1:(X.error(`Invalid Sentry Dsn: ${n} missing`),!0))?!1:t.match(/^\d+$/)?Vj(r)?e&&isNaN(parseInt(e,10))?(X.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(X.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(X.error(`Invalid Sentry Dsn: Invalid projectId ${t}`),!1)}function Kj(i){const e=i.match(Gj);return e==null?void 0:e[1]}function qj(i){const e=typeof i=="string"?Zj(i):f0(i);if(!(!e||!Xj(e)))return e}const ed="_frozenDsc";function x0(i,e){const t=e.getOptions(),{publicKey:r,host:s}=e.getDsn()||{};let o;t.orgId?o=String(t.orgId):s&&(o=Kj(s));const n={environment:t.environment||NM,release:t.release,public_key:r,trace_id:i,org_id:o};return e.emit("createDsc",n),n}function td(i,e){const t=e.getPropagationContext();return t.dsc||x0(t.traceId,i)}function id(i){var d;const e=$e();if(!e)return{};const t=A0(i),r=lM(t),s=r.data,o=t.spanContext().traceState,n=(o==null?void 0:o.get("sentry.sample_rate"))??s[mj]??s[Aj];function a(y){return(typeof n=="number"||typeof n=="string")&&(y.sample_rate=`${n}`),y}const c=t[ed];if(c)return a(c);const l=o==null?void 0:o.get("sentry.dsc"),N=l&&bj(l);if(N)return a(N);const u=x0(i.spanContext().traceId,e),g=s[Ij],L=r.description;return g!=="url"&&L&&(u.transaction=L),Jj()&&(u.sampled=String(Wj(t)),u.sample_rand=(o==null?void 0:o.get("sentry.sample_rand"))??((d=I0(t).scope)==null?void 0:d.getPropagationContext().sampleRand.toString())),a(u),e.emit("createDsc",u,t),u}function St(i,e=100,t=1/0){try{return ra("",i,e,t)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function O0(i,e=3,t=100*1024){const r=St(i,e);return nd(r)>t?O0(i,e-1,t):r}function ra(i,e,t=1/0,r=1/0,s=ad()){const[o,n]=s;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const a=rd(i,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:t;if(c===0)return a.replace("object ","");if(o(e))return"[Circular ~]";const l=e;if(l&&typeof l.toJSON=="function")try{const L=l.toJSON();return ra("",L,c-1,r,s)}catch{}const N=Array.isArray(e)?[]:{};let u=0;const g=D0(e);for(const L in g){if(!Object.prototype.hasOwnProperty.call(g,L))continue;if(u>=r){N[L]="[MaxProperties ~]";break}const d=g[L];N[L]=ra(L,d,c-1,r,s),u++}return n(e),N}function rd(i,e){try{if(i==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(i==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(d0(e))return"[VueViewModel]";if(ij(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${ti(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const t=sd(e);return/^HTML(\w*)Element$/.test(t)?`[HTMLElement: ${t}]`:`[object ${t}]`}catch(t){return`**non-serializable** (${t})`}}function sd(i){const e=Object.getPrototypeOf(i);return e!=null&&e.constructor?e.constructor.name:"null prototype"}function od(i){return~-encodeURI(i).split(/%..|./).length}function nd(i){return od(JSON.stringify(i))}function ad(){const i=new WeakSet;function e(r){return i.has(r)?!0:(i.add(r),!1)}function t(r){i.delete(r)}return[e,t]}function ps(i,e=[]){return[i,e]}function Md(i,e){const[t,r]=i;return[t,[...r,e]]}function $c(i,e){const t=i[1];for(const r of t){const s=r[0].type;if(e(r,s))return!0}return!1}function sa(i){const e=vo(Me);return e.encodePolyfill?e.encodePolyfill(i):new TextEncoder().encode(i)}function cd(i){const[e,t]=i;let r=JSON.stringify(e);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[sa(r),o]:r.push(typeof o=="string"?sa(o):o)}for(const o of t){const[n,a]=o;if(s(`
6
7
  ${JSON.stringify(n)}
7
8
  `),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(St(a))}s(c)}}return typeof r=="string"?r:ud(r)}function ud(i){const e=i.reduce((s,o)=>s+o.length,0),t=new Uint8Array(e);let r=0;for(const s of i)t.set(s,r),r+=s.length;return t}function ld(i){const e=typeof i.data=="string"?sa(i.data):i.data;return[{type:"attachment",length:e.length,filename:i.filename,content_type:i.contentType,attachment_type:i.attachmentType},e]}const Nd={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function Pc(i){return Nd[i]}function E0(i){if(!(i!=null&&i.sdk))return;const{name:e,version:t}=i.sdk;return{name:e,version:t}}function gd(i,e,t,r){var o;const s=(o=i.sdkProcessingMetadata)==null?void 0:o.dynamicSamplingContext;return{event_id:i.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!t&&r&&{dsn:Uo(r)},...s&&{trace:s}}}function Ld(i,e){return e&&(i.sdk=i.sdk||{},i.sdk.name=i.sdk.name||e.name,i.sdk.version=i.sdk.version||e.version,i.sdk.integrations=[...i.sdk.integrations||[],...e.integrations||[]],i.sdk.packages=[...i.sdk.packages||[],...e.packages||[]]),i}function jd(i,e,t,r){const s=E0(t),o={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:Uo(e)}},n="aggregates"in i?[{type:"sessions"},i]:[{type:"session"},i.toJSON()];return ps(o,[n])}function dd(i,e,t,r){const s=E0(t),o=i.type&&i.type!=="replay_event"?i.type:"event";Ld(i,t==null?void 0:t.sdk);const n=gd(i,s,r,e);return delete i.sdkProcessingMetadata,ps(n,[[{type:o},i]])}const hn=0,Rc=1,Wc=2;function Ci(i){return new ri(e=>{e(i)})}function No(i){return new ri((e,t)=>{t(i)})}class ri{constructor(e){this._state=hn,this._handlers=[],this._runExecutor(e)}then(e,t){return new ri((r,s)=>{this._handlers.push([!1,o=>{if(!e)r(o);else try{r(e(o))}catch(n){s(n)}},o=>{if(!t)s(o);else try{r(t(o))}catch(n){s(n)}}]),this._executeHandlers()})}catch(e){return this.then(t=>t,e)}finally(e){return new ri((t,r)=>{let s,o;return this.then(n=>{o=!1,s=n,e&&e()},n=>{o=!0,s=n,e&&e()}).then(()=>{if(o){r(s);return}t(s)})})}_executeHandlers(){if(this._state===hn)return;const e=this._handlers.slice();this._handlers=[],e.forEach(t=>{t[0]||(this._state===Rc&&t[1](this._value),this._state===Wc&&t[2](this._value),t[0]=!0)})}_runExecutor(e){const t=(o,n)=>{if(this._state===hn){if(Yo(n)){n.then(r,s);return}this._state=o,this._value=n,this._executeHandlers()}},r=o=>{t(Rc,o)},s=o=>{t(Wc,o)};try{e(r,s)}catch(o){s(o)}}}function oa(i,e,t,r=0){return new ri((s,o)=>{const n=i[r];if(e===null||typeof n!="function")s(e);else{const a=n({...e},t);ee&&n.id&&a===null&&X.log(`Event processor "${n.id}" dropped event`),Yo(a)?a.then(c=>oa(i,c,t,r+1).then(s)).then(null,o):oa(i,a,t,r+1).then(s).then(null,o)}})}function yd(i,e){const{fingerprint:t,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=e;Td(i,e),r&&pd(i,r),zd(i,t),Dd(i,s),hd(i,o)}function Bc(i,e){const{extra:t,tags:r,user:s,contexts:o,level:n,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:N,attachments:u,propagationContext:g,transactionName:L,span:d}=e;Ys(i,"extra",t),Ys(i,"tags",r),Ys(i,"user",s),Ys(i,"contexts",o),i.sdkProcessingMetadata=Ds(i.sdkProcessingMetadata,a,2),n&&(i.level=n),L&&(i.transactionName=L),d&&(i.span=d),c.length&&(i.breadcrumbs=[...i.breadcrumbs,...c]),l.length&&(i.fingerprint=[...i.fingerprint,...l]),N.length&&(i.eventProcessors=[...i.eventProcessors,...N]),u.length&&(i.attachments=[...i.attachments,...u]),i.propagationContext={...i.propagationContext,...g}}function Ys(i,e,t){i[e]=Ds(i[e],t,1)}function Td(i,e){const{extra:t,tags:r,user:s,contexts:o,level:n,transactionName:a}=e;Object.keys(t).length&&(i.extra={...t,...i.extra}),Object.keys(r).length&&(i.tags={...r,...i.tags}),Object.keys(s).length&&(i.user={...s,...i.user}),Object.keys(o).length&&(i.contexts={...o,...i.contexts}),n&&(i.level=n),a&&i.type!=="transaction"&&(i.transaction=a)}function Dd(i,e){const t=[...i.breadcrumbs||[],...e];i.breadcrumbs=t.length?t:void 0}function hd(i,e){i.sdkProcessingMetadata={...i.sdkProcessingMetadata,...e}}function pd(i,e){i.contexts={trace:Uj(e),...i.contexts},i.sdkProcessingMetadata={dynamicSamplingContext:id(e),...i.sdkProcessingMetadata};const t=A0(e),r=lM(t).description;r&&!i.transaction&&i.type==="transaction"&&(i.transaction=r)}function zd(i,e){i.fingerprint=i.fingerprint?Array.isArray(i.fingerprint)?i.fingerprint:[i.fingerprint]:[],e&&(i.fingerprint=i.fingerprint.concat(e)),i.fingerprint.length||delete i.fingerprint}let Qs,Fc,Us;function wd(i){const e=Me._sentryDebugIds;if(!e)return{};const t=Object.keys(e);return Us&&t.length===Fc||(Fc=t.length,Us=t.reduce((r,s)=>{Qs||(Qs={});const o=Qs[s];if(o)r[o[0]]=o[1];else{const n=i(s);for(let a=n.length-1;a>=0;a--){const c=n[a],l=c==null?void 0:c.filename,N=e[s];if(l&&N){r[l]=N,Qs[s]=[l,N];break}}}return r},{})),Us}function Cd(i,e,t,r,s,o){const{normalizeDepth:n=3,normalizeMaxBreadth:a=1e3}=i,c={...e,event_id:e.event_id||t.event_id||rt(),timestamp:e.timestamp||Ts()},l=t.integrations||i.integrations.map(D=>D.name);Id(c,i),fd(c,l),s&&s.emit("applyFrameMetadata",e),e.type===void 0&&md(c,i.stackParser);const N=Od(r,t.captureContext);t.mechanism&&jr(c,t.mechanism);const u=s?s.getEventProcessors():[],g=zj().getScopeData();if(o){const D=o.getScopeData();Bc(g,D)}if(N){const D=N.getScopeData();Bc(g,D)}const L=[...t.attachments||[],...g.attachments];L.length&&(t.attachments=L),yd(c,g);const d=[...u,...g.eventProcessors];return oa(d,c,t).then(D=>(D&&Ad(D),typeof n=="number"&&n>0?xd(D,n,a):D))}function Id(i,e){const{environment:t,release:r,dist:s,maxValueLength:o=250}=e;i.environment=i.environment||t||NM,!i.release&&r&&(i.release=r),!i.dist&&s&&(i.dist=s);const n=i.request;n!=null&&n.url&&(n.url=lo(n.url,o))}function md(i,e){var r,s;const t=wd(e);(s=(r=i.exception)==null?void 0:r.values)==null||s.forEach(o=>{var n,a;(a=(n=o.stacktrace)==null?void 0:n.frames)==null||a.forEach(c=>{c.filename&&(c.debug_id=t[c.filename])})})}function Ad(i){var r,s;const e={};if((s=(r=i.exception)==null?void 0:r.values)==null||s.forEach(o=>{var n,a;(a=(n=o.stacktrace)==null?void 0:n.frames)==null||a.forEach(c=>{c.debug_id&&(c.abs_path?e[c.abs_path]=c.debug_id:c.filename&&(e[c.filename]=c.debug_id),delete c.debug_id)})}),Object.keys(e).length===0)return;i.debug_meta=i.debug_meta||{},i.debug_meta.images=i.debug_meta.images||[];const t=i.debug_meta.images;Object.entries(e).forEach(([o,n])=>{t.push({type:"sourcemap",code_file:o,debug_id:n})})}function fd(i,e){e.length>0&&(i.sdk=i.sdk||{},i.sdk.integrations=[...i.sdk.integrations||[],...e])}function xd(i,e,t){var s,o;if(!i)return null;const r={...i,...i.breadcrumbs&&{breadcrumbs:i.breadcrumbs.map(n=>({...n,...n.data&&{data:St(n.data,e,t)}}))},...i.user&&{user:St(i.user,e,t)},...i.contexts&&{contexts:St(i.contexts,e,t)},...i.extra&&{extra:St(i.extra,e,t)}};return(s=i.contexts)!=null&&s.trace&&r.contexts&&(r.contexts.trace=i.contexts.trace,i.contexts.trace.data&&(r.contexts.trace.data=St(i.contexts.trace.data,e,t))),i.spans&&(r.spans=i.spans.map(n=>({...n,...n.data&&{data:St(n.data,e,t)}}))),(o=i.contexts)!=null&&o.flags&&r.contexts&&(r.contexts.flags=St(i.contexts.flags,3,t)),r}function Od(i,e){if(!e)return i;const t=i?i.clone():new bt;return t.update(e),t}function Ed(i,e){return Yt().captureException(i,void 0)}function _0(i,e){return Yt().captureEvent(i,e)}function Jc(i){const e=hs(),t=Yt(),{userAgent:r}=Me.navigator||{},s=Nj({user:t.getUser()||e.getUser(),...r&&{userAgent:r},...i}),o=e.getSession();return(o==null?void 0:o.status)==="ok"&&dr(o,{status:"exited"}),S0(),e.setSession(s),s}function S0(){const i=hs(),t=Yt().getSession()||i.getSession();t&&gj(t),k0(),i.setSession()}function k0(){const i=hs(),e=$e(),t=i.getSession();t&&e&&e.captureSession(t)}function Gc(i=!1){if(i){S0();return}k0()}const _d="7";function Sd(i){const e=i.protocol?`${i.protocol}:`:"",t=i.port?`:${i.port}`:"";return`${e}//${i.host}${t}${i.path?`/${i.path}`:""}/api/`}function kd(i){return`${Sd(i)}${i.projectId}/envelope/`}function vd(i,e){const t={sentry_version:_d};return i.publicKey&&(t.sentry_key=i.publicKey),e&&(t.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(t).toString()}function bd(i,e,t){return e||`${kd(i)}?${vd(i,t)}`}const Hc=[];function Yd(i){const e={};return i.forEach(t=>{const{name:r}=t,s=e[r];s&&!s.isDefaultInstance&&t.isDefaultInstance||(e[r]=t)}),Object.values(e)}function Qd(i){const e=i.defaultIntegrations||[],t=i.integrations;e.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(t))r=[...e,...t];else if(typeof t=="function"){const s=t(e);r=Array.isArray(s)?s:[s]}else r=e;return Yd(r)}function Ud(i,e){const t={};return e.forEach(r=>{r&&v0(i,r,t)}),t}function Vc(i,e){for(const t of e)t!=null&&t.afterAllSetup&&t.afterAllSetup(i)}function v0(i,e,t){if(t[e.name]){ee&&X.log(`Integration skipped because it was already installed: ${e.name}`);return}if(t[e.name]=e,Hc.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Hc.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(i),typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);i.on("preprocessEvent",(s,o)=>r(s,o,i))}if(typeof e.processEvent=="function"){const r=e.processEvent.bind(e),s=Object.assign((o,n)=>r(o,n,i),{id:e.name});i.addEventProcessor(s)}ee&&X.log(`Integration installed: ${e.name}`)}function $d(i,e,t){const r=[{type:"client_report"},{timestamp:Ts(),discarded_events:i}];return ps(e?{dsn:e}:{},[r])}function b0(i){const e=[];i.message&&e.push(i.message);try{const t=i.exception.values[i.exception.values.length-1];t!=null&&t.value&&(e.push(t.value),t.type&&e.push(`${t.type}: ${t.value}`))}catch{}return e}function Pd(i){var c;const{trace_id:e,parent_span_id:t,span_id:r,status:s,origin:o,data:n,op:a}=((c=i.contexts)==null?void 0:c.trace)??{};return{data:n??{},description:i.transaction,op:a,parent_span_id:t,span_id:r??"",start_timestamp:i.start_timestamp??0,status:s,timestamp:i.timestamp,trace_id:e??"",origin:o,profile_id:n==null?void 0:n[w0],exclusive_time:n==null?void 0:n[C0],measurements:i.measurements,is_segment:!0}}function Rd(i){return{type:"transaction",timestamp:i.timestamp,start_timestamp:i.start_timestamp,transaction:i.description,contexts:{trace:{trace_id:i.trace_id,span_id:i.span_id,parent_span_id:i.parent_span_id,op:i.op,status:i.status,origin:i.origin,data:{...i.data,...i.profile_id&&{[w0]:i.profile_id},...i.exclusive_time&&{[C0]:i.exclusive_time}}}},measurements:i.measurements}}const Zc="Not capturing exception because it's already been captured.",Xc="Discarded session because of missing or non-string release",Y0=Symbol.for("SentryInternalError"),Q0=Symbol.for("SentryDoNotSendEventError");function so(i){return{message:i,[Y0]:!0}}function pn(i){return{message:i,[Q0]:!0}}function Kc(i){return!!i&&typeof i=="object"&&Y0 in i}function qc(i){return!!i&&typeof i=="object"&&Q0 in i}class Wd{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=qj(e.dsn):ee&&X.warn("No DSN provided, client will not send events."),this._dsn){const t=bd(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,r){const s=rt();if(xc(e))return ee&&X.log(Zc),s;const o={event_id:s,...t};return this._process(this.eventFromException(e,o).then(n=>this._captureEvent(n,o,r))),o.event_id}captureMessage(e,t,r,s){const o={event_id:rt(),...r},n=oM(e)?e:String(e),a=nM(e)?this.eventFromMessage(n,t,o):this.eventFromException(e,o);return this._process(a.then(c=>this._captureEvent(c,o,s))),o.event_id}captureEvent(e,t,r){const s=rt();if(t!=null&&t.originalException&&xc(t.originalException))return ee&&X.log(Zc),s;const o={event_id:s,...t},n=e.sdkProcessingMetadata||{},a=n.capturedSpanScope,c=n.capturedSpanIsolationScope;return this._process(this._captureEvent(e,o,a||r,c)),o.event_id}captureSession(e){this.sendSession(e),dr(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>t.flush(e).then(s=>r&&s))):Ci(!0)}close(e){return this.flush(e).then(t=>(this.getOptions().enabled=!1,this.emit("close"),t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];v0(this,e,this._integrations),t||Vc(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let r=dd(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of t.attachments||[])r=Md(r,ld(o));const s=this.sendEnvelope(r);s&&s.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){const{release:t,environment:r=NM}=this._options;if("aggregates"in e){const o=e.attrs||{};if(!o.release&&!t){ee&&X.warn(Xc);return}o.release=o.release||t,o.environment=o.environment||r,e.attrs=o}else{if(!e.release&&!t){ee&&X.warn(Xc);return}e.release=e.release||t,e.environment=e.environment||r}this.emit("beforeSendSession",e);const s=jd(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(e,t,r=1){if(this._options.sendClientReports){const s=`${e}:${t}`;ee&&X.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(e,t){const r=this._hooks[e]=this._hooks[e]||[];return r.push(t),()=>{const s=r.indexOf(t);s>-1&&r.splice(s,1)}}emit(e,...t){const r=this._hooks[e];r&&r.forEach(s=>s(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,t=>(ee&&X.error("Error while sending envelope:",t),t)):(ee&&X.error("Transport disabled"),Ci({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=Ud(this,e),Vc(this,e)}_updateSessionFromEvent(e,t){var c;let r=t.level==="fatal",s=!1;const o=(c=t.exception)==null?void 0:c.values;if(o){s=!0;for(const l of o){const N=l.mechanism;if((N==null?void 0:N.handled)===!1){r=!0;break}}}const n=e.status==="ok";(n&&e.errors===0||n&&r)&&(dr(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ri(t=>{let r=0;const s=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),t(!0)):(r+=s,e&&r>=e&&(clearInterval(o),t(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,r,s){const o=this.getOptions(),n=Object.keys(this._integrations);return!t.integrations&&(n!=null&&n.length)&&(t.integrations=n),this.emit("preprocessEvent",e,t),e.type||s.setLastEventId(e.event_id||t.event_id),Cd(o,e,t,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,t),a.contexts={trace:Cj(r),...a.contexts};const c=td(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(e,t={},r=Yt(),s=hs()){return ee&&na(e)&&X.log(`Captured error event \`${b0(e)[0]||"<unknown>"}\``),this._processEvent(e,t,r,s).then(o=>o.event_id,o=>{ee&&(qc(o)?X.log(o.message):Kc(o)?X.warn(o.message):X.warn(o))})}_processEvent(e,t,r,s){const o=this.getOptions(),{sampleRate:n}=o,a=U0(e),c=na(e),l=e.type||"error",N=`before send for type \`${l}\``,u=typeof n>"u"?void 0:Qj(n);if(c&&typeof u=="number"&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error"),No(pn(`Discarding event because it's not included in the random sample (sampling rate = ${n})`));const g=l==="replay_event"?"replay":l;return this._prepareEvent(e,t,r,s).then(L=>{if(L===null)throw this.recordDroppedEvent("event_processor",g),pn("An event processor returned `null`, will not send event.");if(t.data&&t.data.__sentry__===!0)return L;const y=Fd(this,o,L,t);return Bd(y,N)}).then(L=>{var D;if(L===null){if(this.recordDroppedEvent("before_send",g),a){const A=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",A)}throw pn(`${N} returned \`null\`, will not send event.`)}const d=r.getSession()||s.getSession();if(c&&d&&this._updateSessionFromEvent(d,L),a){const z=((D=L.sdkProcessingMetadata)==null?void 0:D.spanCountBeforeProcessing)||0,A=L.spans?L.spans.length:0,C=z-A;C>0&&this.recordDroppedEvent("before_send","span",C)}const y=L.transaction_info;if(a&&y&&L.transaction!==e.transaction){const z="custom";L.transaction_info={...y,source:z}}return this.sendEvent(L,t),L}).then(null,L=>{throw qc(L)||Kc(L)?L:(this.captureException(L,{data:{__sentry__:!0},originalException:L}),so(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
- Reason: ${L}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([t,r])=>{const[s,o]=t.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){ee&&X.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){ee&&X.log("No outcomes to send");return}if(!this._dsn){ee&&X.log("No dsn provided, will not send outcomes");return}ee&&X.log("Sending outcomes:",e);const t=$d(e,this._options.tunnel&&Uo(this._dsn));this.sendEnvelope(t)}}function Bd(i,e){const t=`${e} must return \`null\` or a valid event.`;if(Yo(i))return i.then(r=>{if(!as(r)&&r!==null)throw so(t);return r},r=>{throw so(`${e} rejected with ${r}`)});if(!as(i)&&i!==null)throw so(t);return i}function Fd(i,e,t,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:n}=e;let a=t;if(na(a)&&s)return s(a,r);if(U0(a)){if(n){const c=n(Pd(a));if(c?a=Ds(t,Rd(c)):Uc(),a.spans){const l=[];for(const N of a.spans){const u=n(N);u?l.push(u):(Uc(),l.push(N))}a.spans=l}}if(o){if(a.spans){const c=a.spans.length;a.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return o(a,r)}}return a}function na(i){return i.type===void 0}function U0(i){return i.type==="transaction"}function Jd(i){return[{type:"log",item_count:i.length,content_type:"application/vnd.sentry.items.log+json"},{items:i}]}function Gd(i,e,t,r){const s={};return e!=null&&e.sdk&&(s.sdk={name:e.sdk.name,version:e.sdk.version}),t&&r&&(s.dsn=Uo(r)),ps(s,[Jd(i)])}function zn(i,e){const t=Hd(i)??[];if(t.length===0)return;const r=i.getOptions(),s=Gd(t,r._metadata,r.tunnel,i.getDsn());$0().set(i,[]),i.emit("flushLogs"),i.sendEnvelope(s)}function Hd(i){return $0().get(i)}function $0(){return ys("clientToLogBufferMap",()=>new WeakMap)}function Vd(i,e){e.debug===!0&&(ee?X.enable():hr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Yt().update(e.initialScope);const r=new i(e);return Zd(r),r.init(),r}function Zd(i){Yt().setClient(i)}const P0=Symbol.for("SentryBufferFullError");function Xd(i){const e=[];function t(){return i===void 0||e.length<i}function r(n){return e.splice(e.indexOf(n),1)[0]||Promise.resolve(void 0)}function s(n){if(!t())return No(P0);const a=n();return e.indexOf(a)===-1&&e.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(n){return new ri((a,c)=>{let l=e.length;if(!l)return a(!0);const N=setTimeout(()=>{n&&n>0&&a(!1)},n);e.forEach(u=>{Ci(u).then(()=>{--l||(clearTimeout(N),a(!0))},c)})})}return{$:e,add:s,drain:o}}const Kd=60*1e3;function qd(i,e=Date.now()){const t=parseInt(`${i}`,10);if(!isNaN(t))return t*1e3;const r=Date.parse(`${i}`);return isNaN(r)?Kd:r-e}function ey(i,e){return i[e]||i.all||0}function ty(i,e,t=Date.now()){return ey(i,e)>t}function iy(i,{statusCode:e,headers:t},r=Date.now()){const s={...i},o=t==null?void 0:t["x-sentry-rate-limits"],n=t==null?void 0:t["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,l,,,N]=a.split(":",5),u=parseInt(c,10),g=(isNaN(u)?60:u)*1e3;if(!l)s.all=r+g;else for(const L of l.split(";"))L==="metric_bucket"?(!N||N.split(";").includes("custom"))&&(s[L]=r+g):s[L]=r+g}else n?s.all=r+qd(n,r):e===429&&(s.all=r+60*1e3);return s}const ry=64;function sy(i,e,t=Xd(i.bufferSize||ry)){let r={};const s=n=>t.drain(n);function o(n){const a=[];if($c(n,(u,g)=>{const L=Pc(g);ty(r,L)?i.recordDroppedEvent("ratelimit_backoff",L):a.push(u)}),a.length===0)return Ci({});const c=ps(n[0],a),l=u=>{$c(c,(g,L)=>{i.recordDroppedEvent(u,Pc(L))})},N=()=>e({body:cd(c)}).then(u=>(u.statusCode!==void 0&&(u.statusCode<200||u.statusCode>=300)&&ee&&X.warn(`Sentry responded with status code ${u.statusCode} to sent event.`),r=iy(r,u),u),u=>{throw l("network_error"),ee&&X.error("Encountered error running transport request:",u),u});return t.add(N).then(u=>u,u=>{if(u===P0)return ee&&X.error("Skipped sending event because buffer is full."),l("queue_overflow"),Ci({});throw u})}return{send:o,flush:s}}function oy(i){var e;((e=i.user)==null?void 0:e.ip_address)===void 0&&(i.user={...i.user,ip_address:"{{auto}}"})}function ny(i){var e;"aggregates"in i?((e=i.attrs)==null?void 0:e.ip_address)===void 0&&(i.attrs={...i.attrs,ip_address:"{{auto}}"}):i.ipAddress===void 0&&(i.ipAddress="{{auto}}")}function ay(i,e,t=[e],r="npm"){const s=i._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:t.map(o=>({name:`${r}:@sentry/${o}`,version:pi})),version:pi}),i._metadata=s}const My=100;function Ii(i,e){const t=$e(),r=hs();if(!t)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=My}=t.getOptions();if(o<=0)return;const a={timestamp:Ts(),...i},c=s?hr(()=>s(a,e)):a;c!==null&&(t.emit&&t.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,o))}let eu;const cy="FunctionToString",tu=new WeakMap,uy=()=>({name:cy,setupOnce(){eu=Function.prototype.toString;try{Function.prototype.toString=function(...i){const e=cM(this),t=tu.has($e())&&e!==void 0?e:this;return eu.apply(t,i)}}catch{}},setup(i){tu.set(i,!0)}}),ly=uy,Ny=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],gy="EventFilters",Ly=(i={})=>{let e;return{name:gy,setup(t){const r=t.getOptions();e=iu(i,r)},processEvent(t,r,s){if(!e){const o=s.getOptions();e=iu(i,o)}return dy(t,e)?null:t}}},jy=(i={})=>({...Ly(i),name:"InboundFilters"});function iu(i={},e={}){return{allowUrls:[...i.allowUrls||[],...e.allowUrls||[]],denyUrls:[...i.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...i.ignoreErrors||[],...e.ignoreErrors||[],...i.disableErrorDefaults?[]:Ny],ignoreTransactions:[...i.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function dy(i,e){if(i.type){if(i.type==="transaction"&&Ty(i,e.ignoreTransactions))return ee&&X.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
9
+ Reason: ${L}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([t,r])=>{const[s,o]=t.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){ee&&X.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){ee&&X.log("No outcomes to send");return}if(!this._dsn){ee&&X.log("No dsn provided, will not send outcomes");return}ee&&X.log("Sending outcomes:",e);const t=$d(e,this._options.tunnel&&Uo(this._dsn));this.sendEnvelope(t)}}function Bd(i,e){const t=`${e} must return \`null\` or a valid event.`;if(Yo(i))return i.then(r=>{if(!as(r)&&r!==null)throw so(t);return r},r=>{throw so(`${e} rejected with ${r}`)});if(!as(i)&&i!==null)throw so(t);return i}function Fd(i,e,t,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:n}=e;let a=t;if(na(a)&&s)return s(a,r);if(U0(a)){if(n){const c=n(Pd(a));if(c?a=Ds(t,Rd(c)):Uc(),a.spans){const l=[];for(const N of a.spans){const u=n(N);u?l.push(u):(Uc(),l.push(N))}a.spans=l}}if(o){if(a.spans){const c=a.spans.length;a.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return o(a,r)}}return a}function na(i){return i.type===void 0}function U0(i){return i.type==="transaction"}function Jd(i){return[{type:"log",item_count:i.length,content_type:"application/vnd.sentry.items.log+json"},{items:i}]}function Gd(i,e,t,r){const s={};return e!=null&&e.sdk&&(s.sdk={name:e.sdk.name,version:e.sdk.version}),t&&r&&(s.dsn=Uo(r)),ps(s,[Jd(i)])}function zn(i,e){const t=Hd(i)??[];if(t.length===0)return;const r=i.getOptions(),s=Gd(t,r._metadata,r.tunnel,i.getDsn());$0().set(i,[]),i.emit("flushLogs"),i.sendEnvelope(s)}function Hd(i){return $0().get(i)}function $0(){return ys("clientToLogBufferMap",()=>new WeakMap)}function Vd(i,e){e.debug===!0&&(ee?X.enable():hr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Yt().update(e.initialScope);const r=new i(e);return Zd(r),r.init(),r}function Zd(i){Yt().setClient(i)}const P0=Symbol.for("SentryBufferFullError");function Xd(i){const e=[];function t(){return i===void 0||e.length<i}function r(n){return e.splice(e.indexOf(n),1)[0]||Promise.resolve(void 0)}function s(n){if(!t())return No(P0);const a=n();return e.indexOf(a)===-1&&e.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(n){return new ri((a,c)=>{let l=e.length;if(!l)return a(!0);const N=setTimeout(()=>{n&&n>0&&a(!1)},n);e.forEach(u=>{Ci(u).then(()=>{--l||(clearTimeout(N),a(!0))},c)})})}return{$:e,add:s,drain:o}}const Kd=60*1e3;function qd(i,e=Date.now()){const t=parseInt(`${i}`,10);if(!isNaN(t))return t*1e3;const r=Date.parse(`${i}`);return isNaN(r)?Kd:r-e}function ey(i,e){return i[e]||i.all||0}function ty(i,e,t=Date.now()){return ey(i,e)>t}function iy(i,{statusCode:e,headers:t},r=Date.now()){const s={...i},o=t==null?void 0:t["x-sentry-rate-limits"],n=t==null?void 0:t["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,l,,,N]=a.split(":",5),u=parseInt(c,10),g=(isNaN(u)?60:u)*1e3;if(!l)s.all=r+g;else for(const L of l.split(";"))L==="metric_bucket"?(!N||N.split(";").includes("custom"))&&(s[L]=r+g):s[L]=r+g}else n?s.all=r+qd(n,r):e===429&&(s.all=r+60*1e3);return s}const ry=64;function sy(i,e,t=Xd(i.bufferSize||ry)){let r={};const s=n=>t.drain(n);function o(n){const a=[];if($c(n,(u,g)=>{const L=Pc(g);ty(r,L)?i.recordDroppedEvent("ratelimit_backoff",L):a.push(u)}),a.length===0)return Ci({});const c=ps(n[0],a),l=u=>{$c(c,(g,L)=>{i.recordDroppedEvent(u,Pc(L))})},N=()=>e({body:cd(c)}).then(u=>(u.statusCode!==void 0&&(u.statusCode<200||u.statusCode>=300)&&ee&&X.warn(`Sentry responded with status code ${u.statusCode} to sent event.`),r=iy(r,u),u),u=>{throw l("network_error"),ee&&X.error("Encountered error running transport request:",u),u});return t.add(N).then(u=>u,u=>{if(u===P0)return ee&&X.error("Skipped sending event because buffer is full."),l("queue_overflow"),Ci({});throw u})}return{send:o,flush:s}}function oy(i){var e;((e=i.user)==null?void 0:e.ip_address)===void 0&&(i.user={...i.user,ip_address:"{{auto}}"})}function ny(i){var e;"aggregates"in i?((e=i.attrs)==null?void 0:e.ip_address)===void 0&&(i.attrs={...i.attrs,ip_address:"{{auto}}"}):i.ipAddress===void 0&&(i.ipAddress="{{auto}}")}function ay(i,e,t=[e],r="npm"){const s=i._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:t.map(o=>({name:`${r}:@sentry/${o}`,version:pi})),version:pi}),i._metadata=s}const My=100;function Ii(i,e){const t=$e(),r=hs();if(!t)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=My}=t.getOptions();if(o<=0)return;const a={timestamp:Ts(),...i},c=s?hr(()=>s(a,e)):a;c!==null&&(t.emit&&t.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,o))}let eu;const cy="FunctionToString",tu=new WeakMap,uy=(()=>({name:cy,setupOnce(){eu=Function.prototype.toString;try{Function.prototype.toString=function(...i){const e=cM(this),t=tu.has($e())&&e!==void 0?e:this;return eu.apply(t,i)}}catch{}},setup(i){tu.set(i,!0)}})),ly=uy,Ny=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],gy="EventFilters",Ly=(i={})=>{let e;return{name:gy,setup(t){const r=t.getOptions();e=iu(i,r)},processEvent(t,r,s){if(!e){const o=s.getOptions();e=iu(i,o)}return dy(t,e)?null:t}}},jy=((i={})=>({...Ly(i),name:"InboundFilters"}));function iu(i={},e={}){return{allowUrls:[...i.allowUrls||[],...e.allowUrls||[]],denyUrls:[...i.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...i.ignoreErrors||[],...e.ignoreErrors||[],...i.disableErrorDefaults?[]:Ny],ignoreTransactions:[...i.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function dy(i,e){if(i.type){if(i.type==="transaction"&&Ty(i,e.ignoreTransactions))return ee&&X.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
9
10
  Event: ${Ti(i)}`),!0}else{if(yy(i,e.ignoreErrors))return ee&&X.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
10
11
  Event: ${Ti(i)}`),!0;if(zy(i))return ee&&X.warn(`Event dropped due to not having an error message, error type or stacktrace.
11
12
  Event: ${Ti(i)}`),!0;if(Dy(i,e.denyUrls))return ee&&X.warn(`Event dropped due to being matched by \`denyUrls\` option.
12
13
  Event: ${Ti(i)}.
13
14
  Url: ${go(i)}`),!0;if(!hy(i,e.allowUrls))return ee&&X.warn(`Event dropped due to not being matched by \`allowUrls\` option.
14
15
  Event: ${Ti(i)}.
15
- Url: ${go(i)}`),!0}return!1}function yy(i,e){return e!=null&&e.length?b0(i).some(t=>Qo(t,e)):!1}function Ty(i,e){if(!(e!=null&&e.length))return!1;const t=i.transaction;return t?Qo(t,e):!1}function Dy(i,e){if(!(e!=null&&e.length))return!1;const t=go(i);return t?Qo(t,e):!1}function hy(i,e){if(!(e!=null&&e.length))return!0;const t=go(i);return t?Qo(t,e):!0}function py(i=[]){for(let e=i.length-1;e>=0;e--){const t=i[e];if(t&&t.filename!=="<anonymous>"&&t.filename!=="[native code]")return t.filename||null}return null}function go(i){var e,t;try{const r=[...((e=i.exception)==null?void 0:e.values)??[]].reverse().find(o=>{var n,a,c;return((n=o.mechanism)==null?void 0:n.parent_id)===void 0&&((c=(a=o.stacktrace)==null?void 0:a.frames)==null?void 0:c.length)}),s=(t=r==null?void 0:r.stacktrace)==null?void 0:t.frames;return s?py(s):null}catch{return ee&&X.error(`Cannot extract url for event ${Ti(i)}`),null}}function zy(i){var e,t;return(t=(e=i.exception)==null?void 0:e.values)!=null&&t.length?!i.message&&!i.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function wy(i,e,t,r,s,o){var a;if(!((a=s.exception)!=null&&a.values)||!o||!ii(o.originalException,Error))return;const n=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;n&&(s.exception.values=aa(i,e,r,o.originalException,t,s.exception.values,n,0))}function aa(i,e,t,r,s,o,n,a){if(o.length>=t+1)return o;let c=[...o];if(ii(r[s],Error)){ru(n,a);const l=i(e,r[s]),N=c.length;su(l,s,N,a),c=aa(i,e,t,r[s],s,[l,...c],l,N)}return Array.isArray(r.errors)&&r.errors.forEach((l,N)=>{if(ii(l,Error)){ru(n,a);const u=i(e,l),g=c.length;su(u,`errors[${N}]`,g,a),c=aa(i,e,t,l,s,[u,...c],u,g)}}),c}function ru(i,e){i.mechanism=i.mechanism||{type:"generic",handled:!0},i.mechanism={...i.mechanism,...i.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function su(i,e,t,r){i.mechanism=i.mechanism||{type:"generic",handled:!0},i.mechanism={...i.mechanism,type:"chained",source:e,exception_id:t,parent_id:r}}function Cy(i){const e="console";xi(e,i),Oi(e,Iy)}function Iy(){"console"in Me&&$L.forEach(function(i){i in Me.console&&Xe(Me.console,i,function(e){return uo[i]=e,function(...t){ut("console",{args:t,level:i});const s=uo[i];s==null||s.apply(Me.console,t)}})})}function my(i){return i==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(i)?i:"log"}const Ay="Dedupe",fy=()=>{let i;return{name:Ay,processEvent(e){if(e.type)return e;try{if(xy(e,i))return ee&&X.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return i=e}}},R0=fy;function xy(i,e){return e?!!(Oy(i,e)||Ey(i,e)):!1}function Oy(i,e){const t=i.message,r=e.message;return!(!t&&!r||t&&!r||!t&&r||t!==r||!B0(i,e)||!W0(i,e))}function Ey(i,e){const t=ou(e),r=ou(i);return!(!t||!r||t.type!==r.type||t.value!==r.value||!B0(i,e)||!W0(i,e))}function W0(i,e){let t=wc(i),r=wc(e);if(!t&&!r)return!0;if(t&&!r||!t&&r||(t=t,r=r,r.length!==t.length))return!1;for(let s=0;s<r.length;s++){const o=r[s],n=t[s];if(o.filename!==n.filename||o.lineno!==n.lineno||o.colno!==n.colno||o.function!==n.function)return!1}return!0}function B0(i,e){let t=i.fingerprint,r=e.fingerprint;if(!t&&!r)return!0;if(t&&!r||!t&&r)return!1;t=t,r=r;try{return t.join("")===r.join("")}catch{return!1}}function ou(i){var e,t;return(t=(e=i.exception)==null?void 0:e.values)==null?void 0:t[0]}function wn(i){if(!i)return{};const e=i.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const t=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:t,hash:r,relative:e[5]+t+r}}function F0(i){if(i!==void 0)return i>=400&&i<500?"warning":i>=500?"error":void 0}const Ms=Me;function _y(){return"history"in Ms&&!!Ms.history}function Sy(){if(!("fetch"in Ms))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Ma(i){return i&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(i.toString())}function ky(){var t;if(typeof EdgeRuntime=="string")return!0;if(!Sy())return!1;if(Ma(Ms.fetch))return!0;let i=!1;const e=Ms.document;if(e&&typeof e.createElement=="function")try{const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),(t=r.contentWindow)!=null&&t.fetch&&(i=Ma(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){ee&&X.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return i}function vy(i,e){const t="fetch";xi(t,i),Oi(t,()=>by(void 0,e))}function by(i,e=!1){e&&!ky()||Xe(Me,"fetch",function(t){return function(...r){const s=new Error,{method:o,url:n}=Yy(r),a={args:r,fetchData:{method:o,url:n},startTimestamp:vt()*1e3,virtualError:s,headers:Qy(r)};return ut("fetch",{...a}),t.apply(Me,r).then(async c=>(ut("fetch",{...a,endTimestamp:vt()*1e3,response:c}),c),c=>{if(ut("fetch",{...a,endTimestamp:vt()*1e3,error:c}),sM(c)&&c.stack===void 0&&(c.stack=s.stack,wi(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const l=new URL(a.fetchData.url);c.message=`${c.message} (${l.host})`}catch{}throw c})}})}function ca(i,e){return!!i&&typeof i=="object"&&!!i[e]}function nu(i){return typeof i=="string"?i:i?ca(i,"url")?i.url:i.toString?i.toString():"":""}function Yy(i){if(i.length===0)return{method:"GET",url:""};if(i.length===2){const[t,r]=i;return{url:nu(t),method:ca(r,"method")?String(r.method).toUpperCase():"GET"}}const e=i[0];return{url:nu(e),method:ca(e,"method")?String(e.method).toUpperCase():"GET"}}function Qy(i){const[e,t]=i;try{if(typeof t=="object"&&t!==null&&"headers"in t&&t.headers)return new Headers(t.headers);if(rj(e))return new Headers(e.headers)}catch{}}function Uy(){return"npm"}const he=Me;let ua=0;function J0(){return ua>0}function $y(){ua++,setTimeout(()=>{ua--})}function Tr(i,e={}){function t(s){return typeof s=="function"}if(!t(i))return i;try{const s=i.__sentry_wrapped__;if(s)return typeof s=="function"?s:i;if(cM(i))return i}catch{return i}const r=function(...s){try{const o=s.map(n=>Tr(n,e));return i.apply(this,o)}catch(o){throw $y(),wj(n=>{n.addEventProcessor(a=>(e.mechanism&&(ta(a,void 0),jr(a,e.mechanism)),a.extra={...a.extra,arguments:s},a)),Ed(o)}),o}};try{for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])}catch{}T0(r,i),wi(i,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return i.name}})}catch{}return r}function Py(){const i=MM(),{referrer:e}=he.document||{},{userAgent:t}=he.navigator||{},r={...e&&{Referer:e},...t&&{"User-Agent":t}};return{url:i,headers:r}}function gM(i,e){const t=LM(i,e),r={type:Jy(e),value:Gy(e)};return t.length&&(r.stacktrace={frames:t}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ry(i,e,t,r){const s=$e(),o=s==null?void 0:s.getOptions().normalizeDepth,n=Ky(e),a={__serialized__:O0(e,o)};if(n)return{exception:{values:[gM(i,n)]},extra:a};const c={exception:{values:[{type:bo(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Zy(e,{isUnhandledRejection:r})}]},extra:a};if(t){const l=LM(i,t);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function Cn(i,e){return{exception:{values:[gM(i,e)]}}}function LM(i,e){const t=e.stacktrace||e.stack||"",r=By(e),s=Fy(e);try{return i(t,r,s)}catch{}return[]}const Wy=/Minified React error #\d+;/i;function By(i){return i&&Wy.test(i.message)?1:0}function Fy(i){return typeof i.framesToPop=="number"?i.framesToPop:0}function G0(i){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?i instanceof WebAssembly.Exception:!1}function Jy(i){const e=i==null?void 0:i.name;return!e&&G0(i)?i.message&&Array.isArray(i.message)&&i.message.length==2?i.message[0]:"WebAssembly.Exception":e}function Gy(i){const e=i==null?void 0:i.message;return G0(i)?Array.isArray(i.message)&&i.message.length==2?i.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Hy(i,e,t,r){const s=(t==null?void 0:t.syntheticException)||void 0,o=jM(i,e,s,r);return jr(o),o.level="error",t!=null&&t.event_id&&(o.event_id=t.event_id),Ci(o)}function Vy(i,e,t="info",r,s){const o=(r==null?void 0:r.syntheticException)||void 0,n=la(i,e,o,s);return n.level=t,r!=null&&r.event_id&&(n.event_id=r.event_id),Ci(n)}function jM(i,e,t,r,s){let o;if(j0(e)&&e.error)return Cn(i,e.error);if(Ic(e)||qL(e)){const n=e;if("stack"in e)o=Cn(i,e);else{const a=n.name||(Ic(n)?"DOMError":"DOMException"),c=n.message?`${a}: ${n.message}`:a;o=la(i,c,t,r),ta(o,c)}return"code"in n&&(o.tags={...o.tags,"DOMException.code":`${n.code}`}),o}return sM(e)?Cn(i,e):as(e)||bo(e)?(o=Ry(i,e,t,s),jr(o,{synthetic:!0}),o):(o=la(i,e,t,r),ta(o,`${e}`),jr(o,{synthetic:!0}),o)}function la(i,e,t,r){const s={};if(r&&t){const o=LM(i,t);o.length&&(s.exception={values:[{value:e,stacktrace:{frames:o}}]}),jr(s,{synthetic:!0})}if(oM(e)){const{__sentry_template_string__:o,__sentry_template_values__:n}=e;return s.logentry={message:o,params:n},s}return s.message=e,s}function Zy(i,{isUnhandledRejection:e}){const t=Mj(i),r=e?"promise rejection":"exception";return j0(i)?`Event \`ErrorEvent\` captured as ${r} with message \`${i.message}\``:bo(i)?`Event \`${Xy(i)}\` (type=${i.type}) captured as ${r}`:`Object captured as ${r} with keys: ${t}`}function Xy(i){try{const e=Object.getPrototypeOf(i);return e?e.constructor.name:void 0}catch{}}function Ky(i){for(const e in i)if(Object.prototype.hasOwnProperty.call(i,e)){const t=i[e];if(t instanceof Error)return t}}const qy=5e3;class eT extends Wd{constructor(e){const t=tT(e),r=he.SENTRY_SDK_SOURCE||Uy();ay(t,"browser",["browser"],r),super(t);const{sendDefaultPii:s,sendClientReports:o,enableLogs:n,_experiments:a}=this._options,c=n??(a==null?void 0:a.enableLogs);he.document&&(o||c)&&he.document.addEventListener("visibilitychange",()=>{he.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),c&&zn(this))}),c&&(this.on("flush",()=>{zn(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{zn(this)},qy)})),s&&(this.on("postprocessEvent",oy),this.on("beforeSendSession",ny))}eventFromException(e,t){return Hy(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",r){return Vy(this._options.stackParser,e,t,r,this._options.attachStacktrace)}_prepareEvent(e,t,r,s){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,r,s)}}function tT(i){var e;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(e=he.SENTRY_RELEASE)==null?void 0:e.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...i}}const iT=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Qe=Me,rT=1e3;let au,Na,ga;function sT(i){xi("dom",i),Oi("dom",oT)}function oT(){if(!Qe.document)return;const i=ut.bind(null,"dom"),e=Mu(i,!0);Qe.document.addEventListener("click",e,!1),Qe.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(t=>{var o,n;const s=(o=Qe[t])==null?void 0:o.prototype;(n=s==null?void 0:s.hasOwnProperty)!=null&&n.call(s,"addEventListener")&&(Xe(s,"addEventListener",function(a){return function(c,l,N){if(c==="click"||c=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},g=u[c]=u[c]||{refCount:0};if(!g.handler){const L=Mu(i);g.handler=L,a.call(this,c,L,N)}g.refCount++}catch{}return a.call(this,c,l,N)}}),Xe(s,"removeEventListener",function(a){return function(c,l,N){if(c==="click"||c=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},g=u[c];g&&(g.refCount--,g.refCount<=0&&(a.call(this,c,g.handler,N),g.handler=void 0,delete u[c]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,c,l,N)}}))})}function nT(i){if(i.type!==Na)return!1;try{if(!i.target||i.target._sentryId!==ga)return!1}catch{}return!0}function aT(i,e){return i!=="keypress"?!1:e!=null&&e.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function Mu(i,e=!1){return t=>{if(!t||t._sentryCaptured)return;const r=MT(t);if(aT(t.type,r))return;wi(t,"_sentryCaptured",!0),r&&!r._sentryId&&wi(r,"_sentryId",rt());const s=t.type==="keypress"?"input":t.type;nT(t)||(i({event:t,name:s,global:e}),Na=t.type,ga=r?r._sentryId:void 0),clearTimeout(au),au=Qe.setTimeout(()=>{ga=void 0,Na=void 0},rT)}}function MT(i){try{return i.target}catch{return null}}let $s;function H0(i){const e="history";xi(e,i),Oi(e,cT)}function cT(){if(Qe.addEventListener("popstate",()=>{const e=Qe.location.href,t=$s;if($s=e,t===e)return;ut("history",{from:t,to:e})}),!_y())return;function i(e){return function(...t){const r=t.length>2?t[2]:void 0;if(r){const s=$s,o=uT(String(r));if($s=o,s===o)return e.apply(this,t);ut("history",{from:s,to:o})}return e.apply(this,t)}}Xe(Qe.history,"pushState",i),Xe(Qe.history,"replaceState",i)}function uT(i){try{return new URL(i,Qe.location.origin).toString()}catch{return i}}const oo={};function lT(i){const e=oo[i];if(e)return e;let t=Qe[i];if(Ma(t))return oo[i]=t.bind(Qe);const r=Qe.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const o=s.contentWindow;o!=null&&o[i]&&(t=o[i]),r.head.removeChild(s)}catch(s){iT&&X.warn(`Could not create sandbox iframe for ${i} check, bailing to window.${i}: `,s)}return t&&(oo[i]=t.bind(Qe))}function cu(i){oo[i]=void 0}const Zr="__sentry_xhr_v3__";function NT(i){xi("xhr",i),Oi("xhr",gT)}function gT(){if(!Qe.XMLHttpRequest)return;const i=XMLHttpRequest.prototype;i.open=new Proxy(i.open,{apply(e,t,r){const s=new Error,o=vt()*1e3,n=kt(r[0])?r[0].toUpperCase():void 0,a=LT(r[1]);if(!n||!a)return e.apply(t,r);t[Zr]={method:n,url:a,request_headers:{}},n==="POST"&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const c=()=>{const l=t[Zr];if(l&&t.readyState===4){try{l.status_code=t.status}catch{}const N={endTimestamp:vt()*1e3,startTimestamp:o,xhr:t,virtualError:s};ut("xhr",N)}};return"onreadystatechange"in t&&typeof t.onreadystatechange=="function"?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(l,N,u){return c(),l.apply(N,u)}}):t.addEventListener("readystatechange",c),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(l,N,u){const[g,L]=u,d=N[Zr];return d&&kt(g)&&kt(L)&&(d.request_headers[g.toLowerCase()]=L),l.apply(N,u)}}),e.apply(t,r)}}),i.send=new Proxy(i.send,{apply(e,t,r){const s=t[Zr];if(!s)return e.apply(t,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:vt()*1e3,xhr:t};return ut("xhr",o),e.apply(t,r)}})}function LT(i){if(kt(i))return i;try{return i.toString()}catch{}}function jT(i,e=lT("fetch")){let t=0,r=0;function s(o){const n=o.body.length;t+=n,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:i.headers,keepalive:t<=6e4&&r<15,...i.fetchOptions};if(!e)return cu("fetch"),No("No fetch implementation available");try{return e(i.url,a).then(c=>(t-=n,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return cu("fetch"),t-=n,r--,No(c)}}return sy(i,s)}const dT=30,yT=50;function La(i,e,t,r){const s={filename:i,function:e==="<anonymous>"?zi:e,in_app:!0};return t!==void 0&&(s.lineno=t),r!==void 0&&(s.colno=r),s}const TT=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,DT=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hT=/\((\S*)(?::(\d+))(?::(\d+))\)/,pT=i=>{const e=TT.exec(i);if(e){const[,r,s,o]=e;return La(r,zi,+s,+o)}const t=DT.exec(i);if(t){if(t[2]&&t[2].indexOf("eval")===0){const n=hT.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}const[s,o]=V0(t[1]||zi,t[2]);return La(o,s,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},zT=[dT,pT],wT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,CT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,IT=i=>{const e=wT.exec(i);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const o=CT.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let r=e[3],s=e[1]||zi;return[s,r]=V0(s,r),La(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},mT=[yT,IT],AT=[zT,mT],fT=g0(...AT),V0=(i,e)=>{const t=i.indexOf("safari-extension")!==-1,r=i.indexOf("safari-web-extension")!==-1;return t||r?[i.indexOf("@")!==-1?i.split("@")[0]:zi,t?`safari-extension:${e}`:`safari-web-extension:${e}`]:[i,e]},$o=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ps=1024,xT="Breadcrumbs",OT=(i={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...i};return{name:xT,setup(t){e.console&&Cy(kT(t)),e.dom&&sT(ST(t,e.dom)),e.xhr&&NT(vT(t)),e.fetch&&vy(bT(t)),e.history&&H0(YT(t)),e.sentry&&t.on("beforeSendEvent",_T(t))}}},ET=OT;function _T(i){return function(t){$e()===i&&Ii({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:Ti(t)},{event:t})}}function ST(i,e){return function(r){if($e()!==i)return;let s,o,n=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>Ps&&($o&&X.warn(`\`dom.maxStringLength\` cannot exceed ${Ps}, but a value of ${a} was configured. Sentry will use ${Ps} instead.`),a=Ps),typeof n=="string"&&(n=[n]);try{const l=r.event,N=QT(l)?l.target:l;s=y0(N,{keyAttrs:n,maxStringLength:a}),o=nj(N)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),Ii(c,{event:r.event,name:r.name,global:r.global})}}function kT(i){return function(t){if($e()!==i)return;const r={category:"console",data:{arguments:t.args,logger:"console"},level:my(t.level),message:mc(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)r.message=`Assertion failed: ${mc(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1);else return;Ii(r,{input:t.args,level:t.level})}}function vT(i){return function(t){if($e()!==i)return;const{startTimestamp:r,endTimestamp:s}=t,o=t.xhr[Zr];if(!r||!s||!o)return;const{method:n,url:a,status_code:c,body:l}=o,N={method:n,url:a,status_code:c},u={xhr:t.xhr,input:l,startTimestamp:r,endTimestamp:s},g={category:"xhr",data:N,type:"http",level:F0(c)};i.emit("beforeOutgoingRequestBreadcrumb",g,u),Ii(g,u)}}function bT(i){return function(t){if($e()!==i)return;const{startTimestamp:r,endTimestamp:s}=t;if(s&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.fetchData.method,t.fetchData.url,t.error){const o=t.fetchData,n={data:t.error,input:t.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:o,level:"error",type:"http"};i.emit("beforeOutgoingRequestBreadcrumb",a,n),Ii(a,n)}else{const o=t.response,n={...t.fetchData,status_code:o==null?void 0:o.status};t.fetchData.request_body_size,t.fetchData.response_body_size,o==null||o.status;const a={input:t.args,response:o,startTimestamp:r,endTimestamp:s},c={category:"fetch",data:n,type:"http",level:F0(n.status_code)};i.emit("beforeOutgoingRequestBreadcrumb",c,a),Ii(c,a)}}}function YT(i){return function(t){if($e()!==i)return;let r=t.from,s=t.to;const o=wn(he.location.href);let n=r?wn(r):void 0;const a=wn(s);n!=null&&n.path||(n=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===n.protocol&&o.host===n.host&&(r=n.relative),Ii({category:"navigation",data:{from:r,to:s}})}}function QT(i){return!!i&&!!i.target}const UT=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],$T="BrowserApiErrors",PT=(i={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...i};return{name:$T,setupOnce(){e.setTimeout&&Xe(he,"setTimeout",uu),e.setInterval&&Xe(he,"setInterval",uu),e.requestAnimationFrame&&Xe(he,"requestAnimationFrame",WT),e.XMLHttpRequest&&"XMLHttpRequest"in he&&Xe(XMLHttpRequest.prototype,"send",BT);const t=e.eventTarget;t&&(Array.isArray(t)?t:UT).forEach(s=>FT(s,e))}}},RT=PT;function uu(i){return function(...e){const t=e[0];return e[0]=Tr(t,{mechanism:{data:{function:ti(i)},handled:!1,type:"instrument"}}),i.apply(this,e)}}function WT(i){return function(e){return i.apply(this,[Tr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:ti(i)},handled:!1,type:"instrument"}})])}}function BT(i){return function(...e){const t=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in t&&typeof t[s]=="function"&&Xe(t,s,function(o){const n={mechanism:{data:{function:s,handler:ti(o)},handled:!1,type:"instrument"}},a=cM(o);return a&&(n.mechanism.data.handler=ti(a)),Tr(o,n)})}),i.apply(this,e)}}function FT(i,e){var s,o;const r=(s=he[i])==null?void 0:s.prototype;(o=r==null?void 0:r.hasOwnProperty)!=null&&o.call(r,"addEventListener")&&(Xe(r,"addEventListener",function(n){return function(a,c,l){try{JT(c)&&(c.handleEvent=Tr(c.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ti(c),target:i},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&GT(this,a,c),n.apply(this,[a,Tr(c,{mechanism:{data:{function:"addEventListener",handler:ti(c),target:i},handled:!1,type:"instrument"}}),l])}}),Xe(r,"removeEventListener",function(n){return function(a,c,l){try{const N=c.__sentry_wrapped__;N&&n.call(this,a,N,l)}catch{}return n.call(this,a,c,l)}}))}function JT(i){return typeof i.handleEvent=="function"}function GT(i,e,t){i&&typeof i=="object"&&"removeEventListener"in i&&typeof i.removeEventListener=="function"&&i.removeEventListener(e,t)}const HT=()=>({name:"BrowserSession",setupOnce(){if(typeof he.document>"u"){$o&&X.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Jc({ignoreDuration:!0}),Gc(),H0(({from:i,to:e})=>{i!==void 0&&i!==e&&(Jc({ignoreDuration:!0}),Gc())})}}),VT="GlobalHandlers",ZT=(i={})=>{const e={onerror:!0,onunhandledrejection:!0,...i};return{name:VT,setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&(KT(t),lu("onerror")),e.onunhandledrejection&&(qT(t),lu("onunhandledrejection"))}}},XT=ZT;function KT(i){VL(e=>{const{stackParser:t,attachStacktrace:r}=Z0();if($e()!==i||J0())return;const{msg:s,url:o,line:n,column:a,error:c}=e,l=iD(jM(t,c||s,void 0,r,!1),o,n,a);l.level="error",_0(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function qT(i){XL(e=>{const{stackParser:t,attachStacktrace:r}=Z0();if($e()!==i||J0())return;const s=eD(e),o=nM(s)?tD(s):jM(t,s,void 0,r,!0);o.level="error",_0(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function eD(i){if(nM(i))return i;try{if("reason"in i)return i.reason;if("detail"in i&&"reason"in i.detail)return i.detail.reason}catch{}return i}function tD(i){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}}function iD(i,e,t,r){const s=i.exception=i.exception||{},o=s.values=s.values||[],n=o[0]=o[0]||{},a=n.stacktrace=n.stacktrace||{},c=a.frames=a.frames||[],l=r,N=t,u=kt(e)&&e.length>0?e:MM();return c.length===0&&c.push({colno:l,filename:u,function:zi,in_app:!0,lineno:N}),i}function lu(i){$o&&X.log(`Global Handler attached: ${i}`)}function Z0(){const i=$e();return(i==null?void 0:i.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}const rD=()=>({name:"HttpContext",preprocessEvent(i){var r;if(!he.navigator&&!he.location&&!he.document)return;const e=Py(),t={...e.headers,...(r=i.request)==null?void 0:r.headers};i.request={...e,...i.request,headers:t}}}),sD="cause",oD=5,nD="LinkedErrors",aD=(i={})=>{const e=i.limit||oD,t=i.key||sD;return{name:nD,preprocessEvent(r,s,o){const n=o.getOptions();wy(gM,n.stackParser,t,e,r,s)}}},MD=aD;function cD(){return uD()?($o&&hr(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function uD(){var o;if(typeof he.window>"u")return!1;const i=he;if(i.nw)return!1;const e=i.chrome||i.browser;if(!((o=e==null?void 0:e.runtime)!=null&&o.id))return!1;const t=MM(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(he===he.top&&r.some(n=>t.startsWith(`${n}://`)))}function lD(i){return[jy(),ly(),RT(),ET(),XT(),MD(),R0(),rD(),HT()]}function ND(i={}){const e=!i.skipBrowserExtensionCheck&&cD(),t={...i,enabled:e?!1:i.enabled,stackParser:GL(i.stackParser||fT),integrations:Qd({integrations:i.integrations,defaultIntegrations:i.defaultIntegrations==null?lD():i.defaultIntegrations}),transport:i.transport||jT};return Vd(eT,t)}function gD(){console.log(`
16
+ Url: ${go(i)}`),!0}return!1}function yy(i,e){return e!=null&&e.length?b0(i).some(t=>Qo(t,e)):!1}function Ty(i,e){if(!(e!=null&&e.length))return!1;const t=i.transaction;return t?Qo(t,e):!1}function Dy(i,e){if(!(e!=null&&e.length))return!1;const t=go(i);return t?Qo(t,e):!1}function hy(i,e){if(!(e!=null&&e.length))return!0;const t=go(i);return t?Qo(t,e):!0}function py(i=[]){for(let e=i.length-1;e>=0;e--){const t=i[e];if(t&&t.filename!=="<anonymous>"&&t.filename!=="[native code]")return t.filename||null}return null}function go(i){var e,t;try{const r=[...((e=i.exception)==null?void 0:e.values)??[]].reverse().find(o=>{var n,a,c;return((n=o.mechanism)==null?void 0:n.parent_id)===void 0&&((c=(a=o.stacktrace)==null?void 0:a.frames)==null?void 0:c.length)}),s=(t=r==null?void 0:r.stacktrace)==null?void 0:t.frames;return s?py(s):null}catch{return ee&&X.error(`Cannot extract url for event ${Ti(i)}`),null}}function zy(i){var e,t;return(t=(e=i.exception)==null?void 0:e.values)!=null&&t.length?!i.message&&!i.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function wy(i,e,t,r,s,o){var a;if(!((a=s.exception)!=null&&a.values)||!o||!ii(o.originalException,Error))return;const n=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;n&&(s.exception.values=aa(i,e,r,o.originalException,t,s.exception.values,n,0))}function aa(i,e,t,r,s,o,n,a){if(o.length>=t+1)return o;let c=[...o];if(ii(r[s],Error)){ru(n,a);const l=i(e,r[s]),N=c.length;su(l,s,N,a),c=aa(i,e,t,r[s],s,[l,...c],l,N)}return Array.isArray(r.errors)&&r.errors.forEach((l,N)=>{if(ii(l,Error)){ru(n,a);const u=i(e,l),g=c.length;su(u,`errors[${N}]`,g,a),c=aa(i,e,t,l,s,[u,...c],u,g)}}),c}function ru(i,e){i.mechanism=i.mechanism||{type:"generic",handled:!0},i.mechanism={...i.mechanism,...i.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function su(i,e,t,r){i.mechanism=i.mechanism||{type:"generic",handled:!0},i.mechanism={...i.mechanism,type:"chained",source:e,exception_id:t,parent_id:r}}function Cy(i){const e="console";xi(e,i),Oi(e,Iy)}function Iy(){"console"in Me&&$L.forEach(function(i){i in Me.console&&Xe(Me.console,i,function(e){return uo[i]=e,function(...t){ut("console",{args:t,level:i});const s=uo[i];s==null||s.apply(Me.console,t)}})})}function my(i){return i==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(i)?i:"log"}const Ay="Dedupe",fy=(()=>{let i;return{name:Ay,processEvent(e){if(e.type)return e;try{if(xy(e,i))return ee&&X.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return i=e}}}),R0=fy;function xy(i,e){return e?!!(Oy(i,e)||Ey(i,e)):!1}function Oy(i,e){const t=i.message,r=e.message;return!(!t&&!r||t&&!r||!t&&r||t!==r||!B0(i,e)||!W0(i,e))}function Ey(i,e){const t=ou(e),r=ou(i);return!(!t||!r||t.type!==r.type||t.value!==r.value||!B0(i,e)||!W0(i,e))}function W0(i,e){let t=wc(i),r=wc(e);if(!t&&!r)return!0;if(t&&!r||!t&&r||(t=t,r=r,r.length!==t.length))return!1;for(let s=0;s<r.length;s++){const o=r[s],n=t[s];if(o.filename!==n.filename||o.lineno!==n.lineno||o.colno!==n.colno||o.function!==n.function)return!1}return!0}function B0(i,e){let t=i.fingerprint,r=e.fingerprint;if(!t&&!r)return!0;if(t&&!r||!t&&r)return!1;t=t,r=r;try{return t.join("")===r.join("")}catch{return!1}}function ou(i){var e,t;return(t=(e=i.exception)==null?void 0:e.values)==null?void 0:t[0]}function wn(i){if(!i)return{};const e=i.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const t=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:t,hash:r,relative:e[5]+t+r}}function F0(i){if(i!==void 0)return i>=400&&i<500?"warning":i>=500?"error":void 0}const Ms=Me;function _y(){return"history"in Ms&&!!Ms.history}function Sy(){if(!("fetch"in Ms))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Ma(i){return i&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(i.toString())}function ky(){var t;if(typeof EdgeRuntime=="string")return!0;if(!Sy())return!1;if(Ma(Ms.fetch))return!0;let i=!1;const e=Ms.document;if(e&&typeof e.createElement=="function")try{const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),(t=r.contentWindow)!=null&&t.fetch&&(i=Ma(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){ee&&X.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return i}function vy(i,e){const t="fetch";xi(t,i),Oi(t,()=>by(void 0,e))}function by(i,e=!1){e&&!ky()||Xe(Me,"fetch",function(t){return function(...r){const s=new Error,{method:o,url:n}=Yy(r),a={args:r,fetchData:{method:o,url:n},startTimestamp:vt()*1e3,virtualError:s,headers:Qy(r)};return ut("fetch",{...a}),t.apply(Me,r).then(async c=>(ut("fetch",{...a,endTimestamp:vt()*1e3,response:c}),c),c=>{if(ut("fetch",{...a,endTimestamp:vt()*1e3,error:c}),sM(c)&&c.stack===void 0&&(c.stack=s.stack,wi(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const l=new URL(a.fetchData.url);c.message=`${c.message} (${l.host})`}catch{}throw c})}})}function ca(i,e){return!!i&&typeof i=="object"&&!!i[e]}function nu(i){return typeof i=="string"?i:i?ca(i,"url")?i.url:i.toString?i.toString():"":""}function Yy(i){if(i.length===0)return{method:"GET",url:""};if(i.length===2){const[t,r]=i;return{url:nu(t),method:ca(r,"method")?String(r.method).toUpperCase():"GET"}}const e=i[0];return{url:nu(e),method:ca(e,"method")?String(e.method).toUpperCase():"GET"}}function Qy(i){const[e,t]=i;try{if(typeof t=="object"&&t!==null&&"headers"in t&&t.headers)return new Headers(t.headers);if(rj(e))return new Headers(e.headers)}catch{}}function Uy(){return"npm"}const he=Me;let ua=0;function J0(){return ua>0}function $y(){ua++,setTimeout(()=>{ua--})}function Tr(i,e={}){function t(s){return typeof s=="function"}if(!t(i))return i;try{const s=i.__sentry_wrapped__;if(s)return typeof s=="function"?s:i;if(cM(i))return i}catch{return i}const r=function(...s){try{const o=s.map(n=>Tr(n,e));return i.apply(this,o)}catch(o){throw $y(),wj(n=>{n.addEventProcessor(a=>(e.mechanism&&(ta(a,void 0),jr(a,e.mechanism)),a.extra={...a.extra,arguments:s},a)),Ed(o)}),o}};try{for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])}catch{}T0(r,i),wi(i,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return i.name}})}catch{}return r}function Py(){const i=MM(),{referrer:e}=he.document||{},{userAgent:t}=he.navigator||{},r={...e&&{Referer:e},...t&&{"User-Agent":t}};return{url:i,headers:r}}function gM(i,e){const t=LM(i,e),r={type:Jy(e),value:Gy(e)};return t.length&&(r.stacktrace={frames:t}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ry(i,e,t,r){const s=$e(),o=s==null?void 0:s.getOptions().normalizeDepth,n=Ky(e),a={__serialized__:O0(e,o)};if(n)return{exception:{values:[gM(i,n)]},extra:a};const c={exception:{values:[{type:bo(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Zy(e,{isUnhandledRejection:r})}]},extra:a};if(t){const l=LM(i,t);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function Cn(i,e){return{exception:{values:[gM(i,e)]}}}function LM(i,e){const t=e.stacktrace||e.stack||"",r=By(e),s=Fy(e);try{return i(t,r,s)}catch{}return[]}const Wy=/Minified React error #\d+;/i;function By(i){return i&&Wy.test(i.message)?1:0}function Fy(i){return typeof i.framesToPop=="number"?i.framesToPop:0}function G0(i){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?i instanceof WebAssembly.Exception:!1}function Jy(i){const e=i==null?void 0:i.name;return!e&&G0(i)?i.message&&Array.isArray(i.message)&&i.message.length==2?i.message[0]:"WebAssembly.Exception":e}function Gy(i){const e=i==null?void 0:i.message;return G0(i)?Array.isArray(i.message)&&i.message.length==2?i.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Hy(i,e,t,r){const s=(t==null?void 0:t.syntheticException)||void 0,o=jM(i,e,s,r);return jr(o),o.level="error",t!=null&&t.event_id&&(o.event_id=t.event_id),Ci(o)}function Vy(i,e,t="info",r,s){const o=(r==null?void 0:r.syntheticException)||void 0,n=la(i,e,o,s);return n.level=t,r!=null&&r.event_id&&(n.event_id=r.event_id),Ci(n)}function jM(i,e,t,r,s){let o;if(j0(e)&&e.error)return Cn(i,e.error);if(Ic(e)||qL(e)){const n=e;if("stack"in e)o=Cn(i,e);else{const a=n.name||(Ic(n)?"DOMError":"DOMException"),c=n.message?`${a}: ${n.message}`:a;o=la(i,c,t,r),ta(o,c)}return"code"in n&&(o.tags={...o.tags,"DOMException.code":`${n.code}`}),o}return sM(e)?Cn(i,e):as(e)||bo(e)?(o=Ry(i,e,t,s),jr(o,{synthetic:!0}),o):(o=la(i,e,t,r),ta(o,`${e}`),jr(o,{synthetic:!0}),o)}function la(i,e,t,r){const s={};if(r&&t){const o=LM(i,t);o.length&&(s.exception={values:[{value:e,stacktrace:{frames:o}}]}),jr(s,{synthetic:!0})}if(oM(e)){const{__sentry_template_string__:o,__sentry_template_values__:n}=e;return s.logentry={message:o,params:n},s}return s.message=e,s}function Zy(i,{isUnhandledRejection:e}){const t=Mj(i),r=e?"promise rejection":"exception";return j0(i)?`Event \`ErrorEvent\` captured as ${r} with message \`${i.message}\``:bo(i)?`Event \`${Xy(i)}\` (type=${i.type}) captured as ${r}`:`Object captured as ${r} with keys: ${t}`}function Xy(i){try{const e=Object.getPrototypeOf(i);return e?e.constructor.name:void 0}catch{}}function Ky(i){for(const e in i)if(Object.prototype.hasOwnProperty.call(i,e)){const t=i[e];if(t instanceof Error)return t}}const qy=5e3;class eT extends Wd{constructor(e){const t=tT(e),r=he.SENTRY_SDK_SOURCE||Uy();ay(t,"browser",["browser"],r),super(t);const{sendDefaultPii:s,sendClientReports:o,enableLogs:n,_experiments:a}=this._options,c=n??(a==null?void 0:a.enableLogs);he.document&&(o||c)&&he.document.addEventListener("visibilitychange",()=>{he.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),c&&zn(this))}),c&&(this.on("flush",()=>{zn(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{zn(this)},qy)})),s&&(this.on("postprocessEvent",oy),this.on("beforeSendSession",ny))}eventFromException(e,t){return Hy(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",r){return Vy(this._options.stackParser,e,t,r,this._options.attachStacktrace)}_prepareEvent(e,t,r,s){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,r,s)}}function tT(i){var e;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(e=he.SENTRY_RELEASE)==null?void 0:e.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...i}}const iT=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Qe=Me,rT=1e3;let au,Na,ga;function sT(i){xi("dom",i),Oi("dom",oT)}function oT(){if(!Qe.document)return;const i=ut.bind(null,"dom"),e=Mu(i,!0);Qe.document.addEventListener("click",e,!1),Qe.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(t=>{var o,n;const s=(o=Qe[t])==null?void 0:o.prototype;(n=s==null?void 0:s.hasOwnProperty)!=null&&n.call(s,"addEventListener")&&(Xe(s,"addEventListener",function(a){return function(c,l,N){if(c==="click"||c=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},g=u[c]=u[c]||{refCount:0};if(!g.handler){const L=Mu(i);g.handler=L,a.call(this,c,L,N)}g.refCount++}catch{}return a.call(this,c,l,N)}}),Xe(s,"removeEventListener",function(a){return function(c,l,N){if(c==="click"||c=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},g=u[c];g&&(g.refCount--,g.refCount<=0&&(a.call(this,c,g.handler,N),g.handler=void 0,delete u[c]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,c,l,N)}}))})}function nT(i){if(i.type!==Na)return!1;try{if(!i.target||i.target._sentryId!==ga)return!1}catch{}return!0}function aT(i,e){return i!=="keypress"?!1:e!=null&&e.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function Mu(i,e=!1){return t=>{if(!t||t._sentryCaptured)return;const r=MT(t);if(aT(t.type,r))return;wi(t,"_sentryCaptured",!0),r&&!r._sentryId&&wi(r,"_sentryId",rt());const s=t.type==="keypress"?"input":t.type;nT(t)||(i({event:t,name:s,global:e}),Na=t.type,ga=r?r._sentryId:void 0),clearTimeout(au),au=Qe.setTimeout(()=>{ga=void 0,Na=void 0},rT)}}function MT(i){try{return i.target}catch{return null}}let $s;function H0(i){const e="history";xi(e,i),Oi(e,cT)}function cT(){if(Qe.addEventListener("popstate",()=>{const e=Qe.location.href,t=$s;if($s=e,t===e)return;ut("history",{from:t,to:e})}),!_y())return;function i(e){return function(...t){const r=t.length>2?t[2]:void 0;if(r){const s=$s,o=uT(String(r));if($s=o,s===o)return e.apply(this,t);ut("history",{from:s,to:o})}return e.apply(this,t)}}Xe(Qe.history,"pushState",i),Xe(Qe.history,"replaceState",i)}function uT(i){try{return new URL(i,Qe.location.origin).toString()}catch{return i}}const oo={};function lT(i){const e=oo[i];if(e)return e;let t=Qe[i];if(Ma(t))return oo[i]=t.bind(Qe);const r=Qe.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const o=s.contentWindow;o!=null&&o[i]&&(t=o[i]),r.head.removeChild(s)}catch(s){iT&&X.warn(`Could not create sandbox iframe for ${i} check, bailing to window.${i}: `,s)}return t&&(oo[i]=t.bind(Qe))}function cu(i){oo[i]=void 0}const Zr="__sentry_xhr_v3__";function NT(i){xi("xhr",i),Oi("xhr",gT)}function gT(){if(!Qe.XMLHttpRequest)return;const i=XMLHttpRequest.prototype;i.open=new Proxy(i.open,{apply(e,t,r){const s=new Error,o=vt()*1e3,n=kt(r[0])?r[0].toUpperCase():void 0,a=LT(r[1]);if(!n||!a)return e.apply(t,r);t[Zr]={method:n,url:a,request_headers:{}},n==="POST"&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const c=()=>{const l=t[Zr];if(l&&t.readyState===4){try{l.status_code=t.status}catch{}const N={endTimestamp:vt()*1e3,startTimestamp:o,xhr:t,virtualError:s};ut("xhr",N)}};return"onreadystatechange"in t&&typeof t.onreadystatechange=="function"?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(l,N,u){return c(),l.apply(N,u)}}):t.addEventListener("readystatechange",c),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(l,N,u){const[g,L]=u,d=N[Zr];return d&&kt(g)&&kt(L)&&(d.request_headers[g.toLowerCase()]=L),l.apply(N,u)}}),e.apply(t,r)}}),i.send=new Proxy(i.send,{apply(e,t,r){const s=t[Zr];if(!s)return e.apply(t,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:vt()*1e3,xhr:t};return ut("xhr",o),e.apply(t,r)}})}function LT(i){if(kt(i))return i;try{return i.toString()}catch{}}function jT(i,e=lT("fetch")){let t=0,r=0;function s(o){const n=o.body.length;t+=n,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:i.headers,keepalive:t<=6e4&&r<15,...i.fetchOptions};if(!e)return cu("fetch"),No("No fetch implementation available");try{return e(i.url,a).then(c=>(t-=n,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return cu("fetch"),t-=n,r--,No(c)}}return sy(i,s)}const dT=30,yT=50;function La(i,e,t,r){const s={filename:i,function:e==="<anonymous>"?zi:e,in_app:!0};return t!==void 0&&(s.lineno=t),r!==void 0&&(s.colno=r),s}const TT=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,DT=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hT=/\((\S*)(?::(\d+))(?::(\d+))\)/,pT=i=>{const e=TT.exec(i);if(e){const[,r,s,o]=e;return La(r,zi,+s,+o)}const t=DT.exec(i);if(t){if(t[2]&&t[2].indexOf("eval")===0){const n=hT.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}const[s,o]=V0(t[1]||zi,t[2]);return La(o,s,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},zT=[dT,pT],wT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,CT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,IT=i=>{const e=wT.exec(i);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const o=CT.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let r=e[3],s=e[1]||zi;return[s,r]=V0(s,r),La(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},mT=[yT,IT],AT=[zT,mT],fT=g0(...AT),V0=(i,e)=>{const t=i.indexOf("safari-extension")!==-1,r=i.indexOf("safari-web-extension")!==-1;return t||r?[i.indexOf("@")!==-1?i.split("@")[0]:zi,t?`safari-extension:${e}`:`safari-web-extension:${e}`]:[i,e]},$o=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ps=1024,xT="Breadcrumbs",OT=((i={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...i};return{name:xT,setup(t){e.console&&Cy(kT(t)),e.dom&&sT(ST(t,e.dom)),e.xhr&&NT(vT(t)),e.fetch&&vy(bT(t)),e.history&&H0(YT(t)),e.sentry&&t.on("beforeSendEvent",_T(t))}}}),ET=OT;function _T(i){return function(t){$e()===i&&Ii({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:Ti(t)},{event:t})}}function ST(i,e){return function(r){if($e()!==i)return;let s,o,n=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>Ps&&($o&&X.warn(`\`dom.maxStringLength\` cannot exceed ${Ps}, but a value of ${a} was configured. Sentry will use ${Ps} instead.`),a=Ps),typeof n=="string"&&(n=[n]);try{const l=r.event,N=QT(l)?l.target:l;s=y0(N,{keyAttrs:n,maxStringLength:a}),o=nj(N)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),Ii(c,{event:r.event,name:r.name,global:r.global})}}function kT(i){return function(t){if($e()!==i)return;const r={category:"console",data:{arguments:t.args,logger:"console"},level:my(t.level),message:mc(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)r.message=`Assertion failed: ${mc(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1);else return;Ii(r,{input:t.args,level:t.level})}}function vT(i){return function(t){if($e()!==i)return;const{startTimestamp:r,endTimestamp:s}=t,o=t.xhr[Zr];if(!r||!s||!o)return;const{method:n,url:a,status_code:c,body:l}=o,N={method:n,url:a,status_code:c},u={xhr:t.xhr,input:l,startTimestamp:r,endTimestamp:s},g={category:"xhr",data:N,type:"http",level:F0(c)};i.emit("beforeOutgoingRequestBreadcrumb",g,u),Ii(g,u)}}function bT(i){return function(t){if($e()!==i)return;const{startTimestamp:r,endTimestamp:s}=t;if(s&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.fetchData.method,t.fetchData.url,t.error){const o=t.fetchData,n={data:t.error,input:t.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:o,level:"error",type:"http"};i.emit("beforeOutgoingRequestBreadcrumb",a,n),Ii(a,n)}else{const o=t.response,n={...t.fetchData,status_code:o==null?void 0:o.status};t.fetchData.request_body_size,t.fetchData.response_body_size,o==null||o.status;const a={input:t.args,response:o,startTimestamp:r,endTimestamp:s},c={category:"fetch",data:n,type:"http",level:F0(n.status_code)};i.emit("beforeOutgoingRequestBreadcrumb",c,a),Ii(c,a)}}}function YT(i){return function(t){if($e()!==i)return;let r=t.from,s=t.to;const o=wn(he.location.href);let n=r?wn(r):void 0;const a=wn(s);n!=null&&n.path||(n=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===n.protocol&&o.host===n.host&&(r=n.relative),Ii({category:"navigation",data:{from:r,to:s}})}}function QT(i){return!!i&&!!i.target}const UT=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],$T="BrowserApiErrors",PT=((i={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...i};return{name:$T,setupOnce(){e.setTimeout&&Xe(he,"setTimeout",uu),e.setInterval&&Xe(he,"setInterval",uu),e.requestAnimationFrame&&Xe(he,"requestAnimationFrame",WT),e.XMLHttpRequest&&"XMLHttpRequest"in he&&Xe(XMLHttpRequest.prototype,"send",BT);const t=e.eventTarget;t&&(Array.isArray(t)?t:UT).forEach(s=>FT(s,e))}}}),RT=PT;function uu(i){return function(...e){const t=e[0];return e[0]=Tr(t,{mechanism:{data:{function:ti(i)},handled:!1,type:"instrument"}}),i.apply(this,e)}}function WT(i){return function(e){return i.apply(this,[Tr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:ti(i)},handled:!1,type:"instrument"}})])}}function BT(i){return function(...e){const t=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in t&&typeof t[s]=="function"&&Xe(t,s,function(o){const n={mechanism:{data:{function:s,handler:ti(o)},handled:!1,type:"instrument"}},a=cM(o);return a&&(n.mechanism.data.handler=ti(a)),Tr(o,n)})}),i.apply(this,e)}}function FT(i,e){var s,o;const r=(s=he[i])==null?void 0:s.prototype;(o=r==null?void 0:r.hasOwnProperty)!=null&&o.call(r,"addEventListener")&&(Xe(r,"addEventListener",function(n){return function(a,c,l){try{JT(c)&&(c.handleEvent=Tr(c.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ti(c),target:i},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&GT(this,a,c),n.apply(this,[a,Tr(c,{mechanism:{data:{function:"addEventListener",handler:ti(c),target:i},handled:!1,type:"instrument"}}),l])}}),Xe(r,"removeEventListener",function(n){return function(a,c,l){try{const N=c.__sentry_wrapped__;N&&n.call(this,a,N,l)}catch{}return n.call(this,a,c,l)}}))}function JT(i){return typeof i.handleEvent=="function"}function GT(i,e,t){i&&typeof i=="object"&&"removeEventListener"in i&&typeof i.removeEventListener=="function"&&i.removeEventListener(e,t)}const HT=()=>({name:"BrowserSession",setupOnce(){if(typeof he.document>"u"){$o&&X.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Jc({ignoreDuration:!0}),Gc(),H0(({from:i,to:e})=>{i!==void 0&&i!==e&&(Jc({ignoreDuration:!0}),Gc())})}}),VT="GlobalHandlers",ZT=((i={})=>{const e={onerror:!0,onunhandledrejection:!0,...i};return{name:VT,setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&(KT(t),lu("onerror")),e.onunhandledrejection&&(qT(t),lu("onunhandledrejection"))}}}),XT=ZT;function KT(i){VL(e=>{const{stackParser:t,attachStacktrace:r}=Z0();if($e()!==i||J0())return;const{msg:s,url:o,line:n,column:a,error:c}=e,l=iD(jM(t,c||s,void 0,r,!1),o,n,a);l.level="error",_0(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function qT(i){XL(e=>{const{stackParser:t,attachStacktrace:r}=Z0();if($e()!==i||J0())return;const s=eD(e),o=nM(s)?tD(s):jM(t,s,void 0,r,!0);o.level="error",_0(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function eD(i){if(nM(i))return i;try{if("reason"in i)return i.reason;if("detail"in i&&"reason"in i.detail)return i.detail.reason}catch{}return i}function tD(i){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}}function iD(i,e,t,r){const s=i.exception=i.exception||{},o=s.values=s.values||[],n=o[0]=o[0]||{},a=n.stacktrace=n.stacktrace||{},c=a.frames=a.frames||[],l=r,N=t,u=kt(e)&&e.length>0?e:MM();return c.length===0&&c.push({colno:l,filename:u,function:zi,in_app:!0,lineno:N}),i}function lu(i){$o&&X.log(`Global Handler attached: ${i}`)}function Z0(){const i=$e();return(i==null?void 0:i.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}const rD=()=>({name:"HttpContext",preprocessEvent(i){var r;if(!he.navigator&&!he.location&&!he.document)return;const e=Py(),t={...e.headers,...(r=i.request)==null?void 0:r.headers};i.request={...e,...i.request,headers:t}}}),sD="cause",oD=5,nD="LinkedErrors",aD=((i={})=>{const e=i.limit||oD,t=i.key||sD;return{name:nD,preprocessEvent(r,s,o){const n=o.getOptions();wy(gM,n.stackParser,t,e,r,s)}}}),MD=aD;function cD(){return uD()?($o&&hr(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function uD(){var o;if(typeof he.window>"u")return!1;const i=he;if(i.nw)return!1;const e=i.chrome||i.browser;if(!((o=e==null?void 0:e.runtime)!=null&&o.id))return!1;const t=MM(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(he===he.top&&r.some(n=>t.startsWith(`${n}://`)))}function lD(i){return[jy(),ly(),RT(),ET(),XT(),MD(),R0(),rD(),HT()]}function ND(i={}){const e=!i.skipBrowserExtensionCheck&&cD(),t={...i,enabled:e?!1:i.enabled,stackParser:GL(i.stackParser||fT),integrations:Qd({integrations:i.integrations,defaultIntegrations:i.defaultIntegrations==null?lD():i.defaultIntegrations}),transport:i.transport||jT};return Vd(eT,t)}function gD(){console.log(`
16
17
  ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
17
18
  ██║██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝██╔══██╗
18
19
  ██║██║ ██║██████╔╝██████╔╝██║ ██║█████╔╝ █████╗ ██████╔╝
@@ -294,9 +295,9 @@ body {
294
295
  background-color: #58c458;
295
296
  }
296
297
  }
297
- `;function A4e(){try{return window.self!==window.top}catch{return!0}}class di extends rs{socket;isIFrame=A4e();instance;adapterName;instanceId;newReact;encryptedFields;sentryDSN;alertDialogRendered;_secret;_systemConfig;savedNative;common=null;sentryStarted=!1;sentryInited=!1;resizeTimer=null;constructor(e,t){const r=e.Connection||(t==null?void 0:t.Connection)||Oe;if(!window.document.getElementById("generic-app-iobroker-component")){const N=window.document.createElement("style");N.setAttribute("id","generic-app-iobroker-component"),N.innerHTML=m4e,window.document.head.appendChild(N)}if(!di.isWeb()&&window.io&&window.location.port==="3000")try{const N=new window.SocketClient;delete window.io,window.io=N}catch{}super(e),gD();const s=(window.location.search||"").replace(/^\?/,"").replace(/#.*$/,""),o={};s.trim().split("&").filter(N=>N.trim()).forEach(N=>{const u=N.split("=");o[u[0]]=u.length===2?u[1]:!0,o[u[0]]==="true"?o[u[0]]=!0:o[u[0]]==="false"&&(o[u[0]]=!1)}),this.instance=(t==null?void 0:t.instance)??e.instance??(o.instance!==void 0?parseInt(o.instance,10)||0:parseInt(window.location.search.slice(1),10)||0);const n=window.location.pathname.split("/");this.adapterName=(t==null?void 0:t.adapterName)||e.adapterName||window.adapterName||n[n.length-2]||"iot",this.instanceId=`system.adapter.${this.adapterName}.${this.instance}`,this.newReact=o.newReact===!0;const a=rs.getLocation();a.tab=a.tab||(window._localStorage||window.localStorage).getItem(`${this.adapterName}-adapter`)||"";const c=this.createTheme();this.state=Object.assign(this.state||{},{selectedTab:(window._localStorage||window.localStorage).getItem(`${this.adapterName}-adapter`)||"",selectedTabNum:-1,native:{},errorText:"",changed:!1,connected:!1,loaded:!1,isConfigurationError:"",expertMode:!1,toast:"",theme:c,themeName:this.getThemeName(c),themeType:this.getThemeType(c),bottomButtons:(t&&t.bottomButtons)===!1?!1:(e==null?void 0:e.bottomButtons)!==!1,width:di.getWidth(),confirmClose:!1,_alert:!1,_alertType:"info",_alertMessage:""});const l=I4e;t!=null&&t.translations?Object.keys(t.translations).forEach(N=>{t.translations&&(l[N]=Object.assign(l[N],t.translations[N]||{}))}):e.translations&&Object.keys(e.translations).forEach(N=>{e.translations&&(l[N]=Object.assign(l[N],e.translations[N]||{}))}),p.setTranslations(l),this.savedNative={},this.encryptedFields=e.encryptedFields||(t==null?void 0:t.encryptedFields)||[],this.sentryDSN=t&&t.sentryDSN||e.sentryDSN,window.socketUrl&&(window.socketUrl.startsWith(":")?window.socketUrl=`${window.location.protocol}//${window.location.hostname}${window.socketUrl}`:!window.socketUrl.startsWith("http://")&&!window.socketUrl.startsWith("https://")&&(window.socketUrl=`${window.location.protocol}//${window.socketUrl}`)),this.alertDialogRendered=!1,window.iobOldAlert||(window.iobOldAlert=window.alert),window.alert=N=>{if(!this.alertDialogRendered){window.iobOldAlert(N);return}N!=null&&N.toString().toLowerCase().includes("error")?(console.error(N),this.showAlert(N.toString(),"error")):(console.log(N),this.showAlert(N.toString(),"info"))},this.socket=new r({...(e==null?void 0:e.socket)||(t==null?void 0:t.socket),name:this.adapterName,doNotLoadAllObjects:t==null?void 0:t.doNotLoadAllObjects,onProgress:N=>{N===Dt.CONNECTING?this.setState({connected:!1}):N===Dt.READY?this.setState({connected:!0}):this.setState({connected:!0})},onReady:()=>{p.setLanguage(this.socket.systemLang),this.socket.subscribeObject("system.config",this.onSystemConfigChanged).then(()=>this.getSystemConfig()).then(N=>(this._secret=typeof N<"u"&&N.native&&N.native.secret||"Zgfr56gFe87jJOM",this._systemConfig=(N==null?void 0:N.common)||{},this.socket.getObject(this.instanceId))).then(async N=>{var y,D;let u;const g=N,d=((y=await this.socket.getState(`${this.instanceId}.plugins.sentry.enabled`))==null?void 0:y.val)!==!1&&((D=this._systemConfig)==null?void 0:D.diag)!=="none"&&(g==null?void 0:g.common)&&g.common.name&&g.common.version&&!g.common.disableDataReporting&&window.location.host!=="localhost:3000";!this.sentryStarted&&this.sentryDSN&&d&&(this.sentryStarted=!0,ND({dsn:this.sentryDSN,release:`iobroker.${g.common.name}@${g.common.version}`,integrations:[R0()]}),console.log("Sentry initialized")),!this.sentryInited&&d&&(this.sentryInited=!0,u=this.socket.getObject("system.meta.uuid").then(z=>{z&&z.native&&z.native.uuid&&Yt().setUser({id:z.native.uuid})})),u=u instanceof Promise?u:Promise.resolve(),u.then(()=>{g?(this.common=g==null?void 0:g.common,this.onPrepareLoad(g.native,g.encryptedNative),this.savedNative=JSON.parse(JSON.stringify(g.native)),this.setState({native:g.native,loaded:!0,expertMode:this.getExpertMode()},()=>this.onConnectionReady&&this.onConnectionReady())):(console.warn("Cannot load instance settings"),this.setState({native:{},loaded:!0,expertMode:this.getExpertMode()},()=>this.onConnectionReady&&this.onConnectionReady()))})}).catch(N=>window.alert(`Cannot settings: ${N}`))},onError:N=>{console.error(N),this.showError(N)}})}static isWeb(){return window.socketUrl!==void 0}showAlert(e,t){t!=="error"&&t!=="warning"&&t!=="info"&&t!=="success"&&(t="info"),this.setState({_alert:!0,_alertType:t,_alertMessage:e})}renderAlertSnackbar(){return this.alertDialogRendered=!0,M.createElement(j.Snackbar,{style:this.state._alertType==="error"?{backgroundColor:"#f44336"}:this.state._alertType==="success"?{backgroundColor:"#4caf50"}:void 0,open:this.state._alert,autoHideDuration:6e3,onClose:(e,t)=>t!=="clickaway"&&this.setState({_alert:!1}),message:this.state._alertMessage})}onSystemConfigChanged=(e,t)=>{var r,s;t&&e==="system.config"&&(this.socket.systemLang!==(t==null?void 0:t.common.language)&&(this.socket.systemLang=(t==null?void 0:t.common.language)||"en",p.setLanguage(this.socket.systemLang)),((r=this._systemConfig)==null?void 0:r.expertMode)!==!!((s=t==null?void 0:t.common)!=null&&s.expertMode)?(this._systemConfig=(t==null?void 0:t.common)||{},this.setState({expertMode:this.getExpertMode()})):this._systemConfig=(t==null?void 0:t.common)||{})};componentDidMount(){window.addEventListener("resize",this.onResize,!0),window.addEventListener("message",this.onReceiveMessage,!1),super.componentDidMount()}componentWillUnmount(){window.removeEventListener("resize",this.onResize,!0),window.removeEventListener("message",this.onReceiveMessage,!1),window.iobOldAlert&&(window.alert=window.iobOldAlert,delete window.iobOldAlert),super.componentWillUnmount()}onReceiveMessage=e=>{if(e!=null&&e.data)if(e.data==="updateTheme"){const t=E.getThemeName();E.setThemeName(E.getThemeName());const r=this.createTheme(t);this.setState({theme:r,themeName:this.getThemeName(r),themeType:this.getThemeType(r)},()=>{this.props.onThemeChange&&this.props.onThemeChange(t),this.onThemeChanged&&this.onThemeChanged(t)})}else e.data==="updateExpertMode"?this.onToggleExpertMode&&this.onToggleExpertMode(this.getExpertMode()):e.data!=="chartReady"&&console.debug(`Received unknown message: "${JSON.stringify(e.data)}". May be it will be processed later`)};onResize=()=>{this.resizeTimer&&clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.resizeTimer=null,this.setState({width:di.getWidth()})},200)};static getWidth(){const e={xs:0,sm:600,md:960,lg:1280,xl:1920},t=window.innerWidth;return Object.keys(e).reverse().find(o=>t>=e[o])||"xs"}createTheme(e){return vL(E.getThemeName(e))}getThemeName(e){return e.name}getThemeType(e){return e.palette.mode}onThemeChanged(e){}onToggleExpertMode(e){}toggleTheme(e){const t=this.state.themeName;if(e=e||(t==="dark"||t==="blue"||t==="colored"?"light":"dark"),e!==t){E.setThemeName(e);const r=this.createTheme(e);this.setState({theme:r,themeName:this.getThemeName(r),themeType:this.getThemeType(r)},()=>{this.props.onThemeChange&&this.props.onThemeChange(e||"light"),this.onThemeChanged&&this.onThemeChanged(e||"light")})}}getSystemConfig(){return this.socket.getSystemConfig()}getExpertMode(){var e;return window.sessionStorage.getItem("App.expertMode")==="true"||!!((e=this._systemConfig)!=null&&e.expertMode)}onConnectionReady(){}encrypt(e){let t="";if(this._secret)for(let r=0;r<e.length;r++)t+=String.fromCharCode(this._secret[r%this._secret.length].charCodeAt(0)^e.charCodeAt(r));return t}decrypt(e){let t="";if(this._secret)for(let r=0;r<e.length;r++)t+=String.fromCharCode(this._secret[r%this._secret.length].charCodeAt(0)^e.charCodeAt(r));return t}onHashChanged(){const e=rs.getLocation();e.tab!==this.state.selectedTab&&this.selectTab(e.tab)}selectTab(e,t){(window._localStorage||window.localStorage).setItem(`${this.adapterName}-adapter`,e),this.setState({selectedTab:e,selectedTabNum:t})}onPrepareSave(e){var t;return(t=this.encryptedFields)==null||t.forEach(r=>{e[r]&&(e[r]=this.encrypt(e[r]))}),!0}onPrepareLoad(e,t){var r;(r=this.encryptedFields)==null||r.forEach(s=>{e[s]&&(e[s]=this.decrypt(e[s]))}),t==null||t.forEach(s=>{this.encryptedFields=this.encryptedFields||[],!this.encryptedFields.includes(s)&&this.encryptedFields.push(s),e[s]&&(e[s]=this.decrypt(e[s]))})}async getExtendableInstances(){try{const e=await this.socket.getObjectViewSystem("instance","system.adapter.","system.adapter.香");return Object.values(e).filter(t=>{var r;return!!((r=t==null?void 0:t.common)!=null&&r.webExtendable)})}catch{return[]}}async getIpAddresses(e){var o;const t=await this.socket.getHostByIp(e||((o=this.common)==null?void 0:o.host)||""),r=t.find(n=>n.address==="0.0.0.0");r&&(r.name=`[IPv4] 0.0.0.0 - ${p.t("ra_Listen on all IPs")}`);const s=t.find(n=>n.address==="::");return s&&(s.name=`[IPv4] :: - ${p.t("ra_Listen on all IPs")}`),t}onSave(e){let t;if(this.state.isConfigurationError){this.setState({errorText:this.state.isConfigurationError});return}this.socket.getObject(this.instanceId).then(r=>{t=r||{};for(const s in this.state.native)Object.prototype.hasOwnProperty.call(this.state.native,s)&&(this.state.native[s]===null?t.native[s]=null:this.state.native[s]!==void 0?t.native[s]=JSON.parse(JSON.stringify(this.state.native[s])):delete t.native[s]);if(this.state.common)for(const s in this.state.common)this.state.common[s]===null?t.common[s]=null:this.state.common[s]!==void 0?t.common[s]=JSON.parse(JSON.stringify(this.state.common[s])):delete t.common[s];return this.onPrepareSave(t.native)!==!1?this.socket.setObject(this.instanceId,t):Promise.reject(new Error("Invalid configuration"))}).then(()=>{this.savedNative=t.native,globalThis.changed=!1;try{window.parent.postMessage("nochange","*")}catch{}this.setState({changed:!1},()=>{e&&di.onClose()})}).catch(r=>console.error(`Cannot save configuration: ${r}`))}renderToast(){return this.state.toast?M.createElement(j.Snackbar,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:!0,autoHideDuration:6e3,onClose:()=>this.setState({toast:""}),ContentProps:{"aria-describedby":"message-id"},message:M.createElement("span",{id:"message-id"},this.state.toast),action:[M.createElement(j.IconButton,{key:"close","aria-label":"Close",color:"inherit",onClick:()=>this.setState({toast:""}),size:"large"},M.createElement(O.Close,null))]}):null}static onClose(){if(typeof window.parent<"u"&&window.parent)try{window.parent.$iframeDialog&&typeof window.parent.$iframeDialog.close=="function"?window.parent.$iframeDialog.close():window.parent.postMessage("close","*")}catch{window.parent.postMessage("close","*")}}renderError(){return this.state.errorText?M.createElement(q0,{text:this.state.errorText,onClose:()=>this.setState({errorText:""})}):null}getIsChanged(e){e=e||this.state.native;const t=JSON.stringify(e)!==JSON.stringify(this.savedNative);return globalThis.changed=t,t}onLoadConfig(e){JSON.stringify(e)!==JSON.stringify(this.state.native)&&this.setState({native:e,changed:this.getIsChanged(e)})}setConfigurationError(e){this.state.isConfigurationError!==e&&this.setState({isConfigurationError:e})}renderSaveCloseButtons(){return!this.state.confirmClose&&!this.state.bottomButtons?null:M.createElement(M.Fragment,null,this.state.bottomButtons?M.createElement(pD,{theme:this.state.theme,newReact:this.newReact,noTextOnButtons:this.state.width==="xs"||this.state.width==="sm"||this.state.width==="md",changed:this.state.changed,onSave:e=>this.onSave(e),onClose:()=>{this.state.changed?this.setState({confirmClose:!0}):di.onClose()},error:!!this.state.isConfigurationError}):null,this.state.confirmClose?M.createElement(K0,{title:p.t("ra_Please confirm"),text:p.t("ra_Some data are not stored. Discard?"),ok:p.t("ra_Discard"),cancel:p.t("ra_Cancel"),onClose:e=>this.setState({confirmClose:!1},()=>e&&di.onClose())}):null)}_updateNativeValue(e,t,r){typeof t!="object"&&(t=t.split("."));const s=t.shift()||"";if(!t.length)return r&&typeof r=="object"?JSON.stringify(e[s])!==JSON.stringify(r)?(e[s]=r,!0):!1:e[s]!==r?(e[s]=r,!0):!1;if(e[s]=e[s]||{},typeof e[s]!="object")throw new Error(`attribute ${s} is no object, but ${typeof e[s]}`);return this._updateNativeValue(e[s],t,r)}updateNativeValue(e,t,r){const s=JSON.parse(JSON.stringify(this.state.native));if(this._updateNativeValue(s,e,t)){const o=this.getIsChanged(s);if(o!==this.state.changed)try{window.parent.postMessage(o?"change":"nochange","*")}catch{}this.setState({native:s,changed:o},r)}}showError(e){this.setState({errorText:e})}showToast(e){this.setState({toast:e})}renderHelperDialogs(){return M.createElement(M.Fragment,null,this.renderError(),this.renderToast(),this.renderSaveCloseButtons(),this.renderAlertSnackbar())}render(){return this.state.loaded?M.createElement("div",{className:"App"},this.renderError(),this.renderToast(),this.renderSaveCloseButtons(),this.renderAlertSnackbar()):M.createElement(jD,{themeType:this.state.themeType})}}var it={},zs={},f4e=typeof ks=="object"&&ks&&ks.Object===Object&&ks,e4=f4e,x4e=e4,O4e=typeof self=="object"&&self&&self.Object===Object&&self,E4e=x4e||O4e||Function("return this")(),Ct=E4e,_4e=Ct,S4e=_4e.Symbol,ws=S4e,ju=ws,t4=Object.prototype,k4e=t4.hasOwnProperty,v4e=t4.toString,Pr=ju?ju.toStringTag:void 0;function b4e(i){var e=k4e.call(i,Pr),t=i[Pr];try{i[Pr]=void 0;var r=!0}catch{}var s=v4e.call(i);return r&&(e?i[Pr]=t:delete i[Pr]),s}var Y4e=b4e,Q4e=Object.prototype,U4e=Q4e.toString;function $4e(i){return U4e.call(i)}var P4e=$4e,du=ws,R4e=Y4e,W4e=P4e,B4e="[object Null]",F4e="[object Undefined]",yu=du?du.toStringTag:void 0;function J4e(i){return i==null?i===void 0?F4e:B4e:yu&&yu in Object(i)?R4e(i):W4e(i)}var Ei=J4e,G4e=Array.isArray,lt=G4e;function H4e(i){return i!=null&&typeof i=="object"}var Qt=H4e,V4e=Ei,Z4e=lt,X4e=Qt,K4e="[object String]";function q4e(i){return typeof i=="string"||!Z4e(i)&&X4e(i)&&V4e(i)==K4e}var ege=q4e;function tge(i){return function(e,t,r){for(var s=-1,o=Object(e),n=r(e),a=n.length;a--;){var c=n[i?a:++s];if(t(o[c],c,o)===!1)break}return e}}var ige=tge,rge=ige,sge=rge(),oge=sge;function nge(i,e){for(var t=-1,r=Array(i);++t<i;)r[t]=e(t);return r}var age=nge,Mge=Ei,cge=Qt,uge="[object Arguments]";function lge(i){return cge(i)&&Mge(i)==uge}var Nge=lge,Tu=Nge,gge=Qt,i4=Object.prototype,Lge=i4.hasOwnProperty,jge=i4.propertyIsEnumerable,dge=Tu(function(){return arguments}())?Tu:function(i){return gge(i)&&Lge.call(i,"callee")&&!jge.call(i,"callee")},r4=dge,Lo={exports:{}};function yge(){return!1}var Tge=yge;Lo.exports;(function(i,e){var t=Ct,r=Tge,s=e&&!e.nodeType&&e,o=s&&!0&&i&&!i.nodeType&&i,n=o&&o.exports===s,a=n?t.Buffer:void 0,c=a?a.isBuffer:void 0,l=c||r;i.exports=l})(Lo,Lo.exports);var dM=Lo.exports,Dge=9007199254740991,hge=/^(?:0|[1-9]\d*)$/;function pge(i,e){var t=typeof i;return e=e??Dge,!!e&&(t=="number"||t!="symbol"&&hge.test(i))&&i>-1&&i%1==0&&i<e}var s4=pge,zge=9007199254740991;function wge(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=zge}var yM=wge,Cge=Ei,Ige=yM,mge=Qt,Age="[object Arguments]",fge="[object Array]",xge="[object Boolean]",Oge="[object Date]",Ege="[object Error]",_ge="[object Function]",Sge="[object Map]",kge="[object Number]",vge="[object Object]",bge="[object RegExp]",Yge="[object Set]",Qge="[object String]",Uge="[object WeakMap]",$ge="[object ArrayBuffer]",Pge="[object DataView]",Rge="[object Float32Array]",Wge="[object Float64Array]",Bge="[object Int8Array]",Fge="[object Int16Array]",Jge="[object Int32Array]",Gge="[object Uint8Array]",Hge="[object Uint8ClampedArray]",Vge="[object Uint16Array]",Zge="[object Uint32Array]",le={};le[Rge]=le[Wge]=le[Bge]=le[Fge]=le[Jge]=le[Gge]=le[Hge]=le[Vge]=le[Zge]=!0;le[Age]=le[fge]=le[$ge]=le[xge]=le[Pge]=le[Oge]=le[Ege]=le[_ge]=le[Sge]=le[kge]=le[vge]=le[bge]=le[Yge]=le[Qge]=le[Uge]=!1;function Xge(i){return mge(i)&&Ige(i.length)&&!!le[Cge(i)]}var Kge=Xge;function qge(i){return function(e){return i(e)}}var TM=qge,jo={exports:{}};jo.exports;(function(i,e){var t=e4,r=e&&!e.nodeType&&e,s=r&&!0&&i&&!i.nodeType&&i,o=s&&s.exports===r,n=o&&t.process,a=function(){try{var c=s&&s.require&&s.require("util").types;return c||n&&n.binding&&n.binding("util")}catch{}}();i.exports=a})(jo,jo.exports);var DM=jo.exports,eLe=Kge,tLe=TM,Du=DM,hu=Du&&Du.isTypedArray,iLe=hu?tLe(hu):eLe,o4=iLe,rLe=age,sLe=r4,oLe=lt,nLe=dM,aLe=s4,MLe=o4,cLe=Object.prototype,uLe=cLe.hasOwnProperty;function lLe(i,e){var t=oLe(i),r=!t&&sLe(i),s=!t&&!r&&nLe(i),o=!t&&!r&&!s&&MLe(i),n=t||r||s||o,a=n?rLe(i.length,String):[],c=a.length;for(var l in i)(e||uLe.call(i,l))&&!(n&&(l=="length"||s&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||aLe(l,c)))&&a.push(l);return a}var n4=lLe,NLe=Object.prototype;function gLe(i){var e=i&&i.constructor,t=typeof e=="function"&&e.prototype||NLe;return i===t}var hM=gLe;function LLe(i,e){return function(t){return i(e(t))}}var a4=LLe,jLe=a4,dLe=jLe(Object.keys,Object),yLe=dLe,TLe=hM,DLe=yLe,hLe=Object.prototype,pLe=hLe.hasOwnProperty;function zLe(i){if(!TLe(i))return DLe(i);var e=[];for(var t in Object(i))pLe.call(i,t)&&t!="constructor"&&e.push(t);return e}var wLe=zLe;function CLe(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var zr=CLe,ILe=Ei,mLe=zr,ALe="[object AsyncFunction]",fLe="[object Function]",xLe="[object GeneratorFunction]",OLe="[object Proxy]";function ELe(i){if(!mLe(i))return!1;var e=ILe(i);return e==fLe||e==xLe||e==ALe||e==OLe}var M4=ELe,_Le=M4,SLe=yM;function kLe(i){return i!=null&&SLe(i.length)&&!_Le(i)}var Po=kLe,vLe=n4,bLe=wLe,YLe=Po;function QLe(i){return YLe(i)?vLe(i):bLe(i)}var Cs=QLe,ULe=oge,$Le=Cs;function PLe(i,e){return i&&ULe(i,e,$Le)}var c4=PLe;function RLe(i){return i}var u4=RLe,WLe=u4;function BLe(i){return typeof i=="function"?i:WLe}var FLe=BLe,JLe=c4,GLe=FLe;function HLe(i,e){return i&&JLe(i,GLe(e))}var pM=HLe,VLe=a4,ZLe=VLe(Object.getPrototypeOf,Object),zM=ZLe,XLe=Ei,KLe=zM,qLe=Qt,eje="[object Object]",tje=Function.prototype,ije=Object.prototype,l4=tje.toString,rje=ije.hasOwnProperty,sje=l4.call(Object);function oje(i){if(!qLe(i)||XLe(i)!=eje)return!1;var e=KLe(i);if(e===null)return!0;var t=rje.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&l4.call(t)==sje}var nje=oje;function aje(i,e){for(var t=-1,r=i==null?0:i.length,s=Array(r);++t<r;)s[t]=e(i[t],t,i);return s}var N4=aje;function Mje(){this.__data__=[],this.size=0}var cje=Mje;function uje(i,e){return i===e||i!==i&&e!==e}var wM=uje,lje=wM;function Nje(i,e){for(var t=i.length;t--;)if(lje(i[t][0],e))return t;return-1}var Ro=Nje,gje=Ro,Lje=Array.prototype,jje=Lje.splice;function dje(i){var e=this.__data__,t=gje(e,i);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():jje.call(e,t,1),--this.size,!0}var yje=dje,Tje=Ro;function Dje(i){var e=this.__data__,t=Tje(e,i);return t<0?void 0:e[t][1]}var hje=Dje,pje=Ro;function zje(i){return pje(this.__data__,i)>-1}var wje=zje,Cje=Ro;function Ije(i,e){var t=this.__data__,r=Cje(t,i);return r<0?(++this.size,t.push([i,e])):t[r][1]=e,this}var mje=Ije,Aje=cje,fje=yje,xje=hje,Oje=wje,Eje=mje;function wr(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}wr.prototype.clear=Aje;wr.prototype.delete=fje;wr.prototype.get=xje;wr.prototype.has=Oje;wr.prototype.set=Eje;var Wo=wr,_je=Wo;function Sje(){this.__data__=new _je,this.size=0}var kje=Sje;function vje(i){var e=this.__data__,t=e.delete(i);return this.size=e.size,t}var bje=vje;function Yje(i){return this.__data__.get(i)}var Qje=Yje;function Uje(i){return this.__data__.has(i)}var $je=Uje,Pje=Ct,Rje=Pje["__core-js_shared__"],Wje=Rje,An=Wje,pu=function(){var i=/[^.]+$/.exec(An&&An.keys&&An.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function Bje(i){return!!pu&&pu in i}var Fje=Bje,Jje=Function.prototype,Gje=Jje.toString;function Hje(i){if(i!=null){try{return Gje.call(i)}catch{}try{return i+""}catch{}}return""}var g4=Hje,Vje=M4,Zje=Fje,Xje=zr,Kje=g4,qje=/[\\^$.*+?()[\]{}|]/g,ede=/^\[object .+?Constructor\]$/,tde=Function.prototype,ide=Object.prototype,rde=tde.toString,sde=ide.hasOwnProperty,ode=RegExp("^"+rde.call(sde).replace(qje,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nde(i){if(!Xje(i)||Zje(i))return!1;var e=Vje(i)?ode:ede;return e.test(Kje(i))}var ade=nde;function Mde(i,e){return i==null?void 0:i[e]}var cde=Mde,ude=ade,lde=cde;function Nde(i,e){var t=lde(i,e);return ude(t)?t:void 0}var _i=Nde,gde=_i,Lde=Ct,jde=gde(Lde,"Map"),CM=jde,dde=_i,yde=dde(Object,"create"),Bo=yde,zu=Bo;function Tde(){this.__data__=zu?zu(null):{},this.size=0}var Dde=Tde;function hde(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e}var pde=hde,zde=Bo,wde="__lodash_hash_undefined__",Cde=Object.prototype,Ide=Cde.hasOwnProperty;function mde(i){var e=this.__data__;if(zde){var t=e[i];return t===wde?void 0:t}return Ide.call(e,i)?e[i]:void 0}var Ade=mde,fde=Bo,xde=Object.prototype,Ode=xde.hasOwnProperty;function Ede(i){var e=this.__data__;return fde?e[i]!==void 0:Ode.call(e,i)}var _de=Ede,Sde=Bo,kde="__lodash_hash_undefined__";function vde(i,e){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=Sde&&e===void 0?kde:e,this}var bde=vde,Yde=Dde,Qde=pde,Ude=Ade,$de=_de,Pde=bde;function Cr(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}Cr.prototype.clear=Yde;Cr.prototype.delete=Qde;Cr.prototype.get=Ude;Cr.prototype.has=$de;Cr.prototype.set=Pde;var Rde=Cr,wu=Rde,Wde=Wo,Bde=CM;function Fde(){this.size=0,this.__data__={hash:new wu,map:new(Bde||Wde),string:new wu}}var Jde=Fde;function Gde(i){var e=typeof i;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?i!=="__proto__":i===null}var Hde=Gde,Vde=Hde;function Zde(i,e){var t=i.__data__;return Vde(e)?t[typeof e=="string"?"string":"hash"]:t.map}var Fo=Zde,Xde=Fo;function Kde(i){var e=Xde(this,i).delete(i);return this.size-=e?1:0,e}var qde=Kde,eye=Fo;function tye(i){return eye(this,i).get(i)}var iye=tye,rye=Fo;function sye(i){return rye(this,i).has(i)}var oye=sye,nye=Fo;function aye(i,e){var t=nye(this,i),r=t.size;return t.set(i,e),this.size+=t.size==r?0:1,this}var Mye=aye,cye=Jde,uye=qde,lye=iye,Nye=oye,gye=Mye;function Ir(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}Ir.prototype.clear=cye;Ir.prototype.delete=uye;Ir.prototype.get=lye;Ir.prototype.has=Nye;Ir.prototype.set=gye;var IM=Ir,Lye=Wo,jye=CM,dye=IM,yye=200;function Tye(i,e){var t=this.__data__;if(t instanceof Lye){var r=t.__data__;if(!jye||r.length<yye-1)return r.push([i,e]),this.size=++t.size,this;t=this.__data__=new dye(r)}return t.set(i,e),this.size=t.size,this}var Dye=Tye,hye=Wo,pye=kje,zye=bje,wye=Qje,Cye=$je,Iye=Dye;function mr(i){var e=this.__data__=new hye(i);this.size=e.size}mr.prototype.clear=pye;mr.prototype.delete=zye;mr.prototype.get=wye;mr.prototype.has=Cye;mr.prototype.set=Iye;var mM=mr,mye="__lodash_hash_undefined__";function Aye(i){return this.__data__.set(i,mye),this}var fye=Aye;function xye(i){return this.__data__.has(i)}var Oye=xye,Eye=IM,_ye=fye,Sye=Oye;function yo(i){var e=-1,t=i==null?0:i.length;for(this.__data__=new Eye;++e<t;)this.add(i[e])}yo.prototype.add=yo.prototype.push=_ye;yo.prototype.has=Sye;var kye=yo;function vye(i,e){for(var t=-1,r=i==null?0:i.length;++t<r;)if(e(i[t],t,i))return!0;return!1}var bye=vye;function Yye(i,e){return i.has(e)}var Qye=Yye,Uye=kye,$ye=bye,Pye=Qye,Rye=1,Wye=2;function Bye(i,e,t,r,s,o){var n=t&Rye,a=i.length,c=e.length;if(a!=c&&!(n&&c>a))return!1;var l=o.get(i),N=o.get(e);if(l&&N)return l==e&&N==i;var u=-1,g=!0,L=t&Wye?new Uye:void 0;for(o.set(i,e),o.set(e,i);++u<a;){var d=i[u],y=e[u];if(r)var D=n?r(y,d,u,e,i,o):r(d,y,u,i,e,o);if(D!==void 0){if(D)continue;g=!1;break}if(L){if(!$ye(e,function(z,A){if(!Pye(L,A)&&(d===z||s(d,z,t,r,o)))return L.push(A)})){g=!1;break}}else if(!(d===y||s(d,y,t,r,o))){g=!1;break}}return o.delete(i),o.delete(e),g}var L4=Bye,Fye=Ct,Jye=Fye.Uint8Array,j4=Jye;function Gye(i){var e=-1,t=Array(i.size);return i.forEach(function(r,s){t[++e]=[s,r]}),t}var Hye=Gye;function Vye(i){var e=-1,t=Array(i.size);return i.forEach(function(r){t[++e]=r}),t}var Zye=Vye,Cu=ws,Iu=j4,Xye=wM,Kye=L4,qye=Hye,eTe=Zye,tTe=1,iTe=2,rTe="[object Boolean]",sTe="[object Date]",oTe="[object Error]",nTe="[object Map]",aTe="[object Number]",MTe="[object RegExp]",cTe="[object Set]",uTe="[object String]",lTe="[object Symbol]",NTe="[object ArrayBuffer]",gTe="[object DataView]",mu=Cu?Cu.prototype:void 0,fn=mu?mu.valueOf:void 0;function LTe(i,e,t,r,s,o,n){switch(t){case gTe:if(i.byteLength!=e.byteLength||i.byteOffset!=e.byteOffset)return!1;i=i.buffer,e=e.buffer;case NTe:return!(i.byteLength!=e.byteLength||!o(new Iu(i),new Iu(e)));case rTe:case sTe:case aTe:return Xye(+i,+e);case oTe:return i.name==e.name&&i.message==e.message;case MTe:case uTe:return i==e+"";case nTe:var a=qye;case cTe:var c=r&tTe;if(a||(a=eTe),i.size!=e.size&&!c)return!1;var l=n.get(i);if(l)return l==e;r|=iTe,n.set(i,e);var N=Kye(a(i),a(e),r,s,o,n);return n.delete(i),N;case lTe:if(fn)return fn.call(i)==fn.call(e)}return!1}var jTe=LTe;function dTe(i,e){for(var t=-1,r=e.length,s=i.length;++t<r;)i[s+t]=e[t];return i}var d4=dTe,yTe=d4,TTe=lt;function DTe(i,e,t){var r=e(i);return TTe(i)?r:yTe(r,t(i))}var y4=DTe;function hTe(i,e){for(var t=-1,r=i==null?0:i.length,s=0,o=[];++t<r;){var n=i[t];e(n,t,i)&&(o[s++]=n)}return o}var pTe=hTe;function zTe(){return[]}var T4=zTe,wTe=pTe,CTe=T4,ITe=Object.prototype,mTe=ITe.propertyIsEnumerable,Au=Object.getOwnPropertySymbols,ATe=Au?function(i){return i==null?[]:(i=Object(i),wTe(Au(i),function(e){return mTe.call(i,e)}))}:CTe,AM=ATe,fTe=y4,xTe=AM,OTe=Cs;function ETe(i){return fTe(i,OTe,xTe)}var D4=ETe,fu=D4,_Te=1,STe=Object.prototype,kTe=STe.hasOwnProperty;function vTe(i,e,t,r,s,o){var n=t&_Te,a=fu(i),c=a.length,l=fu(e),N=l.length;if(c!=N&&!n)return!1;for(var u=c;u--;){var g=a[u];if(!(n?g in e:kTe.call(e,g)))return!1}var L=o.get(i),d=o.get(e);if(L&&d)return L==e&&d==i;var y=!0;o.set(i,e),o.set(e,i);for(var D=n;++u<c;){g=a[u];var z=i[g],A=e[g];if(r)var C=n?r(A,z,g,e,i,o):r(z,A,g,i,e,o);if(!(C===void 0?z===A||s(z,A,t,r,o):C)){y=!1;break}D||(D=g=="constructor")}if(y&&!D){var f=i.constructor,m=e.constructor;f!=m&&"constructor"in i&&"constructor"in e&&!(typeof f=="function"&&f instanceof f&&typeof m=="function"&&m instanceof m)&&(y=!1)}return o.delete(i),o.delete(e),y}var bTe=vTe,YTe=_i,QTe=Ct,UTe=YTe(QTe,"DataView"),$Te=UTe,PTe=_i,RTe=Ct,WTe=PTe(RTe,"Promise"),BTe=WTe,FTe=_i,JTe=Ct,GTe=FTe(JTe,"Set"),HTe=GTe,VTe=_i,ZTe=Ct,XTe=VTe(ZTe,"WeakMap"),KTe=XTe,ja=$Te,da=CM,ya=BTe,Ta=HTe,Da=KTe,h4=Ei,Ar=g4,xu="[object Map]",qTe="[object Object]",Ou="[object Promise]",Eu="[object Set]",_u="[object WeakMap]",Su="[object DataView]",eDe=Ar(ja),tDe=Ar(da),iDe=Ar(ya),rDe=Ar(Ta),sDe=Ar(Da),yi=h4;(ja&&yi(new ja(new ArrayBuffer(1)))!=Su||da&&yi(new da)!=xu||ya&&yi(ya.resolve())!=Ou||Ta&&yi(new Ta)!=Eu||Da&&yi(new Da)!=_u)&&(yi=function(i){var e=h4(i),t=e==qTe?i.constructor:void 0,r=t?Ar(t):"";if(r)switch(r){case eDe:return Su;case tDe:return xu;case iDe:return Ou;case rDe:return Eu;case sDe:return _u}return e});var Jo=yi,xn=mM,oDe=L4,nDe=jTe,aDe=bTe,ku=Jo,vu=lt,bu=dM,MDe=o4,cDe=1,Yu="[object Arguments]",Qu="[object Array]",Rs="[object Object]",uDe=Object.prototype,Uu=uDe.hasOwnProperty;function lDe(i,e,t,r,s,o){var n=vu(i),a=vu(e),c=n?Qu:ku(i),l=a?Qu:ku(e);c=c==Yu?Rs:c,l=l==Yu?Rs:l;var N=c==Rs,u=l==Rs,g=c==l;if(g&&bu(i)){if(!bu(e))return!1;n=!0,N=!1}if(g&&!N)return o||(o=new xn),n||MDe(i)?oDe(i,e,t,r,s,o):nDe(i,e,c,t,r,s,o);if(!(t&cDe)){var L=N&&Uu.call(i,"__wrapped__"),d=u&&Uu.call(e,"__wrapped__");if(L||d){var y=L?i.value():i,D=d?e.value():e;return o||(o=new xn),s(y,D,t,r,o)}}return g?(o||(o=new xn),aDe(i,e,t,r,s,o)):!1}var NDe=lDe,gDe=NDe,$u=Qt;function p4(i,e,t,r,s){return i===e?!0:i==null||e==null||!$u(i)&&!$u(e)?i!==i&&e!==e:gDe(i,e,t,r,p4,s)}var z4=p4,LDe=mM,jDe=z4,dDe=1,yDe=2;function TDe(i,e,t,r){var s=t.length,o=s,n=!r;if(i==null)return!o;for(i=Object(i);s--;){var a=t[s];if(n&&a[2]?a[1]!==i[a[0]]:!(a[0]in i))return!1}for(;++s<o;){a=t[s];var c=a[0],l=i[c],N=a[1];if(n&&a[2]){if(l===void 0&&!(c in i))return!1}else{var u=new LDe;if(r)var g=r(l,N,c,i,e,u);if(!(g===void 0?jDe(N,l,dDe|yDe,r,u):g))return!1}}return!0}var DDe=TDe,hDe=zr;function pDe(i){return i===i&&!hDe(i)}var w4=pDe,zDe=w4,wDe=Cs;function CDe(i){for(var e=wDe(i),t=e.length;t--;){var r=e[t],s=i[r];e[t]=[r,s,zDe(s)]}return e}var IDe=CDe;function mDe(i,e){return function(t){return t==null?!1:t[i]===e&&(e!==void 0||i in Object(t))}}var C4=mDe,ADe=DDe,fDe=IDe,xDe=C4;function ODe(i){var e=fDe(i);return e.length==1&&e[0][2]?xDe(e[0][0],e[0][1]):function(t){return t===i||ADe(t,i,e)}}var EDe=ODe,_De=Ei,SDe=Qt,kDe="[object Symbol]";function vDe(i){return typeof i=="symbol"||SDe(i)&&_De(i)==kDe}var fM=vDe,bDe=lt,YDe=fM,QDe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,UDe=/^\w*$/;function $De(i,e){if(bDe(i))return!1;var t=typeof i;return t=="number"||t=="symbol"||t=="boolean"||i==null||YDe(i)?!0:UDe.test(i)||!QDe.test(i)||e!=null&&i in Object(e)}var xM=$De,I4=IM,PDe="Expected a function";function OM(i,e){if(typeof i!="function"||e!=null&&typeof e!="function")throw new TypeError(PDe);var t=function(){var r=arguments,s=e?e.apply(this,r):r[0],o=t.cache;if(o.has(s))return o.get(s);var n=i.apply(this,r);return t.cache=o.set(s,n)||o,n};return t.cache=new(OM.Cache||I4),t}OM.Cache=I4;var RDe=OM,WDe=RDe,BDe=500;function FDe(i){var e=WDe(i,function(r){return t.size===BDe&&t.clear(),r}),t=e.cache;return e}var JDe=FDe,GDe=JDe,HDe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,VDe=/\\(\\)?/g,ZDe=GDe(function(i){var e=[];return i.charCodeAt(0)===46&&e.push(""),i.replace(HDe,function(t,r,s,o){e.push(s?o.replace(VDe,"$1"):r||t)}),e}),XDe=ZDe,Pu=ws,KDe=N4,qDe=lt,ehe=fM,Ru=Pu?Pu.prototype:void 0,Wu=Ru?Ru.toString:void 0;function m4(i){if(typeof i=="string")return i;if(qDe(i))return KDe(i,m4)+"";if(ehe(i))return Wu?Wu.call(i):"";var e=i+"";return e=="0"&&1/i==-1/0?"-0":e}var the=m4,ihe=the;function rhe(i){return i==null?"":ihe(i)}var she=rhe,ohe=lt,nhe=xM,ahe=XDe,Mhe=she;function che(i,e){return ohe(i)?i:nhe(i,e)?[i]:ahe(Mhe(i))}var A4=che,uhe=fM;function lhe(i){if(typeof i=="string"||uhe(i))return i;var e=i+"";return e=="0"&&1/i==-1/0?"-0":e}var Go=lhe,Nhe=A4,ghe=Go;function Lhe(i,e){e=Nhe(e,i);for(var t=0,r=e.length;i!=null&&t<r;)i=i[ghe(e[t++])];return t&&t==r?i:void 0}var f4=Lhe,jhe=f4;function dhe(i,e,t){var r=i==null?void 0:jhe(i,e);return r===void 0?t:r}var yhe=dhe;function The(i,e){return i!=null&&e in Object(i)}var Dhe=The,hhe=A4,phe=r4,zhe=lt,whe=s4,Che=yM,Ihe=Go;function mhe(i,e,t){e=hhe(e,i);for(var r=-1,s=e.length,o=!1;++r<s;){var n=Ihe(e[r]);if(!(o=i!=null&&t(i,n)))break;i=i[n]}return o||++r!=s?o:(s=i==null?0:i.length,!!s&&Che(s)&&whe(n,s)&&(zhe(i)||phe(i)))}var Ahe=mhe,fhe=Dhe,xhe=Ahe;function Ohe(i,e){return i!=null&&xhe(i,e,fhe)}var Ehe=Ohe,_he=z4,She=yhe,khe=Ehe,vhe=xM,bhe=w4,Yhe=C4,Qhe=Go,Uhe=1,$he=2;function Phe(i,e){return vhe(i)&&bhe(e)?Yhe(Qhe(i),e):function(t){var r=She(t,i);return r===void 0&&r===e?khe(t,i):_he(e,r,Uhe|$he)}}var Rhe=Phe;function Whe(i){return function(e){return e==null?void 0:e[i]}}var Bhe=Whe,Fhe=f4;function Jhe(i){return function(e){return Fhe(e,i)}}var Ghe=Jhe,Hhe=Bhe,Vhe=Ghe,Zhe=xM,Xhe=Go;function Khe(i){return Zhe(i)?Hhe(Xhe(i)):Vhe(i)}var qhe=Khe,epe=EDe,tpe=Rhe,ipe=u4,rpe=lt,spe=qhe;function ope(i){return typeof i=="function"?i:i==null?ipe:typeof i=="object"?rpe(i)?tpe(i[0],i[1]):epe(i):spe(i)}var npe=ope,ape=Po;function Mpe(i,e){return function(t,r){if(t==null)return t;if(!ape(t))return i(t,r);for(var s=t.length,o=e?s:-1,n=Object(t);(e?o--:++o<s)&&r(n[o],o,n)!==!1;);return t}}var cpe=Mpe,upe=c4,lpe=cpe,Npe=lpe(upe),gpe=Npe,Lpe=gpe,jpe=Po;function dpe(i,e){var t=-1,r=jpe(i)?Array(i.length):[];return Lpe(i,function(s,o,n){r[++t]=e(s,o,n)}),r}var ype=dpe,Tpe=N4,Dpe=npe,hpe=ype,ppe=lt;function zpe(i,e){var t=ppe(i)?Tpe:hpe;return t(i,Dpe(e))}var wpe=zpe;Object.defineProperty(zs,"__esModule",{value:!0});zs.flattenNames=void 0;var Cpe=ege,Ipe=Ho(Cpe),mpe=pM,Ape=Ho(mpe),fpe=nje,xpe=Ho(fpe),Ope=wpe,Epe=Ho(Ope);function Ho(i){return i&&i.__esModule?i:{default:i}}var _pe=zs.flattenNames=function i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[];return(0,Epe.default)(e,function(r){Array.isArray(r)?i(r).map(function(s){return t.push(s)}):(0,xpe.default)(r)?(0,Ape.default)(r,function(s,o){s===!0&&t.push(o),t.push(o+"-"+s)}):(0,Ipe.default)(r)&&t.push(r)}),t};zs.default=_pe;var Is={};function Spe(i,e){for(var t=-1,r=i==null?0:i.length;++t<r&&e(i[t],t,i)!==!1;);return i}var kpe=Spe,vpe=_i,bpe=function(){try{var i=vpe(Object,"defineProperty");return i({},"",{}),i}catch{}}(),Ype=bpe,Bu=Ype;function Qpe(i,e,t){e=="__proto__"&&Bu?Bu(i,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):i[e]=t}var x4=Qpe,Upe=x4,$pe=wM,Ppe=Object.prototype,Rpe=Ppe.hasOwnProperty;function Wpe(i,e,t){var r=i[e];(!(Rpe.call(i,e)&&$pe(r,t))||t===void 0&&!(e in i))&&Upe(i,e,t)}var O4=Wpe,Bpe=O4,Fpe=x4;function Jpe(i,e,t,r){var s=!t;t||(t={});for(var o=-1,n=e.length;++o<n;){var a=e[o],c=r?r(t[a],i[a],a,t,i):void 0;c===void 0&&(c=i[a]),s?Fpe(t,a,c):Bpe(t,a,c)}return t}var Vo=Jpe,Gpe=Vo,Hpe=Cs;function Vpe(i,e){return i&&Gpe(e,Hpe(e),i)}var Zpe=Vpe;function Xpe(i){var e=[];if(i!=null)for(var t in Object(i))e.push(t);return e}var Kpe=Xpe,qpe=zr,eze=hM,tze=Kpe,ize=Object.prototype,rze=ize.hasOwnProperty;function sze(i){if(!qpe(i))return tze(i);var e=eze(i),t=[];for(var r in i)r=="constructor"&&(e||!rze.call(i,r))||t.push(r);return t}var oze=sze,nze=n4,aze=oze,Mze=Po;function cze(i){return Mze(i)?nze(i,!0):aze(i)}var EM=cze,uze=Vo,lze=EM;function Nze(i,e){return i&&uze(e,lze(e),i)}var gze=Nze,To={exports:{}};To.exports;(function(i,e){var t=Ct,r=e&&!e.nodeType&&e,s=r&&!0&&i&&!i.nodeType&&i,o=s&&s.exports===r,n=o?t.Buffer:void 0,a=n?n.allocUnsafe:void 0;function c(l,N){if(N)return l.slice();var u=l.length,g=a?a(u):new l.constructor(u);return l.copy(g),g}i.exports=c})(To,To.exports);var Lze=To.exports;function jze(i,e){var t=-1,r=i.length;for(e||(e=Array(r));++t<r;)e[t]=i[t];return e}var dze=jze,yze=Vo,Tze=AM;function Dze(i,e){return yze(i,Tze(i),e)}var hze=Dze,pze=d4,zze=zM,wze=AM,Cze=T4,Ize=Object.getOwnPropertySymbols,mze=Ize?function(i){for(var e=[];i;)pze(e,wze(i)),i=zze(i);return e}:Cze,E4=mze,Aze=Vo,fze=E4;function xze(i,e){return Aze(i,fze(i),e)}var Oze=xze,Eze=y4,_ze=E4,Sze=EM;function kze(i){return Eze(i,Sze,_ze)}var vze=kze,bze=Object.prototype,Yze=bze.hasOwnProperty;function Qze(i){var e=i.length,t=new i.constructor(e);return e&&typeof i[0]=="string"&&Yze.call(i,"index")&&(t.index=i.index,t.input=i.input),t}var Uze=Qze,Fu=j4;function $ze(i){var e=new i.constructor(i.byteLength);return new Fu(e).set(new Fu(i)),e}var _M=$ze,Pze=_M;function Rze(i,e){var t=e?Pze(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.byteLength)}var Wze=Rze,Bze=/\w*$/;function Fze(i){var e=new i.constructor(i.source,Bze.exec(i));return e.lastIndex=i.lastIndex,e}var Jze=Fze,Ju=ws,Gu=Ju?Ju.prototype:void 0,Hu=Gu?Gu.valueOf:void 0;function Gze(i){return Hu?Object(Hu.call(i)):{}}var Hze=Gze,Vze=_M;function Zze(i,e){var t=e?Vze(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)}var Xze=Zze,Kze=_M,qze=Wze,ewe=Jze,twe=Hze,iwe=Xze,rwe="[object Boolean]",swe="[object Date]",owe="[object Map]",nwe="[object Number]",awe="[object RegExp]",Mwe="[object Set]",cwe="[object String]",uwe="[object Symbol]",lwe="[object ArrayBuffer]",Nwe="[object DataView]",gwe="[object Float32Array]",Lwe="[object Float64Array]",jwe="[object Int8Array]",dwe="[object Int16Array]",ywe="[object Int32Array]",Twe="[object Uint8Array]",Dwe="[object Uint8ClampedArray]",hwe="[object Uint16Array]",pwe="[object Uint32Array]";function zwe(i,e,t){var r=i.constructor;switch(e){case lwe:return Kze(i);case rwe:case swe:return new r(+i);case Nwe:return qze(i,t);case gwe:case Lwe:case jwe:case dwe:case ywe:case Twe:case Dwe:case hwe:case pwe:return iwe(i,t);case owe:return new r;case nwe:case cwe:return new r(i);case awe:return ewe(i);case Mwe:return new r;case uwe:return twe(i)}}var wwe=zwe,Cwe=zr,Vu=Object.create,Iwe=function(){function i(){}return function(e){if(!Cwe(e))return{};if(Vu)return Vu(e);i.prototype=e;var t=new i;return i.prototype=void 0,t}}(),mwe=Iwe,Awe=mwe,fwe=zM,xwe=hM;function Owe(i){return typeof i.constructor=="function"&&!xwe(i)?Awe(fwe(i)):{}}var Ewe=Owe,_we=Jo,Swe=Qt,kwe="[object Map]";function vwe(i){return Swe(i)&&_we(i)==kwe}var bwe=vwe,Ywe=bwe,Qwe=TM,Zu=DM,Xu=Zu&&Zu.isMap,Uwe=Xu?Qwe(Xu):Ywe,$we=Uwe,Pwe=Jo,Rwe=Qt,Wwe="[object Set]";function Bwe(i){return Rwe(i)&&Pwe(i)==Wwe}var Fwe=Bwe,Jwe=Fwe,Gwe=TM,Ku=DM,qu=Ku&&Ku.isSet,Hwe=qu?Gwe(qu):Jwe,Vwe=Hwe,Zwe=mM,Xwe=kpe,Kwe=O4,qwe=Zpe,eCe=gze,tCe=Lze,iCe=dze,rCe=hze,sCe=Oze,oCe=D4,nCe=vze,aCe=Jo,MCe=Uze,cCe=wwe,uCe=Ewe,lCe=lt,NCe=dM,gCe=$we,LCe=zr,jCe=Vwe,dCe=Cs,yCe=EM,TCe=1,DCe=2,hCe=4,_4="[object Arguments]",pCe="[object Array]",zCe="[object Boolean]",wCe="[object Date]",CCe="[object Error]",S4="[object Function]",ICe="[object GeneratorFunction]",mCe="[object Map]",ACe="[object Number]",k4="[object Object]",fCe="[object RegExp]",xCe="[object Set]",OCe="[object String]",ECe="[object Symbol]",_Ce="[object WeakMap]",SCe="[object ArrayBuffer]",kCe="[object DataView]",vCe="[object Float32Array]",bCe="[object Float64Array]",YCe="[object Int8Array]",QCe="[object Int16Array]",UCe="[object Int32Array]",$Ce="[object Uint8Array]",PCe="[object Uint8ClampedArray]",RCe="[object Uint16Array]",WCe="[object Uint32Array]",ue={};ue[_4]=ue[pCe]=ue[SCe]=ue[kCe]=ue[zCe]=ue[wCe]=ue[vCe]=ue[bCe]=ue[YCe]=ue[QCe]=ue[UCe]=ue[mCe]=ue[ACe]=ue[k4]=ue[fCe]=ue[xCe]=ue[OCe]=ue[ECe]=ue[$Ce]=ue[PCe]=ue[RCe]=ue[WCe]=!0;ue[CCe]=ue[S4]=ue[_Ce]=!1;function no(i,e,t,r,s,o){var n,a=e&TCe,c=e&DCe,l=e&hCe;if(t&&(n=s?t(i,r,s,o):t(i)),n!==void 0)return n;if(!LCe(i))return i;var N=lCe(i);if(N){if(n=MCe(i),!a)return iCe(i,n)}else{var u=aCe(i),g=u==S4||u==ICe;if(NCe(i))return tCe(i,a);if(u==k4||u==_4||g&&!s){if(n=c||g?{}:uCe(i),!a)return c?sCe(i,eCe(n,i)):rCe(i,qwe(n,i))}else{if(!ue[u])return s?i:{};n=cCe(i,u,a)}}o||(o=new Zwe);var L=o.get(i);if(L)return L;o.set(i,n),jCe(i)?i.forEach(function(D){n.add(no(D,e,t,D,i,o))}):gCe(i)&&i.forEach(function(D,z){n.set(z,no(D,e,t,z,i,o))});var d=l?c?nCe:oCe:c?yCe:dCe,y=N?void 0:d(i);return Xwe(y||i,function(D,z){y&&(z=D,D=i[z]),Kwe(n,z,no(D,e,t,z,i,o))}),n}var BCe=no,FCe=BCe,JCe=1,GCe=4;function HCe(i){return FCe(i,JCe|GCe)}var VCe=HCe;Object.defineProperty(Is,"__esModule",{value:!0});Is.mergeClasses=void 0;var ZCe=pM,XCe=v4(ZCe),KCe=VCe,qCe=v4(KCe),eIe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i};function v4(i){return i&&i.__esModule?i:{default:i}}var tIe=Is.mergeClasses=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.default&&(0,qCe.default)(e.default)||{};return t.map(function(s){var o=e[s];return o&&(0,XCe.default)(o,function(n,a){r[a]||(r[a]={}),r[a]=eIe({},r[a],o[a])}),s}),r};Is.default=tIe;var ms={};Object.defineProperty(ms,"__esModule",{value:!0});ms.autoprefix=void 0;var iIe=pM,el=sIe(iIe),rIe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i};function sIe(i){return i&&i.__esModule?i:{default:i}}var oIe={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var r=t[e];return r||{extend:e}}},nIe=ms.autoprefix=function(e){var t={};return(0,el.default)(e,function(r,s){var o={};(0,el.default)(r,function(n,a){var c=oIe[a];c?o=rIe({},o,c(n)):o[a]=n}),t[s]=o}),t};ms.default=nIe;var As={};Object.defineProperty(As,"__esModule",{value:!0});As.hover=void 0;var aIe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},MIe=_,On=cIe(MIe);function cIe(i){return i&&i.__esModule?i:{default:i}}function uIe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function tl(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function lIe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var NIe=As.hover=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){lIe(s,r);function s(){var o,n,a,c;uIe(this,s);for(var l=arguments.length,N=Array(l),u=0;u<l;u++)N[u]=arguments[u];return c=(n=(a=tl(this,(o=s.__proto__||Object.getPrototypeOf(s)).call.apply(o,[this].concat(N))),a),a.state={hover:!1},a.handleMouseOver=function(){return a.setState({hover:!0})},a.handleMouseOut=function(){return a.setState({hover:!1})},a.render=function(){return On.default.createElement(t,{onMouseOver:a.handleMouseOver,onMouseOut:a.handleMouseOut},On.default.createElement(e,aIe({},a.props,a.state)))},n),tl(a,c)}return s}(On.default.Component)};As.default=NIe;var fs={};Object.defineProperty(fs,"__esModule",{value:!0});fs.active=void 0;var gIe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},LIe=_,En=jIe(LIe);function jIe(i){return i&&i.__esModule?i:{default:i}}function dIe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function il(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function yIe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var TIe=fs.active=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){yIe(s,r);function s(){var o,n,a,c;dIe(this,s);for(var l=arguments.length,N=Array(l),u=0;u<l;u++)N[u]=arguments[u];return c=(n=(a=il(this,(o=s.__proto__||Object.getPrototypeOf(s)).call.apply(o,[this].concat(N))),a),a.state={active:!1},a.handleMouseDown=function(){return a.setState({active:!0})},a.handleMouseUp=function(){return a.setState({active:!1})},a.render=function(){return En.default.createElement(t,{onMouseDown:a.handleMouseDown,onMouseUp:a.handleMouseUp},En.default.createElement(e,gIe({},a.props,a.state)))},n),il(a,c)}return s}(En.default.Component)};fs.default=TIe;var SM={};Object.defineProperty(SM,"__esModule",{value:!0});var DIe=function(e,t){var r={},s=function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[n]=a};return e===0&&s("first-child"),e===t-1&&s("last-child"),(e===0||e%2===0)&&s("even"),Math.abs(e%2)===1&&s("odd"),s("nth-child",e),r};SM.default=DIe;Object.defineProperty(it,"__esModule",{value:!0});it.ReactCSS=it.loop=it.handleActive=kM=it.handleHover=it.hover=void 0;var hIe=zs,pIe=fr(hIe),zIe=Is,wIe=fr(zIe),CIe=ms,IIe=fr(CIe),mIe=As,b4=fr(mIe),AIe=fs,fIe=fr(AIe),xIe=SM,OIe=fr(xIe);function fr(i){return i&&i.__esModule?i:{default:i}}it.hover=b4.default;var kM=it.handleHover=b4.default;it.handleActive=fIe.default;it.loop=OIe.default;var EIe=it.ReactCSS=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];var o=(0,pIe.default)(r),n=(0,wIe.default)(e,o);return(0,IIe.default)(n)},K=it.default=EIe,_Ie=function(e,t,r,s,o){var n=o.clientWidth,a=o.clientHeight,c=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,N=c-(o.getBoundingClientRect().left+window.pageXOffset),u=l-(o.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var g=void 0;if(u<0?g=0:u>a?g=1:g=Math.round(u*100/a)/100,t.a!==g)return{h:t.h,s:t.s,l:t.l,a:g,source:"rgb"}}else{var L=void 0;if(N<0?L=0:N>n?L=1:L=Math.round(N*100/n)/100,s!==L)return{h:t.h,s:t.s,l:t.l,a:L,source:"rgb"}}return null},_n={},SIe=function(e,t,r,s){if(typeof document>"u"&&!s)return null;var o=s?new s:document.createElement("canvas");o.width=r*2,o.height=r*2;var n=o.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,o.width,o.height),n.fillStyle=t,n.fillRect(0,0,r,r),n.translate(r,r),n.fillRect(0,0,r,r),o.toDataURL()):null},kIe=function(e,t,r,s){var o=e+"-"+t+"-"+r+(s?"-server":"");if(_n[o])return _n[o];var n=SIe(e,t,r,s);return _n[o]=n,n},rl=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},xr=function(e){var t=e.white,r=e.grey,s=e.size,o=e.renderers,n=e.borderRadius,a=e.boxShadow,c=e.children,l=K({default:{grid:{borderRadius:n,boxShadow:a,absolute:"0px 0px 0px 0px",background:"url("+kIe(t,r,s,o.canvas)+") center left"}}});return _.isValidElement(c)?M.cloneElement(c,rl({},c.props,{style:rl({},c.props.style,l.grid)})):M.createElement("div",{style:l.grid})};xr.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var vIe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},bIe=function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();function YIe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function sl(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function QIe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var vM=function(i){QIe(e,i);function e(){var t,r,s,o;YIe(this,e);for(var n=arguments.length,a=Array(n),c=0;c<n;c++)a[c]=arguments[c];return o=(r=(s=sl(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a))),s),s.handleChange=function(l){var N=_Ie(l,s.props.hsl,s.props.direction,s.props.a,s.container);N&&typeof s.props.onChange=="function"&&s.props.onChange(N,l)},s.handleMouseDown=function(l){s.handleChange(l),window.addEventListener("mousemove",s.handleChange),window.addEventListener("mouseup",s.handleMouseUp)},s.handleMouseUp=function(){s.unbindEventListeners()},s.unbindEventListeners=function(){window.removeEventListener("mousemove",s.handleChange),window.removeEventListener("mouseup",s.handleMouseUp)},r),sl(s,o)}return bIe(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,s=this.props.rgb,o=K({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+s.r+","+s.g+","+s.b+`, 0) 0%,
298
+ `;function A4e(){try{return window.self!==window.top}catch{return!0}}class di extends rs{socket;isIFrame=A4e();instance;adapterName;instanceId;newReact;encryptedFields;sentryDSN;alertDialogRendered;_secret;_systemConfig;savedNative;common=null;sentryStarted=!1;sentryInited=!1;resizeTimer=null;constructor(e,t){const r=e.Connection||(t==null?void 0:t.Connection)||Oe;if(!window.document.getElementById("generic-app-iobroker-component")){const N=window.document.createElement("style");N.setAttribute("id","generic-app-iobroker-component"),N.innerHTML=m4e,window.document.head.appendChild(N)}if(!di.isWeb()&&window.io&&window.location.port==="3000")try{const N=new window.SocketClient;delete window.io,window.io=N}catch{}super(e),gD();const s=(window.location.search||"").replace(/^\?/,"").replace(/#.*$/,""),o={};s.trim().split("&").filter(N=>N.trim()).forEach(N=>{const u=N.split("=");o[u[0]]=u.length===2?u[1]:!0,o[u[0]]==="true"?o[u[0]]=!0:o[u[0]]==="false"&&(o[u[0]]=!1)}),this.instance=(t==null?void 0:t.instance)??e.instance??(o.instance!==void 0?parseInt(o.instance,10)||0:parseInt(window.location.search.slice(1),10)||0);const n=window.location.pathname.split("/");this.adapterName=(t==null?void 0:t.adapterName)||e.adapterName||window.adapterName||n[n.length-2]||"iot",this.instanceId=`system.adapter.${this.adapterName}.${this.instance}`,this.newReact=o.newReact===!0;const a=rs.getLocation();a.tab=a.tab||(window._localStorage||window.localStorage).getItem(`${this.adapterName}-adapter`)||"";const c=this.createTheme();this.state=Object.assign(this.state||{},{selectedTab:(window._localStorage||window.localStorage).getItem(`${this.adapterName}-adapter`)||"",selectedTabNum:-1,native:{},errorText:"",changed:!1,connected:!1,loaded:!1,isConfigurationError:"",expertMode:!1,toast:"",theme:c,themeName:this.getThemeName(c),themeType:this.getThemeType(c),bottomButtons:(t&&t.bottomButtons)===!1?!1:(e==null?void 0:e.bottomButtons)!==!1,width:di.getWidth(),confirmClose:!1,_alert:!1,_alertType:"info",_alertMessage:""});const l=I4e;t!=null&&t.translations?Object.keys(t.translations).forEach(N=>{t.translations&&(l[N]=Object.assign(l[N],t.translations[N]||{}))}):e.translations&&Object.keys(e.translations).forEach(N=>{e.translations&&(l[N]=Object.assign(l[N],e.translations[N]||{}))}),p.setTranslations(l),this.savedNative={},this.encryptedFields=e.encryptedFields||(t==null?void 0:t.encryptedFields)||[],this.sentryDSN=t&&t.sentryDSN||e.sentryDSN,window.socketUrl&&(window.socketUrl.startsWith(":")?window.socketUrl=`${window.location.protocol}//${window.location.hostname}${window.socketUrl}`:!window.socketUrl.startsWith("http://")&&!window.socketUrl.startsWith("https://")&&(window.socketUrl=`${window.location.protocol}//${window.socketUrl}`)),this.alertDialogRendered=!1,window.iobOldAlert||(window.iobOldAlert=window.alert),window.alert=N=>{if(!this.alertDialogRendered){window.iobOldAlert(N);return}N!=null&&N.toString().toLowerCase().includes("error")?(console.error(N),this.showAlert(N.toString(),"error")):(console.log(N),this.showAlert(N.toString(),"info"))},this.socket=new r({...(e==null?void 0:e.socket)||(t==null?void 0:t.socket),name:this.adapterName,doNotLoadAllObjects:t==null?void 0:t.doNotLoadAllObjects,onProgress:N=>{N===Dt.CONNECTING?this.setState({connected:!1}):N===Dt.READY?this.setState({connected:!0}):this.setState({connected:!0})},onReady:()=>{p.setLanguage(this.socket.systemLang),this.socket.subscribeObject("system.config",this.onSystemConfigChanged).then(()=>this.getSystemConfig()).then(N=>(this._secret=typeof N<"u"&&N.native&&N.native.secret||"Zgfr56gFe87jJOM",this._systemConfig=(N==null?void 0:N.common)||{},this.socket.getObject(this.instanceId))).then(async N=>{var y,D;let u;const g=N,d=((y=await this.socket.getState(`${this.instanceId}.plugins.sentry.enabled`))==null?void 0:y.val)!==!1&&((D=this._systemConfig)==null?void 0:D.diag)!=="none"&&(g==null?void 0:g.common)&&g.common.name&&g.common.version&&!g.common.disableDataReporting&&window.location.host!=="localhost:3000";!this.sentryStarted&&this.sentryDSN&&d&&(this.sentryStarted=!0,ND({dsn:this.sentryDSN,release:`iobroker.${g.common.name}@${g.common.version}`,integrations:[R0()]}),console.log("Sentry initialized")),!this.sentryInited&&d&&(this.sentryInited=!0,u=this.socket.getObject("system.meta.uuid").then(z=>{z&&z.native&&z.native.uuid&&Yt().setUser({id:z.native.uuid})})),u=u instanceof Promise?u:Promise.resolve(),u.then(()=>{g?(this.common=g==null?void 0:g.common,this.onPrepareLoad(g.native,g.encryptedNative),this.savedNative=JSON.parse(JSON.stringify(g.native)),this.setState({native:g.native,loaded:!0,expertMode:this.getExpertMode()},()=>this.onConnectionReady&&this.onConnectionReady())):(console.warn("Cannot load instance settings"),this.setState({native:{},loaded:!0,expertMode:this.getExpertMode()},()=>this.onConnectionReady&&this.onConnectionReady()))})}).catch(N=>window.alert(`Cannot settings: ${N}`))},onError:N=>{console.error(N),this.showError(N)}})}static isWeb(){return window.socketUrl!==void 0}showAlert(e,t){t!=="error"&&t!=="warning"&&t!=="info"&&t!=="success"&&(t="info"),this.setState({_alert:!0,_alertType:t,_alertMessage:e})}renderAlertSnackbar(){return this.alertDialogRendered=!0,M.createElement(j.Snackbar,{style:this.state._alertType==="error"?{backgroundColor:"#f44336"}:this.state._alertType==="success"?{backgroundColor:"#4caf50"}:void 0,open:this.state._alert,autoHideDuration:6e3,onClose:(e,t)=>t!=="clickaway"&&this.setState({_alert:!1}),message:this.state._alertMessage})}onSystemConfigChanged=(e,t)=>{var r,s;t&&e==="system.config"&&(this.socket.systemLang!==(t==null?void 0:t.common.language)&&(this.socket.systemLang=(t==null?void 0:t.common.language)||"en",p.setLanguage(this.socket.systemLang)),((r=this._systemConfig)==null?void 0:r.expertMode)!==!!((s=t==null?void 0:t.common)!=null&&s.expertMode)?(this._systemConfig=(t==null?void 0:t.common)||{},this.setState({expertMode:this.getExpertMode()})):this._systemConfig=(t==null?void 0:t.common)||{})};componentDidMount(){window.addEventListener("resize",this.onResize,!0),window.addEventListener("message",this.onReceiveMessage,!1),super.componentDidMount()}componentWillUnmount(){window.removeEventListener("resize",this.onResize,!0),window.removeEventListener("message",this.onReceiveMessage,!1),window.iobOldAlert&&(window.alert=window.iobOldAlert,delete window.iobOldAlert),super.componentWillUnmount()}onReceiveMessage=e=>{if(e!=null&&e.data)if(e.data==="updateTheme"){const t=E.getThemeName();E.setThemeName(E.getThemeName());const r=this.createTheme(t);this.setState({theme:r,themeName:this.getThemeName(r),themeType:this.getThemeType(r)},()=>{this.props.onThemeChange&&this.props.onThemeChange(t),this.onThemeChanged&&this.onThemeChanged(t)})}else e.data==="updateExpertMode"?this.onToggleExpertMode&&this.onToggleExpertMode(this.getExpertMode()):e.data!=="chartReady"&&console.debug(`Received unknown message: "${JSON.stringify(e.data)}". May be it will be processed later`)};onResize=()=>{this.resizeTimer&&clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.resizeTimer=null,this.setState({width:di.getWidth()})},200)};static getWidth(){const e={xs:0,sm:600,md:960,lg:1280,xl:1920},t=window.innerWidth;return Object.keys(e).reverse().find(o=>t>=e[o])||"xs"}createTheme(e){return vL(E.getThemeName(e))}getThemeName(e){return e.name}getThemeType(e){return e.palette.mode}onThemeChanged(e){}onToggleExpertMode(e){}toggleTheme(e){const t=this.state.themeName;if(e=e||(t==="dark"||t==="blue"||t==="colored"?"light":"dark"),e!==t){E.setThemeName(e);const r=this.createTheme(e);this.setState({theme:r,themeName:this.getThemeName(r),themeType:this.getThemeType(r)},()=>{this.props.onThemeChange&&this.props.onThemeChange(e||"light"),this.onThemeChanged&&this.onThemeChanged(e||"light")})}}getSystemConfig(){return this.socket.getSystemConfig()}getExpertMode(){var e;return window.sessionStorage.getItem("App.expertMode")==="true"||!!((e=this._systemConfig)!=null&&e.expertMode)}onConnectionReady(){}encrypt(e){let t="";if(this._secret)for(let r=0;r<e.length;r++)t+=String.fromCharCode(this._secret[r%this._secret.length].charCodeAt(0)^e.charCodeAt(r));return t}decrypt(e){let t="";if(this._secret)for(let r=0;r<e.length;r++)t+=String.fromCharCode(this._secret[r%this._secret.length].charCodeAt(0)^e.charCodeAt(r));return t}onHashChanged(){const e=rs.getLocation();e.tab!==this.state.selectedTab&&this.selectTab(e.tab)}selectTab(e,t){(window._localStorage||window.localStorage).setItem(`${this.adapterName}-adapter`,e),this.setState({selectedTab:e,selectedTabNum:t})}onPrepareSave(e){var t;return(t=this.encryptedFields)==null||t.forEach(r=>{e[r]&&(e[r]=this.encrypt(e[r]))}),!0}onPrepareLoad(e,t){var r;(r=this.encryptedFields)==null||r.forEach(s=>{e[s]&&(e[s]=this.decrypt(e[s]))}),t==null||t.forEach(s=>{this.encryptedFields=this.encryptedFields||[],!this.encryptedFields.includes(s)&&this.encryptedFields.push(s),e[s]&&(e[s]=this.decrypt(e[s]))})}async getExtendableInstances(){try{const e=await this.socket.getObjectViewSystem("instance","system.adapter.","system.adapter.香");return Object.values(e).filter(t=>{var r;return!!((r=t==null?void 0:t.common)!=null&&r.webExtendable)})}catch{return[]}}async getIpAddresses(e){var o;const t=await this.socket.getHostByIp(e||((o=this.common)==null?void 0:o.host)||""),r=t.find(n=>n.address==="0.0.0.0");r&&(r.name=`[IPv4] 0.0.0.0 - ${p.t("ra_Listen on all IPs")}`);const s=t.find(n=>n.address==="::");return s&&(s.name=`[IPv4] :: - ${p.t("ra_Listen on all IPs")}`),t}onSave(e){let t;if(this.state.isConfigurationError){this.setState({errorText:this.state.isConfigurationError});return}this.socket.getObject(this.instanceId).then(r=>{t=r||{};for(const s in this.state.native)Object.prototype.hasOwnProperty.call(this.state.native,s)&&(this.state.native[s]===null?t.native[s]=null:this.state.native[s]!==void 0?t.native[s]=JSON.parse(JSON.stringify(this.state.native[s])):delete t.native[s]);if(this.state.common)for(const s in this.state.common)this.state.common[s]===null?t.common[s]=null:this.state.common[s]!==void 0?t.common[s]=JSON.parse(JSON.stringify(this.state.common[s])):delete t.common[s];return this.onPrepareSave(t.native)!==!1?this.socket.setObject(this.instanceId,t):Promise.reject(new Error("Invalid configuration"))}).then(()=>{this.savedNative=t.native,globalThis.changed=!1;try{window.parent.postMessage("nochange","*")}catch{}this.setState({changed:!1},()=>{e&&di.onClose()})}).catch(r=>console.error(`Cannot save configuration: ${r}`))}renderToast(){return this.state.toast?M.createElement(j.Snackbar,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:!0,autoHideDuration:6e3,onClose:()=>this.setState({toast:""}),ContentProps:{"aria-describedby":"message-id"},message:M.createElement("span",{id:"message-id"},this.state.toast),action:[M.createElement(j.IconButton,{key:"close","aria-label":"Close",color:"inherit",onClick:()=>this.setState({toast:""}),size:"large"},M.createElement(O.Close,null))]}):null}static onClose(){if(typeof window.parent<"u"&&window.parent)try{window.parent.$iframeDialog&&typeof window.parent.$iframeDialog.close=="function"?window.parent.$iframeDialog.close():window.parent.postMessage("close","*")}catch{window.parent.postMessage("close","*")}}renderError(){return this.state.errorText?M.createElement(q0,{text:this.state.errorText,onClose:()=>this.setState({errorText:""})}):null}getIsChanged(e){e=e||this.state.native;const t=JSON.stringify(e)!==JSON.stringify(this.savedNative);return globalThis.changed=t,t}onLoadConfig(e){JSON.stringify(e)!==JSON.stringify(this.state.native)&&this.setState({native:e,changed:this.getIsChanged(e)})}setConfigurationError(e){this.state.isConfigurationError!==e&&this.setState({isConfigurationError:e})}renderSaveCloseButtons(){return!this.state.confirmClose&&!this.state.bottomButtons?null:M.createElement(M.Fragment,null,this.state.bottomButtons?M.createElement(pD,{theme:this.state.theme,newReact:this.newReact,noTextOnButtons:this.state.width==="xs"||this.state.width==="sm"||this.state.width==="md",changed:this.state.changed,onSave:e=>this.onSave(e),onClose:()=>{this.state.changed?this.setState({confirmClose:!0}):di.onClose()},error:!!this.state.isConfigurationError}):null,this.state.confirmClose?M.createElement(K0,{title:p.t("ra_Please confirm"),text:p.t("ra_Some data are not stored. Discard?"),ok:p.t("ra_Discard"),cancel:p.t("ra_Cancel"),onClose:e=>this.setState({confirmClose:!1},()=>e&&di.onClose())}):null)}_updateNativeValue(e,t,r){typeof t!="object"&&(t=t.split("."));const s=t.shift()||"";if(!t.length)return r&&typeof r=="object"?JSON.stringify(e[s])!==JSON.stringify(r)?(e[s]=r,!0):!1:e[s]!==r?(e[s]=r,!0):!1;if(e[s]=e[s]||{},typeof e[s]!="object")throw new Error(`attribute ${s} is no object, but ${typeof e[s]}`);return this._updateNativeValue(e[s],t,r)}updateNativeValue(e,t,r){const s=JSON.parse(JSON.stringify(this.state.native));if(this._updateNativeValue(s,e,t)){const o=this.getIsChanged(s);if(o!==this.state.changed)try{window.parent.postMessage(o?"change":"nochange","*")}catch{}this.setState({native:s,changed:o},r)}}showError(e){this.setState({errorText:e})}showToast(e){this.setState({toast:e})}renderHelperDialogs(){return M.createElement(M.Fragment,null,this.renderError(),this.renderToast(),this.renderSaveCloseButtons(),this.renderAlertSnackbar())}render(){return this.state.loaded?M.createElement("div",{className:"App"},this.renderError(),this.renderToast(),this.renderSaveCloseButtons(),this.renderAlertSnackbar()):M.createElement(jD,{themeType:this.state.themeType})}}var it={},zs={},f4e=typeof ks=="object"&&ks&&ks.Object===Object&&ks,e4=f4e,x4e=e4,O4e=typeof self=="object"&&self&&self.Object===Object&&self,E4e=x4e||O4e||Function("return this")(),Ct=E4e,_4e=Ct,S4e=_4e.Symbol,ws=S4e,ju=ws,t4=Object.prototype,k4e=t4.hasOwnProperty,v4e=t4.toString,Pr=ju?ju.toStringTag:void 0;function b4e(i){var e=k4e.call(i,Pr),t=i[Pr];try{i[Pr]=void 0;var r=!0}catch{}var s=v4e.call(i);return r&&(e?i[Pr]=t:delete i[Pr]),s}var Y4e=b4e,Q4e=Object.prototype,U4e=Q4e.toString;function $4e(i){return U4e.call(i)}var P4e=$4e,du=ws,R4e=Y4e,W4e=P4e,B4e="[object Null]",F4e="[object Undefined]",yu=du?du.toStringTag:void 0;function J4e(i){return i==null?i===void 0?F4e:B4e:yu&&yu in Object(i)?R4e(i):W4e(i)}var Ei=J4e,G4e=Array.isArray,lt=G4e;function H4e(i){return i!=null&&typeof i=="object"}var Qt=H4e,V4e=Ei,Z4e=lt,X4e=Qt,K4e="[object String]";function q4e(i){return typeof i=="string"||!Z4e(i)&&X4e(i)&&V4e(i)==K4e}var ege=q4e;function tge(i){return function(e,t,r){for(var s=-1,o=Object(e),n=r(e),a=n.length;a--;){var c=n[i?a:++s];if(t(o[c],c,o)===!1)break}return e}}var ige=tge,rge=ige,sge=rge(),oge=sge;function nge(i,e){for(var t=-1,r=Array(i);++t<i;)r[t]=e(t);return r}var age=nge,Mge=Ei,cge=Qt,uge="[object Arguments]";function lge(i){return cge(i)&&Mge(i)==uge}var Nge=lge,Tu=Nge,gge=Qt,i4=Object.prototype,Lge=i4.hasOwnProperty,jge=i4.propertyIsEnumerable,dge=Tu((function(){return arguments})())?Tu:function(i){return gge(i)&&Lge.call(i,"callee")&&!jge.call(i,"callee")},r4=dge,Lo={exports:{}};function yge(){return!1}var Tge=yge;Lo.exports;(function(i,e){var t=Ct,r=Tge,s=e&&!e.nodeType&&e,o=s&&!0&&i&&!i.nodeType&&i,n=o&&o.exports===s,a=n?t.Buffer:void 0,c=a?a.isBuffer:void 0,l=c||r;i.exports=l})(Lo,Lo.exports);var dM=Lo.exports,Dge=9007199254740991,hge=/^(?:0|[1-9]\d*)$/;function pge(i,e){var t=typeof i;return e=e??Dge,!!e&&(t=="number"||t!="symbol"&&hge.test(i))&&i>-1&&i%1==0&&i<e}var s4=pge,zge=9007199254740991;function wge(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=zge}var yM=wge,Cge=Ei,Ige=yM,mge=Qt,Age="[object Arguments]",fge="[object Array]",xge="[object Boolean]",Oge="[object Date]",Ege="[object Error]",_ge="[object Function]",Sge="[object Map]",kge="[object Number]",vge="[object Object]",bge="[object RegExp]",Yge="[object Set]",Qge="[object String]",Uge="[object WeakMap]",$ge="[object ArrayBuffer]",Pge="[object DataView]",Rge="[object Float32Array]",Wge="[object Float64Array]",Bge="[object Int8Array]",Fge="[object Int16Array]",Jge="[object Int32Array]",Gge="[object Uint8Array]",Hge="[object Uint8ClampedArray]",Vge="[object Uint16Array]",Zge="[object Uint32Array]",le={};le[Rge]=le[Wge]=le[Bge]=le[Fge]=le[Jge]=le[Gge]=le[Hge]=le[Vge]=le[Zge]=!0;le[Age]=le[fge]=le[$ge]=le[xge]=le[Pge]=le[Oge]=le[Ege]=le[_ge]=le[Sge]=le[kge]=le[vge]=le[bge]=le[Yge]=le[Qge]=le[Uge]=!1;function Xge(i){return mge(i)&&Ige(i.length)&&!!le[Cge(i)]}var Kge=Xge;function qge(i){return function(e){return i(e)}}var TM=qge,jo={exports:{}};jo.exports;(function(i,e){var t=e4,r=e&&!e.nodeType&&e,s=r&&!0&&i&&!i.nodeType&&i,o=s&&s.exports===r,n=o&&t.process,a=(function(){try{var c=s&&s.require&&s.require("util").types;return c||n&&n.binding&&n.binding("util")}catch{}})();i.exports=a})(jo,jo.exports);var DM=jo.exports,eLe=Kge,tLe=TM,Du=DM,hu=Du&&Du.isTypedArray,iLe=hu?tLe(hu):eLe,o4=iLe,rLe=age,sLe=r4,oLe=lt,nLe=dM,aLe=s4,MLe=o4,cLe=Object.prototype,uLe=cLe.hasOwnProperty;function lLe(i,e){var t=oLe(i),r=!t&&sLe(i),s=!t&&!r&&nLe(i),o=!t&&!r&&!s&&MLe(i),n=t||r||s||o,a=n?rLe(i.length,String):[],c=a.length;for(var l in i)(e||uLe.call(i,l))&&!(n&&(l=="length"||s&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||aLe(l,c)))&&a.push(l);return a}var n4=lLe,NLe=Object.prototype;function gLe(i){var e=i&&i.constructor,t=typeof e=="function"&&e.prototype||NLe;return i===t}var hM=gLe;function LLe(i,e){return function(t){return i(e(t))}}var a4=LLe,jLe=a4,dLe=jLe(Object.keys,Object),yLe=dLe,TLe=hM,DLe=yLe,hLe=Object.prototype,pLe=hLe.hasOwnProperty;function zLe(i){if(!TLe(i))return DLe(i);var e=[];for(var t in Object(i))pLe.call(i,t)&&t!="constructor"&&e.push(t);return e}var wLe=zLe;function CLe(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var zr=CLe,ILe=Ei,mLe=zr,ALe="[object AsyncFunction]",fLe="[object Function]",xLe="[object GeneratorFunction]",OLe="[object Proxy]";function ELe(i){if(!mLe(i))return!1;var e=ILe(i);return e==fLe||e==xLe||e==ALe||e==OLe}var M4=ELe,_Le=M4,SLe=yM;function kLe(i){return i!=null&&SLe(i.length)&&!_Le(i)}var Po=kLe,vLe=n4,bLe=wLe,YLe=Po;function QLe(i){return YLe(i)?vLe(i):bLe(i)}var Cs=QLe,ULe=oge,$Le=Cs;function PLe(i,e){return i&&ULe(i,e,$Le)}var c4=PLe;function RLe(i){return i}var u4=RLe,WLe=u4;function BLe(i){return typeof i=="function"?i:WLe}var FLe=BLe,JLe=c4,GLe=FLe;function HLe(i,e){return i&&JLe(i,GLe(e))}var pM=HLe,VLe=a4,ZLe=VLe(Object.getPrototypeOf,Object),zM=ZLe,XLe=Ei,KLe=zM,qLe=Qt,eje="[object Object]",tje=Function.prototype,ije=Object.prototype,l4=tje.toString,rje=ije.hasOwnProperty,sje=l4.call(Object);function oje(i){if(!qLe(i)||XLe(i)!=eje)return!1;var e=KLe(i);if(e===null)return!0;var t=rje.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&l4.call(t)==sje}var nje=oje;function aje(i,e){for(var t=-1,r=i==null?0:i.length,s=Array(r);++t<r;)s[t]=e(i[t],t,i);return s}var N4=aje;function Mje(){this.__data__=[],this.size=0}var cje=Mje;function uje(i,e){return i===e||i!==i&&e!==e}var wM=uje,lje=wM;function Nje(i,e){for(var t=i.length;t--;)if(lje(i[t][0],e))return t;return-1}var Ro=Nje,gje=Ro,Lje=Array.prototype,jje=Lje.splice;function dje(i){var e=this.__data__,t=gje(e,i);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():jje.call(e,t,1),--this.size,!0}var yje=dje,Tje=Ro;function Dje(i){var e=this.__data__,t=Tje(e,i);return t<0?void 0:e[t][1]}var hje=Dje,pje=Ro;function zje(i){return pje(this.__data__,i)>-1}var wje=zje,Cje=Ro;function Ije(i,e){var t=this.__data__,r=Cje(t,i);return r<0?(++this.size,t.push([i,e])):t[r][1]=e,this}var mje=Ije,Aje=cje,fje=yje,xje=hje,Oje=wje,Eje=mje;function wr(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}wr.prototype.clear=Aje;wr.prototype.delete=fje;wr.prototype.get=xje;wr.prototype.has=Oje;wr.prototype.set=Eje;var Wo=wr,_je=Wo;function Sje(){this.__data__=new _je,this.size=0}var kje=Sje;function vje(i){var e=this.__data__,t=e.delete(i);return this.size=e.size,t}var bje=vje;function Yje(i){return this.__data__.get(i)}var Qje=Yje;function Uje(i){return this.__data__.has(i)}var $je=Uje,Pje=Ct,Rje=Pje["__core-js_shared__"],Wje=Rje,An=Wje,pu=(function(){var i=/[^.]+$/.exec(An&&An.keys&&An.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function Bje(i){return!!pu&&pu in i}var Fje=Bje,Jje=Function.prototype,Gje=Jje.toString;function Hje(i){if(i!=null){try{return Gje.call(i)}catch{}try{return i+""}catch{}}return""}var g4=Hje,Vje=M4,Zje=Fje,Xje=zr,Kje=g4,qje=/[\\^$.*+?()[\]{}|]/g,ede=/^\[object .+?Constructor\]$/,tde=Function.prototype,ide=Object.prototype,rde=tde.toString,sde=ide.hasOwnProperty,ode=RegExp("^"+rde.call(sde).replace(qje,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nde(i){if(!Xje(i)||Zje(i))return!1;var e=Vje(i)?ode:ede;return e.test(Kje(i))}var ade=nde;function Mde(i,e){return i==null?void 0:i[e]}var cde=Mde,ude=ade,lde=cde;function Nde(i,e){var t=lde(i,e);return ude(t)?t:void 0}var _i=Nde,gde=_i,Lde=Ct,jde=gde(Lde,"Map"),CM=jde,dde=_i,yde=dde(Object,"create"),Bo=yde,zu=Bo;function Tde(){this.__data__=zu?zu(null):{},this.size=0}var Dde=Tde;function hde(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e}var pde=hde,zde=Bo,wde="__lodash_hash_undefined__",Cde=Object.prototype,Ide=Cde.hasOwnProperty;function mde(i){var e=this.__data__;if(zde){var t=e[i];return t===wde?void 0:t}return Ide.call(e,i)?e[i]:void 0}var Ade=mde,fde=Bo,xde=Object.prototype,Ode=xde.hasOwnProperty;function Ede(i){var e=this.__data__;return fde?e[i]!==void 0:Ode.call(e,i)}var _de=Ede,Sde=Bo,kde="__lodash_hash_undefined__";function vde(i,e){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=Sde&&e===void 0?kde:e,this}var bde=vde,Yde=Dde,Qde=pde,Ude=Ade,$de=_de,Pde=bde;function Cr(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}Cr.prototype.clear=Yde;Cr.prototype.delete=Qde;Cr.prototype.get=Ude;Cr.prototype.has=$de;Cr.prototype.set=Pde;var Rde=Cr,wu=Rde,Wde=Wo,Bde=CM;function Fde(){this.size=0,this.__data__={hash:new wu,map:new(Bde||Wde),string:new wu}}var Jde=Fde;function Gde(i){var e=typeof i;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?i!=="__proto__":i===null}var Hde=Gde,Vde=Hde;function Zde(i,e){var t=i.__data__;return Vde(e)?t[typeof e=="string"?"string":"hash"]:t.map}var Fo=Zde,Xde=Fo;function Kde(i){var e=Xde(this,i).delete(i);return this.size-=e?1:0,e}var qde=Kde,eye=Fo;function tye(i){return eye(this,i).get(i)}var iye=tye,rye=Fo;function sye(i){return rye(this,i).has(i)}var oye=sye,nye=Fo;function aye(i,e){var t=nye(this,i),r=t.size;return t.set(i,e),this.size+=t.size==r?0:1,this}var Mye=aye,cye=Jde,uye=qde,lye=iye,Nye=oye,gye=Mye;function Ir(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}Ir.prototype.clear=cye;Ir.prototype.delete=uye;Ir.prototype.get=lye;Ir.prototype.has=Nye;Ir.prototype.set=gye;var IM=Ir,Lye=Wo,jye=CM,dye=IM,yye=200;function Tye(i,e){var t=this.__data__;if(t instanceof Lye){var r=t.__data__;if(!jye||r.length<yye-1)return r.push([i,e]),this.size=++t.size,this;t=this.__data__=new dye(r)}return t.set(i,e),this.size=t.size,this}var Dye=Tye,hye=Wo,pye=kje,zye=bje,wye=Qje,Cye=$je,Iye=Dye;function mr(i){var e=this.__data__=new hye(i);this.size=e.size}mr.prototype.clear=pye;mr.prototype.delete=zye;mr.prototype.get=wye;mr.prototype.has=Cye;mr.prototype.set=Iye;var mM=mr,mye="__lodash_hash_undefined__";function Aye(i){return this.__data__.set(i,mye),this}var fye=Aye;function xye(i){return this.__data__.has(i)}var Oye=xye,Eye=IM,_ye=fye,Sye=Oye;function yo(i){var e=-1,t=i==null?0:i.length;for(this.__data__=new Eye;++e<t;)this.add(i[e])}yo.prototype.add=yo.prototype.push=_ye;yo.prototype.has=Sye;var kye=yo;function vye(i,e){for(var t=-1,r=i==null?0:i.length;++t<r;)if(e(i[t],t,i))return!0;return!1}var bye=vye;function Yye(i,e){return i.has(e)}var Qye=Yye,Uye=kye,$ye=bye,Pye=Qye,Rye=1,Wye=2;function Bye(i,e,t,r,s,o){var n=t&Rye,a=i.length,c=e.length;if(a!=c&&!(n&&c>a))return!1;var l=o.get(i),N=o.get(e);if(l&&N)return l==e&&N==i;var u=-1,g=!0,L=t&Wye?new Uye:void 0;for(o.set(i,e),o.set(e,i);++u<a;){var d=i[u],y=e[u];if(r)var D=n?r(y,d,u,e,i,o):r(d,y,u,i,e,o);if(D!==void 0){if(D)continue;g=!1;break}if(L){if(!$ye(e,function(z,A){if(!Pye(L,A)&&(d===z||s(d,z,t,r,o)))return L.push(A)})){g=!1;break}}else if(!(d===y||s(d,y,t,r,o))){g=!1;break}}return o.delete(i),o.delete(e),g}var L4=Bye,Fye=Ct,Jye=Fye.Uint8Array,j4=Jye;function Gye(i){var e=-1,t=Array(i.size);return i.forEach(function(r,s){t[++e]=[s,r]}),t}var Hye=Gye;function Vye(i){var e=-1,t=Array(i.size);return i.forEach(function(r){t[++e]=r}),t}var Zye=Vye,Cu=ws,Iu=j4,Xye=wM,Kye=L4,qye=Hye,eTe=Zye,tTe=1,iTe=2,rTe="[object Boolean]",sTe="[object Date]",oTe="[object Error]",nTe="[object Map]",aTe="[object Number]",MTe="[object RegExp]",cTe="[object Set]",uTe="[object String]",lTe="[object Symbol]",NTe="[object ArrayBuffer]",gTe="[object DataView]",mu=Cu?Cu.prototype:void 0,fn=mu?mu.valueOf:void 0;function LTe(i,e,t,r,s,o,n){switch(t){case gTe:if(i.byteLength!=e.byteLength||i.byteOffset!=e.byteOffset)return!1;i=i.buffer,e=e.buffer;case NTe:return!(i.byteLength!=e.byteLength||!o(new Iu(i),new Iu(e)));case rTe:case sTe:case aTe:return Xye(+i,+e);case oTe:return i.name==e.name&&i.message==e.message;case MTe:case uTe:return i==e+"";case nTe:var a=qye;case cTe:var c=r&tTe;if(a||(a=eTe),i.size!=e.size&&!c)return!1;var l=n.get(i);if(l)return l==e;r|=iTe,n.set(i,e);var N=Kye(a(i),a(e),r,s,o,n);return n.delete(i),N;case lTe:if(fn)return fn.call(i)==fn.call(e)}return!1}var jTe=LTe;function dTe(i,e){for(var t=-1,r=e.length,s=i.length;++t<r;)i[s+t]=e[t];return i}var d4=dTe,yTe=d4,TTe=lt;function DTe(i,e,t){var r=e(i);return TTe(i)?r:yTe(r,t(i))}var y4=DTe;function hTe(i,e){for(var t=-1,r=i==null?0:i.length,s=0,o=[];++t<r;){var n=i[t];e(n,t,i)&&(o[s++]=n)}return o}var pTe=hTe;function zTe(){return[]}var T4=zTe,wTe=pTe,CTe=T4,ITe=Object.prototype,mTe=ITe.propertyIsEnumerable,Au=Object.getOwnPropertySymbols,ATe=Au?function(i){return i==null?[]:(i=Object(i),wTe(Au(i),function(e){return mTe.call(i,e)}))}:CTe,AM=ATe,fTe=y4,xTe=AM,OTe=Cs;function ETe(i){return fTe(i,OTe,xTe)}var D4=ETe,fu=D4,_Te=1,STe=Object.prototype,kTe=STe.hasOwnProperty;function vTe(i,e,t,r,s,o){var n=t&_Te,a=fu(i),c=a.length,l=fu(e),N=l.length;if(c!=N&&!n)return!1;for(var u=c;u--;){var g=a[u];if(!(n?g in e:kTe.call(e,g)))return!1}var L=o.get(i),d=o.get(e);if(L&&d)return L==e&&d==i;var y=!0;o.set(i,e),o.set(e,i);for(var D=n;++u<c;){g=a[u];var z=i[g],A=e[g];if(r)var C=n?r(A,z,g,e,i,o):r(z,A,g,i,e,o);if(!(C===void 0?z===A||s(z,A,t,r,o):C)){y=!1;break}D||(D=g=="constructor")}if(y&&!D){var f=i.constructor,m=e.constructor;f!=m&&"constructor"in i&&"constructor"in e&&!(typeof f=="function"&&f instanceof f&&typeof m=="function"&&m instanceof m)&&(y=!1)}return o.delete(i),o.delete(e),y}var bTe=vTe,YTe=_i,QTe=Ct,UTe=YTe(QTe,"DataView"),$Te=UTe,PTe=_i,RTe=Ct,WTe=PTe(RTe,"Promise"),BTe=WTe,FTe=_i,JTe=Ct,GTe=FTe(JTe,"Set"),HTe=GTe,VTe=_i,ZTe=Ct,XTe=VTe(ZTe,"WeakMap"),KTe=XTe,ja=$Te,da=CM,ya=BTe,Ta=HTe,Da=KTe,h4=Ei,Ar=g4,xu="[object Map]",qTe="[object Object]",Ou="[object Promise]",Eu="[object Set]",_u="[object WeakMap]",Su="[object DataView]",eDe=Ar(ja),tDe=Ar(da),iDe=Ar(ya),rDe=Ar(Ta),sDe=Ar(Da),yi=h4;(ja&&yi(new ja(new ArrayBuffer(1)))!=Su||da&&yi(new da)!=xu||ya&&yi(ya.resolve())!=Ou||Ta&&yi(new Ta)!=Eu||Da&&yi(new Da)!=_u)&&(yi=function(i){var e=h4(i),t=e==qTe?i.constructor:void 0,r=t?Ar(t):"";if(r)switch(r){case eDe:return Su;case tDe:return xu;case iDe:return Ou;case rDe:return Eu;case sDe:return _u}return e});var Jo=yi,xn=mM,oDe=L4,nDe=jTe,aDe=bTe,ku=Jo,vu=lt,bu=dM,MDe=o4,cDe=1,Yu="[object Arguments]",Qu="[object Array]",Rs="[object Object]",uDe=Object.prototype,Uu=uDe.hasOwnProperty;function lDe(i,e,t,r,s,o){var n=vu(i),a=vu(e),c=n?Qu:ku(i),l=a?Qu:ku(e);c=c==Yu?Rs:c,l=l==Yu?Rs:l;var N=c==Rs,u=l==Rs,g=c==l;if(g&&bu(i)){if(!bu(e))return!1;n=!0,N=!1}if(g&&!N)return o||(o=new xn),n||MDe(i)?oDe(i,e,t,r,s,o):nDe(i,e,c,t,r,s,o);if(!(t&cDe)){var L=N&&Uu.call(i,"__wrapped__"),d=u&&Uu.call(e,"__wrapped__");if(L||d){var y=L?i.value():i,D=d?e.value():e;return o||(o=new xn),s(y,D,t,r,o)}}return g?(o||(o=new xn),aDe(i,e,t,r,s,o)):!1}var NDe=lDe,gDe=NDe,$u=Qt;function p4(i,e,t,r,s){return i===e?!0:i==null||e==null||!$u(i)&&!$u(e)?i!==i&&e!==e:gDe(i,e,t,r,p4,s)}var z4=p4,LDe=mM,jDe=z4,dDe=1,yDe=2;function TDe(i,e,t,r){var s=t.length,o=s,n=!r;if(i==null)return!o;for(i=Object(i);s--;){var a=t[s];if(n&&a[2]?a[1]!==i[a[0]]:!(a[0]in i))return!1}for(;++s<o;){a=t[s];var c=a[0],l=i[c],N=a[1];if(n&&a[2]){if(l===void 0&&!(c in i))return!1}else{var u=new LDe;if(r)var g=r(l,N,c,i,e,u);if(!(g===void 0?jDe(N,l,dDe|yDe,r,u):g))return!1}}return!0}var DDe=TDe,hDe=zr;function pDe(i){return i===i&&!hDe(i)}var w4=pDe,zDe=w4,wDe=Cs;function CDe(i){for(var e=wDe(i),t=e.length;t--;){var r=e[t],s=i[r];e[t]=[r,s,zDe(s)]}return e}var IDe=CDe;function mDe(i,e){return function(t){return t==null?!1:t[i]===e&&(e!==void 0||i in Object(t))}}var C4=mDe,ADe=DDe,fDe=IDe,xDe=C4;function ODe(i){var e=fDe(i);return e.length==1&&e[0][2]?xDe(e[0][0],e[0][1]):function(t){return t===i||ADe(t,i,e)}}var EDe=ODe,_De=Ei,SDe=Qt,kDe="[object Symbol]";function vDe(i){return typeof i=="symbol"||SDe(i)&&_De(i)==kDe}var fM=vDe,bDe=lt,YDe=fM,QDe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,UDe=/^\w*$/;function $De(i,e){if(bDe(i))return!1;var t=typeof i;return t=="number"||t=="symbol"||t=="boolean"||i==null||YDe(i)?!0:UDe.test(i)||!QDe.test(i)||e!=null&&i in Object(e)}var xM=$De,I4=IM,PDe="Expected a function";function OM(i,e){if(typeof i!="function"||e!=null&&typeof e!="function")throw new TypeError(PDe);var t=function(){var r=arguments,s=e?e.apply(this,r):r[0],o=t.cache;if(o.has(s))return o.get(s);var n=i.apply(this,r);return t.cache=o.set(s,n)||o,n};return t.cache=new(OM.Cache||I4),t}OM.Cache=I4;var RDe=OM,WDe=RDe,BDe=500;function FDe(i){var e=WDe(i,function(r){return t.size===BDe&&t.clear(),r}),t=e.cache;return e}var JDe=FDe,GDe=JDe,HDe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,VDe=/\\(\\)?/g,ZDe=GDe(function(i){var e=[];return i.charCodeAt(0)===46&&e.push(""),i.replace(HDe,function(t,r,s,o){e.push(s?o.replace(VDe,"$1"):r||t)}),e}),XDe=ZDe,Pu=ws,KDe=N4,qDe=lt,ehe=fM,Ru=Pu?Pu.prototype:void 0,Wu=Ru?Ru.toString:void 0;function m4(i){if(typeof i=="string")return i;if(qDe(i))return KDe(i,m4)+"";if(ehe(i))return Wu?Wu.call(i):"";var e=i+"";return e=="0"&&1/i==-1/0?"-0":e}var the=m4,ihe=the;function rhe(i){return i==null?"":ihe(i)}var she=rhe,ohe=lt,nhe=xM,ahe=XDe,Mhe=she;function che(i,e){return ohe(i)?i:nhe(i,e)?[i]:ahe(Mhe(i))}var A4=che,uhe=fM;function lhe(i){if(typeof i=="string"||uhe(i))return i;var e=i+"";return e=="0"&&1/i==-1/0?"-0":e}var Go=lhe,Nhe=A4,ghe=Go;function Lhe(i,e){e=Nhe(e,i);for(var t=0,r=e.length;i!=null&&t<r;)i=i[ghe(e[t++])];return t&&t==r?i:void 0}var f4=Lhe,jhe=f4;function dhe(i,e,t){var r=i==null?void 0:jhe(i,e);return r===void 0?t:r}var yhe=dhe;function The(i,e){return i!=null&&e in Object(i)}var Dhe=The,hhe=A4,phe=r4,zhe=lt,whe=s4,Che=yM,Ihe=Go;function mhe(i,e,t){e=hhe(e,i);for(var r=-1,s=e.length,o=!1;++r<s;){var n=Ihe(e[r]);if(!(o=i!=null&&t(i,n)))break;i=i[n]}return o||++r!=s?o:(s=i==null?0:i.length,!!s&&Che(s)&&whe(n,s)&&(zhe(i)||phe(i)))}var Ahe=mhe,fhe=Dhe,xhe=Ahe;function Ohe(i,e){return i!=null&&xhe(i,e,fhe)}var Ehe=Ohe,_he=z4,She=yhe,khe=Ehe,vhe=xM,bhe=w4,Yhe=C4,Qhe=Go,Uhe=1,$he=2;function Phe(i,e){return vhe(i)&&bhe(e)?Yhe(Qhe(i),e):function(t){var r=She(t,i);return r===void 0&&r===e?khe(t,i):_he(e,r,Uhe|$he)}}var Rhe=Phe;function Whe(i){return function(e){return e==null?void 0:e[i]}}var Bhe=Whe,Fhe=f4;function Jhe(i){return function(e){return Fhe(e,i)}}var Ghe=Jhe,Hhe=Bhe,Vhe=Ghe,Zhe=xM,Xhe=Go;function Khe(i){return Zhe(i)?Hhe(Xhe(i)):Vhe(i)}var qhe=Khe,epe=EDe,tpe=Rhe,ipe=u4,rpe=lt,spe=qhe;function ope(i){return typeof i=="function"?i:i==null?ipe:typeof i=="object"?rpe(i)?tpe(i[0],i[1]):epe(i):spe(i)}var npe=ope,ape=Po;function Mpe(i,e){return function(t,r){if(t==null)return t;if(!ape(t))return i(t,r);for(var s=t.length,o=e?s:-1,n=Object(t);(e?o--:++o<s)&&r(n[o],o,n)!==!1;);return t}}var cpe=Mpe,upe=c4,lpe=cpe,Npe=lpe(upe),gpe=Npe,Lpe=gpe,jpe=Po;function dpe(i,e){var t=-1,r=jpe(i)?Array(i.length):[];return Lpe(i,function(s,o,n){r[++t]=e(s,o,n)}),r}var ype=dpe,Tpe=N4,Dpe=npe,hpe=ype,ppe=lt;function zpe(i,e){var t=ppe(i)?Tpe:hpe;return t(i,Dpe(e))}var wpe=zpe;Object.defineProperty(zs,"__esModule",{value:!0});zs.flattenNames=void 0;var Cpe=ege,Ipe=Ho(Cpe),mpe=pM,Ape=Ho(mpe),fpe=nje,xpe=Ho(fpe),Ope=wpe,Epe=Ho(Ope);function Ho(i){return i&&i.__esModule?i:{default:i}}var _pe=zs.flattenNames=function i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[];return(0,Epe.default)(e,function(r){Array.isArray(r)?i(r).map(function(s){return t.push(s)}):(0,xpe.default)(r)?(0,Ape.default)(r,function(s,o){s===!0&&t.push(o),t.push(o+"-"+s)}):(0,Ipe.default)(r)&&t.push(r)}),t};zs.default=_pe;var Is={};function Spe(i,e){for(var t=-1,r=i==null?0:i.length;++t<r&&e(i[t],t,i)!==!1;);return i}var kpe=Spe,vpe=_i,bpe=(function(){try{var i=vpe(Object,"defineProperty");return i({},"",{}),i}catch{}})(),Ype=bpe,Bu=Ype;function Qpe(i,e,t){e=="__proto__"&&Bu?Bu(i,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):i[e]=t}var x4=Qpe,Upe=x4,$pe=wM,Ppe=Object.prototype,Rpe=Ppe.hasOwnProperty;function Wpe(i,e,t){var r=i[e];(!(Rpe.call(i,e)&&$pe(r,t))||t===void 0&&!(e in i))&&Upe(i,e,t)}var O4=Wpe,Bpe=O4,Fpe=x4;function Jpe(i,e,t,r){var s=!t;t||(t={});for(var o=-1,n=e.length;++o<n;){var a=e[o],c=r?r(t[a],i[a],a,t,i):void 0;c===void 0&&(c=i[a]),s?Fpe(t,a,c):Bpe(t,a,c)}return t}var Vo=Jpe,Gpe=Vo,Hpe=Cs;function Vpe(i,e){return i&&Gpe(e,Hpe(e),i)}var Zpe=Vpe;function Xpe(i){var e=[];if(i!=null)for(var t in Object(i))e.push(t);return e}var Kpe=Xpe,qpe=zr,eze=hM,tze=Kpe,ize=Object.prototype,rze=ize.hasOwnProperty;function sze(i){if(!qpe(i))return tze(i);var e=eze(i),t=[];for(var r in i)r=="constructor"&&(e||!rze.call(i,r))||t.push(r);return t}var oze=sze,nze=n4,aze=oze,Mze=Po;function cze(i){return Mze(i)?nze(i,!0):aze(i)}var EM=cze,uze=Vo,lze=EM;function Nze(i,e){return i&&uze(e,lze(e),i)}var gze=Nze,To={exports:{}};To.exports;(function(i,e){var t=Ct,r=e&&!e.nodeType&&e,s=r&&!0&&i&&!i.nodeType&&i,o=s&&s.exports===r,n=o?t.Buffer:void 0,a=n?n.allocUnsafe:void 0;function c(l,N){if(N)return l.slice();var u=l.length,g=a?a(u):new l.constructor(u);return l.copy(g),g}i.exports=c})(To,To.exports);var Lze=To.exports;function jze(i,e){var t=-1,r=i.length;for(e||(e=Array(r));++t<r;)e[t]=i[t];return e}var dze=jze,yze=Vo,Tze=AM;function Dze(i,e){return yze(i,Tze(i),e)}var hze=Dze,pze=d4,zze=zM,wze=AM,Cze=T4,Ize=Object.getOwnPropertySymbols,mze=Ize?function(i){for(var e=[];i;)pze(e,wze(i)),i=zze(i);return e}:Cze,E4=mze,Aze=Vo,fze=E4;function xze(i,e){return Aze(i,fze(i),e)}var Oze=xze,Eze=y4,_ze=E4,Sze=EM;function kze(i){return Eze(i,Sze,_ze)}var vze=kze,bze=Object.prototype,Yze=bze.hasOwnProperty;function Qze(i){var e=i.length,t=new i.constructor(e);return e&&typeof i[0]=="string"&&Yze.call(i,"index")&&(t.index=i.index,t.input=i.input),t}var Uze=Qze,Fu=j4;function $ze(i){var e=new i.constructor(i.byteLength);return new Fu(e).set(new Fu(i)),e}var _M=$ze,Pze=_M;function Rze(i,e){var t=e?Pze(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.byteLength)}var Wze=Rze,Bze=/\w*$/;function Fze(i){var e=new i.constructor(i.source,Bze.exec(i));return e.lastIndex=i.lastIndex,e}var Jze=Fze,Ju=ws,Gu=Ju?Ju.prototype:void 0,Hu=Gu?Gu.valueOf:void 0;function Gze(i){return Hu?Object(Hu.call(i)):{}}var Hze=Gze,Vze=_M;function Zze(i,e){var t=e?Vze(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)}var Xze=Zze,Kze=_M,qze=Wze,ewe=Jze,twe=Hze,iwe=Xze,rwe="[object Boolean]",swe="[object Date]",owe="[object Map]",nwe="[object Number]",awe="[object RegExp]",Mwe="[object Set]",cwe="[object String]",uwe="[object Symbol]",lwe="[object ArrayBuffer]",Nwe="[object DataView]",gwe="[object Float32Array]",Lwe="[object Float64Array]",jwe="[object Int8Array]",dwe="[object Int16Array]",ywe="[object Int32Array]",Twe="[object Uint8Array]",Dwe="[object Uint8ClampedArray]",hwe="[object Uint16Array]",pwe="[object Uint32Array]";function zwe(i,e,t){var r=i.constructor;switch(e){case lwe:return Kze(i);case rwe:case swe:return new r(+i);case Nwe:return qze(i,t);case gwe:case Lwe:case jwe:case dwe:case ywe:case Twe:case Dwe:case hwe:case pwe:return iwe(i,t);case owe:return new r;case nwe:case cwe:return new r(i);case awe:return ewe(i);case Mwe:return new r;case uwe:return twe(i)}}var wwe=zwe,Cwe=zr,Vu=Object.create,Iwe=(function(){function i(){}return function(e){if(!Cwe(e))return{};if(Vu)return Vu(e);i.prototype=e;var t=new i;return i.prototype=void 0,t}})(),mwe=Iwe,Awe=mwe,fwe=zM,xwe=hM;function Owe(i){return typeof i.constructor=="function"&&!xwe(i)?Awe(fwe(i)):{}}var Ewe=Owe,_we=Jo,Swe=Qt,kwe="[object Map]";function vwe(i){return Swe(i)&&_we(i)==kwe}var bwe=vwe,Ywe=bwe,Qwe=TM,Zu=DM,Xu=Zu&&Zu.isMap,Uwe=Xu?Qwe(Xu):Ywe,$we=Uwe,Pwe=Jo,Rwe=Qt,Wwe="[object Set]";function Bwe(i){return Rwe(i)&&Pwe(i)==Wwe}var Fwe=Bwe,Jwe=Fwe,Gwe=TM,Ku=DM,qu=Ku&&Ku.isSet,Hwe=qu?Gwe(qu):Jwe,Vwe=Hwe,Zwe=mM,Xwe=kpe,Kwe=O4,qwe=Zpe,eCe=gze,tCe=Lze,iCe=dze,rCe=hze,sCe=Oze,oCe=D4,nCe=vze,aCe=Jo,MCe=Uze,cCe=wwe,uCe=Ewe,lCe=lt,NCe=dM,gCe=$we,LCe=zr,jCe=Vwe,dCe=Cs,yCe=EM,TCe=1,DCe=2,hCe=4,_4="[object Arguments]",pCe="[object Array]",zCe="[object Boolean]",wCe="[object Date]",CCe="[object Error]",S4="[object Function]",ICe="[object GeneratorFunction]",mCe="[object Map]",ACe="[object Number]",k4="[object Object]",fCe="[object RegExp]",xCe="[object Set]",OCe="[object String]",ECe="[object Symbol]",_Ce="[object WeakMap]",SCe="[object ArrayBuffer]",kCe="[object DataView]",vCe="[object Float32Array]",bCe="[object Float64Array]",YCe="[object Int8Array]",QCe="[object Int16Array]",UCe="[object Int32Array]",$Ce="[object Uint8Array]",PCe="[object Uint8ClampedArray]",RCe="[object Uint16Array]",WCe="[object Uint32Array]",ue={};ue[_4]=ue[pCe]=ue[SCe]=ue[kCe]=ue[zCe]=ue[wCe]=ue[vCe]=ue[bCe]=ue[YCe]=ue[QCe]=ue[UCe]=ue[mCe]=ue[ACe]=ue[k4]=ue[fCe]=ue[xCe]=ue[OCe]=ue[ECe]=ue[$Ce]=ue[PCe]=ue[RCe]=ue[WCe]=!0;ue[CCe]=ue[S4]=ue[_Ce]=!1;function no(i,e,t,r,s,o){var n,a=e&TCe,c=e&DCe,l=e&hCe;if(t&&(n=s?t(i,r,s,o):t(i)),n!==void 0)return n;if(!LCe(i))return i;var N=lCe(i);if(N){if(n=MCe(i),!a)return iCe(i,n)}else{var u=aCe(i),g=u==S4||u==ICe;if(NCe(i))return tCe(i,a);if(u==k4||u==_4||g&&!s){if(n=c||g?{}:uCe(i),!a)return c?sCe(i,eCe(n,i)):rCe(i,qwe(n,i))}else{if(!ue[u])return s?i:{};n=cCe(i,u,a)}}o||(o=new Zwe);var L=o.get(i);if(L)return L;o.set(i,n),jCe(i)?i.forEach(function(D){n.add(no(D,e,t,D,i,o))}):gCe(i)&&i.forEach(function(D,z){n.set(z,no(D,e,t,z,i,o))});var d=l?c?nCe:oCe:c?yCe:dCe,y=N?void 0:d(i);return Xwe(y||i,function(D,z){y&&(z=D,D=i[z]),Kwe(n,z,no(D,e,t,z,i,o))}),n}var BCe=no,FCe=BCe,JCe=1,GCe=4;function HCe(i){return FCe(i,JCe|GCe)}var VCe=HCe;Object.defineProperty(Is,"__esModule",{value:!0});Is.mergeClasses=void 0;var ZCe=pM,XCe=v4(ZCe),KCe=VCe,qCe=v4(KCe),eIe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i};function v4(i){return i&&i.__esModule?i:{default:i}}var tIe=Is.mergeClasses=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.default&&(0,qCe.default)(e.default)||{};return t.map(function(s){var o=e[s];return o&&(0,XCe.default)(o,function(n,a){r[a]||(r[a]={}),r[a]=eIe({},r[a],o[a])}),s}),r};Is.default=tIe;var ms={};Object.defineProperty(ms,"__esModule",{value:!0});ms.autoprefix=void 0;var iIe=pM,el=sIe(iIe),rIe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i};function sIe(i){return i&&i.__esModule?i:{default:i}}var oIe={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var r=t[e];return r||{extend:e}}},nIe=ms.autoprefix=function(e){var t={};return(0,el.default)(e,function(r,s){var o={};(0,el.default)(r,function(n,a){var c=oIe[a];c?o=rIe({},o,c(n)):o[a]=n}),t[s]=o}),t};ms.default=nIe;var As={};Object.defineProperty(As,"__esModule",{value:!0});As.hover=void 0;var aIe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},MIe=_,On=cIe(MIe);function cIe(i){return i&&i.__esModule?i:{default:i}}function uIe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function tl(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function lIe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var NIe=As.hover=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return(function(r){lIe(s,r);function s(){var o,n,a,c;uIe(this,s);for(var l=arguments.length,N=Array(l),u=0;u<l;u++)N[u]=arguments[u];return c=(n=(a=tl(this,(o=s.__proto__||Object.getPrototypeOf(s)).call.apply(o,[this].concat(N))),a),a.state={hover:!1},a.handleMouseOver=function(){return a.setState({hover:!0})},a.handleMouseOut=function(){return a.setState({hover:!1})},a.render=function(){return On.default.createElement(t,{onMouseOver:a.handleMouseOver,onMouseOut:a.handleMouseOut},On.default.createElement(e,aIe({},a.props,a.state)))},n),tl(a,c)}return s})(On.default.Component)};As.default=NIe;var fs={};Object.defineProperty(fs,"__esModule",{value:!0});fs.active=void 0;var gIe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},LIe=_,En=jIe(LIe);function jIe(i){return i&&i.__esModule?i:{default:i}}function dIe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function il(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function yIe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var TIe=fs.active=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return(function(r){yIe(s,r);function s(){var o,n,a,c;dIe(this,s);for(var l=arguments.length,N=Array(l),u=0;u<l;u++)N[u]=arguments[u];return c=(n=(a=il(this,(o=s.__proto__||Object.getPrototypeOf(s)).call.apply(o,[this].concat(N))),a),a.state={active:!1},a.handleMouseDown=function(){return a.setState({active:!0})},a.handleMouseUp=function(){return a.setState({active:!1})},a.render=function(){return En.default.createElement(t,{onMouseDown:a.handleMouseDown,onMouseUp:a.handleMouseUp},En.default.createElement(e,gIe({},a.props,a.state)))},n),il(a,c)}return s})(En.default.Component)};fs.default=TIe;var SM={};Object.defineProperty(SM,"__esModule",{value:!0});var DIe=function(e,t){var r={},s=function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[n]=a};return e===0&&s("first-child"),e===t-1&&s("last-child"),(e===0||e%2===0)&&s("even"),Math.abs(e%2)===1&&s("odd"),s("nth-child",e),r};SM.default=DIe;Object.defineProperty(it,"__esModule",{value:!0});it.ReactCSS=it.loop=it.handleActive=kM=it.handleHover=it.hover=void 0;var hIe=zs,pIe=fr(hIe),zIe=Is,wIe=fr(zIe),CIe=ms,IIe=fr(CIe),mIe=As,b4=fr(mIe),AIe=fs,fIe=fr(AIe),xIe=SM,OIe=fr(xIe);function fr(i){return i&&i.__esModule?i:{default:i}}it.hover=b4.default;var kM=it.handleHover=b4.default;it.handleActive=fIe.default;it.loop=OIe.default;var EIe=it.ReactCSS=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];var o=(0,pIe.default)(r),n=(0,wIe.default)(e,o);return(0,IIe.default)(n)},K=it.default=EIe,_Ie=function(e,t,r,s,o){var n=o.clientWidth,a=o.clientHeight,c=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,N=c-(o.getBoundingClientRect().left+window.pageXOffset),u=l-(o.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var g=void 0;if(u<0?g=0:u>a?g=1:g=Math.round(u*100/a)/100,t.a!==g)return{h:t.h,s:t.s,l:t.l,a:g,source:"rgb"}}else{var L=void 0;if(N<0?L=0:N>n?L=1:L=Math.round(N*100/n)/100,s!==L)return{h:t.h,s:t.s,l:t.l,a:L,source:"rgb"}}return null},_n={},SIe=function(e,t,r,s){if(typeof document>"u"&&!s)return null;var o=s?new s:document.createElement("canvas");o.width=r*2,o.height=r*2;var n=o.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,o.width,o.height),n.fillStyle=t,n.fillRect(0,0,r,r),n.translate(r,r),n.fillRect(0,0,r,r),o.toDataURL()):null},kIe=function(e,t,r,s){var o=e+"-"+t+"-"+r+(s?"-server":"");if(_n[o])return _n[o];var n=SIe(e,t,r,s);return _n[o]=n,n},rl=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},xr=function(e){var t=e.white,r=e.grey,s=e.size,o=e.renderers,n=e.borderRadius,a=e.boxShadow,c=e.children,l=K({default:{grid:{borderRadius:n,boxShadow:a,absolute:"0px 0px 0px 0px",background:"url("+kIe(t,r,s,o.canvas)+") center left"}}});return _.isValidElement(c)?M.cloneElement(c,rl({},c.props,{style:rl({},c.props.style,l.grid)})):M.createElement("div",{style:l.grid})};xr.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var vIe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},bIe=(function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}})();function YIe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function sl(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function QIe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var vM=(function(i){QIe(e,i);function e(){var t,r,s,o;YIe(this,e);for(var n=arguments.length,a=Array(n),c=0;c<n;c++)a[c]=arguments[c];return o=(r=(s=sl(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a))),s),s.handleChange=function(l){var N=_Ie(l,s.props.hsl,s.props.direction,s.props.a,s.container);N&&typeof s.props.onChange=="function"&&s.props.onChange(N,l)},s.handleMouseDown=function(l){s.handleChange(l),window.addEventListener("mousemove",s.handleChange),window.addEventListener("mouseup",s.handleMouseUp)},s.handleMouseUp=function(){s.unbindEventListeners()},s.unbindEventListeners=function(){window.removeEventListener("mousemove",s.handleChange),window.removeEventListener("mouseup",s.handleMouseUp)},r),sl(s,o)}return bIe(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,s=this.props.rgb,o=K({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+s.r+","+s.g+","+s.b+`, 0) 0%,
298
299
  rgba(`+s.r+","+s.g+","+s.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:s.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+s.r+","+s.g+","+s.b+`, 0) 0%,
299
- rgba(`+s.r+","+s.g+","+s.b+", 1) 100%)"},pointer:{left:0,top:s.a*100+"%"}},overwrite:vIe({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return M.createElement("div",{style:o.alpha},M.createElement("div",{style:o.checkboard},M.createElement(xr,{renderers:this.props.renderers})),M.createElement("div",{style:o.gradient}),M.createElement("div",{style:o.container,ref:function(a){return r.container=a},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},M.createElement("div",{style:o.pointer},this.props.pointer?M.createElement(this.props.pointer,this.props):M.createElement("div",{style:o.slider}))))}}]),e}(_.PureComponent||_.Component),UIe=function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();function $Ie(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function PIe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function RIe(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function WIe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var BIe=1,Y4=38,FIe=40,JIe=[Y4,FIe],GIe=function(e){return JIe.indexOf(e)>-1},HIe=function(e){return Number(String(e).replace(/%/g,""))},VIe=1,re=function(i){WIe(e,i);function e(t){PIe(this,e);var r=RIe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(s){r.setUpdatedValue(s.target.value,s)},r.handleKeyDown=function(s){var o=HIe(s.target.value);if(!isNaN(o)&&GIe(s.keyCode)){var n=r.getArrowOffset(),a=s.keyCode===Y4?o+n:o-n;r.setUpdatedValue(a,s)}},r.handleDrag=function(s){if(r.props.dragLabel){var o=Math.round(r.props.value+s.movementX);o>=0&&o<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(o),s)}},r.handleMouseDown=function(s){r.props.dragLabel&&(s.preventDefault(),r.handleDrag(s),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(t.value).toUpperCase(),blurValue:String(t.value).toUpperCase()},r.inputId="rc-editable-input-"+VIe++,r}return UIe(e,[{key:"componentDidUpdate",value:function(r,s){this.props.value!==this.state.value&&(r.value!==this.props.value||s.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return $Ie({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||BIe}},{key:"setUpdatedValue",value:function(r,s){var o=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(o,s),this.setState({value:r})}},{key:"render",value:function(){var r=this,s=K({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return M.createElement("div",{style:s.wrap},M.createElement("input",{id:this.inputId,style:s.input,ref:function(n){return r.input=n},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?M.createElement("label",{htmlFor:this.inputId,style:s.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(_.PureComponent||_.Component),ZIe=function(e,t,r,s){var o=s.clientWidth,n=s.clientHeight,a=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,c=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,l=a-(s.getBoundingClientRect().left+window.pageXOffset),N=c-(s.getBoundingClientRect().top+window.pageYOffset);if(t==="vertical"){var u=void 0;if(N<0)u=359;else if(N>n)u=0;else{var g=-(N*100/n)+100;u=360*g/100}if(r.h!==u)return{h:u,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var L=void 0;if(l<0)L=0;else if(l>o)L=359;else{var d=l*100/o;L=360*d/100}if(r.h!==L)return{h:L,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},XIe=function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();function KIe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function ol(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function qIe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Or=function(i){qIe(e,i);function e(){var t,r,s,o;KIe(this,e);for(var n=arguments.length,a=Array(n),c=0;c<n;c++)a[c]=arguments[c];return o=(r=(s=ol(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a))),s),s.handleChange=function(l){var N=ZIe(l,s.props.direction,s.props.hsl,s.container);N&&typeof s.props.onChange=="function"&&s.props.onChange(N,l)},s.handleMouseDown=function(l){s.handleChange(l),window.addEventListener("mousemove",s.handleChange),window.addEventListener("mouseup",s.handleMouseUp)},s.handleMouseUp=function(){s.unbindEventListeners()},r),ol(s,o)}return XIe(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,s=this.props.direction,o=s===void 0?"horizontal":s,n=K({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:o==="vertical"});return M.createElement("div",{style:n.hue},M.createElement("div",{className:"hue-"+o,style:n.container,ref:function(c){return r.container=c},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},M.createElement("style",null,`
300
+ rgba(`+s.r+","+s.g+","+s.b+", 1) 100%)"},pointer:{left:0,top:s.a*100+"%"}},overwrite:vIe({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return M.createElement("div",{style:o.alpha},M.createElement("div",{style:o.checkboard},M.createElement(xr,{renderers:this.props.renderers})),M.createElement("div",{style:o.gradient}),M.createElement("div",{style:o.container,ref:function(a){return r.container=a},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},M.createElement("div",{style:o.pointer},this.props.pointer?M.createElement(this.props.pointer,this.props):M.createElement("div",{style:o.slider}))))}}]),e})(_.PureComponent||_.Component),UIe=(function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}})();function $Ie(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function PIe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function RIe(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function WIe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var BIe=1,Y4=38,FIe=40,JIe=[Y4,FIe],GIe=function(e){return JIe.indexOf(e)>-1},HIe=function(e){return Number(String(e).replace(/%/g,""))},VIe=1,re=(function(i){WIe(e,i);function e(t){PIe(this,e);var r=RIe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(s){r.setUpdatedValue(s.target.value,s)},r.handleKeyDown=function(s){var o=HIe(s.target.value);if(!isNaN(o)&&GIe(s.keyCode)){var n=r.getArrowOffset(),a=s.keyCode===Y4?o+n:o-n;r.setUpdatedValue(a,s)}},r.handleDrag=function(s){if(r.props.dragLabel){var o=Math.round(r.props.value+s.movementX);o>=0&&o<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(o),s)}},r.handleMouseDown=function(s){r.props.dragLabel&&(s.preventDefault(),r.handleDrag(s),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(t.value).toUpperCase(),blurValue:String(t.value).toUpperCase()},r.inputId="rc-editable-input-"+VIe++,r}return UIe(e,[{key:"componentDidUpdate",value:function(r,s){this.props.value!==this.state.value&&(r.value!==this.props.value||s.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return $Ie({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||BIe}},{key:"setUpdatedValue",value:function(r,s){var o=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(o,s),this.setState({value:r})}},{key:"render",value:function(){var r=this,s=K({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return M.createElement("div",{style:s.wrap},M.createElement("input",{id:this.inputId,style:s.input,ref:function(n){return r.input=n},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?M.createElement("label",{htmlFor:this.inputId,style:s.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e})(_.PureComponent||_.Component),ZIe=function(e,t,r,s){var o=s.clientWidth,n=s.clientHeight,a=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,c=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,l=a-(s.getBoundingClientRect().left+window.pageXOffset),N=c-(s.getBoundingClientRect().top+window.pageYOffset);if(t==="vertical"){var u=void 0;if(N<0)u=359;else if(N>n)u=0;else{var g=-(N*100/n)+100;u=360*g/100}if(r.h!==u)return{h:u,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var L=void 0;if(l<0)L=0;else if(l>o)L=359;else{var d=l*100/o;L=360*d/100}if(r.h!==L)return{h:L,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},XIe=(function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}})();function KIe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function ol(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function qIe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Or=(function(i){qIe(e,i);function e(){var t,r,s,o;KIe(this,e);for(var n=arguments.length,a=Array(n),c=0;c<n;c++)a[c]=arguments[c];return o=(r=(s=ol(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(a))),s),s.handleChange=function(l){var N=ZIe(l,s.props.direction,s.props.hsl,s.container);N&&typeof s.props.onChange=="function"&&s.props.onChange(N,l)},s.handleMouseDown=function(l){s.handleChange(l),window.addEventListener("mousemove",s.handleChange),window.addEventListener("mouseup",s.handleMouseUp)},s.handleMouseUp=function(){s.unbindEventListeners()},r),ol(s,o)}return XIe(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,s=this.props.direction,o=s===void 0?"horizontal":s,n=K({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:o==="vertical"});return M.createElement("div",{style:n.hue},M.createElement("div",{className:"hue-"+o,style:n.container,ref:function(c){return r.container=c},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},M.createElement("style",null,`
300
301
  .hue-horizontal {
301
302
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
302
303
  33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
@@ -310,7 +311,7 @@ body {
310
311
  background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
311
312
  #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
312
313
  }
313
- `),M.createElement("div",{style:n.pointer},this.props.pointer?M.createElement(this.props.pointer,this.props):M.createElement("div",{style:n.slider}))))}}]),e}(_.PureComponent||_.Component);function e1e(){this.__data__=[],this.size=0}function xs(i,e){return i===e||i!==i&&e!==e}function Zo(i,e){for(var t=i.length;t--;)if(xs(i[t][0],e))return t;return-1}var t1e=Array.prototype,i1e=t1e.splice;function r1e(i){var e=this.__data__,t=Zo(e,i);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():i1e.call(e,t,1),--this.size,!0}function s1e(i){var e=this.__data__,t=Zo(e,i);return t<0?void 0:e[t][1]}function o1e(i){return Zo(this.__data__,i)>-1}function n1e(i,e){var t=this.__data__,r=Zo(t,i);return r<0?(++this.size,t.push([i,e])):t[r][1]=e,this}function Ut(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}Ut.prototype.clear=e1e;Ut.prototype.delete=r1e;Ut.prototype.get=s1e;Ut.prototype.has=o1e;Ut.prototype.set=n1e;function a1e(){this.__data__=new Ut,this.size=0}function M1e(i){var e=this.__data__,t=e.delete(i);return this.size=e.size,t}function c1e(i){return this.__data__.get(i)}function u1e(i){return this.__data__.has(i)}var Q4=typeof global=="object"&&global&&global.Object===Object&&global,l1e=typeof self=="object"&&self&&self.Object===Object&&self,Nt=Q4||l1e||Function("return this")(),si=Nt.Symbol,U4=Object.prototype,N1e=U4.hasOwnProperty,g1e=U4.toString,Rr=si?si.toStringTag:void 0;function L1e(i){var e=N1e.call(i,Rr),t=i[Rr];try{i[Rr]=void 0;var r=!0}catch{}var s=g1e.call(i);return r&&(e?i[Rr]=t:delete i[Rr]),s}var j1e=Object.prototype,d1e=j1e.toString;function y1e(i){return d1e.call(i)}var T1e="[object Null]",D1e="[object Undefined]",nl=si?si.toStringTag:void 0;function Si(i){return i==null?i===void 0?D1e:T1e:nl&&nl in Object(i)?L1e(i):y1e(i)}function st(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var h1e="[object AsyncFunction]",p1e="[object Function]",z1e="[object GeneratorFunction]",w1e="[object Proxy]";function bM(i){if(!st(i))return!1;var e=Si(i);return e==p1e||e==z1e||e==h1e||e==w1e}var Sn=Nt["__core-js_shared__"],al=function(){var i=/[^.]+$/.exec(Sn&&Sn.keys&&Sn.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function C1e(i){return!!al&&al in i}var I1e=Function.prototype,m1e=I1e.toString;function ki(i){if(i!=null){try{return m1e.call(i)}catch{}try{return i+""}catch{}}return""}var A1e=/[\\^$.*+?()[\]{}|]/g,f1e=/^\[object .+?Constructor\]$/,x1e=Function.prototype,O1e=Object.prototype,E1e=x1e.toString,_1e=O1e.hasOwnProperty,S1e=RegExp("^"+E1e.call(_1e).replace(A1e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function k1e(i){if(!st(i)||C1e(i))return!1;var e=bM(i)?S1e:f1e;return e.test(ki(i))}function v1e(i,e){return i==null?void 0:i[e]}function vi(i,e){var t=v1e(i,e);return k1e(t)?t:void 0}var cs=vi(Nt,"Map"),us=vi(Object,"create");function b1e(){this.__data__=us?us(null):{},this.size=0}function Y1e(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e}var Q1e="__lodash_hash_undefined__",U1e=Object.prototype,$1e=U1e.hasOwnProperty;function P1e(i){var e=this.__data__;if(us){var t=e[i];return t===Q1e?void 0:t}return $1e.call(e,i)?e[i]:void 0}var R1e=Object.prototype,W1e=R1e.hasOwnProperty;function B1e(i){var e=this.__data__;return us?e[i]!==void 0:W1e.call(e,i)}var F1e="__lodash_hash_undefined__";function J1e(i,e){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=us&&e===void 0?F1e:e,this}function mi(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}mi.prototype.clear=b1e;mi.prototype.delete=Y1e;mi.prototype.get=P1e;mi.prototype.has=B1e;mi.prototype.set=J1e;function G1e(){this.size=0,this.__data__={hash:new mi,map:new(cs||Ut),string:new mi}}function H1e(i){var e=typeof i;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?i!=="__proto__":i===null}function Xo(i,e){var t=i.__data__;return H1e(e)?t[typeof e=="string"?"string":"hash"]:t.map}function V1e(i){var e=Xo(this,i).delete(i);return this.size-=e?1:0,e}function Z1e(i){return Xo(this,i).get(i)}function X1e(i){return Xo(this,i).has(i)}function K1e(i,e){var t=Xo(this,i),r=t.size;return t.set(i,e),this.size+=t.size==r?0:1,this}function $t(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}$t.prototype.clear=G1e;$t.prototype.delete=V1e;$t.prototype.get=Z1e;$t.prototype.has=X1e;$t.prototype.set=K1e;var q1e=200;function eme(i,e){var t=this.__data__;if(t instanceof Ut){var r=t.__data__;if(!cs||r.length<q1e-1)return r.push([i,e]),this.size=++t.size,this;t=this.__data__=new $t(r)}return t.set(i,e),this.size=t.size,this}function pt(i){var e=this.__data__=new Ut(i);this.size=e.size}pt.prototype.clear=a1e;pt.prototype.delete=M1e;pt.prototype.get=c1e;pt.prototype.has=u1e;pt.prototype.set=eme;var Do=function(){try{var i=vi(Object,"defineProperty");return i({},"",{}),i}catch{}}();function YM(i,e,t){e=="__proto__"&&Do?Do(i,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):i[e]=t}function ha(i,e,t){(t!==void 0&&!xs(i[e],t)||t===void 0&&!(e in i))&&YM(i,e,t)}function tme(i){return function(e,t,r){for(var s=-1,o=Object(e),n=r(e),a=n.length;a--;){var c=n[++s];if(t(o[c],c,o)===!1)break}return e}}var $4=tme(),P4=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ml=P4&&typeof module=="object"&&module&&!module.nodeType&&module,ime=Ml&&Ml.exports===P4,cl=ime?Nt.Buffer:void 0;cl&&cl.allocUnsafe;function rme(i,e){return i.slice()}var ho=Nt.Uint8Array;function sme(i){var e=new i.constructor(i.byteLength);return new ho(e).set(new ho(i)),e}function ome(i,e){var t=sme(i.buffer);return new i.constructor(t,i.byteOffset,i.length)}function nme(i,e){var t=-1,r=i.length;for(e||(e=Array(r));++t<r;)e[t]=i[t];return e}var ul=Object.create,ame=function(){function i(){}return function(e){if(!st(e))return{};if(ul)return ul(e);i.prototype=e;var t=new i;return i.prototype=void 0,t}}();function R4(i,e){return function(t){return i(e(t))}}var W4=R4(Object.getPrototypeOf,Object),Mme=Object.prototype;function QM(i){var e=i&&i.constructor,t=typeof e=="function"&&e.prototype||Mme;return i===t}function cme(i){return typeof i.constructor=="function"&&!QM(i)?ame(W4(i)):{}}function oi(i){return i!=null&&typeof i=="object"}var ume="[object Arguments]";function ll(i){return oi(i)&&Si(i)==ume}var B4=Object.prototype,lme=B4.hasOwnProperty,Nme=B4.propertyIsEnumerable,po=ll(function(){return arguments}())?ll:function(i){return oi(i)&&lme.call(i,"callee")&&!Nme.call(i,"callee")},Ke=Array.isArray,gme=9007199254740991;function UM(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=gme}function Er(i){return i!=null&&UM(i.length)&&!bM(i)}function Lme(i){return oi(i)&&Er(i)}function jme(){return!1}var F4=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nl=F4&&typeof module=="object"&&module&&!module.nodeType&&module,dme=Nl&&Nl.exports===F4,gl=dme?Nt.Buffer:void 0,yme=gl?gl.isBuffer:void 0,zo=yme||jme,Tme="[object Object]",Dme=Function.prototype,hme=Object.prototype,J4=Dme.toString,pme=hme.hasOwnProperty,zme=J4.call(Object);function wme(i){if(!oi(i)||Si(i)!=Tme)return!1;var e=W4(i);if(e===null)return!0;var t=pme.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&J4.call(t)==zme}var Cme="[object Arguments]",Ime="[object Array]",mme="[object Boolean]",Ame="[object Date]",fme="[object Error]",xme="[object Function]",Ome="[object Map]",Eme="[object Number]",_me="[object Object]",Sme="[object RegExp]",kme="[object Set]",vme="[object String]",bme="[object WeakMap]",Yme="[object ArrayBuffer]",Qme="[object DataView]",Ume="[object Float32Array]",$me="[object Float64Array]",Pme="[object Int8Array]",Rme="[object Int16Array]",Wme="[object Int32Array]",Bme="[object Uint8Array]",Fme="[object Uint8ClampedArray]",Jme="[object Uint16Array]",Gme="[object Uint32Array]",Ne={};Ne[Ume]=Ne[$me]=Ne[Pme]=Ne[Rme]=Ne[Wme]=Ne[Bme]=Ne[Fme]=Ne[Jme]=Ne[Gme]=!0;Ne[Cme]=Ne[Ime]=Ne[Yme]=Ne[mme]=Ne[Qme]=Ne[Ame]=Ne[fme]=Ne[xme]=Ne[Ome]=Ne[Eme]=Ne[_me]=Ne[Sme]=Ne[kme]=Ne[vme]=Ne[bme]=!1;function Hme(i){return oi(i)&&UM(i.length)&&!!Ne[Si(i)]}function Vme(i){return function(e){return i(e)}}var G4=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ss=G4&&typeof module=="object"&&module&&!module.nodeType&&module,Zme=ss&&ss.exports===G4,kn=Zme&&Q4.process,Ll=function(){try{var i=ss&&ss.require&&ss.require("util").types;return i||kn&&kn.binding&&kn.binding("util")}catch{}}(),jl=Ll&&Ll.isTypedArray,$M=jl?Vme(jl):Hme;function pa(i,e){if(!(e==="constructor"&&typeof i[e]=="function")&&e!="__proto__")return i[e]}var Xme=Object.prototype,Kme=Xme.hasOwnProperty;function qme(i,e,t){var r=i[e];(!(Kme.call(i,e)&&xs(r,t))||t===void 0&&!(e in i))&&YM(i,e,t)}function eAe(i,e,t,r){var s=!t;t||(t={});for(var o=-1,n=e.length;++o<n;){var a=e[o],c=void 0;c===void 0&&(c=i[a]),s?YM(t,a,c):qme(t,a,c)}return t}function tAe(i,e){for(var t=-1,r=Array(i);++t<i;)r[t]=e(t);return r}var iAe=9007199254740991,rAe=/^(?:0|[1-9]\d*)$/;function PM(i,e){var t=typeof i;return e=e??iAe,!!e&&(t=="number"||t!="symbol"&&rAe.test(i))&&i>-1&&i%1==0&&i<e}var sAe=Object.prototype,oAe=sAe.hasOwnProperty;function H4(i,e){var t=Ke(i),r=!t&&po(i),s=!t&&!r&&zo(i),o=!t&&!r&&!s&&$M(i),n=t||r||s||o,a=n?tAe(i.length,String):[],c=a.length;for(var l in i)(e||oAe.call(i,l))&&!(n&&(l=="length"||s&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||PM(l,c)))&&a.push(l);return a}function nAe(i){var e=[];if(i!=null)for(var t in Object(i))e.push(t);return e}var aAe=Object.prototype,MAe=aAe.hasOwnProperty;function cAe(i){if(!st(i))return nAe(i);var e=QM(i),t=[];for(var r in i)r=="constructor"&&(e||!MAe.call(i,r))||t.push(r);return t}function V4(i){return Er(i)?H4(i,!0):cAe(i)}function uAe(i){return eAe(i,V4(i))}function lAe(i,e,t,r,s,o,n){var a=pa(i,t),c=pa(e,t),l=n.get(c);if(l){ha(i,t,l);return}var N=o?o(a,c,t+"",i,e,n):void 0,u=N===void 0;if(u){var g=Ke(c),L=!g&&zo(c),d=!g&&!L&&$M(c);N=c,g||L||d?Ke(a)?N=a:Lme(a)?N=nme(a):L?(u=!1,N=rme(c)):d?(u=!1,N=ome(c)):N=[]:wme(c)||po(c)?(N=a,po(a)?N=uAe(a):(!st(a)||bM(a))&&(N=cme(c))):u=!1}u&&(n.set(c,N),s(N,c,r,o,n),n.delete(c)),ha(i,t,N)}function Z4(i,e,t,r,s){i!==e&&$4(e,function(o,n){if(s||(s=new pt),st(o))lAe(i,e,n,t,Z4,r,s);else{var a=r?r(pa(i,n),o,n+"",i,e,s):void 0;a===void 0&&(a=o),ha(i,n,a)}},V4)}function Ko(i){return i}function NAe(i,e,t){switch(t.length){case 0:return i.call(e);case 1:return i.call(e,t[0]);case 2:return i.call(e,t[0],t[1]);case 3:return i.call(e,t[0],t[1],t[2])}return i.apply(e,t)}var dl=Math.max;function gAe(i,e,t){return e=dl(e===void 0?i.length-1:e,0),function(){for(var r=arguments,s=-1,o=dl(r.length-e,0),n=Array(o);++s<o;)n[s]=r[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=r[s];return a[e]=t(n),NAe(i,this,a)}}function LAe(i){return function(){return i}}var jAe=Do?function(i,e){return Do(i,"toString",{configurable:!0,enumerable:!1,value:LAe(e),writable:!0})}:Ko,dAe=800,yAe=16,TAe=Date.now;function DAe(i){var e=0,t=0;return function(){var r=TAe(),s=yAe-(r-t);if(t=r,s>0){if(++e>=dAe)return arguments[0]}else e=0;return i.apply(void 0,arguments)}}var hAe=DAe(jAe);function pAe(i,e){return hAe(gAe(i,e,Ko),i+"")}function zAe(i,e,t){if(!st(t))return!1;var r=typeof e;return(r=="number"?Er(t)&&PM(e,t.length):r=="string"&&e in t)?xs(t[e],i):!1}function wAe(i){return pAe(function(e,t){var r=-1,s=t.length,o=s>1?t[s-1]:void 0,n=s>2?t[2]:void 0;for(o=i.length>3&&typeof o=="function"?(s--,o):void 0,n&&zAe(t[0],t[1],n)&&(o=s<3?void 0:o,s=1),e=Object(e);++r<s;){var a=t[r];a&&i(e,a,r,o)}return e})}var Ge=wAe(function(i,e,t){Z4(i,e,t)}),Os=function(e){var t=e.zDepth,r=e.radius,s=e.background,o=e.children,n=e.styles,a=n===void 0?{}:n,c=K(Ge({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+t*4+"px rgba(0,0,0,.24)",borderRadius:r,background:s}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},a),{"zDepth-1":t===1});return M.createElement("div",{style:c.wrap},M.createElement("div",{style:c.bg}),M.createElement("div",{style:c.content},o))};Os.propTypes={background:S.string,zDepth:S.oneOf([0,1,2,3,4,5]),radius:S.number,styles:S.object};Os.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var vn=function(){return Nt.Date.now()},CAe=/\s/;function IAe(i){for(var e=i.length;e--&&CAe.test(i.charAt(e)););return e}var mAe=/^\s+/;function AAe(i){return i&&i.slice(0,IAe(i)+1).replace(mAe,"")}var fAe="[object Symbol]";function qo(i){return typeof i=="symbol"||oi(i)&&Si(i)==fAe}var yl=NaN,xAe=/^[-+]0x[0-9a-f]+$/i,OAe=/^0b[01]+$/i,EAe=/^0o[0-7]+$/i,_Ae=parseInt;function Tl(i){if(typeof i=="number")return i;if(qo(i))return yl;if(st(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=st(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=AAe(i);var t=OAe.test(i);return t||EAe.test(i)?_Ae(i.slice(2),t?2:8):xAe.test(i)?yl:+i}var SAe="Expected a function",kAe=Math.max,vAe=Math.min;function X4(i,e,t){var r,s,o,n,a,c,l=0,N=!1,u=!1,g=!0;if(typeof i!="function")throw new TypeError(SAe);e=Tl(e)||0,st(t)&&(N=!!t.leading,u="maxWait"in t,o=u?kAe(Tl(t.maxWait)||0,e):o,g="trailing"in t?!!t.trailing:g);function L(h){var x=r,b=s;return r=s=void 0,l=h,n=i.apply(b,x),n}function d(h){return l=h,a=setTimeout(z,e),N?L(h):n}function y(h){var x=h-c,b=h-l,v=e-x;return u?vAe(v,o-b):v}function D(h){var x=h-c,b=h-l;return c===void 0||x>=e||x<0||u&&b>=o}function z(){var h=vn();if(D(h))return A(h);a=setTimeout(z,y(h))}function A(h){return a=void 0,g&&r?L(h):(r=s=void 0,n)}function C(){a!==void 0&&clearTimeout(a),l=0,r=c=s=a=void 0}function f(){return a===void 0?n:A(vn())}function m(){var h=vn(),x=D(h);if(r=arguments,s=this,c=h,x){if(a===void 0)return d(c);if(u)return clearTimeout(a),a=setTimeout(z,e),L(c)}return a===void 0&&(a=setTimeout(z,e)),n}return m.cancel=C,m.flush=f,m}var bAe="Expected a function";function YAe(i,e,t){var r=!0,s=!0;if(typeof i!="function")throw new TypeError(bAe);return st(t)&&(r="leading"in t?!!t.leading:r,s="trailing"in t?!!t.trailing:s),X4(i,e,{leading:r,maxWait:e,trailing:s})}var QAe=function(e,t,r){var s=r.getBoundingClientRect(),o=s.width,n=s.height,a=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,c=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,l=a-(r.getBoundingClientRect().left+window.pageXOffset),N=c-(r.getBoundingClientRect().top+window.pageYOffset);l<0?l=0:l>o&&(l=o),N<0?N=0:N>n&&(N=n);var u=l/o,g=1-N/n;return{h:t.h,s:u,v:g,a:t.a,source:"hsv"}},UAe=function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();function $Ae(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function PAe(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function RAe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var en=function(i){RAe(e,i);function e(t){$Ae(this,e);var r=PAe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.handleChange=function(s){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,QAe(s,r.props.hsl,r.container),s)},r.handleMouseDown=function(s){r.handleChange(s);var o=r.getContainerRenderWindow();o.addEventListener("mousemove",r.handleChange),o.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=YAe(function(s,o,n){s(o,n)},50),r}return UAe(e,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,s=window;!s.document.contains(r)&&s.parent!==s;)s=s.parent;return s}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,s=this.props.style||{},o=s.color,n=s.white,a=s.black,c=s.pointer,l=s.circle,N=K({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
314
+ `),M.createElement("div",{style:n.pointer},this.props.pointer?M.createElement(this.props.pointer,this.props):M.createElement("div",{style:n.slider}))))}}]),e})(_.PureComponent||_.Component);function e1e(){this.__data__=[],this.size=0}function xs(i,e){return i===e||i!==i&&e!==e}function Zo(i,e){for(var t=i.length;t--;)if(xs(i[t][0],e))return t;return-1}var t1e=Array.prototype,i1e=t1e.splice;function r1e(i){var e=this.__data__,t=Zo(e,i);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():i1e.call(e,t,1),--this.size,!0}function s1e(i){var e=this.__data__,t=Zo(e,i);return t<0?void 0:e[t][1]}function o1e(i){return Zo(this.__data__,i)>-1}function n1e(i,e){var t=this.__data__,r=Zo(t,i);return r<0?(++this.size,t.push([i,e])):t[r][1]=e,this}function Ut(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}Ut.prototype.clear=e1e;Ut.prototype.delete=r1e;Ut.prototype.get=s1e;Ut.prototype.has=o1e;Ut.prototype.set=n1e;function a1e(){this.__data__=new Ut,this.size=0}function M1e(i){var e=this.__data__,t=e.delete(i);return this.size=e.size,t}function c1e(i){return this.__data__.get(i)}function u1e(i){return this.__data__.has(i)}var Q4=typeof global=="object"&&global&&global.Object===Object&&global,l1e=typeof self=="object"&&self&&self.Object===Object&&self,Nt=Q4||l1e||Function("return this")(),si=Nt.Symbol,U4=Object.prototype,N1e=U4.hasOwnProperty,g1e=U4.toString,Rr=si?si.toStringTag:void 0;function L1e(i){var e=N1e.call(i,Rr),t=i[Rr];try{i[Rr]=void 0;var r=!0}catch{}var s=g1e.call(i);return r&&(e?i[Rr]=t:delete i[Rr]),s}var j1e=Object.prototype,d1e=j1e.toString;function y1e(i){return d1e.call(i)}var T1e="[object Null]",D1e="[object Undefined]",nl=si?si.toStringTag:void 0;function Si(i){return i==null?i===void 0?D1e:T1e:nl&&nl in Object(i)?L1e(i):y1e(i)}function st(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var h1e="[object AsyncFunction]",p1e="[object Function]",z1e="[object GeneratorFunction]",w1e="[object Proxy]";function bM(i){if(!st(i))return!1;var e=Si(i);return e==p1e||e==z1e||e==h1e||e==w1e}var Sn=Nt["__core-js_shared__"],al=(function(){var i=/[^.]+$/.exec(Sn&&Sn.keys&&Sn.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function C1e(i){return!!al&&al in i}var I1e=Function.prototype,m1e=I1e.toString;function ki(i){if(i!=null){try{return m1e.call(i)}catch{}try{return i+""}catch{}}return""}var A1e=/[\\^$.*+?()[\]{}|]/g,f1e=/^\[object .+?Constructor\]$/,x1e=Function.prototype,O1e=Object.prototype,E1e=x1e.toString,_1e=O1e.hasOwnProperty,S1e=RegExp("^"+E1e.call(_1e).replace(A1e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function k1e(i){if(!st(i)||C1e(i))return!1;var e=bM(i)?S1e:f1e;return e.test(ki(i))}function v1e(i,e){return i==null?void 0:i[e]}function vi(i,e){var t=v1e(i,e);return k1e(t)?t:void 0}var cs=vi(Nt,"Map"),us=vi(Object,"create");function b1e(){this.__data__=us?us(null):{},this.size=0}function Y1e(i){var e=this.has(i)&&delete this.__data__[i];return this.size-=e?1:0,e}var Q1e="__lodash_hash_undefined__",U1e=Object.prototype,$1e=U1e.hasOwnProperty;function P1e(i){var e=this.__data__;if(us){var t=e[i];return t===Q1e?void 0:t}return $1e.call(e,i)?e[i]:void 0}var R1e=Object.prototype,W1e=R1e.hasOwnProperty;function B1e(i){var e=this.__data__;return us?e[i]!==void 0:W1e.call(e,i)}var F1e="__lodash_hash_undefined__";function J1e(i,e){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=us&&e===void 0?F1e:e,this}function mi(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}mi.prototype.clear=b1e;mi.prototype.delete=Y1e;mi.prototype.get=P1e;mi.prototype.has=B1e;mi.prototype.set=J1e;function G1e(){this.size=0,this.__data__={hash:new mi,map:new(cs||Ut),string:new mi}}function H1e(i){var e=typeof i;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?i!=="__proto__":i===null}function Xo(i,e){var t=i.__data__;return H1e(e)?t[typeof e=="string"?"string":"hash"]:t.map}function V1e(i){var e=Xo(this,i).delete(i);return this.size-=e?1:0,e}function Z1e(i){return Xo(this,i).get(i)}function X1e(i){return Xo(this,i).has(i)}function K1e(i,e){var t=Xo(this,i),r=t.size;return t.set(i,e),this.size+=t.size==r?0:1,this}function $t(i){var e=-1,t=i==null?0:i.length;for(this.clear();++e<t;){var r=i[e];this.set(r[0],r[1])}}$t.prototype.clear=G1e;$t.prototype.delete=V1e;$t.prototype.get=Z1e;$t.prototype.has=X1e;$t.prototype.set=K1e;var q1e=200;function eme(i,e){var t=this.__data__;if(t instanceof Ut){var r=t.__data__;if(!cs||r.length<q1e-1)return r.push([i,e]),this.size=++t.size,this;t=this.__data__=new $t(r)}return t.set(i,e),this.size=t.size,this}function pt(i){var e=this.__data__=new Ut(i);this.size=e.size}pt.prototype.clear=a1e;pt.prototype.delete=M1e;pt.prototype.get=c1e;pt.prototype.has=u1e;pt.prototype.set=eme;var Do=(function(){try{var i=vi(Object,"defineProperty");return i({},"",{}),i}catch{}})();function YM(i,e,t){e=="__proto__"&&Do?Do(i,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):i[e]=t}function ha(i,e,t){(t!==void 0&&!xs(i[e],t)||t===void 0&&!(e in i))&&YM(i,e,t)}function tme(i){return function(e,t,r){for(var s=-1,o=Object(e),n=r(e),a=n.length;a--;){var c=n[++s];if(t(o[c],c,o)===!1)break}return e}}var $4=tme(),P4=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ml=P4&&typeof module=="object"&&module&&!module.nodeType&&module,ime=Ml&&Ml.exports===P4,cl=ime?Nt.Buffer:void 0;cl&&cl.allocUnsafe;function rme(i,e){return i.slice()}var ho=Nt.Uint8Array;function sme(i){var e=new i.constructor(i.byteLength);return new ho(e).set(new ho(i)),e}function ome(i,e){var t=sme(i.buffer);return new i.constructor(t,i.byteOffset,i.length)}function nme(i,e){var t=-1,r=i.length;for(e||(e=Array(r));++t<r;)e[t]=i[t];return e}var ul=Object.create,ame=(function(){function i(){}return function(e){if(!st(e))return{};if(ul)return ul(e);i.prototype=e;var t=new i;return i.prototype=void 0,t}})();function R4(i,e){return function(t){return i(e(t))}}var W4=R4(Object.getPrototypeOf,Object),Mme=Object.prototype;function QM(i){var e=i&&i.constructor,t=typeof e=="function"&&e.prototype||Mme;return i===t}function cme(i){return typeof i.constructor=="function"&&!QM(i)?ame(W4(i)):{}}function oi(i){return i!=null&&typeof i=="object"}var ume="[object Arguments]";function ll(i){return oi(i)&&Si(i)==ume}var B4=Object.prototype,lme=B4.hasOwnProperty,Nme=B4.propertyIsEnumerable,po=ll((function(){return arguments})())?ll:function(i){return oi(i)&&lme.call(i,"callee")&&!Nme.call(i,"callee")},Ke=Array.isArray,gme=9007199254740991;function UM(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=gme}function Er(i){return i!=null&&UM(i.length)&&!bM(i)}function Lme(i){return oi(i)&&Er(i)}function jme(){return!1}var F4=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nl=F4&&typeof module=="object"&&module&&!module.nodeType&&module,dme=Nl&&Nl.exports===F4,gl=dme?Nt.Buffer:void 0,yme=gl?gl.isBuffer:void 0,zo=yme||jme,Tme="[object Object]",Dme=Function.prototype,hme=Object.prototype,J4=Dme.toString,pme=hme.hasOwnProperty,zme=J4.call(Object);function wme(i){if(!oi(i)||Si(i)!=Tme)return!1;var e=W4(i);if(e===null)return!0;var t=pme.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&J4.call(t)==zme}var Cme="[object Arguments]",Ime="[object Array]",mme="[object Boolean]",Ame="[object Date]",fme="[object Error]",xme="[object Function]",Ome="[object Map]",Eme="[object Number]",_me="[object Object]",Sme="[object RegExp]",kme="[object Set]",vme="[object String]",bme="[object WeakMap]",Yme="[object ArrayBuffer]",Qme="[object DataView]",Ume="[object Float32Array]",$me="[object Float64Array]",Pme="[object Int8Array]",Rme="[object Int16Array]",Wme="[object Int32Array]",Bme="[object Uint8Array]",Fme="[object Uint8ClampedArray]",Jme="[object Uint16Array]",Gme="[object Uint32Array]",Ne={};Ne[Ume]=Ne[$me]=Ne[Pme]=Ne[Rme]=Ne[Wme]=Ne[Bme]=Ne[Fme]=Ne[Jme]=Ne[Gme]=!0;Ne[Cme]=Ne[Ime]=Ne[Yme]=Ne[mme]=Ne[Qme]=Ne[Ame]=Ne[fme]=Ne[xme]=Ne[Ome]=Ne[Eme]=Ne[_me]=Ne[Sme]=Ne[kme]=Ne[vme]=Ne[bme]=!1;function Hme(i){return oi(i)&&UM(i.length)&&!!Ne[Si(i)]}function Vme(i){return function(e){return i(e)}}var G4=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ss=G4&&typeof module=="object"&&module&&!module.nodeType&&module,Zme=ss&&ss.exports===G4,kn=Zme&&Q4.process,Ll=(function(){try{var i=ss&&ss.require&&ss.require("util").types;return i||kn&&kn.binding&&kn.binding("util")}catch{}})(),jl=Ll&&Ll.isTypedArray,$M=jl?Vme(jl):Hme;function pa(i,e){if(!(e==="constructor"&&typeof i[e]=="function")&&e!="__proto__")return i[e]}var Xme=Object.prototype,Kme=Xme.hasOwnProperty;function qme(i,e,t){var r=i[e];(!(Kme.call(i,e)&&xs(r,t))||t===void 0&&!(e in i))&&YM(i,e,t)}function eAe(i,e,t,r){var s=!t;t||(t={});for(var o=-1,n=e.length;++o<n;){var a=e[o],c=void 0;c===void 0&&(c=i[a]),s?YM(t,a,c):qme(t,a,c)}return t}function tAe(i,e){for(var t=-1,r=Array(i);++t<i;)r[t]=e(t);return r}var iAe=9007199254740991,rAe=/^(?:0|[1-9]\d*)$/;function PM(i,e){var t=typeof i;return e=e??iAe,!!e&&(t=="number"||t!="symbol"&&rAe.test(i))&&i>-1&&i%1==0&&i<e}var sAe=Object.prototype,oAe=sAe.hasOwnProperty;function H4(i,e){var t=Ke(i),r=!t&&po(i),s=!t&&!r&&zo(i),o=!t&&!r&&!s&&$M(i),n=t||r||s||o,a=n?tAe(i.length,String):[],c=a.length;for(var l in i)(e||oAe.call(i,l))&&!(n&&(l=="length"||s&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||PM(l,c)))&&a.push(l);return a}function nAe(i){var e=[];if(i!=null)for(var t in Object(i))e.push(t);return e}var aAe=Object.prototype,MAe=aAe.hasOwnProperty;function cAe(i){if(!st(i))return nAe(i);var e=QM(i),t=[];for(var r in i)r=="constructor"&&(e||!MAe.call(i,r))||t.push(r);return t}function V4(i){return Er(i)?H4(i,!0):cAe(i)}function uAe(i){return eAe(i,V4(i))}function lAe(i,e,t,r,s,o,n){var a=pa(i,t),c=pa(e,t),l=n.get(c);if(l){ha(i,t,l);return}var N=o?o(a,c,t+"",i,e,n):void 0,u=N===void 0;if(u){var g=Ke(c),L=!g&&zo(c),d=!g&&!L&&$M(c);N=c,g||L||d?Ke(a)?N=a:Lme(a)?N=nme(a):L?(u=!1,N=rme(c)):d?(u=!1,N=ome(c)):N=[]:wme(c)||po(c)?(N=a,po(a)?N=uAe(a):(!st(a)||bM(a))&&(N=cme(c))):u=!1}u&&(n.set(c,N),s(N,c,r,o,n),n.delete(c)),ha(i,t,N)}function Z4(i,e,t,r,s){i!==e&&$4(e,function(o,n){if(s||(s=new pt),st(o))lAe(i,e,n,t,Z4,r,s);else{var a=r?r(pa(i,n),o,n+"",i,e,s):void 0;a===void 0&&(a=o),ha(i,n,a)}},V4)}function Ko(i){return i}function NAe(i,e,t){switch(t.length){case 0:return i.call(e);case 1:return i.call(e,t[0]);case 2:return i.call(e,t[0],t[1]);case 3:return i.call(e,t[0],t[1],t[2])}return i.apply(e,t)}var dl=Math.max;function gAe(i,e,t){return e=dl(e===void 0?i.length-1:e,0),function(){for(var r=arguments,s=-1,o=dl(r.length-e,0),n=Array(o);++s<o;)n[s]=r[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=r[s];return a[e]=t(n),NAe(i,this,a)}}function LAe(i){return function(){return i}}var jAe=Do?function(i,e){return Do(i,"toString",{configurable:!0,enumerable:!1,value:LAe(e),writable:!0})}:Ko,dAe=800,yAe=16,TAe=Date.now;function DAe(i){var e=0,t=0;return function(){var r=TAe(),s=yAe-(r-t);if(t=r,s>0){if(++e>=dAe)return arguments[0]}else e=0;return i.apply(void 0,arguments)}}var hAe=DAe(jAe);function pAe(i,e){return hAe(gAe(i,e,Ko),i+"")}function zAe(i,e,t){if(!st(t))return!1;var r=typeof e;return(r=="number"?Er(t)&&PM(e,t.length):r=="string"&&e in t)?xs(t[e],i):!1}function wAe(i){return pAe(function(e,t){var r=-1,s=t.length,o=s>1?t[s-1]:void 0,n=s>2?t[2]:void 0;for(o=i.length>3&&typeof o=="function"?(s--,o):void 0,n&&zAe(t[0],t[1],n)&&(o=s<3?void 0:o,s=1),e=Object(e);++r<s;){var a=t[r];a&&i(e,a,r,o)}return e})}var Ge=wAe(function(i,e,t){Z4(i,e,t)}),Os=function(e){var t=e.zDepth,r=e.radius,s=e.background,o=e.children,n=e.styles,a=n===void 0?{}:n,c=K(Ge({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+t*4+"px rgba(0,0,0,.24)",borderRadius:r,background:s}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},a),{"zDepth-1":t===1});return M.createElement("div",{style:c.wrap},M.createElement("div",{style:c.bg}),M.createElement("div",{style:c.content},o))};Os.propTypes={background:S.string,zDepth:S.oneOf([0,1,2,3,4,5]),radius:S.number,styles:S.object};Os.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var vn=function(){return Nt.Date.now()},CAe=/\s/;function IAe(i){for(var e=i.length;e--&&CAe.test(i.charAt(e)););return e}var mAe=/^\s+/;function AAe(i){return i&&i.slice(0,IAe(i)+1).replace(mAe,"")}var fAe="[object Symbol]";function qo(i){return typeof i=="symbol"||oi(i)&&Si(i)==fAe}var yl=NaN,xAe=/^[-+]0x[0-9a-f]+$/i,OAe=/^0b[01]+$/i,EAe=/^0o[0-7]+$/i,_Ae=parseInt;function Tl(i){if(typeof i=="number")return i;if(qo(i))return yl;if(st(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=st(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=AAe(i);var t=OAe.test(i);return t||EAe.test(i)?_Ae(i.slice(2),t?2:8):xAe.test(i)?yl:+i}var SAe="Expected a function",kAe=Math.max,vAe=Math.min;function X4(i,e,t){var r,s,o,n,a,c,l=0,N=!1,u=!1,g=!0;if(typeof i!="function")throw new TypeError(SAe);e=Tl(e)||0,st(t)&&(N=!!t.leading,u="maxWait"in t,o=u?kAe(Tl(t.maxWait)||0,e):o,g="trailing"in t?!!t.trailing:g);function L(h){var x=r,b=s;return r=s=void 0,l=h,n=i.apply(b,x),n}function d(h){return l=h,a=setTimeout(z,e),N?L(h):n}function y(h){var x=h-c,b=h-l,v=e-x;return u?vAe(v,o-b):v}function D(h){var x=h-c,b=h-l;return c===void 0||x>=e||x<0||u&&b>=o}function z(){var h=vn();if(D(h))return A(h);a=setTimeout(z,y(h))}function A(h){return a=void 0,g&&r?L(h):(r=s=void 0,n)}function C(){a!==void 0&&clearTimeout(a),l=0,r=c=s=a=void 0}function f(){return a===void 0?n:A(vn())}function m(){var h=vn(),x=D(h);if(r=arguments,s=this,c=h,x){if(a===void 0)return d(c);if(u)return clearTimeout(a),a=setTimeout(z,e),L(c)}return a===void 0&&(a=setTimeout(z,e)),n}return m.cancel=C,m.flush=f,m}var bAe="Expected a function";function YAe(i,e,t){var r=!0,s=!0;if(typeof i!="function")throw new TypeError(bAe);return st(t)&&(r="leading"in t?!!t.leading:r,s="trailing"in t?!!t.trailing:s),X4(i,e,{leading:r,maxWait:e,trailing:s})}var QAe=function(e,t,r){var s=r.getBoundingClientRect(),o=s.width,n=s.height,a=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,c=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,l=a-(r.getBoundingClientRect().left+window.pageXOffset),N=c-(r.getBoundingClientRect().top+window.pageYOffset);l<0?l=0:l>o&&(l=o),N<0?N=0:N>n&&(N=n);var u=l/o,g=1-N/n;return{h:t.h,s:u,v:g,a:t.a,source:"hsv"}},UAe=(function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}})();function $Ae(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function PAe(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function RAe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var en=(function(i){RAe(e,i);function e(t){$Ae(this,e);var r=PAe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.handleChange=function(s){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,QAe(s,r.props.hsl,r.container),s)},r.handleMouseDown=function(s){r.handleChange(s);var o=r.getContainerRenderWindow();o.addEventListener("mousemove",r.handleChange),o.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=YAe(function(s,o,n){s(o,n)},50),r}return UAe(e,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,s=window;!s.document.contains(r)&&s.parent!==s;)s=s.parent;return s}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,s=this.props.style||{},o=s.color,n=s.white,a=s.black,c=s.pointer,l=s.circle,N=K({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
314
315
  0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:o,white:n,black:a,pointer:c,circle:l}},{custom:!!this.props.style});return M.createElement("div",{style:N.color,ref:function(g){return r.container=g},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},M.createElement("style",null,`
315
316
  .saturation-white {
316
317
  background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
@@ -320,7 +321,7 @@ body {
320
321
  background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
321
322
  background: linear-gradient(to top, #000, rgba(0,0,0,0));
322
323
  }
323
- `),M.createElement("div",{style:N.white,className:"saturation-white"},M.createElement("div",{style:N.black,className:"saturation-black"}),M.createElement("div",{style:N.pointer},this.props.pointer?M.createElement(this.props.pointer,this.props):M.createElement("div",{style:N.circle}))))}}]),e}(_.PureComponent||_.Component);function WAe(i,e){for(var t=-1,r=i==null?0:i.length;++t<r&&e(i[t],t,i)!==!1;);return i}var BAe=R4(Object.keys,Object),FAe=Object.prototype,JAe=FAe.hasOwnProperty;function GAe(i){if(!QM(i))return BAe(i);var e=[];for(var t in Object(i))JAe.call(i,t)&&t!="constructor"&&e.push(t);return e}function RM(i){return Er(i)?H4(i):GAe(i)}function HAe(i,e){return i&&$4(i,e,RM)}function VAe(i,e){return function(t,r){if(t==null)return t;if(!Er(t))return i(t,r);for(var s=t.length,o=-1,n=Object(t);++o<s&&r(n[o],o,n)!==!1;);return t}}var K4=VAe(HAe);function ZAe(i){return typeof i=="function"?i:Ko}function XAe(i,e){var t=Ke(i)?WAe:K4;return t(i,ZAe(e))}function wo(i){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wo(i)}var KAe=/^\s+/,qAe=/\s+$/;function F(i,e){if(i=i||"",e=e||{},i instanceof F)return i;if(!(this instanceof F))return new F(i,e);var t=e2e(i);this._originalInput=i,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}F.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,s,o,n,a;return t=e.r/255,r=e.g/255,s=e.b/255,t<=.03928?o=t/12.92:o=Math.pow((t+.055)/1.055,2.4),r<=.03928?n=r/12.92:n=Math.pow((r+.055)/1.055,2.4),s<=.03928?a=s/12.92:a=Math.pow((s+.055)/1.055,2.4),.2126*o+.7152*n+.0722*a},setAlpha:function(e){return this._a=q4(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=hl(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=hl(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),s=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+s+"%)":"hsva("+t+", "+r+"%, "+s+"%, "+this._roundA+")"},toHsl:function(){var e=Dl(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Dl(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),s=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+s+"%)":"hsla("+t+", "+r+"%, "+s+"%, "+this._roundA+")"},toHex:function(e){return pl(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return s2e(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Le(this._r,255)*100)+"%",g:Math.round(Le(this._g,255)*100)+"%",b:Math.round(Le(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Le(this._r,255)*100)+"%, "+Math.round(Le(this._g,255)*100)+"%, "+Math.round(Le(this._b,255)*100)+"%)":"rgba("+Math.round(Le(this._r,255)*100)+"%, "+Math.round(Le(this._g,255)*100)+"%, "+Math.round(Le(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:d2e[pl(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+zl(this._r,this._g,this._b,this._a),r=t,s=this._gradientType?"GradientType = 1, ":"";if(e){var o=F(e);r="#"+zl(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+s+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,s=this._a<1&&this._a>=0,o=!t&&s&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return F(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(M2e,arguments)},brighten:function(){return this._applyModification(c2e,arguments)},darken:function(){return this._applyModification(u2e,arguments)},desaturate:function(){return this._applyModification(o2e,arguments)},saturate:function(){return this._applyModification(n2e,arguments)},greyscale:function(){return this._applyModification(a2e,arguments)},spin:function(){return this._applyModification(l2e,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(L2e,arguments)},complement:function(){return this._applyCombination(N2e,arguments)},monochromatic:function(){return this._applyCombination(j2e,arguments)},splitcomplement:function(){return this._applyCombination(g2e,arguments)},triad:function(){return this._applyCombination(wl,[3])},tetrad:function(){return this._applyCombination(wl,[4])}};F.fromRatio=function(i,e){if(wo(i)=="object"){var t={};for(var r in i)i.hasOwnProperty(r)&&(r==="a"?t[r]=i[r]:t[r]=Xr(i[r]));i=t}return F(i,e)};function e2e(i){var e={r:0,g:0,b:0},t=1,r=null,s=null,o=null,n=!1,a=!1;return typeof i=="string"&&(i=h2e(i)),wo(i)=="object"&&(At(i.r)&&At(i.g)&&At(i.b)?(e=t2e(i.r,i.g,i.b),n=!0,a=String(i.r).substr(-1)==="%"?"prgb":"rgb"):At(i.h)&&At(i.s)&&At(i.v)?(r=Xr(i.s),s=Xr(i.v),e=r2e(i.h,r,s),n=!0,a="hsv"):At(i.h)&&At(i.s)&&At(i.l)&&(r=Xr(i.s),o=Xr(i.l),e=i2e(i.h,r,o),n=!0,a="hsl"),i.hasOwnProperty("a")&&(t=i.a)),t=q4(t),{ok:n,format:i.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function t2e(i,e,t){return{r:Le(i,255)*255,g:Le(e,255)*255,b:Le(t,255)*255}}function Dl(i,e,t){i=Le(i,255),e=Le(e,255),t=Le(t,255);var r=Math.max(i,e,t),s=Math.min(i,e,t),o,n,a=(r+s)/2;if(r==s)o=n=0;else{var c=r-s;switch(n=a>.5?c/(2-r-s):c/(r+s),r){case i:o=(e-t)/c+(e<t?6:0);break;case e:o=(t-i)/c+2;break;case t:o=(i-e)/c+4;break}o/=6}return{h:o,s:n,l:a}}function i2e(i,e,t){var r,s,o;i=Le(i,360),e=Le(e,100),t=Le(t,100);function n(l,N,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?l+(N-l)*6*u:u<1/2?N:u<2/3?l+(N-l)*(2/3-u)*6:l}if(e===0)r=s=o=t;else{var a=t<.5?t*(1+e):t+e-t*e,c=2*t-a;r=n(c,a,i+1/3),s=n(c,a,i),o=n(c,a,i-1/3)}return{r:r*255,g:s*255,b:o*255}}function hl(i,e,t){i=Le(i,255),e=Le(e,255),t=Le(t,255);var r=Math.max(i,e,t),s=Math.min(i,e,t),o,n,a=r,c=r-s;if(n=r===0?0:c/r,r==s)o=0;else{switch(r){case i:o=(e-t)/c+(e<t?6:0);break;case e:o=(t-i)/c+2;break;case t:o=(i-e)/c+4;break}o/=6}return{h:o,s:n,v:a}}function r2e(i,e,t){i=Le(i,360)*6,e=Le(e,100),t=Le(t,100);var r=Math.floor(i),s=i-r,o=t*(1-e),n=t*(1-s*e),a=t*(1-(1-s)*e),c=r%6,l=[t,n,o,o,a,t][c],N=[a,t,t,n,o,o][c],u=[o,o,a,t,t,n][c];return{r:l*255,g:N*255,b:u*255}}function pl(i,e,t,r){var s=[ct(Math.round(i).toString(16)),ct(Math.round(e).toString(16)),ct(Math.round(t).toString(16))];return r&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function s2e(i,e,t,r,s){var o=[ct(Math.round(i).toString(16)),ct(Math.round(e).toString(16)),ct(Math.round(t).toString(16)),ct(eg(r))];return s&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function zl(i,e,t,r){var s=[ct(eg(r)),ct(Math.round(i).toString(16)),ct(Math.round(e).toString(16)),ct(Math.round(t).toString(16))];return s.join("")}F.equals=function(i,e){return!i||!e?!1:F(i).toRgbString()==F(e).toRgbString()};F.random=function(){return F.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function o2e(i,e){e=e===0?0:e||10;var t=F(i).toHsl();return t.s-=e/100,t.s=tn(t.s),F(t)}function n2e(i,e){e=e===0?0:e||10;var t=F(i).toHsl();return t.s+=e/100,t.s=tn(t.s),F(t)}function a2e(i){return F(i).desaturate(100)}function M2e(i,e){e=e===0?0:e||10;var t=F(i).toHsl();return t.l+=e/100,t.l=tn(t.l),F(t)}function c2e(i,e){e=e===0?0:e||10;var t=F(i).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),F(t)}function u2e(i,e){e=e===0?0:e||10;var t=F(i).toHsl();return t.l-=e/100,t.l=tn(t.l),F(t)}function l2e(i,e){var t=F(i).toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,F(t)}function N2e(i){var e=F(i).toHsl();return e.h=(e.h+180)%360,F(e)}function wl(i,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var t=F(i).toHsl(),r=[F(i)],s=360/e,o=1;o<e;o++)r.push(F({h:(t.h+o*s)%360,s:t.s,l:t.l}));return r}function g2e(i){var e=F(i).toHsl(),t=e.h;return[F(i),F({h:(t+72)%360,s:e.s,l:e.l}),F({h:(t+216)%360,s:e.s,l:e.l})]}function L2e(i,e,t){e=e||6,t=t||30;var r=F(i).toHsl(),s=360/t,o=[F(i)];for(r.h=(r.h-(s*e>>1)+720)%360;--e;)r.h=(r.h+s)%360,o.push(F(r));return o}function j2e(i,e){e=e||6;for(var t=F(i).toHsv(),r=t.h,s=t.s,o=t.v,n=[],a=1/e;e--;)n.push(F({h:r,s,v:o})),o=(o+a)%1;return n}F.mix=function(i,e,t){t=t===0?0:t||50;var r=F(i).toRgb(),s=F(e).toRgb(),o=t/100,n={r:(s.r-r.r)*o+r.r,g:(s.g-r.g)*o+r.g,b:(s.b-r.b)*o+r.b,a:(s.a-r.a)*o+r.a};return F(n)};F.readability=function(i,e){var t=F(i),r=F(e);return(Math.max(t.getLuminance(),r.getLuminance())+.05)/(Math.min(t.getLuminance(),r.getLuminance())+.05)};F.isReadable=function(i,e,t){var r=F.readability(i,e),s,o;switch(o=!1,s=p2e(t),s.level+s.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o};F.mostReadable=function(i,e,t){var r=null,s=0,o,n,a,c;t=t||{},n=t.includeFallbackColors,a=t.level,c=t.size;for(var l=0;l<e.length;l++)o=F.readability(i,e[l]),o>s&&(s=o,r=F(e[l]));return F.isReadable(i,r,{level:a,size:c})||!n?r:(t.includeFallbackColors=!1,F.mostReadable(i,["#fff","#000"],t))};var za=F.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},d2e=F.hexNames=y2e(za);function y2e(i){var e={};for(var t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function q4(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function Le(i,e){T2e(i)&&(i="100%");var t=D2e(i);return i=Math.min(e,Math.max(0,parseFloat(i))),t&&(i=parseInt(i*e,10)/100),Math.abs(i-e)<1e-6?1:i%e/parseFloat(e)}function tn(i){return Math.min(1,Math.max(0,i))}function Ze(i){return parseInt(i,16)}function T2e(i){return typeof i=="string"&&i.indexOf(".")!=-1&&parseFloat(i)===1}function D2e(i){return typeof i=="string"&&i.indexOf("%")!=-1}function ct(i){return i.length==1?"0"+i:""+i}function Xr(i){return i<=1&&(i=i*100+"%"),i}function eg(i){return Math.round(parseFloat(i)*255).toString(16)}function Cl(i){return Ze(i)/255}var Mt=function(){var i="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+i+")",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",s="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+s),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+s),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+s),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function At(i){return!!Mt.CSS_UNIT.exec(i)}function h2e(i){i=i.replace(KAe,"").replace(qAe,"").toLowerCase();var e=!1;if(za[i])i=za[i],e=!0;else if(i=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Mt.rgb.exec(i))?{r:t[1],g:t[2],b:t[3]}:(t=Mt.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Mt.hsl.exec(i))?{h:t[1],s:t[2],l:t[3]}:(t=Mt.hsla.exec(i))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Mt.hsv.exec(i))?{h:t[1],s:t[2],v:t[3]}:(t=Mt.hsva.exec(i))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Mt.hex8.exec(i))?{r:Ze(t[1]),g:Ze(t[2]),b:Ze(t[3]),a:Cl(t[4]),format:e?"name":"hex8"}:(t=Mt.hex6.exec(i))?{r:Ze(t[1]),g:Ze(t[2]),b:Ze(t[3]),format:e?"name":"hex"}:(t=Mt.hex4.exec(i))?{r:Ze(t[1]+""+t[1]),g:Ze(t[2]+""+t[2]),b:Ze(t[3]+""+t[3]),a:Cl(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=Mt.hex3.exec(i))?{r:Ze(t[1]+""+t[1]),g:Ze(t[2]+""+t[2]),b:Ze(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function p2e(i){var e,t;return i=i||{level:"AA",size:"small"},e=(i.level||"AA").toUpperCase(),t=(i.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}var Il=function(e){var t=["r","g","b","a","h","s","l","v"],r=0,s=0;return XAe(t,function(o){if(e[o]&&(r+=1,isNaN(e[o])||(s+=1),o==="s"||o==="l")){var n=/^\d+%$/;n.test(e[o])&&(s+=1)}}),r===s?e:!1},Kr=function(e,t){var r=e.hex?F(e.hex):F(e),s=r.toHsl(),o=r.toHsv(),n=r.toRgb(),a=r.toHex();s.s===0&&(s.h=t||0,o.h=t||0);var c=a==="000000"&&n.a===0;return{hsl:s,hex:c?"transparent":"#"+a,rgb:n,hsv:o,oldHue:e.h||t||s.h,source:e.source}},ai=function(e){if(e==="transparent")return!0;var t=String(e).charAt(0)==="#"?1:0;return e.length!==4+t&&e.length<7+t&&F(e).isValid()},WM=function(e){if(!e)return"#fff";var t=Kr(e);if(t.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(t.rgb.r*299+t.rgb.g*587+t.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},bn=function(e,t){var r=e.replace("°","");return F(t+" ("+r+")")._ok},Wr=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},z2e=function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();function w2e(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function C2e(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function I2e(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var He=function(e){var t=function(r){I2e(s,r);function s(o){w2e(this,s);var n=C2e(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return n.handleChange=function(a,c){var l=Il(a);if(l){var N=Kr(a,a.h||n.state.oldHue);n.setState(N),n.props.onChangeComplete&&n.debounce(n.props.onChangeComplete,N,c),n.props.onChange&&n.props.onChange(N,c)}},n.handleSwatchHover=function(a,c){var l=Il(a);if(l){var N=Kr(a,a.h||n.state.oldHue);n.props.onSwatchHover&&n.props.onSwatchHover(N,c)}},n.state=Wr({},Kr(o.color,0)),n.debounce=X4(function(a,c,l){a(c,l)},100),n}return z2e(s,[{key:"render",value:function(){var n={};return this.props.onSwatchHover&&(n.onSwatchHover=this.handleSwatchHover),M.createElement(e,Wr({},this.props,this.state,{onChange:this.handleChange},n))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return Wr({},Kr(n.color,a.oldHue))}}]),s}(_.PureComponent||_.Component);return t.propTypes=Wr({},e.propTypes),t.defaultProps=Wr({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},m2e=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},A2e=function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();function f2e(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function ml(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function x2e(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var O2e=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){x2e(s,r);function s(){var o,n,a,c;f2e(this,s);for(var l=arguments.length,N=Array(l),u=0;u<l;u++)N[u]=arguments[u];return c=(n=(a=ml(this,(o=s.__proto__||Object.getPrototypeOf(s)).call.apply(o,[this].concat(N))),a),a.state={focus:!1},a.handleFocus=function(){return a.setState({focus:!0})},a.handleBlur=function(){return a.setState({focus:!1})},n),ml(a,c)}return A2e(s,[{key:"render",value:function(){return M.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},M.createElement(e,m2e({},this.props,this.state)))}}]),s}(M.Component)},Al=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},E2e=13,_2e=function(e){var t=e.color,r=e.style,s=e.onClick,o=s===void 0?function(){}:s,n=e.onHover,a=e.title,c=a===void 0?t:a,l=e.children,N=e.focus,u=e.focusStyle,g=u===void 0?{}:u,L=t==="transparent",d=K({default:{swatch:Al({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,N?g:{})}}),y=function(f){return o(t,f)},D=function(f){return f.keyCode===E2e&&o(t,f)},z=function(f){return n(t,f)},A={};return n&&(A.onMouseOver=z),M.createElement("div",Al({style:d.swatch,onClick:y,title:c,tabIndex:0,onKeyDown:D},A),l,L&&M.createElement(xr,{borderRadius:d.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const bi=O2e(_2e);var S2e=function(e){var t=e.direction,r=K({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return M.createElement("div",{style:r.picker})},k2e=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},tg=function(e){var t=e.rgb,r=e.hsl,s=e.width,o=e.height,n=e.onChange,a=e.direction,c=e.style,l=e.renderers,N=e.pointer,u=e.className,g=u===void 0?"":u,L=K({default:{picker:{position:"relative",width:s,height:o},alpha:{radius:"2px",style:c}}});return M.createElement("div",{style:L.picker,className:"alpha-picker "+g},M.createElement(vM,k2e({},L.alpha,{rgb:t,hsl:r,pointer:N,renderers:l,onChange:n,direction:a})))};tg.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:S2e};He(tg);function ig(i,e){for(var t=-1,r=i==null?0:i.length,s=Array(r);++t<r;)s[t]=e(i[t],t,i);return s}var v2e="__lodash_hash_undefined__";function b2e(i){return this.__data__.set(i,v2e),this}function Y2e(i){return this.__data__.has(i)}function Co(i){var e=-1,t=i==null?0:i.length;for(this.__data__=new $t;++e<t;)this.add(i[e])}Co.prototype.add=Co.prototype.push=b2e;Co.prototype.has=Y2e;function Q2e(i,e){for(var t=-1,r=i==null?0:i.length;++t<r;)if(e(i[t],t,i))return!0;return!1}function U2e(i,e){return i.has(e)}var $2e=1,P2e=2;function rg(i,e,t,r,s,o){var n=t&$2e,a=i.length,c=e.length;if(a!=c&&!(n&&c>a))return!1;var l=o.get(i),N=o.get(e);if(l&&N)return l==e&&N==i;var u=-1,g=!0,L=t&P2e?new Co:void 0;for(o.set(i,e),o.set(e,i);++u<a;){var d=i[u],y=e[u];if(r)var D=n?r(y,d,u,e,i,o):r(d,y,u,i,e,o);if(D!==void 0){if(D)continue;g=!1;break}if(L){if(!Q2e(e,function(z,A){if(!U2e(L,A)&&(d===z||s(d,z,t,r,o)))return L.push(A)})){g=!1;break}}else if(!(d===y||s(d,y,t,r,o))){g=!1;break}}return o.delete(i),o.delete(e),g}function R2e(i){var e=-1,t=Array(i.size);return i.forEach(function(r,s){t[++e]=[s,r]}),t}function W2e(i){var e=-1,t=Array(i.size);return i.forEach(function(r){t[++e]=r}),t}var B2e=1,F2e=2,J2e="[object Boolean]",G2e="[object Date]",H2e="[object Error]",V2e="[object Map]",Z2e="[object Number]",X2e="[object RegExp]",K2e="[object Set]",q2e="[object String]",efe="[object Symbol]",tfe="[object ArrayBuffer]",ife="[object DataView]",fl=si?si.prototype:void 0,Yn=fl?fl.valueOf:void 0;function rfe(i,e,t,r,s,o,n){switch(t){case ife:if(i.byteLength!=e.byteLength||i.byteOffset!=e.byteOffset)return!1;i=i.buffer,e=e.buffer;case tfe:return!(i.byteLength!=e.byteLength||!o(new ho(i),new ho(e)));case J2e:case G2e:case Z2e:return xs(+i,+e);case H2e:return i.name==e.name&&i.message==e.message;case X2e:case q2e:return i==e+"";case V2e:var a=R2e;case K2e:var c=r&B2e;if(a||(a=W2e),i.size!=e.size&&!c)return!1;var l=n.get(i);if(l)return l==e;r|=F2e,n.set(i,e);var N=rg(a(i),a(e),r,s,o,n);return n.delete(i),N;case efe:if(Yn)return Yn.call(i)==Yn.call(e)}return!1}function sfe(i,e){for(var t=-1,r=e.length,s=i.length;++t<r;)i[s+t]=e[t];return i}function ofe(i,e,t){var r=e(i);return Ke(i)?r:sfe(r,t(i))}function nfe(i,e){for(var t=-1,r=i==null?0:i.length,s=0,o=[];++t<r;){var n=i[t];e(n,t,i)&&(o[s++]=n)}return o}function afe(){return[]}var Mfe=Object.prototype,cfe=Mfe.propertyIsEnumerable,xl=Object.getOwnPropertySymbols,ufe=xl?function(i){return i==null?[]:(i=Object(i),nfe(xl(i),function(e){return cfe.call(i,e)}))}:afe;function Ol(i){return ofe(i,RM,ufe)}var lfe=1,Nfe=Object.prototype,gfe=Nfe.hasOwnProperty;function Lfe(i,e,t,r,s,o){var n=t&lfe,a=Ol(i),c=a.length,l=Ol(e),N=l.length;if(c!=N&&!n)return!1;for(var u=c;u--;){var g=a[u];if(!(n?g in e:gfe.call(e,g)))return!1}var L=o.get(i),d=o.get(e);if(L&&d)return L==e&&d==i;var y=!0;o.set(i,e),o.set(e,i);for(var D=n;++u<c;){g=a[u];var z=i[g],A=e[g];if(r)var C=n?r(A,z,g,e,i,o):r(z,A,g,i,e,o);if(!(C===void 0?z===A||s(z,A,t,r,o):C)){y=!1;break}D||(D=g=="constructor")}if(y&&!D){var f=i.constructor,m=e.constructor;f!=m&&"constructor"in i&&"constructor"in e&&!(typeof f=="function"&&f instanceof f&&typeof m=="function"&&m instanceof m)&&(y=!1)}return o.delete(i),o.delete(e),y}var wa=vi(Nt,"DataView"),Ca=vi(Nt,"Promise"),Ia=vi(Nt,"Set"),ma=vi(Nt,"WeakMap"),El="[object Map]",jfe="[object Object]",_l="[object Promise]",Sl="[object Set]",kl="[object WeakMap]",vl="[object DataView]",dfe=ki(wa),yfe=ki(cs),Tfe=ki(Ca),Dfe=ki(Ia),hfe=ki(ma),Zt=Si;(wa&&Zt(new wa(new ArrayBuffer(1)))!=vl||cs&&Zt(new cs)!=El||Ca&&Zt(Ca.resolve())!=_l||Ia&&Zt(new Ia)!=Sl||ma&&Zt(new ma)!=kl)&&(Zt=function(i){var e=Si(i),t=e==jfe?i.constructor:void 0,r=t?ki(t):"";if(r)switch(r){case dfe:return vl;case yfe:return El;case Tfe:return _l;case Dfe:return Sl;case hfe:return kl}return e});var pfe=1,bl="[object Arguments]",Yl="[object Array]",Ws="[object Object]",zfe=Object.prototype,Ql=zfe.hasOwnProperty;function wfe(i,e,t,r,s,o){var n=Ke(i),a=Ke(e),c=n?Yl:Zt(i),l=a?Yl:Zt(e);c=c==bl?Ws:c,l=l==bl?Ws:l;var N=c==Ws,u=l==Ws,g=c==l;if(g&&zo(i)){if(!zo(e))return!1;n=!0,N=!1}if(g&&!N)return o||(o=new pt),n||$M(i)?rg(i,e,t,r,s,o):rfe(i,e,c,t,r,s,o);if(!(t&pfe)){var L=N&&Ql.call(i,"__wrapped__"),d=u&&Ql.call(e,"__wrapped__");if(L||d){var y=L?i.value():i,D=d?e.value():e;return o||(o=new pt),s(y,D,t,r,o)}}return g?(o||(o=new pt),Lfe(i,e,t,r,s,o)):!1}function BM(i,e,t,r,s){return i===e?!0:i==null||e==null||!oi(i)&&!oi(e)?i!==i&&e!==e:wfe(i,e,t,r,BM,s)}var Cfe=1,Ife=2;function mfe(i,e,t,r){var s=t.length,o=s;if(i==null)return!o;for(i=Object(i);s--;){var n=t[s];if(n[2]?n[1]!==i[n[0]]:!(n[0]in i))return!1}for(;++s<o;){n=t[s];var a=n[0],c=i[a],l=n[1];if(n[2]){if(c===void 0&&!(a in i))return!1}else{var N=new pt,u;if(!(u===void 0?BM(l,c,Cfe|Ife,r,N):u))return!1}}return!0}function sg(i){return i===i&&!st(i)}function Afe(i){for(var e=RM(i),t=e.length;t--;){var r=e[t],s=i[r];e[t]=[r,s,sg(s)]}return e}function og(i,e){return function(t){return t==null?!1:t[i]===e&&(e!==void 0||i in Object(t))}}function ffe(i){var e=Afe(i);return e.length==1&&e[0][2]?og(e[0][0],e[0][1]):function(t){return t===i||mfe(t,i,e)}}var xfe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ofe=/^\w*$/;function FM(i,e){if(Ke(i))return!1;var t=typeof i;return t=="number"||t=="symbol"||t=="boolean"||i==null||qo(i)?!0:Ofe.test(i)||!xfe.test(i)||e!=null&&i in Object(e)}var Efe="Expected a function";function JM(i,e){if(typeof i!="function"||e!=null&&typeof e!="function")throw new TypeError(Efe);var t=function(){var r=arguments,s=e?e.apply(this,r):r[0],o=t.cache;if(o.has(s))return o.get(s);var n=i.apply(this,r);return t.cache=o.set(s,n)||o,n};return t.cache=new(JM.Cache||$t),t}JM.Cache=$t;var _fe=500;function Sfe(i){var e=JM(i,function(r){return t.size===_fe&&t.clear(),r}),t=e.cache;return e}var kfe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vfe=/\\(\\)?/g,bfe=Sfe(function(i){var e=[];return i.charCodeAt(0)===46&&e.push(""),i.replace(kfe,function(t,r,s,o){e.push(s?o.replace(vfe,"$1"):r||t)}),e}),Ul=si?si.prototype:void 0,$l=Ul?Ul.toString:void 0;function ng(i){if(typeof i=="string")return i;if(Ke(i))return ig(i,ng)+"";if(qo(i))return $l?$l.call(i):"";var e=i+"";return e=="0"&&1/i==-1/0?"-0":e}function Yfe(i){return i==null?"":ng(i)}function ag(i,e){return Ke(i)?i:FM(i,e)?[i]:bfe(Yfe(i))}function rn(i){if(typeof i=="string"||qo(i))return i;var e=i+"";return e=="0"&&1/i==-1/0?"-0":e}function Mg(i,e){e=ag(e,i);for(var t=0,r=e.length;i!=null&&t<r;)i=i[rn(e[t++])];return t&&t==r?i:void 0}function Qfe(i,e,t){var r=i==null?void 0:Mg(i,e);return r===void 0?t:r}function Ufe(i,e){return i!=null&&e in Object(i)}function $fe(i,e,t){e=ag(e,i);for(var r=-1,s=e.length,o=!1;++r<s;){var n=rn(e[r]);if(!(o=i!=null&&t(i,n)))break;i=i[n]}return o||++r!=s?o:(s=i==null?0:i.length,!!s&&UM(s)&&PM(n,s)&&(Ke(i)||po(i)))}function Pfe(i,e){return i!=null&&$fe(i,e,Ufe)}var Rfe=1,Wfe=2;function Bfe(i,e){return FM(i)&&sg(e)?og(rn(i),e):function(t){var r=Qfe(t,i);return r===void 0&&r===e?Pfe(t,i):BM(e,r,Rfe|Wfe)}}function Ffe(i){return function(e){return e==null?void 0:e[i]}}function Jfe(i){return function(e){return Mg(e,i)}}function Gfe(i){return FM(i)?Ffe(rn(i)):Jfe(i)}function Hfe(i){return typeof i=="function"?i:i==null?Ko:typeof i=="object"?Ke(i)?Bfe(i[0],i[1]):ffe(i):Gfe(i)}function Vfe(i,e){var t=-1,r=Er(i)?Array(i.length):[];return K4(i,function(s,o,n){r[++t]=e(s,o,n)}),r}function Yi(i,e){var t=Ke(i)?ig:Vfe;return t(i,Hfe(e))}var Zfe=function(e){var t=e.colors,r=e.onClick,s=e.onSwatchHover,o=K({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return M.createElement("div",{style:o.swatches},Yi(t,function(n){return M.createElement(bi,{key:n,color:n,style:o.swatch,onClick:r,onHover:s,focusStyle:{boxShadow:"0 0 4px "+n}})}),M.createElement("div",{style:o.clear}))},GM=function(e){var t=e.onChange,r=e.onSwatchHover,s=e.hex,o=e.colors,n=e.width,a=e.triangle,c=e.styles,l=c===void 0?{}:c,N=e.className,u=N===void 0?"":N,g=s==="transparent",L=function(D,z){ai(D)&&t({hex:D,source:"hex"},z)},d=K(Ge({default:{card:{width:n,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:s,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:WM(s),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+s+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},l),{"hide-triangle":a==="hide"});return M.createElement("div",{style:d.card,className:"block-picker "+u},M.createElement("div",{style:d.triangle}),M.createElement("div",{style:d.head},g&&M.createElement(xr,{borderRadius:"6px 6px 0 0"}),M.createElement("div",{style:d.label},s)),M.createElement("div",{style:d.body},M.createElement(Zfe,{colors:o,onClick:L,onSwatchHover:r}),M.createElement(re,{style:{input:d.input},value:s,onChange:L})))};GM.propTypes={width:S.oneOfType([S.string,S.number]),colors:S.arrayOf(S.string),triangle:S.oneOf(["top","hide"]),styles:S.object};GM.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};He(GM);var Ji={100:"#ffcdd2",300:"#e57373",500:"#f44336",700:"#d32f2f",900:"#b71c1c"},Gi={100:"#f8bbd0",300:"#f06292",500:"#e91e63",700:"#c2185b",900:"#880e4f"},Hi={100:"#e1bee7",300:"#ba68c8",500:"#9c27b0",700:"#7b1fa2",900:"#4a148c"},Vi={100:"#d1c4e9",300:"#9575cd",500:"#673ab7",700:"#512da8",900:"#311b92"},Zi={100:"#c5cae9",300:"#7986cb",500:"#3f51b5",700:"#303f9f",900:"#1a237e"},Xi={100:"#bbdefb",300:"#64b5f6",500:"#2196f3",700:"#1976d2",900:"#0d47a1"},Ki={100:"#b3e5fc",300:"#4fc3f7",500:"#03a9f4",700:"#0288d1",900:"#01579b"},qi={100:"#b2ebf2",300:"#4dd0e1",500:"#00bcd4",700:"#0097a7",900:"#006064"},er={100:"#b2dfdb",300:"#4db6ac",500:"#009688",700:"#00796b",900:"#004d40"},qr={100:"#c8e6c9",300:"#81c784",500:"#4caf50",700:"#388e3c"},tr={100:"#dcedc8",300:"#aed581",500:"#8bc34a",700:"#689f38",900:"#33691e"},ir={100:"#f0f4c3",300:"#dce775",500:"#cddc39",700:"#afb42b",900:"#827717"},rr={100:"#fff9c4",300:"#fff176",500:"#ffeb3b",700:"#fbc02d",900:"#f57f17"},sr={100:"#ffecb3",300:"#ffd54f",500:"#ffc107",700:"#ffa000",900:"#ff6f00"},or={100:"#ffe0b2",300:"#ffb74d",500:"#ff9800",700:"#f57c00",900:"#e65100"},nr={100:"#ffccbc",300:"#ff8a65",500:"#ff5722",700:"#e64a19",900:"#bf360c"},ar={100:"#d7ccc8",300:"#a1887f",500:"#795548",700:"#5d4037",900:"#3e2723"},Mr={100:"#cfd8dc",300:"#90a4ae",500:"#607d8b",700:"#455a64",900:"#263238"},cg=function(e){var t=e.color,r=e.onClick,s=e.onSwatchHover,o=e.hover,n=e.active,a=e.circleSize,c=e.circleSpacing,l=K({default:{swatch:{width:a,height:a,marginRight:c,marginBottom:c,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(a/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:o,active:n});return M.createElement("div",{style:l.swatch},M.createElement(bi,{style:l.Swatch,color:t,onClick:r,onHover:s,focusStyle:{boxShadow:l.Swatch.boxShadow+", 0 0 5px "+t}}))};cg.defaultProps={circleSize:28,circleSpacing:14};const Xfe=kM(cg);var HM=function(e){var t=e.width,r=e.onChange,s=e.onSwatchHover,o=e.colors,n=e.hex,a=e.circleSize,c=e.styles,l=c===void 0?{}:c,N=e.circleSpacing,u=e.className,g=u===void 0?"":u,L=K(Ge({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-N,marginBottom:-N}}},l)),d=function(D,z){return r({hex:D,source:"hex"},z)};return M.createElement("div",{style:L.card,className:"circle-picker "+g},Yi(o,function(y){return M.createElement(Xfe,{key:y,color:y,onClick:d,onSwatchHover:s,active:n===y.toLowerCase(),circleSize:a,circleSpacing:N})}))};HM.propTypes={width:S.oneOfType([S.string,S.number]),circleSize:S.number,circleSpacing:S.number,styles:S.object};HM.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Ji[500],Gi[500],Hi[500],Vi[500],Zi[500],Xi[500],Ki[500],qi[500],er[500],qr[500],tr[500],ir[500],rr[500],sr[500],or[500],nr[500],ar[500],Mr[500]],styles:{}};He(HM);function Pl(i){return i===void 0}var ug={};Object.defineProperty(ug,"__esModule",{value:!0});var Rl=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},Kfe=_,Wl=qfe(Kfe);function qfe(i){return i&&i.__esModule?i:{default:i}}function exe(i,e){var t={};for(var r in i)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}var Bs=24,txe=ug.default=function(i){var e=i.fill,t=e===void 0?"currentColor":e,r=i.width,s=r===void 0?Bs:r,o=i.height,n=o===void 0?Bs:o,a=i.style,c=a===void 0?{}:a,l=exe(i,["fill","width","height","style"]);return Wl.default.createElement("svg",Rl({viewBox:"0 0 "+Bs+" "+Bs,style:Rl({fill:t,width:s,height:n},c)},l),Wl.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},ixe=function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();function rxe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function sxe(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function oxe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var lg=function(i){oxe(e,i);function e(t){rxe(this,e);var r=sxe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(s,o){s.hex?ai(s.hex)&&r.props.onChange({hex:s.hex,source:"hex"},o):s.r||s.g||s.b?r.props.onChange({r:s.r||r.props.rgb.r,g:s.g||r.props.rgb.g,b:s.b||r.props.rgb.b,source:"rgb"},o):s.a?(s.a<0?s.a=0:s.a>1&&(s.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(s.a*100)/100,source:"rgb"},o)):(s.h||s.s||s.l)&&(typeof s.s=="string"&&s.s.includes("%")&&(s.s=s.s.replace("%","")),typeof s.l=="string"&&s.l.includes("%")&&(s.l=s.l.replace("%","")),s.s==1?s.s=.01:s.l==1&&(s.l=.01),r.props.onChange({h:s.h||r.props.hsl.h,s:Number(Pl(s.s)?r.props.hsl.s:s.s),l:Number(Pl(s.l)?r.props.hsl.l:s.l),source:"hsl"},o))},r.showHighlight=function(s){s.currentTarget.style.background="#eee"},r.hideHighlight=function(s){s.currentTarget.style.background="transparent"},t.hsl.a!==1&&t.view==="hex"?r.state={view:"rgb"}:r.state={view:t.view},r}return ixe(e,[{key:"render",value:function(){var r=this,s=K({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=M.createElement("div",{style:s.fields,className:"flexbox-fix"},M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=M.createElement("div",{style:s.fields,className:"flexbox-fix"},M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),M.createElement("div",{style:s.alpha},M.createElement(re,{style:{input:s.input,label:s.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=M.createElement("div",{style:s.fields,className:"flexbox-fix"},M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),M.createElement("div",{style:s.alpha},M.createElement(re,{style:{input:s.input,label:s.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),M.createElement("div",{style:s.wrap,className:"flexbox-fix"},o,M.createElement("div",{style:s.toggle},M.createElement("div",{style:s.icon,onClick:this.toggleViews,ref:function(a){return r.icon=a}},M.createElement(txe,{style:s.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,s){return r.hsl.a!==1&&s.view==="hex"?{view:"rgb"}:null}}]),e}(M.Component);lg.defaultProps={view:"hex"};var Bl=function(){var e=K({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return M.createElement("div",{style:e.picker})},nxe=function(){var e=K({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return M.createElement("div",{style:e.picker})},VM=function(e){var t=e.width,r=e.onChange,s=e.disableAlpha,o=e.rgb,n=e.hsl,a=e.hsv,c=e.hex,l=e.renderers,N=e.styles,u=N===void 0?{}:N,g=e.className,L=g===void 0?"":g,d=e.defaultView,y=K(Ge({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},u),{disableAlpha:s});return M.createElement("div",{style:y.picker,className:"chrome-picker "+L},M.createElement("div",{style:y.saturation},M.createElement(en,{style:y.Saturation,hsl:n,hsv:a,pointer:nxe,onChange:r})),M.createElement("div",{style:y.body},M.createElement("div",{style:y.controls,className:"flexbox-fix"},M.createElement("div",{style:y.color},M.createElement("div",{style:y.swatch},M.createElement("div",{style:y.active}),M.createElement(xr,{renderers:l}))),M.createElement("div",{style:y.toggles},M.createElement("div",{style:y.hue},M.createElement(Or,{style:y.Hue,hsl:n,pointer:Bl,onChange:r})),M.createElement("div",{style:y.alpha},M.createElement(vM,{style:y.Alpha,rgb:o,hsl:n,pointer:Bl,renderers:l,onChange:r})))),M.createElement(lg,{rgb:o,hsl:n,hex:c,view:d,onChange:r,disableAlpha:s})))};VM.propTypes={width:S.oneOfType([S.string,S.number]),disableAlpha:S.bool,styles:S.object,defaultView:S.oneOf(["hex","rgb","hsl"])};VM.defaultProps={width:225,disableAlpha:!1,styles:{}};const axe=He(VM);var Mxe=function(e){var t=e.color,r=e.onClick,s=r===void 0?function(){}:r,o=e.onSwatchHover,n=e.active,a=K({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:WM(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:n,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return M.createElement(bi,{style:a.color,color:t,onClick:s,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},M.createElement("div",{style:a.dot}))},cxe=function(e){var t=e.hex,r=e.rgb,s=e.onChange,o=K({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),n=function(c,l){c.r||c.g||c.b?s({r:c.r||r.r,g:c.g||r.g,b:c.b||r.b,source:"rgb"},l):s({hex:c.hex,source:"hex"},l)};return M.createElement("div",{style:o.fields,className:"flexbox-fix"},M.createElement("div",{style:o.active}),M.createElement(re,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:t,onChange:n}),M.createElement(re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:r.r,onChange:n}),M.createElement(re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:r.g,onChange:n}),M.createElement(re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:r.b,onChange:n}))},ZM=function(e){var t=e.onChange,r=e.onSwatchHover,s=e.colors,o=e.hex,n=e.rgb,a=e.styles,c=a===void 0?{}:a,l=e.className,N=l===void 0?"":l,u=K(Ge({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},c)),g=function(d,y){d.hex?ai(d.hex)&&t({hex:d.hex,source:"hex"},y):t(d,y)};return M.createElement(Os,{style:u.Compact,styles:c},M.createElement("div",{style:u.compact,className:"compact-picker "+N},M.createElement("div",null,Yi(s,function(L){return M.createElement(Mxe,{key:L,color:L,active:L.toLowerCase()===o,onClick:g,onSwatchHover:r})}),M.createElement("div",{style:u.clear})),M.createElement(cxe,{hex:o,rgb:n,onChange:g})))};ZM.propTypes={colors:S.arrayOf(S.string),styles:S.object};ZM.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};He(ZM);var uxe=function(e){var t=e.hover,r=e.color,s=e.onClick,o=e.onSwatchHover,n={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},a=K({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:n}},{hover:t});return M.createElement("div",{style:a.swatch},M.createElement(bi,{color:r,onClick:s,onHover:o,focusStyle:n}))};const lxe=kM(uxe);var XM=function(e){var t=e.width,r=e.colors,s=e.onChange,o=e.onSwatchHover,n=e.triangle,a=e.styles,c=a===void 0?{}:a,l=e.className,N=l===void 0?"":l,u=K(Ge({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},c),{"hide-triangle":n==="hide","top-left-triangle":n==="top-left","top-right-triangle":n==="top-right","bottom-left-triangle":n==="bottom-left","bottom-right-triangle":n==="bottom-right"}),g=function(d,y){return s({hex:d,source:"hex"},y)};return M.createElement("div",{style:u.card,className:"github-picker "+N},M.createElement("div",{style:u.triangleShadow}),M.createElement("div",{style:u.triangle}),Yi(r,function(L){return M.createElement(lxe,{color:L,key:L,onClick:g,onSwatchHover:o})}))};XM.propTypes={width:S.oneOfType([S.string,S.number]),colors:S.arrayOf(S.string),triangle:S.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:S.object};XM.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};He(XM);var Nxe=function(e){var t=e.direction,r=K({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return M.createElement("div",{style:r.picker})},gxe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},KM=function(e){var t=e.width,r=e.height,s=e.onChange,o=e.hsl,n=e.direction,a=e.pointer,c=e.styles,l=c===void 0?{}:c,N=e.className,u=N===void 0?"":N,g=K(Ge({default:{picker:{position:"relative",width:t,height:r},hue:{radius:"2px"}}},l)),L=function(y){return s({a:1,h:y.h,l:.5,s:1})};return M.createElement("div",{style:g.picker,className:"hue-picker "+u},M.createElement(Or,gxe({},g.hue,{hsl:o,pointer:a,onChange:L,direction:n})))};KM.propTypes={styles:S.object};KM.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Nxe,styles:{}};He(KM);var Lxe=function(e){var t=e.onChange,r=e.hex,s=e.rgb,o=e.styles,n=o===void 0?{}:o,a=e.className,c=a===void 0?"":a,l=K(Ge({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},n)),N=function(g,L){g.hex?ai(g.hex)&&t({hex:g.hex,source:"hex"},L):(g.r||g.g||g.b)&&t({r:g.r||s.r,g:g.g||s.g,b:g.b||s.b,source:"rgb"},L)};return M.createElement(Os,{styles:n},M.createElement("div",{style:l.material,className:"material-picker "+c},M.createElement(re,{style:{wrap:l.HEXwrap,input:l.HEXinput,label:l.HEXlabel},label:"hex",value:r,onChange:N}),M.createElement("div",{style:l.split,className:"flexbox-fix"},M.createElement("div",{style:l.third},M.createElement(re,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"r",value:s.r,onChange:N})),M.createElement("div",{style:l.third},M.createElement(re,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"g",value:s.g,onChange:N})),M.createElement("div",{style:l.third},M.createElement(re,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"b",value:s.b,onChange:N})))))};He(Lxe);var jxe=function(e){var t=e.onChange,r=e.rgb,s=e.hsv,o=e.hex,n=K({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),a=function(l,N){l["#"]?ai(l["#"])&&t({hex:l["#"],source:"hex"},N):l.r||l.g||l.b?t({r:l.r||r.r,g:l.g||r.g,b:l.b||r.b,source:"rgb"},N):(l.h||l.s||l.v)&&t({h:l.h||s.h,s:l.s||s.s,v:l.v||s.v,source:"hsv"},N)};return M.createElement("div",{style:n.fields},M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"h",value:Math.round(s.h),onChange:a}),M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"s",value:Math.round(s.s*100),onChange:a}),M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"v",value:Math.round(s.v*100),onChange:a}),M.createElement("div",{style:n.divider}),M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"r",value:r.r,onChange:a}),M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"g",value:r.g,onChange:a}),M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"b",value:r.b,onChange:a}),M.createElement("div",{style:n.divider}),M.createElement(re,{style:{wrap:n.HEXwrap,input:n.HEXinput,label:n.HEXlabel},label:"#",value:o.replace("#",""),onChange:a}),M.createElement("div",{style:n.fieldSymbols},M.createElement("div",{style:n.symbol},"°"),M.createElement("div",{style:n.symbol},"%"),M.createElement("div",{style:n.symbol},"%")))},dxe=function(e){var t=e.hsl,r=K({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return M.createElement("div",{style:r.picker})},yxe=function(){var e=K({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return M.createElement("div",{style:e.pointer},M.createElement("div",{style:e.left},M.createElement("div",{style:e.leftInside})),M.createElement("div",{style:e.right},M.createElement("div",{style:e.rightInside})))},Fl=function(e){var t=e.onClick,r=e.label,s=e.children,o=e.active,n=K({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return M.createElement("div",{style:n.button,onClick:t},r||s)},Txe=function(e){var t=e.rgb,r=e.currentColor,s=K({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return M.createElement("div",null,M.createElement("div",{style:s.label},"new"),M.createElement("div",{style:s.swatches},M.createElement("div",{style:s.new}),M.createElement("div",{style:s.current})),M.createElement("div",{style:s.label},"current"))},Dxe=function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}}();function hxe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function pxe(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function zxe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var qM=function(i){zxe(e,i);function e(t){hxe(this,e);var r=pxe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.state={currentColor:t.hex},r}return Dxe(e,[{key:"render",value:function(){var r=this.props,s=r.styles,o=s===void 0?{}:s,n=r.className,a=n===void 0?"":n,c=K(Ge({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},o));return M.createElement("div",{style:c.picker,className:"photoshop-picker "+a},M.createElement("div",{style:c.head},this.props.header),M.createElement("div",{style:c.body,className:"flexbox-fix"},M.createElement("div",{style:c.saturation},M.createElement(en,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:dxe,onChange:this.props.onChange})),M.createElement("div",{style:c.hue},M.createElement(Or,{direction:"vertical",hsl:this.props.hsl,pointer:yxe,onChange:this.props.onChange})),M.createElement("div",{style:c.controls},M.createElement("div",{style:c.top,className:"flexbox-fix"},M.createElement("div",{style:c.previews},M.createElement(Txe,{rgb:this.props.rgb,currentColor:this.state.currentColor})),M.createElement("div",{style:c.actions},M.createElement(Fl,{label:"OK",onClick:this.props.onAccept,active:!0}),M.createElement(Fl,{label:"Cancel",onClick:this.props.onCancel}),M.createElement(jxe,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),e}(M.Component);qM.propTypes={header:S.string,styles:S.object};qM.defaultProps={header:"Color Picker",styles:{}};He(qM);var wxe=function(e){var t=e.onChange,r=e.rgb,s=e.hsl,o=e.hex,n=e.disableAlpha,a=K({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:n}),c=function(N,u){N.hex?ai(N.hex)&&t({hex:N.hex,source:"hex"},u):N.r||N.g||N.b?t({r:N.r||r.r,g:N.g||r.g,b:N.b||r.b,a:r.a,source:"rgb"},u):N.a&&(N.a<0?N.a=0:N.a>100&&(N.a=100),N.a/=100,t({h:s.h,s:s.s,l:s.l,a:N.a,source:"rgb"},u))};return M.createElement("div",{style:a.fields,className:"flexbox-fix"},M.createElement("div",{style:a.double},M.createElement(re,{style:{input:a.input,label:a.label},label:"hex",value:o.replace("#",""),onChange:c})),M.createElement("div",{style:a.single},M.createElement(re,{style:{input:a.input,label:a.label},label:"r",value:r.r,onChange:c,dragLabel:"true",dragMax:"255"})),M.createElement("div",{style:a.single},M.createElement(re,{style:{input:a.input,label:a.label},label:"g",value:r.g,onChange:c,dragLabel:"true",dragMax:"255"})),M.createElement("div",{style:a.single},M.createElement(re,{style:{input:a.input,label:a.label},label:"b",value:r.b,onChange:c,dragLabel:"true",dragMax:"255"})),M.createElement("div",{style:a.alpha},M.createElement(re,{style:{input:a.input,label:a.label},label:"a",value:Math.round(r.a*100),onChange:c,dragLabel:"true",dragMax:"100"})))},Cxe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},Ng=function(e){var t=e.colors,r=e.onClick,s=r===void 0?function(){}:r,o=e.onSwatchHover,n=K({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),a=function(l,N){s({hex:l,source:"hex"},N)};return M.createElement("div",{style:n.colors,className:"flexbox-fix"},t.map(function(c){var l=typeof c=="string"?{color:c}:c,N=""+l.color+(l.title||"");return M.createElement("div",{key:N,style:n.swatchWrap},M.createElement(bi,Cxe({},l,{style:n.swatch,onClick:a,onHover:o,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+l.color}})))}))};Ng.propTypes={colors:S.arrayOf(S.oneOfType([S.string,S.shape({color:S.string,title:S.string})])).isRequired};var Ixe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},ec=function(e){var t=e.width,r=e.rgb,s=e.hex,o=e.hsv,n=e.hsl,a=e.onChange,c=e.onSwatchHover,l=e.disableAlpha,N=e.presetColors,u=e.renderers,g=e.styles,L=g===void 0?{}:g,d=e.className,y=d===void 0?"":d,D=K(Ge({default:Ixe({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},L),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},L),{disableAlpha:l});return M.createElement("div",{style:D.picker,className:"sketch-picker "+y},M.createElement("div",{style:D.saturation},M.createElement(en,{style:D.Saturation,hsl:n,hsv:o,onChange:a})),M.createElement("div",{style:D.controls,className:"flexbox-fix"},M.createElement("div",{style:D.sliders},M.createElement("div",{style:D.hue},M.createElement(Or,{style:D.Hue,hsl:n,onChange:a})),M.createElement("div",{style:D.alpha},M.createElement(vM,{style:D.Alpha,rgb:r,hsl:n,renderers:u,onChange:a}))),M.createElement("div",{style:D.color},M.createElement(xr,null),M.createElement("div",{style:D.activeColor}))),M.createElement(wxe,{rgb:r,hsl:n,hex:s,onChange:a,disableAlpha:l}),M.createElement(Ng,{colors:N,onClick:a,onSwatchHover:c}))};ec.propTypes={disableAlpha:S.bool,width:S.oneOfType([S.string,S.number]),styles:S.object};ec.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};He(ec);var Br=function(e){var t=e.hsl,r=e.offset,s=e.onClick,o=s===void 0?function(){}:s,n=e.active,a=e.first,c=e.last,l=K({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+r*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:n,first:a,last:c}),N=function(g){return o({h:t.h,s:.5,l:r,source:"hsl"},g)};return M.createElement("div",{style:l.swatch,onClick:N})},mxe=function(e){var t=e.onClick,r=e.hsl,s=K({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),o=.1;return M.createElement("div",{style:s.swatches},M.createElement("div",{style:s.swatch},M.createElement(Br,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<o&&Math.abs(r.s-.5)<o,onClick:t,first:!0})),M.createElement("div",{style:s.swatch},M.createElement(Br,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<o&&Math.abs(r.s-.5)<o,onClick:t})),M.createElement("div",{style:s.swatch},M.createElement(Br,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<o&&Math.abs(r.s-.5)<o,onClick:t})),M.createElement("div",{style:s.swatch},M.createElement(Br,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<o&&Math.abs(r.s-.5)<o,onClick:t})),M.createElement("div",{style:s.swatch},M.createElement(Br,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<o&&Math.abs(r.s-.5)<o,onClick:t,last:!0})),M.createElement("div",{style:s.clear}))},Axe=function(){var e=K({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return M.createElement("div",{style:e.picker})},tc=function(e){var t=e.hsl,r=e.onChange,s=e.pointer,o=e.styles,n=o===void 0?{}:o,a=e.className,c=a===void 0?"":a,l=K(Ge({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},n));return M.createElement("div",{style:l.wrap||{},className:"slider-picker "+c},M.createElement("div",{style:l.hue},M.createElement(Or,{style:l.Hue,hsl:t,pointer:s,onChange:r})),M.createElement("div",{style:l.swatches},M.createElement(mxe,{hsl:t,onClick:r})))};tc.propTypes={styles:S.object};tc.defaultProps={pointer:Axe,styles:{}};He(tc);var gg={};Object.defineProperty(gg,"__esModule",{value:!0});var Jl=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},fxe=_,Gl=xxe(fxe);function xxe(i){return i&&i.__esModule?i:{default:i}}function Oxe(i,e){var t={};for(var r in i)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}var Fs=24,Exe=gg.default=function(i){var e=i.fill,t=e===void 0?"currentColor":e,r=i.width,s=r===void 0?Fs:r,o=i.height,n=o===void 0?Fs:o,a=i.style,c=a===void 0?{}:a,l=Oxe(i,["fill","width","height","style"]);return Gl.default.createElement("svg",Jl({viewBox:"0 0 "+Fs+" "+Fs,style:Jl({fill:t,width:s,height:n},c)},l),Gl.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},_xe=function(e){var t=e.color,r=e.onClick,s=r===void 0?function(){}:r,o=e.onSwatchHover,n=e.first,a=e.last,c=e.active,l=K({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:WM(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:n,last:a,active:c,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return M.createElement(bi,{color:t,style:l.color,onClick:s,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},M.createElement("div",{style:l.check},M.createElement(Exe,null)))},Sxe=function(e){var t=e.onClick,r=e.onSwatchHover,s=e.group,o=e.active,n=K({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return M.createElement("div",{style:n.group},Yi(s,function(a,c){return M.createElement(_xe,{key:a,color:a,active:a.toLowerCase()===o,first:c===0,last:c===s.length-1,onClick:t,onSwatchHover:r})}))},ic=function(e){var t=e.width,r=e.height,s=e.onChange,o=e.onSwatchHover,n=e.colors,a=e.hex,c=e.styles,l=c===void 0?{}:c,N=e.className,u=N===void 0?"":N,g=K(Ge({default:{picker:{width:t,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},l)),L=function(y,D){return s({hex:y,source:"hex"},D)};return M.createElement("div",{style:g.picker,className:"swatches-picker "+u},M.createElement(Os,null,M.createElement("div",{style:g.overflow},M.createElement("div",{style:g.body},Yi(n,function(d){return M.createElement(Sxe,{key:d.toString(),group:d,active:a,onClick:L,onSwatchHover:o})}),M.createElement("div",{style:g.clear})))))};ic.propTypes={width:S.oneOfType([S.string,S.number]),height:S.oneOfType([S.string,S.number]),colors:S.arrayOf(S.arrayOf(S.string)),styles:S.object};ic.defaultProps={width:320,height:240,colors:[[Ji[900],Ji[700],Ji[500],Ji[300],Ji[100]],[Gi[900],Gi[700],Gi[500],Gi[300],Gi[100]],[Hi[900],Hi[700],Hi[500],Hi[300],Hi[100]],[Vi[900],Vi[700],Vi[500],Vi[300],Vi[100]],[Zi[900],Zi[700],Zi[500],Zi[300],Zi[100]],[Xi[900],Xi[700],Xi[500],Xi[300],Xi[100]],[Ki[900],Ki[700],Ki[500],Ki[300],Ki[100]],[qi[900],qi[700],qi[500],qi[300],qi[100]],[er[900],er[700],er[500],er[300],er[100]],["#194D33",qr[700],qr[500],qr[300],qr[100]],[tr[900],tr[700],tr[500],tr[300],tr[100]],[ir[900],ir[700],ir[500],ir[300],ir[100]],[rr[900],rr[700],rr[500],rr[300],rr[100]],[sr[900],sr[700],sr[500],sr[300],sr[100]],[or[900],or[700],or[500],or[300],or[100]],[nr[900],nr[700],nr[500],nr[300],nr[100]],[ar[900],ar[700],ar[500],ar[300],ar[100]],[Mr[900],Mr[700],Mr[500],Mr[300],Mr[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};He(ic);var rc=function(e){var t=e.onChange,r=e.onSwatchHover,s=e.hex,o=e.colors,n=e.width,a=e.triangle,c=e.styles,l=c===void 0?{}:c,N=e.className,u=N===void 0?"":N,g=K(Ge({default:{card:{width:n,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},l),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right"}),L=function(y,D){ai(y)&&t({hex:y,source:"hex"},D)};return M.createElement("div",{style:g.card,className:"twitter-picker "+u},M.createElement("div",{style:g.triangleShadow}),M.createElement("div",{style:g.triangle}),M.createElement("div",{style:g.body},Yi(o,function(d,y){return M.createElement(bi,{key:y,color:d,hex:d,style:g.swatch,onClick:L,onHover:r,focusStyle:{boxShadow:"0 0 4px "+d}})}),M.createElement("div",{style:g.hash},"#"),M.createElement(re,{label:null,style:{input:g.input},value:s.replace("#",""),onChange:L}),M.createElement("div",{style:g.clear})))};rc.propTypes={width:S.oneOfType([S.string,S.number]),triangle:S.oneOf(["hide","top-left","top-right"]),colors:S.arrayOf(S.string),styles:S.object};rc.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};He(rc);var sc=function(e){var t=K({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return M.createElement("div",{style:t.picker})};sc.propTypes={hsl:S.shape({h:S.number,s:S.number,l:S.number,a:S.number})};sc.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var oc=function(e){var t=K({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return M.createElement("div",{style:t.picker})};oc.propTypes={hsl:S.shape({h:S.number,s:S.number,l:S.number,a:S.number})};oc.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var kxe=function(e){var t=e.onChange,r=e.rgb,s=e.hsl,o=e.hex,n=e.hsv,a=function(L,d){if(L.hex)ai(L.hex)&&t({hex:L.hex,source:"hex"},d);else if(L.rgb){var y=L.rgb.split(",");bn(L.rgb,"rgb")&&t({r:y[0],g:y[1],b:y[2],a:1,source:"rgb"},d)}else if(L.hsv){var D=L.hsv.split(",");bn(L.hsv,"hsv")&&(D[2]=D[2].replace("%",""),D[1]=D[1].replace("%",""),D[0]=D[0].replace("°",""),D[1]==1?D[1]=.01:D[2]==1&&(D[2]=.01),t({h:Number(D[0]),s:Number(D[1]),v:Number(D[2]),source:"hsv"},d))}else if(L.hsl){var z=L.hsl.split(",");bn(L.hsl,"hsl")&&(z[2]=z[2].replace("%",""),z[1]=z[1].replace("%",""),z[0]=z[0].replace("°",""),u[1]==1?u[1]=.01:u[2]==1&&(u[2]=.01),t({h:Number(z[0]),s:Number(z[1]),v:Number(z[2]),source:"hsl"},d))}},c=K({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),l=r.r+", "+r.g+", "+r.b,N=Math.round(s.h)+"°, "+Math.round(s.s*100)+"%, "+Math.round(s.l*100)+"%",u=Math.round(n.h)+"°, "+Math.round(n.s*100)+"%, "+Math.round(n.v*100)+"%";return M.createElement("div",{style:c.wrap,className:"flexbox-fix"},M.createElement("div",{style:c.fields},M.createElement("div",{style:c.double},M.createElement(re,{style:{input:c.input,label:c.label},label:"hex",value:o,onChange:a})),M.createElement("div",{style:c.column},M.createElement("div",{style:c.single},M.createElement(re,{style:{input:c.input2,label:c.label2},label:"rgb",value:l,onChange:a})),M.createElement("div",{style:c.single},M.createElement(re,{style:{input:c.input2,label:c.label2},label:"hsv",value:u,onChange:a})),M.createElement("div",{style:c.single},M.createElement(re,{style:{input:c.input2,label:c.label2},label:"hsl",value:N,onChange:a})))))},nc=function(e){var t=e.width,r=e.onChange,s=e.rgb,o=e.hsl,n=e.hsv,a=e.hex,c=e.header,l=e.styles,N=l===void 0?{}:l,u=e.className,g=u===void 0?"":u,L=K(Ge({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+s.r+", "+s.g+", "+s.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},N));return M.createElement("div",{style:L.picker,className:"google-picker "+g},M.createElement("div",{style:L.head},c),M.createElement("div",{style:L.swatch}),M.createElement("div",{style:L.saturation},M.createElement(en,{hsl:o,hsv:n,pointer:sc,onChange:r})),M.createElement("div",{style:L.body},M.createElement("div",{style:L.controls,className:"flexbox-fix"},M.createElement("div",{style:L.hue},M.createElement(Or,{style:L.Hue,hsl:o,radius:"4px",pointer:oc,onChange:r}))),M.createElement(kxe,{rgb:s,hsl:o,hex:a,hsv:n,onChange:r})))};nc.propTypes={width:S.oneOfType([S.string,S.number]),styles:S.object,header:S.string};nc.defaultProps={width:652,styles:{},header:"Color picker"};He(nc);const nt={color:{width:36,height:14,borderRadius:2},delButton:{marginTop:16},swatch:{mt:"16px",p:"5px",backgroundColor:"background.paper",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer",verticalAlign:"middle"},swatchDisabled:{opacity:.5,cursor:"default"},popover:{"& .MuiPaper-root":{textAlign:"right",backgroundColor:"#00000000",boxShadow:"none"}},popoverList:{padding:0},closeButton:i=>({backgroundColor:`${i.palette.background.paper} !important`,borderRadius:"0 0 25% 25%","&:hover":{backgroundColor:`${i.palette.secondary.main} !important`}}),textDense:{mt:0,mb:0},iconButton:{width:16,height:16},button:{width:32,height:32,minWidth:32,minHeight:32}};class es extends _.Component{constructor(e){super(e),this.state={displayColorPicker:!1,color:this.props.value||this.props.color||"",anchorEl:null}}handleClick=e=>{this.setState({displayColorPicker:!this.state.displayColorPicker,anchorEl:this.state.displayColorPicker?null:e.currentTarget})};handleClose=()=>{this.setState({displayColorPicker:!1,anchorEl:null})};static getColor(e,t){if(e&&typeof e=="object"){const r=e;if(r.rgb)return t?`#${r.rgb.r.toString(16).padStart(2,"0")}${r.rgb.g.toString(16).padStart(2,"0")}${r.rgb.b.toString(16).padStart(2,"0")}`:`rgba(${r.rgb.r},${r.rgb.g},${r.rgb.b},${r.rgb.a})`;const s=e;return t?`#${s.r.toString(16).padStart(2,"0")}${s.g.toString(16).padStart(2,"0")}${s.b.toString(16).padStart(2,"0")}`:`rgba(${s.r},${s.g},${s.b},${s.a})`}return typeof e=="string"?t?es.rgb2hex(e||""):e||"":""}static rgb2hex(e){const t=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);if(t){const r=parseInt(t[1],10).toString(16).padStart(2,"0"),s=parseInt(t[2],10).toString(16).padStart(2,"0"),o=parseInt(t[3],10).toString(16).padStart(2,"0");return(t==null?void 0:t.length)===4?`#${r}${s}${o}`:e}return e}handleChange=e=>{this.setState({color:e},()=>this.props.onChange&&this.props.onChange(es.getColor(e)))};componentDidUpdate(e,t){const r=es.getColor(this.props.color||this.props.value||"");r!==t.color&&this.setState({color:r})}renderCustomPalette(){return this.props.customPalette?M.createElement("div",{style:{width:"100%",display:"flex",flexWrap:"wrap"}},this.props.customPalette.map(e=>M.createElement(j.Button,{style:nt.button,key:e,onClick:()=>{this.handleChange(e),setTimeout(()=>this.handleClose(),300)}},M.createElement("div",{style:{...nt.iconButton,background:e}})))):null}render(){var r;const e={...this.props.style||{}};e.position="relative";const{color:t}=this.state;return M.createElement(j.Box,{component:"div",style:e,sx:this.props.sx||void 0,className:this.props.className||""},this.props.noInputField?null:M.createElement(j.TextField,{disabled:this.props.disabled,variant:"standard",id:"ar_color_picker_name",label:this.props.label||this.props.name,value:t||"",margin:"dense",sx:{"&.MuiFormControl-root":nt.textDense,width:t?"calc(100% - 80px)":"calc(100% - 56px)",mr:t?void 0:1},onChange:s=>this.handleChange(s.target.value)}),!this.props.noInputField&&t?M.createElement(j.IconButton,{disabled:this.props.disabled,onClick:()=>this.handleChange(""),size:"small",style:this.props.label||this.props.name?nt.delButton:void 0},M.createElement(O.Delete,null)):null,M.createElement(j.Box,{component:"div",onClick:s=>!this.props.disabled&&this.handleClick(s),title:p.t("ra_Select color"),sx:{...nt.swatch,...this.props.disabled?nt.swatchDisabled:void 0,background:t?void 0:"transparent",border:t?void 0:"1px dashed #ccc",boxSizing:"border-box",marginTop:this.props.noInputField||!(this.props.label||this.props.name)?0:void 0}},M.createElement("div",{style:{...nt.color,background:es.getColor(t),width:this.props.noInputField?this.props.barWidth||16:this.props.barWidth||36}})),this.state.displayColorPicker&&!this.props.disabled?M.createElement(j.Menu,{sx:{...nt.popover,"&. MuiMenu-list":nt.popoverList},anchorEl:this.state.anchorEl,open:!0,onClose:()=>this.handleClose()},M.createElement(axe,{color:this.state.color||void 0,onChangeComplete:s=>this.handleChange(s.rgb),styles:{default:{picker:{backgroundColor:((r=this.props.theme)==null?void 0:r.palette.background.paper)||"#888"}}}}),t&&this.props.noInputField?M.createElement(j.IconButton,{sx:nt.closeButton,onClick:()=>this.handleChange("")},M.createElement(O.Delete,null)):null,M.createElement(j.IconButton,{sx:nt.closeButton,onClick:()=>this.handleClose()},M.createElement(O.Close,null)),this.renderCustomPalette()):null)}}var Qn={exports:{}},Hl;function It(){return Hl||(Hl=1,function(i,e){(function(r,s){i.exports=s()})(globalThis,()=>(()=>{var t={949:(n,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CronParser=void 0;var l=c(515),N=function(){function u(g,L,d){L===void 0&&(L=!0),d===void 0&&(d=!1),this.expression=g,this.dayOfWeekStartIndexZero=L,this.monthStartIndexZero=d}return u.prototype.parse=function(){var g,L,d=(g=this.expression)!==null&&g!==void 0?g:"";if(d==="@reboot")return L=["@reboot","","","","","",""],L;if(d.startsWith("@")){var y=this.parseSpecial(this.expression);L=this.extractParts(y)}else L=this.extractParts(this.expression);return this.normalize(L),this.validate(L),L},u.prototype.parseSpecial=function(g){var L={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},d=L[g];if(!d)throw new Error("Unknown special expression.");return d},u.prototype.extractParts=function(g){if(!this.expression)throw new Error("cron expression is empty");for(var L=g.trim().split(/[ ]+/),d=0;d<L.length;d++)if(L[d].includes(",")){var y=L[d].split(",").map(function(z){return z.trim()}).filter(function(z){return z!==""}).map(function(z){return isNaN(Number(z))?z:Number(z)}).filter(function(z){return z!==null&&z!==""});y.length===0&&y.push("*"),y.sort(function(z,A){return z!==null&&A!==null?z-A:0}),L[d]=y.map(function(z){return z!==null?z.toString():""}).join(",")}if(L.length<5)throw new Error("Expression has only ".concat(L.length," part").concat(L.length==1?"":"s",". At least 5 parts are required."));if(L.length==5)L.unshift(""),L.push("");else if(L.length==6){var D=/\d{4}$/.test(L[5])||L[4]=="?"||L[2]=="?";D?L.unshift(""):L.push("")}else if(L.length>7)throw new Error("Expression has ".concat(L.length," parts; too many!"));return L},u.prototype.normalize=function(g){var L=this;if(g[3]=g[3].replace("?","*"),g[5]=g[5].replace("?","*"),g[2]=g[2].replace("?","*"),g[0].indexOf("0/")==0&&(g[0]=g[0].replace("0/","*/")),g[1].indexOf("0/")==0&&(g[1]=g[1].replace("0/","*/")),g[2].indexOf("0/")==0&&(g[2]=g[2].replace("0/","*/")),g[3].indexOf("1/")==0&&(g[3]=g[3].replace("1/","*/")),g[4].indexOf("1/")==0&&(g[4]=g[4].replace("1/","*/")),g[6].indexOf("1/")==0&&(g[6]=g[6].replace("1/","*/")),g[5]=g[5].replace(/(^\d)|([^#/\s]\d)/g,function(m){var h=m.replace(/\D/,""),x=h;return L.dayOfWeekStartIndexZero?h=="7"&&(x="0"):x=(parseInt(h)-1).toString(),m.replace(h,x)}),g[5]=="L"&&(g[5]="6"),g[3]=="?"&&(g[3]="*"),g[3].indexOf("W")>-1&&(g[3].indexOf(",")>-1||g[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var d={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var y in d)g[5]=g[5].replace(new RegExp(y,"gi"),d[y].toString());g[4]=g[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(m){var h=m.replace(/\D/,""),x=h;return L.monthStartIndexZero&&(x=(parseInt(h)+1).toString()),m.replace(h,x)});var D={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var z in D)g[4]=g[4].replace(new RegExp(z,"gi"),D[z].toString());g[0]=="0"&&(g[0]=""),!/\*|\-|\,|\//.test(g[2])&&(/\*|\//.test(g[1])||/\*|\//.test(g[0]))&&(g[2]+="-".concat(g[2]));for(var A=0;A<g.length;A++)if(g[A].indexOf(",")!=-1&&(g[A]=g[A].split(",").filter(function(m){return m!==""}).join(",")||"*"),g[A]=="*/1"&&(g[A]="*"),g[A].indexOf("/")>-1&&!/^\*|\-|\,/.test(g[A])){var C=null;switch(A){case 4:C="12";break;case 5:C="6";break;case 6:C="9999";break;default:C=null;break}if(C!==null){var f=g[A].split("/");g[A]="".concat(f[0],"-").concat(C,"/").concat(f[1])}}},u.prototype.validate=function(g){var L="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(g[0],L),this.validateOnlyExpectedCharactersFound(g[1],L),this.validateOnlyExpectedCharactersFound(g[2],L),this.validateOnlyExpectedCharactersFound(g[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(g[4],L),this.validateOnlyExpectedCharactersFound(g[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(g[6],L),this.validateAnyRanges(g)},u.prototype.validateAnyRanges=function(g){l.default.secondRange(g[0]),l.default.minuteRange(g[1]),l.default.hourRange(g[2]),l.default.dayOfMonthRange(g[3]),l.default.monthRange(g[4],this.monthStartIndexZero),l.default.dayOfWeekRange(g[5],this.dayOfWeekStartIndexZero)},u.prototype.validateOnlyExpectedCharactersFound=function(g,L){var d=g.match(new RegExp("[^".concat(L,"]+"),"gi"));if(d&&d.length)throw new Error("Expression contains invalid values: '".concat(d.toString(),"'"))},u}();a.CronParser=N},333:(n,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExpressionDescriptor=void 0;var l=c(823),N=c(949),u=function(){function g(L,d){if(this.expression=L,this.options=d,this.expressionParts=new Array(5),!this.options.locale&&g.defaultLocale&&(this.options.locale=g.defaultLocale),!g.locales[this.options.locale]){var y=Object.keys(g.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(y,"'.")),this.options.locale=y}this.i18n=g.locales[this.options.locale],d.use24HourTimeFormat===void 0&&(d.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return g.toString=function(L,d){var y=d===void 0?{}:d,D=y.throwExceptionOnParseError,z=D===void 0?!0:D,A=y.verbose,C=A===void 0?!1:A,f=y.dayOfWeekStartIndexZero,m=f===void 0?!0:f,h=y.monthStartIndexZero,x=h===void 0?!1:h,b=y.use24HourTimeFormat,v=y.locale,W=v===void 0?null:v,Y={throwExceptionOnParseError:z,verbose:C,dayOfWeekStartIndexZero:m,monthStartIndexZero:x,use24HourTimeFormat:b,locale:W};Y.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var q=new g(L,Y);return q.getFullDescription()},g.initialize=function(L,d){d===void 0&&(d="en"),g.specialCharacters=["/","-",",","*"],g.defaultLocale=d,L.load(g.locales)},g.prototype.getFullDescription=function(){var L,d,y="";try{var D=new N.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=D.parse(),this.expressionParts[0]==="@reboot")return((d=(L=this.i18n).atReboot)===null||d===void 0?void 0:d.call(L))||"Run once, at startup";var z=this.getTimeOfDayDescription(),A=this.getDayOfMonthDescription(),C=this.getMonthDescription(),f=this.getDayOfWeekDescription(),m=this.getYearDescription();y+=z+A+f+C+m,y=this.transformVerbosity(y,!!this.options.verbose),y=y.charAt(0).toLocaleUpperCase()+y.substr(1)}catch(h){if(!this.options.throwExceptionOnParseError)y=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(h)}return y},g.prototype.getTimeOfDayDescription=function(){var L=this.expressionParts[0],d=this.expressionParts[1],y=this.expressionParts[2],D="";if(!l.StringUtilities.containsAny(d,g.specialCharacters)&&!l.StringUtilities.containsAny(y,g.specialCharacters)&&!l.StringUtilities.containsAny(L,g.specialCharacters))D+=this.i18n.atSpace()+this.formatTime(y,d,L);else if(!L&&d.indexOf("-")>-1&&!(d.indexOf(",")>-1)&&!(d.indexOf("/")>-1)&&!l.StringUtilities.containsAny(y,g.specialCharacters)){var z=d.split("-");D+=l.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(y,z[0],""),this.formatTime(y,z[1],""))}else if(!L&&y.indexOf(",")>-1&&y.indexOf("-")==-1&&y.indexOf("/")==-1&&!l.StringUtilities.containsAny(d,g.specialCharacters)){var A=y.split(",");D+=this.i18n.at();for(var C=0;C<A.length;C++)D+=" ",D+=this.formatTime(A[C],d,""),C<A.length-2&&(D+=","),C==A.length-2&&(D+=this.i18n.spaceAnd())}else{var f=this.getSecondsDescription(),m=this.getMinutesDescription(),h=this.getHoursDescription();if(D+=f,D&&m&&(D+=", "),D+=m,m===h)return D;D&&h&&(D+=", "),D+=h}return D},g.prototype.getSecondsDescription=function(){var L=this,d=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(y){return y},function(y){return l.StringUtilities.format(L.i18n.everyX0Seconds(y),y)},function(y){return L.i18n.secondsX0ThroughX1PastTheMinute()},function(y){return y=="0"?"":parseInt(y)<20?L.i18n.atX0SecondsPastTheMinute(y):L.i18n.atX0SecondsPastTheMinuteGt20()||L.i18n.atX0SecondsPastTheMinute(y)});return d},g.prototype.getMinutesDescription=function(){var L=this,d=this.expressionParts[0],y=this.expressionParts[2],D=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(z){return z},function(z){return l.StringUtilities.format(L.i18n.everyX0Minutes(z),z)},function(z){return L.i18n.minutesX0ThroughX1PastTheHour()},function(z){try{return z=="0"&&y.indexOf("/")==-1&&d==""?L.i18n.everyHour():parseInt(z)<20?L.i18n.atX0MinutesPastTheHour(z):L.i18n.atX0MinutesPastTheHourGt20()||L.i18n.atX0MinutesPastTheHour(z)}catch{return L.i18n.atX0MinutesPastTheHour(z)}});return D},g.prototype.getHoursDescription=function(){var L=this,d=this.expressionParts[2],y=0,D=[];d.split("/")[0].split(",").forEach(function(C){var f=C.split("-");f.length===2&&D.push({value:f[1],index:y+1}),y+=f.length});var z=0,A=this.getSegmentDescription(d,this.i18n.everyHour(),function(C){var f=D.find(function(h){return h.value===C&&h.index===z}),m=f&&L.expressionParts[1]!=="0";return z++,m?L.formatTime(C,"59",""):L.formatTime(C,"0","")},function(C){return l.StringUtilities.format(L.i18n.everyX0Hours(C),C)},function(C){return L.i18n.betweenX0AndX1()},function(C){return L.i18n.atX0()});return A},g.prototype.getDayOfWeekDescription=function(){var L=this,d=this.i18n.daysOfTheWeek(),y=null;return this.expressionParts[5]=="*"?y="":y=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(D,z){var A=D;D.indexOf("#")>-1?A=D.substring(0,D.indexOf("#")):D.indexOf("L")>-1&&(A=A.replace("L",""));var C=parseInt(A),f=L.i18n.daysOfTheWeekInCase?L.i18n.daysOfTheWeekInCase(z)[C]:d[C];if(D.indexOf("#")>-1){var m=null,h=D.substring(D.indexOf("#")+1),x=D.substring(0,D.indexOf("#"));switch(h){case"1":m=L.i18n.first(x);break;case"2":m=L.i18n.second(x);break;case"3":m=L.i18n.third(x);break;case"4":m=L.i18n.fourth(x);break;case"5":m=L.i18n.fifth(x);break}f=m+" "+f}return f},function(D){return parseInt(D)==1?"":l.StringUtilities.format(L.i18n.commaEveryX0DaysOfTheWeek(D),D)},function(D){var z=D.substring(0,D.indexOf("-")),A=L.expressionParts[3]!="*";return A?L.i18n.commaAndX0ThroughX1(z):L.i18n.commaX0ThroughX1(z)},function(D){var z=null;if(D.indexOf("#")>-1){var A=D.substring(D.indexOf("#")+1),C=D.substring(0,D.indexOf("#"));z=L.i18n.commaOnThe(A,C).trim()+L.i18n.spaceX0OfTheMonth()}else if(D.indexOf("L")>-1)z=L.i18n.commaOnTheLastX0OfTheMonth(D.replace("L",""));else{var f=L.expressionParts[3]!="*";z=f?L.i18n.commaAndOnX0():L.i18n.commaOnlyOnX0(D)}return z}),y},g.prototype.getMonthDescription=function(){var L=this,d=this.i18n.monthsOfTheYear(),y=this.getSegmentDescription(this.expressionParts[4],"",function(D,z){return z&&L.i18n.monthsOfTheYearInCase?L.i18n.monthsOfTheYearInCase(z)[parseInt(D)-1]:d[parseInt(D)-1]},function(D){return parseInt(D)==1?"":l.StringUtilities.format(L.i18n.commaEveryX0Months(D),D)},function(D){return L.i18n.commaMonthX0ThroughMonthX1()||L.i18n.commaX0ThroughX1()},function(D){return L.i18n.commaOnlyInMonthX0?L.i18n.commaOnlyInMonthX0():L.i18n.commaOnlyInX0()});return y},g.prototype.getDayOfMonthDescription=function(){var L=this,d=null,y=this.expressionParts[3];switch(y){case"L":d=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":d=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var D=y.match(/(\d{1,2}W)|(W\d{1,2})/);if(D){var z=parseInt(D[0].replace("W","")),A=z==1?this.i18n.firstWeekday():l.StringUtilities.format(this.i18n.weekdayNearestDayX0(),z.toString());d=l.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),A);break}else{var C=y.match(/L-(\d{1,2})/);if(C){var f=C[1];d=l.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(f),f);break}else{if(y=="*"&&this.expressionParts[5]!="*")return"";d=this.getSegmentDescription(y,this.i18n.commaEveryDay(),function(m){return m=="L"?L.i18n.lastDay():L.i18n.dayX0?l.StringUtilities.format(L.i18n.dayX0(),m):m},function(m){return m=="1"?L.i18n.commaEveryDay():L.i18n.commaEveryX0Days(m)},function(m){return L.i18n.commaBetweenDayX0AndX1OfTheMonth(m)},function(m){return L.i18n.commaOnDayX0OfTheMonth(m)})}break}}return d},g.prototype.getYearDescription=function(){var L=this,d=this.getSegmentDescription(this.expressionParts[6],"",function(y){return/^\d+$/.test(y)?new Date(parseInt(y),1).getFullYear().toString():y},function(y){return l.StringUtilities.format(L.i18n.commaEveryX0Years(y),y)},function(y){return L.i18n.commaYearX0ThroughYearX1()||L.i18n.commaX0ThroughX1()},function(y){return L.i18n.commaOnlyInYearX0?L.i18n.commaOnlyInYearX0():L.i18n.commaOnlyInX0()});return d},g.prototype.getSegmentDescription=function(L,d,y,D,z,A){var C=null,f=L.indexOf("/")>-1,m=L.indexOf("-")>-1,h=L.indexOf(",")>-1;if(!L)C="";else if(L==="*")C=d;else if(!f&&!m&&!h)C=l.StringUtilities.format(A(L),y(L));else if(h){for(var x=L.split(","),b="",v=0;v<x.length;v++)if(v>0&&x.length>2&&(b+=",",v<x.length-1&&(b+=" ")),v>0&&x.length>1&&(v==x.length-1||x.length==2)&&(b+="".concat(this.i18n.spaceAnd()," ")),x[v].indexOf("/")>-1||x[v].indexOf("-")>-1){var W=x[v].indexOf("-")>-1&&x[v].indexOf("/")==-1,Y=this.getSegmentDescription(x[v],d,y,D,W?this.i18n.commaX0ThroughX1:z,A);W&&(Y=Y.replace(", ","")),b+=Y}else f?b+=this.getSegmentDescription(x[v],d,y,D,z,A):b+=y(x[v]);f?C=b:C=l.StringUtilities.format(A(L),b)}else if(f){var x=L.split("/");if(C=l.StringUtilities.format(D(x[1]),x[1]),x[0].indexOf("-")>-1){var q=this.generateRangeSegmentDescription(x[0],z,y);q.indexOf(", ")!=0&&(C+=", "),C+=q}else if(x[0].indexOf("*")==-1){var ce=l.StringUtilities.format(A(x[0]),y(x[0]));ce=ce.replace(", ",""),C+=l.StringUtilities.format(this.i18n.commaStartingX0(),ce)}}else m&&(C=this.generateRangeSegmentDescription(L,z,y));return C},g.prototype.generateRangeSegmentDescription=function(L,d,y){var D="",z=L.split("-"),A=y(z[0],1),C=y(z[1],2),f=d(L);return D+=l.StringUtilities.format(f,A,C),D},g.prototype.formatTime=function(L,d,y){var D=0,z=0,A=parseInt(L)+D,C=parseInt(d)+z;C>=60?(C-=60,A+=1):C<0&&(C+=60,A-=1),A>=24?A=A-24:A<0&&(A=24+A);var f="",m=!1;this.options.use24HourTimeFormat||(m=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),f=m?"".concat(this.getPeriod(A)," "):" ".concat(this.getPeriod(A)),A>12&&(A-=12),A===0&&(A=12));var h="";return y&&(h=":".concat(("00"+y).substring(y.length))),"".concat(m?f:"").concat(("00"+A.toString()).substring(A.toString().length),":").concat(("00"+C.toString()).substring(C.toString().length)).concat(h).concat(m?"":f)},g.prototype.transformVerbosity=function(L,d){if(!d&&(L=L.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),L=L.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),L=L.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),L=L.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var y=0,D=Object.entries(this.i18n.conciseVerbosityReplacements());y<D.length;y++){var z=D[y],A=z[0],C=z[1];L=L.replace(new RegExp(A,"g"),C)}return L},g.prototype.getPeriod=function(L){return L>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},g.locales={},g}();a.ExpressionDescriptor=u},747:(n,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.enLocaleLoader=void 0;var l=c(486),N=function(){function u(){}return u.prototype.load=function(g){g.en=new l.en},u}();a.enLocaleLoader=N},486:(n,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.en=void 0;var c=function(){function l(){}return l.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},l.prototype.atX0MinutesPastTheHourGt20=function(){return null},l.prototype.commaMonthX0ThroughMonthX1=function(){return null},l.prototype.commaYearX0ThroughYearX1=function(){return null},l.prototype.use24HourTimeFormatByDefault=function(){return!1},l.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},l.prototype.everyMinute=function(){return"every minute"},l.prototype.everyHour=function(){return"every hour"},l.prototype.atSpace=function(){return"At "},l.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},l.prototype.at=function(){return"At"},l.prototype.spaceAnd=function(){return" and"},l.prototype.everySecond=function(){return"every second"},l.prototype.everyX0Seconds=function(){return"every %s seconds"},l.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},l.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},l.prototype.everyX0Minutes=function(){return"every %s minutes"},l.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},l.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},l.prototype.everyX0Hours=function(){return"every %s hours"},l.prototype.betweenX0AndX1=function(){return"between %s and %s"},l.prototype.atX0=function(){return"at %s"},l.prototype.commaEveryDay=function(){return", every day"},l.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},l.prototype.commaX0ThroughX1=function(){return", %s through %s"},l.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},l.prototype.first=function(){return"first"},l.prototype.second=function(){return"second"},l.prototype.third=function(){return"third"},l.prototype.fourth=function(){return"fourth"},l.prototype.fifth=function(){return"fifth"},l.prototype.commaOnThe=function(){return", on the "},l.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},l.prototype.lastDay=function(){return"the last day"},l.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},l.prototype.commaOnlyOnX0=function(){return", only on %s"},l.prototype.commaAndOnX0=function(){return", and on %s"},l.prototype.commaEveryX0Months=function(){return", every %s months"},l.prototype.commaOnlyInX0=function(){return", only in %s"},l.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},l.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},l.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},l.prototype.firstWeekday=function(){return"first weekday"},l.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},l.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},l.prototype.commaEveryX0Days=function(){return", every %s days"},l.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},l.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},l.prototype.commaEveryHour=function(){return", every hour"},l.prototype.commaEveryX0Years=function(){return", every %s years"},l.prototype.commaStartingX0=function(){return", starting %s"},l.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},l.prototype.atReboot=function(){return"Run once, at startup"},l}();a.en=c},515:(n,a)=>{Object.defineProperty(a,"__esModule",{value:!0});function c(N,u){if(!N)throw new Error(u)}var l=function(){function N(){}return N.secondRange=function(u){for(var g=u.split(","),L=0;L<g.length;L++)if(!isNaN(parseInt(g[L],10))){var d=parseInt(g[L],10);c(d>=0&&d<=59,"seconds part must be >= 0 and <= 59")}},N.minuteRange=function(u){for(var g=u.split(","),L=0;L<g.length;L++)if(!isNaN(parseInt(g[L],10))){var d=parseInt(g[L],10);c(d>=0&&d<=59,"minutes part must be >= 0 and <= 59")}},N.hourRange=function(u){for(var g=u.split(","),L=0;L<g.length;L++)if(!isNaN(parseInt(g[L],10))){var d=parseInt(g[L],10);c(d>=0&&d<=23,"hours part must be >= 0 and <= 23")}},N.dayOfMonthRange=function(u){for(var g=u.split(","),L=0;L<g.length;L++)if(!isNaN(parseInt(g[L],10))){var d=parseInt(g[L],10);c(d>=1&&d<=31,"DOM part must be >= 1 and <= 31")}},N.monthRange=function(u,g){for(var L=u.split(","),d=0;d<L.length;d++)if(!isNaN(parseInt(L[d],10))){var y=parseInt(L[d],10);c(y>=1&&y<=12,g?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},N.dayOfWeekRange=function(u,g){for(var L=u.split(","),d=0;d<L.length;d++)if(!isNaN(parseInt(L[d],10))){var y=parseInt(L[d],10);c(y>=0&&y<=6,g?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},N}();a.default=l},823:(n,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.StringUtilities=void 0;var c=function(){function l(){}return l.format=function(N){for(var u=[],g=1;g<arguments.length;g++)u[g-1]=arguments[g];return N.replace(/%s/g,function(L){return u.shift()})},l.containsAny=function(N,u){return u.some(function(g){return N.indexOf(g)>-1})},l}();a.StringUtilities=c}},r={};function s(n){var a=r[n];if(a!==void 0)return a.exports;var c=r[n]={exports:{}};return t[n](c,c.exports,s),c.exports}var o={};return(()=>{var n=o;Object.defineProperty(n,"__esModule",{value:!0}),n.toString=void 0;var a=s(333),c=s(747);a.ExpressionDescriptor.initialize(new c.enLocaleLoader),n.default=a.ExpressionDescriptor;var l=a.ExpressionDescriptor.toString;n.toString=l})(),o})())}(Qn)),Qn.exports}var vxe=It();const bxe=EL(vxe);var Yxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:u=>{u.exports=t}},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.fr=void 0;var N=function(){function u(){}return u.prototype.conciseVerbosityReplacements=function(){return{"de le":"du"}},u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Une erreur est survenue en générant la description de l'expression cron. Vérifiez sa syntaxe."},u.prototype.everyMinute=function(){return"toutes les minutes"},u.prototype.everyHour=function(){return"toutes les heures"},u.prototype.atSpace=function(){return"À "},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Toutes les minutes entre %s et %s"},u.prototype.at=function(){return"À"},u.prototype.spaceAnd=function(){return" et"},u.prototype.everySecond=function(){return"toutes les secondes"},u.prototype.everyX0Seconds=function(){return"toutes les %s secondes"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"les secondes entre %s et %s après la minute"},u.prototype.atX0SecondsPastTheMinute=function(){return"%s secondes après la minute"},u.prototype.everyX0Minutes=function(){return"toutes les %s minutes"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"les minutes entre %s et %s après l'heure"},u.prototype.atX0MinutesPastTheHour=function(){return"%s minutes après l'heure"},u.prototype.everyX0Hours=function(){return"toutes les %s heures"},u.prototype.betweenX0AndX1=function(){return"de %s à %s"},u.prototype.atX0=function(){return"%s"},u.prototype.commaEveryDay=function(){return", tous les jours"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", tous les %s jours de la semaine"},u.prototype.commaX0ThroughX1=function(){return", de %s à %s"},u.prototype.commaAndX0ThroughX1=function(){return", et de %s à %s"},u.prototype.first=function(){return"premier"},u.prototype.second=function(){return"second"},u.prototype.third=function(){return"troisième"},u.prototype.fourth=function(){return"quatrième"},u.prototype.fifth=function(){return"cinquième"},u.prototype.commaOnThe=function(){return", le "},u.prototype.spaceX0OfTheMonth=function(){return" %s du mois"},u.prototype.lastDay=function(){return"le dernier jour"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", le dernier %s du mois"},u.prototype.commaOnlyOnX0=function(){return", uniquement le %s"},u.prototype.commaAndOnX0=function(){return", et %s"},u.prototype.commaEveryX0Months=function(){return", tous les %s mois"},u.prototype.commaOnlyInX0=function(){return", uniquement en %s"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", le dernier jour du mois"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", le dernier jour ouvrable du mois"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s jours avant le dernier jour du mois"},u.prototype.firstWeekday=function(){return"premier jour ouvrable"},u.prototype.weekdayNearestDayX0=function(){return"jour ouvrable le plus proche du %s"},u.prototype.commaOnTheX0OfTheMonth=function(){return", le %s du mois"},u.prototype.commaEveryX0Days=function(){return", tous les %s jours"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", du %s au %s du mois"},u.prototype.commaOnDayX0OfTheMonth=function(){return", le %s du mois"},u.prototype.commaEveryHour=function(){return", chaque heure"},u.prototype.commaEveryX0Years=function(){return", tous les %s ans"},u.prototype.commaDaysX0ThroughX1=function(){return", du %s au %s"},u.prototype.commaStartingX0=function(){return", à partir de %s"},u.prototype.daysOfTheWeek=function(){return["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},u.prototype.monthsOfTheYear=function(){return["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},u}();return l.fr=N,c().locales.fr=new N,n})())})(Yxe);var Qxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:u=>{u.exports=t}},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.es=void 0;var N=function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Ocurrió un error mientras se generaba la descripción de la expresión. Revise la sintaxis de la expresión de cron."},u.prototype.at=function(){return"A las"},u.prototype.atSpace=function(){return"A las "},u.prototype.atX0=function(){return"a las %s"},u.prototype.atX0MinutesPastTheHour=function(){return"a los %s minutos de la hora"},u.prototype.atX0SecondsPastTheMinute=function(){return"a los %s segundos del minuto"},u.prototype.betweenX0AndX1=function(){return"entre las %s y las %s"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", entre los días %s y %s del mes"},u.prototype.commaEveryDay=function(){return", cada día"},u.prototype.commaEveryX0Days=function(){return", cada %s días"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", cada %s días de la semana"},u.prototype.commaEveryX0Months=function(){return", cada %s meses"},u.prototype.commaOnDayX0OfTheMonth=function(){return", el día %s del mes"},u.prototype.commaOnlyInX0=function(){return", sólo en %s"},u.prototype.commaOnlyOnX0=function(){return", sólo el %s"},u.prototype.commaAndOnX0=function(){return", y el %s"},u.prototype.commaOnThe=function(){return", en el "},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", en el último día del mes"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", en el último día de la semana del mes"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s días antes del último día del mes"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", en el último %s del mes"},u.prototype.commaOnTheX0OfTheMonth=function(){return", en el %s del mes"},u.prototype.commaX0ThroughX1=function(){return", de %s a %s"},u.prototype.commaAndX0ThroughX1=function(){return", y de %s a %s"},u.prototype.everyHour=function(){return"cada hora"},u.prototype.everyMinute=function(){return"cada minuto"},u.prototype.everyMinuteBetweenX0AndX1=function(){return"cada minuto entre las %s y las %s"},u.prototype.everySecond=function(){return"cada segundo"},u.prototype.everyX0Hours=function(){return"cada %s horas"},u.prototype.everyX0Minutes=function(){return"cada %s minutos"},u.prototype.everyX0Seconds=function(){return"cada %s segundos"},u.prototype.fifth=function(){return"quinto"},u.prototype.first=function(){return"primero"},u.prototype.firstWeekday=function(){return"primer día de la semana"},u.prototype.fourth=function(){return"cuarto"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"del minuto %s al %s pasada la hora"},u.prototype.second=function(){return"segundo"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"En los segundos %s al %s de cada minuto"},u.prototype.spaceAnd=function(){return" y"},u.prototype.spaceX0OfTheMonth=function(){return" %s del mes"},u.prototype.lastDay=function(){return"el último día"},u.prototype.third=function(){return"tercer"},u.prototype.weekdayNearestDayX0=function(){return"día de la semana más próximo al %s"},u.prototype.commaEveryX0Years=function(){return", cada %s años"},u.prototype.commaStartingX0=function(){return", comenzando %s"},u.prototype.daysOfTheWeek=function(){return["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},u.prototype.monthsOfTheYear=function(){return["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},u}();return l.es=N,c().locales.es=new N,n})())})(Qxe);var Uxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:u=>{u.exports=t}},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.de=void 0;var N=function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.everyMinute=function(){return"jede Minute"},u.prototype.everyHour=function(){return"jede Stunde"},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Beim Generieren der Ausdrucksbeschreibung ist ein Fehler aufgetreten. Überprüfen Sie die Syntax des Cron-Ausdrucks."},u.prototype.atSpace=function(){return"Um "},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Jede Minute zwischen %s und %s"},u.prototype.at=function(){return"Um"},u.prototype.spaceAnd=function(){return" und"},u.prototype.everySecond=function(){return"Jede Sekunde"},u.prototype.everyX0Seconds=function(){return"alle %s Sekunden"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"Sekunden %s bis %s"},u.prototype.atX0SecondsPastTheMinute=function(){return"bei Sekunde %s"},u.prototype.everyX0Minutes=function(){return"alle %s Minuten"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"Minuten %s bis %s"},u.prototype.atX0MinutesPastTheHour=function(){return"bei Minute %s"},u.prototype.everyX0Hours=function(){return"alle %s Stunden"},u.prototype.betweenX0AndX1=function(){return"zwischen %s und %s"},u.prototype.atX0=function(){return"um %s"},u.prototype.commaEveryDay=function(){return", jeden Tag"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", alle %s Tage der Woche"},u.prototype.commaX0ThroughX1=function(){return", %s bis %s"},u.prototype.commaAndX0ThroughX1=function(){return", und %s bis %s"},u.prototype.first=function(){return"ersten"},u.prototype.second=function(){return"zweiten"},u.prototype.third=function(){return"dritten"},u.prototype.fourth=function(){return"vierten"},u.prototype.fifth=function(){return"fünften"},u.prototype.commaOnThe=function(){return", am "},u.prototype.spaceX0OfTheMonth=function(){return" %s des Monats"},u.prototype.lastDay=function(){return"der letzte Tag"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", am letzten %s des Monats"},u.prototype.commaOnlyOnX0=function(){return", nur jeden %s"},u.prototype.commaAndOnX0=function(){return", und jeden %s"},u.prototype.commaEveryX0Months=function(){return", alle %s Monate"},u.prototype.commaOnlyInX0=function(){return", nur im %s"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", am letzten Tag des Monats"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", am letzten Werktag des Monats"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s tage vor dem letzten Tag des Monats"},u.prototype.firstWeekday=function(){return"ersten Werktag"},u.prototype.weekdayNearestDayX0=function(){return"Werktag am nächsten zum %s Tag"},u.prototype.commaOnTheX0OfTheMonth=function(){return", am %s des Monats"},u.prototype.commaEveryX0Days=function(){return", alle %s Tage"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", zwischen Tag %s und %s des Monats"},u.prototype.commaOnDayX0OfTheMonth=function(){return", an Tag %s des Monats"},u.prototype.commaEveryX0Years=function(){return", alle %s Jahre"},u.prototype.commaStartingX0=function(){return", beginnend %s"},u.prototype.daysOfTheWeek=function(){return["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},u.prototype.monthsOfTheYear=function(){return["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},u}();return l.de=N,c().locales.de=new N,n})())})(Uxe);var $xe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:u=>{u.exports=t}},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.it=void 0;var N=function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"È verificato un errore durante la generazione la descrizione espressione. Controllare la sintassi delle espressioni cron."},u.prototype.at=function(){return"Alle"},u.prototype.atSpace=function(){return"Alle "},u.prototype.atX0=function(){return"alle %s"},u.prototype.atX0MinutesPastTheHour=function(){return"al %s minuto passata l'ora"},u.prototype.atX0SecondsPastTheMinute=function(){return"al %s secondo passato il minuto"},u.prototype.betweenX0AndX1=function(){return"tra le %s e le %s"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", tra il giorno %s e %s del mese"},u.prototype.commaEveryDay=function(){return", ogni giorno"},u.prototype.commaEveryX0Days=function(){return", ogni %s giorni"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", ogni %s giorni della settimana"},u.prototype.commaEveryX0Months=function(){return", ogni %s mesi"},u.prototype.commaEveryX0Years=function(){return", ogni %s anni"},u.prototype.commaOnDayX0OfTheMonth=function(){return", il giorno %s del mese"},u.prototype.commaOnlyInX0=function(){return", solo in %s"},u.prototype.commaOnlyOnX0=function(){return", solo il %s"},u.prototype.commaAndOnX0=function(){return", e il %s"},u.prototype.commaOnThe=function(){return", il "},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", l'ultimo giorno del mese"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", nell'ultima settimana del mese"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s giorni prima dell'ultimo giorno del mese"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", l'ultimo %s del mese"},u.prototype.commaOnTheX0OfTheMonth=function(){return", il %s del mese"},u.prototype.commaX0ThroughX1=function(){return", %s al %s"},u.prototype.commaAndX0ThroughX1=function(){return", e %s al %s"},u.prototype.everyHour=function(){return"ogni ora"},u.prototype.everyMinute=function(){return"ogni minuto"},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Ogni minuto tra le %s e le %s"},u.prototype.everySecond=function(){return"ogni secondo"},u.prototype.everyX0Hours=function(){return"ogni %s ore"},u.prototype.everyX0Minutes=function(){return"ogni %s minuti"},u.prototype.everyX0Seconds=function(){return"ogni %s secondi"},u.prototype.fifth=function(){return"quinto"},u.prototype.first=function(){return"primo"},u.prototype.firstWeekday=function(){return"primo giorno della settimana"},u.prototype.fourth=function(){return"quarto"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"minuti %s al %s dopo l'ora"},u.prototype.second=function(){return"secondo"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"secondi %s al %s oltre il minuto"},u.prototype.spaceAnd=function(){return" e"},u.prototype.spaceX0OfTheMonth=function(){return" %s del mese"},u.prototype.lastDay=function(){return"l'ultimo giorno"},u.prototype.third=function(){return"terzo"},u.prototype.weekdayNearestDayX0=function(){return"giorno della settimana più vicino al %s"},u.prototype.commaStartingX0=function(){return", a partire %s"},u.prototype.daysOfTheWeek=function(){return["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},u.prototype.monthsOfTheYear=function(){return["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},u}();return l.it=N,c().locales.it=new N,n})())})($xe);var Pxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:L=>{L.exports=t}},s={};function o(L){var d=s[L];if(d!==void 0)return d.exports;var y=s[L]={exports:{}};return r[L](y,y.exports,o),y.exports}o.n=L=>{var d=L&&L.__esModule?()=>L.default:()=>L;return o.d(d,{a:d}),d},o.d=(L,d)=>{for(var y in d)o.o(d,y)&&!o.o(L,y)&&Object.defineProperty(L,y,{enumerable:!0,get:d[y]})},o.o=(L,d)=>Object.prototype.hasOwnProperty.call(L,d),o.r=L=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(L,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(L,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.ru=void 0;var N=function(L,d){var y=Number(L);return y!==void 0?d[y%100>4&&y%100<20?2:[2,0,1,1,1,2][y%10<5?Math.abs(y)%10:5]]:d[2]},u=function(L,d){var y=Number(L);return y!==void 0?d[y===0?0:y===1||y===2||y===4?1:2]:d[1]},g=function(){function L(){}return L.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},L.prototype.atX0MinutesPastTheHourGt20=function(){return null},L.prototype.commaMonthX0ThroughMonthX1=function(){return null},L.prototype.commaYearX0ThroughYearX1=function(){return null},L.prototype.use24HourTimeFormatByDefault=function(){return!0},L.prototype.everyMinute=function(){return"каждую минуту"},L.prototype.everyHour=function(){return"каждый час"},L.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Произошла ошибка во время генерации описания выражения. Проверьте синтаксис крон-выражения."},L.prototype.atSpace=function(){return"В "},L.prototype.everyMinuteBetweenX0AndX1=function(){return"Каждую минуту с %s по %s"},L.prototype.at=function(){return"В"},L.prototype.spaceAnd=function(){return" и"},L.prototype.everySecond=function(){return"каждую секунду"},L.prototype.everyX0Seconds=function(d){return N(d,["каждую %s секунду","каждые %s секунды","каждые %s секунд"])},L.prototype.secondsX0ThroughX1PastTheMinute=function(){return"секунды с %s по %s"},L.prototype.atX0SecondsPastTheMinute=function(d){return N(d,["в %s секунду","в %s секунды","в %s секунд"])},L.prototype.everyX0Minutes=function(d){return N(d,["каждую %s минуту","каждые %s минуты","каждые %s минут"])},L.prototype.minutesX0ThroughX1PastTheHour=function(){return"минуты с %s по %s"},L.prototype.atX0MinutesPastTheHour=function(d){return N(d,["в %s минуту","в %s минуты","в %s минут"])},L.prototype.everyX0Hours=function(d){return N(d,["каждый %s час","каждые %s часа","каждые %s часов"])},L.prototype.betweenX0AndX1=function(){return"с %s по %s"},L.prototype.atX0=function(){return"в %s"},L.prototype.commaEveryDay=function(){return", каждый день"},L.prototype.commaEveryX0DaysOfTheWeek=function(d){return N(d,["",", каждые %s дня недели",", каждые %s дней недели"])},L.prototype.commaX0ThroughX1=function(d){return d&&(d[0]=="2"||d[0]=="3")?", со %s по %s":", с %s по %s"},L.prototype.commaAndX0ThroughX1=function(d){return d&&(d[0]=="2"||d[0]=="3")?" и со %s по %s":" и с %s по %s"},L.prototype.first=function(d){return u(d,["первое","первый","первую"])},L.prototype.second=function(d){return u(d,["второе","второй","вторую"])},L.prototype.third=function(d){return u(d,["третье","третий","третью"])},L.prototype.fourth=function(d){return u(d,["четвертое","четвертый","четвертую"])},L.prototype.fifth=function(d){return u(d,["пятое","пятый","пятую"])},L.prototype.commaOnThe=function(d){return d==="2"?", во ":", в "},L.prototype.spaceX0OfTheMonth=function(){return" %s месяца"},L.prototype.lastDay=function(){return"последний день"},L.prototype.commaOnTheLastX0OfTheMonth=function(d){return u(d,[", в последнее %s месяца",", в последний %s месяца",", в последнюю %s месяца"])},L.prototype.commaOnlyOnX0=function(d){return d&&d[0]==="2"?", только во %s":", только в %s"},L.prototype.commaAndOnX0=function(){return", и %s"},L.prototype.commaEveryX0Months=function(d){return N(d,[""," каждые %s месяца"," каждые %s месяцев"])},L.prototype.commaOnlyInMonthX0=function(){return", только %s"},L.prototype.commaOnlyInX0=function(){return", только в %s"},L.prototype.commaOnTheLastDayOfTheMonth=function(){return", в последний день месяца"},L.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", в последний будний день месяца"},L.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(d){return N(d,[", за %s день до конца месяца",", за %s дня до конца месяца",", за %s дней до конца месяца"])},L.prototype.firstWeekday=function(){return"первый будний день"},L.prototype.weekdayNearestDayX0=function(){return"ближайший будний день к %s числу"},L.prototype.commaOnTheX0OfTheMonth=function(){return", в %s месяца"},L.prototype.commaEveryX0Days=function(d){return N(d,[", каждый %s день",", каждые %s дня",", каждые %s дней"])},L.prototype.commaBetweenDayX0AndX1OfTheMonth=function(d){return d&&d.substring(0,d.indexOf("-"))=="2"?", со %s по %s число месяца":", с %s по %s число месяца"},L.prototype.commaOnDayX0OfTheMonth=function(d){return d&&d[0]=="2"?", во %s число месяца":", в %s число месяца"},L.prototype.commaEveryX0Years=function(d){return N(d,[", каждый %s год",", каждые %s года",", каждые %s лет"])},L.prototype.commaStartingX0=function(){return", начало %s"},L.prototype.daysOfTheWeek=function(){return["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},L.prototype.daysOfTheWeekInCase=function(d){return d===void 0&&(d=2),d==1?["воскресенья","понедельника","вторника","среды","четверга","пятницы","субботы"]:["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"]},L.prototype.monthsOfTheYear=function(){return["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},L.prototype.monthsOfTheYearInCase=function(d){return d==1?["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]:this.monthsOfTheYear()},L}();return l.ru=g,c().locales.ru=new g,n})())})(Pxe);var Rxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:u=>{u.exports=t}},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.zh_CN=void 0;var N=function(){function u(){}return u.prototype.setPeriodBeforeTime=function(){return!0},u.prototype.pm=function(){return"下午"},u.prototype.am=function(){return"上午"},u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return", 从%s年至%s年"},u.prototype.use24HourTimeFormatByDefault=function(){return!1},u.prototype.everyMinute=function(){return"每分钟"},u.prototype.everyHour=function(){return"每小时"},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"生成表达式描述时发生了错误,请检查cron表达式语法。"},u.prototype.atSpace=function(){return"在"},u.prototype.everyMinuteBetweenX0AndX1=function(){return"在 %s 至 %s 之间的每分钟"},u.prototype.at=function(){return"在"},u.prototype.spaceAnd=function(){return" 和"},u.prototype.everySecond=function(){return"每秒"},u.prototype.everyX0Seconds=function(){return"每隔 %s 秒"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"在一分钟后的第 %s 到 %s 秒"},u.prototype.atX0SecondsPastTheMinute=function(){return"在一分钟后的第 %s 秒"},u.prototype.everyX0Minutes=function(){return"每隔 %s 分钟"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"在整点后的第 %s 到 %s 分钟"},u.prototype.atX0MinutesPastTheHour=function(){return"在整点后的第 %s 分钟"},u.prototype.everyX0Hours=function(){return"每隔 %s 小时"},u.prototype.betweenX0AndX1=function(){return"在 %s 和 %s 之间"},u.prototype.atX0=function(){return"在%s"},u.prototype.commaEveryDay=function(){return", 每天"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", 每周的每 %s 天"},u.prototype.commaX0ThroughX1=function(){return", %s至%s"},u.prototype.commaAndX0ThroughX1=function(){return", 和%s至%s"},u.prototype.first=function(){return"第一个"},u.prototype.second=function(){return"第二个"},u.prototype.third=function(){return"第三个"},u.prototype.fourth=function(){return"第四个"},u.prototype.fifth=function(){return"第五个"},u.prototype.commaOnThe=function(){return", 限每月的"},u.prototype.spaceX0OfTheMonth=function(){return"%s"},u.prototype.lastDay=function(){return"本月最后一天"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", 限每月的最后一个%s"},u.prototype.commaOnlyOnX0=function(){return", 仅%s"},u.prototype.commaAndOnX0=function(){return", 或者为%s"},u.prototype.commaEveryX0Months=function(){return", 每隔 %s 个月"},u.prototype.commaOnlyInX0=function(){return", 仅限%s"},u.prototype.commaOnlyInMonthX0=function(){return", 仅于%s份"},u.prototype.commaOnlyInYearX0=function(){return", 仅于 %s 年"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", 限每月的最后一天"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", 限每月的最后一个工作日"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", 限每月最后%s天"},u.prototype.firstWeekday=function(){return"第一个工作日"},u.prototype.weekdayNearestDayX0=function(){return"最接近 %s 号的工作日"},u.prototype.commaOnTheX0OfTheMonth=function(){return", 限每月的%s"},u.prototype.commaEveryX0Days=function(){return", 每隔 %s 天"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", 限每月的 %s 至 %s 之间"},u.prototype.commaOnDayX0OfTheMonth=function(){return", 限每月%s"},u.prototype.commaEveryX0Years=function(){return", 每隔 %s 年"},u.prototype.commaStartingX0=function(){return", %s开始"},u.prototype.dayX0=function(){return" %s 号"},u.prototype.daysOfTheWeek=function(){return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},u.prototype.monthsOfTheYear=function(){return["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},u}();return l.zh_CN=N,c().locales.zh_CN=new N,n})())})(Rxe);var Wxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:u=>{u.exports=t}},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.uk=void 0;var N=function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.everyMinute=function(){return"щохвилини"},u.prototype.everyHour=function(){return"щогодини"},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"ВІдбулася помилка підчас генерації опису. Перевірта правильність написання cron виразу."},u.prototype.atSpace=function(){return"О "},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Щохвилини між %s та %s"},u.prototype.at=function(){return"О"},u.prototype.spaceAnd=function(){return" та"},u.prototype.everySecond=function(){return"Щосекунди"},u.prototype.everyX0Seconds=function(){return"кожні %s секунд"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"з %s по %s секунду"},u.prototype.atX0SecondsPastTheMinute=function(){return"о %s секунді"},u.prototype.everyX0Minutes=function(){return"кожні %s хвилин"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"з %s по %s хвилину"},u.prototype.atX0MinutesPastTheHour=function(){return"о %s хвилині"},u.prototype.everyX0Hours=function(){return"кожні %s годин"},u.prototype.betweenX0AndX1=function(){return"між %s та %s"},u.prototype.atX0=function(){return"о %s"},u.prototype.commaEveryDay=function(){return", щоденно"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", кожен %s день тижня"},u.prototype.commaX0ThroughX1=function(){return", %s по %s"},u.prototype.commaAndX0ThroughX1=function(){return", та %s по %s"},u.prototype.first=function(){return"перший"},u.prototype.second=function(){return"другий"},u.prototype.third=function(){return"третій"},u.prototype.fourth=function(){return"четвертий"},u.prototype.fifth=function(){return"п'ятий"},u.prototype.commaOnThe=function(){return", в "},u.prototype.spaceX0OfTheMonth=function(){return" %s місяця"},u.prototype.lastDay=function(){return"останній день"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", в останній %s місяця"},u.prototype.commaOnlyOnX0=function(){return", тільки в %s"},u.prototype.commaAndOnX0=function(){return", і в %s"},u.prototype.commaEveryX0Months=function(){return", кожен %s місяць"},u.prototype.commaOnlyInX0=function(){return", тільки в %s"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", в останній день місяця"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", в останній будень місяця"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s днів до останнього дня місяця"},u.prototype.firstWeekday=function(){return"перший будень"},u.prototype.weekdayNearestDayX0=function(){return"будень найближчий до %s дня"},u.prototype.commaOnTheX0OfTheMonth=function(){return", в %s місяця"},u.prototype.commaEveryX0Days=function(){return", кожен %s день"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", між %s та %s днями місяця"},u.prototype.commaOnDayX0OfTheMonth=function(){return", на %s день місяця"},u.prototype.commaEveryX0Years=function(){return", кожні %s роки"},u.prototype.commaStartingX0=function(){return", початок %s"},u.prototype.daysOfTheWeek=function(){return["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"]},u.prototype.monthsOfTheYear=function(){return["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},u}();return l.uk=N,c().locales.uk=new N,n})())})(Wxe);var Bxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:u=>{u.exports=t}},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.pt_BR=void 0;var N=function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Ocorreu um erro ao gerar a descrição da expressão Cron."},u.prototype.at=function(){return"às"},u.prototype.atSpace=function(){return"às "},u.prototype.atX0=function(){return"Às %s"},u.prototype.atX0MinutesPastTheHour=function(){return"aos %s minutos da hora"},u.prototype.atX0SecondsPastTheMinute=function(){return"aos %s segundos do minuto"},u.prototype.betweenX0AndX1=function(){return"entre %s e %s"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", entre os dias %s e %s do mês"},u.prototype.commaEveryDay=function(){return", a cada dia"},u.prototype.commaEveryX0Days=function(){return", a cada %s dias"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", a cada %s dias de semana"},u.prototype.commaEveryX0Months=function(){return", a cada %s meses"},u.prototype.commaOnDayX0OfTheMonth=function(){return", no dia %s do mês"},u.prototype.commaOnlyInX0=function(g){return g&&g.length>1&&g[1]==="-"?"somente %s":", somente em %s"},u.prototype.commaOnlyOnX0=function(g){return g&&g.length>1&&g[1]==="-"?", somente %s":", somente de %s"},u.prototype.commaAndOnX0=function(){return", e de %s"},u.prototype.commaOnThe=function(g,L){return L==="6"||L==="0"?", no":", na "},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", no último dia do mês"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", no último dia da semana do mês"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s dias antes do último dia do mês"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", na última %s do mês"},u.prototype.commaOnTheX0OfTheMonth=function(){return", no %s do mês"},u.prototype.commaX0ThroughX1=function(){return", de %s a %s"},u.prototype.commaAndX0ThroughX1=function(){return", e de %s a %s"},u.prototype.everyHour=function(){return"a cada hora"},u.prototype.everyMinute=function(){return"a cada minuto"},u.prototype.everyMinuteBetweenX0AndX1=function(){return"a cada minuto entre %s e %s"},u.prototype.everySecond=function(){return"a cada segundo"},u.prototype.everyX0Hours=function(){return"a cada %s horas"},u.prototype.everyX0Minutes=function(){return"a cada %s minutos"},u.prototype.everyX0Seconds=function(){return"a cada %s segundos"},u.prototype.fifth=function(g){return g==="6"||g==="0"?"quinto":"quinta"},u.prototype.first=function(g){return g==="6"||g==="0"?"primeiro":"primeira"},u.prototype.firstWeekday=function(){return"primeiro dia da semana"},u.prototype.fourth=function(g){return g==="6"||g==="0"?"quarto":"quarta"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"do minuto %s até %s de cada hora"},u.prototype.second=function(g){return g==="6"||g==="0"?"segundo":"segunda"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"No segundo %s até %s de cada minuto"},u.prototype.spaceAnd=function(){return" e"},u.prototype.spaceX0OfTheMonth=function(){return" %s do mês"},u.prototype.lastDay=function(){return"o último dia"},u.prototype.third=function(g){return g==="6"||g==="0"?"terceiro":"terceira"},u.prototype.weekdayNearestDayX0=function(){return"dia da semana mais próximo do dia %s"},u.prototype.commaEveryX0Years=function(){return", a cada %s anos"},u.prototype.commaStartingX0=function(){return", iniciando %s"},u.prototype.daysOfTheWeek=function(){return["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},u.prototype.monthsOfTheYear=function(){return["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},u}();return l.pt_BR=N,c().locales.pt_BR=new N,n})())})(Bxe);var Fxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:u=>{u.exports=t}},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.pl=void 0;var N=function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Wystąpił błąd podczas generowania opisu wyrażenia cron. Sprawdź składnię wyrażenia cron."},u.prototype.at=function(){return"O"},u.prototype.atSpace=function(){return"O "},u.prototype.atX0=function(){return"o %s"},u.prototype.atX0MinutesPastTheHour=function(){return"w %s minucie"},u.prototype.atX0SecondsPastTheMinute=function(){return"w %s sekundzie"},u.prototype.betweenX0AndX1=function(){return"od %s do %s"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", od %s-ego do %s-ego dnia miesiąca"},u.prototype.commaEveryDay=function(){return", co dzień"},u.prototype.commaEveryX0Days=function(){return", co %s dni"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", co %s dni tygodnia"},u.prototype.commaEveryX0Months=function(){return", co %s miesięcy"},u.prototype.commaEveryX0Years=function(){return", co %s lat"},u.prototype.commaOnDayX0OfTheMonth=function(){return", %s-ego dnia miesiąca"},u.prototype.commaOnlyInX0=function(){return", tylko %s"},u.prototype.commaOnlyOnX0=function(){return", tylko %s"},u.prototype.commaAndOnX0=function(){return", i %s"},u.prototype.commaOnThe=function(){return", "},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", ostatni dzień miesiąca"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", ostatni dzień roboczy miesiąca"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s dni przed ostatnim dniem miesiąca"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", ostatni %s miesiąca"},u.prototype.commaOnTheX0OfTheMonth=function(){return", %s miesiąca"},u.prototype.commaX0ThroughX1=function(){return", od %s do %s"},u.prototype.commaAndX0ThroughX1=function(){return", i od %s do %s"},u.prototype.everyHour=function(){return"co godzinę"},u.prototype.everyMinute=function(){return"co minutę"},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Co minutę od %s do %s"},u.prototype.everySecond=function(){return"co sekundę"},u.prototype.everyX0Hours=function(){return"co %s godzin"},u.prototype.everyX0Minutes=function(){return"co %s minut"},u.prototype.everyX0Seconds=function(){return"co %s sekund"},u.prototype.fifth=function(){return"piąty"},u.prototype.first=function(){return"pierwszy"},u.prototype.firstWeekday=function(){return"pierwszy dzień roboczy"},u.prototype.fourth=function(){return"czwarty"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"minuty od %s do %s"},u.prototype.second=function(){return"drugi"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"sekundy od %s do %s"},u.prototype.spaceAnd=function(){return" i"},u.prototype.spaceX0OfTheMonth=function(){return" %s miesiąca"},u.prototype.lastDay=function(){return"ostatni dzień"},u.prototype.third=function(){return"trzeci"},u.prototype.weekdayNearestDayX0=function(){return"dzień roboczy najbliższy %s-ego dnia"},u.prototype.commaStartingX0=function(){return", startowy %s"},u.prototype.daysOfTheWeek=function(){return["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},u.prototype.monthsOfTheYear=function(){return["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"]},u}();return l.pl=N,c().locales.pl=new N,n})())})(Fxe);function Lg(i,e){return bxe.toString(i,{locale:e})}const Re={mainDiv:{width:"100%",height:"100%"},periodSelect:{display:"block",width:250},tabContent:{padding:20,height:"calc(100% - 240px)",overflow:"auto"},numberButton:{padding:4,minWidth:40,margin:5},appBar:{color:"white"},warning:{marginLeft:16,color:"red",fontSize:12}},Jxe=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Gxe=["January","February","March","April","May","June","July","August","September","October","November","December"];function Vl(i,e){const t=[];if(i==="*"){if(e===24||e===60||e===7)for(let s=0;s<e;s++)t.push(s);else for(let s=1;s<=e;s++)t.push(s);return t}const r=(i||"").toString().split(",");for(let s=0;s<r.length;s++){if(!r[s].trim().length)continue;const o=r[s].trim().split("-");if(o.length>1){const n=parseInt(o[1],10);for(let a=parseInt(o[0],10);a<=n;a++)t.push(a)}else t.push(parseInt(r[s],10))}t.sort();for(let s=t.length-1;s>=0;s--)t[s]===t[s+1]&&t.splice(s+1,1);return t}function Zl(i,e){if(typeof i!="object"&&(i=[i]),i.length===e)return"*";const t=[];if(!i.length)return"-";i=i.map(o=>parseInt(o,10)),i.sort((o,n)=>o-n);let r=i[0],s=i[0];for(let o=1;o<i.length;o++)i[o]-1!==parseInt(i[o-1],10)&&(r===s?t.push(r):s-1===r?t.push(`${r},${s}`):t.push(`${r}-${s}`),r=i[o]),s=i[o];return r===s?t.push(r):s-1===r?t.push(`${r},${s}`):t.push(`${r}-${s}`),t.join(",")}class Kt extends _.Component{constructor(e){super(e);let t=typeof this.props.cronExpression=="string"?this.props.cronExpression.replace(/^["']/,"").replace(/["']\n?$/,""):"";t[0]==="{"&&(t="");const r=Kt.cron2state(t||"* * * * *");this.state={extended:!1,tab:r.seconds!==!1?1:0,cron:Kt.state2cron(r),modes:{seconds:null,minutes:null,hours:null,dates:null,months:null,dow:null}},Object.assign(this.state,r),this.state.cron!==this.props.cronExpression&&setTimeout(()=>this.props.onChange&&this.props.onChange(this.state.cron),100)}static cron2state(e){e=e.replace(/['"]/g,"").trim();const t=e.split(" ").map(s=>s.trim());let r;return t.length===6?r={seconds:t[0]||"*",minutes:t[1]||"*",hours:t[2]||"*",dates:t[3]||"*",months:t[4]||"*",dow:t[5]||"*"}:r={seconds:!1,minutes:t[0]||"*",hours:t[1]||"*",dates:t[2]||"*",months:t[3]||"*",dow:t[4]||"*"},r}static state2cron(e){let t=`${e.minutes} ${e.hours} ${e.dates} ${e.months} ${e.dow}`;return e.seconds!==!1&&(t=`${e.seconds} ${t}`),t}recalcCron(){const e=Kt.state2cron(this.state);e!==this.state.cron&&this.setState({cron:e},()=>this.props.onChange&&this.props.onChange(this.state.cron))}onToggle(e,t,r){if(e===!0)this.setCronAttr(t,"*");else if(e===!1)r===60||r===24?this.setCronAttr(t,"0"):this.setCronAttr(t,"1");else{const s=Vl(this.state[t],r),o=s.indexOf(e);o!==-1?s.splice(o,1):(s.push(e),s.sort()),this.setCronAttr(t,Zl(s,r))}}getDigitsSelector(e,t){let r=[];if(t===7)r=[1,2,3,4,5,6,0];else if(t===60||t===24)for(let o=0;o<t;o++)r.push(o);else for(let o=1;o<=t;o++)r.push(o);const s=Vl(this.state[e],t);return[M.createElement(j.Button,{key:"removeall",variant:"outlined",style:Re.numberButton,color:"primary",onClick:()=>this.onToggle(!1,e,t)},p.t("ra_Deselect all")),M.createElement(j.Button,{key:"addall",variant:"contained",style:Re.numberButton,color:"secondary",onClick:()=>this.onToggle(!0,e,t)},p.t("ra_Select all")),M.createElement("div",{key:"all"},r.map(o=>[t===7&&o===4||t===12&&o===7||t===31&&!((o-1)%10)||t===60&&o&&!(o%10)||t===24&&o&&!(o%6)?M.createElement("div",{key:`allInner${o}`,style:{width:"100%"}}):null,M.createElement(j.Button,{key:`_${o}`,variant:s.indexOf(o)!==-1?"contained":"outlined",style:Re.numberButton,color:s.indexOf(o)!==-1?"secondary":"primary",onClick:()=>this.onToggle(o,e,t)},t===7?p.t(Jxe[o]):t===12?Gxe[o-1]:o)]))]}getPeriodsTab(e,t){const r=this.state[e];let s=r==="*",o=r==null?!1:r.toString().includes("/"),n;if(this.state.modes[e]===null){n=s?"every":o?"everyN":"specific";const c=JSON.parse(JSON.stringify(this.state.modes));return c[e]=n,setTimeout(()=>this.setState({modes:c},()=>this.recalcCron()),100),null}s=this.state.modes[e]==="every",o=this.state.modes[e]==="everyN",n=this.state.modes[e];let a=1;return o&&r&&(a=parseInt(r.replace("*/",""),10)||1),M.createElement("div",null,M.createElement(j.Select,{variant:"standard",style:{...Re.periodSelect,verticalAlign:"bottom"},value:n,onChange:c=>{const l=JSON.parse(JSON.stringify(this.state.modes));if(l[e]=c.target.value,c.target.value==="every")this.setCronAttr(e,"*",l);else if(c.target.value==="everyN"){const N=parseInt((this.state[e]||"").toString().replace("*/",""),10)||1;this.setCronAttr(e,`*/${N}`,l)}else if(c.target.value==="specific"){let N=parseInt((this.state[e]||"").toString().split(",")[0],10)||0;!N&&(e==="months"||e==="dates")&&(N=1),this.setCronAttr(e,Zl(N,t),l)}}},M.createElement(j.MenuItem,{key:"every",value:"every"},p.t(`sc_every_${e}`)),M.createElement(j.MenuItem,{key:"everyN",value:"everyN"},p.t(`sc_everyN_${e}`)),M.createElement(j.MenuItem,{key:"specific",value:"specific"},p.t(`sc_specific_${e}`))),o&&M.createElement(j.TextField,{variant:"standard",key:"interval",label:p.t(`sc_${e}`),value:a,slotProps:{htmlInput:{min:1,max:t},inputLabel:{shrink:!0}},onChange:c=>{this.setState({[e]:`*/${c.target.value}`},()=>this.recalcCron())},type:"number",margin:"normal"}),!s&&!o&&this.getDigitsSelector(e,t))}static convertCronToText(e,t){return e.split(" ").includes("-")?p.t("ra_Invalid CRON"):Lg(e,t)}setCronAttr(e,t,r){r?e==="seconds"?this.setState({seconds:t,modes:r},()=>this.recalcCron()):e==="minutes"?this.setState({minutes:t,modes:r},()=>this.recalcCron()):e==="hours"?this.setState({hours:t,modes:r},()=>this.recalcCron()):e==="dates"?this.setState({dates:t,modes:r},()=>this.recalcCron()):e==="months"?this.setState({months:t,modes:r},()=>this.recalcCron()):e==="dow"?this.setState({dow:t,modes:r},()=>this.recalcCron()):this.setState({modes:r},()=>this.recalcCron()):e==="seconds"?this.setState({seconds:t},()=>this.recalcCron()):e==="minutes"?this.setState({minutes:t},()=>this.recalcCron()):e==="hours"?this.setState({hours:t},()=>this.recalcCron()):e==="dates"?this.setState({dates:t},()=>this.recalcCron()):e==="months"?this.setState({months:t},()=>this.recalcCron()):e==="dow"&&this.setState({dow:t},()=>this.recalcCron())}render(){const e=this.state.seconds!==!1?this.state.tab:this.state.tab+1,t=this.state.minutes==="*"||this.state.minutes==="*/1",r=this.state.seconds==="*"||this.state.seconds==="*/1";return M.createElement("div",{style:Re.mainDiv},M.createElement("div",{style:{paddingLeft:8,width:"calc(100% - px)"}},M.createElement(j.TextField,{variant:"standard",style:{width:"100%"},value:this.state.cron,disabled:!0})),M.createElement("div",{style:{paddingLeft:8,width:"calc(100% - px)",height:60}},Kt.convertCronToText(this.state.cron,this.props.language||"en"),M.createElement("span",{style:Re.warning},r?p.t("ra_warning_every_second"):t?p.t("ra_warning_every_minute"):"")),M.createElement(j.FormControlLabel,{control:M.createElement(j.Checkbox,{checked:!!this.state.seconds,onChange:s=>this.setState({seconds:s.target.checked?"*":!1},()=>this.recalcCron())}),label:p.t("ra_use seconds")}),M.createElement(j.AppBar,{position:"static",sx:{"&.MuiAppBar-root":Re.appBar},color:"secondary"},M.createElement(j.Tabs,{value:this.state.tab,style:Re.appBar,color:"secondary",onChange:(s,o)=>this.setState({tab:o})},this.state.seconds!==!1&&M.createElement(j.Tab,{id:"sc_seconds",label:p.t("sc_seconds")}),M.createElement(j.Tab,{id:"minutes",label:p.t("sc_minutes")}),M.createElement(j.Tab,{id:"hours",label:p.t("sc_hours")}),M.createElement(j.Tab,{id:"dates",label:p.t("sc_dates")}),M.createElement(j.Tab,{id:"months",label:p.t("sc_months")}),M.createElement(j.Tab,{id:"dow",label:p.t("sc_dows")}))),e===0&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("seconds",60)),e===1&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("minutes",60)),e===2&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("hours",24)),e===3&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("dates",31)),e===4&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("months",12)),e===5&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("dow",7)))}}const Ui={modalDialog:{minWidth:400,maxWidth:800},overflowHidden:{display:"flex",overflow:"hidden"},titleIcon:{marginRight:5},content:{fontSize:16},languageButton:{position:"absolute",right:8,top:8},languageButtonActive:i=>({color:i.palette.primary.main})};function Ske(i){const{open:e,toggleTranslation:t,noTranslation:r,title:s,fullWidth:o,help:n,maxWidth:a,progress:c,icon:l,applyDisabled:N,applyButton:u,onClose:g,children:L,titleButtonApply:d,titleButtonClose:y,onApply:D,textInput:z,defaultValue:A,overflowHidden:C}=i,[f,m]=_.useState(A||"");_.useEffect(()=>{m(A||"")},[A]);let h=null;return l&&(h=l),M.createElement(j.Dialog,{open:e,maxWidth:a||"md",fullWidth:!!o,disableEscapeKeyDown:!1,onClose:g,sx:{"& .MuiDialog-paper":Ui.modalDialog}},s&&M.createElement(j.DialogTitle,null,l?M.createElement(h,{style:Ui.titleIcon}):null,s,p.getLanguage()!=="en"&&t?M.createElement(j.IconButton,{size:"large",sx:E.getStyle(i.theme,Ui.languageButton,r&&Ui.languageButtonActive),onClick:()=>t(),title:p.t("Disable/Enable translation")},M.createElement(O.Language,null)):null),M.createElement(j.DialogContent,{style:{...Ui.content,...C?Ui.overflowHidden:void 0,paddingTop:8}},z&&M.createElement(j.TextField,{autoComplete:"off",fullWidth:!0,autoFocus:!0,variant:"outlined",size:"medium",multiline:!0,value:f,onChange:x=>m(x.target.value)}),L,n?M.createElement("div",null,n):null),M.createElement(j.DialogActions,null,u!==!1&&M.createElement(j.Button,{startIcon:M.createElement(O.Check,null),disabled:c||N&&A===f,onClick:()=>D(z?f:""),variant:"contained",color:"primary"},p.t(d||"ra_Ok")),M.createElement(j.Button,{color:"grey",onClick:g,disabled:c,variant:"contained",startIcon:M.createElement(O.Close,null)},p.t(y||"ra_Cancel"))))}const Hxe=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Dr(i,e,t){const r=Vxe(i),{webkitRelativePath:s}=i,o=typeof e=="string"?e:typeof s=="string"&&s.length>0?s:`./${i.name}`;return typeof r.path!="string"&&Xl(r,"path",o),Xl(r,"relativePath",o),r}function Vxe(i){const{name:e}=i;if(e&&e.lastIndexOf(".")!==-1&&!i.type){const r=e.split(".").pop().toLowerCase(),s=Hxe.get(r);s&&Object.defineProperty(i,"type",{value:s,writable:!1,configurable:!1,enumerable:!0})}return i}function Xl(i,e,t){Object.defineProperty(i,e,{value:t,writable:!1,configurable:!1,enumerable:!0})}const Zxe=[".DS_Store","Thumbs.db"];function Xxe(i){return fi(this,void 0,void 0,function*(){return Io(i)&&Kxe(i.dataTransfer)?iOe(i.dataTransfer,i.type):qxe(i)?eOe(i):Array.isArray(i)&&i.every(e=>"getFile"in e&&typeof e.getFile=="function")?tOe(i):[]})}function Kxe(i){return Io(i)}function qxe(i){return Io(i)&&Io(i.target)}function Io(i){return typeof i=="object"&&i!==null}function eOe(i){return Aa(i.target.files).map(e=>Dr(e))}function tOe(i){return fi(this,void 0,void 0,function*(){return(yield Promise.all(i.map(t=>t.getFile()))).map(t=>Dr(t))})}function iOe(i,e){return fi(this,void 0,void 0,function*(){if(i.items){const t=Aa(i.items).filter(s=>s.kind==="file");if(e!=="drop")return t;const r=yield Promise.all(t.map(rOe));return Kl(jg(r))}return Kl(Aa(i.files).map(t=>Dr(t)))})}function Kl(i){return i.filter(e=>Zxe.indexOf(e.name)===-1)}function Aa(i){if(i===null)return[];const e=[];for(let t=0;t<i.length;t++){const r=i[t];e.push(r)}return e}function rOe(i){if(typeof i.webkitGetAsEntry!="function")return ql(i);const e=i.webkitGetAsEntry();return e&&e.isDirectory?dg(e):ql(i,e)}function jg(i){return i.reduce((e,t)=>[...e,...Array.isArray(t)?jg(t):[t]],[])}function ql(i,e){return fi(this,void 0,void 0,function*(){var t;if(globalThis.isSecureContext&&typeof i.getAsFileSystemHandle=="function"){const o=yield i.getAsFileSystemHandle();if(o===null)throw new Error(`${i} is not a File`);if(o!==void 0){const n=yield o.getFile();return n.handle=o,Dr(n)}}const r=i.getAsFile();if(!r)throw new Error(`${i} is not a File`);return Dr(r,(t=e==null?void 0:e.fullPath)!==null&&t!==void 0?t:void 0)})}function sOe(i){return fi(this,void 0,void 0,function*(){return i.isDirectory?dg(i):oOe(i)})}function dg(i){const e=i.createReader();return new Promise((t,r)=>{const s=[];function o(){e.readEntries(n=>fi(this,void 0,void 0,function*(){if(n.length){const a=Promise.all(n.map(sOe));s.push(a),o()}else try{const a=yield Promise.all(s);t(a)}catch(a){r(a)}}),n=>{r(n)})}o()})}function oOe(i){return fi(this,void 0,void 0,function*(){return new Promise((e,t)=>{i.file(r=>{const s=Dr(r,i.fullPath);e(s)},r=>{t(r)})})})}var Un=function(i,e){if(i&&e){var t=Array.isArray(e)?e:e.split(",");if(t.length===0)return!0;var r=i.name||"",s=(i.type||"").toLowerCase(),o=s.replace(/\/.*$/,"");return t.some(function(n){var a=n.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?o===a.replace(/\/.*$/,""):s===a})}return!0};function eN(i){return MOe(i)||aOe(i)||Tg(i)||nOe()}function nOe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
324
+ `),M.createElement("div",{style:N.white,className:"saturation-white"},M.createElement("div",{style:N.black,className:"saturation-black"}),M.createElement("div",{style:N.pointer},this.props.pointer?M.createElement(this.props.pointer,this.props):M.createElement("div",{style:N.circle}))))}}]),e})(_.PureComponent||_.Component);function WAe(i,e){for(var t=-1,r=i==null?0:i.length;++t<r&&e(i[t],t,i)!==!1;);return i}var BAe=R4(Object.keys,Object),FAe=Object.prototype,JAe=FAe.hasOwnProperty;function GAe(i){if(!QM(i))return BAe(i);var e=[];for(var t in Object(i))JAe.call(i,t)&&t!="constructor"&&e.push(t);return e}function RM(i){return Er(i)?H4(i):GAe(i)}function HAe(i,e){return i&&$4(i,e,RM)}function VAe(i,e){return function(t,r){if(t==null)return t;if(!Er(t))return i(t,r);for(var s=t.length,o=-1,n=Object(t);++o<s&&r(n[o],o,n)!==!1;);return t}}var K4=VAe(HAe);function ZAe(i){return typeof i=="function"?i:Ko}function XAe(i,e){var t=Ke(i)?WAe:K4;return t(i,ZAe(e))}function wo(i){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wo(i)}var KAe=/^\s+/,qAe=/\s+$/;function F(i,e){if(i=i||"",e=e||{},i instanceof F)return i;if(!(this instanceof F))return new F(i,e);var t=e2e(i);this._originalInput=i,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}F.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,s,o,n,a;return t=e.r/255,r=e.g/255,s=e.b/255,t<=.03928?o=t/12.92:o=Math.pow((t+.055)/1.055,2.4),r<=.03928?n=r/12.92:n=Math.pow((r+.055)/1.055,2.4),s<=.03928?a=s/12.92:a=Math.pow((s+.055)/1.055,2.4),.2126*o+.7152*n+.0722*a},setAlpha:function(e){return this._a=q4(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=hl(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=hl(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),s=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+s+"%)":"hsva("+t+", "+r+"%, "+s+"%, "+this._roundA+")"},toHsl:function(){var e=Dl(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Dl(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),s=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+s+"%)":"hsla("+t+", "+r+"%, "+s+"%, "+this._roundA+")"},toHex:function(e){return pl(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return s2e(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Le(this._r,255)*100)+"%",g:Math.round(Le(this._g,255)*100)+"%",b:Math.round(Le(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Le(this._r,255)*100)+"%, "+Math.round(Le(this._g,255)*100)+"%, "+Math.round(Le(this._b,255)*100)+"%)":"rgba("+Math.round(Le(this._r,255)*100)+"%, "+Math.round(Le(this._g,255)*100)+"%, "+Math.round(Le(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:d2e[pl(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+zl(this._r,this._g,this._b,this._a),r=t,s=this._gradientType?"GradientType = 1, ":"";if(e){var o=F(e);r="#"+zl(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+s+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,s=this._a<1&&this._a>=0,o=!t&&s&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return F(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(M2e,arguments)},brighten:function(){return this._applyModification(c2e,arguments)},darken:function(){return this._applyModification(u2e,arguments)},desaturate:function(){return this._applyModification(o2e,arguments)},saturate:function(){return this._applyModification(n2e,arguments)},greyscale:function(){return this._applyModification(a2e,arguments)},spin:function(){return this._applyModification(l2e,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(L2e,arguments)},complement:function(){return this._applyCombination(N2e,arguments)},monochromatic:function(){return this._applyCombination(j2e,arguments)},splitcomplement:function(){return this._applyCombination(g2e,arguments)},triad:function(){return this._applyCombination(wl,[3])},tetrad:function(){return this._applyCombination(wl,[4])}};F.fromRatio=function(i,e){if(wo(i)=="object"){var t={};for(var r in i)i.hasOwnProperty(r)&&(r==="a"?t[r]=i[r]:t[r]=Xr(i[r]));i=t}return F(i,e)};function e2e(i){var e={r:0,g:0,b:0},t=1,r=null,s=null,o=null,n=!1,a=!1;return typeof i=="string"&&(i=h2e(i)),wo(i)=="object"&&(At(i.r)&&At(i.g)&&At(i.b)?(e=t2e(i.r,i.g,i.b),n=!0,a=String(i.r).substr(-1)==="%"?"prgb":"rgb"):At(i.h)&&At(i.s)&&At(i.v)?(r=Xr(i.s),s=Xr(i.v),e=r2e(i.h,r,s),n=!0,a="hsv"):At(i.h)&&At(i.s)&&At(i.l)&&(r=Xr(i.s),o=Xr(i.l),e=i2e(i.h,r,o),n=!0,a="hsl"),i.hasOwnProperty("a")&&(t=i.a)),t=q4(t),{ok:n,format:i.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function t2e(i,e,t){return{r:Le(i,255)*255,g:Le(e,255)*255,b:Le(t,255)*255}}function Dl(i,e,t){i=Le(i,255),e=Le(e,255),t=Le(t,255);var r=Math.max(i,e,t),s=Math.min(i,e,t),o,n,a=(r+s)/2;if(r==s)o=n=0;else{var c=r-s;switch(n=a>.5?c/(2-r-s):c/(r+s),r){case i:o=(e-t)/c+(e<t?6:0);break;case e:o=(t-i)/c+2;break;case t:o=(i-e)/c+4;break}o/=6}return{h:o,s:n,l:a}}function i2e(i,e,t){var r,s,o;i=Le(i,360),e=Le(e,100),t=Le(t,100);function n(l,N,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?l+(N-l)*6*u:u<1/2?N:u<2/3?l+(N-l)*(2/3-u)*6:l}if(e===0)r=s=o=t;else{var a=t<.5?t*(1+e):t+e-t*e,c=2*t-a;r=n(c,a,i+1/3),s=n(c,a,i),o=n(c,a,i-1/3)}return{r:r*255,g:s*255,b:o*255}}function hl(i,e,t){i=Le(i,255),e=Le(e,255),t=Le(t,255);var r=Math.max(i,e,t),s=Math.min(i,e,t),o,n,a=r,c=r-s;if(n=r===0?0:c/r,r==s)o=0;else{switch(r){case i:o=(e-t)/c+(e<t?6:0);break;case e:o=(t-i)/c+2;break;case t:o=(i-e)/c+4;break}o/=6}return{h:o,s:n,v:a}}function r2e(i,e,t){i=Le(i,360)*6,e=Le(e,100),t=Le(t,100);var r=Math.floor(i),s=i-r,o=t*(1-e),n=t*(1-s*e),a=t*(1-(1-s)*e),c=r%6,l=[t,n,o,o,a,t][c],N=[a,t,t,n,o,o][c],u=[o,o,a,t,t,n][c];return{r:l*255,g:N*255,b:u*255}}function pl(i,e,t,r){var s=[ct(Math.round(i).toString(16)),ct(Math.round(e).toString(16)),ct(Math.round(t).toString(16))];return r&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function s2e(i,e,t,r,s){var o=[ct(Math.round(i).toString(16)),ct(Math.round(e).toString(16)),ct(Math.round(t).toString(16)),ct(eg(r))];return s&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function zl(i,e,t,r){var s=[ct(eg(r)),ct(Math.round(i).toString(16)),ct(Math.round(e).toString(16)),ct(Math.round(t).toString(16))];return s.join("")}F.equals=function(i,e){return!i||!e?!1:F(i).toRgbString()==F(e).toRgbString()};F.random=function(){return F.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function o2e(i,e){e=e===0?0:e||10;var t=F(i).toHsl();return t.s-=e/100,t.s=tn(t.s),F(t)}function n2e(i,e){e=e===0?0:e||10;var t=F(i).toHsl();return t.s+=e/100,t.s=tn(t.s),F(t)}function a2e(i){return F(i).desaturate(100)}function M2e(i,e){e=e===0?0:e||10;var t=F(i).toHsl();return t.l+=e/100,t.l=tn(t.l),F(t)}function c2e(i,e){e=e===0?0:e||10;var t=F(i).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),F(t)}function u2e(i,e){e=e===0?0:e||10;var t=F(i).toHsl();return t.l-=e/100,t.l=tn(t.l),F(t)}function l2e(i,e){var t=F(i).toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,F(t)}function N2e(i){var e=F(i).toHsl();return e.h=(e.h+180)%360,F(e)}function wl(i,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var t=F(i).toHsl(),r=[F(i)],s=360/e,o=1;o<e;o++)r.push(F({h:(t.h+o*s)%360,s:t.s,l:t.l}));return r}function g2e(i){var e=F(i).toHsl(),t=e.h;return[F(i),F({h:(t+72)%360,s:e.s,l:e.l}),F({h:(t+216)%360,s:e.s,l:e.l})]}function L2e(i,e,t){e=e||6,t=t||30;var r=F(i).toHsl(),s=360/t,o=[F(i)];for(r.h=(r.h-(s*e>>1)+720)%360;--e;)r.h=(r.h+s)%360,o.push(F(r));return o}function j2e(i,e){e=e||6;for(var t=F(i).toHsv(),r=t.h,s=t.s,o=t.v,n=[],a=1/e;e--;)n.push(F({h:r,s,v:o})),o=(o+a)%1;return n}F.mix=function(i,e,t){t=t===0?0:t||50;var r=F(i).toRgb(),s=F(e).toRgb(),o=t/100,n={r:(s.r-r.r)*o+r.r,g:(s.g-r.g)*o+r.g,b:(s.b-r.b)*o+r.b,a:(s.a-r.a)*o+r.a};return F(n)};F.readability=function(i,e){var t=F(i),r=F(e);return(Math.max(t.getLuminance(),r.getLuminance())+.05)/(Math.min(t.getLuminance(),r.getLuminance())+.05)};F.isReadable=function(i,e,t){var r=F.readability(i,e),s,o;switch(o=!1,s=p2e(t),s.level+s.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o};F.mostReadable=function(i,e,t){var r=null,s=0,o,n,a,c;t=t||{},n=t.includeFallbackColors,a=t.level,c=t.size;for(var l=0;l<e.length;l++)o=F.readability(i,e[l]),o>s&&(s=o,r=F(e[l]));return F.isReadable(i,r,{level:a,size:c})||!n?r:(t.includeFallbackColors=!1,F.mostReadable(i,["#fff","#000"],t))};var za=F.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},d2e=F.hexNames=y2e(za);function y2e(i){var e={};for(var t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function q4(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function Le(i,e){T2e(i)&&(i="100%");var t=D2e(i);return i=Math.min(e,Math.max(0,parseFloat(i))),t&&(i=parseInt(i*e,10)/100),Math.abs(i-e)<1e-6?1:i%e/parseFloat(e)}function tn(i){return Math.min(1,Math.max(0,i))}function Ze(i){return parseInt(i,16)}function T2e(i){return typeof i=="string"&&i.indexOf(".")!=-1&&parseFloat(i)===1}function D2e(i){return typeof i=="string"&&i.indexOf("%")!=-1}function ct(i){return i.length==1?"0"+i:""+i}function Xr(i){return i<=1&&(i=i*100+"%"),i}function eg(i){return Math.round(parseFloat(i)*255).toString(16)}function Cl(i){return Ze(i)/255}var Mt=(function(){var i="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+i+")",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",s="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+s),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+s),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+s),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function At(i){return!!Mt.CSS_UNIT.exec(i)}function h2e(i){i=i.replace(KAe,"").replace(qAe,"").toLowerCase();var e=!1;if(za[i])i=za[i],e=!0;else if(i=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Mt.rgb.exec(i))?{r:t[1],g:t[2],b:t[3]}:(t=Mt.rgba.exec(i))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Mt.hsl.exec(i))?{h:t[1],s:t[2],l:t[3]}:(t=Mt.hsla.exec(i))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Mt.hsv.exec(i))?{h:t[1],s:t[2],v:t[3]}:(t=Mt.hsva.exec(i))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Mt.hex8.exec(i))?{r:Ze(t[1]),g:Ze(t[2]),b:Ze(t[3]),a:Cl(t[4]),format:e?"name":"hex8"}:(t=Mt.hex6.exec(i))?{r:Ze(t[1]),g:Ze(t[2]),b:Ze(t[3]),format:e?"name":"hex"}:(t=Mt.hex4.exec(i))?{r:Ze(t[1]+""+t[1]),g:Ze(t[2]+""+t[2]),b:Ze(t[3]+""+t[3]),a:Cl(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=Mt.hex3.exec(i))?{r:Ze(t[1]+""+t[1]),g:Ze(t[2]+""+t[2]),b:Ze(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function p2e(i){var e,t;return i=i||{level:"AA",size:"small"},e=(i.level||"AA").toUpperCase(),t=(i.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}var Il=function(e){var t=["r","g","b","a","h","s","l","v"],r=0,s=0;return XAe(t,function(o){if(e[o]&&(r+=1,isNaN(e[o])||(s+=1),o==="s"||o==="l")){var n=/^\d+%$/;n.test(e[o])&&(s+=1)}}),r===s?e:!1},Kr=function(e,t){var r=e.hex?F(e.hex):F(e),s=r.toHsl(),o=r.toHsv(),n=r.toRgb(),a=r.toHex();s.s===0&&(s.h=t||0,o.h=t||0);var c=a==="000000"&&n.a===0;return{hsl:s,hex:c?"transparent":"#"+a,rgb:n,hsv:o,oldHue:e.h||t||s.h,source:e.source}},ai=function(e){if(e==="transparent")return!0;var t=String(e).charAt(0)==="#"?1:0;return e.length!==4+t&&e.length<7+t&&F(e).isValid()},WM=function(e){if(!e)return"#fff";var t=Kr(e);if(t.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(t.rgb.r*299+t.rgb.g*587+t.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},bn=function(e,t){var r=e.replace("°","");return F(t+" ("+r+")")._ok},Wr=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},z2e=(function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}})();function w2e(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function C2e(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function I2e(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var He=function(e){var t=(function(r){I2e(s,r);function s(o){w2e(this,s);var n=C2e(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return n.handleChange=function(a,c){var l=Il(a);if(l){var N=Kr(a,a.h||n.state.oldHue);n.setState(N),n.props.onChangeComplete&&n.debounce(n.props.onChangeComplete,N,c),n.props.onChange&&n.props.onChange(N,c)}},n.handleSwatchHover=function(a,c){var l=Il(a);if(l){var N=Kr(a,a.h||n.state.oldHue);n.props.onSwatchHover&&n.props.onSwatchHover(N,c)}},n.state=Wr({},Kr(o.color,0)),n.debounce=X4(function(a,c,l){a(c,l)},100),n}return z2e(s,[{key:"render",value:function(){var n={};return this.props.onSwatchHover&&(n.onSwatchHover=this.handleSwatchHover),M.createElement(e,Wr({},this.props,this.state,{onChange:this.handleChange},n))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return Wr({},Kr(n.color,a.oldHue))}}]),s})(_.PureComponent||_.Component);return t.propTypes=Wr({},e.propTypes),t.defaultProps=Wr({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},m2e=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},A2e=(function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}})();function f2e(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function ml(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function x2e(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var O2e=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return(function(r){x2e(s,r);function s(){var o,n,a,c;f2e(this,s);for(var l=arguments.length,N=Array(l),u=0;u<l;u++)N[u]=arguments[u];return c=(n=(a=ml(this,(o=s.__proto__||Object.getPrototypeOf(s)).call.apply(o,[this].concat(N))),a),a.state={focus:!1},a.handleFocus=function(){return a.setState({focus:!0})},a.handleBlur=function(){return a.setState({focus:!1})},n),ml(a,c)}return A2e(s,[{key:"render",value:function(){return M.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},M.createElement(e,m2e({},this.props,this.state)))}}]),s})(M.Component)},Al=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},E2e=13,_2e=function(e){var t=e.color,r=e.style,s=e.onClick,o=s===void 0?function(){}:s,n=e.onHover,a=e.title,c=a===void 0?t:a,l=e.children,N=e.focus,u=e.focusStyle,g=u===void 0?{}:u,L=t==="transparent",d=K({default:{swatch:Al({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,N?g:{})}}),y=function(f){return o(t,f)},D=function(f){return f.keyCode===E2e&&o(t,f)},z=function(f){return n(t,f)},A={};return n&&(A.onMouseOver=z),M.createElement("div",Al({style:d.swatch,onClick:y,title:c,tabIndex:0,onKeyDown:D},A),l,L&&M.createElement(xr,{borderRadius:d.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const bi=O2e(_2e);var S2e=function(e){var t=e.direction,r=K({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return M.createElement("div",{style:r.picker})},k2e=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},tg=function(e){var t=e.rgb,r=e.hsl,s=e.width,o=e.height,n=e.onChange,a=e.direction,c=e.style,l=e.renderers,N=e.pointer,u=e.className,g=u===void 0?"":u,L=K({default:{picker:{position:"relative",width:s,height:o},alpha:{radius:"2px",style:c}}});return M.createElement("div",{style:L.picker,className:"alpha-picker "+g},M.createElement(vM,k2e({},L.alpha,{rgb:t,hsl:r,pointer:N,renderers:l,onChange:n,direction:a})))};tg.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:S2e};He(tg);function ig(i,e){for(var t=-1,r=i==null?0:i.length,s=Array(r);++t<r;)s[t]=e(i[t],t,i);return s}var v2e="__lodash_hash_undefined__";function b2e(i){return this.__data__.set(i,v2e),this}function Y2e(i){return this.__data__.has(i)}function Co(i){var e=-1,t=i==null?0:i.length;for(this.__data__=new $t;++e<t;)this.add(i[e])}Co.prototype.add=Co.prototype.push=b2e;Co.prototype.has=Y2e;function Q2e(i,e){for(var t=-1,r=i==null?0:i.length;++t<r;)if(e(i[t],t,i))return!0;return!1}function U2e(i,e){return i.has(e)}var $2e=1,P2e=2;function rg(i,e,t,r,s,o){var n=t&$2e,a=i.length,c=e.length;if(a!=c&&!(n&&c>a))return!1;var l=o.get(i),N=o.get(e);if(l&&N)return l==e&&N==i;var u=-1,g=!0,L=t&P2e?new Co:void 0;for(o.set(i,e),o.set(e,i);++u<a;){var d=i[u],y=e[u];if(r)var D=n?r(y,d,u,e,i,o):r(d,y,u,i,e,o);if(D!==void 0){if(D)continue;g=!1;break}if(L){if(!Q2e(e,function(z,A){if(!U2e(L,A)&&(d===z||s(d,z,t,r,o)))return L.push(A)})){g=!1;break}}else if(!(d===y||s(d,y,t,r,o))){g=!1;break}}return o.delete(i),o.delete(e),g}function R2e(i){var e=-1,t=Array(i.size);return i.forEach(function(r,s){t[++e]=[s,r]}),t}function W2e(i){var e=-1,t=Array(i.size);return i.forEach(function(r){t[++e]=r}),t}var B2e=1,F2e=2,J2e="[object Boolean]",G2e="[object Date]",H2e="[object Error]",V2e="[object Map]",Z2e="[object Number]",X2e="[object RegExp]",K2e="[object Set]",q2e="[object String]",efe="[object Symbol]",tfe="[object ArrayBuffer]",ife="[object DataView]",fl=si?si.prototype:void 0,Yn=fl?fl.valueOf:void 0;function rfe(i,e,t,r,s,o,n){switch(t){case ife:if(i.byteLength!=e.byteLength||i.byteOffset!=e.byteOffset)return!1;i=i.buffer,e=e.buffer;case tfe:return!(i.byteLength!=e.byteLength||!o(new ho(i),new ho(e)));case J2e:case G2e:case Z2e:return xs(+i,+e);case H2e:return i.name==e.name&&i.message==e.message;case X2e:case q2e:return i==e+"";case V2e:var a=R2e;case K2e:var c=r&B2e;if(a||(a=W2e),i.size!=e.size&&!c)return!1;var l=n.get(i);if(l)return l==e;r|=F2e,n.set(i,e);var N=rg(a(i),a(e),r,s,o,n);return n.delete(i),N;case efe:if(Yn)return Yn.call(i)==Yn.call(e)}return!1}function sfe(i,e){for(var t=-1,r=e.length,s=i.length;++t<r;)i[s+t]=e[t];return i}function ofe(i,e,t){var r=e(i);return Ke(i)?r:sfe(r,t(i))}function nfe(i,e){for(var t=-1,r=i==null?0:i.length,s=0,o=[];++t<r;){var n=i[t];e(n,t,i)&&(o[s++]=n)}return o}function afe(){return[]}var Mfe=Object.prototype,cfe=Mfe.propertyIsEnumerable,xl=Object.getOwnPropertySymbols,ufe=xl?function(i){return i==null?[]:(i=Object(i),nfe(xl(i),function(e){return cfe.call(i,e)}))}:afe;function Ol(i){return ofe(i,RM,ufe)}var lfe=1,Nfe=Object.prototype,gfe=Nfe.hasOwnProperty;function Lfe(i,e,t,r,s,o){var n=t&lfe,a=Ol(i),c=a.length,l=Ol(e),N=l.length;if(c!=N&&!n)return!1;for(var u=c;u--;){var g=a[u];if(!(n?g in e:gfe.call(e,g)))return!1}var L=o.get(i),d=o.get(e);if(L&&d)return L==e&&d==i;var y=!0;o.set(i,e),o.set(e,i);for(var D=n;++u<c;){g=a[u];var z=i[g],A=e[g];if(r)var C=n?r(A,z,g,e,i,o):r(z,A,g,i,e,o);if(!(C===void 0?z===A||s(z,A,t,r,o):C)){y=!1;break}D||(D=g=="constructor")}if(y&&!D){var f=i.constructor,m=e.constructor;f!=m&&"constructor"in i&&"constructor"in e&&!(typeof f=="function"&&f instanceof f&&typeof m=="function"&&m instanceof m)&&(y=!1)}return o.delete(i),o.delete(e),y}var wa=vi(Nt,"DataView"),Ca=vi(Nt,"Promise"),Ia=vi(Nt,"Set"),ma=vi(Nt,"WeakMap"),El="[object Map]",jfe="[object Object]",_l="[object Promise]",Sl="[object Set]",kl="[object WeakMap]",vl="[object DataView]",dfe=ki(wa),yfe=ki(cs),Tfe=ki(Ca),Dfe=ki(Ia),hfe=ki(ma),Zt=Si;(wa&&Zt(new wa(new ArrayBuffer(1)))!=vl||cs&&Zt(new cs)!=El||Ca&&Zt(Ca.resolve())!=_l||Ia&&Zt(new Ia)!=Sl||ma&&Zt(new ma)!=kl)&&(Zt=function(i){var e=Si(i),t=e==jfe?i.constructor:void 0,r=t?ki(t):"";if(r)switch(r){case dfe:return vl;case yfe:return El;case Tfe:return _l;case Dfe:return Sl;case hfe:return kl}return e});var pfe=1,bl="[object Arguments]",Yl="[object Array]",Ws="[object Object]",zfe=Object.prototype,Ql=zfe.hasOwnProperty;function wfe(i,e,t,r,s,o){var n=Ke(i),a=Ke(e),c=n?Yl:Zt(i),l=a?Yl:Zt(e);c=c==bl?Ws:c,l=l==bl?Ws:l;var N=c==Ws,u=l==Ws,g=c==l;if(g&&zo(i)){if(!zo(e))return!1;n=!0,N=!1}if(g&&!N)return o||(o=new pt),n||$M(i)?rg(i,e,t,r,s,o):rfe(i,e,c,t,r,s,o);if(!(t&pfe)){var L=N&&Ql.call(i,"__wrapped__"),d=u&&Ql.call(e,"__wrapped__");if(L||d){var y=L?i.value():i,D=d?e.value():e;return o||(o=new pt),s(y,D,t,r,o)}}return g?(o||(o=new pt),Lfe(i,e,t,r,s,o)):!1}function BM(i,e,t,r,s){return i===e?!0:i==null||e==null||!oi(i)&&!oi(e)?i!==i&&e!==e:wfe(i,e,t,r,BM,s)}var Cfe=1,Ife=2;function mfe(i,e,t,r){var s=t.length,o=s;if(i==null)return!o;for(i=Object(i);s--;){var n=t[s];if(n[2]?n[1]!==i[n[0]]:!(n[0]in i))return!1}for(;++s<o;){n=t[s];var a=n[0],c=i[a],l=n[1];if(n[2]){if(c===void 0&&!(a in i))return!1}else{var N=new pt,u;if(!(u===void 0?BM(l,c,Cfe|Ife,r,N):u))return!1}}return!0}function sg(i){return i===i&&!st(i)}function Afe(i){for(var e=RM(i),t=e.length;t--;){var r=e[t],s=i[r];e[t]=[r,s,sg(s)]}return e}function og(i,e){return function(t){return t==null?!1:t[i]===e&&(e!==void 0||i in Object(t))}}function ffe(i){var e=Afe(i);return e.length==1&&e[0][2]?og(e[0][0],e[0][1]):function(t){return t===i||mfe(t,i,e)}}var xfe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ofe=/^\w*$/;function FM(i,e){if(Ke(i))return!1;var t=typeof i;return t=="number"||t=="symbol"||t=="boolean"||i==null||qo(i)?!0:Ofe.test(i)||!xfe.test(i)||e!=null&&i in Object(e)}var Efe="Expected a function";function JM(i,e){if(typeof i!="function"||e!=null&&typeof e!="function")throw new TypeError(Efe);var t=function(){var r=arguments,s=e?e.apply(this,r):r[0],o=t.cache;if(o.has(s))return o.get(s);var n=i.apply(this,r);return t.cache=o.set(s,n)||o,n};return t.cache=new(JM.Cache||$t),t}JM.Cache=$t;var _fe=500;function Sfe(i){var e=JM(i,function(r){return t.size===_fe&&t.clear(),r}),t=e.cache;return e}var kfe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vfe=/\\(\\)?/g,bfe=Sfe(function(i){var e=[];return i.charCodeAt(0)===46&&e.push(""),i.replace(kfe,function(t,r,s,o){e.push(s?o.replace(vfe,"$1"):r||t)}),e}),Ul=si?si.prototype:void 0,$l=Ul?Ul.toString:void 0;function ng(i){if(typeof i=="string")return i;if(Ke(i))return ig(i,ng)+"";if(qo(i))return $l?$l.call(i):"";var e=i+"";return e=="0"&&1/i==-1/0?"-0":e}function Yfe(i){return i==null?"":ng(i)}function ag(i,e){return Ke(i)?i:FM(i,e)?[i]:bfe(Yfe(i))}function rn(i){if(typeof i=="string"||qo(i))return i;var e=i+"";return e=="0"&&1/i==-1/0?"-0":e}function Mg(i,e){e=ag(e,i);for(var t=0,r=e.length;i!=null&&t<r;)i=i[rn(e[t++])];return t&&t==r?i:void 0}function Qfe(i,e,t){var r=i==null?void 0:Mg(i,e);return r===void 0?t:r}function Ufe(i,e){return i!=null&&e in Object(i)}function $fe(i,e,t){e=ag(e,i);for(var r=-1,s=e.length,o=!1;++r<s;){var n=rn(e[r]);if(!(o=i!=null&&t(i,n)))break;i=i[n]}return o||++r!=s?o:(s=i==null?0:i.length,!!s&&UM(s)&&PM(n,s)&&(Ke(i)||po(i)))}function Pfe(i,e){return i!=null&&$fe(i,e,Ufe)}var Rfe=1,Wfe=2;function Bfe(i,e){return FM(i)&&sg(e)?og(rn(i),e):function(t){var r=Qfe(t,i);return r===void 0&&r===e?Pfe(t,i):BM(e,r,Rfe|Wfe)}}function Ffe(i){return function(e){return e==null?void 0:e[i]}}function Jfe(i){return function(e){return Mg(e,i)}}function Gfe(i){return FM(i)?Ffe(rn(i)):Jfe(i)}function Hfe(i){return typeof i=="function"?i:i==null?Ko:typeof i=="object"?Ke(i)?Bfe(i[0],i[1]):ffe(i):Gfe(i)}function Vfe(i,e){var t=-1,r=Er(i)?Array(i.length):[];return K4(i,function(s,o,n){r[++t]=e(s,o,n)}),r}function Yi(i,e){var t=Ke(i)?ig:Vfe;return t(i,Hfe(e))}var Zfe=function(e){var t=e.colors,r=e.onClick,s=e.onSwatchHover,o=K({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return M.createElement("div",{style:o.swatches},Yi(t,function(n){return M.createElement(bi,{key:n,color:n,style:o.swatch,onClick:r,onHover:s,focusStyle:{boxShadow:"0 0 4px "+n}})}),M.createElement("div",{style:o.clear}))},GM=function(e){var t=e.onChange,r=e.onSwatchHover,s=e.hex,o=e.colors,n=e.width,a=e.triangle,c=e.styles,l=c===void 0?{}:c,N=e.className,u=N===void 0?"":N,g=s==="transparent",L=function(D,z){ai(D)&&t({hex:D,source:"hex"},z)},d=K(Ge({default:{card:{width:n,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:s,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:WM(s),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+s+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},l),{"hide-triangle":a==="hide"});return M.createElement("div",{style:d.card,className:"block-picker "+u},M.createElement("div",{style:d.triangle}),M.createElement("div",{style:d.head},g&&M.createElement(xr,{borderRadius:"6px 6px 0 0"}),M.createElement("div",{style:d.label},s)),M.createElement("div",{style:d.body},M.createElement(Zfe,{colors:o,onClick:L,onSwatchHover:r}),M.createElement(re,{style:{input:d.input},value:s,onChange:L})))};GM.propTypes={width:S.oneOfType([S.string,S.number]),colors:S.arrayOf(S.string),triangle:S.oneOf(["top","hide"]),styles:S.object};GM.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};He(GM);var Ji={100:"#ffcdd2",300:"#e57373",500:"#f44336",700:"#d32f2f",900:"#b71c1c"},Gi={100:"#f8bbd0",300:"#f06292",500:"#e91e63",700:"#c2185b",900:"#880e4f"},Hi={100:"#e1bee7",300:"#ba68c8",500:"#9c27b0",700:"#7b1fa2",900:"#4a148c"},Vi={100:"#d1c4e9",300:"#9575cd",500:"#673ab7",700:"#512da8",900:"#311b92"},Zi={100:"#c5cae9",300:"#7986cb",500:"#3f51b5",700:"#303f9f",900:"#1a237e"},Xi={100:"#bbdefb",300:"#64b5f6",500:"#2196f3",700:"#1976d2",900:"#0d47a1"},Ki={100:"#b3e5fc",300:"#4fc3f7",500:"#03a9f4",700:"#0288d1",900:"#01579b"},qi={100:"#b2ebf2",300:"#4dd0e1",500:"#00bcd4",700:"#0097a7",900:"#006064"},er={100:"#b2dfdb",300:"#4db6ac",500:"#009688",700:"#00796b",900:"#004d40"},qr={100:"#c8e6c9",300:"#81c784",500:"#4caf50",700:"#388e3c"},tr={100:"#dcedc8",300:"#aed581",500:"#8bc34a",700:"#689f38",900:"#33691e"},ir={100:"#f0f4c3",300:"#dce775",500:"#cddc39",700:"#afb42b",900:"#827717"},rr={100:"#fff9c4",300:"#fff176",500:"#ffeb3b",700:"#fbc02d",900:"#f57f17"},sr={100:"#ffecb3",300:"#ffd54f",500:"#ffc107",700:"#ffa000",900:"#ff6f00"},or={100:"#ffe0b2",300:"#ffb74d",500:"#ff9800",700:"#f57c00",900:"#e65100"},nr={100:"#ffccbc",300:"#ff8a65",500:"#ff5722",700:"#e64a19",900:"#bf360c"},ar={100:"#d7ccc8",300:"#a1887f",500:"#795548",700:"#5d4037",900:"#3e2723"},Mr={100:"#cfd8dc",300:"#90a4ae",500:"#607d8b",700:"#455a64",900:"#263238"},cg=function(e){var t=e.color,r=e.onClick,s=e.onSwatchHover,o=e.hover,n=e.active,a=e.circleSize,c=e.circleSpacing,l=K({default:{swatch:{width:a,height:a,marginRight:c,marginBottom:c,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(a/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:o,active:n});return M.createElement("div",{style:l.swatch},M.createElement(bi,{style:l.Swatch,color:t,onClick:r,onHover:s,focusStyle:{boxShadow:l.Swatch.boxShadow+", 0 0 5px "+t}}))};cg.defaultProps={circleSize:28,circleSpacing:14};const Xfe=kM(cg);var HM=function(e){var t=e.width,r=e.onChange,s=e.onSwatchHover,o=e.colors,n=e.hex,a=e.circleSize,c=e.styles,l=c===void 0?{}:c,N=e.circleSpacing,u=e.className,g=u===void 0?"":u,L=K(Ge({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-N,marginBottom:-N}}},l)),d=function(D,z){return r({hex:D,source:"hex"},z)};return M.createElement("div",{style:L.card,className:"circle-picker "+g},Yi(o,function(y){return M.createElement(Xfe,{key:y,color:y,onClick:d,onSwatchHover:s,active:n===y.toLowerCase(),circleSize:a,circleSpacing:N})}))};HM.propTypes={width:S.oneOfType([S.string,S.number]),circleSize:S.number,circleSpacing:S.number,styles:S.object};HM.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Ji[500],Gi[500],Hi[500],Vi[500],Zi[500],Xi[500],Ki[500],qi[500],er[500],qr[500],tr[500],ir[500],rr[500],sr[500],or[500],nr[500],ar[500],Mr[500]],styles:{}};He(HM);function Pl(i){return i===void 0}var ug={};Object.defineProperty(ug,"__esModule",{value:!0});var Rl=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},Kfe=_,Wl=qfe(Kfe);function qfe(i){return i&&i.__esModule?i:{default:i}}function exe(i,e){var t={};for(var r in i)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}var Bs=24,txe=ug.default=function(i){var e=i.fill,t=e===void 0?"currentColor":e,r=i.width,s=r===void 0?Bs:r,o=i.height,n=o===void 0?Bs:o,a=i.style,c=a===void 0?{}:a,l=exe(i,["fill","width","height","style"]);return Wl.default.createElement("svg",Rl({viewBox:"0 0 "+Bs+" "+Bs,style:Rl({fill:t,width:s,height:n},c)},l),Wl.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},ixe=(function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}})();function rxe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function sxe(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function oxe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var lg=(function(i){oxe(e,i);function e(t){rxe(this,e);var r=sxe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(s,o){s.hex?ai(s.hex)&&r.props.onChange({hex:s.hex,source:"hex"},o):s.r||s.g||s.b?r.props.onChange({r:s.r||r.props.rgb.r,g:s.g||r.props.rgb.g,b:s.b||r.props.rgb.b,source:"rgb"},o):s.a?(s.a<0?s.a=0:s.a>1&&(s.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(s.a*100)/100,source:"rgb"},o)):(s.h||s.s||s.l)&&(typeof s.s=="string"&&s.s.includes("%")&&(s.s=s.s.replace("%","")),typeof s.l=="string"&&s.l.includes("%")&&(s.l=s.l.replace("%","")),s.s==1?s.s=.01:s.l==1&&(s.l=.01),r.props.onChange({h:s.h||r.props.hsl.h,s:Number(Pl(s.s)?r.props.hsl.s:s.s),l:Number(Pl(s.l)?r.props.hsl.l:s.l),source:"hsl"},o))},r.showHighlight=function(s){s.currentTarget.style.background="#eee"},r.hideHighlight=function(s){s.currentTarget.style.background="transparent"},t.hsl.a!==1&&t.view==="hex"?r.state={view:"rgb"}:r.state={view:t.view},r}return ixe(e,[{key:"render",value:function(){var r=this,s=K({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=M.createElement("div",{style:s.fields,className:"flexbox-fix"},M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=M.createElement("div",{style:s.fields,className:"flexbox-fix"},M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),M.createElement("div",{style:s.alpha},M.createElement(re,{style:{input:s.input,label:s.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=M.createElement("div",{style:s.fields,className:"flexbox-fix"},M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),M.createElement("div",{style:s.field},M.createElement(re,{style:{input:s.input,label:s.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),M.createElement("div",{style:s.alpha},M.createElement(re,{style:{input:s.input,label:s.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),M.createElement("div",{style:s.wrap,className:"flexbox-fix"},o,M.createElement("div",{style:s.toggle},M.createElement("div",{style:s.icon,onClick:this.toggleViews,ref:function(a){return r.icon=a}},M.createElement(txe,{style:s.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,s){return r.hsl.a!==1&&s.view==="hex"?{view:"rgb"}:null}}]),e})(M.Component);lg.defaultProps={view:"hex"};var Bl=function(){var e=K({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return M.createElement("div",{style:e.picker})},nxe=function(){var e=K({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return M.createElement("div",{style:e.picker})},VM=function(e){var t=e.width,r=e.onChange,s=e.disableAlpha,o=e.rgb,n=e.hsl,a=e.hsv,c=e.hex,l=e.renderers,N=e.styles,u=N===void 0?{}:N,g=e.className,L=g===void 0?"":g,d=e.defaultView,y=K(Ge({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},u),{disableAlpha:s});return M.createElement("div",{style:y.picker,className:"chrome-picker "+L},M.createElement("div",{style:y.saturation},M.createElement(en,{style:y.Saturation,hsl:n,hsv:a,pointer:nxe,onChange:r})),M.createElement("div",{style:y.body},M.createElement("div",{style:y.controls,className:"flexbox-fix"},M.createElement("div",{style:y.color},M.createElement("div",{style:y.swatch},M.createElement("div",{style:y.active}),M.createElement(xr,{renderers:l}))),M.createElement("div",{style:y.toggles},M.createElement("div",{style:y.hue},M.createElement(Or,{style:y.Hue,hsl:n,pointer:Bl,onChange:r})),M.createElement("div",{style:y.alpha},M.createElement(vM,{style:y.Alpha,rgb:o,hsl:n,pointer:Bl,renderers:l,onChange:r})))),M.createElement(lg,{rgb:o,hsl:n,hex:c,view:d,onChange:r,disableAlpha:s})))};VM.propTypes={width:S.oneOfType([S.string,S.number]),disableAlpha:S.bool,styles:S.object,defaultView:S.oneOf(["hex","rgb","hsl"])};VM.defaultProps={width:225,disableAlpha:!1,styles:{}};const axe=He(VM);var Mxe=function(e){var t=e.color,r=e.onClick,s=r===void 0?function(){}:r,o=e.onSwatchHover,n=e.active,a=K({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:WM(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:n,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return M.createElement(bi,{style:a.color,color:t,onClick:s,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},M.createElement("div",{style:a.dot}))},cxe=function(e){var t=e.hex,r=e.rgb,s=e.onChange,o=K({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),n=function(c,l){c.r||c.g||c.b?s({r:c.r||r.r,g:c.g||r.g,b:c.b||r.b,source:"rgb"},l):s({hex:c.hex,source:"hex"},l)};return M.createElement("div",{style:o.fields,className:"flexbox-fix"},M.createElement("div",{style:o.active}),M.createElement(re,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:t,onChange:n}),M.createElement(re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:r.r,onChange:n}),M.createElement(re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:r.g,onChange:n}),M.createElement(re,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:r.b,onChange:n}))},ZM=function(e){var t=e.onChange,r=e.onSwatchHover,s=e.colors,o=e.hex,n=e.rgb,a=e.styles,c=a===void 0?{}:a,l=e.className,N=l===void 0?"":l,u=K(Ge({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},c)),g=function(d,y){d.hex?ai(d.hex)&&t({hex:d.hex,source:"hex"},y):t(d,y)};return M.createElement(Os,{style:u.Compact,styles:c},M.createElement("div",{style:u.compact,className:"compact-picker "+N},M.createElement("div",null,Yi(s,function(L){return M.createElement(Mxe,{key:L,color:L,active:L.toLowerCase()===o,onClick:g,onSwatchHover:r})}),M.createElement("div",{style:u.clear})),M.createElement(cxe,{hex:o,rgb:n,onChange:g})))};ZM.propTypes={colors:S.arrayOf(S.string),styles:S.object};ZM.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};He(ZM);var uxe=function(e){var t=e.hover,r=e.color,s=e.onClick,o=e.onSwatchHover,n={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},a=K({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:n}},{hover:t});return M.createElement("div",{style:a.swatch},M.createElement(bi,{color:r,onClick:s,onHover:o,focusStyle:n}))};const lxe=kM(uxe);var XM=function(e){var t=e.width,r=e.colors,s=e.onChange,o=e.onSwatchHover,n=e.triangle,a=e.styles,c=a===void 0?{}:a,l=e.className,N=l===void 0?"":l,u=K(Ge({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},c),{"hide-triangle":n==="hide","top-left-triangle":n==="top-left","top-right-triangle":n==="top-right","bottom-left-triangle":n==="bottom-left","bottom-right-triangle":n==="bottom-right"}),g=function(d,y){return s({hex:d,source:"hex"},y)};return M.createElement("div",{style:u.card,className:"github-picker "+N},M.createElement("div",{style:u.triangleShadow}),M.createElement("div",{style:u.triangle}),Yi(r,function(L){return M.createElement(lxe,{color:L,key:L,onClick:g,onSwatchHover:o})}))};XM.propTypes={width:S.oneOfType([S.string,S.number]),colors:S.arrayOf(S.string),triangle:S.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:S.object};XM.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};He(XM);var Nxe=function(e){var t=e.direction,r=K({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return M.createElement("div",{style:r.picker})},gxe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},KM=function(e){var t=e.width,r=e.height,s=e.onChange,o=e.hsl,n=e.direction,a=e.pointer,c=e.styles,l=c===void 0?{}:c,N=e.className,u=N===void 0?"":N,g=K(Ge({default:{picker:{position:"relative",width:t,height:r},hue:{radius:"2px"}}},l)),L=function(y){return s({a:1,h:y.h,l:.5,s:1})};return M.createElement("div",{style:g.picker,className:"hue-picker "+u},M.createElement(Or,gxe({},g.hue,{hsl:o,pointer:a,onChange:L,direction:n})))};KM.propTypes={styles:S.object};KM.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:Nxe,styles:{}};He(KM);var Lxe=function(e){var t=e.onChange,r=e.hex,s=e.rgb,o=e.styles,n=o===void 0?{}:o,a=e.className,c=a===void 0?"":a,l=K(Ge({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},n)),N=function(g,L){g.hex?ai(g.hex)&&t({hex:g.hex,source:"hex"},L):(g.r||g.g||g.b)&&t({r:g.r||s.r,g:g.g||s.g,b:g.b||s.b,source:"rgb"},L)};return M.createElement(Os,{styles:n},M.createElement("div",{style:l.material,className:"material-picker "+c},M.createElement(re,{style:{wrap:l.HEXwrap,input:l.HEXinput,label:l.HEXlabel},label:"hex",value:r,onChange:N}),M.createElement("div",{style:l.split,className:"flexbox-fix"},M.createElement("div",{style:l.third},M.createElement(re,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"r",value:s.r,onChange:N})),M.createElement("div",{style:l.third},M.createElement(re,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"g",value:s.g,onChange:N})),M.createElement("div",{style:l.third},M.createElement(re,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"b",value:s.b,onChange:N})))))};He(Lxe);var jxe=function(e){var t=e.onChange,r=e.rgb,s=e.hsv,o=e.hex,n=K({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),a=function(l,N){l["#"]?ai(l["#"])&&t({hex:l["#"],source:"hex"},N):l.r||l.g||l.b?t({r:l.r||r.r,g:l.g||r.g,b:l.b||r.b,source:"rgb"},N):(l.h||l.s||l.v)&&t({h:l.h||s.h,s:l.s||s.s,v:l.v||s.v,source:"hsv"},N)};return M.createElement("div",{style:n.fields},M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"h",value:Math.round(s.h),onChange:a}),M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"s",value:Math.round(s.s*100),onChange:a}),M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"v",value:Math.round(s.v*100),onChange:a}),M.createElement("div",{style:n.divider}),M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"r",value:r.r,onChange:a}),M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"g",value:r.g,onChange:a}),M.createElement(re,{style:{wrap:n.RGBwrap,input:n.RGBinput,label:n.RGBlabel},label:"b",value:r.b,onChange:a}),M.createElement("div",{style:n.divider}),M.createElement(re,{style:{wrap:n.HEXwrap,input:n.HEXinput,label:n.HEXlabel},label:"#",value:o.replace("#",""),onChange:a}),M.createElement("div",{style:n.fieldSymbols},M.createElement("div",{style:n.symbol},"°"),M.createElement("div",{style:n.symbol},"%"),M.createElement("div",{style:n.symbol},"%")))},dxe=function(e){var t=e.hsl,r=K({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return M.createElement("div",{style:r.picker})},yxe=function(){var e=K({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return M.createElement("div",{style:e.pointer},M.createElement("div",{style:e.left},M.createElement("div",{style:e.leftInside})),M.createElement("div",{style:e.right},M.createElement("div",{style:e.rightInside})))},Fl=function(e){var t=e.onClick,r=e.label,s=e.children,o=e.active,n=K({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return M.createElement("div",{style:n.button,onClick:t},r||s)},Txe=function(e){var t=e.rgb,r=e.currentColor,s=K({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return M.createElement("div",null,M.createElement("div",{style:s.label},"new"),M.createElement("div",{style:s.swatches},M.createElement("div",{style:s.new}),M.createElement("div",{style:s.current})),M.createElement("div",{style:s.label},"current"))},Dxe=(function(){function i(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}})();function hxe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function pxe(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function zxe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var qM=(function(i){zxe(e,i);function e(t){hxe(this,e);var r=pxe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.state={currentColor:t.hex},r}return Dxe(e,[{key:"render",value:function(){var r=this.props,s=r.styles,o=s===void 0?{}:s,n=r.className,a=n===void 0?"":n,c=K(Ge({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},o));return M.createElement("div",{style:c.picker,className:"photoshop-picker "+a},M.createElement("div",{style:c.head},this.props.header),M.createElement("div",{style:c.body,className:"flexbox-fix"},M.createElement("div",{style:c.saturation},M.createElement(en,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:dxe,onChange:this.props.onChange})),M.createElement("div",{style:c.hue},M.createElement(Or,{direction:"vertical",hsl:this.props.hsl,pointer:yxe,onChange:this.props.onChange})),M.createElement("div",{style:c.controls},M.createElement("div",{style:c.top,className:"flexbox-fix"},M.createElement("div",{style:c.previews},M.createElement(Txe,{rgb:this.props.rgb,currentColor:this.state.currentColor})),M.createElement("div",{style:c.actions},M.createElement(Fl,{label:"OK",onClick:this.props.onAccept,active:!0}),M.createElement(Fl,{label:"Cancel",onClick:this.props.onCancel}),M.createElement(jxe,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),e})(M.Component);qM.propTypes={header:S.string,styles:S.object};qM.defaultProps={header:"Color Picker",styles:{}};He(qM);var wxe=function(e){var t=e.onChange,r=e.rgb,s=e.hsl,o=e.hex,n=e.disableAlpha,a=K({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:n}),c=function(N,u){N.hex?ai(N.hex)&&t({hex:N.hex,source:"hex"},u):N.r||N.g||N.b?t({r:N.r||r.r,g:N.g||r.g,b:N.b||r.b,a:r.a,source:"rgb"},u):N.a&&(N.a<0?N.a=0:N.a>100&&(N.a=100),N.a/=100,t({h:s.h,s:s.s,l:s.l,a:N.a,source:"rgb"},u))};return M.createElement("div",{style:a.fields,className:"flexbox-fix"},M.createElement("div",{style:a.double},M.createElement(re,{style:{input:a.input,label:a.label},label:"hex",value:o.replace("#",""),onChange:c})),M.createElement("div",{style:a.single},M.createElement(re,{style:{input:a.input,label:a.label},label:"r",value:r.r,onChange:c,dragLabel:"true",dragMax:"255"})),M.createElement("div",{style:a.single},M.createElement(re,{style:{input:a.input,label:a.label},label:"g",value:r.g,onChange:c,dragLabel:"true",dragMax:"255"})),M.createElement("div",{style:a.single},M.createElement(re,{style:{input:a.input,label:a.label},label:"b",value:r.b,onChange:c,dragLabel:"true",dragMax:"255"})),M.createElement("div",{style:a.alpha},M.createElement(re,{style:{input:a.input,label:a.label},label:"a",value:Math.round(r.a*100),onChange:c,dragLabel:"true",dragMax:"100"})))},Cxe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},Ng=function(e){var t=e.colors,r=e.onClick,s=r===void 0?function(){}:r,o=e.onSwatchHover,n=K({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),a=function(l,N){s({hex:l,source:"hex"},N)};return M.createElement("div",{style:n.colors,className:"flexbox-fix"},t.map(function(c){var l=typeof c=="string"?{color:c}:c,N=""+l.color+(l.title||"");return M.createElement("div",{key:N,style:n.swatchWrap},M.createElement(bi,Cxe({},l,{style:n.swatch,onClick:a,onHover:o,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+l.color}})))}))};Ng.propTypes={colors:S.arrayOf(S.oneOfType([S.string,S.shape({color:S.string,title:S.string})])).isRequired};var Ixe=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},ec=function(e){var t=e.width,r=e.rgb,s=e.hex,o=e.hsv,n=e.hsl,a=e.onChange,c=e.onSwatchHover,l=e.disableAlpha,N=e.presetColors,u=e.renderers,g=e.styles,L=g===void 0?{}:g,d=e.className,y=d===void 0?"":d,D=K(Ge({default:Ixe({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},L),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},L),{disableAlpha:l});return M.createElement("div",{style:D.picker,className:"sketch-picker "+y},M.createElement("div",{style:D.saturation},M.createElement(en,{style:D.Saturation,hsl:n,hsv:o,onChange:a})),M.createElement("div",{style:D.controls,className:"flexbox-fix"},M.createElement("div",{style:D.sliders},M.createElement("div",{style:D.hue},M.createElement(Or,{style:D.Hue,hsl:n,onChange:a})),M.createElement("div",{style:D.alpha},M.createElement(vM,{style:D.Alpha,rgb:r,hsl:n,renderers:u,onChange:a}))),M.createElement("div",{style:D.color},M.createElement(xr,null),M.createElement("div",{style:D.activeColor}))),M.createElement(wxe,{rgb:r,hsl:n,hex:s,onChange:a,disableAlpha:l}),M.createElement(Ng,{colors:N,onClick:a,onSwatchHover:c}))};ec.propTypes={disableAlpha:S.bool,width:S.oneOfType([S.string,S.number]),styles:S.object};ec.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};He(ec);var Br=function(e){var t=e.hsl,r=e.offset,s=e.onClick,o=s===void 0?function(){}:s,n=e.active,a=e.first,c=e.last,l=K({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+r*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:n,first:a,last:c}),N=function(g){return o({h:t.h,s:.5,l:r,source:"hsl"},g)};return M.createElement("div",{style:l.swatch,onClick:N})},mxe=function(e){var t=e.onClick,r=e.hsl,s=K({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),o=.1;return M.createElement("div",{style:s.swatches},M.createElement("div",{style:s.swatch},M.createElement(Br,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<o&&Math.abs(r.s-.5)<o,onClick:t,first:!0})),M.createElement("div",{style:s.swatch},M.createElement(Br,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<o&&Math.abs(r.s-.5)<o,onClick:t})),M.createElement("div",{style:s.swatch},M.createElement(Br,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<o&&Math.abs(r.s-.5)<o,onClick:t})),M.createElement("div",{style:s.swatch},M.createElement(Br,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<o&&Math.abs(r.s-.5)<o,onClick:t})),M.createElement("div",{style:s.swatch},M.createElement(Br,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<o&&Math.abs(r.s-.5)<o,onClick:t,last:!0})),M.createElement("div",{style:s.clear}))},Axe=function(){var e=K({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return M.createElement("div",{style:e.picker})},tc=function(e){var t=e.hsl,r=e.onChange,s=e.pointer,o=e.styles,n=o===void 0?{}:o,a=e.className,c=a===void 0?"":a,l=K(Ge({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},n));return M.createElement("div",{style:l.wrap||{},className:"slider-picker "+c},M.createElement("div",{style:l.hue},M.createElement(Or,{style:l.Hue,hsl:t,pointer:s,onChange:r})),M.createElement("div",{style:l.swatches},M.createElement(mxe,{hsl:t,onClick:r})))};tc.propTypes={styles:S.object};tc.defaultProps={pointer:Axe,styles:{}};He(tc);var gg={};Object.defineProperty(gg,"__esModule",{value:!0});var Jl=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},fxe=_,Gl=xxe(fxe);function xxe(i){return i&&i.__esModule?i:{default:i}}function Oxe(i,e){var t={};for(var r in i)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}var Fs=24,Exe=gg.default=function(i){var e=i.fill,t=e===void 0?"currentColor":e,r=i.width,s=r===void 0?Fs:r,o=i.height,n=o===void 0?Fs:o,a=i.style,c=a===void 0?{}:a,l=Oxe(i,["fill","width","height","style"]);return Gl.default.createElement("svg",Jl({viewBox:"0 0 "+Fs+" "+Fs,style:Jl({fill:t,width:s,height:n},c)},l),Gl.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},_xe=function(e){var t=e.color,r=e.onClick,s=r===void 0?function(){}:r,o=e.onSwatchHover,n=e.first,a=e.last,c=e.active,l=K({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:WM(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:n,last:a,active:c,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return M.createElement(bi,{color:t,style:l.color,onClick:s,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},M.createElement("div",{style:l.check},M.createElement(Exe,null)))},Sxe=function(e){var t=e.onClick,r=e.onSwatchHover,s=e.group,o=e.active,n=K({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return M.createElement("div",{style:n.group},Yi(s,function(a,c){return M.createElement(_xe,{key:a,color:a,active:a.toLowerCase()===o,first:c===0,last:c===s.length-1,onClick:t,onSwatchHover:r})}))},ic=function(e){var t=e.width,r=e.height,s=e.onChange,o=e.onSwatchHover,n=e.colors,a=e.hex,c=e.styles,l=c===void 0?{}:c,N=e.className,u=N===void 0?"":N,g=K(Ge({default:{picker:{width:t,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},l)),L=function(y,D){return s({hex:y,source:"hex"},D)};return M.createElement("div",{style:g.picker,className:"swatches-picker "+u},M.createElement(Os,null,M.createElement("div",{style:g.overflow},M.createElement("div",{style:g.body},Yi(n,function(d){return M.createElement(Sxe,{key:d.toString(),group:d,active:a,onClick:L,onSwatchHover:o})}),M.createElement("div",{style:g.clear})))))};ic.propTypes={width:S.oneOfType([S.string,S.number]),height:S.oneOfType([S.string,S.number]),colors:S.arrayOf(S.arrayOf(S.string)),styles:S.object};ic.defaultProps={width:320,height:240,colors:[[Ji[900],Ji[700],Ji[500],Ji[300],Ji[100]],[Gi[900],Gi[700],Gi[500],Gi[300],Gi[100]],[Hi[900],Hi[700],Hi[500],Hi[300],Hi[100]],[Vi[900],Vi[700],Vi[500],Vi[300],Vi[100]],[Zi[900],Zi[700],Zi[500],Zi[300],Zi[100]],[Xi[900],Xi[700],Xi[500],Xi[300],Xi[100]],[Ki[900],Ki[700],Ki[500],Ki[300],Ki[100]],[qi[900],qi[700],qi[500],qi[300],qi[100]],[er[900],er[700],er[500],er[300],er[100]],["#194D33",qr[700],qr[500],qr[300],qr[100]],[tr[900],tr[700],tr[500],tr[300],tr[100]],[ir[900],ir[700],ir[500],ir[300],ir[100]],[rr[900],rr[700],rr[500],rr[300],rr[100]],[sr[900],sr[700],sr[500],sr[300],sr[100]],[or[900],or[700],or[500],or[300],or[100]],[nr[900],nr[700],nr[500],nr[300],nr[100]],[ar[900],ar[700],ar[500],ar[300],ar[100]],[Mr[900],Mr[700],Mr[500],Mr[300],Mr[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};He(ic);var rc=function(e){var t=e.onChange,r=e.onSwatchHover,s=e.hex,o=e.colors,n=e.width,a=e.triangle,c=e.styles,l=c===void 0?{}:c,N=e.className,u=N===void 0?"":N,g=K(Ge({default:{card:{width:n,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},l),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right"}),L=function(y,D){ai(y)&&t({hex:y,source:"hex"},D)};return M.createElement("div",{style:g.card,className:"twitter-picker "+u},M.createElement("div",{style:g.triangleShadow}),M.createElement("div",{style:g.triangle}),M.createElement("div",{style:g.body},Yi(o,function(d,y){return M.createElement(bi,{key:y,color:d,hex:d,style:g.swatch,onClick:L,onHover:r,focusStyle:{boxShadow:"0 0 4px "+d}})}),M.createElement("div",{style:g.hash},"#"),M.createElement(re,{label:null,style:{input:g.input},value:s.replace("#",""),onChange:L}),M.createElement("div",{style:g.clear})))};rc.propTypes={width:S.oneOfType([S.string,S.number]),triangle:S.oneOf(["hide","top-left","top-right"]),colors:S.arrayOf(S.string),styles:S.object};rc.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};He(rc);var sc=function(e){var t=K({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return M.createElement("div",{style:t.picker})};sc.propTypes={hsl:S.shape({h:S.number,s:S.number,l:S.number,a:S.number})};sc.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var oc=function(e){var t=K({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return M.createElement("div",{style:t.picker})};oc.propTypes={hsl:S.shape({h:S.number,s:S.number,l:S.number,a:S.number})};oc.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var kxe=function(e){var t=e.onChange,r=e.rgb,s=e.hsl,o=e.hex,n=e.hsv,a=function(L,d){if(L.hex)ai(L.hex)&&t({hex:L.hex,source:"hex"},d);else if(L.rgb){var y=L.rgb.split(",");bn(L.rgb,"rgb")&&t({r:y[0],g:y[1],b:y[2],a:1,source:"rgb"},d)}else if(L.hsv){var D=L.hsv.split(",");bn(L.hsv,"hsv")&&(D[2]=D[2].replace("%",""),D[1]=D[1].replace("%",""),D[0]=D[0].replace("°",""),D[1]==1?D[1]=.01:D[2]==1&&(D[2]=.01),t({h:Number(D[0]),s:Number(D[1]),v:Number(D[2]),source:"hsv"},d))}else if(L.hsl){var z=L.hsl.split(",");bn(L.hsl,"hsl")&&(z[2]=z[2].replace("%",""),z[1]=z[1].replace("%",""),z[0]=z[0].replace("°",""),u[1]==1?u[1]=.01:u[2]==1&&(u[2]=.01),t({h:Number(z[0]),s:Number(z[1]),v:Number(z[2]),source:"hsl"},d))}},c=K({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),l=r.r+", "+r.g+", "+r.b,N=Math.round(s.h)+"°, "+Math.round(s.s*100)+"%, "+Math.round(s.l*100)+"%",u=Math.round(n.h)+"°, "+Math.round(n.s*100)+"%, "+Math.round(n.v*100)+"%";return M.createElement("div",{style:c.wrap,className:"flexbox-fix"},M.createElement("div",{style:c.fields},M.createElement("div",{style:c.double},M.createElement(re,{style:{input:c.input,label:c.label},label:"hex",value:o,onChange:a})),M.createElement("div",{style:c.column},M.createElement("div",{style:c.single},M.createElement(re,{style:{input:c.input2,label:c.label2},label:"rgb",value:l,onChange:a})),M.createElement("div",{style:c.single},M.createElement(re,{style:{input:c.input2,label:c.label2},label:"hsv",value:u,onChange:a})),M.createElement("div",{style:c.single},M.createElement(re,{style:{input:c.input2,label:c.label2},label:"hsl",value:N,onChange:a})))))},nc=function(e){var t=e.width,r=e.onChange,s=e.rgb,o=e.hsl,n=e.hsv,a=e.hex,c=e.header,l=e.styles,N=l===void 0?{}:l,u=e.className,g=u===void 0?"":u,L=K(Ge({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+s.r+", "+s.g+", "+s.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},N));return M.createElement("div",{style:L.picker,className:"google-picker "+g},M.createElement("div",{style:L.head},c),M.createElement("div",{style:L.swatch}),M.createElement("div",{style:L.saturation},M.createElement(en,{hsl:o,hsv:n,pointer:sc,onChange:r})),M.createElement("div",{style:L.body},M.createElement("div",{style:L.controls,className:"flexbox-fix"},M.createElement("div",{style:L.hue},M.createElement(Or,{style:L.Hue,hsl:o,radius:"4px",pointer:oc,onChange:r}))),M.createElement(kxe,{rgb:s,hsl:o,hex:a,hsv:n,onChange:r})))};nc.propTypes={width:S.oneOfType([S.string,S.number]),styles:S.object,header:S.string};nc.defaultProps={width:652,styles:{},header:"Color picker"};He(nc);const nt={color:{width:36,height:14,borderRadius:2},delButton:{marginTop:16},swatch:{mt:"16px",p:"5px",backgroundColor:"background.paper",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer",verticalAlign:"middle"},swatchDisabled:{opacity:.5,cursor:"default"},popover:{"& .MuiPaper-root":{textAlign:"right",backgroundColor:"#00000000",boxShadow:"none"}},popoverList:{padding:0},closeButton:i=>({backgroundColor:`${i.palette.background.paper} !important`,borderRadius:"0 0 25% 25%","&:hover":{backgroundColor:`${i.palette.secondary.main} !important`}}),textDense:{mt:0,mb:0},iconButton:{width:16,height:16},button:{width:32,height:32,minWidth:32,minHeight:32}};class es extends _.Component{constructor(e){super(e),this.state={displayColorPicker:!1,color:this.props.value||this.props.color||"",anchorEl:null}}handleClick=e=>{this.setState({displayColorPicker:!this.state.displayColorPicker,anchorEl:this.state.displayColorPicker?null:e.currentTarget})};handleClose=()=>{this.setState({displayColorPicker:!1,anchorEl:null})};static getColor(e,t){if(e&&typeof e=="object"){const r=e;if(r.rgb)return t?`#${r.rgb.r.toString(16).padStart(2,"0")}${r.rgb.g.toString(16).padStart(2,"0")}${r.rgb.b.toString(16).padStart(2,"0")}`:`rgba(${r.rgb.r},${r.rgb.g},${r.rgb.b},${r.rgb.a})`;const s=e;return t?`#${s.r.toString(16).padStart(2,"0")}${s.g.toString(16).padStart(2,"0")}${s.b.toString(16).padStart(2,"0")}`:`rgba(${s.r},${s.g},${s.b},${s.a})`}return typeof e=="string"?t?es.rgb2hex(e||""):e||"":""}static rgb2hex(e){const t=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);if(t){const r=parseInt(t[1],10).toString(16).padStart(2,"0"),s=parseInt(t[2],10).toString(16).padStart(2,"0"),o=parseInt(t[3],10).toString(16).padStart(2,"0");return(t==null?void 0:t.length)===4?`#${r}${s}${o}`:e}return e}handleChange=e=>{this.setState({color:e},()=>this.props.onChange&&this.props.onChange(es.getColor(e)))};componentDidUpdate(e,t){const r=es.getColor(this.props.color||this.props.value||"");r!==t.color&&this.setState({color:r})}renderCustomPalette(){return this.props.customPalette?M.createElement("div",{style:{width:"100%",display:"flex",flexWrap:"wrap"}},this.props.customPalette.map(e=>M.createElement(j.Button,{style:nt.button,key:e,onClick:()=>{this.handleChange(e),setTimeout(()=>this.handleClose(),300)}},M.createElement("div",{style:{...nt.iconButton,background:e}})))):null}render(){var r;const e={...this.props.style||{}};e.position="relative";const{color:t}=this.state;return M.createElement(j.Box,{component:"div",style:e,sx:this.props.sx||void 0,className:this.props.className||""},this.props.noInputField?null:M.createElement(j.TextField,{disabled:this.props.disabled,variant:"standard",id:"ar_color_picker_name",label:this.props.label||this.props.name,value:t||"",margin:"dense",sx:{"&.MuiFormControl-root":nt.textDense,width:t?"calc(100% - 80px)":"calc(100% - 56px)",mr:t?void 0:1},onChange:s=>this.handleChange(s.target.value)}),!this.props.noInputField&&t?M.createElement(j.IconButton,{disabled:this.props.disabled,onClick:()=>this.handleChange(""),size:"small",style:this.props.label||this.props.name?nt.delButton:void 0},M.createElement(O.Delete,null)):null,M.createElement(j.Box,{component:"div",onClick:s=>!this.props.disabled&&this.handleClick(s),title:p.t("ra_Select color"),sx:{...nt.swatch,...this.props.disabled?nt.swatchDisabled:void 0,background:t?void 0:"transparent",border:t?void 0:"1px dashed #ccc",boxSizing:"border-box",marginTop:this.props.noInputField||!(this.props.label||this.props.name)?0:void 0}},M.createElement("div",{style:{...nt.color,background:es.getColor(t),width:this.props.noInputField?this.props.barWidth||16:this.props.barWidth||36}})),this.state.displayColorPicker&&!this.props.disabled?M.createElement(j.Menu,{sx:{...nt.popover,"&. MuiMenu-list":nt.popoverList},anchorEl:this.state.anchorEl,open:!0,onClose:()=>this.handleClose()},M.createElement(axe,{color:this.state.color||void 0,onChangeComplete:s=>this.handleChange(s.rgb),styles:{default:{picker:{backgroundColor:((r=this.props.theme)==null?void 0:r.palette.background.paper)||"#888"}}}}),t&&this.props.noInputField?M.createElement(j.IconButton,{sx:nt.closeButton,onClick:()=>this.handleChange("")},M.createElement(O.Delete,null)):null,M.createElement(j.IconButton,{sx:nt.closeButton,onClick:()=>this.handleClose()},M.createElement(O.Close,null)),this.renderCustomPalette()):null)}}var Qn={exports:{}},Hl;function It(){return Hl||(Hl=1,(function(i,e){(function(r,s){i.exports=s()})(globalThis,()=>(()=>{var t={949:((n,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CronParser=void 0;var l=c(515),N=(function(){function u(g,L,d){L===void 0&&(L=!0),d===void 0&&(d=!1),this.expression=g,this.dayOfWeekStartIndexZero=L,this.monthStartIndexZero=d}return u.prototype.parse=function(){var g,L,d=(g=this.expression)!==null&&g!==void 0?g:"";if(d==="@reboot")return L=["@reboot","","","","","",""],L;if(d.startsWith("@")){var y=this.parseSpecial(this.expression);L=this.extractParts(y)}else L=this.extractParts(this.expression);return this.normalize(L),this.validate(L),L},u.prototype.parseSpecial=function(g){var L={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},d=L[g];if(!d)throw new Error("Unknown special expression.");return d},u.prototype.extractParts=function(g){if(!this.expression)throw new Error("cron expression is empty");for(var L=g.trim().split(/[ ]+/),d=0;d<L.length;d++)if(L[d].includes(",")){var y=L[d].split(",").map(function(z){return z.trim()}).filter(function(z){return z!==""}).map(function(z){return isNaN(Number(z))?z:Number(z)}).filter(function(z){return z!==null&&z!==""});y.length===0&&y.push("*"),y.sort(function(z,A){return z!==null&&A!==null?z-A:0}),L[d]=y.map(function(z){return z!==null?z.toString():""}).join(",")}if(L.length<5)throw new Error("Expression has only ".concat(L.length," part").concat(L.length==1?"":"s",". At least 5 parts are required."));if(L.length==5)L.unshift(""),L.push("");else if(L.length==6){var D=/\d{4}$/.test(L[5])||L[4]=="?"||L[2]=="?";D?L.unshift(""):L.push("")}else if(L.length>7)throw new Error("Expression has ".concat(L.length," parts; too many!"));return L},u.prototype.normalize=function(g){var L=this;if(g[3]=g[3].replace("?","*"),g[5]=g[5].replace("?","*"),g[2]=g[2].replace("?","*"),g[0].indexOf("0/")==0&&(g[0]=g[0].replace("0/","*/")),g[1].indexOf("0/")==0&&(g[1]=g[1].replace("0/","*/")),g[2].indexOf("0/")==0&&(g[2]=g[2].replace("0/","*/")),g[3].indexOf("1/")==0&&(g[3]=g[3].replace("1/","*/")),g[4].indexOf("1/")==0&&(g[4]=g[4].replace("1/","*/")),g[6].indexOf("1/")==0&&(g[6]=g[6].replace("1/","*/")),g[5]=g[5].replace(/(^\d)|([^#/\s]\d)/g,function(m){var h=m.replace(/\D/,""),x=h;return L.dayOfWeekStartIndexZero?h=="7"&&(x="0"):x=(parseInt(h)-1).toString(),m.replace(h,x)}),g[5]=="L"&&(g[5]="6"),g[3]=="?"&&(g[3]="*"),g[3].indexOf("W")>-1&&(g[3].indexOf(",")>-1||g[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var d={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var y in d)g[5]=g[5].replace(new RegExp(y,"gi"),d[y].toString());g[4]=g[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(m){var h=m.replace(/\D/,""),x=h;return L.monthStartIndexZero&&(x=(parseInt(h)+1).toString()),m.replace(h,x)});var D={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var z in D)g[4]=g[4].replace(new RegExp(z,"gi"),D[z].toString());g[0]=="0"&&(g[0]=""),!/\*|\-|\,|\//.test(g[2])&&(/\*|\//.test(g[1])||/\*|\//.test(g[0]))&&(g[2]+="-".concat(g[2]));for(var A=0;A<g.length;A++)if(g[A].indexOf(",")!=-1&&(g[A]=g[A].split(",").filter(function(m){return m!==""}).join(",")||"*"),g[A]=="*/1"&&(g[A]="*"),g[A].indexOf("/")>-1&&!/^\*|\-|\,/.test(g[A])){var C=null;switch(A){case 4:C="12";break;case 5:C="6";break;case 6:C="9999";break;default:C=null;break}if(C!==null){var f=g[A].split("/");g[A]="".concat(f[0],"-").concat(C,"/").concat(f[1])}}},u.prototype.validate=function(g){var L="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(g[0],L),this.validateOnlyExpectedCharactersFound(g[1],L),this.validateOnlyExpectedCharactersFound(g[2],L),this.validateOnlyExpectedCharactersFound(g[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(g[4],L),this.validateOnlyExpectedCharactersFound(g[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(g[6],L),this.validateAnyRanges(g)},u.prototype.validateAnyRanges=function(g){l.default.secondRange(g[0]),l.default.minuteRange(g[1]),l.default.hourRange(g[2]),l.default.dayOfMonthRange(g[3]),l.default.monthRange(g[4],this.monthStartIndexZero),l.default.dayOfWeekRange(g[5],this.dayOfWeekStartIndexZero)},u.prototype.validateOnlyExpectedCharactersFound=function(g,L){var d=g.match(new RegExp("[^".concat(L,"]+"),"gi"));if(d&&d.length)throw new Error("Expression contains invalid values: '".concat(d.toString(),"'"))},u})();a.CronParser=N}),333:((n,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExpressionDescriptor=void 0;var l=c(823),N=c(949),u=(function(){function g(L,d){if(this.expression=L,this.options=d,this.expressionParts=new Array(5),!this.options.locale&&g.defaultLocale&&(this.options.locale=g.defaultLocale),!g.locales[this.options.locale]){var y=Object.keys(g.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(y,"'.")),this.options.locale=y}this.i18n=g.locales[this.options.locale],d.use24HourTimeFormat===void 0&&(d.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return g.toString=function(L,d){var y=d===void 0?{}:d,D=y.throwExceptionOnParseError,z=D===void 0?!0:D,A=y.verbose,C=A===void 0?!1:A,f=y.dayOfWeekStartIndexZero,m=f===void 0?!0:f,h=y.monthStartIndexZero,x=h===void 0?!1:h,b=y.use24HourTimeFormat,v=y.locale,W=v===void 0?null:v,Y={throwExceptionOnParseError:z,verbose:C,dayOfWeekStartIndexZero:m,monthStartIndexZero:x,use24HourTimeFormat:b,locale:W};Y.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var q=new g(L,Y);return q.getFullDescription()},g.initialize=function(L,d){d===void 0&&(d="en"),g.specialCharacters=["/","-",",","*"],g.defaultLocale=d,L.load(g.locales)},g.prototype.getFullDescription=function(){var L,d,y="";try{var D=new N.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=D.parse(),this.expressionParts[0]==="@reboot")return((d=(L=this.i18n).atReboot)===null||d===void 0?void 0:d.call(L))||"Run once, at startup";var z=this.getTimeOfDayDescription(),A=this.getDayOfMonthDescription(),C=this.getMonthDescription(),f=this.getDayOfWeekDescription(),m=this.getYearDescription();y+=z+A+f+C+m,y=this.transformVerbosity(y,!!this.options.verbose),y=y.charAt(0).toLocaleUpperCase()+y.substr(1)}catch(h){if(!this.options.throwExceptionOnParseError)y=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(h)}return y},g.prototype.getTimeOfDayDescription=function(){var L=this.expressionParts[0],d=this.expressionParts[1],y=this.expressionParts[2],D="";if(!l.StringUtilities.containsAny(d,g.specialCharacters)&&!l.StringUtilities.containsAny(y,g.specialCharacters)&&!l.StringUtilities.containsAny(L,g.specialCharacters))D+=this.i18n.atSpace()+this.formatTime(y,d,L);else if(!L&&d.indexOf("-")>-1&&!(d.indexOf(",")>-1)&&!(d.indexOf("/")>-1)&&!l.StringUtilities.containsAny(y,g.specialCharacters)){var z=d.split("-");D+=l.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(y,z[0],""),this.formatTime(y,z[1],""))}else if(!L&&y.indexOf(",")>-1&&y.indexOf("-")==-1&&y.indexOf("/")==-1&&!l.StringUtilities.containsAny(d,g.specialCharacters)){var A=y.split(",");D+=this.i18n.at();for(var C=0;C<A.length;C++)D+=" ",D+=this.formatTime(A[C],d,""),C<A.length-2&&(D+=","),C==A.length-2&&(D+=this.i18n.spaceAnd())}else{var f=this.getSecondsDescription(),m=this.getMinutesDescription(),h=this.getHoursDescription();if(D+=f,D&&m&&(D+=", "),D+=m,m===h)return D;D&&h&&(D+=", "),D+=h}return D},g.prototype.getSecondsDescription=function(){var L=this,d=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(y){return y},function(y){return l.StringUtilities.format(L.i18n.everyX0Seconds(y),y)},function(y){return L.i18n.secondsX0ThroughX1PastTheMinute()},function(y){return y=="0"?"":parseInt(y)<20?L.i18n.atX0SecondsPastTheMinute(y):L.i18n.atX0SecondsPastTheMinuteGt20()||L.i18n.atX0SecondsPastTheMinute(y)});return d},g.prototype.getMinutesDescription=function(){var L=this,d=this.expressionParts[0],y=this.expressionParts[2],D=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(z){return z},function(z){return l.StringUtilities.format(L.i18n.everyX0Minutes(z),z)},function(z){return L.i18n.minutesX0ThroughX1PastTheHour()},function(z){try{return z=="0"&&y.indexOf("/")==-1&&d==""?L.i18n.everyHour():parseInt(z)<20?L.i18n.atX0MinutesPastTheHour(z):L.i18n.atX0MinutesPastTheHourGt20()||L.i18n.atX0MinutesPastTheHour(z)}catch{return L.i18n.atX0MinutesPastTheHour(z)}});return D},g.prototype.getHoursDescription=function(){var L=this,d=this.expressionParts[2],y=0,D=[];d.split("/")[0].split(",").forEach(function(C){var f=C.split("-");f.length===2&&D.push({value:f[1],index:y+1}),y+=f.length});var z=0,A=this.getSegmentDescription(d,this.i18n.everyHour(),function(C){var f=D.find(function(h){return h.value===C&&h.index===z}),m=f&&L.expressionParts[1]!=="0";return z++,m?L.formatTime(C,"59",""):L.formatTime(C,"0","")},function(C){return l.StringUtilities.format(L.i18n.everyX0Hours(C),C)},function(C){return L.i18n.betweenX0AndX1()},function(C){return L.i18n.atX0()});return A},g.prototype.getDayOfWeekDescription=function(){var L=this,d=this.i18n.daysOfTheWeek(),y=null;return this.expressionParts[5]=="*"?y="":y=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(D,z){var A=D;D.indexOf("#")>-1?A=D.substring(0,D.indexOf("#")):D.indexOf("L")>-1&&(A=A.replace("L",""));var C=parseInt(A),f=L.i18n.daysOfTheWeekInCase?L.i18n.daysOfTheWeekInCase(z)[C]:d[C];if(D.indexOf("#")>-1){var m=null,h=D.substring(D.indexOf("#")+1),x=D.substring(0,D.indexOf("#"));switch(h){case"1":m=L.i18n.first(x);break;case"2":m=L.i18n.second(x);break;case"3":m=L.i18n.third(x);break;case"4":m=L.i18n.fourth(x);break;case"5":m=L.i18n.fifth(x);break}f=m+" "+f}return f},function(D){return parseInt(D)==1?"":l.StringUtilities.format(L.i18n.commaEveryX0DaysOfTheWeek(D),D)},function(D){var z=D.substring(0,D.indexOf("-")),A=L.expressionParts[3]!="*";return A?L.i18n.commaAndX0ThroughX1(z):L.i18n.commaX0ThroughX1(z)},function(D){var z=null;if(D.indexOf("#")>-1){var A=D.substring(D.indexOf("#")+1),C=D.substring(0,D.indexOf("#"));z=L.i18n.commaOnThe(A,C).trim()+L.i18n.spaceX0OfTheMonth()}else if(D.indexOf("L")>-1)z=L.i18n.commaOnTheLastX0OfTheMonth(D.replace("L",""));else{var f=L.expressionParts[3]!="*";z=f?L.i18n.commaAndOnX0():L.i18n.commaOnlyOnX0(D)}return z}),y},g.prototype.getMonthDescription=function(){var L=this,d=this.i18n.monthsOfTheYear(),y=this.getSegmentDescription(this.expressionParts[4],"",function(D,z){return z&&L.i18n.monthsOfTheYearInCase?L.i18n.monthsOfTheYearInCase(z)[parseInt(D)-1]:d[parseInt(D)-1]},function(D){return parseInt(D)==1?"":l.StringUtilities.format(L.i18n.commaEveryX0Months(D),D)},function(D){return L.i18n.commaMonthX0ThroughMonthX1()||L.i18n.commaX0ThroughX1()},function(D){return L.i18n.commaOnlyInMonthX0?L.i18n.commaOnlyInMonthX0():L.i18n.commaOnlyInX0()});return y},g.prototype.getDayOfMonthDescription=function(){var L=this,d=null,y=this.expressionParts[3];switch(y){case"L":d=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":d=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var D=y.match(/(\d{1,2}W)|(W\d{1,2})/);if(D){var z=parseInt(D[0].replace("W","")),A=z==1?this.i18n.firstWeekday():l.StringUtilities.format(this.i18n.weekdayNearestDayX0(),z.toString());d=l.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),A);break}else{var C=y.match(/L-(\d{1,2})/);if(C){var f=C[1];d=l.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(f),f);break}else{if(y=="*"&&this.expressionParts[5]!="*")return"";d=this.getSegmentDescription(y,this.i18n.commaEveryDay(),function(m){return m=="L"?L.i18n.lastDay():L.i18n.dayX0?l.StringUtilities.format(L.i18n.dayX0(),m):m},function(m){return m=="1"?L.i18n.commaEveryDay():L.i18n.commaEveryX0Days(m)},function(m){return L.i18n.commaBetweenDayX0AndX1OfTheMonth(m)},function(m){return L.i18n.commaOnDayX0OfTheMonth(m)})}break}}return d},g.prototype.getYearDescription=function(){var L=this,d=this.getSegmentDescription(this.expressionParts[6],"",function(y){return/^\d+$/.test(y)?new Date(parseInt(y),1).getFullYear().toString():y},function(y){return l.StringUtilities.format(L.i18n.commaEveryX0Years(y),y)},function(y){return L.i18n.commaYearX0ThroughYearX1()||L.i18n.commaX0ThroughX1()},function(y){return L.i18n.commaOnlyInYearX0?L.i18n.commaOnlyInYearX0():L.i18n.commaOnlyInX0()});return d},g.prototype.getSegmentDescription=function(L,d,y,D,z,A){var C=null,f=L.indexOf("/")>-1,m=L.indexOf("-")>-1,h=L.indexOf(",")>-1;if(!L)C="";else if(L==="*")C=d;else if(!f&&!m&&!h)C=l.StringUtilities.format(A(L),y(L));else if(h){for(var x=L.split(","),b="",v=0;v<x.length;v++)if(v>0&&x.length>2&&(b+=",",v<x.length-1&&(b+=" ")),v>0&&x.length>1&&(v==x.length-1||x.length==2)&&(b+="".concat(this.i18n.spaceAnd()," ")),x[v].indexOf("/")>-1||x[v].indexOf("-")>-1){var W=x[v].indexOf("-")>-1&&x[v].indexOf("/")==-1,Y=this.getSegmentDescription(x[v],d,y,D,W?this.i18n.commaX0ThroughX1:z,A);W&&(Y=Y.replace(", ","")),b+=Y}else f?b+=this.getSegmentDescription(x[v],d,y,D,z,A):b+=y(x[v]);f?C=b:C=l.StringUtilities.format(A(L),b)}else if(f){var x=L.split("/");if(C=l.StringUtilities.format(D(x[1]),x[1]),x[0].indexOf("-")>-1){var q=this.generateRangeSegmentDescription(x[0],z,y);q.indexOf(", ")!=0&&(C+=", "),C+=q}else if(x[0].indexOf("*")==-1){var ce=l.StringUtilities.format(A(x[0]),y(x[0]));ce=ce.replace(", ",""),C+=l.StringUtilities.format(this.i18n.commaStartingX0(),ce)}}else m&&(C=this.generateRangeSegmentDescription(L,z,y));return C},g.prototype.generateRangeSegmentDescription=function(L,d,y){var D="",z=L.split("-"),A=y(z[0],1),C=y(z[1],2),f=d(L);return D+=l.StringUtilities.format(f,A,C),D},g.prototype.formatTime=function(L,d,y){var D=0,z=0,A=parseInt(L)+D,C=parseInt(d)+z;C>=60?(C-=60,A+=1):C<0&&(C+=60,A-=1),A>=24?A=A-24:A<0&&(A=24+A);var f="",m=!1;this.options.use24HourTimeFormat||(m=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),f=m?"".concat(this.getPeriod(A)," "):" ".concat(this.getPeriod(A)),A>12&&(A-=12),A===0&&(A=12));var h="";return y&&(h=":".concat(("00"+y).substring(y.length))),"".concat(m?f:"").concat(("00"+A.toString()).substring(A.toString().length),":").concat(("00"+C.toString()).substring(C.toString().length)).concat(h).concat(m?"":f)},g.prototype.transformVerbosity=function(L,d){if(!d&&(L=L.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),L=L.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),L=L.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),L=L.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var y=0,D=Object.entries(this.i18n.conciseVerbosityReplacements());y<D.length;y++){var z=D[y],A=z[0],C=z[1];L=L.replace(new RegExp(A,"g"),C)}return L},g.prototype.getPeriod=function(L){return L>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},g.locales={},g})();a.ExpressionDescriptor=u}),747:((n,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.enLocaleLoader=void 0;var l=c(486),N=(function(){function u(){}return u.prototype.load=function(g){g.en=new l.en},u})();a.enLocaleLoader=N}),486:((n,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.en=void 0;var c=(function(){function l(){}return l.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},l.prototype.atX0MinutesPastTheHourGt20=function(){return null},l.prototype.commaMonthX0ThroughMonthX1=function(){return null},l.prototype.commaYearX0ThroughYearX1=function(){return null},l.prototype.use24HourTimeFormatByDefault=function(){return!1},l.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},l.prototype.everyMinute=function(){return"every minute"},l.prototype.everyHour=function(){return"every hour"},l.prototype.atSpace=function(){return"At "},l.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},l.prototype.at=function(){return"At"},l.prototype.spaceAnd=function(){return" and"},l.prototype.everySecond=function(){return"every second"},l.prototype.everyX0Seconds=function(){return"every %s seconds"},l.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},l.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},l.prototype.everyX0Minutes=function(){return"every %s minutes"},l.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},l.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},l.prototype.everyX0Hours=function(){return"every %s hours"},l.prototype.betweenX0AndX1=function(){return"between %s and %s"},l.prototype.atX0=function(){return"at %s"},l.prototype.commaEveryDay=function(){return", every day"},l.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},l.prototype.commaX0ThroughX1=function(){return", %s through %s"},l.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},l.prototype.first=function(){return"first"},l.prototype.second=function(){return"second"},l.prototype.third=function(){return"third"},l.prototype.fourth=function(){return"fourth"},l.prototype.fifth=function(){return"fifth"},l.prototype.commaOnThe=function(){return", on the "},l.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},l.prototype.lastDay=function(){return"the last day"},l.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},l.prototype.commaOnlyOnX0=function(){return", only on %s"},l.prototype.commaAndOnX0=function(){return", and on %s"},l.prototype.commaEveryX0Months=function(){return", every %s months"},l.prototype.commaOnlyInX0=function(){return", only in %s"},l.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},l.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},l.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},l.prototype.firstWeekday=function(){return"first weekday"},l.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},l.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},l.prototype.commaEveryX0Days=function(){return", every %s days"},l.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},l.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},l.prototype.commaEveryHour=function(){return", every hour"},l.prototype.commaEveryX0Years=function(){return", every %s years"},l.prototype.commaStartingX0=function(){return", starting %s"},l.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},l.prototype.atReboot=function(){return"Run once, at startup"},l})();a.en=c}),515:((n,a)=>{Object.defineProperty(a,"__esModule",{value:!0});function c(N,u){if(!N)throw new Error(u)}var l=(function(){function N(){}return N.secondRange=function(u){for(var g=u.split(","),L=0;L<g.length;L++)if(!isNaN(parseInt(g[L],10))){var d=parseInt(g[L],10);c(d>=0&&d<=59,"seconds part must be >= 0 and <= 59")}},N.minuteRange=function(u){for(var g=u.split(","),L=0;L<g.length;L++)if(!isNaN(parseInt(g[L],10))){var d=parseInt(g[L],10);c(d>=0&&d<=59,"minutes part must be >= 0 and <= 59")}},N.hourRange=function(u){for(var g=u.split(","),L=0;L<g.length;L++)if(!isNaN(parseInt(g[L],10))){var d=parseInt(g[L],10);c(d>=0&&d<=23,"hours part must be >= 0 and <= 23")}},N.dayOfMonthRange=function(u){for(var g=u.split(","),L=0;L<g.length;L++)if(!isNaN(parseInt(g[L],10))){var d=parseInt(g[L],10);c(d>=1&&d<=31,"DOM part must be >= 1 and <= 31")}},N.monthRange=function(u,g){for(var L=u.split(","),d=0;d<L.length;d++)if(!isNaN(parseInt(L[d],10))){var y=parseInt(L[d],10);c(y>=1&&y<=12,g?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},N.dayOfWeekRange=function(u,g){for(var L=u.split(","),d=0;d<L.length;d++)if(!isNaN(parseInt(L[d],10))){var y=parseInt(L[d],10);c(y>=0&&y<=6,g?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},N})();a.default=l}),823:((n,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.StringUtilities=void 0;var c=(function(){function l(){}return l.format=function(N){for(var u=[],g=1;g<arguments.length;g++)u[g-1]=arguments[g];return N.replace(/%s/g,function(L){return u.shift()})},l.containsAny=function(N,u){return u.some(function(g){return N.indexOf(g)>-1})},l})();a.StringUtilities=c})},r={};function s(n){var a=r[n];if(a!==void 0)return a.exports;var c=r[n]={exports:{}};return t[n](c,c.exports,s),c.exports}var o={};return(()=>{var n=o;Object.defineProperty(n,"__esModule",{value:!0}),n.toString=void 0;var a=s(333),c=s(747);a.ExpressionDescriptor.initialize(new c.enLocaleLoader),n.default=a.ExpressionDescriptor;var l=a.ExpressionDescriptor.toString;n.toString=l})(),o})())})(Qn)),Qn.exports}var vxe=It();const bxe=EL(vxe);var Yxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:(u=>{u.exports=t})},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.fr=void 0;var N=(function(){function u(){}return u.prototype.conciseVerbosityReplacements=function(){return{"de le":"du"}},u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Une erreur est survenue en générant la description de l'expression cron. Vérifiez sa syntaxe."},u.prototype.everyMinute=function(){return"toutes les minutes"},u.prototype.everyHour=function(){return"toutes les heures"},u.prototype.atSpace=function(){return"À "},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Toutes les minutes entre %s et %s"},u.prototype.at=function(){return"À"},u.prototype.spaceAnd=function(){return" et"},u.prototype.everySecond=function(){return"toutes les secondes"},u.prototype.everyX0Seconds=function(){return"toutes les %s secondes"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"les secondes entre %s et %s après la minute"},u.prototype.atX0SecondsPastTheMinute=function(){return"%s secondes après la minute"},u.prototype.everyX0Minutes=function(){return"toutes les %s minutes"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"les minutes entre %s et %s après l'heure"},u.prototype.atX0MinutesPastTheHour=function(){return"%s minutes après l'heure"},u.prototype.everyX0Hours=function(){return"toutes les %s heures"},u.prototype.betweenX0AndX1=function(){return"de %s à %s"},u.prototype.atX0=function(){return"%s"},u.prototype.commaEveryDay=function(){return", tous les jours"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", tous les %s jours de la semaine"},u.prototype.commaX0ThroughX1=function(){return", de %s à %s"},u.prototype.commaAndX0ThroughX1=function(){return", et de %s à %s"},u.prototype.first=function(){return"premier"},u.prototype.second=function(){return"second"},u.prototype.third=function(){return"troisième"},u.prototype.fourth=function(){return"quatrième"},u.prototype.fifth=function(){return"cinquième"},u.prototype.commaOnThe=function(){return", le "},u.prototype.spaceX0OfTheMonth=function(){return" %s du mois"},u.prototype.lastDay=function(){return"le dernier jour"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", le dernier %s du mois"},u.prototype.commaOnlyOnX0=function(){return", uniquement le %s"},u.prototype.commaAndOnX0=function(){return", et %s"},u.prototype.commaEveryX0Months=function(){return", tous les %s mois"},u.prototype.commaOnlyInX0=function(){return", uniquement en %s"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", le dernier jour du mois"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", le dernier jour ouvrable du mois"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s jours avant le dernier jour du mois"},u.prototype.firstWeekday=function(){return"premier jour ouvrable"},u.prototype.weekdayNearestDayX0=function(){return"jour ouvrable le plus proche du %s"},u.prototype.commaOnTheX0OfTheMonth=function(){return", le %s du mois"},u.prototype.commaEveryX0Days=function(){return", tous les %s jours"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", du %s au %s du mois"},u.prototype.commaOnDayX0OfTheMonth=function(){return", le %s du mois"},u.prototype.commaEveryHour=function(){return", chaque heure"},u.prototype.commaEveryX0Years=function(){return", tous les %s ans"},u.prototype.commaDaysX0ThroughX1=function(){return", du %s au %s"},u.prototype.commaStartingX0=function(){return", à partir de %s"},u.prototype.daysOfTheWeek=function(){return["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},u.prototype.monthsOfTheYear=function(){return["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},u})();return l.fr=N,c().locales.fr=new N,n})())})(Yxe);var Qxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:(u=>{u.exports=t})},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.es=void 0;var N=(function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Ocurrió un error mientras se generaba la descripción de la expresión. Revise la sintaxis de la expresión de cron."},u.prototype.at=function(){return"A las"},u.prototype.atSpace=function(){return"A las "},u.prototype.atX0=function(){return"a las %s"},u.prototype.atX0MinutesPastTheHour=function(){return"a los %s minutos de la hora"},u.prototype.atX0SecondsPastTheMinute=function(){return"a los %s segundos del minuto"},u.prototype.betweenX0AndX1=function(){return"entre las %s y las %s"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", entre los días %s y %s del mes"},u.prototype.commaEveryDay=function(){return", cada día"},u.prototype.commaEveryX0Days=function(){return", cada %s días"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", cada %s días de la semana"},u.prototype.commaEveryX0Months=function(){return", cada %s meses"},u.prototype.commaOnDayX0OfTheMonth=function(){return", el día %s del mes"},u.prototype.commaOnlyInX0=function(){return", sólo en %s"},u.prototype.commaOnlyOnX0=function(){return", sólo el %s"},u.prototype.commaAndOnX0=function(){return", y el %s"},u.prototype.commaOnThe=function(){return", en el "},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", en el último día del mes"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", en el último día de la semana del mes"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s días antes del último día del mes"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", en el último %s del mes"},u.prototype.commaOnTheX0OfTheMonth=function(){return", en el %s del mes"},u.prototype.commaX0ThroughX1=function(){return", de %s a %s"},u.prototype.commaAndX0ThroughX1=function(){return", y de %s a %s"},u.prototype.everyHour=function(){return"cada hora"},u.prototype.everyMinute=function(){return"cada minuto"},u.prototype.everyMinuteBetweenX0AndX1=function(){return"cada minuto entre las %s y las %s"},u.prototype.everySecond=function(){return"cada segundo"},u.prototype.everyX0Hours=function(){return"cada %s horas"},u.prototype.everyX0Minutes=function(){return"cada %s minutos"},u.prototype.everyX0Seconds=function(){return"cada %s segundos"},u.prototype.fifth=function(){return"quinto"},u.prototype.first=function(){return"primero"},u.prototype.firstWeekday=function(){return"primer día de la semana"},u.prototype.fourth=function(){return"cuarto"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"del minuto %s al %s pasada la hora"},u.prototype.second=function(){return"segundo"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"En los segundos %s al %s de cada minuto"},u.prototype.spaceAnd=function(){return" y"},u.prototype.spaceX0OfTheMonth=function(){return" %s del mes"},u.prototype.lastDay=function(){return"el último día"},u.prototype.third=function(){return"tercer"},u.prototype.weekdayNearestDayX0=function(){return"día de la semana más próximo al %s"},u.prototype.commaEveryX0Years=function(){return", cada %s años"},u.prototype.commaStartingX0=function(){return", comenzando %s"},u.prototype.daysOfTheWeek=function(){return["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},u.prototype.monthsOfTheYear=function(){return["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},u})();return l.es=N,c().locales.es=new N,n})())})(Qxe);var Uxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:(u=>{u.exports=t})},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.de=void 0;var N=(function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.everyMinute=function(){return"jede Minute"},u.prototype.everyHour=function(){return"jede Stunde"},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Beim Generieren der Ausdrucksbeschreibung ist ein Fehler aufgetreten. Überprüfen Sie die Syntax des Cron-Ausdrucks."},u.prototype.atSpace=function(){return"Um "},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Jede Minute zwischen %s und %s"},u.prototype.at=function(){return"Um"},u.prototype.spaceAnd=function(){return" und"},u.prototype.everySecond=function(){return"Jede Sekunde"},u.prototype.everyX0Seconds=function(){return"alle %s Sekunden"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"Sekunden %s bis %s"},u.prototype.atX0SecondsPastTheMinute=function(){return"bei Sekunde %s"},u.prototype.everyX0Minutes=function(){return"alle %s Minuten"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"Minuten %s bis %s"},u.prototype.atX0MinutesPastTheHour=function(){return"bei Minute %s"},u.prototype.everyX0Hours=function(){return"alle %s Stunden"},u.prototype.betweenX0AndX1=function(){return"zwischen %s und %s"},u.prototype.atX0=function(){return"um %s"},u.prototype.commaEveryDay=function(){return", jeden Tag"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", alle %s Tage der Woche"},u.prototype.commaX0ThroughX1=function(){return", %s bis %s"},u.prototype.commaAndX0ThroughX1=function(){return", und %s bis %s"},u.prototype.first=function(){return"ersten"},u.prototype.second=function(){return"zweiten"},u.prototype.third=function(){return"dritten"},u.prototype.fourth=function(){return"vierten"},u.prototype.fifth=function(){return"fünften"},u.prototype.commaOnThe=function(){return", am "},u.prototype.spaceX0OfTheMonth=function(){return" %s des Monats"},u.prototype.lastDay=function(){return"der letzte Tag"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", am letzten %s des Monats"},u.prototype.commaOnlyOnX0=function(){return", nur jeden %s"},u.prototype.commaAndOnX0=function(){return", und jeden %s"},u.prototype.commaEveryX0Months=function(){return", alle %s Monate"},u.prototype.commaOnlyInX0=function(){return", nur im %s"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", am letzten Tag des Monats"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", am letzten Werktag des Monats"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s tage vor dem letzten Tag des Monats"},u.prototype.firstWeekday=function(){return"ersten Werktag"},u.prototype.weekdayNearestDayX0=function(){return"Werktag am nächsten zum %s Tag"},u.prototype.commaOnTheX0OfTheMonth=function(){return", am %s des Monats"},u.prototype.commaEveryX0Days=function(){return", alle %s Tage"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", zwischen Tag %s und %s des Monats"},u.prototype.commaOnDayX0OfTheMonth=function(){return", an Tag %s des Monats"},u.prototype.commaEveryX0Years=function(){return", alle %s Jahre"},u.prototype.commaStartingX0=function(){return", beginnend %s"},u.prototype.daysOfTheWeek=function(){return["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},u.prototype.monthsOfTheYear=function(){return["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},u})();return l.de=N,c().locales.de=new N,n})())})(Uxe);var $xe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:(u=>{u.exports=t})},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.it=void 0;var N=(function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"È verificato un errore durante la generazione la descrizione espressione. Controllare la sintassi delle espressioni cron."},u.prototype.at=function(){return"Alle"},u.prototype.atSpace=function(){return"Alle "},u.prototype.atX0=function(){return"alle %s"},u.prototype.atX0MinutesPastTheHour=function(){return"al %s minuto passata l'ora"},u.prototype.atX0SecondsPastTheMinute=function(){return"al %s secondo passato il minuto"},u.prototype.betweenX0AndX1=function(){return"tra le %s e le %s"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", tra il giorno %s e %s del mese"},u.prototype.commaEveryDay=function(){return", ogni giorno"},u.prototype.commaEveryX0Days=function(){return", ogni %s giorni"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", ogni %s giorni della settimana"},u.prototype.commaEveryX0Months=function(){return", ogni %s mesi"},u.prototype.commaEveryX0Years=function(){return", ogni %s anni"},u.prototype.commaOnDayX0OfTheMonth=function(){return", il giorno %s del mese"},u.prototype.commaOnlyInX0=function(){return", solo in %s"},u.prototype.commaOnlyOnX0=function(){return", solo il %s"},u.prototype.commaAndOnX0=function(){return", e il %s"},u.prototype.commaOnThe=function(){return", il "},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", l'ultimo giorno del mese"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", nell'ultima settimana del mese"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s giorni prima dell'ultimo giorno del mese"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", l'ultimo %s del mese"},u.prototype.commaOnTheX0OfTheMonth=function(){return", il %s del mese"},u.prototype.commaX0ThroughX1=function(){return", %s al %s"},u.prototype.commaAndX0ThroughX1=function(){return", e %s al %s"},u.prototype.everyHour=function(){return"ogni ora"},u.prototype.everyMinute=function(){return"ogni minuto"},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Ogni minuto tra le %s e le %s"},u.prototype.everySecond=function(){return"ogni secondo"},u.prototype.everyX0Hours=function(){return"ogni %s ore"},u.prototype.everyX0Minutes=function(){return"ogni %s minuti"},u.prototype.everyX0Seconds=function(){return"ogni %s secondi"},u.prototype.fifth=function(){return"quinto"},u.prototype.first=function(){return"primo"},u.prototype.firstWeekday=function(){return"primo giorno della settimana"},u.prototype.fourth=function(){return"quarto"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"minuti %s al %s dopo l'ora"},u.prototype.second=function(){return"secondo"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"secondi %s al %s oltre il minuto"},u.prototype.spaceAnd=function(){return" e"},u.prototype.spaceX0OfTheMonth=function(){return" %s del mese"},u.prototype.lastDay=function(){return"l'ultimo giorno"},u.prototype.third=function(){return"terzo"},u.prototype.weekdayNearestDayX0=function(){return"giorno della settimana più vicino al %s"},u.prototype.commaStartingX0=function(){return", a partire %s"},u.prototype.daysOfTheWeek=function(){return["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},u.prototype.monthsOfTheYear=function(){return["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},u})();return l.it=N,c().locales.it=new N,n})())})($xe);var Pxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:(L=>{L.exports=t})},s={};function o(L){var d=s[L];if(d!==void 0)return d.exports;var y=s[L]={exports:{}};return r[L](y,y.exports,o),y.exports}o.n=L=>{var d=L&&L.__esModule?()=>L.default:()=>L;return o.d(d,{a:d}),d},o.d=(L,d)=>{for(var y in d)o.o(d,y)&&!o.o(L,y)&&Object.defineProperty(L,y,{enumerable:!0,get:d[y]})},o.o=(L,d)=>Object.prototype.hasOwnProperty.call(L,d),o.r=L=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(L,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(L,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.ru=void 0;var N=function(L,d){var y=Number(L);return y!==void 0?d[y%100>4&&y%100<20?2:[2,0,1,1,1,2][y%10<5?Math.abs(y)%10:5]]:d[2]},u=function(L,d){var y=Number(L);return y!==void 0?d[y===0?0:y===1||y===2||y===4?1:2]:d[1]},g=(function(){function L(){}return L.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},L.prototype.atX0MinutesPastTheHourGt20=function(){return null},L.prototype.commaMonthX0ThroughMonthX1=function(){return null},L.prototype.commaYearX0ThroughYearX1=function(){return null},L.prototype.use24HourTimeFormatByDefault=function(){return!0},L.prototype.everyMinute=function(){return"каждую минуту"},L.prototype.everyHour=function(){return"каждый час"},L.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Произошла ошибка во время генерации описания выражения. Проверьте синтаксис крон-выражения."},L.prototype.atSpace=function(){return"В "},L.prototype.everyMinuteBetweenX0AndX1=function(){return"Каждую минуту с %s по %s"},L.prototype.at=function(){return"В"},L.prototype.spaceAnd=function(){return" и"},L.prototype.everySecond=function(){return"каждую секунду"},L.prototype.everyX0Seconds=function(d){return N(d,["каждую %s секунду","каждые %s секунды","каждые %s секунд"])},L.prototype.secondsX0ThroughX1PastTheMinute=function(){return"секунды с %s по %s"},L.prototype.atX0SecondsPastTheMinute=function(d){return N(d,["в %s секунду","в %s секунды","в %s секунд"])},L.prototype.everyX0Minutes=function(d){return N(d,["каждую %s минуту","каждые %s минуты","каждые %s минут"])},L.prototype.minutesX0ThroughX1PastTheHour=function(){return"минуты с %s по %s"},L.prototype.atX0MinutesPastTheHour=function(d){return N(d,["в %s минуту","в %s минуты","в %s минут"])},L.prototype.everyX0Hours=function(d){return N(d,["каждый %s час","каждые %s часа","каждые %s часов"])},L.prototype.betweenX0AndX1=function(){return"с %s по %s"},L.prototype.atX0=function(){return"в %s"},L.prototype.commaEveryDay=function(){return", каждый день"},L.prototype.commaEveryX0DaysOfTheWeek=function(d){return N(d,["",", каждые %s дня недели",", каждые %s дней недели"])},L.prototype.commaX0ThroughX1=function(d){return d&&(d[0]=="2"||d[0]=="3")?", со %s по %s":", с %s по %s"},L.prototype.commaAndX0ThroughX1=function(d){return d&&(d[0]=="2"||d[0]=="3")?" и со %s по %s":" и с %s по %s"},L.prototype.first=function(d){return u(d,["первое","первый","первую"])},L.prototype.second=function(d){return u(d,["второе","второй","вторую"])},L.prototype.third=function(d){return u(d,["третье","третий","третью"])},L.prototype.fourth=function(d){return u(d,["четвертое","четвертый","четвертую"])},L.prototype.fifth=function(d){return u(d,["пятое","пятый","пятую"])},L.prototype.commaOnThe=function(d){return d==="2"?", во ":", в "},L.prototype.spaceX0OfTheMonth=function(){return" %s месяца"},L.prototype.lastDay=function(){return"последний день"},L.prototype.commaOnTheLastX0OfTheMonth=function(d){return u(d,[", в последнее %s месяца",", в последний %s месяца",", в последнюю %s месяца"])},L.prototype.commaOnlyOnX0=function(d){return d&&d[0]==="2"?", только во %s":", только в %s"},L.prototype.commaAndOnX0=function(){return", и %s"},L.prototype.commaEveryX0Months=function(d){return N(d,[""," каждые %s месяца"," каждые %s месяцев"])},L.prototype.commaOnlyInMonthX0=function(){return", только %s"},L.prototype.commaOnlyInX0=function(){return", только в %s"},L.prototype.commaOnTheLastDayOfTheMonth=function(){return", в последний день месяца"},L.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", в последний будний день месяца"},L.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(d){return N(d,[", за %s день до конца месяца",", за %s дня до конца месяца",", за %s дней до конца месяца"])},L.prototype.firstWeekday=function(){return"первый будний день"},L.prototype.weekdayNearestDayX0=function(){return"ближайший будний день к %s числу"},L.prototype.commaOnTheX0OfTheMonth=function(){return", в %s месяца"},L.prototype.commaEveryX0Days=function(d){return N(d,[", каждый %s день",", каждые %s дня",", каждые %s дней"])},L.prototype.commaBetweenDayX0AndX1OfTheMonth=function(d){return d&&d.substring(0,d.indexOf("-"))=="2"?", со %s по %s число месяца":", с %s по %s число месяца"},L.prototype.commaOnDayX0OfTheMonth=function(d){return d&&d[0]=="2"?", во %s число месяца":", в %s число месяца"},L.prototype.commaEveryX0Years=function(d){return N(d,[", каждый %s год",", каждые %s года",", каждые %s лет"])},L.prototype.commaStartingX0=function(){return", начало %s"},L.prototype.daysOfTheWeek=function(){return["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},L.prototype.daysOfTheWeekInCase=function(d){return d===void 0&&(d=2),d==1?["воскресенья","понедельника","вторника","среды","четверга","пятницы","субботы"]:["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"]},L.prototype.monthsOfTheYear=function(){return["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},L.prototype.monthsOfTheYearInCase=function(d){return d==1?["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]:this.monthsOfTheYear()},L})();return l.ru=g,c().locales.ru=new g,n})())})(Pxe);var Rxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:(u=>{u.exports=t})},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.zh_CN=void 0;var N=(function(){function u(){}return u.prototype.setPeriodBeforeTime=function(){return!0},u.prototype.pm=function(){return"下午"},u.prototype.am=function(){return"上午"},u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return", 从%s年至%s年"},u.prototype.use24HourTimeFormatByDefault=function(){return!1},u.prototype.everyMinute=function(){return"每分钟"},u.prototype.everyHour=function(){return"每小时"},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"生成表达式描述时发生了错误,请检查cron表达式语法。"},u.prototype.atSpace=function(){return"在"},u.prototype.everyMinuteBetweenX0AndX1=function(){return"在 %s 至 %s 之间的每分钟"},u.prototype.at=function(){return"在"},u.prototype.spaceAnd=function(){return" 和"},u.prototype.everySecond=function(){return"每秒"},u.prototype.everyX0Seconds=function(){return"每隔 %s 秒"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"在一分钟后的第 %s 到 %s 秒"},u.prototype.atX0SecondsPastTheMinute=function(){return"在一分钟后的第 %s 秒"},u.prototype.everyX0Minutes=function(){return"每隔 %s 分钟"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"在整点后的第 %s 到 %s 分钟"},u.prototype.atX0MinutesPastTheHour=function(){return"在整点后的第 %s 分钟"},u.prototype.everyX0Hours=function(){return"每隔 %s 小时"},u.prototype.betweenX0AndX1=function(){return"在 %s 和 %s 之间"},u.prototype.atX0=function(){return"在%s"},u.prototype.commaEveryDay=function(){return", 每天"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", 每周的每 %s 天"},u.prototype.commaX0ThroughX1=function(){return", %s至%s"},u.prototype.commaAndX0ThroughX1=function(){return", 和%s至%s"},u.prototype.first=function(){return"第一个"},u.prototype.second=function(){return"第二个"},u.prototype.third=function(){return"第三个"},u.prototype.fourth=function(){return"第四个"},u.prototype.fifth=function(){return"第五个"},u.prototype.commaOnThe=function(){return", 限每月的"},u.prototype.spaceX0OfTheMonth=function(){return"%s"},u.prototype.lastDay=function(){return"本月最后一天"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", 限每月的最后一个%s"},u.prototype.commaOnlyOnX0=function(){return", 仅%s"},u.prototype.commaAndOnX0=function(){return", 或者为%s"},u.prototype.commaEveryX0Months=function(){return", 每隔 %s 个月"},u.prototype.commaOnlyInX0=function(){return", 仅限%s"},u.prototype.commaOnlyInMonthX0=function(){return", 仅于%s份"},u.prototype.commaOnlyInYearX0=function(){return", 仅于 %s 年"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", 限每月的最后一天"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", 限每月的最后一个工作日"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", 限每月最后%s天"},u.prototype.firstWeekday=function(){return"第一个工作日"},u.prototype.weekdayNearestDayX0=function(){return"最接近 %s 号的工作日"},u.prototype.commaOnTheX0OfTheMonth=function(){return", 限每月的%s"},u.prototype.commaEveryX0Days=function(){return", 每隔 %s 天"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", 限每月的 %s 至 %s 之间"},u.prototype.commaOnDayX0OfTheMonth=function(){return", 限每月%s"},u.prototype.commaEveryX0Years=function(){return", 每隔 %s 年"},u.prototype.commaStartingX0=function(){return", %s开始"},u.prototype.dayX0=function(){return" %s 号"},u.prototype.daysOfTheWeek=function(){return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},u.prototype.monthsOfTheYear=function(){return["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},u})();return l.zh_CN=N,c().locales.zh_CN=new N,n})())})(Rxe);var Wxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:(u=>{u.exports=t})},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.uk=void 0;var N=(function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.everyMinute=function(){return"щохвилини"},u.prototype.everyHour=function(){return"щогодини"},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"ВІдбулася помилка підчас генерації опису. Перевірта правильність написання cron виразу."},u.prototype.atSpace=function(){return"О "},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Щохвилини між %s та %s"},u.prototype.at=function(){return"О"},u.prototype.spaceAnd=function(){return" та"},u.prototype.everySecond=function(){return"Щосекунди"},u.prototype.everyX0Seconds=function(){return"кожні %s секунд"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"з %s по %s секунду"},u.prototype.atX0SecondsPastTheMinute=function(){return"о %s секунді"},u.prototype.everyX0Minutes=function(){return"кожні %s хвилин"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"з %s по %s хвилину"},u.prototype.atX0MinutesPastTheHour=function(){return"о %s хвилині"},u.prototype.everyX0Hours=function(){return"кожні %s годин"},u.prototype.betweenX0AndX1=function(){return"між %s та %s"},u.prototype.atX0=function(){return"о %s"},u.prototype.commaEveryDay=function(){return", щоденно"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", кожен %s день тижня"},u.prototype.commaX0ThroughX1=function(){return", %s по %s"},u.prototype.commaAndX0ThroughX1=function(){return", та %s по %s"},u.prototype.first=function(){return"перший"},u.prototype.second=function(){return"другий"},u.prototype.third=function(){return"третій"},u.prototype.fourth=function(){return"четвертий"},u.prototype.fifth=function(){return"п'ятий"},u.prototype.commaOnThe=function(){return", в "},u.prototype.spaceX0OfTheMonth=function(){return" %s місяця"},u.prototype.lastDay=function(){return"останній день"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", в останній %s місяця"},u.prototype.commaOnlyOnX0=function(){return", тільки в %s"},u.prototype.commaAndOnX0=function(){return", і в %s"},u.prototype.commaEveryX0Months=function(){return", кожен %s місяць"},u.prototype.commaOnlyInX0=function(){return", тільки в %s"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", в останній день місяця"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", в останній будень місяця"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s днів до останнього дня місяця"},u.prototype.firstWeekday=function(){return"перший будень"},u.prototype.weekdayNearestDayX0=function(){return"будень найближчий до %s дня"},u.prototype.commaOnTheX0OfTheMonth=function(){return", в %s місяця"},u.prototype.commaEveryX0Days=function(){return", кожен %s день"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", між %s та %s днями місяця"},u.prototype.commaOnDayX0OfTheMonth=function(){return", на %s день місяця"},u.prototype.commaEveryX0Years=function(){return", кожні %s роки"},u.prototype.commaStartingX0=function(){return", початок %s"},u.prototype.daysOfTheWeek=function(){return["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"]},u.prototype.monthsOfTheYear=function(){return["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},u})();return l.uk=N,c().locales.uk=new N,n})())})(Wxe);var Bxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:(u=>{u.exports=t})},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.pt_BR=void 0;var N=(function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Ocorreu um erro ao gerar a descrição da expressão Cron."},u.prototype.at=function(){return"às"},u.prototype.atSpace=function(){return"às "},u.prototype.atX0=function(){return"Às %s"},u.prototype.atX0MinutesPastTheHour=function(){return"aos %s minutos da hora"},u.prototype.atX0SecondsPastTheMinute=function(){return"aos %s segundos do minuto"},u.prototype.betweenX0AndX1=function(){return"entre %s e %s"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", entre os dias %s e %s do mês"},u.prototype.commaEveryDay=function(){return", a cada dia"},u.prototype.commaEveryX0Days=function(){return", a cada %s dias"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", a cada %s dias de semana"},u.prototype.commaEveryX0Months=function(){return", a cada %s meses"},u.prototype.commaOnDayX0OfTheMonth=function(){return", no dia %s do mês"},u.prototype.commaOnlyInX0=function(g){return g&&g.length>1&&g[1]==="-"?"somente %s":", somente em %s"},u.prototype.commaOnlyOnX0=function(g){return g&&g.length>1&&g[1]==="-"?", somente %s":", somente de %s"},u.prototype.commaAndOnX0=function(){return", e de %s"},u.prototype.commaOnThe=function(g,L){return L==="6"||L==="0"?", no":", na "},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", no último dia do mês"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", no último dia da semana do mês"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s dias antes do último dia do mês"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", na última %s do mês"},u.prototype.commaOnTheX0OfTheMonth=function(){return", no %s do mês"},u.prototype.commaX0ThroughX1=function(){return", de %s a %s"},u.prototype.commaAndX0ThroughX1=function(){return", e de %s a %s"},u.prototype.everyHour=function(){return"a cada hora"},u.prototype.everyMinute=function(){return"a cada minuto"},u.prototype.everyMinuteBetweenX0AndX1=function(){return"a cada minuto entre %s e %s"},u.prototype.everySecond=function(){return"a cada segundo"},u.prototype.everyX0Hours=function(){return"a cada %s horas"},u.prototype.everyX0Minutes=function(){return"a cada %s minutos"},u.prototype.everyX0Seconds=function(){return"a cada %s segundos"},u.prototype.fifth=function(g){return g==="6"||g==="0"?"quinto":"quinta"},u.prototype.first=function(g){return g==="6"||g==="0"?"primeiro":"primeira"},u.prototype.firstWeekday=function(){return"primeiro dia da semana"},u.prototype.fourth=function(g){return g==="6"||g==="0"?"quarto":"quarta"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"do minuto %s até %s de cada hora"},u.prototype.second=function(g){return g==="6"||g==="0"?"segundo":"segunda"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"No segundo %s até %s de cada minuto"},u.prototype.spaceAnd=function(){return" e"},u.prototype.spaceX0OfTheMonth=function(){return" %s do mês"},u.prototype.lastDay=function(){return"o último dia"},u.prototype.third=function(g){return g==="6"||g==="0"?"terceiro":"terceira"},u.prototype.weekdayNearestDayX0=function(){return"dia da semana mais próximo do dia %s"},u.prototype.commaEveryX0Years=function(){return", a cada %s anos"},u.prototype.commaStartingX0=function(){return", iniciando %s"},u.prototype.daysOfTheWeek=function(){return["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},u.prototype.monthsOfTheYear=function(){return["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},u})();return l.pt_BR=N,c().locales.pt_BR=new N,n})())})(Bxe);var Fxe={exports:{}};(function(i,e){(function(r,s){i.exports=s(It())})(globalThis,t=>(()=>{var r={93:(u=>{u.exports=t})},s={};function o(u){var g=s[u];if(g!==void 0)return g.exports;var L=s[u]={exports:{}};return r[u](L,L.exports,o),L.exports}o.n=u=>{var g=u&&u.__esModule?()=>u.default:()=>u;return o.d(g,{a:g}),g},o.d=(u,g)=>{for(var L in g)o.o(g,L)&&!o.o(u,L)&&Object.defineProperty(u,L,{enumerable:!0,get:g[L]})},o.o=(u,g)=>Object.prototype.hasOwnProperty.call(u,g),o.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var n={};o.r(n);var a=o(93),c=o.n(a),l=n;Object.defineProperty(l,"__esModule",{value:!0}),l.pl=void 0;var N=(function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!0},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"Wystąpił błąd podczas generowania opisu wyrażenia cron. Sprawdź składnię wyrażenia cron."},u.prototype.at=function(){return"O"},u.prototype.atSpace=function(){return"O "},u.prototype.atX0=function(){return"o %s"},u.prototype.atX0MinutesPastTheHour=function(){return"w %s minucie"},u.prototype.atX0SecondsPastTheMinute=function(){return"w %s sekundzie"},u.prototype.betweenX0AndX1=function(){return"od %s do %s"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", od %s-ego do %s-ego dnia miesiąca"},u.prototype.commaEveryDay=function(){return", co dzień"},u.prototype.commaEveryX0Days=function(){return", co %s dni"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", co %s dni tygodnia"},u.prototype.commaEveryX0Months=function(){return", co %s miesięcy"},u.prototype.commaEveryX0Years=function(){return", co %s lat"},u.prototype.commaOnDayX0OfTheMonth=function(){return", %s-ego dnia miesiąca"},u.prototype.commaOnlyInX0=function(){return", tylko %s"},u.prototype.commaOnlyOnX0=function(){return", tylko %s"},u.prototype.commaAndOnX0=function(){return", i %s"},u.prototype.commaOnThe=function(){return", "},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", ostatni dzień miesiąca"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", ostatni dzień roboczy miesiąca"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s dni przed ostatnim dniem miesiąca"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", ostatni %s miesiąca"},u.prototype.commaOnTheX0OfTheMonth=function(){return", %s miesiąca"},u.prototype.commaX0ThroughX1=function(){return", od %s do %s"},u.prototype.commaAndX0ThroughX1=function(){return", i od %s do %s"},u.prototype.everyHour=function(){return"co godzinę"},u.prototype.everyMinute=function(){return"co minutę"},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Co minutę od %s do %s"},u.prototype.everySecond=function(){return"co sekundę"},u.prototype.everyX0Hours=function(){return"co %s godzin"},u.prototype.everyX0Minutes=function(){return"co %s minut"},u.prototype.everyX0Seconds=function(){return"co %s sekund"},u.prototype.fifth=function(){return"piąty"},u.prototype.first=function(){return"pierwszy"},u.prototype.firstWeekday=function(){return"pierwszy dzień roboczy"},u.prototype.fourth=function(){return"czwarty"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"minuty od %s do %s"},u.prototype.second=function(){return"drugi"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"sekundy od %s do %s"},u.prototype.spaceAnd=function(){return" i"},u.prototype.spaceX0OfTheMonth=function(){return" %s miesiąca"},u.prototype.lastDay=function(){return"ostatni dzień"},u.prototype.third=function(){return"trzeci"},u.prototype.weekdayNearestDayX0=function(){return"dzień roboczy najbliższy %s-ego dnia"},u.prototype.commaStartingX0=function(){return", startowy %s"},u.prototype.daysOfTheWeek=function(){return["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},u.prototype.monthsOfTheYear=function(){return["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"]},u})();return l.pl=N,c().locales.pl=new N,n})())})(Fxe);function Lg(i,e){return bxe.toString(i,{locale:e})}const Re={mainDiv:{width:"100%",height:"100%"},periodSelect:{display:"block",width:250},tabContent:{padding:20,height:"calc(100% - 240px)",overflow:"auto"},numberButton:{padding:4,minWidth:40,margin:5},appBar:{color:"white"},warning:{marginLeft:16,color:"red",fontSize:12}},Jxe=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Gxe=["January","February","March","April","May","June","July","August","September","October","November","December"];function Vl(i,e){const t=[];if(i==="*"){if(e===24||e===60||e===7)for(let s=0;s<e;s++)t.push(s);else for(let s=1;s<=e;s++)t.push(s);return t}const r=(i||"").toString().split(",");for(let s=0;s<r.length;s++){if(!r[s].trim().length)continue;const o=r[s].trim().split("-");if(o.length>1){const n=parseInt(o[1],10);for(let a=parseInt(o[0],10);a<=n;a++)t.push(a)}else t.push(parseInt(r[s],10))}t.sort();for(let s=t.length-1;s>=0;s--)t[s]===t[s+1]&&t.splice(s+1,1);return t}function Zl(i,e){if(typeof i!="object"&&(i=[i]),i.length===e)return"*";const t=[];if(!i.length)return"-";i=i.map(o=>parseInt(o,10)),i.sort((o,n)=>o-n);let r=i[0],s=i[0];for(let o=1;o<i.length;o++)i[o]-1!==parseInt(i[o-1],10)&&(r===s?t.push(r):s-1===r?t.push(`${r},${s}`):t.push(`${r}-${s}`),r=i[o]),s=i[o];return r===s?t.push(r):s-1===r?t.push(`${r},${s}`):t.push(`${r}-${s}`),t.join(",")}class Kt extends _.Component{constructor(e){super(e);let t=typeof this.props.cronExpression=="string"?this.props.cronExpression.replace(/^["']/,"").replace(/["']\n?$/,""):"";t[0]==="{"&&(t="");const r=Kt.cron2state(t||"* * * * *");this.state={extended:!1,tab:r.seconds!==!1?1:0,cron:Kt.state2cron(r),modes:{seconds:null,minutes:null,hours:null,dates:null,months:null,dow:null}},Object.assign(this.state,r),this.state.cron!==this.props.cronExpression&&setTimeout(()=>this.props.onChange&&this.props.onChange(this.state.cron),100)}static cron2state(e){e=e.replace(/['"]/g,"").trim();const t=e.split(" ").map(s=>s.trim());let r;return t.length===6?r={seconds:t[0]||"*",minutes:t[1]||"*",hours:t[2]||"*",dates:t[3]||"*",months:t[4]||"*",dow:t[5]||"*"}:r={seconds:!1,minutes:t[0]||"*",hours:t[1]||"*",dates:t[2]||"*",months:t[3]||"*",dow:t[4]||"*"},r}static state2cron(e){let t=`${e.minutes} ${e.hours} ${e.dates} ${e.months} ${e.dow}`;return e.seconds!==!1&&(t=`${e.seconds} ${t}`),t}recalcCron(){const e=Kt.state2cron(this.state);e!==this.state.cron&&this.setState({cron:e},()=>this.props.onChange&&this.props.onChange(this.state.cron))}onToggle(e,t,r){if(e===!0)this.setCronAttr(t,"*");else if(e===!1)r===60||r===24?this.setCronAttr(t,"0"):this.setCronAttr(t,"1");else{const s=Vl(this.state[t],r),o=s.indexOf(e);o!==-1?s.splice(o,1):(s.push(e),s.sort()),this.setCronAttr(t,Zl(s,r))}}getDigitsSelector(e,t){let r=[];if(t===7)r=[1,2,3,4,5,6,0];else if(t===60||t===24)for(let o=0;o<t;o++)r.push(o);else for(let o=1;o<=t;o++)r.push(o);const s=Vl(this.state[e],t);return[M.createElement(j.Button,{key:"removeall",variant:"outlined",style:Re.numberButton,color:"primary",onClick:()=>this.onToggle(!1,e,t)},p.t("ra_Deselect all")),M.createElement(j.Button,{key:"addall",variant:"contained",style:Re.numberButton,color:"secondary",onClick:()=>this.onToggle(!0,e,t)},p.t("ra_Select all")),M.createElement("div",{key:"all"},r.map(o=>[t===7&&o===4||t===12&&o===7||t===31&&!((o-1)%10)||t===60&&o&&!(o%10)||t===24&&o&&!(o%6)?M.createElement("div",{key:`allInner${o}`,style:{width:"100%"}}):null,M.createElement(j.Button,{key:`_${o}`,variant:s.indexOf(o)!==-1?"contained":"outlined",style:Re.numberButton,color:s.indexOf(o)!==-1?"secondary":"primary",onClick:()=>this.onToggle(o,e,t)},t===7?p.t(Jxe[o]):t===12?Gxe[o-1]:o)]))]}getPeriodsTab(e,t){const r=this.state[e];let s=r==="*",o=r==null?!1:r.toString().includes("/"),n;if(this.state.modes[e]===null){n=s?"every":o?"everyN":"specific";const c=JSON.parse(JSON.stringify(this.state.modes));return c[e]=n,setTimeout(()=>this.setState({modes:c},()=>this.recalcCron()),100),null}s=this.state.modes[e]==="every",o=this.state.modes[e]==="everyN",n=this.state.modes[e];let a=1;return o&&r&&(a=parseInt(r.replace("*/",""),10)||1),M.createElement("div",null,M.createElement(j.Select,{variant:"standard",style:{...Re.periodSelect,verticalAlign:"bottom"},value:n,onChange:c=>{const l=JSON.parse(JSON.stringify(this.state.modes));if(l[e]=c.target.value,c.target.value==="every")this.setCronAttr(e,"*",l);else if(c.target.value==="everyN"){const N=parseInt((this.state[e]||"").toString().replace("*/",""),10)||1;this.setCronAttr(e,`*/${N}`,l)}else if(c.target.value==="specific"){let N=parseInt((this.state[e]||"").toString().split(",")[0],10)||0;!N&&(e==="months"||e==="dates")&&(N=1),this.setCronAttr(e,Zl(N,t),l)}}},M.createElement(j.MenuItem,{key:"every",value:"every"},p.t(`sc_every_${e}`)),M.createElement(j.MenuItem,{key:"everyN",value:"everyN"},p.t(`sc_everyN_${e}`)),M.createElement(j.MenuItem,{key:"specific",value:"specific"},p.t(`sc_specific_${e}`))),o&&M.createElement(j.TextField,{variant:"standard",key:"interval",label:p.t(`sc_${e}`),value:a,slotProps:{htmlInput:{min:1,max:t},inputLabel:{shrink:!0}},onChange:c=>{this.setState({[e]:`*/${c.target.value}`},()=>this.recalcCron())},type:"number",margin:"normal"}),!s&&!o&&this.getDigitsSelector(e,t))}static convertCronToText(e,t){return e.split(" ").includes("-")?p.t("ra_Invalid CRON"):Lg(e,t)}setCronAttr(e,t,r){r?e==="seconds"?this.setState({seconds:t,modes:r},()=>this.recalcCron()):e==="minutes"?this.setState({minutes:t,modes:r},()=>this.recalcCron()):e==="hours"?this.setState({hours:t,modes:r},()=>this.recalcCron()):e==="dates"?this.setState({dates:t,modes:r},()=>this.recalcCron()):e==="months"?this.setState({months:t,modes:r},()=>this.recalcCron()):e==="dow"?this.setState({dow:t,modes:r},()=>this.recalcCron()):this.setState({modes:r},()=>this.recalcCron()):e==="seconds"?this.setState({seconds:t},()=>this.recalcCron()):e==="minutes"?this.setState({minutes:t},()=>this.recalcCron()):e==="hours"?this.setState({hours:t},()=>this.recalcCron()):e==="dates"?this.setState({dates:t},()=>this.recalcCron()):e==="months"?this.setState({months:t},()=>this.recalcCron()):e==="dow"&&this.setState({dow:t},()=>this.recalcCron())}render(){const e=this.state.seconds!==!1?this.state.tab:this.state.tab+1,t=this.state.minutes==="*"||this.state.minutes==="*/1",r=this.state.seconds==="*"||this.state.seconds==="*/1";return M.createElement("div",{style:Re.mainDiv},M.createElement("div",{style:{paddingLeft:8,width:"calc(100% - px)"}},M.createElement(j.TextField,{variant:"standard",style:{width:"100%"},value:this.state.cron,disabled:!0})),M.createElement("div",{style:{paddingLeft:8,width:"calc(100% - px)",height:60}},Kt.convertCronToText(this.state.cron,this.props.language||"en"),M.createElement("span",{style:Re.warning},r?p.t("ra_warning_every_second"):t?p.t("ra_warning_every_minute"):"")),M.createElement(j.FormControlLabel,{control:M.createElement(j.Checkbox,{checked:!!this.state.seconds,onChange:s=>this.setState({seconds:s.target.checked?"*":!1},()=>this.recalcCron())}),label:p.t("ra_use seconds")}),M.createElement(j.AppBar,{position:"static",sx:{"&.MuiAppBar-root":Re.appBar},color:"secondary"},M.createElement(j.Tabs,{value:this.state.tab,style:Re.appBar,color:"secondary",onChange:(s,o)=>this.setState({tab:o})},this.state.seconds!==!1&&M.createElement(j.Tab,{id:"sc_seconds",label:p.t("sc_seconds")}),M.createElement(j.Tab,{id:"minutes",label:p.t("sc_minutes")}),M.createElement(j.Tab,{id:"hours",label:p.t("sc_hours")}),M.createElement(j.Tab,{id:"dates",label:p.t("sc_dates")}),M.createElement(j.Tab,{id:"months",label:p.t("sc_months")}),M.createElement(j.Tab,{id:"dow",label:p.t("sc_dows")}))),e===0&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("seconds",60)),e===1&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("minutes",60)),e===2&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("hours",24)),e===3&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("dates",31)),e===4&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("months",12)),e===5&&M.createElement("div",{style:Re.tabContent},this.getPeriodsTab("dow",7)))}}const Ui={modalDialog:{minWidth:400,maxWidth:800},overflowHidden:{display:"flex",overflow:"hidden"},titleIcon:{marginRight:5},content:{fontSize:16},languageButton:{position:"absolute",right:8,top:8},languageButtonActive:i=>({color:i.palette.primary.main})};function Ske(i){const{open:e,toggleTranslation:t,noTranslation:r,title:s,fullWidth:o,help:n,maxWidth:a,progress:c,icon:l,applyDisabled:N,applyButton:u,onClose:g,children:L,titleButtonApply:d,titleButtonClose:y,onApply:D,textInput:z,defaultValue:A,overflowHidden:C}=i,[f,m]=_.useState(A||"");_.useEffect(()=>{m(A||"")},[A]);let h=null;return l&&(h=l),M.createElement(j.Dialog,{open:e,maxWidth:a||"md",fullWidth:!!o,disableEscapeKeyDown:!1,onClose:g,sx:{"& .MuiDialog-paper":Ui.modalDialog}},s&&M.createElement(j.DialogTitle,null,l?M.createElement(h,{style:Ui.titleIcon}):null,s,p.getLanguage()!=="en"&&t?M.createElement(j.IconButton,{size:"large",sx:E.getStyle(i.theme,Ui.languageButton,r&&Ui.languageButtonActive),onClick:()=>t(),title:p.t("Disable/Enable translation")},M.createElement(O.Language,null)):null),M.createElement(j.DialogContent,{style:{...Ui.content,...C?Ui.overflowHidden:void 0,paddingTop:8}},z&&M.createElement(j.TextField,{autoComplete:"off",fullWidth:!0,autoFocus:!0,variant:"outlined",size:"medium",multiline:!0,value:f,onChange:x=>m(x.target.value)}),L,n?M.createElement("div",null,n):null),M.createElement(j.DialogActions,null,u!==!1&&M.createElement(j.Button,{startIcon:M.createElement(O.Check,null),disabled:c||N&&A===f,onClick:()=>D(z?f:""),variant:"contained",color:"primary"},p.t(d||"ra_Ok")),M.createElement(j.Button,{color:"grey",onClick:g,disabled:c,variant:"contained",startIcon:M.createElement(O.Close,null)},p.t(y||"ra_Cancel"))))}const Hxe=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Dr(i,e,t){const r=Vxe(i),{webkitRelativePath:s}=i,o=typeof e=="string"?e:typeof s=="string"&&s.length>0?s:`./${i.name}`;return typeof r.path!="string"&&Xl(r,"path",o),Xl(r,"relativePath",o),r}function Vxe(i){const{name:e}=i;if(e&&e.lastIndexOf(".")!==-1&&!i.type){const r=e.split(".").pop().toLowerCase(),s=Hxe.get(r);s&&Object.defineProperty(i,"type",{value:s,writable:!1,configurable:!1,enumerable:!0})}return i}function Xl(i,e,t){Object.defineProperty(i,e,{value:t,writable:!1,configurable:!1,enumerable:!0})}const Zxe=[".DS_Store","Thumbs.db"];function Xxe(i){return fi(this,void 0,void 0,function*(){return Io(i)&&Kxe(i.dataTransfer)?iOe(i.dataTransfer,i.type):qxe(i)?eOe(i):Array.isArray(i)&&i.every(e=>"getFile"in e&&typeof e.getFile=="function")?tOe(i):[]})}function Kxe(i){return Io(i)}function qxe(i){return Io(i)&&Io(i.target)}function Io(i){return typeof i=="object"&&i!==null}function eOe(i){return Aa(i.target.files).map(e=>Dr(e))}function tOe(i){return fi(this,void 0,void 0,function*(){return(yield Promise.all(i.map(t=>t.getFile()))).map(t=>Dr(t))})}function iOe(i,e){return fi(this,void 0,void 0,function*(){if(i.items){const t=Aa(i.items).filter(s=>s.kind==="file");if(e!=="drop")return t;const r=yield Promise.all(t.map(rOe));return Kl(jg(r))}return Kl(Aa(i.files).map(t=>Dr(t)))})}function Kl(i){return i.filter(e=>Zxe.indexOf(e.name)===-1)}function Aa(i){if(i===null)return[];const e=[];for(let t=0;t<i.length;t++){const r=i[t];e.push(r)}return e}function rOe(i){if(typeof i.webkitGetAsEntry!="function")return ql(i);const e=i.webkitGetAsEntry();return e&&e.isDirectory?dg(e):ql(i,e)}function jg(i){return i.reduce((e,t)=>[...e,...Array.isArray(t)?jg(t):[t]],[])}function ql(i,e){return fi(this,void 0,void 0,function*(){var t;if(globalThis.isSecureContext&&typeof i.getAsFileSystemHandle=="function"){const o=yield i.getAsFileSystemHandle();if(o===null)throw new Error(`${i} is not a File`);if(o!==void 0){const n=yield o.getFile();return n.handle=o,Dr(n)}}const r=i.getAsFile();if(!r)throw new Error(`${i} is not a File`);return Dr(r,(t=e==null?void 0:e.fullPath)!==null&&t!==void 0?t:void 0)})}function sOe(i){return fi(this,void 0,void 0,function*(){return i.isDirectory?dg(i):oOe(i)})}function dg(i){const e=i.createReader();return new Promise((t,r)=>{const s=[];function o(){e.readEntries(n=>fi(this,void 0,void 0,function*(){if(n.length){const a=Promise.all(n.map(sOe));s.push(a),o()}else try{const a=yield Promise.all(s);t(a)}catch(a){r(a)}}),n=>{r(n)})}o()})}function oOe(i){return fi(this,void 0,void 0,function*(){return new Promise((e,t)=>{i.file(r=>{const s=Dr(r,i.fullPath);e(s)},r=>{t(r)})})})}var Un=function(i,e){if(i&&e){var t=Array.isArray(e)?e:e.split(",");if(t.length===0)return!0;var r=i.name||"",s=(i.type||"").toLowerCase(),o=s.replace(/\/.*$/,"");return t.some(function(n){var a=n.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?o===a.replace(/\/.*$/,""):s===a})}return!0};function eN(i){return MOe(i)||aOe(i)||Tg(i)||nOe()}function nOe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
324
325
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aOe(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function MOe(i){if(Array.isArray(i))return fa(i)}function tN(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),t.push.apply(t,r)}return t}function iN(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?tN(Object(t),!0).forEach(function(r){yg(i,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):tN(Object(t)).forEach(function(r){Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(t,r))})}return i}function yg(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function ls(i,e){return lOe(i)||uOe(i,e)||Tg(i,e)||cOe()}function cOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
325
326
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tg(i,e){if(i){if(typeof i=="string")return fa(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return fa(i,e)}}function fa(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=i[t];return r}function uOe(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r=[],s=!0,o=!1,n,a;try{for(t=t.call(i);!(s=(n=t.next()).done)&&(r.push(n.value),!(e&&r.length===e));s=!0);}catch(c){o=!0,a=c}finally{try{!s&&t.return!=null&&t.return()}finally{if(o)throw a}}return r}}function lOe(i){if(Array.isArray(i))return i}var NOe=typeof Un=="function"?Un:Un.default,gOe="file-invalid-type",LOe="file-too-large",jOe="file-too-small",dOe="too-many-files",yOe=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=e.split(","),r=t.length>1?"one of ".concat(t.join(", ")):t[0];return{code:gOe,message:"File type must be ".concat(r)}},rN=function(e){return{code:LOe,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},sN=function(e){return{code:jOe,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},TOe={code:dOe,message:"Too many files"};function Dg(i,e){var t=i.type==="application/x-moz-file"||NOe(i,e);return[t,t?null:yOe(e)]}function hg(i,e,t){if(Di(i.size))if(Di(e)&&Di(t)){if(i.size>t)return[!1,rN(t)];if(i.size<e)return[!1,sN(e)]}else{if(Di(e)&&i.size<e)return[!1,sN(e)];if(Di(t)&&i.size>t)return[!1,rN(t)]}return[!0,null]}function Di(i){return i!=null}function DOe(i){var e=i.files,t=i.accept,r=i.minSize,s=i.maxSize,o=i.multiple,n=i.maxFiles,a=i.validator;return!o&&e.length>1||o&&n>=1&&e.length>n?!1:e.every(function(c){var l=Dg(c,t),N=ls(l,1),u=N[0],g=hg(c,r,s),L=ls(g,1),d=L[0],y=a?a(c):null;return u&&d&&!y})}function mo(i){return typeof i.isPropagationStopped=="function"?i.isPropagationStopped():typeof i.cancelBubble<"u"?i.cancelBubble:!1}function Js(i){return i.dataTransfer?Array.prototype.some.call(i.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!i.target&&!!i.target.files}function oN(i){i.preventDefault()}function hOe(i){return i.indexOf("MSIE")!==-1||i.indexOf("Trident/")!==-1}function pOe(i){return i.indexOf("Edge/")!==-1}function zOe(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return hOe(i)||pOe(i)}function dt(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return function(r){for(var s=arguments.length,o=new Array(s>1?s-1:0),n=1;n<s;n++)o[n-1]=arguments[n];return e.some(function(a){return!mo(r)&&a&&a.apply(void 0,[r].concat(o)),mo(r)})}}function wOe(){return"showOpenFilePicker"in window}function COe(i){if(Di(i)){var e=Object.entries(i).filter(function(t){var r=ls(t,2),s=r[0],o=r[1],n=!0;return pg(s)||(console.warn('Skipped "'.concat(s,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),n=!1),(!Array.isArray(o)||!o.every(zg))&&(console.warn('Skipped "'.concat(s,'" because an invalid file extension was provided.')),n=!1),n}).reduce(function(t,r){var s=ls(r,2),o=s[0],n=s[1];return iN(iN({},t),{},yg({},o,n))},{});return[{description:"Files",accept:e}]}return i}function IOe(i){if(Di(i))return Object.entries(i).reduce(function(e,t){var r=ls(t,2),s=r[0],o=r[1];return[].concat(eN(e),[s],eN(o))},[]).filter(function(e){return pg(e)||zg(e)}).join(",")}function mOe(i){return i instanceof DOMException&&(i.name==="AbortError"||i.code===i.ABORT_ERR)}function AOe(i){return i instanceof DOMException&&(i.name==="SecurityError"||i.code===i.SECURITY_ERR)}function pg(i){return i==="audio/*"||i==="video/*"||i==="image/*"||i==="text/*"||i==="application/*"||/\w+\/[-+.\w]+/g.test(i)}function zg(i){return/^.*\.[\w]+$/.test(i)}var fOe=["children"],xOe=["open"],OOe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],EOe=["refKey","onChange","onClick"];function _Oe(i){return vOe(i)||kOe(i)||wg(i)||SOe()}function SOe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
326
327
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kOe(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function vOe(i){if(Array.isArray(i))return xa(i)}function $n(i,e){return QOe(i)||YOe(i,e)||wg(i,e)||bOe()}function bOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -483,7 +484,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
483
484
  text-decoration: underline;
484
485
  cursor: pointer;
485
486
  }
486
- `),M.createElement(H3e,null,this.getToolbar()),M.createElement(G3e,null,this.renderHeader(),M.createElement(j.Box,{style:I.tableDiv,ref:this.tableRef,onKeyDown:r=>this.navigateKeyPress(r)},t)),this.renderContextMenu(),this.renderAliasMenu(),this.renderToast(),this.renderColumnsEditCustomDialog(),this.renderColumnsSelectorDialog(),this.renderCustomDialog(),this.renderEditValueDialog(),this.renderEditObjectDialog(),this.renderViewObjectFileDialog(),this.renderAliasEditorDialog(),this.renderEditRoleDialog(),this.renderEnumDialog(),this.renderErrorDialog(),this.renderExportDialog(),this.renderRenameDialog(),this.state.modalNewObj&&this.props.modalNewObject&&this.props.modalNewObject(this),this.state.modalEditOfAccess&&this.state.modalEditOfAccessObjData&&this.props.modalEditOfAccessControl&&this.props.modalEditOfAccessControl(this,this.state.modalEditOfAccessObjData))}}const r5e=sn()(Tt);class Uke extends M.Component{refTypo;height;width;constructor(e){super(e),this.state={closed:this.props.storeId?window.localStorage.getItem(this.props.storeId)==="true":!1},this.height=0,this.width=0,this.refTypo=M.createRef()}componentDidMount(){this.detectHeight()}onClick(){this.props.storeId&&this.props.closed===void 0&&(this.state.closed?window.localStorage.removeItem(this.props.storeId):window.localStorage.setItem(this.props.storeId,"true")),this.props.closed===void 0?this.setState({closed:!this.state.closed},()=>{this.props.onClose&&this.props.onClose(this.state.closed)}):this.props.onClose&&this.props.onClose(!this.props.closed)}detectHeight(){const e=this.props.closed!==void 0?this.props.closed:this.state.closed;this.props.closeable&&!e&&this.refTypo.current&&window.requestAnimationFrame(()=>{(this.props.closed!==void 0?this.props.closed:this.state.closed)||this.refTypo.current&&(!this.height||this.width!==this.refTypo.current.clientWidth)&&(this.height=this.refTypo.current.clientHeight,this.width=this.refTypo.current.clientWidth,this.forceUpdate())})}componentDidUpdate(){this.detectHeight()}render(){const e=this.props.closed!==void 0?this.props.closed:this.state.closed,t=e?O.Visibility:O.Close;return M.createElement(j.Box,{className:"iom-info-box",style:{whiteSpace:"preserve",display:"flex",gap:8,alignItems:e||this.props.iconPosition==="top"?"flex-start":"center",borderWidth:1,borderStyle:"solid",padding:4,borderRadius:5,marginBottom:8,maxWidth:"100%",transition:"height 0.5s",height:this.props.closeable?e?30:this.height||void 0:void 0,overflow:this.props.closeable?"hidden":void 0,position:"relative",...this.props.style},sx:{borderColor:r=>this.props.type==="ok"?r.palette.info.main:r.palette[this.props.type].main}},this.props.type==="ok"?M.createElement(O.Check,{style:{color:"#0F0"}}):this.props.type==="info"?M.createElement(O.Info,{color:"primary"}):M.createElement(O.Warning,{color:this.props.type}),M.createElement(j.Typography,{ref:this.refTypo},this.props.children),this.props.closeable?M.createElement(t,{sx:{color:r=>r.palette.mode==="dark"?"lightgray":"gray",cursor:"pointer",position:"absolute",top:4,right:4},onClick:()=>this.onClick()}):null,this.props.closeable?M.createElement("div",{style:{width:22}}):null,e?M.createElement(j.Box,{component:"div",sx:r=>{const s=r.palette[this.props.type==="ok"?"info":this.props.type].main;return{background:`linear-gradient(${s}00 0%, ${s}10 60%, ${s}90 100%)`}},style:{bottom:0,position:"absolute",left:0,right:0,height:10}}):null)}}const k={hr:{border:0,borderTop:"1px solid gray"},scrollWindow:{width:"100%",overflow:"auto",height:"calc(100% - 22px)"},rowDiv:{width:"100%"},modeDiv:{width:200,display:"inline-block",verticalAlign:"top"},settingsDiv:{display:"inline-block",verticalAlign:"top"},inputTime:{width:90,marginTop:0,marginLeft:5},inputDate:{width:140,marginTop:0,marginLeft:5},inputEvery:{width:40,marginLeft:5,marginRight:5},inputRadio:{padding:"4px 12px",verticalAlign:"top"},inputGroup:{maxWidth:400,display:"inline-block"},inputGroupElement:{width:120},inputDateDay:{width:60},inputDateDayCheck:{padding:4},inputSmallCheck:{padding:0},rowOnce:{},rowDays:i=>({background:i.palette.mode!=="dark"?"#ddeaff":"#4b5057"}),rowDows:i=>({background:i.palette.mode!=="dark"?"#DDFFDD":"#52646c"}),rowMonths:i=>({background:i.palette.mode!=="dark"?"#DDFFFF":"#1f5557"}),rowMonthsDates:i=>({background:i.palette.mode!=="dark"?"#EEFFFF":"#3c5737",maxWidth:600}),rowYears:i=>({background:i.palette.mode!=="dark"?"#fbffdd":"#574b33"}),rowDowsDows:i=>({background:i.palette.mode!=="dark"?"#EEFFEE":"#3d4c54",pl:"10px",pb:"10px"})},Jn=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ks=["January","February","March","April","May","June","July","August","September","October","November","December"],Gn={minutes:"minutes",hours:"hours"},Fr=["sunrise","sunriseEnd","goldenHourEnd","solarNoon","goldenHour","sunsetStart","sunset","dusk","nauticalDusk","night","nightEnd","nauticalDawn","dawn","nadir"];function xt(i){return i<10?`0${i}`:`${i}`}const RN={time:{exactTime:!1,start:"00:00",end:"23:59",mode:"hours",interval:1},period:{once:"",days:1,dows:"",dates:"",weeks:0,months:"",years:0,yearMonth:0,yearDate:0},valid:{from:"",to:""}};function Hn(i){const e=i.split(".");return e.length===3?`${e[2]}-${e[1]}-${e[0]}`:""}class fe extends _.Component{refFrom;refTo;refOnce;timerOnce=null;timerFrom=null;timerTo=null;constructor(e){super(e);let t;if(this.props.schedule&&typeof this.props.schedule=="string"&&this.props.schedule[0]==="{")try{t=JSON.parse(this.props.schedule)}catch{}else typeof this.props.schedule=="object"&&(t=this.props.schedule);(!t||!Object.keys(t).length)&&(setTimeout(()=>this.onChange(this.state.schedule,!0),200),t=RN),t={...RN,...t},t.valid.from||=fe.now2string(),this.refFrom=M.createRef(),this.refTo=M.createRef(),this.refOnce=M.createRef(),this.state={schedule:t,desc:fe.state2text(t)},JSON.stringify(t)!==this.props.schedule&&setTimeout(()=>{var r,s;return(s=(r=this.props).onChange)==null?void 0:s.call(r,JSON.stringify(t))},100)}onChange(e,t){var s,o;const r=JSON.stringify(e)!==JSON.stringify(this.state.schedule);if(t||r){r&&this.setState({schedule:e,desc:fe.state2text(e)});const n=JSON.parse(JSON.stringify(e));if(n.period.once){const a=n.period.once;delete n.period,n.period={once:a},delete n.valid}else if(n.period.days){const a=n.period.days,c=n.period.dows;delete n.period,n.period={days:a},c&&c!=="[]"&&(n.period.dows=c)}else if(n.period.weeks){const a=n.period.weeks,c=n.period.dows;delete n.period,n.period={weeks:a},c&&c!=="[]"&&(n.period.dows=c)}else if(n.period.months){const a=n.period.months,c=n.period.dates;delete n.period,n.period={months:a},c&&c!=="[]"&&(n.period.dates=c)}else if(n.period.years){const a=n.period.years,c=n.period.yearMonth,l=n.period.yearDate;delete n.period,n.period={years:a,yearDate:l},c&&(n.period.yearMonth=c)}if(n.time.exactTime?(delete n.time.end,delete n.time.mode,delete n.time.interval):delete n.time.exactTime,n.valid){if(n.valid.to||delete n.valid.to,n.period.days===1||n.period.weeks===1||n.period.months===1||n.period.years===1){const a=fe.string2date(n.valid.from),c=new Date;c.setHours(0),c.setMinutes(0),c.setSeconds(0),c.setMilliseconds(0),a<=c&&delete n.valid.from}!n.valid.from&&!n.valid.to&&delete n.valid}(o=(s=this.props).onChange)==null||o.call(s,JSON.stringify(n),fe.state2text(e))}}static state2text(e){if(typeof e=="string")try{e=JSON.parse(e)}catch{return""}const t=[],r=fe.string2date(e.valid.from);if(e.period.once){const s=fe.string2date(e.period.once),o=new Date;if(o.setMilliseconds(0),o.setSeconds(0),o.setMinutes(0),o.setHours(0),s<o)return p.t("sch_desc_onceInPast");t.push(p.t("sch_desc_once_on",e.period.once))}else if(e.period.days)if(e.period.days===1)if(e.period.dows){const s=JSON.parse(e.period.dows);if(s.length===2&&s[0]===0&&s[1]===6)t.push(p.t("sch_desc_onWeekends"));else if(s.length===5&&s[0]===1&&s[1]===2&&s[2]===3&&s[3]===4&&s[4]===5)t.push(p.t("sch_desc_onWorkdays"));else{const o=s.map(n=>p.t(Jn[n]));if(o.length===1)t.push(p.t("sch_desc_onWeekday",o[0]));else if(o.length===7)t.push(p.t("sch_desc_everyDay"));else{const n=o.pop();t.push(p.t("sch_desc_onWeekdays",o.join(", "),n))}}}else t.push(p.t("sch_desc_everyDay"));else t.push(p.t("sch_desc_everyNDay",e.period.days.toString()));else if(e.period.weeks)if(e.period.weeks===1?t.push(p.t("sch_desc_everyWeek")):t.push(p.t("sch_desc_everyNWeeks",e.period.weeks.toString())),e.period.dows){const s=JSON.parse(e.period.dows);if(s.length===2&&s[0]===0&&s[1]===6)t.push(p.t("sch_desc_onWeekends"));else if(s.length===5&&s[0]===1&&s[1]===2&&s[2]===3&&s[3]===4&&s[4]===5)t.push(p.t("sch_desc_onWorkdays"));else{const o=s.map(n=>p.t(Jn[n]));if(o.length===1)t.push(p.t("sch_desc_onWeekday",o[0]));else if(o.length===7)t.push(p.t("sch_desc_everyDay"));else{const n=o.pop();t.push(p.t("sch_desc_onWeekdays",o.join(", "),n))}}}else return p.t("sch_desc_never");else if(e.period.months){if(e.period.dates){const s=JSON.parse(e.period.dates);if(s.length===1)t.push(p.t("sch_desc_onDate",s[0]));else if(s.length===31)t.push(p.t("sch_desc_onEveryDate"));else if(s.length){const o=s.pop();t.push(p.t("sch_desc_onDates",s.join(", "),o))}else return p.t("sch_desc_never")}else t.push(p.t("sch_desc_onEveryDate"));if(e.period.months===1)t.push(p.t("sch_desc_everyMonth"));else if(typeof e.period.months=="number")t.push(p.t("sch_desc_everyNMonths",e.period.months.toString()));else{const o=JSON.parse(e.period.months).map(n=>p.t(Ks[n-1]));if(!o.length)return p.t("sch_desc_never");if(o.length===1)t.push(p.t("sch_desc_onMonth",o[0]));else if(o.length===12)t.push(p.t("sch_desc_everyMonth"));else{const n=o.pop();t.push(p.t("sch_desc_onMonths",o.join(", "),n))}}}else e.period.years&&(e.period.years===1?t.push(p.t("sch_desc_everyYear")):t.push(p.t("sch_desc_everyNYears",e.period.years.toString())),t.push(p.t("sch_desc_onDate",e.period.yearDate.toString(),e.period.yearMonth?p.t(Ks[e.period.yearMonth-1]):p.t("sch_desc_everyMonth"))));if(e.time.exactTime)Fr.includes(e.time.start)?t.push(p.t("sch_desc_atTime",p.t(`sch_astro_${e.time.start}`))):t.push(p.t("sch_desc_atTime",e.time.start));else{e.time.mode===Gn.minutes?e.time.interval===1?t.push(p.t("sch_desc_everyMinute")):t.push(p.t("sch_desc_everyNMinutes",e.time.interval.toString())):e.time.interval===1?t.push(p.t("sch_desc_everyHour")):t.push(p.t("sch_desc_everyNHours",e.time.interval.toString()));const s=Fr.indexOf(e.time.start)!==-1?p.t(`sch_astro_${e.time.start}`):e.time.start,o=Fr.indexOf(e.time.end)!==-1?p.t(`sch_astro_${e.time.end}`):e.time.end;(s!=="00:00"||o!=="24:00"&&o!=="23:59")&&t.push(p.t("sch_desc_intervalFromTo",s,o))}return e.period.once||(r.getTime()>Date.now()&&e.valid.to?t.push(p.t("sch_desc_validFromTo",e.valid.from,e.valid.to)):r.getTime()>Date.now()?t.push(p.t("sch_desc_validFrom",e.valid.from)):e.valid.to&&t.push(p.t("sch_desc_validTo",e.valid.to))),t.join(" ")}getTimePeriodElements(){const e=this.state.schedule;let t=!1,r=!1,s=!1,o=!0;return e.time.start==="00:00"&&e.time.end==="24:00"?(t=!0,o=!1):e.time.start==="sunrise"?(r=!0,o=!1):e.time.start==="sunset"&&(s=!0,o=!1),M.createElement("div",{key:"timePeriod",style:k.rowDiv},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!e.time.exactTime,onClick:()=>{const n=JSON.parse(JSON.stringify(this.state.schedule));n.time.exactTime=!1,this.onChange(n)}}),label:p.t("sch_intervalTime")})),M.createElement("div",{style:k.settingsDiv},M.createElement("div",{style:k.settingsDiv},!e.time.exactTime&&M.createElement("div",null,M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!o,onClick:()=>{const n=JSON.parse(JSON.stringify(this.state.schedule));n.time.start="00:00",n.time.end="23:59",this.onChange(n)}}),label:o?"":p.t("sch_fromTo")}),o&&[M.createElement(j.TextField,{variant:"standard",style:{...k.inputTime,marginRight:10},key:"exactTimeFrom",type:"time",sx:n=>({'& input[type="time"]::-webkit-calendar-picker-indicator':{filter:n.palette.mode==="dark"?"invert(80%)":void 0}}),value:this.state.schedule.time.start,onChange:n=>{const a=JSON.parse(JSON.stringify(this.state.schedule));a.time.start=n.target.value,this.onChange(a)},slotProps:{inputLabel:{shrink:!0}},label:p.t("sch_from"),margin:"normal"}),M.createElement(j.TextField,{variant:"standard",style:k.inputTime,key:"exactTimeTo",type:"time",sx:n=>({'& input[type="time"]::-webkit-calendar-picker-indicator':{filter:n.palette.mode==="dark"?"invert(80%)":void 0}}),value:this.state.schedule.time.end,onChange:n=>{const a=JSON.parse(JSON.stringify(this.state.schedule));a.time.end=n.target.value,this.onChange(a)},slotProps:{inputLabel:{shrink:!0}},label:p.t("sch_to"),margin:"normal"})])),!e.time.exactTime&&M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!t,onClick:()=>{const n=JSON.parse(JSON.stringify(this.state.schedule));n.time.start="00:00",n.time.end="24:00",this.onChange(n)}}),label:p.t("sch_wholeDay")})),!e.time.exactTime&&M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!r,onClick:()=>{const n=JSON.parse(JSON.stringify(this.state.schedule));n.time.start="sunrise",n.time.end="sunset",this.onChange(n)}}),label:p.t("sch_astroDay")})),!e.time.exactTime&&M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!s,onClick:()=>{const n=JSON.parse(JSON.stringify(this.state.schedule));n.time.start="sunset",n.time.end="sunrise",this.onChange(n)}}),label:p.t("sch_astroNight")}))),!e.time.exactTime&&this.getPeriodSettingsMinutes(o)))}getTimeExactElements(){const e=Fr.includes(this.state.schedule.time.start);return M.createElement("div",{key:"timeExact",style:k.rowDiv},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!this.state.schedule.time.exactTime,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.time.exactTime=!0,this.onChange(t)}}),label:p.t("sch_exactTime")})),this.state.schedule.time.exactTime&&M.createElement(j.Select,{variant:"standard",value:e?this.state.schedule.time.start:"00:00",onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.time.start=t.target.value,this.onChange(r)}},M.createElement(j.MenuItem,{key:"specific",value:"00:00"},p.t("sch_specificTime")),Fr.map(t=>M.createElement(j.MenuItem,{key:t,value:t},p.t(`sch_astro_${t}`)))),this.state.schedule.time.exactTime&&!e&&M.createElement("div",{style:k.settingsDiv},M.createElement(j.TextField,{variant:"standard",style:k.inputTime,key:"exactTimeValue",value:this.state.schedule.time.start,type:"time",sx:t=>({'& input[type="time"]::-webkit-calendar-picker-indicator':{filter:t.palette.mode==="dark"?"invert(80%)":void 0}}),onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.time.start=t.target.value,this.onChange(r)},slotProps:{inputLabel:{shrink:!0}},margin:"normal"})))}static getDivider(){return M.createElement("hr",{style:k.hr})}getPeriodModes(){const e=this.state.schedule,t=!e.period.dows&&!e.period.months&&!e.period.dates&&!e.period.years&&!e.period.days&&!e.period.weeks;return t&&!e.period.once&&(e.period.once=fe.now2string(!0)),[M.createElement("div",{key:"once",style:{...k.rowDiv,...k.rowOnce}},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!t,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.once||=fe.now2string(!0),r.period.dows="",r.period.months="",r.period.dates="",r.period.years=0,r.period.yearDate=0,r.period.yearMonth=0,r.period.weeks=0,r.period.days=0,this.onChange(r)}}),label:p.t("sch_periodOnce")})),t&&M.createElement("div",{style:k.settingsDiv},M.createElement(j.TextField,{variant:"standard",style:k.inputDate,type:"date",ref:this.refOnce,key:"exactDateAt",defaultValue:Hn(e.period.once),onChange:r=>{this.timerOnce&&clearTimeout(this.timerOnce),this.timerOnce=null,this.refOnce.current&&(this.refOnce.current.style.background="#ff000030"),this.timerOnce=setTimeout(s=>{this.timerOnce=null,this.refOnce.current&&(this.refOnce.current.style.background="");const o=JSON.parse(JSON.stringify(this.state.schedule)),n=fe.string2date(s);n.toString()!=="Invalid Date"&&(o.period.once=`${xt(n.getDate())}.${xt(n.getMonth()+1)}.${n.getFullYear()}`,this.onChange(o))},1500,r.target.value)},slotProps:{inputLabel:{shrink:!0}},label:p.t("sch_at"),margin:"normal"}))),M.createElement(j.Box,{component:"div",key:"days",sx:E.getStyle(this.props.theme,k.rowDiv,k.rowDays)},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!e.period.days,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.days=1,r.period.dows="",r.period.months="",r.period.dates="",r.period.years=0,r.period.yearDate=0,r.period.yearMonth=0,r.period.weeks=0,r.period.once="",this.onChange(r)}}),label:p.t("sch_periodDaily")})),M.createElement("div",{style:k.settingsDiv},this.getPeriodSettingsDaily(),e.period.days?this.getPeriodSettingsWeekdays():null)),M.createElement(j.Box,{component:"div",key:"weeks",sx:E.getStyle(this.props.theme,k.rowDiv,k.rowDows)},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!e.period.weeks,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.weeks=e.period.weeks?0:1,r.period.dows||="[0]",r.period.months="",r.period.dates="",r.period.years=0,r.period.yearDate=0,r.period.yearMonth=0,r.period.days=0,r.period.once="",this.onChange(r)}}),label:p.t("sch_periodWeekly")})),M.createElement(j.Box,{component:"div",style:k.settingsDiv},M.createElement("div",{style:k.settingsDiv},this.getPeriodSettingsWeekly()),M.createElement(j.Box,{component:"div",sx:E.getStyle(this.props.theme,k.settingsDiv,k.rowDowsDows)},this.state.schedule.period.weeks?this.getPeriodSettingsWeekdays():null))),M.createElement(j.Box,{component:"div",key:"months",sx:E.getStyle(this.props.theme,k.rowDiv,k.rowMonths)},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!e.period.months,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months=1,r.period.dows="",r.period.dates="",r.period.years=0,r.period.yearDate=0,r.period.yearMonth=0,r.period.weeks=0,r.period.days=0,r.period.once="",this.onChange(r)}}),label:p.t("sch_periodMonthly")})),M.createElement("div",{style:k.settingsDiv},this.getPeriodSettingsMonthly(),e.period.months?M.createElement(j.Box,null,M.createElement(j.Box,{component:"div",sx:E.getStyle(this.props.theme,k.settingsDiv,k.rowMonthsDates)},M.createElement(j.FormControlLabel,{control:M.createElement(j.Checkbox,{style:k.inputRadio,checked:!!e.period.dates,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months||=1;const s=[];for(let o=1;o<=31;o++)s.push(o);r.period.dates||=JSON.stringify(s),r.period.dows="",r.period.years=0,r.period.yearDate=0,r.period.yearMonth=0,r.period.weeks=0,r.period.days=0,r.period.once="",this.onChange(r)}}),label:p.t("sch_periodDates")})),M.createElement(j.Box,{component:"div",sx:E.getStyle(this.props.theme,k.settingsDiv,k.rowMonthsDates)},this.getPeriodSettingsDates())):null)),M.createElement(j.Box,{component:"div",key:"years",sx:E.getStyle(this.props.theme,k.rowDiv,k.rowYears)},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!e.period.years,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.years=1,r.period.yearDate=1,r.period.yearMonth=1,r.period.dows="",r.period.months=0,r.period.dates="",r.period.weeks=0,r.period.days=0,r.period.once="",this.onChange(r)}}),label:p.t("sch_periodYearly")})),M.createElement("div",{style:k.settingsDiv},M.createElement("div",{style:k.settingsDiv},this.getPeriodSettingsYearly()),!!e.period.years&&M.createElement("div",{style:k.settingsDiv},M.createElement("span",null,p.t("sch_on")),M.createElement(j.Input,{key:"input",value:this.state.schedule.period.yearDate,style:k.inputEvery,type:"number",inputProps:{min:1,max:31},onChange:r=>{const s=JSON.parse(JSON.stringify(this.state.schedule));s.period.yearDate=parseInt(r.target.value,10),s.period.yearDate<1&&(s.period.yearDate=31),s.period.yearDate>31&&(s.period.yearDate=1),this.onChange(s)}}),M.createElement(j.Select,{variant:"standard",value:e.period.yearMonth,onChange:r=>{const s=JSON.parse(JSON.stringify(this.state.schedule));s.period.yearMonth=r.target.value,this.onChange(s)}},M.createElement(j.MenuItem,{key:"every",value:0},p.t("sch_yearEveryMonth")),Ks.map((r,s)=>M.createElement(j.MenuItem,{key:r,value:s+1},p.t(r)))))))]}getPeriodSettingsMinutes(e){return M.createElement("div",{style:{display:"inline-block",marginTop:e?15:"inherit"}},M.createElement("label",{style:{marginLeft:4,marginRight:4}},p.t("sch_every")),M.createElement(j.Input,{value:this.state.schedule.time.interval,style:{...k.inputEvery,verticalAlign:"bottom"},type:"number",inputProps:{min:1},onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.time.interval=parseInt(t.target.value,10),this.onChange(r)}}),M.createElement(j.Select,{variant:"standard",value:this.state.schedule.time.mode,onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.time.mode=t.target.value,this.onChange(r)}},M.createElement(j.MenuItem,{value:Gn.minutes},p.t("sch_periodMinutes")),M.createElement(j.MenuItem,{value:Gn.hours},p.t("sch_periodHours"))))}getPeriodSettingsWeekdays(){const e=this.state.schedule,t=e.period.dows&&e.period.dows!=="[1, 2, 3, 4, 5]"&&e.period.dows!=="[0, 6]";return[M.createElement("div",{key:"workdays"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.dows==="[1, 2, 3, 4, 5]",onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.dows="[1, 2, 3, 4, 5]",r.period.days&&(r.period.days=1),this.onChange(r)}}),label:p.t("sch_periodWorkdays")})),M.createElement("div",{key:"weekend"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.dows==="[0, 6]",onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.dows="[0, 6]",r.period.days&&(r.period.days=1),this.onChange(r)}}),label:p.t("sch_periodWeekend")})),M.createElement("div",{key:"specific",style:{verticalAlign:"top"}},M.createElement(j.FormControlLabel,{style:{verticalAlign:"top"},control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!t,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.dows="[0, 1, 2, 3, 4, 5, 6]",r.period.days&&(r.period.days=1),this.onChange(r)}}),label:p.t("sch_periodWeekdays")}),t&&(e.period.days===1||e.period.weeks)&&M.createElement(j.FormGroup,{row:!0,style:{...k.inputGroup,width:150}},[1,2,3,4,5,6,0].map(r=>M.createElement(j.FormControlLabel,{key:`specific_${r}`,style:k.inputGroupElement,control:M.createElement(j.Checkbox,{style:k.inputSmallCheck,checked:e.period.dows.includes(r.toString()),onChange:s=>{const o=JSON.parse(JSON.stringify(this.state.schedule));let n;try{n=JSON.parse(o.period.dows)}catch{n=[]}s.target.checked&&!n.includes(r)?n.push(r):!s.target.checked&&n.includes(r)&&n.splice(n.indexOf(r),1),n.sort((a,c)=>a-c),o.period.dows=JSON.stringify(n),o.period.days&&(o.period.days=1),this.onChange(o)}}),label:p.t(Jn[r])}))))]}getPeriodSettingsDaily(){if(!this.state.schedule.period.days)return null;const e=this.state.schedule;return[M.createElement("div",{key:"every_day"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.days===1&&!e.period.dows,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.days=1,t.period.dows="",this.onChange(t)}}),label:p.t("sch_periodEveryDay")})),M.createElement("div",{key:"everyN_day"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.days>1,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.days=2,t.period.dows="",this.onChange(t)}}),label:p.t("sch_periodEvery")}),e.period.days>1&&[M.createElement(j.Input,{key:"input",value:this.state.schedule.period.days,style:k.inputEvery,type:"number",inputProps:{min:2},onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.days=parseInt(t.target.value,10),r.period.dows="",this.onChange(r)}}),M.createElement("span",{key:"span",style:{paddingRight:10}},p.t("sch_periodDay"))])]}getPeriodSettingsWeekly(){if(!this.state.schedule.period.weeks)return null;const e=this.state.schedule;return[M.createElement("div",{key:"radios",style:{display:"inline-block",verticalAlign:"top"}},M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.weeks===1,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.weeks=1,this.onChange(t)}}),label:p.t("sch_periodEveryWeek")})),M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.weeks>1,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.weeks=2,this.onChange(t)}}),label:p.t("sch_periodEvery")}),e.period.weeks>1&&[M.createElement(j.Input,{key:"input",value:this.state.schedule.period.weeks,style:k.inputEvery,type:"number",inputProps:{min:2},onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.weeks=parseInt(t.target.value,10),this.onChange(r)}}),M.createElement("span",{key:"text"},p.t("sch_periodWeek"))]))]}getPeriodSettingsDates(){if(!this.state.schedule.period.dates)return null;const e=this.state.schedule,t=[];for(let s=1;s<=31;s++)t.push(s);const r=JSON.parse(e.period.dates);return M.createElement(j.FormGroup,{row:!0,style:{...k.inputGroup,maxWidth:620}},M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:r.length===31,onChange:()=>{const s=JSON.parse(JSON.stringify(this.state.schedule)),o=[];for(let n=1;n<=31;n++)o.push(n);s.period.dates=JSON.stringify(o),this.onChange(s)}}),label:p.t("sch_all")}),M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:!r.length,onChange:()=>{const s=JSON.parse(JSON.stringify(this.state.schedule));s.period.dates="[]",this.onChange(s)}}),label:p.t("sch_no_one")}),r.length!==31&&!!r.length&&M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:!1,onChange:()=>{const s=JSON.parse(JSON.stringify(this.state.schedule)),o=[],n=JSON.parse(s.period.dates);for(let a=1;a<=31;a++)n.includes(a)||o.push(a);o.sort((a,c)=>a-c),s.period.dates=JSON.stringify(o),this.onChange(s)}}),label:p.t("sch_invert")}),M.createElement("div",null),t.map(s=>M.createElement(j.FormControlLabel,{key:`date_${s}`,style:s?k.inputDateDay:{...k.inputDateDay,opacity:0,cursor:"default",userSelect:"none",pointerEvents:"none"},control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:JSON.parse(e.period.dates).includes(s),onChange:o=>{const n=JSON.parse(JSON.stringify(this.state.schedule));let a;try{a=JSON.parse(n.period.dates)}catch{a=[]}o.target.checked&&!a.includes(s)?a.push(s):!o.target.checked&&a.includes(s)&&a.splice(a.indexOf(s),1),a.sort((c,l)=>c-l),n.period.dates=JSON.stringify(a),this.onChange(n)}}),label:s<10?[M.createElement("span",{key:"0",style:{opacity:0}},"0"),M.createElement("span",{key:"num"},s)]:s})))}getPeriodSettingsMonthly(){if(!this.state.schedule.period.months)return null;const e=this.state.schedule,t=typeof e.period.months=="string"?JSON.parse(e.period.months):[];return[M.createElement("div",{key:"every"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:typeof e.period.months=="number"&&e.period.months===1,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months=1,this.onChange(e)}}),label:p.t("sch_periodEveryMonth")})),M.createElement("div",{key:"everyN"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:typeof e.period.months=="number"&&e.period.months>1,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months=2,this.onChange(r)}}),label:p.t("sch_periodEvery")}),typeof e.period.months=="number"&&e.period.months>1&&[M.createElement(j.Input,{key:"input",value:e.period.months,style:k.inputEvery,type:"number",inputProps:{min:2},onChange:r=>{const s=JSON.parse(JSON.stringify(this.state.schedule));s.period.months=parseInt(r.target.value,10),s.period.months<1&&(s.period.months=1),this.onChange(s)}}),M.createElement("span",{key:"text"},p.t("sch_periodMonth"))]),M.createElement("div",{key:"specific",style:{verticalAlign:"top"}},M.createElement(j.FormControlLabel,{style:{verticalAlign:"top"},control:M.createElement(j.Radio,{style:k.inputRadio,checked:typeof e.period.months=="string",onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months="[1,2,3,4,5,6,7,8,9,10,11,12]",this.onChange(r)}}),label:p.t("sch_periodSpecificMonths")}),typeof e.period.months=="string"&&M.createElement(j.FormGroup,{row:!0,style:k.inputGroup},M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:t.length===12,onChange:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule)),s=[];for(let o=1;o<=12;o++)s.push(o);r.period.months=JSON.stringify(s),this.onChange(r)}}),label:p.t("sch_all")}),M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:!t.length,onChange:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months="[]",this.onChange(r)}}),label:p.t("sch_no_one")}),t.length!==12&&!!t.length&&M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:!1,onChange:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule)),s=[],o=JSON.parse(r.period.months);for(let n=1;n<=12;n++)o.includes(n)||s.push(n);s.sort((n,a)=>n-a),r.period.months=JSON.stringify(s),this.onChange(r)}}),label:p.t("sch_invert")}),M.createElement("div",null),Ks.map((r,s)=>M.createElement(j.FormControlLabel,{key:`month_${s}`,style:k.inputGroupElement,control:M.createElement(j.Checkbox,{style:k.inputSmallCheck,checked:typeof e.period.months=="string"?JSON.parse(e.period.months).includes(s+1):e.period.months===s,onChange:o=>{const n=JSON.parse(JSON.stringify(this.state.schedule));let a;try{a=JSON.parse(n.period.months)}catch{a=[]}o.target.checked&&!a.includes(s+1)?a.push(s+1):!o.target.checked&&a.includes(s+1)&&a.splice(a.indexOf(s+1),1),a.sort((c,l)=>c-l),n.period.months=JSON.stringify(a),this.onChange(n)}}),label:p.t(r)}))))]}getPeriodSettingsYearly(){if(!this.state.schedule.period.years)return null;const e=this.state.schedule;return[M.createElement("div",{key:"year"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.years===1,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.years=1,this.onChange(t)}}),label:p.t("sch_periodEveryYear")})),M.createElement("div",{key:"every"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.years>1,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.years=2,this.onChange(t)}}),label:p.t("sch_periodEvery")}),e.period.years>1&&[M.createElement(j.Input,{key:"input",value:this.state.schedule.period.years,style:k.inputEvery,type:"number",inputProps:{min:2},onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.years=parseInt(t.target.value,10),r.period.years<1&&(r.period.years=1),this.onChange(r)}}),M.createElement("span",{key:"text"},p.t("sch_periodYear"))])]}static now2string(e){const t=new Date;return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),e&&(t.setDate(t.getDate()+2),t.setMilliseconds(t.getMilliseconds()-1)),`${xt(t.getDate())}.${xt(t.getMonth()+1)}.${xt(t.getFullYear())}`}static string2date(e){let t=e.split(".");return t.length===1?(t=e.split("-"),new Date(parseInt(t[0],10),parseInt(t[1],10)-1,parseInt(t[2],10))):new Date(parseInt(t[2],10),parseInt(t[1],10)-1,parseInt(t[0],10))}getValidSettings(){const e=this.state.schedule;return M.createElement("div",{style:k.rowDiv},M.createElement("div",{style:{...k.modeDiv,verticalAlign:"middle"}},M.createElement("span",{style:{fontWeight:"bold",paddingRight:10}},p.t("sch_valid")),M.createElement("span",null,p.t("sch_validFrom"))),M.createElement("div",{style:k.settingsDiv},M.createElement(j.TextField,{variant:"standard",style:{...k.inputDate,marginRight:10},key:"exactTimeFrom",inputRef:this.refFrom,defaultValue:Hn(e.valid.from),type:"date",onChange:t=>{this.timerFrom&&clearTimeout(this.timerFrom),this.refFrom.current&&(this.refFrom.current.style.background="#ff000030"),this.timerFrom=setTimeout(r=>{this.timerFrom=null,this.refFrom.current&&(this.refFrom.current.style.background="");const s=JSON.parse(JSON.stringify(this.state.schedule)),o=fe.string2date(r);o.toString()!=="Invalid Date"&&(s.valid.from=`${xt(o.getDate())}.${xt(o.getMonth()+1)}.${o.getFullYear()}`,this.onChange(s))},1500,t.target.value)},slotProps:{inputLabel:{shrink:!0}},margin:"normal"}),M.createElement(j.FormControlLabel,{control:M.createElement(j.Checkbox,{style:k.inputRadio,checked:!!e.valid.to,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.valid.to=t.valid.to?"":fe.now2string(!0),this.onChange(t)}}),label:p.t("sch_validTo")}),!!e.valid.to&&M.createElement(j.TextField,{variant:"standard",inputRef:this.refTo,style:{...k.inputDate,marginRight:10},key:"exactTimeFrom",type:"date",defaultValue:Hn(e.valid.to),onChange:t=>{this.timerTo&&clearTimeout(this.timerTo),this.refTo.current&&(this.refTo.current.style.background="#ff000030"),this.timerTo=setTimeout(r=>{this.timerTo=null,this.refTo.current&&(this.refTo.current.style.background="");const s=JSON.parse(JSON.stringify(this.state.schedule)),o=fe.string2date(r);o.toString()!=="Invalid Date"&&(s.valid.to=`${xt(o.getDate())}.${xt(o.getMonth()+1)}.${o.getFullYear()}`,this.onChange(s))},1500,t.target.value)},slotProps:{inputLabel:{shrink:!0}},margin:"normal"})))}render(){return M.createElement("div",{style:{height:"calc(100% - 48px)",width:"100%",overflow:"hidden"}},M.createElement("div",null,this.state.desc),M.createElement("div",{style:k.scrollWindow},M.createElement("h5",null,p.t("sch_time")),this.getTimePeriodElements(),this.getTimeExactElements(),fe.getDivider(),M.createElement("h5",null,p.t("sch_period")),this.getPeriodModes(),!this.state.schedule.period.once&&fe.getDivider(),!this.state.schedule.period.once&&this.getValidSettings()))}}const qs={different:{opacity:.5},icon:{width:16,height:16,marginRight:8}};class $ke extends _.Component{wordDifferent;timeout=null;constructor(e){super(e),e.different&&(this.wordDifferent=e.t("ra___different__"));let t;Array.isArray(e.list)?t=e.list.filter(r=>(r==null?void 0:r._id)&&r.common).map(r=>{var s,o;return{name:E.getObjectNameFromObj(r,e.lang).replace("system.group.","").replace("system.user.","").replace("enum.rooms.","").replace("enum.functions.",""),value:r._id,icon:(s=r.common)==null?void 0:s.icon,color:(o=r.common)==null?void 0:o.color}}):t=Object.values(e.list).filter(r=>(r==null?void 0:r._id)&&r.common).map(r=>{var s,o;return{name:E.getObjectNameFromObj(r,e.lang).replace("system.group.","").replace("system.user.","").replace("enum.rooms.","").replace("enum.functions.",""),value:r._id,icon:(s=r.common)==null?void 0:s.icon,color:(o=r.common)==null?void 0:o.color}}),e.different&&e.value===e.different&&t.unshift({value:e.different,name:this.wordDifferent||""}),e.allowNone&&t.unshift({value:"",name:p.t("ra_none")}),this.state={list:t}}render(){this.props.allowNone&&!this.state.list.find(s=>s.value==="")?this.timeout=this.timeout||setTimeout(()=>{this.timeout=null;const s=JSON.parse(JSON.stringify(this.state.list));s.unshift({value:"",name:p.t("ra_none")}),this.setState({list:s})},100):!this.props.allowNone&&this.state.list.find(s=>s.value==="")&&(this.timeout=this.timeout||setTimeout(()=>{this.timeout=null;const s=JSON.parse(JSON.stringify(this.state.list)),o=this.state.list.findIndex(n=>n.value==="");s.splice(o,1),this.setState({list:s})},100));const e=this.state.list.find(s=>s.value===this.props.value||this.props.removePrefix&&s.value.replace(this.props.removePrefix,"")===this.props.value),t=this.props.value===this.props.different?{}:{color:(e==null?void 0:e.color)||void 0,backgroundColor:E.getInvertedColor((e==null?void 0:e.color)||"",this.props.themeType)};this.props.dense&&this.props.style&&Object.assign(t,this.props.style);const r=M.createElement(j.Select,{variant:"standard",disabled:this.props.disabled,value:this.props.value,slotProps:{input:this.props.inputProps},renderValue:()=>M.createElement("span",null,e!=null&&e.icon?M.createElement(Ue,{src:e==null?void 0:e.icon,style:qs.icon}):null,e==null?void 0:e.name),sx:{"&.MuiSelect-root":this.props.value===this.props.different?qs.different:{}},classes:{root:this.props.dense?this.props.className:""},style:t,onChange:s=>{if(this.props.different&&s.target.value!==this.props.different){let o=null;for(let n=0;n<this.state.list.length;n++)if(this.state.list[n].value===this.props.different){o=n;break}if(o!==null){const n=E.clone(this.state.list);n.splice(o,1),this.setState({list:n},()=>this.props.onChange(s.target.value));return}}this.props.onChange(this.props.removePrefix?s.target.value.replace(this.props.removePrefix,""):s.target.value)}},this.state.list.map(s=>M.createElement(j.MenuItem,{style:this.props.different&&s.value===this.props.different?qs.different:{color:s.color||void 0,backgroundColor:E.getInvertedColor(s.color||"",this.props.themeType)},key:s.value,value:s.value},s.icon?M.createElement(Ue,{src:s.icon,style:qs.icon}):null,s.name)));return this.props.dense?r:M.createElement(j.FormControl,{variant:"standard",fullWidth:!!this.props.fullWidth,style:this.props.style,className:this.props.className},M.createElement(j.InputLabel,null,this.props.label),r)}}class Pke extends _.Component{resizerRefTable;resizerActiveIndex;resizerActiveDiv;resizerCurrentWidths;widthFilled=!1;installTimeout=null;resizerMin=0;resizerMinNext=0;resizerPosition=0;resizerOldWidth=0;resizerOldWidthNext=0;constructor(e){super(e),this.resizerRefTable=M.createRef(),this.resizerActiveIndex=null,this.resizerActiveDiv=null,this.resizerCurrentWidths=[]}componentDidMount(){this.resizerInstall()}componentWillUnmount(){this.resizerUninstall()}resizerInstall(){if(this.resizerRefTable.current&&!this.resizerRefTable.current._installed){this.resizerRefTable.current._installed=!0;const e=this.resizerRefTable.current.querySelectorAll("th"),t=(window._localStorage||window.localStorage).getItem(`App.${this.props.name||"history"}.table`);if(this.widthFilled=!1,t)try{this.resizerCurrentWidths=JSON.parse(t),this.widthFilled=!0}catch{}if(this.widthFilled)if(this.resizerCurrentWidths.length!==e.length)this.resizerCurrentWidths=[],this.widthFilled=!1;else{const r=this.resizerRefTable.current.offsetWidth;let s=0;for(let o=0;o<this.resizerCurrentWidths.length;o++)if(window.isFinite(this.resizerCurrentWidths[o]))s+=this.resizerCurrentWidths[o];else{s=null;break}s!==null&&Math.abs(s-r)>20&&(this.resizerCurrentWidths=[],this.widthFilled=!1)}for(let r=0;r<e.length;r++)if(!this.widthFilled&&this.resizerCurrentWidths.push(e[r].offsetWidth),r<e.length-1){const s=window.document.createElement("div");s.dataset.index=r.toString(),s.onmousedown=this.resizerMouseDown,s.ondblclick=this.resizerReset,s.title=this.props.dblTitle||"Double click to reset table layout",s.className="resize-handle",e[r].appendChild(s)}this.widthFilled&&this.resizerApplyWidths()}else this.installTimeout=setTimeout(()=>{this.installTimeout=null,this.resizerInstall()},100)}resizerReset=()=>{for(let e=0;e<this.resizerCurrentWidths.length;e++)this.resizerCurrentWidths[e]=(this.props.initialWidths||[])[e]||"auto";(window._localStorage||window.localStorage).setItem(`App.${this.props.name||"history"}.table`,JSON.stringify(this.resizerCurrentWidths)),this.resizerApplyWidths()};resizerUninstall(){if(this.installTimeout&&clearTimeout(this.installTimeout),this.installTimeout=null,this.resizerRefTable.current&&this.resizerRefTable.current._installed){this.resizerRefTable.current._installed=!1;const e=this.resizerRefTable.current.querySelectorAll("th");for(let t=0;t<e.length;t++){const r=e[t].querySelector(".resize-handle");r&&(r.onmousedown=null,r.remove())}}}resizerApplyWidths(){const e=[];if(this.resizerCurrentWidths.length)for(let t=0;t<this.resizerCurrentWidths.length;t++)this.resizerCurrentWidths[t]?e.push(this.resizerCurrentWidths[t]!=="auto"?`${this.resizerCurrentWidths[t]}px`:"auto"):this.props.initialWidths&&this.props.initialWidths[t]?e.push(this.props.initialWidths[t]!=="auto"?`${this.props.initialWidths[t]}px`:"auto"):e.push("auto");else if(this.props.initialWidths)for(let t=0;t<this.props.initialWidths.length;t++)this.props.initialWidths[t]?e.push(this.props.initialWidths[t]!=="auto"?`${this.props.initialWidths[t]}px`:"auto"):e.push("auto");return this.resizerRefTable.current&&e.length&&(this.resizerRefTable.current.style.gridTemplateColumns=e.join(" ")),e.length?e.join(" "):void 0}resizerMouseMove=e=>{if(this.resizerActiveDiv&&this.resizerActiveIndex!==null){const t=this.resizerOldWidth+e.clientX-this.resizerPosition,r=this.resizerOldWidthNext-e.clientX+this.resizerPosition;(!this.resizerMin||t>this.resizerMin)&&(!this.resizerMinNext||r>this.resizerMinNext)&&(this.resizerCurrentWidths[this.resizerActiveIndex]=t,this.resizerCurrentWidths[this.resizerActiveIndex+1]=r,this.resizerApplyWidths())}};resizerMouseUp=()=>{(window._localStorage||window.localStorage).setItem(`App.${this.props.name||"history"}.table`,JSON.stringify(this.resizerCurrentWidths)),this.resizerActiveIndex=null,this.resizerActiveDiv=null,window.removeEventListener("mousemove",this.resizerMouseMove),window.removeEventListener("mouseup",this.resizerMouseUp)};resizerMouseDown=e=>{var t,r,s,o;if(this.resizerActiveIndex===null||this.resizerActiveIndex===void 0){console.log(`Mouse down ${(t=e.target)==null?void 0:t.dataset.index}`),this.resizerActiveIndex=parseInt(((r=e.target)==null?void 0:r.dataset.index)||"0",10),this.resizerActiveDiv=e.target,this.resizerMin=this.props.minWidths?this.props.minWidths[this.resizerActiveIndex]:0,this.resizerMinNext=this.props.minWidths?this.props.minWidths[this.resizerActiveIndex+1]:0,this.resizerPosition=e.clientX;let n;this.resizerCurrentWidths[this.resizerActiveIndex]==="auto"&&(n=(s=this.resizerRefTable.current)==null?void 0:s.querySelectorAll("th"),n&&(this.resizerCurrentWidths[this.resizerActiveIndex]=n[this.resizerActiveIndex].offsetWidth)),this.resizerCurrentWidths[this.resizerActiveIndex+1]==="auto"&&(n=n||((o=this.resizerRefTable.current)==null?void 0:o.querySelectorAll("th")),n&&(this.resizerCurrentWidths[this.resizerActiveIndex+1]=n[this.resizerActiveIndex+1].offsetWidth)),this.resizerOldWidth=this.resizerCurrentWidths[this.resizerActiveIndex],this.resizerOldWidthNext=this.resizerCurrentWidths[this.resizerActiveIndex+1],window.addEventListener("mousemove",this.resizerMouseMove),window.addEventListener("mouseup",this.resizerMouseUp)}};render(){if(this.props.ready===!1)return M.createElement(j.Skeleton,null);const e={gridTemplateColumns:this.resizerApplyWidths()};return M.createElement(j.Table,{stickyHeader:this.props.stickyHeader,size:this.props.size||"small",className:this.props.className,sx:this.props.sx,ref:this.resizerRefTable,style:{...this.props.style||void 0,...e}},this.props.children)}}const Vn={div:{borderRadius:3,padding:"0 3px",lineHeight:"20px",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center"},icon:{width:16,height:16,marginRight:8,verticalAlign:"middle"},text:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}};function Rke(i){var o,n,a,c,l,N,u,g,L;const e=i.value;let t;const r=i.removePrefix||"";if(typeof e=="string"){const d=i.list;if(d)if(Array.isArray(d)){const y=d.find(D=>(D==null?void 0:D._id)===r+e);y?t={name:E.getObjectNameFromObj(y,i.lang).replace("system.group.",""),value:y._id,icon:i.icon||((o=y.common)==null?void 0:o.icon),color:i.color||((n=y.common)==null?void 0:n.color)}:t={name:e,value:r+e}}else if(d[r+e]){const y=d[r+e];t={name:E.getObjectNameFromObj(y,i.lang).replace("system.group.",""),value:y._id,icon:i.icon||((a=y.common)==null?void 0:a.icon),color:i.color||((c=y.common)==null?void 0:c.color)}}else t={name:e,value:r+e,icon:i.icon,color:i.color};else t={name:e,value:r+e,icon:i.icon,color:i.color}}else if(!e||typeof e!="object")t={name:"",value:"",icon:i.icon,color:i.color};else{const d=e;t={name:E.getObjectNameFromObj(d,i.lang).replace("system.group.","").replace("system.user.","").replace("enum.rooms.","").replace("enum.functions.",""),value:d._id,icon:i.icon||((l=d.common)==null?void 0:l.icon),color:i.color||((N=d.common)==null?void 0:N.color)}}const s=t!=null&&t.color?{border:`1px solid ${E.invertColor(t==null?void 0:t.color)}`,color:E.getInvertedColor(t==null?void 0:t.color,i.themeType||"light",!0)||void 0,backgroundColor:t==null?void 0:t.color}:{};return M.createElement("div",{style:{...i.style||void 0,...Vn.div,...s||void 0},className:E.clsx(i.className,(u=i.moreClasses)==null?void 0:u.root),title:i.title||t.value},t!=null&&t.icon?M.createElement(Ue,{src:t==null?void 0:t.icon,className:(g=i.moreClasses)==null?void 0:g.icon,style:Vn.icon}):null,M.createElement("div",{style:Vn.text,className:(L=i.moreClasses)==null?void 0:L.text},t==null?void 0:t.name))}function Wke({themeName:i,toggleTheme:e,t,className:r,style:s,size:o}){return M.createElement("div",{className:r||void 0,style:s||void 0},M.createElement(j.Tooltip,{title:t("ra_Change color theme"),slotProps:{popper:{sx:{pointerEvents:"none"}}}},M.createElement(j.IconButton,{onClick:()=>e(),size:o||"medium"},i==="dark"&&M.createElement(O.Brightness4,{className:r}),i==="blue"&&M.createElement(O.Brightness5,{className:r}),i==="colored"&&M.createElement(O.Brightness6,{className:r}),i!=="dark"&&i!=="blue"&&i!=="colored"&&M.createElement(O.Brightness7,{className:r}))))}function an(){return(an=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i}).apply(this,arguments)}function sL(i,e){if(i==null)return{};var t,r,s={},o=Object.keys(i);for(r=0;r<o.length;r++)e.indexOf(t=o[r])>=0||(s[t]=i[t]);return s}function $a(i){var e=_.useRef(i),t=_.useRef(function(r){e.current&&e.current(r)});return e.current=i,t.current}var gs=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i<e?e:i},os=function(i){return"touches"in i},Pa=function(i){return i&&i.ownerDocument.defaultView||self},WN=function(i,e,t){var r=i.getBoundingClientRect(),s=os(e)?function(o,n){for(var a=0;a<o.length;a++)if(o[a].identifier===n)return o[a];return o[0]}(e.touches,t):e;return{left:gs((s.pageX-(r.left+Pa(i).pageXOffset))/r.width),top:gs((s.pageY-(r.top+Pa(i).pageYOffset))/r.height)}},BN=function(i){!os(i)&&i.preventDefault()},oL=M.memo(function(i){var e=i.onMove,t=i.onKey,r=sL(i,["onMove","onKey"]),s=_.useRef(null),o=$a(e),n=$a(t),a=_.useRef(null),c=_.useRef(!1),l=_.useMemo(function(){var L=function(D){BN(D),(os(D)?D.touches.length>0:D.buttons>0)&&s.current?o(WN(s.current,D,a.current)):y(!1)},d=function(){return y(!1)};function y(D){var z=c.current,A=Pa(s.current),C=D?A.addEventListener:A.removeEventListener;C(z?"touchmove":"mousemove",L),C(z?"touchend":"mouseup",d)}return[function(D){var z=D.nativeEvent,A=s.current;if(A&&(BN(z),!function(f,m){return m&&!os(f)}(z,c.current)&&A)){if(os(z)){c.current=!0;var C=z.changedTouches||[];C.length&&(a.current=C[0].identifier)}A.focus(),o(WN(A,z,a.current)),y(!0)}},function(D){var z=D.which||D.keyCode;z<37||z>40||(D.preventDefault(),n({left:z===39?.05:z===37?-.05:0,top:z===40?.05:z===38?-.05:0}))},y]},[n,o]),N=l[0],u=l[1],g=l[2];return _.useEffect(function(){return g},[g]),M.createElement("div",an({},r,{onTouchStart:N,onMouseDown:N,className:"react-colorful__interactive",ref:s,onKeyDown:u,tabIndex:0,role:"slider"}))}),cc=function(i){return i.filter(Boolean).join(" ")},nL=function(i){var e=i.color,t=i.left,r=i.top,s=r===void 0?.5:r,o=cc(["react-colorful__pointer",i.className]);return M.createElement("div",{className:o,style:{top:100*s+"%",left:100*t+"%"}},M.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},xe=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t},s5e=function(i){return c5e(Ra(i))},Ra=function(i){return i[0]==="#"&&(i=i.substring(1)),i.length<6?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?xe(parseInt(i[3]+i[3],16)/255,2):1}:{r:parseInt(i.substring(0,2),16),g:parseInt(i.substring(2,4),16),b:parseInt(i.substring(4,6),16),a:i.length===8?xe(parseInt(i.substring(6,8),16)/255,2):1}},o5e=function(i){return M5e(a5e(i))},n5e=function(i){var e=i.s,t=i.v,r=i.a,s=(200-e)*t/100;return{h:xe(i.h),s:xe(s>0&&s<200?e*t/100/(s<=100?s:200-s)*100:0),l:xe(s/2),a:xe(r,2)}},Wa=function(i){var e=n5e(i);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},a5e=function(i){var e=i.h,t=i.s,r=i.v,s=i.a;e=e/360*6,t/=100,r/=100;var o=Math.floor(e),n=r*(1-t),a=r*(1-(e-o)*t),c=r*(1-(1-e+o)*t),l=o%6;return{r:xe(255*[r,a,n,n,c,r][l]),g:xe(255*[c,r,r,a,n,n][l]),b:xe(255*[n,n,c,r,r,a][l]),a:xe(s,2)}},eo=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},M5e=function(i){var e=i.r,t=i.g,r=i.b,s=i.a,o=s<1?eo(xe(255*s)):"";return"#"+eo(e)+eo(t)+eo(r)+o},c5e=function(i){var e=i.r,t=i.g,r=i.b,s=i.a,o=Math.max(e,t,r),n=o-Math.min(e,t,r),a=n?o===e?(t-r)/n:o===t?2+(r-e)/n:4+(e-t)/n:0;return{h:xe(60*(a<0?a+6:a)),s:xe(o?n/o*100:0),v:xe(o/255*100),a:s}},u5e=M.memo(function(i){var e=i.hue,t=i.onChange,r=cc(["react-colorful__hue",i.className]);return M.createElement("div",{className:r},M.createElement(oL,{onMove:function(s){t({h:360*s.left})},onKey:function(s){t({h:gs(e+360*s.left,0,360)})},"aria-label":"Hue","aria-valuenow":xe(e),"aria-valuemax":"360","aria-valuemin":"0"},M.createElement(nL,{className:"react-colorful__hue-pointer",left:e/360,color:Wa({h:e,s:100,v:100,a:1})})))}),l5e=M.memo(function(i){var e=i.hsva,t=i.onChange,r={backgroundColor:Wa({h:e.h,s:100,v:100,a:1})};return M.createElement("div",{className:"react-colorful__saturation",style:r},M.createElement(oL,{onMove:function(s){t({s:100*s.left,v:100-100*s.top})},onKey:function(s){t({s:gs(e.s+100*s.left,0,100),v:gs(e.v-100*s.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+xe(e.s)+"%, Brightness "+xe(e.v)+"%"},M.createElement(nL,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:Wa(e)})))}),aL=function(i,e){if(i===e)return!0;for(var t in i)if(i[t]!==e[t])return!1;return!0},N5e=function(i,e){return i.toLowerCase()===e.toLowerCase()||aL(Ra(i),Ra(e))};function g5e(i,e,t){var r=$a(t),s=_.useState(function(){return i.toHsva(e)}),o=s[0],n=s[1],a=_.useRef({color:e,hsva:o});_.useEffect(function(){if(!i.equal(e,a.current.color)){var l=i.toHsva(e);a.current={hsva:l,color:e},n(l)}},[e,i]),_.useEffect(function(){var l;aL(o,a.current.hsva)||i.equal(l=i.fromHsva(o),a.current.color)||(a.current={hsva:o,color:l},r(l))},[o,i,r]);var c=_.useCallback(function(l){n(function(N){return Object.assign({},N,l)})},[]);return[o,c]}var L5e=typeof window<"u"?_.useLayoutEffect:_.useEffect,Ba=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},FN=new Map,j5e=function(i){L5e(function(){var e=i.current?i.current.ownerDocument:document;if(e!==void 0&&!FN.has(e)){var t=e.createElement("style");t.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,FN.set(e,t);var r=Ba();r&&t.setAttribute("nonce",r),e.head.appendChild(t)}},[])},d5e=function(i){var e=i.className,t=i.colorModel,r=i.color,s=r===void 0?t.defaultColor:r,o=i.onChange,n=sL(i,["className","colorModel","color","onChange"]),a=_.useRef(null);j5e(a);var c=g5e(t,s,o),l=c[0],N=c[1],u=cc(["react-colorful",e]);return M.createElement("div",an({},n,{ref:a,className:u}),M.createElement(l5e,{hsva:l,onChange:N}),M.createElement(u5e,{hue:l.h,onChange:N,className:"react-colorful__last-control"}))},y5e={defaultColor:"000",toHsva:s5e,fromHsva:function(i){return o5e({h:i.h,s:i.s,v:i.v,a:1})},equal:N5e},T5e=function(i){return M.createElement(d5e,an({},i,{colorModel:y5e}))};class D5e extends _.Component{dialogName;filters;filterFunc;constructor(e){super(e),this.dialogName=this.props.dialogName||"default",this.dialogName=`SelectID.${this.dialogName}`;const t=(window._localStorage||window.localStorage).getItem(this.dialogName)||"{}";try{this.filters=JSON.parse(t)}catch{this.filters={}}e.filters&&(this.filters={...this.filters,...e.filters||{}});let r=this.props.selected||[];if(Array.isArray(r)||(r=[r]),r=r.filter(s=>s),e.filterFunc)if(typeof e.filterFunc=="string")try{this.filterFunc=new Function("obj",e.filterFunc)}catch{console.error(`Cannot parse filter function: "obj => ${e.filterFunc}"`),this.filterFunc=void 0}else this.filterFunc=e.filterFunc;this.state={selected:r,name:"",selectionBlocked:!1}}handleCancel(){this.props.onClose()}handleOk(){this.props.onOk(this.props.multiSelect?this.state.selected:this.state.selected[0]||"",this.state.name),this.props.onClose()}render(){let e;return this.state.name||this.state.selected.length?this.state.selected.length===1?e=[M.createElement("span",{key:"selected"},p.t("ra_Selected")," "),M.createElement("span",{key:"id",style:{fontWeight:"bold",fontStyle:"italic"}},(this.state.name||this.state.selected[0])+(this.state.name?` [${this.state.selected[0]}]`:""))]:e=[M.createElement("span",{key:"selected"},p.t("ra_Selected")," "),M.createElement("span",{key:"id",style:{fontWeight:"bold",fontStyle:"italic"}},p.t("%s items",this.state.selected.length.toString()))]:e=this.props.title||p.t("ra_Please select object ID..."),M.createElement(j.Dialog,{onClose:()=>{},maxWidth:!1,style:{zIndex:this.props.zIndex||void 0},sx:{"& .MuiDialog-paper":{height:"95%",p:"4px",width:"100%",maxWidth:"100%",maxHeight:"calc(100% - 16px)"}},fullWidth:!0,open:!0,"aria-labelledby":"ar_dialog_selectid_title"},M.createElement(j.DialogTitle,{id:"ar_dialog_selectid_title",style:{whiteSpace:"nowrap",width:"calc(100% - 72px)",overflow:"hidden",display:"inline-block",textOverflow:"ellipsis"}},e),M.createElement(j.DialogContent,{style:{height:"100%",overflow:"hidden",padding:"8px 4px"}},M.createElement(r5e,{foldersFirst:this.props.foldersFirst,imagePrefix:this.props.imagePrefix||this.props.prefix,dateFormat:this.props.dateFormat,defaultFilters:this.filters,dialogName:this.dialogName,isFloatComma:this.props.isFloatComma,showExpertButton:this.props.showExpertButton!==void 0?this.props.showExpertButton:!0,expertMode:this.props.expertMode,columns:this.props.columns||["name","type","role","room","func","val"],types:this.props.types?Array.isArray(this.props.types)?this.props.types:[this.props.types]:["state"],root:this.props.root,t:p.t,lang:this.props.lang||p.getLanguage(),socket:this.props.socket,selected:this.state.selected,multiSelect:this.props.multiSelect,notEditable:this.props.notEditable===void 0?!0:this.props.notEditable,themeName:this.props.themeName,themeType:this.props.themeType,theme:this.props.theme,customFilter:this.props.customFilter,allowNonObjects:this.props.allowNonObjects,onFilterChanged:t=>{this.filters=t,(window._localStorage||window.localStorage).setItem(this.dialogName,JSON.stringify(t))},onSelect:async(t,r,s)=>{let o;if(Array.isArray(t)?o=t:o=[t],JSON.stringify(o)!==JSON.stringify(this.state.selected)){let n=!0;if(this.props.onSelectConfirm){const a={};for(const c of o)try{a[c]=await this.props.socket.getObject(c)}catch{}n=await this.props.onSelectConfirm(o,a)}this.setState({selected:o,name:r,selectionBlocked:!n},()=>s&&this.handleOk())}else s&&this.handleOk()},filterFunc:this.filterFunc,title:"",classes:{}})),M.createElement(j.DialogActions,null,M.createElement(j.Button,{id:`ar_dialog_selectid_ok_${this.props.dialogName||""}`,variant:"contained",onClick:()=>this.handleOk(),startIcon:M.createElement(O.Check,null),disabled:!this.state.selected.length||this.state.selectionBlocked,color:"primary"},this.props.ok||p.t("ra_Ok")),M.createElement(j.Button,{id:`ar_dialog_selectid_cancel_${this.props.dialogName||""}`,color:"grey",variant:"contained",onClick:()=>this.handleCancel(),startIcon:M.createElement(O.Cancel,null)},this.props.cancel||p.t("ra_Cancel"))))}}function Xt(i,e,t){if(typeof e=="string"&&(e=e.split(".")),!i)return null;if(e.length===1)return t&&t[i[e[0]]]?t[i[e[0]]]:i[e[0]];const r=e.shift();return Xt(i[r],e)}function ML(i,e,t){if(typeof e=="string"&&(e=e.split(".")),e.length===1)return i[e[0]]=t;const r=e.shift();return(i[r]===null||i[r]===void 0)&&(i[r]={}),ML(i[r],e,t)}const J={tableContainer:{width:"100%",height:"100%",overflow:"auto"},table:{width:"100%",minWidth:800,maxWidth:1920},cell:{paddingTop:0,paddingBottom:0,paddingLeft:4,paddingRight:4},rowMainWithChildren:{},rowMainWithoutChildren:{},rowNoEdit:{opacity:.3},cellExpand:{width:30},cellButton:{width:30},cellHeader:{fontWeight:"bold",background:i=>(i.palette.mode==="dark","#888"),color:i=>i.palette.mode==="dark"?"#EEE":"#111",height:48,wordBreak:"break-word",whiteSpace:"pre"},width_name_nicknames:{maxWidth:150},width_ioType:{maxWidth:100},width_type:{maxWidth:100},width_displayTraits:{maxWidth:100},width_roomHint:{maxWidth:100},rowSecondary:{fontStyle:"italic"},cellSecondary:{fontSize:10},visuallyHidden:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1},fieldEditWithButton:{width:"calc(100% - 33px)",display:"inline-block"},fieldEdit:{width:"100%",display:"inline-block",lineHeight:"50px",verticalAlign:"middle"},fieldButton:{width:30,display:"inline-block"},colorDialog:{overflow:"hidden",padding:15},subText:{fontSize:10,fontStyle:"italic"},glow:{animation:"glow 0.2s 2 alternate"}};function JN(i,e,t,r){const s=Xt(i,t,r)||"",o=Xt(e,t,r)||"";return o<s?-1:o>s?1:0}function h5e(i,e,t){return i==="desc"?(r,s)=>JN(r,s,e,t):(r,s)=>-JN(r,s,e,t)}function p5e(i,e){const t=i.map((r,s)=>({e:r,i:s}));return t.sort((r,s)=>{const o=e(r.e,s.e);return o||r.i-s.i}),t.map(r=>r.e)}class Fa extends _.Component{selectCallback=null;updateTimeout=null;constructor(e){super(e);let t=(window._localStorage||window.localStorage).getItem(this.props.name||"iob-table")||"[]";try{t=JSON.parse(t)||[]}catch{t=[]}Array.isArray(t)||(t=[]),this.state={opened:t,editMode:!1,deleteMode:!1,editData:null,order:"asc",update:null,orderBy:this.props.columns[0].field,showSelectColor:!1}}static getDerivedStateFromProps(e,t){if(e.glowOnChange){const r=[];let s=0;return e.data&&t.data&&e.data.forEach(o=>{var a;s++;const n=(a=t.data)==null?void 0:a.find(c=>c.id===o.id);n?JSON.stringify(n)!==JSON.stringify(o)&&r.push(o.id):r.push(o.id)}),r.length&&r.length!==s?{data:e.data,update:r}:{data:e.data}}return{data:e.data}}renderCellEdit(e,t){let r=Xt(e,t.field);return Array.isArray(r)&&(r=r[0]),t.lookup?this.renderCellEditSelect(t,r):t.editComponent?this.renderCellEditCustom(t,r,e):t.type==="boolean"||!t.type&&typeof r=="boolean"?this.renderCellEditBoolean(t,r):t.type==="color"?this.renderCellEditColor(t,r):t.type==="oid"?this.renderCellEditObjectID(t,r):t.type==="numeric"?this.renderCellEditNumber(t,r):this.renderCellEditString(t,r)}onChange(e,t,r){const s=this.state.editData?{...this.state.editData}:{};r===t?delete s[e.field]:s[e.field]=r,this.setState({editData:s})}renderCellEditSelect(e,t){return M.createElement(j.Select,{variant:"standard",onChange:r=>this.onChange(e,t,r.target.value),value:this.state.editData&&this.state.editData[e.field]||t},e.lookup&&Object.keys(e.lookup).map((r,s)=>{var o;return M.createElement(j.MenuItem,{key:s,value:r},(o=e.lookup)==null?void 0:o[r])}))}renderCellEditString(e,t){return M.createElement(j.TextField,{variant:"standard",style:J.fieldEdit,fullWidth:!0,value:this.state.editData&&this.state.editData[e.field]!==void 0?this.state.editData[e.field]:t,onChange:r=>this.onChange(e,t,r.target.value)})}renderCellEditNumber(e,t){return M.createElement(j.TextField,{variant:"standard",style:J.fieldEdit,type:"number",fullWidth:!0,value:this.state.editData&&this.state.editData[e.field]!==void 0?this.state.editData[e.field]:t,onChange:r=>this.onChange(e,t,r.target.value)})}renderCellEditCustom(e,t,r){const s=e.editComponent;return this.state.editData&&this.state.editData[e.field]!==void 0&&(t=this.state.editData[e.field],r=JSON.parse(JSON.stringify(r)),r[e.field]=t),s?M.createElement(s,{value:t,rowData:r,onChange:o=>this.onChange(e,t,o)}):null}renderCellEditBoolean(e,t){return M.createElement(j.Checkbox,{checked:this.state.editData&&this.state.editData[e.field]!==void 0?!!this.state.editData[e.field]:!!t,onChange:r=>this.onChange(e,!!t,r.target.checked),inputProps:{"aria-label":"checkbox"}})}renderSelectColorDialog(){return M.createElement(j.Dialog,{sx:{"& .MuiPaper-root":J.root,"& .MuiPaper-paper":J.paper},onClose:()=>{this.selectCallback=null,this.setState({showSelectColor:!1})},open:this.state.showSelectColor},M.createElement(T5e,{color:this.state.selectIdValue,onChange:e=>this.setState({selectIdValue:e},()=>{this.selectCallback&&this.selectCallback(e)})}))}renderCellEditColor(e,t){const r=this.state.editData&&this.state.editData[e.field]!==void 0?this.state.editData[e.field]:t;return M.createElement("div",{style:J.fieldEdit},M.createElement(j.TextField,{variant:"standard",fullWidth:!0,style:J.fieldEditWithButton,value:r,inputProps:{style:{backgroundColor:r,color:E.isUseBright(r)?"#FFF":"#000"}},onChange:s=>this.onChange(e,!!t,s.target.value)}),M.createElement(j.IconButton,{style:J.fieldButton,onClick:()=>{this.selectCallback=s=>this.onChange(e,t,s),this.setState({showSelectColor:!0,selectIdValue:t})},size:"large"},M.createElement(O.Colorize,null)))}renderSelectIdDialog(){return this.state.showSelectId&&this.props.socket?M.createElement(D5e,{key:"tableSelect",imagePrefix:"../..",dialogName:this.props.adapterName,themeType:this.props.themeType,theme:this.props.theme,socket:this.props.socket,selected:this.state.selectIdValue,onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{this.setState({showSelectId:!1,selectIdValue:null});const t=Array.isArray(e)?e[0]:e;t&&this.selectCallback&&(this.selectCallback&&this.selectCallback(t),this.selectCallback=null)}}):null}renderCellEditObjectID(e,t){return M.createElement("div",{style:J.fieldEdit},M.createElement(j.TextField,{variant:"standard",fullWidth:!0,style:J.fieldEditWithButton,value:this.state.editData&&this.state.editData[e.field]!==void 0?this.state.editData[e.field]:t,onChange:r=>this.onChange(e,t,r.target.value)}),M.createElement(j.IconButton,{style:J.fieldButton,onClick:()=>{this.selectCallback=r=>this.onChange(e,t,r),this.setState({showSelectId:!0,selectIdValue:t})},size:"large"},M.createElement(O.ViewHeadline,null)))}static renderCellNonEdit(e,t){let r=Xt(e,t.field,t.lookup);return Array.isArray(r)&&(r=r[0]),t.type==="boolean"?M.createElement(j.Checkbox,{checked:!!r,disabled:!0,inputProps:{"aria-label":"checkbox"}}):r}renderCell(e,t,r,s){return this.state.editMode===s&&t.editable!=="never"&&t.editable!==!1?M.createElement(j.TableCell,{key:t.field,style:{...J.cell,...r?J.cellSecondary:void 0,...t.cellStyle},component:"th"},this.renderCellEdit(e,t)):M.createElement(j.TableCell,{key:t.field,style:{...J.cell,...r?J.cellSecondary:void 0,...t.cellStyle},component:"th"},Fa.renderCellNonEdit(e,t))}static renderCellWithSubField(e,t){const r=Xt(e,t.field,t.lookup);if(t.subField){const s=Xt(e,t.subField,t.subLookup);return M.createElement("div",null,M.createElement("div",{style:J.mainText},r),M.createElement("div",{style:{...J.subText,...t.subStyle||void 0}},s))}return M.createElement("div",null,M.createElement("div",{style:J.mainText},r))}renderLine(e,t){const r=this.props.levelShift===void 0?24:this.props.levelShift;t=t||0;const s=this.props.data.indexOf(e);if(!e||!t&&e.parentId||t&&!e.parentId)return null;const o=this.state.opened.includes(e.id),n=this.props.data.filter(c=>c.parentId===e.id),a=M.createElement(j.TableRow,{key:e.id,className:`table-row-${(e.id||"").toString().replace(/[.$]/g,"_")}`,style:{...this.state.update&&this.state.update.includes(e.id)&&J.glow||void 0,...J.row,...t?J.rowSecondary:void 0,...!t&&n.length?J.rowMainWithChildren:void 0,...!t&&!n.length?J.rowMainWithoutChildren:void 0,...this.state.editMode!==!1&&this.state.editMode!==s?J.rowNoEdit:void 0,...this.state.deleteMode!==!1&&this.state.deleteMode!==s?J.rowNoEdit:void 0}},M.createElement(j.TableCell,{style:{...J.cell,...J.cellExpand,...t?J.cellSecondary:void 0}},n.length?M.createElement(j.IconButton,{onClick:()=>{const c=[...this.state.opened],l=c.indexOf(e.id);l===-1?(c.push(e.id),c.sort()):c.splice(l,1),(window._localStorage||window.localStorage).setItem(this.props.name||"iob-table",JSON.stringify(c)),this.setState({opened:c})},size:"small"},o?M.createElement(O.ExpandMore,null):M.createElement(O.NavigateNext,null)):null),M.createElement(j.TableCell,{scope:"row",style:{...J.cell,...t?J.cellSecondary:void 0,...this.props.columns[0].cellStyle,paddingLeft:r*t}},this.props.columns[0].subField?Fa.renderCellWithSubField(e,this.props.columns[0]):Xt(e,this.props.columns[0].field,this.props.columns[0].lookup)),this.props.columns.map((c,l)=>!l&&!c.hidden?null:this.renderCell(e,c,t,s)),this.props.onUpdate?M.createElement(j.TableCell,{style:{...J.cell,...J.cellButton}},this.state.editMode===s||this.state.deleteMode===s?M.createElement(j.IconButton,{disabled:this.state.editMode!==!1&&(!this.state.editData||!Object.keys(this.state.editData).length),onClick:()=>{if(this.state.editMode!==!1){const c=JSON.parse(JSON.stringify(e));this.state.editData&&Object.keys(this.state.editData).forEach(l=>{var N;return ML(c,l,(N=this.state.editData)==null?void 0:N[l])}),this.setState({editMode:!1},()=>this.props.onUpdate&&this.props.onUpdate(c,e))}else this.setState({deleteMode:!1},()=>this.props.onDelete&&this.props.onDelete(e))},size:"large"},M.createElement(O.Check,null)):M.createElement(j.IconButton,{disabled:this.state.editMode!==!1,onClick:()=>this.setState({editMode:s,editData:null}),size:"large"},M.createElement(O.Edit,null))):null,this.props.onDelete&&!this.props.onUpdate?M.createElement(j.TableCell,{style:{...J.cell,...J.cellButton}},this.state.deleteMode===s?M.createElement(j.IconButton,{disabled:this.state.editMode!==!1&&(!this.state.editData||!Object.keys(this.state.editData).length),onClick:()=>this.setState({deleteMode:!1},()=>this.props.onDelete&&this.props.onDelete(e)),size:"large"},M.createElement(O.Check,null)):null):null,this.props.onUpdate||this.props.onDelete?M.createElement(j.TableCell,{style:{...J.cell,...J.cellButton}},this.state.editMode===s||this.state.deleteMode===s?M.createElement(j.IconButton,{onClick:()=>this.setState({editMode:!1,deleteMode:!1}),size:"large"},M.createElement(O.Close,null)):this.props.onDelete?M.createElement(j.IconButton,{disabled:this.state.deleteMode!==!1,onClick:()=>this.setState({deleteMode:s}),size:"large"},M.createElement(O.Delete,null)):null):null);if(!t&&o){const c=n.map(l=>this.renderLine(l,t+1));return c.unshift(a),c}return a}handleRequestSort(e){const t=this.state.orderBy===e&&this.state.order==="asc";this.setState({order:t?"desc":"asc",orderBy:e})}renderHead(){return M.createElement(j.TableHead,null,M.createElement(j.TableRow,{key:"headerRow"},M.createElement(j.TableCell,{component:"th",sx:E.getStyle(this.props.theme,J.cell,J.cellHeader,J.cellExpand)}),M.createElement(j.TableCell,{component:"th",sx:E.getStyle(this.props.theme,J.cell,J.cellHeader,J[`width_${this.props.columns[0].field.replace(/\./g,"_")}`]),style:this.props.columns[0].headerStyle||this.props.columns[0].cellStyle,sortDirection:this.props.noSort?!1:this.state.orderBy===this.props.columns[0].field?this.state.order:!1},this.props.noSort?null:M.createElement(j.TableSortLabel,{active:this.state.orderBy===this.props.columns[0].field,direction:this.state.orderBy===this.props.columns[0].field?this.state.order:"asc",onClick:()=>this.handleRequestSort(this.props.columns[0].field)},this.props.columns[0].title||this.props.columns[0].field,this.state.orderBy===this.props.columns[0].field?M.createElement("span",{style:J.visuallyHidden},this.state.order==="desc"?"sorted descending":"sorted ascending"):null)),this.props.columns.map((e,t)=>!t&&!e.hidden?null:M.createElement(j.TableCell,{key:e.field,sx:E.getStyle(this.props.theme,J.cell,J.cellHeader,J[`width_${e.field.replace(/\./g,"_")}`]),style:e.headerStyle||e.cellStyle,component:"th"},this.props.noSort?null:M.createElement(j.TableSortLabel,{active:this.state.orderBy===e.field,direction:this.state.orderBy===e.field?this.state.order:"asc",onClick:()=>this.handleRequestSort(e.field)},e.title||e.field,this.state.orderBy===e.field?M.createElement("span",{style:J.visuallyHidden},this.state.order==="desc"?"sorted descending":"sorted ascending"):null))),this.props.onUpdate?M.createElement(j.TableCell,{component:"th",sx:E.getStyle(this.props.theme,J.cell,J.cellHeader,J.cellButton)},this.props.noAdd?null:M.createElement(j.Fab,{color:"primary",size:"small",disabled:this.state.editMode!==!1,onClick:()=>this.props.onUpdate&&this.props.onUpdate(!0)},M.createElement(O.Add,null))):null,this.props.onDelete||this.props.onUpdate?M.createElement(j.TableCell,{component:"th",sx:E.getStyle(this.props.theme,J.cell,J.cellHeader,J.cellButton)}):null))}render(){const e=this.props.columns.find(t=>t.field===this.state.orderBy);if(e){const t=e.lookup,r=p5e(this.props.data,h5e(this.state.order,this.state.orderBy,t));return this.state.update&&this.state.update.length&&(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=null,this.setState({update:null})},500)),M.createElement("div",{style:J.tableContainer,className:this.props.className},M.createElement(j.Table,{style:J.table,"aria-label":"simple table",size:"small",stickyHeader:!0},this.renderHead(),M.createElement(j.TableBody,null,r.map(s=>this.renderLine(s)))),this.renderSelectIdDialog(),this.renderSelectColorDialog())}return null}}/*!
487
+ `),M.createElement(H3e,null,this.getToolbar()),M.createElement(G3e,null,this.renderHeader(),M.createElement(j.Box,{style:I.tableDiv,ref:this.tableRef,onKeyDown:r=>this.navigateKeyPress(r)},t)),this.renderContextMenu(),this.renderAliasMenu(),this.renderToast(),this.renderColumnsEditCustomDialog(),this.renderColumnsSelectorDialog(),this.renderCustomDialog(),this.renderEditValueDialog(),this.renderEditObjectDialog(),this.renderViewObjectFileDialog(),this.renderAliasEditorDialog(),this.renderEditRoleDialog(),this.renderEnumDialog(),this.renderErrorDialog(),this.renderExportDialog(),this.renderRenameDialog(),this.state.modalNewObj&&this.props.modalNewObject&&this.props.modalNewObject(this),this.state.modalEditOfAccess&&this.state.modalEditOfAccessObjData&&this.props.modalEditOfAccessControl&&this.props.modalEditOfAccessControl(this,this.state.modalEditOfAccessObjData))}}const r5e=sn()(Tt);class Uke extends M.Component{refTypo;height;width;constructor(e){super(e),this.state={closed:this.props.storeId?window.localStorage.getItem(this.props.storeId)==="true":!1},this.height=0,this.width=0,this.refTypo=M.createRef()}componentDidMount(){this.detectHeight()}onClick(){this.props.storeId&&this.props.closed===void 0&&(this.state.closed?window.localStorage.removeItem(this.props.storeId):window.localStorage.setItem(this.props.storeId,"true")),this.props.closed===void 0?this.setState({closed:!this.state.closed},()=>{this.props.onClose&&this.props.onClose(this.state.closed)}):this.props.onClose&&this.props.onClose(!this.props.closed)}detectHeight(){const e=this.props.closed!==void 0?this.props.closed:this.state.closed;this.props.closeable&&!e&&this.refTypo.current&&window.requestAnimationFrame(()=>{(this.props.closed!==void 0?this.props.closed:this.state.closed)||this.refTypo.current&&(!this.height||this.width!==this.refTypo.current.clientWidth)&&(this.height=this.refTypo.current.clientHeight,this.width=this.refTypo.current.clientWidth,this.forceUpdate())})}componentDidUpdate(){this.detectHeight()}render(){const e=this.props.closed!==void 0?this.props.closed:this.state.closed,t=e?O.Visibility:O.Close;return M.createElement(j.Box,{className:"iom-info-box",style:{whiteSpace:"preserve",display:"flex",gap:8,alignItems:e||this.props.iconPosition==="top"?"flex-start":"center",borderWidth:1,borderStyle:"solid",padding:4,borderRadius:5,marginBottom:8,maxWidth:"100%",transition:"height 0.5s",height:this.props.closeable?e?30:this.height||void 0:void 0,overflow:this.props.closeable?"hidden":void 0,position:"relative",...this.props.style},sx:{borderColor:r=>this.props.type==="ok"?r.palette.info.main:r.palette[this.props.type].main}},this.props.type==="ok"?M.createElement(O.Check,{style:{color:"#0F0"}}):this.props.type==="info"?M.createElement(O.Info,{color:"primary"}):M.createElement(O.Warning,{color:this.props.type}),M.createElement(j.Typography,{ref:this.refTypo},this.props.children),this.props.closeable?M.createElement(t,{sx:{color:r=>r.palette.mode==="dark"?"lightgray":"gray",cursor:"pointer",position:"absolute",top:4,right:4},onClick:()=>this.onClick()}):null,this.props.closeable?M.createElement("div",{style:{width:22}}):null,e?M.createElement(j.Box,{component:"div",sx:r=>{const s=r.palette[this.props.type==="ok"?"info":this.props.type].main;return{background:`linear-gradient(${s}00 0%, ${s}10 60%, ${s}90 100%)`}},style:{bottom:0,position:"absolute",left:0,right:0,height:10}}):null)}}const k={hr:{border:0,borderTop:"1px solid gray"},scrollWindow:{width:"100%",overflow:"auto",height:"calc(100% - 22px)"},rowDiv:{width:"100%"},modeDiv:{width:200,display:"inline-block",verticalAlign:"top"},settingsDiv:{display:"inline-block",verticalAlign:"top"},inputTime:{width:90,marginTop:0,marginLeft:5},inputDate:{width:140,marginTop:0,marginLeft:5},inputEvery:{width:40,marginLeft:5,marginRight:5},inputRadio:{padding:"4px 12px",verticalAlign:"top"},inputGroup:{maxWidth:400,display:"inline-block"},inputGroupElement:{width:120},inputDateDay:{width:60},inputDateDayCheck:{padding:4},inputSmallCheck:{padding:0},rowOnce:{},rowDays:i=>({background:i.palette.mode!=="dark"?"#ddeaff":"#4b5057"}),rowDows:i=>({background:i.palette.mode!=="dark"?"#DDFFDD":"#52646c"}),rowMonths:i=>({background:i.palette.mode!=="dark"?"#DDFFFF":"#1f5557"}),rowMonthsDates:i=>({background:i.palette.mode!=="dark"?"#EEFFFF":"#3c5737",maxWidth:600}),rowYears:i=>({background:i.palette.mode!=="dark"?"#fbffdd":"#574b33"}),rowDowsDows:i=>({background:i.palette.mode!=="dark"?"#EEFFEE":"#3d4c54",pl:"10px",pb:"10px"})},Jn=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ks=["January","February","March","April","May","June","July","August","September","October","November","December"],Gn={minutes:"minutes",hours:"hours"},Fr=["sunrise","sunriseEnd","goldenHourEnd","solarNoon","goldenHour","sunsetStart","sunset","dusk","nauticalDusk","night","nightEnd","nauticalDawn","dawn","nadir"];function xt(i){return i<10?`0${i}`:`${i}`}const RN={time:{exactTime:!1,start:"00:00",end:"23:59",mode:"hours",interval:1},period:{once:"",days:1,dows:"",dates:"",weeks:0,months:"",years:0,yearMonth:0,yearDate:0},valid:{from:"",to:""}};function Hn(i){const e=i.split(".");return e.length===3?`${e[2]}-${e[1]}-${e[0]}`:""}class fe extends _.Component{refFrom;refTo;refOnce;timerOnce=null;timerFrom=null;timerTo=null;constructor(e){super(e);let t;if(this.props.schedule&&typeof this.props.schedule=="string"&&this.props.schedule[0]==="{")try{t=JSON.parse(this.props.schedule)}catch{}else typeof this.props.schedule=="object"&&(t=this.props.schedule);(!t||!Object.keys(t).length)&&(setTimeout(()=>this.onChange(this.state.schedule,!0),200),t=RN),t={...RN,...t},t.valid.from||=fe.now2string(),this.refFrom=M.createRef(),this.refTo=M.createRef(),this.refOnce=M.createRef(),this.state={schedule:t,desc:fe.state2text(t)},JSON.stringify(t)!==this.props.schedule&&setTimeout(()=>{var r,s;return(s=(r=this.props).onChange)==null?void 0:s.call(r,JSON.stringify(t))},100)}onChange(e,t){var s,o;const r=JSON.stringify(e)!==JSON.stringify(this.state.schedule);if(t||r){r&&this.setState({schedule:e,desc:fe.state2text(e)});const n=JSON.parse(JSON.stringify(e));if(n.period.once){const a=n.period.once;delete n.period,n.period={once:a},delete n.valid}else if(n.period.days){const a=n.period.days,c=n.period.dows;delete n.period,n.period={days:a},c&&c!=="[]"&&(n.period.dows=c)}else if(n.period.weeks){const a=n.period.weeks,c=n.period.dows;delete n.period,n.period={weeks:a},c&&c!=="[]"&&(n.period.dows=c)}else if(n.period.months){const a=n.period.months,c=n.period.dates;delete n.period,n.period={months:a},c&&c!=="[]"&&(n.period.dates=c)}else if(n.period.years){const a=n.period.years,c=n.period.yearMonth,l=n.period.yearDate;delete n.period,n.period={years:a,yearDate:l},c&&(n.period.yearMonth=c)}if(n.time.exactTime?(delete n.time.end,delete n.time.mode,delete n.time.interval):delete n.time.exactTime,n.valid){if(n.valid.to||delete n.valid.to,n.period.days===1||n.period.weeks===1||n.period.months===1||n.period.years===1){const a=fe.string2date(n.valid.from),c=new Date;c.setHours(0),c.setMinutes(0),c.setSeconds(0),c.setMilliseconds(0),a<=c&&delete n.valid.from}!n.valid.from&&!n.valid.to&&delete n.valid}(o=(s=this.props).onChange)==null||o.call(s,JSON.stringify(n),fe.state2text(e))}}static state2text(e){if(typeof e=="string")try{e=JSON.parse(e)}catch{return""}const t=[],r=fe.string2date(e.valid.from);if(e.period.once){const s=fe.string2date(e.period.once),o=new Date;if(o.setMilliseconds(0),o.setSeconds(0),o.setMinutes(0),o.setHours(0),s<o)return p.t("sch_desc_onceInPast");t.push(p.t("sch_desc_once_on",e.period.once))}else if(e.period.days)if(e.period.days===1)if(e.period.dows){const s=JSON.parse(e.period.dows);if(s.length===2&&s[0]===0&&s[1]===6)t.push(p.t("sch_desc_onWeekends"));else if(s.length===5&&s[0]===1&&s[1]===2&&s[2]===3&&s[3]===4&&s[4]===5)t.push(p.t("sch_desc_onWorkdays"));else{const o=s.map(n=>p.t(Jn[n]));if(o.length===1)t.push(p.t("sch_desc_onWeekday",o[0]));else if(o.length===7)t.push(p.t("sch_desc_everyDay"));else{const n=o.pop();t.push(p.t("sch_desc_onWeekdays",o.join(", "),n))}}}else t.push(p.t("sch_desc_everyDay"));else t.push(p.t("sch_desc_everyNDay",e.period.days.toString()));else if(e.period.weeks)if(e.period.weeks===1?t.push(p.t("sch_desc_everyWeek")):t.push(p.t("sch_desc_everyNWeeks",e.period.weeks.toString())),e.period.dows){const s=JSON.parse(e.period.dows);if(s.length===2&&s[0]===0&&s[1]===6)t.push(p.t("sch_desc_onWeekends"));else if(s.length===5&&s[0]===1&&s[1]===2&&s[2]===3&&s[3]===4&&s[4]===5)t.push(p.t("sch_desc_onWorkdays"));else{const o=s.map(n=>p.t(Jn[n]));if(o.length===1)t.push(p.t("sch_desc_onWeekday",o[0]));else if(o.length===7)t.push(p.t("sch_desc_everyDay"));else{const n=o.pop();t.push(p.t("sch_desc_onWeekdays",o.join(", "),n))}}}else return p.t("sch_desc_never");else if(e.period.months){if(e.period.dates){const s=JSON.parse(e.period.dates);if(s.length===1)t.push(p.t("sch_desc_onDate",s[0]));else if(s.length===31)t.push(p.t("sch_desc_onEveryDate"));else if(s.length){const o=s.pop();t.push(p.t("sch_desc_onDates",s.join(", "),o))}else return p.t("sch_desc_never")}else t.push(p.t("sch_desc_onEveryDate"));if(e.period.months===1)t.push(p.t("sch_desc_everyMonth"));else if(typeof e.period.months=="number")t.push(p.t("sch_desc_everyNMonths",e.period.months.toString()));else{const o=JSON.parse(e.period.months).map(n=>p.t(Ks[n-1]));if(!o.length)return p.t("sch_desc_never");if(o.length===1)t.push(p.t("sch_desc_onMonth",o[0]));else if(o.length===12)t.push(p.t("sch_desc_everyMonth"));else{const n=o.pop();t.push(p.t("sch_desc_onMonths",o.join(", "),n))}}}else e.period.years&&(e.period.years===1?t.push(p.t("sch_desc_everyYear")):t.push(p.t("sch_desc_everyNYears",e.period.years.toString())),t.push(p.t("sch_desc_onDate",e.period.yearDate.toString(),e.period.yearMonth?p.t(Ks[e.period.yearMonth-1]):p.t("sch_desc_everyMonth"))));if(e.time.exactTime)Fr.includes(e.time.start)?t.push(p.t("sch_desc_atTime",p.t(`sch_astro_${e.time.start}`))):t.push(p.t("sch_desc_atTime",e.time.start));else{e.time.mode===Gn.minutes?e.time.interval===1?t.push(p.t("sch_desc_everyMinute")):t.push(p.t("sch_desc_everyNMinutes",e.time.interval.toString())):e.time.interval===1?t.push(p.t("sch_desc_everyHour")):t.push(p.t("sch_desc_everyNHours",e.time.interval.toString()));const s=Fr.indexOf(e.time.start)!==-1?p.t(`sch_astro_${e.time.start}`):e.time.start,o=Fr.indexOf(e.time.end)!==-1?p.t(`sch_astro_${e.time.end}`):e.time.end;(s!=="00:00"||o!=="24:00"&&o!=="23:59")&&t.push(p.t("sch_desc_intervalFromTo",s,o))}return e.period.once||(r.getTime()>Date.now()&&e.valid.to?t.push(p.t("sch_desc_validFromTo",e.valid.from,e.valid.to)):r.getTime()>Date.now()?t.push(p.t("sch_desc_validFrom",e.valid.from)):e.valid.to&&t.push(p.t("sch_desc_validTo",e.valid.to))),t.join(" ")}getTimePeriodElements(){const e=this.state.schedule;let t=!1,r=!1,s=!1,o=!0;return e.time.start==="00:00"&&e.time.end==="24:00"?(t=!0,o=!1):e.time.start==="sunrise"?(r=!0,o=!1):e.time.start==="sunset"&&(s=!0,o=!1),M.createElement("div",{key:"timePeriod",style:k.rowDiv},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!e.time.exactTime,onClick:()=>{const n=JSON.parse(JSON.stringify(this.state.schedule));n.time.exactTime=!1,this.onChange(n)}}),label:p.t("sch_intervalTime")})),M.createElement("div",{style:k.settingsDiv},M.createElement("div",{style:k.settingsDiv},!e.time.exactTime&&M.createElement("div",null,M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!o,onClick:()=>{const n=JSON.parse(JSON.stringify(this.state.schedule));n.time.start="00:00",n.time.end="23:59",this.onChange(n)}}),label:o?"":p.t("sch_fromTo")}),o&&[M.createElement(j.TextField,{variant:"standard",style:{...k.inputTime,marginRight:10},key:"exactTimeFrom",type:"time",sx:n=>({'& input[type="time"]::-webkit-calendar-picker-indicator':{filter:n.palette.mode==="dark"?"invert(80%)":void 0}}),value:this.state.schedule.time.start,onChange:n=>{const a=JSON.parse(JSON.stringify(this.state.schedule));a.time.start=n.target.value,this.onChange(a)},slotProps:{inputLabel:{shrink:!0}},label:p.t("sch_from"),margin:"normal"}),M.createElement(j.TextField,{variant:"standard",style:k.inputTime,key:"exactTimeTo",type:"time",sx:n=>({'& input[type="time"]::-webkit-calendar-picker-indicator':{filter:n.palette.mode==="dark"?"invert(80%)":void 0}}),value:this.state.schedule.time.end,onChange:n=>{const a=JSON.parse(JSON.stringify(this.state.schedule));a.time.end=n.target.value,this.onChange(a)},slotProps:{inputLabel:{shrink:!0}},label:p.t("sch_to"),margin:"normal"})])),!e.time.exactTime&&M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!t,onClick:()=>{const n=JSON.parse(JSON.stringify(this.state.schedule));n.time.start="00:00",n.time.end="24:00",this.onChange(n)}}),label:p.t("sch_wholeDay")})),!e.time.exactTime&&M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!r,onClick:()=>{const n=JSON.parse(JSON.stringify(this.state.schedule));n.time.start="sunrise",n.time.end="sunset",this.onChange(n)}}),label:p.t("sch_astroDay")})),!e.time.exactTime&&M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!s,onClick:()=>{const n=JSON.parse(JSON.stringify(this.state.schedule));n.time.start="sunset",n.time.end="sunrise",this.onChange(n)}}),label:p.t("sch_astroNight")}))),!e.time.exactTime&&this.getPeriodSettingsMinutes(o)))}getTimeExactElements(){const e=Fr.includes(this.state.schedule.time.start);return M.createElement("div",{key:"timeExact",style:k.rowDiv},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!this.state.schedule.time.exactTime,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.time.exactTime=!0,this.onChange(t)}}),label:p.t("sch_exactTime")})),this.state.schedule.time.exactTime&&M.createElement(j.Select,{variant:"standard",value:e?this.state.schedule.time.start:"00:00",onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.time.start=t.target.value,this.onChange(r)}},M.createElement(j.MenuItem,{key:"specific",value:"00:00"},p.t("sch_specificTime")),Fr.map(t=>M.createElement(j.MenuItem,{key:t,value:t},p.t(`sch_astro_${t}`)))),this.state.schedule.time.exactTime&&!e&&M.createElement("div",{style:k.settingsDiv},M.createElement(j.TextField,{variant:"standard",style:k.inputTime,key:"exactTimeValue",value:this.state.schedule.time.start,type:"time",sx:t=>({'& input[type="time"]::-webkit-calendar-picker-indicator':{filter:t.palette.mode==="dark"?"invert(80%)":void 0}}),onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.time.start=t.target.value,this.onChange(r)},slotProps:{inputLabel:{shrink:!0}},margin:"normal"})))}static getDivider(){return M.createElement("hr",{style:k.hr})}getPeriodModes(){const e=this.state.schedule,t=!e.period.dows&&!e.period.months&&!e.period.dates&&!e.period.years&&!e.period.days&&!e.period.weeks;return t&&!e.period.once&&(e.period.once=fe.now2string(!0)),[M.createElement("div",{key:"once",style:{...k.rowDiv,...k.rowOnce}},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!t,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.once||=fe.now2string(!0),r.period.dows="",r.period.months="",r.period.dates="",r.period.years=0,r.period.yearDate=0,r.period.yearMonth=0,r.period.weeks=0,r.period.days=0,this.onChange(r)}}),label:p.t("sch_periodOnce")})),t&&M.createElement("div",{style:k.settingsDiv},M.createElement(j.TextField,{variant:"standard",style:k.inputDate,type:"date",ref:this.refOnce,key:"exactDateAt",defaultValue:Hn(e.period.once),onChange:r=>{this.timerOnce&&clearTimeout(this.timerOnce),this.timerOnce=null,this.refOnce.current&&(this.refOnce.current.style.background="#ff000030"),this.timerOnce=setTimeout(s=>{this.timerOnce=null,this.refOnce.current&&(this.refOnce.current.style.background="");const o=JSON.parse(JSON.stringify(this.state.schedule)),n=fe.string2date(s);n.toString()!=="Invalid Date"&&(o.period.once=`${xt(n.getDate())}.${xt(n.getMonth()+1)}.${n.getFullYear()}`,this.onChange(o))},1500,r.target.value)},slotProps:{inputLabel:{shrink:!0}},label:p.t("sch_at"),margin:"normal"}))),M.createElement(j.Box,{component:"div",key:"days",sx:E.getStyle(this.props.theme,k.rowDiv,k.rowDays)},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!e.period.days,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.days=1,r.period.dows="",r.period.months="",r.period.dates="",r.period.years=0,r.period.yearDate=0,r.period.yearMonth=0,r.period.weeks=0,r.period.once="",this.onChange(r)}}),label:p.t("sch_periodDaily")})),M.createElement("div",{style:k.settingsDiv},this.getPeriodSettingsDaily(),e.period.days?this.getPeriodSettingsWeekdays():null)),M.createElement(j.Box,{component:"div",key:"weeks",sx:E.getStyle(this.props.theme,k.rowDiv,k.rowDows)},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!e.period.weeks,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.weeks=e.period.weeks?0:1,r.period.dows||="[0]",r.period.months="",r.period.dates="",r.period.years=0,r.period.yearDate=0,r.period.yearMonth=0,r.period.days=0,r.period.once="",this.onChange(r)}}),label:p.t("sch_periodWeekly")})),M.createElement(j.Box,{component:"div",style:k.settingsDiv},M.createElement("div",{style:k.settingsDiv},this.getPeriodSettingsWeekly()),M.createElement(j.Box,{component:"div",sx:E.getStyle(this.props.theme,k.settingsDiv,k.rowDowsDows)},this.state.schedule.period.weeks?this.getPeriodSettingsWeekdays():null))),M.createElement(j.Box,{component:"div",key:"months",sx:E.getStyle(this.props.theme,k.rowDiv,k.rowMonths)},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!e.period.months,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months=1,r.period.dows="",r.period.dates="",r.period.years=0,r.period.yearDate=0,r.period.yearMonth=0,r.period.weeks=0,r.period.days=0,r.period.once="",this.onChange(r)}}),label:p.t("sch_periodMonthly")})),M.createElement("div",{style:k.settingsDiv},this.getPeriodSettingsMonthly(),e.period.months?M.createElement(j.Box,null,M.createElement(j.Box,{component:"div",sx:E.getStyle(this.props.theme,k.settingsDiv,k.rowMonthsDates)},M.createElement(j.FormControlLabel,{control:M.createElement(j.Checkbox,{style:k.inputRadio,checked:!!e.period.dates,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months||=1;const s=[];for(let o=1;o<=31;o++)s.push(o);r.period.dates||=JSON.stringify(s),r.period.dows="",r.period.years=0,r.period.yearDate=0,r.period.yearMonth=0,r.period.weeks=0,r.period.days=0,r.period.once="",this.onChange(r)}}),label:p.t("sch_periodDates")})),M.createElement(j.Box,{component:"div",sx:E.getStyle(this.props.theme,k.settingsDiv,k.rowMonthsDates)},this.getPeriodSettingsDates())):null)),M.createElement(j.Box,{component:"div",key:"years",sx:E.getStyle(this.props.theme,k.rowDiv,k.rowYears)},M.createElement("div",{style:k.modeDiv},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!e.period.years,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.years=1,r.period.yearDate=1,r.period.yearMonth=1,r.period.dows="",r.period.months=0,r.period.dates="",r.period.weeks=0,r.period.days=0,r.period.once="",this.onChange(r)}}),label:p.t("sch_periodYearly")})),M.createElement("div",{style:k.settingsDiv},M.createElement("div",{style:k.settingsDiv},this.getPeriodSettingsYearly()),!!e.period.years&&M.createElement("div",{style:k.settingsDiv},M.createElement("span",null,p.t("sch_on")),M.createElement(j.Input,{key:"input",value:this.state.schedule.period.yearDate,style:k.inputEvery,type:"number",inputProps:{min:1,max:31},onChange:r=>{const s=JSON.parse(JSON.stringify(this.state.schedule));s.period.yearDate=parseInt(r.target.value,10),s.period.yearDate<1&&(s.period.yearDate=31),s.period.yearDate>31&&(s.period.yearDate=1),this.onChange(s)}}),M.createElement(j.Select,{variant:"standard",value:e.period.yearMonth,onChange:r=>{const s=JSON.parse(JSON.stringify(this.state.schedule));s.period.yearMonth=r.target.value,this.onChange(s)}},M.createElement(j.MenuItem,{key:"every",value:0},p.t("sch_yearEveryMonth")),Ks.map((r,s)=>M.createElement(j.MenuItem,{key:r,value:s+1},p.t(r)))))))]}getPeriodSettingsMinutes(e){return M.createElement("div",{style:{display:"inline-block",marginTop:e?15:"inherit"}},M.createElement("label",{style:{marginLeft:4,marginRight:4}},p.t("sch_every")),M.createElement(j.Input,{value:this.state.schedule.time.interval,style:{...k.inputEvery,verticalAlign:"bottom"},type:"number",inputProps:{min:1},onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.time.interval=parseInt(t.target.value,10),this.onChange(r)}}),M.createElement(j.Select,{variant:"standard",value:this.state.schedule.time.mode,onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.time.mode=t.target.value,this.onChange(r)}},M.createElement(j.MenuItem,{value:Gn.minutes},p.t("sch_periodMinutes")),M.createElement(j.MenuItem,{value:Gn.hours},p.t("sch_periodHours"))))}getPeriodSettingsWeekdays(){const e=this.state.schedule,t=e.period.dows&&e.period.dows!=="[1, 2, 3, 4, 5]"&&e.period.dows!=="[0, 6]";return[M.createElement("div",{key:"workdays"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.dows==="[1, 2, 3, 4, 5]",onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.dows="[1, 2, 3, 4, 5]",r.period.days&&(r.period.days=1),this.onChange(r)}}),label:p.t("sch_periodWorkdays")})),M.createElement("div",{key:"weekend"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.dows==="[0, 6]",onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.dows="[0, 6]",r.period.days&&(r.period.days=1),this.onChange(r)}}),label:p.t("sch_periodWeekend")})),M.createElement("div",{key:"specific",style:{verticalAlign:"top"}},M.createElement(j.FormControlLabel,{style:{verticalAlign:"top"},control:M.createElement(j.Radio,{style:k.inputRadio,checked:!!t,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.dows="[0, 1, 2, 3, 4, 5, 6]",r.period.days&&(r.period.days=1),this.onChange(r)}}),label:p.t("sch_periodWeekdays")}),t&&(e.period.days===1||e.period.weeks)&&M.createElement(j.FormGroup,{row:!0,style:{...k.inputGroup,width:150}},[1,2,3,4,5,6,0].map(r=>M.createElement(j.FormControlLabel,{key:`specific_${r}`,style:k.inputGroupElement,control:M.createElement(j.Checkbox,{style:k.inputSmallCheck,checked:e.period.dows.includes(r.toString()),onChange:s=>{const o=JSON.parse(JSON.stringify(this.state.schedule));let n;try{n=JSON.parse(o.period.dows)}catch{n=[]}s.target.checked&&!n.includes(r)?n.push(r):!s.target.checked&&n.includes(r)&&n.splice(n.indexOf(r),1),n.sort((a,c)=>a-c),o.period.dows=JSON.stringify(n),o.period.days&&(o.period.days=1),this.onChange(o)}}),label:p.t(Jn[r])}))))]}getPeriodSettingsDaily(){if(!this.state.schedule.period.days)return null;const e=this.state.schedule;return[M.createElement("div",{key:"every_day"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.days===1&&!e.period.dows,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.days=1,t.period.dows="",this.onChange(t)}}),label:p.t("sch_periodEveryDay")})),M.createElement("div",{key:"everyN_day"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.days>1,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.days=2,t.period.dows="",this.onChange(t)}}),label:p.t("sch_periodEvery")}),e.period.days>1&&[M.createElement(j.Input,{key:"input",value:this.state.schedule.period.days,style:k.inputEvery,type:"number",inputProps:{min:2},onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.days=parseInt(t.target.value,10),r.period.dows="",this.onChange(r)}}),M.createElement("span",{key:"span",style:{paddingRight:10}},p.t("sch_periodDay"))])]}getPeriodSettingsWeekly(){if(!this.state.schedule.period.weeks)return null;const e=this.state.schedule;return[M.createElement("div",{key:"radios",style:{display:"inline-block",verticalAlign:"top"}},M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.weeks===1,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.weeks=1,this.onChange(t)}}),label:p.t("sch_periodEveryWeek")})),M.createElement("div",null,M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.weeks>1,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.weeks=2,this.onChange(t)}}),label:p.t("sch_periodEvery")}),e.period.weeks>1&&[M.createElement(j.Input,{key:"input",value:this.state.schedule.period.weeks,style:k.inputEvery,type:"number",inputProps:{min:2},onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.weeks=parseInt(t.target.value,10),this.onChange(r)}}),M.createElement("span",{key:"text"},p.t("sch_periodWeek"))]))]}getPeriodSettingsDates(){if(!this.state.schedule.period.dates)return null;const e=this.state.schedule,t=[];for(let s=1;s<=31;s++)t.push(s);const r=JSON.parse(e.period.dates);return M.createElement(j.FormGroup,{row:!0,style:{...k.inputGroup,maxWidth:620}},M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:r.length===31,onChange:()=>{const s=JSON.parse(JSON.stringify(this.state.schedule)),o=[];for(let n=1;n<=31;n++)o.push(n);s.period.dates=JSON.stringify(o),this.onChange(s)}}),label:p.t("sch_all")}),M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:!r.length,onChange:()=>{const s=JSON.parse(JSON.stringify(this.state.schedule));s.period.dates="[]",this.onChange(s)}}),label:p.t("sch_no_one")}),r.length!==31&&!!r.length&&M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:!1,onChange:()=>{const s=JSON.parse(JSON.stringify(this.state.schedule)),o=[],n=JSON.parse(s.period.dates);for(let a=1;a<=31;a++)n.includes(a)||o.push(a);o.sort((a,c)=>a-c),s.period.dates=JSON.stringify(o),this.onChange(s)}}),label:p.t("sch_invert")}),M.createElement("div",null),t.map(s=>M.createElement(j.FormControlLabel,{key:`date_${s}`,style:s?k.inputDateDay:{...k.inputDateDay,opacity:0,cursor:"default",userSelect:"none",pointerEvents:"none"},control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:JSON.parse(e.period.dates).includes(s),onChange:o=>{const n=JSON.parse(JSON.stringify(this.state.schedule));let a;try{a=JSON.parse(n.period.dates)}catch{a=[]}o.target.checked&&!a.includes(s)?a.push(s):!o.target.checked&&a.includes(s)&&a.splice(a.indexOf(s),1),a.sort((c,l)=>c-l),n.period.dates=JSON.stringify(a),this.onChange(n)}}),label:s<10?[M.createElement("span",{key:"0",style:{opacity:0}},"0"),M.createElement("span",{key:"num"},s)]:s})))}getPeriodSettingsMonthly(){if(!this.state.schedule.period.months)return null;const e=this.state.schedule,t=typeof e.period.months=="string"?JSON.parse(e.period.months):[];return[M.createElement("div",{key:"every"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:typeof e.period.months=="number"&&e.period.months===1,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months=1,this.onChange(e)}}),label:p.t("sch_periodEveryMonth")})),M.createElement("div",{key:"everyN"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:typeof e.period.months=="number"&&e.period.months>1,onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months=2,this.onChange(r)}}),label:p.t("sch_periodEvery")}),typeof e.period.months=="number"&&e.period.months>1&&[M.createElement(j.Input,{key:"input",value:e.period.months,style:k.inputEvery,type:"number",inputProps:{min:2},onChange:r=>{const s=JSON.parse(JSON.stringify(this.state.schedule));s.period.months=parseInt(r.target.value,10),s.period.months<1&&(s.period.months=1),this.onChange(s)}}),M.createElement("span",{key:"text"},p.t("sch_periodMonth"))]),M.createElement("div",{key:"specific",style:{verticalAlign:"top"}},M.createElement(j.FormControlLabel,{style:{verticalAlign:"top"},control:M.createElement(j.Radio,{style:k.inputRadio,checked:typeof e.period.months=="string",onClick:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months="[1,2,3,4,5,6,7,8,9,10,11,12]",this.onChange(r)}}),label:p.t("sch_periodSpecificMonths")}),typeof e.period.months=="string"&&M.createElement(j.FormGroup,{row:!0,style:k.inputGroup},M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:t.length===12,onChange:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule)),s=[];for(let o=1;o<=12;o++)s.push(o);r.period.months=JSON.stringify(s),this.onChange(r)}}),label:p.t("sch_all")}),M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:!t.length,onChange:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.months="[]",this.onChange(r)}}),label:p.t("sch_no_one")}),t.length!==12&&!!t.length&&M.createElement(j.FormControlLabel,{style:k.inputDateDay,control:M.createElement(j.Checkbox,{style:k.inputDateDayCheck,checked:!1,onChange:()=>{const r=JSON.parse(JSON.stringify(this.state.schedule)),s=[],o=JSON.parse(r.period.months);for(let n=1;n<=12;n++)o.includes(n)||s.push(n);s.sort((n,a)=>n-a),r.period.months=JSON.stringify(s),this.onChange(r)}}),label:p.t("sch_invert")}),M.createElement("div",null),Ks.map((r,s)=>M.createElement(j.FormControlLabel,{key:`month_${s}`,style:k.inputGroupElement,control:M.createElement(j.Checkbox,{style:k.inputSmallCheck,checked:typeof e.period.months=="string"?JSON.parse(e.period.months).includes(s+1):e.period.months===s,onChange:o=>{const n=JSON.parse(JSON.stringify(this.state.schedule));let a;try{a=JSON.parse(n.period.months)}catch{a=[]}o.target.checked&&!a.includes(s+1)?a.push(s+1):!o.target.checked&&a.includes(s+1)&&a.splice(a.indexOf(s+1),1),a.sort((c,l)=>c-l),n.period.months=JSON.stringify(a),this.onChange(n)}}),label:p.t(r)}))))]}getPeriodSettingsYearly(){if(!this.state.schedule.period.years)return null;const e=this.state.schedule;return[M.createElement("div",{key:"year"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.years===1,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.years=1,this.onChange(t)}}),label:p.t("sch_periodEveryYear")})),M.createElement("div",{key:"every"},M.createElement(j.FormControlLabel,{control:M.createElement(j.Radio,{style:k.inputRadio,checked:e.period.years>1,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.period.years=2,this.onChange(t)}}),label:p.t("sch_periodEvery")}),e.period.years>1&&[M.createElement(j.Input,{key:"input",value:this.state.schedule.period.years,style:k.inputEvery,type:"number",inputProps:{min:2},onChange:t=>{const r=JSON.parse(JSON.stringify(this.state.schedule));r.period.years=parseInt(t.target.value,10),r.period.years<1&&(r.period.years=1),this.onChange(r)}}),M.createElement("span",{key:"text"},p.t("sch_periodYear"))])]}static now2string(e){const t=new Date;return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),e&&(t.setDate(t.getDate()+2),t.setMilliseconds(t.getMilliseconds()-1)),`${xt(t.getDate())}.${xt(t.getMonth()+1)}.${xt(t.getFullYear())}`}static string2date(e){let t=e.split(".");return t.length===1?(t=e.split("-"),new Date(parseInt(t[0],10),parseInt(t[1],10)-1,parseInt(t[2],10))):new Date(parseInt(t[2],10),parseInt(t[1],10)-1,parseInt(t[0],10))}getValidSettings(){const e=this.state.schedule;return M.createElement("div",{style:k.rowDiv},M.createElement("div",{style:{...k.modeDiv,verticalAlign:"middle"}},M.createElement("span",{style:{fontWeight:"bold",paddingRight:10}},p.t("sch_valid")),M.createElement("span",null,p.t("sch_validFrom"))),M.createElement("div",{style:k.settingsDiv},M.createElement(j.TextField,{variant:"standard",style:{...k.inputDate,marginRight:10},key:"exactTimeFrom",inputRef:this.refFrom,defaultValue:Hn(e.valid.from),type:"date",onChange:t=>{this.timerFrom&&clearTimeout(this.timerFrom),this.refFrom.current&&(this.refFrom.current.style.background="#ff000030"),this.timerFrom=setTimeout(r=>{this.timerFrom=null,this.refFrom.current&&(this.refFrom.current.style.background="");const s=JSON.parse(JSON.stringify(this.state.schedule)),o=fe.string2date(r);o.toString()!=="Invalid Date"&&(s.valid.from=`${xt(o.getDate())}.${xt(o.getMonth()+1)}.${o.getFullYear()}`,this.onChange(s))},1500,t.target.value)},slotProps:{inputLabel:{shrink:!0}},margin:"normal"}),M.createElement(j.FormControlLabel,{control:M.createElement(j.Checkbox,{style:k.inputRadio,checked:!!e.valid.to,onClick:()=>{const t=JSON.parse(JSON.stringify(this.state.schedule));t.valid.to=t.valid.to?"":fe.now2string(!0),this.onChange(t)}}),label:p.t("sch_validTo")}),!!e.valid.to&&M.createElement(j.TextField,{variant:"standard",inputRef:this.refTo,style:{...k.inputDate,marginRight:10},key:"exactTimeFrom",type:"date",defaultValue:Hn(e.valid.to),onChange:t=>{this.timerTo&&clearTimeout(this.timerTo),this.refTo.current&&(this.refTo.current.style.background="#ff000030"),this.timerTo=setTimeout(r=>{this.timerTo=null,this.refTo.current&&(this.refTo.current.style.background="");const s=JSON.parse(JSON.stringify(this.state.schedule)),o=fe.string2date(r);o.toString()!=="Invalid Date"&&(s.valid.to=`${xt(o.getDate())}.${xt(o.getMonth()+1)}.${o.getFullYear()}`,this.onChange(s))},1500,t.target.value)},slotProps:{inputLabel:{shrink:!0}},margin:"normal"})))}render(){return M.createElement("div",{style:{height:"calc(100% - 48px)",width:"100%",overflow:"hidden"}},M.createElement("div",null,this.state.desc),M.createElement("div",{style:k.scrollWindow},M.createElement("h5",null,p.t("sch_time")),this.getTimePeriodElements(),this.getTimeExactElements(),fe.getDivider(),M.createElement("h5",null,p.t("sch_period")),this.getPeriodModes(),!this.state.schedule.period.once&&fe.getDivider(),!this.state.schedule.period.once&&this.getValidSettings()))}}const qs={different:{opacity:.5},icon:{width:16,height:16,marginRight:8}};class $ke extends _.Component{wordDifferent;timeout=null;constructor(e){super(e),e.different&&(this.wordDifferent=e.t("ra___different__"));let t;Array.isArray(e.list)?t=e.list.filter(r=>(r==null?void 0:r._id)&&r.common).map(r=>{var s,o;return{name:E.getObjectNameFromObj(r,e.lang).replace("system.group.","").replace("system.user.","").replace("enum.rooms.","").replace("enum.functions.",""),value:r._id,icon:(s=r.common)==null?void 0:s.icon,color:(o=r.common)==null?void 0:o.color}}):t=Object.values(e.list).filter(r=>(r==null?void 0:r._id)&&r.common).map(r=>{var s,o;return{name:E.getObjectNameFromObj(r,e.lang).replace("system.group.","").replace("system.user.","").replace("enum.rooms.","").replace("enum.functions.",""),value:r._id,icon:(s=r.common)==null?void 0:s.icon,color:(o=r.common)==null?void 0:o.color}}),e.different&&e.value===e.different&&t.unshift({value:e.different,name:this.wordDifferent||""}),e.allowNone&&t.unshift({value:"",name:p.t("ra_none")}),this.state={list:t}}render(){this.props.allowNone&&!this.state.list.find(s=>s.value==="")?this.timeout=this.timeout||setTimeout(()=>{this.timeout=null;const s=JSON.parse(JSON.stringify(this.state.list));s.unshift({value:"",name:p.t("ra_none")}),this.setState({list:s})},100):!this.props.allowNone&&this.state.list.find(s=>s.value==="")&&(this.timeout=this.timeout||setTimeout(()=>{this.timeout=null;const s=JSON.parse(JSON.stringify(this.state.list)),o=this.state.list.findIndex(n=>n.value==="");s.splice(o,1),this.setState({list:s})},100));const e=this.state.list.find(s=>s.value===this.props.value||this.props.removePrefix&&s.value.replace(this.props.removePrefix,"")===this.props.value),t=this.props.value===this.props.different?{}:{color:(e==null?void 0:e.color)||void 0,backgroundColor:E.getInvertedColor((e==null?void 0:e.color)||"",this.props.themeType)};this.props.dense&&this.props.style&&Object.assign(t,this.props.style);const r=M.createElement(j.Select,{variant:"standard",disabled:this.props.disabled,value:this.props.value,slotProps:{input:this.props.inputProps},renderValue:()=>M.createElement("span",null,e!=null&&e.icon?M.createElement(Ue,{src:e==null?void 0:e.icon,style:qs.icon}):null,e==null?void 0:e.name),sx:{"&.MuiSelect-root":this.props.value===this.props.different?qs.different:{}},classes:{root:this.props.dense?this.props.className:""},style:t,onChange:s=>{if(this.props.different&&s.target.value!==this.props.different){let o=null;for(let n=0;n<this.state.list.length;n++)if(this.state.list[n].value===this.props.different){o=n;break}if(o!==null){const n=E.clone(this.state.list);n.splice(o,1),this.setState({list:n},()=>this.props.onChange(s.target.value));return}}this.props.onChange(this.props.removePrefix?s.target.value.replace(this.props.removePrefix,""):s.target.value)}},this.state.list.map(s=>M.createElement(j.MenuItem,{style:this.props.different&&s.value===this.props.different?qs.different:{color:s.color||void 0,backgroundColor:E.getInvertedColor(s.color||"",this.props.themeType)},key:s.value,value:s.value},s.icon?M.createElement(Ue,{src:s.icon,style:qs.icon}):null,s.name)));return this.props.dense?r:M.createElement(j.FormControl,{variant:"standard",fullWidth:!!this.props.fullWidth,style:this.props.style,className:this.props.className},M.createElement(j.InputLabel,null,this.props.label),r)}}class Pke extends _.Component{resizerRefTable;resizerActiveIndex;resizerActiveDiv;resizerCurrentWidths;widthFilled=!1;installTimeout=null;resizerMin=0;resizerMinNext=0;resizerPosition=0;resizerOldWidth=0;resizerOldWidthNext=0;constructor(e){super(e),this.resizerRefTable=M.createRef(),this.resizerActiveIndex=null,this.resizerActiveDiv=null,this.resizerCurrentWidths=[]}componentDidMount(){this.resizerInstall()}componentWillUnmount(){this.resizerUninstall()}resizerInstall(){if(this.resizerRefTable.current&&!this.resizerRefTable.current._installed){this.resizerRefTable.current._installed=!0;const e=this.resizerRefTable.current.querySelectorAll("th"),t=(window._localStorage||window.localStorage).getItem(`App.${this.props.name||"history"}.table`);if(this.widthFilled=!1,t)try{this.resizerCurrentWidths=JSON.parse(t),this.widthFilled=!0}catch{}if(this.widthFilled)if(this.resizerCurrentWidths.length!==e.length)this.resizerCurrentWidths=[],this.widthFilled=!1;else{const r=this.resizerRefTable.current.offsetWidth;let s=0;for(let o=0;o<this.resizerCurrentWidths.length;o++)if(window.isFinite(this.resizerCurrentWidths[o]))s+=this.resizerCurrentWidths[o];else{s=null;break}s!==null&&Math.abs(s-r)>20&&(this.resizerCurrentWidths=[],this.widthFilled=!1)}for(let r=0;r<e.length;r++)if(!this.widthFilled&&this.resizerCurrentWidths.push(e[r].offsetWidth),r<e.length-1){const s=window.document.createElement("div");s.dataset.index=r.toString(),s.onmousedown=this.resizerMouseDown,s.ondblclick=this.resizerReset,s.title=this.props.dblTitle||"Double click to reset table layout",s.className="resize-handle",e[r].appendChild(s)}this.widthFilled&&this.resizerApplyWidths()}else this.installTimeout=setTimeout(()=>{this.installTimeout=null,this.resizerInstall()},100)}resizerReset=()=>{for(let e=0;e<this.resizerCurrentWidths.length;e++)this.resizerCurrentWidths[e]=(this.props.initialWidths||[])[e]||"auto";(window._localStorage||window.localStorage).setItem(`App.${this.props.name||"history"}.table`,JSON.stringify(this.resizerCurrentWidths)),this.resizerApplyWidths()};resizerUninstall(){if(this.installTimeout&&clearTimeout(this.installTimeout),this.installTimeout=null,this.resizerRefTable.current&&this.resizerRefTable.current._installed){this.resizerRefTable.current._installed=!1;const e=this.resizerRefTable.current.querySelectorAll("th");for(let t=0;t<e.length;t++){const r=e[t].querySelector(".resize-handle");r&&(r.onmousedown=null,r.remove())}}}resizerApplyWidths(){const e=[];if(this.resizerCurrentWidths.length)for(let t=0;t<this.resizerCurrentWidths.length;t++)this.resizerCurrentWidths[t]?e.push(this.resizerCurrentWidths[t]!=="auto"?`${this.resizerCurrentWidths[t]}px`:"auto"):this.props.initialWidths&&this.props.initialWidths[t]?e.push(this.props.initialWidths[t]!=="auto"?`${this.props.initialWidths[t]}px`:"auto"):e.push("auto");else if(this.props.initialWidths)for(let t=0;t<this.props.initialWidths.length;t++)this.props.initialWidths[t]?e.push(this.props.initialWidths[t]!=="auto"?`${this.props.initialWidths[t]}px`:"auto"):e.push("auto");return this.resizerRefTable.current&&e.length&&(this.resizerRefTable.current.style.gridTemplateColumns=e.join(" ")),e.length?e.join(" "):void 0}resizerMouseMove=e=>{if(this.resizerActiveDiv&&this.resizerActiveIndex!==null){const t=this.resizerOldWidth+e.clientX-this.resizerPosition,r=this.resizerOldWidthNext-e.clientX+this.resizerPosition;(!this.resizerMin||t>this.resizerMin)&&(!this.resizerMinNext||r>this.resizerMinNext)&&(this.resizerCurrentWidths[this.resizerActiveIndex]=t,this.resizerCurrentWidths[this.resizerActiveIndex+1]=r,this.resizerApplyWidths())}};resizerMouseUp=()=>{(window._localStorage||window.localStorage).setItem(`App.${this.props.name||"history"}.table`,JSON.stringify(this.resizerCurrentWidths)),this.resizerActiveIndex=null,this.resizerActiveDiv=null,window.removeEventListener("mousemove",this.resizerMouseMove),window.removeEventListener("mouseup",this.resizerMouseUp)};resizerMouseDown=e=>{var t,r,s,o;if(this.resizerActiveIndex===null||this.resizerActiveIndex===void 0){console.log(`Mouse down ${(t=e.target)==null?void 0:t.dataset.index}`),this.resizerActiveIndex=parseInt(((r=e.target)==null?void 0:r.dataset.index)||"0",10),this.resizerActiveDiv=e.target,this.resizerMin=this.props.minWidths?this.props.minWidths[this.resizerActiveIndex]:0,this.resizerMinNext=this.props.minWidths?this.props.minWidths[this.resizerActiveIndex+1]:0,this.resizerPosition=e.clientX;let n;this.resizerCurrentWidths[this.resizerActiveIndex]==="auto"&&(n=(s=this.resizerRefTable.current)==null?void 0:s.querySelectorAll("th"),n&&(this.resizerCurrentWidths[this.resizerActiveIndex]=n[this.resizerActiveIndex].offsetWidth)),this.resizerCurrentWidths[this.resizerActiveIndex+1]==="auto"&&(n=n||((o=this.resizerRefTable.current)==null?void 0:o.querySelectorAll("th")),n&&(this.resizerCurrentWidths[this.resizerActiveIndex+1]=n[this.resizerActiveIndex+1].offsetWidth)),this.resizerOldWidth=this.resizerCurrentWidths[this.resizerActiveIndex],this.resizerOldWidthNext=this.resizerCurrentWidths[this.resizerActiveIndex+1],window.addEventListener("mousemove",this.resizerMouseMove),window.addEventListener("mouseup",this.resizerMouseUp)}};render(){if(this.props.ready===!1)return M.createElement(j.Skeleton,null);const e={gridTemplateColumns:this.resizerApplyWidths()};return M.createElement(j.Table,{stickyHeader:this.props.stickyHeader,size:this.props.size||"small",className:this.props.className,sx:this.props.sx,ref:this.resizerRefTable,style:{...this.props.style||void 0,...e}},this.props.children)}}const Vn={div:{borderRadius:3,padding:"0 3px",lineHeight:"20px",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center"},icon:{width:16,height:16,marginRight:8,verticalAlign:"middle"},text:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}};function Rke(i){var o,n,a,c,l,N,u,g,L;const e=i.value;let t;const r=i.removePrefix||"";if(typeof e=="string"){const d=i.list;if(d)if(Array.isArray(d)){const y=d.find(D=>(D==null?void 0:D._id)===r+e);y?t={name:E.getObjectNameFromObj(y,i.lang).replace("system.group.",""),value:y._id,icon:i.icon||((o=y.common)==null?void 0:o.icon),color:i.color||((n=y.common)==null?void 0:n.color)}:t={name:e,value:r+e}}else if(d[r+e]){const y=d[r+e];t={name:E.getObjectNameFromObj(y,i.lang).replace("system.group.",""),value:y._id,icon:i.icon||((a=y.common)==null?void 0:a.icon),color:i.color||((c=y.common)==null?void 0:c.color)}}else t={name:e,value:r+e,icon:i.icon,color:i.color};else t={name:e,value:r+e,icon:i.icon,color:i.color}}else if(!e||typeof e!="object")t={name:"",value:"",icon:i.icon,color:i.color};else{const d=e;t={name:E.getObjectNameFromObj(d,i.lang).replace("system.group.","").replace("system.user.","").replace("enum.rooms.","").replace("enum.functions.",""),value:d._id,icon:i.icon||((l=d.common)==null?void 0:l.icon),color:i.color||((N=d.common)==null?void 0:N.color)}}const s=t!=null&&t.color?{border:`1px solid ${E.invertColor(t==null?void 0:t.color)}`,color:E.getInvertedColor(t==null?void 0:t.color,i.themeType||"light",!0)||void 0,backgroundColor:t==null?void 0:t.color}:{};return M.createElement("div",{style:{...i.style||void 0,...Vn.div,...s||void 0},className:E.clsx(i.className,(u=i.moreClasses)==null?void 0:u.root),title:i.title||t.value},t!=null&&t.icon?M.createElement(Ue,{src:t==null?void 0:t.icon,className:(g=i.moreClasses)==null?void 0:g.icon,style:Vn.icon}):null,M.createElement("div",{style:Vn.text,className:(L=i.moreClasses)==null?void 0:L.text},t==null?void 0:t.name))}function Wke({themeName:i,toggleTheme:e,t,className:r,style:s,size:o}){return M.createElement("div",{className:r||void 0,style:s||void 0},M.createElement(j.Tooltip,{title:t("ra_Change color theme"),slotProps:{popper:{sx:{pointerEvents:"none"}}}},M.createElement(j.IconButton,{onClick:()=>e(),size:o||"medium"},i==="dark"&&M.createElement(O.Brightness4,{className:r}),i==="blue"&&M.createElement(O.Brightness5,{className:r}),i==="colored"&&M.createElement(O.Brightness6,{className:r}),i!=="dark"&&i!=="blue"&&i!=="colored"&&M.createElement(O.Brightness7,{className:r}))))}function an(){return(an=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i}).apply(this,arguments)}function sL(i,e){if(i==null)return{};var t,r,s={},o=Object.keys(i);for(r=0;r<o.length;r++)e.indexOf(t=o[r])>=0||(s[t]=i[t]);return s}function $a(i){var e=_.useRef(i),t=_.useRef(function(r){e.current&&e.current(r)});return e.current=i,t.current}var gs=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),i>t?t:i<e?e:i},os=function(i){return"touches"in i},Pa=function(i){return i&&i.ownerDocument.defaultView||self},WN=function(i,e,t){var r=i.getBoundingClientRect(),s=os(e)?(function(o,n){for(var a=0;a<o.length;a++)if(o[a].identifier===n)return o[a];return o[0]})(e.touches,t):e;return{left:gs((s.pageX-(r.left+Pa(i).pageXOffset))/r.width),top:gs((s.pageY-(r.top+Pa(i).pageYOffset))/r.height)}},BN=function(i){!os(i)&&i.preventDefault()},oL=M.memo(function(i){var e=i.onMove,t=i.onKey,r=sL(i,["onMove","onKey"]),s=_.useRef(null),o=$a(e),n=$a(t),a=_.useRef(null),c=_.useRef(!1),l=_.useMemo(function(){var L=function(D){BN(D),(os(D)?D.touches.length>0:D.buttons>0)&&s.current?o(WN(s.current,D,a.current)):y(!1)},d=function(){return y(!1)};function y(D){var z=c.current,A=Pa(s.current),C=D?A.addEventListener:A.removeEventListener;C(z?"touchmove":"mousemove",L),C(z?"touchend":"mouseup",d)}return[function(D){var z=D.nativeEvent,A=s.current;if(A&&(BN(z),!(function(f,m){return m&&!os(f)})(z,c.current)&&A)){if(os(z)){c.current=!0;var C=z.changedTouches||[];C.length&&(a.current=C[0].identifier)}A.focus(),o(WN(A,z,a.current)),y(!0)}},function(D){var z=D.which||D.keyCode;z<37||z>40||(D.preventDefault(),n({left:z===39?.05:z===37?-.05:0,top:z===40?.05:z===38?-.05:0}))},y]},[n,o]),N=l[0],u=l[1],g=l[2];return _.useEffect(function(){return g},[g]),M.createElement("div",an({},r,{onTouchStart:N,onMouseDown:N,className:"react-colorful__interactive",ref:s,onKeyDown:u,tabIndex:0,role:"slider"}))}),cc=function(i){return i.filter(Boolean).join(" ")},nL=function(i){var e=i.color,t=i.left,r=i.top,s=r===void 0?.5:r,o=cc(["react-colorful__pointer",i.className]);return M.createElement("div",{className:o,style:{top:100*s+"%",left:100*t+"%"}},M.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},xe=function(i,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*i)/t},s5e=function(i){return c5e(Ra(i))},Ra=function(i){return i[0]==="#"&&(i=i.substring(1)),i.length<6?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?xe(parseInt(i[3]+i[3],16)/255,2):1}:{r:parseInt(i.substring(0,2),16),g:parseInt(i.substring(2,4),16),b:parseInt(i.substring(4,6),16),a:i.length===8?xe(parseInt(i.substring(6,8),16)/255,2):1}},o5e=function(i){return M5e(a5e(i))},n5e=function(i){var e=i.s,t=i.v,r=i.a,s=(200-e)*t/100;return{h:xe(i.h),s:xe(s>0&&s<200?e*t/100/(s<=100?s:200-s)*100:0),l:xe(s/2),a:xe(r,2)}},Wa=function(i){var e=n5e(i);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},a5e=function(i){var e=i.h,t=i.s,r=i.v,s=i.a;e=e/360*6,t/=100,r/=100;var o=Math.floor(e),n=r*(1-t),a=r*(1-(e-o)*t),c=r*(1-(1-e+o)*t),l=o%6;return{r:xe(255*[r,a,n,n,c,r][l]),g:xe(255*[c,r,r,a,n,n][l]),b:xe(255*[n,n,c,r,r,a][l]),a:xe(s,2)}},eo=function(i){var e=i.toString(16);return e.length<2?"0"+e:e},M5e=function(i){var e=i.r,t=i.g,r=i.b,s=i.a,o=s<1?eo(xe(255*s)):"";return"#"+eo(e)+eo(t)+eo(r)+o},c5e=function(i){var e=i.r,t=i.g,r=i.b,s=i.a,o=Math.max(e,t,r),n=o-Math.min(e,t,r),a=n?o===e?(t-r)/n:o===t?2+(r-e)/n:4+(e-t)/n:0;return{h:xe(60*(a<0?a+6:a)),s:xe(o?n/o*100:0),v:xe(o/255*100),a:s}},u5e=M.memo(function(i){var e=i.hue,t=i.onChange,r=cc(["react-colorful__hue",i.className]);return M.createElement("div",{className:r},M.createElement(oL,{onMove:function(s){t({h:360*s.left})},onKey:function(s){t({h:gs(e+360*s.left,0,360)})},"aria-label":"Hue","aria-valuenow":xe(e),"aria-valuemax":"360","aria-valuemin":"0"},M.createElement(nL,{className:"react-colorful__hue-pointer",left:e/360,color:Wa({h:e,s:100,v:100,a:1})})))}),l5e=M.memo(function(i){var e=i.hsva,t=i.onChange,r={backgroundColor:Wa({h:e.h,s:100,v:100,a:1})};return M.createElement("div",{className:"react-colorful__saturation",style:r},M.createElement(oL,{onMove:function(s){t({s:100*s.left,v:100-100*s.top})},onKey:function(s){t({s:gs(e.s+100*s.left,0,100),v:gs(e.v-100*s.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+xe(e.s)+"%, Brightness "+xe(e.v)+"%"},M.createElement(nL,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:Wa(e)})))}),aL=function(i,e){if(i===e)return!0;for(var t in i)if(i[t]!==e[t])return!1;return!0},N5e=function(i,e){return i.toLowerCase()===e.toLowerCase()||aL(Ra(i),Ra(e))};function g5e(i,e,t){var r=$a(t),s=_.useState(function(){return i.toHsva(e)}),o=s[0],n=s[1],a=_.useRef({color:e,hsva:o});_.useEffect(function(){if(!i.equal(e,a.current.color)){var l=i.toHsva(e);a.current={hsva:l,color:e},n(l)}},[e,i]),_.useEffect(function(){var l;aL(o,a.current.hsva)||i.equal(l=i.fromHsva(o),a.current.color)||(a.current={hsva:o,color:l},r(l))},[o,i,r]);var c=_.useCallback(function(l){n(function(N){return Object.assign({},N,l)})},[]);return[o,c]}var L5e=typeof window<"u"?_.useLayoutEffect:_.useEffect,Ba=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},FN=new Map,j5e=function(i){L5e(function(){var e=i.current?i.current.ownerDocument:document;if(e!==void 0&&!FN.has(e)){var t=e.createElement("style");t.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,FN.set(e,t);var r=Ba();r&&t.setAttribute("nonce",r),e.head.appendChild(t)}},[])},d5e=function(i){var e=i.className,t=i.colorModel,r=i.color,s=r===void 0?t.defaultColor:r,o=i.onChange,n=sL(i,["className","colorModel","color","onChange"]),a=_.useRef(null);j5e(a);var c=g5e(t,s,o),l=c[0],N=c[1],u=cc(["react-colorful",e]);return M.createElement("div",an({},n,{ref:a,className:u}),M.createElement(l5e,{hsva:l,onChange:N}),M.createElement(u5e,{hue:l.h,onChange:N,className:"react-colorful__last-control"}))},y5e={defaultColor:"000",toHsva:s5e,fromHsva:function(i){return o5e({h:i.h,s:i.s,v:i.v,a:1})},equal:N5e},T5e=function(i){return M.createElement(d5e,an({},i,{colorModel:y5e}))};class D5e extends _.Component{dialogName;filters;filterFunc;constructor(e){super(e),this.dialogName=this.props.dialogName||"default",this.dialogName=`SelectID.${this.dialogName}`;const t=(window._localStorage||window.localStorage).getItem(this.dialogName)||"{}";try{this.filters=JSON.parse(t)}catch{this.filters={}}e.filters&&(this.filters={...this.filters,...e.filters||{}});let r=this.props.selected||[];if(Array.isArray(r)||(r=[r]),r=r.filter(s=>s),e.filterFunc)if(typeof e.filterFunc=="string")try{this.filterFunc=new Function("obj",e.filterFunc)}catch{console.error(`Cannot parse filter function: "obj => ${e.filterFunc}"`),this.filterFunc=void 0}else this.filterFunc=e.filterFunc;this.state={selected:r,name:"",selectionBlocked:!1}}handleCancel(){this.props.onClose()}handleOk(){this.props.onOk(this.props.multiSelect?this.state.selected:this.state.selected[0]||"",this.state.name),this.props.onClose()}render(){let e;return this.state.name||this.state.selected.length?this.state.selected.length===1?e=[M.createElement("span",{key:"selected"},p.t("ra_Selected")," "),M.createElement("span",{key:"id",style:{fontWeight:"bold",fontStyle:"italic"}},(this.state.name||this.state.selected[0])+(this.state.name?` [${this.state.selected[0]}]`:""))]:e=[M.createElement("span",{key:"selected"},p.t("ra_Selected")," "),M.createElement("span",{key:"id",style:{fontWeight:"bold",fontStyle:"italic"}},p.t("%s items",this.state.selected.length.toString()))]:e=this.props.title||p.t("ra_Please select object ID..."),M.createElement(j.Dialog,{onClose:()=>{},maxWidth:!1,style:{zIndex:this.props.zIndex||void 0},sx:{"& .MuiDialog-paper":{height:"95%",p:"4px",width:"100%",maxWidth:"100%",maxHeight:"calc(100% - 16px)"}},fullWidth:!0,open:!0,"aria-labelledby":"ar_dialog_selectid_title"},M.createElement(j.DialogTitle,{id:"ar_dialog_selectid_title",style:{whiteSpace:"nowrap",width:"calc(100% - 72px)",overflow:"hidden",display:"inline-block",textOverflow:"ellipsis"}},e),M.createElement(j.DialogContent,{style:{height:"100%",overflow:"hidden",padding:"8px 4px"}},M.createElement(r5e,{foldersFirst:this.props.foldersFirst,imagePrefix:this.props.imagePrefix||this.props.prefix,dateFormat:this.props.dateFormat,defaultFilters:this.filters,dialogName:this.dialogName,isFloatComma:this.props.isFloatComma,showExpertButton:this.props.showExpertButton!==void 0?this.props.showExpertButton:!0,expertMode:this.props.expertMode,columns:this.props.columns||["name","type","role","room","func","val"],types:this.props.types?Array.isArray(this.props.types)?this.props.types:[this.props.types]:["state"],root:this.props.root,t:p.t,lang:this.props.lang||p.getLanguage(),socket:this.props.socket,selected:this.state.selected,multiSelect:this.props.multiSelect,notEditable:this.props.notEditable===void 0?!0:this.props.notEditable,themeName:this.props.themeName,themeType:this.props.themeType,theme:this.props.theme,customFilter:this.props.customFilter,allowNonObjects:this.props.allowNonObjects,onFilterChanged:t=>{this.filters=t,(window._localStorage||window.localStorage).setItem(this.dialogName,JSON.stringify(t))},onSelect:async(t,r,s)=>{let o;if(Array.isArray(t)?o=t:o=[t],JSON.stringify(o)!==JSON.stringify(this.state.selected)){let n=!0;if(this.props.onSelectConfirm){const a={};for(const c of o)try{a[c]=await this.props.socket.getObject(c)}catch{}n=await this.props.onSelectConfirm(o,a)}this.setState({selected:o,name:r,selectionBlocked:!n},()=>s&&this.handleOk())}else s&&this.handleOk()},filterFunc:this.filterFunc,title:"",classes:{}})),M.createElement(j.DialogActions,null,M.createElement(j.Button,{id:`ar_dialog_selectid_ok_${this.props.dialogName||""}`,variant:"contained",onClick:()=>this.handleOk(),startIcon:M.createElement(O.Check,null),disabled:!this.state.selected.length||this.state.selectionBlocked,color:"primary"},this.props.ok||p.t("ra_Ok")),M.createElement(j.Button,{id:`ar_dialog_selectid_cancel_${this.props.dialogName||""}`,color:"grey",variant:"contained",onClick:()=>this.handleCancel(),startIcon:M.createElement(O.Cancel,null)},this.props.cancel||p.t("ra_Cancel"))))}}function Xt(i,e,t){if(typeof e=="string"&&(e=e.split(".")),!i)return null;if(e.length===1)return t&&t[i[e[0]]]?t[i[e[0]]]:i[e[0]];const r=e.shift();return Xt(i[r],e)}function ML(i,e,t){if(typeof e=="string"&&(e=e.split(".")),e.length===1)return i[e[0]]=t;const r=e.shift();return(i[r]===null||i[r]===void 0)&&(i[r]={}),ML(i[r],e,t)}const J={tableContainer:{width:"100%",height:"100%",overflow:"auto"},table:{width:"100%",minWidth:800,maxWidth:1920},cell:{paddingTop:0,paddingBottom:0,paddingLeft:4,paddingRight:4},rowMainWithChildren:{},rowMainWithoutChildren:{},rowNoEdit:{opacity:.3},cellExpand:{width:30},cellButton:{width:30},cellHeader:{fontWeight:"bold",background:i=>(i.palette.mode==="dark","#888"),color:i=>i.palette.mode==="dark"?"#EEE":"#111",height:48,wordBreak:"break-word",whiteSpace:"pre"},width_name_nicknames:{maxWidth:150},width_ioType:{maxWidth:100},width_type:{maxWidth:100},width_displayTraits:{maxWidth:100},width_roomHint:{maxWidth:100},rowSecondary:{fontStyle:"italic"},cellSecondary:{fontSize:10},visuallyHidden:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1},fieldEditWithButton:{width:"calc(100% - 33px)",display:"inline-block"},fieldEdit:{width:"100%",display:"inline-block",lineHeight:"50px",verticalAlign:"middle"},fieldButton:{width:30,display:"inline-block"},colorDialog:{overflow:"hidden",padding:15},subText:{fontSize:10,fontStyle:"italic"},glow:{animation:"glow 0.2s 2 alternate"}};function JN(i,e,t,r){const s=Xt(i,t,r)||"",o=Xt(e,t,r)||"";return o<s?-1:o>s?1:0}function h5e(i,e,t){return i==="desc"?(r,s)=>JN(r,s,e,t):(r,s)=>-JN(r,s,e,t)}function p5e(i,e){const t=i.map((r,s)=>({e:r,i:s}));return t.sort((r,s)=>{const o=e(r.e,s.e);return o||r.i-s.i}),t.map(r=>r.e)}class Fa extends _.Component{selectCallback=null;updateTimeout=null;constructor(e){super(e);let t=(window._localStorage||window.localStorage).getItem(this.props.name||"iob-table")||"[]";try{t=JSON.parse(t)||[]}catch{t=[]}Array.isArray(t)||(t=[]),this.state={opened:t,editMode:!1,deleteMode:!1,editData:null,order:"asc",update:null,orderBy:this.props.columns[0].field,showSelectColor:!1}}static getDerivedStateFromProps(e,t){if(e.glowOnChange){const r=[];let s=0;return e.data&&t.data&&e.data.forEach(o=>{var a;s++;const n=(a=t.data)==null?void 0:a.find(c=>c.id===o.id);n?JSON.stringify(n)!==JSON.stringify(o)&&r.push(o.id):r.push(o.id)}),r.length&&r.length!==s?{data:e.data,update:r}:{data:e.data}}return{data:e.data}}renderCellEdit(e,t){let r=Xt(e,t.field);return Array.isArray(r)&&(r=r[0]),t.lookup?this.renderCellEditSelect(t,r):t.editComponent?this.renderCellEditCustom(t,r,e):t.type==="boolean"||!t.type&&typeof r=="boolean"?this.renderCellEditBoolean(t,r):t.type==="color"?this.renderCellEditColor(t,r):t.type==="oid"?this.renderCellEditObjectID(t,r):t.type==="numeric"?this.renderCellEditNumber(t,r):this.renderCellEditString(t,r)}onChange(e,t,r){const s=this.state.editData?{...this.state.editData}:{};r===t?delete s[e.field]:s[e.field]=r,this.setState({editData:s})}renderCellEditSelect(e,t){return M.createElement(j.Select,{variant:"standard",onChange:r=>this.onChange(e,t,r.target.value),value:this.state.editData&&this.state.editData[e.field]||t},e.lookup&&Object.keys(e.lookup).map((r,s)=>{var o;return M.createElement(j.MenuItem,{key:s,value:r},(o=e.lookup)==null?void 0:o[r])}))}renderCellEditString(e,t){return M.createElement(j.TextField,{variant:"standard",style:J.fieldEdit,fullWidth:!0,value:this.state.editData&&this.state.editData[e.field]!==void 0?this.state.editData[e.field]:t,onChange:r=>this.onChange(e,t,r.target.value)})}renderCellEditNumber(e,t){return M.createElement(j.TextField,{variant:"standard",style:J.fieldEdit,type:"number",fullWidth:!0,value:this.state.editData&&this.state.editData[e.field]!==void 0?this.state.editData[e.field]:t,onChange:r=>this.onChange(e,t,r.target.value)})}renderCellEditCustom(e,t,r){const s=e.editComponent;return this.state.editData&&this.state.editData[e.field]!==void 0&&(t=this.state.editData[e.field],r=JSON.parse(JSON.stringify(r)),r[e.field]=t),s?M.createElement(s,{value:t,rowData:r,onChange:o=>this.onChange(e,t,o)}):null}renderCellEditBoolean(e,t){return M.createElement(j.Checkbox,{checked:this.state.editData&&this.state.editData[e.field]!==void 0?!!this.state.editData[e.field]:!!t,onChange:r=>this.onChange(e,!!t,r.target.checked),inputProps:{"aria-label":"checkbox"}})}renderSelectColorDialog(){return M.createElement(j.Dialog,{sx:{"& .MuiPaper-root":J.root,"& .MuiPaper-paper":J.paper},onClose:()=>{this.selectCallback=null,this.setState({showSelectColor:!1})},open:this.state.showSelectColor},M.createElement(T5e,{color:this.state.selectIdValue,onChange:e=>this.setState({selectIdValue:e},()=>{this.selectCallback&&this.selectCallback(e)})}))}renderCellEditColor(e,t){const r=this.state.editData&&this.state.editData[e.field]!==void 0?this.state.editData[e.field]:t;return M.createElement("div",{style:J.fieldEdit},M.createElement(j.TextField,{variant:"standard",fullWidth:!0,style:J.fieldEditWithButton,value:r,inputProps:{style:{backgroundColor:r,color:E.isUseBright(r)?"#FFF":"#000"}},onChange:s=>this.onChange(e,!!t,s.target.value)}),M.createElement(j.IconButton,{style:J.fieldButton,onClick:()=>{this.selectCallback=s=>this.onChange(e,t,s),this.setState({showSelectColor:!0,selectIdValue:t})},size:"large"},M.createElement(O.Colorize,null)))}renderSelectIdDialog(){return this.state.showSelectId&&this.props.socket?M.createElement(D5e,{key:"tableSelect",imagePrefix:"../..",dialogName:this.props.adapterName,themeType:this.props.themeType,theme:this.props.theme,socket:this.props.socket,selected:this.state.selectIdValue,onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{this.setState({showSelectId:!1,selectIdValue:null});const t=Array.isArray(e)?e[0]:e;t&&this.selectCallback&&(this.selectCallback&&this.selectCallback(t),this.selectCallback=null)}}):null}renderCellEditObjectID(e,t){return M.createElement("div",{style:J.fieldEdit},M.createElement(j.TextField,{variant:"standard",fullWidth:!0,style:J.fieldEditWithButton,value:this.state.editData&&this.state.editData[e.field]!==void 0?this.state.editData[e.field]:t,onChange:r=>this.onChange(e,t,r.target.value)}),M.createElement(j.IconButton,{style:J.fieldButton,onClick:()=>{this.selectCallback=r=>this.onChange(e,t,r),this.setState({showSelectId:!0,selectIdValue:t})},size:"large"},M.createElement(O.ViewHeadline,null)))}static renderCellNonEdit(e,t){let r=Xt(e,t.field,t.lookup);return Array.isArray(r)&&(r=r[0]),t.type==="boolean"?M.createElement(j.Checkbox,{checked:!!r,disabled:!0,inputProps:{"aria-label":"checkbox"}}):r}renderCell(e,t,r,s){return this.state.editMode===s&&t.editable!=="never"&&t.editable!==!1?M.createElement(j.TableCell,{key:t.field,style:{...J.cell,...r?J.cellSecondary:void 0,...t.cellStyle},component:"th"},this.renderCellEdit(e,t)):M.createElement(j.TableCell,{key:t.field,style:{...J.cell,...r?J.cellSecondary:void 0,...t.cellStyle},component:"th"},Fa.renderCellNonEdit(e,t))}static renderCellWithSubField(e,t){const r=Xt(e,t.field,t.lookup);if(t.subField){const s=Xt(e,t.subField,t.subLookup);return M.createElement("div",null,M.createElement("div",{style:J.mainText},r),M.createElement("div",{style:{...J.subText,...t.subStyle||void 0}},s))}return M.createElement("div",null,M.createElement("div",{style:J.mainText},r))}renderLine(e,t){const r=this.props.levelShift===void 0?24:this.props.levelShift;t=t||0;const s=this.props.data.indexOf(e);if(!e||!t&&e.parentId||t&&!e.parentId)return null;const o=this.state.opened.includes(e.id),n=this.props.data.filter(c=>c.parentId===e.id),a=M.createElement(j.TableRow,{key:e.id,className:`table-row-${(e.id||"").toString().replace(/[.$]/g,"_")}`,style:{...this.state.update&&this.state.update.includes(e.id)&&J.glow||void 0,...J.row,...t?J.rowSecondary:void 0,...!t&&n.length?J.rowMainWithChildren:void 0,...!t&&!n.length?J.rowMainWithoutChildren:void 0,...this.state.editMode!==!1&&this.state.editMode!==s?J.rowNoEdit:void 0,...this.state.deleteMode!==!1&&this.state.deleteMode!==s?J.rowNoEdit:void 0}},M.createElement(j.TableCell,{style:{...J.cell,...J.cellExpand,...t?J.cellSecondary:void 0}},n.length?M.createElement(j.IconButton,{onClick:()=>{const c=[...this.state.opened],l=c.indexOf(e.id);l===-1?(c.push(e.id),c.sort()):c.splice(l,1),(window._localStorage||window.localStorage).setItem(this.props.name||"iob-table",JSON.stringify(c)),this.setState({opened:c})},size:"small"},o?M.createElement(O.ExpandMore,null):M.createElement(O.NavigateNext,null)):null),M.createElement(j.TableCell,{scope:"row",style:{...J.cell,...t?J.cellSecondary:void 0,...this.props.columns[0].cellStyle,paddingLeft:r*t}},this.props.columns[0].subField?Fa.renderCellWithSubField(e,this.props.columns[0]):Xt(e,this.props.columns[0].field,this.props.columns[0].lookup)),this.props.columns.map((c,l)=>!l&&!c.hidden?null:this.renderCell(e,c,t,s)),this.props.onUpdate?M.createElement(j.TableCell,{style:{...J.cell,...J.cellButton}},this.state.editMode===s||this.state.deleteMode===s?M.createElement(j.IconButton,{disabled:this.state.editMode!==!1&&(!this.state.editData||!Object.keys(this.state.editData).length),onClick:()=>{if(this.state.editMode!==!1){const c=JSON.parse(JSON.stringify(e));this.state.editData&&Object.keys(this.state.editData).forEach(l=>{var N;return ML(c,l,(N=this.state.editData)==null?void 0:N[l])}),this.setState({editMode:!1},()=>this.props.onUpdate&&this.props.onUpdate(c,e))}else this.setState({deleteMode:!1},()=>this.props.onDelete&&this.props.onDelete(e))},size:"large"},M.createElement(O.Check,null)):M.createElement(j.IconButton,{disabled:this.state.editMode!==!1,onClick:()=>this.setState({editMode:s,editData:null}),size:"large"},M.createElement(O.Edit,null))):null,this.props.onDelete&&!this.props.onUpdate?M.createElement(j.TableCell,{style:{...J.cell,...J.cellButton}},this.state.deleteMode===s?M.createElement(j.IconButton,{disabled:this.state.editMode!==!1&&(!this.state.editData||!Object.keys(this.state.editData).length),onClick:()=>this.setState({deleteMode:!1},()=>this.props.onDelete&&this.props.onDelete(e)),size:"large"},M.createElement(O.Check,null)):null):null,this.props.onUpdate||this.props.onDelete?M.createElement(j.TableCell,{style:{...J.cell,...J.cellButton}},this.state.editMode===s||this.state.deleteMode===s?M.createElement(j.IconButton,{onClick:()=>this.setState({editMode:!1,deleteMode:!1}),size:"large"},M.createElement(O.Close,null)):this.props.onDelete?M.createElement(j.IconButton,{disabled:this.state.deleteMode!==!1,onClick:()=>this.setState({deleteMode:s}),size:"large"},M.createElement(O.Delete,null)):null):null);if(!t&&o){const c=n.map(l=>this.renderLine(l,t+1));return c.unshift(a),c}return a}handleRequestSort(e){const t=this.state.orderBy===e&&this.state.order==="asc";this.setState({order:t?"desc":"asc",orderBy:e})}renderHead(){return M.createElement(j.TableHead,null,M.createElement(j.TableRow,{key:"headerRow"},M.createElement(j.TableCell,{component:"th",sx:E.getStyle(this.props.theme,J.cell,J.cellHeader,J.cellExpand)}),M.createElement(j.TableCell,{component:"th",sx:E.getStyle(this.props.theme,J.cell,J.cellHeader,J[`width_${this.props.columns[0].field.replace(/\./g,"_")}`]),style:this.props.columns[0].headerStyle||this.props.columns[0].cellStyle,sortDirection:this.props.noSort?!1:this.state.orderBy===this.props.columns[0].field?this.state.order:!1},this.props.noSort?null:M.createElement(j.TableSortLabel,{active:this.state.orderBy===this.props.columns[0].field,direction:this.state.orderBy===this.props.columns[0].field?this.state.order:"asc",onClick:()=>this.handleRequestSort(this.props.columns[0].field)},this.props.columns[0].title||this.props.columns[0].field,this.state.orderBy===this.props.columns[0].field?M.createElement("span",{style:J.visuallyHidden},this.state.order==="desc"?"sorted descending":"sorted ascending"):null)),this.props.columns.map((e,t)=>!t&&!e.hidden?null:M.createElement(j.TableCell,{key:e.field,sx:E.getStyle(this.props.theme,J.cell,J.cellHeader,J[`width_${e.field.replace(/\./g,"_")}`]),style:e.headerStyle||e.cellStyle,component:"th"},this.props.noSort?null:M.createElement(j.TableSortLabel,{active:this.state.orderBy===e.field,direction:this.state.orderBy===e.field?this.state.order:"asc",onClick:()=>this.handleRequestSort(e.field)},e.title||e.field,this.state.orderBy===e.field?M.createElement("span",{style:J.visuallyHidden},this.state.order==="desc"?"sorted descending":"sorted ascending"):null))),this.props.onUpdate?M.createElement(j.TableCell,{component:"th",sx:E.getStyle(this.props.theme,J.cell,J.cellHeader,J.cellButton)},this.props.noAdd?null:M.createElement(j.Fab,{color:"primary",size:"small",disabled:this.state.editMode!==!1,onClick:()=>this.props.onUpdate&&this.props.onUpdate(!0)},M.createElement(O.Add,null))):null,this.props.onDelete||this.props.onUpdate?M.createElement(j.TableCell,{component:"th",sx:E.getStyle(this.props.theme,J.cell,J.cellHeader,J.cellButton)}):null))}render(){const e=this.props.columns.find(t=>t.field===this.state.orderBy);if(e){const t=e.lookup,r=p5e(this.props.data,h5e(this.state.order,this.state.orderBy,t));return this.state.update&&this.state.update.length&&(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=null,this.setState({update:null})},500)),M.createElement("div",{style:J.tableContainer,className:this.props.className},M.createElement(j.Table,{style:J.table,"aria-label":"simple table",size:"small",stickyHeader:!0},this.renderHead(),M.createElement(j.TableBody,null,r.map(s=>this.renderLine(s)))),this.renderSelectIdDialog(),this.renderSelectColorDialog())}return null}}/*!
487
488
  * Cropper.js v1.6.2
488
489
  * https://fengyuanchen.github.io/cropperjs
489
490
  *
@@ -492,7 +493,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
492
493
  *
493
494
  * Date: 2024-04-21T07:43:05.335Z
494
495
  */function GN(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),t.push.apply(t,r)}return t}function cL(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?GN(Object(t),!0).forEach(function(r){I5e(i,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):GN(Object(t)).forEach(function(r){Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(t,r))})}return i}function z5e(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var r=t.call(i,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}function uL(i){var e=z5e(i,"string");return typeof e=="symbol"?e:e+""}function Ja(i){"@babel/helpers - typeof";return Ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ja(i)}function w5e(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function HN(i,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,uL(r.key),r)}}function C5e(i,e,t){return e&&HN(i.prototype,e),t&&HN(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}function I5e(i,e,t){return e=uL(e),e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function lL(i){return m5e(i)||A5e(i)||f5e(i)||x5e()}function m5e(i){if(Array.isArray(i))return Ga(i)}function A5e(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function f5e(i,e){if(i){if(typeof i=="string")return Ga(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ga(i,e)}}function Ga(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=i[t];return r}function x5e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
495
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Mn=typeof window<"u"&&typeof window.document<"u",wt=Mn?window:{},uc=Mn&&wt.document.documentElement?"ontouchstart"in wt.document.documentElement:!1,lc=Mn?"PointerEvent"in wt:!1,ge="cropper",Nc="all",NL="crop",gL="move",LL="zoom",gi="e",Li="w",Fi="s",Gt="n",Jr="ne",Gr="nw",Hr="se",Vr="sw",Ha="".concat(ge,"-crop"),VN="".concat(ge,"-disabled"),Fe="".concat(ge,"-hidden"),ZN="".concat(ge,"-hide"),O5e="".concat(ge,"-invisible"),So="".concat(ge,"-modal"),Va="".concat(ge,"-move"),Ls="".concat(ge,"Action"),to="".concat(ge,"Preview"),gc="crop",jL="move",dL="none",Za="crop",Xa="cropend",Ka="cropmove",qa="cropstart",XN="dblclick",E5e=uc?"touchstart":"mousedown",_5e=uc?"touchmove":"mousemove",S5e=uc?"touchend touchcancel":"mouseup",KN=lc?"pointerdown":E5e,qN=lc?"pointermove":_5e,e0=lc?"pointerup pointercancel":S5e,t0="ready",i0="resize",r0="wheel",eM="zoom",s0="image/jpeg",k5e=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,v5e=/^data:/,b5e=/^data:image\/jpeg;base64,/,Y5e=/^img|canvas$/i,yL=200,TL=100,o0={viewMode:0,dragMode:gc,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:yL,minContainerHeight:TL,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Q5e='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',U5e=Number.isNaN||wt.isNaN;function ie(i){return typeof i=="number"&&!U5e(i)}var n0=function(e){return e>0&&e<1/0};function Zn(i){return typeof i>"u"}function Ai(i){return Ja(i)==="object"&&i!==null}var $5e=Object.prototype.hasOwnProperty;function ur(i){if(!Ai(i))return!1;try{var e=i.constructor,t=e.prototype;return e&&t&&$5e.call(t,"isPrototypeOf")}catch{return!1}}function Be(i){return typeof i=="function"}var P5e=Array.prototype.slice;function DL(i){return Array.from?Array.from(i):P5e.call(i)}function Ce(i,e){return i&&Be(e)&&(Array.isArray(i)||ie(i.length)?DL(i).forEach(function(t,r){e.call(i,t,r,i)}):Ai(i)&&Object.keys(i).forEach(function(t){e.call(i,i[t],t,i)})),i}var je=Object.assign||function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];return Ai(e)&&r.length>0&&r.forEach(function(o){Ai(o)&&Object.keys(o).forEach(function(n){e[n]=o[n]})}),e},R5e=/\.\d*(?:0|9){12}\d*$/;function gr(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return R5e.test(i)?Math.round(i*e)/e:i}var W5e=/^width|height|left|top|marginLeft|marginTop$/;function qt(i,e){var t=i.style;Ce(e,function(r,s){W5e.test(s)&&ie(r)&&(r="".concat(r,"px")),t[s]=r})}function B5e(i,e){return i.classList?i.classList.contains(e):i.className.indexOf(e)>-1}function Ae(i,e){if(e){if(ie(i.length)){Ce(i,function(r){Ae(r,e)});return}if(i.classList){i.classList.add(e);return}var t=i.className.trim();t?t.indexOf(e)<0&&(i.className="".concat(t," ").concat(e)):i.className=e}}function zt(i,e){if(e){if(ie(i.length)){Ce(i,function(t){zt(t,e)});return}if(i.classList){i.classList.remove(e);return}i.className.indexOf(e)>=0&&(i.className=i.className.replace(e,""))}}function lr(i,e,t){if(e){if(ie(i.length)){Ce(i,function(r){lr(r,e,t)});return}t?Ae(i,e):zt(i,e)}}var F5e=/([a-z\d])([A-Z])/g;function Lc(i){return i.replace(F5e,"$1-$2").toLowerCase()}function tM(i,e){return Ai(i[e])?i[e]:i.dataset?i.dataset[e]:i.getAttribute("data-".concat(Lc(e)))}function js(i,e,t){Ai(t)?i[e]=t:i.dataset?i.dataset[e]=t:i.setAttribute("data-".concat(Lc(e)),t)}function J5e(i,e){if(Ai(i[e]))try{delete i[e]}catch{i[e]=void 0}else if(i.dataset)try{delete i.dataset[e]}catch{i.dataset[e]=void 0}else i.removeAttribute("data-".concat(Lc(e)))}var hL=/\s\s*/,pL=function(){var i=!1;if(Mn){var e=!1,t=function(){},r=Object.defineProperty({},"once",{get:function(){return i=!0,e},set:function(o){e=o}});wt.addEventListener("test",t,r),wt.removeEventListener("test",t,r)}return i}();function at(i,e,t){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=t;e.trim().split(hL).forEach(function(o){if(!pL){var n=i.listeners;n&&n[o]&&n[o][t]&&(s=n[o][t],delete n[o][t],Object.keys(n[o]).length===0&&delete n[o],Object.keys(n).length===0&&delete i.listeners)}i.removeEventListener(o,s,r)})}function et(i,e,t){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=t;e.trim().split(hL).forEach(function(o){if(r.once&&!pL){var n=i.listeners,a=n===void 0?{}:n;s=function(){delete a[o][t],i.removeEventListener(o,s,r);for(var l=arguments.length,N=new Array(l),u=0;u<l;u++)N[u]=arguments[u];t.apply(i,N)},a[o]||(a[o]={}),a[o][t]&&i.removeEventListener(o,a[o][t],r),a[o][t]=s,i.listeners=a}i.addEventListener(o,s,r)})}function Lr(i,e,t){var r;return Be(Event)&&Be(CustomEvent)?r=new CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(e,!0,!0,t)),i.dispatchEvent(r)}function zL(i){var e=i.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Xn=wt.location,G5e=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function a0(i){var e=i.match(G5e);return e!==null&&(e[1]!==Xn.protocol||e[2]!==Xn.hostname||e[3]!==Xn.port)}function M0(i){var e="timestamp=".concat(new Date().getTime());return i+(i.indexOf("?")===-1?"?":"&")+e}function ns(i){var e=i.rotate,t=i.scaleX,r=i.scaleY,s=i.translateX,o=i.translateY,n=[];ie(s)&&s!==0&&n.push("translateX(".concat(s,"px)")),ie(o)&&o!==0&&n.push("translateY(".concat(o,"px)")),ie(e)&&e!==0&&n.push("rotate(".concat(e,"deg)")),ie(t)&&t!==1&&n.push("scaleX(".concat(t,")")),ie(r)&&r!==1&&n.push("scaleY(".concat(r,")"));var a=n.length?n.join(" "):"none";return{WebkitTransform:a,msTransform:a,transform:a}}function H5e(i){var e=cL({},i),t=0;return Ce(i,function(r,s){delete e[s],Ce(e,function(o){var n=Math.abs(r.startX-o.startX),a=Math.abs(r.startY-o.startY),c=Math.abs(r.endX-o.endX),l=Math.abs(r.endY-o.endY),N=Math.sqrt(n*n+a*a),u=Math.sqrt(c*c+l*l),g=(u-N)/N;Math.abs(g)>Math.abs(t)&&(t=g)})}),t}function io(i,e){var t=i.pageX,r=i.pageY,s={endX:t,endY:r};return e?s:cL({startX:t,startY:r},s)}function V5e(i){var e=0,t=0,r=0;return Ce(i,function(s){var o=s.startX,n=s.startY;e+=o,t+=n,r+=1}),e/=r,t/=r,{pageX:e,pageY:t}}function ei(i){var e=i.aspectRatio,t=i.height,r=i.width,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",o=n0(r),n=n0(t);if(o&&n){var a=t*e;s==="contain"&&a>r||s==="cover"&&a<r?t=r/e:r=t*e}else o?t=r/e:n&&(r=t*e);return{width:r,height:t}}function Z5e(i){var e=i.width,t=i.height,r=i.degree;if(r=Math.abs(r)%180,r===90)return{width:t,height:e};var s=r%90*Math.PI/180,o=Math.sin(s),n=Math.cos(s),a=e*n+t*o,c=e*o+t*n;return r>90?{width:c,height:a}:{width:a,height:c}}function X5e(i,e,t,r){var s=e.aspectRatio,o=e.naturalWidth,n=e.naturalHeight,a=e.rotate,c=a===void 0?0:a,l=e.scaleX,N=l===void 0?1:l,u=e.scaleY,g=u===void 0?1:u,L=t.aspectRatio,d=t.naturalWidth,y=t.naturalHeight,D=r.fillColor,z=D===void 0?"transparent":D,A=r.imageSmoothingEnabled,C=A===void 0?!0:A,f=r.imageSmoothingQuality,m=f===void 0?"low":f,h=r.maxWidth,x=h===void 0?1/0:h,b=r.maxHeight,v=b===void 0?1/0:b,W=r.minWidth,Y=W===void 0?0:W,q=r.minHeight,ce=q===void 0?0:q,B=document.createElement("canvas"),G=B.getContext("2d"),Ie=ei({aspectRatio:L,width:x,height:v}),Pe=ei({aspectRatio:L,width:Y,height:ce},"cover"),ve=Math.min(Ie.width,Math.max(Pe.width,d)),pe=Math.min(Ie.height,Math.max(Pe.height,y)),Sr=ei({aspectRatio:s,width:x,height:v}),Pt=ei({aspectRatio:s,width:Y,height:ce},"cover"),gt=Math.min(Sr.width,Math.max(Pt.width,o)),Rt=Math.min(Sr.height,Math.max(Pt.height,n)),ot=[-gt/2,-Rt/2,gt,Rt];return B.width=gr(ve),B.height=gr(pe),G.fillStyle=z,G.fillRect(0,0,ve,pe),G.save(),G.translate(ve/2,pe/2),G.rotate(c*Math.PI/180),G.scale(N,g),G.imageSmoothingEnabled=C,G.imageSmoothingQuality=m,G.drawImage.apply(G,[i].concat(lL(ot.map(function(Mi){return Math.floor(gr(Mi))})))),G.restore(),B}var wL=String.fromCharCode;function K5e(i,e,t){var r="";t+=e;for(var s=e;s<t;s+=1)r+=wL(i.getUint8(s));return r}var q5e=/^data:.*,/;function eke(i){var e=i.replace(q5e,""),t=atob(e),r=new ArrayBuffer(t.length),s=new Uint8Array(r);return Ce(s,function(o,n){s[n]=t.charCodeAt(n)}),r}function tke(i,e){for(var t=[],r=8192,s=new Uint8Array(i);s.length>0;)t.push(wL.apply(null,DL(s.subarray(0,r)))),s=s.subarray(r);return"data:".concat(e,";base64,").concat(btoa(t.join("")))}function ike(i){var e=new DataView(i),t;try{var r,s,o;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(var n=e.byteLength,a=2;a+1<n;){if(e.getUint8(a)===255&&e.getUint8(a+1)===225){s=a;break}a+=1}if(s){var c=s+4,l=s+10;if(K5e(e,c,4)==="Exif"){var N=e.getUint16(l);if(r=N===18761,(r||N===19789)&&e.getUint16(l+2,r)===42){var u=e.getUint32(l+4,r);u>=8&&(o=l+u)}}}if(o){var g=e.getUint16(o,r),L,d;for(d=0;d<g;d+=1)if(L=o+d*12+2,e.getUint16(L,r)===274){L+=8,t=e.getUint16(L,r),e.setUint16(L,1,r);break}}}catch{t=1}return t}function rke(i){var e=0,t=1,r=1;switch(i){case 2:t=-1;break;case 3:e=-180;break;case 4:r=-1;break;case 5:e=90,r=-1;break;case 6:e=90;break;case 7:e=90,t=-1;break;case 8:e=-90;break}return{rotate:e,scaleX:t,scaleY:r}}var ske={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,r=this.container,s=this.cropper,o=Number(t.minContainerWidth),n=Number(t.minContainerHeight);Ae(s,Fe),zt(e,Fe);var a={width:Math.max(r.offsetWidth,o>=0?o:yL),height:Math.max(r.offsetHeight,n>=0?n:TL)};this.containerData=a,qt(s,{width:a.width,height:a.height}),Ae(e,Fe),zt(s,Fe)},initCanvas:function(){var e=this.containerData,t=this.imageData,r=this.options.viewMode,s=Math.abs(t.rotate)%180===90,o=s?t.naturalHeight:t.naturalWidth,n=s?t.naturalWidth:t.naturalHeight,a=o/n,c=e.width,l=e.height;e.height*a>e.width?r===3?c=e.height*a:l=e.width/a:r===3?l=e.width/a:c=e.height*a;var N={aspectRatio:a,naturalWidth:o,naturalHeight:n,width:c,height:l};this.canvasData=N,this.limited=r===1||r===2,this.limitCanvas(!0,!0),N.width=Math.min(Math.max(N.width,N.minWidth),N.maxWidth),N.height=Math.min(Math.max(N.height,N.minHeight),N.maxHeight),N.left=(e.width-N.width)/2,N.top=(e.height-N.height)/2,N.oldLeft=N.left,N.oldTop=N.top,this.initialCanvasData=je({},N)},limitCanvas:function(e,t){var r=this.options,s=this.containerData,o=this.canvasData,n=this.cropBoxData,a=r.viewMode,c=o.aspectRatio,l=this.cropped&&n;if(e){var N=Number(r.minCanvasWidth)||0,u=Number(r.minCanvasHeight)||0;a>1?(N=Math.max(N,s.width),u=Math.max(u,s.height),a===3&&(u*c>N?N=u*c:u=N/c)):a>0&&(N?N=Math.max(N,l?n.width:0):u?u=Math.max(u,l?n.height:0):l&&(N=n.width,u=n.height,u*c>N?N=u*c:u=N/c));var g=ei({aspectRatio:c,width:N,height:u});N=g.width,u=g.height,o.minWidth=N,o.minHeight=u,o.maxWidth=1/0,o.maxHeight=1/0}if(t)if(a>(l?0:1)){var L=s.width-o.width,d=s.height-o.height;o.minLeft=Math.min(0,L),o.minTop=Math.min(0,d),o.maxLeft=Math.max(0,L),o.maxTop=Math.max(0,d),l&&this.limited&&(o.minLeft=Math.min(n.left,n.left+(n.width-o.width)),o.minTop=Math.min(n.top,n.top+(n.height-o.height)),o.maxLeft=n.left,o.maxTop=n.top,a===2&&(o.width>=s.width&&(o.minLeft=Math.min(0,L),o.maxLeft=Math.max(0,L)),o.height>=s.height&&(o.minTop=Math.min(0,d),o.maxTop=Math.max(0,d))))}else o.minLeft=-o.width,o.minTop=-o.height,o.maxLeft=s.width,o.maxTop=s.height},renderCanvas:function(e,t){var r=this.canvasData,s=this.imageData;if(t){var o=Z5e({width:s.naturalWidth*Math.abs(s.scaleX||1),height:s.naturalHeight*Math.abs(s.scaleY||1),degree:s.rotate||0}),n=o.width,a=o.height,c=r.width*(n/r.naturalWidth),l=r.height*(a/r.naturalHeight);r.left-=(c-r.width)/2,r.top-=(l-r.height)/2,r.width=c,r.height=l,r.aspectRatio=n/a,r.naturalWidth=n,r.naturalHeight=a,this.limitCanvas(!0,!1)}(r.width>r.maxWidth||r.width<r.minWidth)&&(r.left=r.oldLeft),(r.height>r.maxHeight||r.height<r.minHeight)&&(r.top=r.oldTop),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),this.limitCanvas(!1,!0),r.left=Math.min(Math.max(r.left,r.minLeft),r.maxLeft),r.top=Math.min(Math.max(r.top,r.minTop),r.maxTop),r.oldLeft=r.left,r.oldTop=r.top,qt(this.canvas,je({width:r.width,height:r.height},ns({translateX:r.left,translateY:r.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,r=this.imageData,s=r.naturalWidth*(t.width/t.naturalWidth),o=r.naturalHeight*(t.height/t.naturalHeight);je(r,{width:s,height:o,left:(t.width-s)/2,top:(t.height-o)/2}),qt(this.image,je({width:r.width,height:r.height},ns(je({translateX:r.left,translateY:r.top},r)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,r=e.aspectRatio||e.initialAspectRatio,s=Number(e.autoCropArea)||.8,o={width:t.width,height:t.height};r&&(t.height*r>t.width?o.height=o.width/r:o.width=o.height*r),this.cropBoxData=o,this.limitCropBox(!0,!0),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),o.width=Math.max(o.minWidth,o.width*s),o.height=Math.max(o.minHeight,o.height*s),o.left=t.left+(t.width-o.width)/2,o.top=t.top+(t.height-o.height)/2,o.oldLeft=o.left,o.oldTop=o.top,this.initialCropBoxData=je({},o)},limitCropBox:function(e,t){var r=this.options,s=this.containerData,o=this.canvasData,n=this.cropBoxData,a=this.limited,c=r.aspectRatio;if(e){var l=Number(r.minCropBoxWidth)||0,N=Number(r.minCropBoxHeight)||0,u=a?Math.min(s.width,o.width,o.width+o.left,s.width-o.left):s.width,g=a?Math.min(s.height,o.height,o.height+o.top,s.height-o.top):s.height;l=Math.min(l,s.width),N=Math.min(N,s.height),c&&(l&&N?N*c>l?N=l/c:l=N*c:l?N=l/c:N&&(l=N*c),g*c>u?g=u/c:u=g*c),n.minWidth=Math.min(l,u),n.minHeight=Math.min(N,g),n.maxWidth=u,n.maxHeight=g}t&&(a?(n.minLeft=Math.max(0,o.left),n.minTop=Math.max(0,o.top),n.maxLeft=Math.min(s.width,o.left+o.width)-n.width,n.maxTop=Math.min(s.height,o.top+o.height)-n.height):(n.minLeft=0,n.minTop=0,n.maxLeft=s.width-n.width,n.maxTop=s.height-n.height))},renderCropBox:function(){var e=this.options,t=this.containerData,r=this.cropBoxData;(r.width>r.maxWidth||r.width<r.minWidth)&&(r.left=r.oldLeft),(r.height>r.maxHeight||r.height<r.minHeight)&&(r.top=r.oldTop),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),this.limitCropBox(!1,!0),r.left=Math.min(Math.max(r.left,r.minLeft),r.maxLeft),r.top=Math.min(Math.max(r.top,r.minTop),r.maxTop),r.oldLeft=r.left,r.oldTop=r.top,e.movable&&e.cropBoxMovable&&js(this.face,Ls,r.width>=t.width&&r.height>=t.height?gL:Nc),qt(this.cropBox,je({width:r.width,height:r.height},ns({translateX:r.left,translateY:r.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Lr(this.element,Za,this.getData())}},oke={initPreview:function(){var e=this.element,t=this.crossOrigin,r=this.options.preview,s=t?this.crossOriginUrl:this.url,o=e.alt||"The image to preview",n=document.createElement("img");if(t&&(n.crossOrigin=t),n.src=s,n.alt=o,this.viewBox.appendChild(n),this.viewBoxImage=n,!!r){var a=r;typeof r=="string"?a=e.ownerDocument.querySelectorAll(r):r.querySelector&&(a=[r]),this.previews=a,Ce(a,function(c){var l=document.createElement("img");js(c,to,{width:c.offsetWidth,height:c.offsetHeight,html:c.innerHTML}),t&&(l.crossOrigin=t),l.src=s,l.alt=o,l.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',c.innerHTML="",c.appendChild(l)})}},resetPreview:function(){Ce(this.previews,function(e){var t=tM(e,to);qt(e,{width:t.width,height:t.height}),e.innerHTML=t.html,J5e(e,to)})},preview:function(){var e=this.imageData,t=this.canvasData,r=this.cropBoxData,s=r.width,o=r.height,n=e.width,a=e.height,c=r.left-t.left-e.left,l=r.top-t.top-e.top;!this.cropped||this.disabled||(qt(this.viewBoxImage,je({width:n,height:a},ns(je({translateX:-c,translateY:-l},e)))),Ce(this.previews,function(N){var u=tM(N,to),g=u.width,L=u.height,d=g,y=L,D=1;s&&(D=g/s,y=o*D),o&&y>L&&(D=L/o,d=s*D,y=L),qt(N,{width:d,height:y}),qt(N.getElementsByTagName("img")[0],je({width:n*D,height:a*D},ns(je({translateX:-c*D,translateY:-l*D},e))))}))}},nke={bind:function(){var e=this.element,t=this.options,r=this.cropper;Be(t.cropstart)&&et(e,qa,t.cropstart),Be(t.cropmove)&&et(e,Ka,t.cropmove),Be(t.cropend)&&et(e,Xa,t.cropend),Be(t.crop)&&et(e,Za,t.crop),Be(t.zoom)&&et(e,eM,t.zoom),et(r,KN,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&et(r,r0,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&et(r,XN,this.onDblclick=this.dblclick.bind(this)),et(e.ownerDocument,qN,this.onCropMove=this.cropMove.bind(this)),et(e.ownerDocument,e0,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&et(window,i0,this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,r=this.cropper;Be(t.cropstart)&&at(e,qa,t.cropstart),Be(t.cropmove)&&at(e,Ka,t.cropmove),Be(t.cropend)&&at(e,Xa,t.cropend),Be(t.crop)&&at(e,Za,t.crop),Be(t.zoom)&&at(e,eM,t.zoom),at(r,KN,this.onCropStart),t.zoomable&&t.zoomOnWheel&&at(r,r0,this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&at(r,XN,this.onDblclick),at(e.ownerDocument,qN,this.onCropMove),at(e.ownerDocument,e0,this.onCropEnd),t.responsive&&at(window,i0,this.onResize)}},ake={resize:function(){if(!this.disabled){var e=this.options,t=this.container,r=this.containerData,s=t.offsetWidth/r.width,o=t.offsetHeight/r.height,n=Math.abs(s-1)>Math.abs(o-1)?s:o;if(n!==1){var a,c;e.restore&&(a=this.getCanvasData(),c=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(Ce(a,function(l,N){a[N]=l*n})),this.setCropBoxData(Ce(c,function(l,N){c[N]=l*n})))}}},dblclick:function(){this.disabled||this.options.dragMode===dL||this.setDragMode(B5e(this.dragBox,Ha)?jL:gc)},wheel:function(e){var t=this,r=Number(this.options.wheelZoomRatio)||.1,s=1;this.disabled||(e.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50),e.deltaY?s=e.deltaY>0?1:-1:e.wheelDelta?s=-e.wheelDelta/120:e.detail&&(s=e.detail>0?1:-1),this.zoom(-s*r,e)))},cropStart:function(e){var t=e.buttons,r=e.button;if(!(this.disabled||(e.type==="mousedown"||e.type==="pointerdown"&&e.pointerType==="mouse")&&(ie(t)&&t!==1||ie(r)&&r!==0||e.ctrlKey))){var s=this.options,o=this.pointers,n;e.changedTouches?Ce(e.changedTouches,function(a){o[a.identifier]=io(a)}):o[e.pointerId||0]=io(e),Object.keys(o).length>1&&s.zoomable&&s.zoomOnTouch?n=LL:n=tM(e.target,Ls),k5e.test(n)&&Lr(this.element,qa,{originalEvent:e,action:n})!==!1&&(e.preventDefault(),this.action=n,this.cropping=!1,n===NL&&(this.cropping=!0,Ae(this.dragBox,So)))}},cropMove:function(e){var t=this.action;if(!(this.disabled||!t)){var r=this.pointers;e.preventDefault(),Lr(this.element,Ka,{originalEvent:e,action:t})!==!1&&(e.changedTouches?Ce(e.changedTouches,function(s){je(r[s.identifier]||{},io(s,!0))}):je(r[e.pointerId||0]||{},io(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var t=this.action,r=this.pointers;e.changedTouches?Ce(e.changedTouches,function(s){delete r[s.identifier]}):delete r[e.pointerId||0],t&&(e.preventDefault(),Object.keys(r).length||(this.action=""),this.cropping&&(this.cropping=!1,lr(this.dragBox,So,this.cropped&&this.options.modal)),Lr(this.element,Xa,{originalEvent:e,action:t}))}}},Mke={change:function(e){var t=this.options,r=this.canvasData,s=this.containerData,o=this.cropBoxData,n=this.pointers,a=this.action,c=t.aspectRatio,l=o.left,N=o.top,u=o.width,g=o.height,L=l+u,d=N+g,y=0,D=0,z=s.width,A=s.height,C=!0,f;!c&&e.shiftKey&&(c=u&&g?u/g:1),this.limited&&(y=o.minLeft,D=o.minTop,z=y+Math.min(s.width,r.width,r.left+r.width),A=D+Math.min(s.height,r.height,r.top+r.height));var m=n[Object.keys(n)[0]],h={x:m.endX-m.startX,y:m.endY-m.startY},x=function(v){switch(v){case gi:L+h.x>z&&(h.x=z-L);break;case Li:l+h.x<y&&(h.x=y-l);break;case Gt:N+h.y<D&&(h.y=D-N);break;case Fi:d+h.y>A&&(h.y=A-d);break}};switch(a){case Nc:l+=h.x,N+=h.y;break;case gi:if(h.x>=0&&(L>=z||c&&(N<=D||d>=A))){C=!1;break}x(gi),u+=h.x,u<0&&(a=Li,u=-u,l-=u),c&&(g=u/c,N+=(o.height-g)/2);break;case Gt:if(h.y<=0&&(N<=D||c&&(l<=y||L>=z))){C=!1;break}x(Gt),g-=h.y,N+=h.y,g<0&&(a=Fi,g=-g,N-=g),c&&(u=g*c,l+=(o.width-u)/2);break;case Li:if(h.x<=0&&(l<=y||c&&(N<=D||d>=A))){C=!1;break}x(Li),u-=h.x,l+=h.x,u<0&&(a=gi,u=-u,l-=u),c&&(g=u/c,N+=(o.height-g)/2);break;case Fi:if(h.y>=0&&(d>=A||c&&(l<=y||L>=z))){C=!1;break}x(Fi),g+=h.y,g<0&&(a=Gt,g=-g,N-=g),c&&(u=g*c,l+=(o.width-u)/2);break;case Jr:if(c){if(h.y<=0&&(N<=D||L>=z)){C=!1;break}x(Gt),g-=h.y,N+=h.y,u=g*c}else x(Gt),x(gi),h.x>=0?L<z?u+=h.x:h.y<=0&&N<=D&&(C=!1):u+=h.x,h.y<=0?N>D&&(g-=h.y,N+=h.y):(g-=h.y,N+=h.y);u<0&&g<0?(a=Vr,g=-g,u=-u,N-=g,l-=u):u<0?(a=Gr,u=-u,l-=u):g<0&&(a=Hr,g=-g,N-=g);break;case Gr:if(c){if(h.y<=0&&(N<=D||l<=y)){C=!1;break}x(Gt),g-=h.y,N+=h.y,u=g*c,l+=o.width-u}else x(Gt),x(Li),h.x<=0?l>y?(u-=h.x,l+=h.x):h.y<=0&&N<=D&&(C=!1):(u-=h.x,l+=h.x),h.y<=0?N>D&&(g-=h.y,N+=h.y):(g-=h.y,N+=h.y);u<0&&g<0?(a=Hr,g=-g,u=-u,N-=g,l-=u):u<0?(a=Jr,u=-u,l-=u):g<0&&(a=Vr,g=-g,N-=g);break;case Vr:if(c){if(h.x<=0&&(l<=y||d>=A)){C=!1;break}x(Li),u-=h.x,l+=h.x,g=u/c}else x(Fi),x(Li),h.x<=0?l>y?(u-=h.x,l+=h.x):h.y>=0&&d>=A&&(C=!1):(u-=h.x,l+=h.x),h.y>=0?d<A&&(g+=h.y):g+=h.y;u<0&&g<0?(a=Jr,g=-g,u=-u,N-=g,l-=u):u<0?(a=Hr,u=-u,l-=u):g<0&&(a=Gr,g=-g,N-=g);break;case Hr:if(c){if(h.x>=0&&(L>=z||d>=A)){C=!1;break}x(gi),u+=h.x,g=u/c}else x(Fi),x(gi),h.x>=0?L<z?u+=h.x:h.y>=0&&d>=A&&(C=!1):u+=h.x,h.y>=0?d<A&&(g+=h.y):g+=h.y;u<0&&g<0?(a=Gr,g=-g,u=-u,N-=g,l-=u):u<0?(a=Vr,u=-u,l-=u):g<0&&(a=Jr,g=-g,N-=g);break;case gL:this.move(h.x,h.y),C=!1;break;case LL:this.zoom(H5e(n),e),C=!1;break;case NL:if(!h.x||!h.y){C=!1;break}f=zL(this.cropper),l=m.startX-f.left,N=m.startY-f.top,u=o.minWidth,g=o.minHeight,h.x>0?a=h.y>0?Hr:Jr:h.x<0&&(l-=u,a=h.y>0?Vr:Gr),h.y<0&&(N-=g),this.cropped||(zt(this.cropBox,Fe),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}C&&(o.width=u,o.height=g,o.left=l,o.top=N,this.action=a,this.renderCropBox()),Ce(n,function(b){b.startX=b.endX,b.startY=b.endY})}},cke={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Ae(this.dragBox,So),zt(this.cropBox,Fe),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=je({},this.initialImageData),this.canvasData=je({},this.initialCanvasData),this.cropBoxData=je({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(je(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),zt(this.dragBox,So),Ae(this.cropBox,Fe)),this},replace:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,Ce(this.previews,function(r){r.getElementsByTagName("img")[0].src=e}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,zt(this.cropper,VN)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Ae(this.cropper,VN)),this},destroy:function(){var e=this.element;return e[ge]?(e[ge]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,r=this.canvasData,s=r.left,o=r.top;return this.moveTo(Zn(e)?e:s+Number(e),Zn(t)?t:o+Number(t))},moveTo:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,r=this.canvasData,s=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(ie(e)&&(r.left=e,s=!0),ie(t)&&(r.top=t,s=!0),s&&this.renderCanvas(!0)),this},zoom:function(e,t){var r=this.canvasData;return e=Number(e),e<0?e=1/(1-e):e=1+e,this.zoomTo(r.width*e/r.naturalWidth,null,t)},zoomTo:function(e,t,r){var s=this.options,o=this.canvasData,n=o.width,a=o.height,c=o.naturalWidth,l=o.naturalHeight;if(e=Number(e),e>=0&&this.ready&&!this.disabled&&s.zoomable){var N=c*e,u=l*e;if(Lr(this.element,eM,{ratio:e,oldRatio:n/c,originalEvent:r})===!1)return this;if(r){var g=this.pointers,L=zL(this.cropper),d=g&&Object.keys(g).length?V5e(g):{pageX:r.pageX,pageY:r.pageY};o.left-=(N-n)*((d.pageX-L.left-o.left)/n),o.top-=(u-a)*((d.pageY-L.top-o.top)/a)}else ur(t)&&ie(t.x)&&ie(t.y)?(o.left-=(N-n)*((t.x-o.left)/n),o.top-=(u-a)*((t.y-o.top)/a)):(o.left-=(N-n)/2,o.top-=(u-a)/2);o.width=N,o.height=u,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return e=Number(e),ie(e)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,ie(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(ie(t)?t:1,e)},scale:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,r=this.imageData,s=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(ie(e)&&(r.scaleX=e,s=!0),ie(t)&&(r.scaleY=t,s=!0),s&&this.renderCanvas(!0,!0)),this},getData:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.options,r=this.imageData,s=this.canvasData,o=this.cropBoxData,n;if(this.ready&&this.cropped){n={x:o.left-s.left,y:o.top-s.top,width:o.width,height:o.height};var a=r.width/r.naturalWidth;if(Ce(n,function(N,u){n[u]=N/a}),e){var c=Math.round(n.y+n.height),l=Math.round(n.x+n.width);n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=l-n.x,n.height=c-n.y}}else n={x:0,y:0,width:0,height:0};return t.rotatable&&(n.rotate=r.rotate||0),t.scalable&&(n.scaleX=r.scaleX||1,n.scaleY=r.scaleY||1),n},setData:function(e){var t=this.options,r=this.imageData,s=this.canvasData,o={};if(this.ready&&!this.disabled&&ur(e)){var n=!1;t.rotatable&&ie(e.rotate)&&e.rotate!==r.rotate&&(r.rotate=e.rotate,n=!0),t.scalable&&(ie(e.scaleX)&&e.scaleX!==r.scaleX&&(r.scaleX=e.scaleX,n=!0),ie(e.scaleY)&&e.scaleY!==r.scaleY&&(r.scaleY=e.scaleY,n=!0)),n&&this.renderCanvas(!0,!0);var a=r.width/r.naturalWidth;ie(e.x)&&(o.left=e.x*a+s.left),ie(e.y)&&(o.top=e.y*a+s.top),ie(e.width)&&(o.width=e.width*a),ie(e.height)&&(o.height=e.height*a),this.setCropBoxData(o)}return this},getContainerData:function(){return this.ready?je({},this.containerData):{}},getImageData:function(){return this.sized?je({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,t={};return this.ready&&Ce(["left","top","width","height","naturalWidth","naturalHeight"],function(r){t[r]=e[r]}),t},setCanvasData:function(e){var t=this.canvasData,r=t.aspectRatio;return this.ready&&!this.disabled&&ur(e)&&(ie(e.left)&&(t.left=e.left),ie(e.top)&&(t.top=e.top),ie(e.width)?(t.width=e.width,t.height=e.width/r):ie(e.height)&&(t.height=e.height,t.width=e.height*r),this.renderCanvas(!0)),this},getCropBoxData:function(){var e=this.cropBoxData,t;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(e){var t=this.cropBoxData,r=this.options.aspectRatio,s,o;return this.ready&&this.cropped&&!this.disabled&&ur(e)&&(ie(e.left)&&(t.left=e.left),ie(e.top)&&(t.top=e.top),ie(e.width)&&e.width!==t.width&&(s=!0,t.width=e.width),ie(e.height)&&e.height!==t.height&&(o=!0,t.height=e.height),r&&(s?t.height=t.width/r:o&&(t.width=t.height*r)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,r=X5e(this.image,this.imageData,t,e);if(!this.cropped)return r;var s=this.getData(e.rounded),o=s.x,n=s.y,a=s.width,c=s.height,l=r.width/Math.floor(t.naturalWidth);l!==1&&(o*=l,n*=l,a*=l,c*=l);var N=a/c,u=ei({aspectRatio:N,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),g=ei({aspectRatio:N,width:e.minWidth||0,height:e.minHeight||0},"cover"),L=ei({aspectRatio:N,width:e.width||(l!==1?r.width:a),height:e.height||(l!==1?r.height:c)}),d=L.width,y=L.height;d=Math.min(u.width,Math.max(g.width,d)),y=Math.min(u.height,Math.max(g.height,y));var D=document.createElement("canvas"),z=D.getContext("2d");D.width=gr(d),D.height=gr(y),z.fillStyle=e.fillColor||"transparent",z.fillRect(0,0,d,y);var A=e.imageSmoothingEnabled,C=A===void 0?!0:A,f=e.imageSmoothingQuality;z.imageSmoothingEnabled=C,f&&(z.imageSmoothingQuality=f);var m=r.width,h=r.height,x=o,b=n,v,W,Y,q,ce,B;x<=-a||x>m?(x=0,v=0,Y=0,ce=0):x<=0?(Y=-x,x=0,v=Math.min(m,a+x),ce=v):x<=m&&(Y=0,v=Math.min(a,m-x),ce=v),v<=0||b<=-c||b>h?(b=0,W=0,q=0,B=0):b<=0?(q=-b,b=0,W=Math.min(h,c+b),B=W):b<=h&&(q=0,W=Math.min(c,h-b),B=W);var G=[x,b,v,W];if(ce>0&&B>0){var Ie=d/a;G.push(Y*Ie,q*Ie,ce*Ie,B*Ie)}return z.drawImage.apply(z,[r].concat(lL(G.map(function(Pe){return Math.floor(gr(Pe))})))),D},setAspectRatio:function(e){var t=this.options;return!this.disabled&&!Zn(e)&&(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t=this.options,r=this.dragBox,s=this.face;if(this.ready&&!this.disabled){var o=e===gc,n=t.movable&&e===jL;e=o||n?e:dL,t.dragMode=e,js(r,Ls,e),lr(r,Ha,o),lr(r,Va,n),t.cropBoxMovable||(js(s,Ls,e),lr(s,Ha,o),lr(s,Va,n))}return this}},uke=wt.Cropper,CL=function(){function i(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w5e(this,i),!e||!Y5e.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=je({},o0,ur(t)&&t),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return C5e(i,[{key:"init",value:function(){var t=this.element,r=t.tagName.toLowerCase(),s;if(!t[ge]){if(t[ge]=this,r==="img"){if(this.isImg=!0,s=t.getAttribute("src")||"",this.originalUrl=s,!s)return;s=t.src}else r==="canvas"&&window.HTMLCanvasElement&&(s=t.toDataURL());this.load(s)}}},{key:"load",value:function(t){var r=this;if(t){this.url=t,this.imageData={};var s=this.element,o=this.options;if(!o.rotatable&&!o.scalable&&(o.checkOrientation=!1),!o.checkOrientation||!window.ArrayBuffer){this.clone();return}if(v5e.test(t)){b5e.test(t)?this.read(eke(t)):this.clone();return}var n=new XMLHttpRequest,a=this.clone.bind(this);this.reloading=!0,this.xhr=n,n.onabort=a,n.onerror=a,n.ontimeout=a,n.onprogress=function(){n.getResponseHeader("content-type")!==s0&&n.abort()},n.onload=function(){r.read(n.response)},n.onloadend=function(){r.reloading=!1,r.xhr=null},o.checkCrossOrigin&&a0(t)&&s.crossOrigin&&(t=M0(t)),n.open("GET",t,!0),n.responseType="arraybuffer",n.withCredentials=s.crossOrigin==="use-credentials",n.send()}}},{key:"read",value:function(t){var r=this.options,s=this.imageData,o=ike(t),n=0,a=1,c=1;if(o>1){this.url=tke(t,s0);var l=rke(o);n=l.rotate,a=l.scaleX,c=l.scaleY}r.rotatable&&(s.rotate=n),r.scalable&&(s.scaleX=a,s.scaleY=c),this.clone()}},{key:"clone",value:function(){var t=this.element,r=this.url,s=t.crossOrigin,o=r;this.options.checkCrossOrigin&&a0(r)&&(s||(s="anonymous"),o=M0(r)),this.crossOrigin=s,this.crossOriginUrl=o;var n=document.createElement("img");s&&(n.crossOrigin=s),n.src=o||r,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),Ae(n,ZN),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,r=this.image;r.onload=null,r.onerror=null,this.sizing=!0;var s=wt.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(wt.navigator.userAgent),o=function(l,N){je(t.imageData,{naturalWidth:l,naturalHeight:N,aspectRatio:l/N}),t.initialImageData=je({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(r.naturalWidth&&!s){o(r.naturalWidth,r.naturalHeight);return}var n=document.createElement("img"),a=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){o(n.width,n.height),s||a.removeChild(n)},n.src=r.src,s||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",a.appendChild(n))}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var t=this.element,r=this.options,s=this.image,o=t.parentNode,n=document.createElement("div");n.innerHTML=Q5e;var a=n.querySelector(".".concat(ge,"-container")),c=a.querySelector(".".concat(ge,"-canvas")),l=a.querySelector(".".concat(ge,"-drag-box")),N=a.querySelector(".".concat(ge,"-crop-box")),u=N.querySelector(".".concat(ge,"-face"));this.container=o,this.cropper=a,this.canvas=c,this.dragBox=l,this.cropBox=N,this.viewBox=a.querySelector(".".concat(ge,"-view-box")),this.face=u,c.appendChild(s),Ae(t,Fe),o.insertBefore(a,t.nextSibling),zt(s,ZN),this.initPreview(),this.bind(),r.initialAspectRatio=Math.max(0,r.initialAspectRatio)||NaN,r.aspectRatio=Math.max(0,r.aspectRatio)||NaN,r.viewMode=Math.max(0,Math.min(3,Math.round(r.viewMode)))||0,Ae(N,Fe),r.guides||Ae(N.getElementsByClassName("".concat(ge,"-dashed")),Fe),r.center||Ae(N.getElementsByClassName("".concat(ge,"-center")),Fe),r.background&&Ae(a,"".concat(ge,"-bg")),r.highlight||Ae(u,O5e),r.cropBoxMovable&&(Ae(u,Va),js(u,Ls,Nc)),r.cropBoxResizable||(Ae(N.getElementsByClassName("".concat(ge,"-line")),Fe),Ae(N.getElementsByClassName("".concat(ge,"-point")),Fe)),this.render(),this.ready=!0,this.setDragMode(r.dragMode),r.autoCrop&&this.crop(),this.setData(r.data),Be(r.ready)&&et(t,t0,r.ready,{once:!0}),Lr(t,t0)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),zt(this.element,Fe)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=uke,i}},{key:"setDefaults",value:function(t){je(o0,ur(t)&&t)}}])}();je(CL.prototype,ske,oke,nke,ake,Mke,cke);var hi=function(){return hi=Object.assign||function(i){for(var e,t=1,r=arguments.length;t<r;t++)for(var s in e=arguments[t])Object.prototype.hasOwnProperty.call(e,s)&&(i[s]=e[s]);return i},hi.apply(this,arguments)};function Kn(i,e){var t={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function"){var s=0;for(r=Object.getOwnPropertySymbols(i);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(i,r[s])&&(t[r[s]]=i[r[s]])}return t}var lke=["aspectRatio","autoCrop","autoCropArea","background","center","checkCrossOrigin","checkOrientation","cropBoxMovable","cropBoxResizable","data","dragMode","guides","highlight","initialAspectRatio","minCanvasHeight","minCanvasWidth","minContainerHeight","minContainerWidth","minCropBoxHeight","minCropBoxWidth","modal","movable","preview","responsive","restore","rotatable","scalable","toggleDragModeOnDblclick","viewMode","wheelZoomRatio","zoomOnTouch","zoomOnWheel","zoomable","cropstart","cropmove","cropend","crop","zoom","ready"],Nke={opacity:0,maxWidth:"100%"},gke=M.forwardRef(function(i,e){var t=Kn(i,[]),r=t.dragMode,s=r===void 0?"crop":r,o=t.src,n=t.style,a=t.className,c=t.crossOrigin,l=t.scaleX,N=t.scaleY,u=t.enable,g=t.zoomTo,L=t.rotateTo,d=t.alt,y=d===void 0?"picture":d,D=t.ready,z=t.onInitialized,A=Kn(t,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),C={scaleY:N,scaleX:l,enable:u,zoomTo:g,rotateTo:L},f=function(){for(var h=[],x=0;x<arguments.length;x++)h[x]=arguments[x];var b=_.useRef(null);return M.useEffect(function(){h.forEach(function(v){v&&(typeof v=="function"?v(b.current):v.current=b.current)})},[h]),b}(e,_.useRef(null));_.useEffect(function(){var h;!((h=f.current)===null||h===void 0)&&h.cropper&&typeof g=="number"&&f.current.cropper.zoomTo(g)},[t.zoomTo]),_.useEffect(function(){var h;!((h=f.current)===null||h===void 0)&&h.cropper&&o!==void 0&&f.current.cropper.reset().clear().replace(o)},[o]),_.useEffect(function(){if(f.current!==null){var h=new CL(f.current,hi(hi({dragMode:s},A),{ready:function(x){x.currentTarget!==null&&function(b,v){v===void 0&&(v={});var W=v.enable,Y=W===void 0||W,q=v.scaleX,ce=q===void 0?1:q,B=v.scaleY,G=B===void 0?1:B,Ie=v.zoomTo,Pe=Ie===void 0?0:Ie,ve=v.rotateTo;Y?b.enable():b.disable(),b.scaleX(ce),b.scaleY(G),ve!==void 0&&b.rotateTo(ve),Pe>0&&b.zoomTo(Pe)}(x.currentTarget.cropper,C),D&&D(x)}}));z&&z(h)}return function(){var x,b;(b=(x=f.current)===null||x===void 0?void 0:x.cropper)===null||b===void 0||b.destroy()}},[f]);var m=function(h){return lke.reduce(function(x,b){var v=x,W=b;return v[W],Kn(v,[typeof W=="symbol"?W:W+""])},h)}(hi(hi({},A),{crossOrigin:c,src:o,alt:y}));return M.createElement("div",{style:n,className:a},M.createElement("img",hi({},m,{style:Nke,ref:f})))});const Lke=`
496
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Mn=typeof window<"u"&&typeof window.document<"u",wt=Mn?window:{},uc=Mn&&wt.document.documentElement?"ontouchstart"in wt.document.documentElement:!1,lc=Mn?"PointerEvent"in wt:!1,ge="cropper",Nc="all",NL="crop",gL="move",LL="zoom",gi="e",Li="w",Fi="s",Gt="n",Jr="ne",Gr="nw",Hr="se",Vr="sw",Ha="".concat(ge,"-crop"),VN="".concat(ge,"-disabled"),Fe="".concat(ge,"-hidden"),ZN="".concat(ge,"-hide"),O5e="".concat(ge,"-invisible"),So="".concat(ge,"-modal"),Va="".concat(ge,"-move"),Ls="".concat(ge,"Action"),to="".concat(ge,"Preview"),gc="crop",jL="move",dL="none",Za="crop",Xa="cropend",Ka="cropmove",qa="cropstart",XN="dblclick",E5e=uc?"touchstart":"mousedown",_5e=uc?"touchmove":"mousemove",S5e=uc?"touchend touchcancel":"mouseup",KN=lc?"pointerdown":E5e,qN=lc?"pointermove":_5e,e0=lc?"pointerup pointercancel":S5e,t0="ready",i0="resize",r0="wheel",eM="zoom",s0="image/jpeg",k5e=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,v5e=/^data:/,b5e=/^data:image\/jpeg;base64,/,Y5e=/^img|canvas$/i,yL=200,TL=100,o0={viewMode:0,dragMode:gc,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:yL,minContainerHeight:TL,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Q5e='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',U5e=Number.isNaN||wt.isNaN;function ie(i){return typeof i=="number"&&!U5e(i)}var n0=function(e){return e>0&&e<1/0};function Zn(i){return typeof i>"u"}function Ai(i){return Ja(i)==="object"&&i!==null}var $5e=Object.prototype.hasOwnProperty;function ur(i){if(!Ai(i))return!1;try{var e=i.constructor,t=e.prototype;return e&&t&&$5e.call(t,"isPrototypeOf")}catch{return!1}}function Be(i){return typeof i=="function"}var P5e=Array.prototype.slice;function DL(i){return Array.from?Array.from(i):P5e.call(i)}function Ce(i,e){return i&&Be(e)&&(Array.isArray(i)||ie(i.length)?DL(i).forEach(function(t,r){e.call(i,t,r,i)}):Ai(i)&&Object.keys(i).forEach(function(t){e.call(i,i[t],t,i)})),i}var je=Object.assign||function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];return Ai(e)&&r.length>0&&r.forEach(function(o){Ai(o)&&Object.keys(o).forEach(function(n){e[n]=o[n]})}),e},R5e=/\.\d*(?:0|9){12}\d*$/;function gr(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return R5e.test(i)?Math.round(i*e)/e:i}var W5e=/^width|height|left|top|marginLeft|marginTop$/;function qt(i,e){var t=i.style;Ce(e,function(r,s){W5e.test(s)&&ie(r)&&(r="".concat(r,"px")),t[s]=r})}function B5e(i,e){return i.classList?i.classList.contains(e):i.className.indexOf(e)>-1}function Ae(i,e){if(e){if(ie(i.length)){Ce(i,function(r){Ae(r,e)});return}if(i.classList){i.classList.add(e);return}var t=i.className.trim();t?t.indexOf(e)<0&&(i.className="".concat(t," ").concat(e)):i.className=e}}function zt(i,e){if(e){if(ie(i.length)){Ce(i,function(t){zt(t,e)});return}if(i.classList){i.classList.remove(e);return}i.className.indexOf(e)>=0&&(i.className=i.className.replace(e,""))}}function lr(i,e,t){if(e){if(ie(i.length)){Ce(i,function(r){lr(r,e,t)});return}t?Ae(i,e):zt(i,e)}}var F5e=/([a-z\d])([A-Z])/g;function Lc(i){return i.replace(F5e,"$1-$2").toLowerCase()}function tM(i,e){return Ai(i[e])?i[e]:i.dataset?i.dataset[e]:i.getAttribute("data-".concat(Lc(e)))}function js(i,e,t){Ai(t)?i[e]=t:i.dataset?i.dataset[e]=t:i.setAttribute("data-".concat(Lc(e)),t)}function J5e(i,e){if(Ai(i[e]))try{delete i[e]}catch{i[e]=void 0}else if(i.dataset)try{delete i.dataset[e]}catch{i.dataset[e]=void 0}else i.removeAttribute("data-".concat(Lc(e)))}var hL=/\s\s*/,pL=(function(){var i=!1;if(Mn){var e=!1,t=function(){},r=Object.defineProperty({},"once",{get:function(){return i=!0,e},set:function(o){e=o}});wt.addEventListener("test",t,r),wt.removeEventListener("test",t,r)}return i})();function at(i,e,t){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=t;e.trim().split(hL).forEach(function(o){if(!pL){var n=i.listeners;n&&n[o]&&n[o][t]&&(s=n[o][t],delete n[o][t],Object.keys(n[o]).length===0&&delete n[o],Object.keys(n).length===0&&delete i.listeners)}i.removeEventListener(o,s,r)})}function et(i,e,t){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=t;e.trim().split(hL).forEach(function(o){if(r.once&&!pL){var n=i.listeners,a=n===void 0?{}:n;s=function(){delete a[o][t],i.removeEventListener(o,s,r);for(var l=arguments.length,N=new Array(l),u=0;u<l;u++)N[u]=arguments[u];t.apply(i,N)},a[o]||(a[o]={}),a[o][t]&&i.removeEventListener(o,a[o][t],r),a[o][t]=s,i.listeners=a}i.addEventListener(o,s,r)})}function Lr(i,e,t){var r;return Be(Event)&&Be(CustomEvent)?r=new CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(e,!0,!0,t)),i.dispatchEvent(r)}function zL(i){var e=i.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Xn=wt.location,G5e=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function a0(i){var e=i.match(G5e);return e!==null&&(e[1]!==Xn.protocol||e[2]!==Xn.hostname||e[3]!==Xn.port)}function M0(i){var e="timestamp=".concat(new Date().getTime());return i+(i.indexOf("?")===-1?"?":"&")+e}function ns(i){var e=i.rotate,t=i.scaleX,r=i.scaleY,s=i.translateX,o=i.translateY,n=[];ie(s)&&s!==0&&n.push("translateX(".concat(s,"px)")),ie(o)&&o!==0&&n.push("translateY(".concat(o,"px)")),ie(e)&&e!==0&&n.push("rotate(".concat(e,"deg)")),ie(t)&&t!==1&&n.push("scaleX(".concat(t,")")),ie(r)&&r!==1&&n.push("scaleY(".concat(r,")"));var a=n.length?n.join(" "):"none";return{WebkitTransform:a,msTransform:a,transform:a}}function H5e(i){var e=cL({},i),t=0;return Ce(i,function(r,s){delete e[s],Ce(e,function(o){var n=Math.abs(r.startX-o.startX),a=Math.abs(r.startY-o.startY),c=Math.abs(r.endX-o.endX),l=Math.abs(r.endY-o.endY),N=Math.sqrt(n*n+a*a),u=Math.sqrt(c*c+l*l),g=(u-N)/N;Math.abs(g)>Math.abs(t)&&(t=g)})}),t}function io(i,e){var t=i.pageX,r=i.pageY,s={endX:t,endY:r};return e?s:cL({startX:t,startY:r},s)}function V5e(i){var e=0,t=0,r=0;return Ce(i,function(s){var o=s.startX,n=s.startY;e+=o,t+=n,r+=1}),e/=r,t/=r,{pageX:e,pageY:t}}function ei(i){var e=i.aspectRatio,t=i.height,r=i.width,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",o=n0(r),n=n0(t);if(o&&n){var a=t*e;s==="contain"&&a>r||s==="cover"&&a<r?t=r/e:r=t*e}else o?t=r/e:n&&(r=t*e);return{width:r,height:t}}function Z5e(i){var e=i.width,t=i.height,r=i.degree;if(r=Math.abs(r)%180,r===90)return{width:t,height:e};var s=r%90*Math.PI/180,o=Math.sin(s),n=Math.cos(s),a=e*n+t*o,c=e*o+t*n;return r>90?{width:c,height:a}:{width:a,height:c}}function X5e(i,e,t,r){var s=e.aspectRatio,o=e.naturalWidth,n=e.naturalHeight,a=e.rotate,c=a===void 0?0:a,l=e.scaleX,N=l===void 0?1:l,u=e.scaleY,g=u===void 0?1:u,L=t.aspectRatio,d=t.naturalWidth,y=t.naturalHeight,D=r.fillColor,z=D===void 0?"transparent":D,A=r.imageSmoothingEnabled,C=A===void 0?!0:A,f=r.imageSmoothingQuality,m=f===void 0?"low":f,h=r.maxWidth,x=h===void 0?1/0:h,b=r.maxHeight,v=b===void 0?1/0:b,W=r.minWidth,Y=W===void 0?0:W,q=r.minHeight,ce=q===void 0?0:q,B=document.createElement("canvas"),G=B.getContext("2d"),Ie=ei({aspectRatio:L,width:x,height:v}),Pe=ei({aspectRatio:L,width:Y,height:ce},"cover"),ve=Math.min(Ie.width,Math.max(Pe.width,d)),pe=Math.min(Ie.height,Math.max(Pe.height,y)),Sr=ei({aspectRatio:s,width:x,height:v}),Pt=ei({aspectRatio:s,width:Y,height:ce},"cover"),gt=Math.min(Sr.width,Math.max(Pt.width,o)),Rt=Math.min(Sr.height,Math.max(Pt.height,n)),ot=[-gt/2,-Rt/2,gt,Rt];return B.width=gr(ve),B.height=gr(pe),G.fillStyle=z,G.fillRect(0,0,ve,pe),G.save(),G.translate(ve/2,pe/2),G.rotate(c*Math.PI/180),G.scale(N,g),G.imageSmoothingEnabled=C,G.imageSmoothingQuality=m,G.drawImage.apply(G,[i].concat(lL(ot.map(function(Mi){return Math.floor(gr(Mi))})))),G.restore(),B}var wL=String.fromCharCode;function K5e(i,e,t){var r="";t+=e;for(var s=e;s<t;s+=1)r+=wL(i.getUint8(s));return r}var q5e=/^data:.*,/;function eke(i){var e=i.replace(q5e,""),t=atob(e),r=new ArrayBuffer(t.length),s=new Uint8Array(r);return Ce(s,function(o,n){s[n]=t.charCodeAt(n)}),r}function tke(i,e){for(var t=[],r=8192,s=new Uint8Array(i);s.length>0;)t.push(wL.apply(null,DL(s.subarray(0,r)))),s=s.subarray(r);return"data:".concat(e,";base64,").concat(btoa(t.join("")))}function ike(i){var e=new DataView(i),t;try{var r,s,o;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(var n=e.byteLength,a=2;a+1<n;){if(e.getUint8(a)===255&&e.getUint8(a+1)===225){s=a;break}a+=1}if(s){var c=s+4,l=s+10;if(K5e(e,c,4)==="Exif"){var N=e.getUint16(l);if(r=N===18761,(r||N===19789)&&e.getUint16(l+2,r)===42){var u=e.getUint32(l+4,r);u>=8&&(o=l+u)}}}if(o){var g=e.getUint16(o,r),L,d;for(d=0;d<g;d+=1)if(L=o+d*12+2,e.getUint16(L,r)===274){L+=8,t=e.getUint16(L,r),e.setUint16(L,1,r);break}}}catch{t=1}return t}function rke(i){var e=0,t=1,r=1;switch(i){case 2:t=-1;break;case 3:e=-180;break;case 4:r=-1;break;case 5:e=90,r=-1;break;case 6:e=90;break;case 7:e=90,t=-1;break;case 8:e=-90;break}return{rotate:e,scaleX:t,scaleY:r}}var ske={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,r=this.container,s=this.cropper,o=Number(t.minContainerWidth),n=Number(t.minContainerHeight);Ae(s,Fe),zt(e,Fe);var a={width:Math.max(r.offsetWidth,o>=0?o:yL),height:Math.max(r.offsetHeight,n>=0?n:TL)};this.containerData=a,qt(s,{width:a.width,height:a.height}),Ae(e,Fe),zt(s,Fe)},initCanvas:function(){var e=this.containerData,t=this.imageData,r=this.options.viewMode,s=Math.abs(t.rotate)%180===90,o=s?t.naturalHeight:t.naturalWidth,n=s?t.naturalWidth:t.naturalHeight,a=o/n,c=e.width,l=e.height;e.height*a>e.width?r===3?c=e.height*a:l=e.width/a:r===3?l=e.width/a:c=e.height*a;var N={aspectRatio:a,naturalWidth:o,naturalHeight:n,width:c,height:l};this.canvasData=N,this.limited=r===1||r===2,this.limitCanvas(!0,!0),N.width=Math.min(Math.max(N.width,N.minWidth),N.maxWidth),N.height=Math.min(Math.max(N.height,N.minHeight),N.maxHeight),N.left=(e.width-N.width)/2,N.top=(e.height-N.height)/2,N.oldLeft=N.left,N.oldTop=N.top,this.initialCanvasData=je({},N)},limitCanvas:function(e,t){var r=this.options,s=this.containerData,o=this.canvasData,n=this.cropBoxData,a=r.viewMode,c=o.aspectRatio,l=this.cropped&&n;if(e){var N=Number(r.minCanvasWidth)||0,u=Number(r.minCanvasHeight)||0;a>1?(N=Math.max(N,s.width),u=Math.max(u,s.height),a===3&&(u*c>N?N=u*c:u=N/c)):a>0&&(N?N=Math.max(N,l?n.width:0):u?u=Math.max(u,l?n.height:0):l&&(N=n.width,u=n.height,u*c>N?N=u*c:u=N/c));var g=ei({aspectRatio:c,width:N,height:u});N=g.width,u=g.height,o.minWidth=N,o.minHeight=u,o.maxWidth=1/0,o.maxHeight=1/0}if(t)if(a>(l?0:1)){var L=s.width-o.width,d=s.height-o.height;o.minLeft=Math.min(0,L),o.minTop=Math.min(0,d),o.maxLeft=Math.max(0,L),o.maxTop=Math.max(0,d),l&&this.limited&&(o.minLeft=Math.min(n.left,n.left+(n.width-o.width)),o.minTop=Math.min(n.top,n.top+(n.height-o.height)),o.maxLeft=n.left,o.maxTop=n.top,a===2&&(o.width>=s.width&&(o.minLeft=Math.min(0,L),o.maxLeft=Math.max(0,L)),o.height>=s.height&&(o.minTop=Math.min(0,d),o.maxTop=Math.max(0,d))))}else o.minLeft=-o.width,o.minTop=-o.height,o.maxLeft=s.width,o.maxTop=s.height},renderCanvas:function(e,t){var r=this.canvasData,s=this.imageData;if(t){var o=Z5e({width:s.naturalWidth*Math.abs(s.scaleX||1),height:s.naturalHeight*Math.abs(s.scaleY||1),degree:s.rotate||0}),n=o.width,a=o.height,c=r.width*(n/r.naturalWidth),l=r.height*(a/r.naturalHeight);r.left-=(c-r.width)/2,r.top-=(l-r.height)/2,r.width=c,r.height=l,r.aspectRatio=n/a,r.naturalWidth=n,r.naturalHeight=a,this.limitCanvas(!0,!1)}(r.width>r.maxWidth||r.width<r.minWidth)&&(r.left=r.oldLeft),(r.height>r.maxHeight||r.height<r.minHeight)&&(r.top=r.oldTop),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),this.limitCanvas(!1,!0),r.left=Math.min(Math.max(r.left,r.minLeft),r.maxLeft),r.top=Math.min(Math.max(r.top,r.minTop),r.maxTop),r.oldLeft=r.left,r.oldTop=r.top,qt(this.canvas,je({width:r.width,height:r.height},ns({translateX:r.left,translateY:r.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,r=this.imageData,s=r.naturalWidth*(t.width/t.naturalWidth),o=r.naturalHeight*(t.height/t.naturalHeight);je(r,{width:s,height:o,left:(t.width-s)/2,top:(t.height-o)/2}),qt(this.image,je({width:r.width,height:r.height},ns(je({translateX:r.left,translateY:r.top},r)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,r=e.aspectRatio||e.initialAspectRatio,s=Number(e.autoCropArea)||.8,o={width:t.width,height:t.height};r&&(t.height*r>t.width?o.height=o.width/r:o.width=o.height*r),this.cropBoxData=o,this.limitCropBox(!0,!0),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),o.width=Math.max(o.minWidth,o.width*s),o.height=Math.max(o.minHeight,o.height*s),o.left=t.left+(t.width-o.width)/2,o.top=t.top+(t.height-o.height)/2,o.oldLeft=o.left,o.oldTop=o.top,this.initialCropBoxData=je({},o)},limitCropBox:function(e,t){var r=this.options,s=this.containerData,o=this.canvasData,n=this.cropBoxData,a=this.limited,c=r.aspectRatio;if(e){var l=Number(r.minCropBoxWidth)||0,N=Number(r.minCropBoxHeight)||0,u=a?Math.min(s.width,o.width,o.width+o.left,s.width-o.left):s.width,g=a?Math.min(s.height,o.height,o.height+o.top,s.height-o.top):s.height;l=Math.min(l,s.width),N=Math.min(N,s.height),c&&(l&&N?N*c>l?N=l/c:l=N*c:l?N=l/c:N&&(l=N*c),g*c>u?g=u/c:u=g*c),n.minWidth=Math.min(l,u),n.minHeight=Math.min(N,g),n.maxWidth=u,n.maxHeight=g}t&&(a?(n.minLeft=Math.max(0,o.left),n.minTop=Math.max(0,o.top),n.maxLeft=Math.min(s.width,o.left+o.width)-n.width,n.maxTop=Math.min(s.height,o.top+o.height)-n.height):(n.minLeft=0,n.minTop=0,n.maxLeft=s.width-n.width,n.maxTop=s.height-n.height))},renderCropBox:function(){var e=this.options,t=this.containerData,r=this.cropBoxData;(r.width>r.maxWidth||r.width<r.minWidth)&&(r.left=r.oldLeft),(r.height>r.maxHeight||r.height<r.minHeight)&&(r.top=r.oldTop),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),this.limitCropBox(!1,!0),r.left=Math.min(Math.max(r.left,r.minLeft),r.maxLeft),r.top=Math.min(Math.max(r.top,r.minTop),r.maxTop),r.oldLeft=r.left,r.oldTop=r.top,e.movable&&e.cropBoxMovable&&js(this.face,Ls,r.width>=t.width&&r.height>=t.height?gL:Nc),qt(this.cropBox,je({width:r.width,height:r.height},ns({translateX:r.left,translateY:r.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Lr(this.element,Za,this.getData())}},oke={initPreview:function(){var e=this.element,t=this.crossOrigin,r=this.options.preview,s=t?this.crossOriginUrl:this.url,o=e.alt||"The image to preview",n=document.createElement("img");if(t&&(n.crossOrigin=t),n.src=s,n.alt=o,this.viewBox.appendChild(n),this.viewBoxImage=n,!!r){var a=r;typeof r=="string"?a=e.ownerDocument.querySelectorAll(r):r.querySelector&&(a=[r]),this.previews=a,Ce(a,function(c){var l=document.createElement("img");js(c,to,{width:c.offsetWidth,height:c.offsetHeight,html:c.innerHTML}),t&&(l.crossOrigin=t),l.src=s,l.alt=o,l.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',c.innerHTML="",c.appendChild(l)})}},resetPreview:function(){Ce(this.previews,function(e){var t=tM(e,to);qt(e,{width:t.width,height:t.height}),e.innerHTML=t.html,J5e(e,to)})},preview:function(){var e=this.imageData,t=this.canvasData,r=this.cropBoxData,s=r.width,o=r.height,n=e.width,a=e.height,c=r.left-t.left-e.left,l=r.top-t.top-e.top;!this.cropped||this.disabled||(qt(this.viewBoxImage,je({width:n,height:a},ns(je({translateX:-c,translateY:-l},e)))),Ce(this.previews,function(N){var u=tM(N,to),g=u.width,L=u.height,d=g,y=L,D=1;s&&(D=g/s,y=o*D),o&&y>L&&(D=L/o,d=s*D,y=L),qt(N,{width:d,height:y}),qt(N.getElementsByTagName("img")[0],je({width:n*D,height:a*D},ns(je({translateX:-c*D,translateY:-l*D},e))))}))}},nke={bind:function(){var e=this.element,t=this.options,r=this.cropper;Be(t.cropstart)&&et(e,qa,t.cropstart),Be(t.cropmove)&&et(e,Ka,t.cropmove),Be(t.cropend)&&et(e,Xa,t.cropend),Be(t.crop)&&et(e,Za,t.crop),Be(t.zoom)&&et(e,eM,t.zoom),et(r,KN,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&et(r,r0,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&et(r,XN,this.onDblclick=this.dblclick.bind(this)),et(e.ownerDocument,qN,this.onCropMove=this.cropMove.bind(this)),et(e.ownerDocument,e0,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&et(window,i0,this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,r=this.cropper;Be(t.cropstart)&&at(e,qa,t.cropstart),Be(t.cropmove)&&at(e,Ka,t.cropmove),Be(t.cropend)&&at(e,Xa,t.cropend),Be(t.crop)&&at(e,Za,t.crop),Be(t.zoom)&&at(e,eM,t.zoom),at(r,KN,this.onCropStart),t.zoomable&&t.zoomOnWheel&&at(r,r0,this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&at(r,XN,this.onDblclick),at(e.ownerDocument,qN,this.onCropMove),at(e.ownerDocument,e0,this.onCropEnd),t.responsive&&at(window,i0,this.onResize)}},ake={resize:function(){if(!this.disabled){var e=this.options,t=this.container,r=this.containerData,s=t.offsetWidth/r.width,o=t.offsetHeight/r.height,n=Math.abs(s-1)>Math.abs(o-1)?s:o;if(n!==1){var a,c;e.restore&&(a=this.getCanvasData(),c=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(Ce(a,function(l,N){a[N]=l*n})),this.setCropBoxData(Ce(c,function(l,N){c[N]=l*n})))}}},dblclick:function(){this.disabled||this.options.dragMode===dL||this.setDragMode(B5e(this.dragBox,Ha)?jL:gc)},wheel:function(e){var t=this,r=Number(this.options.wheelZoomRatio)||.1,s=1;this.disabled||(e.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50),e.deltaY?s=e.deltaY>0?1:-1:e.wheelDelta?s=-e.wheelDelta/120:e.detail&&(s=e.detail>0?1:-1),this.zoom(-s*r,e)))},cropStart:function(e){var t=e.buttons,r=e.button;if(!(this.disabled||(e.type==="mousedown"||e.type==="pointerdown"&&e.pointerType==="mouse")&&(ie(t)&&t!==1||ie(r)&&r!==0||e.ctrlKey))){var s=this.options,o=this.pointers,n;e.changedTouches?Ce(e.changedTouches,function(a){o[a.identifier]=io(a)}):o[e.pointerId||0]=io(e),Object.keys(o).length>1&&s.zoomable&&s.zoomOnTouch?n=LL:n=tM(e.target,Ls),k5e.test(n)&&Lr(this.element,qa,{originalEvent:e,action:n})!==!1&&(e.preventDefault(),this.action=n,this.cropping=!1,n===NL&&(this.cropping=!0,Ae(this.dragBox,So)))}},cropMove:function(e){var t=this.action;if(!(this.disabled||!t)){var r=this.pointers;e.preventDefault(),Lr(this.element,Ka,{originalEvent:e,action:t})!==!1&&(e.changedTouches?Ce(e.changedTouches,function(s){je(r[s.identifier]||{},io(s,!0))}):je(r[e.pointerId||0]||{},io(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var t=this.action,r=this.pointers;e.changedTouches?Ce(e.changedTouches,function(s){delete r[s.identifier]}):delete r[e.pointerId||0],t&&(e.preventDefault(),Object.keys(r).length||(this.action=""),this.cropping&&(this.cropping=!1,lr(this.dragBox,So,this.cropped&&this.options.modal)),Lr(this.element,Xa,{originalEvent:e,action:t}))}}},Mke={change:function(e){var t=this.options,r=this.canvasData,s=this.containerData,o=this.cropBoxData,n=this.pointers,a=this.action,c=t.aspectRatio,l=o.left,N=o.top,u=o.width,g=o.height,L=l+u,d=N+g,y=0,D=0,z=s.width,A=s.height,C=!0,f;!c&&e.shiftKey&&(c=u&&g?u/g:1),this.limited&&(y=o.minLeft,D=o.minTop,z=y+Math.min(s.width,r.width,r.left+r.width),A=D+Math.min(s.height,r.height,r.top+r.height));var m=n[Object.keys(n)[0]],h={x:m.endX-m.startX,y:m.endY-m.startY},x=function(v){switch(v){case gi:L+h.x>z&&(h.x=z-L);break;case Li:l+h.x<y&&(h.x=y-l);break;case Gt:N+h.y<D&&(h.y=D-N);break;case Fi:d+h.y>A&&(h.y=A-d);break}};switch(a){case Nc:l+=h.x,N+=h.y;break;case gi:if(h.x>=0&&(L>=z||c&&(N<=D||d>=A))){C=!1;break}x(gi),u+=h.x,u<0&&(a=Li,u=-u,l-=u),c&&(g=u/c,N+=(o.height-g)/2);break;case Gt:if(h.y<=0&&(N<=D||c&&(l<=y||L>=z))){C=!1;break}x(Gt),g-=h.y,N+=h.y,g<0&&(a=Fi,g=-g,N-=g),c&&(u=g*c,l+=(o.width-u)/2);break;case Li:if(h.x<=0&&(l<=y||c&&(N<=D||d>=A))){C=!1;break}x(Li),u-=h.x,l+=h.x,u<0&&(a=gi,u=-u,l-=u),c&&(g=u/c,N+=(o.height-g)/2);break;case Fi:if(h.y>=0&&(d>=A||c&&(l<=y||L>=z))){C=!1;break}x(Fi),g+=h.y,g<0&&(a=Gt,g=-g,N-=g),c&&(u=g*c,l+=(o.width-u)/2);break;case Jr:if(c){if(h.y<=0&&(N<=D||L>=z)){C=!1;break}x(Gt),g-=h.y,N+=h.y,u=g*c}else x(Gt),x(gi),h.x>=0?L<z?u+=h.x:h.y<=0&&N<=D&&(C=!1):u+=h.x,h.y<=0?N>D&&(g-=h.y,N+=h.y):(g-=h.y,N+=h.y);u<0&&g<0?(a=Vr,g=-g,u=-u,N-=g,l-=u):u<0?(a=Gr,u=-u,l-=u):g<0&&(a=Hr,g=-g,N-=g);break;case Gr:if(c){if(h.y<=0&&(N<=D||l<=y)){C=!1;break}x(Gt),g-=h.y,N+=h.y,u=g*c,l+=o.width-u}else x(Gt),x(Li),h.x<=0?l>y?(u-=h.x,l+=h.x):h.y<=0&&N<=D&&(C=!1):(u-=h.x,l+=h.x),h.y<=0?N>D&&(g-=h.y,N+=h.y):(g-=h.y,N+=h.y);u<0&&g<0?(a=Hr,g=-g,u=-u,N-=g,l-=u):u<0?(a=Jr,u=-u,l-=u):g<0&&(a=Vr,g=-g,N-=g);break;case Vr:if(c){if(h.x<=0&&(l<=y||d>=A)){C=!1;break}x(Li),u-=h.x,l+=h.x,g=u/c}else x(Fi),x(Li),h.x<=0?l>y?(u-=h.x,l+=h.x):h.y>=0&&d>=A&&(C=!1):(u-=h.x,l+=h.x),h.y>=0?d<A&&(g+=h.y):g+=h.y;u<0&&g<0?(a=Jr,g=-g,u=-u,N-=g,l-=u):u<0?(a=Hr,u=-u,l-=u):g<0&&(a=Gr,g=-g,N-=g);break;case Hr:if(c){if(h.x>=0&&(L>=z||d>=A)){C=!1;break}x(gi),u+=h.x,g=u/c}else x(Fi),x(gi),h.x>=0?L<z?u+=h.x:h.y>=0&&d>=A&&(C=!1):u+=h.x,h.y>=0?d<A&&(g+=h.y):g+=h.y;u<0&&g<0?(a=Gr,g=-g,u=-u,N-=g,l-=u):u<0?(a=Vr,u=-u,l-=u):g<0&&(a=Jr,g=-g,N-=g);break;case gL:this.move(h.x,h.y),C=!1;break;case LL:this.zoom(H5e(n),e),C=!1;break;case NL:if(!h.x||!h.y){C=!1;break}f=zL(this.cropper),l=m.startX-f.left,N=m.startY-f.top,u=o.minWidth,g=o.minHeight,h.x>0?a=h.y>0?Hr:Jr:h.x<0&&(l-=u,a=h.y>0?Vr:Gr),h.y<0&&(N-=g),this.cropped||(zt(this.cropBox,Fe),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}C&&(o.width=u,o.height=g,o.left=l,o.top=N,this.action=a,this.renderCropBox()),Ce(n,function(b){b.startX=b.endX,b.startY=b.endY})}},cke={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Ae(this.dragBox,So),zt(this.cropBox,Fe),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=je({},this.initialImageData),this.canvasData=je({},this.initialCanvasData),this.cropBoxData=je({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(je(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),zt(this.dragBox,So),Ae(this.cropBox,Fe)),this},replace:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,Ce(this.previews,function(r){r.getElementsByTagName("img")[0].src=e}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,zt(this.cropper,VN)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Ae(this.cropper,VN)),this},destroy:function(){var e=this.element;return e[ge]?(e[ge]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,r=this.canvasData,s=r.left,o=r.top;return this.moveTo(Zn(e)?e:s+Number(e),Zn(t)?t:o+Number(t))},moveTo:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,r=this.canvasData,s=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(ie(e)&&(r.left=e,s=!0),ie(t)&&(r.top=t,s=!0),s&&this.renderCanvas(!0)),this},zoom:function(e,t){var r=this.canvasData;return e=Number(e),e<0?e=1/(1-e):e=1+e,this.zoomTo(r.width*e/r.naturalWidth,null,t)},zoomTo:function(e,t,r){var s=this.options,o=this.canvasData,n=o.width,a=o.height,c=o.naturalWidth,l=o.naturalHeight;if(e=Number(e),e>=0&&this.ready&&!this.disabled&&s.zoomable){var N=c*e,u=l*e;if(Lr(this.element,eM,{ratio:e,oldRatio:n/c,originalEvent:r})===!1)return this;if(r){var g=this.pointers,L=zL(this.cropper),d=g&&Object.keys(g).length?V5e(g):{pageX:r.pageX,pageY:r.pageY};o.left-=(N-n)*((d.pageX-L.left-o.left)/n),o.top-=(u-a)*((d.pageY-L.top-o.top)/a)}else ur(t)&&ie(t.x)&&ie(t.y)?(o.left-=(N-n)*((t.x-o.left)/n),o.top-=(u-a)*((t.y-o.top)/a)):(o.left-=(N-n)/2,o.top-=(u-a)/2);o.width=N,o.height=u,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return e=Number(e),ie(e)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,ie(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(ie(t)?t:1,e)},scale:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,r=this.imageData,s=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(ie(e)&&(r.scaleX=e,s=!0),ie(t)&&(r.scaleY=t,s=!0),s&&this.renderCanvas(!0,!0)),this},getData:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.options,r=this.imageData,s=this.canvasData,o=this.cropBoxData,n;if(this.ready&&this.cropped){n={x:o.left-s.left,y:o.top-s.top,width:o.width,height:o.height};var a=r.width/r.naturalWidth;if(Ce(n,function(N,u){n[u]=N/a}),e){var c=Math.round(n.y+n.height),l=Math.round(n.x+n.width);n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=l-n.x,n.height=c-n.y}}else n={x:0,y:0,width:0,height:0};return t.rotatable&&(n.rotate=r.rotate||0),t.scalable&&(n.scaleX=r.scaleX||1,n.scaleY=r.scaleY||1),n},setData:function(e){var t=this.options,r=this.imageData,s=this.canvasData,o={};if(this.ready&&!this.disabled&&ur(e)){var n=!1;t.rotatable&&ie(e.rotate)&&e.rotate!==r.rotate&&(r.rotate=e.rotate,n=!0),t.scalable&&(ie(e.scaleX)&&e.scaleX!==r.scaleX&&(r.scaleX=e.scaleX,n=!0),ie(e.scaleY)&&e.scaleY!==r.scaleY&&(r.scaleY=e.scaleY,n=!0)),n&&this.renderCanvas(!0,!0);var a=r.width/r.naturalWidth;ie(e.x)&&(o.left=e.x*a+s.left),ie(e.y)&&(o.top=e.y*a+s.top),ie(e.width)&&(o.width=e.width*a),ie(e.height)&&(o.height=e.height*a),this.setCropBoxData(o)}return this},getContainerData:function(){return this.ready?je({},this.containerData):{}},getImageData:function(){return this.sized?je({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,t={};return this.ready&&Ce(["left","top","width","height","naturalWidth","naturalHeight"],function(r){t[r]=e[r]}),t},setCanvasData:function(e){var t=this.canvasData,r=t.aspectRatio;return this.ready&&!this.disabled&&ur(e)&&(ie(e.left)&&(t.left=e.left),ie(e.top)&&(t.top=e.top),ie(e.width)?(t.width=e.width,t.height=e.width/r):ie(e.height)&&(t.height=e.height,t.width=e.height*r),this.renderCanvas(!0)),this},getCropBoxData:function(){var e=this.cropBoxData,t;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(e){var t=this.cropBoxData,r=this.options.aspectRatio,s,o;return this.ready&&this.cropped&&!this.disabled&&ur(e)&&(ie(e.left)&&(t.left=e.left),ie(e.top)&&(t.top=e.top),ie(e.width)&&e.width!==t.width&&(s=!0,t.width=e.width),ie(e.height)&&e.height!==t.height&&(o=!0,t.height=e.height),r&&(s?t.height=t.width/r:o&&(t.width=t.height*r)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,r=X5e(this.image,this.imageData,t,e);if(!this.cropped)return r;var s=this.getData(e.rounded),o=s.x,n=s.y,a=s.width,c=s.height,l=r.width/Math.floor(t.naturalWidth);l!==1&&(o*=l,n*=l,a*=l,c*=l);var N=a/c,u=ei({aspectRatio:N,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),g=ei({aspectRatio:N,width:e.minWidth||0,height:e.minHeight||0},"cover"),L=ei({aspectRatio:N,width:e.width||(l!==1?r.width:a),height:e.height||(l!==1?r.height:c)}),d=L.width,y=L.height;d=Math.min(u.width,Math.max(g.width,d)),y=Math.min(u.height,Math.max(g.height,y));var D=document.createElement("canvas"),z=D.getContext("2d");D.width=gr(d),D.height=gr(y),z.fillStyle=e.fillColor||"transparent",z.fillRect(0,0,d,y);var A=e.imageSmoothingEnabled,C=A===void 0?!0:A,f=e.imageSmoothingQuality;z.imageSmoothingEnabled=C,f&&(z.imageSmoothingQuality=f);var m=r.width,h=r.height,x=o,b=n,v,W,Y,q,ce,B;x<=-a||x>m?(x=0,v=0,Y=0,ce=0):x<=0?(Y=-x,x=0,v=Math.min(m,a+x),ce=v):x<=m&&(Y=0,v=Math.min(a,m-x),ce=v),v<=0||b<=-c||b>h?(b=0,W=0,q=0,B=0):b<=0?(q=-b,b=0,W=Math.min(h,c+b),B=W):b<=h&&(q=0,W=Math.min(c,h-b),B=W);var G=[x,b,v,W];if(ce>0&&B>0){var Ie=d/a;G.push(Y*Ie,q*Ie,ce*Ie,B*Ie)}return z.drawImage.apply(z,[r].concat(lL(G.map(function(Pe){return Math.floor(gr(Pe))})))),D},setAspectRatio:function(e){var t=this.options;return!this.disabled&&!Zn(e)&&(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t=this.options,r=this.dragBox,s=this.face;if(this.ready&&!this.disabled){var o=e===gc,n=t.movable&&e===jL;e=o||n?e:dL,t.dragMode=e,js(r,Ls,e),lr(r,Ha,o),lr(r,Va,n),t.cropBoxMovable||(js(s,Ls,e),lr(s,Ha,o),lr(s,Va,n))}return this}},uke=wt.Cropper,CL=(function(){function i(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w5e(this,i),!e||!Y5e.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=je({},o0,ur(t)&&t),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return C5e(i,[{key:"init",value:function(){var t=this.element,r=t.tagName.toLowerCase(),s;if(!t[ge]){if(t[ge]=this,r==="img"){if(this.isImg=!0,s=t.getAttribute("src")||"",this.originalUrl=s,!s)return;s=t.src}else r==="canvas"&&window.HTMLCanvasElement&&(s=t.toDataURL());this.load(s)}}},{key:"load",value:function(t){var r=this;if(t){this.url=t,this.imageData={};var s=this.element,o=this.options;if(!o.rotatable&&!o.scalable&&(o.checkOrientation=!1),!o.checkOrientation||!window.ArrayBuffer){this.clone();return}if(v5e.test(t)){b5e.test(t)?this.read(eke(t)):this.clone();return}var n=new XMLHttpRequest,a=this.clone.bind(this);this.reloading=!0,this.xhr=n,n.onabort=a,n.onerror=a,n.ontimeout=a,n.onprogress=function(){n.getResponseHeader("content-type")!==s0&&n.abort()},n.onload=function(){r.read(n.response)},n.onloadend=function(){r.reloading=!1,r.xhr=null},o.checkCrossOrigin&&a0(t)&&s.crossOrigin&&(t=M0(t)),n.open("GET",t,!0),n.responseType="arraybuffer",n.withCredentials=s.crossOrigin==="use-credentials",n.send()}}},{key:"read",value:function(t){var r=this.options,s=this.imageData,o=ike(t),n=0,a=1,c=1;if(o>1){this.url=tke(t,s0);var l=rke(o);n=l.rotate,a=l.scaleX,c=l.scaleY}r.rotatable&&(s.rotate=n),r.scalable&&(s.scaleX=a,s.scaleY=c),this.clone()}},{key:"clone",value:function(){var t=this.element,r=this.url,s=t.crossOrigin,o=r;this.options.checkCrossOrigin&&a0(r)&&(s||(s="anonymous"),o=M0(r)),this.crossOrigin=s,this.crossOriginUrl=o;var n=document.createElement("img");s&&(n.crossOrigin=s),n.src=o||r,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),Ae(n,ZN),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,r=this.image;r.onload=null,r.onerror=null,this.sizing=!0;var s=wt.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(wt.navigator.userAgent),o=function(l,N){je(t.imageData,{naturalWidth:l,naturalHeight:N,aspectRatio:l/N}),t.initialImageData=je({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(r.naturalWidth&&!s){o(r.naturalWidth,r.naturalHeight);return}var n=document.createElement("img"),a=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){o(n.width,n.height),s||a.removeChild(n)},n.src=r.src,s||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",a.appendChild(n))}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var t=this.element,r=this.options,s=this.image,o=t.parentNode,n=document.createElement("div");n.innerHTML=Q5e;var a=n.querySelector(".".concat(ge,"-container")),c=a.querySelector(".".concat(ge,"-canvas")),l=a.querySelector(".".concat(ge,"-drag-box")),N=a.querySelector(".".concat(ge,"-crop-box")),u=N.querySelector(".".concat(ge,"-face"));this.container=o,this.cropper=a,this.canvas=c,this.dragBox=l,this.cropBox=N,this.viewBox=a.querySelector(".".concat(ge,"-view-box")),this.face=u,c.appendChild(s),Ae(t,Fe),o.insertBefore(a,t.nextSibling),zt(s,ZN),this.initPreview(),this.bind(),r.initialAspectRatio=Math.max(0,r.initialAspectRatio)||NaN,r.aspectRatio=Math.max(0,r.aspectRatio)||NaN,r.viewMode=Math.max(0,Math.min(3,Math.round(r.viewMode)))||0,Ae(N,Fe),r.guides||Ae(N.getElementsByClassName("".concat(ge,"-dashed")),Fe),r.center||Ae(N.getElementsByClassName("".concat(ge,"-center")),Fe),r.background&&Ae(a,"".concat(ge,"-bg")),r.highlight||Ae(u,O5e),r.cropBoxMovable&&(Ae(u,Va),js(u,Ls,Nc)),r.cropBoxResizable||(Ae(N.getElementsByClassName("".concat(ge,"-line")),Fe),Ae(N.getElementsByClassName("".concat(ge,"-point")),Fe)),this.render(),this.ready=!0,this.setDragMode(r.dragMode),r.autoCrop&&this.crop(),this.setData(r.data),Be(r.ready)&&et(t,t0,r.ready,{once:!0}),Lr(t,t0)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),zt(this.element,Fe)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=uke,i}},{key:"setDefaults",value:function(t){je(o0,ur(t)&&t)}}])})();je(CL.prototype,ske,oke,nke,ake,Mke,cke);var hi=function(){return hi=Object.assign||function(i){for(var e,t=1,r=arguments.length;t<r;t++)for(var s in e=arguments[t])Object.prototype.hasOwnProperty.call(e,s)&&(i[s]=e[s]);return i},hi.apply(this,arguments)};function Kn(i,e){var t={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function"){var s=0;for(r=Object.getOwnPropertySymbols(i);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(i,r[s])&&(t[r[s]]=i[r[s]])}return t}var lke=["aspectRatio","autoCrop","autoCropArea","background","center","checkCrossOrigin","checkOrientation","cropBoxMovable","cropBoxResizable","data","dragMode","guides","highlight","initialAspectRatio","minCanvasHeight","minCanvasWidth","minContainerHeight","minContainerWidth","minCropBoxHeight","minCropBoxWidth","modal","movable","preview","responsive","restore","rotatable","scalable","toggleDragModeOnDblclick","viewMode","wheelZoomRatio","zoomOnTouch","zoomOnWheel","zoomable","cropstart","cropmove","cropend","crop","zoom","ready"],Nke={opacity:0,maxWidth:"100%"},gke=M.forwardRef((function(i,e){var t=Kn(i,[]),r=t.dragMode,s=r===void 0?"crop":r,o=t.src,n=t.style,a=t.className,c=t.crossOrigin,l=t.scaleX,N=t.scaleY,u=t.enable,g=t.zoomTo,L=t.rotateTo,d=t.alt,y=d===void 0?"picture":d,D=t.ready,z=t.onInitialized,A=Kn(t,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),C={scaleY:N,scaleX:l,enable:u,zoomTo:g,rotateTo:L},f=(function(){for(var h=[],x=0;x<arguments.length;x++)h[x]=arguments[x];var b=_.useRef(null);return M.useEffect((function(){h.forEach((function(v){v&&(typeof v=="function"?v(b.current):v.current=b.current)}))}),[h]),b})(e,_.useRef(null));_.useEffect((function(){var h;!((h=f.current)===null||h===void 0)&&h.cropper&&typeof g=="number"&&f.current.cropper.zoomTo(g)}),[t.zoomTo]),_.useEffect((function(){var h;!((h=f.current)===null||h===void 0)&&h.cropper&&o!==void 0&&f.current.cropper.reset().clear().replace(o)}),[o]),_.useEffect((function(){if(f.current!==null){var h=new CL(f.current,hi(hi({dragMode:s},A),{ready:function(x){x.currentTarget!==null&&(function(b,v){v===void 0&&(v={});var W=v.enable,Y=W===void 0||W,q=v.scaleX,ce=q===void 0?1:q,B=v.scaleY,G=B===void 0?1:B,Ie=v.zoomTo,Pe=Ie===void 0?0:Ie,ve=v.rotateTo;Y?b.enable():b.disable(),b.scaleX(ce),b.scaleY(G),ve!==void 0&&b.rotateTo(ve),Pe>0&&b.zoomTo(Pe)})(x.currentTarget.cropper,C),D&&D(x)}}));z&&z(h)}return function(){var x,b;(b=(x=f.current)===null||x===void 0?void 0:x.cropper)===null||b===void 0||b.destroy()}}),[f]);var m=(function(h){return lke.reduce((function(x,b){var v=x,W=b;return v[W],Kn(v,[typeof W=="symbol"?W:W+""])}),h)})(hi(hi({},A),{crossOrigin:c,src:o,alt:y}));return M.createElement("div",{style:n,className:a},M.createElement("img",hi({},m,{style:Nke,ref:f})))}));const Lke=`
496
497
  /*!
497
498
  * Cropper.js v1.5.12
498
499
  * https://fengyuanchen.github.io/cropperjs