@abtnode/webapp 1.16.25-beta-cfcab4af → 1.16.25-beta-023ec101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 9818.dd9e917b.chunk.js.LICENSE.txt */
2
+ (self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[9818],{87806:(e,t,i)=>{"use strict";t.Z=void 0;(o=i(5057))&&o.__esModule;var o,n=i(96266);function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){s(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function s(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var l=function(e){return(0,n.jsx)("svg",a(a({},e),{},{children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10a6.75 6.75 0 1 1 13.5 0 6.75 6.75 0 0 1-13.5 0zM10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5zM8.03 6.97a.75.75 0 0 0-1.06 1.06l5 5a.75.75 0 1 0 1.06-1.06l-5-5z"})}))};l.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},l.displayName="revoke";t.Z=l},99818:(e,t,i)=>{"use strict";i.d(t,{qY:()=>I,YZ:()=>Le});i(1192),i(2484),i(5873),i(79787);var o=i(96266),n=i(47220),r=i(76223),a=i(68420),s=i(11337),l=i(43907),c=i(55498),d=i(13727),u=i(72113),p=i(7469),m=i(25228),b=i(39948),f=i(67680),E=i(99360),w=i(55898),h=i.n(w),g=i(5057),_=i(56556);function v(e){let{optionalComponent:t,index:i,installStatus:n,hasPermission:a,t:s}=e;const l="stopped"===n||"running"===n;return(0,o.jsxs)(b.Z,{children:[0===i?null:(0,o.jsx)(b.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,o.jsxs)(b.Z,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[(0,o.jsx)("img",{style:{width:60,height:60,minWidth:60,minHeight:60},src:t.logoUrl,alt:t.meta.title}),(0,o.jsxs)(b.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[(0,o.jsxs)(b.Z,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var e;return null===(e=t.meta)||void 0===e||e.did,void window.open(null===t||void 0===t?void 0:t.storeUrl,"_blank")},children:[t.meta.title,(0,o.jsxs)(b.Z,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[t.meta.version,(0,o.jsx)(c.JO,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:r.E.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),(0,o.jsx)(b.Z,{sx:{marginTop:0,opacity:.7},children:t.meta.description}),(0,o.jsx)(b.Z,{sx:{display:a?"flex":"none",flexDirection:"row",gap:1},children:n?(0,o.jsx)(b.Z,{sx:{marginTop:2,opacity:.7},children:l?(0,o.jsx)(_.Z,{variant:"contained",onClick:()=>{window.location.reload()},children:s("componentInstallerRefresh")},"refresh"):(0,o.jsx)(_.Z,{disabled:!0,sx:{color:"#333"},startIcon:(0,o.jsx)(c.JO,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:n},"status")}):(0,o.jsx)(_.Z,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var e;return null===(e=t.meta)||void 0===e||e.did,void window.open(null===t||void 0===t?void 0:t.installUrl,"_blank")},children:s("componentInstallerInstall")},"install")}),l?(0,o.jsx)(b.Z,{sx:{marginTop:2,opacity:.7},children:s("componentInstallerSuccessInstalled")}):null]})]})]})}v.propTypes={t:h().func.isRequired,optionalComponent:h().object.isRequired,index:h().number.isRequired,installStatus:h().string,hasPermission:h().bool.isRequired},v.defaultProps={installStatus:""};const T={zh:{componentInstallerTitle:"\u7f3a\u5c11\u7ec4\u4ef6",componentInstallerInstall:"\u5b89\u88c5",componentInstallerClose:"\u5173\u95ed",componentInstallerRefresh:"\u91cd\u8f7d\u9875\u9762",componentInstallerSuccessInstalled:"\u5b89\u88c5\u6210\u529f\uff0c\u8bf7\u91cd\u8f7d\u9875\u9762\u67e5\u770b\u53d8\u5316\u3002",componentInstallerSuggestions:"\u8bf7\u8054\u7cfb\u7cfb\u7edf\u7ba1\u7406\u5458\u5b89\u88c5\u8be5\u7ec4\u4ef6\u3002",componentInstallerNoDefinedInBlockletYML:"\u7ec4\u4ef6\u672a\u5728 blocklet.yml \u4e2d\u5b9a\u4e49"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}};var O=i(74958),x=i(6352),S=i.n(x);const R=e=>"string"===typeof e?new Set(e.split(";;")):new Set(e);const y=function(e){let{did:t,onInstalled:i,onError:o}=e;const n=Array.isArray(t)?t.join(";;"):t,[r,a]=(0,g.useState)({}),s=(0,g.useRef)({onInstalled:i,onError:o});s.current={onInstalled:i,onError:o};const{optionalComponents:l,componentMountPoints:c}=window.blocklet,d=(0,g.useMemo)((()=>{var e;if(!l||!l.length)return[];const t=R(n),i=l.filter((e=>t.has(e.meta.did)));return null===(e=i?s.current.onError:s.current.onInstalled)||void 0===e||e(i),i}),[n,l]),u=(0,g.useMemo)((()=>{if(d.length)return!0;const e=R(n);return(c||[]).find((t=>e.has(t.did)))}),[d,c,n]);return d.forEach((e=>{e.storeUrl=S()(e.meta.homepage,"blocklets",e.meta.did),e.installUrl=S()(window.blocklet.appUrl,O.Bu,"/admin/components?install-component=".concat(e.meta.did))})),(0,g.useEffect)((()=>{const e=e=>{var t,i;if(e.origin===window.blocklet.appUrl&&"component-installer"===(null===(t=e.data)||void 0===t?void 0:t.kind)&&null!==(i=e.data)&&void 0!==i&&null!==(i=i.blocklet)&&void 0!==i&&i.children){var o;let t=!1;const i=R(n);null===(o=e.data)||void 0===o||null===(o=o.blocklet)||void 0===o||o.children.forEach((e=>{var o;i.has(null===(o=e.meta)||void 0===o?void 0:o.did)&&(t=!0,a((t=>{var i;return{...t,[null===(i=e.meta)||void 0===i?void 0:i.did]:e.status||"waiting"}})))})),t||a({})}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[n]),{optComponents:d,installed:!d.length&&u,installStatus:r,setInstallStatus:a,definedInBlockletYML:u}};function k(e){let{warnIcon:t,did:i,noPermissionMute:w,onInstalled:h,onError:_,children:O,closeByOutSize:x,onClose:S,fallback:R,disabled:k,roles:I=["owner","admin"]}=e;const{locale:A}=(0,a.PE)(),N=(0,E.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.I)(T,e,A,"en",t)})),{installed:L,optComponents:C,installStatus:P,definedInBlockletYML:D}=y({did:i,onInstalled:h,onError:_}),j=(0,g.useContext)(n.B3),M=()=>{null===S||void 0===S||S(!1)};return k?O:(0,o.jsx)(l.Z,{session:null===j||void 0===j?void 0:j.session,roles:I,children:e=>{let{hasPermission:n}=e;return L?O:w&&!n?R||null:"function"===typeof O?(0,o.jsxs)(o.Fragment,{children:[R,O({hasPermission:n,optComponents:C,installStatus:P})]}):(0,o.jsxs)(o.Fragment,{children:[R,(0,o.jsx)(u.d,{onClickAway:e=>{e.preventDefault(),e.stopPropagation(),x&&M()},children:(0,o.jsx)(p.Z,{in:!0,timeout:350,children:(0,o.jsx)(m.Z,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:r.E.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:"0px 8px 16px 0px ".concat(r.E.gray6,", 0px 0px 0px 1px ").concat(r.E.gray6)},children:D?(0,o.jsxs)(b.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,o.jsxs)(b.Z,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[t||(0,o.jsx)(c.JO,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),(0,o.jsx)(b.Z,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:N("componentInstallerTitle")}),(0,o.jsx)(b.Z,{sx:{flex:1}}),S?(0,o.jsx)(f.Z,{variant:"outlined",className:"button",onClick:M,children:(0,o.jsx)(d.default,{})}):null]}),(0,o.jsx)(b.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,o.jsx)(b.Z,{sx:{maxHeight:"70vh",overflowY:"auto"},children:C.map(((e,t)=>{var i,r;return(0,o.jsx)(v,{t:N,hasPermission:n,index:t,optionalComponent:e,installStatus:P[null===(i=e.meta)||void 0===i?void 0:i.did]},(null===(r=e.meta)||void 0===r?void 0:r.did)||t)}))}),n?null:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,o.jsx)(b.Z,{sx:{padding:"20px 24px"},children:(0,o.jsx)(b.Z,{sx:{opacity:1},children:N("componentInstallerSuggestions")})})]})]}):(0,o.jsxs)(b.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,o.jsxs)(b.Z,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[t||(0,o.jsx)(c.JO,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),(0,o.jsx)(b.Z,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:N("componentInstallerTitle")}),(0,o.jsx)(b.Z,{sx:{flex:1}}),S?(0,o.jsx)(f.Z,{variant:"outlined",className:"button",onClick:M,children:(0,o.jsx)(d.default,{})}):null]}),(0,o.jsx)(b.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,o.jsxs)(b.Z,{sx:{padding:"20px 24px",marginTop:0},children:[N("componentInstallerNoDefinedInBlockletYML"),": ",i]})]})})})})]})}})}function I(e){return window.blocklet?(0,o.jsx)(k,{...e}):e.children}k.propTypes={disabled:h().bool,warnIcon:h().node,did:h().oneOfType([h().string,h().arrayOf(h().string)]).isRequired,noPermissionMute:h().bool,onInstalled:h().func,onError:h().func,children:h().any.isRequired,closeByOutSize:h().bool,onClose:h().func,fallback:h().node,roles:h().array},k.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]},I.propTypes={...k.propTypes,children:h().any.isRequired},I.defaultProps={...k.defaultProps};i(28018),i(94464),i(25710),i(28726);var A=i(13128);i(71569),i(25842);i(23939);var N=i(49384);i(60251);var L=i(95712);i(47685),i(72966),i(92706);i(94457);var C=i(26538),P=i.n(C),D=i(87806);function j(e){let{passport:t,user:i,color:n,width:r,icon:s,children:l,createPassportSvg:c,...d}=e;const{t:u}=(0,a.PE)();return(0,o.jsxs)(b.Z,{...d,sx:{display:"flex",alignItems:"center",...null===d||void 0===d?void 0:d.sx},children:[(0,o.jsx)(b.Z,{className:"passport-item__display",dangerouslySetInnerHTML:{__html:c({title:t.title||t.name,issuer:t.issuer&&t.issuer.name,issuerDid:t.issuer&&t.issuer.id,ownerName:i.fullName,ownerDid:i.did,ownerAvatarUrl:i.avatar,revoked:t.revoked,preferredColor:n,width:r})}}),(0,o.jsxs)(b.Z,{className:"passport-item__body",sx:{p:0,ml:3,mt:0},children:[(0,o.jsxs)(b.Z,{className:"passport-item__title",sx:{display:"flex",alignItems:"center",fontWeight:400,fontSize:"16px",lineHeight:1.1875,color:"#222222"},children:[P()(t.title),(0,o.jsxs)(b.Z,{className:"passport-item__status-icon",sx:{svg:{fill:"#bfbfbf",height:"1.2em",marginLeft:"0.4em"}},children:[s,t.revoked&&(0,o.jsx)(D.Z,{})]})]}),t.expirationDate&&(0,o.jsx)(b.Z,{className:"passport-item__title",sx:{display:"flex",alignItems:"center",fontWeight:400,fontSize:"16px",lineHeight:1.1875,color:"#222222"},children:u("team.passport.validUntil",{date:t.expirationDate})}),l]})]})}j.propTypes={passport:h().any.isRequired,user:h().any.isRequired,color:h().string.isRequired,createPassportSvg:h().func.isRequired,icon:h().any,children:h().any,width:h().number},j.defaultProps={icon:null,children:null,width:150};i(21998),i(30278),i(76818);const M=(0,g.createContext)({}),{Provider:B,Consumer:U}=M;i(82790),i(86229),i(82434),i(14506),i(16967);var F=i(36738),K=i(2842);function Z(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)e[o]=i[o]}return e}var z=function e(t,i){function o(e,o,n){if("undefined"!==typeof document){"number"===typeof(n=Z({},i,n)).expires&&(n.expires=new Date(Date.now()+864e5*n.expires)),n.expires&&(n.expires=n.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var r="";for(var a in n)n[a]&&(r+="; "+a,!0!==n[a]&&(r+="="+n[a].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+r}}return Object.create({set:o,get:function(e){if("undefined"!==typeof document&&(!arguments.length||e)){for(var i=document.cookie?document.cookie.split("; "):[],o={},n=0;n<i.length;n++){var r=i[n].split("="),a=r.slice(1).join("=");try{var s=decodeURIComponent(r[0]);if(o[s]=t.read(a,s),e===s)break}catch(l){}}return e?o[e]:o}},remove:function(e,t){o(e,"",Z({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Z({},this.attributes,t))},withConverter:function(t){return e(Z({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),H=i(10458),W=i.n(H),q=Object.defineProperty,G=(e,t,i)=>(((e,t,i)=>{t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!==typeof t?t+"":t,i),i);class V{constructor(e){let{api:t}=e;G(this,"api"),this.api=t}async getUserPublicInfo(e){let{did:t}=e;const{data:i}=await this.api.get("/api/user",{params:{did:t}});return i}async getUserPrivacyConfig(e){let{did:t}=e;const{data:i}=await this.api.get("/api/user/privacy/config",{params:{did:t}});return i}async saveUserPrivacyConfig(e){const{data:t}=await this.api.post("/api/user/privacy/config",e);return t}async getUserNotificationConfig(){const{data:e}=await this.api.get("/api/user/notification/config");return e}async saveUserNotificationConfig(e){const{data:t}=await this.api.post("/api/user/notification/config",e);return t}async testNotificationWebhook(e){const{data:t}=await this.api.put("/api/user/notification/webhook",e);return t}async getProfileUrl(e){let{did:t,locale:i}=e;const o="".concat(F.WELLKNOWN_SERVICE_PATH_PREFIX,"/user");return(0,K.jb)(o,{did:t,locale:i})}async logout(e){let{visitorId:t}=e;const{data:i}=await this.api.post("/api/user/logout",{visitorId:t});return i}}class Y{getSessionToken(){return z.get(F.SESSION_TOKEN_STORAGE_KEY)}setSessionToken(e){z.set(F.SESSION_TOKEN_STORAGE_KEY,e)}removeSessionToken(){z.remove(F.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(F.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(e){localStorage.setItem(F.REFRESH_TOKEN_STORAGE_KEY,e)}removeRefreshToken(){localStorage.removeItem(F.REFRESH_TOKEN_STORAGE_KEY)}}var X=Object.defineProperty,J=(e,t,i)=>(((e,t,i)=>{t in e?X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!==typeof t?t+"":t,i),i);class ${constructor(e){let{api:t}=e;J(this,"api"),this.api=t}async getUserSessions(e){let{did:t}=e;const{data:i}=await this.api.get("/api/user-session",{params:{userDid:t}});return i}}async function Q(e,t){e.metaData.endTime=+new Date;const{startTime:i,endTime:o}=e.metaData,n=o-i;n<t&&await function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((t=>{setTimeout((()=>{t()}),e)}))}(t-n),delete e.metaData}const ee=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{lazy:t=!1,lazyTime:i=300}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=H.create({...e,headers:{...e.headers,"x-blocklet-js-sdk-version":"1.16.24"}});return t&&(o.interceptors.request.use((e=>(e.metaData={startTime:+new Date},e)),(e=>Promise.reject(e))),o.interceptors.response.use((async e=>(await Q(e.config,i),e)),(async e=>(await Q(e.response.config,i),Promise.reject(e))))),o},te=F.WELLKNOWN_SERVICE_PATH_PREFIX;function ie(e){let{getSessionToken:t,setSessionToken:i,removeSessionToken:o,getRefreshToken:n,setRefreshToken:r,removeRefreshToken:a,onRefreshTokenError:s,onRefreshTokenSuccess:l}=e,c=null;const d=ee({baseURL:te,timeout:3e4,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}});return d.interceptors.request.use((async e=>{if(!z.get(F.SESSION_TOKEN_STORAGE_KEY)){const i=t();i&&(e.headers.authorization="Bearer ".concat(encodeURIComponent(i)))}return c&&await c,e}),(e=>Promise.reject(e))),d.interceptors.response.use((e=>e),(async e=>{var t;const u=e.config;if(u.headers={...null===u||void 0===u?void 0:u.headers},401===(null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.status)&&!u._retry){u._retry=!0,c||(c=async function(e){if(!e)throw new Error("Refresh token not found");const t=ee({baseURL:te,timeout:1e4,headers:{authorization:"Bearer ".concat(encodeURIComponent(e))}}),{data:i}=await t.post("api/did/refreshSession");return i}(n()));try{const e=await c;return i(e.nextToken),r(e.nextRefreshToken),"function"===typeof l&&l(e),d(u)}catch(p){return o(),a(),"function"===typeof s&&s(p),Promise.reject(p)}finally{c=null}}return Promise.reject(e)})),d}var oe=Object.defineProperty,ne=(e,t,i)=>(((e,t,i)=>{t in e?oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!==typeof t?t+"":t,i),i);const re=new class{constructor(){ne(this,"api"),ne(this,"user"),ne(this,"userSession"),ne(this,"token");const e=new Y,t=ie({getSessionToken:e.getSessionToken,setSessionToken:e.setSessionToken,removeSessionToken:e.removeSessionToken,getRefreshToken:e.getRefreshToken,setRefreshToken:e.setRefreshToken,removeRefreshToken:e.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}});this.user=new V({api:t}),this.userSession=new $({api:t}),this.api=t,this.token=e}};var ae=i(71171),se=(i(35966),i(33518));i(22425),i(75506);W().defaults.timeout=1e4;W().create();i.p;i(22256);i.p;var le;(0,se.Z)(b.Z)(le||(le=(0,ae.Z)(["\n .selected-container {\n position: absolute;\n right: 0px;\n bottom: 0px;\n display: flex;\n -webkit-box-pack: end;\n justify-content: flex-end;\n align-items: flex-end;\n width: 32px;\n height: 32px;\n border-radius: 0px 0px 8px;\n color: rgb(255, 255, 255);\n overflow: hidden;\n transition: all 0.4s ease 0s;\n\n &::after {\n position: absolute;\n z-index: 0;\n left: 60px;\n top: 60px;\n display: block;\n width: 0px;\n height: 0px;\n border-width: 16px;\n border-style: solid;\n border-color: transparent #1dc1c7 #1dc1c7 transparent;\n transition: all 0.1s ease 0s;\n content: '';\n }\n\n .selected-icon {\n visibility: hidden;\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0px 1px 1px 0px;\n font-size: 16px;\n transition: all 0.2s ease 0s;\n }\n }\n\n .selected-container.selected {\n &::after {\n left: 0px;\n top: 0px;\n }\n\n .selected-icon {\n visibility: visible;\n }\n }\n"])));var ce;(0,se.Z)(b.Z)(ce||(ce=(0,ae.Z)(["\n height: 100%;\n overflow-y: auto;\n"])));var de=i(75760),ue=i(79366),pe=i(93066),me=i(62219),be=i.n(me),fe=i(35833),Ee=i.n(fe),we=i(14520);class he extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const ge=e=>void 0===globalThis.DOMException?new he(e):new DOMException(e),_e=e=>{const t=void 0===e.reason?ge("This operation was aborted."):e.reason;return t instanceof Error?t:ge(t)};const ve=Symbol("skip");async function Te(e,t){return async function(e,t){let{concurrency:i=Number.POSITIVE_INFINITY,stopOnError:o=!0,signal:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((r,a)=>{if(void 0===e[Symbol.iterator]&&void 0===e[Symbol.asyncIterator])throw new TypeError("Expected `input` to be either an `Iterable` or `AsyncIterable`, got (".concat(typeof e,")"));if("function"!==typeof t)throw new TypeError("Mapper function is required");if(!Number.isSafeInteger(i)&&i!==Number.POSITIVE_INFINITY||!(i>=1))throw new TypeError("Expected `concurrency` to be an integer from 1 and up or `Infinity`, got `".concat(i,"` (").concat(typeof i,")"));const s=[],l=[],c=new Map;let d=!1,u=!1,p=!1,m=0,b=0;const f=void 0===e[Symbol.iterator]?e[Symbol.asyncIterator]():e[Symbol.iterator](),E=e=>{d=!0,u=!0,a(e)};n&&(n.aborted&&E(_e(n)),n.addEventListener("abort",(()=>{E(_e(n))})));const w=async()=>{if(u)return;const e=await f.next(),i=b;if(b++,e.done){if(p=!0,0===m&&!u){if(!o&&l.length>0)return void E(new AggregateError(l));if(u=!0,0===c.size)return void r(s);const e=[];for(const[t,i]of s.entries())c.get(t)!==ve&&e.push(i);r(e)}}else m++,(async()=>{try{const o=await e.value;if(u)return;const n=await t(o,i);n===ve&&c.set(i,n),s[i]=n,m--,await w()}catch(n){if(o)E(n);else{l.push(n),m--;try{await w()}catch(n){E(n)}}}})()};(async()=>{for(let t=0;t<i;t++){try{await w()}catch(e){E(e);break}if(p||d)break}})()}))}(e,(e=>e()),t)}var Oe=i(75239),xe=i(11750),Se=i(19654);function Re(e){let{user:t,sessionUser:i}=e;const n=(0,pe.Z)((()=>{var e;return null===(e=(null===t||void 0===t?void 0:t.passports)||[])||void 0===e?void 0:e.find((e=>e.name===i.role))}),[null===t||void 0===t?void 0:t.passports,null===i||void 0===i?void 0:i.role]);return(0,o.jsxs)(b.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,o.jsx)(L.Z,{size:40,variant:"circle",shape:"circle",src:i.avatar,did:i.did}),(0,o.jsxs)(b.Z,{children:[(0,o.jsxs)(b.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,o.jsx)(xe.Z,{sx:{whiteSpace:"normal",wordBreak:"break-all"},children:i.fullName}),(0,o.jsx)(Se.Z,{label:(null===n||void 0===n?void 0:n.title)||(null===n||void 0===n?void 0:n.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:r.E.textBase,borderColor:r.E.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:1,pl:.5}})]}),(0,o.jsx)(xe.Z,{variant:"body2",color:"grey",children:i.email})]})]})}const ye={zh:{confirm:"\u786e\u8ba4",cancel:"\u53d6\u6d88",visitorId:"\u8bbe\u5907\u6807\u8bc6",deviceType:"\u8bbe\u5907\u7c7b\u578b",platform:"\u64cd\u4f5c\u7cfb\u7edf",walletOS:"\u94b1\u5305\u7c7b\u578b",role:"\u89d2\u8272",fullname:"\u59d3\u540d",email:"\u90ae\u7bb1",avatar:"\u5934\u50cf",user:"\u7528\u6237",createdAt:"\u9996\u6b21\u6d3b\u52a8\u65f6\u95f4",updatedAt:"\u6700\u8fd1\u6d3b\u52a8\u65f6\u95f4",lastLoginIp:"\u6700\u8fd1\u6d3b\u52a8\u5730\u5740",actions:"\u64cd\u4f5c",logoutAll:"\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd",logoutAllTips:"\u4e0d\u4f1a\u6ce8\u9500\u5f53\u524d\u4f1a\u8bdd",logout:"\u6ce8\u9500",currentSession:"\u5f53\u524d\u4f1a\u8bdd",unknown:"\u672a\u77e5",expired:"\u5df2\u8fc7\u671f",remove:"\u5220\u9664",logoutThisSession:"\u6ce8\u9500\u6307\u5b9a\u4f1a\u8bdd",logoutThisSessionConfirm:"\u786e\u5b9a\u8981\u6ce8\u9500\u6b64\u4f1a\u8bdd\u5417?",logoutAllSession:"\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd",logoutAllSessionConfirm:"\u786e\u5b9a\u8981\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd\u5417?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},ke="Reserved IP",Ie="ip-region-cache";async function Ae(e){let t="",i={};try{const e=localStorage.getItem(Ie);e&&(i=JSON.parse(e))}catch{i={}}if(i[e])t=i[e];else{try{t=await async function(e){const t="https://api.ip.sb/geoip/".concat(e),i=await fetch(t),o=await i.json();let n="";return o.error?o.reserved&&(n=ke):n=[o.country,o.region,o.city].filter(Boolean).join("/"),n}(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!t)try{t=await async function(e){const t="https://ipapi.co/".concat(e,"/json/"),i=await fetch(t),o=await i.json();let n="";return o.error?o.reserved&&(n=ke):n=[o.country_name,o.region,o.city].filter(Boolean).join("/"),n}(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(t){const o=Object.keys(i);o.length>100&&delete i[o[0]],i[e]&&delete i[e],i[e]=t,localStorage.setItem(Ie,JSON.stringify(i))}return t}const Ne=e=>new(Ee())(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Ee().BROWSER.NAME,Ee().BROWSER.VERSION]]}).getResult();function Le(e){let{user:t,showAction:i=!0,showUser:n=!0}=e;const r=(0,we.OP)(),{locale:l}=(0,a.PE)(),{confirmApi:c,confirmHolder:d}=(0,A.N4)(),u=(0,E.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.I)(ye,e,l,"en",t)})),p=(0,E.Z)((async()=>{let e=null===t||void 0===t?void 0:t.userSessions;e||(e=await re.userSession.getUserSessions({did:t.did}));try{var i;const t=null===(i=e)||void 0===i?void 0:i.map(((e,t)=>[t,e.lastLoginIp])).filter((e=>!!e[1])),o=null===t||void 0===t?void 0:t.map((e=>e[1])),n=await async function(e){return Promise.all(e.map((e=>Ae(e))))}(o);for(let i=0;i<n.length;i++){const o=n[i],r=t[i];e[r[0]].ipRegion=o}}catch(n){console.warn("Failed to convert ip to region"),console.error(n)}const o=(new Date).getTime();return be()(e,(e=>e.visitorId===r?-1:o-new Date(e.updatedAt).getTime()))})),m=(0,ue.Z)(p),f=(0,pe.Z)((()=>m.data||[]),[m.data]),w=(0,pe.Z)((()=>f.reduce(((e,t)=>(e[t.lastLoginIp]=t.ipRegion,e)),{})),[f]),h=(0,E.Z)((e=>{let{visitorId:t}=e;c.open({title:u("logoutThisSession"),content:u("logoutThisSessionConfirm"),confirmButtonText:u("confirm"),cancelButtonText:u("cancel"),onConfirm:async()=>{await re.user.logout({visitorId:t}),m.refresh(),c.close()}})})),g=(0,pe.Z)((()=>f.filter((e=>e.visitorId!==r))),[f]),v=(0,E.Z)((()=>{c.open({title:u("logoutAllSession"),content:u("logoutAllSessionConfirm"),confirmButtonText:u("confirm"),cancelButtonText:u("cancel"),onConfirm:async()=>{const e=g.map((e=>()=>re.user.logout({visitorId:e.visitorId})));await Te(e,{concurrency:3,stopOnError:!1}),m.refresh(),c.close()}})})),T=[];i&&T.push((0,o.jsx)(Oe.Z,{title:u("logoutAllTips"),children:(0,o.jsx)(_.Z,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:v,disabled:0===g.length,children:u("logoutAll")})},"logoutAll"));const O=(0,pe.Z)((()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600})),[]),x=[{label:u("platform"),name:"platform",options:{customBodyRenderLite:e=>{var t,i;const n=f[e],r=Ne(n.ua);return(0,o.jsx)(b.Z,{children:[null===(t=r.os)||void 0===t?void 0:t.name,null===(i=r.os)||void 0===i?void 0:i.version].filter(Boolean).join("/")||u("unknown")})}}},{label:u("deviceType"),name:"deviceType",options:{customBodyRenderLite:e=>{var t,i;const n=f[e],r=Ne(n.ua);return(0,o.jsx)(b.Z,{children:[null===(t=r.browser)||void 0===t?void 0:t.name,null===(i=r.browser)||void 0===i?void 0:i.version].filter(Boolean).join("/")||u("unknown")})}}},{label:u("walletOS"),name:"walletOS",options:{customBodyRenderLite:e=>{var t;const i=f[e];return(0,o.jsx)(b.Z,{children:(null===(t=i.extra)||void 0===t?void 0:t.walletOS)||u("unknown")})}}},n&&{label:u("user"),name:"user",options:{customBodyRenderLite:e=>{const i=f[e];return(0,o.jsx)(Re,{sessionUser:i.user,user:t})}}},{label:u("createdAt"),name:"createdAt",options:{customBodyRenderLite:e=>{const t=f[e];return t.createdAt?(0,o.jsx)(N.Z,{value:t.createdAt,relativeRange:2592e5,locale:l}):u("unknown")}}},{label:u("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:e=>{const t=f[e];return"expired"===t.status?u("expired"):(0,o.jsx)(N.Z,{value:t.updatedAt,relativeRange:2592e5,locale:l})}}},{label:u("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:e=>{const t=f[e];return(0,o.jsx)(b.Z,{children:w[t.lastLoginIp]?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xe.Z,{variant:"body2",children:w[t.lastLoginIp]}),(0,o.jsx)(xe.Z,{variant:"body2",color:"grey",children:t.lastLoginIp||u("unknown")})]}):(0,o.jsx)(xe.Z,{children:t.lastLoginIp||u("unknown")})})}}},i&&{label:u("actions"),name:"actions",options:{customBodyRenderLite:e=>{const t=f[e];return(0,o.jsx)(b.Z,{children:(0,o.jsx)(_.Z,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:r===t.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>h({visitorId:t.visitorId}),children:"expired"===t.status?u("remove"):r===t.visitorId?u("currentSession"):u("logout")})})}}}].filter(Boolean);return(0,o.jsxs)(b.Z,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[d,(0,o.jsx)(de.Z,{locale:l,data:f,columns:x,customButtons:T,options:O,loading:m.loading})]})}},36738:e=>{const t=Object.freeze({AUTH:"auth",AUTH_SERVICE:"@abtnode/auth-service"}),i=Object.freeze({AUTH_SERVICE:"/.service/".concat(t.AUTH_SERVICE)}),o=Object.freeze({OWNER:"owner",ADMIN:"admin",MEMBER:"member",GUEST:"guest"}),n=Object.freeze({...o,CI:"ci",CERTIFICATE:"certificate",BLOCKLET_OWNER:"blocklet-owner",BLOCKLET_ADMIN:"blocklet-admin",BLOCKLET_MEMBER:"blocklet-member",BLOCKLET_SDK:"blocklet-sdk",EXTERNAL_BLOCKLET_CONTROLLER:"external-blocklet-controller",EXTERNAL_BLOCKLETS_MANAGER:"external-blocklets-manager"}),r=[n.BLOCKLET_OWNER,n.BLOCKLET_ADMIN,n.BLOCKLET_MEMBER,n.BLOCKLET_SDK],a={roles:Object.freeze([{name:n.OWNER,title:"Owner",description:"Has full administrative access to the Blocklet Server",passport:!0},{name:n.ADMIN,title:"Admin",description:"Has full permissions to manage blocklet and Blocklet Server such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates, manage blocklet team, manage node integrations and access keys, upgrade node to a new version",passport:!0},{name:n.MEMBER,title:"Member",description:"Has permissions to manage blocklets, such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates",passport:!0},{name:n.GUEST,title:"Guest",description:"Has all read permissions on Blocklet Server",passport:!0},{name:n.CI,title:"CI",description:"Deploy blocklet to Blocklet Server",passport:!0,noHuman:!0},{name:n.CERTIFICATE,title:"Certificate",description:"Manage https certificates for blocklets on the Blocklet Server",passport:!0,noHuman:!0},{name:n.BLOCKLET_OWNER,title:"Blocklet Owner"},{name:n.BLOCKLET_ADMIN,title:"Blocklet Admin"},{name:n.BLOCKLET_MEMBER,title:"Blocklet Member"},{name:n.BLOCKLET_SDK,title:"Blocklet SDK"},{name:n.EXTERNAL_BLOCKLET_CONTROLLER,title:"External Blocklet Controller"},{name:n.EXTERNAL_BLOCKLETS_MANAGER,title:"External Blocklets Manager",description:"Manage external blocklets in the Blocklet Server",passport:!0,noHuman:!0},{name:t.AUTH_SERVICE,title:"Auth Service"}]),permissions:Object.freeze([{name:"query_node",description:"View node data, include dashboard and node settings, log stream for both Blocklet Server and blocklets"},{name:"mutate_node",description:"Change node settings, upgrade node to a new version"},{name:"query_session",description:"Get data from a long running session"},{name:"mutate_session",description:"Start/update/end a long running session"},{name:"query_accessKey",description:"View access keys for Blocklet Server"},{name:"mutate_accessKey",description:"Manage access keys for Blocklet Server, such as create/update/delete"},{name:"query_team",description:"View team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"mutate_team",description:"Manage team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"query_blocklets",description:"View store and installed blocklets, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklets",description:"Perform state changing actions on blocklets, such as install/upgrade/config/start/stop/remove"},{name:"query_router",description:"View sites, URL mapping and certificates in service gateway"},{name:"mutate_router",description:"Manage sites, URL mapping and certificates in service gateway"},{name:"query_certificate",description:"View certificates in service gateway"},{name:"mutate_certificate",description:"Manage certificates in service gateway"},{name:"query_notification",description:"View notifications"},{name:"mutate_notification",description:"Manage notifications, such as mark notifications as read"},{name:"query_webhook",description:"View integrations"},{name:"mutate_webhook",description:"Manage integrations"},{name:"query_blocklet",description:"View a blocklet, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklet",description:"Perform state changing actions on a blocklet, such as upgrade/config/start/stop"}]),grants:Object.freeze({[n.GUEST]:["query_blocklets","query_router","query_webhook","query_notification","query_team","query_accessKey","query_node","query_session"],[n.MEMBER]:[n.GUEST,"mutate_blocklets","mutate_router","mutate_notification","mutate_session"],[n.ADMIN]:[n.MEMBER,"mutate_team","mutate_webhook","mutate_accessKey","mutate_node","mutate_certificate"],[n.OWNER]:[o.ADMIN],[n.CI]:["query_blocklets","mutate_blocklets"],[n.CERTIFICATE]:["query_certificate","mutate_certificate"],[n.BLOCKLET_SDK]:["query_team","mutate_team","query_blocklet"],[n.BLOCKLET_OWNER]:[n.BLOCKLET_ADMIN],[n.BLOCKLET_ADMIN]:[n.BLOCKLET_MEMBER,"mutate_team","mutate_blocklet","mutate_notification"],[n.BLOCKLET_MEMBER]:["query_team","query_blocklet","query_notification"],[n.EXTERNAL_BLOCKLET_CONTROLLER]:["query_blocklets","mutate_blocklets"],[n.EXTERNAL_BLOCKLETS_MANAGER]:["query_blocklets","mutate_blocklets"]})},s=864e5,l="https://store.blocklet.dev",c="https://dev.store.blocklet.dev",d=Object.freeze({DERIVED:"derived",WALLET:"wallet"});e.exports=Object.freeze({NODE_MODES:Object.freeze({PRODUCTION:"production",DEBUG:"debug",MAINTENANCE:"maintenance",SERVERLESS:"serverless"}),DEFAULT_DESCRIPTION:"Web Interface to manage your Blocklet Server",NODE_MAINTAIN_PROGRESS:Object.freeze({SETUP:"setup",INSTALLING:"installing",VERIFYING:"verifying",RESTARTING:"restarting",CLEANUP:"cleanup",COMPLETE:"complete",ROLLBACK:"rollback"}),VC_TYPE_BLOCKLET_PURCHASE:"BlockletPurchaseCredential",VC_TYPE_NODE_PASSPORT:"ABTNodePassport",VC_TYPE_GENERAL_PASSPORT:"NFTPassport",NFT_TYPE_SERVER_OWNERSHIP:"BlockletServerOwnershipNFT",NFT_TYPE_SERVERLESS:"BlockletServerServerlessNFT",NODE_PACKAGE_NAME:"@abtnode/cli",NODE_COMMAND_NAME:"abtnode",NODE_DATA_DIR_NAME:"_abtnode",USER_AVATAR_DIR:"/.assets/avatar",USER_AVATAR_URL_PREFIX:"bn://avatar",USER_AVATAR_PATH_PREFIX:"/user/avatar",PROCESS_NAME_DAEMON:"abt-node-daemon",PROCESS_NAME_PROXY:"abt-node-db-hub",PROCESS_NAME_UPDATER:"abt-node-updater",PROCESS_NAME_SERVICE:"abt-node-service",PROCESS_NAME_ROUTER:"abt-node-router",PROCESS_NAME_LOG_ROTATE:"abt-node-log-rotate",PROCESS_NAME_EVENT_HUB:"abt-node-event-hub",NODE_REGISTER_URL:"https://install.arcblock.io/",WEB_WALLET_URL:"https://web.abtwallet.io",BLOCKLET_STORE_URL:l,BLOCKLET_STORE_URL_DEV:c,BLOCKLET_STORE_API_PREFIX:"/api",BLOCKLET_STORE_API_BLOCKLET_PREFIX:"/api/blocklets",BLOCKLET_STORE_META_PATH:"/api/store.json",BLOCKLET_STORE:{name:"Official Store",description:"ArcBlock official blocklet registry",url:l,logoUrl:"/logo.png",maintainer:"arcblock"},BLOCKLET_STORE_DEV:{name:"Dev Store",description:"ArcBlock dev registry that contains demo and example blocklets",url:c,maintainer:"arcblock",logoUrl:"/logo.png"},APP_STRUCT_VERSION:"2",DEFAULT_DID_REGISTRY:"https://registry.abtnet.io",DEFAULT_SLP_DOMAIN:"slp.abtnet.io",DEFAULT_DID_DOMAIN:"did.abtnet.io",DEFAULT_IP_DOMAIN:"*.ip.abtnet.io",DEFAULT_IP_DOMAIN_SUFFIX:"ip.abtnet.io",DEFAULT_WILDCARD_CERT_HOST:"https://releases.arcblock.io/",DEFAULT_NFT_DOMAIN_URL:"https://domain.didlabs.org/",DEFAULT_CERTIFICATE_EMAIL:"certs@arcblock.io",CONFIG_FILENAME:"config.yml",CONFIG_FILENAME_OLD:"abtnode.yml",CONFIG_FOLDER_NAME:".blocklet-server",CONFIG_FOLDER_NAME_OLD:".abtnode",EXPORTED_FOLDER_NAME:"exported_blocklet_server",StatusCode:Object.freeze({ok:0,blocklet_not_found:1,blocklet_not_purchased:2,forbidden:403,internal:500,timeout:504}),IP:new RegExp("-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}"),DOMAIN_FOR_IP_SITE:"",DOMAIN_FOR_IP_SITE_REGEXP:"~^\\d+.\\d+.\\d+.\\d+$",DOMAIN_FOR_DEFAULT_SITE:"*",DOMAIN_FOR_INTERNAL_SITE:"127.0.0.1",NAME_FOR_WELLKNOWN_SITE:"wellknown",WELLKNOWN_PATH_PREFIX:"/.well-known",WELLKNOWN_ACME_CHALLENGE_PREFIX:"/.well-known/acme-challenge",WELLKNOWN_DID_RESOLVER_PREFIX:"/.well-known/did.json",WELLKNOWN_PING_PREFIX:"/.well-known/ping",WELLKNOWN_ANALYTICS_PREFIX:"/.well-known/analytics",WELLKNOWN_SERVICE_PATH_PREFIX:"/.well-known/service",WELLKNOWN_BLOCKLET_ADMIN_PATH:"/.well-known/service/admin",WELLKNOWN_BLOCKLET_HEALTH_PATH:"/.well-known/service/health",WELLKNOWN_BLOCKLET_LOGO_PATH:"/.well-known/service/blocklet/logo",SLOT_FOR_IP_DNS_SITE:"888-888-888-888",DEFAULT_ADMIN_PATH:"/admin",WELLKNOWN_SERVER_ADMIN_PATH:"/.well-known/server/admin",DEFAULT_SERVICE_PATH:"/.abtnode/service",DEFAULT_HTTP_PORT:80,DEFAULT_HTTPS_PORT:443,MAX_UPLOAD_FILE_SIZE:500,DEFAULT_DAEMON_PORT:8089,MAX_NGINX_WORKER_CONNECTIONS:10240,BLOCKLET_PROXY_PATH_PREFIX:"/.blocklet/proxy",BLOCKLET_SITE_GROUP_SUFFIX:".blocklet-domain-group",DAY_IN_MS:s,DAEMON_MAX_MEM_LIMIT_IN_MB:800,PROXY_MAX_MEM_LIMIT_IN_MB:800,BLOCKLET_MAX_MEM_LIMIT_IN_MB:800,CERTIFICATE_EXPIRES_OFFSET:864e6,ROUTING_RULE_TYPES:Object.freeze({NONE:"none",DAEMON:"daemon",SERVICE:"service",BLOCKLET:"blocklet",REDIRECT:"redirect",GENERAL_REWRITE:"rewrite",GENERAL_PROXY:"general_proxy",DIRECT_RESPONSE:"direct_response",COMPONENT:"component"}),ROLES:o,SERVER_ROLES:n,BLOCKLET_ROLES:r,isBlockletRole:e=>e&&r.includes(e),AUTH_CERT_TYPE:{USER:"user",OWNERSHIP_NFT:"ownership_nft",BLOCKLET_USER:"blocklet_user",BLOCKLET_CONTROLLER:"blocklet_controller"},RBAC_CONFIG:a,genPermissionName:function(e){return"".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"access","_").concat(e.replace("_","-"))},PASSPORT_STATUS:{VALID:"valid",REVOKED:"revoked"},NODE_SERVICES:t,NODE_SERVICES_PREFIX:i,DISK_ALERT_THRESHOLD_PERCENT:80,EVENTS:{NOTIFICATION_CREATE:"notification.create",NOTIFICATION_BLOCKLET_CREATE:"notification.blockletCreate",ROUTING_UPDATED:"routing.updated",NODE_UPDATED:"node.updated",NODE_MAINTAIN_PROGRESS:"node.upgrade.progress",NODE_STARTED:"node.started",NODE_STOPPED:"node.stopped",NODE_ADDED_OWNER:"node.addedOwner",NODE_RUNTIME_INFO:"node.runtimeInfo",BLOCKLETS_RUNTIME_INFO:"node.blockletsRuntimeInfo",DOMAIN_STATUS:"domain.status",CERT_ADDED:"cert.added",CERT_ISSUED:"cert.issued",CERT_UPDATED:"cert.updated",CERT_REMOVED:"cert.removed",CERT_ERROR:"cert.error",RELOAD_GATEWAY:"gateway.reload"},WHO_CAN_ACCESS:{OWNER:"owner",INVITED:"invited",ALL:"all"},WHO_CAN_ACCESS_PREFIX_ROLES:"roles:",GATEWAY_REQ_LIMIT:Object.freeze({min:10,max:100}),STORE_DETAIL_PAGE_PATH_PREFIX:"/blocklets",MAX_USER_PAGE_SIZE:100,SERVER_STATUS:{RUNNING:1,STOPPED:2,START_FROM_CRASH:3},LOG_RETAIN_IN_DAYS:60,EXPIRED_BLOCKLET_DATA_RETENTION_DAYS:30,BLOCKLET_INSTALL_TYPE:{STORE:"store",URL:"url",DEV:"dev",CREATE:"create",RESTORE:"restore"},ROUTER_CACHE_GROUPS:{blockletProxy:{minSize:"1m",maxSize:"2g",period:"30d"}},MAIN_CHAIN_ENDPOINT:"https://main.abtnetwork.io/api/",USER_TYPE:d,SERVER_CACHE_TTL:3e5,BLOCKLET_CACHE_TTL:36e5,BACKUPS:{STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:7200}},CHECK_UPDATE:{STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:7200}},MONITOR_HISTORY_LENGTH:8640,MONITOR_RECORD_INTERVAL_SEC:10,INSTALL_ACTIONS:{INSTALL:"install",INSTALL_COMPONENT:"installComponent",UPGRADE_COMPONENT:"upgradeComponent"},COPYRIGHT_OWNER:"ArcBlock",FEDERATED:{SYNC_LIMIT:3},SESSION_TOKEN_STORAGE_KEY:"login_token",REFRESH_TOKEN_STORAGE_KEY:"refresh_token"})},30278:(e,t,i)=>{var o=i(31104),n=i(43676);e.exports=function(e,t){return e&&e.length?n(e,o(t,2)):[]}},94166:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)},n=this&&this.__rest||function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};t.__esModule=!0;var r=i(5057),a=i(18294),s=i(49266);t.default=function(e){var t=e.delay,i=void 0===t?0:t,l=e.type,c=void 0===l?"text":l,d=e.color,u=void 0===d?"#CDCDCD":d,p=e.rows,m=void 0===p?3:p,b=e.ready,f=e.firstLaunchOnly,E=e.children,w=e.className,h=e.showLoadingAnimation,g=e.customPlaceholder,_=n(e,["delay","type","color","rows","ready","firstLaunchOnly","children","className","showLoadingAnimation","customPlaceholder"]),v=r.useState(b),T=v[0],O=v[1],x=r.useRef(null);return r.useEffect((function(){f||!T||b?b&&(x.current&&window.clearTimeout(x.current),T||O(!0)):i&&i>0?x.current=window.setTimeout((function(){O(!1)}),i):O(!1)}),[f,T,b,i]),r.useEffect((function(){return function(){x.current&&window.clearTimeout(x.current)}}),[]),T?E:function(){var e=h?s.joinClassNames("show-loading-animation",w):w;if(g&&r.isValidElement(g)){var t=s.joinClassNames(g.props.className,e);return r.cloneElement(g,{className:t})}if(g)return g;var i=a[c];return r.createElement(i,o({},_,{color:u,rows:m,className:e}))}()}},22256:(e,t,i)=>{"use strict";var o=i(94166);t.Z=o.default},98392:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};t.__esModule=!0;var n=i(5057),r=i(49354),a=i(12208),s=i(49266),l={display:"flex"};t.default=function(e){var t=e.className,i=e.style,c=e.color,d=e.rows;return n.createElement("div",{className:s.joinClassNames("media-block",t),style:o(o({},l),i)},n.createElement(a.default,{color:c,style:{minHeight:55,width:55,minWidth:55,marginRight:10}}),n.createElement(r.default,{color:c,rows:d}))}},16102:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};t.__esModule=!0;var n=i(5057),r=i(49266);t.default=function(e){var t=e.className,i=e.style,a={backgroundColor:e.color,width:"100%",height:"100%",marginRight:10};return n.createElement("div",{className:r.joinClassNames("rect-shape",t),style:o(o({},a),i)})}},12208:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};t.__esModule=!0;var n=i(5057),r=i(49266);t.default=function(e){var t=e.className,i=e.style,a={backgroundColor:e.color,borderRadius:"500rem",width:"100%",height:"100%"};return n.createElement("div",{className:r.joinClassNames("round-shape",t),style:o(o({},a),i)})}},49354:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};t.__esModule=!0;var n=i(5057),r=i(13672),a=i(49266),s={width:"100%"},l=[97,100,94,90,98,95,98,40];t.default=function(e){var t=e.rows,i=e.lineSpacing,c=e.color,d=e.style,u=e.className,p=e.widths,m=void 0===p?l:p,b=function(e){return{maxHeight:100/(2*t-1)+"%",width:m[(e+m.length)%m.length]+"%"}};return n.createElement("div",{className:a.joinClassNames("text-block",u),style:o(o({},s),d)},Array.apply(null,Array(t)).map((function(e,t){return n.createElement(r.default,{color:c,style:b(t),lineSpacing:0!==t?i:0,key:t})})))}},13672:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};t.__esModule=!0;var n=i(5057),r=i(49266);t.default=function(e){var t=e.className,i=e.maxHeight,a=e.color,s=e.lineSpacing,l=void 0===s?"0.7em":s,c=e.style,d={maxHeight:i,width:"100%",height:"1em",backgroundColor:a,marginTop:l};return n.createElement("div",{className:r.joinClassNames("text-row",t),style:o(o({},d),c)})}},18294:(e,t,i)=>{"use strict";t.__esModule=!0,t.media=t.text=t.rect=t.round=t.textRow=t.MediaBlock=t.TextBlock=t.RectShape=t.RoundShape=t.TextRow=void 0;var o=i(13672);t.TextRow=o.default;var n=i(12208);t.RoundShape=n.default;var r=i(16102);t.RectShape=r.default;var a=i(49354);t.TextBlock=a.default;var s=i(98392);t.MediaBlock=s.default,t.textRow=o.default,t.round=n.default,t.rect=r.default,t.text=a.default,t.media=s.default},49266:(e,t)=>{"use strict";t.__esModule=!0,t.joinClassNames=void 0,t.joinClassNames=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return e})).join(" ")}},35833:function(e,t,i){var o;!function(n,r){"use strict";var a="function",s="undefined",l="object",c="string",d="major",u="model",p="name",m="type",b="vendor",f="version",E="architecture",w="console",h="mobile",g="tablet",_="smarttv",v="wearable",T="embedded",O="Amazon",x="Apple",S="ASUS",R="BlackBerry",y="Browser",k="Chrome",I="Firefox",A="Google",N="Huawei",L="LG",C="Microsoft",P="Motorola",D="Opera",j="Samsung",M="Sharp",B="Sony",U="Xiaomi",F="Zebra",K="Facebook",Z="Chromium OS",z="Mac OS",H=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},W=function(e,t){return typeof e===c&&-1!==q(t).indexOf(q(e))},q=function(e){return e.toLowerCase()},G=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===s?e:e.substring(0,500)},V=function(e,t){for(var i,o,n,s,c,d,u=0;u<t.length&&!c;){var p=t[u],m=t[u+1];for(i=o=0;i<p.length&&!c&&p[i];)if(c=p[i++].exec(e))for(n=0;n<m.length;n++)d=c[++o],typeof(s=m[n])===l&&s.length>0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,d):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=d?d.replace(s[1],s[2]):r:this[s[0]]=d?s[1].call(this,d,s[2]):r:4===s.length&&(this[s[0]]=d?s[3].call(this,d.replace(s[1],s[2])):r):this[s]=d||r;u+=2}},Y=function(e,t){for(var i in t)if(typeof t[i]===l&&t[i].length>0){for(var o=0;o<t[i].length;o++)if(W(t[i][o],e))return"?"===i?r:i}else if(W(t[i],e))return"?"===i?r:i;return e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,f],[/opios[\/ ]+([\w\.]+)/i],[f,[p,D+" Mini"]],[/\bopr\/([\w\.]+)/i],[f,[p,D]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[p,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[p,"UC"+y]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[p,"Smart Lenovo "+y]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+y],f],[/\bfocus\/([\w\.]+)/i],[f,[p,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[p,D+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[p,D+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[p,"MIUI "+y]],[/fxios\/([-\w\.]+)/i],[f,[p,I]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+y]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+y],f],[/samsungbrowser\/([\w\.]+)/i],[f,[p,j+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],f],[/metasr[\/ ]?([\d\.]+)/i],[f,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[p,f],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,K],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[p,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[p,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,k+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[p,"Android "+y]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[f,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[p,I+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,f],[/(cobalt)\/([\w\.]+)/i],[p,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[E,"amd64"]],[/(ia32(?=;))/i],[[E,q]],[/((?:i[346]|x)86)[;\)]/i],[[E,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[E,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[E,"armhf"]],[/windows (ce|mobile); ppc;/i],[[E,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[E,/ower/,"",q]],[/(sun4\w)[;\)]/i],[[E,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[E,q]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[b,j],[m,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[b,j],[m,h]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[b,x],[m,h]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[b,x],[m,g]],[/(macintosh);/i],[u,[b,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[b,M],[m,h]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[b,N],[m,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[b,N],[m,h]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[b,U],[m,h]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[b,U],[m,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[b,"OPPO"],[m,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[b,"Vivo"],[m,h]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[b,"Realme"],[m,h]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[b,P],[m,h]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[b,P],[m,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[b,L],[m,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[b,L],[m,h]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[b,"Lenovo"],[m,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[b,"Nokia"],[m,h]],[/(pixel c)\b/i],[u,[b,A],[m,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[b,A],[m,h]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[b,B],[m,h]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[b,B],[m,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[b,"OnePlus"],[m,h]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[b,O],[m,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[b,O],[m,h]],[/(playbook);[-\w\),; ]+(rim)/i],[u,b,[m,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[b,R],[m,h]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[b,S],[m,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[b,S],[m,h]],[/(nexus 9)/i],[u,[b,"HTC"],[m,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[u,/_/g," "],[m,h]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[b,"Acer"],[m,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[b,"Meizu"],[m,h]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[b,"Ulefone"],[m,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[b,u,[m,h]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[b,u,[m,g]],[/(surface duo)/i],[u,[b,C],[m,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[b,"Fairphone"],[m,h]],[/(u304aa)/i],[u,[b,"AT&T"],[m,h]],[/\bsie-(\w*)/i],[u,[b,"Siemens"],[m,h]],[/\b(rct\w+) b/i],[u,[b,"RCA"],[m,g]],[/\b(venue[\d ]{2,7}) b/i],[u,[b,"Dell"],[m,g]],[/\b(q(?:mv|ta)\w+) b/i],[u,[b,"Verizon"],[m,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[b,"Barnes & Noble"],[m,g]],[/\b(tm\d{3}\w+) b/i],[u,[b,"NuVision"],[m,g]],[/\b(k88) b/i],[u,[b,"ZTE"],[m,g]],[/\b(nx\d{3}j) b/i],[u,[b,"ZTE"],[m,h]],[/\b(gen\d{3}) b.+49h/i],[u,[b,"Swiss"],[m,h]],[/\b(zur\d{3}) b/i],[u,[b,"Swiss"],[m,g]],[/\b((zeki)?tb.*\b) b/i],[u,[b,"Zeki"],[m,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[b,"Dragon Touch"],u,[m,g]],[/\b(ns-?\w{0,9}) b/i],[u,[b,"Insignia"],[m,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[b,"NextBook"],[m,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[b,"Voice"],u,[m,h]],[/\b(lvtel\-)?(v1[12]) b/i],[[b,"LvTel"],u,[m,h]],[/\b(ph-1) /i],[u,[b,"Essential"],[m,h]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[b,"Envizen"],[m,g]],[/\b(trio[-\w\. ]+) b/i],[u,[b,"MachSpeed"],[m,g]],[/\btu_(1491) b/i],[u,[b,"Rotor"],[m,g]],[/(shield[\w ]+) b/i],[u,[b,"Nvidia"],[m,g]],[/(sprint) (\w+)/i],[b,u,[m,h]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[b,C],[m,h]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[b,F],[m,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[b,F],[m,h]],[/smart-tv.+(samsung)/i],[b,[m,_]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[b,j],[m,_]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,L],[m,_]],[/(apple) ?tv/i],[b,[u,x+" TV"],[m,_]],[/crkey/i],[[u,k+"cast"],[b,A],[m,_]],[/droid.+aft(\w+)( bui|\))/i],[u,[b,O],[m,_]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[b,M],[m,_]],[/(bravia[\w ]+)( bui|\))/i],[u,[b,B],[m,_]],[/(mitv-\w{5}) bui/i],[u,[b,U],[m,_]],[/Hbbtv.*(technisat) (.*);/i],[b,u,[m,_]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,G],[u,G],[m,_]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,_]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[b,u,[m,w]],[/droid.+; (shield) bui/i],[u,[b,"Nvidia"],[m,w]],[/(playstation [345portablevi]+)/i],[u,[b,B],[m,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[b,C],[m,w]],[/((pebble))app/i],[b,u,[m,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[b,x],[m,v]],[/droid.+; (glass) \d/i],[u,[b,A],[m,v]],[/droid.+; (wt63?0{2,3})\)/i],[u,[b,F],[m,v]],[/(quest( 2| pro)?)/i],[u,[b,K],[m,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[m,T]],[/(aeobc)\b/i],[u,[b,O],[m,T]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[m,h]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[m,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,h]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[f,Y,X]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,Y,X],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,z],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,f],[/\(bb(10);/i],[f,[p,R]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[p,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[p,k+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,Z],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,f],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,f]]},$=function(e,t){if(typeof e===l&&(t=e,e=r),!(this instanceof $))return new $(e,t).getResult();var i=typeof n!==s&&n.navigator?n.navigator:r,o=e||(i&&i.userAgent?i.userAgent:""),w=i&&i.userAgentData?i.userAgentData:r,_=t?function(e,t){var i={};for(var o in e)t[o]&&t[o].length%2===0?i[o]=t[o].concat(e[o]):i[o]=e[o];return i}(J,t):J,v=i&&i.userAgent==o;return this.getBrowser=function(){var e,t={};return t[p]=r,t[f]=r,V.call(t,o,_.browser),t[d]=typeof(e=t[f])===c?e.replace(/[^\d\.]/g,"").split(".")[0]:r,v&&i&&i.brave&&typeof i.brave.isBrave==a&&(t[p]="Brave"),t},this.getCPU=function(){var e={};return e[E]=r,V.call(e,o,_.cpu),e},this.getDevice=function(){var e={};return e[b]=r,e[u]=r,e[m]=r,V.call(e,o,_.device),v&&!e[m]&&w&&w.mobile&&(e[m]=h),v&&"Macintosh"==e[u]&&i&&typeof i.standalone!==s&&i.maxTouchPoints&&i.maxTouchPoints>2&&(e[u]="iPad",e[m]=g),e},this.getEngine=function(){var e={};return e[p]=r,e[f]=r,V.call(e,o,_.engine),e},this.getOS=function(){var e={};return e[p]=r,e[f]=r,V.call(e,o,_.os),v&&!e[p]&&w&&"Unknown"!=w.platform&&(e[p]=w.platform.replace(/chrome os/i,Z).replace(/macos/i,z)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return o},this.setUA=function(e){return o=typeof e===c&&e.length>500?G(e,500):e,this},this.setUA(o),this};$.VERSION="1.0.37",$.BROWSER=H([p,f,d]),$.CPU=H([E]),$.DEVICE=H([u,b,m,w,h,_,g,v,T]),$.ENGINE=$.OS=H([p,f]),typeof t!==s?(e.exports&&(t=e.exports=$),t.UAParser=$):i.amdO?(o=function(){return $}.call(t,i,t,e))===r||(e.exports=o):typeof n!==s&&(n.UAParser=$);var Q=typeof n!==s&&(n.jQuery||n.Zepto);if(Q&&!Q.ua){var ee=new $;Q.ua=ee.getResult(),Q.ua.get=function(){return ee.getUA()},Q.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var i in t)Q.ua[i]=t[i]}}}("object"===typeof window?window:this)}}]);